Date: 2019-12-26 01:10:54 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 16723 rows and 94 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] 16723 94
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 | ||
---|---|---|---|---|---|---|
MAD:hclust | 6 | 1.000 | 0.952 | 0.984 | ** | 2,4 |
MAD:mclust | 4 | 1.000 | 1.000 | 1.000 | ** | 2,3 |
MAD:NMF | 4 | 1.000 | 1.000 | 1.000 | ** | 3 |
ATC:hclust | 6 | 1.000 | 0.963 | 0.988 | ** | 2,5 |
ATC:skmeans | 5 | 1.000 | 0.979 | 0.986 | ** | 4 |
ATC:NMF | 4 | 1.000 | 1.000 | 1.000 | ** | 2 |
MAD:pam | 6 | 0.999 | 0.982 | 0.989 | ** | 2,4,5 |
SD:mclust | 6 | 0.987 | 0.945 | 0.976 | ** | 3,4 |
CV:mclust | 6 | 0.987 | 0.941 | 0.978 | ** | 2,4 |
SD:skmeans | 5 | 0.986 | 0.973 | 0.965 | ** | 2,3,4 |
CV:hclust | 6 | 0.986 | 0.975 | 0.989 | ** | 3,4 |
SD:NMF | 6 | 0.986 | 0.944 | 0.941 | ** | 2,4 |
CV:skmeans | 5 | 0.986 | 0.984 | 0.971 | ** | 2,4 |
SD:hclust | 6 | 0.985 | 0.930 | 0.968 | ** | 3,4 |
MAD:skmeans | 5 | 0.984 | 0.975 | 0.964 | ** | 2,3,4 |
CV:pam | 6 | 0.956 | 0.954 | 0.939 | ** | 4,5 |
ATC:mclust | 6 | 0.948 | 0.851 | 0.926 | * | 3,4,5 |
ATC:pam | 6 | 0.929 | 0.954 | 0.937 | * | 2,3,4,5 |
SD:pam | 6 | 0.928 | 0.927 | 0.896 | * | 4,5 |
CV:NMF | 6 | 0.923 | 0.941 | 0.947 | * | 4 |
MAD:kmeans | 4 | 0.846 | 0.962 | 0.869 | ||
CV:kmeans | 4 | 0.793 | 0.949 | 0.814 | ||
ATC:kmeans | 3 | 0.611 | 0.876 | 0.859 | ||
SD:kmeans | 4 | 0.583 | 0.954 | 0.838 |
**: 1-PAC > 0.95, *: 1-PAC > 0.9
Cumulative distribution function curves of consensus matrix for all methods.
collect_plots(res_list, fun = plot_ecdf)
Consensus heatmaps for all methods. (What is a consensus heatmap?)
collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)
Membership heatmaps for all methods. (What is a membership heatmap?)
collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)
Signature heatmaps for all methods. (What is a signature heatmap?)
Note in following heatmaps, rows are scaled.
collect_plots(res_list, k = 2, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)
The statistics used for measuring the stability of consensus partitioning. (How are they defined?)
get_stats(res_list, k = 2)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 2 1.000 0.962 0.986 0.501 0.500 0.500
#> CV:NMF 2 0.893 0.966 0.965 0.497 0.497 0.497
#> MAD:NMF 2 0.891 0.922 0.968 0.451 0.546 0.546
#> ATC:NMF 2 1.000 0.999 0.999 0.386 0.616 0.616
#> SD:skmeans 2 1.000 1.000 1.000 0.504 0.497 0.497
#> CV:skmeans 2 1.000 1.000 1.000 0.504 0.497 0.497
#> MAD:skmeans 2 1.000 1.000 1.000 0.504 0.497 0.497
#> ATC:skmeans 2 0.864 0.957 0.980 0.429 0.569 0.569
#> SD:mclust 2 0.496 0.869 0.900 0.504 0.497 0.497
#> CV:mclust 2 1.000 0.974 0.975 0.504 0.497 0.497
#> MAD:mclust 2 1.000 0.996 0.996 0.504 0.497 0.497
#> ATC:mclust 2 0.496 0.679 0.803 0.504 0.497 0.497
#> SD:kmeans 2 0.381 0.394 0.695 0.436 0.605 0.605
#> CV:kmeans 2 0.244 0.525 0.691 0.412 0.616 0.616
#> MAD:kmeans 2 0.240 0.635 0.783 0.438 0.616 0.616
#> ATC:kmeans 2 0.496 0.950 0.939 0.387 0.616 0.616
#> SD:pam 2 0.872 0.933 0.972 0.421 0.586 0.586
#> CV:pam 2 0.809 0.884 0.953 0.439 0.553 0.553
#> MAD:pam 2 0.999 0.964 0.985 0.493 0.506 0.506
#> ATC:pam 2 1.000 0.997 0.999 0.386 0.616 0.616
#> SD:hclust 2 0.661 0.925 0.956 0.410 0.616 0.616
#> CV:hclust 2 0.497 0.960 0.946 0.345 0.661 0.661
#> MAD:hclust 2 1.000 0.990 0.993 0.389 0.616 0.616
#> ATC:hclust 2 1.000 0.987 0.994 0.390 0.616 0.616
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.648 0.809 0.810 0.273 0.830 0.664
#> CV:NMF 3 0.518 0.671 0.691 0.270 0.633 0.399
#> MAD:NMF 3 1.000 0.949 0.978 0.471 0.688 0.478
#> ATC:NMF 3 0.743 0.944 0.948 0.651 0.743 0.582
#> SD:skmeans 3 1.000 0.991 0.988 0.284 0.857 0.712
#> CV:skmeans 3 0.747 0.962 0.895 0.275 0.857 0.712
#> MAD:skmeans 3 1.000 0.991 0.994 0.290 0.841 0.684
#> ATC:skmeans 3 0.743 0.850 0.887 0.475 0.712 0.524
#> SD:mclust 3 1.000 0.975 0.980 0.275 0.633 0.399
#> CV:mclust 3 0.633 0.878 0.870 0.271 0.857 0.712
#> MAD:mclust 3 1.000 1.000 1.000 0.274 0.633 0.399
#> ATC:mclust 3 1.000 1.000 1.000 0.273 0.633 0.399
#> SD:kmeans 3 0.518 0.666 0.653 0.407 0.524 0.339
#> CV:kmeans 3 0.244 0.819 0.776 0.470 0.771 0.628
#> MAD:kmeans 3 0.513 0.600 0.591 0.416 0.491 0.324
#> ATC:kmeans 3 0.611 0.876 0.859 0.535 0.743 0.582
#> SD:pam 3 0.788 0.797 0.918 0.575 0.730 0.543
#> CV:pam 3 0.750 0.773 0.907 0.505 0.732 0.533
#> MAD:pam 3 0.896 0.870 0.947 0.344 0.690 0.462
#> ATC:pam 3 1.000 0.998 0.999 0.664 0.743 0.582
#> SD:hclust 3 1.000 0.993 0.994 0.499 0.771 0.628
#> CV:hclust 3 1.000 1.000 1.000 0.781 0.725 0.585
#> MAD:hclust 3 0.771 0.921 0.940 0.653 0.743 0.582
#> ATC:hclust 3 0.649 0.701 0.874 0.360 0.969 0.949
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 1.000 1.000 1.000 0.185 0.878 0.655
#> CV:NMF 4 1.000 1.000 1.000 0.198 0.886 0.681
#> MAD:NMF 4 1.000 1.000 1.000 0.140 0.871 0.636
#> ATC:NMF 4 1.000 1.000 1.000 0.188 0.886 0.681
#> SD:skmeans 4 1.000 1.000 1.000 0.169 0.890 0.690
#> CV:skmeans 4 1.000 1.000 1.000 0.178 0.890 0.690
#> MAD:skmeans 4 1.000 1.000 1.000 0.164 0.886 0.677
#> ATC:skmeans 4 1.000 1.000 1.000 0.195 0.881 0.669
#> SD:mclust 4 1.000 1.000 1.000 0.177 0.886 0.681
#> CV:mclust 4 1.000 1.000 1.000 0.181 0.890 0.690
#> MAD:mclust 4 1.000 1.000 1.000 0.178 0.886 0.681
#> ATC:mclust 4 1.000 1.000 1.000 0.178 0.886 0.681
#> SD:kmeans 4 0.583 0.954 0.838 0.155 0.886 0.681
#> CV:kmeans 4 0.793 0.949 0.814 0.154 0.857 0.630
#> MAD:kmeans 4 0.846 0.962 0.869 0.162 0.863 0.640
#> ATC:kmeans 4 0.662 0.960 0.831 0.180 0.886 0.681
#> SD:pam 4 1.000 1.000 1.000 0.140 0.857 0.601
#> CV:pam 4 1.000 1.000 1.000 0.146 0.859 0.605
#> MAD:pam 4 1.000 1.000 1.000 0.141 0.866 0.626
#> ATC:pam 4 1.000 1.000 1.000 0.177 0.886 0.681
#> SD:hclust 4 1.000 1.000 1.000 0.232 0.857 0.630
#> CV:hclust 4 1.000 1.000 1.000 0.233 0.857 0.630
#> MAD:hclust 4 1.000 1.000 1.000 0.177 0.886 0.681
#> ATC:hclust 4 0.741 0.825 0.878 0.238 0.754 0.579
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.991 0.981 0.979 0.00735 1.000 1.000
#> CV:NMF 5 0.978 0.954 0.952 0.01779 1.000 1.000
#> MAD:NMF 5 1.000 0.995 0.994 0.00212 1.000 1.000
#> ATC:NMF 5 1.000 0.993 0.992 0.00334 1.000 1.000
#> SD:skmeans 5 0.986 0.973 0.965 0.02332 0.978 0.910
#> CV:skmeans 5 0.986 0.984 0.971 0.02641 0.978 0.910
#> MAD:skmeans 5 0.984 0.975 0.964 0.02608 0.978 0.910
#> ATC:skmeans 5 1.000 0.979 0.986 0.02839 0.979 0.915
#> SD:mclust 5 0.990 0.962 0.987 0.01093 0.996 0.982
#> CV:mclust 5 0.987 0.971 0.990 0.00946 0.996 0.982
#> MAD:mclust 5 1.000 0.983 0.996 0.00716 0.996 0.982
#> ATC:mclust 5 0.984 0.956 0.976 0.01859 0.985 0.940
#> SD:kmeans 5 0.862 0.896 0.843 0.08110 1.000 1.000
#> CV:kmeans 5 0.723 0.901 0.837 0.08710 1.000 1.000
#> MAD:kmeans 5 0.870 0.899 0.858 0.07317 1.000 1.000
#> ATC:kmeans 5 0.752 0.897 0.839 0.08161 1.000 1.000
#> SD:pam 5 1.000 0.990 0.994 0.02863 0.978 0.910
#> CV:pam 5 1.000 0.998 0.999 0.02905 0.978 0.910
#> MAD:pam 5 0.943 0.966 0.956 0.03277 0.977 0.907
#> ATC:pam 5 1.000 0.989 0.994 0.02801 0.979 0.915
#> SD:hclust 5 0.989 0.896 0.961 0.01672 0.988 0.952
#> CV:hclust 5 0.989 0.889 0.962 0.01595 0.988 0.952
#> MAD:hclust 5 0.973 0.929 0.964 0.01467 0.996 0.982
#> ATC:hclust 5 0.982 0.955 0.980 0.16606 0.897 0.696
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.986 0.944 0.941 0.01348 0.981 0.921
#> CV:NMF 6 0.923 0.941 0.947 0.02006 0.976 0.900
#> MAD:NMF 6 0.985 0.974 0.966 0.00947 1.000 1.000
#> ATC:NMF 6 1.000 0.985 0.983 0.00397 1.000 1.000
#> SD:skmeans 6 0.943 0.931 0.952 0.01648 0.997 0.989
#> CV:skmeans 6 0.937 0.945 0.958 0.01660 0.997 0.989
#> MAD:skmeans 6 0.915 0.927 0.941 0.02075 0.997 0.989
#> ATC:skmeans 6 0.960 0.894 0.934 0.02092 0.993 0.969
#> SD:mclust 6 0.987 0.945 0.976 0.01613 0.984 0.933
#> CV:mclust 6 0.987 0.941 0.978 0.01663 0.984 0.933
#> MAD:mclust 6 0.955 0.819 0.924 0.02845 0.989 0.956
#> ATC:mclust 6 0.948 0.851 0.926 0.03415 0.969 0.864
#> SD:kmeans 6 0.846 0.831 0.790 0.04045 1.000 1.000
#> CV:kmeans 6 0.854 0.811 0.801 0.05217 0.971 0.880
#> MAD:kmeans 6 0.841 0.834 0.789 0.03579 1.000 1.000
#> ATC:kmeans 6 0.836 0.836 0.813 0.05260 1.000 1.000
#> SD:pam 6 0.928 0.927 0.896 0.04186 0.966 0.845
#> CV:pam 6 0.956 0.954 0.939 0.03647 0.965 0.841
#> MAD:pam 6 0.999 0.982 0.989 0.04044 0.966 0.845
#> ATC:pam 6 0.929 0.954 0.937 0.04292 0.966 0.846
#> SD:hclust 6 0.985 0.930 0.968 0.01185 0.980 0.917
#> CV:hclust 6 0.986 0.975 0.989 0.01381 0.980 0.917
#> MAD:hclust 6 1.000 0.952 0.984 0.01684 0.979 0.914
#> ATC:hclust 6 1.000 0.963 0.988 0.02029 0.979 0.912
Following heatmap plots the partition for each combination of methods and the lightness correspond to the silhouette scores for samples in each method. On top the consensus subgroup is inferred from all methods by taking the mean silhouette scores as weight.
collect_stats(res_list, k = 2)
collect_stats(res_list, k = 3)
collect_stats(res_list, k = 4)
collect_stats(res_list, k = 5)
collect_stats(res_list, k = 6)
Collect partitions from all methods:
collect_classes(res_list, k = 2)
collect_classes(res_list, k = 3)
collect_classes(res_list, k = 4)
collect_classes(res_list, k = 5)
collect_classes(res_list, k = 6)
Overlap of top rows from different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "euler")
top_rows_overlap(res_list, top_n = 2000, method = "euler")
top_rows_overlap(res_list, top_n = 3000, method = "euler")
top_rows_overlap(res_list, top_n = 4000, method = "euler")
top_rows_overlap(res_list, top_n = 5000, method = "euler")
Also visualize the correspondance of rankings between different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "correspondance")
top_rows_overlap(res_list, top_n = 2000, method = "correspondance")
top_rows_overlap(res_list, top_n = 3000, method = "correspondance")
top_rows_overlap(res_list, top_n = 4000, method = "correspondance")
top_rows_overlap(res_list, top_n = 5000, method = "correspondance")
Heatmaps of the top rows:
top_rows_heatmap(res_list, top_n = 1000)
top_rows_heatmap(res_list, top_n = 2000)
top_rows_heatmap(res_list, top_n = 3000)
top_rows_heatmap(res_list, top_n = 4000)
top_rows_heatmap(res_list, top_n = 5000)
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 16723 rows and 94 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 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.661 0.925 0.956 0.4096 0.616 0.616
#> 3 3 1.000 0.993 0.994 0.4994 0.771 0.628
#> 4 4 1.000 1.000 1.000 0.2315 0.857 0.630
#> 5 5 0.989 0.896 0.961 0.0167 0.988 0.952
#> 6 6 0.985 0.930 0.968 0.0118 0.980 0.917
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
#> SRR2087314 1 0.738 0.810 0.792 0.208
#> SRR2087307 1 0.738 0.810 0.792 0.208
#> SRR2087359 1 0.000 0.935 1.000 0.000
#> SRR2087373 1 0.000 0.935 1.000 0.000
#> SRR2087363 1 0.000 0.935 1.000 0.000
#> SRR2087317 1 0.738 0.810 0.792 0.208
#> SRR2087313 1 0.738 0.810 0.792 0.208
#> SRR2087360 1 0.000 0.935 1.000 0.000
#> SRR2087375 1 0.000 0.935 1.000 0.000
#> SRR2087349 1 0.000 0.935 1.000 0.000
#> SRR2087326 1 0.000 0.935 1.000 0.000
#> SRR2087306 1 0.738 0.810 0.792 0.208
#> SRR2087347 1 0.000 0.935 1.000 0.000
#> SRR2087327 1 0.000 0.935 1.000 0.000
#> SRR2087318 1 0.738 0.810 0.792 0.208
#> SRR2087350 1 0.000 0.935 1.000 0.000
#> SRR2087309 1 0.738 0.810 0.792 0.208
#> SRR2087344 1 0.000 0.935 1.000 0.000
#> SRR2087364 1 0.000 0.935 1.000 0.000
#> SRR2087332 1 0.000 0.935 1.000 0.000
#> SRR2087336 1 0.000 0.935 1.000 0.000
#> SRR2087348 1 0.000 0.935 1.000 0.000
#> SRR2087353 1 0.000 0.935 1.000 0.000
#> SRR2087343 1 0.000 0.935 1.000 0.000
#> SRR2087322 1 0.738 0.810 0.792 0.208
#> SRR2087335 1 0.000 0.935 1.000 0.000
#> SRR2087362 1 0.000 0.935 1.000 0.000
#> SRR2087374 1 0.000 0.935 1.000 0.000
#> SRR2087346 1 0.000 0.935 1.000 0.000
#> SRR2087345 1 0.000 0.935 1.000 0.000
#> SRR2087358 1 0.000 0.935 1.000 0.000
#> SRR2087334 1 0.000 0.935 1.000 0.000
#> SRR2087323 1 0.738 0.810 0.792 0.208
#> SRR2087330 1 0.000 0.935 1.000 0.000
#> SRR2087354 1 0.000 0.935 1.000 0.000
#> SRR2087342 1 0.000 0.935 1.000 0.000
#> SRR2087369 1 0.000 0.935 1.000 0.000
#> SRR2087371 1 0.000 0.935 1.000 0.000
#> SRR2087361 1 0.000 0.935 1.000 0.000
#> SRR2087367 1 0.000 0.935 1.000 0.000
#> SRR2087301 2 0.000 1.000 0.000 1.000
#> SRR2087333 1 0.000 0.935 1.000 0.000
#> SRR2087356 1 0.000 0.935 1.000 0.000
#> SRR2087370 1 0.000 0.935 1.000 0.000
#> SRR2087312 1 0.738 0.810 0.792 0.208
#> SRR2087338 1 0.000 0.935 1.000 0.000
#> SRR2087365 1 0.000 0.935 1.000 0.000
#> SRR2087319 1 0.738 0.810 0.792 0.208
#> SRR2087368 1 0.000 0.935 1.000 0.000
#> SRR2087315 1 0.738 0.810 0.792 0.208
#> SRR2087372 1 0.000 0.935 1.000 0.000
#> SRR2087357 1 0.000 0.935 1.000 0.000
#> SRR2087297 2 0.000 1.000 0.000 1.000
#> SRR2087352 1 0.000 0.935 1.000 0.000
#> SRR2087339 1 0.000 0.935 1.000 0.000
#> SRR2087286 2 0.000 1.000 0.000 1.000
#> SRR2087355 1 0.000 0.935 1.000 0.000
#> SRR2087331 1 0.000 0.935 1.000 0.000
#> SRR2087328 1 0.000 0.935 1.000 0.000
#> SRR2087321 1 0.738 0.810 0.792 0.208
#> SRR2087310 1 0.738 0.810 0.792 0.208
#> SRR2087341 1 0.000 0.935 1.000 0.000
#> SRR2087340 1 0.000 0.935 1.000 0.000
#> SRR2087283 2 0.000 1.000 0.000 1.000
#> SRR2087296 2 0.000 1.000 0.000 1.000
#> SRR2087337 1 0.000 0.935 1.000 0.000
#> SRR2087316 1 0.738 0.810 0.792 0.208
#> SRR2087325 1 0.738 0.810 0.792 0.208
#> SRR2087287 2 0.000 1.000 0.000 1.000
#> SRR2087289 2 0.000 1.000 0.000 1.000
#> SRR2087311 1 0.738 0.810 0.792 0.208
#> SRR2087324 1 0.738 0.810 0.792 0.208
#> SRR2087305 2 0.000 1.000 0.000 1.000
#> SRR2087282 2 0.000 1.000 0.000 1.000
#> SRR2087285 2 0.000 1.000 0.000 1.000
#> SRR2087290 2 0.000 1.000 0.000 1.000
#> SRR2087293 2 0.000 1.000 0.000 1.000
#> SRR2087329 1 0.000 0.935 1.000 0.000
#> SRR2087366 1 0.000 0.935 1.000 0.000
#> SRR2087300 2 0.000 1.000 0.000 1.000
#> SRR2087284 2 0.000 1.000 0.000 1.000
#> SRR2087303 2 0.000 1.000 0.000 1.000
#> SRR2087351 1 0.000 0.935 1.000 0.000
#> SRR2087302 2 0.000 1.000 0.000 1.000
#> SRR2087304 2 0.000 1.000 0.000 1.000
#> SRR2087298 2 0.000 1.000 0.000 1.000
#> SRR2087320 1 0.738 0.810 0.792 0.208
#> SRR2087308 1 0.738 0.810 0.792 0.208
#> SRR2087295 2 0.000 1.000 0.000 1.000
#> SRR2087292 2 0.000 1.000 0.000 1.000
#> SRR2087291 2 0.000 1.000 0.000 1.000
#> SRR2087294 2 0.000 1.000 0.000 1.000
#> SRR2087299 2 0.000 1.000 0.000 1.000
#> SRR2087288 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
#> SRR2087314 1 0.000 1.000 1.000 0 0.000
#> SRR2087307 1 0.000 1.000 1.000 0 0.000
#> SRR2087359 3 0.103 0.987 0.024 0 0.976
#> SRR2087373 3 0.103 0.987 0.024 0 0.976
#> SRR2087363 3 0.103 0.987 0.024 0 0.976
#> SRR2087317 1 0.000 1.000 1.000 0 0.000
#> SRR2087313 1 0.000 1.000 1.000 0 0.000
#> SRR2087360 3 0.103 0.987 0.024 0 0.976
#> SRR2087375 3 0.103 0.987 0.024 0 0.976
#> SRR2087349 3 0.000 0.988 0.000 0 1.000
#> SRR2087326 3 0.000 0.988 0.000 0 1.000
#> SRR2087306 1 0.000 1.000 1.000 0 0.000
#> SRR2087347 3 0.000 0.988 0.000 0 1.000
#> SRR2087327 3 0.000 0.988 0.000 0 1.000
#> SRR2087318 1 0.000 1.000 1.000 0 0.000
#> SRR2087350 3 0.000 0.988 0.000 0 1.000
#> SRR2087309 1 0.000 1.000 1.000 0 0.000
#> SRR2087344 3 0.000 0.988 0.000 0 1.000
#> SRR2087364 3 0.103 0.987 0.024 0 0.976
#> SRR2087332 3 0.000 0.988 0.000 0 1.000
#> SRR2087336 3 0.000 0.988 0.000 0 1.000
#> SRR2087348 3 0.000 0.988 0.000 0 1.000
#> SRR2087353 3 0.103 0.987 0.024 0 0.976
#> SRR2087343 3 0.000 0.988 0.000 0 1.000
#> SRR2087322 1 0.000 1.000 1.000 0 0.000
#> SRR2087335 3 0.000 0.988 0.000 0 1.000
#> SRR2087362 3 0.103 0.987 0.024 0 0.976
#> SRR2087374 3 0.103 0.987 0.024 0 0.976
#> SRR2087346 3 0.000 0.988 0.000 0 1.000
#> SRR2087345 3 0.000 0.988 0.000 0 1.000
#> SRR2087358 3 0.103 0.987 0.024 0 0.976
#> SRR2087334 3 0.000 0.988 0.000 0 1.000
#> SRR2087323 1 0.000 1.000 1.000 0 0.000
#> SRR2087330 3 0.000 0.988 0.000 0 1.000
#> SRR2087354 3 0.103 0.987 0.024 0 0.976
#> SRR2087342 3 0.000 0.988 0.000 0 1.000
#> SRR2087369 3 0.103 0.987 0.024 0 0.976
#> SRR2087371 3 0.103 0.987 0.024 0 0.976
#> SRR2087361 3 0.103 0.987 0.024 0 0.976
#> SRR2087367 3 0.103 0.987 0.024 0 0.976
#> SRR2087301 2 0.000 1.000 0.000 1 0.000
#> SRR2087333 3 0.000 0.988 0.000 0 1.000
#> SRR2087356 3 0.103 0.987 0.024 0 0.976
#> SRR2087370 3 0.103 0.987 0.024 0 0.976
#> SRR2087312 1 0.000 1.000 1.000 0 0.000
#> SRR2087338 3 0.000 0.988 0.000 0 1.000
#> SRR2087365 3 0.103 0.987 0.024 0 0.976
#> SRR2087319 1 0.000 1.000 1.000 0 0.000
#> SRR2087368 3 0.103 0.987 0.024 0 0.976
#> SRR2087315 1 0.000 1.000 1.000 0 0.000
#> SRR2087372 3 0.103 0.987 0.024 0 0.976
#> SRR2087357 3 0.103 0.987 0.024 0 0.976
#> SRR2087297 2 0.000 1.000 0.000 1 0.000
#> SRR2087352 3 0.103 0.987 0.024 0 0.976
#> SRR2087339 3 0.000 0.988 0.000 0 1.000
#> SRR2087286 2 0.000 1.000 0.000 1 0.000
#> SRR2087355 3 0.103 0.987 0.024 0 0.976
#> SRR2087331 3 0.000 0.988 0.000 0 1.000
#> SRR2087328 3 0.000 0.988 0.000 0 1.000
#> SRR2087321 1 0.000 1.000 1.000 0 0.000
#> SRR2087310 1 0.000 1.000 1.000 0 0.000
#> SRR2087341 3 0.000 0.988 0.000 0 1.000
#> SRR2087340 3 0.000 0.988 0.000 0 1.000
#> SRR2087283 2 0.000 1.000 0.000 1 0.000
#> SRR2087296 2 0.000 1.000 0.000 1 0.000
#> SRR2087337 3 0.000 0.988 0.000 0 1.000
#> SRR2087316 1 0.000 1.000 1.000 0 0.000
#> SRR2087325 1 0.000 1.000 1.000 0 0.000
#> SRR2087287 2 0.000 1.000 0.000 1 0.000
#> SRR2087289 2 0.000 1.000 0.000 1 0.000
#> SRR2087311 1 0.000 1.000 1.000 0 0.000
#> SRR2087324 1 0.000 1.000 1.000 0 0.000
#> SRR2087305 2 0.000 1.000 0.000 1 0.000
#> SRR2087282 2 0.000 1.000 0.000 1 0.000
#> SRR2087285 2 0.000 1.000 0.000 1 0.000
#> SRR2087290 2 0.000 1.000 0.000 1 0.000
#> SRR2087293 2 0.000 1.000 0.000 1 0.000
#> SRR2087329 3 0.000 0.988 0.000 0 1.000
#> SRR2087366 3 0.103 0.987 0.024 0 0.976
#> SRR2087300 2 0.000 1.000 0.000 1 0.000
#> SRR2087284 2 0.000 1.000 0.000 1 0.000
#> SRR2087303 2 0.000 1.000 0.000 1 0.000
#> SRR2087351 3 0.103 0.987 0.024 0 0.976
#> SRR2087302 2 0.000 1.000 0.000 1 0.000
#> SRR2087304 2 0.000 1.000 0.000 1 0.000
#> SRR2087298 2 0.000 1.000 0.000 1 0.000
#> SRR2087320 1 0.000 1.000 1.000 0 0.000
#> SRR2087308 1 0.000 1.000 1.000 0 0.000
#> SRR2087295 2 0.000 1.000 0.000 1 0.000
#> SRR2087292 2 0.000 1.000 0.000 1 0.000
#> SRR2087291 2 0.000 1.000 0.000 1 0.000
#> SRR2087294 2 0.000 1.000 0.000 1 0.000
#> SRR2087299 2 0.000 1.000 0.000 1 0.000
#> SRR2087288 2 0.000 1.000 0.000 1 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.4171 1.000 0 0 0 0.396 0.604
#> SRR2087307 4 0.4192 0.197 0 0 0 0.596 0.404
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.4101 -0.175 0 0 0 0.628 0.372
#> SRR2087313 4 0.4101 -0.175 0 0 0 0.628 0.372
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087306 5 0.4171 1.000 0 0 0 0.396 0.604
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.4101 -0.175 0 0 0 0.628 0.372
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.4101 -0.175 0 0 0 0.628 0.372
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.0162 0.723 0 0 0 0.996 0.004
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.0162 0.723 0 0 0 0.996 0.004
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.0794 0.705 0 0 0 0.972 0.028
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087319 5 0.4171 1.000 0 0 0 0.396 0.604
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.4101 -0.175 0 0 0 0.628 0.372
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.0000 0.724 0 0 0 1.000 0.000
#> SRR2087310 4 0.0000 0.724 0 0 0 1.000 0.000
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.0000 0.724 0 0 0 1.000 0.000
#> SRR2087325 4 0.0794 0.705 0 0 0 0.972 0.028
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.0000 0.724 0 0 0 1.000 0.000
#> SRR2087324 4 0.0162 0.723 0 0 0 0.996 0.004
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.0162 0.723 0 0 0 0.996 0.004
#> SRR2087308 4 0.0000 0.724 0 0 0 1.000 0.000
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 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
#> SRR2087314 6 0.0000 0.454 0 0 0 0.000 0.0 1.000
#> SRR2087307 5 0.0000 0.000 0 0 0 0.000 1.0 0.000
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087317 6 0.3817 0.651 0 0 0 0.432 0.0 0.568
#> SRR2087313 6 0.3817 0.651 0 0 0 0.432 0.0 0.568
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087306 6 0.0000 0.454 0 0 0 0.000 0.0 1.000
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087318 6 0.3817 0.651 0 0 0 0.432 0.0 0.568
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087309 6 0.3817 0.651 0 0 0 0.432 0.0 0.568
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087322 4 0.0000 0.897 0 0 0 1.000 0.0 0.000
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087323 4 0.0000 0.897 0 0 0 1.000 0.0 0.000
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087312 4 0.5328 0.382 0 0 0 0.596 0.2 0.204
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087319 6 0.0000 0.454 0 0 0 0.000 0.0 1.000
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087315 6 0.3817 0.651 0 0 0 0.432 0.0 0.568
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087321 4 0.0146 0.898 0 0 0 0.996 0.0 0.004
#> SRR2087310 4 0.0146 0.898 0 0 0 0.996 0.0 0.004
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087316 4 0.0146 0.898 0 0 0 0.996 0.0 0.004
#> SRR2087325 4 0.5328 0.382 0 0 0 0.596 0.2 0.204
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087311 4 0.0146 0.898 0 0 0 0.996 0.0 0.004
#> SRR2087324 4 0.0000 0.897 0 0 0 1.000 0.0 0.000
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.0 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.0 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087320 4 0.0000 0.897 0 0 0 1.000 0.0 0.000
#> SRR2087308 4 0.0146 0.898 0 0 0 0.996 0.0 0.004
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.0 0.000
#> SRR2087288 2 0.0000 1.000 0 1 0 0.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["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 16723 rows and 94 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 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.381 0.394 0.695 0.4356 0.605 0.605
#> 3 3 0.518 0.666 0.653 0.4065 0.524 0.339
#> 4 4 0.583 0.954 0.838 0.1555 0.886 0.681
#> 5 5 0.862 0.896 0.843 0.0811 1.000 1.000
#> 6 6 0.846 0.831 0.790 0.0405 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] 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
#> SRR2087314 2 0.000 0.461 0.000 1.000
#> SRR2087307 2 0.000 0.461 0.000 1.000
#> SRR2087359 2 0.999 -0.398 0.480 0.520
#> SRR2087373 2 0.999 -0.398 0.480 0.520
#> SRR2087363 2 0.999 -0.398 0.480 0.520
#> SRR2087317 2 0.000 0.461 0.000 1.000
#> SRR2087313 2 0.000 0.461 0.000 1.000
#> SRR2087360 2 0.999 -0.398 0.480 0.520
#> SRR2087375 2 0.999 -0.398 0.480 0.520
#> SRR2087349 1 0.969 1.000 0.604 0.396
#> SRR2087326 1 0.969 1.000 0.604 0.396
#> SRR2087306 2 0.000 0.461 0.000 1.000
#> SRR2087347 1 0.969 1.000 0.604 0.396
#> SRR2087327 1 0.969 1.000 0.604 0.396
#> SRR2087318 2 0.000 0.461 0.000 1.000
#> SRR2087350 1 0.969 1.000 0.604 0.396
#> SRR2087309 2 0.000 0.461 0.000 1.000
#> SRR2087344 1 0.969 1.000 0.604 0.396
#> SRR2087364 2 0.999 -0.398 0.480 0.520
#> SRR2087332 1 0.969 1.000 0.604 0.396
#> SRR2087336 1 0.969 1.000 0.604 0.396
#> SRR2087348 1 0.969 1.000 0.604 0.396
#> SRR2087353 2 0.999 -0.398 0.480 0.520
#> SRR2087343 1 0.969 1.000 0.604 0.396
#> SRR2087322 2 0.000 0.461 0.000 1.000
#> SRR2087335 1 0.969 1.000 0.604 0.396
#> SRR2087362 2 0.999 -0.398 0.480 0.520
#> SRR2087374 2 0.999 -0.398 0.480 0.520
#> SRR2087346 1 0.969 1.000 0.604 0.396
#> SRR2087345 1 0.969 1.000 0.604 0.396
#> SRR2087358 2 0.999 -0.398 0.480 0.520
#> SRR2087334 1 0.969 1.000 0.604 0.396
#> SRR2087323 2 0.000 0.461 0.000 1.000
#> SRR2087330 1 0.969 1.000 0.604 0.396
#> SRR2087354 2 0.999 -0.398 0.480 0.520
#> SRR2087342 1 0.969 1.000 0.604 0.396
#> SRR2087369 2 0.999 -0.398 0.480 0.520
#> SRR2087371 2 0.999 -0.398 0.480 0.520
#> SRR2087361 2 0.999 -0.398 0.480 0.520
#> SRR2087367 2 0.999 -0.398 0.480 0.520
#> SRR2087301 2 0.963 0.533 0.388 0.612
#> SRR2087333 1 0.969 1.000 0.604 0.396
#> SRR2087356 2 0.999 -0.398 0.480 0.520
#> SRR2087370 2 0.999 -0.398 0.480 0.520
#> SRR2087312 2 0.000 0.461 0.000 1.000
#> SRR2087338 1 0.969 1.000 0.604 0.396
#> SRR2087365 2 0.999 -0.398 0.480 0.520
#> SRR2087319 2 0.000 0.461 0.000 1.000
#> SRR2087368 2 0.999 -0.398 0.480 0.520
#> SRR2087315 2 0.000 0.461 0.000 1.000
#> SRR2087372 2 0.999 -0.398 0.480 0.520
#> SRR2087357 2 0.999 -0.398 0.480 0.520
#> SRR2087297 2 0.963 0.533 0.388 0.612
#> SRR2087352 2 0.999 -0.398 0.480 0.520
#> SRR2087339 1 0.969 1.000 0.604 0.396
#> SRR2087286 2 0.963 0.533 0.388 0.612
#> SRR2087355 2 0.999 -0.398 0.480 0.520
#> SRR2087331 1 0.969 1.000 0.604 0.396
#> SRR2087328 1 0.969 1.000 0.604 0.396
#> SRR2087321 2 0.000 0.461 0.000 1.000
#> SRR2087310 2 0.000 0.461 0.000 1.000
#> SRR2087341 1 0.969 1.000 0.604 0.396
#> SRR2087340 1 0.969 1.000 0.604 0.396
#> SRR2087283 2 0.963 0.533 0.388 0.612
#> SRR2087296 2 0.963 0.533 0.388 0.612
#> SRR2087337 1 0.969 1.000 0.604 0.396
#> SRR2087316 2 0.000 0.461 0.000 1.000
#> SRR2087325 2 0.000 0.461 0.000 1.000
#> SRR2087287 2 0.963 0.533 0.388 0.612
#> SRR2087289 2 0.963 0.533 0.388 0.612
#> SRR2087311 2 0.000 0.461 0.000 1.000
#> SRR2087324 2 0.000 0.461 0.000 1.000
#> SRR2087305 2 0.963 0.533 0.388 0.612
#> SRR2087282 2 0.963 0.533 0.388 0.612
#> SRR2087285 2 0.963 0.533 0.388 0.612
#> SRR2087290 2 0.963 0.533 0.388 0.612
#> SRR2087293 2 0.963 0.533 0.388 0.612
#> SRR2087329 1 0.969 1.000 0.604 0.396
#> SRR2087366 2 0.999 -0.398 0.480 0.520
#> SRR2087300 2 0.963 0.533 0.388 0.612
#> SRR2087284 2 0.963 0.533 0.388 0.612
#> SRR2087303 2 0.963 0.533 0.388 0.612
#> SRR2087351 2 0.999 -0.398 0.480 0.520
#> SRR2087302 2 0.963 0.533 0.388 0.612
#> SRR2087304 2 0.963 0.533 0.388 0.612
#> SRR2087298 2 0.963 0.533 0.388 0.612
#> SRR2087320 2 0.000 0.461 0.000 1.000
#> SRR2087308 2 0.000 0.461 0.000 1.000
#> SRR2087295 2 0.963 0.533 0.388 0.612
#> SRR2087292 2 0.963 0.533 0.388 0.612
#> SRR2087291 2 0.963 0.533 0.388 0.612
#> SRR2087294 2 0.963 0.533 0.388 0.612
#> SRR2087299 2 0.963 0.533 0.388 0.612
#> SRR2087288 2 0.963 0.533 0.388 0.612
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087307 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087359 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087373 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087363 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087317 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087313 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087360 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087375 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087349 1 0.6678 0.319 0.512 0.008 0.480
#> SRR2087326 1 0.6678 0.319 0.512 0.008 0.480
#> SRR2087306 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087347 1 0.6659 0.324 0.532 0.008 0.460
#> SRR2087327 1 0.6676 0.320 0.516 0.008 0.476
#> SRR2087318 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087350 1 0.6676 0.320 0.516 0.008 0.476
#> SRR2087309 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087344 1 0.6659 0.324 0.532 0.008 0.460
#> SRR2087364 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087332 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087336 1 0.6678 0.319 0.512 0.008 0.480
#> SRR2087348 1 0.6664 0.324 0.528 0.008 0.464
#> SRR2087353 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087343 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087322 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087335 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087362 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087374 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087346 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087345 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087358 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087334 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087323 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087330 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087354 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087342 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087369 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087371 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087361 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087367 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087301 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087333 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087356 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087370 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087312 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087338 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087365 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087319 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087368 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087315 1 0.9442 0.305 0.496 0.288 0.216
#> SRR2087372 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087357 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087297 2 0.1267 0.976 0.024 0.972 0.004
#> SRR2087352 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087339 1 0.6654 0.325 0.536 0.008 0.456
#> SRR2087286 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087355 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087331 1 0.6676 0.321 0.516 0.008 0.476
#> SRR2087328 1 0.6678 0.319 0.512 0.008 0.480
#> SRR2087321 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087310 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087341 1 0.6659 0.324 0.532 0.008 0.460
#> SRR2087340 1 0.6659 0.324 0.532 0.008 0.460
#> SRR2087283 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087296 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087337 1 0.6676 0.321 0.516 0.008 0.476
#> SRR2087316 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087325 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087287 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087289 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087311 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087324 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087305 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087282 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087285 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087290 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087293 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087329 1 0.6678 0.319 0.512 0.008 0.480
#> SRR2087366 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087300 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087284 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087303 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087351 3 0.1643 1.000 0.000 0.044 0.956
#> SRR2087302 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087304 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087298 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087320 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087308 1 0.9422 0.305 0.500 0.284 0.216
#> SRR2087295 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087292 2 0.0237 0.976 0.000 0.996 0.004
#> SRR2087291 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087294 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087299 2 0.2301 0.974 0.060 0.936 0.004
#> SRR2087288 2 0.0237 0.976 0.000 0.996 0.004
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0.5712 0.963 0.036 0.136 0.072 0.756
#> SRR2087307 4 0.4400 0.980 0.036 0.136 0.012 0.816
#> SRR2087359 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087373 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087363 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087317 4 0.5104 0.975 0.036 0.136 0.040 0.788
#> SRR2087313 4 0.5104 0.975 0.036 0.136 0.040 0.788
#> SRR2087360 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087375 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087349 1 0.2500 0.949 0.916 0.000 0.040 0.044
#> SRR2087326 1 0.2500 0.949 0.916 0.000 0.040 0.044
#> SRR2087306 4 0.5712 0.963 0.036 0.136 0.072 0.756
#> SRR2087347 1 0.0336 0.961 0.992 0.000 0.000 0.008
#> SRR2087327 1 0.2586 0.948 0.912 0.000 0.040 0.048
#> SRR2087318 4 0.5104 0.975 0.036 0.136 0.040 0.788
#> SRR2087350 1 0.2586 0.948 0.912 0.000 0.040 0.048
#> SRR2087309 4 0.5104 0.975 0.036 0.136 0.040 0.788
#> SRR2087344 1 0.1610 0.951 0.952 0.000 0.016 0.032
#> SRR2087364 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087332 1 0.0188 0.961 0.996 0.000 0.000 0.004
#> SRR2087336 1 0.2500 0.949 0.916 0.000 0.040 0.044
#> SRR2087348 1 0.1833 0.950 0.944 0.000 0.024 0.032
#> SRR2087353 3 0.6704 0.975 0.196 0.016 0.656 0.132
#> SRR2087343 1 0.1174 0.961 0.968 0.000 0.012 0.020
#> SRR2087322 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087335 1 0.1151 0.956 0.968 0.000 0.008 0.024
#> SRR2087362 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087374 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087346 1 0.0336 0.961 0.992 0.000 0.000 0.008
#> SRR2087345 1 0.0188 0.961 0.996 0.000 0.000 0.004
#> SRR2087358 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087334 1 0.0188 0.961 0.996 0.000 0.000 0.004
#> SRR2087323 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087330 1 0.1610 0.951 0.952 0.000 0.016 0.032
#> SRR2087354 3 0.6658 0.974 0.196 0.016 0.660 0.128
#> SRR2087342 1 0.1151 0.956 0.968 0.000 0.008 0.024
#> SRR2087369 3 0.6459 0.976 0.196 0.016 0.676 0.112
#> SRR2087371 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087361 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087367 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087301 2 0.0188 0.919 0.000 0.996 0.000 0.004
#> SRR2087333 1 0.0336 0.961 0.992 0.000 0.000 0.008
#> SRR2087356 3 0.6658 0.974 0.196 0.016 0.660 0.128
#> SRR2087370 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087312 4 0.4400 0.980 0.036 0.136 0.012 0.816
#> SRR2087338 1 0.1406 0.961 0.960 0.000 0.016 0.024
#> SRR2087365 3 0.6658 0.975 0.196 0.016 0.660 0.128
#> SRR2087319 4 0.5712 0.963 0.036 0.136 0.072 0.756
#> SRR2087368 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087315 4 0.5104 0.975 0.036 0.136 0.040 0.788
#> SRR2087372 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087357 3 0.6658 0.974 0.196 0.016 0.660 0.128
#> SRR2087297 2 0.1722 0.920 0.000 0.944 0.048 0.008
#> SRR2087352 3 0.6658 0.974 0.196 0.016 0.660 0.128
#> SRR2087339 1 0.1406 0.961 0.960 0.000 0.016 0.024
#> SRR2087286 2 0.0188 0.919 0.000 0.996 0.000 0.004
#> SRR2087355 3 0.6658 0.974 0.196 0.016 0.660 0.128
#> SRR2087331 1 0.1837 0.957 0.944 0.000 0.028 0.028
#> SRR2087328 1 0.2928 0.947 0.896 0.000 0.052 0.052
#> SRR2087321 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087310 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087341 1 0.1724 0.950 0.948 0.000 0.020 0.032
#> SRR2087340 1 0.1724 0.950 0.948 0.000 0.020 0.032
#> SRR2087283 2 0.3743 0.910 0.000 0.824 0.160 0.016
#> SRR2087296 2 0.0188 0.919 0.000 0.996 0.000 0.004
#> SRR2087337 1 0.2032 0.957 0.936 0.000 0.028 0.036
#> SRR2087316 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087325 4 0.4400 0.980 0.036 0.136 0.012 0.816
#> SRR2087287 2 0.3862 0.910 0.000 0.824 0.152 0.024
#> SRR2087289 2 0.3862 0.910 0.000 0.824 0.152 0.024
#> SRR2087311 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087324 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087305 2 0.3806 0.910 0.000 0.824 0.156 0.020
#> SRR2087282 2 0.3806 0.910 0.000 0.824 0.156 0.020
#> SRR2087285 2 0.3743 0.910 0.000 0.824 0.160 0.016
#> SRR2087290 2 0.0188 0.919 0.000 0.996 0.000 0.004
#> SRR2087293 2 0.0188 0.919 0.000 0.996 0.000 0.004
#> SRR2087329 1 0.2500 0.949 0.916 0.000 0.040 0.044
#> SRR2087366 3 0.6704 0.974 0.196 0.016 0.656 0.132
#> SRR2087300 2 0.0376 0.919 0.000 0.992 0.004 0.004
#> SRR2087284 2 0.3743 0.910 0.000 0.824 0.160 0.016
#> SRR2087303 2 0.0707 0.914 0.000 0.980 0.020 0.000
#> SRR2087351 3 0.6610 0.975 0.196 0.016 0.664 0.124
#> SRR2087302 2 0.0336 0.919 0.000 0.992 0.008 0.000
#> SRR2087304 2 0.0779 0.914 0.000 0.980 0.016 0.004
#> SRR2087298 2 0.0895 0.914 0.000 0.976 0.020 0.004
#> SRR2087320 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087308 4 0.3948 0.982 0.036 0.136 0.000 0.828
#> SRR2087295 2 0.3862 0.910 0.000 0.824 0.152 0.024
#> SRR2087292 2 0.0188 0.919 0.000 0.996 0.000 0.004
#> SRR2087291 2 0.3862 0.910 0.000 0.824 0.152 0.024
#> SRR2087294 2 0.3743 0.910 0.000 0.824 0.160 0.016
#> SRR2087299 2 0.3925 0.906 0.000 0.808 0.176 0.016
#> SRR2087288 2 0.0895 0.914 0.000 0.976 0.020 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.4273 0.901 0.028 0.004 0.020 0.784 NA
#> SRR2087307 4 0.1623 0.935 0.016 0.000 0.020 0.948 NA
#> SRR2087359 3 0.2674 0.933 0.000 0.004 0.856 0.000 NA
#> SRR2087373 3 0.2719 0.932 0.000 0.004 0.852 0.000 NA
#> SRR2087363 3 0.0324 0.929 0.000 0.004 0.992 0.000 NA
#> SRR2087317 4 0.3940 0.911 0.024 0.004 0.020 0.812 NA
#> SRR2087313 4 0.3896 0.912 0.024 0.004 0.020 0.816 NA
#> SRR2087360 3 0.2674 0.933 0.000 0.004 0.856 0.000 NA
#> SRR2087375 3 0.2674 0.933 0.000 0.004 0.856 0.000 NA
#> SRR2087349 1 0.5380 0.874 0.672 0.008 0.096 0.000 NA
#> SRR2087326 1 0.5380 0.874 0.672 0.008 0.096 0.000 NA
#> SRR2087306 4 0.4273 0.901 0.028 0.004 0.020 0.784 NA
#> SRR2087347 1 0.2408 0.906 0.892 0.004 0.096 0.000 NA
#> SRR2087327 1 0.5448 0.875 0.680 0.008 0.096 0.004 NA
#> SRR2087318 4 0.3896 0.912 0.024 0.004 0.020 0.816 NA
#> SRR2087350 1 0.5448 0.875 0.680 0.008 0.096 0.004 NA
#> SRR2087309 4 0.3940 0.911 0.024 0.004 0.020 0.812 NA
#> SRR2087344 1 0.4884 0.874 0.772 0.036 0.096 0.004 NA
#> SRR2087364 3 0.0324 0.929 0.000 0.004 0.992 0.000 NA
#> SRR2087332 1 0.2249 0.905 0.896 0.000 0.096 0.000 NA
#> SRR2087336 1 0.5380 0.874 0.672 0.008 0.096 0.000 NA
#> SRR2087348 1 0.5255 0.876 0.744 0.040 0.096 0.004 NA
#> SRR2087353 3 0.0566 0.928 0.000 0.004 0.984 0.000 NA
#> SRR2087343 1 0.3570 0.907 0.844 0.008 0.096 0.004 NA
#> SRR2087322 4 0.0898 0.940 0.008 0.000 0.020 0.972 NA
#> SRR2087335 1 0.3412 0.892 0.848 0.008 0.096 0.000 NA
#> SRR2087362 3 0.0324 0.929 0.000 0.004 0.992 0.000 NA
#> SRR2087374 3 0.0162 0.929 0.000 0.004 0.996 0.000 NA
#> SRR2087346 1 0.2915 0.906 0.876 0.012 0.096 0.004 NA
#> SRR2087345 1 0.1965 0.905 0.904 0.000 0.096 0.000 NA
#> SRR2087358 3 0.2674 0.933 0.000 0.004 0.856 0.000 NA
#> SRR2087334 1 0.1965 0.905 0.904 0.000 0.096 0.000 NA
#> SRR2087323 4 0.0771 0.940 0.004 0.000 0.020 0.976 NA
#> SRR2087330 1 0.4587 0.876 0.788 0.024 0.096 0.004 NA
#> SRR2087354 3 0.0510 0.927 0.000 0.000 0.984 0.000 NA
#> SRR2087342 1 0.3412 0.892 0.848 0.008 0.096 0.000 NA
#> SRR2087369 3 0.2488 0.934 0.000 0.004 0.872 0.000 NA
#> SRR2087371 3 0.2674 0.933 0.000 0.004 0.856 0.000 NA
#> SRR2087361 3 0.0324 0.929 0.000 0.004 0.992 0.000 NA
#> SRR2087367 3 0.2674 0.933 0.000 0.004 0.856 0.000 NA
#> SRR2087301 2 0.1638 0.853 0.004 0.932 0.000 0.064 NA
#> SRR2087333 1 0.2915 0.906 0.876 0.012 0.096 0.004 NA
#> SRR2087356 3 0.0404 0.928 0.000 0.000 0.988 0.000 NA
#> SRR2087370 3 0.2719 0.933 0.000 0.004 0.852 0.000 NA
#> SRR2087312 4 0.1405 0.938 0.016 0.000 0.020 0.956 NA
#> SRR2087338 1 0.3819 0.906 0.832 0.012 0.096 0.004 NA
#> SRR2087365 3 0.0451 0.929 0.000 0.004 0.988 0.000 NA
#> SRR2087319 4 0.4273 0.901 0.028 0.004 0.020 0.784 NA
#> SRR2087368 3 0.2674 0.933 0.000 0.004 0.856 0.000 NA
#> SRR2087315 4 0.3896 0.912 0.024 0.004 0.020 0.816 NA
#> SRR2087372 3 0.2719 0.933 0.000 0.004 0.852 0.000 NA
#> SRR2087357 3 0.0510 0.927 0.000 0.000 0.984 0.000 NA
#> SRR2087297 2 0.4734 0.851 0.032 0.772 0.000 0.080 NA
#> SRR2087352 3 0.0404 0.928 0.000 0.000 0.988 0.000 NA
#> SRR2087339 1 0.3885 0.905 0.828 0.012 0.096 0.004 NA
#> SRR2087286 2 0.1638 0.853 0.004 0.932 0.000 0.064 NA
#> SRR2087355 3 0.0404 0.928 0.000 0.000 0.988 0.000 NA
#> SRR2087331 1 0.4933 0.883 0.704 0.000 0.096 0.000 NA
#> SRR2087328 1 0.5867 0.864 0.628 0.020 0.096 0.000 NA
#> SRR2087321 4 0.0771 0.940 0.004 0.000 0.020 0.976 NA
#> SRR2087310 4 0.0771 0.940 0.004 0.000 0.020 0.976 NA
#> SRR2087341 1 0.5011 0.875 0.764 0.040 0.096 0.004 NA
#> SRR2087340 1 0.4884 0.874 0.772 0.036 0.096 0.004 NA
#> SRR2087283 2 0.5903 0.836 0.024 0.596 0.000 0.072 NA
#> SRR2087296 2 0.2362 0.853 0.024 0.900 0.000 0.076 NA
#> SRR2087337 1 0.4803 0.887 0.720 0.000 0.096 0.000 NA
#> SRR2087316 4 0.0771 0.940 0.004 0.000 0.020 0.976 NA
#> SRR2087325 4 0.1405 0.938 0.016 0.000 0.020 0.956 NA
#> SRR2087287 2 0.5626 0.834 0.012 0.592 0.000 0.064 NA
#> SRR2087289 2 0.6143 0.836 0.040 0.600 0.000 0.076 NA
#> SRR2087311 4 0.0771 0.940 0.004 0.000 0.020 0.976 NA
#> SRR2087324 4 0.0898 0.940 0.008 0.000 0.020 0.972 NA
#> SRR2087305 2 0.6050 0.835 0.028 0.592 0.000 0.080 NA
#> SRR2087282 2 0.5438 0.834 0.004 0.592 0.000 0.064 NA
#> SRR2087285 2 0.5478 0.834 0.004 0.592 0.000 0.068 NA
#> SRR2087290 2 0.1638 0.853 0.004 0.932 0.000 0.064 NA
#> SRR2087293 2 0.1638 0.853 0.004 0.932 0.000 0.064 NA
#> SRR2087329 1 0.5380 0.874 0.672 0.008 0.096 0.000 NA
#> SRR2087366 3 0.2719 0.932 0.000 0.004 0.852 0.000 NA
#> SRR2087300 2 0.1638 0.853 0.004 0.932 0.000 0.064 NA
#> SRR2087284 2 0.5438 0.834 0.004 0.592 0.000 0.064 NA
#> SRR2087303 2 0.2378 0.847 0.012 0.908 0.000 0.064 NA
#> SRR2087351 3 0.2719 0.933 0.000 0.004 0.852 0.000 NA
#> SRR2087302 2 0.1704 0.853 0.004 0.928 0.000 0.068 NA
#> SRR2087304 2 0.2378 0.847 0.012 0.908 0.000 0.064 NA
#> SRR2087298 2 0.2760 0.847 0.028 0.892 0.000 0.064 NA
#> SRR2087320 4 0.0771 0.940 0.004 0.000 0.020 0.976 NA
#> SRR2087308 4 0.0771 0.940 0.004 0.000 0.020 0.976 NA
#> SRR2087295 2 0.5626 0.834 0.012 0.592 0.000 0.064 NA
#> SRR2087292 2 0.1638 0.853 0.004 0.932 0.000 0.064 NA
#> SRR2087291 2 0.6143 0.836 0.040 0.600 0.000 0.076 NA
#> SRR2087294 2 0.5438 0.834 0.004 0.592 0.000 0.064 NA
#> SRR2087299 2 0.5833 0.831 0.020 0.576 0.000 0.064 NA
#> SRR2087288 2 0.2760 0.847 0.028 0.892 0.000 0.064 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 4 0.5039 0.817 0.000 0.000 0.012 0.640 0.260 0.088
#> SRR2087307 4 0.3384 0.861 0.020 0.000 0.012 0.848 0.048 0.072
#> SRR2087359 3 0.4058 0.822 0.000 0.004 0.616 0.000 0.372 0.008
#> SRR2087373 3 0.4138 0.822 0.000 0.004 0.616 0.000 0.368 0.012
#> SRR2087363 3 0.0291 0.827 0.000 0.004 0.992 0.000 0.000 0.004
#> SRR2087317 4 0.4463 0.845 0.000 0.000 0.012 0.712 0.212 0.064
#> SRR2087313 4 0.4351 0.849 0.000 0.000 0.012 0.728 0.196 0.064
#> SRR2087360 3 0.4058 0.822 0.000 0.004 0.616 0.000 0.372 0.008
#> SRR2087375 3 0.3717 0.822 0.000 0.000 0.616 0.000 0.384 0.000
#> SRR2087349 1 0.5638 0.831 0.640 0.000 0.048 0.000 0.168 0.144
#> SRR2087326 1 0.5604 0.831 0.644 0.000 0.048 0.000 0.168 0.140
#> SRR2087306 4 0.5039 0.817 0.000 0.000 0.012 0.640 0.260 0.088
#> SRR2087347 1 0.1590 0.875 0.936 0.000 0.048 0.000 0.008 0.008
#> SRR2087327 1 0.5739 0.833 0.648 0.008 0.048 0.000 0.168 0.128
#> SRR2087318 4 0.4436 0.846 0.000 0.000 0.012 0.716 0.208 0.064
#> SRR2087350 1 0.5739 0.833 0.648 0.008 0.048 0.000 0.168 0.128
#> SRR2087309 4 0.4463 0.845 0.000 0.000 0.012 0.712 0.212 0.064
#> SRR2087344 1 0.4481 0.830 0.764 0.016 0.048 0.000 0.032 0.140
#> SRR2087364 3 0.0291 0.827 0.000 0.004 0.992 0.000 0.000 0.004
#> SRR2087332 1 0.1734 0.872 0.932 0.008 0.048 0.000 0.008 0.004
#> SRR2087336 1 0.5604 0.831 0.644 0.000 0.048 0.000 0.168 0.140
#> SRR2087348 1 0.5042 0.826 0.716 0.020 0.048 0.000 0.044 0.172
#> SRR2087353 3 0.0551 0.828 0.000 0.004 0.984 0.000 0.008 0.004
#> SRR2087343 1 0.2793 0.875 0.884 0.008 0.048 0.000 0.020 0.040
#> SRR2087322 4 0.1364 0.886 0.016 0.000 0.012 0.952 0.000 0.020
#> SRR2087335 1 0.2861 0.861 0.880 0.008 0.048 0.000 0.020 0.044
#> SRR2087362 3 0.0146 0.827 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR2087374 3 0.0291 0.827 0.000 0.004 0.992 0.000 0.000 0.004
#> SRR2087346 1 0.2143 0.872 0.916 0.012 0.048 0.000 0.008 0.016
#> SRR2087345 1 0.1075 0.873 0.952 0.000 0.048 0.000 0.000 0.000
#> SRR2087358 3 0.3717 0.822 0.000 0.000 0.616 0.000 0.384 0.000
#> SRR2087334 1 0.1075 0.873 0.952 0.000 0.048 0.000 0.000 0.000
#> SRR2087323 4 0.0508 0.888 0.004 0.000 0.012 0.984 0.000 0.000
#> SRR2087330 1 0.4197 0.837 0.792 0.016 0.048 0.000 0.032 0.112
#> SRR2087354 3 0.0405 0.826 0.000 0.000 0.988 0.000 0.004 0.008
#> SRR2087342 1 0.2610 0.860 0.892 0.004 0.048 0.000 0.020 0.036
#> SRR2087369 3 0.3925 0.828 0.000 0.004 0.656 0.000 0.332 0.008
#> SRR2087371 3 0.3841 0.822 0.000 0.004 0.616 0.000 0.380 0.000
#> SRR2087361 3 0.0291 0.827 0.000 0.004 0.992 0.000 0.000 0.004
#> SRR2087367 3 0.3717 0.822 0.000 0.000 0.616 0.000 0.384 0.000
#> SRR2087301 2 0.4742 0.804 0.000 0.512 0.000 0.048 0.000 0.440
#> SRR2087333 1 0.2425 0.873 0.904 0.012 0.048 0.000 0.020 0.016
#> SRR2087356 3 0.0508 0.826 0.000 0.000 0.984 0.000 0.004 0.012
#> SRR2087370 3 0.4572 0.826 0.000 0.004 0.668 0.000 0.264 0.064
#> SRR2087312 4 0.2552 0.876 0.016 0.000 0.012 0.896 0.020 0.056
#> SRR2087338 1 0.3765 0.872 0.832 0.020 0.048 0.000 0.040 0.060
#> SRR2087365 3 0.0725 0.829 0.000 0.000 0.976 0.000 0.012 0.012
#> SRR2087319 4 0.5039 0.817 0.000 0.000 0.012 0.640 0.260 0.088
#> SRR2087368 3 0.3717 0.822 0.000 0.000 0.616 0.000 0.384 0.000
#> SRR2087315 4 0.4351 0.849 0.000 0.000 0.012 0.728 0.196 0.064
#> SRR2087372 3 0.4572 0.826 0.000 0.004 0.668 0.000 0.264 0.064
#> SRR2087357 3 0.0508 0.826 0.000 0.000 0.984 0.000 0.004 0.012
#> SRR2087297 2 0.5213 0.804 0.004 0.656 0.000 0.052 0.044 0.244
#> SRR2087352 3 0.0508 0.826 0.000 0.000 0.984 0.000 0.004 0.012
#> SRR2087339 1 0.3823 0.872 0.828 0.020 0.048 0.000 0.040 0.064
#> SRR2087286 2 0.4742 0.804 0.000 0.512 0.000 0.048 0.000 0.440
#> SRR2087355 3 0.0725 0.828 0.000 0.000 0.976 0.000 0.012 0.012
#> SRR2087331 1 0.4991 0.848 0.712 0.000 0.048 0.000 0.136 0.104
#> SRR2087328 1 0.6031 0.818 0.584 0.000 0.048 0.000 0.164 0.204
#> SRR2087321 4 0.0363 0.888 0.000 0.000 0.012 0.988 0.000 0.000
#> SRR2087310 4 0.0508 0.888 0.004 0.000 0.012 0.984 0.000 0.000
#> SRR2087341 1 0.4798 0.827 0.732 0.016 0.048 0.000 0.036 0.168
#> SRR2087340 1 0.4710 0.826 0.744 0.020 0.048 0.000 0.032 0.156
#> SRR2087283 2 0.2805 0.784 0.008 0.884 0.000 0.048 0.036 0.024
#> SRR2087296 2 0.5603 0.804 0.004 0.520 0.000 0.048 0.040 0.388
#> SRR2087337 1 0.4833 0.852 0.728 0.000 0.048 0.000 0.124 0.100
#> SRR2087316 4 0.0363 0.888 0.000 0.000 0.012 0.988 0.000 0.000
#> SRR2087325 4 0.2552 0.876 0.016 0.000 0.012 0.896 0.020 0.056
#> SRR2087287 2 0.1738 0.778 0.004 0.928 0.000 0.052 0.016 0.000
#> SRR2087289 2 0.3039 0.783 0.004 0.868 0.000 0.052 0.048 0.028
#> SRR2087311 4 0.0363 0.888 0.000 0.000 0.012 0.988 0.000 0.000
#> SRR2087324 4 0.1269 0.886 0.012 0.000 0.012 0.956 0.000 0.020
#> SRR2087305 2 0.2138 0.780 0.004 0.908 0.000 0.052 0.036 0.000
#> SRR2087282 2 0.1590 0.777 0.008 0.936 0.000 0.048 0.008 0.000
#> SRR2087285 2 0.1219 0.779 0.000 0.948 0.000 0.048 0.004 0.000
#> SRR2087290 2 0.4742 0.804 0.000 0.512 0.000 0.048 0.000 0.440
#> SRR2087293 2 0.4742 0.804 0.000 0.512 0.000 0.048 0.000 0.440
#> SRR2087329 1 0.5638 0.831 0.640 0.000 0.048 0.000 0.168 0.144
#> SRR2087366 3 0.3934 0.822 0.000 0.000 0.616 0.000 0.376 0.008
#> SRR2087300 2 0.4742 0.804 0.000 0.512 0.000 0.048 0.000 0.440
#> SRR2087284 2 0.1578 0.778 0.004 0.936 0.000 0.048 0.012 0.000
#> SRR2087303 2 0.5548 0.795 0.008 0.496 0.000 0.052 0.024 0.420
#> SRR2087351 3 0.4572 0.826 0.000 0.004 0.668 0.000 0.264 0.064
#> SRR2087302 2 0.4852 0.806 0.000 0.528 0.000 0.048 0.004 0.420
#> SRR2087304 2 0.5411 0.795 0.008 0.496 0.000 0.052 0.016 0.428
#> SRR2087298 2 0.6070 0.793 0.016 0.500 0.000 0.056 0.048 0.380
#> SRR2087320 4 0.0508 0.888 0.004 0.000 0.012 0.984 0.000 0.000
#> SRR2087308 4 0.0363 0.888 0.000 0.000 0.012 0.988 0.000 0.000
#> SRR2087295 2 0.1738 0.778 0.004 0.928 0.000 0.052 0.016 0.000
#> SRR2087292 2 0.4742 0.804 0.000 0.512 0.000 0.048 0.000 0.440
#> SRR2087291 2 0.3039 0.783 0.004 0.868 0.000 0.052 0.048 0.028
#> SRR2087294 2 0.1590 0.777 0.008 0.936 0.000 0.048 0.008 0.000
#> SRR2087299 2 0.2800 0.773 0.012 0.884 0.000 0.052 0.036 0.016
#> SRR2087288 2 0.6076 0.792 0.016 0.496 0.000 0.056 0.048 0.384
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 16723 rows and 94 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 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 1.000 1.000 0.5038 0.497 0.497
#> 3 3 1.000 0.991 0.988 0.2841 0.857 0.712
#> 4 4 1.000 1.000 1.000 0.1691 0.890 0.690
#> 5 5 0.986 0.973 0.965 0.0233 0.978 0.910
#> 6 6 0.943 0.931 0.952 0.0165 0.997 0.989
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3 4
There is also optional best \(k\) = 2 3 4 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR2087314 2 0 1 0 1
#> SRR2087307 2 0 1 0 1
#> SRR2087359 1 0 1 1 0
#> SRR2087373 1 0 1 1 0
#> SRR2087363 1 0 1 1 0
#> SRR2087317 2 0 1 0 1
#> SRR2087313 2 0 1 0 1
#> SRR2087360 1 0 1 1 0
#> SRR2087375 1 0 1 1 0
#> SRR2087349 1 0 1 1 0
#> SRR2087326 1 0 1 1 0
#> SRR2087306 2 0 1 0 1
#> SRR2087347 1 0 1 1 0
#> SRR2087327 1 0 1 1 0
#> SRR2087318 2 0 1 0 1
#> SRR2087350 1 0 1 1 0
#> SRR2087309 2 0 1 0 1
#> SRR2087344 1 0 1 1 0
#> SRR2087364 1 0 1 1 0
#> SRR2087332 1 0 1 1 0
#> SRR2087336 1 0 1 1 0
#> SRR2087348 1 0 1 1 0
#> SRR2087353 1 0 1 1 0
#> SRR2087343 1 0 1 1 0
#> SRR2087322 2 0 1 0 1
#> SRR2087335 1 0 1 1 0
#> SRR2087362 1 0 1 1 0
#> SRR2087374 1 0 1 1 0
#> SRR2087346 1 0 1 1 0
#> SRR2087345 1 0 1 1 0
#> SRR2087358 1 0 1 1 0
#> SRR2087334 1 0 1 1 0
#> SRR2087323 2 0 1 0 1
#> SRR2087330 1 0 1 1 0
#> SRR2087354 1 0 1 1 0
#> SRR2087342 1 0 1 1 0
#> SRR2087369 1 0 1 1 0
#> SRR2087371 1 0 1 1 0
#> SRR2087361 1 0 1 1 0
#> SRR2087367 1 0 1 1 0
#> SRR2087301 2 0 1 0 1
#> SRR2087333 1 0 1 1 0
#> SRR2087356 1 0 1 1 0
#> SRR2087370 1 0 1 1 0
#> SRR2087312 2 0 1 0 1
#> SRR2087338 1 0 1 1 0
#> SRR2087365 1 0 1 1 0
#> SRR2087319 2 0 1 0 1
#> SRR2087368 1 0 1 1 0
#> SRR2087315 2 0 1 0 1
#> SRR2087372 1 0 1 1 0
#> SRR2087357 1 0 1 1 0
#> SRR2087297 2 0 1 0 1
#> SRR2087352 1 0 1 1 0
#> SRR2087339 1 0 1 1 0
#> SRR2087286 2 0 1 0 1
#> SRR2087355 1 0 1 1 0
#> SRR2087331 1 0 1 1 0
#> SRR2087328 1 0 1 1 0
#> SRR2087321 2 0 1 0 1
#> SRR2087310 2 0 1 0 1
#> SRR2087341 1 0 1 1 0
#> SRR2087340 1 0 1 1 0
#> SRR2087283 2 0 1 0 1
#> SRR2087296 2 0 1 0 1
#> SRR2087337 1 0 1 1 0
#> SRR2087316 2 0 1 0 1
#> SRR2087325 2 0 1 0 1
#> SRR2087287 2 0 1 0 1
#> SRR2087289 2 0 1 0 1
#> SRR2087311 2 0 1 0 1
#> SRR2087324 2 0 1 0 1
#> SRR2087305 2 0 1 0 1
#> SRR2087282 2 0 1 0 1
#> SRR2087285 2 0 1 0 1
#> SRR2087290 2 0 1 0 1
#> SRR2087293 2 0 1 0 1
#> SRR2087329 1 0 1 1 0
#> SRR2087366 1 0 1 1 0
#> SRR2087300 2 0 1 0 1
#> SRR2087284 2 0 1 0 1
#> SRR2087303 2 0 1 0 1
#> SRR2087351 1 0 1 1 0
#> SRR2087302 2 0 1 0 1
#> SRR2087304 2 0 1 0 1
#> SRR2087298 2 0 1 0 1
#> SRR2087320 2 0 1 0 1
#> SRR2087308 2 0 1 0 1
#> SRR2087295 2 0 1 0 1
#> SRR2087292 2 0 1 0 1
#> SRR2087291 2 0 1 0 1
#> SRR2087294 2 0 1 0 1
#> SRR2087299 2 0 1 0 1
#> SRR2087288 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087307 2 0.4953 0.788 0.016 0.808 0.176
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087317 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087313 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087349 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087326 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087306 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087347 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087327 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087318 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087350 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087309 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087344 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087332 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087336 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087348 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087343 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087322 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087335 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087346 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087345 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087334 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087323 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087330 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087342 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087301 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087333 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087312 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087338 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087319 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087315 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087297 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087339 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087286 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087331 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087328 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087321 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087310 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087341 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087340 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087283 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087296 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087337 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087316 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087325 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087287 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087289 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087311 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087324 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087305 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087282 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087285 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087290 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087293 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087329 1 0.0747 1.000 0.984 0.000 0.016
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087300 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087284 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087303 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087302 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087304 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087298 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087320 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087308 2 0.1163 0.983 0.028 0.972 0.000
#> SRR2087295 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087292 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087291 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087294 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087299 2 0.0000 0.985 0.000 1.000 0.000
#> SRR2087288 2 0.0000 0.985 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.2929 0.788 0.000 0.000 0 0.180 0.820
#> SRR2087307 4 0.2690 0.755 0.000 0.000 0 0.844 0.156
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087317 5 0.4138 0.842 0.000 0.000 0 0.384 0.616
#> SRR2087313 5 0.4182 0.830 0.000 0.000 0 0.400 0.600
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087349 1 0.0510 0.992 0.984 0.000 0 0.000 0.016
#> SRR2087326 1 0.0510 0.992 0.984 0.000 0 0.000 0.016
#> SRR2087306 5 0.2929 0.788 0.000 0.000 0 0.180 0.820
#> SRR2087347 1 0.0000 0.994 1.000 0.000 0 0.000 0.000
#> SRR2087327 1 0.0510 0.992 0.984 0.000 0 0.000 0.016
#> SRR2087318 5 0.4150 0.841 0.000 0.000 0 0.388 0.612
#> SRR2087350 1 0.0510 0.992 0.984 0.000 0 0.000 0.016
#> SRR2087309 5 0.4150 0.841 0.000 0.000 0 0.388 0.612
#> SRR2087344 1 0.0162 0.993 0.996 0.000 0 0.000 0.004
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087332 1 0.0000 0.994 1.000 0.000 0 0.000 0.000
#> SRR2087336 1 0.0510 0.992 0.984 0.000 0 0.000 0.016
#> SRR2087348 1 0.0404 0.992 0.988 0.000 0 0.000 0.012
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087343 1 0.0162 0.994 0.996 0.000 0 0.000 0.004
#> SRR2087322 4 0.0162 0.952 0.000 0.000 0 0.996 0.004
#> SRR2087335 1 0.0162 0.993 0.996 0.000 0 0.000 0.004
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087346 1 0.0000 0.994 1.000 0.000 0 0.000 0.000
#> SRR2087345 1 0.0000 0.994 1.000 0.000 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087334 1 0.0000 0.994 1.000 0.000 0 0.000 0.000
#> SRR2087323 4 0.0000 0.955 0.000 0.000 0 1.000 0.000
#> SRR2087330 1 0.0162 0.993 0.996 0.000 0 0.000 0.004
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087342 1 0.0162 0.993 0.996 0.000 0 0.000 0.004
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087301 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087333 1 0.0000 0.994 1.000 0.000 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087312 4 0.0510 0.956 0.000 0.000 0 0.984 0.016
#> SRR2087338 1 0.0162 0.994 0.996 0.000 0 0.000 0.004
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087319 5 0.2929 0.788 0.000 0.000 0 0.180 0.820
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087315 5 0.4182 0.830 0.000 0.000 0 0.400 0.600
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087297 2 0.0290 0.991 0.000 0.992 0 0.000 0.008
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087339 1 0.0162 0.994 0.996 0.000 0 0.000 0.004
#> SRR2087286 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087331 1 0.0290 0.993 0.992 0.000 0 0.000 0.008
#> SRR2087328 1 0.0510 0.992 0.984 0.000 0 0.000 0.016
#> SRR2087321 4 0.0703 0.956 0.000 0.000 0 0.976 0.024
#> SRR2087310 4 0.0609 0.957 0.000 0.000 0 0.980 0.020
#> SRR2087341 1 0.0290 0.993 0.992 0.000 0 0.000 0.008
#> SRR2087340 1 0.0162 0.993 0.996 0.000 0 0.000 0.004
#> SRR2087283 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087296 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087337 1 0.0290 0.993 0.992 0.000 0 0.000 0.008
#> SRR2087316 4 0.0880 0.952 0.000 0.000 0 0.968 0.032
#> SRR2087325 4 0.0510 0.956 0.000 0.000 0 0.984 0.016
#> SRR2087287 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087289 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087311 4 0.0880 0.952 0.000 0.000 0 0.968 0.032
#> SRR2087324 4 0.0162 0.957 0.000 0.000 0 0.996 0.004
#> SRR2087305 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087282 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087285 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087290 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087293 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087329 1 0.0510 0.992 0.984 0.000 0 0.000 0.016
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087300 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087284 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087303 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087302 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087304 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087298 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087320 4 0.0510 0.958 0.000 0.000 0 0.984 0.016
#> SRR2087308 4 0.0880 0.952 0.000 0.000 0 0.968 0.032
#> SRR2087295 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087292 2 0.0000 0.992 0.000 1.000 0 0.000 0.000
#> SRR2087291 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087294 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087299 2 0.0609 0.991 0.000 0.980 0 0.000 0.020
#> SRR2087288 2 0.0000 0.992 0.000 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
#> SRR2087314 6 0.0458 0.739 0.000 0.000 0.000 0.016 0.000 0.984
#> SRR2087307 5 0.3151 0.000 0.000 0.000 0.000 0.252 0.748 0.000
#> SRR2087359 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087373 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087363 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087317 6 0.2996 0.828 0.000 0.000 0.000 0.228 0.000 0.772
#> SRR2087313 6 0.3309 0.801 0.000 0.000 0.000 0.280 0.000 0.720
#> SRR2087360 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087375 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087349 1 0.1757 0.947 0.916 0.000 0.000 0.000 0.076 0.008
#> SRR2087326 1 0.1757 0.947 0.916 0.000 0.000 0.000 0.076 0.008
#> SRR2087306 6 0.0458 0.739 0.000 0.000 0.000 0.016 0.000 0.984
#> SRR2087347 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087327 1 0.1757 0.947 0.916 0.000 0.000 0.000 0.076 0.008
#> SRR2087318 6 0.3175 0.820 0.000 0.000 0.000 0.256 0.000 0.744
#> SRR2087350 1 0.1757 0.947 0.916 0.000 0.000 0.000 0.076 0.008
#> SRR2087309 6 0.3050 0.828 0.000 0.000 0.000 0.236 0.000 0.764
#> SRR2087344 1 0.0692 0.957 0.976 0.000 0.000 0.000 0.020 0.004
#> SRR2087364 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087332 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087336 1 0.1757 0.947 0.916 0.000 0.000 0.000 0.076 0.008
#> SRR2087348 1 0.1082 0.957 0.956 0.000 0.000 0.000 0.040 0.004
#> SRR2087353 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087343 1 0.0146 0.964 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2087322 4 0.0000 0.952 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087335 1 0.0692 0.957 0.976 0.000 0.000 0.000 0.020 0.004
#> SRR2087362 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087374 3 0.0632 0.986 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087346 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087358 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087334 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087323 4 0.0000 0.952 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087330 1 0.0692 0.957 0.976 0.000 0.000 0.000 0.020 0.004
#> SRR2087354 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087342 1 0.0692 0.957 0.976 0.000 0.000 0.000 0.020 0.004
#> SRR2087369 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087371 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087361 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087367 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087301 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087333 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087356 3 0.0632 0.986 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087370 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087312 4 0.1958 0.821 0.000 0.000 0.000 0.896 0.100 0.004
#> SRR2087338 1 0.0632 0.962 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087365 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087319 6 0.0458 0.739 0.000 0.000 0.000 0.016 0.000 0.984
#> SRR2087368 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087315 6 0.3309 0.801 0.000 0.000 0.000 0.280 0.000 0.720
#> SRR2087372 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087357 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR2087297 2 0.0937 0.941 0.000 0.960 0.000 0.000 0.040 0.000
#> SRR2087352 3 0.0632 0.986 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087339 1 0.0632 0.962 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087286 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087355 3 0.0632 0.986 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087331 1 0.1524 0.952 0.932 0.000 0.000 0.000 0.060 0.008
#> SRR2087328 1 0.1757 0.947 0.916 0.000 0.000 0.000 0.076 0.008
#> SRR2087321 4 0.0363 0.955 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR2087310 4 0.0458 0.954 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR2087341 1 0.1010 0.958 0.960 0.000 0.000 0.000 0.036 0.004
#> SRR2087340 1 0.0692 0.957 0.976 0.000 0.000 0.000 0.020 0.004
#> SRR2087283 2 0.1910 0.934 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087296 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087337 1 0.1265 0.956 0.948 0.000 0.000 0.000 0.044 0.008
#> SRR2087316 4 0.0458 0.954 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR2087325 4 0.1958 0.821 0.000 0.000 0.000 0.896 0.100 0.004
#> SRR2087287 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087289 2 0.1765 0.935 0.000 0.904 0.000 0.000 0.096 0.000
#> SRR2087311 4 0.0458 0.954 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR2087324 4 0.0000 0.952 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087305 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087282 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087285 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087290 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087293 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087329 1 0.1757 0.947 0.916 0.000 0.000 0.000 0.076 0.008
#> SRR2087366 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087300 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087284 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087303 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087351 3 0.0000 0.987 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087302 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087304 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087298 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087320 4 0.0260 0.955 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR2087308 4 0.0458 0.954 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR2087295 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087292 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087291 2 0.1957 0.933 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087294 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087299 2 0.2135 0.928 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR2087288 2 0.0000 0.942 0.000 1.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "pam"]
# you can also extract it by
# res = res_list["SD:pam"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16723 rows and 94 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 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.872 0.933 0.972 0.4212 0.586 0.586
#> 3 3 0.788 0.797 0.918 0.5751 0.730 0.543
#> 4 4 1.000 1.000 1.000 0.1402 0.857 0.601
#> 5 5 1.000 0.990 0.994 0.0286 0.978 0.910
#> 6 6 0.928 0.927 0.896 0.0419 0.966 0.845
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
#> SRR2087314 1 0.000 0.970 1.000 0.000
#> SRR2087307 1 0.000 0.970 1.000 0.000
#> SRR2087359 1 0.000 0.970 1.000 0.000
#> SRR2087373 1 0.000 0.970 1.000 0.000
#> SRR2087363 1 0.000 0.970 1.000 0.000
#> SRR2087317 1 0.000 0.970 1.000 0.000
#> SRR2087313 1 0.494 0.871 0.892 0.108
#> SRR2087360 1 0.000 0.970 1.000 0.000
#> SRR2087375 1 0.000 0.970 1.000 0.000
#> SRR2087349 1 0.000 0.970 1.000 0.000
#> SRR2087326 1 0.000 0.970 1.000 0.000
#> SRR2087306 1 0.000 0.970 1.000 0.000
#> SRR2087347 1 0.000 0.970 1.000 0.000
#> SRR2087327 1 0.000 0.970 1.000 0.000
#> SRR2087318 1 0.518 0.863 0.884 0.116
#> SRR2087350 1 0.000 0.970 1.000 0.000
#> SRR2087309 1 0.000 0.970 1.000 0.000
#> SRR2087344 1 0.000 0.970 1.000 0.000
#> SRR2087364 1 0.000 0.970 1.000 0.000
#> SRR2087332 1 0.000 0.970 1.000 0.000
#> SRR2087336 1 0.000 0.970 1.000 0.000
#> SRR2087348 1 0.000 0.970 1.000 0.000
#> SRR2087353 1 0.000 0.970 1.000 0.000
#> SRR2087343 1 0.000 0.970 1.000 0.000
#> SRR2087322 1 0.697 0.776 0.812 0.188
#> SRR2087335 1 0.000 0.970 1.000 0.000
#> SRR2087362 1 0.000 0.970 1.000 0.000
#> SRR2087374 1 0.000 0.970 1.000 0.000
#> SRR2087346 1 0.000 0.970 1.000 0.000
#> SRR2087345 1 0.000 0.970 1.000 0.000
#> SRR2087358 1 0.000 0.970 1.000 0.000
#> SRR2087334 1 0.000 0.970 1.000 0.000
#> SRR2087323 2 0.975 0.277 0.408 0.592
#> SRR2087330 1 0.000 0.970 1.000 0.000
#> SRR2087354 1 0.000 0.970 1.000 0.000
#> SRR2087342 1 0.000 0.970 1.000 0.000
#> SRR2087369 1 0.000 0.970 1.000 0.000
#> SRR2087371 1 0.000 0.970 1.000 0.000
#> SRR2087361 1 0.000 0.970 1.000 0.000
#> SRR2087367 1 0.000 0.970 1.000 0.000
#> SRR2087301 2 0.000 0.968 0.000 1.000
#> SRR2087333 1 0.000 0.970 1.000 0.000
#> SRR2087356 1 0.000 0.970 1.000 0.000
#> SRR2087370 1 0.000 0.970 1.000 0.000
#> SRR2087312 1 0.788 0.708 0.764 0.236
#> SRR2087338 1 0.000 0.970 1.000 0.000
#> SRR2087365 1 0.000 0.970 1.000 0.000
#> SRR2087319 1 0.000 0.970 1.000 0.000
#> SRR2087368 1 0.000 0.970 1.000 0.000
#> SRR2087315 1 0.781 0.714 0.768 0.232
#> SRR2087372 1 0.000 0.970 1.000 0.000
#> SRR2087357 1 0.000 0.970 1.000 0.000
#> SRR2087297 2 0.000 0.968 0.000 1.000
#> SRR2087352 1 0.000 0.970 1.000 0.000
#> SRR2087339 1 0.000 0.970 1.000 0.000
#> SRR2087286 2 0.000 0.968 0.000 1.000
#> SRR2087355 1 0.000 0.970 1.000 0.000
#> SRR2087331 1 0.000 0.970 1.000 0.000
#> SRR2087328 1 0.000 0.970 1.000 0.000
#> SRR2087321 1 0.808 0.688 0.752 0.248
#> SRR2087310 1 0.118 0.957 0.984 0.016
#> SRR2087341 1 0.000 0.970 1.000 0.000
#> SRR2087340 1 0.000 0.970 1.000 0.000
#> SRR2087283 2 0.000 0.968 0.000 1.000
#> SRR2087296 2 0.000 0.968 0.000 1.000
#> SRR2087337 1 0.000 0.970 1.000 0.000
#> SRR2087316 2 0.929 0.451 0.344 0.656
#> SRR2087325 1 0.000 0.970 1.000 0.000
#> SRR2087287 2 0.000 0.968 0.000 1.000
#> SRR2087289 2 0.000 0.968 0.000 1.000
#> SRR2087311 1 0.518 0.863 0.884 0.116
#> SRR2087324 1 0.973 0.347 0.596 0.404
#> SRR2087305 2 0.000 0.968 0.000 1.000
#> SRR2087282 2 0.000 0.968 0.000 1.000
#> SRR2087285 2 0.000 0.968 0.000 1.000
#> SRR2087290 2 0.000 0.968 0.000 1.000
#> SRR2087293 2 0.000 0.968 0.000 1.000
#> SRR2087329 1 0.000 0.970 1.000 0.000
#> SRR2087366 1 0.000 0.970 1.000 0.000
#> SRR2087300 2 0.000 0.968 0.000 1.000
#> SRR2087284 2 0.000 0.968 0.000 1.000
#> SRR2087303 2 0.000 0.968 0.000 1.000
#> SRR2087351 1 0.000 0.970 1.000 0.000
#> SRR2087302 2 0.000 0.968 0.000 1.000
#> SRR2087304 2 0.000 0.968 0.000 1.000
#> SRR2087298 2 0.000 0.968 0.000 1.000
#> SRR2087320 2 0.184 0.942 0.028 0.972
#> SRR2087308 1 0.775 0.720 0.772 0.228
#> SRR2087295 2 0.000 0.968 0.000 1.000
#> SRR2087292 2 0.000 0.968 0.000 1.000
#> SRR2087291 2 0.000 0.968 0.000 1.000
#> SRR2087294 2 0.000 0.968 0.000 1.000
#> SRR2087299 2 0.000 0.968 0.000 1.000
#> SRR2087288 2 0.000 0.968 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0.631 0.0639 0.508 0.000 0.492
#> SRR2087307 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087359 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087373 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087363 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087317 1 0.625 0.2102 0.556 0.000 0.444
#> SRR2087313 1 0.924 0.2637 0.492 0.168 0.340
#> SRR2087360 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087375 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087349 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087326 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087306 1 0.629 0.1417 0.532 0.000 0.468
#> SRR2087347 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087327 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087318 3 0.986 -0.0557 0.352 0.256 0.392
#> SRR2087350 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087309 3 0.631 -0.0788 0.496 0.000 0.504
#> SRR2087344 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087364 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087332 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087336 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087348 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087353 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087343 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087322 3 0.577 0.5879 0.012 0.260 0.728
#> SRR2087335 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087362 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087374 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087346 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087345 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087358 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087334 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087323 2 0.369 0.8151 0.000 0.860 0.140
#> SRR2087330 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087354 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087342 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087369 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087371 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087361 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087367 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087301 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087333 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087356 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087370 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087312 1 0.994 0.1777 0.372 0.344 0.284
#> SRR2087338 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087365 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087319 3 0.553 0.5051 0.296 0.000 0.704
#> SRR2087368 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087315 1 0.965 0.2665 0.444 0.336 0.220
#> SRR2087372 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087357 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087297 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087352 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087339 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087286 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087355 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087331 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087328 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087321 1 0.979 0.2205 0.412 0.348 0.240
#> SRR2087310 3 0.153 0.8759 0.000 0.040 0.960
#> SRR2087341 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087340 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087283 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087296 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087337 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087316 2 0.625 0.6623 0.188 0.756 0.056
#> SRR2087325 3 0.525 0.5670 0.264 0.000 0.736
#> SRR2087287 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087289 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087311 3 0.955 0.2064 0.272 0.244 0.484
#> SRR2087324 2 0.926 0.0267 0.360 0.476 0.164
#> SRR2087305 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087282 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087285 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087290 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087293 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087329 1 0.000 0.8609 1.000 0.000 0.000
#> SRR2087366 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087300 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087284 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087303 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087351 3 0.000 0.9123 0.000 0.000 1.000
#> SRR2087302 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087304 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087298 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087320 2 0.164 0.9191 0.000 0.956 0.044
#> SRR2087308 1 0.986 0.2176 0.400 0.340 0.260
#> SRR2087295 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087292 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087291 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087294 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087299 2 0.000 0.9619 0.000 1.000 0.000
#> SRR2087288 2 0.000 0.9619 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.0000 0.963 0 0 0 0.000 1.000
#> SRR2087307 4 0.3730 0.573 0 0 0 0.712 0.288
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087317 5 0.1197 0.977 0 0 0 0.048 0.952
#> SRR2087313 5 0.1197 0.977 0 0 0 0.048 0.952
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087306 5 0.0000 0.963 0 0 0 0.000 1.000
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087318 5 0.1197 0.977 0 0 0 0.048 0.952
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087309 5 0.1197 0.977 0 0 0 0.048 0.952
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087319 5 0.0000 0.963 0 0 0 0.000 1.000
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087315 5 0.1197 0.977 0 0 0 0.048 0.952
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087310 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087325 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.0162 0.968 0 0 0 0.996 0.004
#> SRR2087324 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087308 4 0.0000 0.972 0 0 0 1.000 0.000
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 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
#> SRR2087314 6 0.0146 0.962 0.004 0.000 0.000 0.000 0.000 0.996
#> SRR2087307 4 0.3351 0.574 0.000 0.000 0.000 0.712 0.000 0.288
#> SRR2087359 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087373 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087363 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087317 6 0.1075 0.976 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087313 6 0.1075 0.976 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087360 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087375 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087349 5 0.0000 0.978 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2087326 5 0.0000 0.978 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2087306 6 0.0146 0.962 0.004 0.000 0.000 0.000 0.000 0.996
#> SRR2087347 1 0.3862 0.992 0.524 0.000 0.000 0.000 0.476 0.000
#> SRR2087327 5 0.0000 0.978 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2087318 6 0.1075 0.976 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087350 5 0.0000 0.978 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2087309 6 0.1075 0.976 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087344 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087364 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087332 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087336 5 0.0000 0.978 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2087348 5 0.0260 0.970 0.008 0.000 0.000 0.000 0.992 0.000
#> SRR2087353 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087343 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087322 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087335 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087362 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087374 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087346 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087345 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087358 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087334 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087323 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087330 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087354 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087342 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087369 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087371 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087361 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087367 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087301 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087333 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087356 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087370 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087312 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087338 5 0.0547 0.956 0.020 0.000 0.000 0.000 0.980 0.000
#> SRR2087365 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087319 6 0.0146 0.962 0.004 0.000 0.000 0.000 0.000 0.996
#> SRR2087368 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087315 6 0.1075 0.976 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087372 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087357 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087297 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087352 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087339 5 0.1556 0.836 0.080 0.000 0.000 0.000 0.920 0.000
#> SRR2087286 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087355 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087331 1 0.3866 0.980 0.516 0.000 0.000 0.000 0.484 0.000
#> SRR2087328 5 0.0000 0.978 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2087321 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087310 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087341 1 0.3862 0.992 0.524 0.000 0.000 0.000 0.476 0.000
#> SRR2087340 1 0.3860 0.996 0.528 0.000 0.000 0.000 0.472 0.000
#> SRR2087283 2 0.3843 0.819 0.000 0.548 0.452 0.000 0.000 0.000
#> SRR2087296 2 0.2730 0.760 0.000 0.808 0.192 0.000 0.000 0.000
#> SRR2087337 1 0.3866 0.980 0.516 0.000 0.000 0.000 0.484 0.000
#> SRR2087316 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087325 4 0.0146 0.969 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR2087287 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087289 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087311 4 0.0146 0.969 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR2087324 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087305 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087282 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087285 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087290 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087293 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087329 5 0.0000 0.978 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2087366 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087300 2 0.2378 0.749 0.000 0.848 0.152 0.000 0.000 0.000
#> SRR2087284 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087303 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087351 3 0.3857 1.000 0.468 0.000 0.532 0.000 0.000 0.000
#> SRR2087302 2 0.3833 0.819 0.000 0.556 0.444 0.000 0.000 0.000
#> SRR2087304 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087298 2 0.3828 0.817 0.000 0.560 0.440 0.000 0.000 0.000
#> SRR2087320 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087308 4 0.0000 0.971 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087295 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087292 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087291 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087294 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087299 2 0.3857 0.820 0.000 0.532 0.468 0.000 0.000 0.000
#> SRR2087288 2 0.0000 0.699 0.000 1.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "mclust"]
# you can also extract it by
# res = res_list["SD:mclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16723 rows and 94 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.496 0.869 0.900 0.5041 0.497 0.497
#> 3 3 1.000 0.975 0.980 0.2747 0.633 0.399
#> 4 4 1.000 1.000 1.000 0.1772 0.886 0.681
#> 5 5 0.990 0.962 0.987 0.0109 0.996 0.982
#> 6 6 0.987 0.945 0.976 0.0161 0.984 0.933
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
#> SRR2087314 2 0.000 0.855 0.000 1.000
#> SRR2087307 2 0.000 0.855 0.000 1.000
#> SRR2087359 1 0.738 0.869 0.792 0.208
#> SRR2087373 1 0.738 0.869 0.792 0.208
#> SRR2087363 1 0.738 0.869 0.792 0.208
#> SRR2087317 2 0.000 0.855 0.000 1.000
#> SRR2087313 2 0.000 0.855 0.000 1.000
#> SRR2087360 1 0.738 0.869 0.792 0.208
#> SRR2087375 1 0.738 0.869 0.792 0.208
#> SRR2087349 1 0.000 0.867 1.000 0.000
#> SRR2087326 1 0.000 0.867 1.000 0.000
#> SRR2087306 2 0.000 0.855 0.000 1.000
#> SRR2087347 1 0.000 0.867 1.000 0.000
#> SRR2087327 1 0.000 0.867 1.000 0.000
#> SRR2087318 2 0.000 0.855 0.000 1.000
#> SRR2087350 1 0.000 0.867 1.000 0.000
#> SRR2087309 2 0.000 0.855 0.000 1.000
#> SRR2087344 1 0.000 0.867 1.000 0.000
#> SRR2087364 1 0.738 0.869 0.792 0.208
#> SRR2087332 1 0.000 0.867 1.000 0.000
#> SRR2087336 1 0.000 0.867 1.000 0.000
#> SRR2087348 1 0.000 0.867 1.000 0.000
#> SRR2087353 1 0.738 0.869 0.792 0.208
#> SRR2087343 1 0.000 0.867 1.000 0.000
#> SRR2087322 2 0.000 0.855 0.000 1.000
#> SRR2087335 1 0.000 0.867 1.000 0.000
#> SRR2087362 1 0.738 0.869 0.792 0.208
#> SRR2087374 1 0.738 0.869 0.792 0.208
#> SRR2087346 1 0.000 0.867 1.000 0.000
#> SRR2087345 1 0.000 0.867 1.000 0.000
#> SRR2087358 1 0.738 0.869 0.792 0.208
#> SRR2087334 1 0.000 0.867 1.000 0.000
#> SRR2087323 2 0.000 0.855 0.000 1.000
#> SRR2087330 1 0.000 0.867 1.000 0.000
#> SRR2087354 1 0.738 0.869 0.792 0.208
#> SRR2087342 1 0.000 0.867 1.000 0.000
#> SRR2087369 1 0.738 0.869 0.792 0.208
#> SRR2087371 1 0.738 0.869 0.792 0.208
#> SRR2087361 1 0.738 0.869 0.792 0.208
#> SRR2087367 1 0.738 0.869 0.792 0.208
#> SRR2087301 2 0.738 0.881 0.208 0.792
#> SRR2087333 1 0.000 0.867 1.000 0.000
#> SRR2087356 1 0.738 0.869 0.792 0.208
#> SRR2087370 1 0.738 0.869 0.792 0.208
#> SRR2087312 2 0.000 0.855 0.000 1.000
#> SRR2087338 1 0.000 0.867 1.000 0.000
#> SRR2087365 1 0.738 0.869 0.792 0.208
#> SRR2087319 2 0.000 0.855 0.000 1.000
#> SRR2087368 1 0.738 0.869 0.792 0.208
#> SRR2087315 2 0.000 0.855 0.000 1.000
#> SRR2087372 1 0.738 0.869 0.792 0.208
#> SRR2087357 1 0.738 0.869 0.792 0.208
#> SRR2087297 2 0.738 0.881 0.208 0.792
#> SRR2087352 1 0.738 0.869 0.792 0.208
#> SRR2087339 1 0.000 0.867 1.000 0.000
#> SRR2087286 2 0.738 0.881 0.208 0.792
#> SRR2087355 1 0.738 0.869 0.792 0.208
#> SRR2087331 1 0.000 0.867 1.000 0.000
#> SRR2087328 1 0.000 0.867 1.000 0.000
#> SRR2087321 2 0.000 0.855 0.000 1.000
#> SRR2087310 2 0.000 0.855 0.000 1.000
#> SRR2087341 1 0.000 0.867 1.000 0.000
#> SRR2087340 1 0.000 0.867 1.000 0.000
#> SRR2087283 2 0.738 0.881 0.208 0.792
#> SRR2087296 2 0.738 0.881 0.208 0.792
#> SRR2087337 1 0.000 0.867 1.000 0.000
#> SRR2087316 2 0.000 0.855 0.000 1.000
#> SRR2087325 2 0.000 0.855 0.000 1.000
#> SRR2087287 2 0.738 0.881 0.208 0.792
#> SRR2087289 2 0.738 0.881 0.208 0.792
#> SRR2087311 2 0.000 0.855 0.000 1.000
#> SRR2087324 2 0.000 0.855 0.000 1.000
#> SRR2087305 2 0.738 0.881 0.208 0.792
#> SRR2087282 2 0.738 0.881 0.208 0.792
#> SRR2087285 2 0.738 0.881 0.208 0.792
#> SRR2087290 2 0.738 0.881 0.208 0.792
#> SRR2087293 2 0.738 0.881 0.208 0.792
#> SRR2087329 1 0.000 0.867 1.000 0.000
#> SRR2087366 1 0.738 0.869 0.792 0.208
#> SRR2087300 2 0.738 0.881 0.208 0.792
#> SRR2087284 2 0.738 0.881 0.208 0.792
#> SRR2087303 2 0.738 0.881 0.208 0.792
#> SRR2087351 1 0.738 0.869 0.792 0.208
#> SRR2087302 2 0.738 0.881 0.208 0.792
#> SRR2087304 2 0.738 0.881 0.208 0.792
#> SRR2087298 2 0.738 0.881 0.208 0.792
#> SRR2087320 2 0.000 0.855 0.000 1.000
#> SRR2087308 2 0.000 0.855 0.000 1.000
#> SRR2087295 2 0.738 0.881 0.208 0.792
#> SRR2087292 2 0.738 0.881 0.208 0.792
#> SRR2087291 2 0.738 0.881 0.208 0.792
#> SRR2087294 2 0.738 0.881 0.208 0.792
#> SRR2087299 2 0.738 0.881 0.208 0.792
#> SRR2087288 2 0.738 0.881 0.208 0.792
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0.288 0.940 0.904 0.096 0
#> SRR2087307 1 0.288 0.940 0.904 0.096 0
#> SRR2087359 3 0.000 1.000 0.000 0.000 1
#> SRR2087373 3 0.000 1.000 0.000 0.000 1
#> SRR2087363 3 0.000 1.000 0.000 0.000 1
#> SRR2087317 1 0.288 0.940 0.904 0.096 0
#> SRR2087313 1 0.288 0.940 0.904 0.096 0
#> SRR2087360 3 0.000 1.000 0.000 0.000 1
#> SRR2087375 3 0.000 1.000 0.000 0.000 1
#> SRR2087349 1 0.000 0.954 1.000 0.000 0
#> SRR2087326 1 0.000 0.954 1.000 0.000 0
#> SRR2087306 1 0.288 0.940 0.904 0.096 0
#> SRR2087347 1 0.000 0.954 1.000 0.000 0
#> SRR2087327 1 0.000 0.954 1.000 0.000 0
#> SRR2087318 1 0.288 0.940 0.904 0.096 0
#> SRR2087350 1 0.000 0.954 1.000 0.000 0
#> SRR2087309 1 0.288 0.940 0.904 0.096 0
#> SRR2087344 1 0.000 0.954 1.000 0.000 0
#> SRR2087364 3 0.000 1.000 0.000 0.000 1
#> SRR2087332 1 0.000 0.954 1.000 0.000 0
#> SRR2087336 1 0.000 0.954 1.000 0.000 0
#> SRR2087348 1 0.000 0.954 1.000 0.000 0
#> SRR2087353 3 0.000 1.000 0.000 0.000 1
#> SRR2087343 1 0.000 0.954 1.000 0.000 0
#> SRR2087322 1 0.288 0.940 0.904 0.096 0
#> SRR2087335 1 0.000 0.954 1.000 0.000 0
#> SRR2087362 3 0.000 1.000 0.000 0.000 1
#> SRR2087374 3 0.000 1.000 0.000 0.000 1
#> SRR2087346 1 0.000 0.954 1.000 0.000 0
#> SRR2087345 1 0.000 0.954 1.000 0.000 0
#> SRR2087358 3 0.000 1.000 0.000 0.000 1
#> SRR2087334 1 0.000 0.954 1.000 0.000 0
#> SRR2087323 1 0.288 0.940 0.904 0.096 0
#> SRR2087330 1 0.000 0.954 1.000 0.000 0
#> SRR2087354 3 0.000 1.000 0.000 0.000 1
#> SRR2087342 1 0.000 0.954 1.000 0.000 0
#> SRR2087369 3 0.000 1.000 0.000 0.000 1
#> SRR2087371 3 0.000 1.000 0.000 0.000 1
#> SRR2087361 3 0.000 1.000 0.000 0.000 1
#> SRR2087367 3 0.000 1.000 0.000 0.000 1
#> SRR2087301 2 0.000 1.000 0.000 1.000 0
#> SRR2087333 1 0.000 0.954 1.000 0.000 0
#> SRR2087356 3 0.000 1.000 0.000 0.000 1
#> SRR2087370 3 0.000 1.000 0.000 0.000 1
#> SRR2087312 1 0.288 0.940 0.904 0.096 0
#> SRR2087338 1 0.000 0.954 1.000 0.000 0
#> SRR2087365 3 0.000 1.000 0.000 0.000 1
#> SRR2087319 1 0.288 0.940 0.904 0.096 0
#> SRR2087368 3 0.000 1.000 0.000 0.000 1
#> SRR2087315 1 0.288 0.940 0.904 0.096 0
#> SRR2087372 3 0.000 1.000 0.000 0.000 1
#> SRR2087357 3 0.000 1.000 0.000 0.000 1
#> SRR2087297 2 0.000 1.000 0.000 1.000 0
#> SRR2087352 3 0.000 1.000 0.000 0.000 1
#> SRR2087339 1 0.000 0.954 1.000 0.000 0
#> SRR2087286 2 0.000 1.000 0.000 1.000 0
#> SRR2087355 3 0.000 1.000 0.000 0.000 1
#> SRR2087331 1 0.000 0.954 1.000 0.000 0
#> SRR2087328 1 0.000 0.954 1.000 0.000 0
#> SRR2087321 1 0.288 0.940 0.904 0.096 0
#> SRR2087310 1 0.288 0.940 0.904 0.096 0
#> SRR2087341 1 0.000 0.954 1.000 0.000 0
#> SRR2087340 1 0.000 0.954 1.000 0.000 0
#> SRR2087283 2 0.000 1.000 0.000 1.000 0
#> SRR2087296 2 0.000 1.000 0.000 1.000 0
#> SRR2087337 1 0.000 0.954 1.000 0.000 0
#> SRR2087316 1 0.288 0.940 0.904 0.096 0
#> SRR2087325 1 0.288 0.940 0.904 0.096 0
#> SRR2087287 2 0.000 1.000 0.000 1.000 0
#> SRR2087289 2 0.000 1.000 0.000 1.000 0
#> SRR2087311 1 0.288 0.940 0.904 0.096 0
#> SRR2087324 1 0.288 0.940 0.904 0.096 0
#> SRR2087305 2 0.000 1.000 0.000 1.000 0
#> SRR2087282 2 0.000 1.000 0.000 1.000 0
#> SRR2087285 2 0.000 1.000 0.000 1.000 0
#> SRR2087290 2 0.000 1.000 0.000 1.000 0
#> SRR2087293 2 0.000 1.000 0.000 1.000 0
#> SRR2087329 1 0.000 0.954 1.000 0.000 0
#> SRR2087366 3 0.000 1.000 0.000 0.000 1
#> SRR2087300 2 0.000 1.000 0.000 1.000 0
#> SRR2087284 2 0.000 1.000 0.000 1.000 0
#> SRR2087303 2 0.000 1.000 0.000 1.000 0
#> SRR2087351 3 0.000 1.000 0.000 0.000 1
#> SRR2087302 2 0.000 1.000 0.000 1.000 0
#> SRR2087304 2 0.000 1.000 0.000 1.000 0
#> SRR2087298 2 0.000 1.000 0.000 1.000 0
#> SRR2087320 1 0.288 0.940 0.904 0.096 0
#> SRR2087308 1 0.288 0.940 0.904 0.096 0
#> SRR2087295 2 0.000 1.000 0.000 1.000 0
#> SRR2087292 2 0.000 1.000 0.000 1.000 0
#> SRR2087291 2 0.000 1.000 0.000 1.000 0
#> SRR2087294 2 0.000 1.000 0.000 1.000 0
#> SRR2087299 2 0.000 1.000 0.000 1.000 0
#> SRR2087288 2 0.000 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
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.260 0.830 0 0 0 0.852 0.148
#> SRR2087307 5 0.000 0.000 0 0 0 0.000 1.000
#> SRR2087359 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087313 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087360 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087306 4 0.260 0.830 0 0 0 0.852 0.148
#> SRR2087347 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087350 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087344 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087335 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087330 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.430 0.238 0 0 0 0.524 0.476
#> SRR2087338 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087319 4 0.260 0.830 0 0 0 0.852 0.148
#> SRR2087368 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087372 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087310 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087341 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087325 4 0.366 0.677 0 0 0 0.724 0.276
#> SRR2087287 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087324 4 0.029 0.926 0 0 0 0.992 0.008
#> SRR2087305 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087308 4 0.000 0.931 0 0 0 1.000 0.000
#> SRR2087295 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.000 1.000 0 1 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
#> SRR2087314 6 0.3409 0.729 0.000 0 0 0.300 0.000 0.700
#> SRR2087307 5 0.0363 0.000 0.000 0 0 0.000 0.988 0.012
#> SRR2087359 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087317 4 0.0000 0.896 0.000 0 0 1.000 0.000 0.000
#> SRR2087313 4 0.0146 0.896 0.000 0 0 0.996 0.004 0.000
#> SRR2087360 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087349 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087326 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087306 6 0.3409 0.729 0.000 0 0 0.300 0.000 0.700
#> SRR2087347 1 0.0363 0.989 0.988 0 0 0.000 0.000 0.012
#> SRR2087327 1 0.0260 0.993 0.992 0 0 0.000 0.000 0.008
#> SRR2087318 4 0.0146 0.896 0.000 0 0 0.996 0.000 0.004
#> SRR2087350 1 0.0260 0.993 0.992 0 0 0.000 0.000 0.008
#> SRR2087309 4 0.0000 0.896 0.000 0 0 1.000 0.000 0.000
#> SRR2087344 1 0.0146 0.995 0.996 0 0 0.000 0.000 0.004
#> SRR2087364 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087332 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087336 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087348 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087343 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087322 4 0.3240 0.723 0.000 0 0 0.752 0.004 0.244
#> SRR2087335 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087346 1 0.0260 0.993 0.992 0 0 0.000 0.000 0.008
#> SRR2087345 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087334 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087323 4 0.3420 0.723 0.000 0 0 0.748 0.012 0.240
#> SRR2087330 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087342 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087333 1 0.0260 0.993 0.992 0 0 0.000 0.000 0.008
#> SRR2087356 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087312 6 0.3168 0.376 0.000 0 0 0.024 0.172 0.804
#> SRR2087338 1 0.0260 0.993 0.992 0 0 0.000 0.000 0.008
#> SRR2087365 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087319 6 0.3499 0.713 0.000 0 0 0.320 0.000 0.680
#> SRR2087368 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087315 4 0.0291 0.896 0.000 0 0 0.992 0.004 0.004
#> SRR2087372 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087339 1 0.0260 0.993 0.992 0 0 0.000 0.000 0.008
#> SRR2087286 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087331 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087328 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087321 4 0.0291 0.896 0.000 0 0 0.992 0.004 0.004
#> SRR2087310 4 0.3076 0.727 0.000 0 0 0.760 0.000 0.240
#> SRR2087341 1 0.0363 0.989 0.988 0 0 0.000 0.000 0.012
#> SRR2087340 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087337 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087316 4 0.0291 0.896 0.000 0 0 0.992 0.004 0.004
#> SRR2087325 6 0.0547 0.525 0.000 0 0 0.020 0.000 0.980
#> SRR2087287 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087311 4 0.0146 0.896 0.000 0 0 0.996 0.004 0.000
#> SRR2087324 4 0.0405 0.895 0.000 0 0 0.988 0.008 0.004
#> SRR2087305 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087329 1 0.0000 0.997 1.000 0 0 0.000 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087320 4 0.3271 0.730 0.000 0 0 0.760 0.008 0.232
#> SRR2087308 4 0.0291 0.896 0.000 0 0 0.992 0.004 0.004
#> SRR2087295 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "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 16723 rows and 94 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 0.962 0.986 0.50105 0.500 0.500
#> 3 3 0.648 0.809 0.810 0.27341 0.830 0.664
#> 4 4 1.000 1.000 1.000 0.18546 0.878 0.655
#> 5 5 0.991 0.981 0.979 0.00735 1.000 1.000
#> 6 6 0.986 0.944 0.941 0.01348 0.981 0.921
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
#> SRR2087314 1 0.9993 0.0605 0.516 0.484
#> SRR2087307 1 0.9963 0.1320 0.536 0.464
#> SRR2087359 1 0.0000 0.9810 1.000 0.000
#> SRR2087373 1 0.0000 0.9810 1.000 0.000
#> SRR2087363 1 0.0000 0.9810 1.000 0.000
#> SRR2087317 2 0.0000 0.9915 0.000 1.000
#> SRR2087313 2 0.0000 0.9915 0.000 1.000
#> SRR2087360 1 0.0000 0.9810 1.000 0.000
#> SRR2087375 1 0.0000 0.9810 1.000 0.000
#> SRR2087349 1 0.0000 0.9810 1.000 0.000
#> SRR2087326 1 0.0000 0.9810 1.000 0.000
#> SRR2087306 2 0.9000 0.5224 0.316 0.684
#> SRR2087347 1 0.0000 0.9810 1.000 0.000
#> SRR2087327 1 0.0000 0.9810 1.000 0.000
#> SRR2087318 2 0.0000 0.9915 0.000 1.000
#> SRR2087350 1 0.0000 0.9810 1.000 0.000
#> SRR2087309 2 0.0000 0.9915 0.000 1.000
#> SRR2087344 1 0.0000 0.9810 1.000 0.000
#> SRR2087364 1 0.0000 0.9810 1.000 0.000
#> SRR2087332 1 0.0000 0.9810 1.000 0.000
#> SRR2087336 1 0.0000 0.9810 1.000 0.000
#> SRR2087348 1 0.0000 0.9810 1.000 0.000
#> SRR2087353 1 0.0000 0.9810 1.000 0.000
#> SRR2087343 1 0.0000 0.9810 1.000 0.000
#> SRR2087322 2 0.0000 0.9915 0.000 1.000
#> SRR2087335 1 0.0000 0.9810 1.000 0.000
#> SRR2087362 1 0.0000 0.9810 1.000 0.000
#> SRR2087374 1 0.0000 0.9810 1.000 0.000
#> SRR2087346 1 0.0000 0.9810 1.000 0.000
#> SRR2087345 1 0.0000 0.9810 1.000 0.000
#> SRR2087358 1 0.0000 0.9810 1.000 0.000
#> SRR2087334 1 0.0000 0.9810 1.000 0.000
#> SRR2087323 2 0.0000 0.9915 0.000 1.000
#> SRR2087330 1 0.0000 0.9810 1.000 0.000
#> SRR2087354 1 0.0000 0.9810 1.000 0.000
#> SRR2087342 1 0.0000 0.9810 1.000 0.000
#> SRR2087369 1 0.0000 0.9810 1.000 0.000
#> SRR2087371 1 0.0000 0.9810 1.000 0.000
#> SRR2087361 1 0.0000 0.9810 1.000 0.000
#> SRR2087367 1 0.0000 0.9810 1.000 0.000
#> SRR2087301 2 0.0000 0.9915 0.000 1.000
#> SRR2087333 1 0.0000 0.9810 1.000 0.000
#> SRR2087356 1 0.0000 0.9810 1.000 0.000
#> SRR2087370 1 0.0000 0.9810 1.000 0.000
#> SRR2087312 2 0.0000 0.9915 0.000 1.000
#> SRR2087338 1 0.0000 0.9810 1.000 0.000
#> SRR2087365 1 0.0000 0.9810 1.000 0.000
#> SRR2087319 2 0.1184 0.9761 0.016 0.984
#> SRR2087368 1 0.0000 0.9810 1.000 0.000
#> SRR2087315 2 0.0000 0.9915 0.000 1.000
#> SRR2087372 1 0.0000 0.9810 1.000 0.000
#> SRR2087357 1 0.0000 0.9810 1.000 0.000
#> SRR2087297 2 0.0000 0.9915 0.000 1.000
#> SRR2087352 1 0.0000 0.9810 1.000 0.000
#> SRR2087339 1 0.0000 0.9810 1.000 0.000
#> SRR2087286 2 0.0000 0.9915 0.000 1.000
#> SRR2087355 1 0.0000 0.9810 1.000 0.000
#> SRR2087331 1 0.0000 0.9810 1.000 0.000
#> SRR2087328 1 0.0000 0.9810 1.000 0.000
#> SRR2087321 2 0.0000 0.9915 0.000 1.000
#> SRR2087310 2 0.0000 0.9915 0.000 1.000
#> SRR2087341 1 0.0000 0.9810 1.000 0.000
#> SRR2087340 1 0.0000 0.9810 1.000 0.000
#> SRR2087283 2 0.0000 0.9915 0.000 1.000
#> SRR2087296 2 0.0000 0.9915 0.000 1.000
#> SRR2087337 1 0.0000 0.9810 1.000 0.000
#> SRR2087316 2 0.0000 0.9915 0.000 1.000
#> SRR2087325 2 0.0376 0.9878 0.004 0.996
#> SRR2087287 2 0.0000 0.9915 0.000 1.000
#> SRR2087289 2 0.0000 0.9915 0.000 1.000
#> SRR2087311 2 0.0000 0.9915 0.000 1.000
#> SRR2087324 2 0.0000 0.9915 0.000 1.000
#> SRR2087305 2 0.0000 0.9915 0.000 1.000
#> SRR2087282 2 0.0000 0.9915 0.000 1.000
#> SRR2087285 2 0.0000 0.9915 0.000 1.000
#> SRR2087290 2 0.0000 0.9915 0.000 1.000
#> SRR2087293 2 0.0000 0.9915 0.000 1.000
#> SRR2087329 1 0.0000 0.9810 1.000 0.000
#> SRR2087366 1 0.0000 0.9810 1.000 0.000
#> SRR2087300 2 0.0000 0.9915 0.000 1.000
#> SRR2087284 2 0.0000 0.9915 0.000 1.000
#> SRR2087303 2 0.0000 0.9915 0.000 1.000
#> SRR2087351 1 0.0000 0.9810 1.000 0.000
#> SRR2087302 2 0.0000 0.9915 0.000 1.000
#> SRR2087304 2 0.0000 0.9915 0.000 1.000
#> SRR2087298 2 0.0000 0.9915 0.000 1.000
#> SRR2087320 2 0.0000 0.9915 0.000 1.000
#> SRR2087308 2 0.0000 0.9915 0.000 1.000
#> SRR2087295 2 0.0000 0.9915 0.000 1.000
#> SRR2087292 2 0.0000 0.9915 0.000 1.000
#> SRR2087291 2 0.0000 0.9915 0.000 1.000
#> SRR2087294 2 0.0000 0.9915 0.000 1.000
#> SRR2087299 2 0.0000 0.9915 0.000 1.000
#> SRR2087288 2 0.0000 0.9915 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 3 0.806 -0.603 0.064 0.440 0.496
#> SRR2087307 3 0.309 0.337 0.016 0.072 0.912
#> SRR2087359 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087373 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087363 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087317 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087313 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087360 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087375 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087349 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087326 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087306 3 0.799 -0.617 0.060 0.452 0.488
#> SRR2087347 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087327 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087318 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087350 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087309 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087344 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087364 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087332 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087336 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087348 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087353 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087343 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087322 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087335 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087362 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087374 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087346 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087345 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087358 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087334 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087323 2 0.665 0.652 0.008 0.540 0.452
#> SRR2087330 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087354 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087342 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087369 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087371 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087361 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087367 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087301 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087333 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087356 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087370 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087312 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087338 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087365 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087319 2 0.799 0.631 0.060 0.480 0.460
#> SRR2087368 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087315 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087372 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087357 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087297 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087352 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087339 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087286 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087355 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087331 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087328 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087321 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087310 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087341 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087340 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087283 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087296 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087337 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087316 2 0.791 0.640 0.056 0.492 0.452
#> SRR2087325 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087287 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087289 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087311 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087324 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087305 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087282 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087285 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087290 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087293 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087329 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087366 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087300 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087284 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087303 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087351 3 0.571 0.884 0.320 0.000 0.680
#> SRR2087302 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087304 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087298 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087320 2 0.693 0.651 0.016 0.532 0.452
#> SRR2087308 2 0.799 0.636 0.060 0.484 0.456
#> SRR2087295 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087292 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087291 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087294 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087299 2 0.000 0.793 0.000 1.000 0.000
#> SRR2087288 2 0.000 0.793 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.3305 0.898 0.000 0.000 0 0.776 NA
#> SRR2087307 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087317 4 0.3305 0.898 0.000 0.000 0 0.776 NA
#> SRR2087313 4 0.2605 0.918 0.000 0.000 0 0.852 NA
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087349 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087326 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087306 4 0.3305 0.898 0.000 0.000 0 0.776 NA
#> SRR2087347 1 0.0000 0.997 1.000 0.000 0 0.000 NA
#> SRR2087327 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087318 4 0.3274 0.900 0.000 0.000 0 0.780 NA
#> SRR2087350 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087309 4 0.3305 0.898 0.000 0.000 0 0.776 NA
#> SRR2087344 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087332 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087336 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087348 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087343 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087322 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087335 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087346 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087345 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087334 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087323 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087330 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087342 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087301 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087333 1 0.0000 0.997 1.000 0.000 0 0.000 NA
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087312 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087338 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087319 4 0.3305 0.898 0.000 0.000 0 0.776 NA
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087315 4 0.2648 0.917 0.000 0.000 0 0.848 NA
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087297 2 0.0290 0.992 0.000 0.992 0 0.000 NA
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087339 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087286 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087331 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087328 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087321 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087310 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087341 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087340 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087283 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087296 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087337 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087316 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087325 4 0.0404 0.941 0.000 0.000 0 0.988 NA
#> SRR2087287 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087289 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087311 4 0.0162 0.941 0.000 0.000 0 0.996 NA
#> SRR2087324 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087305 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087282 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087285 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087290 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087293 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087329 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087300 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087284 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087303 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087302 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087304 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087298 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087320 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087308 4 0.0000 0.942 0.000 0.000 0 1.000 NA
#> SRR2087295 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087292 2 0.0000 0.992 0.000 1.000 0 0.000 NA
#> SRR2087291 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087294 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087299 2 0.0609 0.992 0.000 0.980 0 0.000 NA
#> SRR2087288 2 0.0000 0.992 0.000 1.000 0 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 6 0.3833 0.9913 0.000 0.000 0 0.444 NA 0.556
#> SRR2087307 4 0.2121 0.7767 0.000 0.000 0 0.892 NA 0.012
#> SRR2087359 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087373 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087363 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087317 6 0.3833 0.9913 0.000 0.000 0 0.444 NA 0.556
#> SRR2087313 4 0.3409 0.0108 0.000 0.000 0 0.700 NA 0.300
#> SRR2087360 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087375 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087349 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087326 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087306 6 0.3833 0.9913 0.000 0.000 0 0.444 NA 0.556
#> SRR2087347 1 0.0547 0.9828 0.980 0.000 0 0.000 NA 0.000
#> SRR2087327 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087318 6 0.3847 0.9770 0.000 0.000 0 0.456 NA 0.544
#> SRR2087350 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087309 6 0.3843 0.9838 0.000 0.000 0 0.452 NA 0.548
#> SRR2087344 1 0.0632 0.9796 0.976 0.000 0 0.000 NA 0.000
#> SRR2087364 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087332 1 0.0547 0.9805 0.980 0.000 0 0.000 NA 0.000
#> SRR2087336 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087348 1 0.0937 0.9808 0.960 0.000 0 0.000 NA 0.000
#> SRR2087353 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087343 1 0.0260 0.9822 0.992 0.000 0 0.000 NA 0.000
#> SRR2087322 4 0.0146 0.8568 0.000 0.000 0 0.996 NA 0.004
#> SRR2087335 1 0.0632 0.9796 0.976 0.000 0 0.000 NA 0.000
#> SRR2087362 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087374 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087346 1 0.0458 0.9812 0.984 0.000 0 0.000 NA 0.000
#> SRR2087345 1 0.0547 0.9805 0.980 0.000 0 0.000 NA 0.000
#> SRR2087358 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087334 1 0.0632 0.9796 0.976 0.000 0 0.000 NA 0.000
#> SRR2087323 4 0.0547 0.8488 0.000 0.000 0 0.980 NA 0.020
#> SRR2087330 1 0.0632 0.9796 0.976 0.000 0 0.000 NA 0.000
#> SRR2087354 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087342 1 0.0632 0.9796 0.976 0.000 0 0.000 NA 0.000
#> SRR2087369 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087371 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087361 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087367 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087301 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087333 1 0.0146 0.9821 0.996 0.000 0 0.000 NA 0.000
#> SRR2087356 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087370 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087312 4 0.1007 0.8326 0.000 0.000 0 0.956 NA 0.044
#> SRR2087338 1 0.0260 0.9819 0.992 0.000 0 0.000 NA 0.000
#> SRR2087365 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087319 6 0.3833 0.9913 0.000 0.000 0 0.444 NA 0.556
#> SRR2087368 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087315 4 0.3446 -0.0372 0.000 0.000 0 0.692 NA 0.308
#> SRR2087372 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087357 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087297 2 0.0632 0.9753 0.000 0.976 0 0.000 NA 0.000
#> SRR2087352 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087339 1 0.0260 0.9819 0.992 0.000 0 0.000 NA 0.000
#> SRR2087286 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087355 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087331 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087328 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087321 4 0.0632 0.8493 0.000 0.000 0 0.976 NA 0.024
#> SRR2087310 4 0.0363 0.8544 0.000 0.000 0 0.988 NA 0.012
#> SRR2087341 1 0.1007 0.9802 0.956 0.000 0 0.000 NA 0.000
#> SRR2087340 1 0.0632 0.9796 0.976 0.000 0 0.000 NA 0.000
#> SRR2087283 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087296 2 0.0260 0.9753 0.000 0.992 0 0.000 NA 0.000
#> SRR2087337 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087316 4 0.0363 0.8544 0.000 0.000 0 0.988 NA 0.012
#> SRR2087325 4 0.2178 0.6876 0.000 0.000 0 0.868 NA 0.132
#> SRR2087287 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087289 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087311 4 0.0790 0.8445 0.000 0.000 0 0.968 NA 0.032
#> SRR2087324 4 0.0146 0.8569 0.000 0.000 0 0.996 NA 0.004
#> SRR2087305 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087282 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087285 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087290 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087293 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087329 1 0.0713 0.9801 0.972 0.000 0 0.000 NA 0.000
#> SRR2087366 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087300 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087284 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087303 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087351 3 0.0000 1.0000 0.000 0.000 1 0.000 NA 0.000
#> SRR2087302 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087304 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087298 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087320 4 0.0790 0.8365 0.000 0.000 0 0.968 NA 0.032
#> SRR2087308 4 0.0000 0.8572 0.000 0.000 0 1.000 NA 0.000
#> SRR2087295 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087292 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
#> SRR2087291 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087294 2 0.1204 0.9730 0.000 0.944 0 0.000 NA 0.000
#> SRR2087299 2 0.1075 0.9735 0.000 0.952 0 0.000 NA 0.000
#> SRR2087288 2 0.0146 0.9752 0.000 0.996 0 0.000 NA 0.004
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16723 rows and 94 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 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.497 0.960 0.946 0.3446 0.661 0.661
#> 3 3 1.000 1.000 1.000 0.7806 0.725 0.585
#> 4 4 1.000 1.000 1.000 0.2328 0.857 0.630
#> 5 5 0.989 0.889 0.962 0.0160 0.988 0.952
#> 6 6 0.986 0.975 0.989 0.0138 0.980 0.917
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
#> SRR2087314 2 0.469 1.000 0.100 0.900
#> SRR2087307 2 0.469 1.000 0.100 0.900
#> SRR2087359 1 0.000 0.963 1.000 0.000
#> SRR2087373 1 0.000 0.963 1.000 0.000
#> SRR2087363 1 0.000 0.963 1.000 0.000
#> SRR2087317 2 0.469 1.000 0.100 0.900
#> SRR2087313 2 0.469 1.000 0.100 0.900
#> SRR2087360 1 0.000 0.963 1.000 0.000
#> SRR2087375 1 0.000 0.963 1.000 0.000
#> SRR2087349 1 0.000 0.963 1.000 0.000
#> SRR2087326 1 0.000 0.963 1.000 0.000
#> SRR2087306 2 0.469 1.000 0.100 0.900
#> SRR2087347 1 0.000 0.963 1.000 0.000
#> SRR2087327 1 0.000 0.963 1.000 0.000
#> SRR2087318 2 0.469 1.000 0.100 0.900
#> SRR2087350 1 0.000 0.963 1.000 0.000
#> SRR2087309 2 0.469 1.000 0.100 0.900
#> SRR2087344 1 0.000 0.963 1.000 0.000
#> SRR2087364 1 0.000 0.963 1.000 0.000
#> SRR2087332 1 0.000 0.963 1.000 0.000
#> SRR2087336 1 0.000 0.963 1.000 0.000
#> SRR2087348 1 0.000 0.963 1.000 0.000
#> SRR2087353 1 0.000 0.963 1.000 0.000
#> SRR2087343 1 0.000 0.963 1.000 0.000
#> SRR2087322 2 0.469 1.000 0.100 0.900
#> SRR2087335 1 0.000 0.963 1.000 0.000
#> SRR2087362 1 0.000 0.963 1.000 0.000
#> SRR2087374 1 0.000 0.963 1.000 0.000
#> SRR2087346 1 0.000 0.963 1.000 0.000
#> SRR2087345 1 0.000 0.963 1.000 0.000
#> SRR2087358 1 0.000 0.963 1.000 0.000
#> SRR2087334 1 0.000 0.963 1.000 0.000
#> SRR2087323 2 0.469 1.000 0.100 0.900
#> SRR2087330 1 0.000 0.963 1.000 0.000
#> SRR2087354 1 0.000 0.963 1.000 0.000
#> SRR2087342 1 0.000 0.963 1.000 0.000
#> SRR2087369 1 0.000 0.963 1.000 0.000
#> SRR2087371 1 0.000 0.963 1.000 0.000
#> SRR2087361 1 0.000 0.963 1.000 0.000
#> SRR2087367 1 0.000 0.963 1.000 0.000
#> SRR2087301 1 0.482 0.922 0.896 0.104
#> SRR2087333 1 0.000 0.963 1.000 0.000
#> SRR2087356 1 0.000 0.963 1.000 0.000
#> SRR2087370 1 0.000 0.963 1.000 0.000
#> SRR2087312 2 0.469 1.000 0.100 0.900
#> SRR2087338 1 0.000 0.963 1.000 0.000
#> SRR2087365 1 0.000 0.963 1.000 0.000
#> SRR2087319 2 0.469 1.000 0.100 0.900
#> SRR2087368 1 0.000 0.963 1.000 0.000
#> SRR2087315 2 0.469 1.000 0.100 0.900
#> SRR2087372 1 0.000 0.963 1.000 0.000
#> SRR2087357 1 0.000 0.963 1.000 0.000
#> SRR2087297 1 0.482 0.922 0.896 0.104
#> SRR2087352 1 0.000 0.963 1.000 0.000
#> SRR2087339 1 0.000 0.963 1.000 0.000
#> SRR2087286 1 0.482 0.922 0.896 0.104
#> SRR2087355 1 0.000 0.963 1.000 0.000
#> SRR2087331 1 0.000 0.963 1.000 0.000
#> SRR2087328 1 0.000 0.963 1.000 0.000
#> SRR2087321 2 0.469 1.000 0.100 0.900
#> SRR2087310 2 0.469 1.000 0.100 0.900
#> SRR2087341 1 0.000 0.963 1.000 0.000
#> SRR2087340 1 0.000 0.963 1.000 0.000
#> SRR2087283 1 0.482 0.922 0.896 0.104
#> SRR2087296 1 0.482 0.922 0.896 0.104
#> SRR2087337 1 0.000 0.963 1.000 0.000
#> SRR2087316 2 0.469 1.000 0.100 0.900
#> SRR2087325 2 0.469 1.000 0.100 0.900
#> SRR2087287 1 0.482 0.922 0.896 0.104
#> SRR2087289 1 0.482 0.922 0.896 0.104
#> SRR2087311 2 0.469 1.000 0.100 0.900
#> SRR2087324 2 0.469 1.000 0.100 0.900
#> SRR2087305 1 0.482 0.922 0.896 0.104
#> SRR2087282 1 0.482 0.922 0.896 0.104
#> SRR2087285 1 0.482 0.922 0.896 0.104
#> SRR2087290 1 0.482 0.922 0.896 0.104
#> SRR2087293 1 0.482 0.922 0.896 0.104
#> SRR2087329 1 0.000 0.963 1.000 0.000
#> SRR2087366 1 0.000 0.963 1.000 0.000
#> SRR2087300 1 0.482 0.922 0.896 0.104
#> SRR2087284 1 0.482 0.922 0.896 0.104
#> SRR2087303 1 0.482 0.922 0.896 0.104
#> SRR2087351 1 0.000 0.963 1.000 0.000
#> SRR2087302 1 0.482 0.922 0.896 0.104
#> SRR2087304 1 0.482 0.922 0.896 0.104
#> SRR2087298 1 0.482 0.922 0.896 0.104
#> SRR2087320 2 0.469 1.000 0.100 0.900
#> SRR2087308 2 0.469 1.000 0.100 0.900
#> SRR2087295 1 0.482 0.922 0.896 0.104
#> SRR2087292 1 0.482 0.922 0.896 0.104
#> SRR2087291 1 0.482 0.922 0.896 0.104
#> SRR2087294 1 0.482 0.922 0.896 0.104
#> SRR2087299 1 0.482 0.922 0.896 0.104
#> SRR2087288 1 0.482 0.922 0.896 0.104
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0 1 1 0 0
#> SRR2087307 1 0 1 1 0 0
#> SRR2087359 3 0 1 0 0 1
#> SRR2087373 3 0 1 0 0 1
#> SRR2087363 3 0 1 0 0 1
#> SRR2087317 1 0 1 1 0 0
#> SRR2087313 1 0 1 1 0 0
#> SRR2087360 3 0 1 0 0 1
#> SRR2087375 3 0 1 0 0 1
#> SRR2087349 3 0 1 0 0 1
#> SRR2087326 3 0 1 0 0 1
#> SRR2087306 1 0 1 1 0 0
#> SRR2087347 3 0 1 0 0 1
#> SRR2087327 3 0 1 0 0 1
#> SRR2087318 1 0 1 1 0 0
#> SRR2087350 3 0 1 0 0 1
#> SRR2087309 1 0 1 1 0 0
#> SRR2087344 3 0 1 0 0 1
#> SRR2087364 3 0 1 0 0 1
#> SRR2087332 3 0 1 0 0 1
#> SRR2087336 3 0 1 0 0 1
#> SRR2087348 3 0 1 0 0 1
#> SRR2087353 3 0 1 0 0 1
#> SRR2087343 3 0 1 0 0 1
#> SRR2087322 1 0 1 1 0 0
#> SRR2087335 3 0 1 0 0 1
#> SRR2087362 3 0 1 0 0 1
#> SRR2087374 3 0 1 0 0 1
#> SRR2087346 3 0 1 0 0 1
#> SRR2087345 3 0 1 0 0 1
#> SRR2087358 3 0 1 0 0 1
#> SRR2087334 3 0 1 0 0 1
#> SRR2087323 1 0 1 1 0 0
#> SRR2087330 3 0 1 0 0 1
#> SRR2087354 3 0 1 0 0 1
#> SRR2087342 3 0 1 0 0 1
#> SRR2087369 3 0 1 0 0 1
#> SRR2087371 3 0 1 0 0 1
#> SRR2087361 3 0 1 0 0 1
#> SRR2087367 3 0 1 0 0 1
#> SRR2087301 2 0 1 0 1 0
#> SRR2087333 3 0 1 0 0 1
#> SRR2087356 3 0 1 0 0 1
#> SRR2087370 3 0 1 0 0 1
#> SRR2087312 1 0 1 1 0 0
#> SRR2087338 3 0 1 0 0 1
#> SRR2087365 3 0 1 0 0 1
#> SRR2087319 1 0 1 1 0 0
#> SRR2087368 3 0 1 0 0 1
#> SRR2087315 1 0 1 1 0 0
#> SRR2087372 3 0 1 0 0 1
#> SRR2087357 3 0 1 0 0 1
#> SRR2087297 2 0 1 0 1 0
#> SRR2087352 3 0 1 0 0 1
#> SRR2087339 3 0 1 0 0 1
#> SRR2087286 2 0 1 0 1 0
#> SRR2087355 3 0 1 0 0 1
#> SRR2087331 3 0 1 0 0 1
#> SRR2087328 3 0 1 0 0 1
#> SRR2087321 1 0 1 1 0 0
#> SRR2087310 1 0 1 1 0 0
#> SRR2087341 3 0 1 0 0 1
#> SRR2087340 3 0 1 0 0 1
#> SRR2087283 2 0 1 0 1 0
#> SRR2087296 2 0 1 0 1 0
#> SRR2087337 3 0 1 0 0 1
#> SRR2087316 1 0 1 1 0 0
#> SRR2087325 1 0 1 1 0 0
#> SRR2087287 2 0 1 0 1 0
#> SRR2087289 2 0 1 0 1 0
#> SRR2087311 1 0 1 1 0 0
#> SRR2087324 1 0 1 1 0 0
#> SRR2087305 2 0 1 0 1 0
#> SRR2087282 2 0 1 0 1 0
#> SRR2087285 2 0 1 0 1 0
#> SRR2087290 2 0 1 0 1 0
#> SRR2087293 2 0 1 0 1 0
#> SRR2087329 3 0 1 0 0 1
#> SRR2087366 3 0 1 0 0 1
#> SRR2087300 2 0 1 0 1 0
#> SRR2087284 2 0 1 0 1 0
#> SRR2087303 2 0 1 0 1 0
#> SRR2087351 3 0 1 0 0 1
#> SRR2087302 2 0 1 0 1 0
#> SRR2087304 2 0 1 0 1 0
#> SRR2087298 2 0 1 0 1 0
#> SRR2087320 1 0 1 1 0 0
#> SRR2087308 1 0 1 1 0 0
#> SRR2087295 2 0 1 0 1 0
#> SRR2087292 2 0 1 0 1 0
#> SRR2087291 2 0 1 0 1 0
#> SRR2087294 2 0 1 0 1 0
#> SRR2087299 2 0 1 0 1 0
#> SRR2087288 2 0 1 0 1 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.427 1.000 0 0 0 0.444 0.556
#> SRR2087307 4 0.427 0.130 0 0 0 0.556 0.444
#> SRR2087359 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.405 -0.282 0 0 0 0.644 0.356
#> SRR2087313 4 0.405 -0.282 0 0 0 0.644 0.356
#> SRR2087360 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087306 5 0.427 1.000 0 0 0 0.444 0.556
#> SRR2087347 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.405 -0.282 0 0 0 0.644 0.356
#> SRR2087350 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.405 -0.282 0 0 0 0.644 0.356
#> SRR2087344 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087335 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087330 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087338 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087319 5 0.427 1.000 0 0 0 0.444 0.556
#> SRR2087368 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.405 -0.282 0 0 0 0.644 0.356
#> SRR2087372 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087310 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087341 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087325 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087287 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087324 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087305 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087308 4 0.000 0.715 0 0 0 1.000 0.000
#> SRR2087295 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.000 1.000 0 1 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
#> SRR2087314 6 0.000 0.769 0 0 0 0.000 0.000 1.0
#> SRR2087307 5 0.000 0.000 0 0 0 0.000 1.000 0.0
#> SRR2087359 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087373 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087363 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087317 6 0.279 0.871 0 0 0 0.200 0.000 0.8
#> SRR2087313 6 0.279 0.871 0 0 0 0.200 0.000 0.8
#> SRR2087360 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087375 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087349 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087326 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087306 6 0.000 0.769 0 0 0 0.000 0.000 1.0
#> SRR2087347 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087327 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087318 6 0.279 0.871 0 0 0 0.200 0.000 0.8
#> SRR2087350 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087309 6 0.279 0.871 0 0 0 0.200 0.000 0.8
#> SRR2087344 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087364 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087332 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087336 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087348 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087353 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087343 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087322 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087335 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087362 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087374 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087346 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087345 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087358 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087334 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087323 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087330 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087354 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087342 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087369 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087371 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087361 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087367 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087301 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087333 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087356 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087370 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087312 4 0.026 0.991 0 0 0 0.992 0.008 0.0
#> SRR2087338 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087365 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087319 6 0.000 0.769 0 0 0 0.000 0.000 1.0
#> SRR2087368 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087315 6 0.279 0.871 0 0 0 0.200 0.000 0.8
#> SRR2087372 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087357 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087297 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087352 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087339 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087286 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087355 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087331 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087328 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087321 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087310 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087341 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087340 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087283 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087296 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087337 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087316 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087325 4 0.026 0.991 0 0 0 0.992 0.008 0.0
#> SRR2087287 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087289 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087311 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087324 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087305 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087282 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087285 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087290 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087293 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087329 1 0.000 1.000 1 0 0 0.000 0.000 0.0
#> SRR2087366 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087300 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087284 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087303 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087351 3 0.000 1.000 0 0 1 0.000 0.000 0.0
#> SRR2087302 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087304 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087298 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087320 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087308 4 0.000 0.998 0 0 0 1.000 0.000 0.0
#> SRR2087295 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087292 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087291 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087294 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087299 2 0.000 1.000 0 1 0 0.000 0.000 0.0
#> SRR2087288 2 0.000 1.000 0 1 0 0.000 0.000 0.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["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 16723 rows and 94 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 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.244 0.525 0.691 0.4118 0.616 0.616
#> 3 3 0.244 0.819 0.776 0.4698 0.771 0.628
#> 4 4 0.793 0.949 0.814 0.1543 0.857 0.630
#> 5 5 0.723 0.901 0.837 0.0871 1.000 1.000
#> 6 6 0.854 0.811 0.801 0.0522 0.971 0.880
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
#> SRR2087314 1 0.998 -0.037 0.528 0.472
#> SRR2087307 1 0.998 -0.037 0.528 0.472
#> SRR2087359 1 0.994 0.508 0.544 0.456
#> SRR2087373 1 0.994 0.508 0.544 0.456
#> SRR2087363 1 0.994 0.508 0.544 0.456
#> SRR2087317 1 0.998 -0.037 0.528 0.472
#> SRR2087313 1 0.998 -0.037 0.528 0.472
#> SRR2087360 1 0.994 0.508 0.544 0.456
#> SRR2087375 1 0.994 0.508 0.544 0.456
#> SRR2087349 1 0.955 0.534 0.624 0.376
#> SRR2087326 1 0.955 0.534 0.624 0.376
#> SRR2087306 1 0.998 -0.037 0.528 0.472
#> SRR2087347 1 0.955 0.534 0.624 0.376
#> SRR2087327 1 0.955 0.534 0.624 0.376
#> SRR2087318 1 0.998 -0.037 0.528 0.472
#> SRR2087350 1 0.955 0.534 0.624 0.376
#> SRR2087309 1 0.998 -0.037 0.528 0.472
#> SRR2087344 1 0.955 0.534 0.624 0.376
#> SRR2087364 1 0.994 0.508 0.544 0.456
#> SRR2087332 1 0.955 0.534 0.624 0.376
#> SRR2087336 1 0.955 0.534 0.624 0.376
#> SRR2087348 1 0.955 0.534 0.624 0.376
#> SRR2087353 1 0.994 0.508 0.544 0.456
#> SRR2087343 1 0.955 0.534 0.624 0.376
#> SRR2087322 1 0.998 -0.037 0.528 0.472
#> SRR2087335 1 0.955 0.534 0.624 0.376
#> SRR2087362 1 0.994 0.508 0.544 0.456
#> SRR2087374 1 0.994 0.508 0.544 0.456
#> SRR2087346 1 0.955 0.534 0.624 0.376
#> SRR2087345 1 0.955 0.534 0.624 0.376
#> SRR2087358 1 0.994 0.508 0.544 0.456
#> SRR2087334 1 0.955 0.534 0.624 0.376
#> SRR2087323 1 0.998 -0.037 0.528 0.472
#> SRR2087330 1 0.955 0.534 0.624 0.376
#> SRR2087354 1 0.994 0.508 0.544 0.456
#> SRR2087342 1 0.955 0.534 0.624 0.376
#> SRR2087369 1 0.994 0.508 0.544 0.456
#> SRR2087371 1 0.994 0.508 0.544 0.456
#> SRR2087361 1 0.994 0.508 0.544 0.456
#> SRR2087367 1 0.994 0.508 0.544 0.456
#> SRR2087301 2 0.000 1.000 0.000 1.000
#> SRR2087333 1 0.955 0.534 0.624 0.376
#> SRR2087356 1 0.994 0.508 0.544 0.456
#> SRR2087370 1 0.994 0.508 0.544 0.456
#> SRR2087312 1 0.998 -0.037 0.528 0.472
#> SRR2087338 1 0.955 0.534 0.624 0.376
#> SRR2087365 1 0.994 0.508 0.544 0.456
#> SRR2087319 1 0.998 -0.037 0.528 0.472
#> SRR2087368 1 0.994 0.508 0.544 0.456
#> SRR2087315 1 0.998 -0.037 0.528 0.472
#> SRR2087372 1 0.994 0.508 0.544 0.456
#> SRR2087357 1 0.994 0.508 0.544 0.456
#> SRR2087297 2 0.000 1.000 0.000 1.000
#> SRR2087352 1 0.994 0.508 0.544 0.456
#> SRR2087339 1 0.955 0.534 0.624 0.376
#> SRR2087286 2 0.000 1.000 0.000 1.000
#> SRR2087355 1 0.994 0.508 0.544 0.456
#> SRR2087331 1 0.955 0.534 0.624 0.376
#> SRR2087328 1 0.955 0.534 0.624 0.376
#> SRR2087321 1 0.998 -0.037 0.528 0.472
#> SRR2087310 1 0.998 -0.037 0.528 0.472
#> SRR2087341 1 0.955 0.534 0.624 0.376
#> SRR2087340 1 0.955 0.534 0.624 0.376
#> SRR2087283 2 0.000 1.000 0.000 1.000
#> SRR2087296 2 0.000 1.000 0.000 1.000
#> SRR2087337 1 0.955 0.534 0.624 0.376
#> SRR2087316 1 0.998 -0.037 0.528 0.472
#> SRR2087325 1 0.998 -0.037 0.528 0.472
#> SRR2087287 2 0.000 1.000 0.000 1.000
#> SRR2087289 2 0.000 1.000 0.000 1.000
#> SRR2087311 1 0.998 -0.037 0.528 0.472
#> SRR2087324 1 0.998 -0.037 0.528 0.472
#> SRR2087305 2 0.000 1.000 0.000 1.000
#> SRR2087282 2 0.000 1.000 0.000 1.000
#> SRR2087285 2 0.000 1.000 0.000 1.000
#> SRR2087290 2 0.000 1.000 0.000 1.000
#> SRR2087293 2 0.000 1.000 0.000 1.000
#> SRR2087329 1 0.955 0.534 0.624 0.376
#> SRR2087366 1 0.994 0.508 0.544 0.456
#> SRR2087300 2 0.000 1.000 0.000 1.000
#> SRR2087284 2 0.000 1.000 0.000 1.000
#> SRR2087303 2 0.000 1.000 0.000 1.000
#> SRR2087351 1 0.994 0.508 0.544 0.456
#> SRR2087302 2 0.000 1.000 0.000 1.000
#> SRR2087304 2 0.000 1.000 0.000 1.000
#> SRR2087298 2 0.000 1.000 0.000 1.000
#> SRR2087320 1 0.998 -0.037 0.528 0.472
#> SRR2087308 1 0.998 -0.037 0.528 0.472
#> SRR2087295 2 0.000 1.000 0.000 1.000
#> SRR2087292 2 0.000 1.000 0.000 1.000
#> SRR2087291 2 0.000 1.000 0.000 1.000
#> SRR2087294 2 0.000 1.000 0.000 1.000
#> SRR2087299 2 0.000 1.000 0.000 1.000
#> SRR2087288 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
#> SRR2087314 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087307 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087359 3 0.5965 0.674 0.100 0.108 0.792
#> SRR2087373 3 0.5965 0.674 0.100 0.108 0.792
#> SRR2087363 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087317 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087313 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087360 3 0.5965 0.674 0.100 0.108 0.792
#> SRR2087375 3 0.6037 0.673 0.100 0.112 0.788
#> SRR2087349 3 0.7983 0.669 0.108 0.256 0.636
#> SRR2087326 3 0.7949 0.669 0.108 0.252 0.640
#> SRR2087306 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087347 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087327 3 0.7983 0.669 0.108 0.256 0.636
#> SRR2087318 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087350 3 0.7949 0.669 0.108 0.252 0.640
#> SRR2087309 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087344 3 0.7844 0.671 0.108 0.240 0.652
#> SRR2087364 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087332 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087336 3 0.7949 0.669 0.108 0.252 0.640
#> SRR2087348 3 0.7844 0.671 0.108 0.240 0.652
#> SRR2087353 3 0.5965 0.674 0.100 0.108 0.792
#> SRR2087343 3 0.7844 0.671 0.108 0.240 0.652
#> SRR2087322 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087335 3 0.7844 0.671 0.108 0.240 0.652
#> SRR2087362 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087374 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087346 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087345 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087358 3 0.6037 0.673 0.100 0.112 0.788
#> SRR2087334 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087323 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087330 3 0.7844 0.671 0.108 0.240 0.652
#> SRR2087354 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087342 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087369 3 0.5965 0.674 0.100 0.108 0.792
#> SRR2087371 3 0.5965 0.674 0.100 0.108 0.792
#> SRR2087361 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087367 3 0.6037 0.673 0.100 0.112 0.788
#> SRR2087301 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087333 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087356 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087370 3 0.5965 0.673 0.100 0.108 0.792
#> SRR2087312 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087338 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087365 3 0.5965 0.674 0.100 0.108 0.792
#> SRR2087319 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087368 3 0.5965 0.673 0.100 0.108 0.792
#> SRR2087315 1 0.2527 0.976 0.936 0.044 0.020
#> SRR2087372 3 0.5965 0.673 0.100 0.108 0.792
#> SRR2087357 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087297 2 0.6201 0.991 0.208 0.748 0.044
#> SRR2087352 3 0.5892 0.674 0.100 0.104 0.796
#> SRR2087339 3 0.7844 0.671 0.108 0.240 0.652
#> SRR2087286 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087355 3 0.5965 0.673 0.100 0.108 0.792
#> SRR2087331 3 0.7949 0.669 0.108 0.252 0.640
#> SRR2087328 3 0.7983 0.669 0.108 0.256 0.636
#> SRR2087321 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087310 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087341 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087340 3 0.7807 0.671 0.108 0.236 0.656
#> SRR2087283 2 0.6247 0.991 0.212 0.744 0.044
#> SRR2087296 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087337 3 0.7983 0.669 0.108 0.256 0.636
#> SRR2087316 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087325 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087287 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087289 2 0.6247 0.991 0.212 0.744 0.044
#> SRR2087311 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087324 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087305 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087282 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087285 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087290 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087293 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087329 3 0.7983 0.669 0.108 0.256 0.636
#> SRR2087366 3 0.6037 0.673 0.100 0.112 0.788
#> SRR2087300 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087284 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087303 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087351 3 0.5965 0.673 0.100 0.108 0.792
#> SRR2087302 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087304 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087298 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087320 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087308 1 0.0892 0.984 0.980 0.000 0.020
#> SRR2087295 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087292 2 0.6057 0.992 0.196 0.760 0.044
#> SRR2087291 2 0.6247 0.991 0.212 0.744 0.044
#> SRR2087294 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087299 2 0.6292 0.990 0.216 0.740 0.044
#> SRR2087288 2 0.6057 0.992 0.196 0.760 0.044
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087307 4 0.4241 0.934 0.016 0.056 0.088 0.840
#> SRR2087359 3 0.0657 0.987 0.004 0.000 0.984 0.012
#> SRR2087373 3 0.0657 0.987 0.004 0.000 0.984 0.012
#> SRR2087363 3 0.0524 0.988 0.004 0.000 0.988 0.008
#> SRR2087317 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087313 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087360 3 0.0657 0.987 0.004 0.000 0.984 0.012
#> SRR2087375 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087349 1 0.7215 0.945 0.604 0.048 0.272 0.076
#> SRR2087326 1 0.6794 0.948 0.628 0.036 0.272 0.064
#> SRR2087306 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087347 1 0.5255 0.962 0.696 0.028 0.272 0.004
#> SRR2087327 1 0.7215 0.945 0.604 0.048 0.272 0.076
#> SRR2087318 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087350 1 0.6794 0.948 0.628 0.036 0.272 0.064
#> SRR2087309 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087344 1 0.6555 0.955 0.640 0.060 0.272 0.028
#> SRR2087364 3 0.0524 0.988 0.004 0.000 0.988 0.008
#> SRR2087332 1 0.5078 0.962 0.700 0.028 0.272 0.000
#> SRR2087336 1 0.6794 0.948 0.628 0.036 0.272 0.064
#> SRR2087348 1 0.6643 0.955 0.636 0.060 0.272 0.032
#> SRR2087353 3 0.0657 0.987 0.004 0.000 0.984 0.012
#> SRR2087343 1 0.5856 0.960 0.672 0.044 0.272 0.012
#> SRR2087322 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087335 1 0.5967 0.960 0.668 0.044 0.272 0.016
#> SRR2087362 3 0.0000 0.989 0.000 0.000 1.000 0.000
#> SRR2087374 3 0.0000 0.989 0.000 0.000 1.000 0.000
#> SRR2087346 1 0.5078 0.962 0.700 0.028 0.272 0.000
#> SRR2087345 1 0.5078 0.962 0.700 0.028 0.272 0.000
#> SRR2087358 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087334 1 0.5078 0.962 0.700 0.028 0.272 0.000
#> SRR2087323 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087330 1 0.6393 0.954 0.648 0.056 0.272 0.024
#> SRR2087354 3 0.0000 0.989 0.000 0.000 1.000 0.000
#> SRR2087342 1 0.5255 0.961 0.696 0.028 0.272 0.004
#> SRR2087369 3 0.0657 0.987 0.004 0.000 0.984 0.012
#> SRR2087371 3 0.0524 0.988 0.004 0.000 0.988 0.008
#> SRR2087361 3 0.0524 0.988 0.004 0.000 0.988 0.008
#> SRR2087367 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087301 2 0.5044 0.930 0.108 0.792 0.084 0.016
#> SRR2087333 1 0.5078 0.962 0.700 0.028 0.272 0.000
#> SRR2087356 3 0.0000 0.989 0.000 0.000 1.000 0.000
#> SRR2087370 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087312 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087338 1 0.5078 0.962 0.700 0.028 0.272 0.000
#> SRR2087365 3 0.0657 0.987 0.004 0.000 0.984 0.012
#> SRR2087319 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087368 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087315 4 0.7343 0.903 0.156 0.104 0.088 0.652
#> SRR2087372 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087357 3 0.0376 0.989 0.004 0.000 0.992 0.004
#> SRR2087297 2 0.3442 0.929 0.028 0.876 0.084 0.012
#> SRR2087352 3 0.0000 0.989 0.000 0.000 1.000 0.000
#> SRR2087339 1 0.5692 0.961 0.680 0.036 0.272 0.012
#> SRR2087286 2 0.5044 0.930 0.108 0.792 0.084 0.016
#> SRR2087355 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087331 1 0.6794 0.948 0.628 0.036 0.272 0.064
#> SRR2087328 1 0.7403 0.942 0.592 0.052 0.272 0.084
#> SRR2087321 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087310 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087341 1 0.5887 0.958 0.672 0.040 0.272 0.016
#> SRR2087340 1 0.5776 0.957 0.676 0.040 0.272 0.012
#> SRR2087283 2 0.2960 0.928 0.020 0.892 0.084 0.004
#> SRR2087296 2 0.4928 0.931 0.108 0.796 0.084 0.012
#> SRR2087337 1 0.7227 0.946 0.604 0.052 0.272 0.072
#> SRR2087316 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087325 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087287 2 0.3881 0.916 0.028 0.860 0.084 0.028
#> SRR2087289 2 0.2542 0.925 0.000 0.904 0.084 0.012
#> SRR2087311 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087324 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087305 2 0.3881 0.916 0.028 0.860 0.084 0.028
#> SRR2087282 2 0.3881 0.916 0.028 0.860 0.084 0.028
#> SRR2087285 2 0.3881 0.916 0.028 0.860 0.084 0.028
#> SRR2087290 2 0.5044 0.930 0.108 0.792 0.084 0.016
#> SRR2087293 2 0.5044 0.930 0.108 0.792 0.084 0.016
#> SRR2087329 1 0.7215 0.945 0.604 0.048 0.272 0.076
#> SRR2087366 3 0.0672 0.987 0.008 0.000 0.984 0.008
#> SRR2087300 2 0.5044 0.930 0.108 0.792 0.084 0.016
#> SRR2087284 2 0.3881 0.916 0.028 0.860 0.084 0.028
#> SRR2087303 2 0.5210 0.928 0.112 0.784 0.084 0.020
#> SRR2087351 3 0.0524 0.987 0.008 0.000 0.988 0.004
#> SRR2087302 2 0.5044 0.930 0.108 0.792 0.084 0.016
#> SRR2087304 2 0.5210 0.928 0.112 0.784 0.084 0.020
#> SRR2087298 2 0.5153 0.929 0.108 0.788 0.084 0.020
#> SRR2087320 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087308 4 0.4123 0.936 0.012 0.056 0.088 0.844
#> SRR2087295 2 0.3881 0.916 0.028 0.860 0.084 0.028
#> SRR2087292 2 0.5044 0.930 0.108 0.792 0.084 0.016
#> SRR2087291 2 0.2847 0.924 0.004 0.896 0.084 0.016
#> SRR2087294 2 0.3881 0.916 0.028 0.860 0.084 0.028
#> SRR2087299 2 0.4167 0.915 0.032 0.848 0.084 0.036
#> SRR2087288 2 0.5257 0.928 0.108 0.784 0.084 0.024
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.2700 0.864 0.004 0.020 0.068 0.896 NA
#> SRR2087307 4 0.5258 0.886 0.004 0.012 0.060 0.684 NA
#> SRR2087359 3 0.4583 0.941 0.140 0.000 0.748 0.000 NA
#> SRR2087373 3 0.4583 0.941 0.140 0.000 0.748 0.000 NA
#> SRR2087363 3 0.4326 0.943 0.140 0.000 0.776 0.004 NA
#> SRR2087317 4 0.2460 0.865 0.004 0.024 0.072 0.900 NA
#> SRR2087313 4 0.2367 0.866 0.004 0.020 0.072 0.904 NA
#> SRR2087360 3 0.4583 0.941 0.140 0.000 0.748 0.000 NA
#> SRR2087375 3 0.3932 0.944 0.140 0.000 0.796 0.000 NA
#> SRR2087349 1 0.3318 0.897 0.808 0.000 0.000 0.012 NA
#> SRR2087326 1 0.2890 0.901 0.836 0.000 0.000 0.004 NA
#> SRR2087306 4 0.2700 0.864 0.004 0.020 0.068 0.896 NA
#> SRR2087347 1 0.0404 0.933 0.988 0.000 0.000 0.000 NA
#> SRR2087327 1 0.3242 0.898 0.816 0.000 0.000 0.012 NA
#> SRR2087318 4 0.2460 0.865 0.004 0.024 0.072 0.900 NA
#> SRR2087350 1 0.2848 0.901 0.840 0.000 0.000 0.004 NA
#> SRR2087309 4 0.2460 0.865 0.004 0.024 0.072 0.900 NA
#> SRR2087344 1 0.2390 0.921 0.908 0.008 0.000 0.024 NA
#> SRR2087364 3 0.4326 0.943 0.140 0.000 0.776 0.004 NA
#> SRR2087332 1 0.0000 0.932 1.000 0.000 0.000 0.000 NA
#> SRR2087336 1 0.2890 0.901 0.836 0.000 0.000 0.004 NA
#> SRR2087348 1 0.2456 0.921 0.904 0.008 0.000 0.024 NA
#> SRR2087353 3 0.4541 0.942 0.140 0.000 0.760 0.004 NA
#> SRR2087343 1 0.0671 0.932 0.980 0.000 0.000 0.004 NA
#> SRR2087322 4 0.4809 0.906 0.004 0.012 0.052 0.736 NA
#> SRR2087335 1 0.1195 0.930 0.960 0.000 0.000 0.012 NA
#> SRR2087362 3 0.2833 0.952 0.140 0.000 0.852 0.004 NA
#> SRR2087374 3 0.2674 0.952 0.140 0.000 0.856 0.004 NA
#> SRR2087346 1 0.0162 0.932 0.996 0.000 0.000 0.004 NA
#> SRR2087345 1 0.0000 0.932 1.000 0.000 0.000 0.000 NA
#> SRR2087358 3 0.3932 0.944 0.140 0.000 0.796 0.000 NA
#> SRR2087334 1 0.0000 0.932 1.000 0.000 0.000 0.000 NA
#> SRR2087323 4 0.4579 0.907 0.004 0.008 0.036 0.736 NA
#> SRR2087330 1 0.2158 0.920 0.920 0.008 0.000 0.020 NA
#> SRR2087354 3 0.2833 0.952 0.140 0.000 0.852 0.004 NA
#> SRR2087342 1 0.0451 0.930 0.988 0.000 0.000 0.004 NA
#> SRR2087369 3 0.4738 0.940 0.140 0.000 0.744 0.004 NA
#> SRR2087371 3 0.4487 0.943 0.140 0.000 0.756 0.000 NA
#> SRR2087361 3 0.4326 0.943 0.140 0.000 0.776 0.004 NA
#> SRR2087367 3 0.3868 0.945 0.140 0.000 0.800 0.000 NA
#> SRR2087301 2 0.4661 0.860 0.004 0.704 0.032 0.004 NA
#> SRR2087333 1 0.0162 0.932 0.996 0.000 0.000 0.004 NA
#> SRR2087356 3 0.2516 0.952 0.140 0.000 0.860 0.000 NA
#> SRR2087370 3 0.3283 0.947 0.140 0.000 0.832 0.000 NA
#> SRR2087312 4 0.4906 0.905 0.004 0.012 0.056 0.728 NA
#> SRR2087338 1 0.0162 0.932 0.996 0.000 0.000 0.004 NA
#> SRR2087365 3 0.4382 0.943 0.140 0.000 0.772 0.004 NA
#> SRR2087319 4 0.2700 0.864 0.004 0.020 0.068 0.896 NA
#> SRR2087368 3 0.3803 0.945 0.140 0.000 0.804 0.000 NA
#> SRR2087315 4 0.2367 0.866 0.004 0.020 0.072 0.904 NA
#> SRR2087372 3 0.3366 0.947 0.140 0.000 0.828 0.000 NA
#> SRR2087357 3 0.3960 0.949 0.140 0.000 0.800 0.004 NA
#> SRR2087297 2 0.2536 0.857 0.004 0.900 0.052 0.000 NA
#> SRR2087352 3 0.2674 0.952 0.140 0.000 0.856 0.004 NA
#> SRR2087339 1 0.0798 0.931 0.976 0.000 0.000 0.008 NA
#> SRR2087286 2 0.4608 0.860 0.004 0.704 0.028 0.004 NA
#> SRR2087355 3 0.3283 0.947 0.140 0.000 0.832 0.000 NA
#> SRR2087331 1 0.2971 0.900 0.836 0.000 0.000 0.008 NA
#> SRR2087328 1 0.3391 0.895 0.800 0.000 0.000 0.012 NA
#> SRR2087321 4 0.4579 0.907 0.004 0.008 0.036 0.736 NA
#> SRR2087310 4 0.4579 0.907 0.004 0.008 0.036 0.736 NA
#> SRR2087341 1 0.1836 0.923 0.936 0.008 0.000 0.016 NA
#> SRR2087340 1 0.1756 0.922 0.940 0.008 0.000 0.016 NA
#> SRR2087283 2 0.2745 0.855 0.004 0.892 0.064 0.004 NA
#> SRR2087296 2 0.4673 0.861 0.004 0.716 0.052 0.000 NA
#> SRR2087337 1 0.3280 0.897 0.812 0.000 0.000 0.012 NA
#> SRR2087316 4 0.4579 0.907 0.004 0.008 0.036 0.736 NA
#> SRR2087325 4 0.4906 0.905 0.004 0.012 0.056 0.728 NA
#> SRR2087287 2 0.3327 0.822 0.004 0.852 0.060 0.000 NA
#> SRR2087289 2 0.1924 0.852 0.004 0.924 0.064 0.000 NA
#> SRR2087311 4 0.4579 0.907 0.004 0.008 0.036 0.736 NA
#> SRR2087324 4 0.4809 0.906 0.004 0.012 0.052 0.736 NA
#> SRR2087305 2 0.3517 0.824 0.004 0.840 0.072 0.000 NA
#> SRR2087282 2 0.3327 0.822 0.004 0.852 0.060 0.000 NA
#> SRR2087285 2 0.3191 0.823 0.004 0.860 0.052 0.000 NA
#> SRR2087290 2 0.4608 0.860 0.004 0.704 0.028 0.004 NA
#> SRR2087293 2 0.4608 0.860 0.004 0.704 0.028 0.004 NA
#> SRR2087329 1 0.3318 0.897 0.808 0.000 0.000 0.012 NA
#> SRR2087366 3 0.3932 0.944 0.140 0.000 0.796 0.000 NA
#> SRR2087300 2 0.4737 0.861 0.004 0.700 0.036 0.004 NA
#> SRR2087284 2 0.3418 0.823 0.004 0.852 0.056 0.004 NA
#> SRR2087303 2 0.4513 0.857 0.004 0.688 0.024 0.000 NA
#> SRR2087351 3 0.3366 0.947 0.140 0.000 0.828 0.000 NA
#> SRR2087302 2 0.4372 0.861 0.004 0.712 0.024 0.000 NA
#> SRR2087304 2 0.4703 0.857 0.004 0.688 0.028 0.004 NA
#> SRR2087298 2 0.4903 0.859 0.004 0.696 0.040 0.008 NA
#> SRR2087320 4 0.4579 0.907 0.004 0.008 0.036 0.736 NA
#> SRR2087308 4 0.4579 0.907 0.004 0.008 0.036 0.736 NA
#> SRR2087295 2 0.3327 0.822 0.004 0.852 0.060 0.000 NA
#> SRR2087292 2 0.4421 0.860 0.004 0.704 0.024 0.000 NA
#> SRR2087291 2 0.1638 0.850 0.004 0.932 0.064 0.000 NA
#> SRR2087294 2 0.3260 0.822 0.004 0.856 0.056 0.000 NA
#> SRR2087299 2 0.3427 0.820 0.004 0.844 0.056 0.000 NA
#> SRR2087288 2 0.4899 0.856 0.004 0.680 0.032 0.008 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 4 0.4567 0.789 0.004 0.000 0.008 0.612 NA 0.024
#> SRR2087307 4 0.1812 0.853 0.008 0.000 0.008 0.932 NA 0.040
#> SRR2087359 3 0.3911 0.878 0.000 0.004 0.760 0.000 NA 0.056
#> SRR2087373 3 0.4005 0.873 0.000 0.004 0.748 0.000 NA 0.056
#> SRR2087363 3 0.3123 0.884 0.000 0.000 0.824 0.000 NA 0.040
#> SRR2087317 4 0.3923 0.791 0.000 0.000 0.008 0.620 NA 0.000
#> SRR2087313 4 0.3899 0.793 0.000 0.000 0.008 0.628 NA 0.000
#> SRR2087360 3 0.3911 0.878 0.000 0.004 0.760 0.000 NA 0.056
#> SRR2087375 3 0.2798 0.887 0.000 0.000 0.852 0.000 NA 0.036
#> SRR2087349 1 0.5710 0.813 0.620 0.000 0.056 0.000 NA 0.224
#> SRR2087326 1 0.5684 0.816 0.640 0.000 0.056 0.004 NA 0.204
#> SRR2087306 4 0.4567 0.789 0.004 0.000 0.008 0.612 NA 0.024
#> SRR2087347 1 0.1964 0.870 0.920 0.004 0.056 0.000 NA 0.012
#> SRR2087327 1 0.5669 0.813 0.624 0.000 0.056 0.000 NA 0.224
#> SRR2087318 4 0.3899 0.793 0.000 0.000 0.008 0.628 NA 0.000
#> SRR2087350 1 0.5684 0.816 0.640 0.000 0.056 0.004 NA 0.204
#> SRR2087309 4 0.3923 0.791 0.000 0.000 0.008 0.620 NA 0.000
#> SRR2087344 1 0.4764 0.831 0.740 0.000 0.056 0.004 NA 0.064
#> SRR2087364 3 0.3123 0.884 0.000 0.000 0.824 0.000 NA 0.040
#> SRR2087332 1 0.1204 0.869 0.944 0.000 0.056 0.000 NA 0.000
#> SRR2087336 1 0.5684 0.816 0.640 0.000 0.056 0.004 NA 0.204
#> SRR2087348 1 0.4958 0.831 0.724 0.000 0.056 0.004 NA 0.076
#> SRR2087353 3 0.3612 0.878 0.000 0.000 0.780 0.000 NA 0.052
#> SRR2087343 1 0.1707 0.869 0.928 0.000 0.056 0.000 NA 0.012
#> SRR2087322 4 0.0862 0.863 0.000 0.004 0.008 0.972 NA 0.016
#> SRR2087335 1 0.2528 0.863 0.892 0.000 0.056 0.000 NA 0.024
#> SRR2087362 3 0.0291 0.902 0.000 0.000 0.992 0.000 NA 0.004
#> SRR2087374 3 0.0291 0.902 0.000 0.000 0.992 0.000 NA 0.004
#> SRR2087346 1 0.1204 0.869 0.944 0.000 0.056 0.000 NA 0.000
#> SRR2087345 1 0.1204 0.869 0.944 0.000 0.056 0.000 NA 0.000
#> SRR2087358 3 0.2798 0.888 0.000 0.000 0.852 0.000 NA 0.036
#> SRR2087334 1 0.1349 0.869 0.940 0.000 0.056 0.000 NA 0.000
#> SRR2087323 4 0.0665 0.863 0.000 0.004 0.008 0.980 NA 0.008
#> SRR2087330 1 0.4554 0.831 0.756 0.000 0.056 0.004 NA 0.052
#> SRR2087354 3 0.0291 0.902 0.000 0.000 0.992 0.000 NA 0.004
#> SRR2087342 1 0.2015 0.863 0.916 0.000 0.056 0.000 NA 0.012
#> SRR2087369 3 0.3803 0.875 0.000 0.000 0.760 0.000 NA 0.056
#> SRR2087371 3 0.3422 0.884 0.000 0.000 0.788 0.000 NA 0.036
#> SRR2087361 3 0.3123 0.884 0.000 0.000 0.824 0.000 NA 0.040
#> SRR2087367 3 0.2605 0.890 0.000 0.000 0.864 0.000 NA 0.028
#> SRR2087301 2 0.0665 0.790 0.004 0.980 0.008 0.000 NA 0.000
#> SRR2087333 1 0.1204 0.869 0.944 0.000 0.056 0.000 NA 0.000
#> SRR2087356 3 0.0000 0.902 0.000 0.000 1.000 0.000 NA 0.000
#> SRR2087370 3 0.1657 0.890 0.000 0.000 0.928 0.000 NA 0.016
#> SRR2087312 4 0.1149 0.862 0.000 0.000 0.008 0.960 NA 0.024
#> SRR2087338 1 0.1204 0.869 0.944 0.000 0.056 0.000 NA 0.000
#> SRR2087365 3 0.3445 0.881 0.000 0.000 0.796 0.000 NA 0.048
#> SRR2087319 4 0.4567 0.789 0.004 0.000 0.008 0.612 NA 0.024
#> SRR2087368 3 0.2350 0.888 0.000 0.000 0.880 0.000 NA 0.020
#> SRR2087315 4 0.3899 0.793 0.000 0.000 0.008 0.628 NA 0.000
#> SRR2087372 3 0.1719 0.890 0.000 0.000 0.924 0.000 NA 0.016
#> SRR2087357 3 0.1967 0.897 0.000 0.000 0.904 0.000 NA 0.012
#> SRR2087297 2 0.4567 0.270 0.012 0.712 0.008 0.000 NA 0.216
#> SRR2087352 3 0.0146 0.901 0.000 0.000 0.996 0.000 NA 0.000
#> SRR2087339 1 0.1563 0.869 0.932 0.000 0.056 0.000 NA 0.012
#> SRR2087286 2 0.0551 0.790 0.004 0.984 0.008 0.000 NA 0.000
#> SRR2087355 3 0.1563 0.890 0.000 0.000 0.932 0.000 NA 0.012
#> SRR2087331 1 0.5751 0.814 0.632 0.000 0.056 0.004 NA 0.208
#> SRR2087328 1 0.5857 0.807 0.596 0.000 0.056 0.000 NA 0.244
#> SRR2087321 4 0.0260 0.864 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2087310 4 0.0260 0.864 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2087341 1 0.4693 0.835 0.752 0.004 0.056 0.004 NA 0.052
#> SRR2087340 1 0.4366 0.832 0.768 0.000 0.056 0.004 NA 0.040
#> SRR2087283 2 0.5227 -0.313 0.012 0.592 0.008 0.000 NA 0.328
#> SRR2087296 2 0.1692 0.766 0.012 0.932 0.008 0.000 NA 0.000
#> SRR2087337 1 0.5767 0.812 0.616 0.000 0.056 0.000 NA 0.220
#> SRR2087316 4 0.0260 0.864 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2087325 4 0.1149 0.862 0.000 0.000 0.008 0.960 NA 0.024
#> SRR2087287 6 0.4667 0.961 0.008 0.416 0.008 0.000 NA 0.552
#> SRR2087289 2 0.5388 -0.261 0.016 0.596 0.008 0.000 NA 0.308
#> SRR2087311 4 0.0405 0.864 0.000 0.000 0.008 0.988 NA 0.000
#> SRR2087324 4 0.0806 0.863 0.000 0.000 0.008 0.972 NA 0.020
#> SRR2087305 6 0.5213 0.911 0.012 0.416 0.008 0.000 NA 0.520
#> SRR2087282 6 0.4393 0.970 0.004 0.416 0.008 0.000 NA 0.564
#> SRR2087285 6 0.4393 0.969 0.004 0.416 0.008 0.000 NA 0.564
#> SRR2087290 2 0.0551 0.790 0.004 0.984 0.008 0.000 NA 0.000
#> SRR2087293 2 0.0551 0.790 0.004 0.984 0.008 0.000 NA 0.000
#> SRR2087329 1 0.5710 0.813 0.620 0.000 0.056 0.000 NA 0.224
#> SRR2087366 3 0.2901 0.885 0.000 0.000 0.840 0.000 NA 0.032
#> SRR2087300 2 0.1592 0.782 0.032 0.940 0.008 0.000 NA 0.000
#> SRR2087284 6 0.4393 0.969 0.004 0.416 0.008 0.000 NA 0.564
#> SRR2087303 2 0.1608 0.779 0.020 0.944 0.008 0.000 NA 0.008
#> SRR2087351 3 0.1719 0.890 0.000 0.000 0.924 0.000 NA 0.016
#> SRR2087302 2 0.1078 0.788 0.016 0.964 0.008 0.000 NA 0.000
#> SRR2087304 2 0.1520 0.779 0.016 0.948 0.008 0.000 NA 0.008
#> SRR2087298 2 0.3274 0.731 0.044 0.852 0.008 0.000 NA 0.020
#> SRR2087320 4 0.0405 0.864 0.000 0.004 0.008 0.988 NA 0.000
#> SRR2087308 4 0.0260 0.864 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2087295 6 0.4667 0.961 0.008 0.416 0.008 0.000 NA 0.552
#> SRR2087292 2 0.0520 0.790 0.008 0.984 0.008 0.000 NA 0.000
#> SRR2087291 2 0.5443 -0.337 0.016 0.580 0.008 0.000 NA 0.324
#> SRR2087294 6 0.4158 0.970 0.004 0.416 0.008 0.000 NA 0.572
#> SRR2087299 6 0.4277 0.963 0.004 0.408 0.008 0.000 NA 0.576
#> SRR2087288 2 0.2506 0.752 0.036 0.896 0.008 0.000 NA 0.008
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16723 rows and 94 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.5038 0.497 0.497
#> 3 3 0.747 0.962 0.895 0.2746 0.857 0.712
#> 4 4 1.000 1.000 1.000 0.1779 0.890 0.690
#> 5 5 0.986 0.984 0.971 0.0264 0.978 0.910
#> 6 6 0.937 0.945 0.958 0.0166 0.997 0.989
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 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
#> SRR2087314 2 0 1 0 1
#> SRR2087307 2 0 1 0 1
#> SRR2087359 1 0 1 1 0
#> SRR2087373 1 0 1 1 0
#> SRR2087363 1 0 1 1 0
#> SRR2087317 2 0 1 0 1
#> SRR2087313 2 0 1 0 1
#> SRR2087360 1 0 1 1 0
#> SRR2087375 1 0 1 1 0
#> SRR2087349 1 0 1 1 0
#> SRR2087326 1 0 1 1 0
#> SRR2087306 2 0 1 0 1
#> SRR2087347 1 0 1 1 0
#> SRR2087327 1 0 1 1 0
#> SRR2087318 2 0 1 0 1
#> SRR2087350 1 0 1 1 0
#> SRR2087309 2 0 1 0 1
#> SRR2087344 1 0 1 1 0
#> SRR2087364 1 0 1 1 0
#> SRR2087332 1 0 1 1 0
#> SRR2087336 1 0 1 1 0
#> SRR2087348 1 0 1 1 0
#> SRR2087353 1 0 1 1 0
#> SRR2087343 1 0 1 1 0
#> SRR2087322 2 0 1 0 1
#> SRR2087335 1 0 1 1 0
#> SRR2087362 1 0 1 1 0
#> SRR2087374 1 0 1 1 0
#> SRR2087346 1 0 1 1 0
#> SRR2087345 1 0 1 1 0
#> SRR2087358 1 0 1 1 0
#> SRR2087334 1 0 1 1 0
#> SRR2087323 2 0 1 0 1
#> SRR2087330 1 0 1 1 0
#> SRR2087354 1 0 1 1 0
#> SRR2087342 1 0 1 1 0
#> SRR2087369 1 0 1 1 0
#> SRR2087371 1 0 1 1 0
#> SRR2087361 1 0 1 1 0
#> SRR2087367 1 0 1 1 0
#> SRR2087301 2 0 1 0 1
#> SRR2087333 1 0 1 1 0
#> SRR2087356 1 0 1 1 0
#> SRR2087370 1 0 1 1 0
#> SRR2087312 2 0 1 0 1
#> SRR2087338 1 0 1 1 0
#> SRR2087365 1 0 1 1 0
#> SRR2087319 2 0 1 0 1
#> SRR2087368 1 0 1 1 0
#> SRR2087315 2 0 1 0 1
#> SRR2087372 1 0 1 1 0
#> SRR2087357 1 0 1 1 0
#> SRR2087297 2 0 1 0 1
#> SRR2087352 1 0 1 1 0
#> SRR2087339 1 0 1 1 0
#> SRR2087286 2 0 1 0 1
#> SRR2087355 1 0 1 1 0
#> SRR2087331 1 0 1 1 0
#> SRR2087328 1 0 1 1 0
#> SRR2087321 2 0 1 0 1
#> SRR2087310 2 0 1 0 1
#> SRR2087341 1 0 1 1 0
#> SRR2087340 1 0 1 1 0
#> SRR2087283 2 0 1 0 1
#> SRR2087296 2 0 1 0 1
#> SRR2087337 1 0 1 1 0
#> SRR2087316 2 0 1 0 1
#> SRR2087325 2 0 1 0 1
#> SRR2087287 2 0 1 0 1
#> SRR2087289 2 0 1 0 1
#> SRR2087311 2 0 1 0 1
#> SRR2087324 2 0 1 0 1
#> SRR2087305 2 0 1 0 1
#> SRR2087282 2 0 1 0 1
#> SRR2087285 2 0 1 0 1
#> SRR2087290 2 0 1 0 1
#> SRR2087293 2 0 1 0 1
#> SRR2087329 1 0 1 1 0
#> SRR2087366 1 0 1 1 0
#> SRR2087300 2 0 1 0 1
#> SRR2087284 2 0 1 0 1
#> SRR2087303 2 0 1 0 1
#> SRR2087351 1 0 1 1 0
#> SRR2087302 2 0 1 0 1
#> SRR2087304 2 0 1 0 1
#> SRR2087298 2 0 1 0 1
#> SRR2087320 2 0 1 0 1
#> SRR2087308 2 0 1 0 1
#> SRR2087295 2 0 1 0 1
#> SRR2087292 2 0 1 0 1
#> SRR2087291 2 0 1 0 1
#> SRR2087294 2 0 1 0 1
#> SRR2087299 2 0 1 0 1
#> SRR2087288 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087307 2 0.4555 0.700 0.000 0.800 0.200
#> SRR2087359 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087373 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087363 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087317 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087313 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087360 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087375 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087349 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087306 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087347 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087318 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087350 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087309 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087344 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087364 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087332 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087353 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087343 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087322 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087335 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087362 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087374 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087346 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087358 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087334 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087323 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087330 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087354 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087342 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087369 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087371 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087361 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087367 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087301 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087333 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087356 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087370 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087312 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087338 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087365 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087319 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087368 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087315 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087372 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087357 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087297 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087352 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087339 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087286 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087355 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087331 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087321 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087310 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087341 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087283 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087296 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087337 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087316 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087325 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087287 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087289 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087311 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087324 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087305 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087282 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087285 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087290 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087293 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087329 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087366 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087300 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087284 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087303 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087351 3 0.4062 1.000 0.164 0.000 0.836
#> SRR2087302 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087304 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087298 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087320 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087308 2 0.0237 0.916 0.000 0.996 0.004
#> SRR2087295 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087292 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087291 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087294 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087299 2 0.4062 0.932 0.000 0.836 0.164
#> SRR2087288 2 0.4062 0.932 0.000 0.836 0.164
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.0000 0.979 0.000 0.000 0 0.000 1.000
#> SRR2087307 4 0.1792 0.808 0.000 0.000 0 0.916 0.084
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087317 5 0.0404 0.982 0.000 0.000 0 0.012 0.988
#> SRR2087313 5 0.0963 0.969 0.000 0.000 0 0.036 0.964
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087349 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087326 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087306 5 0.0000 0.979 0.000 0.000 0 0.000 1.000
#> SRR2087347 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087327 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087318 5 0.0609 0.981 0.000 0.000 0 0.020 0.980
#> SRR2087350 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087309 5 0.0510 0.982 0.000 0.000 0 0.016 0.984
#> SRR2087344 1 0.0162 0.985 0.996 0.000 0 0.004 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087332 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087336 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087348 1 0.0162 0.985 0.996 0.000 0 0.004 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087343 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087322 4 0.3143 0.965 0.000 0.000 0 0.796 0.204
#> SRR2087335 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087346 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087345 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087334 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087323 4 0.3143 0.965 0.000 0.000 0 0.796 0.204
#> SRR2087330 1 0.0162 0.985 0.996 0.000 0 0.004 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087342 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087301 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087333 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087312 4 0.3242 0.968 0.000 0.000 0 0.784 0.216
#> SRR2087338 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087319 5 0.0000 0.979 0.000 0.000 0 0.000 1.000
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087315 5 0.0963 0.969 0.000 0.000 0 0.036 0.964
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087297 2 0.0290 0.990 0.000 0.992 0 0.008 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087339 1 0.0000 0.986 1.000 0.000 0 0.000 0.000
#> SRR2087286 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087331 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087328 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087321 4 0.3336 0.965 0.000 0.000 0 0.772 0.228
#> SRR2087310 4 0.3274 0.966 0.000 0.000 0 0.780 0.220
#> SRR2087341 1 0.0162 0.985 0.996 0.000 0 0.004 0.000
#> SRR2087340 1 0.0162 0.985 0.996 0.000 0 0.004 0.000
#> SRR2087283 2 0.0510 0.989 0.000 0.984 0 0.016 0.000
#> SRR2087296 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087337 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087316 4 0.3395 0.961 0.000 0.000 0 0.764 0.236
#> SRR2087325 4 0.3242 0.968 0.000 0.000 0 0.784 0.216
#> SRR2087287 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087289 2 0.0510 0.989 0.000 0.984 0 0.016 0.000
#> SRR2087311 4 0.3395 0.961 0.000 0.000 0 0.764 0.236
#> SRR2087324 4 0.3177 0.967 0.000 0.000 0 0.792 0.208
#> SRR2087305 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087282 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087285 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087290 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087293 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087329 1 0.1043 0.976 0.960 0.000 0 0.040 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087300 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087284 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087303 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087302 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087304 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087298 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087320 4 0.3177 0.967 0.000 0.000 0 0.792 0.208
#> SRR2087308 4 0.3395 0.961 0.000 0.000 0 0.764 0.236
#> SRR2087295 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087292 2 0.0000 0.990 0.000 1.000 0 0.000 0.000
#> SRR2087291 2 0.0510 0.989 0.000 0.984 0 0.016 0.000
#> SRR2087294 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087299 2 0.0794 0.986 0.000 0.972 0 0.028 0.000
#> SRR2087288 2 0.0000 0.990 0.000 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
#> SRR2087314 6 0.1075 0.960 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087307 5 0.4253 0.000 0.000 0.000 0.000 0.284 0.672 0.044
#> SRR2087359 3 0.0260 0.993 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087373 3 0.0363 0.993 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR2087363 3 0.0291 0.991 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR2087317 6 0.1267 0.964 0.000 0.000 0.000 0.060 0.000 0.940
#> SRR2087313 6 0.1863 0.952 0.000 0.000 0.000 0.104 0.000 0.896
#> SRR2087360 3 0.0260 0.993 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087375 3 0.0363 0.993 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR2087349 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087326 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087306 6 0.1075 0.960 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087347 1 0.0146 0.948 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2087327 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087318 6 0.1663 0.964 0.000 0.000 0.000 0.088 0.000 0.912
#> SRR2087350 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087309 6 0.1663 0.964 0.000 0.000 0.000 0.088 0.000 0.912
#> SRR2087344 1 0.0363 0.946 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR2087364 3 0.0291 0.991 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR2087332 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087336 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087348 1 0.0547 0.946 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR2087353 3 0.0508 0.991 0.000 0.000 0.984 0.000 0.012 0.004
#> SRR2087343 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087322 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087335 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087362 3 0.0000 0.994 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087374 3 0.0000 0.994 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087346 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087358 3 0.0363 0.993 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR2087334 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087323 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087330 1 0.0260 0.945 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR2087354 3 0.0000 0.994 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087342 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087369 3 0.0260 0.993 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087371 3 0.0146 0.994 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087361 3 0.0291 0.991 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR2087367 3 0.0363 0.993 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR2087301 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087333 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087356 3 0.0000 0.994 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087370 3 0.0146 0.994 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087312 4 0.0146 0.994 0.000 0.000 0.000 0.996 0.004 0.000
#> SRR2087338 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087365 3 0.0508 0.991 0.000 0.000 0.984 0.000 0.012 0.004
#> SRR2087319 6 0.1075 0.960 0.000 0.000 0.000 0.048 0.000 0.952
#> SRR2087368 3 0.0146 0.994 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087315 6 0.1863 0.952 0.000 0.000 0.000 0.104 0.000 0.896
#> SRR2087372 3 0.0146 0.994 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087357 3 0.0291 0.991 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR2087297 2 0.1204 0.927 0.000 0.944 0.000 0.000 0.056 0.000
#> SRR2087352 3 0.0000 0.994 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087339 1 0.0000 0.949 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087286 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087355 3 0.0146 0.994 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087331 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087328 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087321 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087310 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087341 1 0.0458 0.946 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR2087340 1 0.0260 0.945 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR2087283 2 0.1556 0.924 0.000 0.920 0.000 0.000 0.080 0.000
#> SRR2087296 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087337 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087316 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087325 4 0.0146 0.994 0.000 0.000 0.000 0.996 0.004 0.000
#> SRR2087287 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087289 2 0.1610 0.923 0.000 0.916 0.000 0.000 0.084 0.000
#> SRR2087311 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087324 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087305 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087282 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087285 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087290 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087293 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087329 1 0.2178 0.910 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087366 3 0.0363 0.993 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR2087300 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087284 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087303 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087351 3 0.0146 0.994 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087302 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087304 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087298 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087320 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087308 4 0.0000 0.999 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087295 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087292 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087291 2 0.1663 0.922 0.000 0.912 0.000 0.000 0.088 0.000
#> SRR2087294 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087299 2 0.2562 0.896 0.000 0.828 0.000 0.000 0.172 0.000
#> SRR2087288 2 0.0000 0.930 0.000 1.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16723 rows and 94 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.809 0.884 0.953 0.4386 0.553 0.553
#> 3 3 0.750 0.773 0.907 0.5051 0.732 0.533
#> 4 4 1.000 1.000 1.000 0.1458 0.859 0.605
#> 5 5 1.000 0.998 0.999 0.0290 0.978 0.910
#> 6 6 0.956 0.954 0.939 0.0365 0.965 0.841
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
#> SRR2087314 1 0.000 0.964 1.000 0.000
#> SRR2087307 1 0.000 0.964 1.000 0.000
#> SRR2087359 1 0.000 0.964 1.000 0.000
#> SRR2087373 1 0.000 0.964 1.000 0.000
#> SRR2087363 1 0.000 0.964 1.000 0.000
#> SRR2087317 1 0.494 0.854 0.892 0.108
#> SRR2087313 1 0.844 0.607 0.728 0.272
#> SRR2087360 1 0.000 0.964 1.000 0.000
#> SRR2087375 1 0.000 0.964 1.000 0.000
#> SRR2087349 1 0.000 0.964 1.000 0.000
#> SRR2087326 1 0.000 0.964 1.000 0.000
#> SRR2087306 1 0.000 0.964 1.000 0.000
#> SRR2087347 1 0.000 0.964 1.000 0.000
#> SRR2087327 1 0.000 0.964 1.000 0.000
#> SRR2087318 1 0.925 0.453 0.660 0.340
#> SRR2087350 1 0.000 0.964 1.000 0.000
#> SRR2087309 1 0.738 0.717 0.792 0.208
#> SRR2087344 1 0.000 0.964 1.000 0.000
#> SRR2087364 1 0.000 0.964 1.000 0.000
#> SRR2087332 1 0.000 0.964 1.000 0.000
#> SRR2087336 1 0.000 0.964 1.000 0.000
#> SRR2087348 1 0.000 0.964 1.000 0.000
#> SRR2087353 1 0.000 0.964 1.000 0.000
#> SRR2087343 1 0.000 0.964 1.000 0.000
#> SRR2087322 1 0.891 0.532 0.692 0.308
#> SRR2087335 1 0.000 0.964 1.000 0.000
#> SRR2087362 1 0.000 0.964 1.000 0.000
#> SRR2087374 1 0.000 0.964 1.000 0.000
#> SRR2087346 1 0.000 0.964 1.000 0.000
#> SRR2087345 1 0.000 0.964 1.000 0.000
#> SRR2087358 1 0.000 0.964 1.000 0.000
#> SRR2087334 1 0.000 0.964 1.000 0.000
#> SRR2087323 2 0.781 0.694 0.232 0.768
#> SRR2087330 1 0.000 0.964 1.000 0.000
#> SRR2087354 1 0.000 0.964 1.000 0.000
#> SRR2087342 1 0.000 0.964 1.000 0.000
#> SRR2087369 1 0.000 0.964 1.000 0.000
#> SRR2087371 1 0.000 0.964 1.000 0.000
#> SRR2087361 1 0.000 0.964 1.000 0.000
#> SRR2087367 1 0.000 0.964 1.000 0.000
#> SRR2087301 2 0.000 0.913 0.000 1.000
#> SRR2087333 1 0.000 0.964 1.000 0.000
#> SRR2087356 1 0.000 0.964 1.000 0.000
#> SRR2087370 1 0.000 0.964 1.000 0.000
#> SRR2087312 2 0.969 0.392 0.396 0.604
#> SRR2087338 1 0.000 0.964 1.000 0.000
#> SRR2087365 1 0.000 0.964 1.000 0.000
#> SRR2087319 1 0.000 0.964 1.000 0.000
#> SRR2087368 1 0.000 0.964 1.000 0.000
#> SRR2087315 1 0.973 0.271 0.596 0.404
#> SRR2087372 1 0.000 0.964 1.000 0.000
#> SRR2087357 1 0.000 0.964 1.000 0.000
#> SRR2087297 2 0.000 0.913 0.000 1.000
#> SRR2087352 1 0.000 0.964 1.000 0.000
#> SRR2087339 1 0.000 0.964 1.000 0.000
#> SRR2087286 2 0.000 0.913 0.000 1.000
#> SRR2087355 1 0.000 0.964 1.000 0.000
#> SRR2087331 1 0.000 0.964 1.000 0.000
#> SRR2087328 1 0.000 0.964 1.000 0.000
#> SRR2087321 2 0.996 0.189 0.464 0.536
#> SRR2087310 1 0.430 0.878 0.912 0.088
#> SRR2087341 1 0.000 0.964 1.000 0.000
#> SRR2087340 1 0.000 0.964 1.000 0.000
#> SRR2087283 2 0.000 0.913 0.000 1.000
#> SRR2087296 2 0.000 0.913 0.000 1.000
#> SRR2087337 1 0.000 0.964 1.000 0.000
#> SRR2087316 2 0.745 0.720 0.212 0.788
#> SRR2087325 1 0.184 0.939 0.972 0.028
#> SRR2087287 2 0.000 0.913 0.000 1.000
#> SRR2087289 2 0.000 0.913 0.000 1.000
#> SRR2087311 1 0.781 0.679 0.768 0.232
#> SRR2087324 2 0.987 0.290 0.432 0.568
#> SRR2087305 2 0.000 0.913 0.000 1.000
#> SRR2087282 2 0.000 0.913 0.000 1.000
#> SRR2087285 2 0.000 0.913 0.000 1.000
#> SRR2087290 2 0.000 0.913 0.000 1.000
#> SRR2087293 2 0.000 0.913 0.000 1.000
#> SRR2087329 1 0.000 0.964 1.000 0.000
#> SRR2087366 1 0.000 0.964 1.000 0.000
#> SRR2087300 2 0.000 0.913 0.000 1.000
#> SRR2087284 2 0.000 0.913 0.000 1.000
#> SRR2087303 2 0.000 0.913 0.000 1.000
#> SRR2087351 1 0.000 0.964 1.000 0.000
#> SRR2087302 2 0.000 0.913 0.000 1.000
#> SRR2087304 2 0.000 0.913 0.000 1.000
#> SRR2087298 2 0.000 0.913 0.000 1.000
#> SRR2087320 2 0.722 0.735 0.200 0.800
#> SRR2087308 2 0.998 0.148 0.476 0.524
#> SRR2087295 2 0.000 0.913 0.000 1.000
#> SRR2087292 2 0.000 0.913 0.000 1.000
#> SRR2087291 2 0.000 0.913 0.000 1.000
#> SRR2087294 2 0.000 0.913 0.000 1.000
#> SRR2087299 2 0.000 0.913 0.000 1.000
#> SRR2087288 2 0.000 0.913 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 3 0.630 0.02866 0.480 0.000 0.520
#> SRR2087307 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087359 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087373 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087363 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087317 1 0.866 0.13026 0.488 0.104 0.408
#> SRR2087313 1 0.973 -0.08797 0.400 0.376 0.224
#> SRR2087360 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087375 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087349 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087326 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087306 1 0.631 0.00428 0.508 0.000 0.492
#> SRR2087347 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087327 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087318 2 0.996 0.14414 0.312 0.376 0.312
#> SRR2087350 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087309 1 0.990 0.05988 0.404 0.288 0.308
#> SRR2087344 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087364 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087332 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087336 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087348 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087353 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087343 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087322 2 0.939 0.33839 0.304 0.496 0.200
#> SRR2087335 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087362 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087374 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087346 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087345 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087358 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087334 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087323 2 0.450 0.70458 0.000 0.804 0.196
#> SRR2087330 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087354 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087342 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087369 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087371 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087361 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087367 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087301 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087333 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087356 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087370 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087312 2 0.956 0.35966 0.232 0.480 0.288
#> SRR2087338 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087365 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087319 3 0.625 0.14509 0.444 0.000 0.556
#> SRR2087368 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087315 2 0.956 0.27636 0.324 0.464 0.212
#> SRR2087372 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087357 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087297 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087352 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087339 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087286 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087355 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087331 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087328 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087321 2 0.948 0.28420 0.328 0.472 0.200
#> SRR2087310 3 0.475 0.63768 0.000 0.216 0.784
#> SRR2087341 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087340 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087283 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087296 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087337 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087316 2 0.566 0.68512 0.028 0.772 0.200
#> SRR2087325 3 0.803 0.17896 0.392 0.068 0.540
#> SRR2087287 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087289 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087311 1 0.977 -0.08624 0.396 0.372 0.232
#> SRR2087324 2 0.930 0.38032 0.280 0.516 0.204
#> SRR2087305 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087282 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087285 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087290 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087293 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087329 1 0.000 0.89585 1.000 0.000 0.000
#> SRR2087366 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087300 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087284 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087303 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087351 3 0.000 0.93657 0.000 0.000 1.000
#> SRR2087302 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087304 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087298 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087320 2 0.455 0.70018 0.000 0.800 0.200
#> SRR2087308 2 0.950 0.31381 0.308 0.480 0.212
#> SRR2087295 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087292 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087291 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087294 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087299 2 0.000 0.86139 0.000 1.000 0.000
#> SRR2087288 2 0.000 0.86139 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.0000 0.997 0 0 0 0.000 1.000
#> SRR2087307 4 0.1732 0.914 0 0 0 0.920 0.080
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087317 5 0.0162 0.998 0 0 0 0.004 0.996
#> SRR2087313 5 0.0162 0.998 0 0 0 0.004 0.996
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087306 5 0.0000 0.997 0 0 0 0.000 1.000
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087318 5 0.0162 0.998 0 0 0 0.004 0.996
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087309 5 0.0162 0.998 0 0 0 0.004 0.996
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087319 5 0.0000 0.997 0 0 0 0.000 1.000
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087315 5 0.0162 0.998 0 0 0 0.004 0.996
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087310 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087325 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.0404 0.982 0 0 0 0.988 0.012
#> SRR2087324 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087308 4 0.0000 0.992 0 0 0 1.000 0.000
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 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
#> SRR2087314 6 0.2730 0.899 0.000 0.000 0 0.000 0.192 0.808
#> SRR2087307 4 0.1556 0.891 0.000 0.000 0 0.920 0.000 0.080
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087317 6 0.0000 0.939 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087313 6 0.0000 0.939 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087349 5 0.3371 0.991 0.292 0.000 0 0.000 0.708 0.000
#> SRR2087326 5 0.3371 0.991 0.292 0.000 0 0.000 0.708 0.000
#> SRR2087306 6 0.2730 0.899 0.000 0.000 0 0.000 0.192 0.808
#> SRR2087347 5 0.3464 0.977 0.312 0.000 0 0.000 0.688 0.000
#> SRR2087327 5 0.3371 0.991 0.292 0.000 0 0.000 0.708 0.000
#> SRR2087318 6 0.0000 0.939 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087350 5 0.3371 0.991 0.292 0.000 0 0.000 0.708 0.000
#> SRR2087309 6 0.0000 0.939 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087344 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087332 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087336 5 0.3371 0.991 0.292 0.000 0 0.000 0.708 0.000
#> SRR2087348 1 0.3817 -0.362 0.568 0.000 0 0.000 0.432 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087343 1 0.0713 0.914 0.972 0.000 0 0.000 0.028 0.000
#> SRR2087322 4 0.0000 0.945 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087335 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087346 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087334 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087323 4 0.0000 0.945 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087330 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087342 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087301 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087333 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087312 4 0.0000 0.945 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087338 1 0.0146 0.944 0.996 0.000 0 0.000 0.004 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087319 6 0.2730 0.899 0.000 0.000 0 0.000 0.192 0.808
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087315 6 0.0000 0.939 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087297 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087339 1 0.0146 0.944 0.996 0.000 0 0.000 0.004 0.000
#> SRR2087286 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087331 5 0.3464 0.977 0.312 0.000 0 0.000 0.688 0.000
#> SRR2087328 5 0.3371 0.991 0.292 0.000 0 0.000 0.708 0.000
#> SRR2087321 4 0.2164 0.936 0.000 0.000 0 0.900 0.032 0.068
#> SRR2087310 4 0.2384 0.928 0.000 0.000 0 0.884 0.032 0.084
#> SRR2087341 5 0.3464 0.977 0.312 0.000 0 0.000 0.688 0.000
#> SRR2087340 1 0.0000 0.948 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087283 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087296 2 0.1267 0.967 0.000 0.940 0 0.000 0.060 0.000
#> SRR2087337 5 0.3390 0.988 0.296 0.000 0 0.000 0.704 0.000
#> SRR2087316 4 0.2221 0.934 0.000 0.000 0 0.896 0.032 0.072
#> SRR2087325 4 0.0000 0.945 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087287 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087289 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087311 4 0.2680 0.911 0.000 0.000 0 0.860 0.032 0.108
#> SRR2087324 4 0.0000 0.945 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087305 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087282 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087285 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087290 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087293 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087329 5 0.3371 0.991 0.292 0.000 0 0.000 0.708 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087300 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087284 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087303 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087302 2 0.1075 0.968 0.000 0.952 0 0.000 0.048 0.000
#> SRR2087304 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087298 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087320 4 0.0790 0.944 0.000 0.000 0 0.968 0.032 0.000
#> SRR2087308 4 0.2164 0.936 0.000 0.000 0 0.900 0.032 0.068
#> SRR2087295 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087292 2 0.1387 0.965 0.000 0.932 0 0.000 0.068 0.000
#> SRR2087291 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087294 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087299 2 0.0000 0.973 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087288 2 0.1327 0.966 0.000 0.936 0 0.000 0.064 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 16723 rows and 94 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.974 0.975 0.50412 0.497 0.497
#> 3 3 0.633 0.878 0.870 0.27093 0.857 0.712
#> 4 4 1.000 1.000 1.000 0.18052 0.890 0.690
#> 5 5 0.987 0.971 0.990 0.00946 0.996 0.982
#> 6 6 0.987 0.941 0.978 0.01663 0.984 0.933
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
#> SRR2087314 2 0.2948 0.972 0.052 0.948
#> SRR2087307 2 0.2948 0.972 0.052 0.948
#> SRR2087359 1 0.0376 0.974 0.996 0.004
#> SRR2087373 1 0.0376 0.974 0.996 0.004
#> SRR2087363 1 0.0376 0.974 0.996 0.004
#> SRR2087317 2 0.2948 0.972 0.052 0.948
#> SRR2087313 2 0.2948 0.972 0.052 0.948
#> SRR2087360 1 0.0376 0.974 0.996 0.004
#> SRR2087375 1 0.0376 0.974 0.996 0.004
#> SRR2087349 1 0.2778 0.974 0.952 0.048
#> SRR2087326 1 0.2778 0.974 0.952 0.048
#> SRR2087306 2 0.2948 0.972 0.052 0.948
#> SRR2087347 1 0.2778 0.974 0.952 0.048
#> SRR2087327 1 0.2778 0.974 0.952 0.048
#> SRR2087318 2 0.2948 0.972 0.052 0.948
#> SRR2087350 1 0.2778 0.974 0.952 0.048
#> SRR2087309 2 0.2948 0.972 0.052 0.948
#> SRR2087344 1 0.2778 0.974 0.952 0.048
#> SRR2087364 1 0.0376 0.974 0.996 0.004
#> SRR2087332 1 0.2778 0.974 0.952 0.048
#> SRR2087336 1 0.2778 0.974 0.952 0.048
#> SRR2087348 1 0.2778 0.974 0.952 0.048
#> SRR2087353 1 0.0376 0.974 0.996 0.004
#> SRR2087343 1 0.2778 0.974 0.952 0.048
#> SRR2087322 2 0.2948 0.972 0.052 0.948
#> SRR2087335 1 0.2778 0.974 0.952 0.048
#> SRR2087362 1 0.0376 0.974 0.996 0.004
#> SRR2087374 1 0.0376 0.974 0.996 0.004
#> SRR2087346 1 0.2778 0.974 0.952 0.048
#> SRR2087345 1 0.2778 0.974 0.952 0.048
#> SRR2087358 1 0.0376 0.974 0.996 0.004
#> SRR2087334 1 0.2778 0.974 0.952 0.048
#> SRR2087323 2 0.2948 0.972 0.052 0.948
#> SRR2087330 1 0.2778 0.974 0.952 0.048
#> SRR2087354 1 0.0376 0.974 0.996 0.004
#> SRR2087342 1 0.2778 0.974 0.952 0.048
#> SRR2087369 1 0.0376 0.974 0.996 0.004
#> SRR2087371 1 0.0376 0.974 0.996 0.004
#> SRR2087361 1 0.0376 0.974 0.996 0.004
#> SRR2087367 1 0.0376 0.974 0.996 0.004
#> SRR2087301 2 0.0000 0.977 0.000 1.000
#> SRR2087333 1 0.2778 0.974 0.952 0.048
#> SRR2087356 1 0.0376 0.974 0.996 0.004
#> SRR2087370 1 0.0376 0.974 0.996 0.004
#> SRR2087312 2 0.2948 0.972 0.052 0.948
#> SRR2087338 1 0.2778 0.974 0.952 0.048
#> SRR2087365 1 0.0376 0.974 0.996 0.004
#> SRR2087319 2 0.2948 0.972 0.052 0.948
#> SRR2087368 1 0.0376 0.974 0.996 0.004
#> SRR2087315 2 0.2948 0.972 0.052 0.948
#> SRR2087372 1 0.0376 0.974 0.996 0.004
#> SRR2087357 1 0.0376 0.974 0.996 0.004
#> SRR2087297 2 0.0000 0.977 0.000 1.000
#> SRR2087352 1 0.0376 0.974 0.996 0.004
#> SRR2087339 1 0.2778 0.974 0.952 0.048
#> SRR2087286 2 0.0000 0.977 0.000 1.000
#> SRR2087355 1 0.0376 0.974 0.996 0.004
#> SRR2087331 1 0.2778 0.974 0.952 0.048
#> SRR2087328 1 0.2778 0.974 0.952 0.048
#> SRR2087321 2 0.2948 0.972 0.052 0.948
#> SRR2087310 2 0.2948 0.972 0.052 0.948
#> SRR2087341 1 0.2778 0.974 0.952 0.048
#> SRR2087340 1 0.2778 0.974 0.952 0.048
#> SRR2087283 2 0.0000 0.977 0.000 1.000
#> SRR2087296 2 0.0000 0.977 0.000 1.000
#> SRR2087337 1 0.2778 0.974 0.952 0.048
#> SRR2087316 2 0.2948 0.972 0.052 0.948
#> SRR2087325 2 0.2948 0.972 0.052 0.948
#> SRR2087287 2 0.0000 0.977 0.000 1.000
#> SRR2087289 2 0.0000 0.977 0.000 1.000
#> SRR2087311 2 0.2948 0.972 0.052 0.948
#> SRR2087324 2 0.2948 0.972 0.052 0.948
#> SRR2087305 2 0.0000 0.977 0.000 1.000
#> SRR2087282 2 0.0000 0.977 0.000 1.000
#> SRR2087285 2 0.0000 0.977 0.000 1.000
#> SRR2087290 2 0.0000 0.977 0.000 1.000
#> SRR2087293 2 0.0000 0.977 0.000 1.000
#> SRR2087329 1 0.2778 0.974 0.952 0.048
#> SRR2087366 1 0.0376 0.974 0.996 0.004
#> SRR2087300 2 0.0000 0.977 0.000 1.000
#> SRR2087284 2 0.0000 0.977 0.000 1.000
#> SRR2087303 2 0.0000 0.977 0.000 1.000
#> SRR2087351 1 0.0376 0.974 0.996 0.004
#> SRR2087302 2 0.0000 0.977 0.000 1.000
#> SRR2087304 2 0.0000 0.977 0.000 1.000
#> SRR2087298 2 0.0000 0.977 0.000 1.000
#> SRR2087320 2 0.2948 0.972 0.052 0.948
#> SRR2087308 2 0.2948 0.972 0.052 0.948
#> SRR2087295 2 0.0000 0.977 0.000 1.000
#> SRR2087292 2 0.0000 0.977 0.000 1.000
#> SRR2087291 2 0.0000 0.977 0.000 1.000
#> SRR2087294 2 0.0000 0.977 0.000 1.000
#> SRR2087299 2 0.0000 0.977 0.000 1.000
#> SRR2087288 2 0.0000 0.977 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087307 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087359 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087373 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087363 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087317 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087313 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087360 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087375 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087349 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087326 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087306 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087347 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087327 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087318 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087350 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087309 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087344 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087364 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087332 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087336 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087348 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087353 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087343 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087322 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087335 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087362 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087374 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087346 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087345 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087358 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087334 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087323 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087330 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087354 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087342 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087369 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087371 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087361 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087367 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087301 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087333 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087356 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087370 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087312 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087338 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087365 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087319 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087368 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087315 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087372 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087357 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087297 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087352 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087339 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087286 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087355 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087331 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087328 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087321 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087310 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087341 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087340 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087283 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087296 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087337 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087316 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087325 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087287 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087289 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087311 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087324 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087305 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087282 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087285 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087290 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087293 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087329 1 0.000 1.000 1.000 0.000 0.000
#> SRR2087366 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087300 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087284 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087303 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087351 3 0.375 1.000 0.144 0.000 0.856
#> SRR2087302 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087304 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087298 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087320 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087308 2 0.873 0.679 0.288 0.568 0.144
#> SRR2087295 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087292 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087291 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087294 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087299 2 0.000 0.791 0.000 1.000 0.000
#> SRR2087288 2 0.000 0.791 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.2852 0.833 0 0 0 0.828 0.172
#> SRR2087307 5 0.0000 0.000 0 0 0 0.000 1.000
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.0162 0.943 0 0 0 0.996 0.004
#> SRR2087313 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087306 4 0.2852 0.833 0 0 0 0.828 0.172
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.3424 0.756 0 0 0 0.760 0.240
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087319 4 0.2852 0.833 0 0 0 0.828 0.172
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087310 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087325 4 0.2852 0.833 0 0 0 0.828 0.172
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087324 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087308 4 0.0000 0.945 0 0 0 1.000 0.000
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 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
#> SRR2087314 6 0.2793 0.718 0.000 0 0 0.200 0.00 0.800
#> SRR2087307 5 0.0000 0.000 0.000 0 0 0.000 1.00 0.000
#> SRR2087359 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087317 6 0.0363 0.895 0.000 0 0 0.012 0.00 0.988
#> SRR2087313 6 0.0000 0.899 0.000 0 0 0.000 0.00 1.000
#> SRR2087360 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087349 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087326 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087306 6 0.2793 0.718 0.000 0 0 0.200 0.00 0.800
#> SRR2087347 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087327 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087318 6 0.0000 0.899 0.000 0 0 0.000 0.00 1.000
#> SRR2087350 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087309 6 0.0000 0.899 0.000 0 0 0.000 0.00 1.000
#> SRR2087344 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087332 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087336 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087348 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087343 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087322 6 0.3634 0.136 0.000 0 0 0.356 0.00 0.644
#> SRR2087335 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087346 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087345 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087334 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087323 4 0.2912 0.728 0.000 0 0 0.784 0.00 0.216
#> SRR2087330 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087342 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087301 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087333 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087312 4 0.0692 0.518 0.000 0 0 0.976 0.02 0.004
#> SRR2087338 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087319 6 0.1863 0.824 0.000 0 0 0.104 0.00 0.896
#> SRR2087368 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087315 6 0.0000 0.899 0.000 0 0 0.000 0.00 1.000
#> SRR2087372 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087297 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087339 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087286 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087331 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087328 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087321 6 0.0458 0.895 0.000 0 0 0.016 0.00 0.984
#> SRR2087310 4 0.3774 0.577 0.000 0 0 0.592 0.00 0.408
#> SRR2087341 1 0.0146 0.996 0.996 0 0 0.004 0.00 0.000
#> SRR2087340 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087283 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087296 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087337 1 0.0146 0.996 0.996 0 0 0.004 0.00 0.000
#> SRR2087316 6 0.0458 0.895 0.000 0 0 0.016 0.00 0.984
#> SRR2087325 4 0.2823 0.602 0.000 0 0 0.796 0.00 0.204
#> SRR2087287 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087289 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087311 6 0.0000 0.899 0.000 0 0 0.000 0.00 1.000
#> SRR2087324 6 0.0937 0.879 0.000 0 0 0.040 0.00 0.960
#> SRR2087305 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087282 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087285 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087290 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087293 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087329 1 0.0000 1.000 1.000 0 0 0.000 0.00 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087300 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087284 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087303 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0 1 0.000 0.00 0.000
#> SRR2087302 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087304 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087298 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087320 4 0.2912 0.728 0.000 0 0 0.784 0.00 0.216
#> SRR2087308 6 0.0458 0.895 0.000 0 0 0.016 0.00 0.984
#> SRR2087295 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087292 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087291 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087294 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087299 2 0.0000 1.000 0.000 1 0 0.000 0.00 0.000
#> SRR2087288 2 0.0000 1.000 0.000 1 0 0.000 0.00 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 16723 rows and 94 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 0.893 0.966 0.965 0.4975 0.497 0.497
#> 3 3 0.518 0.671 0.691 0.2696 0.633 0.399
#> 4 4 1.000 1.000 1.000 0.1975 0.886 0.681
#> 5 5 0.978 0.954 0.952 0.0178 1.000 1.000
#> 6 6 0.923 0.941 0.947 0.0201 0.976 0.900
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
There is also optional best \(k\) = 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
#> SRR2087314 2 0.4690 0.949 0.100 0.900
#> SRR2087307 2 0.4815 0.946 0.104 0.896
#> SRR2087359 1 0.0938 0.976 0.988 0.012
#> SRR2087373 1 0.0938 0.976 0.988 0.012
#> SRR2087363 1 0.0938 0.976 0.988 0.012
#> SRR2087317 2 0.4690 0.949 0.100 0.900
#> SRR2087313 2 0.4690 0.949 0.100 0.900
#> SRR2087360 1 0.0938 0.976 0.988 0.012
#> SRR2087375 1 0.0938 0.976 0.988 0.012
#> SRR2087349 1 0.2423 0.976 0.960 0.040
#> SRR2087326 1 0.2423 0.976 0.960 0.040
#> SRR2087306 2 0.4690 0.949 0.100 0.900
#> SRR2087347 1 0.2423 0.976 0.960 0.040
#> SRR2087327 1 0.2423 0.976 0.960 0.040
#> SRR2087318 2 0.4690 0.949 0.100 0.900
#> SRR2087350 1 0.2423 0.976 0.960 0.040
#> SRR2087309 2 0.4690 0.949 0.100 0.900
#> SRR2087344 1 0.2423 0.976 0.960 0.040
#> SRR2087364 1 0.0938 0.976 0.988 0.012
#> SRR2087332 1 0.2423 0.976 0.960 0.040
#> SRR2087336 1 0.2423 0.976 0.960 0.040
#> SRR2087348 1 0.2423 0.976 0.960 0.040
#> SRR2087353 1 0.0938 0.976 0.988 0.012
#> SRR2087343 1 0.2423 0.976 0.960 0.040
#> SRR2087322 2 0.4690 0.949 0.100 0.900
#> SRR2087335 1 0.2423 0.976 0.960 0.040
#> SRR2087362 1 0.0938 0.976 0.988 0.012
#> SRR2087374 1 0.0938 0.976 0.988 0.012
#> SRR2087346 1 0.2423 0.976 0.960 0.040
#> SRR2087345 1 0.2423 0.976 0.960 0.040
#> SRR2087358 1 0.0938 0.976 0.988 0.012
#> SRR2087334 1 0.2423 0.976 0.960 0.040
#> SRR2087323 2 0.4690 0.949 0.100 0.900
#> SRR2087330 1 0.2423 0.976 0.960 0.040
#> SRR2087354 1 0.0938 0.976 0.988 0.012
#> SRR2087342 1 0.2423 0.976 0.960 0.040
#> SRR2087369 1 0.0938 0.976 0.988 0.012
#> SRR2087371 1 0.0938 0.976 0.988 0.012
#> SRR2087361 1 0.0938 0.976 0.988 0.012
#> SRR2087367 1 0.0938 0.976 0.988 0.012
#> SRR2087301 2 0.0000 0.959 0.000 1.000
#> SRR2087333 1 0.2423 0.976 0.960 0.040
#> SRR2087356 1 0.0938 0.976 0.988 0.012
#> SRR2087370 1 0.0938 0.976 0.988 0.012
#> SRR2087312 2 0.4690 0.949 0.100 0.900
#> SRR2087338 1 0.2423 0.976 0.960 0.040
#> SRR2087365 1 0.0938 0.976 0.988 0.012
#> SRR2087319 2 0.4690 0.949 0.100 0.900
#> SRR2087368 1 0.0938 0.976 0.988 0.012
#> SRR2087315 2 0.4690 0.949 0.100 0.900
#> SRR2087372 1 0.0938 0.976 0.988 0.012
#> SRR2087357 1 0.0938 0.976 0.988 0.012
#> SRR2087297 2 0.0000 0.959 0.000 1.000
#> SRR2087352 1 0.0938 0.976 0.988 0.012
#> SRR2087339 1 0.2423 0.976 0.960 0.040
#> SRR2087286 2 0.0000 0.959 0.000 1.000
#> SRR2087355 1 0.0938 0.976 0.988 0.012
#> SRR2087331 1 0.2423 0.976 0.960 0.040
#> SRR2087328 1 0.2423 0.976 0.960 0.040
#> SRR2087321 2 0.4690 0.949 0.100 0.900
#> SRR2087310 2 0.4690 0.949 0.100 0.900
#> SRR2087341 1 0.2423 0.976 0.960 0.040
#> SRR2087340 1 0.2423 0.976 0.960 0.040
#> SRR2087283 2 0.0000 0.959 0.000 1.000
#> SRR2087296 2 0.0000 0.959 0.000 1.000
#> SRR2087337 1 0.2423 0.976 0.960 0.040
#> SRR2087316 2 0.4690 0.949 0.100 0.900
#> SRR2087325 2 0.4690 0.949 0.100 0.900
#> SRR2087287 2 0.0000 0.959 0.000 1.000
#> SRR2087289 2 0.0000 0.959 0.000 1.000
#> SRR2087311 2 0.4690 0.949 0.100 0.900
#> SRR2087324 2 0.4690 0.949 0.100 0.900
#> SRR2087305 2 0.0000 0.959 0.000 1.000
#> SRR2087282 2 0.0000 0.959 0.000 1.000
#> SRR2087285 2 0.0000 0.959 0.000 1.000
#> SRR2087290 2 0.0000 0.959 0.000 1.000
#> SRR2087293 2 0.0000 0.959 0.000 1.000
#> SRR2087329 1 0.2423 0.976 0.960 0.040
#> SRR2087366 1 0.0938 0.976 0.988 0.012
#> SRR2087300 2 0.0000 0.959 0.000 1.000
#> SRR2087284 2 0.0000 0.959 0.000 1.000
#> SRR2087303 2 0.0000 0.959 0.000 1.000
#> SRR2087351 1 0.0938 0.976 0.988 0.012
#> SRR2087302 2 0.0000 0.959 0.000 1.000
#> SRR2087304 2 0.0000 0.959 0.000 1.000
#> SRR2087298 2 0.0000 0.959 0.000 1.000
#> SRR2087320 2 0.4690 0.949 0.100 0.900
#> SRR2087308 2 0.4690 0.949 0.100 0.900
#> SRR2087295 2 0.0000 0.959 0.000 1.000
#> SRR2087292 2 0.0000 0.959 0.000 1.000
#> SRR2087291 2 0.0000 0.959 0.000 1.000
#> SRR2087294 2 0.0000 0.959 0.000 1.000
#> SRR2087299 2 0.0000 0.959 0.000 1.000
#> SRR2087288 2 0.0000 0.959 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087307 3 0.8079 0.295 0.112 0.260 0.628
#> SRR2087359 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087373 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087363 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087317 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087313 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087360 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087375 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087349 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087326 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087306 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087347 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087327 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087318 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087350 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087309 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087344 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087364 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087332 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087336 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087348 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087353 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087343 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087322 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087335 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087362 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087374 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087346 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087345 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087358 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087334 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087323 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087330 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087354 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087342 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087369 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087371 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087361 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087367 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087301 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087333 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087356 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087370 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087312 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087338 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087365 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087319 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087368 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087315 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087372 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087357 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087297 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087352 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087339 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087286 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087355 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087331 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087328 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087321 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087310 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087341 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087340 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087283 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087296 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087337 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087316 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087325 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087287 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087289 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087311 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087324 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087305 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087282 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087285 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087290 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087293 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087329 1 0.0424 1.000 0.992 0.008 0.000
#> SRR2087366 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087300 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087284 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087303 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087351 3 0.6745 0.334 0.428 0.012 0.560
#> SRR2087302 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087304 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087298 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087320 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087308 3 0.8404 0.286 0.120 0.288 0.592
#> SRR2087295 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087292 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087291 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087294 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087299 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087288 2 0.0000 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
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.4297 0.772 0.000 0.000 0.000 0.528 0.472
#> SRR2087307 4 0.3966 0.663 0.000 0.000 0.000 0.664 0.336
#> SRR2087359 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> SRR2087373 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> SRR2087363 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087317 4 0.4297 0.772 0.000 0.000 0.000 0.528 0.472
#> SRR2087313 4 0.4101 0.795 0.000 0.000 0.000 0.628 0.372
#> SRR2087360 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> SRR2087375 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087349 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087326 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087306 4 0.4297 0.772 0.000 0.000 0.000 0.528 0.472
#> SRR2087347 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087327 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087318 4 0.4297 0.772 0.000 0.000 0.000 0.528 0.472
#> SRR2087350 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087309 4 0.4297 0.772 0.000 0.000 0.000 0.528 0.472
#> SRR2087344 1 0.0162 0.992 0.996 0.000 0.000 0.000 0.004
#> SRR2087364 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087332 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087336 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087348 1 0.0162 0.992 0.996 0.000 0.000 0.000 0.004
#> SRR2087353 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> SRR2087343 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087322 4 0.0000 0.850 0.000 0.000 0.000 1.000 0.000
#> SRR2087335 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087362 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087374 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087346 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087358 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087334 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087323 4 0.0000 0.850 0.000 0.000 0.000 1.000 0.000
#> SRR2087330 1 0.0162 0.992 0.996 0.000 0.000 0.000 0.004
#> SRR2087354 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087342 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087369 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> SRR2087371 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087361 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087367 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087301 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087333 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087356 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087370 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087312 4 0.0000 0.850 0.000 0.000 0.000 1.000 0.000
#> SRR2087338 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087365 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> SRR2087319 4 0.4297 0.772 0.000 0.000 0.000 0.528 0.472
#> SRR2087368 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087315 4 0.4210 0.787 0.000 0.000 0.000 0.588 0.412
#> SRR2087372 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087357 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087297 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087352 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087339 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087286 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087355 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087331 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087328 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087321 4 0.0290 0.851 0.000 0.000 0.000 0.992 0.008
#> SRR2087310 4 0.0162 0.851 0.000 0.000 0.000 0.996 0.004
#> SRR2087341 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR2087340 1 0.0162 0.992 0.996 0.000 0.000 0.000 0.004
#> SRR2087283 2 0.0162 0.988 0.000 0.996 0.000 0.000 0.004
#> SRR2087296 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087337 1 0.0703 0.988 0.976 0.000 0.000 0.000 0.024
#> SRR2087316 4 0.0162 0.851 0.000 0.000 0.000 0.996 0.004
#> SRR2087325 4 0.0290 0.851 0.000 0.000 0.000 0.992 0.008
#> SRR2087287 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087289 2 0.0703 0.985 0.000 0.976 0.000 0.000 0.024
#> SRR2087311 4 0.0404 0.851 0.000 0.000 0.000 0.988 0.012
#> SRR2087324 4 0.0000 0.850 0.000 0.000 0.000 1.000 0.000
#> SRR2087305 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087282 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087285 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087290 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087293 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087329 1 0.0609 0.989 0.980 0.000 0.000 0.000 0.020
#> SRR2087366 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> SRR2087300 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087284 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087303 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087351 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> SRR2087302 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087304 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087298 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087320 4 0.0000 0.850 0.000 0.000 0.000 1.000 0.000
#> SRR2087308 4 0.0290 0.851 0.000 0.000 0.000 0.992 0.008
#> SRR2087295 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087292 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
#> SRR2087291 2 0.0794 0.984 0.000 0.972 0.000 0.000 0.028
#> SRR2087294 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087299 2 0.0963 0.982 0.000 0.964 0.000 0.000 0.036
#> SRR2087288 2 0.0000 0.988 0.000 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 6 0.2416 0.924 0.000 0.000 0.000 0.156 0.000 0.844
#> SRR2087307 5 0.4314 0.000 0.000 0.000 0.000 0.444 0.536 0.020
#> SRR2087359 3 0.0458 0.991 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR2087373 3 0.0458 0.991 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR2087363 3 0.0146 0.994 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087317 6 0.2416 0.924 0.000 0.000 0.000 0.156 0.000 0.844
#> SRR2087313 6 0.3684 0.644 0.000 0.000 0.000 0.372 0.000 0.628
#> SRR2087360 3 0.0458 0.991 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR2087375 3 0.0146 0.995 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087349 1 0.2888 0.913 0.852 0.000 0.000 0.000 0.092 0.056
#> SRR2087326 1 0.2837 0.913 0.856 0.000 0.000 0.000 0.088 0.056
#> SRR2087306 6 0.2416 0.924 0.000 0.000 0.000 0.156 0.000 0.844
#> SRR2087347 1 0.0405 0.945 0.988 0.000 0.000 0.000 0.004 0.008
#> SRR2087327 1 0.2888 0.913 0.852 0.000 0.000 0.000 0.092 0.056
#> SRR2087318 6 0.2454 0.922 0.000 0.000 0.000 0.160 0.000 0.840
#> SRR2087350 1 0.2837 0.913 0.856 0.000 0.000 0.000 0.088 0.056
#> SRR2087309 6 0.2416 0.924 0.000 0.000 0.000 0.156 0.000 0.844
#> SRR2087344 1 0.0260 0.944 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR2087364 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087332 1 0.0000 0.943 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087336 1 0.2837 0.913 0.856 0.000 0.000 0.000 0.088 0.056
#> SRR2087348 1 0.1594 0.935 0.932 0.000 0.000 0.000 0.016 0.052
#> SRR2087353 3 0.0458 0.991 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR2087343 1 0.0363 0.945 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR2087322 4 0.0632 0.960 0.000 0.000 0.000 0.976 0.024 0.000
#> SRR2087335 1 0.0146 0.944 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2087362 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087374 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087346 1 0.0000 0.943 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.943 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087358 3 0.0146 0.995 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087334 1 0.0000 0.943 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087323 4 0.0000 0.973 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087330 1 0.0146 0.944 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2087354 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087342 1 0.0000 0.943 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087369 3 0.0458 0.991 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR2087371 3 0.0260 0.994 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087361 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087367 3 0.0146 0.995 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087301 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087333 1 0.0146 0.944 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2087356 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087370 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087312 4 0.0632 0.960 0.000 0.000 0.000 0.976 0.024 0.000
#> SRR2087338 1 0.0146 0.944 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2087365 3 0.0458 0.991 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR2087319 6 0.2416 0.924 0.000 0.000 0.000 0.156 0.000 0.844
#> SRR2087368 3 0.0146 0.995 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087315 6 0.3390 0.778 0.000 0.000 0.000 0.296 0.000 0.704
#> SRR2087372 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087357 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087297 2 0.0260 0.953 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2087352 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087339 1 0.0458 0.944 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR2087286 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087355 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087331 1 0.2826 0.914 0.856 0.000 0.000 0.000 0.092 0.052
#> SRR2087328 1 0.2888 0.913 0.852 0.000 0.000 0.000 0.092 0.056
#> SRR2087321 4 0.0146 0.973 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR2087310 4 0.0291 0.972 0.000 0.000 0.000 0.992 0.004 0.004
#> SRR2087341 1 0.0790 0.942 0.968 0.000 0.000 0.000 0.000 0.032
#> SRR2087340 1 0.0146 0.944 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2087283 2 0.0937 0.950 0.000 0.960 0.000 0.000 0.040 0.000
#> SRR2087296 2 0.0146 0.953 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087337 1 0.2888 0.913 0.852 0.000 0.000 0.000 0.092 0.056
#> SRR2087316 4 0.0291 0.972 0.000 0.000 0.000 0.992 0.004 0.004
#> SRR2087325 4 0.0993 0.947 0.000 0.000 0.000 0.964 0.024 0.012
#> SRR2087287 2 0.2003 0.934 0.000 0.884 0.000 0.000 0.116 0.000
#> SRR2087289 2 0.1714 0.941 0.000 0.908 0.000 0.000 0.092 0.000
#> SRR2087311 4 0.0405 0.968 0.000 0.000 0.000 0.988 0.004 0.008
#> SRR2087324 4 0.0632 0.960 0.000 0.000 0.000 0.976 0.024 0.000
#> SRR2087305 2 0.1957 0.936 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087282 2 0.1957 0.936 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087285 2 0.1957 0.936 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087290 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087293 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087329 1 0.2888 0.913 0.852 0.000 0.000 0.000 0.092 0.056
#> SRR2087366 3 0.0363 0.992 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR2087300 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087284 2 0.1957 0.936 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087303 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087351 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087302 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087304 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087298 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087320 4 0.0000 0.973 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087308 4 0.0291 0.972 0.000 0.000 0.000 0.992 0.004 0.004
#> SRR2087295 2 0.1957 0.936 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087292 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087291 2 0.1863 0.938 0.000 0.896 0.000 0.000 0.104 0.000
#> SRR2087294 2 0.1957 0.936 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087299 2 0.1957 0.936 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR2087288 2 0.0000 0.953 0.000 1.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "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 16723 rows and 94 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 1.000 0.990 0.993 0.3887 0.616 0.616
#> 3 3 0.771 0.921 0.940 0.6527 0.743 0.582
#> 4 4 1.000 1.000 1.000 0.1775 0.886 0.681
#> 5 5 0.973 0.929 0.964 0.0147 0.996 0.982
#> 6 6 1.000 0.952 0.984 0.0168 0.979 0.914
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
#> SRR2087314 1 0.204 0.976 0.968 0.032
#> SRR2087307 1 0.204 0.976 0.968 0.032
#> SRR2087359 1 0.000 0.991 1.000 0.000
#> SRR2087373 1 0.000 0.991 1.000 0.000
#> SRR2087363 1 0.000 0.991 1.000 0.000
#> SRR2087317 1 0.204 0.976 0.968 0.032
#> SRR2087313 1 0.204 0.976 0.968 0.032
#> SRR2087360 1 0.000 0.991 1.000 0.000
#> SRR2087375 1 0.000 0.991 1.000 0.000
#> SRR2087349 1 0.000 0.991 1.000 0.000
#> SRR2087326 1 0.000 0.991 1.000 0.000
#> SRR2087306 1 0.204 0.976 0.968 0.032
#> SRR2087347 1 0.000 0.991 1.000 0.000
#> SRR2087327 1 0.000 0.991 1.000 0.000
#> SRR2087318 1 0.204 0.976 0.968 0.032
#> SRR2087350 1 0.000 0.991 1.000 0.000
#> SRR2087309 1 0.204 0.976 0.968 0.032
#> SRR2087344 1 0.000 0.991 1.000 0.000
#> SRR2087364 1 0.000 0.991 1.000 0.000
#> SRR2087332 1 0.000 0.991 1.000 0.000
#> SRR2087336 1 0.000 0.991 1.000 0.000
#> SRR2087348 1 0.000 0.991 1.000 0.000
#> SRR2087353 1 0.000 0.991 1.000 0.000
#> SRR2087343 1 0.000 0.991 1.000 0.000
#> SRR2087322 1 0.204 0.976 0.968 0.032
#> SRR2087335 1 0.000 0.991 1.000 0.000
#> SRR2087362 1 0.000 0.991 1.000 0.000
#> SRR2087374 1 0.000 0.991 1.000 0.000
#> SRR2087346 1 0.000 0.991 1.000 0.000
#> SRR2087345 1 0.000 0.991 1.000 0.000
#> SRR2087358 1 0.000 0.991 1.000 0.000
#> SRR2087334 1 0.000 0.991 1.000 0.000
#> SRR2087323 1 0.204 0.976 0.968 0.032
#> SRR2087330 1 0.000 0.991 1.000 0.000
#> SRR2087354 1 0.000 0.991 1.000 0.000
#> SRR2087342 1 0.000 0.991 1.000 0.000
#> SRR2087369 1 0.000 0.991 1.000 0.000
#> SRR2087371 1 0.000 0.991 1.000 0.000
#> SRR2087361 1 0.000 0.991 1.000 0.000
#> SRR2087367 1 0.000 0.991 1.000 0.000
#> SRR2087301 2 0.000 1.000 0.000 1.000
#> SRR2087333 1 0.000 0.991 1.000 0.000
#> SRR2087356 1 0.000 0.991 1.000 0.000
#> SRR2087370 1 0.000 0.991 1.000 0.000
#> SRR2087312 1 0.204 0.976 0.968 0.032
#> SRR2087338 1 0.000 0.991 1.000 0.000
#> SRR2087365 1 0.000 0.991 1.000 0.000
#> SRR2087319 1 0.204 0.976 0.968 0.032
#> SRR2087368 1 0.000 0.991 1.000 0.000
#> SRR2087315 1 0.204 0.976 0.968 0.032
#> SRR2087372 1 0.000 0.991 1.000 0.000
#> SRR2087357 1 0.000 0.991 1.000 0.000
#> SRR2087297 2 0.000 1.000 0.000 1.000
#> SRR2087352 1 0.000 0.991 1.000 0.000
#> SRR2087339 1 0.000 0.991 1.000 0.000
#> SRR2087286 2 0.000 1.000 0.000 1.000
#> SRR2087355 1 0.000 0.991 1.000 0.000
#> SRR2087331 1 0.000 0.991 1.000 0.000
#> SRR2087328 1 0.000 0.991 1.000 0.000
#> SRR2087321 1 0.204 0.976 0.968 0.032
#> SRR2087310 1 0.204 0.976 0.968 0.032
#> SRR2087341 1 0.000 0.991 1.000 0.000
#> SRR2087340 1 0.000 0.991 1.000 0.000
#> SRR2087283 2 0.000 1.000 0.000 1.000
#> SRR2087296 2 0.000 1.000 0.000 1.000
#> SRR2087337 1 0.000 0.991 1.000 0.000
#> SRR2087316 1 0.204 0.976 0.968 0.032
#> SRR2087325 1 0.204 0.976 0.968 0.032
#> SRR2087287 2 0.000 1.000 0.000 1.000
#> SRR2087289 2 0.000 1.000 0.000 1.000
#> SRR2087311 1 0.204 0.976 0.968 0.032
#> SRR2087324 1 0.204 0.976 0.968 0.032
#> SRR2087305 2 0.000 1.000 0.000 1.000
#> SRR2087282 2 0.000 1.000 0.000 1.000
#> SRR2087285 2 0.000 1.000 0.000 1.000
#> SRR2087290 2 0.000 1.000 0.000 1.000
#> SRR2087293 2 0.000 1.000 0.000 1.000
#> SRR2087329 1 0.000 0.991 1.000 0.000
#> SRR2087366 1 0.000 0.991 1.000 0.000
#> SRR2087300 2 0.000 1.000 0.000 1.000
#> SRR2087284 2 0.000 1.000 0.000 1.000
#> SRR2087303 2 0.000 1.000 0.000 1.000
#> SRR2087351 1 0.000 0.991 1.000 0.000
#> SRR2087302 2 0.000 1.000 0.000 1.000
#> SRR2087304 2 0.000 1.000 0.000 1.000
#> SRR2087298 2 0.000 1.000 0.000 1.000
#> SRR2087320 1 0.204 0.976 0.968 0.032
#> SRR2087308 1 0.204 0.976 0.968 0.032
#> SRR2087295 2 0.000 1.000 0.000 1.000
#> SRR2087292 2 0.000 1.000 0.000 1.000
#> SRR2087291 2 0.000 1.000 0.000 1.000
#> SRR2087294 2 0.000 1.000 0.000 1.000
#> SRR2087299 2 0.000 1.000 0.000 1.000
#> SRR2087288 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
#> SRR2087314 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087307 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087359 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087373 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087363 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087317 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087313 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087360 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087375 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087349 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087306 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087347 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087318 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087350 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087309 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087344 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087364 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087332 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087353 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087343 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087322 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087335 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087362 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087374 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087346 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087358 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087334 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087323 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087330 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087354 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087342 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087369 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087371 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087361 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087367 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087301 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087333 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087356 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087370 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087312 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087338 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087365 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087319 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087368 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087315 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087372 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087357 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087297 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087352 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087339 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087355 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087331 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087321 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087310 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087341 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087296 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087337 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087316 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087325 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087287 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087289 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087311 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087324 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087305 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087282 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087285 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087290 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087293 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087329 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087366 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087300 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087284 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087303 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087351 3 0.0237 0.864 0.004 0.000 0.996
#> SRR2087302 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087304 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087298 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087320 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087308 3 0.6148 0.798 0.244 0.028 0.728
#> SRR2087295 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087292 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087291 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087294 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087299 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2087288 2 0.0000 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
#> SRR2087314 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087307 4 0.0592 0.984 0 0 0.016 0.984
#> SRR2087359 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087317 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087313 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087360 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087306 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087347 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087318 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087350 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087309 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087344 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087322 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087335 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087323 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087330 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087312 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087338 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087319 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087368 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087315 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087372 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087321 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087310 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087341 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087316 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087325 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087287 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087311 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087324 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087305 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087320 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087308 4 0.0000 0.999 0 0 0.000 1.000
#> SRR2087295 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.029 0.707 0 0 0 0.992 0.008
#> SRR2087307 5 0.331 0.000 0 0 0 0.224 0.776
#> SRR2087359 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.000 0.714 0 0 0 1.000 0.000
#> SRR2087313 4 0.000 0.714 0 0 0 1.000 0.000
#> SRR2087360 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087306 4 0.029 0.707 0 0 0 0.992 0.008
#> SRR2087347 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.000 0.714 0 0 0 1.000 0.000
#> SRR2087350 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.000 0.714 0 0 0 1.000 0.000
#> SRR2087344 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.307 0.727 0 0 0 0.804 0.196
#> SRR2087335 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.416 0.671 0 0 0 0.608 0.392
#> SRR2087330 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.289 0.727 0 0 0 0.824 0.176
#> SRR2087338 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087319 4 0.029 0.707 0 0 0 0.992 0.008
#> SRR2087368 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.000 0.714 0 0 0 1.000 0.000
#> SRR2087372 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.416 0.671 0 0 0 0.608 0.392
#> SRR2087310 4 0.416 0.671 0 0 0 0.608 0.392
#> SRR2087341 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.416 0.671 0 0 0 0.608 0.392
#> SRR2087325 4 0.289 0.727 0 0 0 0.824 0.176
#> SRR2087287 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.416 0.671 0 0 0 0.608 0.392
#> SRR2087324 4 0.307 0.727 0 0 0 0.804 0.196
#> SRR2087305 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.416 0.671 0 0 0 0.608 0.392
#> SRR2087308 4 0.416 0.671 0 0 0 0.608 0.392
#> SRR2087295 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.000 1.000 0 1 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
#> SRR2087314 6 0.0000 0.845 0 0 0 0.000 0 1.000
#> SRR2087307 5 0.0000 0.000 0 0 0 0.000 1 0.000
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087317 6 0.1075 0.871 0 0 0 0.048 0 0.952
#> SRR2087313 6 0.1075 0.871 0 0 0 0.048 0 0.952
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087306 6 0.0000 0.845 0 0 0 0.000 0 1.000
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087318 6 0.1075 0.871 0 0 0 0.048 0 0.952
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087309 6 0.1075 0.871 0 0 0 0.048 0 0.952
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087322 4 0.2762 0.728 0 0 0 0.804 0 0.196
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087323 4 0.0000 0.921 0 0 0 1.000 0 0.000
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087312 6 0.3737 0.411 0 0 0 0.392 0 0.608
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087319 6 0.0000 0.845 0 0 0 0.000 0 1.000
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087315 6 0.1075 0.871 0 0 0 0.048 0 0.952
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087321 4 0.0146 0.919 0 0 0 0.996 0 0.004
#> SRR2087310 4 0.0000 0.921 0 0 0 1.000 0 0.000
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087316 4 0.0000 0.921 0 0 0 1.000 0 0.000
#> SRR2087325 6 0.3737 0.411 0 0 0 0.392 0 0.608
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087311 4 0.0000 0.921 0 0 0 1.000 0 0.000
#> SRR2087324 4 0.3151 0.633 0 0 0 0.748 0 0.252
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087320 4 0.0000 0.921 0 0 0 1.000 0 0.000
#> SRR2087308 4 0.0000 0.921 0 0 0 1.000 0 0.000
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0 0.000
#> SRR2087288 2 0.0000 1.000 0 1 0 0.000 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", "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 16723 rows and 94 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 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.240 0.635 0.783 0.4375 0.616 0.616
#> 3 3 0.513 0.600 0.591 0.4164 0.491 0.324
#> 4 4 0.846 0.962 0.869 0.1619 0.863 0.640
#> 5 5 0.870 0.899 0.858 0.0732 1.000 1.000
#> 6 6 0.841 0.834 0.789 0.0358 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] 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
#> SRR2087314 1 0.999 0.0696 0.516 0.484
#> SRR2087307 1 0.921 0.4270 0.664 0.336
#> SRR2087359 1 0.909 0.6771 0.676 0.324
#> SRR2087373 1 0.909 0.6771 0.676 0.324
#> SRR2087363 1 0.909 0.6771 0.676 0.324
#> SRR2087317 1 0.999 0.0696 0.516 0.484
#> SRR2087313 1 0.999 0.0696 0.516 0.484
#> SRR2087360 1 0.909 0.6771 0.676 0.324
#> SRR2087375 1 0.909 0.6771 0.676 0.324
#> SRR2087349 1 0.000 0.6800 1.000 0.000
#> SRR2087326 1 0.000 0.6800 1.000 0.000
#> SRR2087306 1 0.999 0.0696 0.516 0.484
#> SRR2087347 1 0.000 0.6800 1.000 0.000
#> SRR2087327 1 0.000 0.6800 1.000 0.000
#> SRR2087318 1 0.999 0.0696 0.516 0.484
#> SRR2087350 1 0.000 0.6800 1.000 0.000
#> SRR2087309 1 0.999 0.0696 0.516 0.484
#> SRR2087344 1 0.000 0.6800 1.000 0.000
#> SRR2087364 1 0.909 0.6771 0.676 0.324
#> SRR2087332 1 0.000 0.6800 1.000 0.000
#> SRR2087336 1 0.000 0.6800 1.000 0.000
#> SRR2087348 1 0.000 0.6800 1.000 0.000
#> SRR2087353 1 0.909 0.6771 0.676 0.324
#> SRR2087343 1 0.000 0.6800 1.000 0.000
#> SRR2087322 1 0.999 0.0696 0.516 0.484
#> SRR2087335 1 0.000 0.6800 1.000 0.000
#> SRR2087362 1 0.909 0.6771 0.676 0.324
#> SRR2087374 1 0.909 0.6771 0.676 0.324
#> SRR2087346 1 0.000 0.6800 1.000 0.000
#> SRR2087345 1 0.000 0.6800 1.000 0.000
#> SRR2087358 1 0.909 0.6771 0.676 0.324
#> SRR2087334 1 0.000 0.6800 1.000 0.000
#> SRR2087323 1 0.999 0.0696 0.516 0.484
#> SRR2087330 1 0.000 0.6800 1.000 0.000
#> SRR2087354 1 0.909 0.6771 0.676 0.324
#> SRR2087342 1 0.000 0.6800 1.000 0.000
#> SRR2087369 1 0.909 0.6771 0.676 0.324
#> SRR2087371 1 0.909 0.6771 0.676 0.324
#> SRR2087361 1 0.909 0.6771 0.676 0.324
#> SRR2087367 1 0.909 0.6771 0.676 0.324
#> SRR2087301 2 0.745 1.0000 0.212 0.788
#> SRR2087333 1 0.000 0.6800 1.000 0.000
#> SRR2087356 1 0.909 0.6771 0.676 0.324
#> SRR2087370 1 0.909 0.6771 0.676 0.324
#> SRR2087312 1 0.999 0.0696 0.516 0.484
#> SRR2087338 1 0.000 0.6800 1.000 0.000
#> SRR2087365 1 0.909 0.6771 0.676 0.324
#> SRR2087319 1 0.999 0.0696 0.516 0.484
#> SRR2087368 1 0.909 0.6771 0.676 0.324
#> SRR2087315 1 0.999 0.0696 0.516 0.484
#> SRR2087372 1 0.909 0.6771 0.676 0.324
#> SRR2087357 1 0.909 0.6771 0.676 0.324
#> SRR2087297 2 0.745 1.0000 0.212 0.788
#> SRR2087352 1 0.909 0.6771 0.676 0.324
#> SRR2087339 1 0.000 0.6800 1.000 0.000
#> SRR2087286 2 0.745 1.0000 0.212 0.788
#> SRR2087355 1 0.909 0.6771 0.676 0.324
#> SRR2087331 1 0.000 0.6800 1.000 0.000
#> SRR2087328 1 0.000 0.6800 1.000 0.000
#> SRR2087321 1 0.999 0.0696 0.516 0.484
#> SRR2087310 1 0.999 0.0696 0.516 0.484
#> SRR2087341 1 0.000 0.6800 1.000 0.000
#> SRR2087340 1 0.000 0.6800 1.000 0.000
#> SRR2087283 2 0.745 1.0000 0.212 0.788
#> SRR2087296 2 0.745 1.0000 0.212 0.788
#> SRR2087337 1 0.000 0.6800 1.000 0.000
#> SRR2087316 1 0.999 0.0696 0.516 0.484
#> SRR2087325 1 0.999 0.0696 0.516 0.484
#> SRR2087287 2 0.745 1.0000 0.212 0.788
#> SRR2087289 2 0.745 1.0000 0.212 0.788
#> SRR2087311 1 0.999 0.0696 0.516 0.484
#> SRR2087324 1 0.999 0.0696 0.516 0.484
#> SRR2087305 2 0.745 1.0000 0.212 0.788
#> SRR2087282 2 0.745 1.0000 0.212 0.788
#> SRR2087285 2 0.745 1.0000 0.212 0.788
#> SRR2087290 2 0.745 1.0000 0.212 0.788
#> SRR2087293 2 0.745 1.0000 0.212 0.788
#> SRR2087329 1 0.000 0.6800 1.000 0.000
#> SRR2087366 1 0.909 0.6771 0.676 0.324
#> SRR2087300 2 0.745 1.0000 0.212 0.788
#> SRR2087284 2 0.745 1.0000 0.212 0.788
#> SRR2087303 2 0.745 1.0000 0.212 0.788
#> SRR2087351 1 0.909 0.6771 0.676 0.324
#> SRR2087302 2 0.745 1.0000 0.212 0.788
#> SRR2087304 2 0.745 1.0000 0.212 0.788
#> SRR2087298 2 0.745 1.0000 0.212 0.788
#> SRR2087320 1 0.999 0.0696 0.516 0.484
#> SRR2087308 1 0.999 0.0696 0.516 0.484
#> SRR2087295 2 0.745 1.0000 0.212 0.788
#> SRR2087292 2 0.745 1.0000 0.212 0.788
#> SRR2087291 2 0.745 1.0000 0.212 0.788
#> SRR2087294 2 0.745 1.0000 0.212 0.788
#> SRR2087299 2 0.745 1.0000 0.212 0.788
#> SRR2087288 2 0.745 1.0000 0.212 0.788
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087307 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087359 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087373 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087363 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087317 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087313 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087360 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087375 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087349 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087326 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087306 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087347 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087327 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087318 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087350 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087309 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087344 2 0.9975 0.285 0.320 0.368 0.312
#> SRR2087364 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087332 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087336 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087348 2 0.9975 0.285 0.320 0.368 0.312
#> SRR2087353 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087343 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087322 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087335 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087362 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087374 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087346 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087345 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087358 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087334 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087323 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087330 2 0.9975 0.285 0.320 0.368 0.312
#> SRR2087354 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087342 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087369 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087371 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087361 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087367 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087301 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087333 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087356 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087370 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087312 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087338 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087365 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087319 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087368 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087315 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087372 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087357 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087297 2 0.6773 0.180 0.340 0.636 0.024
#> SRR2087352 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087339 2 0.9956 0.289 0.308 0.380 0.312
#> SRR2087286 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087355 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087331 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087328 2 0.9975 0.286 0.320 0.368 0.312
#> SRR2087321 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087310 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087341 2 0.9975 0.285 0.320 0.368 0.312
#> SRR2087340 2 0.9975 0.285 0.320 0.368 0.312
#> SRR2087283 2 0.6952 0.178 0.376 0.600 0.024
#> SRR2087296 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087337 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087316 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087325 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087287 2 0.6969 0.177 0.380 0.596 0.024
#> SRR2087289 2 0.6952 0.178 0.376 0.600 0.024
#> SRR2087311 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087324 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087305 2 0.6969 0.177 0.380 0.596 0.024
#> SRR2087282 2 0.6969 0.177 0.380 0.596 0.024
#> SRR2087285 2 0.6969 0.177 0.380 0.596 0.024
#> SRR2087290 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087293 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087329 2 0.9963 0.288 0.312 0.376 0.312
#> SRR2087366 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087300 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087284 2 0.6969 0.177 0.380 0.596 0.024
#> SRR2087303 2 0.6796 0.178 0.344 0.632 0.024
#> SRR2087351 3 0.0237 0.998 0.000 0.004 0.996
#> SRR2087302 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087304 2 0.6796 0.178 0.344 0.632 0.024
#> SRR2087298 2 0.6796 0.178 0.344 0.632 0.024
#> SRR2087320 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087308 1 0.4346 1.000 0.816 0.000 0.184
#> SRR2087295 2 0.6969 0.177 0.380 0.596 0.024
#> SRR2087292 2 0.6750 0.180 0.336 0.640 0.024
#> SRR2087291 2 0.6952 0.178 0.376 0.600 0.024
#> SRR2087294 2 0.6969 0.177 0.380 0.596 0.024
#> SRR2087299 2 0.7001 0.175 0.388 0.588 0.024
#> SRR2087288 2 0.6796 0.178 0.344 0.632 0.024
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087307 4 0.6569 0.983 0.084 0.140 0.068 0.708
#> SRR2087359 3 0.0000 0.961 0.000 0.000 1.000 0.000
#> SRR2087373 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087363 3 0.2149 0.958 0.000 0.000 0.912 0.088
#> SRR2087317 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087313 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087360 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087375 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087349 1 0.3634 0.975 0.856 0.000 0.096 0.048
#> SRR2087326 1 0.3634 0.975 0.856 0.000 0.096 0.048
#> SRR2087306 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087347 1 0.2741 0.979 0.892 0.000 0.096 0.012
#> SRR2087327 1 0.3634 0.973 0.856 0.000 0.096 0.048
#> SRR2087318 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087350 1 0.3634 0.973 0.856 0.000 0.096 0.048
#> SRR2087309 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087344 1 0.3372 0.972 0.868 0.000 0.096 0.036
#> SRR2087364 3 0.2149 0.958 0.000 0.000 0.912 0.088
#> SRR2087332 1 0.2281 0.978 0.904 0.000 0.096 0.000
#> SRR2087336 1 0.3634 0.975 0.856 0.000 0.096 0.048
#> SRR2087348 1 0.3463 0.972 0.864 0.000 0.096 0.040
#> SRR2087353 3 0.2149 0.958 0.000 0.000 0.912 0.088
#> SRR2087343 1 0.2741 0.978 0.892 0.000 0.096 0.012
#> SRR2087322 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087335 1 0.3182 0.972 0.876 0.000 0.096 0.028
#> SRR2087362 3 0.2149 0.958 0.000 0.000 0.912 0.088
#> SRR2087374 3 0.2081 0.959 0.000 0.000 0.916 0.084
#> SRR2087346 1 0.2611 0.977 0.896 0.000 0.096 0.008
#> SRR2087345 1 0.2281 0.978 0.904 0.000 0.096 0.000
#> SRR2087358 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087334 1 0.2281 0.978 0.904 0.000 0.096 0.000
#> SRR2087323 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087330 1 0.3182 0.972 0.876 0.000 0.096 0.028
#> SRR2087354 3 0.2149 0.958 0.000 0.000 0.912 0.088
#> SRR2087342 1 0.3182 0.972 0.876 0.000 0.096 0.028
#> SRR2087369 3 0.0469 0.961 0.000 0.000 0.988 0.012
#> SRR2087371 3 0.0000 0.961 0.000 0.000 1.000 0.000
#> SRR2087361 3 0.2149 0.958 0.000 0.000 0.912 0.088
#> SRR2087367 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087301 2 0.0000 0.931 0.000 1.000 0.000 0.000
#> SRR2087333 1 0.2861 0.978 0.888 0.000 0.096 0.016
#> SRR2087356 3 0.2081 0.959 0.000 0.000 0.916 0.084
#> SRR2087370 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087312 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087338 1 0.3279 0.976 0.872 0.000 0.096 0.032
#> SRR2087365 3 0.2081 0.959 0.000 0.000 0.916 0.084
#> SRR2087319 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087368 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087315 4 0.6824 0.995 0.092 0.152 0.068 0.688
#> SRR2087372 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087357 3 0.2149 0.958 0.000 0.000 0.912 0.088
#> SRR2087297 2 0.0336 0.932 0.000 0.992 0.000 0.008
#> SRR2087352 3 0.2081 0.959 0.000 0.000 0.916 0.084
#> SRR2087339 1 0.3279 0.976 0.872 0.000 0.096 0.032
#> SRR2087286 2 0.0000 0.931 0.000 1.000 0.000 0.000
#> SRR2087355 3 0.2081 0.959 0.000 0.000 0.916 0.084
#> SRR2087331 1 0.3463 0.975 0.864 0.000 0.096 0.040
#> SRR2087328 1 0.3873 0.974 0.844 0.000 0.096 0.060
#> SRR2087321 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087310 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087341 1 0.3463 0.972 0.864 0.000 0.096 0.040
#> SRR2087340 1 0.3372 0.972 0.868 0.000 0.096 0.036
#> SRR2087283 2 0.3667 0.919 0.056 0.856 0.000 0.088
#> SRR2087296 2 0.0188 0.931 0.000 0.996 0.000 0.004
#> SRR2087337 1 0.3550 0.977 0.860 0.000 0.096 0.044
#> SRR2087316 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087325 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087287 2 0.3935 0.915 0.060 0.840 0.000 0.100
#> SRR2087289 2 0.2908 0.926 0.040 0.896 0.000 0.064
#> SRR2087311 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087324 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087305 2 0.3935 0.915 0.060 0.840 0.000 0.100
#> SRR2087282 2 0.3935 0.915 0.060 0.840 0.000 0.100
#> SRR2087285 2 0.3935 0.915 0.060 0.840 0.000 0.100
#> SRR2087290 2 0.0000 0.931 0.000 1.000 0.000 0.000
#> SRR2087293 2 0.0000 0.931 0.000 1.000 0.000 0.000
#> SRR2087329 1 0.3634 0.975 0.856 0.000 0.096 0.048
#> SRR2087366 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087300 2 0.0000 0.931 0.000 1.000 0.000 0.000
#> SRR2087284 2 0.3935 0.915 0.060 0.840 0.000 0.100
#> SRR2087303 2 0.1624 0.918 0.028 0.952 0.000 0.020
#> SRR2087351 3 0.0469 0.960 0.000 0.000 0.988 0.012
#> SRR2087302 2 0.0000 0.931 0.000 1.000 0.000 0.000
#> SRR2087304 2 0.1624 0.918 0.028 0.952 0.000 0.020
#> SRR2087298 2 0.1624 0.918 0.028 0.952 0.000 0.020
#> SRR2087320 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087308 4 0.6705 0.996 0.084 0.152 0.068 0.696
#> SRR2087295 2 0.3935 0.915 0.060 0.840 0.000 0.100
#> SRR2087292 2 0.0000 0.931 0.000 1.000 0.000 0.000
#> SRR2087291 2 0.3229 0.923 0.048 0.880 0.000 0.072
#> SRR2087294 2 0.3935 0.915 0.060 0.840 0.000 0.100
#> SRR2087299 2 0.4525 0.905 0.080 0.804 0.000 0.116
#> SRR2087288 2 0.1624 0.918 0.028 0.952 0.000 0.020
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087307 4 0.3055 0.928 0.016 0.052 0.016 0.888 NA
#> SRR2087359 3 0.0162 0.876 0.000 0.000 0.996 0.000 NA
#> SRR2087373 3 0.0290 0.874 0.000 0.000 0.992 0.008 NA
#> SRR2087363 3 0.3730 0.867 0.000 0.000 0.712 0.000 NA
#> SRR2087317 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087313 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087360 3 0.0290 0.874 0.000 0.000 0.992 0.008 NA
#> SRR2087375 3 0.0290 0.874 0.000 0.000 0.992 0.008 NA
#> SRR2087349 1 0.3495 0.906 0.852 0.000 0.048 0.020 NA
#> SRR2087326 1 0.3495 0.906 0.852 0.000 0.048 0.020 NA
#> SRR2087306 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087347 1 0.2609 0.917 0.896 0.000 0.048 0.004 NA
#> SRR2087327 1 0.3673 0.905 0.844 0.000 0.048 0.028 NA
#> SRR2087318 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087350 1 0.3673 0.905 0.844 0.000 0.048 0.028 NA
#> SRR2087309 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087344 1 0.4832 0.863 0.736 0.000 0.048 0.024 NA
#> SRR2087364 3 0.3730 0.867 0.000 0.000 0.712 0.000 NA
#> SRR2087332 1 0.2434 0.915 0.908 0.000 0.048 0.008 NA
#> SRR2087336 1 0.3495 0.906 0.852 0.000 0.048 0.020 NA
#> SRR2087348 1 0.5021 0.863 0.712 0.000 0.048 0.024 NA
#> SRR2087353 3 0.3730 0.867 0.000 0.000 0.712 0.000 NA
#> SRR2087343 1 0.1644 0.916 0.940 0.000 0.048 0.004 NA
#> SRR2087322 4 0.2434 0.945 0.012 0.064 0.012 0.908 NA
#> SRR2087335 1 0.4666 0.874 0.760 0.000 0.048 0.028 NA
#> SRR2087362 3 0.3730 0.867 0.000 0.000 0.712 0.000 NA
#> SRR2087374 3 0.3910 0.869 0.000 0.000 0.720 0.008 NA
#> SRR2087346 1 0.2352 0.916 0.912 0.000 0.048 0.008 NA
#> SRR2087345 1 0.2308 0.915 0.912 0.000 0.048 0.004 NA
#> SRR2087358 3 0.0162 0.875 0.000 0.000 0.996 0.004 NA
#> SRR2087334 1 0.2308 0.915 0.912 0.000 0.048 0.004 NA
#> SRR2087323 4 0.2560 0.944 0.012 0.064 0.012 0.904 NA
#> SRR2087330 1 0.4847 0.866 0.740 0.000 0.048 0.028 NA
#> SRR2087354 3 0.3730 0.867 0.000 0.000 0.712 0.000 NA
#> SRR2087342 1 0.4666 0.874 0.760 0.000 0.048 0.028 NA
#> SRR2087369 3 0.1557 0.877 0.000 0.000 0.940 0.008 NA
#> SRR2087371 3 0.0162 0.876 0.000 0.000 0.996 0.000 NA
#> SRR2087361 3 0.3730 0.867 0.000 0.000 0.712 0.000 NA
#> SRR2087367 3 0.0290 0.874 0.000 0.000 0.992 0.008 NA
#> SRR2087301 2 0.0000 0.909 0.000 1.000 0.000 0.000 NA
#> SRR2087333 1 0.1770 0.916 0.936 0.000 0.048 0.008 NA
#> SRR2087356 3 0.3910 0.869 0.000 0.000 0.720 0.008 NA
#> SRR2087370 3 0.0510 0.875 0.000 0.000 0.984 0.016 NA
#> SRR2087312 4 0.2538 0.945 0.016 0.064 0.012 0.904 NA
#> SRR2087338 1 0.2975 0.912 0.884 0.000 0.048 0.020 NA
#> SRR2087365 3 0.3910 0.869 0.000 0.000 0.720 0.008 NA
#> SRR2087319 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087368 3 0.0290 0.874 0.000 0.000 0.992 0.008 NA
#> SRR2087315 4 0.4985 0.921 0.024 0.064 0.012 0.760 NA
#> SRR2087372 3 0.0510 0.875 0.000 0.000 0.984 0.016 NA
#> SRR2087357 3 0.3730 0.867 0.000 0.000 0.712 0.000 NA
#> SRR2087297 2 0.0703 0.910 0.000 0.976 0.000 0.000 NA
#> SRR2087352 3 0.3910 0.869 0.000 0.000 0.720 0.008 NA
#> SRR2087339 1 0.2975 0.912 0.884 0.000 0.048 0.020 NA
#> SRR2087286 2 0.0000 0.909 0.000 1.000 0.000 0.000 NA
#> SRR2087355 3 0.3910 0.869 0.000 0.000 0.720 0.008 NA
#> SRR2087331 1 0.3216 0.909 0.868 0.000 0.048 0.016 NA
#> SRR2087328 1 0.4155 0.903 0.796 0.000 0.048 0.016 NA
#> SRR2087321 4 0.2275 0.945 0.012 0.064 0.012 0.912 NA
#> SRR2087310 4 0.2560 0.944 0.012 0.064 0.012 0.904 NA
#> SRR2087341 1 0.4991 0.864 0.716 0.000 0.048 0.024 NA
#> SRR2087340 1 0.4865 0.863 0.732 0.000 0.048 0.024 NA
#> SRR2087283 2 0.3509 0.892 0.004 0.792 0.000 0.008 NA
#> SRR2087296 2 0.0162 0.909 0.004 0.996 0.000 0.000 NA
#> SRR2087337 1 0.4067 0.911 0.804 0.000 0.048 0.016 NA
#> SRR2087316 4 0.2434 0.945 0.012 0.064 0.012 0.908 NA
#> SRR2087325 4 0.2538 0.945 0.016 0.064 0.012 0.904 NA
#> SRR2087287 2 0.3398 0.889 0.000 0.780 0.000 0.004 NA
#> SRR2087289 2 0.2865 0.903 0.008 0.856 0.000 0.004 NA
#> SRR2087311 4 0.2434 0.945 0.012 0.064 0.012 0.908 NA
#> SRR2087324 4 0.2434 0.945 0.012 0.064 0.012 0.908 NA
#> SRR2087305 2 0.3398 0.889 0.000 0.780 0.000 0.004 NA
#> SRR2087282 2 0.3611 0.889 0.004 0.780 0.000 0.008 NA
#> SRR2087285 2 0.3398 0.889 0.000 0.780 0.000 0.004 NA
#> SRR2087290 2 0.0000 0.909 0.000 1.000 0.000 0.000 NA
#> SRR2087293 2 0.0000 0.909 0.000 1.000 0.000 0.000 NA
#> SRR2087329 1 0.3495 0.906 0.852 0.000 0.048 0.020 NA
#> SRR2087366 3 0.0290 0.874 0.000 0.000 0.992 0.008 NA
#> SRR2087300 2 0.0162 0.909 0.004 0.996 0.000 0.000 NA
#> SRR2087284 2 0.3398 0.889 0.000 0.780 0.000 0.004 NA
#> SRR2087303 2 0.1885 0.890 0.020 0.932 0.000 0.004 NA
#> SRR2087351 3 0.0510 0.875 0.000 0.000 0.984 0.016 NA
#> SRR2087302 2 0.0290 0.908 0.008 0.992 0.000 0.000 NA
#> SRR2087304 2 0.1885 0.890 0.020 0.932 0.000 0.004 NA
#> SRR2087298 2 0.2193 0.890 0.028 0.920 0.000 0.008 NA
#> SRR2087320 4 0.2560 0.944 0.012 0.064 0.012 0.904 NA
#> SRR2087308 4 0.2434 0.945 0.012 0.064 0.012 0.908 NA
#> SRR2087295 2 0.3487 0.889 0.000 0.780 0.000 0.008 NA
#> SRR2087292 2 0.0000 0.909 0.000 1.000 0.000 0.000 NA
#> SRR2087291 2 0.3167 0.900 0.008 0.836 0.000 0.008 NA
#> SRR2087294 2 0.3487 0.889 0.000 0.780 0.000 0.008 NA
#> SRR2087299 2 0.4164 0.874 0.008 0.728 0.000 0.012 NA
#> SRR2087288 2 0.2193 0.890 0.028 0.920 0.000 0.008 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 4 0.1628 0.856 0.012 0.036 0.008 0.940 NA 0.004
#> SRR2087307 4 0.5431 0.866 0.012 0.028 0.012 0.620 NA 0.032
#> SRR2087359 3 0.1067 0.806 0.024 0.000 0.964 0.004 NA 0.004
#> SRR2087373 3 0.1036 0.804 0.024 0.000 0.964 0.008 NA 0.000
#> SRR2087363 3 0.5659 0.795 0.024 0.000 0.540 0.000 NA 0.340
#> SRR2087317 4 0.1483 0.857 0.012 0.036 0.008 0.944 NA 0.000
#> SRR2087313 4 0.1483 0.857 0.012 0.036 0.008 0.944 NA 0.000
#> SRR2087360 3 0.1036 0.804 0.024 0.000 0.964 0.008 NA 0.000
#> SRR2087375 3 0.1036 0.804 0.024 0.000 0.964 0.008 NA 0.000
#> SRR2087349 1 0.4085 0.853 0.748 0.000 0.000 0.000 NA 0.096
#> SRR2087326 1 0.4085 0.853 0.748 0.000 0.000 0.000 NA 0.096
#> SRR2087306 4 0.1628 0.856 0.012 0.036 0.008 0.940 NA 0.004
#> SRR2087347 1 0.0937 0.886 0.960 0.000 0.000 0.000 NA 0.000
#> SRR2087327 1 0.4183 0.852 0.740 0.000 0.000 0.000 NA 0.108
#> SRR2087318 4 0.1483 0.857 0.012 0.036 0.008 0.944 NA 0.000
#> SRR2087350 1 0.4183 0.852 0.740 0.000 0.000 0.000 NA 0.108
#> SRR2087309 4 0.1483 0.857 0.012 0.036 0.008 0.944 NA 0.000
#> SRR2087344 1 0.3239 0.848 0.816 0.000 0.000 0.008 NA 0.024
#> SRR2087364 3 0.5569 0.795 0.024 0.000 0.540 0.000 NA 0.352
#> SRR2087332 1 0.0820 0.883 0.972 0.000 0.000 0.000 NA 0.012
#> SRR2087336 1 0.4085 0.853 0.748 0.000 0.000 0.000 NA 0.096
#> SRR2087348 1 0.3769 0.846 0.768 0.000 0.000 0.016 NA 0.024
#> SRR2087353 3 0.5659 0.795 0.024 0.000 0.540 0.000 NA 0.340
#> SRR2087343 1 0.1088 0.885 0.960 0.000 0.000 0.000 NA 0.024
#> SRR2087322 4 0.4921 0.897 0.012 0.036 0.008 0.672 NA 0.012
#> SRR2087335 1 0.2696 0.857 0.856 0.000 0.000 0.000 NA 0.028
#> SRR2087362 3 0.5569 0.795 0.024 0.000 0.540 0.000 NA 0.352
#> SRR2087374 3 0.5716 0.798 0.024 0.000 0.548 0.000 NA 0.320
#> SRR2087346 1 0.1649 0.882 0.936 0.000 0.000 0.008 NA 0.040
#> SRR2087345 1 0.0547 0.884 0.980 0.000 0.000 0.000 NA 0.000
#> SRR2087358 3 0.0922 0.805 0.024 0.000 0.968 0.004 NA 0.000
#> SRR2087334 1 0.0547 0.884 0.980 0.000 0.000 0.000 NA 0.000
#> SRR2087323 4 0.4667 0.897 0.012 0.036 0.008 0.668 NA 0.000
#> SRR2087330 1 0.2999 0.856 0.836 0.000 0.000 0.000 NA 0.040
#> SRR2087354 3 0.5569 0.795 0.024 0.000 0.540 0.000 NA 0.352
#> SRR2087342 1 0.2696 0.857 0.856 0.000 0.000 0.000 NA 0.028
#> SRR2087369 3 0.2604 0.811 0.024 0.000 0.888 0.000 NA 0.056
#> SRR2087371 3 0.0777 0.807 0.024 0.000 0.972 0.000 NA 0.004
#> SRR2087361 3 0.5659 0.795 0.024 0.000 0.540 0.000 NA 0.340
#> SRR2087367 3 0.0632 0.806 0.024 0.000 0.976 0.000 NA 0.000
#> SRR2087301 2 0.3351 0.823 0.000 0.712 0.000 0.000 NA 0.288
#> SRR2087333 1 0.1873 0.882 0.924 0.000 0.000 0.008 NA 0.048
#> SRR2087356 3 0.5716 0.798 0.024 0.000 0.548 0.000 NA 0.320
#> SRR2087370 3 0.2186 0.802 0.024 0.000 0.908 0.012 NA 0.000
#> SRR2087312 4 0.4987 0.897 0.012 0.036 0.008 0.672 NA 0.016
#> SRR2087338 1 0.3258 0.874 0.836 0.000 0.000 0.008 NA 0.092
#> SRR2087365 3 0.5784 0.798 0.024 0.000 0.548 0.000 NA 0.308
#> SRR2087319 4 0.1628 0.856 0.012 0.036 0.008 0.940 NA 0.004
#> SRR2087368 3 0.1036 0.804 0.024 0.000 0.964 0.008 NA 0.000
#> SRR2087315 4 0.1483 0.857 0.012 0.036 0.008 0.944 NA 0.000
#> SRR2087372 3 0.2186 0.802 0.024 0.000 0.908 0.012 NA 0.000
#> SRR2087357 3 0.5600 0.795 0.024 0.000 0.540 0.000 NA 0.348
#> SRR2087297 2 0.3874 0.826 0.000 0.744 0.004 0.008 NA 0.224
#> SRR2087352 3 0.5716 0.798 0.024 0.000 0.548 0.000 NA 0.320
#> SRR2087339 1 0.3258 0.874 0.836 0.000 0.000 0.008 NA 0.092
#> SRR2087286 2 0.3351 0.823 0.000 0.712 0.000 0.000 NA 0.288
#> SRR2087355 3 0.5716 0.798 0.024 0.000 0.548 0.000 NA 0.320
#> SRR2087331 1 0.3439 0.866 0.808 0.000 0.000 0.000 NA 0.072
#> SRR2087328 1 0.4540 0.855 0.696 0.000 0.000 0.004 NA 0.084
#> SRR2087321 4 0.4562 0.900 0.012 0.036 0.008 0.688 NA 0.000
#> SRR2087310 4 0.4647 0.898 0.012 0.036 0.008 0.672 NA 0.000
#> SRR2087341 1 0.3737 0.845 0.772 0.000 0.000 0.016 NA 0.024
#> SRR2087340 1 0.3614 0.844 0.792 0.000 0.000 0.016 NA 0.028
#> SRR2087283 2 0.1526 0.805 0.000 0.944 0.008 0.004 NA 0.008
#> SRR2087296 2 0.3942 0.824 0.000 0.720 0.004 0.004 NA 0.252
#> SRR2087337 1 0.3213 0.880 0.820 0.000 0.000 0.000 NA 0.048
#> SRR2087316 4 0.4584 0.899 0.012 0.036 0.008 0.684 NA 0.000
#> SRR2087325 4 0.4987 0.897 0.012 0.036 0.008 0.672 NA 0.016
#> SRR2087287 2 0.2600 0.779 0.000 0.860 0.008 0.000 NA 0.008
#> SRR2087289 2 0.1849 0.811 0.000 0.932 0.008 0.008 NA 0.032
#> SRR2087311 4 0.4584 0.899 0.012 0.036 0.008 0.684 NA 0.000
#> SRR2087324 4 0.4921 0.897 0.012 0.036 0.008 0.672 NA 0.012
#> SRR2087305 2 0.2884 0.780 0.000 0.848 0.012 0.004 NA 0.008
#> SRR2087282 2 0.2841 0.780 0.000 0.852 0.012 0.004 NA 0.008
#> SRR2087285 2 0.2698 0.779 0.000 0.860 0.008 0.004 NA 0.008
#> SRR2087290 2 0.3351 0.823 0.000 0.712 0.000 0.000 NA 0.288
#> SRR2087293 2 0.3351 0.823 0.000 0.712 0.000 0.000 NA 0.288
#> SRR2087329 1 0.4085 0.853 0.748 0.000 0.000 0.000 NA 0.096
#> SRR2087366 3 0.0922 0.804 0.024 0.000 0.968 0.004 NA 0.000
#> SRR2087300 2 0.3489 0.823 0.000 0.708 0.000 0.004 NA 0.288
#> SRR2087284 2 0.2798 0.779 0.000 0.856 0.012 0.004 NA 0.008
#> SRR2087303 2 0.4427 0.785 0.000 0.548 0.000 0.004 NA 0.428
#> SRR2087351 3 0.2186 0.802 0.024 0.000 0.908 0.012 NA 0.000
#> SRR2087302 2 0.3508 0.823 0.000 0.704 0.000 0.004 NA 0.292
#> SRR2087304 2 0.4427 0.785 0.000 0.548 0.000 0.004 NA 0.428
#> SRR2087298 2 0.4625 0.782 0.000 0.540 0.004 0.000 NA 0.424
#> SRR2087320 4 0.4647 0.898 0.012 0.036 0.008 0.672 NA 0.000
#> SRR2087308 4 0.4584 0.899 0.012 0.036 0.008 0.684 NA 0.000
#> SRR2087295 2 0.2600 0.779 0.000 0.860 0.008 0.000 NA 0.008
#> SRR2087292 2 0.3351 0.823 0.000 0.712 0.000 0.000 NA 0.288
#> SRR2087291 2 0.1692 0.810 0.000 0.940 0.008 0.008 NA 0.024
#> SRR2087294 2 0.2791 0.779 0.000 0.852 0.016 0.000 NA 0.008
#> SRR2087299 2 0.3833 0.758 0.000 0.788 0.016 0.000 NA 0.052
#> SRR2087288 2 0.4625 0.782 0.000 0.540 0.004 0.000 NA 0.424
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 16723 rows and 94 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 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 1.000 1.000 0.5038 0.497 0.497
#> 3 3 1.000 0.991 0.994 0.2895 0.841 0.684
#> 4 4 1.000 1.000 1.000 0.1642 0.886 0.677
#> 5 5 0.984 0.975 0.964 0.0261 0.978 0.910
#> 6 6 0.915 0.927 0.941 0.0207 0.997 0.989
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3 4
There is also optional best \(k\) = 2 3 4 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR2087314 2 0 1 0 1
#> SRR2087307 2 0 1 0 1
#> SRR2087359 1 0 1 1 0
#> SRR2087373 1 0 1 1 0
#> SRR2087363 1 0 1 1 0
#> SRR2087317 2 0 1 0 1
#> SRR2087313 2 0 1 0 1
#> SRR2087360 1 0 1 1 0
#> SRR2087375 1 0 1 1 0
#> SRR2087349 1 0 1 1 0
#> SRR2087326 1 0 1 1 0
#> SRR2087306 2 0 1 0 1
#> SRR2087347 1 0 1 1 0
#> SRR2087327 1 0 1 1 0
#> SRR2087318 2 0 1 0 1
#> SRR2087350 1 0 1 1 0
#> SRR2087309 2 0 1 0 1
#> SRR2087344 1 0 1 1 0
#> SRR2087364 1 0 1 1 0
#> SRR2087332 1 0 1 1 0
#> SRR2087336 1 0 1 1 0
#> SRR2087348 1 0 1 1 0
#> SRR2087353 1 0 1 1 0
#> SRR2087343 1 0 1 1 0
#> SRR2087322 2 0 1 0 1
#> SRR2087335 1 0 1 1 0
#> SRR2087362 1 0 1 1 0
#> SRR2087374 1 0 1 1 0
#> SRR2087346 1 0 1 1 0
#> SRR2087345 1 0 1 1 0
#> SRR2087358 1 0 1 1 0
#> SRR2087334 1 0 1 1 0
#> SRR2087323 2 0 1 0 1
#> SRR2087330 1 0 1 1 0
#> SRR2087354 1 0 1 1 0
#> SRR2087342 1 0 1 1 0
#> SRR2087369 1 0 1 1 0
#> SRR2087371 1 0 1 1 0
#> SRR2087361 1 0 1 1 0
#> SRR2087367 1 0 1 1 0
#> SRR2087301 2 0 1 0 1
#> SRR2087333 1 0 1 1 0
#> SRR2087356 1 0 1 1 0
#> SRR2087370 1 0 1 1 0
#> SRR2087312 2 0 1 0 1
#> SRR2087338 1 0 1 1 0
#> SRR2087365 1 0 1 1 0
#> SRR2087319 2 0 1 0 1
#> SRR2087368 1 0 1 1 0
#> SRR2087315 2 0 1 0 1
#> SRR2087372 1 0 1 1 0
#> SRR2087357 1 0 1 1 0
#> SRR2087297 2 0 1 0 1
#> SRR2087352 1 0 1 1 0
#> SRR2087339 1 0 1 1 0
#> SRR2087286 2 0 1 0 1
#> SRR2087355 1 0 1 1 0
#> SRR2087331 1 0 1 1 0
#> SRR2087328 1 0 1 1 0
#> SRR2087321 2 0 1 0 1
#> SRR2087310 2 0 1 0 1
#> SRR2087341 1 0 1 1 0
#> SRR2087340 1 0 1 1 0
#> SRR2087283 2 0 1 0 1
#> SRR2087296 2 0 1 0 1
#> SRR2087337 1 0 1 1 0
#> SRR2087316 2 0 1 0 1
#> SRR2087325 2 0 1 0 1
#> SRR2087287 2 0 1 0 1
#> SRR2087289 2 0 1 0 1
#> SRR2087311 2 0 1 0 1
#> SRR2087324 2 0 1 0 1
#> SRR2087305 2 0 1 0 1
#> SRR2087282 2 0 1 0 1
#> SRR2087285 2 0 1 0 1
#> SRR2087290 2 0 1 0 1
#> SRR2087293 2 0 1 0 1
#> SRR2087329 1 0 1 1 0
#> SRR2087366 1 0 1 1 0
#> SRR2087300 2 0 1 0 1
#> SRR2087284 2 0 1 0 1
#> SRR2087303 2 0 1 0 1
#> SRR2087351 1 0 1 1 0
#> SRR2087302 2 0 1 0 1
#> SRR2087304 2 0 1 0 1
#> SRR2087298 2 0 1 0 1
#> SRR2087320 2 0 1 0 1
#> SRR2087308 2 0 1 0 1
#> SRR2087295 2 0 1 0 1
#> SRR2087292 2 0 1 0 1
#> SRR2087291 2 0 1 0 1
#> SRR2087294 2 0 1 0 1
#> SRR2087299 2 0 1 0 1
#> SRR2087288 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087307 3 0.5178 0.649 0.000 0.256 0.744
#> SRR2087359 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087373 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087363 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087317 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087313 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087360 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087375 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087349 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087306 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087347 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087318 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087350 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087309 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087344 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087364 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087332 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087353 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087343 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087322 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087335 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087362 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087374 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087346 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087358 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087334 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087323 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087330 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087354 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087342 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087369 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087371 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087361 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087367 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087301 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087333 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087356 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087370 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087312 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087338 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087365 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087319 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087368 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087315 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087372 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087357 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087297 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087352 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087339 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087286 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087355 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087331 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087321 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087310 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087341 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087283 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087296 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087337 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087316 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087325 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087287 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087289 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087311 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087324 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087305 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087282 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087285 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087290 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087293 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087329 1 0.0000 1.000 1.000 0.000 0.000
#> SRR2087366 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087300 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087284 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087303 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087351 3 0.0237 0.988 0.004 0.000 0.996
#> SRR2087302 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087304 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087298 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087320 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087308 2 0.0661 0.994 0.008 0.988 0.004
#> SRR2087295 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087292 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087291 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087294 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087299 2 0.0000 0.995 0.000 1.000 0.000
#> SRR2087288 2 0.0000 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
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.0000 0.995 0.000 0.000 0 0.000 1.000
#> SRR2087307 4 0.1792 0.730 0.000 0.000 0 0.916 0.084
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087317 5 0.0162 0.997 0.000 0.000 0 0.004 0.996
#> SRR2087313 5 0.0162 0.997 0.000 0.000 0 0.004 0.996
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087349 1 0.0880 0.981 0.968 0.000 0 0.032 0.000
#> SRR2087326 1 0.0880 0.981 0.968 0.000 0 0.032 0.000
#> SRR2087306 5 0.0000 0.995 0.000 0.000 0 0.000 1.000
#> SRR2087347 1 0.0000 0.984 1.000 0.000 0 0.000 0.000
#> SRR2087327 1 0.0880 0.981 0.968 0.000 0 0.032 0.000
#> SRR2087318 5 0.0162 0.997 0.000 0.000 0 0.004 0.996
#> SRR2087350 1 0.0880 0.981 0.968 0.000 0 0.032 0.000
#> SRR2087309 5 0.0162 0.997 0.000 0.000 0 0.004 0.996
#> SRR2087344 1 0.0703 0.977 0.976 0.000 0 0.024 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087332 1 0.0000 0.984 1.000 0.000 0 0.000 0.000
#> SRR2087336 1 0.0880 0.981 0.968 0.000 0 0.032 0.000
#> SRR2087348 1 0.0794 0.977 0.972 0.000 0 0.028 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087343 1 0.0290 0.984 0.992 0.000 0 0.008 0.000
#> SRR2087322 4 0.3177 0.872 0.000 0.000 0 0.792 0.208
#> SRR2087335 1 0.0609 0.978 0.980 0.000 0 0.020 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087346 1 0.0000 0.984 1.000 0.000 0 0.000 0.000
#> SRR2087345 1 0.0000 0.984 1.000 0.000 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087334 1 0.0000 0.984 1.000 0.000 0 0.000 0.000
#> SRR2087323 4 0.3305 0.880 0.000 0.000 0 0.776 0.224
#> SRR2087330 1 0.0609 0.978 0.980 0.000 0 0.020 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087342 1 0.0609 0.978 0.980 0.000 0 0.020 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087301 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087333 1 0.0000 0.984 1.000 0.000 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087312 4 0.3336 0.874 0.000 0.000 0 0.772 0.228
#> SRR2087338 1 0.0510 0.983 0.984 0.000 0 0.016 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087319 5 0.0000 0.995 0.000 0.000 0 0.000 1.000
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087315 5 0.0290 0.992 0.000 0.000 0 0.008 0.992
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087297 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087339 1 0.0510 0.983 0.984 0.000 0 0.016 0.000
#> SRR2087286 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087331 1 0.0794 0.981 0.972 0.000 0 0.028 0.000
#> SRR2087328 1 0.0963 0.980 0.964 0.000 0 0.036 0.000
#> SRR2087321 4 0.4030 0.862 0.000 0.000 0 0.648 0.352
#> SRR2087310 4 0.3857 0.876 0.000 0.000 0 0.688 0.312
#> SRR2087341 1 0.0794 0.977 0.972 0.000 0 0.028 0.000
#> SRR2087340 1 0.0703 0.977 0.976 0.000 0 0.024 0.000
#> SRR2087283 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087296 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087337 1 0.0794 0.981 0.972 0.000 0 0.028 0.000
#> SRR2087316 4 0.4060 0.855 0.000 0.000 0 0.640 0.360
#> SRR2087325 4 0.3336 0.874 0.000 0.000 0 0.772 0.228
#> SRR2087287 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087289 2 0.0290 0.995 0.000 0.992 0 0.008 0.000
#> SRR2087311 4 0.4101 0.843 0.000 0.000 0 0.628 0.372
#> SRR2087324 4 0.3336 0.880 0.000 0.000 0 0.772 0.228
#> SRR2087305 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087282 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087285 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087290 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087293 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087329 1 0.0880 0.981 0.968 0.000 0 0.032 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087300 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087284 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087303 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> SRR2087302 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087304 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087298 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087320 4 0.3837 0.878 0.000 0.000 0 0.692 0.308
#> SRR2087308 4 0.4088 0.848 0.000 0.000 0 0.632 0.368
#> SRR2087295 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087292 2 0.0000 0.995 0.000 1.000 0 0.000 0.000
#> SRR2087291 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087294 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087299 2 0.0404 0.994 0.000 0.988 0 0.012 0.000
#> SRR2087288 2 0.0000 0.995 0.000 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
#> SRR2087314 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087307 5 0.4799 0.000 0.000 0.000 0.000 0.340 0.592 0.068
#> SRR2087359 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087373 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087363 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087317 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087313 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087360 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087375 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087349 1 0.2340 0.899 0.852 0.000 0.000 0.000 0.148 0.000
#> SRR2087326 1 0.2340 0.899 0.852 0.000 0.000 0.000 0.148 0.000
#> SRR2087306 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087347 1 0.0547 0.916 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR2087327 1 0.2340 0.899 0.852 0.000 0.000 0.000 0.148 0.000
#> SRR2087318 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087350 1 0.2340 0.899 0.852 0.000 0.000 0.000 0.148 0.000
#> SRR2087309 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087344 1 0.1814 0.877 0.900 0.000 0.000 0.000 0.100 0.000
#> SRR2087364 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087332 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087336 1 0.2340 0.899 0.852 0.000 0.000 0.000 0.148 0.000
#> SRR2087348 1 0.2378 0.886 0.848 0.000 0.000 0.000 0.152 0.000
#> SRR2087353 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087343 1 0.0260 0.915 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR2087322 4 0.1802 0.842 0.000 0.000 0.000 0.916 0.072 0.012
#> SRR2087335 1 0.1663 0.883 0.912 0.000 0.000 0.000 0.088 0.000
#> SRR2087362 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087374 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087346 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087358 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087334 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087323 4 0.0363 0.880 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR2087330 1 0.1610 0.885 0.916 0.000 0.000 0.000 0.084 0.000
#> SRR2087354 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087342 1 0.1714 0.881 0.908 0.000 0.000 0.000 0.092 0.000
#> SRR2087369 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087371 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087361 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087367 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087301 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087333 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087356 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087370 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087312 4 0.2121 0.805 0.000 0.000 0.000 0.892 0.096 0.012
#> SRR2087338 1 0.1814 0.908 0.900 0.000 0.000 0.000 0.100 0.000
#> SRR2087365 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087319 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087368 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087315 6 0.1204 1.000 0.000 0.000 0.000 0.056 0.000 0.944
#> SRR2087372 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087357 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087297 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087352 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087339 1 0.1814 0.908 0.900 0.000 0.000 0.000 0.100 0.000
#> SRR2087286 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087355 3 0.1141 0.972 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR2087331 1 0.2178 0.903 0.868 0.000 0.000 0.000 0.132 0.000
#> SRR2087328 1 0.2454 0.897 0.840 0.000 0.000 0.000 0.160 0.000
#> SRR2087321 4 0.1444 0.889 0.000 0.000 0.000 0.928 0.000 0.072
#> SRR2087310 4 0.1075 0.893 0.000 0.000 0.000 0.952 0.000 0.048
#> SRR2087341 1 0.2219 0.880 0.864 0.000 0.000 0.000 0.136 0.000
#> SRR2087340 1 0.1814 0.877 0.900 0.000 0.000 0.000 0.100 0.000
#> SRR2087283 2 0.1610 0.943 0.000 0.916 0.000 0.000 0.084 0.000
#> SRR2087296 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087337 1 0.1814 0.914 0.900 0.000 0.000 0.000 0.100 0.000
#> SRR2087316 4 0.1556 0.882 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR2087325 4 0.2121 0.805 0.000 0.000 0.000 0.892 0.096 0.012
#> SRR2087287 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087289 2 0.0937 0.952 0.000 0.960 0.000 0.000 0.040 0.000
#> SRR2087311 4 0.1556 0.882 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR2087324 4 0.1500 0.860 0.000 0.000 0.000 0.936 0.052 0.012
#> SRR2087305 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087282 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087285 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087290 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087293 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087329 1 0.2340 0.899 0.852 0.000 0.000 0.000 0.148 0.000
#> SRR2087366 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087300 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087284 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087303 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087351 3 0.0000 0.975 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087302 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087304 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087298 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087320 4 0.1007 0.893 0.000 0.000 0.000 0.956 0.000 0.044
#> SRR2087308 4 0.1556 0.882 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR2087295 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087292 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087291 2 0.1444 0.946 0.000 0.928 0.000 0.000 0.072 0.000
#> SRR2087294 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087299 2 0.1910 0.936 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2087288 2 0.0000 0.956 0.000 1.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "pam"]
# you can also extract it by
# res = res_list["MAD:pam"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16723 rows and 94 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 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.999 0.964 0.985 0.4931 0.506 0.506
#> 3 3 0.896 0.870 0.947 0.3438 0.690 0.462
#> 4 4 1.000 1.000 1.000 0.1415 0.866 0.626
#> 5 5 0.943 0.966 0.956 0.0328 0.977 0.907
#> 6 6 0.999 0.982 0.989 0.0404 0.966 0.845
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
#> SRR2087314 1 0.1184 0.9716 0.984 0.016
#> SRR2087307 1 0.0000 0.9869 1.000 0.000
#> SRR2087359 1 0.0000 0.9869 1.000 0.000
#> SRR2087373 1 0.0000 0.9869 1.000 0.000
#> SRR2087363 1 0.0000 0.9869 1.000 0.000
#> SRR2087317 2 0.6247 0.8308 0.156 0.844
#> SRR2087313 2 0.4562 0.8997 0.096 0.904
#> SRR2087360 1 0.0000 0.9869 1.000 0.000
#> SRR2087375 1 0.0000 0.9869 1.000 0.000
#> SRR2087349 1 0.0000 0.9869 1.000 0.000
#> SRR2087326 1 0.0000 0.9869 1.000 0.000
#> SRR2087306 1 0.6531 0.7866 0.832 0.168
#> SRR2087347 1 0.0000 0.9869 1.000 0.000
#> SRR2087327 1 0.0000 0.9869 1.000 0.000
#> SRR2087318 2 0.1184 0.9719 0.016 0.984
#> SRR2087350 1 0.0000 0.9869 1.000 0.000
#> SRR2087309 2 0.7219 0.7688 0.200 0.800
#> SRR2087344 1 0.0000 0.9869 1.000 0.000
#> SRR2087364 1 0.0000 0.9869 1.000 0.000
#> SRR2087332 1 0.0000 0.9869 1.000 0.000
#> SRR2087336 1 0.0000 0.9869 1.000 0.000
#> SRR2087348 1 0.0000 0.9869 1.000 0.000
#> SRR2087353 1 0.0000 0.9869 1.000 0.000
#> SRR2087343 1 0.0000 0.9869 1.000 0.000
#> SRR2087322 2 0.3733 0.9237 0.072 0.928
#> SRR2087335 1 0.0000 0.9869 1.000 0.000
#> SRR2087362 1 0.0000 0.9869 1.000 0.000
#> SRR2087374 1 0.0000 0.9869 1.000 0.000
#> SRR2087346 1 0.0000 0.9869 1.000 0.000
#> SRR2087345 1 0.0000 0.9869 1.000 0.000
#> SRR2087358 1 0.0000 0.9869 1.000 0.000
#> SRR2087334 1 0.0000 0.9869 1.000 0.000
#> SRR2087323 2 0.0000 0.9798 0.000 1.000
#> SRR2087330 1 0.0000 0.9869 1.000 0.000
#> SRR2087354 1 0.0000 0.9869 1.000 0.000
#> SRR2087342 1 0.0000 0.9869 1.000 0.000
#> SRR2087369 1 0.0000 0.9869 1.000 0.000
#> SRR2087371 1 0.0000 0.9869 1.000 0.000
#> SRR2087361 1 0.0000 0.9869 1.000 0.000
#> SRR2087367 1 0.0000 0.9869 1.000 0.000
#> SRR2087301 2 0.0000 0.9798 0.000 1.000
#> SRR2087333 1 0.0000 0.9869 1.000 0.000
#> SRR2087356 1 0.0000 0.9869 1.000 0.000
#> SRR2087370 1 0.0000 0.9869 1.000 0.000
#> SRR2087312 2 0.0376 0.9781 0.004 0.996
#> SRR2087338 1 0.0672 0.9795 0.992 0.008
#> SRR2087365 1 0.0000 0.9869 1.000 0.000
#> SRR2087319 1 0.9983 0.0482 0.524 0.476
#> SRR2087368 1 0.0000 0.9869 1.000 0.000
#> SRR2087315 2 0.0938 0.9742 0.012 0.988
#> SRR2087372 1 0.0000 0.9869 1.000 0.000
#> SRR2087357 1 0.0000 0.9869 1.000 0.000
#> SRR2087297 2 0.0000 0.9798 0.000 1.000
#> SRR2087352 1 0.0000 0.9869 1.000 0.000
#> SRR2087339 1 0.0000 0.9869 1.000 0.000
#> SRR2087286 2 0.0000 0.9798 0.000 1.000
#> SRR2087355 1 0.0000 0.9869 1.000 0.000
#> SRR2087331 1 0.0000 0.9869 1.000 0.000
#> SRR2087328 1 0.0000 0.9869 1.000 0.000
#> SRR2087321 2 0.1184 0.9719 0.016 0.984
#> SRR2087310 2 0.1184 0.9719 0.016 0.984
#> SRR2087341 1 0.0000 0.9869 1.000 0.000
#> SRR2087340 1 0.0000 0.9869 1.000 0.000
#> SRR2087283 2 0.0000 0.9798 0.000 1.000
#> SRR2087296 2 0.0000 0.9798 0.000 1.000
#> SRR2087337 1 0.0000 0.9869 1.000 0.000
#> SRR2087316 2 0.0000 0.9798 0.000 1.000
#> SRR2087325 2 0.6247 0.8308 0.156 0.844
#> SRR2087287 2 0.0000 0.9798 0.000 1.000
#> SRR2087289 2 0.0000 0.9798 0.000 1.000
#> SRR2087311 2 0.1184 0.9719 0.016 0.984
#> SRR2087324 2 0.0672 0.9763 0.008 0.992
#> SRR2087305 2 0.0000 0.9798 0.000 1.000
#> SRR2087282 2 0.0000 0.9798 0.000 1.000
#> SRR2087285 2 0.0000 0.9798 0.000 1.000
#> SRR2087290 2 0.0000 0.9798 0.000 1.000
#> SRR2087293 2 0.0000 0.9798 0.000 1.000
#> SRR2087329 1 0.0000 0.9869 1.000 0.000
#> SRR2087366 1 0.0000 0.9869 1.000 0.000
#> SRR2087300 2 0.0000 0.9798 0.000 1.000
#> SRR2087284 2 0.0000 0.9798 0.000 1.000
#> SRR2087303 2 0.0000 0.9798 0.000 1.000
#> SRR2087351 1 0.0000 0.9869 1.000 0.000
#> SRR2087302 2 0.0000 0.9798 0.000 1.000
#> SRR2087304 2 0.0000 0.9798 0.000 1.000
#> SRR2087298 2 0.0000 0.9798 0.000 1.000
#> SRR2087320 2 0.0000 0.9798 0.000 1.000
#> SRR2087308 2 0.0938 0.9742 0.012 0.988
#> SRR2087295 2 0.0000 0.9798 0.000 1.000
#> SRR2087292 2 0.0000 0.9798 0.000 1.000
#> SRR2087291 2 0.0000 0.9798 0.000 1.000
#> SRR2087294 2 0.0000 0.9798 0.000 1.000
#> SRR2087299 2 0.0000 0.9798 0.000 1.000
#> SRR2087288 2 0.0000 0.9798 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087307 3 0.0237 0.996 0.004 0.000 0.996
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087317 1 0.1411 0.871 0.964 0.036 0.000
#> SRR2087313 1 0.3482 0.797 0.872 0.128 0.000
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087349 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087326 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087306 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087347 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087327 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087318 1 0.6215 0.347 0.572 0.428 0.000
#> SRR2087350 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087309 1 0.2711 0.832 0.912 0.088 0.000
#> SRR2087344 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087332 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087336 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087348 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087343 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087322 1 0.7601 0.312 0.540 0.416 0.044
#> SRR2087335 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087346 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087345 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087334 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087323 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087330 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087342 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087301 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087333 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087312 2 0.5905 0.354 0.352 0.648 0.000
#> SRR2087338 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087319 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087315 1 0.6235 0.328 0.564 0.436 0.000
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087297 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087339 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087286 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087331 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087328 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087321 1 0.6244 0.317 0.560 0.440 0.000
#> SRR2087310 2 0.9840 0.156 0.256 0.408 0.336
#> SRR2087341 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087340 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087283 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087296 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087337 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087316 2 0.5968 0.319 0.364 0.636 0.000
#> SRR2087325 1 0.5363 0.622 0.724 0.276 0.000
#> SRR2087287 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087289 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087311 1 0.6154 0.391 0.592 0.408 0.000
#> SRR2087324 1 0.6309 0.130 0.500 0.500 0.000
#> SRR2087305 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087282 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087285 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087290 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087293 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087329 1 0.0000 0.895 1.000 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087300 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087284 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087303 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1.000
#> SRR2087302 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087304 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087298 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087320 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087308 1 0.6252 0.307 0.556 0.444 0.000
#> SRR2087295 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087292 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087291 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087294 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087299 2 0.0000 0.950 0.000 1.000 0.000
#> SRR2087288 2 0.0000 0.950 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087307 5 0.364 0.886 0.000 0 0 0.272 0.728
#> SRR2087359 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087373 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087363 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087317 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087313 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087360 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087375 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087349 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087326 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087306 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087347 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087327 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087318 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087350 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087309 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087344 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087364 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087332 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087336 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087348 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087353 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087343 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087322 4 0.196 0.891 0.000 0 0 0.904 0.096
#> SRR2087335 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087362 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087374 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087346 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087345 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087358 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087334 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087323 4 0.000 0.949 0.000 0 0 1.000 0.000
#> SRR2087330 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087354 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087342 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087369 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087371 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087361 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087367 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087301 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087333 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087356 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087370 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087312 4 0.196 0.891 0.000 0 0 0.904 0.096
#> SRR2087338 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087365 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087319 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087368 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087315 5 0.304 0.987 0.000 0 0 0.192 0.808
#> SRR2087372 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087357 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087297 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087352 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087339 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087286 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087355 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087331 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087328 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087321 4 0.000 0.949 0.000 0 0 1.000 0.000
#> SRR2087310 4 0.000 0.949 0.000 0 0 1.000 0.000
#> SRR2087341 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087340 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087283 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087296 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087337 1 0.000 0.928 1.000 0 0 0.000 0.000
#> SRR2087316 4 0.000 0.949 0.000 0 0 1.000 0.000
#> SRR2087325 4 0.196 0.891 0.000 0 0 0.904 0.096
#> SRR2087287 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087289 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087311 4 0.161 0.897 0.000 0 0 0.928 0.072
#> SRR2087324 4 0.000 0.949 0.000 0 0 1.000 0.000
#> SRR2087305 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087282 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087285 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087290 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087293 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087329 1 0.304 0.889 0.808 0 0 0.000 0.192
#> SRR2087366 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087300 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087284 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087303 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087351 3 0.000 1.000 0.000 0 1 0.000 0.000
#> SRR2087302 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087304 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087298 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087320 4 0.000 0.949 0.000 0 0 1.000 0.000
#> SRR2087308 4 0.088 0.932 0.000 0 0 0.968 0.032
#> SRR2087295 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087292 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087291 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087294 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087299 2 0.000 1.000 0.000 1 0 0.000 0.000
#> SRR2087288 2 0.000 1.000 0.000 1 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
#> SRR2087314 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087307 6 0.1610 0.906 0.000 0.000 0 0.084 0.000 0.916
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087317 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087313 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087349 5 0.0260 0.956 0.008 0.000 0 0.000 0.992 0.000
#> SRR2087326 5 0.0260 0.956 0.008 0.000 0 0.000 0.992 0.000
#> SRR2087306 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087347 1 0.0146 0.995 0.996 0.000 0 0.000 0.004 0.000
#> SRR2087327 5 0.0260 0.956 0.008 0.000 0 0.000 0.992 0.000
#> SRR2087318 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087350 5 0.0260 0.956 0.008 0.000 0 0.000 0.992 0.000
#> SRR2087309 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087344 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087332 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087336 5 0.0260 0.956 0.008 0.000 0 0.000 0.992 0.000
#> SRR2087348 5 0.2135 0.864 0.128 0.000 0 0.000 0.872 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087343 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087322 4 0.1765 0.914 0.000 0.000 0 0.904 0.000 0.096
#> SRR2087335 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087346 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087334 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087323 4 0.0000 0.958 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087330 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087342 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087301 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087333 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087312 4 0.1765 0.914 0.000 0.000 0 0.904 0.000 0.096
#> SRR2087338 5 0.1501 0.917 0.076 0.000 0 0.000 0.924 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087319 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087315 6 0.0000 0.989 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087297 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087339 5 0.2491 0.834 0.164 0.000 0 0.000 0.836 0.000
#> SRR2087286 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087331 1 0.0458 0.985 0.984 0.000 0 0.000 0.016 0.000
#> SRR2087328 5 0.0260 0.956 0.008 0.000 0 0.000 0.992 0.000
#> SRR2087321 4 0.0000 0.958 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087310 4 0.0000 0.958 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087341 1 0.0146 0.995 0.996 0.000 0 0.000 0.004 0.000
#> SRR2087340 1 0.0000 0.997 1.000 0.000 0 0.000 0.000 0.000
#> SRR2087283 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087296 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087337 1 0.0547 0.981 0.980 0.000 0 0.000 0.020 0.000
#> SRR2087316 4 0.0000 0.958 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087325 4 0.1765 0.914 0.000 0.000 0 0.904 0.000 0.096
#> SRR2087287 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087289 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087311 4 0.1501 0.915 0.000 0.000 0 0.924 0.000 0.076
#> SRR2087324 4 0.0000 0.958 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087305 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087282 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087285 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087290 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087293 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087329 5 0.0260 0.956 0.008 0.000 0 0.000 0.992 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087300 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087284 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087303 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087302 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087304 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087298 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087320 4 0.0000 0.958 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087308 4 0.0865 0.944 0.000 0.000 0 0.964 0.000 0.036
#> SRR2087295 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087292 2 0.0260 0.996 0.000 0.992 0 0.000 0.008 0.000
#> SRR2087291 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087294 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087299 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
#> SRR2087288 2 0.0000 0.997 0.000 1.000 0 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "mclust"]
# you can also extract it by
# res = res_list["MAD:mclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16723 rows and 94 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 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.996 0.996 0.50382 0.497 0.497
#> 3 3 1.000 1.000 1.000 0.27443 0.633 0.399
#> 4 4 1.000 1.000 1.000 0.17798 0.886 0.681
#> 5 5 1.000 0.983 0.996 0.00716 0.996 0.982
#> 6 6 0.955 0.819 0.924 0.02845 0.989 0.956
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
#> SRR2087314 2 0.0672 0.995 0.008 0.992
#> SRR2087307 2 0.0672 0.995 0.008 0.992
#> SRR2087359 1 0.0000 0.996 1.000 0.000
#> SRR2087373 1 0.0000 0.996 1.000 0.000
#> SRR2087363 1 0.0000 0.996 1.000 0.000
#> SRR2087317 2 0.0672 0.995 0.008 0.992
#> SRR2087313 2 0.0672 0.995 0.008 0.992
#> SRR2087360 1 0.0000 0.996 1.000 0.000
#> SRR2087375 1 0.0000 0.996 1.000 0.000
#> SRR2087349 1 0.0672 0.996 0.992 0.008
#> SRR2087326 1 0.0672 0.996 0.992 0.008
#> SRR2087306 2 0.0672 0.995 0.008 0.992
#> SRR2087347 1 0.0672 0.996 0.992 0.008
#> SRR2087327 1 0.0672 0.996 0.992 0.008
#> SRR2087318 2 0.0672 0.995 0.008 0.992
#> SRR2087350 1 0.0672 0.996 0.992 0.008
#> SRR2087309 2 0.0672 0.995 0.008 0.992
#> SRR2087344 1 0.0672 0.996 0.992 0.008
#> SRR2087364 1 0.0000 0.996 1.000 0.000
#> SRR2087332 1 0.0672 0.996 0.992 0.008
#> SRR2087336 1 0.0672 0.996 0.992 0.008
#> SRR2087348 1 0.0672 0.996 0.992 0.008
#> SRR2087353 1 0.0000 0.996 1.000 0.000
#> SRR2087343 1 0.0672 0.996 0.992 0.008
#> SRR2087322 2 0.0672 0.995 0.008 0.992
#> SRR2087335 1 0.0672 0.996 0.992 0.008
#> SRR2087362 1 0.0000 0.996 1.000 0.000
#> SRR2087374 1 0.0000 0.996 1.000 0.000
#> SRR2087346 1 0.0672 0.996 0.992 0.008
#> SRR2087345 1 0.0672 0.996 0.992 0.008
#> SRR2087358 1 0.0000 0.996 1.000 0.000
#> SRR2087334 1 0.0672 0.996 0.992 0.008
#> SRR2087323 2 0.0672 0.995 0.008 0.992
#> SRR2087330 1 0.0672 0.996 0.992 0.008
#> SRR2087354 1 0.0000 0.996 1.000 0.000
#> SRR2087342 1 0.0672 0.996 0.992 0.008
#> SRR2087369 1 0.0000 0.996 1.000 0.000
#> SRR2087371 1 0.0000 0.996 1.000 0.000
#> SRR2087361 1 0.0000 0.996 1.000 0.000
#> SRR2087367 1 0.0000 0.996 1.000 0.000
#> SRR2087301 2 0.0000 0.996 0.000 1.000
#> SRR2087333 1 0.0672 0.996 0.992 0.008
#> SRR2087356 1 0.0000 0.996 1.000 0.000
#> SRR2087370 1 0.0000 0.996 1.000 0.000
#> SRR2087312 2 0.0672 0.995 0.008 0.992
#> SRR2087338 1 0.0672 0.996 0.992 0.008
#> SRR2087365 1 0.0000 0.996 1.000 0.000
#> SRR2087319 2 0.0672 0.995 0.008 0.992
#> SRR2087368 1 0.0000 0.996 1.000 0.000
#> SRR2087315 2 0.0672 0.995 0.008 0.992
#> SRR2087372 1 0.0000 0.996 1.000 0.000
#> SRR2087357 1 0.0000 0.996 1.000 0.000
#> SRR2087297 2 0.0000 0.996 0.000 1.000
#> SRR2087352 1 0.0000 0.996 1.000 0.000
#> SRR2087339 1 0.0672 0.996 0.992 0.008
#> SRR2087286 2 0.0000 0.996 0.000 1.000
#> SRR2087355 1 0.0000 0.996 1.000 0.000
#> SRR2087331 1 0.0672 0.996 0.992 0.008
#> SRR2087328 1 0.0672 0.996 0.992 0.008
#> SRR2087321 2 0.0672 0.995 0.008 0.992
#> SRR2087310 2 0.0672 0.995 0.008 0.992
#> SRR2087341 1 0.0672 0.996 0.992 0.008
#> SRR2087340 1 0.0672 0.996 0.992 0.008
#> SRR2087283 2 0.0000 0.996 0.000 1.000
#> SRR2087296 2 0.0000 0.996 0.000 1.000
#> SRR2087337 1 0.0672 0.996 0.992 0.008
#> SRR2087316 2 0.0672 0.995 0.008 0.992
#> SRR2087325 2 0.0672 0.995 0.008 0.992
#> SRR2087287 2 0.0000 0.996 0.000 1.000
#> SRR2087289 2 0.0000 0.996 0.000 1.000
#> SRR2087311 2 0.0672 0.995 0.008 0.992
#> SRR2087324 2 0.0672 0.995 0.008 0.992
#> SRR2087305 2 0.0000 0.996 0.000 1.000
#> SRR2087282 2 0.0000 0.996 0.000 1.000
#> SRR2087285 2 0.0000 0.996 0.000 1.000
#> SRR2087290 2 0.0000 0.996 0.000 1.000
#> SRR2087293 2 0.0000 0.996 0.000 1.000
#> SRR2087329 1 0.0672 0.996 0.992 0.008
#> SRR2087366 1 0.0000 0.996 1.000 0.000
#> SRR2087300 2 0.0000 0.996 0.000 1.000
#> SRR2087284 2 0.0000 0.996 0.000 1.000
#> SRR2087303 2 0.0000 0.996 0.000 1.000
#> SRR2087351 1 0.0000 0.996 1.000 0.000
#> SRR2087302 2 0.0000 0.996 0.000 1.000
#> SRR2087304 2 0.0000 0.996 0.000 1.000
#> SRR2087298 2 0.0000 0.996 0.000 1.000
#> SRR2087320 2 0.0672 0.995 0.008 0.992
#> SRR2087308 2 0.0672 0.995 0.008 0.992
#> SRR2087295 2 0.0000 0.996 0.000 1.000
#> SRR2087292 2 0.0000 0.996 0.000 1.000
#> SRR2087291 2 0.0000 0.996 0.000 1.000
#> SRR2087294 2 0.0000 0.996 0.000 1.000
#> SRR2087299 2 0.0000 0.996 0.000 1.000
#> SRR2087288 2 0.0000 0.996 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0 1 1 0 0
#> SRR2087307 1 0 1 1 0 0
#> SRR2087359 3 0 1 0 0 1
#> SRR2087373 3 0 1 0 0 1
#> SRR2087363 3 0 1 0 0 1
#> SRR2087317 1 0 1 1 0 0
#> SRR2087313 1 0 1 1 0 0
#> SRR2087360 3 0 1 0 0 1
#> SRR2087375 3 0 1 0 0 1
#> SRR2087349 1 0 1 1 0 0
#> SRR2087326 1 0 1 1 0 0
#> SRR2087306 1 0 1 1 0 0
#> SRR2087347 1 0 1 1 0 0
#> SRR2087327 1 0 1 1 0 0
#> SRR2087318 1 0 1 1 0 0
#> SRR2087350 1 0 1 1 0 0
#> SRR2087309 1 0 1 1 0 0
#> SRR2087344 1 0 1 1 0 0
#> SRR2087364 3 0 1 0 0 1
#> SRR2087332 1 0 1 1 0 0
#> SRR2087336 1 0 1 1 0 0
#> SRR2087348 1 0 1 1 0 0
#> SRR2087353 3 0 1 0 0 1
#> SRR2087343 1 0 1 1 0 0
#> SRR2087322 1 0 1 1 0 0
#> SRR2087335 1 0 1 1 0 0
#> SRR2087362 3 0 1 0 0 1
#> SRR2087374 3 0 1 0 0 1
#> SRR2087346 1 0 1 1 0 0
#> SRR2087345 1 0 1 1 0 0
#> SRR2087358 3 0 1 0 0 1
#> SRR2087334 1 0 1 1 0 0
#> SRR2087323 1 0 1 1 0 0
#> SRR2087330 1 0 1 1 0 0
#> SRR2087354 3 0 1 0 0 1
#> SRR2087342 1 0 1 1 0 0
#> SRR2087369 3 0 1 0 0 1
#> SRR2087371 3 0 1 0 0 1
#> SRR2087361 3 0 1 0 0 1
#> SRR2087367 3 0 1 0 0 1
#> SRR2087301 2 0 1 0 1 0
#> SRR2087333 1 0 1 1 0 0
#> SRR2087356 3 0 1 0 0 1
#> SRR2087370 3 0 1 0 0 1
#> SRR2087312 1 0 1 1 0 0
#> SRR2087338 1 0 1 1 0 0
#> SRR2087365 3 0 1 0 0 1
#> SRR2087319 1 0 1 1 0 0
#> SRR2087368 3 0 1 0 0 1
#> SRR2087315 1 0 1 1 0 0
#> SRR2087372 3 0 1 0 0 1
#> SRR2087357 3 0 1 0 0 1
#> SRR2087297 2 0 1 0 1 0
#> SRR2087352 3 0 1 0 0 1
#> SRR2087339 1 0 1 1 0 0
#> SRR2087286 2 0 1 0 1 0
#> SRR2087355 3 0 1 0 0 1
#> SRR2087331 1 0 1 1 0 0
#> SRR2087328 1 0 1 1 0 0
#> SRR2087321 1 0 1 1 0 0
#> SRR2087310 1 0 1 1 0 0
#> SRR2087341 1 0 1 1 0 0
#> SRR2087340 1 0 1 1 0 0
#> SRR2087283 2 0 1 0 1 0
#> SRR2087296 2 0 1 0 1 0
#> SRR2087337 1 0 1 1 0 0
#> SRR2087316 1 0 1 1 0 0
#> SRR2087325 1 0 1 1 0 0
#> SRR2087287 2 0 1 0 1 0
#> SRR2087289 2 0 1 0 1 0
#> SRR2087311 1 0 1 1 0 0
#> SRR2087324 1 0 1 1 0 0
#> SRR2087305 2 0 1 0 1 0
#> SRR2087282 2 0 1 0 1 0
#> SRR2087285 2 0 1 0 1 0
#> SRR2087290 2 0 1 0 1 0
#> SRR2087293 2 0 1 0 1 0
#> SRR2087329 1 0 1 1 0 0
#> SRR2087366 3 0 1 0 0 1
#> SRR2087300 2 0 1 0 1 0
#> SRR2087284 2 0 1 0 1 0
#> SRR2087303 2 0 1 0 1 0
#> SRR2087351 3 0 1 0 0 1
#> SRR2087302 2 0 1 0 1 0
#> SRR2087304 2 0 1 0 1 0
#> SRR2087298 2 0 1 0 1 0
#> SRR2087320 1 0 1 1 0 0
#> SRR2087308 1 0 1 1 0 0
#> SRR2087295 2 0 1 0 1 0
#> SRR2087292 2 0 1 0 1 0
#> SRR2087291 2 0 1 0 1 0
#> SRR2087294 2 0 1 0 1 0
#> SRR2087299 2 0 1 0 1 0
#> SRR2087288 2 0 1 0 1 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087307 5 0.0000 0.000 0 0 0 0.000 1.000
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087313 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087306 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.0404 0.978 0 0 0 0.988 0.012
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.0404 0.978 0 0 0 0.988 0.012
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087323 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.2179 0.900 0 0 0 0.888 0.112
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087319 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.0404 0.978 0 0 0 0.988 0.012
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087310 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.0404 0.978 0 0 0 0.988 0.012
#> SRR2087325 4 0.1671 0.935 0 0 0 0.924 0.076
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087324 4 0.1544 0.942 0 0 0 0.932 0.068
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087320 4 0.0000 0.981 0 0 0 1.000 0.000
#> SRR2087308 4 0.1270 0.953 0 0 0 0.948 0.052
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 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
#> SRR2087314 4 0.3563 0.744 0.000 0 0 0.664 0.336 0.000
#> SRR2087307 6 0.0000 0.000 0.000 0 0 0.000 0.000 1.000
#> SRR2087359 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087317 4 0.3428 0.771 0.000 0 0 0.696 0.304 0.000
#> SRR2087313 4 0.3499 0.753 0.000 0 0 0.680 0.320 0.000
#> SRR2087360 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087349 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087326 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087306 4 0.3547 0.745 0.000 0 0 0.668 0.332 0.000
#> SRR2087347 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087327 1 0.3860 -0.920 0.528 0 0 0.000 0.472 0.000
#> SRR2087318 4 0.2003 0.767 0.000 0 0 0.884 0.116 0.000
#> SRR2087350 1 0.3860 -0.920 0.528 0 0 0.000 0.472 0.000
#> SRR2087309 4 0.1910 0.788 0.000 0 0 0.892 0.108 0.000
#> SRR2087344 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087332 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087336 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087348 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087343 1 0.0146 0.812 0.996 0 0 0.000 0.004 0.000
#> SRR2087322 4 0.0865 0.762 0.000 0 0 0.964 0.036 0.000
#> SRR2087335 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087346 1 0.3860 -0.920 0.528 0 0 0.000 0.472 0.000
#> SRR2087345 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087334 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087323 4 0.0713 0.763 0.000 0 0 0.972 0.028 0.000
#> SRR2087330 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087342 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087333 1 0.3860 -0.920 0.528 0 0 0.000 0.472 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087312 4 0.4098 0.704 0.000 0 0 0.496 0.496 0.008
#> SRR2087338 5 0.3868 1.000 0.496 0 0 0.000 0.504 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087319 4 0.0260 0.768 0.000 0 0 0.992 0.008 0.000
#> SRR2087368 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087315 4 0.2092 0.766 0.000 0 0 0.876 0.124 0.000
#> SRR2087372 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087339 5 0.3868 1.000 0.496 0 0 0.000 0.504 0.000
#> SRR2087286 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087331 1 0.1714 0.642 0.908 0 0 0.000 0.092 0.000
#> SRR2087328 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087321 4 0.3756 0.748 0.000 0 0 0.600 0.400 0.000
#> SRR2087310 4 0.0865 0.762 0.000 0 0 0.964 0.036 0.000
#> SRR2087341 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087340 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087337 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087316 4 0.2092 0.768 0.000 0 0 0.876 0.124 0.000
#> SRR2087325 4 0.4097 0.704 0.000 0 0 0.500 0.492 0.008
#> SRR2087287 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087311 4 0.0260 0.770 0.000 0 0 0.992 0.008 0.000
#> SRR2087324 4 0.3982 0.717 0.000 0 0 0.536 0.460 0.004
#> SRR2087305 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087329 1 0.0000 0.818 1.000 0 0 0.000 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087320 4 0.0547 0.769 0.000 0 0 0.980 0.020 0.000
#> SRR2087308 4 0.3817 0.734 0.000 0 0 0.568 0.432 0.000
#> SRR2087295 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "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 16723 rows and 94 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.891 0.922 0.968 0.45099 0.546 0.546
#> 3 3 1.000 0.949 0.978 0.47126 0.688 0.478
#> 4 4 1.000 1.000 1.000 0.13993 0.871 0.636
#> 5 5 1.000 0.995 0.994 0.00212 1.000 1.000
#> 6 6 0.985 0.974 0.966 0.00947 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] 4
#> attr(,"optional")
#> [1] 3
There is also optional best \(k\) = 3 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR2087314 1 0.000 0.974 1.000 0.000
#> SRR2087307 1 0.000 0.974 1.000 0.000
#> SRR2087359 1 0.000 0.974 1.000 0.000
#> SRR2087373 1 0.000 0.974 1.000 0.000
#> SRR2087363 1 0.000 0.974 1.000 0.000
#> SRR2087317 1 0.224 0.942 0.964 0.036
#> SRR2087313 1 0.388 0.903 0.924 0.076
#> SRR2087360 1 0.000 0.974 1.000 0.000
#> SRR2087375 1 0.000 0.974 1.000 0.000
#> SRR2087349 1 0.000 0.974 1.000 0.000
#> SRR2087326 1 0.000 0.974 1.000 0.000
#> SRR2087306 1 0.000 0.974 1.000 0.000
#> SRR2087347 1 0.000 0.974 1.000 0.000
#> SRR2087327 1 0.000 0.974 1.000 0.000
#> SRR2087318 1 0.904 0.521 0.680 0.320
#> SRR2087350 1 0.000 0.974 1.000 0.000
#> SRR2087309 1 0.402 0.898 0.920 0.080
#> SRR2087344 1 0.000 0.974 1.000 0.000
#> SRR2087364 1 0.000 0.974 1.000 0.000
#> SRR2087332 1 0.000 0.974 1.000 0.000
#> SRR2087336 1 0.000 0.974 1.000 0.000
#> SRR2087348 1 0.000 0.974 1.000 0.000
#> SRR2087353 1 0.000 0.974 1.000 0.000
#> SRR2087343 1 0.000 0.974 1.000 0.000
#> SRR2087322 1 0.881 0.564 0.700 0.300
#> SRR2087335 1 0.000 0.974 1.000 0.000
#> SRR2087362 1 0.000 0.974 1.000 0.000
#> SRR2087374 1 0.000 0.974 1.000 0.000
#> SRR2087346 1 0.000 0.974 1.000 0.000
#> SRR2087345 1 0.000 0.974 1.000 0.000
#> SRR2087358 1 0.000 0.974 1.000 0.000
#> SRR2087334 1 0.000 0.974 1.000 0.000
#> SRR2087323 2 0.000 0.948 0.000 1.000
#> SRR2087330 1 0.000 0.974 1.000 0.000
#> SRR2087354 1 0.000 0.974 1.000 0.000
#> SRR2087342 1 0.000 0.974 1.000 0.000
#> SRR2087369 1 0.000 0.974 1.000 0.000
#> SRR2087371 1 0.000 0.974 1.000 0.000
#> SRR2087361 1 0.000 0.974 1.000 0.000
#> SRR2087367 1 0.000 0.974 1.000 0.000
#> SRR2087301 2 0.000 0.948 0.000 1.000
#> SRR2087333 1 0.000 0.974 1.000 0.000
#> SRR2087356 1 0.000 0.974 1.000 0.000
#> SRR2087370 1 0.000 0.974 1.000 0.000
#> SRR2087312 2 0.595 0.815 0.144 0.856
#> SRR2087338 1 0.000 0.974 1.000 0.000
#> SRR2087365 1 0.000 0.974 1.000 0.000
#> SRR2087319 1 0.000 0.974 1.000 0.000
#> SRR2087368 1 0.000 0.974 1.000 0.000
#> SRR2087315 2 0.949 0.434 0.368 0.632
#> SRR2087372 1 0.000 0.974 1.000 0.000
#> SRR2087357 1 0.000 0.974 1.000 0.000
#> SRR2087297 2 0.000 0.948 0.000 1.000
#> SRR2087352 1 0.000 0.974 1.000 0.000
#> SRR2087339 1 0.000 0.974 1.000 0.000
#> SRR2087286 2 0.000 0.948 0.000 1.000
#> SRR2087355 1 0.000 0.974 1.000 0.000
#> SRR2087331 1 0.000 0.974 1.000 0.000
#> SRR2087328 1 0.000 0.974 1.000 0.000
#> SRR2087321 2 0.969 0.363 0.396 0.604
#> SRR2087310 1 0.929 0.465 0.656 0.344
#> SRR2087341 1 0.000 0.974 1.000 0.000
#> SRR2087340 1 0.000 0.974 1.000 0.000
#> SRR2087283 2 0.000 0.948 0.000 1.000
#> SRR2087296 2 0.000 0.948 0.000 1.000
#> SRR2087337 1 0.000 0.974 1.000 0.000
#> SRR2087316 2 0.373 0.890 0.072 0.928
#> SRR2087325 1 0.469 0.876 0.900 0.100
#> SRR2087287 2 0.000 0.948 0.000 1.000
#> SRR2087289 2 0.000 0.948 0.000 1.000
#> SRR2087311 1 0.767 0.704 0.776 0.224
#> SRR2087324 2 0.469 0.863 0.100 0.900
#> SRR2087305 2 0.000 0.948 0.000 1.000
#> SRR2087282 2 0.000 0.948 0.000 1.000
#> SRR2087285 2 0.000 0.948 0.000 1.000
#> SRR2087290 2 0.000 0.948 0.000 1.000
#> SRR2087293 2 0.000 0.948 0.000 1.000
#> SRR2087329 1 0.000 0.974 1.000 0.000
#> SRR2087366 1 0.000 0.974 1.000 0.000
#> SRR2087300 2 0.000 0.948 0.000 1.000
#> SRR2087284 2 0.000 0.948 0.000 1.000
#> SRR2087303 2 0.000 0.948 0.000 1.000
#> SRR2087351 1 0.000 0.974 1.000 0.000
#> SRR2087302 2 0.000 0.948 0.000 1.000
#> SRR2087304 2 0.000 0.948 0.000 1.000
#> SRR2087298 2 0.000 0.948 0.000 1.000
#> SRR2087320 2 0.000 0.948 0.000 1.000
#> SRR2087308 2 0.992 0.207 0.448 0.552
#> SRR2087295 2 0.000 0.948 0.000 1.000
#> SRR2087292 2 0.000 0.948 0.000 1.000
#> SRR2087291 2 0.000 0.948 0.000 1.000
#> SRR2087294 2 0.000 0.948 0.000 1.000
#> SRR2087299 2 0.000 0.948 0.000 1.000
#> SRR2087288 2 0.000 0.948 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0.2537 0.898 0.920 0.000 0.080
#> SRR2087307 3 0.1905 0.957 0.016 0.028 0.956
#> SRR2087359 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087373 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087363 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087317 1 0.5291 0.617 0.732 0.268 0.000
#> SRR2087313 2 0.6295 0.123 0.472 0.528 0.000
#> SRR2087360 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087375 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087349 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087326 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087306 1 0.1163 0.949 0.972 0.000 0.028
#> SRR2087347 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087327 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087318 2 0.2066 0.927 0.060 0.940 0.000
#> SRR2087350 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087309 2 0.5905 0.471 0.352 0.648 0.000
#> SRR2087344 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087364 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087332 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087336 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087348 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087353 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087343 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087322 2 0.1289 0.949 0.032 0.968 0.000
#> SRR2087335 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087362 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087374 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087346 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087345 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087358 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087334 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087323 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087330 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087354 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087342 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087369 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087371 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087361 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087367 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087301 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087333 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087356 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087370 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087312 2 0.0592 0.960 0.012 0.988 0.000
#> SRR2087338 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087365 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087319 1 0.7889 0.493 0.624 0.288 0.088
#> SRR2087368 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087315 2 0.2066 0.927 0.060 0.940 0.000
#> SRR2087372 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087357 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087297 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087352 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087339 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087286 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087355 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087331 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087328 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087321 2 0.1163 0.951 0.028 0.972 0.000
#> SRR2087310 2 0.1031 0.954 0.024 0.976 0.000
#> SRR2087341 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087340 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087283 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087296 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087337 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087316 2 0.0892 0.956 0.020 0.980 0.000
#> SRR2087325 2 0.4094 0.867 0.100 0.872 0.028
#> SRR2087287 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087289 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087311 2 0.2066 0.927 0.060 0.940 0.000
#> SRR2087324 2 0.0747 0.958 0.016 0.984 0.000
#> SRR2087305 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087282 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087285 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087290 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087293 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087329 1 0.0000 0.972 1.000 0.000 0.000
#> SRR2087366 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087300 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087284 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087303 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087351 3 0.0000 0.998 0.000 0.000 1.000
#> SRR2087302 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087304 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087298 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087320 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087308 2 0.1643 0.940 0.044 0.956 0.000
#> SRR2087295 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087292 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087291 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087294 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087299 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2087288 2 0.0000 0.965 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.1478 0.973 0.000 0.000 0 0.936 NA
#> SRR2087307 4 0.0290 0.982 0.000 0.000 0 0.992 NA
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087317 4 0.1270 0.977 0.000 0.000 0 0.948 NA
#> SRR2087313 4 0.1270 0.977 0.000 0.000 0 0.948 NA
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087349 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087326 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087306 4 0.1410 0.974 0.000 0.000 0 0.940 NA
#> SRR2087347 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087327 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087318 4 0.1197 0.977 0.000 0.000 0 0.952 NA
#> SRR2087350 1 0.0162 0.997 0.996 0.000 0 0.000 NA
#> SRR2087309 4 0.1270 0.977 0.000 0.000 0 0.948 NA
#> SRR2087344 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087332 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087336 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087348 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087343 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087322 4 0.0000 0.983 0.000 0.000 0 1.000 NA
#> SRR2087335 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087346 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087345 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087334 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087323 4 0.0404 0.980 0.000 0.000 0 0.988 NA
#> SRR2087330 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087342 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087301 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087333 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087312 4 0.0162 0.983 0.000 0.000 0 0.996 NA
#> SRR2087338 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087319 4 0.1270 0.977 0.000 0.000 0 0.948 NA
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087315 4 0.1121 0.978 0.000 0.000 0 0.956 NA
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087297 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087339 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087286 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087331 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087328 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087321 4 0.0000 0.983 0.000 0.000 0 1.000 NA
#> SRR2087310 4 0.0162 0.982 0.000 0.000 0 0.996 NA
#> SRR2087341 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087340 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087283 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087296 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087337 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087316 4 0.0000 0.983 0.000 0.000 0 1.000 NA
#> SRR2087325 4 0.0162 0.983 0.000 0.000 0 0.996 NA
#> SRR2087287 2 0.0290 0.994 0.000 0.992 0 0.000 NA
#> SRR2087289 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087311 4 0.0000 0.983 0.000 0.000 0 1.000 NA
#> SRR2087324 4 0.0162 0.982 0.000 0.000 0 0.996 NA
#> SRR2087305 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087282 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087285 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087290 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087293 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087329 1 0.0000 1.000 1.000 0.000 0 0.000 NA
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087300 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087284 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087303 2 0.0162 0.997 0.000 0.996 0 0.000 NA
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 NA
#> SRR2087302 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087304 2 0.0162 0.997 0.000 0.996 0 0.000 NA
#> SRR2087298 2 0.0162 0.997 0.000 0.996 0 0.000 NA
#> SRR2087320 4 0.1270 0.961 0.000 0.000 0 0.948 NA
#> SRR2087308 4 0.0000 0.983 0.000 0.000 0 1.000 NA
#> SRR2087295 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087292 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087291 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087294 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087299 2 0.0000 0.999 0.000 1.000 0 0.000 NA
#> SRR2087288 2 0.0162 0.997 0.000 0.996 0 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 4 0.2631 0.914 0.000 0.000 0.000 0.820 0.180 NA
#> SRR2087307 4 0.3741 0.778 0.000 0.000 0.000 0.672 0.008 NA
#> SRR2087359 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087373 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087363 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087317 4 0.2416 0.921 0.000 0.000 0.000 0.844 0.156 NA
#> SRR2087313 4 0.2340 0.923 0.000 0.000 0.000 0.852 0.148 NA
#> SRR2087360 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087375 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087349 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087326 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087306 4 0.2527 0.918 0.000 0.000 0.000 0.832 0.168 NA
#> SRR2087347 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087327 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087318 4 0.2416 0.921 0.000 0.000 0.000 0.844 0.156 NA
#> SRR2087350 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087309 4 0.2416 0.921 0.000 0.000 0.000 0.844 0.156 NA
#> SRR2087344 1 0.0547 0.986 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2087364 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087332 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087336 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087348 1 0.0547 0.987 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2087353 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087343 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 NA
#> SRR2087322 4 0.0508 0.932 0.000 0.000 0.000 0.984 0.012 NA
#> SRR2087335 1 0.0547 0.986 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2087362 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087374 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087346 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087345 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087358 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087334 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087323 4 0.1010 0.927 0.000 0.000 0.000 0.960 0.036 NA
#> SRR2087330 1 0.0547 0.986 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2087354 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087342 1 0.0547 0.986 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2087369 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087371 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087361 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087367 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087301 2 0.0458 0.986 0.000 0.984 0.000 0.000 0.000 NA
#> SRR2087333 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087356 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087370 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087312 4 0.0363 0.934 0.000 0.000 0.000 0.988 0.012 NA
#> SRR2087338 1 0.0363 0.987 0.988 0.000 0.000 0.000 0.000 NA
#> SRR2087365 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087319 4 0.2416 0.921 0.000 0.000 0.000 0.844 0.156 NA
#> SRR2087368 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087315 4 0.2048 0.927 0.000 0.000 0.000 0.880 0.120 NA
#> SRR2087372 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087357 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087297 2 0.0146 0.986 0.000 0.996 0.000 0.000 0.000 NA
#> SRR2087352 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087339 1 0.0363 0.987 0.988 0.000 0.000 0.000 0.000 NA
#> SRR2087286 2 0.0632 0.985 0.000 0.976 0.000 0.000 0.000 NA
#> SRR2087355 3 0.0146 0.998 0.000 0.000 0.996 0.000 0.004 NA
#> SRR2087331 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087328 1 0.0547 0.986 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2087321 4 0.0260 0.933 0.000 0.000 0.000 0.992 0.008 NA
#> SRR2087310 4 0.0777 0.930 0.000 0.000 0.000 0.972 0.024 NA
#> SRR2087341 1 0.0632 0.987 0.976 0.000 0.000 0.000 0.000 NA
#> SRR2087340 1 0.0547 0.986 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2087283 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087296 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087337 1 0.0363 0.987 0.988 0.000 0.000 0.000 0.000 NA
#> SRR2087316 4 0.0692 0.931 0.000 0.000 0.000 0.976 0.020 NA
#> SRR2087325 4 0.0865 0.934 0.000 0.000 0.000 0.964 0.036 NA
#> SRR2087287 2 0.0865 0.972 0.000 0.964 0.000 0.000 0.000 NA
#> SRR2087289 2 0.0000 0.986 0.000 1.000 0.000 0.000 0.000 NA
#> SRR2087311 4 0.0260 0.934 0.000 0.000 0.000 0.992 0.008 NA
#> SRR2087324 4 0.0692 0.931 0.000 0.000 0.000 0.976 0.020 NA
#> SRR2087305 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087282 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087285 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087290 2 0.0632 0.985 0.000 0.976 0.000 0.000 0.000 NA
#> SRR2087293 2 0.0632 0.985 0.000 0.976 0.000 0.000 0.000 NA
#> SRR2087329 1 0.0458 0.987 0.984 0.000 0.000 0.000 0.000 NA
#> SRR2087366 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087300 2 0.0632 0.985 0.000 0.976 0.000 0.000 0.000 NA
#> SRR2087284 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087303 2 0.0713 0.984 0.000 0.972 0.000 0.000 0.000 NA
#> SRR2087351 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 NA
#> SRR2087302 2 0.0632 0.985 0.000 0.976 0.000 0.000 0.000 NA
#> SRR2087304 2 0.0790 0.983 0.000 0.968 0.000 0.000 0.000 NA
#> SRR2087298 2 0.1480 0.967 0.000 0.940 0.000 0.000 0.020 NA
#> SRR2087320 4 0.2738 0.860 0.000 0.000 0.000 0.820 0.176 NA
#> SRR2087308 4 0.0458 0.932 0.000 0.000 0.000 0.984 0.016 NA
#> SRR2087295 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087292 2 0.0632 0.985 0.000 0.976 0.000 0.000 0.000 NA
#> SRR2087291 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087294 2 0.0260 0.986 0.000 0.992 0.000 0.000 0.000 NA
#> SRR2087299 2 0.0547 0.986 0.000 0.980 0.000 0.000 0.000 NA
#> SRR2087288 2 0.1124 0.977 0.000 0.956 0.000 0.000 0.008 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["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 16723 rows and 94 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 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.987 0.994 0.3903 0.616 0.616
#> 3 3 0.649 0.701 0.874 0.3603 0.969 0.949
#> 4 4 0.741 0.825 0.878 0.2377 0.754 0.579
#> 5 5 0.982 0.955 0.980 0.1661 0.897 0.696
#> 6 6 1.000 0.963 0.988 0.0203 0.979 0.912
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 5
There is also optional best \(k\) = 2 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
#> SRR2087314 1 0.000 0.992 1.000 0.000
#> SRR2087307 1 0.000 0.992 1.000 0.000
#> SRR2087359 1 0.000 0.992 1.000 0.000
#> SRR2087373 1 0.000 0.992 1.000 0.000
#> SRR2087363 1 0.000 0.992 1.000 0.000
#> SRR2087317 1 0.000 0.992 1.000 0.000
#> SRR2087313 1 0.000 0.992 1.000 0.000
#> SRR2087360 1 0.000 0.992 1.000 0.000
#> SRR2087375 1 0.000 0.992 1.000 0.000
#> SRR2087349 1 0.000 0.992 1.000 0.000
#> SRR2087326 1 0.000 0.992 1.000 0.000
#> SRR2087306 1 0.000 0.992 1.000 0.000
#> SRR2087347 1 0.000 0.992 1.000 0.000
#> SRR2087327 1 0.000 0.992 1.000 0.000
#> SRR2087318 1 0.000 0.992 1.000 0.000
#> SRR2087350 1 0.000 0.992 1.000 0.000
#> SRR2087309 1 0.000 0.992 1.000 0.000
#> SRR2087344 1 0.000 0.992 1.000 0.000
#> SRR2087364 1 0.000 0.992 1.000 0.000
#> SRR2087332 1 0.000 0.992 1.000 0.000
#> SRR2087336 1 0.000 0.992 1.000 0.000
#> SRR2087348 1 0.000 0.992 1.000 0.000
#> SRR2087353 1 0.000 0.992 1.000 0.000
#> SRR2087343 1 0.000 0.992 1.000 0.000
#> SRR2087322 1 0.000 0.992 1.000 0.000
#> SRR2087335 1 0.000 0.992 1.000 0.000
#> SRR2087362 1 0.000 0.992 1.000 0.000
#> SRR2087374 1 0.000 0.992 1.000 0.000
#> SRR2087346 1 0.000 0.992 1.000 0.000
#> SRR2087345 1 0.000 0.992 1.000 0.000
#> SRR2087358 1 0.000 0.992 1.000 0.000
#> SRR2087334 1 0.000 0.992 1.000 0.000
#> SRR2087323 1 0.781 0.700 0.768 0.232
#> SRR2087330 1 0.000 0.992 1.000 0.000
#> SRR2087354 1 0.000 0.992 1.000 0.000
#> SRR2087342 1 0.000 0.992 1.000 0.000
#> SRR2087369 1 0.000 0.992 1.000 0.000
#> SRR2087371 1 0.000 0.992 1.000 0.000
#> SRR2087361 1 0.000 0.992 1.000 0.000
#> SRR2087367 1 0.000 0.992 1.000 0.000
#> SRR2087301 2 0.000 1.000 0.000 1.000
#> SRR2087333 1 0.000 0.992 1.000 0.000
#> SRR2087356 1 0.000 0.992 1.000 0.000
#> SRR2087370 1 0.000 0.992 1.000 0.000
#> SRR2087312 1 0.000 0.992 1.000 0.000
#> SRR2087338 1 0.000 0.992 1.000 0.000
#> SRR2087365 1 0.000 0.992 1.000 0.000
#> SRR2087319 1 0.000 0.992 1.000 0.000
#> SRR2087368 1 0.000 0.992 1.000 0.000
#> SRR2087315 1 0.000 0.992 1.000 0.000
#> SRR2087372 1 0.000 0.992 1.000 0.000
#> SRR2087357 1 0.000 0.992 1.000 0.000
#> SRR2087297 2 0.000 1.000 0.000 1.000
#> SRR2087352 1 0.000 0.992 1.000 0.000
#> SRR2087339 1 0.000 0.992 1.000 0.000
#> SRR2087286 2 0.000 1.000 0.000 1.000
#> SRR2087355 1 0.000 0.992 1.000 0.000
#> SRR2087331 1 0.000 0.992 1.000 0.000
#> SRR2087328 1 0.000 0.992 1.000 0.000
#> SRR2087321 1 0.000 0.992 1.000 0.000
#> SRR2087310 1 0.000 0.992 1.000 0.000
#> SRR2087341 1 0.000 0.992 1.000 0.000
#> SRR2087340 1 0.000 0.992 1.000 0.000
#> SRR2087283 2 0.000 1.000 0.000 1.000
#> SRR2087296 2 0.000 1.000 0.000 1.000
#> SRR2087337 1 0.000 0.992 1.000 0.000
#> SRR2087316 1 0.000 0.992 1.000 0.000
#> SRR2087325 1 0.000 0.992 1.000 0.000
#> SRR2087287 2 0.000 1.000 0.000 1.000
#> SRR2087289 2 0.000 1.000 0.000 1.000
#> SRR2087311 1 0.000 0.992 1.000 0.000
#> SRR2087324 1 0.000 0.992 1.000 0.000
#> SRR2087305 2 0.000 1.000 0.000 1.000
#> SRR2087282 2 0.000 1.000 0.000 1.000
#> SRR2087285 2 0.000 1.000 0.000 1.000
#> SRR2087290 2 0.000 1.000 0.000 1.000
#> SRR2087293 2 0.000 1.000 0.000 1.000
#> SRR2087329 1 0.000 0.992 1.000 0.000
#> SRR2087366 1 0.000 0.992 1.000 0.000
#> SRR2087300 2 0.000 1.000 0.000 1.000
#> SRR2087284 2 0.000 1.000 0.000 1.000
#> SRR2087303 2 0.000 1.000 0.000 1.000
#> SRR2087351 1 0.000 0.992 1.000 0.000
#> SRR2087302 2 0.000 1.000 0.000 1.000
#> SRR2087304 2 0.000 1.000 0.000 1.000
#> SRR2087298 2 0.000 1.000 0.000 1.000
#> SRR2087320 1 0.881 0.578 0.700 0.300
#> SRR2087308 1 0.000 0.992 1.000 0.000
#> SRR2087295 2 0.000 1.000 0.000 1.000
#> SRR2087292 2 0.000 1.000 0.000 1.000
#> SRR2087291 2 0.000 1.000 0.000 1.000
#> SRR2087294 2 0.000 1.000 0.000 1.000
#> SRR2087299 2 0.000 1.000 0.000 1.000
#> SRR2087288 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
#> SRR2087314 1 0.465 0.5168 0.792 0 0.208
#> SRR2087307 1 0.465 0.5168 0.792 0 0.208
#> SRR2087359 1 0.000 0.7416 1.000 0 0.000
#> SRR2087373 1 0.000 0.7416 1.000 0 0.000
#> SRR2087363 1 0.000 0.7416 1.000 0 0.000
#> SRR2087317 1 0.484 0.4905 0.776 0 0.224
#> SRR2087313 1 0.484 0.4905 0.776 0 0.224
#> SRR2087360 1 0.000 0.7416 1.000 0 0.000
#> SRR2087375 1 0.000 0.7416 1.000 0 0.000
#> SRR2087349 1 0.493 0.7075 0.768 0 0.232
#> SRR2087326 1 0.493 0.7075 0.768 0 0.232
#> SRR2087306 1 0.465 0.5168 0.792 0 0.208
#> SRR2087347 1 0.493 0.7075 0.768 0 0.232
#> SRR2087327 1 0.493 0.7075 0.768 0 0.232
#> SRR2087318 1 0.484 0.4905 0.776 0 0.224
#> SRR2087350 1 0.493 0.7075 0.768 0 0.232
#> SRR2087309 1 0.484 0.4905 0.776 0 0.224
#> SRR2087344 1 0.493 0.7075 0.768 0 0.232
#> SRR2087364 1 0.000 0.7416 1.000 0 0.000
#> SRR2087332 1 0.493 0.7075 0.768 0 0.232
#> SRR2087336 1 0.493 0.7075 0.768 0 0.232
#> SRR2087348 1 0.493 0.7075 0.768 0 0.232
#> SRR2087353 1 0.000 0.7416 1.000 0 0.000
#> SRR2087343 1 0.493 0.7075 0.768 0 0.232
#> SRR2087322 1 0.614 -0.0944 0.596 0 0.404
#> SRR2087335 1 0.493 0.7075 0.768 0 0.232
#> SRR2087362 1 0.000 0.7416 1.000 0 0.000
#> SRR2087374 1 0.000 0.7416 1.000 0 0.000
#> SRR2087346 1 0.493 0.7075 0.768 0 0.232
#> SRR2087345 1 0.493 0.7075 0.768 0 0.232
#> SRR2087358 1 0.000 0.7416 1.000 0 0.000
#> SRR2087334 1 0.493 0.7075 0.768 0 0.232
#> SRR2087323 3 0.571 0.8402 0.320 0 0.680
#> SRR2087330 1 0.493 0.7075 0.768 0 0.232
#> SRR2087354 1 0.000 0.7416 1.000 0 0.000
#> SRR2087342 1 0.493 0.7075 0.768 0 0.232
#> SRR2087369 1 0.000 0.7416 1.000 0 0.000
#> SRR2087371 1 0.000 0.7416 1.000 0 0.000
#> SRR2087361 1 0.000 0.7416 1.000 0 0.000
#> SRR2087367 1 0.000 0.7416 1.000 0 0.000
#> SRR2087301 2 0.000 1.0000 0.000 1 0.000
#> SRR2087333 1 0.493 0.7075 0.768 0 0.232
#> SRR2087356 1 0.000 0.7416 1.000 0 0.000
#> SRR2087370 1 0.000 0.7416 1.000 0 0.000
#> SRR2087312 1 0.484 0.4905 0.776 0 0.224
#> SRR2087338 1 0.493 0.7075 0.768 0 0.232
#> SRR2087365 1 0.000 0.7416 1.000 0 0.000
#> SRR2087319 1 0.484 0.4905 0.776 0 0.224
#> SRR2087368 1 0.000 0.7416 1.000 0 0.000
#> SRR2087315 1 0.484 0.4905 0.776 0 0.224
#> SRR2087372 1 0.000 0.7416 1.000 0 0.000
#> SRR2087357 1 0.000 0.7416 1.000 0 0.000
#> SRR2087297 2 0.000 1.0000 0.000 1 0.000
#> SRR2087352 1 0.000 0.7416 1.000 0 0.000
#> SRR2087339 1 0.493 0.7075 0.768 0 0.232
#> SRR2087286 2 0.000 1.0000 0.000 1 0.000
#> SRR2087355 1 0.000 0.7416 1.000 0 0.000
#> SRR2087331 1 0.493 0.7075 0.768 0 0.232
#> SRR2087328 1 0.493 0.7075 0.768 0 0.232
#> SRR2087321 1 0.614 -0.0944 0.596 0 0.404
#> SRR2087310 1 0.626 -0.2682 0.552 0 0.448
#> SRR2087341 1 0.493 0.7075 0.768 0 0.232
#> SRR2087340 1 0.493 0.7075 0.768 0 0.232
#> SRR2087283 2 0.000 1.0000 0.000 1 0.000
#> SRR2087296 2 0.000 1.0000 0.000 1 0.000
#> SRR2087337 1 0.493 0.7075 0.768 0 0.232
#> SRR2087316 1 0.626 -0.2682 0.552 0 0.448
#> SRR2087325 1 0.484 0.4905 0.776 0 0.224
#> SRR2087287 2 0.000 1.0000 0.000 1 0.000
#> SRR2087289 2 0.000 1.0000 0.000 1 0.000
#> SRR2087311 1 0.626 -0.2682 0.552 0 0.448
#> SRR2087324 1 0.626 -0.2682 0.552 0 0.448
#> SRR2087305 2 0.000 1.0000 0.000 1 0.000
#> SRR2087282 2 0.000 1.0000 0.000 1 0.000
#> SRR2087285 2 0.000 1.0000 0.000 1 0.000
#> SRR2087290 2 0.000 1.0000 0.000 1 0.000
#> SRR2087293 2 0.000 1.0000 0.000 1 0.000
#> SRR2087329 1 0.493 0.7075 0.768 0 0.232
#> SRR2087366 1 0.000 0.7416 1.000 0 0.000
#> SRR2087300 2 0.000 1.0000 0.000 1 0.000
#> SRR2087284 2 0.000 1.0000 0.000 1 0.000
#> SRR2087303 2 0.000 1.0000 0.000 1 0.000
#> SRR2087351 1 0.000 0.7416 1.000 0 0.000
#> SRR2087302 2 0.000 1.0000 0.000 1 0.000
#> SRR2087304 2 0.000 1.0000 0.000 1 0.000
#> SRR2087298 2 0.000 1.0000 0.000 1 0.000
#> SRR2087320 3 0.493 0.8590 0.232 0 0.768
#> SRR2087308 1 0.626 -0.2682 0.552 0 0.448
#> SRR2087295 2 0.000 1.0000 0.000 1 0.000
#> SRR2087292 2 0.000 1.0000 0.000 1 0.000
#> SRR2087291 2 0.000 1.0000 0.000 1 0.000
#> SRR2087294 2 0.000 1.0000 0.000 1 0.000
#> SRR2087299 2 0.000 1.0000 0.000 1 0.000
#> SRR2087288 2 0.000 1.0000 0.000 1 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 3 0.147 0.514 0.00 0 0.948 0.052
#> SRR2087307 3 0.147 0.514 0.00 0 0.948 0.052
#> SRR2087359 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087373 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087363 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087317 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087313 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087360 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087375 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087349 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087326 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087306 3 0.147 0.514 0.00 0 0.948 0.052
#> SRR2087347 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087327 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087318 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087350 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087309 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087344 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087364 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087332 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087336 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087348 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087353 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087343 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087322 3 0.404 0.436 0.00 0 0.752 0.248
#> SRR2087335 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087362 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087374 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087346 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087345 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087358 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087334 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087323 4 0.430 0.659 0.00 0 0.284 0.716
#> SRR2087330 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087354 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087342 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087369 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087371 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087361 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087367 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087301 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087333 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087356 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087370 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087312 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087338 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087365 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087319 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087368 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087315 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087372 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087357 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087297 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087352 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087339 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087286 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087355 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087331 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087328 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087321 3 0.404 0.436 0.00 0 0.752 0.248
#> SRR2087310 3 0.436 0.388 0.00 0 0.708 0.292
#> SRR2087341 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087340 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087283 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087296 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087337 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087316 3 0.436 0.388 0.00 0 0.708 0.292
#> SRR2087325 3 0.179 0.503 0.00 0 0.932 0.068
#> SRR2087287 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087289 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087311 3 0.436 0.388 0.00 0 0.708 0.292
#> SRR2087324 3 0.436 0.388 0.00 0 0.708 0.292
#> SRR2087305 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087282 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087285 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087290 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087293 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087329 1 0.000 1.000 1.00 0 0.000 0.000
#> SRR2087366 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087300 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087284 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087303 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087351 3 0.462 0.752 0.34 0 0.660 0.000
#> SRR2087302 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087304 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087298 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087320 4 0.000 0.722 0.00 0 0.000 1.000
#> SRR2087308 3 0.436 0.388 0.00 0 0.708 0.292
#> SRR2087295 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087292 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087291 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087294 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087299 2 0.000 1.000 0.00 1 0.000 0.000
#> SRR2087288 2 0.000 1.000 0.00 1 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.051 0.858 0 0 0.016 0.984 0.000
#> SRR2087307 4 0.051 0.858 0 0 0.016 0.984 0.000
#> SRR2087359 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087373 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087363 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087317 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087313 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087360 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087375 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087349 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087326 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087306 4 0.051 0.858 0 0 0.016 0.984 0.000
#> SRR2087347 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087327 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087318 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087350 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087309 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087344 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087364 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087332 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087336 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087348 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087353 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087343 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087322 4 0.293 0.787 0 0 0.000 0.820 0.180
#> SRR2087335 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087362 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087374 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087346 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087345 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087358 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087334 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087323 5 0.403 0.296 0 0 0.000 0.352 0.648
#> SRR2087330 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087354 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087342 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087369 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087371 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087361 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087367 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087301 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087333 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087356 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087370 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087312 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087338 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087365 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087319 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087368 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087315 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087372 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087357 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087297 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087352 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087339 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087286 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087355 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087331 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087328 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087321 4 0.293 0.787 0 0 0.000 0.820 0.180
#> SRR2087310 4 0.331 0.752 0 0 0.000 0.776 0.224
#> SRR2087341 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087340 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087283 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087296 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087337 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087316 4 0.331 0.752 0 0 0.000 0.776 0.224
#> SRR2087325 4 0.000 0.871 0 0 0.000 1.000 0.000
#> SRR2087287 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087289 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087311 4 0.331 0.752 0 0 0.000 0.776 0.224
#> SRR2087324 4 0.331 0.752 0 0 0.000 0.776 0.224
#> SRR2087305 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087282 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087285 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087290 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087293 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087329 1 0.000 1.000 1 0 0.000 0.000 0.000
#> SRR2087366 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087300 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087284 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087303 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087351 3 0.000 1.000 0 0 1.000 0.000 0.000
#> SRR2087302 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087304 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087298 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087320 5 0.000 0.569 0 0 0.000 0.000 1.000
#> SRR2087308 4 0.331 0.752 0 0 0.000 0.776 0.224
#> SRR2087295 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087292 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087291 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087294 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087299 2 0.000 1.000 0 1 0.000 0.000 0.000
#> SRR2087288 2 0.000 1.000 0 1 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 6 0.0000 0.981 0 0 0 0.000 0.000 1.000
#> SRR2087307 6 0.0458 0.973 0 0 0 0.000 0.016 0.984
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087317 6 0.0458 0.991 0 0 0 0.016 0.000 0.984
#> SRR2087313 6 0.0458 0.991 0 0 0 0.016 0.000 0.984
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087306 6 0.0000 0.981 0 0 0 0.000 0.000 1.000
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087318 6 0.0458 0.991 0 0 0 0.016 0.000 0.984
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087309 6 0.0458 0.991 0 0 0 0.016 0.000 0.984
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087322 4 0.1151 0.856 0 0 0 0.956 0.012 0.032
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087323 4 0.3804 0.178 0 0 0 0.576 0.424 0.000
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087312 4 0.3290 0.694 0 0 0 0.776 0.016 0.208
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087319 6 0.0458 0.991 0 0 0 0.016 0.000 0.984
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087315 6 0.0458 0.991 0 0 0 0.016 0.000 0.984
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087321 4 0.1151 0.856 0 0 0 0.956 0.012 0.032
#> SRR2087310 4 0.0000 0.867 0 0 0 1.000 0.000 0.000
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087316 4 0.0000 0.867 0 0 0 1.000 0.000 0.000
#> SRR2087325 4 0.3290 0.694 0 0 0 0.776 0.016 0.208
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087311 4 0.0000 0.867 0 0 0 1.000 0.000 0.000
#> SRR2087324 4 0.0000 0.867 0 0 0 1.000 0.000 0.000
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087320 5 0.0458 0.000 0 0 0 0.016 0.984 0.000
#> SRR2087308 4 0.0000 0.867 0 0 0 1.000 0.000 0.000
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 0 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "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 16723 rows and 94 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.496 0.950 0.939 0.3874 0.616 0.616
#> 3 3 0.611 0.876 0.859 0.5345 0.743 0.582
#> 4 4 0.662 0.960 0.831 0.1798 0.886 0.681
#> 5 5 0.752 0.897 0.839 0.0816 1.000 1.000
#> 6 6 0.836 0.836 0.813 0.0526 1.000 1.000
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR2087314 1 0.0000 0.947 1.000 0.000
#> SRR2087307 1 0.0000 0.947 1.000 0.000
#> SRR2087359 1 0.0000 0.947 1.000 0.000
#> SRR2087373 1 0.0000 0.947 1.000 0.000
#> SRR2087363 1 0.0000 0.947 1.000 0.000
#> SRR2087317 1 0.0376 0.946 0.996 0.004
#> SRR2087313 1 0.0376 0.946 0.996 0.004
#> SRR2087360 1 0.0000 0.947 1.000 0.000
#> SRR2087375 1 0.0000 0.947 1.000 0.000
#> SRR2087349 1 0.5629 0.908 0.868 0.132
#> SRR2087326 1 0.5629 0.908 0.868 0.132
#> SRR2087306 1 0.0000 0.947 1.000 0.000
#> SRR2087347 1 0.5629 0.908 0.868 0.132
#> SRR2087327 1 0.5629 0.908 0.868 0.132
#> SRR2087318 1 0.0376 0.946 0.996 0.004
#> SRR2087350 1 0.5629 0.908 0.868 0.132
#> SRR2087309 1 0.0376 0.946 0.996 0.004
#> SRR2087344 1 0.5629 0.908 0.868 0.132
#> SRR2087364 1 0.0000 0.947 1.000 0.000
#> SRR2087332 1 0.5629 0.908 0.868 0.132
#> SRR2087336 1 0.5629 0.908 0.868 0.132
#> SRR2087348 1 0.5629 0.908 0.868 0.132
#> SRR2087353 1 0.0000 0.947 1.000 0.000
#> SRR2087343 1 0.5629 0.908 0.868 0.132
#> SRR2087322 1 0.0376 0.946 0.996 0.004
#> SRR2087335 1 0.5629 0.908 0.868 0.132
#> SRR2087362 1 0.0000 0.947 1.000 0.000
#> SRR2087374 1 0.0000 0.947 1.000 0.000
#> SRR2087346 1 0.5629 0.908 0.868 0.132
#> SRR2087345 1 0.5629 0.908 0.868 0.132
#> SRR2087358 1 0.0000 0.947 1.000 0.000
#> SRR2087334 1 0.5629 0.908 0.868 0.132
#> SRR2087323 1 0.0376 0.946 0.996 0.004
#> SRR2087330 1 0.5629 0.908 0.868 0.132
#> SRR2087354 1 0.0000 0.947 1.000 0.000
#> SRR2087342 1 0.5629 0.908 0.868 0.132
#> SRR2087369 1 0.0000 0.947 1.000 0.000
#> SRR2087371 1 0.0000 0.947 1.000 0.000
#> SRR2087361 1 0.0000 0.947 1.000 0.000
#> SRR2087367 1 0.0000 0.947 1.000 0.000
#> SRR2087301 2 0.5294 1.000 0.120 0.880
#> SRR2087333 1 0.5629 0.908 0.868 0.132
#> SRR2087356 1 0.0000 0.947 1.000 0.000
#> SRR2087370 1 0.0000 0.947 1.000 0.000
#> SRR2087312 1 0.0376 0.946 0.996 0.004
#> SRR2087338 1 0.5629 0.908 0.868 0.132
#> SRR2087365 1 0.0000 0.947 1.000 0.000
#> SRR2087319 1 0.0000 0.947 1.000 0.000
#> SRR2087368 1 0.0000 0.947 1.000 0.000
#> SRR2087315 1 0.0376 0.946 0.996 0.004
#> SRR2087372 1 0.0000 0.947 1.000 0.000
#> SRR2087357 1 0.0000 0.947 1.000 0.000
#> SRR2087297 2 0.5294 1.000 0.120 0.880
#> SRR2087352 1 0.0000 0.947 1.000 0.000
#> SRR2087339 1 0.5629 0.908 0.868 0.132
#> SRR2087286 2 0.5294 1.000 0.120 0.880
#> SRR2087355 1 0.0000 0.947 1.000 0.000
#> SRR2087331 1 0.5629 0.908 0.868 0.132
#> SRR2087328 1 0.5629 0.908 0.868 0.132
#> SRR2087321 1 0.0376 0.946 0.996 0.004
#> SRR2087310 1 0.0376 0.946 0.996 0.004
#> SRR2087341 1 0.5629 0.908 0.868 0.132
#> SRR2087340 1 0.5629 0.908 0.868 0.132
#> SRR2087283 2 0.5294 1.000 0.120 0.880
#> SRR2087296 2 0.5294 1.000 0.120 0.880
#> SRR2087337 1 0.5629 0.908 0.868 0.132
#> SRR2087316 1 0.0376 0.946 0.996 0.004
#> SRR2087325 1 0.0376 0.946 0.996 0.004
#> SRR2087287 2 0.5294 1.000 0.120 0.880
#> SRR2087289 2 0.5294 1.000 0.120 0.880
#> SRR2087311 1 0.0376 0.946 0.996 0.004
#> SRR2087324 1 0.0376 0.946 0.996 0.004
#> SRR2087305 2 0.5294 1.000 0.120 0.880
#> SRR2087282 2 0.5294 1.000 0.120 0.880
#> SRR2087285 2 0.5294 1.000 0.120 0.880
#> SRR2087290 2 0.5294 1.000 0.120 0.880
#> SRR2087293 2 0.5294 1.000 0.120 0.880
#> SRR2087329 1 0.5629 0.908 0.868 0.132
#> SRR2087366 1 0.0000 0.947 1.000 0.000
#> SRR2087300 2 0.5294 1.000 0.120 0.880
#> SRR2087284 2 0.5294 1.000 0.120 0.880
#> SRR2087303 2 0.5294 1.000 0.120 0.880
#> SRR2087351 1 0.0000 0.947 1.000 0.000
#> SRR2087302 2 0.5294 1.000 0.120 0.880
#> SRR2087304 2 0.5294 1.000 0.120 0.880
#> SRR2087298 2 0.5294 1.000 0.120 0.880
#> SRR2087320 1 0.0376 0.946 0.996 0.004
#> SRR2087308 1 0.0376 0.946 0.996 0.004
#> SRR2087295 2 0.5294 1.000 0.120 0.880
#> SRR2087292 2 0.5294 1.000 0.120 0.880
#> SRR2087291 2 0.5294 1.000 0.120 0.880
#> SRR2087294 2 0.5294 1.000 0.120 0.880
#> SRR2087299 2 0.5294 1.000 0.120 0.880
#> SRR2087288 2 0.5294 1.000 0.120 0.880
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087307 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087359 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087373 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087363 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087317 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087313 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087360 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087375 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087349 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087326 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087306 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087347 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087327 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087318 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087350 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087309 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087344 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087364 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087332 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087336 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087348 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087353 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087343 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087322 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087335 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087362 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087374 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087346 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087345 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087358 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087334 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087323 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087330 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087354 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087342 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087369 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087371 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087361 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087367 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087301 2 0.2066 0.969 0.000 0.940 0.060
#> SRR2087333 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087356 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087370 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087312 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087338 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087365 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087319 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087368 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087315 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087372 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087357 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087297 2 0.1031 0.971 0.000 0.976 0.024
#> SRR2087352 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087339 1 0.0237 0.992 0.996 0.004 0.000
#> SRR2087286 2 0.2066 0.969 0.000 0.940 0.060
#> SRR2087355 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087331 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087328 1 0.1031 0.988 0.976 0.024 0.000
#> SRR2087321 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087310 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087341 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087340 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087283 2 0.1031 0.971 0.000 0.976 0.024
#> SRR2087296 2 0.1163 0.971 0.000 0.972 0.028
#> SRR2087337 1 0.1031 0.986 0.976 0.024 0.000
#> SRR2087316 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087325 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087287 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2087289 2 0.1529 0.971 0.000 0.960 0.040
#> SRR2087311 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087324 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087305 2 0.1529 0.971 0.000 0.960 0.040
#> SRR2087282 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2087285 2 0.1529 0.971 0.000 0.960 0.040
#> SRR2087290 2 0.2261 0.968 0.000 0.932 0.068
#> SRR2087293 2 0.2261 0.968 0.000 0.932 0.068
#> SRR2087329 1 0.0424 0.991 0.992 0.008 0.000
#> SRR2087366 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087300 2 0.2165 0.968 0.000 0.936 0.064
#> SRR2087284 2 0.1411 0.972 0.000 0.964 0.036
#> SRR2087303 2 0.3816 0.939 0.000 0.852 0.148
#> SRR2087351 3 0.6204 0.770 0.424 0.000 0.576
#> SRR2087302 2 0.1289 0.972 0.000 0.968 0.032
#> SRR2087304 2 0.3816 0.939 0.000 0.852 0.148
#> SRR2087298 2 0.4062 0.939 0.000 0.836 0.164
#> SRR2087320 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087308 3 0.4346 0.761 0.184 0.000 0.816
#> SRR2087295 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2087292 2 0.2261 0.968 0.000 0.932 0.068
#> SRR2087291 2 0.1643 0.970 0.000 0.956 0.044
#> SRR2087294 2 0.1753 0.970 0.000 0.952 0.048
#> SRR2087299 2 0.4178 0.938 0.000 0.828 0.172
#> SRR2087288 2 0.4062 0.939 0.000 0.836 0.164
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087307 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087359 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087373 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087363 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087317 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087313 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087360 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087375 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087349 1 0.3937 0.956 0.800 0.000 0.188 0.012
#> SRR2087326 1 0.3937 0.956 0.800 0.000 0.188 0.012
#> SRR2087306 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087347 1 0.3937 0.956 0.800 0.000 0.188 0.012
#> SRR2087327 1 0.3810 0.956 0.804 0.000 0.188 0.008
#> SRR2087318 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087350 1 0.3937 0.956 0.800 0.000 0.188 0.012
#> SRR2087309 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087344 1 0.6086 0.921 0.680 0.000 0.188 0.132
#> SRR2087364 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087332 1 0.3486 0.957 0.812 0.000 0.188 0.000
#> SRR2087336 1 0.3937 0.956 0.800 0.000 0.188 0.012
#> SRR2087348 1 0.6086 0.921 0.680 0.000 0.188 0.132
#> SRR2087353 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087343 1 0.3668 0.957 0.808 0.000 0.188 0.004
#> SRR2087322 4 0.5130 0.988 0.020 0.000 0.312 0.668
#> SRR2087335 1 0.6039 0.921 0.684 0.000 0.188 0.128
#> SRR2087362 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087374 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087346 1 0.3486 0.957 0.812 0.000 0.188 0.000
#> SRR2087345 1 0.3486 0.957 0.812 0.000 0.188 0.000
#> SRR2087358 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087334 1 0.3668 0.957 0.808 0.000 0.188 0.004
#> SRR2087323 4 0.5322 0.987 0.028 0.000 0.312 0.660
#> SRR2087330 1 0.6039 0.921 0.684 0.000 0.188 0.128
#> SRR2087354 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087342 1 0.6039 0.921 0.684 0.000 0.188 0.128
#> SRR2087369 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087371 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087361 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087367 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087301 2 0.2335 0.925 0.060 0.920 0.000 0.020
#> SRR2087333 1 0.3486 0.957 0.812 0.000 0.188 0.000
#> SRR2087356 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087370 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087312 4 0.5026 0.989 0.016 0.000 0.312 0.672
#> SRR2087338 1 0.3486 0.957 0.812 0.000 0.188 0.000
#> SRR2087365 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087319 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087368 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087315 4 0.5228 0.988 0.024 0.000 0.312 0.664
#> SRR2087372 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087357 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087297 2 0.0336 0.929 0.008 0.992 0.000 0.000
#> SRR2087352 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087339 1 0.3486 0.957 0.812 0.000 0.188 0.000
#> SRR2087286 2 0.2335 0.925 0.060 0.920 0.000 0.020
#> SRR2087355 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087331 1 0.3810 0.956 0.804 0.000 0.188 0.008
#> SRR2087328 1 0.5556 0.937 0.720 0.000 0.188 0.092
#> SRR2087321 4 0.5130 0.988 0.020 0.000 0.312 0.668
#> SRR2087310 4 0.5322 0.987 0.028 0.000 0.312 0.660
#> SRR2087341 1 0.6086 0.921 0.680 0.000 0.188 0.132
#> SRR2087340 1 0.6039 0.921 0.684 0.000 0.188 0.128
#> SRR2087283 2 0.0188 0.929 0.004 0.996 0.000 0.000
#> SRR2087296 2 0.0188 0.929 0.004 0.996 0.000 0.000
#> SRR2087337 1 0.6039 0.921 0.684 0.000 0.188 0.128
#> SRR2087316 4 0.5322 0.987 0.028 0.000 0.312 0.660
#> SRR2087325 4 0.5026 0.988 0.016 0.000 0.312 0.672
#> SRR2087287 2 0.2450 0.922 0.016 0.912 0.000 0.072
#> SRR2087289 2 0.1610 0.927 0.016 0.952 0.000 0.032
#> SRR2087311 4 0.5322 0.987 0.028 0.000 0.312 0.660
#> SRR2087324 4 0.5322 0.987 0.028 0.000 0.312 0.660
#> SRR2087305 2 0.1743 0.928 0.004 0.940 0.000 0.056
#> SRR2087282 2 0.2450 0.922 0.016 0.912 0.000 0.072
#> SRR2087285 2 0.1661 0.928 0.004 0.944 0.000 0.052
#> SRR2087290 2 0.3601 0.913 0.084 0.860 0.000 0.056
#> SRR2087293 2 0.3601 0.913 0.084 0.860 0.000 0.056
#> SRR2087329 1 0.3937 0.956 0.800 0.000 0.188 0.012
#> SRR2087366 3 0.0188 0.997 0.000 0.000 0.996 0.004
#> SRR2087300 2 0.2670 0.922 0.072 0.904 0.000 0.024
#> SRR2087284 2 0.1661 0.928 0.004 0.944 0.000 0.052
#> SRR2087303 2 0.5058 0.883 0.128 0.768 0.000 0.104
#> SRR2087351 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR2087302 2 0.1151 0.931 0.008 0.968 0.000 0.024
#> SRR2087304 2 0.5058 0.883 0.128 0.768 0.000 0.104
#> SRR2087298 2 0.5434 0.884 0.132 0.740 0.000 0.128
#> SRR2087320 4 0.5322 0.987 0.028 0.000 0.312 0.660
#> SRR2087308 4 0.5322 0.987 0.028 0.000 0.312 0.660
#> SRR2087295 2 0.2522 0.922 0.016 0.908 0.000 0.076
#> SRR2087292 2 0.3601 0.913 0.084 0.860 0.000 0.056
#> SRR2087291 2 0.2060 0.926 0.016 0.932 0.000 0.052
#> SRR2087294 2 0.2522 0.922 0.016 0.908 0.000 0.076
#> SRR2087299 2 0.5815 0.879 0.140 0.708 0.000 0.152
#> SRR2087288 2 0.5434 0.884 0.132 0.740 0.000 0.128
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.5321 0.927 0.020 0.000 0.184 0.704 NA
#> SRR2087307 4 0.5407 0.927 0.024 0.000 0.184 0.700 NA
#> SRR2087359 3 0.0880 0.938 0.000 0.000 0.968 0.000 NA
#> SRR2087373 3 0.2329 0.920 0.000 0.000 0.876 0.000 NA
#> SRR2087363 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087317 4 0.5321 0.927 0.020 0.000 0.184 0.704 NA
#> SRR2087313 4 0.5321 0.927 0.020 0.000 0.184 0.704 NA
#> SRR2087360 3 0.2230 0.923 0.000 0.000 0.884 0.000 NA
#> SRR2087375 3 0.2230 0.923 0.000 0.000 0.884 0.000 NA
#> SRR2087349 1 0.2100 0.868 0.924 0.000 0.048 0.012 NA
#> SRR2087326 1 0.2100 0.868 0.924 0.000 0.048 0.012 NA
#> SRR2087306 4 0.5321 0.927 0.020 0.000 0.184 0.704 NA
#> SRR2087347 1 0.2100 0.868 0.924 0.000 0.048 0.012 NA
#> SRR2087327 1 0.2100 0.868 0.924 0.000 0.048 0.012 NA
#> SRR2087318 4 0.5321 0.927 0.020 0.000 0.184 0.704 NA
#> SRR2087350 1 0.2100 0.868 0.924 0.000 0.048 0.012 NA
#> SRR2087309 4 0.5321 0.927 0.020 0.000 0.184 0.704 NA
#> SRR2087344 1 0.5862 0.769 0.548 0.004 0.048 0.020 NA
#> SRR2087364 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087332 1 0.3207 0.869 0.872 0.000 0.048 0.056 NA
#> SRR2087336 1 0.2100 0.868 0.924 0.000 0.048 0.012 NA
#> SRR2087348 1 0.6008 0.772 0.544 0.004 0.048 0.028 NA
#> SRR2087353 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087343 1 0.2067 0.870 0.920 0.000 0.048 0.032 NA
#> SRR2087322 4 0.3511 0.929 0.012 0.000 0.184 0.800 NA
#> SRR2087335 1 0.5213 0.771 0.556 0.000 0.048 0.000 NA
#> SRR2087362 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087374 3 0.1851 0.929 0.000 0.000 0.912 0.000 NA
#> SRR2087346 1 0.3207 0.869 0.872 0.000 0.048 0.056 NA
#> SRR2087345 1 0.2400 0.872 0.912 0.000 0.048 0.020 NA
#> SRR2087358 3 0.1671 0.930 0.000 0.000 0.924 0.000 NA
#> SRR2087334 1 0.1800 0.870 0.932 0.000 0.048 0.020 NA
#> SRR2087323 4 0.4918 0.914 0.012 0.000 0.184 0.728 NA
#> SRR2087330 1 0.6133 0.789 0.580 0.000 0.048 0.056 NA
#> SRR2087354 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087342 1 0.5213 0.771 0.556 0.000 0.048 0.000 NA
#> SRR2087369 3 0.2230 0.923 0.000 0.000 0.884 0.000 NA
#> SRR2087371 3 0.2230 0.923 0.000 0.000 0.884 0.000 NA
#> SRR2087361 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087367 3 0.2230 0.923 0.000 0.000 0.884 0.000 NA
#> SRR2087301 2 0.1918 0.922 0.012 0.932 0.004 0.004 NA
#> SRR2087333 1 0.3207 0.869 0.872 0.000 0.048 0.056 NA
#> SRR2087356 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087370 3 0.1341 0.934 0.000 0.000 0.944 0.000 NA
#> SRR2087312 4 0.3634 0.930 0.012 0.000 0.184 0.796 NA
#> SRR2087338 1 0.3207 0.869 0.872 0.000 0.048 0.056 NA
#> SRR2087365 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087319 4 0.5321 0.927 0.020 0.000 0.184 0.704 NA
#> SRR2087368 3 0.2230 0.923 0.000 0.000 0.884 0.000 NA
#> SRR2087315 4 0.5217 0.927 0.020 0.000 0.184 0.712 NA
#> SRR2087372 3 0.1341 0.934 0.000 0.000 0.944 0.000 NA
#> SRR2087357 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087297 2 0.0486 0.925 0.004 0.988 0.004 0.000 NA
#> SRR2087352 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087339 1 0.3207 0.869 0.872 0.000 0.048 0.056 NA
#> SRR2087286 2 0.1918 0.922 0.012 0.932 0.004 0.004 NA
#> SRR2087355 3 0.0880 0.935 0.000 0.000 0.968 0.000 NA
#> SRR2087331 1 0.1883 0.869 0.932 0.000 0.048 0.012 NA
#> SRR2087328 1 0.5084 0.826 0.720 0.004 0.048 0.024 NA
#> SRR2087321 4 0.3511 0.929 0.012 0.000 0.184 0.800 NA
#> SRR2087310 4 0.4918 0.914 0.012 0.000 0.184 0.728 NA
#> SRR2087341 1 0.5879 0.768 0.540 0.004 0.048 0.020 NA
#> SRR2087340 1 0.5236 0.768 0.544 0.000 0.048 0.000 NA
#> SRR2087283 2 0.0162 0.925 0.000 0.996 0.004 0.000 NA
#> SRR2087296 2 0.0162 0.925 0.000 0.996 0.004 0.000 NA
#> SRR2087337 1 0.5213 0.771 0.556 0.000 0.048 0.000 NA
#> SRR2087316 4 0.4918 0.914 0.012 0.000 0.184 0.728 NA
#> SRR2087325 4 0.4110 0.930 0.012 0.000 0.184 0.776 NA
#> SRR2087287 2 0.2312 0.921 0.012 0.920 0.004 0.032 NA
#> SRR2087289 2 0.1659 0.926 0.008 0.948 0.004 0.024 NA
#> SRR2087311 4 0.4918 0.914 0.012 0.000 0.184 0.728 NA
#> SRR2087324 4 0.4959 0.914 0.016 0.000 0.184 0.728 NA
#> SRR2087305 2 0.1903 0.924 0.004 0.936 0.004 0.028 NA
#> SRR2087282 2 0.2282 0.921 0.008 0.920 0.004 0.036 NA
#> SRR2087285 2 0.1659 0.925 0.008 0.948 0.004 0.024 NA
#> SRR2087290 2 0.2748 0.912 0.012 0.884 0.004 0.008 NA
#> SRR2087293 2 0.2748 0.912 0.012 0.884 0.004 0.008 NA
#> SRR2087329 1 0.2100 0.868 0.924 0.000 0.048 0.012 NA
#> SRR2087366 3 0.2329 0.920 0.000 0.000 0.876 0.000 NA
#> SRR2087300 2 0.2197 0.919 0.012 0.916 0.004 0.004 NA
#> SRR2087284 2 0.1659 0.925 0.008 0.948 0.004 0.024 NA
#> SRR2087303 2 0.4650 0.846 0.000 0.724 0.004 0.056 NA
#> SRR2087351 3 0.1341 0.934 0.000 0.000 0.944 0.000 NA
#> SRR2087302 2 0.0889 0.926 0.012 0.976 0.004 0.004 NA
#> SRR2087304 2 0.4650 0.846 0.000 0.724 0.004 0.056 NA
#> SRR2087298 2 0.4908 0.844 0.000 0.692 0.004 0.060 NA
#> SRR2087320 4 0.4918 0.914 0.012 0.000 0.184 0.728 NA
#> SRR2087308 4 0.4918 0.914 0.012 0.000 0.184 0.728 NA
#> SRR2087295 2 0.2438 0.921 0.008 0.912 0.004 0.044 NA
#> SRR2087292 2 0.2748 0.912 0.012 0.884 0.004 0.008 NA
#> SRR2087291 2 0.2394 0.923 0.012 0.916 0.004 0.036 NA
#> SRR2087294 2 0.2550 0.921 0.012 0.908 0.004 0.044 NA
#> SRR2087299 2 0.5184 0.844 0.004 0.688 0.004 0.076 NA
#> SRR2087288 2 0.4908 0.844 0.000 0.692 0.004 0.060 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 4 0.3381 0.878 0.000 0.000 0.000 0.800 NA 0.044
#> SRR2087307 4 0.3108 0.879 0.000 0.000 0.000 0.828 NA 0.044
#> SRR2087359 3 0.4322 0.870 0.020 0.000 0.760 0.068 NA 0.004
#> SRR2087373 3 0.2069 0.843 0.020 0.000 0.908 0.068 NA 0.000
#> SRR2087363 3 0.5196 0.869 0.020 0.000 0.600 0.068 NA 0.000
#> SRR2087317 4 0.3381 0.878 0.000 0.000 0.000 0.800 NA 0.044
#> SRR2087313 4 0.3381 0.878 0.000 0.000 0.000 0.800 NA 0.044
#> SRR2087360 3 0.2069 0.844 0.020 0.000 0.908 0.068 NA 0.004
#> SRR2087375 3 0.2069 0.844 0.020 0.000 0.908 0.068 NA 0.004
#> SRR2087349 1 0.0767 0.832 0.976 0.000 0.008 0.000 NA 0.004
#> SRR2087326 1 0.0767 0.832 0.976 0.000 0.008 0.000 NA 0.004
#> SRR2087306 4 0.3381 0.878 0.000 0.000 0.000 0.800 NA 0.044
#> SRR2087347 1 0.0767 0.832 0.976 0.000 0.008 0.000 NA 0.004
#> SRR2087327 1 0.0665 0.832 0.980 0.000 0.008 0.000 NA 0.004
#> SRR2087318 4 0.3381 0.878 0.000 0.000 0.000 0.800 NA 0.044
#> SRR2087350 1 0.0767 0.832 0.976 0.000 0.008 0.000 NA 0.004
#> SRR2087309 4 0.3381 0.878 0.000 0.000 0.000 0.800 NA 0.044
#> SRR2087344 1 0.5720 0.678 0.472 0.000 0.000 0.000 NA 0.172
#> SRR2087364 3 0.5196 0.869 0.020 0.000 0.600 0.068 NA 0.000
#> SRR2087332 1 0.2001 0.831 0.912 0.000 0.012 0.000 NA 0.068
#> SRR2087336 1 0.0767 0.832 0.976 0.000 0.008 0.000 NA 0.004
#> SRR2087348 1 0.5851 0.684 0.476 0.000 0.004 0.000 NA 0.176
#> SRR2087353 3 0.5196 0.869 0.020 0.000 0.600 0.068 NA 0.000
#> SRR2087343 1 0.0790 0.834 0.968 0.000 0.000 0.000 NA 0.032
#> SRR2087322 4 0.0000 0.881 0.000 0.000 0.000 1.000 NA 0.000
#> SRR2087335 1 0.5992 0.678 0.476 0.000 0.004 0.000 NA 0.236
#> SRR2087362 3 0.5196 0.869 0.020 0.000 0.600 0.068 NA 0.000
#> SRR2087374 3 0.2842 0.850 0.020 0.000 0.876 0.068 NA 0.004
#> SRR2087346 1 0.2001 0.831 0.912 0.000 0.012 0.000 NA 0.068
#> SRR2087345 1 0.1124 0.835 0.956 0.000 0.000 0.000 NA 0.036
#> SRR2087358 3 0.3052 0.851 0.020 0.000 0.864 0.068 NA 0.004
#> SRR2087334 1 0.0547 0.834 0.980 0.000 0.000 0.000 NA 0.020
#> SRR2087323 4 0.2979 0.853 0.000 0.000 0.008 0.848 NA 0.112
#> SRR2087330 1 0.5956 0.716 0.540 0.000 0.016 0.000 NA 0.220
#> SRR2087354 3 0.5196 0.869 0.020 0.000 0.600 0.068 NA 0.000
#> SRR2087342 1 0.5992 0.678 0.476 0.000 0.004 0.000 NA 0.236
#> SRR2087369 3 0.1926 0.844 0.020 0.000 0.912 0.068 NA 0.000
#> SRR2087371 3 0.1926 0.844 0.020 0.000 0.912 0.068 NA 0.000
#> SRR2087361 3 0.5196 0.869 0.020 0.000 0.600 0.068 NA 0.000
#> SRR2087367 3 0.1926 0.844 0.020 0.000 0.912 0.068 NA 0.000
#> SRR2087301 2 0.2126 0.869 0.000 0.904 0.020 0.000 NA 0.072
#> SRR2087333 1 0.2001 0.831 0.912 0.000 0.012 0.000 NA 0.068
#> SRR2087356 3 0.5315 0.868 0.020 0.000 0.600 0.068 NA 0.004
#> SRR2087370 3 0.5727 0.854 0.020 0.000 0.668 0.068 NA 0.076
#> SRR2087312 4 0.0146 0.881 0.000 0.000 0.000 0.996 NA 0.000
#> SRR2087338 1 0.2001 0.831 0.912 0.000 0.012 0.000 NA 0.068
#> SRR2087365 3 0.5196 0.869 0.020 0.000 0.600 0.068 NA 0.000
#> SRR2087319 4 0.3381 0.878 0.000 0.000 0.000 0.800 NA 0.044
#> SRR2087368 3 0.1926 0.844 0.020 0.000 0.912 0.068 NA 0.000
#> SRR2087315 4 0.3307 0.879 0.000 0.000 0.000 0.808 NA 0.044
#> SRR2087372 3 0.5727 0.854 0.020 0.000 0.668 0.068 NA 0.076
#> SRR2087357 3 0.5315 0.868 0.020 0.000 0.600 0.068 NA 0.004
#> SRR2087297 2 0.0551 0.874 0.000 0.984 0.008 0.000 NA 0.004
#> SRR2087352 3 0.5315 0.868 0.020 0.000 0.600 0.068 NA 0.004
#> SRR2087339 1 0.2001 0.831 0.912 0.000 0.012 0.000 NA 0.068
#> SRR2087286 2 0.2182 0.869 0.000 0.900 0.020 0.000 NA 0.076
#> SRR2087355 3 0.5315 0.868 0.020 0.000 0.600 0.068 NA 0.004
#> SRR2087331 1 0.0551 0.833 0.984 0.000 0.008 0.000 NA 0.004
#> SRR2087328 1 0.4354 0.769 0.720 0.000 0.004 0.000 NA 0.080
#> SRR2087321 4 0.0000 0.881 0.000 0.000 0.000 1.000 NA 0.000
#> SRR2087310 4 0.2887 0.854 0.000 0.000 0.008 0.856 NA 0.104
#> SRR2087341 1 0.5714 0.675 0.464 0.000 0.000 0.000 NA 0.168
#> SRR2087340 1 0.5993 0.675 0.472 0.000 0.004 0.000 NA 0.228
#> SRR2087283 2 0.0405 0.875 0.000 0.988 0.008 0.000 NA 0.000
#> SRR2087296 2 0.0520 0.875 0.000 0.984 0.008 0.000 NA 0.000
#> SRR2087337 1 0.5992 0.678 0.476 0.000 0.004 0.000 NA 0.236
#> SRR2087316 4 0.2887 0.854 0.000 0.000 0.008 0.856 NA 0.104
#> SRR2087325 4 0.1462 0.884 0.000 0.000 0.000 0.936 NA 0.008
#> SRR2087287 2 0.2998 0.865 0.000 0.856 0.024 0.000 NA 0.024
#> SRR2087289 2 0.2039 0.873 0.000 0.916 0.020 0.000 NA 0.012
#> SRR2087311 4 0.2887 0.854 0.000 0.000 0.008 0.856 NA 0.104
#> SRR2087324 4 0.2630 0.855 0.000 0.000 0.004 0.872 NA 0.092
#> SRR2087305 2 0.2100 0.874 0.000 0.916 0.016 0.000 NA 0.032
#> SRR2087282 2 0.2872 0.866 0.000 0.868 0.024 0.000 NA 0.028
#> SRR2087285 2 0.2265 0.873 0.000 0.904 0.012 0.000 NA 0.028
#> SRR2087290 2 0.3048 0.852 0.000 0.824 0.020 0.000 NA 0.152
#> SRR2087293 2 0.3048 0.852 0.000 0.824 0.020 0.000 NA 0.152
#> SRR2087329 1 0.0862 0.832 0.972 0.000 0.008 0.000 NA 0.004
#> SRR2087366 3 0.2069 0.843 0.020 0.000 0.908 0.068 NA 0.000
#> SRR2087300 2 0.2443 0.865 0.000 0.880 0.020 0.000 NA 0.096
#> SRR2087284 2 0.2103 0.873 0.000 0.912 0.012 0.000 NA 0.020
#> SRR2087303 2 0.3817 0.740 0.000 0.568 0.000 0.000 NA 0.432
#> SRR2087351 3 0.5727 0.854 0.020 0.000 0.668 0.068 NA 0.076
#> SRR2087302 2 0.1932 0.877 0.000 0.924 0.016 0.000 NA 0.020
#> SRR2087304 2 0.3817 0.740 0.000 0.568 0.000 0.000 NA 0.432
#> SRR2087298 2 0.3854 0.738 0.000 0.536 0.000 0.000 NA 0.464
#> SRR2087320 4 0.3210 0.852 0.000 0.000 0.012 0.832 NA 0.124
#> SRR2087308 4 0.2887 0.854 0.000 0.000 0.008 0.856 NA 0.104
#> SRR2087295 2 0.3042 0.864 0.000 0.852 0.020 0.000 NA 0.028
#> SRR2087292 2 0.3048 0.852 0.000 0.824 0.020 0.000 NA 0.152
#> SRR2087291 2 0.2345 0.873 0.000 0.900 0.020 0.000 NA 0.020
#> SRR2087294 2 0.3078 0.864 0.000 0.848 0.016 0.000 NA 0.032
#> SRR2087299 2 0.4293 0.738 0.000 0.536 0.004 0.000 NA 0.448
#> SRR2087288 2 0.3854 0.738 0.000 0.536 0.000 0.000 NA 0.464
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 16723 rows and 94 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.864 0.957 0.980 0.4292 0.569 0.569
#> 3 3 0.743 0.850 0.887 0.4751 0.712 0.524
#> 4 4 1.000 1.000 1.000 0.1946 0.881 0.669
#> 5 5 1.000 0.979 0.986 0.0284 0.979 0.915
#> 6 6 0.960 0.894 0.934 0.0209 0.993 0.969
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] 4
There is also optional best \(k\) = 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
#> SRR2087314 1 0.000 0.984 1.000 0.000
#> SRR2087307 1 0.000 0.984 1.000 0.000
#> SRR2087359 1 0.000 0.984 1.000 0.000
#> SRR2087373 1 0.000 0.984 1.000 0.000
#> SRR2087363 1 0.000 0.984 1.000 0.000
#> SRR2087317 1 0.163 0.967 0.976 0.024
#> SRR2087313 1 0.163 0.967 0.976 0.024
#> SRR2087360 1 0.000 0.984 1.000 0.000
#> SRR2087375 1 0.000 0.984 1.000 0.000
#> SRR2087349 1 0.000 0.984 1.000 0.000
#> SRR2087326 1 0.000 0.984 1.000 0.000
#> SRR2087306 1 0.000 0.984 1.000 0.000
#> SRR2087347 1 0.000 0.984 1.000 0.000
#> SRR2087327 1 0.000 0.984 1.000 0.000
#> SRR2087318 1 0.506 0.885 0.888 0.112
#> SRR2087350 1 0.000 0.984 1.000 0.000
#> SRR2087309 1 0.163 0.967 0.976 0.024
#> SRR2087344 1 0.000 0.984 1.000 0.000
#> SRR2087364 1 0.000 0.984 1.000 0.000
#> SRR2087332 1 0.000 0.984 1.000 0.000
#> SRR2087336 1 0.000 0.984 1.000 0.000
#> SRR2087348 1 0.000 0.984 1.000 0.000
#> SRR2087353 1 0.000 0.984 1.000 0.000
#> SRR2087343 1 0.000 0.984 1.000 0.000
#> SRR2087322 1 0.506 0.885 0.888 0.112
#> SRR2087335 1 0.000 0.984 1.000 0.000
#> SRR2087362 1 0.000 0.984 1.000 0.000
#> SRR2087374 1 0.000 0.984 1.000 0.000
#> SRR2087346 1 0.000 0.984 1.000 0.000
#> SRR2087345 1 0.000 0.984 1.000 0.000
#> SRR2087358 1 0.000 0.984 1.000 0.000
#> SRR2087334 1 0.000 0.984 1.000 0.000
#> SRR2087323 2 0.541 0.849 0.124 0.876
#> SRR2087330 1 0.000 0.984 1.000 0.000
#> SRR2087354 1 0.000 0.984 1.000 0.000
#> SRR2087342 1 0.000 0.984 1.000 0.000
#> SRR2087369 1 0.000 0.984 1.000 0.000
#> SRR2087371 1 0.000 0.984 1.000 0.000
#> SRR2087361 1 0.000 0.984 1.000 0.000
#> SRR2087367 1 0.000 0.984 1.000 0.000
#> SRR2087301 2 0.000 0.965 0.000 1.000
#> SRR2087333 1 0.000 0.984 1.000 0.000
#> SRR2087356 1 0.000 0.984 1.000 0.000
#> SRR2087370 1 0.000 0.984 1.000 0.000
#> SRR2087312 1 0.506 0.885 0.888 0.112
#> SRR2087338 1 0.000 0.984 1.000 0.000
#> SRR2087365 1 0.000 0.984 1.000 0.000
#> SRR2087319 1 0.163 0.967 0.976 0.024
#> SRR2087368 1 0.000 0.984 1.000 0.000
#> SRR2087315 1 0.506 0.885 0.888 0.112
#> SRR2087372 1 0.000 0.984 1.000 0.000
#> SRR2087357 1 0.000 0.984 1.000 0.000
#> SRR2087297 2 0.000 0.965 0.000 1.000
#> SRR2087352 1 0.000 0.984 1.000 0.000
#> SRR2087339 1 0.000 0.984 1.000 0.000
#> SRR2087286 2 0.000 0.965 0.000 1.000
#> SRR2087355 1 0.000 0.984 1.000 0.000
#> SRR2087331 1 0.000 0.984 1.000 0.000
#> SRR2087328 1 0.000 0.984 1.000 0.000
#> SRR2087321 1 0.506 0.885 0.888 0.112
#> SRR2087310 1 0.506 0.885 0.888 0.112
#> SRR2087341 1 0.000 0.984 1.000 0.000
#> SRR2087340 1 0.000 0.984 1.000 0.000
#> SRR2087283 2 0.000 0.965 0.000 1.000
#> SRR2087296 2 0.000 0.965 0.000 1.000
#> SRR2087337 1 0.000 0.984 1.000 0.000
#> SRR2087316 2 0.775 0.714 0.228 0.772
#> SRR2087325 1 0.416 0.913 0.916 0.084
#> SRR2087287 2 0.000 0.965 0.000 1.000
#> SRR2087289 2 0.000 0.965 0.000 1.000
#> SRR2087311 1 0.506 0.885 0.888 0.112
#> SRR2087324 2 0.760 0.726 0.220 0.780
#> SRR2087305 2 0.000 0.965 0.000 1.000
#> SRR2087282 2 0.000 0.965 0.000 1.000
#> SRR2087285 2 0.000 0.965 0.000 1.000
#> SRR2087290 2 0.000 0.965 0.000 1.000
#> SRR2087293 2 0.000 0.965 0.000 1.000
#> SRR2087329 1 0.000 0.984 1.000 0.000
#> SRR2087366 1 0.000 0.984 1.000 0.000
#> SRR2087300 2 0.000 0.965 0.000 1.000
#> SRR2087284 2 0.000 0.965 0.000 1.000
#> SRR2087303 2 0.000 0.965 0.000 1.000
#> SRR2087351 1 0.000 0.984 1.000 0.000
#> SRR2087302 2 0.000 0.965 0.000 1.000
#> SRR2087304 2 0.000 0.965 0.000 1.000
#> SRR2087298 2 0.000 0.965 0.000 1.000
#> SRR2087320 2 0.000 0.965 0.000 1.000
#> SRR2087308 2 0.955 0.410 0.376 0.624
#> SRR2087295 2 0.000 0.965 0.000 1.000
#> SRR2087292 2 0.000 0.965 0.000 1.000
#> SRR2087291 2 0.000 0.965 0.000 1.000
#> SRR2087294 2 0.000 0.965 0.000 1.000
#> SRR2087299 2 0.000 0.965 0.000 1.000
#> SRR2087288 2 0.000 0.965 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087307 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087359 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087373 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087363 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087317 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087313 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087360 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087375 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087349 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087326 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087306 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087347 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087327 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087318 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087350 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087309 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087344 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087364 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087332 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087336 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087348 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087353 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087343 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087322 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087335 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087362 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087374 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087346 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087345 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087358 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087334 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087323 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087330 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087354 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087342 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087369 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087371 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087361 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087367 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087301 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087333 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087356 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087370 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087312 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087338 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087365 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087319 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087368 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087315 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087372 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087357 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087297 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087352 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087339 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087286 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087355 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087331 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087328 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087321 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087310 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087341 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087340 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087283 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087296 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087337 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087316 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087325 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087287 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087289 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087311 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087324 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087305 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087282 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087285 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087290 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087293 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087329 1 0.615 1.000 0.592 0.000 0.408
#> SRR2087366 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087300 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087284 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087303 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087351 3 0.000 0.693 0.000 0.000 1.000
#> SRR2087302 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087304 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087298 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087320 2 0.615 0.524 0.408 0.592 0.000
#> SRR2087308 3 0.615 0.704 0.408 0.000 0.592
#> SRR2087295 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087292 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087291 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087294 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087299 2 0.000 0.985 0.000 1.000 0.000
#> SRR2087288 2 0.000 0.985 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087307 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087359 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087317 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087313 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087360 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087349 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087326 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087306 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087347 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087327 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087318 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087350 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087309 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087344 1 0.0703 0.985 0.976 0 0 0.000 0.024
#> SRR2087364 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087332 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087336 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087348 1 0.0703 0.985 0.976 0 0 0.000 0.024
#> SRR2087353 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087343 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087322 4 0.3707 0.679 0.000 0 0 0.716 0.284
#> SRR2087335 1 0.0703 0.985 0.976 0 0 0.000 0.024
#> SRR2087362 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087346 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087345 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087334 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087323 5 0.0703 0.994 0.000 0 0 0.024 0.976
#> SRR2087330 1 0.0609 0.986 0.980 0 0 0.000 0.020
#> SRR2087354 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087342 1 0.0703 0.985 0.976 0 0 0.000 0.024
#> SRR2087369 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087333 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087312 4 0.2852 0.810 0.000 0 0 0.828 0.172
#> SRR2087338 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087319 4 0.0000 0.921 0.000 0 0 1.000 0.000
#> SRR2087368 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087315 4 0.0794 0.908 0.000 0 0 0.972 0.028
#> SRR2087372 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087339 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087331 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087328 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087321 4 0.3707 0.679 0.000 0 0 0.716 0.284
#> SRR2087310 5 0.0703 0.994 0.000 0 0 0.024 0.976
#> SRR2087341 1 0.0703 0.985 0.976 0 0 0.000 0.024
#> SRR2087340 1 0.0703 0.985 0.976 0 0 0.000 0.024
#> SRR2087283 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087337 1 0.0703 0.985 0.976 0 0 0.000 0.024
#> SRR2087316 5 0.0880 0.995 0.000 0 0 0.032 0.968
#> SRR2087325 4 0.2329 0.851 0.000 0 0 0.876 0.124
#> SRR2087287 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087311 5 0.0880 0.995 0.000 0 0 0.032 0.968
#> SRR2087324 5 0.0880 0.995 0.000 0 0 0.032 0.968
#> SRR2087305 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087329 1 0.0000 0.993 1.000 0 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0 1 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087320 5 0.0703 0.994 0.000 0 0 0.024 0.976
#> SRR2087308 5 0.0880 0.995 0.000 0 0 0.032 0.968
#> SRR2087295 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0.000 1 0 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0.000 1 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
#> SRR2087314 6 0.0146 0.8148 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR2087307 6 0.3547 0.0892 0.000 0.000 0.000 0.000 0.332 0.668
#> SRR2087359 3 0.0000 0.9868 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087373 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087363 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087317 6 0.0000 0.8153 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2087313 6 0.0000 0.8153 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2087360 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087375 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087349 1 0.0632 0.8948 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087326 1 0.0632 0.8948 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087306 6 0.0146 0.8148 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR2087347 1 0.0632 0.8948 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087327 1 0.0632 0.8948 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087318 6 0.0146 0.8125 0.000 0.000 0.000 0.004 0.000 0.996
#> SRR2087350 1 0.0632 0.8948 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087309 6 0.0000 0.8153 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2087344 1 0.3446 0.7388 0.692 0.000 0.000 0.000 0.308 0.000
#> SRR2087364 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087332 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087336 1 0.0632 0.8948 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087348 1 0.3126 0.7879 0.752 0.000 0.000 0.000 0.248 0.000
#> SRR2087353 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087343 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087322 5 0.5849 0.8281 0.000 0.000 0.000 0.204 0.460 0.336
#> SRR2087335 1 0.3659 0.6948 0.636 0.000 0.000 0.000 0.364 0.000
#> SRR2087362 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087374 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087346 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087345 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087358 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087334 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087323 4 0.0937 0.8971 0.000 0.000 0.000 0.960 0.040 0.000
#> SRR2087330 1 0.1556 0.8677 0.920 0.000 0.000 0.000 0.080 0.000
#> SRR2087354 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087342 1 0.3659 0.6948 0.636 0.000 0.000 0.000 0.364 0.000
#> SRR2087369 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087371 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087361 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087367 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087301 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087333 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087356 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087370 3 0.0146 0.9868 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR2087312 5 0.5428 0.8925 0.000 0.000 0.000 0.120 0.484 0.396
#> SRR2087338 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087365 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087319 6 0.0146 0.8148 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR2087368 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087315 6 0.0858 0.7789 0.000 0.000 0.000 0.028 0.004 0.968
#> SRR2087372 3 0.0000 0.9868 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087357 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087297 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087352 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087339 1 0.0000 0.8971 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2087286 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087355 3 0.0632 0.9850 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2087331 1 0.0363 0.8959 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR2087328 1 0.1075 0.8902 0.952 0.000 0.000 0.000 0.048 0.000
#> SRR2087321 6 0.6119 -0.7446 0.000 0.000 0.000 0.304 0.340 0.356
#> SRR2087310 4 0.0000 0.9094 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2087341 1 0.3647 0.7115 0.640 0.000 0.000 0.000 0.360 0.000
#> SRR2087340 1 0.3684 0.6879 0.628 0.000 0.000 0.000 0.372 0.000
#> SRR2087283 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087296 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087337 1 0.3659 0.6948 0.636 0.000 0.000 0.000 0.364 0.000
#> SRR2087316 4 0.0547 0.9104 0.000 0.000 0.000 0.980 0.020 0.000
#> SRR2087325 5 0.5414 0.8812 0.000 0.000 0.000 0.116 0.468 0.416
#> SRR2087287 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087289 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087311 4 0.0692 0.9098 0.000 0.000 0.000 0.976 0.020 0.004
#> SRR2087324 4 0.3515 0.4945 0.000 0.000 0.000 0.676 0.324 0.000
#> SRR2087305 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087282 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087285 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087290 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087293 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087329 1 0.0632 0.8948 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR2087366 3 0.0260 0.9861 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2087300 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087284 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087303 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087351 3 0.0000 0.9868 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2087302 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087304 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087298 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087320 4 0.0937 0.8933 0.000 0.000 0.000 0.960 0.040 0.000
#> SRR2087308 4 0.0937 0.9017 0.000 0.000 0.000 0.960 0.040 0.000
#> SRR2087295 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087292 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087291 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087294 2 0.0000 0.9981 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2087299 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2087288 2 0.0146 0.9981 0.000 0.996 0.000 0.000 0.004 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16723 rows and 94 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 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.997 0.999 0.3862 0.616 0.616
#> 3 3 1.000 0.998 0.999 0.6637 0.743 0.582
#> 4 4 1.000 1.000 1.000 0.1771 0.886 0.681
#> 5 5 1.000 0.989 0.994 0.0280 0.979 0.915
#> 6 6 0.929 0.954 0.937 0.0429 0.966 0.846
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
#> SRR2087314 1 0.000 0.998 1.000 0.000
#> SRR2087307 1 0.000 0.998 1.000 0.000
#> SRR2087359 1 0.000 0.998 1.000 0.000
#> SRR2087373 1 0.000 0.998 1.000 0.000
#> SRR2087363 1 0.000 0.998 1.000 0.000
#> SRR2087317 1 0.000 0.998 1.000 0.000
#> SRR2087313 1 0.000 0.998 1.000 0.000
#> SRR2087360 1 0.000 0.998 1.000 0.000
#> SRR2087375 1 0.000 0.998 1.000 0.000
#> SRR2087349 1 0.000 0.998 1.000 0.000
#> SRR2087326 1 0.000 0.998 1.000 0.000
#> SRR2087306 1 0.000 0.998 1.000 0.000
#> SRR2087347 1 0.000 0.998 1.000 0.000
#> SRR2087327 1 0.000 0.998 1.000 0.000
#> SRR2087318 1 0.000 0.998 1.000 0.000
#> SRR2087350 1 0.000 0.998 1.000 0.000
#> SRR2087309 1 0.000 0.998 1.000 0.000
#> SRR2087344 1 0.000 0.998 1.000 0.000
#> SRR2087364 1 0.000 0.998 1.000 0.000
#> SRR2087332 1 0.000 0.998 1.000 0.000
#> SRR2087336 1 0.000 0.998 1.000 0.000
#> SRR2087348 1 0.000 0.998 1.000 0.000
#> SRR2087353 1 0.000 0.998 1.000 0.000
#> SRR2087343 1 0.000 0.998 1.000 0.000
#> SRR2087322 1 0.000 0.998 1.000 0.000
#> SRR2087335 1 0.000 0.998 1.000 0.000
#> SRR2087362 1 0.000 0.998 1.000 0.000
#> SRR2087374 1 0.000 0.998 1.000 0.000
#> SRR2087346 1 0.000 0.998 1.000 0.000
#> SRR2087345 1 0.000 0.998 1.000 0.000
#> SRR2087358 1 0.000 0.998 1.000 0.000
#> SRR2087334 1 0.000 0.998 1.000 0.000
#> SRR2087323 1 0.000 0.998 1.000 0.000
#> SRR2087330 1 0.000 0.998 1.000 0.000
#> SRR2087354 1 0.000 0.998 1.000 0.000
#> SRR2087342 1 0.000 0.998 1.000 0.000
#> SRR2087369 1 0.000 0.998 1.000 0.000
#> SRR2087371 1 0.000 0.998 1.000 0.000
#> SRR2087361 1 0.000 0.998 1.000 0.000
#> SRR2087367 1 0.000 0.998 1.000 0.000
#> SRR2087301 2 0.000 1.000 0.000 1.000
#> SRR2087333 1 0.000 0.998 1.000 0.000
#> SRR2087356 1 0.000 0.998 1.000 0.000
#> SRR2087370 1 0.000 0.998 1.000 0.000
#> SRR2087312 1 0.000 0.998 1.000 0.000
#> SRR2087338 1 0.000 0.998 1.000 0.000
#> SRR2087365 1 0.000 0.998 1.000 0.000
#> SRR2087319 1 0.000 0.998 1.000 0.000
#> SRR2087368 1 0.000 0.998 1.000 0.000
#> SRR2087315 1 0.000 0.998 1.000 0.000
#> SRR2087372 1 0.000 0.998 1.000 0.000
#> SRR2087357 1 0.000 0.998 1.000 0.000
#> SRR2087297 2 0.000 1.000 0.000 1.000
#> SRR2087352 1 0.000 0.998 1.000 0.000
#> SRR2087339 1 0.000 0.998 1.000 0.000
#> SRR2087286 2 0.000 1.000 0.000 1.000
#> SRR2087355 1 0.000 0.998 1.000 0.000
#> SRR2087331 1 0.000 0.998 1.000 0.000
#> SRR2087328 1 0.000 0.998 1.000 0.000
#> SRR2087321 1 0.000 0.998 1.000 0.000
#> SRR2087310 1 0.000 0.998 1.000 0.000
#> SRR2087341 1 0.000 0.998 1.000 0.000
#> SRR2087340 1 0.000 0.998 1.000 0.000
#> SRR2087283 2 0.000 1.000 0.000 1.000
#> SRR2087296 2 0.000 1.000 0.000 1.000
#> SRR2087337 1 0.000 0.998 1.000 0.000
#> SRR2087316 1 0.000 0.998 1.000 0.000
#> SRR2087325 1 0.000 0.998 1.000 0.000
#> SRR2087287 2 0.000 1.000 0.000 1.000
#> SRR2087289 2 0.000 1.000 0.000 1.000
#> SRR2087311 1 0.000 0.998 1.000 0.000
#> SRR2087324 1 0.000 0.998 1.000 0.000
#> SRR2087305 2 0.000 1.000 0.000 1.000
#> SRR2087282 2 0.000 1.000 0.000 1.000
#> SRR2087285 2 0.000 1.000 0.000 1.000
#> SRR2087290 2 0.000 1.000 0.000 1.000
#> SRR2087293 2 0.000 1.000 0.000 1.000
#> SRR2087329 1 0.000 0.998 1.000 0.000
#> SRR2087366 1 0.000 0.998 1.000 0.000
#> SRR2087300 2 0.000 1.000 0.000 1.000
#> SRR2087284 2 0.000 1.000 0.000 1.000
#> SRR2087303 2 0.000 1.000 0.000 1.000
#> SRR2087351 1 0.000 0.998 1.000 0.000
#> SRR2087302 2 0.000 1.000 0.000 1.000
#> SRR2087304 2 0.000 1.000 0.000 1.000
#> SRR2087298 2 0.000 1.000 0.000 1.000
#> SRR2087320 1 0.541 0.858 0.876 0.124
#> SRR2087308 1 0.000 0.998 1.000 0.000
#> SRR2087295 2 0.000 1.000 0.000 1.000
#> SRR2087292 2 0.000 1.000 0.000 1.000
#> SRR2087291 2 0.000 1.000 0.000 1.000
#> SRR2087294 2 0.000 1.000 0.000 1.000
#> SRR2087299 2 0.000 1.000 0.000 1.000
#> SRR2087288 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
#> SRR2087314 3 0.000 0.998 0 0.000 1.000
#> SRR2087307 3 0.000 0.998 0 0.000 1.000
#> SRR2087359 3 0.000 0.998 0 0.000 1.000
#> SRR2087373 3 0.000 0.998 0 0.000 1.000
#> SRR2087363 3 0.000 0.998 0 0.000 1.000
#> SRR2087317 3 0.000 0.998 0 0.000 1.000
#> SRR2087313 3 0.000 0.998 0 0.000 1.000
#> SRR2087360 3 0.000 0.998 0 0.000 1.000
#> SRR2087375 3 0.000 0.998 0 0.000 1.000
#> SRR2087349 1 0.000 1.000 1 0.000 0.000
#> SRR2087326 1 0.000 1.000 1 0.000 0.000
#> SRR2087306 3 0.000 0.998 0 0.000 1.000
#> SRR2087347 1 0.000 1.000 1 0.000 0.000
#> SRR2087327 1 0.000 1.000 1 0.000 0.000
#> SRR2087318 3 0.000 0.998 0 0.000 1.000
#> SRR2087350 1 0.000 1.000 1 0.000 0.000
#> SRR2087309 3 0.000 0.998 0 0.000 1.000
#> SRR2087344 1 0.000 1.000 1 0.000 0.000
#> SRR2087364 3 0.000 0.998 0 0.000 1.000
#> SRR2087332 1 0.000 1.000 1 0.000 0.000
#> SRR2087336 1 0.000 1.000 1 0.000 0.000
#> SRR2087348 1 0.000 1.000 1 0.000 0.000
#> SRR2087353 3 0.000 0.998 0 0.000 1.000
#> SRR2087343 1 0.000 1.000 1 0.000 0.000
#> SRR2087322 3 0.000 0.998 0 0.000 1.000
#> SRR2087335 1 0.000 1.000 1 0.000 0.000
#> SRR2087362 3 0.000 0.998 0 0.000 1.000
#> SRR2087374 3 0.000 0.998 0 0.000 1.000
#> SRR2087346 1 0.000 1.000 1 0.000 0.000
#> SRR2087345 1 0.000 1.000 1 0.000 0.000
#> SRR2087358 3 0.000 0.998 0 0.000 1.000
#> SRR2087334 1 0.000 1.000 1 0.000 0.000
#> SRR2087323 3 0.000 0.998 0 0.000 1.000
#> SRR2087330 1 0.000 1.000 1 0.000 0.000
#> SRR2087354 3 0.000 0.998 0 0.000 1.000
#> SRR2087342 1 0.000 1.000 1 0.000 0.000
#> SRR2087369 3 0.000 0.998 0 0.000 1.000
#> SRR2087371 3 0.000 0.998 0 0.000 1.000
#> SRR2087361 3 0.000 0.998 0 0.000 1.000
#> SRR2087367 3 0.000 0.998 0 0.000 1.000
#> SRR2087301 2 0.000 1.000 0 1.000 0.000
#> SRR2087333 1 0.000 1.000 1 0.000 0.000
#> SRR2087356 3 0.000 0.998 0 0.000 1.000
#> SRR2087370 3 0.000 0.998 0 0.000 1.000
#> SRR2087312 3 0.000 0.998 0 0.000 1.000
#> SRR2087338 1 0.000 1.000 1 0.000 0.000
#> SRR2087365 3 0.000 0.998 0 0.000 1.000
#> SRR2087319 3 0.000 0.998 0 0.000 1.000
#> SRR2087368 3 0.000 0.998 0 0.000 1.000
#> SRR2087315 3 0.000 0.998 0 0.000 1.000
#> SRR2087372 3 0.000 0.998 0 0.000 1.000
#> SRR2087357 3 0.000 0.998 0 0.000 1.000
#> SRR2087297 2 0.000 1.000 0 1.000 0.000
#> SRR2087352 3 0.000 0.998 0 0.000 1.000
#> SRR2087339 1 0.000 1.000 1 0.000 0.000
#> SRR2087286 2 0.000 1.000 0 1.000 0.000
#> SRR2087355 3 0.000 0.998 0 0.000 1.000
#> SRR2087331 1 0.000 1.000 1 0.000 0.000
#> SRR2087328 1 0.000 1.000 1 0.000 0.000
#> SRR2087321 3 0.000 0.998 0 0.000 1.000
#> SRR2087310 3 0.000 0.998 0 0.000 1.000
#> SRR2087341 1 0.000 1.000 1 0.000 0.000
#> SRR2087340 1 0.000 1.000 1 0.000 0.000
#> SRR2087283 2 0.000 1.000 0 1.000 0.000
#> SRR2087296 2 0.000 1.000 0 1.000 0.000
#> SRR2087337 1 0.000 1.000 1 0.000 0.000
#> SRR2087316 3 0.000 0.998 0 0.000 1.000
#> SRR2087325 3 0.000 0.998 0 0.000 1.000
#> SRR2087287 2 0.000 1.000 0 1.000 0.000
#> SRR2087289 2 0.000 1.000 0 1.000 0.000
#> SRR2087311 3 0.000 0.998 0 0.000 1.000
#> SRR2087324 3 0.000 0.998 0 0.000 1.000
#> SRR2087305 2 0.000 1.000 0 1.000 0.000
#> SRR2087282 2 0.000 1.000 0 1.000 0.000
#> SRR2087285 2 0.000 1.000 0 1.000 0.000
#> SRR2087290 2 0.000 1.000 0 1.000 0.000
#> SRR2087293 2 0.000 1.000 0 1.000 0.000
#> SRR2087329 1 0.000 1.000 1 0.000 0.000
#> SRR2087366 3 0.000 0.998 0 0.000 1.000
#> SRR2087300 2 0.000 1.000 0 1.000 0.000
#> SRR2087284 2 0.000 1.000 0 1.000 0.000
#> SRR2087303 2 0.000 1.000 0 1.000 0.000
#> SRR2087351 3 0.000 0.998 0 0.000 1.000
#> SRR2087302 2 0.000 1.000 0 1.000 0.000
#> SRR2087304 2 0.000 1.000 0 1.000 0.000
#> SRR2087298 2 0.000 1.000 0 1.000 0.000
#> SRR2087320 3 0.312 0.879 0 0.108 0.892
#> SRR2087308 3 0.000 0.998 0 0.000 1.000
#> SRR2087295 2 0.000 1.000 0 1.000 0.000
#> SRR2087292 2 0.000 1.000 0 1.000 0.000
#> SRR2087291 2 0.000 1.000 0 1.000 0.000
#> SRR2087294 2 0.000 1.000 0 1.000 0.000
#> SRR2087299 2 0.000 1.000 0 1.000 0.000
#> SRR2087288 2 0.000 1.000 0 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087307 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087359 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087313 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087360 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087306 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087347 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087350 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087344 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.141 0.931 0 0 0 0.940 0.060
#> SRR2087335 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087323 5 0.000 1.000 0 0 0 0.000 1.000
#> SRR2087330 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.120 0.939 0 0 0 0.952 0.048
#> SRR2087338 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087319 4 0.000 0.955 0 0 0 1.000 0.000
#> SRR2087368 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.120 0.939 0 0 0 0.952 0.048
#> SRR2087372 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.395 0.547 0 0 0 0.668 0.332
#> SRR2087310 5 0.000 1.000 0 0 0 0.000 1.000
#> SRR2087341 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087316 5 0.000 1.000 0 0 0 0.000 1.000
#> SRR2087325 4 0.120 0.939 0 0 0 0.952 0.048
#> SRR2087287 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087311 5 0.000 1.000 0 0 0 0.000 1.000
#> SRR2087324 5 0.000 1.000 0 0 0 0.000 1.000
#> SRR2087305 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087320 5 0.000 1.000 0 0 0 0.000 1.000
#> SRR2087308 5 0.000 1.000 0 0 0 0.000 1.000
#> SRR2087295 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.000 1.000 0 1 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
#> SRR2087314 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087307 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087359 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087317 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087313 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087360 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087349 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087326 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087306 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087347 1 0.3244 0.973 0.732 0.000 0 0.000 0.268 0.000
#> SRR2087327 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087318 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087350 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087309 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087344 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087332 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087336 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087348 1 0.3126 0.989 0.752 0.000 0 0.000 0.248 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087343 1 0.3175 0.984 0.744 0.000 0 0.000 0.256 0.000
#> SRR2087322 6 0.1267 0.931 0.000 0.000 0 0.060 0.000 0.940
#> SRR2087335 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087346 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087345 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087334 1 0.3221 0.977 0.736 0.000 0 0.000 0.264 0.000
#> SRR2087323 4 0.0000 1.000 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087330 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087342 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087301 2 0.2219 0.887 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087333 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087312 6 0.1075 0.939 0.000 0.000 0 0.048 0.000 0.952
#> SRR2087338 5 0.0632 0.941 0.024 0.000 0 0.000 0.976 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087319 6 0.0000 0.955 0.000 0.000 0 0.000 0.000 1.000
#> SRR2087368 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087315 6 0.1075 0.939 0.000 0.000 0 0.048 0.000 0.952
#> SRR2087372 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087297 2 0.1714 0.915 0.092 0.908 0 0.000 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087339 5 0.2941 0.605 0.220 0.000 0 0.000 0.780 0.000
#> SRR2087286 2 0.2219 0.887 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087331 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087328 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087321 6 0.3547 0.547 0.000 0.000 0 0.332 0.000 0.668
#> SRR2087310 4 0.0000 1.000 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087341 1 0.3244 0.973 0.732 0.000 0 0.000 0.268 0.000
#> SRR2087340 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087283 2 0.1444 0.916 0.072 0.928 0 0.000 0.000 0.000
#> SRR2087296 2 0.2416 0.908 0.156 0.844 0 0.000 0.000 0.000
#> SRR2087337 1 0.3101 0.992 0.756 0.000 0 0.000 0.244 0.000
#> SRR2087316 4 0.0000 1.000 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087325 6 0.1075 0.939 0.000 0.000 0 0.048 0.000 0.952
#> SRR2087287 2 0.1910 0.906 0.108 0.892 0 0.000 0.000 0.000
#> SRR2087289 2 0.0713 0.910 0.028 0.972 0 0.000 0.000 0.000
#> SRR2087311 4 0.0000 1.000 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087324 4 0.0000 1.000 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087305 2 0.1910 0.906 0.108 0.892 0 0.000 0.000 0.000
#> SRR2087282 2 0.1910 0.906 0.108 0.892 0 0.000 0.000 0.000
#> SRR2087285 2 0.1910 0.906 0.108 0.892 0 0.000 0.000 0.000
#> SRR2087290 2 0.2219 0.887 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087293 2 0.2219 0.887 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087329 5 0.0000 0.964 0.000 0.000 0 0.000 1.000 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087300 2 0.2219 0.887 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087284 2 0.2219 0.907 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087303 2 0.1327 0.905 0.064 0.936 0 0.000 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0.000 1 0.000 0.000 0.000
#> SRR2087302 2 0.2219 0.907 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087304 2 0.2048 0.889 0.120 0.880 0 0.000 0.000 0.000
#> SRR2087298 2 0.1814 0.908 0.100 0.900 0 0.000 0.000 0.000
#> SRR2087320 4 0.0000 1.000 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087308 4 0.0000 1.000 0.000 0.000 0 1.000 0.000 0.000
#> SRR2087295 2 0.1910 0.906 0.108 0.892 0 0.000 0.000 0.000
#> SRR2087292 2 0.2219 0.887 0.136 0.864 0 0.000 0.000 0.000
#> SRR2087291 2 0.0713 0.910 0.028 0.972 0 0.000 0.000 0.000
#> SRR2087294 2 0.1910 0.906 0.108 0.892 0 0.000 0.000 0.000
#> SRR2087299 2 0.0937 0.915 0.040 0.960 0 0.000 0.000 0.000
#> SRR2087288 2 0.1387 0.902 0.068 0.932 0 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "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 16723 rows and 94 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.496 0.679 0.803 0.5043 0.497 0.497
#> 3 3 1.000 1.000 1.000 0.2733 0.633 0.399
#> 4 4 1.000 1.000 1.000 0.1780 0.886 0.681
#> 5 5 0.984 0.956 0.976 0.0186 0.985 0.940
#> 6 6 0.948 0.851 0.926 0.0342 0.969 0.864
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
#> SRR2087314 2 0.978 0.644 0.412 0.588
#> SRR2087307 2 0.978 0.644 0.412 0.588
#> SRR2087359 1 0.000 0.685 1.000 0.000
#> SRR2087373 1 0.000 0.685 1.000 0.000
#> SRR2087363 1 0.000 0.685 1.000 0.000
#> SRR2087317 2 0.978 0.644 0.412 0.588
#> SRR2087313 2 0.978 0.644 0.412 0.588
#> SRR2087360 1 0.000 0.685 1.000 0.000
#> SRR2087375 1 0.000 0.685 1.000 0.000
#> SRR2087349 1 0.978 0.672 0.588 0.412
#> SRR2087326 1 0.978 0.672 0.588 0.412
#> SRR2087306 2 0.978 0.644 0.412 0.588
#> SRR2087347 1 0.978 0.672 0.588 0.412
#> SRR2087327 1 0.978 0.672 0.588 0.412
#> SRR2087318 2 0.978 0.644 0.412 0.588
#> SRR2087350 1 0.978 0.672 0.588 0.412
#> SRR2087309 2 0.978 0.644 0.412 0.588
#> SRR2087344 1 0.978 0.672 0.588 0.412
#> SRR2087364 1 0.000 0.685 1.000 0.000
#> SRR2087332 1 0.978 0.672 0.588 0.412
#> SRR2087336 1 0.978 0.672 0.588 0.412
#> SRR2087348 1 0.978 0.672 0.588 0.412
#> SRR2087353 1 0.000 0.685 1.000 0.000
#> SRR2087343 1 0.978 0.672 0.588 0.412
#> SRR2087322 2 0.978 0.644 0.412 0.588
#> SRR2087335 1 0.978 0.672 0.588 0.412
#> SRR2087362 1 0.000 0.685 1.000 0.000
#> SRR2087374 1 0.000 0.685 1.000 0.000
#> SRR2087346 1 0.978 0.672 0.588 0.412
#> SRR2087345 1 0.978 0.672 0.588 0.412
#> SRR2087358 1 0.000 0.685 1.000 0.000
#> SRR2087334 1 0.978 0.672 0.588 0.412
#> SRR2087323 2 0.978 0.644 0.412 0.588
#> SRR2087330 1 0.978 0.672 0.588 0.412
#> SRR2087354 1 0.000 0.685 1.000 0.000
#> SRR2087342 1 0.978 0.672 0.588 0.412
#> SRR2087369 1 0.000 0.685 1.000 0.000
#> SRR2087371 1 0.000 0.685 1.000 0.000
#> SRR2087361 1 0.000 0.685 1.000 0.000
#> SRR2087367 1 0.000 0.685 1.000 0.000
#> SRR2087301 2 0.000 0.710 0.000 1.000
#> SRR2087333 1 0.978 0.672 0.588 0.412
#> SRR2087356 1 0.000 0.685 1.000 0.000
#> SRR2087370 1 0.000 0.685 1.000 0.000
#> SRR2087312 2 0.978 0.644 0.412 0.588
#> SRR2087338 1 0.978 0.672 0.588 0.412
#> SRR2087365 1 0.000 0.685 1.000 0.000
#> SRR2087319 2 0.978 0.644 0.412 0.588
#> SRR2087368 1 0.000 0.685 1.000 0.000
#> SRR2087315 2 0.978 0.644 0.412 0.588
#> SRR2087372 1 0.000 0.685 1.000 0.000
#> SRR2087357 1 0.000 0.685 1.000 0.000
#> SRR2087297 2 0.000 0.710 0.000 1.000
#> SRR2087352 1 0.000 0.685 1.000 0.000
#> SRR2087339 1 0.978 0.672 0.588 0.412
#> SRR2087286 2 0.000 0.710 0.000 1.000
#> SRR2087355 1 0.000 0.685 1.000 0.000
#> SRR2087331 1 0.978 0.672 0.588 0.412
#> SRR2087328 1 0.978 0.672 0.588 0.412
#> SRR2087321 2 0.978 0.644 0.412 0.588
#> SRR2087310 2 0.978 0.644 0.412 0.588
#> SRR2087341 1 0.978 0.672 0.588 0.412
#> SRR2087340 1 0.978 0.672 0.588 0.412
#> SRR2087283 2 0.000 0.710 0.000 1.000
#> SRR2087296 2 0.000 0.710 0.000 1.000
#> SRR2087337 1 0.978 0.672 0.588 0.412
#> SRR2087316 2 0.978 0.644 0.412 0.588
#> SRR2087325 2 0.978 0.644 0.412 0.588
#> SRR2087287 2 0.000 0.710 0.000 1.000
#> SRR2087289 2 0.000 0.710 0.000 1.000
#> SRR2087311 2 0.978 0.644 0.412 0.588
#> SRR2087324 2 0.978 0.644 0.412 0.588
#> SRR2087305 2 0.000 0.710 0.000 1.000
#> SRR2087282 2 0.000 0.710 0.000 1.000
#> SRR2087285 2 0.000 0.710 0.000 1.000
#> SRR2087290 2 0.000 0.710 0.000 1.000
#> SRR2087293 2 0.000 0.710 0.000 1.000
#> SRR2087329 1 0.978 0.672 0.588 0.412
#> SRR2087366 1 0.000 0.685 1.000 0.000
#> SRR2087300 2 0.000 0.710 0.000 1.000
#> SRR2087284 2 0.000 0.710 0.000 1.000
#> SRR2087303 2 0.000 0.710 0.000 1.000
#> SRR2087351 1 0.000 0.685 1.000 0.000
#> SRR2087302 2 0.000 0.710 0.000 1.000
#> SRR2087304 2 0.000 0.710 0.000 1.000
#> SRR2087298 2 0.000 0.710 0.000 1.000
#> SRR2087320 2 0.978 0.644 0.412 0.588
#> SRR2087308 2 0.978 0.644 0.412 0.588
#> SRR2087295 2 0.000 0.710 0.000 1.000
#> SRR2087292 2 0.000 0.710 0.000 1.000
#> SRR2087291 2 0.000 0.710 0.000 1.000
#> SRR2087294 2 0.000 0.710 0.000 1.000
#> SRR2087299 2 0.000 0.710 0.000 1.000
#> SRR2087288 2 0.000 0.710 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2087314 1 0 1 1 0 0
#> SRR2087307 1 0 1 1 0 0
#> SRR2087359 3 0 1 0 0 1
#> SRR2087373 3 0 1 0 0 1
#> SRR2087363 3 0 1 0 0 1
#> SRR2087317 1 0 1 1 0 0
#> SRR2087313 1 0 1 1 0 0
#> SRR2087360 3 0 1 0 0 1
#> SRR2087375 3 0 1 0 0 1
#> SRR2087349 1 0 1 1 0 0
#> SRR2087326 1 0 1 1 0 0
#> SRR2087306 1 0 1 1 0 0
#> SRR2087347 1 0 1 1 0 0
#> SRR2087327 1 0 1 1 0 0
#> SRR2087318 1 0 1 1 0 0
#> SRR2087350 1 0 1 1 0 0
#> SRR2087309 1 0 1 1 0 0
#> SRR2087344 1 0 1 1 0 0
#> SRR2087364 3 0 1 0 0 1
#> SRR2087332 1 0 1 1 0 0
#> SRR2087336 1 0 1 1 0 0
#> SRR2087348 1 0 1 1 0 0
#> SRR2087353 3 0 1 0 0 1
#> SRR2087343 1 0 1 1 0 0
#> SRR2087322 1 0 1 1 0 0
#> SRR2087335 1 0 1 1 0 0
#> SRR2087362 3 0 1 0 0 1
#> SRR2087374 3 0 1 0 0 1
#> SRR2087346 1 0 1 1 0 0
#> SRR2087345 1 0 1 1 0 0
#> SRR2087358 3 0 1 0 0 1
#> SRR2087334 1 0 1 1 0 0
#> SRR2087323 1 0 1 1 0 0
#> SRR2087330 1 0 1 1 0 0
#> SRR2087354 3 0 1 0 0 1
#> SRR2087342 1 0 1 1 0 0
#> SRR2087369 3 0 1 0 0 1
#> SRR2087371 3 0 1 0 0 1
#> SRR2087361 3 0 1 0 0 1
#> SRR2087367 3 0 1 0 0 1
#> SRR2087301 2 0 1 0 1 0
#> SRR2087333 1 0 1 1 0 0
#> SRR2087356 3 0 1 0 0 1
#> SRR2087370 3 0 1 0 0 1
#> SRR2087312 1 0 1 1 0 0
#> SRR2087338 1 0 1 1 0 0
#> SRR2087365 3 0 1 0 0 1
#> SRR2087319 1 0 1 1 0 0
#> SRR2087368 3 0 1 0 0 1
#> SRR2087315 1 0 1 1 0 0
#> SRR2087372 3 0 1 0 0 1
#> SRR2087357 3 0 1 0 0 1
#> SRR2087297 2 0 1 0 1 0
#> SRR2087352 3 0 1 0 0 1
#> SRR2087339 1 0 1 1 0 0
#> SRR2087286 2 0 1 0 1 0
#> SRR2087355 3 0 1 0 0 1
#> SRR2087331 1 0 1 1 0 0
#> SRR2087328 1 0 1 1 0 0
#> SRR2087321 1 0 1 1 0 0
#> SRR2087310 1 0 1 1 0 0
#> SRR2087341 1 0 1 1 0 0
#> SRR2087340 1 0 1 1 0 0
#> SRR2087283 2 0 1 0 1 0
#> SRR2087296 2 0 1 0 1 0
#> SRR2087337 1 0 1 1 0 0
#> SRR2087316 1 0 1 1 0 0
#> SRR2087325 1 0 1 1 0 0
#> SRR2087287 2 0 1 0 1 0
#> SRR2087289 2 0 1 0 1 0
#> SRR2087311 1 0 1 1 0 0
#> SRR2087324 1 0 1 1 0 0
#> SRR2087305 2 0 1 0 1 0
#> SRR2087282 2 0 1 0 1 0
#> SRR2087285 2 0 1 0 1 0
#> SRR2087290 2 0 1 0 1 0
#> SRR2087293 2 0 1 0 1 0
#> SRR2087329 1 0 1 1 0 0
#> SRR2087366 3 0 1 0 0 1
#> SRR2087300 2 0 1 0 1 0
#> SRR2087284 2 0 1 0 1 0
#> SRR2087303 2 0 1 0 1 0
#> SRR2087351 3 0 1 0 0 1
#> SRR2087302 2 0 1 0 1 0
#> SRR2087304 2 0 1 0 1 0
#> SRR2087298 2 0 1 0 1 0
#> SRR2087320 1 0 1 1 0 0
#> SRR2087308 1 0 1 1 0 0
#> SRR2087295 2 0 1 0 1 0
#> SRR2087292 2 0 1 0 1 0
#> SRR2087291 2 0 1 0 1 0
#> SRR2087294 2 0 1 0 1 0
#> SRR2087299 2 0 1 0 1 0
#> SRR2087288 2 0 1 0 1 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.3612 0.530 0 0 0 0.732 0.268
#> SRR2087307 5 0.0000 0.598 0 0 0 0.000 1.000
#> SRR2087359 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087317 4 0.0000 0.871 0 0 0 1.000 0.000
#> SRR2087313 4 0.0000 0.871 0 0 0 1.000 0.000
#> SRR2087360 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087349 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087326 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087306 4 0.2813 0.695 0 0 0 0.832 0.168
#> SRR2087347 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087327 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087318 4 0.0000 0.871 0 0 0 1.000 0.000
#> SRR2087350 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087309 4 0.0000 0.871 0 0 0 1.000 0.000
#> SRR2087344 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087364 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087332 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087336 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087348 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087353 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087343 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087322 4 0.2377 0.823 0 0 0 0.872 0.128
#> SRR2087335 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087362 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087346 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087345 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087358 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087334 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087323 5 0.3837 0.773 0 0 0 0.308 0.692
#> SRR2087330 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087354 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087342 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087369 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087333 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087356 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087312 4 0.2377 0.823 0 0 0 0.872 0.128
#> SRR2087338 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087365 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087319 4 0.1341 0.829 0 0 0 0.944 0.056
#> SRR2087368 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087315 4 0.0000 0.871 0 0 0 1.000 0.000
#> SRR2087372 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087339 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087286 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087331 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087328 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087321 4 0.0000 0.871 0 0 0 1.000 0.000
#> SRR2087310 5 0.4192 0.624 0 0 0 0.404 0.596
#> SRR2087341 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087340 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087283 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087337 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087316 4 0.2377 0.823 0 0 0 0.872 0.128
#> SRR2087325 4 0.2377 0.823 0 0 0 0.872 0.128
#> SRR2087287 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087311 4 0.0162 0.869 0 0 0 0.996 0.004
#> SRR2087324 4 0.2377 0.823 0 0 0 0.872 0.128
#> SRR2087305 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087329 1 0.0000 1.000 1 0 0 0.000 0.000
#> SRR2087366 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0 0 1 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087320 5 0.3774 0.776 0 0 0 0.296 0.704
#> SRR2087308 4 0.2377 0.823 0 0 0 0.872 0.128
#> SRR2087295 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0 1 0 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0 1 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
#> SRR2087314 6 0.3244 0.589 0.000 0 0 0.268 0.000 0.732
#> SRR2087307 4 0.0000 0.617 0.000 0 0 1.000 0.000 0.000
#> SRR2087359 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087373 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087363 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087317 6 0.0000 0.958 0.000 0 0 0.000 0.000 1.000
#> SRR2087313 6 0.0000 0.958 0.000 0 0 0.000 0.000 1.000
#> SRR2087360 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087375 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087349 1 0.2762 0.652 0.804 0 0 0.000 0.196 0.000
#> SRR2087326 1 0.2762 0.652 0.804 0 0 0.000 0.196 0.000
#> SRR2087306 6 0.1501 0.887 0.000 0 0 0.076 0.000 0.924
#> SRR2087347 1 0.2793 0.649 0.800 0 0 0.000 0.200 0.000
#> SRR2087327 1 0.0713 0.690 0.972 0 0 0.000 0.028 0.000
#> SRR2087318 6 0.0000 0.958 0.000 0 0 0.000 0.000 1.000
#> SRR2087350 1 0.0713 0.690 0.972 0 0 0.000 0.028 0.000
#> SRR2087309 6 0.0000 0.958 0.000 0 0 0.000 0.000 1.000
#> SRR2087344 1 0.3747 -0.269 0.604 0 0 0.000 0.396 0.000
#> SRR2087364 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087332 1 0.2135 0.690 0.872 0 0 0.000 0.128 0.000
#> SRR2087336 1 0.1863 0.695 0.896 0 0 0.000 0.104 0.000
#> SRR2087348 5 0.1556 0.514 0.080 0 0 0.000 0.920 0.000
#> SRR2087353 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087343 1 0.2631 0.665 0.820 0 0 0.000 0.180 0.000
#> SRR2087322 6 0.0260 0.957 0.000 0 0 0.008 0.000 0.992
#> SRR2087335 5 0.3817 0.488 0.432 0 0 0.000 0.568 0.000
#> SRR2087362 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087374 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087346 1 0.2092 0.637 0.876 0 0 0.000 0.124 0.000
#> SRR2087345 5 0.3862 0.413 0.476 0 0 0.000 0.524 0.000
#> SRR2087358 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087334 1 0.2854 0.640 0.792 0 0 0.000 0.208 0.000
#> SRR2087323 4 0.3428 0.853 0.000 0 0 0.696 0.000 0.304
#> SRR2087330 5 0.3765 0.496 0.404 0 0 0.000 0.596 0.000
#> SRR2087354 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087342 1 0.3860 -0.351 0.528 0 0 0.000 0.472 0.000
#> SRR2087369 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087371 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087361 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087367 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087301 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087333 1 0.1663 0.659 0.912 0 0 0.000 0.088 0.000
#> SRR2087356 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087370 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087312 6 0.0865 0.941 0.000 0 0 0.036 0.000 0.964
#> SRR2087338 1 0.1663 0.659 0.912 0 0 0.000 0.088 0.000
#> SRR2087365 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087319 6 0.0632 0.943 0.000 0 0 0.024 0.000 0.976
#> SRR2087368 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087315 6 0.0000 0.958 0.000 0 0 0.000 0.000 1.000
#> SRR2087372 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087357 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087297 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087352 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087339 1 0.1663 0.659 0.912 0 0 0.000 0.088 0.000
#> SRR2087286 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087355 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087331 1 0.1327 0.655 0.936 0 0 0.000 0.064 0.000
#> SRR2087328 5 0.3867 0.450 0.488 0 0 0.000 0.512 0.000
#> SRR2087321 6 0.0146 0.958 0.000 0 0 0.004 0.000 0.996
#> SRR2087310 4 0.3464 0.846 0.000 0 0 0.688 0.000 0.312
#> SRR2087341 5 0.2883 0.354 0.212 0 0 0.000 0.788 0.000
#> SRR2087340 5 0.1610 0.512 0.084 0 0 0.000 0.916 0.000
#> SRR2087283 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087296 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087337 5 0.3817 0.495 0.432 0 0 0.000 0.568 0.000
#> SRR2087316 6 0.0363 0.956 0.000 0 0 0.012 0.000 0.988
#> SRR2087325 6 0.0260 0.957 0.000 0 0 0.008 0.000 0.992
#> SRR2087287 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087289 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087311 6 0.0000 0.958 0.000 0 0 0.000 0.000 1.000
#> SRR2087324 6 0.0865 0.941 0.000 0 0 0.036 0.000 0.964
#> SRR2087305 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087282 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087285 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087290 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087293 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087329 1 0.3076 0.587 0.760 0 0 0.000 0.240 0.000
#> SRR2087366 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087300 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087284 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087303 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087351 3 0.0000 1.000 0.000 0 1 0.000 0.000 0.000
#> SRR2087302 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087304 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087298 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087320 4 0.3390 0.853 0.000 0 0 0.704 0.000 0.296
#> SRR2087308 6 0.0547 0.952 0.000 0 0 0.020 0.000 0.980
#> SRR2087295 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087292 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087291 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087294 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087299 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
#> SRR2087288 2 0.0000 1.000 0.000 1 0 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "NMF"]
# you can also extract it by
# res = res_list["ATC:NMF"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16723 rows and 94 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 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.999 0.999 0.38553 0.616 0.616
#> 3 3 0.743 0.944 0.948 0.65097 0.743 0.582
#> 4 4 1.000 1.000 1.000 0.18831 0.886 0.681
#> 5 5 1.000 0.993 0.992 0.00334 1.000 1.000
#> 6 6 1.000 0.985 0.983 0.00397 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] 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
#> SRR2087314 1 0.000 0.999 1.000 0.000
#> SRR2087307 1 0.000 0.999 1.000 0.000
#> SRR2087359 1 0.000 0.999 1.000 0.000
#> SRR2087373 1 0.000 0.999 1.000 0.000
#> SRR2087363 1 0.000 0.999 1.000 0.000
#> SRR2087317 1 0.000 0.999 1.000 0.000
#> SRR2087313 1 0.000 0.999 1.000 0.000
#> SRR2087360 1 0.000 0.999 1.000 0.000
#> SRR2087375 1 0.000 0.999 1.000 0.000
#> SRR2087349 1 0.000 0.999 1.000 0.000
#> SRR2087326 1 0.000 0.999 1.000 0.000
#> SRR2087306 1 0.000 0.999 1.000 0.000
#> SRR2087347 1 0.000 0.999 1.000 0.000
#> SRR2087327 1 0.000 0.999 1.000 0.000
#> SRR2087318 1 0.000 0.999 1.000 0.000
#> SRR2087350 1 0.000 0.999 1.000 0.000
#> SRR2087309 1 0.000 0.999 1.000 0.000
#> SRR2087344 1 0.000 0.999 1.000 0.000
#> SRR2087364 1 0.000 0.999 1.000 0.000
#> SRR2087332 1 0.000 0.999 1.000 0.000
#> SRR2087336 1 0.000 0.999 1.000 0.000
#> SRR2087348 1 0.000 0.999 1.000 0.000
#> SRR2087353 1 0.000 0.999 1.000 0.000
#> SRR2087343 1 0.000 0.999 1.000 0.000
#> SRR2087322 1 0.000 0.999 1.000 0.000
#> SRR2087335 1 0.000 0.999 1.000 0.000
#> SRR2087362 1 0.000 0.999 1.000 0.000
#> SRR2087374 1 0.000 0.999 1.000 0.000
#> SRR2087346 1 0.000 0.999 1.000 0.000
#> SRR2087345 1 0.000 0.999 1.000 0.000
#> SRR2087358 1 0.000 0.999 1.000 0.000
#> SRR2087334 1 0.000 0.999 1.000 0.000
#> SRR2087323 1 0.000 0.999 1.000 0.000
#> SRR2087330 1 0.000 0.999 1.000 0.000
#> SRR2087354 1 0.000 0.999 1.000 0.000
#> SRR2087342 1 0.000 0.999 1.000 0.000
#> SRR2087369 1 0.000 0.999 1.000 0.000
#> SRR2087371 1 0.000 0.999 1.000 0.000
#> SRR2087361 1 0.000 0.999 1.000 0.000
#> SRR2087367 1 0.000 0.999 1.000 0.000
#> SRR2087301 2 0.000 1.000 0.000 1.000
#> SRR2087333 1 0.000 0.999 1.000 0.000
#> SRR2087356 1 0.000 0.999 1.000 0.000
#> SRR2087370 1 0.000 0.999 1.000 0.000
#> SRR2087312 1 0.000 0.999 1.000 0.000
#> SRR2087338 1 0.000 0.999 1.000 0.000
#> SRR2087365 1 0.000 0.999 1.000 0.000
#> SRR2087319 1 0.000 0.999 1.000 0.000
#> SRR2087368 1 0.000 0.999 1.000 0.000
#> SRR2087315 1 0.000 0.999 1.000 0.000
#> SRR2087372 1 0.000 0.999 1.000 0.000
#> SRR2087357 1 0.000 0.999 1.000 0.000
#> SRR2087297 2 0.000 1.000 0.000 1.000
#> SRR2087352 1 0.000 0.999 1.000 0.000
#> SRR2087339 1 0.000 0.999 1.000 0.000
#> SRR2087286 2 0.000 1.000 0.000 1.000
#> SRR2087355 1 0.000 0.999 1.000 0.000
#> SRR2087331 1 0.000 0.999 1.000 0.000
#> SRR2087328 1 0.000 0.999 1.000 0.000
#> SRR2087321 1 0.000 0.999 1.000 0.000
#> SRR2087310 1 0.000 0.999 1.000 0.000
#> SRR2087341 1 0.000 0.999 1.000 0.000
#> SRR2087340 1 0.000 0.999 1.000 0.000
#> SRR2087283 2 0.000 1.000 0.000 1.000
#> SRR2087296 2 0.000 1.000 0.000 1.000
#> SRR2087337 1 0.000 0.999 1.000 0.000
#> SRR2087316 1 0.000 0.999 1.000 0.000
#> SRR2087325 1 0.000 0.999 1.000 0.000
#> SRR2087287 2 0.000 1.000 0.000 1.000
#> SRR2087289 2 0.000 1.000 0.000 1.000
#> SRR2087311 1 0.000 0.999 1.000 0.000
#> SRR2087324 1 0.000 0.999 1.000 0.000
#> SRR2087305 2 0.000 1.000 0.000 1.000
#> SRR2087282 2 0.000 1.000 0.000 1.000
#> SRR2087285 2 0.000 1.000 0.000 1.000
#> SRR2087290 2 0.000 1.000 0.000 1.000
#> SRR2087293 2 0.000 1.000 0.000 1.000
#> SRR2087329 1 0.000 0.999 1.000 0.000
#> SRR2087366 1 0.000 0.999 1.000 0.000
#> SRR2087300 2 0.000 1.000 0.000 1.000
#> SRR2087284 2 0.000 1.000 0.000 1.000
#> SRR2087303 2 0.000 1.000 0.000 1.000
#> SRR2087351 1 0.000 0.999 1.000 0.000
#> SRR2087302 2 0.000 1.000 0.000 1.000
#> SRR2087304 2 0.000 1.000 0.000 1.000
#> SRR2087298 2 0.000 1.000 0.000 1.000
#> SRR2087320 1 0.311 0.941 0.944 0.056
#> SRR2087308 1 0.000 0.999 1.000 0.000
#> SRR2087295 2 0.000 1.000 0.000 1.000
#> SRR2087292 2 0.000 1.000 0.000 1.000
#> SRR2087291 2 0.000 1.000 0.000 1.000
#> SRR2087294 2 0.000 1.000 0.000 1.000
#> SRR2087299 2 0.000 1.000 0.000 1.000
#> SRR2087288 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
#> SRR2087314 3 0.00 0.873 0.000 0 1.000
#> SRR2087307 3 0.00 0.873 0.000 0 1.000
#> SRR2087359 3 0.45 0.889 0.196 0 0.804
#> SRR2087373 3 0.45 0.889 0.196 0 0.804
#> SRR2087363 3 0.45 0.889 0.196 0 0.804
#> SRR2087317 3 0.00 0.873 0.000 0 1.000
#> SRR2087313 3 0.00 0.873 0.000 0 1.000
#> SRR2087360 3 0.45 0.889 0.196 0 0.804
#> SRR2087375 3 0.45 0.889 0.196 0 0.804
#> SRR2087349 1 0.00 1.000 1.000 0 0.000
#> SRR2087326 1 0.00 1.000 1.000 0 0.000
#> SRR2087306 3 0.00 0.873 0.000 0 1.000
#> SRR2087347 1 0.00 1.000 1.000 0 0.000
#> SRR2087327 1 0.00 1.000 1.000 0 0.000
#> SRR2087318 3 0.00 0.873 0.000 0 1.000
#> SRR2087350 1 0.00 1.000 1.000 0 0.000
#> SRR2087309 3 0.00 0.873 0.000 0 1.000
#> SRR2087344 1 0.00 1.000 1.000 0 0.000
#> SRR2087364 3 0.45 0.889 0.196 0 0.804
#> SRR2087332 1 0.00 1.000 1.000 0 0.000
#> SRR2087336 1 0.00 1.000 1.000 0 0.000
#> SRR2087348 1 0.00 1.000 1.000 0 0.000
#> SRR2087353 3 0.45 0.889 0.196 0 0.804
#> SRR2087343 1 0.00 1.000 1.000 0 0.000
#> SRR2087322 3 0.00 0.873 0.000 0 1.000
#> SRR2087335 1 0.00 1.000 1.000 0 0.000
#> SRR2087362 3 0.45 0.889 0.196 0 0.804
#> SRR2087374 3 0.45 0.889 0.196 0 0.804
#> SRR2087346 1 0.00 1.000 1.000 0 0.000
#> SRR2087345 1 0.00 1.000 1.000 0 0.000
#> SRR2087358 3 0.45 0.889 0.196 0 0.804
#> SRR2087334 1 0.00 1.000 1.000 0 0.000
#> SRR2087323 3 0.00 0.873 0.000 0 1.000
#> SRR2087330 1 0.00 1.000 1.000 0 0.000
#> SRR2087354 3 0.45 0.889 0.196 0 0.804
#> SRR2087342 1 0.00 1.000 1.000 0 0.000
#> SRR2087369 3 0.45 0.889 0.196 0 0.804
#> SRR2087371 3 0.45 0.889 0.196 0 0.804
#> SRR2087361 3 0.45 0.889 0.196 0 0.804
#> SRR2087367 3 0.45 0.889 0.196 0 0.804
#> SRR2087301 2 0.00 1.000 0.000 1 0.000
#> SRR2087333 1 0.00 1.000 1.000 0 0.000
#> SRR2087356 3 0.45 0.889 0.196 0 0.804
#> SRR2087370 3 0.45 0.889 0.196 0 0.804
#> SRR2087312 3 0.00 0.873 0.000 0 1.000
#> SRR2087338 1 0.00 1.000 1.000 0 0.000
#> SRR2087365 3 0.45 0.889 0.196 0 0.804
#> SRR2087319 3 0.00 0.873 0.000 0 1.000
#> SRR2087368 3 0.45 0.889 0.196 0 0.804
#> SRR2087315 3 0.00 0.873 0.000 0 1.000
#> SRR2087372 3 0.45 0.889 0.196 0 0.804
#> SRR2087357 3 0.45 0.889 0.196 0 0.804
#> SRR2087297 2 0.00 1.000 0.000 1 0.000
#> SRR2087352 3 0.45 0.889 0.196 0 0.804
#> SRR2087339 1 0.00 1.000 1.000 0 0.000
#> SRR2087286 2 0.00 1.000 0.000 1 0.000
#> SRR2087355 3 0.45 0.889 0.196 0 0.804
#> SRR2087331 1 0.00 1.000 1.000 0 0.000
#> SRR2087328 1 0.00 1.000 1.000 0 0.000
#> SRR2087321 3 0.00 0.873 0.000 0 1.000
#> SRR2087310 3 0.00 0.873 0.000 0 1.000
#> SRR2087341 1 0.00 1.000 1.000 0 0.000
#> SRR2087340 1 0.00 1.000 1.000 0 0.000
#> SRR2087283 2 0.00 1.000 0.000 1 0.000
#> SRR2087296 2 0.00 1.000 0.000 1 0.000
#> SRR2087337 1 0.00 1.000 1.000 0 0.000
#> SRR2087316 3 0.00 0.873 0.000 0 1.000
#> SRR2087325 3 0.00 0.873 0.000 0 1.000
#> SRR2087287 2 0.00 1.000 0.000 1 0.000
#> SRR2087289 2 0.00 1.000 0.000 1 0.000
#> SRR2087311 3 0.00 0.873 0.000 0 1.000
#> SRR2087324 3 0.00 0.873 0.000 0 1.000
#> SRR2087305 2 0.00 1.000 0.000 1 0.000
#> SRR2087282 2 0.00 1.000 0.000 1 0.000
#> SRR2087285 2 0.00 1.000 0.000 1 0.000
#> SRR2087290 2 0.00 1.000 0.000 1 0.000
#> SRR2087293 2 0.00 1.000 0.000 1 0.000
#> SRR2087329 1 0.00 1.000 1.000 0 0.000
#> SRR2087366 3 0.45 0.889 0.196 0 0.804
#> SRR2087300 2 0.00 1.000 0.000 1 0.000
#> SRR2087284 2 0.00 1.000 0.000 1 0.000
#> SRR2087303 2 0.00 1.000 0.000 1 0.000
#> SRR2087351 3 0.45 0.889 0.196 0 0.804
#> SRR2087302 2 0.00 1.000 0.000 1 0.000
#> SRR2087304 2 0.00 1.000 0.000 1 0.000
#> SRR2087298 2 0.00 1.000 0.000 1 0.000
#> SRR2087320 3 0.00 0.873 0.000 0 1.000
#> SRR2087308 3 0.00 0.873 0.000 0 1.000
#> SRR2087295 2 0.00 1.000 0.000 1 0.000
#> SRR2087292 2 0.00 1.000 0.000 1 0.000
#> SRR2087291 2 0.00 1.000 0.000 1 0.000
#> SRR2087294 2 0.00 1.000 0.000 1 0.000
#> SRR2087299 2 0.00 1.000 0.000 1 0.000
#> SRR2087288 2 0.00 1.000 0.000 1 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2087314 4 0 1 0 0 0 1
#> SRR2087307 4 0 1 0 0 0 1
#> SRR2087359 3 0 1 0 0 1 0
#> SRR2087373 3 0 1 0 0 1 0
#> SRR2087363 3 0 1 0 0 1 0
#> SRR2087317 4 0 1 0 0 0 1
#> SRR2087313 4 0 1 0 0 0 1
#> SRR2087360 3 0 1 0 0 1 0
#> SRR2087375 3 0 1 0 0 1 0
#> SRR2087349 1 0 1 1 0 0 0
#> SRR2087326 1 0 1 1 0 0 0
#> SRR2087306 4 0 1 0 0 0 1
#> SRR2087347 1 0 1 1 0 0 0
#> SRR2087327 1 0 1 1 0 0 0
#> SRR2087318 4 0 1 0 0 0 1
#> SRR2087350 1 0 1 1 0 0 0
#> SRR2087309 4 0 1 0 0 0 1
#> SRR2087344 1 0 1 1 0 0 0
#> SRR2087364 3 0 1 0 0 1 0
#> SRR2087332 1 0 1 1 0 0 0
#> SRR2087336 1 0 1 1 0 0 0
#> SRR2087348 1 0 1 1 0 0 0
#> SRR2087353 3 0 1 0 0 1 0
#> SRR2087343 1 0 1 1 0 0 0
#> SRR2087322 4 0 1 0 0 0 1
#> SRR2087335 1 0 1 1 0 0 0
#> SRR2087362 3 0 1 0 0 1 0
#> SRR2087374 3 0 1 0 0 1 0
#> SRR2087346 1 0 1 1 0 0 0
#> SRR2087345 1 0 1 1 0 0 0
#> SRR2087358 3 0 1 0 0 1 0
#> SRR2087334 1 0 1 1 0 0 0
#> SRR2087323 4 0 1 0 0 0 1
#> SRR2087330 1 0 1 1 0 0 0
#> SRR2087354 3 0 1 0 0 1 0
#> SRR2087342 1 0 1 1 0 0 0
#> SRR2087369 3 0 1 0 0 1 0
#> SRR2087371 3 0 1 0 0 1 0
#> SRR2087361 3 0 1 0 0 1 0
#> SRR2087367 3 0 1 0 0 1 0
#> SRR2087301 2 0 1 0 1 0 0
#> SRR2087333 1 0 1 1 0 0 0
#> SRR2087356 3 0 1 0 0 1 0
#> SRR2087370 3 0 1 0 0 1 0
#> SRR2087312 4 0 1 0 0 0 1
#> SRR2087338 1 0 1 1 0 0 0
#> SRR2087365 3 0 1 0 0 1 0
#> SRR2087319 4 0 1 0 0 0 1
#> SRR2087368 3 0 1 0 0 1 0
#> SRR2087315 4 0 1 0 0 0 1
#> SRR2087372 3 0 1 0 0 1 0
#> SRR2087357 3 0 1 0 0 1 0
#> SRR2087297 2 0 1 0 1 0 0
#> SRR2087352 3 0 1 0 0 1 0
#> SRR2087339 1 0 1 1 0 0 0
#> SRR2087286 2 0 1 0 1 0 0
#> SRR2087355 3 0 1 0 0 1 0
#> SRR2087331 1 0 1 1 0 0 0
#> SRR2087328 1 0 1 1 0 0 0
#> SRR2087321 4 0 1 0 0 0 1
#> SRR2087310 4 0 1 0 0 0 1
#> SRR2087341 1 0 1 1 0 0 0
#> SRR2087340 1 0 1 1 0 0 0
#> SRR2087283 2 0 1 0 1 0 0
#> SRR2087296 2 0 1 0 1 0 0
#> SRR2087337 1 0 1 1 0 0 0
#> SRR2087316 4 0 1 0 0 0 1
#> SRR2087325 4 0 1 0 0 0 1
#> SRR2087287 2 0 1 0 1 0 0
#> SRR2087289 2 0 1 0 1 0 0
#> SRR2087311 4 0 1 0 0 0 1
#> SRR2087324 4 0 1 0 0 0 1
#> SRR2087305 2 0 1 0 1 0 0
#> SRR2087282 2 0 1 0 1 0 0
#> SRR2087285 2 0 1 0 1 0 0
#> SRR2087290 2 0 1 0 1 0 0
#> SRR2087293 2 0 1 0 1 0 0
#> SRR2087329 1 0 1 1 0 0 0
#> SRR2087366 3 0 1 0 0 1 0
#> SRR2087300 2 0 1 0 1 0 0
#> SRR2087284 2 0 1 0 1 0 0
#> SRR2087303 2 0 1 0 1 0 0
#> SRR2087351 3 0 1 0 0 1 0
#> SRR2087302 2 0 1 0 1 0 0
#> SRR2087304 2 0 1 0 1 0 0
#> SRR2087298 2 0 1 0 1 0 0
#> SRR2087320 4 0 1 0 0 0 1
#> SRR2087308 4 0 1 0 0 0 1
#> SRR2087295 2 0 1 0 1 0 0
#> SRR2087292 2 0 1 0 1 0 0
#> SRR2087291 2 0 1 0 1 0 0
#> SRR2087294 2 0 1 0 1 0 0
#> SRR2087299 2 0 1 0 1 0 0
#> SRR2087288 2 0 1 0 1 0 0
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2087314 4 0.2660 0.916 0.000 0.000 0.008 0.864 NA
#> SRR2087307 4 0.0609 0.982 0.000 0.000 0.000 0.980 NA
#> SRR2087359 3 0.0162 0.996 0.000 0.000 0.996 0.000 NA
#> SRR2087373 3 0.0290 0.995 0.000 0.000 0.992 0.000 NA
#> SRR2087363 3 0.0290 0.995 0.000 0.000 0.992 0.000 NA
#> SRR2087317 4 0.0510 0.982 0.000 0.000 0.000 0.984 NA
#> SRR2087313 4 0.0609 0.983 0.000 0.000 0.000 0.980 NA
#> SRR2087360 3 0.0162 0.997 0.000 0.000 0.996 0.000 NA
#> SRR2087375 3 0.0162 0.997 0.000 0.000 0.996 0.000 NA
#> SRR2087349 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087326 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087306 4 0.1121 0.972 0.000 0.000 0.000 0.956 NA
#> SRR2087347 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087327 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087318 4 0.0000 0.983 0.000 0.000 0.000 1.000 NA
#> SRR2087350 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087309 4 0.0404 0.982 0.000 0.000 0.000 0.988 NA
#> SRR2087344 1 0.0162 0.998 0.996 0.000 0.000 0.000 NA
#> SRR2087364 3 0.0000 0.997 0.000 0.000 1.000 0.000 NA
#> SRR2087332 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087336 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087348 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087353 3 0.0162 0.996 0.000 0.000 0.996 0.000 NA
#> SRR2087343 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087322 4 0.0609 0.982 0.000 0.000 0.000 0.980 NA
#> SRR2087335 1 0.0162 0.998 0.996 0.000 0.000 0.000 NA
#> SRR2087362 3 0.0162 0.996 0.000 0.000 0.996 0.000 NA
#> SRR2087374 3 0.0162 0.997 0.000 0.000 0.996 0.000 NA
#> SRR2087346 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087345 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087358 3 0.0000 0.997 0.000 0.000 1.000 0.000 NA
#> SRR2087334 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087323 4 0.1197 0.971 0.000 0.000 0.000 0.952 NA
#> SRR2087330 1 0.0162 0.998 0.996 0.000 0.000 0.000 NA
#> SRR2087354 3 0.0162 0.996 0.000 0.000 0.996 0.000 NA
#> SRR2087342 1 0.0162 0.998 0.996 0.000 0.000 0.000 NA
#> SRR2087369 3 0.0162 0.997 0.000 0.000 0.996 0.000 NA
#> SRR2087371 3 0.0162 0.997 0.000 0.000 0.996 0.000 NA
#> SRR2087361 3 0.0000 0.997 0.000 0.000 1.000 0.000 NA
#> SRR2087367 3 0.0290 0.995 0.000 0.000 0.992 0.000 NA
#> SRR2087301 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087333 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087356 3 0.0162 0.996 0.000 0.000 0.996 0.000 NA
#> SRR2087370 3 0.0000 0.997 0.000 0.000 1.000 0.000 NA
#> SRR2087312 4 0.0703 0.982 0.000 0.000 0.000 0.976 NA
#> SRR2087338 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087365 3 0.0290 0.995 0.000 0.000 0.992 0.000 NA
#> SRR2087319 4 0.0162 0.983 0.000 0.000 0.000 0.996 NA
#> SRR2087368 3 0.0290 0.995 0.000 0.000 0.992 0.000 NA
#> SRR2087315 4 0.0000 0.983 0.000 0.000 0.000 1.000 NA
#> SRR2087372 3 0.0000 0.997 0.000 0.000 1.000 0.000 NA
#> SRR2087357 3 0.0162 0.996 0.000 0.000 0.996 0.000 NA
#> SRR2087297 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087352 3 0.0000 0.997 0.000 0.000 1.000 0.000 NA
#> SRR2087339 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087286 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087355 3 0.0162 0.996 0.000 0.000 0.996 0.000 NA
#> SRR2087331 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087328 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087321 4 0.0290 0.983 0.000 0.000 0.000 0.992 NA
#> SRR2087310 4 0.0703 0.978 0.000 0.000 0.000 0.976 NA
#> SRR2087341 1 0.0162 0.998 0.996 0.000 0.000 0.000 NA
#> SRR2087340 1 0.0162 0.998 0.996 0.000 0.000 0.000 NA
#> SRR2087283 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087296 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087337 1 0.0162 0.998 0.996 0.000 0.000 0.000 NA
#> SRR2087316 4 0.0609 0.981 0.000 0.000 0.000 0.980 NA
#> SRR2087325 4 0.0510 0.982 0.000 0.000 0.000 0.984 NA
#> SRR2087287 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087289 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087311 4 0.0290 0.982 0.000 0.000 0.000 0.992 NA
#> SRR2087324 4 0.0510 0.982 0.000 0.000 0.000 0.984 NA
#> SRR2087305 2 0.0290 0.996 0.000 0.992 0.000 0.000 NA
#> SRR2087282 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087285 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087290 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087293 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087329 1 0.0000 0.999 1.000 0.000 0.000 0.000 NA
#> SRR2087366 3 0.0290 0.995 0.000 0.000 0.992 0.000 NA
#> SRR2087300 2 0.0162 0.997 0.000 0.996 0.000 0.000 NA
#> SRR2087284 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087303 2 0.0290 0.996 0.000 0.992 0.000 0.000 NA
#> SRR2087351 3 0.0162 0.997 0.000 0.000 0.996 0.000 NA
#> SRR2087302 2 0.0162 0.997 0.000 0.996 0.000 0.000 NA
#> SRR2087304 2 0.0290 0.996 0.000 0.992 0.000 0.000 NA
#> SRR2087298 2 0.0290 0.996 0.000 0.992 0.000 0.000 NA
#> SRR2087320 4 0.2230 0.928 0.000 0.000 0.000 0.884 NA
#> SRR2087308 4 0.0000 0.983 0.000 0.000 0.000 1.000 NA
#> SRR2087295 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087292 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087291 2 0.0000 0.998 0.000 1.000 0.000 0.000 NA
#> SRR2087294 2 0.0162 0.997 0.000 0.996 0.000 0.000 NA
#> SRR2087299 2 0.0290 0.996 0.000 0.992 0.000 0.000 NA
#> SRR2087288 2 0.0290 0.996 0.000 0.992 0.000 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2087314 4 0.3136 0.852 0.000 0.000 0.004 0.768 NA NA
#> SRR2087307 4 0.1196 0.963 0.000 0.000 0.000 0.952 NA NA
#> SRR2087359 3 0.0146 0.991 0.000 0.000 0.996 0.000 NA NA
#> SRR2087373 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087363 3 0.1049 0.976 0.000 0.000 0.960 0.000 NA NA
#> SRR2087317 4 0.0865 0.963 0.000 0.000 0.000 0.964 NA NA
#> SRR2087313 4 0.0458 0.968 0.000 0.000 0.000 0.984 NA NA
#> SRR2087360 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087375 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087349 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087326 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087306 4 0.1910 0.931 0.000 0.000 0.000 0.892 NA NA
#> SRR2087347 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087327 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087318 4 0.0260 0.967 0.000 0.000 0.000 0.992 NA NA
#> SRR2087350 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087309 4 0.0363 0.967 0.000 0.000 0.000 0.988 NA NA
#> SRR2087344 1 0.0363 0.993 0.988 0.000 0.000 0.000 NA NA
#> SRR2087364 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087332 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087336 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087348 1 0.0260 0.994 0.992 0.000 0.000 0.000 NA NA
#> SRR2087353 3 0.0508 0.989 0.000 0.000 0.984 0.000 NA NA
#> SRR2087343 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087322 4 0.0790 0.966 0.000 0.000 0.000 0.968 NA NA
#> SRR2087335 1 0.0508 0.991 0.984 0.000 0.000 0.000 NA NA
#> SRR2087362 3 0.0405 0.990 0.000 0.000 0.988 0.000 NA NA
#> SRR2087374 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087346 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087345 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087358 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087334 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087323 4 0.1863 0.942 0.000 0.000 0.000 0.896 NA NA
#> SRR2087330 1 0.0363 0.993 0.988 0.000 0.000 0.000 NA NA
#> SRR2087354 3 0.0603 0.987 0.000 0.000 0.980 0.000 NA NA
#> SRR2087342 1 0.0508 0.991 0.984 0.000 0.000 0.000 NA NA
#> SRR2087369 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087371 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087361 3 0.0000 0.991 0.000 0.000 1.000 0.000 NA NA
#> SRR2087367 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087301 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087333 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087356 3 0.0405 0.990 0.000 0.000 0.988 0.000 NA NA
#> SRR2087370 3 0.0405 0.990 0.000 0.000 0.988 0.000 NA NA
#> SRR2087312 4 0.1088 0.967 0.000 0.000 0.000 0.960 NA NA
#> SRR2087338 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087365 3 0.0692 0.985 0.000 0.000 0.976 0.000 NA NA
#> SRR2087319 4 0.1141 0.957 0.000 0.000 0.000 0.948 NA NA
#> SRR2087368 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087315 4 0.0260 0.967 0.000 0.000 0.000 0.992 NA NA
#> SRR2087372 3 0.0405 0.990 0.000 0.000 0.988 0.000 NA NA
#> SRR2087357 3 0.0603 0.987 0.000 0.000 0.980 0.000 NA NA
#> SRR2087297 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087352 3 0.0405 0.990 0.000 0.000 0.988 0.000 NA NA
#> SRR2087339 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087286 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087355 3 0.0405 0.990 0.000 0.000 0.988 0.000 NA NA
#> SRR2087331 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087328 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087321 4 0.0458 0.968 0.000 0.000 0.000 0.984 NA NA
#> SRR2087310 4 0.0937 0.965 0.000 0.000 0.000 0.960 NA NA
#> SRR2087341 1 0.0508 0.991 0.984 0.000 0.000 0.000 NA NA
#> SRR2087340 1 0.0508 0.991 0.984 0.000 0.000 0.000 NA NA
#> SRR2087283 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087296 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087337 1 0.0508 0.991 0.984 0.000 0.000 0.000 NA NA
#> SRR2087316 4 0.1204 0.961 0.000 0.000 0.000 0.944 NA NA
#> SRR2087325 4 0.0405 0.968 0.000 0.000 0.000 0.988 NA NA
#> SRR2087287 2 0.0146 0.993 0.000 0.996 0.000 0.000 NA NA
#> SRR2087289 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087311 4 0.0363 0.968 0.000 0.000 0.000 0.988 NA NA
#> SRR2087324 4 0.1007 0.965 0.000 0.000 0.000 0.956 NA NA
#> SRR2087305 2 0.0146 0.995 0.000 0.996 0.000 0.000 NA NA
#> SRR2087282 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087285 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087290 2 0.0260 0.994 0.000 0.992 0.000 0.000 NA NA
#> SRR2087293 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA NA
#> SRR2087329 1 0.0000 0.997 1.000 0.000 0.000 0.000 NA NA
#> SRR2087366 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087300 2 0.0260 0.995 0.000 0.992 0.000 0.000 NA NA
#> SRR2087284 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087303 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA NA
#> SRR2087351 3 0.0291 0.991 0.000 0.000 0.992 0.000 NA NA
#> SRR2087302 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA NA
#> SRR2087304 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA NA
#> SRR2087298 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA NA
#> SRR2087320 4 0.3017 0.911 0.000 0.000 0.000 0.844 NA NA
#> SRR2087308 4 0.0458 0.968 0.000 0.000 0.000 0.984 NA NA
#> SRR2087295 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087292 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA NA
#> SRR2087291 2 0.0000 0.995 0.000 1.000 0.000 0.000 NA NA
#> SRR2087294 2 0.0260 0.994 0.000 0.992 0.000 0.000 NA NA
#> SRR2087299 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA NA
#> SRR2087288 2 0.0458 0.993 0.000 0.984 0.000 0.000 NA 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.
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