Date: 2019-12-26 00:01:52 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 8516 rows and 96 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] 8516 96
The density distribution for each sample is visualized as in one column in the following heatmap. The clustering is based on the distance which is the Kolmogorov-Smirnov statistic between two distributions.
library(ComplexHeatmap)
densityHeatmap(mat, ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
mc.cores = 4)
Folowing table shows the best k
(number of partitions) for each combination
of top-value methods and partition methods. Clicking on the method name in
the table goes to the section for a single combination of methods.
The cola vignette explains the definition of the metrics used for determining the best number of partitions.
suggest_best_k(res_list)
The best k | 1-PAC | Mean silhouette | Concordance | Optional k | ||
---|---|---|---|---|---|---|
SD:mclust | 2 | 1.000 | 0.991 | 0.995 | ** | |
SD:NMF | 2 | 1.000 | 0.982 | 0.992 | ** | |
CV:kmeans | 2 | 1.000 | 0.997 | 0.999 | ** | |
CV:skmeans | 2 | 1.000 | 0.988 | 0.995 | ** | |
CV:mclust | 2 | 1.000 | 0.981 | 0.992 | ** | |
MAD:NMF | 2 | 1.000 | 0.978 | 0.991 | ** | |
ATC:hclust | 2 | 1.000 | 0.998 | 0.999 | ** | |
ATC:kmeans | 2 | 1.000 | 1.000 | 1.000 | ** | |
ATC:mclust | 2 | 1.000 | 0.973 | 0.989 | ** | |
ATC:NMF | 2 | 1.000 | 0.977 | 0.991 | ** | |
SD:skmeans | 4 | 0.972 | 0.929 | 0.973 | ** | 2,3 |
ATC:skmeans | 5 | 0.968 | 0.902 | 0.963 | ** | 2,3 |
SD:kmeans | 5 | 0.960 | 0.932 | 0.958 | ** | 2 |
MAD:skmeans | 4 | 0.958 | 0.942 | 0.975 | ** | 2,3 |
CV:NMF | 2 | 0.957 | 0.959 | 0.978 | ** | |
ATC:pam | 5 | 0.950 | 0.906 | 0.972 | ** | 2 |
MAD:hclust | 5 | 0.947 | 0.936 | 0.973 | * | 2 |
MAD:pam | 3 | 0.945 | 0.940 | 0.975 | * | 2 |
SD:pam | 5 | 0.944 | 0.913 | 0.970 | * | 2,3 |
MAD:kmeans | 5 | 0.944 | 0.906 | 0.960 | * | 2,4 |
MAD:mclust | 4 | 0.918 | 0.918 | 0.956 | * | |
SD:hclust | 6 | 0.914 | 0.861 | 0.951 | * | 2 |
CV:pam | 2 | 0.579 | 0.792 | 0.911 | ||
CV:hclust | 2 | 0.449 | 0.870 | 0.897 |
**: 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.982 0.992 0.467 0.538 0.538
#> CV:NMF 2 0.957 0.959 0.978 0.474 0.526 0.526
#> MAD:NMF 2 1.000 0.978 0.991 0.464 0.538 0.538
#> ATC:NMF 2 1.000 0.977 0.991 0.453 0.544 0.544
#> SD:skmeans 2 1.000 0.999 1.000 0.457 0.544 0.544
#> CV:skmeans 2 1.000 0.988 0.995 0.472 0.526 0.526
#> MAD:skmeans 2 1.000 0.984 0.994 0.461 0.538 0.538
#> ATC:skmeans 2 1.000 1.000 1.000 0.456 0.544 0.544
#> SD:mclust 2 1.000 0.991 0.995 0.468 0.532 0.532
#> CV:mclust 2 1.000 0.981 0.992 0.406 0.601 0.601
#> MAD:mclust 2 0.881 0.972 0.986 0.428 0.574 0.574
#> ATC:mclust 2 1.000 0.973 0.989 0.458 0.538 0.538
#> SD:kmeans 2 1.000 1.000 1.000 0.450 0.551 0.551
#> CV:kmeans 2 1.000 0.997 0.999 0.451 0.551 0.551
#> MAD:kmeans 2 1.000 0.996 0.998 0.451 0.551 0.551
#> ATC:kmeans 2 1.000 1.000 1.000 0.450 0.551 0.551
#> SD:pam 2 1.000 1.000 1.000 0.450 0.551 0.551
#> CV:pam 2 0.579 0.792 0.911 0.483 0.496 0.496
#> MAD:pam 2 1.000 0.989 0.995 0.453 0.551 0.551
#> ATC:pam 2 1.000 0.999 0.999 0.449 0.551 0.551
#> SD:hclust 2 1.000 1.000 1.000 0.450 0.551 0.551
#> CV:hclust 2 0.449 0.870 0.897 0.463 0.521 0.521
#> MAD:hclust 2 1.000 0.999 1.000 0.450 0.551 0.551
#> ATC:hclust 2 1.000 0.998 0.999 0.450 0.551 0.551
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.698 0.372 0.743 0.2187 0.860 0.740
#> CV:NMF 3 0.860 0.902 0.950 0.3612 0.828 0.676
#> MAD:NMF 3 0.715 0.841 0.890 0.2871 0.860 0.740
#> ATC:NMF 3 0.740 0.872 0.913 0.1621 0.993 0.987
#> SD:skmeans 3 0.986 0.971 0.981 0.3580 0.829 0.685
#> CV:skmeans 3 0.876 0.889 0.945 0.3488 0.824 0.669
#> MAD:skmeans 3 1.000 0.966 0.987 0.3266 0.845 0.712
#> ATC:skmeans 3 1.000 0.959 0.979 0.3592 0.822 0.674
#> SD:mclust 3 0.765 0.904 0.928 0.3430 0.732 0.528
#> CV:mclust 3 0.790 0.877 0.923 0.5637 0.739 0.566
#> MAD:mclust 3 0.801 0.855 0.938 0.4548 0.802 0.659
#> ATC:mclust 3 0.764 0.791 0.911 0.2522 0.926 0.863
#> SD:kmeans 3 0.771 0.719 0.897 0.2628 0.916 0.847
#> CV:kmeans 3 0.875 0.910 0.956 0.4728 0.781 0.602
#> MAD:kmeans 3 0.788 0.764 0.903 0.3250 0.839 0.707
#> ATC:kmeans 3 0.771 0.717 0.876 0.2674 0.986 0.975
#> SD:pam 3 0.959 0.959 0.972 0.4044 0.807 0.650
#> CV:pam 3 0.567 0.705 0.871 0.2447 0.826 0.670
#> MAD:pam 3 0.945 0.940 0.975 0.4348 0.802 0.641
#> ATC:pam 3 0.794 0.926 0.940 0.3420 0.825 0.682
#> SD:hclust 3 1.000 0.990 1.000 0.0151 0.993 0.988
#> CV:hclust 3 0.471 0.748 0.858 0.1786 0.952 0.907
#> MAD:hclust 3 1.000 0.965 0.985 0.0416 0.993 0.988
#> ATC:hclust 3 1.000 0.983 0.997 0.0193 0.993 0.988
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.625 0.810 0.858 0.1095 0.783 0.559
#> CV:NMF 4 0.733 0.823 0.892 0.1022 0.932 0.814
#> MAD:NMF 4 0.750 0.823 0.907 0.0826 0.943 0.862
#> ATC:NMF 4 0.631 0.595 0.784 0.1428 0.986 0.975
#> SD:skmeans 4 0.972 0.929 0.973 0.0476 0.965 0.907
#> CV:skmeans 4 0.741 0.771 0.884 0.0796 0.938 0.843
#> MAD:skmeans 4 0.958 0.942 0.975 0.0651 0.947 0.865
#> ATC:skmeans 4 0.989 0.955 0.985 0.0383 0.986 0.961
#> SD:mclust 4 0.733 0.877 0.891 0.0719 0.954 0.863
#> CV:mclust 4 0.861 0.896 0.936 0.1129 0.945 0.841
#> MAD:mclust 4 0.918 0.918 0.956 0.1317 0.885 0.712
#> ATC:mclust 4 0.680 0.692 0.840 0.1175 0.875 0.742
#> SD:kmeans 4 0.835 0.876 0.940 0.1546 0.852 0.692
#> CV:kmeans 4 0.874 0.871 0.930 0.0875 0.918 0.762
#> MAD:kmeans 4 0.931 0.911 0.955 0.1048 0.888 0.735
#> ATC:kmeans 4 0.828 0.944 0.947 0.1256 0.798 0.625
#> SD:pam 4 0.959 0.930 0.978 0.0267 0.993 0.981
#> CV:pam 4 0.558 0.703 0.819 0.0410 0.972 0.930
#> MAD:pam 4 0.927 0.895 0.962 0.0140 0.989 0.968
#> ATC:pam 4 0.923 0.921 0.957 0.0436 0.993 0.982
#> SD:hclust 4 0.971 0.974 0.991 0.0665 0.973 0.950
#> CV:hclust 4 0.495 0.735 0.837 0.0612 0.968 0.934
#> MAD:hclust 4 1.000 0.973 0.990 0.0528 0.973 0.950
#> ATC:hclust 4 0.970 0.955 0.984 0.0565 0.973 0.950
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.605 0.621 0.803 0.1033 0.918 0.782
#> CV:NMF 5 0.689 0.775 0.831 0.0547 0.990 0.968
#> MAD:NMF 5 0.825 0.770 0.894 0.0787 0.922 0.793
#> ATC:NMF 5 0.647 0.794 0.877 0.1111 0.777 0.579
#> SD:skmeans 5 0.969 0.902 0.966 0.0296 0.995 0.985
#> CV:skmeans 5 0.696 0.642 0.820 0.0611 0.958 0.886
#> MAD:skmeans 5 0.935 0.902 0.958 0.0207 0.992 0.977
#> ATC:skmeans 5 0.968 0.902 0.963 0.0248 0.968 0.911
#> SD:mclust 5 0.670 0.785 0.840 0.1085 0.921 0.732
#> CV:mclust 5 0.784 0.824 0.844 0.1047 0.897 0.659
#> MAD:mclust 5 0.870 0.855 0.922 0.1117 0.920 0.729
#> ATC:mclust 5 0.612 0.494 0.738 0.1359 0.822 0.547
#> SD:kmeans 5 0.960 0.932 0.958 0.0504 0.944 0.840
#> CV:kmeans 5 0.825 0.732 0.862 0.0514 0.982 0.934
#> MAD:kmeans 5 0.944 0.906 0.960 0.0686 0.938 0.822
#> ATC:kmeans 5 0.924 0.868 0.935 0.0648 0.984 0.954
#> SD:pam 5 0.944 0.913 0.970 0.0170 0.979 0.941
#> CV:pam 5 0.573 0.622 0.820 0.0120 0.980 0.948
#> MAD:pam 5 0.941 0.918 0.973 0.0155 0.995 0.987
#> ATC:pam 5 0.950 0.906 0.972 0.0485 0.979 0.944
#> SD:hclust 5 0.933 0.849 0.955 0.1006 0.987 0.974
#> CV:hclust 5 0.520 0.723 0.820 0.1343 0.861 0.697
#> MAD:hclust 5 0.947 0.936 0.973 0.1497 0.905 0.817
#> ATC:hclust 5 0.986 0.955 0.986 0.0351 0.987 0.975
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.654 0.758 0.845 0.06083 0.941 0.812
#> CV:NMF 6 0.699 0.611 0.782 0.03697 0.984 0.947
#> MAD:NMF 6 0.848 0.816 0.911 0.05505 0.933 0.792
#> ATC:NMF 6 0.690 0.769 0.870 0.04768 0.977 0.927
#> SD:skmeans 6 0.960 0.872 0.944 0.01515 1.000 1.000
#> CV:skmeans 6 0.697 0.611 0.774 0.03509 0.964 0.894
#> MAD:skmeans 6 0.898 0.863 0.940 0.02493 0.999 0.998
#> ATC:skmeans 6 0.948 0.883 0.950 0.01432 0.993 0.980
#> SD:mclust 6 0.629 0.711 0.816 0.03798 0.957 0.810
#> CV:mclust 6 0.791 0.803 0.874 0.04071 0.962 0.823
#> MAD:mclust 6 0.830 0.825 0.887 0.03637 0.969 0.857
#> ATC:mclust 6 0.601 0.323 0.691 0.04660 0.927 0.726
#> SD:kmeans 6 0.896 0.864 0.930 0.04535 0.999 0.998
#> CV:kmeans 6 0.808 0.697 0.811 0.03437 0.934 0.756
#> MAD:kmeans 6 0.899 0.850 0.924 0.03952 0.997 0.991
#> ATC:kmeans 6 0.838 0.813 0.906 0.04531 0.962 0.883
#> SD:pam 6 0.870 0.863 0.945 0.02606 0.976 0.933
#> CV:pam 6 0.580 0.624 0.810 0.01137 1.000 1.000
#> MAD:pam 6 0.932 0.894 0.969 0.00531 0.996 0.988
#> ATC:pam 6 0.958 0.924 0.972 0.01274 0.993 0.980
#> SD:hclust 6 0.914 0.861 0.951 0.03803 0.931 0.863
#> CV:hclust 6 0.624 0.683 0.804 0.06737 0.999 0.996
#> MAD:hclust 6 0.800 0.869 0.945 0.03801 0.998 0.996
#> ATC:hclust 6 0.889 0.903 0.975 0.03351 0.987 0.973
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 = 852, method = "euler")
top_rows_overlap(res_list, top_n = 1704, method = "euler")
top_rows_overlap(res_list, top_n = 2555, method = "euler")
top_rows_overlap(res_list, top_n = 3406, method = "euler")
top_rows_overlap(res_list, top_n = 4258, method = "euler")
Also visualize the correspondance of rankings between different top-row methods:
top_rows_overlap(res_list, top_n = 852, method = "correspondance")
top_rows_overlap(res_list, top_n = 1704, method = "correspondance")
top_rows_overlap(res_list, top_n = 2555, method = "correspondance")
top_rows_overlap(res_list, top_n = 3406, method = "correspondance")
top_rows_overlap(res_list, top_n = 4258, method = "correspondance")
Heatmaps of the top rows:
top_rows_heatmap(res_list, top_n = 852)
top_rows_heatmap(res_list, top_n = 1704)
top_rows_heatmap(res_list, top_n = 2555)
top_rows_heatmap(res_list, top_n = 3406)
top_rows_heatmap(res_list, top_n = 4258)
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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) 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 1.000 1.000 1.000 0.4497 0.551 0.551
#> 3 3 1.000 0.990 1.000 0.0151 0.993 0.988
#> 4 4 0.971 0.974 0.991 0.0665 0.973 0.950
#> 5 5 0.933 0.849 0.955 0.1006 0.987 0.974
#> 6 6 0.914 0.861 0.951 0.0380 0.931 0.863
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
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
#> SRR1199002 2 0 1 0 1
#> SRR1199009 2 0 1 0 1
#> SRR1199010 2 0 1 0 1
#> SRR1199011 1 0 1 1 0
#> SRR1199012 2 0 1 0 1
#> SRR1199013 2 0 1 0 1
#> SRR1199015 1 0 1 1 0
#> SRR1199016 2 0 1 0 1
#> SRR1199017 1 0 1 1 0
#> SRR1199018 1 0 1 1 0
#> SRR1199019 1 0 1 1 0
#> SRR1199020 2 0 1 0 1
#> SRR1199021 2 0 1 0 1
#> SRR1199022 1 0 1 1 0
#> SRR1199023 1 0 1 1 0
#> SRR1199025 1 0 1 1 0
#> SRR1199026 1 0 1 1 0
#> SRR1199027 2 0 1 0 1
#> SRR1199028 2 0 1 0 1
#> SRR1199029 1 0 1 1 0
#> SRR1199031 2 0 1 0 1
#> SRR1199032 2 0 1 0 1
#> SRR1199033 2 0 1 0 1
#> SRR1199034 2 0 1 0 1
#> SRR1199035 2 0 1 0 1
#> SRR1199036 2 0 1 0 1
#> SRR1199037 2 0 1 0 1
#> SRR1199038 2 0 1 0 1
#> SRR1199040 2 0 1 0 1
#> SRR1199042 2 0 1 0 1
#> SRR1199043 2 0 1 0 1
#> SRR1199044 2 0 1 0 1
#> SRR1199045 2 0 1 0 1
#> SRR1199046 2 0 1 0 1
#> SRR1199047 2 0 1 0 1
#> SRR1199048 2 0 1 0 1
#> SRR1199049 1 0 1 1 0
#> SRR1199050 1 0 1 1 0
#> SRR1199051 2 0 1 0 1
#> SRR1199052 2 0 1 0 1
#> SRR1199054 2 0 1 0 1
#> SRR1199056 2 0 1 0 1
#> SRR1199057 2 0 1 0 1
#> SRR1199059 2 0 1 0 1
#> SRR1199060 2 0 1 0 1
#> SRR1199061 2 0 1 0 1
#> SRR1199062 1 0 1 1 0
#> SRR1199064 1 0 1 1 0
#> SRR1199065 1 0 1 1 0
#> SRR1199067 2 0 1 0 1
#> SRR1199075 1 0 1 1 0
#> SRR1199076 2 0 1 0 1
#> SRR1199077 1 0 1 1 0
#> SRR1199078 2 0 1 0 1
#> SRR1199079 2 0 1 0 1
#> SRR1199080 1 0 1 1 0
#> SRR1199081 2 0 1 0 1
#> SRR1199082 2 0 1 0 1
#> SRR1199083 1 0 1 1 0
#> SRR1199084 1 0 1 1 0
#> SRR1199085 1 0 1 1 0
#> SRR1199086 1 0 1 1 0
#> SRR1199087 2 0 1 0 1
#> SRR1199088 2 0 1 0 1
#> SRR1199089 2 0 1 0 1
#> SRR1199090 2 0 1 0 1
#> SRR1199091 1 0 1 1 0
#> SRR1199092 1 0 1 1 0
#> SRR1199093 2 0 1 0 1
#> SRR1199094 1 0 1 1 0
#> SRR1199095 2 0 1 0 1
#> SRR1199096 2 0 1 0 1
#> SRR1199097 2 0 1 0 1
#> SRR1199098 2 0 1 0 1
#> SRR1199099 1 0 1 1 0
#> SRR1199100 2 0 1 0 1
#> SRR1199101 2 0 1 0 1
#> SRR1199102 1 0 1 1 0
#> SRR1199103 2 0 1 0 1
#> SRR1199104 2 0 1 0 1
#> SRR1199105 2 0 1 0 1
#> SRR1199106 2 0 1 0 1
#> SRR1199107 2 0 1 0 1
#> SRR1199108 1 0 1 1 0
#> SRR1199109 2 0 1 0 1
#> SRR1199110 2 0 1 0 1
#> SRR1199111 2 0 1 0 1
#> SRR1199112 2 0 1 0 1
#> SRR1199113 2 0 1 0 1
#> SRR1199114 1 0 1 1 0
#> SRR1199115 1 0 1 1 0
#> SRR1199116 2 0 1 0 1
#> SRR1199117 1 0 1 1 0
#> SRR1199118 1 0 1 1 0
#> SRR1199119 2 0 1 0 1
#> SRR1199120 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0 1 0 1 0
#> SRR1199009 2 0 1 0 1 0
#> SRR1199010 2 0 1 0 1 0
#> SRR1199011 1 0 1 1 0 0
#> SRR1199012 2 0 1 0 1 0
#> SRR1199013 2 0 1 0 1 0
#> SRR1199015 1 0 1 1 0 0
#> SRR1199016 2 0 1 0 1 0
#> SRR1199017 1 0 1 1 0 0
#> SRR1199018 1 0 1 1 0 0
#> SRR1199019 1 0 1 1 0 0
#> SRR1199020 2 0 1 0 1 0
#> SRR1199021 2 0 1 0 1 0
#> SRR1199022 1 0 1 1 0 0
#> SRR1199023 1 0 1 1 0 0
#> SRR1199025 1 0 1 1 0 0
#> SRR1199026 1 0 1 1 0 0
#> SRR1199027 2 0 1 0 1 0
#> SRR1199028 2 0 1 0 1 0
#> SRR1199029 1 0 1 1 0 0
#> SRR1199031 2 0 1 0 1 0
#> SRR1199032 2 0 1 0 1 0
#> SRR1199033 2 0 1 0 1 0
#> SRR1199034 2 0 1 0 1 0
#> SRR1199035 2 0 1 0 1 0
#> SRR1199036 2 0 1 0 1 0
#> SRR1199037 2 0 1 0 1 0
#> SRR1199038 2 0 1 0 1 0
#> SRR1199040 2 0 1 0 1 0
#> SRR1199042 2 0 1 0 1 0
#> SRR1199043 2 0 1 0 1 0
#> SRR1199044 2 0 1 0 1 0
#> SRR1199045 2 0 1 0 1 0
#> SRR1199046 2 0 1 0 1 0
#> SRR1199047 2 0 1 0 1 0
#> SRR1199048 2 0 1 0 1 0
#> SRR1199049 1 0 1 1 0 0
#> SRR1199050 1 0 1 1 0 0
#> SRR1199051 2 0 1 0 1 0
#> SRR1199052 2 0 1 0 1 0
#> SRR1199054 2 0 1 0 1 0
#> SRR1199056 2 0 1 0 1 0
#> SRR1199057 2 0 1 0 1 0
#> SRR1199059 2 0 1 0 1 0
#> SRR1199060 2 0 1 0 1 0
#> SRR1199061 2 0 1 0 1 0
#> SRR1199062 1 0 1 1 0 0
#> SRR1199064 3 0 0 0 0 1
#> SRR1199065 1 0 1 1 0 0
#> SRR1199067 2 0 1 0 1 0
#> SRR1199075 1 0 1 1 0 0
#> SRR1199076 2 0 1 0 1 0
#> SRR1199077 1 0 1 1 0 0
#> SRR1199078 2 0 1 0 1 0
#> SRR1199079 2 0 1 0 1 0
#> SRR1199080 1 0 1 1 0 0
#> SRR1199081 2 0 1 0 1 0
#> SRR1199082 2 0 1 0 1 0
#> SRR1199083 1 0 1 1 0 0
#> SRR1199084 1 0 1 1 0 0
#> SRR1199085 1 0 1 1 0 0
#> SRR1199086 1 0 1 1 0 0
#> SRR1199087 2 0 1 0 1 0
#> SRR1199088 2 0 1 0 1 0
#> SRR1199089 2 0 1 0 1 0
#> SRR1199090 2 0 1 0 1 0
#> SRR1199091 1 0 1 1 0 0
#> SRR1199092 1 0 1 1 0 0
#> SRR1199093 2 0 1 0 1 0
#> SRR1199094 1 0 1 1 0 0
#> SRR1199095 2 0 1 0 1 0
#> SRR1199096 2 0 1 0 1 0
#> SRR1199097 2 0 1 0 1 0
#> SRR1199098 2 0 1 0 1 0
#> SRR1199099 1 0 1 1 0 0
#> SRR1199100 2 0 1 0 1 0
#> SRR1199101 2 0 1 0 1 0
#> SRR1199102 1 0 1 1 0 0
#> SRR1199103 2 0 1 0 1 0
#> SRR1199104 2 0 1 0 1 0
#> SRR1199105 2 0 1 0 1 0
#> SRR1199106 2 0 1 0 1 0
#> SRR1199107 2 0 1 0 1 0
#> SRR1199108 1 0 1 1 0 0
#> SRR1199109 2 0 1 0 1 0
#> SRR1199110 2 0 1 0 1 0
#> SRR1199111 2 0 1 0 1 0
#> SRR1199112 2 0 1 0 1 0
#> SRR1199113 2 0 1 0 1 0
#> SRR1199114 1 0 1 1 0 0
#> SRR1199115 1 0 1 1 0 0
#> SRR1199116 2 0 1 0 1 0
#> SRR1199117 1 0 1 1 0 0
#> SRR1199118 1 0 1 1 0 0
#> SRR1199119 2 0 1 0 1 0
#> SRR1199120 2 0 1 0 1 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199009 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199010 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199011 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199012 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199013 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199015 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199016 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199017 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199018 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199019 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199020 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199021 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199022 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199023 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199025 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199026 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199027 4 0.259 1.000 0.000 0.116 0 0.884
#> SRR1199028 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199029 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199031 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199032 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199033 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199034 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199035 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199036 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199037 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199038 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199040 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199042 4 0.259 1.000 0.000 0.116 0 0.884
#> SRR1199043 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199044 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199045 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199046 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199047 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199048 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199049 1 0.259 0.877 0.884 0.000 0 0.116
#> SRR1199050 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199051 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199052 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199054 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199056 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199057 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199059 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199060 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199061 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199062 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199064 3 0.000 0.000 0.000 0.000 1 0.000
#> SRR1199065 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199067 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199075 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199076 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199077 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199078 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199079 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199080 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199081 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199082 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199083 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199084 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199085 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199086 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199087 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199088 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199089 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199090 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199091 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199092 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199093 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199094 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199095 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199096 2 0.156 0.928 0.000 0.944 0 0.056
#> SRR1199097 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199098 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199099 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199100 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199101 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199102 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199103 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199104 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199105 2 0.454 0.426 0.000 0.676 0 0.324
#> SRR1199106 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199107 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199108 1 0.259 0.877 0.884 0.000 0 0.116
#> SRR1199109 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199110 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199111 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199112 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199113 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199114 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199115 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199116 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199117 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199118 1 0.000 0.992 1.000 0.000 0 0.000
#> SRR1199119 2 0.000 0.993 0.000 1.000 0 0.000
#> SRR1199120 2 0.000 0.993 0.000 1.000 0 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199009 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199010 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199011 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199013 2 0.4201 0.1070 0.000 0.592 0.000 0.000 0.408
#> SRR1199015 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199017 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199021 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.0000 0.9960 0.000 0.000 0.000 1.000 0.000
#> SRR1199028 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199029 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199032 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199033 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199034 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199035 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199036 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199037 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199038 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199040 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199042 4 0.0162 0.9960 0.000 0.000 0.000 0.996 0.004
#> SRR1199043 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199044 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199045 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199046 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199047 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199048 2 0.4306 -0.2363 0.000 0.508 0.000 0.000 0.492
#> SRR1199049 1 0.4126 0.4538 0.620 0.000 0.380 0.000 0.000
#> SRR1199050 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199054 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199056 2 0.1544 0.8608 0.000 0.932 0.000 0.000 0.068
#> SRR1199057 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199059 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199060 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199061 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199062 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 3 0.4201 0.0000 0.000 0.000 0.592 0.000 0.408
#> SRR1199065 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199075 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199077 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199079 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199080 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 2 0.4201 0.1070 0.000 0.592 0.000 0.000 0.408
#> SRR1199082 2 0.4242 0.0244 0.000 0.572 0.000 0.000 0.428
#> SRR1199083 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199088 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199089 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199090 2 0.4306 -0.2363 0.000 0.508 0.000 0.000 0.492
#> SRR1199091 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199094 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199096 2 0.4262 -0.0343 0.000 0.560 0.000 0.000 0.440
#> SRR1199097 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199098 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199099 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199101 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199102 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199104 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199105 5 0.6120 0.0000 0.000 0.184 0.000 0.256 0.560
#> SRR1199106 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199108 1 0.4201 0.3946 0.592 0.000 0.408 0.000 0.000
#> SRR1199109 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199110 2 0.3966 0.3400 0.000 0.664 0.000 0.000 0.336
#> SRR1199111 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199112 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199113 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
#> SRR1199114 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199117 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9737 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.9341 0.000 1.000 0.000 0.000 0.000
#> SRR1199120 2 0.0162 0.9320 0.000 0.996 0.000 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199009 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199010 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199011 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199012 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199013 5 0.3864 0.659 0.000 0.480 0.000 0.000 0.520 0
#> SRR1199015 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199016 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199017 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199018 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199019 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199020 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199021 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199022 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199023 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199025 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199026 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199027 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0
#> SRR1199028 2 0.0146 0.954 0.000 0.996 0.000 0.000 0.004 0
#> SRR1199029 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199031 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199032 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199033 2 0.0146 0.954 0.000 0.996 0.000 0.000 0.004 0
#> SRR1199034 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199035 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199036 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199037 2 0.0146 0.955 0.000 0.996 0.004 0.000 0.000 0
#> SRR1199038 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199040 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199042 4 0.1462 0.935 0.000 0.000 0.008 0.936 0.056 0
#> SRR1199043 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199044 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199045 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199046 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199047 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199048 5 0.3898 0.705 0.000 0.336 0.012 0.000 0.652 0
#> SRR1199049 1 0.4648 -0.549 0.496 0.000 0.464 0.000 0.040 0
#> SRR1199050 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199051 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199052 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199054 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199056 2 0.3053 0.629 0.000 0.812 0.020 0.000 0.168 0
#> SRR1199057 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199059 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199060 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199061 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199062 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199064 6 0.0000 0.000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1199065 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199067 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199075 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199076 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199077 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199078 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199079 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199080 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199081 5 0.3864 0.659 0.000 0.480 0.000 0.000 0.520 0
#> SRR1199082 5 0.3765 0.731 0.000 0.404 0.000 0.000 0.596 0
#> SRR1199083 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199084 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199085 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199086 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199087 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199088 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199089 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199090 5 0.3898 0.705 0.000 0.336 0.012 0.000 0.652 0
#> SRR1199091 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199092 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199093 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199094 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199095 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199096 2 0.5528 -0.594 0.000 0.508 0.144 0.000 0.348 0
#> SRR1199097 2 0.0777 0.938 0.000 0.972 0.024 0.000 0.004 0
#> SRR1199098 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199099 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199100 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199101 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199102 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199103 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199104 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199105 5 0.3562 -0.386 0.000 0.040 0.168 0.004 0.788 0
#> SRR1199106 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199107 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199108 3 0.3266 0.000 0.272 0.000 0.728 0.000 0.000 0
#> SRR1199109 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199110 2 0.3810 -0.451 0.000 0.572 0.000 0.000 0.428 0
#> SRR1199111 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199112 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199113 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
#> SRR1199114 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199115 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199116 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199117 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199118 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199119 2 0.0000 0.957 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199120 2 0.0891 0.935 0.000 0.968 0.024 0.000 0.008 0
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "kmeans"]
# you can also extract it by
# res = res_list["SD:kmeans"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'SD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.4497 0.551 0.551
#> 3 3 0.771 0.719 0.897 0.2628 0.916 0.847
#> 4 4 0.835 0.876 0.940 0.1546 0.852 0.692
#> 5 5 0.960 0.932 0.958 0.0504 0.944 0.840
#> 6 6 0.896 0.864 0.930 0.0453 0.999 0.998
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0 1 0 1
#> SRR1199009 2 0 1 0 1
#> SRR1199010 2 0 1 0 1
#> SRR1199011 1 0 1 1 0
#> SRR1199012 2 0 1 0 1
#> SRR1199013 2 0 1 0 1
#> SRR1199015 1 0 1 1 0
#> SRR1199016 2 0 1 0 1
#> SRR1199017 1 0 1 1 0
#> SRR1199018 1 0 1 1 0
#> SRR1199019 1 0 1 1 0
#> SRR1199020 2 0 1 0 1
#> SRR1199021 2 0 1 0 1
#> SRR1199022 1 0 1 1 0
#> SRR1199023 1 0 1 1 0
#> SRR1199025 1 0 1 1 0
#> SRR1199026 1 0 1 1 0
#> SRR1199027 2 0 1 0 1
#> SRR1199028 2 0 1 0 1
#> SRR1199029 1 0 1 1 0
#> SRR1199031 2 0 1 0 1
#> SRR1199032 2 0 1 0 1
#> SRR1199033 2 0 1 0 1
#> SRR1199034 2 0 1 0 1
#> SRR1199035 2 0 1 0 1
#> SRR1199036 2 0 1 0 1
#> SRR1199037 2 0 1 0 1
#> SRR1199038 2 0 1 0 1
#> SRR1199040 2 0 1 0 1
#> SRR1199042 2 0 1 0 1
#> SRR1199043 2 0 1 0 1
#> SRR1199044 2 0 1 0 1
#> SRR1199045 2 0 1 0 1
#> SRR1199046 2 0 1 0 1
#> SRR1199047 2 0 1 0 1
#> SRR1199048 2 0 1 0 1
#> SRR1199049 1 0 1 1 0
#> SRR1199050 1 0 1 1 0
#> SRR1199051 2 0 1 0 1
#> SRR1199052 2 0 1 0 1
#> SRR1199054 2 0 1 0 1
#> SRR1199056 2 0 1 0 1
#> SRR1199057 2 0 1 0 1
#> SRR1199059 2 0 1 0 1
#> SRR1199060 2 0 1 0 1
#> SRR1199061 2 0 1 0 1
#> SRR1199062 1 0 1 1 0
#> SRR1199064 1 0 1 1 0
#> SRR1199065 1 0 1 1 0
#> SRR1199067 2 0 1 0 1
#> SRR1199075 1 0 1 1 0
#> SRR1199076 2 0 1 0 1
#> SRR1199077 1 0 1 1 0
#> SRR1199078 2 0 1 0 1
#> SRR1199079 2 0 1 0 1
#> SRR1199080 1 0 1 1 0
#> SRR1199081 2 0 1 0 1
#> SRR1199082 2 0 1 0 1
#> SRR1199083 1 0 1 1 0
#> SRR1199084 1 0 1 1 0
#> SRR1199085 1 0 1 1 0
#> SRR1199086 1 0 1 1 0
#> SRR1199087 2 0 1 0 1
#> SRR1199088 2 0 1 0 1
#> SRR1199089 2 0 1 0 1
#> SRR1199090 2 0 1 0 1
#> SRR1199091 1 0 1 1 0
#> SRR1199092 1 0 1 1 0
#> SRR1199093 2 0 1 0 1
#> SRR1199094 1 0 1 1 0
#> SRR1199095 2 0 1 0 1
#> SRR1199096 2 0 1 0 1
#> SRR1199097 2 0 1 0 1
#> SRR1199098 2 0 1 0 1
#> SRR1199099 1 0 1 1 0
#> SRR1199100 2 0 1 0 1
#> SRR1199101 2 0 1 0 1
#> SRR1199102 1 0 1 1 0
#> SRR1199103 2 0 1 0 1
#> SRR1199104 2 0 1 0 1
#> SRR1199105 2 0 1 0 1
#> SRR1199106 2 0 1 0 1
#> SRR1199107 2 0 1 0 1
#> SRR1199108 1 0 1 1 0
#> SRR1199109 2 0 1 0 1
#> SRR1199110 2 0 1 0 1
#> SRR1199111 2 0 1 0 1
#> SRR1199112 2 0 1 0 1
#> SRR1199113 2 0 1 0 1
#> SRR1199114 1 0 1 1 0
#> SRR1199115 1 0 1 1 0
#> SRR1199116 2 0 1 0 1
#> SRR1199117 1 0 1 1 0
#> SRR1199118 1 0 1 1 0
#> SRR1199119 2 0 1 0 1
#> SRR1199120 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.6008 0.3059 0.000 0.628 0.372
#> SRR1199009 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199010 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199011 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199012 2 0.2448 0.7739 0.000 0.924 0.076
#> SRR1199013 2 0.5835 0.3903 0.000 0.660 0.340
#> SRR1199015 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199016 3 0.6286 0.2119 0.000 0.464 0.536
#> SRR1199017 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199021 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199022 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199027 3 0.0000 0.4989 0.000 0.000 1.000
#> SRR1199028 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199029 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199031 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199032 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199034 2 0.6008 0.3059 0.000 0.628 0.372
#> SRR1199035 2 0.5650 0.4443 0.000 0.688 0.312
#> SRR1199036 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199037 2 0.3116 0.7429 0.000 0.892 0.108
#> SRR1199038 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199042 3 0.0000 0.4989 0.000 0.000 1.000
#> SRR1199043 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199044 2 0.6045 0.2840 0.000 0.620 0.380
#> SRR1199045 2 0.6079 0.2613 0.000 0.612 0.388
#> SRR1199046 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199048 2 0.1411 0.8073 0.000 0.964 0.036
#> SRR1199049 1 0.6274 0.4196 0.544 0.000 0.456
#> SRR1199050 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199052 2 0.6045 0.2840 0.000 0.620 0.380
#> SRR1199054 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199056 2 0.3879 0.6931 0.000 0.848 0.152
#> SRR1199057 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199059 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199060 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199061 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199062 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199064 3 0.6274 -0.3725 0.456 0.000 0.544
#> SRR1199065 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199067 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199075 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199076 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199077 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199078 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199079 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199080 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199081 2 0.5988 0.3232 0.000 0.632 0.368
#> SRR1199082 2 0.6192 0.1378 0.000 0.580 0.420
#> SRR1199083 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199087 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199088 2 0.6180 0.1695 0.000 0.584 0.416
#> SRR1199089 2 0.6274 0.0127 0.000 0.544 0.456
#> SRR1199090 2 0.6235 0.0779 0.000 0.564 0.436
#> SRR1199091 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199093 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199094 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199095 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199096 3 0.6274 0.2221 0.000 0.456 0.544
#> SRR1199097 2 0.5465 0.4910 0.000 0.712 0.288
#> SRR1199098 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199099 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199100 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199101 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199102 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199103 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199104 2 0.6168 0.1826 0.000 0.588 0.412
#> SRR1199105 3 0.5905 0.3835 0.000 0.352 0.648
#> SRR1199106 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199107 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199108 1 0.6308 0.3532 0.508 0.000 0.492
#> SRR1199109 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199110 2 0.1643 0.8025 0.000 0.956 0.044
#> SRR1199111 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199112 2 0.6267 0.0315 0.000 0.548 0.452
#> SRR1199113 3 0.6286 0.2119 0.000 0.464 0.536
#> SRR1199114 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199116 2 0.0237 0.8324 0.000 0.996 0.004
#> SRR1199117 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9708 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.8323 0.000 1.000 0.000
#> SRR1199120 2 0.6225 0.1134 0.000 0.568 0.432
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.312 0.8565 0.000 0.156 0.844 0.000
#> SRR1199009 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.121 0.8990 0.000 0.960 0.040 0.000
#> SRR1199013 2 0.698 0.0954 0.000 0.516 0.360 0.124
#> SRR1199015 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.130 0.8042 0.000 0.044 0.956 0.000
#> SRR1199017 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.194 0.7796 0.000 0.000 0.076 0.924
#> SRR1199028 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.307 0.8602 0.000 0.152 0.848 0.000
#> SRR1199035 3 0.380 0.7760 0.000 0.220 0.780 0.000
#> SRR1199036 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.147 0.8866 0.000 0.948 0.052 0.000
#> SRR1199038 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.387 0.6547 0.000 0.000 0.228 0.772
#> SRR1199043 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.307 0.8602 0.000 0.152 0.848 0.000
#> SRR1199045 3 0.292 0.8628 0.000 0.140 0.860 0.000
#> SRR1199046 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199047 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.460 0.7169 0.000 0.796 0.132 0.072
#> SRR1199049 4 0.281 0.8532 0.132 0.000 0.000 0.868
#> SRR1199050 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.307 0.8602 0.000 0.152 0.848 0.000
#> SRR1199054 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.292 0.7770 0.000 0.860 0.140 0.000
#> SRR1199057 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199064 4 0.328 0.8567 0.124 0.000 0.016 0.860
#> SRR1199065 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199081 2 0.705 -0.0421 0.000 0.484 0.392 0.124
#> SRR1199082 2 0.715 -0.0234 0.000 0.456 0.412 0.132
#> SRR1199083 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.287 0.8622 0.000 0.136 0.864 0.000
#> SRR1199089 3 0.130 0.8042 0.000 0.044 0.956 0.000
#> SRR1199090 2 0.715 -0.0783 0.000 0.444 0.424 0.132
#> SRR1199091 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199096 3 0.474 0.6882 0.000 0.080 0.788 0.132
#> SRR1199097 3 0.419 0.7046 0.000 0.268 0.732 0.000
#> SRR1199098 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.297 0.8626 0.000 0.144 0.856 0.000
#> SRR1199105 3 0.629 0.1192 0.000 0.064 0.552 0.384
#> SRR1199106 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199108 4 0.270 0.8583 0.124 0.000 0.000 0.876
#> SRR1199109 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.208 0.8560 0.000 0.916 0.084 0.000
#> SRR1199111 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.139 0.8083 0.000 0.048 0.952 0.000
#> SRR1199113 3 0.130 0.8042 0.000 0.044 0.956 0.000
#> SRR1199114 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199117 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.000 0.9354 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.247 0.8503 0.000 0.108 0.892 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.1608 0.960 0.000 0.072 0.928 0.000 0.000
#> SRR1199009 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199010 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199011 1 0.0290 0.989 0.992 0.000 0.000 0.008 0.000
#> SRR1199012 2 0.0671 0.971 0.000 0.980 0.004 0.000 0.016
#> SRR1199013 5 0.5461 0.521 0.000 0.344 0.076 0.000 0.580
#> SRR1199015 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.1725 0.924 0.000 0.020 0.936 0.000 0.044
#> SRR1199017 1 0.0162 0.991 0.996 0.000 0.004 0.000 0.000
#> SRR1199018 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0671 0.982 0.980 0.000 0.004 0.016 0.000
#> SRR1199020 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199021 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0771 0.979 0.976 0.000 0.004 0.020 0.000
#> SRR1199026 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.4613 0.606 0.000 0.000 0.020 0.620 0.360
#> SRR1199028 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199029 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199032 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199033 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199034 3 0.1608 0.960 0.000 0.072 0.928 0.000 0.000
#> SRR1199035 3 0.1671 0.955 0.000 0.076 0.924 0.000 0.000
#> SRR1199036 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199037 2 0.1018 0.958 0.000 0.968 0.016 0.000 0.016
#> SRR1199038 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199040 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199042 5 0.1872 0.474 0.000 0.000 0.020 0.052 0.928
#> SRR1199043 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199044 3 0.1608 0.960 0.000 0.072 0.928 0.000 0.000
#> SRR1199045 3 0.1478 0.962 0.000 0.064 0.936 0.000 0.000
#> SRR1199046 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199047 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199048 5 0.4310 0.466 0.000 0.392 0.004 0.000 0.604
#> SRR1199049 4 0.0963 0.861 0.000 0.000 0.000 0.964 0.036
#> SRR1199050 1 0.1041 0.971 0.964 0.000 0.004 0.032 0.000
#> SRR1199051 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 3 0.1608 0.960 0.000 0.072 0.928 0.000 0.000
#> SRR1199054 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199056 2 0.2932 0.815 0.000 0.864 0.032 0.000 0.104
#> SRR1199057 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199059 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199060 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199061 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199062 1 0.1205 0.964 0.956 0.000 0.004 0.040 0.000
#> SRR1199064 4 0.2989 0.819 0.000 0.000 0.060 0.868 0.072
#> SRR1199065 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.0510 0.975 0.000 0.984 0.000 0.000 0.016
#> SRR1199075 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199077 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199079 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199080 1 0.0162 0.991 0.996 0.000 0.004 0.000 0.000
#> SRR1199081 5 0.5938 0.520 0.000 0.320 0.128 0.000 0.552
#> SRR1199082 5 0.2569 0.592 0.000 0.040 0.068 0.000 0.892
#> SRR1199083 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199088 3 0.1478 0.962 0.000 0.064 0.936 0.000 0.000
#> SRR1199089 3 0.1725 0.924 0.000 0.020 0.936 0.000 0.044
#> SRR1199090 5 0.2719 0.597 0.000 0.048 0.068 0.000 0.884
#> SRR1199091 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199094 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199096 5 0.3835 0.554 0.000 0.048 0.156 0.000 0.796
#> SRR1199097 3 0.2074 0.909 0.000 0.104 0.896 0.000 0.000
#> SRR1199098 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199099 1 0.1041 0.971 0.964 0.000 0.004 0.032 0.000
#> SRR1199100 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199101 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199102 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199104 3 0.1478 0.962 0.000 0.064 0.936 0.000 0.000
#> SRR1199105 5 0.1608 0.528 0.000 0.000 0.072 0.000 0.928
#> SRR1199106 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199108 4 0.0963 0.861 0.000 0.000 0.000 0.964 0.036
#> SRR1199109 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199110 2 0.2411 0.845 0.000 0.884 0.008 0.000 0.108
#> SRR1199111 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199112 3 0.1741 0.929 0.000 0.024 0.936 0.000 0.040
#> SRR1199113 3 0.1725 0.924 0.000 0.020 0.936 0.000 0.044
#> SRR1199114 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0510 0.975 0.000 0.984 0.000 0.000 0.016
#> SRR1199117 1 0.1041 0.971 0.964 0.000 0.004 0.032 0.000
#> SRR1199118 1 0.0000 0.993 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199120 3 0.1571 0.960 0.000 0.060 0.936 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0547 0.975 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR1199009 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199010 2 0.3141 0.780 0.000 0.788 0.000 0.200 0.012 0.000
#> SRR1199011 1 0.0520 0.980 0.984 0.000 0.000 0.008 0.000 0.008
#> SRR1199012 2 0.4340 0.692 0.000 0.712 0.000 0.200 0.088 0.000
#> SRR1199013 5 0.3765 0.591 0.000 0.164 0.008 0.048 0.780 0.000
#> SRR1199015 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.0767 0.966 0.000 0.008 0.976 0.012 0.004 0.000
#> SRR1199017 1 0.0622 0.978 0.980 0.000 0.012 0.008 0.000 0.000
#> SRR1199018 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0881 0.973 0.972 0.000 0.012 0.008 0.000 0.008
#> SRR1199020 2 0.0713 0.920 0.000 0.972 0.000 0.028 0.000 0.000
#> SRR1199021 2 0.0260 0.927 0.000 0.992 0.000 0.008 0.000 0.000
#> SRR1199022 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0881 0.973 0.972 0.000 0.012 0.008 0.000 0.008
#> SRR1199026 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.6221 0.000 0.000 0.000 0.008 0.412 0.244 0.336
#> SRR1199028 2 0.3032 0.825 0.000 0.840 0.000 0.104 0.056 0.000
#> SRR1199029 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199032 2 0.0405 0.927 0.000 0.988 0.000 0.008 0.004 0.000
#> SRR1199033 2 0.0405 0.927 0.000 0.988 0.000 0.008 0.004 0.000
#> SRR1199034 3 0.0547 0.975 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR1199035 3 0.0547 0.975 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR1199036 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199037 2 0.4422 0.677 0.000 0.700 0.000 0.212 0.088 0.000
#> SRR1199038 2 0.0632 0.922 0.000 0.976 0.000 0.024 0.000 0.000
#> SRR1199040 2 0.0458 0.924 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR1199042 5 0.5470 -0.553 0.000 0.000 0.008 0.412 0.484 0.096
#> SRR1199043 2 0.0790 0.918 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR1199044 3 0.0547 0.975 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR1199045 3 0.0547 0.975 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR1199046 2 0.0937 0.914 0.000 0.960 0.000 0.040 0.000 0.000
#> SRR1199047 2 0.2178 0.849 0.000 0.868 0.000 0.132 0.000 0.000
#> SRR1199048 5 0.3551 0.554 0.000 0.192 0.000 0.036 0.772 0.000
#> SRR1199049 6 0.0146 0.775 0.000 0.000 0.000 0.004 0.000 0.996
#> SRR1199050 1 0.2215 0.911 0.900 0.000 0.012 0.012 0.000 0.076
#> SRR1199051 2 0.0363 0.926 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1199052 3 0.0547 0.975 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR1199054 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199056 2 0.5392 0.456 0.000 0.584 0.000 0.192 0.224 0.000
#> SRR1199057 2 0.1524 0.897 0.000 0.932 0.000 0.060 0.008 0.000
#> SRR1199059 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199060 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199061 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199062 1 0.2375 0.898 0.888 0.000 0.012 0.012 0.000 0.088
#> SRR1199064 6 0.3647 0.569 0.000 0.000 0.000 0.360 0.000 0.640
#> SRR1199065 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.4340 0.692 0.000 0.712 0.000 0.200 0.088 0.000
#> SRR1199075 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199077 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0291 0.927 0.000 0.992 0.000 0.004 0.004 0.000
#> SRR1199079 2 0.0146 0.927 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1199080 1 0.0291 0.983 0.992 0.000 0.004 0.004 0.000 0.000
#> SRR1199081 5 0.4145 0.606 0.000 0.136 0.040 0.048 0.776 0.000
#> SRR1199082 5 0.0291 0.612 0.000 0.004 0.004 0.000 0.992 0.000
#> SRR1199083 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199088 3 0.0458 0.974 0.000 0.016 0.984 0.000 0.000 0.000
#> SRR1199089 3 0.0767 0.966 0.000 0.008 0.976 0.012 0.004 0.000
#> SRR1199090 5 0.0508 0.624 0.000 0.012 0.004 0.000 0.984 0.000
#> SRR1199091 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0291 0.927 0.000 0.992 0.000 0.004 0.004 0.000
#> SRR1199094 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0146 0.927 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1199096 5 0.1636 0.630 0.000 0.024 0.036 0.004 0.936 0.000
#> SRR1199097 3 0.3275 0.774 0.000 0.036 0.816 0.144 0.004 0.000
#> SRR1199098 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199099 1 0.1269 0.963 0.956 0.000 0.012 0.012 0.000 0.020
#> SRR1199100 2 0.0146 0.927 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1199101 2 0.0405 0.927 0.000 0.988 0.000 0.008 0.004 0.000
#> SRR1199102 1 0.0260 0.984 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199103 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199104 3 0.0458 0.974 0.000 0.016 0.984 0.000 0.000 0.000
#> SRR1199105 5 0.1644 0.514 0.000 0.000 0.004 0.076 0.920 0.000
#> SRR1199106 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199107 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199108 6 0.0000 0.776 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1199109 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199110 2 0.5788 0.185 0.000 0.488 0.000 0.204 0.308 0.000
#> SRR1199111 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199112 3 0.0767 0.966 0.000 0.008 0.976 0.012 0.004 0.000
#> SRR1199113 3 0.0767 0.966 0.000 0.008 0.976 0.012 0.004 0.000
#> SRR1199114 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.4311 0.696 0.000 0.716 0.000 0.196 0.088 0.000
#> SRR1199117 1 0.1269 0.963 0.956 0.000 0.012 0.012 0.000 0.020
#> SRR1199118 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199120 3 0.0458 0.974 0.000 0.016 0.984 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", "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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'SD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.999 1.000 0.4566 0.544 0.544
#> 3 3 0.986 0.971 0.981 0.3580 0.829 0.685
#> 4 4 0.972 0.929 0.973 0.0476 0.965 0.907
#> 5 5 0.969 0.902 0.966 0.0296 0.995 0.985
#> 6 6 0.960 0.872 0.944 0.0151 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 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
#> SRR1199002 2 0.000 1.000 0.000 1.000
#> SRR1199009 2 0.000 1.000 0.000 1.000
#> SRR1199010 2 0.000 1.000 0.000 1.000
#> SRR1199011 1 0.000 1.000 1.000 0.000
#> SRR1199012 2 0.000 1.000 0.000 1.000
#> SRR1199013 2 0.000 1.000 0.000 1.000
#> SRR1199015 1 0.000 1.000 1.000 0.000
#> SRR1199016 2 0.000 1.000 0.000 1.000
#> SRR1199017 1 0.000 1.000 1.000 0.000
#> SRR1199018 1 0.000 1.000 1.000 0.000
#> SRR1199019 1 0.000 1.000 1.000 0.000
#> SRR1199020 2 0.000 1.000 0.000 1.000
#> SRR1199021 2 0.000 1.000 0.000 1.000
#> SRR1199022 1 0.000 1.000 1.000 0.000
#> SRR1199023 1 0.000 1.000 1.000 0.000
#> SRR1199025 1 0.000 1.000 1.000 0.000
#> SRR1199026 1 0.000 1.000 1.000 0.000
#> SRR1199027 1 0.000 1.000 1.000 0.000
#> SRR1199028 2 0.000 1.000 0.000 1.000
#> SRR1199029 1 0.000 1.000 1.000 0.000
#> SRR1199031 2 0.000 1.000 0.000 1.000
#> SRR1199032 2 0.000 1.000 0.000 1.000
#> SRR1199033 2 0.000 1.000 0.000 1.000
#> SRR1199034 2 0.000 1.000 0.000 1.000
#> SRR1199035 2 0.000 1.000 0.000 1.000
#> SRR1199036 2 0.000 1.000 0.000 1.000
#> SRR1199037 2 0.000 1.000 0.000 1.000
#> SRR1199038 2 0.000 1.000 0.000 1.000
#> SRR1199040 2 0.000 1.000 0.000 1.000
#> SRR1199042 2 0.184 0.971 0.028 0.972
#> SRR1199043 2 0.000 1.000 0.000 1.000
#> SRR1199044 2 0.000 1.000 0.000 1.000
#> SRR1199045 2 0.000 1.000 0.000 1.000
#> SRR1199046 2 0.000 1.000 0.000 1.000
#> SRR1199047 2 0.000 1.000 0.000 1.000
#> SRR1199048 2 0.000 1.000 0.000 1.000
#> SRR1199049 1 0.000 1.000 1.000 0.000
#> SRR1199050 1 0.000 1.000 1.000 0.000
#> SRR1199051 2 0.000 1.000 0.000 1.000
#> SRR1199052 2 0.000 1.000 0.000 1.000
#> SRR1199054 2 0.000 1.000 0.000 1.000
#> SRR1199056 2 0.000 1.000 0.000 1.000
#> SRR1199057 2 0.000 1.000 0.000 1.000
#> SRR1199059 2 0.000 1.000 0.000 1.000
#> SRR1199060 2 0.000 1.000 0.000 1.000
#> SRR1199061 2 0.000 1.000 0.000 1.000
#> SRR1199062 1 0.000 1.000 1.000 0.000
#> SRR1199064 1 0.000 1.000 1.000 0.000
#> SRR1199065 1 0.000 1.000 1.000 0.000
#> SRR1199067 2 0.000 1.000 0.000 1.000
#> SRR1199075 1 0.000 1.000 1.000 0.000
#> SRR1199076 2 0.000 1.000 0.000 1.000
#> SRR1199077 1 0.000 1.000 1.000 0.000
#> SRR1199078 2 0.000 1.000 0.000 1.000
#> SRR1199079 2 0.000 1.000 0.000 1.000
#> SRR1199080 1 0.000 1.000 1.000 0.000
#> SRR1199081 2 0.000 1.000 0.000 1.000
#> SRR1199082 2 0.000 1.000 0.000 1.000
#> SRR1199083 1 0.000 1.000 1.000 0.000
#> SRR1199084 1 0.000 1.000 1.000 0.000
#> SRR1199085 1 0.000 1.000 1.000 0.000
#> SRR1199086 1 0.000 1.000 1.000 0.000
#> SRR1199087 2 0.000 1.000 0.000 1.000
#> SRR1199088 2 0.000 1.000 0.000 1.000
#> SRR1199089 2 0.000 1.000 0.000 1.000
#> SRR1199090 2 0.000 1.000 0.000 1.000
#> SRR1199091 1 0.000 1.000 1.000 0.000
#> SRR1199092 1 0.000 1.000 1.000 0.000
#> SRR1199093 2 0.000 1.000 0.000 1.000
#> SRR1199094 1 0.000 1.000 1.000 0.000
#> SRR1199095 2 0.000 1.000 0.000 1.000
#> SRR1199096 2 0.000 1.000 0.000 1.000
#> SRR1199097 2 0.000 1.000 0.000 1.000
#> SRR1199098 2 0.000 1.000 0.000 1.000
#> SRR1199099 1 0.000 1.000 1.000 0.000
#> SRR1199100 2 0.000 1.000 0.000 1.000
#> SRR1199101 2 0.000 1.000 0.000 1.000
#> SRR1199102 1 0.000 1.000 1.000 0.000
#> SRR1199103 2 0.000 1.000 0.000 1.000
#> SRR1199104 2 0.000 1.000 0.000 1.000
#> SRR1199105 2 0.000 1.000 0.000 1.000
#> SRR1199106 2 0.000 1.000 0.000 1.000
#> SRR1199107 2 0.000 1.000 0.000 1.000
#> SRR1199108 1 0.000 1.000 1.000 0.000
#> SRR1199109 2 0.000 1.000 0.000 1.000
#> SRR1199110 2 0.000 1.000 0.000 1.000
#> SRR1199111 2 0.000 1.000 0.000 1.000
#> SRR1199112 2 0.000 1.000 0.000 1.000
#> SRR1199113 2 0.000 1.000 0.000 1.000
#> SRR1199114 1 0.000 1.000 1.000 0.000
#> SRR1199115 1 0.000 1.000 1.000 0.000
#> SRR1199116 2 0.000 1.000 0.000 1.000
#> SRR1199117 1 0.000 1.000 1.000 0.000
#> SRR1199118 1 0.000 1.000 1.000 0.000
#> SRR1199119 2 0.000 1.000 0.000 1.000
#> SRR1199120 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
#> SRR1199002 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199009 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199011 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199012 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199013 2 0.3038 0.873 0.000 0.896 0.104
#> SRR1199015 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199016 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199017 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199027 1 0.1163 0.976 0.972 0.000 0.028
#> SRR1199028 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199034 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199035 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199036 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199037 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199038 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199042 3 0.5024 0.736 0.004 0.220 0.776
#> SRR1199043 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199044 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199045 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199046 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199048 2 0.0424 0.982 0.000 0.992 0.008
#> SRR1199049 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199050 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199052 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199054 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199056 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199057 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199064 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199065 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199075 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199081 2 0.4399 0.751 0.000 0.812 0.188
#> SRR1199082 2 0.0592 0.978 0.000 0.988 0.012
#> SRR1199083 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199088 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199089 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199090 2 0.3551 0.844 0.000 0.868 0.132
#> SRR1199091 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199096 3 0.1289 0.937 0.000 0.032 0.968
#> SRR1199097 3 0.5216 0.717 0.000 0.260 0.740
#> SRR1199098 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199099 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199102 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199104 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199105 3 0.5785 0.537 0.000 0.332 0.668
#> SRR1199106 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199108 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199109 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199110 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199111 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199112 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199113 3 0.1529 0.947 0.000 0.040 0.960
#> SRR1199114 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199117 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.989 0.000 1.000 0.000
#> SRR1199120 3 0.1529 0.947 0.000 0.040 0.960
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199009 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199013 2 0.362 0.8030 0.000 0.860 0.064 0.076
#> SRR1199015 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199017 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.493 0.0131 0.432 0.000 0.000 0.568
#> SRR1199028 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199035 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199036 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199038 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.000 0.4501 0.000 0.000 0.000 1.000
#> SRR1199043 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199045 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199046 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199047 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.179 0.9075 0.000 0.932 0.000 0.068
#> SRR1199049 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199054 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199057 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199064 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199065 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199081 2 0.503 0.5930 0.000 0.752 0.188 0.060
#> SRR1199082 4 0.525 0.2908 0.000 0.440 0.008 0.552
#> SRR1199083 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199089 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199090 4 0.658 0.3913 0.000 0.388 0.084 0.528
#> SRR1199091 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199096 3 0.597 0.4886 0.000 0.068 0.640 0.292
#> SRR1199097 3 0.462 0.2708 0.000 0.340 0.660 0.000
#> SRR1199098 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199105 4 0.130 0.4301 0.000 0.000 0.044 0.956
#> SRR1199106 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199108 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199109 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199111 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199113 3 0.000 0.9323 0.000 0.000 1.000 0.000
#> SRR1199114 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199117 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.000 0.9869 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.000 0.9323 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0162 0.9254 0.000 0.000 0.996 0.004 0.000
#> SRR1199009 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199010 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199011 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.0404 0.9532 0.000 0.988 0.012 0.000 0.000
#> SRR1199013 2 0.4418 0.4405 0.000 0.652 0.016 0.000 0.332
#> SRR1199015 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.1012 0.8980 0.000 0.000 0.968 0.012 0.020
#> SRR1199017 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199021 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199022 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.1168 0.7169 0.032 0.000 0.000 0.960 0.008
#> SRR1199028 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199029 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199032 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199033 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199034 3 0.0162 0.9254 0.000 0.000 0.996 0.004 0.000
#> SRR1199035 3 0.0162 0.9254 0.000 0.000 0.996 0.004 0.000
#> SRR1199036 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199037 2 0.1369 0.9238 0.000 0.956 0.028 0.008 0.008
#> SRR1199038 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199040 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199042 4 0.3636 0.6720 0.000 0.000 0.000 0.728 0.272
#> SRR1199043 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199044 3 0.0162 0.9254 0.000 0.000 0.996 0.004 0.000
#> SRR1199045 3 0.0162 0.9254 0.000 0.000 0.996 0.004 0.000
#> SRR1199046 2 0.0324 0.9568 0.000 0.992 0.004 0.004 0.000
#> SRR1199047 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199048 2 0.4367 0.2489 0.000 0.580 0.000 0.004 0.416
#> SRR1199049 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 3 0.0162 0.9254 0.000 0.000 0.996 0.004 0.000
#> SRR1199054 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199056 2 0.1728 0.9101 0.000 0.940 0.020 0.004 0.036
#> SRR1199057 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199059 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199060 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199061 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199062 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 1 0.2233 0.8796 0.892 0.000 0.000 0.104 0.004
#> SRR1199065 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.0566 0.9515 0.000 0.984 0.000 0.004 0.012
#> SRR1199075 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199077 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199079 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199080 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 2 0.6279 0.0439 0.000 0.520 0.148 0.004 0.328
#> SRR1199082 5 0.3615 0.4271 0.000 0.156 0.000 0.036 0.808
#> SRR1199083 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199088 3 0.0000 0.9252 0.000 0.000 1.000 0.000 0.000
#> SRR1199089 3 0.0162 0.9236 0.000 0.000 0.996 0.004 0.000
#> SRR1199090 5 0.1704 0.5021 0.000 0.068 0.004 0.000 0.928
#> SRR1199091 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199094 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199096 5 0.6252 0.1727 0.000 0.044 0.416 0.052 0.488
#> SRR1199097 3 0.4410 0.0328 0.000 0.440 0.556 0.004 0.000
#> SRR1199098 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199099 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199101 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199102 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199104 3 0.0000 0.9252 0.000 0.000 1.000 0.000 0.000
#> SRR1199105 5 0.1043 0.3702 0.000 0.000 0.000 0.040 0.960
#> SRR1199106 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199108 1 0.0609 0.9773 0.980 0.000 0.000 0.020 0.000
#> SRR1199109 2 0.0162 0.9615 0.000 0.996 0.000 0.000 0.004
#> SRR1199110 2 0.1502 0.9095 0.000 0.940 0.000 0.004 0.056
#> SRR1199111 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199112 3 0.0000 0.9252 0.000 0.000 1.000 0.000 0.000
#> SRR1199113 3 0.0162 0.9236 0.000 0.000 0.996 0.004 0.000
#> SRR1199114 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0566 0.9538 0.000 0.984 0.000 0.004 0.012
#> SRR1199117 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9958 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.9615 0.000 1.000 0.000 0.000 0.000
#> SRR1199120 3 0.0000 0.9252 0.000 0.000 1.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
#> SRR1199002 3 0.0000 0.9173 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1199009 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199010 2 0.0777 0.9356 0.000 0.972 0.000 0.000 0.004 NA
#> SRR1199011 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199012 2 0.1490 0.9162 0.000 0.948 0.008 0.004 0.016 NA
#> SRR1199013 2 0.5435 0.1072 0.000 0.524 0.020 0.000 0.384 NA
#> SRR1199015 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199016 3 0.1668 0.8659 0.000 0.000 0.928 0.004 0.008 NA
#> SRR1199017 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199018 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199019 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199020 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199021 2 0.0291 0.9449 0.000 0.992 0.000 0.000 0.004 NA
#> SRR1199022 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199023 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199025 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199026 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199027 4 0.0146 0.6168 0.000 0.000 0.000 0.996 0.004 NA
#> SRR1199028 2 0.0777 0.9355 0.000 0.972 0.000 0.000 0.004 NA
#> SRR1199029 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199031 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199032 2 0.0146 0.9459 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199033 2 0.0363 0.9436 0.000 0.988 0.000 0.000 0.000 NA
#> SRR1199034 3 0.0000 0.9173 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1199035 3 0.0146 0.9149 0.000 0.000 0.996 0.000 0.000 NA
#> SRR1199036 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199037 2 0.1922 0.8954 0.000 0.924 0.024 0.000 0.012 NA
#> SRR1199038 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199040 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199042 4 0.5471 0.5726 0.000 0.000 0.000 0.524 0.140 NA
#> SRR1199043 2 0.0363 0.9442 0.000 0.988 0.000 0.000 0.000 NA
#> SRR1199044 3 0.0000 0.9173 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1199045 3 0.0000 0.9173 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1199046 2 0.0665 0.9404 0.000 0.980 0.004 0.000 0.008 NA
#> SRR1199047 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199048 2 0.4381 0.1388 0.000 0.536 0.000 0.000 0.440 NA
#> SRR1199049 1 0.0291 0.9783 0.992 0.000 0.000 0.004 0.000 NA
#> SRR1199050 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199051 2 0.0260 0.9453 0.000 0.992 0.000 0.000 0.000 NA
#> SRR1199052 3 0.0000 0.9173 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1199054 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199056 2 0.3267 0.8169 0.000 0.852 0.024 0.004 0.056 NA
#> SRR1199057 2 0.0520 0.9414 0.000 0.984 0.000 0.000 0.008 NA
#> SRR1199059 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199060 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199061 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199062 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199064 1 0.5192 0.3207 0.576 0.000 0.000 0.116 0.000 NA
#> SRR1199065 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199067 2 0.1924 0.8941 0.000 0.920 0.000 0.004 0.028 NA
#> SRR1199075 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199076 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199077 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199078 2 0.0291 0.9448 0.000 0.992 0.000 0.000 0.004 NA
#> SRR1199079 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199080 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199081 2 0.6707 -0.2919 0.000 0.404 0.188 0.000 0.356 NA
#> SRR1199082 5 0.4890 0.4517 0.000 0.112 0.000 0.028 0.708 NA
#> SRR1199083 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199084 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199085 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199086 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199087 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199088 3 0.0000 0.9173 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1199089 3 0.0363 0.9125 0.000 0.000 0.988 0.000 0.000 NA
#> SRR1199090 5 0.1779 0.5103 0.000 0.064 0.000 0.000 0.920 NA
#> SRR1199091 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199092 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199093 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199094 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199095 2 0.0146 0.9460 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199096 5 0.7289 0.1669 0.000 0.028 0.304 0.040 0.376 NA
#> SRR1199097 3 0.4617 0.0119 0.000 0.444 0.524 0.000 0.008 NA
#> SRR1199098 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199099 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199100 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199101 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199102 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199103 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199104 3 0.0000 0.9173 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1199105 5 0.2981 0.3544 0.000 0.000 0.000 0.020 0.820 NA
#> SRR1199106 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199107 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199108 1 0.0891 0.9562 0.968 0.000 0.000 0.024 0.000 NA
#> SRR1199109 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199110 2 0.2404 0.8520 0.000 0.884 0.000 0.000 0.080 NA
#> SRR1199111 2 0.0000 0.9463 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1199112 3 0.0146 0.9160 0.000 0.000 0.996 0.000 0.000 NA
#> SRR1199113 3 0.1219 0.8836 0.000 0.000 0.948 0.000 0.004 NA
#> SRR1199114 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199115 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199116 2 0.0993 0.9284 0.000 0.964 0.000 0.000 0.012 NA
#> SRR1199117 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199118 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1199119 2 0.0146 0.9458 0.000 0.996 0.000 0.000 0.000 NA
#> SRR1199120 3 0.0363 0.9128 0.000 0.000 0.988 0.000 0.000 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'SD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.4497 0.551 0.551
#> 3 3 0.959 0.959 0.972 0.4044 0.807 0.650
#> 4 4 0.959 0.930 0.978 0.0267 0.993 0.981
#> 5 5 0.944 0.913 0.970 0.0170 0.979 0.941
#> 6 6 0.870 0.863 0.945 0.0261 0.976 0.933
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0 1 0 1
#> SRR1199009 2 0 1 0 1
#> SRR1199010 2 0 1 0 1
#> SRR1199011 1 0 1 1 0
#> SRR1199012 2 0 1 0 1
#> SRR1199013 2 0 1 0 1
#> SRR1199015 1 0 1 1 0
#> SRR1199016 2 0 1 0 1
#> SRR1199017 1 0 1 1 0
#> SRR1199018 1 0 1 1 0
#> SRR1199019 1 0 1 1 0
#> SRR1199020 2 0 1 0 1
#> SRR1199021 2 0 1 0 1
#> SRR1199022 1 0 1 1 0
#> SRR1199023 1 0 1 1 0
#> SRR1199025 1 0 1 1 0
#> SRR1199026 1 0 1 1 0
#> SRR1199027 2 0 1 0 1
#> SRR1199028 2 0 1 0 1
#> SRR1199029 1 0 1 1 0
#> SRR1199031 2 0 1 0 1
#> SRR1199032 2 0 1 0 1
#> SRR1199033 2 0 1 0 1
#> SRR1199034 2 0 1 0 1
#> SRR1199035 2 0 1 0 1
#> SRR1199036 2 0 1 0 1
#> SRR1199037 2 0 1 0 1
#> SRR1199038 2 0 1 0 1
#> SRR1199040 2 0 1 0 1
#> SRR1199042 2 0 1 0 1
#> SRR1199043 2 0 1 0 1
#> SRR1199044 2 0 1 0 1
#> SRR1199045 2 0 1 0 1
#> SRR1199046 2 0 1 0 1
#> SRR1199047 2 0 1 0 1
#> SRR1199048 2 0 1 0 1
#> SRR1199049 1 0 1 1 0
#> SRR1199050 1 0 1 1 0
#> SRR1199051 2 0 1 0 1
#> SRR1199052 2 0 1 0 1
#> SRR1199054 2 0 1 0 1
#> SRR1199056 2 0 1 0 1
#> SRR1199057 2 0 1 0 1
#> SRR1199059 2 0 1 0 1
#> SRR1199060 2 0 1 0 1
#> SRR1199061 2 0 1 0 1
#> SRR1199062 1 0 1 1 0
#> SRR1199064 1 0 1 1 0
#> SRR1199065 1 0 1 1 0
#> SRR1199067 2 0 1 0 1
#> SRR1199075 1 0 1 1 0
#> SRR1199076 2 0 1 0 1
#> SRR1199077 1 0 1 1 0
#> SRR1199078 2 0 1 0 1
#> SRR1199079 2 0 1 0 1
#> SRR1199080 1 0 1 1 0
#> SRR1199081 2 0 1 0 1
#> SRR1199082 2 0 1 0 1
#> SRR1199083 1 0 1 1 0
#> SRR1199084 1 0 1 1 0
#> SRR1199085 1 0 1 1 0
#> SRR1199086 1 0 1 1 0
#> SRR1199087 2 0 1 0 1
#> SRR1199088 2 0 1 0 1
#> SRR1199089 2 0 1 0 1
#> SRR1199090 2 0 1 0 1
#> SRR1199091 1 0 1 1 0
#> SRR1199092 1 0 1 1 0
#> SRR1199093 2 0 1 0 1
#> SRR1199094 1 0 1 1 0
#> SRR1199095 2 0 1 0 1
#> SRR1199096 2 0 1 0 1
#> SRR1199097 2 0 1 0 1
#> SRR1199098 2 0 1 0 1
#> SRR1199099 1 0 1 1 0
#> SRR1199100 2 0 1 0 1
#> SRR1199101 2 0 1 0 1
#> SRR1199102 1 0 1 1 0
#> SRR1199103 2 0 1 0 1
#> SRR1199104 2 0 1 0 1
#> SRR1199105 2 0 1 0 1
#> SRR1199106 2 0 1 0 1
#> SRR1199107 2 0 1 0 1
#> SRR1199108 1 0 1 1 0
#> SRR1199109 2 0 1 0 1
#> SRR1199110 2 0 1 0 1
#> SRR1199111 2 0 1 0 1
#> SRR1199112 2 0 1 0 1
#> SRR1199113 2 0 1 0 1
#> SRR1199114 1 0 1 1 0
#> SRR1199115 1 0 1 1 0
#> SRR1199116 2 0 1 0 1
#> SRR1199117 1 0 1 1 0
#> SRR1199118 1 0 1 1 0
#> SRR1199119 2 0 1 0 1
#> SRR1199120 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199009 2 0.2261 0.913 0.000 0.932 0.068
#> SRR1199010 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199011 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199012 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1199013 2 0.1753 0.935 0.000 0.952 0.048
#> SRR1199015 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199016 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199017 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199027 3 0.1753 0.946 0.000 0.048 0.952
#> SRR1199028 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199034 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199035 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199036 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199037 3 0.6299 0.219 0.000 0.476 0.524
#> SRR1199038 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199042 3 0.1753 0.946 0.000 0.048 0.952
#> SRR1199043 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199044 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199045 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199046 2 0.4504 0.729 0.000 0.804 0.196
#> SRR1199047 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199048 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199049 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199050 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199052 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199054 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199056 2 0.4750 0.697 0.000 0.784 0.216
#> SRR1199057 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199064 1 0.1964 0.954 0.944 0.000 0.056
#> SRR1199065 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199075 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199081 3 0.4842 0.788 0.000 0.224 0.776
#> SRR1199082 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199083 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199088 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199089 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199090 2 0.4750 0.700 0.000 0.784 0.216
#> SRR1199091 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199096 3 0.4002 0.868 0.000 0.160 0.840
#> SRR1199097 3 0.3116 0.918 0.000 0.108 0.892
#> SRR1199098 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199099 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199102 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199104 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199105 3 0.3340 0.908 0.000 0.120 0.880
#> SRR1199106 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199108 1 0.0424 0.992 0.992 0.000 0.008
#> SRR1199109 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199110 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199111 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199112 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199113 3 0.1964 0.953 0.000 0.056 0.944
#> SRR1199114 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199117 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.980 0.000 1.000 0.000
#> SRR1199120 3 0.1964 0.953 0.000 0.056 0.944
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199009 2 0.1792 0.9104 0.000 0.932 0.068 0.000
#> SRR1199010 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.0336 0.9719 0.000 0.992 0.008 0.000
#> SRR1199013 2 0.1557 0.9238 0.000 0.944 0.056 0.000
#> SRR1199015 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199017 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199027 3 0.2530 0.8138 0.000 0.000 0.888 0.112
#> SRR1199028 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199035 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199036 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199037 3 0.4998 0.0889 0.000 0.488 0.512 0.000
#> SRR1199038 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199042 3 0.2530 0.8138 0.000 0.000 0.888 0.112
#> SRR1199043 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199045 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199046 2 0.3528 0.7399 0.000 0.808 0.192 0.000
#> SRR1199047 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199049 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199054 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.3726 0.7105 0.000 0.788 0.212 0.000
#> SRR1199057 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199064 4 0.0921 0.0000 0.028 0.000 0.000 0.972
#> SRR1199065 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199081 3 0.3837 0.5928 0.000 0.224 0.776 0.000
#> SRR1199082 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199083 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199089 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199090 2 0.3801 0.7003 0.000 0.780 0.220 0.000
#> SRR1199091 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199096 3 0.2973 0.7254 0.000 0.144 0.856 0.000
#> SRR1199097 3 0.1867 0.8246 0.000 0.072 0.928 0.000
#> SRR1199098 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199105 3 0.3051 0.7947 0.000 0.088 0.884 0.028
#> SRR1199106 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199108 1 0.2081 0.9025 0.916 0.000 0.000 0.084
#> SRR1199109 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199111 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199113 3 0.0000 0.8922 0.000 0.000 1.000 0.000
#> SRR1199114 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199117 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9970 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.9794 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.0000 0.8922 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199009 2 0.1768 0.9004 0.000 0.924 0.072 0.004 0
#> SRR1199010 2 0.0290 0.9625 0.000 0.992 0.000 0.008 0
#> SRR1199011 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199012 2 0.0693 0.9573 0.000 0.980 0.008 0.012 0
#> SRR1199013 2 0.1670 0.9177 0.000 0.936 0.052 0.012 0
#> SRR1199015 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199016 3 0.0404 0.9074 0.000 0.000 0.988 0.012 0
#> SRR1199017 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199018 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199019 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199020 2 0.0290 0.9625 0.000 0.992 0.000 0.008 0
#> SRR1199021 2 0.0162 0.9628 0.000 0.996 0.000 0.004 0
#> SRR1199022 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199023 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199025 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199026 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199027 4 0.0290 0.9626 0.000 0.000 0.008 0.992 0
#> SRR1199028 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199029 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199031 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199032 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199033 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199034 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199035 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199036 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199037 2 0.4659 -0.0233 0.000 0.496 0.492 0.012 0
#> SRR1199038 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199040 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199042 4 0.0703 0.9626 0.000 0.000 0.024 0.976 0
#> SRR1199043 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199044 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199045 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199046 2 0.3355 0.7507 0.000 0.804 0.184 0.012 0
#> SRR1199047 2 0.0290 0.9625 0.000 0.992 0.000 0.008 0
#> SRR1199048 2 0.0290 0.9624 0.000 0.992 0.000 0.008 0
#> SRR1199049 1 0.0703 0.9627 0.976 0.000 0.000 0.024 0
#> SRR1199050 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199051 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199052 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199054 2 0.0162 0.9627 0.000 0.996 0.000 0.004 0
#> SRR1199056 2 0.3596 0.7103 0.000 0.776 0.212 0.012 0
#> SRR1199057 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199059 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199060 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199061 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199062 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199064 5 0.0000 0.0000 0.000 0.000 0.000 0.000 1
#> SRR1199065 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199067 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199075 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199076 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199077 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199078 2 0.0162 0.9628 0.000 0.996 0.000 0.004 0
#> SRR1199079 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199080 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199081 3 0.3807 0.5373 0.000 0.240 0.748 0.012 0
#> SRR1199082 2 0.0510 0.9600 0.000 0.984 0.000 0.016 0
#> SRR1199083 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199084 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199085 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199086 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199087 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199088 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199089 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199090 2 0.3696 0.7070 0.000 0.772 0.212 0.016 0
#> SRR1199091 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199092 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199093 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199094 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199095 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199096 3 0.2909 0.7187 0.000 0.140 0.848 0.012 0
#> SRR1199097 3 0.1608 0.8323 0.000 0.072 0.928 0.000 0
#> SRR1199098 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199099 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199100 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199101 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199102 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199103 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199104 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199105 3 0.5484 0.3503 0.000 0.080 0.584 0.336 0
#> SRR1199106 2 0.0290 0.9625 0.000 0.992 0.000 0.008 0
#> SRR1199107 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199108 1 0.4210 0.3101 0.588 0.000 0.000 0.412 0
#> SRR1199109 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199110 2 0.0404 0.9615 0.000 0.988 0.000 0.012 0
#> SRR1199111 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199112 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199113 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
#> SRR1199114 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199115 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199116 2 0.0000 0.9628 0.000 1.000 0.000 0.000 0
#> SRR1199117 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199118 1 0.0000 0.9852 1.000 0.000 0.000 0.000 0
#> SRR1199119 2 0.0290 0.9624 0.000 0.992 0.000 0.008 0
#> SRR1199120 3 0.0000 0.9175 0.000 0.000 1.000 0.000 0
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199009 2 0.1700 0.89249 0.000 0.916 0.080 0.000 0.004 0
#> SRR1199010 2 0.1644 0.92898 0.000 0.920 0.000 0.076 0.004 0
#> SRR1199011 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199012 2 0.2355 0.91039 0.000 0.876 0.008 0.112 0.004 0
#> SRR1199013 2 0.3185 0.87914 0.000 0.832 0.048 0.116 0.004 0
#> SRR1199015 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199016 3 0.1908 0.75233 0.000 0.000 0.900 0.096 0.004 0
#> SRR1199017 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199018 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199019 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199020 2 0.1588 0.92977 0.000 0.924 0.000 0.072 0.004 0
#> SRR1199021 2 0.0291 0.93640 0.000 0.992 0.000 0.004 0.004 0
#> SRR1199022 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199023 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199025 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199026 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199027 5 0.0000 0.44238 0.000 0.000 0.000 0.000 1.000 0
#> SRR1199028 2 0.1958 0.91931 0.000 0.896 0.000 0.100 0.004 0
#> SRR1199029 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199031 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199032 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199033 2 0.2100 0.91360 0.000 0.884 0.000 0.112 0.004 0
#> SRR1199034 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199035 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199036 2 0.1908 0.92159 0.000 0.900 0.000 0.096 0.004 0
#> SRR1199037 3 0.5549 -0.00654 0.000 0.432 0.448 0.116 0.004 0
#> SRR1199038 2 0.2146 0.91110 0.000 0.880 0.000 0.116 0.004 0
#> SRR1199040 2 0.2146 0.91110 0.000 0.880 0.000 0.116 0.004 0
#> SRR1199042 5 0.0000 0.44238 0.000 0.000 0.000 0.000 1.000 0
#> SRR1199043 2 0.2053 0.91582 0.000 0.888 0.000 0.108 0.004 0
#> SRR1199044 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199045 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199046 2 0.4540 0.71549 0.000 0.712 0.168 0.116 0.004 0
#> SRR1199047 2 0.0935 0.93605 0.000 0.964 0.000 0.032 0.004 0
#> SRR1199048 2 0.1444 0.92976 0.000 0.928 0.000 0.072 0.000 0
#> SRR1199049 1 0.3634 0.41498 0.644 0.000 0.000 0.356 0.000 0
#> SRR1199050 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199051 2 0.1588 0.92994 0.000 0.924 0.000 0.072 0.004 0
#> SRR1199052 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199054 2 0.0458 0.93709 0.000 0.984 0.000 0.016 0.000 0
#> SRR1199056 2 0.4664 0.69069 0.000 0.696 0.184 0.116 0.004 0
#> SRR1199057 2 0.1806 0.92450 0.000 0.908 0.000 0.088 0.004 0
#> SRR1199059 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199060 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199061 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199062 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199064 6 0.0000 0.00000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1199065 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199067 2 0.1958 0.91993 0.000 0.896 0.000 0.100 0.004 0
#> SRR1199075 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199076 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199077 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199078 2 0.0146 0.93583 0.000 0.996 0.000 0.000 0.004 0
#> SRR1199079 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199080 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199081 3 0.4908 0.37078 0.000 0.220 0.660 0.116 0.004 0
#> SRR1199082 2 0.2257 0.90951 0.000 0.876 0.000 0.116 0.008 0
#> SRR1199083 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199084 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199085 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199086 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199087 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199088 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199089 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199090 2 0.4710 0.69993 0.000 0.700 0.176 0.116 0.008 0
#> SRR1199091 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199092 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199093 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199094 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199095 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199096 3 0.4032 0.54913 0.000 0.140 0.764 0.092 0.004 0
#> SRR1199097 3 0.2294 0.73394 0.000 0.072 0.892 0.036 0.000 0
#> SRR1199098 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199099 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199100 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199101 2 0.0632 0.93583 0.000 0.976 0.000 0.024 0.000 0
#> SRR1199102 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199103 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199104 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199105 5 0.6331 0.17784 0.000 0.048 0.332 0.136 0.484 0
#> SRR1199106 2 0.0692 0.93693 0.000 0.976 0.000 0.020 0.004 0
#> SRR1199107 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199108 4 0.2658 0.00000 0.036 0.000 0.000 0.864 0.100 0
#> SRR1199109 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199110 2 0.2146 0.91110 0.000 0.880 0.000 0.116 0.004 0
#> SRR1199111 2 0.0000 0.93551 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199112 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199113 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199114 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199115 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199116 2 0.0632 0.93583 0.000 0.976 0.000 0.024 0.000 0
#> SRR1199117 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199118 1 0.0000 0.98707 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199119 2 0.1387 0.93066 0.000 0.932 0.000 0.068 0.000 0
#> SRR1199120 3 0.0000 0.84963 0.000 0.000 1.000 0.000 0.000 0
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) 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 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.991 0.995 0.4677 0.532 0.532
#> 3 3 0.765 0.904 0.928 0.3430 0.732 0.528
#> 4 4 0.733 0.877 0.891 0.0719 0.954 0.863
#> 5 5 0.670 0.785 0.840 0.1085 0.921 0.732
#> 6 6 0.629 0.711 0.816 0.0380 0.957 0.810
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.0000 0.998 0.000 1.000
#> SRR1199009 2 0.0000 0.998 0.000 1.000
#> SRR1199010 2 0.0000 0.998 0.000 1.000
#> SRR1199011 1 0.0000 0.992 1.000 0.000
#> SRR1199012 2 0.0000 0.998 0.000 1.000
#> SRR1199013 2 0.0000 0.998 0.000 1.000
#> SRR1199015 1 0.0000 0.992 1.000 0.000
#> SRR1199016 2 0.0672 0.991 0.008 0.992
#> SRR1199017 1 0.0000 0.992 1.000 0.000
#> SRR1199018 1 0.0000 0.992 1.000 0.000
#> SRR1199019 1 0.0000 0.992 1.000 0.000
#> SRR1199020 2 0.0000 0.998 0.000 1.000
#> SRR1199021 2 0.0000 0.998 0.000 1.000
#> SRR1199022 1 0.0000 0.992 1.000 0.000
#> SRR1199023 1 0.0000 0.992 1.000 0.000
#> SRR1199025 1 0.0000 0.992 1.000 0.000
#> SRR1199026 1 0.0000 0.992 1.000 0.000
#> SRR1199027 1 0.1633 0.972 0.976 0.024
#> SRR1199028 2 0.0000 0.998 0.000 1.000
#> SRR1199029 1 0.0000 0.992 1.000 0.000
#> SRR1199031 2 0.0000 0.998 0.000 1.000
#> SRR1199032 2 0.0000 0.998 0.000 1.000
#> SRR1199033 2 0.0000 0.998 0.000 1.000
#> SRR1199034 2 0.0000 0.998 0.000 1.000
#> SRR1199035 2 0.0000 0.998 0.000 1.000
#> SRR1199036 2 0.0000 0.998 0.000 1.000
#> SRR1199037 2 0.0000 0.998 0.000 1.000
#> SRR1199038 2 0.0000 0.998 0.000 1.000
#> SRR1199040 2 0.0000 0.998 0.000 1.000
#> SRR1199042 1 0.1843 0.968 0.972 0.028
#> SRR1199043 2 0.0000 0.998 0.000 1.000
#> SRR1199044 2 0.0000 0.998 0.000 1.000
#> SRR1199045 2 0.0000 0.998 0.000 1.000
#> SRR1199046 2 0.0000 0.998 0.000 1.000
#> SRR1199047 2 0.0000 0.998 0.000 1.000
#> SRR1199048 2 0.0000 0.998 0.000 1.000
#> SRR1199049 1 0.0000 0.992 1.000 0.000
#> SRR1199050 1 0.0000 0.992 1.000 0.000
#> SRR1199051 2 0.0000 0.998 0.000 1.000
#> SRR1199052 2 0.0000 0.998 0.000 1.000
#> SRR1199054 2 0.0000 0.998 0.000 1.000
#> SRR1199056 2 0.0000 0.998 0.000 1.000
#> SRR1199057 2 0.0000 0.998 0.000 1.000
#> SRR1199059 2 0.0000 0.998 0.000 1.000
#> SRR1199060 2 0.0000 0.998 0.000 1.000
#> SRR1199061 2 0.0000 0.998 0.000 1.000
#> SRR1199062 1 0.0000 0.992 1.000 0.000
#> SRR1199064 1 0.2043 0.965 0.968 0.032
#> SRR1199065 1 0.0000 0.992 1.000 0.000
#> SRR1199067 2 0.0000 0.998 0.000 1.000
#> SRR1199075 1 0.0000 0.992 1.000 0.000
#> SRR1199076 2 0.0000 0.998 0.000 1.000
#> SRR1199077 1 0.0000 0.992 1.000 0.000
#> SRR1199078 2 0.0000 0.998 0.000 1.000
#> SRR1199079 2 0.0000 0.998 0.000 1.000
#> SRR1199080 1 0.0000 0.992 1.000 0.000
#> SRR1199081 2 0.0000 0.998 0.000 1.000
#> SRR1199082 2 0.2236 0.963 0.036 0.964
#> SRR1199083 1 0.0000 0.992 1.000 0.000
#> SRR1199084 1 0.0000 0.992 1.000 0.000
#> SRR1199085 1 0.0000 0.992 1.000 0.000
#> SRR1199086 1 0.0000 0.992 1.000 0.000
#> SRR1199087 2 0.0000 0.998 0.000 1.000
#> SRR1199088 2 0.0000 0.998 0.000 1.000
#> SRR1199089 2 0.0672 0.991 0.008 0.992
#> SRR1199090 2 0.3879 0.918 0.076 0.924
#> SRR1199091 1 0.0000 0.992 1.000 0.000
#> SRR1199092 1 0.0000 0.992 1.000 0.000
#> SRR1199093 2 0.0000 0.998 0.000 1.000
#> SRR1199094 1 0.0000 0.992 1.000 0.000
#> SRR1199095 2 0.0000 0.998 0.000 1.000
#> SRR1199096 2 0.0000 0.998 0.000 1.000
#> SRR1199097 2 0.0000 0.998 0.000 1.000
#> SRR1199098 2 0.0000 0.998 0.000 1.000
#> SRR1199099 1 0.0000 0.992 1.000 0.000
#> SRR1199100 2 0.0000 0.998 0.000 1.000
#> SRR1199101 2 0.0000 0.998 0.000 1.000
#> SRR1199102 1 0.0000 0.992 1.000 0.000
#> SRR1199103 2 0.0000 0.998 0.000 1.000
#> SRR1199104 2 0.0000 0.998 0.000 1.000
#> SRR1199105 1 0.7219 0.753 0.800 0.200
#> SRR1199106 2 0.0000 0.998 0.000 1.000
#> SRR1199107 2 0.0000 0.998 0.000 1.000
#> SRR1199108 1 0.0376 0.989 0.996 0.004
#> SRR1199109 2 0.0000 0.998 0.000 1.000
#> SRR1199110 2 0.0000 0.998 0.000 1.000
#> SRR1199111 2 0.0000 0.998 0.000 1.000
#> SRR1199112 2 0.0672 0.991 0.008 0.992
#> SRR1199113 2 0.0672 0.991 0.008 0.992
#> SRR1199114 1 0.0000 0.992 1.000 0.000
#> SRR1199115 1 0.0000 0.992 1.000 0.000
#> SRR1199116 2 0.0000 0.998 0.000 1.000
#> SRR1199117 1 0.0000 0.992 1.000 0.000
#> SRR1199118 1 0.0000 0.992 1.000 0.000
#> SRR1199119 2 0.0000 0.998 0.000 1.000
#> SRR1199120 2 0.0376 0.994 0.004 0.996
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199009 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199011 1 0.0237 0.9813 0.996 0.000 0.004
#> SRR1199012 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199013 3 0.4452 0.8162 0.000 0.192 0.808
#> SRR1199015 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199016 3 0.4235 0.8147 0.000 0.176 0.824
#> SRR1199017 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199019 1 0.0424 0.9782 0.992 0.000 0.008
#> SRR1199020 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199025 1 0.0592 0.9758 0.988 0.000 0.012
#> SRR1199026 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199027 3 0.0000 0.7326 0.000 0.000 1.000
#> SRR1199028 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199034 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199035 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199036 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199037 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199038 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199042 3 0.0000 0.7326 0.000 0.000 1.000
#> SRR1199043 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199044 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199045 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199046 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199048 3 0.4504 0.8162 0.000 0.196 0.804
#> SRR1199049 3 0.2878 0.7027 0.096 0.000 0.904
#> SRR1199050 1 0.5905 0.4146 0.648 0.000 0.352
#> SRR1199051 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199052 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199054 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199056 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199057 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199062 3 0.6299 0.0151 0.476 0.000 0.524
#> SRR1199064 3 0.0000 0.7326 0.000 0.000 1.000
#> SRR1199065 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199075 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199081 3 0.4555 0.8163 0.000 0.200 0.800
#> SRR1199082 3 0.0592 0.7417 0.000 0.012 0.988
#> SRR1199083 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199088 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199089 3 0.5216 0.7960 0.000 0.260 0.740
#> SRR1199090 3 0.2066 0.7717 0.000 0.060 0.940
#> SRR1199091 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199096 3 0.4346 0.8157 0.000 0.184 0.816
#> SRR1199097 3 0.5835 0.7518 0.000 0.340 0.660
#> SRR1199098 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199099 1 0.0892 0.9699 0.980 0.000 0.020
#> SRR1199100 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199102 1 0.0237 0.9813 0.996 0.000 0.004
#> SRR1199103 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199104 3 0.5785 0.7632 0.000 0.332 0.668
#> SRR1199105 3 0.0237 0.7358 0.000 0.004 0.996
#> SRR1199106 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199108 3 0.2878 0.7027 0.096 0.000 0.904
#> SRR1199109 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199110 3 0.4605 0.8154 0.000 0.204 0.796
#> SRR1199111 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199112 3 0.5760 0.7655 0.000 0.328 0.672
#> SRR1199113 3 0.4605 0.8152 0.000 0.204 0.796
#> SRR1199114 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199116 2 0.0237 0.9946 0.000 0.996 0.004
#> SRR1199117 3 0.6291 0.0596 0.468 0.000 0.532
#> SRR1199118 1 0.0000 0.9836 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.9999 0.000 1.000 0.000
#> SRR1199120 3 0.5785 0.7632 0.000 0.332 0.668
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.5693 0.895 0.000 0.240 0.688 0.072
#> SRR1199009 2 0.0707 0.946 0.000 0.980 0.020 0.000
#> SRR1199010 2 0.0336 0.950 0.000 0.992 0.008 0.000
#> SRR1199011 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.0188 0.949 0.000 0.996 0.004 0.000
#> SRR1199013 4 0.4139 0.614 0.000 0.176 0.024 0.800
#> SRR1199015 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.6863 0.712 0.000 0.348 0.536 0.116
#> SRR1199017 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0336 0.969 0.992 0.000 0.000 0.008
#> SRR1199020 2 0.1584 0.934 0.000 0.952 0.012 0.036
#> SRR1199021 2 0.1576 0.925 0.000 0.948 0.004 0.048
#> SRR1199022 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0336 0.969 0.992 0.000 0.000 0.008
#> SRR1199026 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.2473 0.731 0.012 0.000 0.080 0.908
#> SRR1199028 2 0.0188 0.949 0.000 0.996 0.004 0.000
#> SRR1199029 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.1302 0.946 0.000 0.956 0.044 0.000
#> SRR1199032 2 0.0921 0.948 0.000 0.972 0.028 0.000
#> SRR1199033 2 0.1389 0.945 0.000 0.952 0.048 0.000
#> SRR1199034 3 0.5693 0.895 0.000 0.240 0.688 0.072
#> SRR1199035 3 0.5753 0.891 0.000 0.248 0.680 0.072
#> SRR1199036 2 0.0927 0.947 0.000 0.976 0.016 0.008
#> SRR1199037 2 0.0336 0.950 0.000 0.992 0.008 0.000
#> SRR1199038 2 0.1938 0.917 0.000 0.936 0.012 0.052
#> SRR1199040 2 0.0895 0.945 0.000 0.976 0.004 0.020
#> SRR1199042 4 0.1398 0.740 0.000 0.004 0.040 0.956
#> SRR1199043 2 0.0804 0.947 0.000 0.980 0.008 0.012
#> SRR1199044 3 0.5723 0.893 0.000 0.244 0.684 0.072
#> SRR1199045 3 0.5631 0.892 0.000 0.232 0.696 0.072
#> SRR1199046 2 0.2593 0.884 0.000 0.892 0.004 0.104
#> SRR1199047 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> SRR1199048 4 0.3307 0.705 0.000 0.104 0.028 0.868
#> SRR1199049 4 0.4372 0.660 0.268 0.000 0.004 0.728
#> SRR1199050 1 0.4999 -0.202 0.508 0.000 0.000 0.492
#> SRR1199051 2 0.1042 0.946 0.000 0.972 0.020 0.008
#> SRR1199052 3 0.5662 0.895 0.000 0.236 0.692 0.072
#> SRR1199054 2 0.0707 0.946 0.000 0.980 0.020 0.000
#> SRR1199056 2 0.0524 0.950 0.000 0.988 0.008 0.004
#> SRR1199057 2 0.1489 0.930 0.000 0.952 0.004 0.044
#> SRR1199059 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199060 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199061 2 0.1792 0.935 0.000 0.932 0.068 0.000
#> SRR1199062 4 0.4920 0.502 0.368 0.000 0.004 0.628
#> SRR1199064 4 0.4957 0.709 0.048 0.000 0.204 0.748
#> SRR1199065 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0524 0.951 0.000 0.988 0.008 0.004
#> SRR1199075 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199077 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.1389 0.942 0.000 0.952 0.048 0.000
#> SRR1199079 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199080 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199081 4 0.4139 0.614 0.000 0.176 0.024 0.800
#> SRR1199082 4 0.1284 0.747 0.000 0.012 0.024 0.964
#> SRR1199083 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199088 3 0.5631 0.892 0.000 0.232 0.696 0.072
#> SRR1199089 3 0.6820 0.715 0.000 0.364 0.528 0.108
#> SRR1199090 4 0.1284 0.747 0.000 0.012 0.024 0.964
#> SRR1199091 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199094 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199096 4 0.5229 0.602 0.000 0.168 0.084 0.748
#> SRR1199097 3 0.6677 0.752 0.000 0.364 0.540 0.096
#> SRR1199098 2 0.1545 0.931 0.000 0.952 0.008 0.040
#> SRR1199099 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199101 2 0.1474 0.943 0.000 0.948 0.052 0.000
#> SRR1199102 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.1209 0.937 0.000 0.964 0.004 0.032
#> SRR1199104 3 0.5662 0.895 0.000 0.236 0.692 0.072
#> SRR1199105 4 0.0937 0.747 0.000 0.012 0.012 0.976
#> SRR1199106 2 0.1042 0.946 0.000 0.972 0.020 0.008
#> SRR1199107 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199108 4 0.4283 0.671 0.256 0.000 0.004 0.740
#> SRR1199109 2 0.1716 0.936 0.000 0.936 0.064 0.000
#> SRR1199110 4 0.3863 0.667 0.000 0.144 0.028 0.828
#> SRR1199111 2 0.1406 0.941 0.000 0.960 0.016 0.024
#> SRR1199112 3 0.5429 0.868 0.000 0.208 0.720 0.072
#> SRR1199113 3 0.6797 0.714 0.000 0.356 0.536 0.108
#> SRR1199114 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.2859 0.861 0.000 0.880 0.008 0.112
#> SRR1199117 4 0.5163 0.221 0.480 0.000 0.004 0.516
#> SRR1199118 1 0.0000 0.977 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.1388 0.939 0.000 0.960 0.012 0.028
#> SRR1199120 3 0.5599 0.890 0.000 0.228 0.700 0.072
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.3333 0.818 0.000 0.208 0.788 0.004 0.000
#> SRR1199009 2 0.1386 0.800 0.000 0.952 0.000 0.016 0.032
#> SRR1199010 2 0.2660 0.765 0.000 0.864 0.000 0.128 0.008
#> SRR1199011 1 0.1197 0.946 0.952 0.000 0.000 0.000 0.048
#> SRR1199012 2 0.1997 0.799 0.000 0.924 0.000 0.040 0.036
#> SRR1199013 5 0.3333 0.670 0.000 0.164 0.008 0.008 0.820
#> SRR1199015 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.3430 0.448 0.000 0.000 0.776 0.004 0.220
#> SRR1199017 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0290 0.983 0.992 0.000 0.000 0.000 0.008
#> SRR1199020 2 0.1914 0.816 0.000 0.924 0.000 0.060 0.016
#> SRR1199021 2 0.2824 0.775 0.000 0.864 0.000 0.116 0.020
#> SRR1199022 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.1478 0.928 0.936 0.000 0.000 0.000 0.064
#> SRR1199026 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.4571 0.634 0.000 0.000 0.188 0.076 0.736
#> SRR1199028 2 0.2761 0.797 0.000 0.872 0.000 0.104 0.024
#> SRR1199029 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.4273 -0.150 0.000 0.552 0.000 0.448 0.000
#> SRR1199032 2 0.1792 0.802 0.000 0.916 0.000 0.084 0.000
#> SRR1199033 2 0.3305 0.664 0.000 0.776 0.000 0.224 0.000
#> SRR1199034 3 0.3333 0.818 0.000 0.208 0.788 0.004 0.000
#> SRR1199035 3 0.3366 0.814 0.000 0.212 0.784 0.004 0.000
#> SRR1199036 2 0.1628 0.810 0.000 0.936 0.000 0.056 0.008
#> SRR1199037 2 0.2149 0.790 0.000 0.916 0.000 0.036 0.048
#> SRR1199038 2 0.3736 0.736 0.000 0.808 0.000 0.140 0.052
#> SRR1199040 2 0.1121 0.815 0.000 0.956 0.000 0.044 0.000
#> SRR1199042 5 0.4418 0.643 0.000 0.004 0.180 0.060 0.756
#> SRR1199043 2 0.1430 0.818 0.000 0.944 0.000 0.052 0.004
#> SRR1199044 3 0.3398 0.808 0.000 0.216 0.780 0.004 0.000
#> SRR1199045 3 0.3333 0.818 0.000 0.208 0.788 0.004 0.000
#> SRR1199046 2 0.4428 0.665 0.000 0.760 0.000 0.144 0.096
#> SRR1199047 2 0.1851 0.801 0.000 0.912 0.000 0.088 0.000
#> SRR1199048 5 0.3211 0.670 0.000 0.164 0.008 0.004 0.824
#> SRR1199049 5 0.4708 0.651 0.220 0.000 0.000 0.068 0.712
#> SRR1199050 5 0.4718 0.326 0.444 0.000 0.000 0.016 0.540
#> SRR1199051 2 0.2068 0.808 0.000 0.904 0.000 0.092 0.004
#> SRR1199052 3 0.3333 0.818 0.000 0.208 0.788 0.004 0.000
#> SRR1199054 2 0.1410 0.807 0.000 0.940 0.000 0.060 0.000
#> SRR1199056 2 0.1648 0.793 0.000 0.940 0.000 0.020 0.040
#> SRR1199057 2 0.3019 0.781 0.000 0.864 0.000 0.088 0.048
#> SRR1199059 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199060 4 0.3796 0.943 0.000 0.300 0.000 0.700 0.000
#> SRR1199061 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199062 5 0.4697 0.562 0.320 0.000 0.000 0.032 0.648
#> SRR1199064 5 0.3814 0.646 0.000 0.000 0.004 0.276 0.720
#> SRR1199065 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.2592 0.783 0.000 0.892 0.000 0.052 0.056
#> SRR1199075 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199077 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.4305 -0.363 0.000 0.512 0.000 0.488 0.000
#> SRR1199079 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199080 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.4401 0.481 0.000 0.296 0.004 0.016 0.684
#> SRR1199082 5 0.2424 0.688 0.000 0.132 0.000 0.000 0.868
#> SRR1199083 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0404 0.980 0.988 0.000 0.000 0.000 0.012
#> SRR1199087 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199088 3 0.3333 0.818 0.000 0.208 0.788 0.004 0.000
#> SRR1199089 3 0.3366 0.459 0.000 0.000 0.784 0.004 0.212
#> SRR1199090 5 0.2424 0.688 0.000 0.132 0.000 0.000 0.868
#> SRR1199091 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 4 0.4182 0.712 0.000 0.400 0.000 0.600 0.000
#> SRR1199094 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199096 5 0.2300 0.686 0.000 0.052 0.040 0.000 0.908
#> SRR1199097 3 0.6529 0.543 0.000 0.316 0.552 0.068 0.064
#> SRR1199098 2 0.2411 0.787 0.000 0.884 0.000 0.108 0.008
#> SRR1199099 1 0.1197 0.946 0.952 0.000 0.000 0.000 0.048
#> SRR1199100 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199101 2 0.3093 0.740 0.000 0.824 0.000 0.168 0.008
#> SRR1199102 1 0.1121 0.950 0.956 0.000 0.000 0.000 0.044
#> SRR1199103 2 0.3074 0.692 0.000 0.804 0.000 0.196 0.000
#> SRR1199104 3 0.3333 0.818 0.000 0.208 0.788 0.004 0.000
#> SRR1199105 5 0.2251 0.695 0.000 0.052 0.008 0.024 0.916
#> SRR1199106 2 0.1211 0.804 0.000 0.960 0.000 0.016 0.024
#> SRR1199107 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199108 5 0.4841 0.651 0.220 0.000 0.012 0.052 0.716
#> SRR1199109 4 0.3684 0.973 0.000 0.280 0.000 0.720 0.000
#> SRR1199110 5 0.4359 0.529 0.000 0.304 0.008 0.008 0.680
#> SRR1199111 2 0.2852 0.730 0.000 0.828 0.000 0.172 0.000
#> SRR1199112 3 0.0510 0.649 0.000 0.016 0.984 0.000 0.000
#> SRR1199113 3 0.3430 0.448 0.000 0.000 0.776 0.004 0.220
#> SRR1199114 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.5930 0.371 0.000 0.596 0.000 0.196 0.208
#> SRR1199117 5 0.5267 0.326 0.428 0.000 0.000 0.048 0.524
#> SRR1199118 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.1571 0.809 0.000 0.936 0.000 0.060 0.004
#> SRR1199120 3 0.3143 0.816 0.000 0.204 0.796 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.2793 0.7473 0.000 0.200 0.800 0.000 0.000 0.000
#> SRR1199009 2 0.0405 0.8754 0.000 0.988 0.000 0.004 0.000 0.008
#> SRR1199010 2 0.1767 0.8779 0.000 0.932 0.000 0.036 0.012 0.020
#> SRR1199011 6 0.3747 0.7989 0.396 0.000 0.000 0.000 0.000 0.604
#> SRR1199012 2 0.1829 0.8594 0.000 0.928 0.000 0.028 0.036 0.008
#> SRR1199013 5 0.3120 0.7939 0.000 0.084 0.008 0.052 0.852 0.004
#> SRR1199015 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.5000 -0.3213 0.000 0.000 0.484 0.032 0.464 0.020
#> SRR1199017 6 0.3756 0.7940 0.400 0.000 0.000 0.000 0.000 0.600
#> SRR1199018 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.3843 -0.4302 0.548 0.000 0.000 0.000 0.000 0.452
#> SRR1199020 2 0.1708 0.8703 0.000 0.932 0.000 0.040 0.024 0.004
#> SRR1199021 2 0.2034 0.8677 0.000 0.912 0.000 0.060 0.004 0.024
#> SRR1199022 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.3860 -0.5050 0.528 0.000 0.000 0.000 0.000 0.472
#> SRR1199025 6 0.3620 0.8268 0.352 0.000 0.000 0.000 0.000 0.648
#> SRR1199026 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.4685 0.7439 0.000 0.000 0.180 0.024 0.716 0.080
#> SRR1199028 2 0.2224 0.8749 0.000 0.904 0.000 0.064 0.020 0.012
#> SRR1199029 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.3558 0.6649 0.000 0.736 0.000 0.248 0.000 0.016
#> SRR1199032 2 0.1285 0.8755 0.000 0.944 0.000 0.052 0.000 0.004
#> SRR1199033 2 0.2320 0.8297 0.000 0.864 0.000 0.132 0.000 0.004
#> SRR1199034 3 0.2762 0.7496 0.000 0.196 0.804 0.000 0.000 0.000
#> SRR1199035 3 0.2902 0.7494 0.000 0.196 0.800 0.004 0.000 0.000
#> SRR1199036 2 0.1036 0.8787 0.000 0.964 0.000 0.024 0.004 0.008
#> SRR1199037 2 0.2434 0.8372 0.000 0.896 0.000 0.032 0.056 0.016
#> SRR1199038 2 0.3374 0.8182 0.000 0.836 0.000 0.092 0.048 0.024
#> SRR1199040 2 0.0653 0.8771 0.000 0.980 0.000 0.012 0.004 0.004
#> SRR1199042 5 0.4426 0.7584 0.000 0.000 0.156 0.032 0.748 0.064
#> SRR1199043 2 0.1194 0.8823 0.000 0.956 0.000 0.032 0.004 0.008
#> SRR1199044 3 0.2871 0.7509 0.000 0.192 0.804 0.004 0.000 0.000
#> SRR1199045 3 0.2915 0.7512 0.000 0.184 0.808 0.008 0.000 0.000
#> SRR1199046 2 0.2854 0.8506 0.000 0.872 0.000 0.068 0.036 0.024
#> SRR1199047 2 0.1049 0.8782 0.000 0.960 0.000 0.032 0.000 0.008
#> SRR1199048 5 0.2838 0.7682 0.000 0.116 0.000 0.028 0.852 0.004
#> SRR1199049 5 0.4988 0.5928 0.188 0.000 0.000 0.008 0.668 0.136
#> SRR1199050 6 0.4719 0.7920 0.272 0.000 0.000 0.000 0.084 0.644
#> SRR1199051 2 0.1732 0.8738 0.000 0.920 0.000 0.072 0.004 0.004
#> SRR1199052 3 0.2730 0.7520 0.000 0.192 0.808 0.000 0.000 0.000
#> SRR1199054 2 0.1196 0.8765 0.000 0.952 0.000 0.040 0.000 0.008
#> SRR1199056 2 0.2071 0.8505 0.000 0.916 0.000 0.028 0.044 0.012
#> SRR1199057 2 0.1838 0.8744 0.000 0.928 0.000 0.040 0.012 0.020
#> SRR1199059 4 0.3050 0.9810 0.000 0.236 0.000 0.764 0.000 0.000
#> SRR1199060 4 0.3390 0.8984 0.000 0.296 0.000 0.704 0.000 0.000
#> SRR1199061 4 0.3420 0.9795 0.000 0.240 0.000 0.748 0.000 0.012
#> SRR1199062 6 0.5096 0.7305 0.252 0.000 0.000 0.000 0.132 0.616
#> SRR1199064 5 0.4423 0.7409 0.000 0.000 0.000 0.060 0.668 0.272
#> SRR1199065 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.2302 0.8361 0.000 0.900 0.000 0.032 0.060 0.008
#> SRR1199075 1 0.0146 0.8160 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199076 4 0.3298 0.9808 0.000 0.236 0.000 0.756 0.000 0.008
#> SRR1199077 1 0.3860 -0.5050 0.528 0.000 0.000 0.000 0.000 0.472
#> SRR1199078 2 0.3348 0.7237 0.000 0.768 0.000 0.216 0.000 0.016
#> SRR1199079 4 0.3163 0.9793 0.000 0.232 0.000 0.764 0.000 0.004
#> SRR1199080 6 0.3828 0.7254 0.440 0.000 0.000 0.000 0.000 0.560
#> SRR1199081 5 0.4310 0.6230 0.000 0.208 0.008 0.052 0.728 0.004
#> SRR1199082 5 0.2719 0.8018 0.000 0.040 0.000 0.072 0.876 0.012
#> SRR1199083 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.3592 -0.0194 0.656 0.000 0.000 0.000 0.000 0.344
#> SRR1199087 4 0.3023 0.9786 0.000 0.232 0.000 0.768 0.000 0.000
#> SRR1199088 3 0.3104 0.7505 0.000 0.184 0.800 0.016 0.000 0.000
#> SRR1199089 3 0.4836 -0.0516 0.000 0.000 0.592 0.032 0.356 0.020
#> SRR1199090 5 0.1882 0.7982 0.000 0.060 0.000 0.008 0.920 0.012
#> SRR1199091 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.4101 0.1397 0.000 0.580 0.000 0.408 0.000 0.012
#> SRR1199094 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 4 0.3329 0.9770 0.000 0.236 0.000 0.756 0.004 0.004
#> SRR1199096 5 0.3699 0.7886 0.000 0.024 0.028 0.104 0.824 0.020
#> SRR1199097 3 0.4311 0.5064 0.000 0.360 0.616 0.012 0.012 0.000
#> SRR1199098 2 0.2225 0.8623 0.000 0.892 0.000 0.092 0.008 0.008
#> SRR1199099 6 0.3563 0.8284 0.336 0.000 0.000 0.000 0.000 0.664
#> SRR1199100 4 0.3509 0.9778 0.000 0.240 0.000 0.744 0.000 0.016
#> SRR1199101 2 0.2100 0.8447 0.000 0.884 0.000 0.112 0.000 0.004
#> SRR1199102 1 0.3862 -0.5145 0.524 0.000 0.000 0.000 0.000 0.476
#> SRR1199103 2 0.2538 0.8333 0.000 0.860 0.000 0.124 0.000 0.016
#> SRR1199104 3 0.2730 0.7510 0.000 0.192 0.808 0.000 0.000 0.000
#> SRR1199105 5 0.2401 0.7948 0.000 0.004 0.016 0.020 0.900 0.060
#> SRR1199106 2 0.0767 0.8780 0.000 0.976 0.000 0.012 0.004 0.008
#> SRR1199107 4 0.3298 0.9808 0.000 0.236 0.000 0.756 0.000 0.008
#> SRR1199108 5 0.4994 0.6112 0.176 0.000 0.000 0.012 0.676 0.136
#> SRR1199109 4 0.3050 0.9810 0.000 0.236 0.000 0.764 0.000 0.000
#> SRR1199110 5 0.3317 0.7374 0.000 0.156 0.000 0.032 0.808 0.004
#> SRR1199111 2 0.2632 0.8011 0.000 0.832 0.000 0.164 0.000 0.004
#> SRR1199112 3 0.1003 0.5583 0.000 0.004 0.964 0.028 0.000 0.004
#> SRR1199113 3 0.5000 -0.3213 0.000 0.000 0.484 0.032 0.464 0.020
#> SRR1199114 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.4822 0.5943 0.000 0.688 0.000 0.088 0.208 0.016
#> SRR1199117 6 0.4215 0.7888 0.244 0.000 0.000 0.000 0.056 0.700
#> SRR1199118 1 0.0000 0.8204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0972 0.8775 0.000 0.964 0.000 0.028 0.000 0.008
#> SRR1199120 3 0.3418 0.7452 0.000 0.184 0.784 0.032 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.982 0.992 0.4671 0.538 0.538
#> 3 3 0.698 0.372 0.743 0.2187 0.860 0.740
#> 4 4 0.625 0.810 0.858 0.1095 0.783 0.559
#> 5 5 0.605 0.621 0.803 0.1033 0.918 0.782
#> 6 6 0.654 0.758 0.845 0.0608 0.941 0.812
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.0000 0.987 0.000 1.000
#> SRR1199009 2 0.0000 0.987 0.000 1.000
#> SRR1199010 2 0.0000 0.987 0.000 1.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000
#> SRR1199012 2 0.0000 0.987 0.000 1.000
#> SRR1199013 2 0.0376 0.984 0.004 0.996
#> SRR1199015 1 0.0000 1.000 1.000 0.000
#> SRR1199016 2 0.3733 0.921 0.072 0.928
#> SRR1199017 1 0.0000 1.000 1.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000
#> SRR1199020 2 0.0000 0.987 0.000 1.000
#> SRR1199021 2 0.0000 0.987 0.000 1.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000
#> SRR1199027 1 0.0000 1.000 1.000 0.000
#> SRR1199028 2 0.0000 0.987 0.000 1.000
#> SRR1199029 1 0.0000 1.000 1.000 0.000
#> SRR1199031 2 0.0000 0.987 0.000 1.000
#> SRR1199032 2 0.0000 0.987 0.000 1.000
#> SRR1199033 2 0.0000 0.987 0.000 1.000
#> SRR1199034 2 0.0000 0.987 0.000 1.000
#> SRR1199035 2 0.0000 0.987 0.000 1.000
#> SRR1199036 2 0.0000 0.987 0.000 1.000
#> SRR1199037 2 0.0000 0.987 0.000 1.000
#> SRR1199038 2 0.0000 0.987 0.000 1.000
#> SRR1199040 2 0.0000 0.987 0.000 1.000
#> SRR1199042 1 0.0000 1.000 1.000 0.000
#> SRR1199043 2 0.0000 0.987 0.000 1.000
#> SRR1199044 2 0.0000 0.987 0.000 1.000
#> SRR1199045 2 0.0000 0.987 0.000 1.000
#> SRR1199046 2 0.0000 0.987 0.000 1.000
#> SRR1199047 2 0.0000 0.987 0.000 1.000
#> SRR1199048 2 0.0000 0.987 0.000 1.000
#> SRR1199049 1 0.0000 1.000 1.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000
#> SRR1199051 2 0.0000 0.987 0.000 1.000
#> SRR1199052 2 0.0000 0.987 0.000 1.000
#> SRR1199054 2 0.0000 0.987 0.000 1.000
#> SRR1199056 2 0.0000 0.987 0.000 1.000
#> SRR1199057 2 0.0000 0.987 0.000 1.000
#> SRR1199059 2 0.0000 0.987 0.000 1.000
#> SRR1199060 2 0.0000 0.987 0.000 1.000
#> SRR1199061 2 0.0000 0.987 0.000 1.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000
#> SRR1199064 1 0.0000 1.000 1.000 0.000
#> SRR1199065 1 0.0000 1.000 1.000 0.000
#> SRR1199067 2 0.0000 0.987 0.000 1.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000
#> SRR1199076 2 0.0000 0.987 0.000 1.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000
#> SRR1199078 2 0.0000 0.987 0.000 1.000
#> SRR1199079 2 0.0000 0.987 0.000 1.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000
#> SRR1199081 2 0.0000 0.987 0.000 1.000
#> SRR1199082 2 0.6801 0.789 0.180 0.820
#> SRR1199083 1 0.0000 1.000 1.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000
#> SRR1199087 2 0.0000 0.987 0.000 1.000
#> SRR1199088 2 0.0000 0.987 0.000 1.000
#> SRR1199089 2 0.1633 0.967 0.024 0.976
#> SRR1199090 2 0.0000 0.987 0.000 1.000
#> SRR1199091 1 0.0000 1.000 1.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000
#> SRR1199093 2 0.0000 0.987 0.000 1.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000
#> SRR1199095 2 0.0000 0.987 0.000 1.000
#> SRR1199096 2 0.3879 0.917 0.076 0.924
#> SRR1199097 2 0.0000 0.987 0.000 1.000
#> SRR1199098 2 0.0000 0.987 0.000 1.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000
#> SRR1199100 2 0.0000 0.987 0.000 1.000
#> SRR1199101 2 0.0000 0.987 0.000 1.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000
#> SRR1199103 2 0.0000 0.987 0.000 1.000
#> SRR1199104 2 0.0000 0.987 0.000 1.000
#> SRR1199105 2 0.9427 0.458 0.360 0.640
#> SRR1199106 2 0.0000 0.987 0.000 1.000
#> SRR1199107 2 0.0000 0.987 0.000 1.000
#> SRR1199108 1 0.0000 1.000 1.000 0.000
#> SRR1199109 2 0.0000 0.987 0.000 1.000
#> SRR1199110 2 0.0000 0.987 0.000 1.000
#> SRR1199111 2 0.0000 0.987 0.000 1.000
#> SRR1199112 2 0.0376 0.984 0.004 0.996
#> SRR1199113 2 0.4022 0.913 0.080 0.920
#> SRR1199114 1 0.0000 1.000 1.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000
#> SRR1199116 2 0.0000 0.987 0.000 1.000
#> SRR1199117 1 0.0000 1.000 1.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000
#> SRR1199119 2 0.0000 0.987 0.000 1.000
#> SRR1199120 2 0.0000 0.987 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.0592 0.34960 0.000 0.988 0.012
#> SRR1199009 2 0.5948 -0.19290 0.000 0.640 0.360
#> SRR1199010 2 0.6267 -0.59709 0.000 0.548 0.452
#> SRR1199011 1 0.0592 0.96364 0.988 0.000 0.012
#> SRR1199012 2 0.5678 -0.06250 0.000 0.684 0.316
#> SRR1199013 2 0.5810 -0.11770 0.000 0.664 0.336
#> SRR1199015 1 0.0424 0.96449 0.992 0.000 0.008
#> SRR1199016 2 0.3134 0.31955 0.032 0.916 0.052
#> SRR1199017 1 0.1878 0.95925 0.952 0.004 0.044
#> SRR1199018 1 0.1878 0.95894 0.952 0.004 0.044
#> SRR1199019 1 0.3293 0.94445 0.900 0.012 0.088
#> SRR1199020 2 0.6079 -0.29743 0.000 0.612 0.388
#> SRR1199021 2 0.6274 -0.61432 0.000 0.544 0.456
#> SRR1199022 1 0.1289 0.96299 0.968 0.000 0.032
#> SRR1199023 1 0.0424 0.96391 0.992 0.000 0.008
#> SRR1199025 1 0.2400 0.95467 0.932 0.004 0.064
#> SRR1199026 1 0.4121 0.92987 0.876 0.040 0.084
#> SRR1199027 1 0.3669 0.93392 0.896 0.064 0.040
#> SRR1199028 2 0.6260 -0.57218 0.000 0.552 0.448
#> SRR1199029 1 0.0424 0.96391 0.992 0.000 0.008
#> SRR1199031 2 0.6307 -0.78206 0.000 0.512 0.488
#> SRR1199032 2 0.6140 -0.36846 0.000 0.596 0.404
#> SRR1199033 2 0.6252 -0.55171 0.000 0.556 0.444
#> SRR1199034 2 0.0237 0.35171 0.000 0.996 0.004
#> SRR1199035 2 0.0237 0.35171 0.000 0.996 0.004
#> SRR1199036 2 0.6154 -0.38909 0.000 0.592 0.408
#> SRR1199037 2 0.5497 0.00962 0.000 0.708 0.292
#> SRR1199038 2 0.5968 -0.20621 0.000 0.636 0.364
#> SRR1199040 2 0.6204 -0.45463 0.000 0.576 0.424
#> SRR1199042 1 0.1620 0.96238 0.964 0.012 0.024
#> SRR1199043 2 0.6008 -0.23692 0.000 0.628 0.372
#> SRR1199044 2 0.0747 0.35196 0.000 0.984 0.016
#> SRR1199045 2 0.0592 0.35256 0.000 0.988 0.012
#> SRR1199046 2 0.4750 0.16681 0.000 0.784 0.216
#> SRR1199047 2 0.6095 -0.31558 0.000 0.608 0.392
#> SRR1199048 3 0.6280 0.90468 0.000 0.460 0.540
#> SRR1199049 1 0.0237 0.96445 0.996 0.000 0.004
#> SRR1199050 1 0.1163 0.96222 0.972 0.000 0.028
#> SRR1199051 2 0.5859 -0.13806 0.000 0.656 0.344
#> SRR1199052 2 0.0592 0.35256 0.000 0.988 0.012
#> SRR1199054 2 0.6225 -0.49468 0.000 0.568 0.432
#> SRR1199056 2 0.5785 -0.10018 0.000 0.668 0.332
#> SRR1199057 2 0.6252 -0.55241 0.000 0.556 0.444
#> SRR1199059 3 0.6299 0.90860 0.000 0.476 0.524
#> SRR1199060 2 0.6309 -0.84282 0.000 0.500 0.500
#> SRR1199061 3 0.6291 0.91672 0.000 0.468 0.532
#> SRR1199062 1 0.2066 0.95274 0.940 0.000 0.060
#> SRR1199064 1 0.7072 0.64067 0.504 0.020 0.476
#> SRR1199065 1 0.4505 0.92220 0.860 0.048 0.092
#> SRR1199067 2 0.6062 -0.28548 0.000 0.616 0.384
#> SRR1199075 1 0.0892 0.96401 0.980 0.000 0.020
#> SRR1199076 3 0.6286 0.91356 0.000 0.464 0.536
#> SRR1199077 1 0.0892 0.96367 0.980 0.000 0.020
#> SRR1199078 2 0.6305 -0.76534 0.000 0.516 0.484
#> SRR1199079 3 0.6286 0.91347 0.000 0.464 0.536
#> SRR1199080 1 0.4558 0.92048 0.856 0.044 0.100
#> SRR1199081 2 0.3941 0.24632 0.000 0.844 0.156
#> SRR1199082 3 0.8316 0.59997 0.080 0.424 0.496
#> SRR1199083 1 0.0892 0.96367 0.980 0.000 0.020
#> SRR1199084 1 0.1031 0.96319 0.976 0.000 0.024
#> SRR1199085 1 0.0892 0.96367 0.980 0.000 0.020
#> SRR1199086 1 0.0892 0.96354 0.980 0.000 0.020
#> SRR1199087 3 0.6299 0.90846 0.000 0.476 0.524
#> SRR1199088 2 0.1643 0.34376 0.000 0.956 0.044
#> SRR1199089 2 0.2173 0.33877 0.008 0.944 0.048
#> SRR1199090 2 0.6280 -0.65746 0.000 0.540 0.460
#> SRR1199091 1 0.2448 0.95519 0.924 0.000 0.076
#> SRR1199092 1 0.1163 0.96254 0.972 0.000 0.028
#> SRR1199093 3 0.6309 0.82659 0.000 0.500 0.500
#> SRR1199094 1 0.0892 0.96531 0.980 0.000 0.020
#> SRR1199095 3 0.6280 0.90468 0.000 0.460 0.540
#> SRR1199096 2 0.1170 0.35107 0.008 0.976 0.016
#> SRR1199097 2 0.0892 0.34652 0.000 0.980 0.020
#> SRR1199098 2 0.6260 -0.57361 0.000 0.552 0.448
#> SRR1199099 1 0.0237 0.96437 0.996 0.000 0.004
#> SRR1199100 3 0.6291 0.91762 0.000 0.468 0.532
#> SRR1199101 2 0.6225 -0.49573 0.000 0.568 0.432
#> SRR1199102 1 0.1031 0.96375 0.976 0.000 0.024
#> SRR1199103 2 0.6295 -0.69901 0.000 0.528 0.472
#> SRR1199104 2 0.1411 0.34670 0.000 0.964 0.036
#> SRR1199105 2 0.9686 -0.01429 0.276 0.460 0.264
#> SRR1199106 2 0.6140 -0.36619 0.000 0.596 0.404
#> SRR1199107 3 0.6291 0.91762 0.000 0.468 0.532
#> SRR1199108 1 0.1163 0.96227 0.972 0.000 0.028
#> SRR1199109 3 0.6308 0.86277 0.000 0.492 0.508
#> SRR1199110 2 0.6274 -0.62004 0.000 0.544 0.456
#> SRR1199111 2 0.6291 -0.67690 0.000 0.532 0.468
#> SRR1199112 2 0.2400 0.33143 0.004 0.932 0.064
#> SRR1199113 2 0.3310 0.31422 0.028 0.908 0.064
#> SRR1199114 1 0.1163 0.96310 0.972 0.000 0.028
#> SRR1199115 1 0.3181 0.94647 0.912 0.024 0.064
#> SRR1199116 3 0.6308 0.86257 0.000 0.492 0.508
#> SRR1199117 1 0.1860 0.96106 0.948 0.000 0.052
#> SRR1199118 1 0.0892 0.96511 0.980 0.000 0.020
#> SRR1199119 2 0.6180 -0.42853 0.000 0.584 0.416
#> SRR1199120 2 0.2096 0.33851 0.004 0.944 0.052
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.4040 0.926 0.000 0.248 0.752 0.000
#> SRR1199009 2 0.2704 0.840 0.000 0.876 0.124 0.000
#> SRR1199010 2 0.1474 0.875 0.000 0.948 0.052 0.000
#> SRR1199011 1 0.1411 0.860 0.960 0.000 0.020 0.020
#> SRR1199012 2 0.3907 0.688 0.000 0.768 0.232 0.000
#> SRR1199013 2 0.5070 0.676 0.000 0.748 0.192 0.060
#> SRR1199015 1 0.1406 0.862 0.960 0.000 0.024 0.016
#> SRR1199016 3 0.3907 0.887 0.004 0.180 0.808 0.008
#> SRR1199017 1 0.3370 0.856 0.872 0.000 0.080 0.048
#> SRR1199018 1 0.3335 0.852 0.860 0.000 0.120 0.020
#> SRR1199019 1 0.4669 0.813 0.780 0.000 0.168 0.052
#> SRR1199020 2 0.2469 0.852 0.000 0.892 0.108 0.000
#> SRR1199021 2 0.1151 0.877 0.000 0.968 0.024 0.008
#> SRR1199022 1 0.2921 0.841 0.860 0.000 0.140 0.000
#> SRR1199023 1 0.0779 0.861 0.980 0.000 0.016 0.004
#> SRR1199025 1 0.3625 0.834 0.828 0.000 0.160 0.012
#> SRR1199026 1 0.4744 0.785 0.736 0.000 0.240 0.024
#> SRR1199027 1 0.5571 0.527 0.580 0.000 0.396 0.024
#> SRR1199028 2 0.1109 0.878 0.000 0.968 0.028 0.004
#> SRR1199029 1 0.0804 0.858 0.980 0.000 0.008 0.012
#> SRR1199031 2 0.0000 0.872 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.2216 0.861 0.000 0.908 0.092 0.000
#> SRR1199033 2 0.1118 0.877 0.000 0.964 0.036 0.000
#> SRR1199034 3 0.4040 0.926 0.000 0.248 0.752 0.000
#> SRR1199035 3 0.4040 0.926 0.000 0.248 0.752 0.000
#> SRR1199036 2 0.2216 0.862 0.000 0.908 0.092 0.000
#> SRR1199037 2 0.4606 0.605 0.000 0.724 0.264 0.012
#> SRR1199038 2 0.3074 0.812 0.000 0.848 0.152 0.000
#> SRR1199040 2 0.2081 0.865 0.000 0.916 0.084 0.000
#> SRR1199042 1 0.6310 0.741 0.672 0.004 0.188 0.136
#> SRR1199043 2 0.3400 0.777 0.000 0.820 0.180 0.000
#> SRR1199044 3 0.3975 0.930 0.000 0.240 0.760 0.000
#> SRR1199045 3 0.3975 0.930 0.000 0.240 0.760 0.000
#> SRR1199046 2 0.4989 -0.210 0.000 0.528 0.472 0.000
#> SRR1199047 2 0.2530 0.849 0.000 0.888 0.112 0.000
#> SRR1199048 2 0.1706 0.868 0.000 0.948 0.016 0.036
#> SRR1199049 1 0.4655 0.808 0.796 0.000 0.088 0.116
#> SRR1199050 1 0.3128 0.829 0.884 0.000 0.040 0.076
#> SRR1199051 2 0.3219 0.799 0.000 0.836 0.164 0.000
#> SRR1199052 3 0.3942 0.931 0.000 0.236 0.764 0.000
#> SRR1199054 2 0.1792 0.871 0.000 0.932 0.068 0.000
#> SRR1199056 2 0.3052 0.829 0.000 0.860 0.136 0.004
#> SRR1199057 2 0.1398 0.877 0.000 0.956 0.040 0.004
#> SRR1199059 2 0.0336 0.870 0.000 0.992 0.008 0.000
#> SRR1199060 2 0.0336 0.870 0.000 0.992 0.008 0.000
#> SRR1199061 2 0.1004 0.858 0.004 0.972 0.024 0.000
#> SRR1199062 1 0.3505 0.822 0.864 0.000 0.048 0.088
#> SRR1199064 4 0.2973 0.000 0.144 0.000 0.000 0.856
#> SRR1199065 1 0.5169 0.716 0.696 0.000 0.272 0.032
#> SRR1199067 2 0.2589 0.847 0.000 0.884 0.116 0.000
#> SRR1199075 1 0.1174 0.858 0.968 0.000 0.020 0.012
#> SRR1199076 2 0.1109 0.855 0.004 0.968 0.028 0.000
#> SRR1199077 1 0.0657 0.857 0.984 0.000 0.012 0.004
#> SRR1199078 2 0.0000 0.872 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.1004 0.858 0.004 0.972 0.024 0.000
#> SRR1199080 1 0.4898 0.739 0.716 0.000 0.260 0.024
#> SRR1199081 3 0.6102 0.539 0.000 0.420 0.532 0.048
#> SRR1199082 2 0.6699 0.491 0.160 0.680 0.032 0.128
#> SRR1199083 1 0.0927 0.856 0.976 0.000 0.008 0.016
#> SRR1199084 1 0.0376 0.858 0.992 0.000 0.004 0.004
#> SRR1199085 1 0.0817 0.858 0.976 0.000 0.024 0.000
#> SRR1199086 1 0.1837 0.852 0.944 0.000 0.028 0.028
#> SRR1199087 2 0.0469 0.868 0.000 0.988 0.012 0.000
#> SRR1199088 3 0.3726 0.926 0.000 0.212 0.788 0.000
#> SRR1199089 3 0.3751 0.913 0.000 0.196 0.800 0.004
#> SRR1199090 2 0.3679 0.825 0.000 0.856 0.084 0.060
#> SRR1199091 1 0.3760 0.833 0.836 0.000 0.136 0.028
#> SRR1199092 1 0.0927 0.856 0.976 0.000 0.008 0.016
#> SRR1199093 2 0.0336 0.870 0.000 0.992 0.008 0.000
#> SRR1199094 1 0.3217 0.845 0.860 0.000 0.128 0.012
#> SRR1199095 2 0.1296 0.852 0.004 0.964 0.028 0.004
#> SRR1199096 3 0.5247 0.905 0.000 0.228 0.720 0.052
#> SRR1199097 3 0.4164 0.907 0.000 0.264 0.736 0.000
#> SRR1199098 2 0.1118 0.877 0.000 0.964 0.036 0.000
#> SRR1199099 1 0.3474 0.843 0.868 0.000 0.064 0.068
#> SRR1199100 2 0.0779 0.864 0.004 0.980 0.016 0.000
#> SRR1199101 2 0.1557 0.875 0.000 0.944 0.056 0.000
#> SRR1199102 1 0.2670 0.844 0.908 0.000 0.040 0.052
#> SRR1199103 2 0.0188 0.874 0.000 0.996 0.004 0.000
#> SRR1199104 3 0.3764 0.928 0.000 0.216 0.784 0.000
#> SRR1199105 2 0.9429 -0.162 0.288 0.384 0.208 0.120
#> SRR1199106 2 0.2216 0.861 0.000 0.908 0.092 0.000
#> SRR1199107 2 0.1004 0.858 0.004 0.972 0.024 0.000
#> SRR1199108 1 0.4410 0.782 0.808 0.000 0.064 0.128
#> SRR1199109 2 0.0336 0.870 0.000 0.992 0.008 0.000
#> SRR1199110 2 0.2500 0.866 0.000 0.916 0.040 0.044
#> SRR1199111 2 0.0336 0.875 0.000 0.992 0.008 0.000
#> SRR1199112 3 0.3808 0.898 0.004 0.184 0.808 0.004
#> SRR1199113 3 0.3950 0.894 0.004 0.184 0.804 0.008
#> SRR1199114 1 0.4057 0.844 0.812 0.000 0.160 0.028
#> SRR1199115 1 0.4472 0.804 0.760 0.000 0.220 0.020
#> SRR1199116 2 0.0672 0.870 0.000 0.984 0.008 0.008
#> SRR1199117 1 0.5326 0.802 0.748 0.000 0.116 0.136
#> SRR1199118 1 0.4419 0.838 0.812 0.000 0.104 0.084
#> SRR1199119 2 0.2281 0.861 0.000 0.904 0.096 0.000
#> SRR1199120 3 0.3831 0.920 0.000 0.204 0.792 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.2124 0.82965 0.000 0.096 0.900 0.004 0.000
#> SRR1199009 2 0.2890 0.81390 0.000 0.836 0.160 0.004 0.000
#> SRR1199010 2 0.1768 0.86132 0.000 0.924 0.072 0.000 0.004
#> SRR1199011 1 0.2193 0.63286 0.900 0.000 0.008 0.092 0.000
#> SRR1199012 2 0.3521 0.73515 0.000 0.764 0.232 0.004 0.000
#> SRR1199013 5 0.6725 0.31976 0.000 0.384 0.208 0.004 0.404
#> SRR1199015 1 0.0865 0.68213 0.972 0.000 0.000 0.024 0.004
#> SRR1199016 3 0.2917 0.81083 0.004 0.076 0.884 0.012 0.024
#> SRR1199017 1 0.2193 0.67072 0.900 0.000 0.008 0.092 0.000
#> SRR1199018 1 0.3059 0.65523 0.860 0.000 0.028 0.108 0.004
#> SRR1199019 1 0.6348 0.34358 0.628 0.000 0.044 0.176 0.152
#> SRR1199020 2 0.3154 0.81808 0.000 0.836 0.148 0.004 0.012
#> SRR1199021 2 0.1310 0.86022 0.000 0.956 0.020 0.000 0.024
#> SRR1199022 1 0.3350 0.64131 0.844 0.000 0.040 0.112 0.004
#> SRR1199023 1 0.1774 0.66523 0.932 0.000 0.016 0.052 0.000
#> SRR1199025 1 0.4339 0.58635 0.756 0.000 0.040 0.196 0.008
#> SRR1199026 1 0.5988 0.39639 0.640 0.000 0.092 0.232 0.036
#> SRR1199027 3 0.6493 -0.01693 0.280 0.000 0.572 0.108 0.040
#> SRR1199028 2 0.1661 0.85774 0.000 0.940 0.024 0.000 0.036
#> SRR1199029 1 0.0324 0.68033 0.992 0.000 0.004 0.004 0.000
#> SRR1199031 2 0.0451 0.86010 0.000 0.988 0.008 0.000 0.004
#> SRR1199032 2 0.2338 0.84636 0.000 0.884 0.112 0.004 0.000
#> SRR1199033 2 0.1357 0.86404 0.000 0.948 0.048 0.000 0.004
#> SRR1199034 3 0.2068 0.83263 0.000 0.092 0.904 0.004 0.000
#> SRR1199035 3 0.2338 0.81034 0.000 0.112 0.884 0.004 0.000
#> SRR1199036 2 0.2338 0.84642 0.000 0.884 0.112 0.004 0.000
#> SRR1199037 2 0.4890 0.49328 0.000 0.628 0.340 0.008 0.024
#> SRR1199038 2 0.3905 0.72565 0.000 0.752 0.232 0.004 0.012
#> SRR1199040 2 0.2020 0.85375 0.000 0.900 0.100 0.000 0.000
#> SRR1199042 5 0.7499 0.11150 0.032 0.020 0.152 0.376 0.420
#> SRR1199043 2 0.3461 0.74875 0.000 0.772 0.224 0.004 0.000
#> SRR1199044 3 0.1908 0.83403 0.000 0.092 0.908 0.000 0.000
#> SRR1199045 3 0.1908 0.83403 0.000 0.092 0.908 0.000 0.000
#> SRR1199046 3 0.4855 0.13517 0.000 0.436 0.544 0.004 0.016
#> SRR1199047 2 0.2848 0.81711 0.000 0.840 0.156 0.004 0.000
#> SRR1199048 2 0.4618 0.32526 0.000 0.636 0.016 0.004 0.344
#> SRR1199049 4 0.6132 0.81371 0.384 0.000 0.008 0.504 0.104
#> SRR1199050 1 0.4560 -0.55216 0.508 0.000 0.008 0.484 0.000
#> SRR1199051 2 0.3398 0.75538 0.000 0.780 0.216 0.004 0.000
#> SRR1199052 3 0.2068 0.83263 0.000 0.092 0.904 0.004 0.000
#> SRR1199054 2 0.2011 0.85501 0.000 0.908 0.088 0.004 0.000
#> SRR1199056 2 0.4158 0.78069 0.000 0.792 0.120 0.004 0.084
#> SRR1199057 2 0.1965 0.84934 0.000 0.924 0.024 0.000 0.052
#> SRR1199059 2 0.0566 0.85142 0.000 0.984 0.012 0.000 0.004
#> SRR1199060 2 0.0290 0.85771 0.000 0.992 0.008 0.000 0.000
#> SRR1199061 2 0.0798 0.84811 0.000 0.976 0.016 0.000 0.008
#> SRR1199062 1 0.4892 -0.57586 0.496 0.000 0.016 0.484 0.004
#> SRR1199064 5 0.5320 0.00458 0.060 0.000 0.000 0.368 0.572
#> SRR1199065 1 0.5512 0.49263 0.692 0.000 0.120 0.168 0.020
#> SRR1199067 2 0.2818 0.83253 0.000 0.856 0.132 0.000 0.012
#> SRR1199075 1 0.1357 0.68169 0.948 0.000 0.000 0.048 0.004
#> SRR1199076 2 0.0671 0.84917 0.000 0.980 0.016 0.000 0.004
#> SRR1199077 1 0.0865 0.67453 0.972 0.000 0.004 0.024 0.000
#> SRR1199078 2 0.0290 0.85981 0.000 0.992 0.008 0.000 0.000
#> SRR1199079 2 0.0671 0.84917 0.000 0.980 0.016 0.000 0.004
#> SRR1199080 1 0.4761 0.54119 0.728 0.000 0.104 0.168 0.000
#> SRR1199081 5 0.6678 0.18433 0.000 0.236 0.360 0.000 0.404
#> SRR1199082 5 0.7459 0.46684 0.000 0.292 0.040 0.252 0.416
#> SRR1199083 1 0.0451 0.68037 0.988 0.000 0.000 0.008 0.004
#> SRR1199084 1 0.0162 0.67935 0.996 0.000 0.000 0.004 0.000
#> SRR1199085 1 0.1124 0.67399 0.960 0.000 0.004 0.036 0.000
#> SRR1199086 1 0.1892 0.64761 0.916 0.000 0.004 0.080 0.000
#> SRR1199087 2 0.0671 0.84917 0.000 0.980 0.016 0.000 0.004
#> SRR1199088 3 0.2011 0.83271 0.000 0.088 0.908 0.000 0.004
#> SRR1199089 3 0.2727 0.81780 0.000 0.080 0.888 0.012 0.020
#> SRR1199090 2 0.6619 -0.30531 0.000 0.444 0.108 0.028 0.420
#> SRR1199091 1 0.2550 0.65861 0.892 0.000 0.020 0.084 0.004
#> SRR1199092 1 0.0451 0.67947 0.988 0.000 0.000 0.008 0.004
#> SRR1199093 2 0.0451 0.85336 0.000 0.988 0.008 0.000 0.004
#> SRR1199094 1 0.3291 0.64276 0.840 0.000 0.040 0.120 0.000
#> SRR1199095 2 0.0771 0.84611 0.000 0.976 0.020 0.000 0.004
#> SRR1199096 3 0.6669 -0.02441 0.000 0.116 0.464 0.028 0.392
#> SRR1199097 3 0.2488 0.79254 0.000 0.124 0.872 0.004 0.000
#> SRR1199098 2 0.1121 0.86373 0.000 0.956 0.044 0.000 0.000
#> SRR1199099 1 0.4415 -0.42822 0.552 0.000 0.004 0.444 0.000
#> SRR1199100 2 0.0671 0.84917 0.000 0.980 0.016 0.000 0.004
#> SRR1199101 2 0.1768 0.85927 0.000 0.924 0.072 0.004 0.000
#> SRR1199102 1 0.4225 -0.04719 0.632 0.000 0.000 0.364 0.004
#> SRR1199103 2 0.0451 0.86010 0.000 0.988 0.008 0.000 0.004
#> SRR1199104 3 0.2068 0.83405 0.000 0.092 0.904 0.000 0.004
#> SRR1199105 5 0.8353 0.42218 0.012 0.124 0.216 0.228 0.420
#> SRR1199106 2 0.2660 0.83730 0.000 0.864 0.128 0.008 0.000
#> SRR1199107 2 0.0671 0.84917 0.000 0.980 0.016 0.000 0.004
#> SRR1199108 4 0.6838 0.75921 0.348 0.008 0.020 0.492 0.132
#> SRR1199109 2 0.0451 0.85336 0.000 0.988 0.008 0.000 0.004
#> SRR1199110 2 0.5200 0.52287 0.000 0.692 0.052 0.024 0.232
#> SRR1199111 2 0.0955 0.86310 0.000 0.968 0.028 0.004 0.000
#> SRR1199112 3 0.2526 0.82085 0.000 0.080 0.896 0.012 0.012
#> SRR1199113 3 0.3174 0.79753 0.000 0.080 0.868 0.016 0.036
#> SRR1199114 1 0.4779 0.13185 0.628 0.000 0.032 0.340 0.000
#> SRR1199115 1 0.4980 0.37099 0.676 0.000 0.072 0.252 0.000
#> SRR1199116 2 0.1704 0.82473 0.000 0.928 0.004 0.000 0.068
#> SRR1199117 4 0.5800 0.75125 0.372 0.000 0.008 0.544 0.076
#> SRR1199118 1 0.4560 -0.50288 0.508 0.000 0.008 0.484 0.000
#> SRR1199119 2 0.2179 0.85068 0.000 0.896 0.100 0.004 0.000
#> SRR1199120 3 0.2689 0.82220 0.000 0.084 0.888 0.012 0.016
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.1082 0.850 0.000 0.040 0.956 0.000 0.004 0.000
#> SRR1199009 2 0.2909 0.837 0.000 0.828 0.156 0.004 0.012 0.000
#> SRR1199010 2 0.2458 0.878 0.000 0.892 0.068 0.016 0.024 0.000
#> SRR1199011 1 0.1779 0.783 0.920 0.000 0.000 0.064 0.016 0.000
#> SRR1199012 2 0.3226 0.823 0.000 0.808 0.168 0.012 0.012 0.000
#> SRR1199013 5 0.4803 0.738 0.000 0.144 0.168 0.004 0.684 0.000
#> SRR1199015 1 0.0458 0.811 0.984 0.000 0.000 0.016 0.000 0.000
#> SRR1199016 3 0.1820 0.845 0.000 0.012 0.924 0.008 0.056 0.000
#> SRR1199017 1 0.2928 0.792 0.856 0.000 0.000 0.084 0.056 0.004
#> SRR1199018 1 0.3690 0.771 0.804 0.000 0.012 0.116 0.068 0.000
#> SRR1199019 1 0.4845 0.658 0.628 0.000 0.000 0.092 0.280 0.000
#> SRR1199020 2 0.2695 0.846 0.000 0.844 0.144 0.008 0.004 0.000
#> SRR1199021 2 0.2728 0.839 0.000 0.860 0.040 0.000 0.100 0.000
#> SRR1199022 1 0.3885 0.747 0.756 0.000 0.004 0.048 0.192 0.000
#> SRR1199023 1 0.1820 0.792 0.924 0.000 0.008 0.056 0.012 0.000
#> SRR1199025 1 0.4731 0.697 0.672 0.000 0.004 0.092 0.232 0.000
#> SRR1199026 1 0.6036 0.530 0.576 0.000 0.044 0.220 0.160 0.000
#> SRR1199027 3 0.6454 0.290 0.116 0.000 0.580 0.160 0.140 0.004
#> SRR1199028 2 0.2586 0.839 0.000 0.868 0.032 0.000 0.100 0.000
#> SRR1199029 1 0.0508 0.813 0.984 0.000 0.000 0.012 0.004 0.000
#> SRR1199031 2 0.1074 0.875 0.000 0.960 0.012 0.000 0.028 0.000
#> SRR1199032 2 0.2163 0.875 0.000 0.892 0.092 0.000 0.016 0.000
#> SRR1199033 2 0.1745 0.879 0.000 0.924 0.056 0.000 0.020 0.000
#> SRR1199034 3 0.0547 0.865 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR1199035 3 0.1219 0.841 0.000 0.048 0.948 0.000 0.004 0.000
#> SRR1199036 2 0.2212 0.868 0.000 0.880 0.112 0.000 0.008 0.000
#> SRR1199037 2 0.4502 0.479 0.000 0.600 0.368 0.016 0.016 0.000
#> SRR1199038 2 0.3480 0.783 0.000 0.776 0.200 0.008 0.016 0.000
#> SRR1199040 2 0.2101 0.868 0.000 0.892 0.100 0.004 0.004 0.000
#> SRR1199042 5 0.5191 0.452 0.000 0.000 0.172 0.212 0.616 0.000
#> SRR1199043 2 0.3398 0.770 0.000 0.768 0.216 0.012 0.004 0.000
#> SRR1199044 3 0.1003 0.869 0.000 0.016 0.964 0.000 0.020 0.000
#> SRR1199045 3 0.0603 0.866 0.000 0.016 0.980 0.000 0.004 0.000
#> SRR1199046 3 0.4178 0.187 0.000 0.372 0.608 0.000 0.020 0.000
#> SRR1199047 2 0.2669 0.837 0.000 0.836 0.156 0.008 0.000 0.000
#> SRR1199048 5 0.4870 0.491 0.000 0.352 0.060 0.004 0.584 0.000
#> SRR1199049 4 0.2994 0.718 0.080 0.000 0.004 0.852 0.064 0.000
#> SRR1199050 4 0.2915 0.778 0.184 0.000 0.000 0.808 0.008 0.000
#> SRR1199051 2 0.3273 0.778 0.000 0.776 0.212 0.008 0.004 0.000
#> SRR1199052 3 0.0858 0.860 0.000 0.028 0.968 0.000 0.004 0.000
#> SRR1199054 2 0.1897 0.873 0.000 0.908 0.084 0.004 0.004 0.000
#> SRR1199056 2 0.4551 0.640 0.000 0.696 0.072 0.008 0.224 0.000
#> SRR1199057 2 0.3293 0.795 0.000 0.812 0.048 0.000 0.140 0.000
#> SRR1199059 2 0.0260 0.874 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1199060 2 0.0603 0.875 0.000 0.980 0.004 0.000 0.016 0.000
#> SRR1199061 2 0.0777 0.870 0.000 0.972 0.000 0.004 0.024 0.000
#> SRR1199062 4 0.3568 0.771 0.212 0.000 0.000 0.764 0.016 0.008
#> SRR1199064 6 0.0146 0.000 0.004 0.000 0.000 0.000 0.000 0.996
#> SRR1199065 1 0.5671 0.639 0.608 0.000 0.044 0.100 0.248 0.000
#> SRR1199067 2 0.2877 0.854 0.000 0.848 0.124 0.020 0.008 0.000
#> SRR1199075 1 0.1151 0.814 0.956 0.000 0.000 0.012 0.032 0.000
#> SRR1199076 2 0.0622 0.871 0.000 0.980 0.000 0.008 0.012 0.000
#> SRR1199077 1 0.0951 0.813 0.968 0.000 0.004 0.020 0.008 0.000
#> SRR1199078 2 0.1078 0.878 0.000 0.964 0.012 0.008 0.016 0.000
#> SRR1199079 2 0.0692 0.872 0.000 0.976 0.000 0.004 0.020 0.000
#> SRR1199080 1 0.5464 0.663 0.632 0.000 0.040 0.092 0.236 0.000
#> SRR1199081 5 0.4815 0.711 0.000 0.084 0.244 0.008 0.664 0.000
#> SRR1199082 5 0.5494 0.676 0.000 0.172 0.088 0.076 0.664 0.000
#> SRR1199083 1 0.0405 0.812 0.988 0.000 0.000 0.008 0.004 0.000
#> SRR1199084 1 0.0363 0.811 0.988 0.000 0.000 0.012 0.000 0.000
#> SRR1199085 1 0.0748 0.811 0.976 0.004 0.004 0.016 0.000 0.000
#> SRR1199086 1 0.1082 0.800 0.956 0.000 0.000 0.040 0.004 0.000
#> SRR1199087 2 0.0508 0.873 0.000 0.984 0.000 0.004 0.012 0.000
#> SRR1199088 3 0.1003 0.869 0.000 0.016 0.964 0.000 0.020 0.000
#> SRR1199089 3 0.1124 0.860 0.000 0.008 0.956 0.000 0.036 0.000
#> SRR1199090 5 0.4535 0.732 0.000 0.152 0.144 0.000 0.704 0.000
#> SRR1199091 1 0.2908 0.791 0.848 0.000 0.000 0.048 0.104 0.000
#> SRR1199092 1 0.0603 0.811 0.980 0.000 0.000 0.016 0.004 0.000
#> SRR1199093 2 0.0806 0.871 0.000 0.972 0.000 0.008 0.020 0.000
#> SRR1199094 1 0.3823 0.750 0.760 0.000 0.004 0.044 0.192 0.000
#> SRR1199095 2 0.0964 0.868 0.000 0.968 0.004 0.012 0.016 0.000
#> SRR1199096 5 0.5543 0.632 0.000 0.072 0.300 0.032 0.592 0.004
#> SRR1199097 3 0.2213 0.758 0.000 0.100 0.888 0.004 0.008 0.000
#> SRR1199098 2 0.1923 0.879 0.000 0.916 0.064 0.004 0.016 0.000
#> SRR1199099 4 0.2823 0.779 0.204 0.000 0.000 0.796 0.000 0.000
#> SRR1199100 2 0.0891 0.871 0.000 0.968 0.000 0.008 0.024 0.000
#> SRR1199101 2 0.1555 0.877 0.000 0.932 0.060 0.004 0.004 0.000
#> SRR1199102 4 0.3841 0.565 0.380 0.000 0.000 0.616 0.004 0.000
#> SRR1199103 2 0.1464 0.874 0.000 0.944 0.016 0.004 0.036 0.000
#> SRR1199104 3 0.1168 0.869 0.000 0.016 0.956 0.000 0.028 0.000
#> SRR1199105 5 0.4493 0.664 0.000 0.036 0.192 0.044 0.728 0.000
#> SRR1199106 2 0.2355 0.864 0.000 0.876 0.112 0.004 0.008 0.000
#> SRR1199107 2 0.0692 0.871 0.000 0.976 0.000 0.004 0.020 0.000
#> SRR1199108 4 0.3860 0.680 0.104 0.004 0.008 0.796 0.088 0.000
#> SRR1199109 2 0.0547 0.872 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR1199110 2 0.5751 0.422 0.000 0.604 0.076 0.068 0.252 0.000
#> SRR1199111 2 0.0909 0.879 0.000 0.968 0.020 0.000 0.012 0.000
#> SRR1199112 3 0.1074 0.865 0.000 0.012 0.960 0.000 0.028 0.000
#> SRR1199113 3 0.2013 0.821 0.000 0.008 0.908 0.008 0.076 0.000
#> SRR1199114 4 0.4816 0.118 0.436 0.000 0.004 0.516 0.044 0.000
#> SRR1199115 1 0.5618 0.409 0.564 0.000 0.028 0.316 0.092 0.000
#> SRR1199116 2 0.3212 0.729 0.000 0.800 0.004 0.016 0.180 0.000
#> SRR1199117 4 0.3260 0.727 0.092 0.000 0.004 0.832 0.072 0.000
#> SRR1199118 4 0.2790 0.764 0.132 0.000 0.000 0.844 0.024 0.000
#> SRR1199119 2 0.2333 0.864 0.000 0.872 0.120 0.004 0.004 0.000
#> SRR1199120 3 0.1297 0.859 0.000 0.012 0.948 0.000 0.040 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "hclust"]
# you can also extract it by
# res = res_list["CV:hclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'CV' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.449 0.870 0.897 0.4634 0.521 0.521
#> 3 3 0.471 0.748 0.858 0.1786 0.952 0.907
#> 4 4 0.495 0.735 0.837 0.0612 0.968 0.934
#> 5 5 0.520 0.723 0.820 0.1343 0.861 0.697
#> 6 6 0.624 0.683 0.804 0.0674 0.999 0.996
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.6623 0.867 0.172 0.828
#> SRR1199009 2 0.3733 0.894 0.072 0.928
#> SRR1199010 2 0.9983 0.315 0.476 0.524
#> SRR1199011 1 0.1414 0.966 0.980 0.020
#> SRR1199012 2 0.8016 0.811 0.244 0.756
#> SRR1199013 2 0.7376 0.833 0.208 0.792
#> SRR1199015 1 0.1414 0.966 0.980 0.020
#> SRR1199016 2 0.9896 0.432 0.440 0.560
#> SRR1199017 1 0.1414 0.966 0.980 0.020
#> SRR1199018 1 0.1414 0.966 0.980 0.020
#> SRR1199019 1 0.1414 0.966 0.980 0.020
#> SRR1199020 2 0.4022 0.894 0.080 0.920
#> SRR1199021 2 0.2043 0.882 0.032 0.968
#> SRR1199022 1 0.1414 0.966 0.980 0.020
#> SRR1199023 1 0.1414 0.966 0.980 0.020
#> SRR1199025 1 0.1414 0.966 0.980 0.020
#> SRR1199026 1 0.1414 0.966 0.980 0.020
#> SRR1199027 1 0.7056 0.722 0.808 0.192
#> SRR1199028 2 0.4939 0.892 0.108 0.892
#> SRR1199029 1 0.1414 0.966 0.980 0.020
#> SRR1199031 2 0.1184 0.877 0.016 0.984
#> SRR1199032 2 0.4298 0.895 0.088 0.912
#> SRR1199033 2 0.4022 0.892 0.080 0.920
#> SRR1199034 2 0.6531 0.869 0.168 0.832
#> SRR1199035 2 0.6438 0.871 0.164 0.836
#> SRR1199036 2 0.3584 0.892 0.068 0.932
#> SRR1199037 2 0.8267 0.793 0.260 0.740
#> SRR1199038 2 0.4690 0.893 0.100 0.900
#> SRR1199040 2 0.3274 0.893 0.060 0.940
#> SRR1199042 1 0.4298 0.892 0.912 0.088
#> SRR1199043 2 0.4298 0.894 0.088 0.912
#> SRR1199044 2 0.6973 0.858 0.188 0.812
#> SRR1199045 2 0.6973 0.858 0.188 0.812
#> SRR1199046 2 0.6712 0.869 0.176 0.824
#> SRR1199047 2 0.5519 0.885 0.128 0.872
#> SRR1199048 2 0.1184 0.856 0.016 0.984
#> SRR1199049 1 0.1414 0.966 0.980 0.020
#> SRR1199050 1 0.1414 0.966 0.980 0.020
#> SRR1199051 2 0.4298 0.892 0.088 0.912
#> SRR1199052 2 0.6438 0.871 0.164 0.836
#> SRR1199054 2 0.2043 0.885 0.032 0.968
#> SRR1199056 2 0.5408 0.884 0.124 0.876
#> SRR1199057 2 0.4298 0.895 0.088 0.912
#> SRR1199059 2 0.1184 0.877 0.016 0.984
#> SRR1199060 2 0.2603 0.889 0.044 0.956
#> SRR1199061 2 0.0376 0.869 0.004 0.996
#> SRR1199062 1 0.1414 0.966 0.980 0.020
#> SRR1199064 1 0.1184 0.962 0.984 0.016
#> SRR1199065 1 0.1414 0.966 0.980 0.020
#> SRR1199067 1 0.9686 0.105 0.604 0.396
#> SRR1199075 1 0.1414 0.966 0.980 0.020
#> SRR1199076 2 0.1184 0.877 0.016 0.984
#> SRR1199077 1 0.1414 0.966 0.980 0.020
#> SRR1199078 2 0.3879 0.893 0.076 0.924
#> SRR1199079 2 0.1843 0.882 0.028 0.972
#> SRR1199080 1 0.1414 0.966 0.980 0.020
#> SRR1199081 2 0.6887 0.864 0.184 0.816
#> SRR1199082 2 0.9323 0.649 0.348 0.652
#> SRR1199083 1 0.1414 0.966 0.980 0.020
#> SRR1199084 1 0.1414 0.966 0.980 0.020
#> SRR1199085 1 0.1414 0.966 0.980 0.020
#> SRR1199086 1 0.1414 0.966 0.980 0.020
#> SRR1199087 2 0.1633 0.881 0.024 0.976
#> SRR1199088 2 0.8016 0.816 0.244 0.756
#> SRR1199089 2 0.9710 0.574 0.400 0.600
#> SRR1199090 2 0.6623 0.861 0.172 0.828
#> SRR1199091 1 0.1414 0.966 0.980 0.020
#> SRR1199092 1 0.1414 0.966 0.980 0.020
#> SRR1199093 2 0.3114 0.891 0.056 0.944
#> SRR1199094 1 0.1414 0.966 0.980 0.020
#> SRR1199095 2 0.3584 0.894 0.068 0.932
#> SRR1199096 1 0.4298 0.889 0.912 0.088
#> SRR1199097 2 0.6973 0.862 0.188 0.812
#> SRR1199098 2 0.0938 0.874 0.012 0.988
#> SRR1199099 1 0.1414 0.966 0.980 0.020
#> SRR1199100 2 0.1633 0.881 0.024 0.976
#> SRR1199101 2 0.5178 0.890 0.116 0.884
#> SRR1199102 1 0.1414 0.966 0.980 0.020
#> SRR1199103 2 0.2236 0.886 0.036 0.964
#> SRR1199104 2 0.7674 0.830 0.224 0.776
#> SRR1199105 1 0.8499 0.552 0.724 0.276
#> SRR1199106 2 0.3114 0.891 0.056 0.944
#> SRR1199107 2 0.1414 0.878 0.020 0.980
#> SRR1199108 1 0.1414 0.966 0.980 0.020
#> SRR1199109 2 0.2043 0.885 0.032 0.968
#> SRR1199110 2 0.9286 0.676 0.344 0.656
#> SRR1199111 2 0.2043 0.884 0.032 0.968
#> SRR1199112 2 0.7376 0.845 0.208 0.792
#> SRR1199113 2 0.9775 0.546 0.412 0.588
#> SRR1199114 1 0.1414 0.966 0.980 0.020
#> SRR1199115 1 0.1414 0.966 0.980 0.020
#> SRR1199116 2 0.6531 0.862 0.168 0.832
#> SRR1199117 1 0.1414 0.966 0.980 0.020
#> SRR1199118 1 0.1414 0.966 0.980 0.020
#> SRR1199119 2 0.1633 0.880 0.024 0.976
#> SRR1199120 2 0.8327 0.798 0.264 0.736
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.6823 0.6943 0.108 0.740 0.152
#> SRR1199009 2 0.3406 0.7566 0.028 0.904 0.068
#> SRR1199010 2 0.9195 -0.0159 0.384 0.464 0.152
#> SRR1199011 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199012 2 0.7666 0.6033 0.192 0.680 0.128
#> SRR1199013 3 0.9550 0.7150 0.196 0.368 0.436
#> SRR1199015 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199016 2 0.8543 0.1232 0.408 0.496 0.096
#> SRR1199017 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199018 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199019 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199020 2 0.3896 0.7580 0.052 0.888 0.060
#> SRR1199021 2 0.2537 0.7383 0.000 0.920 0.080
#> SRR1199022 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199023 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199025 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199026 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199027 1 0.5295 0.6393 0.808 0.156 0.036
#> SRR1199028 2 0.5423 0.7247 0.084 0.820 0.096
#> SRR1199029 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199031 2 0.2096 0.7338 0.004 0.944 0.052
#> SRR1199032 2 0.4689 0.7590 0.052 0.852 0.096
#> SRR1199033 2 0.4146 0.7423 0.044 0.876 0.080
#> SRR1199034 2 0.6605 0.7009 0.096 0.752 0.152
#> SRR1199035 2 0.6529 0.7025 0.092 0.756 0.152
#> SRR1199036 2 0.3237 0.7542 0.032 0.912 0.056
#> SRR1199037 2 0.7515 0.5852 0.220 0.680 0.100
#> SRR1199038 2 0.4475 0.7489 0.072 0.864 0.064
#> SRR1199040 2 0.3155 0.7566 0.040 0.916 0.044
#> SRR1199042 1 0.2773 0.8750 0.928 0.048 0.024
#> SRR1199043 2 0.4189 0.7555 0.056 0.876 0.068
#> SRR1199044 2 0.7091 0.6816 0.124 0.724 0.152
#> SRR1199045 2 0.7091 0.6827 0.124 0.724 0.152
#> SRR1199046 2 0.7138 0.6850 0.120 0.720 0.160
#> SRR1199047 2 0.5897 0.7345 0.076 0.792 0.132
#> SRR1199048 3 0.4931 0.5813 0.000 0.232 0.768
#> SRR1199049 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199050 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199051 2 0.4058 0.7501 0.044 0.880 0.076
#> SRR1199052 2 0.6332 0.7045 0.088 0.768 0.144
#> SRR1199054 2 0.2590 0.7401 0.004 0.924 0.072
#> SRR1199056 2 0.6393 0.6703 0.120 0.768 0.112
#> SRR1199057 2 0.4146 0.7568 0.044 0.876 0.080
#> SRR1199059 2 0.1860 0.7274 0.000 0.948 0.052
#> SRR1199060 2 0.2743 0.7482 0.020 0.928 0.052
#> SRR1199061 2 0.1860 0.7245 0.000 0.948 0.052
#> SRR1199062 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199064 1 0.1289 0.9234 0.968 0.000 0.032
#> SRR1199065 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199067 1 0.8530 -0.0957 0.548 0.344 0.108
#> SRR1199075 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199076 2 0.1860 0.7274 0.000 0.948 0.052
#> SRR1199077 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199078 2 0.4527 0.7526 0.052 0.860 0.088
#> SRR1199079 2 0.3670 0.7363 0.020 0.888 0.092
#> SRR1199080 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199081 3 0.9134 0.7395 0.156 0.344 0.500
#> SRR1199082 2 0.9972 -0.4955 0.336 0.364 0.300
#> SRR1199083 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199084 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199085 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199086 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199087 2 0.1989 0.7359 0.004 0.948 0.048
#> SRR1199088 2 0.7702 0.6251 0.180 0.680 0.140
#> SRR1199089 2 0.8389 0.2822 0.372 0.536 0.092
#> SRR1199090 3 0.9292 0.7658 0.176 0.332 0.492
#> SRR1199091 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199092 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199093 2 0.3765 0.7544 0.028 0.888 0.084
#> SRR1199094 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199095 2 0.4665 0.7456 0.048 0.852 0.100
#> SRR1199096 1 0.2947 0.8547 0.920 0.060 0.020
#> SRR1199097 2 0.6653 0.7034 0.112 0.752 0.136
#> SRR1199098 2 0.1753 0.7327 0.000 0.952 0.048
#> SRR1199099 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199100 2 0.2492 0.7370 0.016 0.936 0.048
#> SRR1199101 2 0.5481 0.7434 0.076 0.816 0.108
#> SRR1199102 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199103 2 0.2590 0.7402 0.004 0.924 0.072
#> SRR1199104 2 0.7393 0.6501 0.156 0.704 0.140
#> SRR1199105 1 0.6975 0.5511 0.732 0.124 0.144
#> SRR1199106 2 0.2903 0.7545 0.028 0.924 0.048
#> SRR1199107 2 0.2066 0.7283 0.000 0.940 0.060
#> SRR1199108 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199109 2 0.2269 0.7407 0.016 0.944 0.040
#> SRR1199110 2 0.8415 0.2913 0.320 0.572 0.108
#> SRR1199111 2 0.1964 0.7375 0.000 0.944 0.056
#> SRR1199112 2 0.7339 0.6656 0.144 0.708 0.148
#> SRR1199113 2 0.8426 0.2532 0.384 0.524 0.092
#> SRR1199114 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199115 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199116 2 0.7042 0.6566 0.140 0.728 0.132
#> SRR1199117 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199118 1 0.0237 0.9572 0.996 0.004 0.000
#> SRR1199119 2 0.3267 0.7390 0.000 0.884 0.116
#> SRR1199120 2 0.7902 0.5951 0.208 0.660 0.132
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 2 0.579 0.6922 0.076 0.680 0.000 0.244
#> SRR1199009 2 0.407 0.7791 0.024 0.848 0.032 0.096
#> SRR1199010 4 0.711 0.0000 0.152 0.072 0.108 0.668
#> SRR1199011 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.691 0.6185 0.164 0.620 0.008 0.208
#> SRR1199013 3 0.912 0.5742 0.196 0.280 0.428 0.096
#> SRR1199015 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199016 2 0.764 0.1193 0.404 0.440 0.012 0.144
#> SRR1199017 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.370 0.7782 0.036 0.860 0.008 0.096
#> SRR1199021 2 0.311 0.7652 0.004 0.892 0.048 0.056
#> SRR1199022 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199027 1 0.455 0.6281 0.800 0.128 0.000 0.072
#> SRR1199028 2 0.554 0.7432 0.076 0.780 0.064 0.080
#> SRR1199029 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.250 0.7586 0.004 0.920 0.044 0.032
#> SRR1199032 2 0.474 0.7732 0.032 0.804 0.028 0.136
#> SRR1199033 2 0.422 0.7507 0.028 0.836 0.024 0.112
#> SRR1199034 2 0.568 0.6973 0.064 0.680 0.000 0.256
#> SRR1199035 2 0.565 0.6991 0.064 0.684 0.000 0.252
#> SRR1199036 2 0.336 0.7746 0.024 0.884 0.020 0.072
#> SRR1199037 2 0.695 0.5997 0.208 0.624 0.012 0.156
#> SRR1199038 2 0.437 0.7690 0.064 0.836 0.020 0.080
#> SRR1199040 2 0.306 0.7780 0.024 0.896 0.012 0.068
#> SRR1199042 1 0.230 0.8538 0.932 0.032 0.012 0.024
#> SRR1199043 2 0.416 0.7759 0.048 0.848 0.024 0.080
#> SRR1199044 2 0.597 0.6830 0.088 0.668 0.000 0.244
#> SRR1199045 2 0.600 0.6819 0.088 0.664 0.000 0.248
#> SRR1199046 2 0.669 0.6907 0.092 0.660 0.028 0.220
#> SRR1199047 2 0.576 0.7474 0.072 0.740 0.024 0.164
#> SRR1199048 3 0.271 -0.0117 0.000 0.112 0.884 0.004
#> SRR1199049 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.370 0.7723 0.028 0.860 0.012 0.100
#> SRR1199052 2 0.552 0.7015 0.060 0.696 0.000 0.244
#> SRR1199054 2 0.293 0.7654 0.004 0.896 0.024 0.076
#> SRR1199056 2 0.655 0.6714 0.120 0.700 0.040 0.140
#> SRR1199057 2 0.445 0.7762 0.032 0.832 0.040 0.096
#> SRR1199059 2 0.255 0.7514 0.004 0.916 0.024 0.056
#> SRR1199060 2 0.292 0.7709 0.016 0.904 0.020 0.060
#> SRR1199061 2 0.231 0.7517 0.004 0.928 0.040 0.028
#> SRR1199062 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199064 1 0.158 0.8776 0.948 0.000 0.004 0.048
#> SRR1199065 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199067 1 0.718 -0.0976 0.520 0.324 0.000 0.156
#> SRR1199075 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.255 0.7514 0.004 0.916 0.024 0.056
#> SRR1199077 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.465 0.7694 0.048 0.824 0.036 0.092
#> SRR1199079 2 0.394 0.7602 0.012 0.852 0.044 0.092
#> SRR1199080 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199081 3 0.889 0.5917 0.136 0.244 0.488 0.132
#> SRR1199082 1 0.945 -0.5912 0.328 0.308 0.264 0.100
#> SRR1199083 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.233 0.7580 0.004 0.924 0.016 0.056
#> SRR1199088 2 0.661 0.6336 0.144 0.620 0.000 0.236
#> SRR1199089 2 0.749 0.2968 0.340 0.488 0.004 0.168
#> SRR1199090 3 0.869 0.6084 0.168 0.236 0.504 0.092
#> SRR1199091 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.422 0.7736 0.024 0.836 0.028 0.112
#> SRR1199094 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.484 0.7667 0.040 0.816 0.060 0.084
#> SRR1199096 1 0.269 0.8322 0.912 0.040 0.004 0.044
#> SRR1199097 2 0.595 0.7136 0.092 0.692 0.004 0.212
#> SRR1199098 2 0.222 0.7589 0.004 0.932 0.032 0.032
#> SRR1199099 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.280 0.7579 0.016 0.912 0.028 0.044
#> SRR1199101 2 0.506 0.7594 0.056 0.776 0.012 0.156
#> SRR1199102 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.290 0.7679 0.008 0.904 0.032 0.056
#> SRR1199104 2 0.641 0.6562 0.124 0.636 0.000 0.240
#> SRR1199105 1 0.614 0.5478 0.736 0.096 0.120 0.048
#> SRR1199106 2 0.280 0.7766 0.016 0.908 0.016 0.060
#> SRR1199107 2 0.267 0.7501 0.004 0.912 0.032 0.052
#> SRR1199108 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199109 2 0.280 0.7635 0.016 0.912 0.028 0.044
#> SRR1199110 2 0.771 0.3194 0.312 0.540 0.044 0.104
#> SRR1199111 2 0.221 0.7650 0.004 0.928 0.012 0.056
#> SRR1199112 2 0.624 0.6664 0.108 0.648 0.000 0.244
#> SRR1199113 2 0.752 0.2664 0.352 0.476 0.004 0.168
#> SRR1199114 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.677 0.6649 0.128 0.692 0.056 0.124
#> SRR1199117 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.000 0.9310 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.393 0.7643 0.004 0.836 0.032 0.128
#> SRR1199120 2 0.699 0.6029 0.168 0.596 0.004 0.232
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.436 0.7213 0.036 0.224 0.736 0.004 0.000
#> SRR1199009 2 0.385 0.7686 0.008 0.804 0.160 0.004 0.024
#> SRR1199010 4 0.258 0.0000 0.048 0.028 0.020 0.904 0.000
#> SRR1199011 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 3 0.674 0.3333 0.124 0.376 0.476 0.016 0.008
#> SRR1199013 5 0.800 0.5993 0.168 0.144 0.180 0.012 0.496
#> SRR1199015 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.726 0.1385 0.368 0.180 0.420 0.008 0.024
#> SRR1199017 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.409 0.7259 0.016 0.736 0.244 0.000 0.004
#> SRR1199021 2 0.328 0.7817 0.000 0.848 0.116 0.008 0.028
#> SRR1199022 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 1 0.411 0.6396 0.772 0.040 0.184 0.004 0.000
#> SRR1199028 2 0.591 0.6867 0.068 0.704 0.152 0.016 0.060
#> SRR1199029 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.241 0.7840 0.000 0.908 0.060 0.012 0.020
#> SRR1199032 2 0.518 0.6288 0.008 0.680 0.260 0.040 0.012
#> SRR1199033 2 0.477 0.7360 0.008 0.768 0.124 0.088 0.012
#> SRR1199034 3 0.397 0.7148 0.024 0.224 0.752 0.000 0.000
#> SRR1199035 3 0.403 0.7110 0.024 0.232 0.744 0.000 0.000
#> SRR1199036 2 0.410 0.7604 0.020 0.796 0.160 0.012 0.012
#> SRR1199037 2 0.698 -0.0776 0.176 0.456 0.348 0.008 0.012
#> SRR1199038 2 0.488 0.7347 0.056 0.764 0.144 0.008 0.028
#> SRR1199040 2 0.302 0.7821 0.012 0.848 0.136 0.000 0.004
#> SRR1199042 1 0.203 0.8813 0.928 0.016 0.044 0.000 0.012
#> SRR1199043 2 0.439 0.7545 0.040 0.792 0.136 0.004 0.028
#> SRR1199044 3 0.424 0.7372 0.048 0.200 0.752 0.000 0.000
#> SRR1199045 3 0.410 0.7357 0.044 0.192 0.764 0.000 0.000
#> SRR1199046 3 0.645 0.1748 0.052 0.416 0.480 0.004 0.048
#> SRR1199047 2 0.598 0.4617 0.052 0.608 0.304 0.016 0.020
#> SRR1199048 5 0.191 -0.1027 0.000 0.032 0.004 0.032 0.932
#> SRR1199049 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199050 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.474 0.7332 0.024 0.736 0.212 0.016 0.012
#> SRR1199052 3 0.403 0.7089 0.024 0.232 0.744 0.000 0.000
#> SRR1199054 2 0.281 0.7784 0.000 0.872 0.108 0.008 0.012
#> SRR1199056 2 0.668 0.4207 0.100 0.588 0.256 0.008 0.048
#> SRR1199057 2 0.456 0.7501 0.016 0.756 0.192 0.008 0.028
#> SRR1199059 2 0.129 0.7764 0.000 0.956 0.036 0.004 0.004
#> SRR1199060 2 0.303 0.7851 0.008 0.876 0.088 0.012 0.016
#> SRR1199061 2 0.192 0.7789 0.000 0.932 0.044 0.012 0.012
#> SRR1199062 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 1 0.249 0.8483 0.896 0.000 0.080 0.020 0.004
#> SRR1199065 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 1 0.649 -0.1321 0.492 0.076 0.396 0.032 0.004
#> SRR1199075 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.129 0.7764 0.000 0.956 0.036 0.004 0.004
#> SRR1199077 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.500 0.7153 0.036 0.744 0.180 0.016 0.024
#> SRR1199079 2 0.390 0.7598 0.000 0.816 0.128 0.036 0.020
#> SRR1199080 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.711 0.5646 0.100 0.096 0.240 0.004 0.560
#> SRR1199082 5 0.865 0.4411 0.284 0.152 0.252 0.008 0.304
#> SRR1199083 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.179 0.7832 0.000 0.932 0.056 0.004 0.008
#> SRR1199088 3 0.507 0.7071 0.104 0.172 0.716 0.008 0.000
#> SRR1199089 3 0.656 0.3670 0.288 0.156 0.540 0.012 0.004
#> SRR1199090 5 0.711 0.5959 0.136 0.100 0.176 0.004 0.584
#> SRR1199091 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.415 0.7107 0.016 0.768 0.200 0.008 0.008
#> SRR1199094 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.502 0.7369 0.028 0.760 0.144 0.016 0.052
#> SRR1199096 1 0.305 0.8280 0.884 0.024 0.064 0.008 0.020
#> SRR1199097 3 0.568 0.5200 0.052 0.324 0.600 0.024 0.000
#> SRR1199098 2 0.198 0.7838 0.000 0.924 0.060 0.008 0.008
#> SRR1199099 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.224 0.7821 0.008 0.920 0.052 0.008 0.012
#> SRR1199101 2 0.557 0.5670 0.036 0.640 0.288 0.032 0.004
#> SRR1199102 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.316 0.7876 0.004 0.852 0.124 0.012 0.008
#> SRR1199104 3 0.452 0.7237 0.080 0.176 0.744 0.000 0.000
#> SRR1199105 1 0.548 0.5306 0.716 0.044 0.100 0.000 0.140
#> SRR1199106 2 0.272 0.7835 0.000 0.864 0.124 0.000 0.012
#> SRR1199107 2 0.216 0.7721 0.000 0.916 0.064 0.012 0.008
#> SRR1199108 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199109 2 0.239 0.7840 0.004 0.908 0.068 0.008 0.012
#> SRR1199110 2 0.793 -0.1480 0.272 0.404 0.256 0.008 0.060
#> SRR1199111 2 0.277 0.7835 0.000 0.864 0.124 0.004 0.008
#> SRR1199112 3 0.429 0.7330 0.064 0.176 0.760 0.000 0.000
#> SRR1199113 3 0.664 0.3416 0.300 0.160 0.524 0.012 0.004
#> SRR1199114 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.662 0.4838 0.092 0.612 0.232 0.012 0.052
#> SRR1199117 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.000 0.9550 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.421 0.6531 0.000 0.732 0.244 0.016 0.008
#> SRR1199120 3 0.512 0.6775 0.128 0.148 0.716 0.008 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.2422 0.7100 0.024 0.072 0.892 0.000 0.000 0.012
#> SRR1199009 2 0.4372 0.7589 0.004 0.748 0.140 0.000 0.008 0.100
#> SRR1199010 4 0.1536 0.0000 0.040 0.000 0.016 0.940 0.000 0.004
#> SRR1199011 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199012 3 0.7275 0.2395 0.116 0.248 0.468 0.016 0.000 0.152
#> SRR1199013 6 0.7615 -0.0183 0.140 0.084 0.048 0.000 0.352 0.376
#> SRR1199015 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.6843 -0.0208 0.352 0.056 0.428 0.004 0.004 0.156
#> SRR1199017 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.5003 0.7106 0.012 0.664 0.216 0.000 0.000 0.108
#> SRR1199021 2 0.3902 0.7662 0.000 0.800 0.100 0.004 0.016 0.080
#> SRR1199022 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 1 0.4339 0.5868 0.756 0.012 0.136 0.004 0.000 0.092
#> SRR1199028 2 0.6576 0.6346 0.056 0.592 0.108 0.004 0.036 0.204
#> SRR1199029 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.3003 0.7698 0.000 0.864 0.068 0.004 0.012 0.052
#> SRR1199032 2 0.6411 0.5830 0.008 0.552 0.264 0.040 0.008 0.128
#> SRR1199033 2 0.6064 0.6727 0.000 0.620 0.088 0.120 0.004 0.168
#> SRR1199034 3 0.1820 0.7063 0.012 0.056 0.924 0.000 0.000 0.008
#> SRR1199035 3 0.2001 0.7040 0.012 0.068 0.912 0.000 0.000 0.008
#> SRR1199036 2 0.4948 0.7358 0.012 0.720 0.132 0.012 0.004 0.120
#> SRR1199037 2 0.7532 0.0955 0.156 0.360 0.300 0.004 0.000 0.180
#> SRR1199038 2 0.5496 0.7198 0.048 0.684 0.132 0.012 0.000 0.124
#> SRR1199040 2 0.3541 0.7669 0.008 0.812 0.132 0.000 0.004 0.044
#> SRR1199042 1 0.1845 0.8587 0.916 0.000 0.008 0.000 0.004 0.072
#> SRR1199043 2 0.5087 0.7432 0.032 0.720 0.124 0.008 0.004 0.112
#> SRR1199044 3 0.2007 0.7189 0.036 0.044 0.916 0.000 0.000 0.004
#> SRR1199045 3 0.1720 0.7176 0.032 0.040 0.928 0.000 0.000 0.000
#> SRR1199046 3 0.6438 0.1028 0.028 0.308 0.472 0.000 0.004 0.188
#> SRR1199047 2 0.6794 0.4218 0.044 0.480 0.316 0.016 0.004 0.140
#> SRR1199048 5 0.0405 0.0690 0.000 0.008 0.000 0.004 0.988 0.000
#> SRR1199049 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.5724 0.6956 0.016 0.648 0.172 0.020 0.004 0.140
#> SRR1199052 3 0.2058 0.7024 0.012 0.072 0.908 0.000 0.000 0.008
#> SRR1199054 2 0.3160 0.7634 0.000 0.840 0.104 0.000 0.008 0.048
#> SRR1199056 2 0.7179 0.3180 0.072 0.440 0.148 0.016 0.004 0.320
#> SRR1199057 2 0.4713 0.7454 0.012 0.724 0.180 0.000 0.016 0.068
#> SRR1199059 2 0.1788 0.7637 0.000 0.928 0.052 0.004 0.004 0.012
#> SRR1199060 2 0.3600 0.7726 0.008 0.828 0.104 0.008 0.008 0.044
#> SRR1199061 2 0.2677 0.7644 0.000 0.888 0.040 0.012 0.008 0.052
#> SRR1199062 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199064 1 0.2695 0.7628 0.844 0.000 0.004 0.008 0.000 0.144
#> SRR1199065 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 1 0.6163 -0.1753 0.476 0.012 0.388 0.020 0.004 0.100
#> SRR1199075 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.1851 0.7644 0.000 0.924 0.056 0.004 0.004 0.012
#> SRR1199077 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.5585 0.7060 0.024 0.676 0.164 0.016 0.008 0.112
#> SRR1199079 2 0.4846 0.7357 0.000 0.736 0.096 0.048 0.004 0.116
#> SRR1199080 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.7203 0.0344 0.060 0.052 0.104 0.000 0.416 0.368
#> SRR1199082 6 0.8005 0.4162 0.244 0.080 0.076 0.004 0.176 0.420
#> SRR1199083 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.2392 0.7709 0.000 0.896 0.064 0.004 0.004 0.032
#> SRR1199088 3 0.2840 0.6843 0.092 0.016 0.868 0.004 0.000 0.020
#> SRR1199089 3 0.6054 0.2831 0.264 0.028 0.564 0.008 0.000 0.136
#> SRR1199090 5 0.6845 -0.2392 0.108 0.048 0.032 0.000 0.432 0.380
#> SRR1199091 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.4803 0.7037 0.008 0.704 0.192 0.004 0.004 0.088
#> SRR1199094 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.5620 0.7196 0.024 0.672 0.132 0.004 0.020 0.148
#> SRR1199096 1 0.2747 0.7940 0.868 0.004 0.028 0.004 0.000 0.096
#> SRR1199097 3 0.5162 0.5641 0.040 0.184 0.700 0.016 0.000 0.060
#> SRR1199098 2 0.2618 0.7707 0.000 0.888 0.060 0.012 0.004 0.036
#> SRR1199099 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.2830 0.7686 0.004 0.880 0.072 0.016 0.008 0.020
#> SRR1199101 2 0.6687 0.5271 0.032 0.532 0.264 0.044 0.000 0.128
#> SRR1199102 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.3620 0.7723 0.004 0.816 0.088 0.008 0.000 0.084
#> SRR1199104 3 0.2182 0.7041 0.068 0.020 0.904 0.000 0.000 0.008
#> SRR1199105 1 0.4944 0.4256 0.692 0.012 0.020 0.000 0.060 0.216
#> SRR1199106 2 0.3229 0.7692 0.000 0.828 0.120 0.000 0.004 0.048
#> SRR1199107 2 0.2352 0.7576 0.000 0.900 0.040 0.004 0.004 0.052
#> SRR1199108 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199109 2 0.2720 0.7714 0.004 0.880 0.084 0.012 0.008 0.012
#> SRR1199110 2 0.8139 -0.3061 0.240 0.328 0.152 0.000 0.036 0.244
#> SRR1199111 2 0.3210 0.7692 0.000 0.836 0.088 0.004 0.000 0.072
#> SRR1199112 3 0.1921 0.7152 0.052 0.032 0.916 0.000 0.000 0.000
#> SRR1199113 3 0.6260 0.2445 0.276 0.036 0.540 0.008 0.000 0.140
#> SRR1199114 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.7200 0.4517 0.068 0.468 0.180 0.008 0.012 0.264
#> SRR1199117 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9487 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.5716 0.5272 0.000 0.588 0.228 0.012 0.004 0.168
#> SRR1199120 3 0.2919 0.6671 0.112 0.012 0.856 0.008 0.000 0.012
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.997 0.999 0.4506 0.551 0.551
#> 3 3 0.875 0.910 0.956 0.4728 0.781 0.602
#> 4 4 0.874 0.871 0.930 0.0875 0.918 0.762
#> 5 5 0.825 0.732 0.862 0.0514 0.982 0.934
#> 6 6 0.808 0.697 0.811 0.0344 0.934 0.756
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.000 0.998 0.00 1.00
#> SRR1199009 2 0.000 0.998 0.00 1.00
#> SRR1199010 2 0.000 0.998 0.00 1.00
#> SRR1199011 1 0.000 1.000 1.00 0.00
#> SRR1199012 2 0.000 0.998 0.00 1.00
#> SRR1199013 2 0.000 0.998 0.00 1.00
#> SRR1199015 1 0.000 1.000 1.00 0.00
#> SRR1199016 2 0.000 0.998 0.00 1.00
#> SRR1199017 1 0.000 1.000 1.00 0.00
#> SRR1199018 1 0.000 1.000 1.00 0.00
#> SRR1199019 1 0.000 1.000 1.00 0.00
#> SRR1199020 2 0.000 0.998 0.00 1.00
#> SRR1199021 2 0.000 0.998 0.00 1.00
#> SRR1199022 1 0.000 1.000 1.00 0.00
#> SRR1199023 1 0.000 1.000 1.00 0.00
#> SRR1199025 1 0.000 1.000 1.00 0.00
#> SRR1199026 1 0.000 1.000 1.00 0.00
#> SRR1199027 2 0.584 0.837 0.14 0.86
#> SRR1199028 2 0.000 0.998 0.00 1.00
#> SRR1199029 1 0.000 1.000 1.00 0.00
#> SRR1199031 2 0.000 0.998 0.00 1.00
#> SRR1199032 2 0.000 0.998 0.00 1.00
#> SRR1199033 2 0.000 0.998 0.00 1.00
#> SRR1199034 2 0.000 0.998 0.00 1.00
#> SRR1199035 2 0.000 0.998 0.00 1.00
#> SRR1199036 2 0.000 0.998 0.00 1.00
#> SRR1199037 2 0.000 0.998 0.00 1.00
#> SRR1199038 2 0.000 0.998 0.00 1.00
#> SRR1199040 2 0.000 0.998 0.00 1.00
#> SRR1199042 2 0.000 0.998 0.00 1.00
#> SRR1199043 2 0.000 0.998 0.00 1.00
#> SRR1199044 2 0.000 0.998 0.00 1.00
#> SRR1199045 2 0.000 0.998 0.00 1.00
#> SRR1199046 2 0.000 0.998 0.00 1.00
#> SRR1199047 2 0.000 0.998 0.00 1.00
#> SRR1199048 2 0.000 0.998 0.00 1.00
#> SRR1199049 1 0.000 1.000 1.00 0.00
#> SRR1199050 1 0.000 1.000 1.00 0.00
#> SRR1199051 2 0.000 0.998 0.00 1.00
#> SRR1199052 2 0.000 0.998 0.00 1.00
#> SRR1199054 2 0.000 0.998 0.00 1.00
#> SRR1199056 2 0.000 0.998 0.00 1.00
#> SRR1199057 2 0.000 0.998 0.00 1.00
#> SRR1199059 2 0.000 0.998 0.00 1.00
#> SRR1199060 2 0.000 0.998 0.00 1.00
#> SRR1199061 2 0.000 0.998 0.00 1.00
#> SRR1199062 1 0.000 1.000 1.00 0.00
#> SRR1199064 1 0.000 1.000 1.00 0.00
#> SRR1199065 1 0.000 1.000 1.00 0.00
#> SRR1199067 2 0.000 0.998 0.00 1.00
#> SRR1199075 1 0.000 1.000 1.00 0.00
#> SRR1199076 2 0.000 0.998 0.00 1.00
#> SRR1199077 1 0.000 1.000 1.00 0.00
#> SRR1199078 2 0.000 0.998 0.00 1.00
#> SRR1199079 2 0.000 0.998 0.00 1.00
#> SRR1199080 1 0.000 1.000 1.00 0.00
#> SRR1199081 2 0.000 0.998 0.00 1.00
#> SRR1199082 2 0.000 0.998 0.00 1.00
#> SRR1199083 1 0.000 1.000 1.00 0.00
#> SRR1199084 1 0.000 1.000 1.00 0.00
#> SRR1199085 1 0.000 1.000 1.00 0.00
#> SRR1199086 1 0.000 1.000 1.00 0.00
#> SRR1199087 2 0.000 0.998 0.00 1.00
#> SRR1199088 2 0.000 0.998 0.00 1.00
#> SRR1199089 2 0.000 0.998 0.00 1.00
#> SRR1199090 2 0.000 0.998 0.00 1.00
#> SRR1199091 1 0.000 1.000 1.00 0.00
#> SRR1199092 1 0.000 1.000 1.00 0.00
#> SRR1199093 2 0.000 0.998 0.00 1.00
#> SRR1199094 1 0.000 1.000 1.00 0.00
#> SRR1199095 2 0.000 0.998 0.00 1.00
#> SRR1199096 2 0.000 0.998 0.00 1.00
#> SRR1199097 2 0.000 0.998 0.00 1.00
#> SRR1199098 2 0.000 0.998 0.00 1.00
#> SRR1199099 1 0.000 1.000 1.00 0.00
#> SRR1199100 2 0.000 0.998 0.00 1.00
#> SRR1199101 2 0.000 0.998 0.00 1.00
#> SRR1199102 1 0.000 1.000 1.00 0.00
#> SRR1199103 2 0.000 0.998 0.00 1.00
#> SRR1199104 2 0.000 0.998 0.00 1.00
#> SRR1199105 2 0.000 0.998 0.00 1.00
#> SRR1199106 2 0.000 0.998 0.00 1.00
#> SRR1199107 2 0.000 0.998 0.00 1.00
#> SRR1199108 1 0.000 1.000 1.00 0.00
#> SRR1199109 2 0.000 0.998 0.00 1.00
#> SRR1199110 2 0.000 0.998 0.00 1.00
#> SRR1199111 2 0.000 0.998 0.00 1.00
#> SRR1199112 2 0.000 0.998 0.00 1.00
#> SRR1199113 2 0.000 0.998 0.00 1.00
#> SRR1199114 1 0.000 1.000 1.00 0.00
#> SRR1199115 1 0.000 1.000 1.00 0.00
#> SRR1199116 2 0.000 0.998 0.00 1.00
#> SRR1199117 1 0.000 1.000 1.00 0.00
#> SRR1199118 1 0.000 1.000 1.00 0.00
#> SRR1199119 2 0.000 0.998 0.00 1.00
#> SRR1199120 2 0.000 0.998 0.00 1.00
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.2356 0.878 0.000 0.072 0.928
#> SRR1199009 2 0.0237 0.949 0.000 0.996 0.004
#> SRR1199010 2 0.4399 0.791 0.000 0.812 0.188
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199012 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199013 3 0.6095 0.399 0.000 0.392 0.608
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199016 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199020 2 0.3619 0.852 0.000 0.864 0.136
#> SRR1199021 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199027 3 0.0475 0.899 0.004 0.004 0.992
#> SRR1199028 2 0.2796 0.897 0.000 0.908 0.092
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199032 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1199033 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199034 3 0.2796 0.867 0.000 0.092 0.908
#> SRR1199035 3 0.3038 0.859 0.000 0.104 0.896
#> SRR1199036 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199037 3 0.0424 0.900 0.000 0.008 0.992
#> SRR1199038 2 0.2878 0.895 0.000 0.904 0.096
#> SRR1199040 2 0.1031 0.942 0.000 0.976 0.024
#> SRR1199042 3 0.0424 0.900 0.000 0.008 0.992
#> SRR1199043 2 0.1163 0.940 0.000 0.972 0.028
#> SRR1199044 3 0.1163 0.895 0.000 0.028 0.972
#> SRR1199045 3 0.2261 0.880 0.000 0.068 0.932
#> SRR1199046 3 0.5529 0.635 0.000 0.296 0.704
#> SRR1199047 2 0.6168 0.199 0.000 0.588 0.412
#> SRR1199048 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199049 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199051 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1199052 3 0.3116 0.856 0.000 0.108 0.892
#> SRR1199054 2 0.0237 0.948 0.000 0.996 0.004
#> SRR1199056 2 0.4750 0.734 0.000 0.784 0.216
#> SRR1199057 2 0.1411 0.936 0.000 0.964 0.036
#> SRR1199059 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199064 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199067 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199078 2 0.1964 0.924 0.000 0.944 0.056
#> SRR1199079 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199081 3 0.1529 0.890 0.000 0.040 0.960
#> SRR1199082 3 0.5650 0.569 0.000 0.312 0.688
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199088 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199089 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199090 3 0.6299 0.118 0.000 0.476 0.524
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199093 2 0.0237 0.948 0.000 0.996 0.004
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199096 3 0.0424 0.900 0.000 0.008 0.992
#> SRR1199097 3 0.3267 0.850 0.000 0.116 0.884
#> SRR1199098 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199101 2 0.3340 0.873 0.000 0.880 0.120
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199104 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199105 3 0.0424 0.900 0.000 0.008 0.992
#> SRR1199106 2 0.0237 0.948 0.000 0.996 0.004
#> SRR1199107 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199108 1 0.0424 0.992 0.992 0.000 0.008
#> SRR1199109 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1199110 3 0.5529 0.596 0.000 0.296 0.704
#> SRR1199111 2 0.0237 0.948 0.000 0.996 0.004
#> SRR1199112 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199113 3 0.0237 0.901 0.000 0.004 0.996
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199116 2 0.3686 0.846 0.000 0.860 0.140
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199119 2 0.0237 0.948 0.000 0.996 0.004
#> SRR1199120 3 0.0237 0.901 0.000 0.004 0.996
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0672 0.9009 0.000 0.008 0.984 0.008
#> SRR1199009 2 0.1411 0.9302 0.000 0.960 0.020 0.020
#> SRR1199010 4 0.5750 0.0207 0.000 0.440 0.028 0.532
#> SRR1199011 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199012 4 0.3074 0.7571 0.000 0.000 0.152 0.848
#> SRR1199013 4 0.2214 0.7979 0.000 0.028 0.044 0.928
#> SRR1199015 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199016 4 0.4888 0.3543 0.000 0.000 0.412 0.588
#> SRR1199017 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.3978 0.8177 0.000 0.796 0.192 0.012
#> SRR1199021 2 0.0592 0.9318 0.000 0.984 0.016 0.000
#> SRR1199022 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.2408 0.7916 0.000 0.000 0.104 0.896
#> SRR1199028 2 0.3893 0.7860 0.000 0.796 0.008 0.196
#> SRR1199029 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.9321 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.3634 0.8939 0.000 0.856 0.096 0.048
#> SRR1199033 2 0.1209 0.9282 0.000 0.964 0.004 0.032
#> SRR1199034 3 0.0657 0.8998 0.000 0.012 0.984 0.004
#> SRR1199035 3 0.0657 0.8998 0.000 0.012 0.984 0.004
#> SRR1199036 2 0.1489 0.9268 0.000 0.952 0.044 0.004
#> SRR1199037 4 0.2868 0.7747 0.000 0.000 0.136 0.864
#> SRR1199038 2 0.4171 0.8621 0.000 0.828 0.084 0.088
#> SRR1199040 2 0.2469 0.8961 0.000 0.892 0.108 0.000
#> SRR1199042 4 0.2011 0.8002 0.000 0.000 0.080 0.920
#> SRR1199043 2 0.2450 0.9136 0.000 0.912 0.072 0.016
#> SRR1199044 3 0.0672 0.9009 0.000 0.008 0.984 0.008
#> SRR1199045 3 0.0672 0.9009 0.000 0.008 0.984 0.008
#> SRR1199046 3 0.5112 0.2522 0.000 0.384 0.608 0.008
#> SRR1199047 2 0.6042 0.2032 0.000 0.560 0.048 0.392
#> SRR1199048 2 0.0817 0.9278 0.000 0.976 0.000 0.024
#> SRR1199049 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.3718 0.8446 0.000 0.820 0.168 0.012
#> SRR1199052 3 0.0657 0.8998 0.000 0.012 0.984 0.004
#> SRR1199054 2 0.1389 0.9246 0.000 0.952 0.048 0.000
#> SRR1199056 4 0.5007 0.4262 0.000 0.356 0.008 0.636
#> SRR1199057 2 0.3037 0.9070 0.000 0.888 0.076 0.036
#> SRR1199059 2 0.0000 0.9321 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0336 0.9320 0.000 0.992 0.000 0.008
#> SRR1199061 2 0.0188 0.9322 0.000 0.996 0.000 0.004
#> SRR1199062 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199064 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199065 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199067 4 0.2281 0.7954 0.000 0.000 0.096 0.904
#> SRR1199075 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.9321 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.1902 0.9143 0.000 0.932 0.004 0.064
#> SRR1199079 2 0.0592 0.9307 0.000 0.984 0.000 0.016
#> SRR1199080 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199081 4 0.2053 0.8010 0.000 0.004 0.072 0.924
#> SRR1199082 4 0.2089 0.7991 0.000 0.020 0.048 0.932
#> SRR1199083 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9321 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.1792 0.8764 0.000 0.000 0.932 0.068
#> SRR1199089 3 0.2647 0.8154 0.000 0.000 0.880 0.120
#> SRR1199090 4 0.2124 0.7883 0.000 0.040 0.028 0.932
#> SRR1199091 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0592 0.9317 0.000 0.984 0.000 0.016
#> SRR1199094 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.1637 0.9161 0.000 0.940 0.000 0.060
#> SRR1199096 4 0.2011 0.8002 0.000 0.000 0.080 0.920
#> SRR1199097 3 0.2473 0.8259 0.000 0.080 0.908 0.012
#> SRR1199098 2 0.0000 0.9321 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0188 0.9320 0.000 0.996 0.000 0.004
#> SRR1199101 2 0.3051 0.8920 0.000 0.884 0.028 0.088
#> SRR1199102 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0657 0.9330 0.000 0.984 0.012 0.004
#> SRR1199104 3 0.1637 0.8824 0.000 0.000 0.940 0.060
#> SRR1199105 4 0.2011 0.8002 0.000 0.000 0.080 0.920
#> SRR1199106 2 0.3123 0.8561 0.000 0.844 0.156 0.000
#> SRR1199107 2 0.0000 0.9321 0.000 1.000 0.000 0.000
#> SRR1199108 4 0.4916 0.2405 0.424 0.000 0.000 0.576
#> SRR1199109 2 0.0188 0.9320 0.000 0.996 0.000 0.004
#> SRR1199110 4 0.2385 0.7988 0.000 0.028 0.052 0.920
#> SRR1199111 2 0.1474 0.9243 0.000 0.948 0.052 0.000
#> SRR1199112 3 0.1557 0.8847 0.000 0.000 0.944 0.056
#> SRR1199113 4 0.4967 0.2490 0.000 0.000 0.452 0.548
#> SRR1199114 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199116 4 0.2831 0.7233 0.000 0.120 0.004 0.876
#> SRR1199117 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.1743 0.9226 0.000 0.940 0.056 0.004
#> SRR1199120 3 0.1637 0.8824 0.000 0.000 0.940 0.060
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0162 0.88797 0.000 0.004 0.996 0.000 0.000
#> SRR1199009 2 0.3840 0.65337 0.000 0.772 0.012 0.208 0.008
#> SRR1199010 4 0.5130 0.39822 0.000 0.100 0.000 0.680 0.220
#> SRR1199011 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 5 0.5733 0.32418 0.000 0.004 0.092 0.324 0.580
#> SRR1199013 5 0.3612 0.63166 0.000 0.008 0.000 0.228 0.764
#> SRR1199015 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 5 0.4620 0.48975 0.000 0.000 0.320 0.028 0.652
#> SRR1199017 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.4781 0.62500 0.000 0.728 0.160 0.112 0.000
#> SRR1199021 2 0.1285 0.77198 0.000 0.956 0.004 0.036 0.004
#> SRR1199022 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.2879 0.66853 0.000 0.000 0.032 0.100 0.868
#> SRR1199028 2 0.6568 -0.36495 0.000 0.412 0.000 0.384 0.204
#> SRR1199029 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.1408 0.76781 0.000 0.948 0.000 0.044 0.008
#> SRR1199032 2 0.5329 0.13811 0.000 0.540 0.044 0.412 0.004
#> SRR1199033 2 0.4440 -0.04336 0.000 0.528 0.000 0.468 0.004
#> SRR1199034 3 0.0324 0.88678 0.000 0.004 0.992 0.004 0.000
#> SRR1199035 3 0.0451 0.88407 0.000 0.004 0.988 0.008 0.000
#> SRR1199036 2 0.2754 0.75503 0.000 0.884 0.032 0.080 0.004
#> SRR1199037 5 0.4735 0.55305 0.000 0.004 0.072 0.196 0.728
#> SRR1199038 2 0.5000 0.65746 0.000 0.736 0.036 0.176 0.052
#> SRR1199040 2 0.2894 0.74711 0.000 0.876 0.084 0.036 0.004
#> SRR1199042 5 0.2305 0.67355 0.000 0.000 0.012 0.092 0.896
#> SRR1199043 2 0.3712 0.73584 0.000 0.820 0.040 0.132 0.008
#> SRR1199044 3 0.0000 0.88775 0.000 0.000 1.000 0.000 0.000
#> SRR1199045 3 0.0162 0.88797 0.000 0.004 0.996 0.000 0.000
#> SRR1199046 3 0.5877 0.16810 0.000 0.316 0.596 0.036 0.052
#> SRR1199047 4 0.7083 0.49113 0.000 0.252 0.016 0.424 0.308
#> SRR1199048 2 0.3940 0.52885 0.000 0.756 0.000 0.220 0.024
#> SRR1199049 1 0.2017 0.90875 0.912 0.000 0.000 0.080 0.008
#> SRR1199050 1 0.0162 0.99393 0.996 0.000 0.000 0.004 0.000
#> SRR1199051 2 0.4545 0.65885 0.000 0.752 0.132 0.116 0.000
#> SRR1199052 3 0.0324 0.88678 0.000 0.004 0.992 0.004 0.000
#> SRR1199054 2 0.1830 0.76454 0.000 0.932 0.040 0.028 0.000
#> SRR1199056 5 0.6360 0.00208 0.000 0.172 0.000 0.352 0.476
#> SRR1199057 2 0.4896 0.56246 0.000 0.696 0.032 0.252 0.020
#> SRR1199059 2 0.0000 0.77064 0.000 1.000 0.000 0.000 0.000
#> SRR1199060 2 0.1671 0.76105 0.000 0.924 0.000 0.076 0.000
#> SRR1199061 2 0.1205 0.76826 0.000 0.956 0.000 0.040 0.004
#> SRR1199062 1 0.0162 0.99393 0.996 0.000 0.000 0.004 0.000
#> SRR1199064 1 0.0162 0.99393 0.996 0.000 0.000 0.004 0.000
#> SRR1199065 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 5 0.3193 0.64625 0.000 0.004 0.032 0.112 0.852
#> SRR1199075 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0404 0.76954 0.000 0.988 0.000 0.012 0.000
#> SRR1199077 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.4743 0.36109 0.000 0.640 0.004 0.332 0.024
#> SRR1199079 2 0.3048 0.67449 0.000 0.820 0.000 0.176 0.004
#> SRR1199080 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.3779 0.63707 0.000 0.000 0.012 0.236 0.752
#> SRR1199082 5 0.2583 0.66783 0.000 0.004 0.000 0.132 0.864
#> SRR1199083 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0290 0.77270 0.000 0.992 0.000 0.008 0.000
#> SRR1199088 3 0.1281 0.87657 0.000 0.000 0.956 0.012 0.032
#> SRR1199089 3 0.2351 0.82232 0.000 0.000 0.896 0.016 0.088
#> SRR1199090 5 0.3612 0.63166 0.000 0.008 0.000 0.228 0.764
#> SRR1199091 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.4183 0.35092 0.000 0.668 0.000 0.324 0.008
#> SRR1199094 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.4957 0.25119 0.000 0.624 0.000 0.332 0.044
#> SRR1199096 5 0.2293 0.67604 0.000 0.000 0.016 0.084 0.900
#> SRR1199097 3 0.5669 0.37945 0.000 0.052 0.604 0.320 0.024
#> SRR1199098 2 0.1041 0.77319 0.000 0.964 0.004 0.032 0.000
#> SRR1199099 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.1205 0.76795 0.000 0.956 0.000 0.040 0.004
#> SRR1199101 4 0.5636 0.09490 0.000 0.444 0.012 0.496 0.048
#> SRR1199102 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.2037 0.77100 0.000 0.920 0.012 0.064 0.004
#> SRR1199104 3 0.1281 0.87581 0.000 0.000 0.956 0.012 0.032
#> SRR1199105 5 0.2305 0.67584 0.000 0.000 0.012 0.092 0.896
#> SRR1199106 2 0.2951 0.72827 0.000 0.860 0.112 0.028 0.000
#> SRR1199107 2 0.0162 0.77021 0.000 0.996 0.000 0.004 0.000
#> SRR1199108 5 0.5475 0.34740 0.308 0.000 0.000 0.088 0.604
#> SRR1199109 2 0.0794 0.77060 0.000 0.972 0.000 0.028 0.000
#> SRR1199110 5 0.3504 0.65863 0.000 0.044 0.012 0.100 0.844
#> SRR1199111 2 0.2067 0.76509 0.000 0.920 0.032 0.048 0.000
#> SRR1199112 3 0.1082 0.87990 0.000 0.000 0.964 0.008 0.028
#> SRR1199113 5 0.4675 0.37511 0.000 0.000 0.380 0.020 0.600
#> SRR1199114 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 5 0.5414 0.08904 0.000 0.060 0.000 0.412 0.528
#> SRR1199117 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.99680 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.2304 0.76165 0.000 0.908 0.048 0.044 0.000
#> SRR1199120 3 0.1195 0.87867 0.000 0.000 0.960 0.012 0.028
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0000 0.90220 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199009 2 0.4554 0.54696 0.000 0.656 0.000 0.024 0.024 0.296
#> SRR1199010 6 0.3970 0.31632 0.000 0.012 0.000 0.260 0.016 0.712
#> SRR1199011 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199012 6 0.6581 0.00246 0.000 0.000 0.048 0.336 0.176 0.440
#> SRR1199013 5 0.0622 0.61817 0.000 0.000 0.000 0.012 0.980 0.008
#> SRR1199015 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 4 0.6153 0.38741 0.000 0.000 0.264 0.456 0.272 0.008
#> SRR1199017 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.6208 0.56704 0.000 0.620 0.100 0.060 0.028 0.192
#> SRR1199021 2 0.2342 0.77806 0.000 0.904 0.000 0.032 0.024 0.040
#> SRR1199022 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.3531 0.51923 0.000 0.000 0.000 0.672 0.328 0.000
#> SRR1199028 6 0.6822 0.20253 0.000 0.184 0.000 0.064 0.360 0.392
#> SRR1199029 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.1749 0.77137 0.000 0.932 0.000 0.024 0.008 0.036
#> SRR1199032 6 0.5290 0.32300 0.000 0.340 0.004 0.088 0.004 0.564
#> SRR1199033 6 0.4862 0.45124 0.000 0.300 0.000 0.052 0.016 0.632
#> SRR1199034 3 0.0146 0.90185 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199035 3 0.0146 0.90185 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199036 2 0.5297 0.63908 0.000 0.688 0.020 0.080 0.028 0.184
#> SRR1199037 4 0.6873 0.13060 0.000 0.000 0.052 0.392 0.260 0.296
#> SRR1199038 2 0.6552 0.48353 0.000 0.564 0.012 0.084 0.124 0.216
#> SRR1199040 2 0.3201 0.76469 0.000 0.856 0.040 0.028 0.004 0.072
#> SRR1199042 4 0.3672 0.50866 0.000 0.000 0.000 0.632 0.368 0.000
#> SRR1199043 2 0.5185 0.63604 0.000 0.680 0.020 0.076 0.016 0.208
#> SRR1199044 3 0.0000 0.90220 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199045 3 0.0000 0.90220 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199046 3 0.6073 0.19234 0.000 0.280 0.576 0.016 0.080 0.048
#> SRR1199047 6 0.6517 0.44674 0.000 0.116 0.008 0.184 0.116 0.576
#> SRR1199048 2 0.5673 0.02683 0.000 0.472 0.000 0.044 0.428 0.056
#> SRR1199049 1 0.3071 0.76851 0.804 0.000 0.000 0.180 0.000 0.016
#> SRR1199050 1 0.0458 0.98005 0.984 0.000 0.000 0.000 0.000 0.016
#> SRR1199051 2 0.5892 0.61660 0.000 0.652 0.076 0.068 0.024 0.180
#> SRR1199052 3 0.0146 0.90185 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199054 2 0.1962 0.77574 0.000 0.924 0.020 0.028 0.000 0.028
#> SRR1199056 5 0.6093 0.00725 0.000 0.072 0.000 0.072 0.504 0.352
#> SRR1199057 2 0.6277 0.18363 0.000 0.496 0.000 0.080 0.084 0.340
#> SRR1199059 2 0.0405 0.77705 0.000 0.988 0.000 0.004 0.000 0.008
#> SRR1199060 2 0.2624 0.73113 0.000 0.856 0.000 0.020 0.000 0.124
#> SRR1199061 2 0.1408 0.76852 0.000 0.944 0.000 0.020 0.000 0.036
#> SRR1199062 1 0.0458 0.98005 0.984 0.000 0.000 0.000 0.000 0.016
#> SRR1199064 1 0.0458 0.98005 0.984 0.000 0.000 0.000 0.000 0.016
#> SRR1199065 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 4 0.5979 0.24225 0.000 0.000 0.004 0.436 0.364 0.196
#> SRR1199075 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.1003 0.77578 0.000 0.964 0.000 0.016 0.000 0.020
#> SRR1199077 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 6 0.5066 0.24742 0.000 0.436 0.000 0.064 0.004 0.496
#> SRR1199079 2 0.3543 0.60849 0.000 0.768 0.000 0.032 0.000 0.200
#> SRR1199080 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.0976 0.61086 0.000 0.000 0.008 0.016 0.968 0.008
#> SRR1199082 5 0.2933 0.36106 0.000 0.000 0.000 0.200 0.796 0.004
#> SRR1199083 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0717 0.77966 0.000 0.976 0.000 0.008 0.000 0.016
#> SRR1199088 3 0.1897 0.87446 0.000 0.000 0.908 0.084 0.004 0.004
#> SRR1199089 3 0.3351 0.74889 0.000 0.000 0.800 0.160 0.040 0.000
#> SRR1199090 5 0.0914 0.61992 0.000 0.000 0.000 0.016 0.968 0.016
#> SRR1199091 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 6 0.4854 0.34690 0.000 0.436 0.000 0.024 0.020 0.520
#> SRR1199094 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 6 0.6284 0.37722 0.000 0.392 0.000 0.060 0.100 0.448
#> SRR1199096 4 0.3774 0.47465 0.000 0.000 0.000 0.592 0.408 0.000
#> SRR1199097 6 0.6440 0.07581 0.000 0.028 0.396 0.124 0.016 0.436
#> SRR1199098 2 0.1700 0.78244 0.000 0.928 0.000 0.024 0.000 0.048
#> SRR1199099 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.1633 0.76359 0.000 0.932 0.000 0.024 0.000 0.044
#> SRR1199101 6 0.5400 0.54625 0.000 0.180 0.008 0.124 0.024 0.664
#> SRR1199102 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.3455 0.76312 0.000 0.836 0.000 0.052 0.036 0.076
#> SRR1199104 3 0.1471 0.88698 0.000 0.000 0.932 0.064 0.004 0.000
#> SRR1199105 4 0.3797 0.46267 0.000 0.000 0.000 0.580 0.420 0.000
#> SRR1199106 2 0.3630 0.73386 0.000 0.816 0.100 0.020 0.000 0.064
#> SRR1199107 2 0.0520 0.77690 0.000 0.984 0.000 0.008 0.000 0.008
#> SRR1199108 4 0.5874 0.29164 0.188 0.000 0.000 0.552 0.244 0.016
#> SRR1199109 2 0.1434 0.77066 0.000 0.940 0.000 0.012 0.000 0.048
#> SRR1199110 5 0.5422 0.09829 0.000 0.068 0.000 0.284 0.608 0.040
#> SRR1199111 2 0.3624 0.73853 0.000 0.812 0.016 0.060 0.000 0.112
#> SRR1199112 3 0.1219 0.89238 0.000 0.000 0.948 0.048 0.004 0.000
#> SRR1199113 4 0.5998 0.36312 0.000 0.000 0.300 0.436 0.264 0.000
#> SRR1199114 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 6 0.5877 0.21084 0.000 0.016 0.000 0.172 0.268 0.544
#> SRR1199117 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.99204 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.2164 0.77652 0.000 0.912 0.016 0.028 0.000 0.044
#> SRR1199120 3 0.1644 0.88052 0.000 0.000 0.920 0.076 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)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds
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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.988 0.995 0.4718 0.526 0.526
#> 3 3 0.876 0.889 0.945 0.3488 0.824 0.669
#> 4 4 0.741 0.771 0.884 0.0796 0.938 0.843
#> 5 5 0.696 0.642 0.820 0.0611 0.958 0.886
#> 6 6 0.697 0.611 0.774 0.0351 0.964 0.894
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.000 1.000 0.000 1.000
#> SRR1199009 2 0.000 1.000 0.000 1.000
#> SRR1199010 2 0.000 1.000 0.000 1.000
#> SRR1199011 1 0.000 0.987 1.000 0.000
#> SRR1199012 2 0.000 1.000 0.000 1.000
#> SRR1199013 2 0.000 1.000 0.000 1.000
#> SRR1199015 1 0.000 0.987 1.000 0.000
#> SRR1199016 2 0.000 1.000 0.000 1.000
#> SRR1199017 1 0.000 0.987 1.000 0.000
#> SRR1199018 1 0.000 0.987 1.000 0.000
#> SRR1199019 1 0.000 0.987 1.000 0.000
#> SRR1199020 2 0.000 1.000 0.000 1.000
#> SRR1199021 2 0.000 1.000 0.000 1.000
#> SRR1199022 1 0.000 0.987 1.000 0.000
#> SRR1199023 1 0.000 0.987 1.000 0.000
#> SRR1199025 1 0.000 0.987 1.000 0.000
#> SRR1199026 1 0.000 0.987 1.000 0.000
#> SRR1199027 1 0.000 0.987 1.000 0.000
#> SRR1199028 2 0.000 1.000 0.000 1.000
#> SRR1199029 1 0.000 0.987 1.000 0.000
#> SRR1199031 2 0.000 1.000 0.000 1.000
#> SRR1199032 2 0.000 1.000 0.000 1.000
#> SRR1199033 2 0.000 1.000 0.000 1.000
#> SRR1199034 2 0.000 1.000 0.000 1.000
#> SRR1199035 2 0.000 1.000 0.000 1.000
#> SRR1199036 2 0.000 1.000 0.000 1.000
#> SRR1199037 2 0.000 1.000 0.000 1.000
#> SRR1199038 2 0.000 1.000 0.000 1.000
#> SRR1199040 2 0.000 1.000 0.000 1.000
#> SRR1199042 1 0.000 0.987 1.000 0.000
#> SRR1199043 2 0.000 1.000 0.000 1.000
#> SRR1199044 2 0.000 1.000 0.000 1.000
#> SRR1199045 2 0.000 1.000 0.000 1.000
#> SRR1199046 2 0.000 1.000 0.000 1.000
#> SRR1199047 2 0.000 1.000 0.000 1.000
#> SRR1199048 2 0.000 1.000 0.000 1.000
#> SRR1199049 1 0.000 0.987 1.000 0.000
#> SRR1199050 1 0.000 0.987 1.000 0.000
#> SRR1199051 2 0.000 1.000 0.000 1.000
#> SRR1199052 2 0.000 1.000 0.000 1.000
#> SRR1199054 2 0.000 1.000 0.000 1.000
#> SRR1199056 2 0.000 1.000 0.000 1.000
#> SRR1199057 2 0.000 1.000 0.000 1.000
#> SRR1199059 2 0.000 1.000 0.000 1.000
#> SRR1199060 2 0.000 1.000 0.000 1.000
#> SRR1199061 2 0.000 1.000 0.000 1.000
#> SRR1199062 1 0.000 0.987 1.000 0.000
#> SRR1199064 1 0.000 0.987 1.000 0.000
#> SRR1199065 1 0.000 0.987 1.000 0.000
#> SRR1199067 2 0.118 0.983 0.016 0.984
#> SRR1199075 1 0.000 0.987 1.000 0.000
#> SRR1199076 2 0.000 1.000 0.000 1.000
#> SRR1199077 1 0.000 0.987 1.000 0.000
#> SRR1199078 2 0.000 1.000 0.000 1.000
#> SRR1199079 2 0.000 1.000 0.000 1.000
#> SRR1199080 1 0.000 0.987 1.000 0.000
#> SRR1199081 2 0.000 1.000 0.000 1.000
#> SRR1199082 2 0.000 1.000 0.000 1.000
#> SRR1199083 1 0.000 0.987 1.000 0.000
#> SRR1199084 1 0.000 0.987 1.000 0.000
#> SRR1199085 1 0.000 0.987 1.000 0.000
#> SRR1199086 1 0.000 0.987 1.000 0.000
#> SRR1199087 2 0.000 1.000 0.000 1.000
#> SRR1199088 2 0.000 1.000 0.000 1.000
#> SRR1199089 2 0.000 1.000 0.000 1.000
#> SRR1199090 2 0.000 1.000 0.000 1.000
#> SRR1199091 1 0.000 0.987 1.000 0.000
#> SRR1199092 1 0.000 0.987 1.000 0.000
#> SRR1199093 2 0.000 1.000 0.000 1.000
#> SRR1199094 1 0.000 0.987 1.000 0.000
#> SRR1199095 2 0.000 1.000 0.000 1.000
#> SRR1199096 1 0.494 0.875 0.892 0.108
#> SRR1199097 2 0.000 1.000 0.000 1.000
#> SRR1199098 2 0.000 1.000 0.000 1.000
#> SRR1199099 1 0.000 0.987 1.000 0.000
#> SRR1199100 2 0.000 1.000 0.000 1.000
#> SRR1199101 2 0.000 1.000 0.000 1.000
#> SRR1199102 1 0.000 0.987 1.000 0.000
#> SRR1199103 2 0.000 1.000 0.000 1.000
#> SRR1199104 2 0.000 1.000 0.000 1.000
#> SRR1199105 1 0.929 0.482 0.656 0.344
#> SRR1199106 2 0.000 1.000 0.000 1.000
#> SRR1199107 2 0.000 1.000 0.000 1.000
#> SRR1199108 1 0.000 0.987 1.000 0.000
#> SRR1199109 2 0.000 1.000 0.000 1.000
#> SRR1199110 2 0.000 1.000 0.000 1.000
#> SRR1199111 2 0.000 1.000 0.000 1.000
#> SRR1199112 2 0.000 1.000 0.000 1.000
#> SRR1199113 2 0.000 1.000 0.000 1.000
#> SRR1199114 1 0.000 0.987 1.000 0.000
#> SRR1199115 1 0.000 0.987 1.000 0.000
#> SRR1199116 2 0.000 1.000 0.000 1.000
#> SRR1199117 1 0.000 0.987 1.000 0.000
#> SRR1199118 1 0.000 0.987 1.000 0.000
#> SRR1199119 2 0.000 1.000 0.000 1.000
#> SRR1199120 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
#> SRR1199002 3 0.1529 0.8632 0.000 0.040 0.960
#> SRR1199009 2 0.0424 0.9368 0.000 0.992 0.008
#> SRR1199010 2 0.1860 0.9214 0.000 0.948 0.052
#> SRR1199011 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199012 2 0.6295 0.0413 0.000 0.528 0.472
#> SRR1199013 2 0.2537 0.9005 0.000 0.920 0.080
#> SRR1199015 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199016 3 0.2537 0.8457 0.000 0.080 0.920
#> SRR1199017 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199020 2 0.3267 0.8646 0.000 0.884 0.116
#> SRR1199021 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199027 1 0.3752 0.8317 0.856 0.000 0.144
#> SRR1199028 2 0.0747 0.9354 0.000 0.984 0.016
#> SRR1199029 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199032 2 0.1964 0.9173 0.000 0.944 0.056
#> SRR1199033 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199034 3 0.1964 0.8598 0.000 0.056 0.944
#> SRR1199035 3 0.3192 0.8265 0.000 0.112 0.888
#> SRR1199036 2 0.0747 0.9355 0.000 0.984 0.016
#> SRR1199037 3 0.5968 0.4774 0.000 0.364 0.636
#> SRR1199038 2 0.2537 0.9006 0.000 0.920 0.080
#> SRR1199040 2 0.1529 0.9260 0.000 0.960 0.040
#> SRR1199042 1 0.2537 0.9144 0.920 0.000 0.080
#> SRR1199043 2 0.1860 0.9201 0.000 0.948 0.052
#> SRR1199044 3 0.1411 0.8635 0.000 0.036 0.964
#> SRR1199045 3 0.1643 0.8625 0.000 0.044 0.956
#> SRR1199046 2 0.5706 0.5176 0.000 0.680 0.320
#> SRR1199047 2 0.3619 0.8302 0.000 0.864 0.136
#> SRR1199048 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199049 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199050 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199051 2 0.3412 0.8557 0.000 0.876 0.124
#> SRR1199052 3 0.1964 0.8595 0.000 0.056 0.944
#> SRR1199054 2 0.0237 0.9370 0.000 0.996 0.004
#> SRR1199056 2 0.1163 0.9318 0.000 0.972 0.028
#> SRR1199057 2 0.1529 0.9259 0.000 0.960 0.040
#> SRR1199059 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199064 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199065 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199067 3 0.6330 0.3709 0.004 0.396 0.600
#> SRR1199075 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199078 2 0.0237 0.9370 0.000 0.996 0.004
#> SRR1199079 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199081 2 0.6280 0.0855 0.000 0.540 0.460
#> SRR1199082 2 0.2066 0.9122 0.000 0.940 0.060
#> SRR1199083 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199088 3 0.0892 0.8608 0.000 0.020 0.980
#> SRR1199089 3 0.0592 0.8584 0.000 0.012 0.988
#> SRR1199090 2 0.1411 0.9240 0.000 0.964 0.036
#> SRR1199091 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199093 2 0.0237 0.9368 0.000 0.996 0.004
#> SRR1199094 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199096 3 0.7334 0.4499 0.328 0.048 0.624
#> SRR1199097 3 0.5706 0.5689 0.000 0.320 0.680
#> SRR1199098 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199099 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199101 2 0.3038 0.8769 0.000 0.896 0.104
#> SRR1199102 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199103 2 0.0237 0.9368 0.000 0.996 0.004
#> SRR1199104 3 0.1289 0.8632 0.000 0.032 0.968
#> SRR1199105 3 0.9850 0.3407 0.324 0.264 0.412
#> SRR1199106 2 0.2261 0.9087 0.000 0.932 0.068
#> SRR1199107 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199108 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199109 2 0.0000 0.9369 0.000 1.000 0.000
#> SRR1199110 2 0.2625 0.9012 0.000 0.916 0.084
#> SRR1199111 2 0.0237 0.9368 0.000 0.996 0.004
#> SRR1199112 3 0.0237 0.8546 0.000 0.004 0.996
#> SRR1199113 3 0.0237 0.8546 0.000 0.004 0.996
#> SRR1199114 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199116 2 0.0747 0.9351 0.000 0.984 0.016
#> SRR1199117 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9931 1.000 0.000 0.000
#> SRR1199119 2 0.0747 0.9354 0.000 0.984 0.016
#> SRR1199120 3 0.0592 0.8584 0.000 0.012 0.988
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.1256 0.9077 0.000 0.028 0.964 0.008
#> SRR1199009 2 0.2111 0.8074 0.000 0.932 0.044 0.024
#> SRR1199010 2 0.5894 0.6156 0.000 0.692 0.108 0.200
#> SRR1199011 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.7721 0.1096 0.000 0.448 0.276 0.276
#> SRR1199013 2 0.6278 0.2263 0.000 0.532 0.060 0.408
#> SRR1199015 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.5136 0.7077 0.000 0.048 0.728 0.224
#> SRR1199017 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.4514 0.7504 0.000 0.800 0.136 0.064
#> SRR1199021 2 0.1406 0.8069 0.000 0.960 0.016 0.024
#> SRR1199022 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199027 1 0.6637 0.1712 0.572 0.000 0.104 0.324
#> SRR1199028 2 0.3991 0.7700 0.000 0.832 0.048 0.120
#> SRR1199029 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0336 0.8023 0.000 0.992 0.000 0.008
#> SRR1199032 2 0.3370 0.7932 0.000 0.872 0.080 0.048
#> SRR1199033 2 0.2256 0.8034 0.000 0.924 0.020 0.056
#> SRR1199034 3 0.1489 0.8925 0.000 0.044 0.952 0.004
#> SRR1199035 3 0.3810 0.6497 0.000 0.188 0.804 0.008
#> SRR1199036 2 0.2987 0.7890 0.000 0.880 0.104 0.016
#> SRR1199037 2 0.7613 0.1078 0.000 0.448 0.340 0.212
#> SRR1199038 2 0.4614 0.7414 0.000 0.792 0.144 0.064
#> SRR1199040 2 0.2002 0.8066 0.000 0.936 0.044 0.020
#> SRR1199042 4 0.5530 0.4117 0.336 0.000 0.032 0.632
#> SRR1199043 2 0.3266 0.7849 0.000 0.868 0.108 0.024
#> SRR1199044 3 0.1388 0.9066 0.000 0.028 0.960 0.012
#> SRR1199045 3 0.0336 0.9072 0.000 0.008 0.992 0.000
#> SRR1199046 2 0.5926 0.5165 0.000 0.632 0.308 0.060
#> SRR1199047 2 0.6267 0.5720 0.000 0.664 0.188 0.148
#> SRR1199048 2 0.1474 0.8027 0.000 0.948 0.000 0.052
#> SRR1199049 1 0.0336 0.9731 0.992 0.000 0.000 0.008
#> SRR1199050 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.4149 0.7514 0.000 0.812 0.152 0.036
#> SRR1199052 3 0.1489 0.8950 0.000 0.044 0.952 0.004
#> SRR1199054 2 0.1256 0.8080 0.000 0.964 0.028 0.008
#> SRR1199056 2 0.5598 0.6256 0.000 0.704 0.076 0.220
#> SRR1199057 2 0.3935 0.7824 0.000 0.840 0.060 0.100
#> SRR1199059 2 0.0188 0.8019 0.000 0.996 0.000 0.004
#> SRR1199060 2 0.0524 0.8041 0.000 0.988 0.004 0.008
#> SRR1199061 2 0.0469 0.8028 0.000 0.988 0.000 0.012
#> SRR1199062 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199064 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199065 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.8068 -0.1708 0.004 0.348 0.344 0.304
#> SRR1199075 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0188 0.8019 0.000 0.996 0.000 0.004
#> SRR1199077 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.2670 0.8006 0.000 0.904 0.024 0.072
#> SRR1199079 2 0.1118 0.8049 0.000 0.964 0.000 0.036
#> SRR1199080 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199081 2 0.7827 -0.0263 0.000 0.408 0.316 0.276
#> SRR1199082 4 0.6211 -0.1743 0.000 0.460 0.052 0.488
#> SRR1199083 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0336 0.8028 0.000 0.992 0.000 0.008
#> SRR1199088 3 0.1388 0.9050 0.000 0.012 0.960 0.028
#> SRR1199089 3 0.1489 0.8989 0.000 0.004 0.952 0.044
#> SRR1199090 2 0.5853 0.1618 0.000 0.508 0.032 0.460
#> SRR1199091 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.1888 0.8068 0.000 0.940 0.016 0.044
#> SRR1199094 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.2741 0.7947 0.000 0.892 0.012 0.096
#> SRR1199096 4 0.6289 0.4690 0.124 0.024 0.144 0.708
#> SRR1199097 2 0.6558 0.1644 0.000 0.472 0.452 0.076
#> SRR1199098 2 0.0524 0.8039 0.000 0.988 0.004 0.008
#> SRR1199099 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0188 0.8020 0.000 0.996 0.000 0.004
#> SRR1199101 2 0.5000 0.7131 0.000 0.772 0.128 0.100
#> SRR1199102 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.1174 0.8066 0.000 0.968 0.012 0.020
#> SRR1199104 3 0.0707 0.9052 0.000 0.000 0.980 0.020
#> SRR1199105 4 0.4719 0.4902 0.056 0.044 0.076 0.824
#> SRR1199106 2 0.2918 0.7852 0.000 0.876 0.116 0.008
#> SRR1199107 2 0.0336 0.8026 0.000 0.992 0.000 0.008
#> SRR1199108 1 0.2530 0.8512 0.888 0.000 0.000 0.112
#> SRR1199109 2 0.0469 0.8026 0.000 0.988 0.000 0.012
#> SRR1199110 2 0.6157 0.5519 0.000 0.660 0.108 0.232
#> SRR1199111 2 0.1182 0.8066 0.000 0.968 0.016 0.016
#> SRR1199112 3 0.0336 0.9041 0.000 0.000 0.992 0.008
#> SRR1199113 3 0.3528 0.7822 0.000 0.000 0.808 0.192
#> SRR1199114 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.4840 0.6598 0.000 0.732 0.028 0.240
#> SRR1199117 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9809 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0895 0.8069 0.000 0.976 0.020 0.004
#> SRR1199120 3 0.0817 0.9042 0.000 0.000 0.976 0.024
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.1808 0.7660 0.000 0.012 0.936 0.044 0.008
#> SRR1199009 2 0.4178 0.6951 0.000 0.808 0.084 0.088 0.020
#> SRR1199010 2 0.6777 0.2889 0.000 0.580 0.080 0.240 0.100
#> SRR1199011 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 4 0.8549 0.3993 0.000 0.260 0.260 0.288 0.192
#> SRR1199013 2 0.7397 -0.2195 0.000 0.424 0.048 0.188 0.340
#> SRR1199015 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.6755 0.3405 0.000 0.068 0.596 0.144 0.192
#> SRR1199017 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.5617 0.5929 0.000 0.696 0.124 0.148 0.032
#> SRR1199021 2 0.3613 0.7103 0.000 0.848 0.048 0.076 0.028
#> SRR1199022 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 1 0.7538 -0.0723 0.464 0.000 0.064 0.224 0.248
#> SRR1199028 2 0.6135 0.5209 0.000 0.652 0.044 0.136 0.168
#> SRR1199029 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.1731 0.7097 0.000 0.940 0.008 0.040 0.012
#> SRR1199032 2 0.5690 0.6037 0.000 0.688 0.056 0.188 0.068
#> SRR1199033 2 0.4516 0.6635 0.000 0.776 0.024 0.144 0.056
#> SRR1199034 3 0.1911 0.7535 0.000 0.028 0.932 0.036 0.004
#> SRR1199035 3 0.4288 0.4300 0.000 0.160 0.776 0.056 0.008
#> SRR1199036 2 0.5224 0.6517 0.000 0.740 0.104 0.112 0.044
#> SRR1199037 2 0.8407 -0.5259 0.000 0.312 0.276 0.264 0.148
#> SRR1199038 2 0.6473 0.4577 0.000 0.624 0.168 0.152 0.056
#> SRR1199040 2 0.3753 0.7043 0.000 0.832 0.076 0.080 0.012
#> SRR1199042 5 0.6757 0.1617 0.236 0.000 0.032 0.180 0.552
#> SRR1199043 2 0.5437 0.6154 0.000 0.704 0.112 0.160 0.024
#> SRR1199044 3 0.1386 0.7713 0.000 0.000 0.952 0.032 0.016
#> SRR1199045 3 0.0324 0.7672 0.000 0.000 0.992 0.004 0.004
#> SRR1199046 2 0.6985 -0.1079 0.000 0.488 0.320 0.156 0.036
#> SRR1199047 2 0.7315 0.2103 0.000 0.544 0.144 0.200 0.112
#> SRR1199048 2 0.3479 0.6911 0.000 0.836 0.000 0.080 0.084
#> SRR1199049 1 0.0865 0.9503 0.972 0.000 0.000 0.004 0.024
#> SRR1199050 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.5555 0.6069 0.000 0.704 0.160 0.096 0.040
#> SRR1199052 3 0.1865 0.7551 0.000 0.024 0.936 0.032 0.008
#> SRR1199054 2 0.4026 0.6988 0.000 0.816 0.080 0.088 0.016
#> SRR1199056 2 0.7153 0.1552 0.000 0.524 0.056 0.240 0.180
#> SRR1199057 2 0.5649 0.6368 0.000 0.704 0.068 0.156 0.072
#> SRR1199059 2 0.1365 0.7039 0.000 0.952 0.004 0.040 0.004
#> SRR1199060 2 0.2507 0.7127 0.000 0.900 0.012 0.072 0.016
#> SRR1199061 2 0.1251 0.7046 0.000 0.956 0.000 0.036 0.008
#> SRR1199062 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199065 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 4 0.8445 0.3281 0.000 0.196 0.224 0.352 0.228
#> SRR1199075 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0798 0.7016 0.000 0.976 0.000 0.016 0.008
#> SRR1199077 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.4096 0.6657 0.000 0.796 0.040 0.148 0.016
#> SRR1199079 2 0.1894 0.7099 0.000 0.920 0.000 0.072 0.008
#> SRR1199080 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 2 0.8522 -0.5253 0.000 0.312 0.256 0.192 0.240
#> SRR1199082 5 0.7520 -0.1549 0.000 0.284 0.052 0.228 0.436
#> SRR1199083 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.1697 0.7096 0.000 0.932 0.000 0.060 0.008
#> SRR1199088 3 0.2550 0.7493 0.000 0.004 0.892 0.084 0.020
#> SRR1199089 3 0.3727 0.7031 0.000 0.004 0.824 0.104 0.068
#> SRR1199090 5 0.6764 -0.1676 0.000 0.400 0.024 0.136 0.440
#> SRR1199091 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.4078 0.6701 0.000 0.776 0.004 0.180 0.040
#> SRR1199094 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.4398 0.6601 0.000 0.780 0.008 0.112 0.100
#> SRR1199096 5 0.6673 0.1232 0.032 0.020 0.108 0.236 0.604
#> SRR1199097 3 0.7531 -0.3809 0.000 0.312 0.440 0.184 0.064
#> SRR1199098 2 0.1740 0.7072 0.000 0.932 0.012 0.056 0.000
#> SRR1199099 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.1697 0.7079 0.000 0.932 0.000 0.060 0.008
#> SRR1199101 2 0.6322 0.4054 0.000 0.608 0.088 0.252 0.052
#> SRR1199102 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.2958 0.7139 0.000 0.880 0.024 0.076 0.020
#> SRR1199104 3 0.1626 0.7687 0.000 0.000 0.940 0.044 0.016
#> SRR1199105 5 0.3342 0.2053 0.016 0.016 0.032 0.064 0.872
#> SRR1199106 2 0.4102 0.6770 0.000 0.796 0.120 0.080 0.004
#> SRR1199107 2 0.1862 0.7073 0.000 0.932 0.004 0.048 0.016
#> SRR1199108 1 0.3608 0.7604 0.812 0.000 0.000 0.040 0.148
#> SRR1199109 2 0.2666 0.7132 0.000 0.892 0.020 0.076 0.012
#> SRR1199110 2 0.7578 0.0412 0.000 0.484 0.096 0.160 0.260
#> SRR1199111 2 0.3556 0.7090 0.000 0.840 0.044 0.104 0.012
#> SRR1199112 3 0.1579 0.7650 0.000 0.000 0.944 0.032 0.024
#> SRR1199113 3 0.5394 0.4988 0.000 0.000 0.660 0.132 0.208
#> SRR1199114 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.6539 0.2572 0.000 0.552 0.020 0.268 0.160
#> SRR1199117 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9758 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.3727 0.7034 0.000 0.824 0.068 0.104 0.004
#> SRR1199120 3 0.2473 0.7545 0.000 0.000 0.896 0.072 0.032
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.3127 0.7189 0.000 0.056 0.860 0.020 0.004 0.060
#> SRR1199009 2 0.5299 0.6317 0.000 0.688 0.080 0.048 0.008 0.176
#> SRR1199010 2 0.7693 0.1319 0.000 0.452 0.056 0.168 0.092 0.232
#> SRR1199011 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.8772 -0.4255 0.000 0.280 0.188 0.168 0.124 0.240
#> SRR1199013 5 0.8030 0.0127 0.000 0.276 0.052 0.208 0.360 0.104
#> SRR1199015 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.7142 0.3098 0.000 0.032 0.532 0.180 0.140 0.116
#> SRR1199017 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.6780 0.5129 0.000 0.596 0.116 0.104 0.052 0.132
#> SRR1199021 2 0.4400 0.6659 0.000 0.776 0.040 0.032 0.024 0.128
#> SRR1199022 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.7614 0.0000 0.308 0.000 0.060 0.348 0.248 0.036
#> SRR1199028 2 0.6587 0.5045 0.000 0.596 0.036 0.104 0.084 0.180
#> SRR1199029 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.2871 0.6805 0.000 0.864 0.008 0.016 0.012 0.100
#> SRR1199032 2 0.6134 0.5491 0.000 0.628 0.064 0.072 0.036 0.200
#> SRR1199033 2 0.5511 0.5971 0.000 0.676 0.020 0.060 0.056 0.188
#> SRR1199034 3 0.3306 0.7007 0.000 0.076 0.852 0.020 0.012 0.040
#> SRR1199035 3 0.4798 0.5300 0.000 0.164 0.728 0.024 0.012 0.072
#> SRR1199036 2 0.5884 0.5743 0.000 0.656 0.104 0.048 0.028 0.164
#> SRR1199037 2 0.8529 -0.4255 0.000 0.288 0.208 0.112 0.108 0.284
#> SRR1199038 2 0.7390 0.4062 0.000 0.528 0.136 0.116 0.064 0.156
#> SRR1199040 2 0.4037 0.6730 0.000 0.792 0.084 0.004 0.020 0.100
#> SRR1199042 5 0.6592 -0.3552 0.180 0.000 0.004 0.352 0.428 0.036
#> SRR1199043 2 0.5843 0.5837 0.000 0.648 0.100 0.048 0.020 0.184
#> SRR1199044 3 0.2766 0.7323 0.000 0.024 0.888 0.032 0.012 0.044
#> SRR1199045 3 0.1854 0.7308 0.000 0.028 0.932 0.016 0.004 0.020
#> SRR1199046 2 0.7451 -0.0947 0.000 0.408 0.340 0.072 0.048 0.132
#> SRR1199047 2 0.7506 0.1905 0.000 0.476 0.112 0.084 0.072 0.256
#> SRR1199048 2 0.4599 0.6406 0.000 0.748 0.000 0.044 0.092 0.116
#> SRR1199049 1 0.1713 0.8830 0.928 0.000 0.000 0.044 0.028 0.000
#> SRR1199050 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.6081 0.5725 0.000 0.644 0.120 0.060 0.028 0.148
#> SRR1199052 3 0.2663 0.7221 0.000 0.052 0.884 0.008 0.004 0.052
#> SRR1199054 2 0.4182 0.6680 0.000 0.788 0.092 0.024 0.008 0.088
#> SRR1199056 2 0.7899 0.1560 0.000 0.448 0.080 0.140 0.112 0.220
#> SRR1199057 2 0.6512 0.4824 0.000 0.596 0.040 0.068 0.096 0.200
#> SRR1199059 2 0.1296 0.6717 0.000 0.948 0.004 0.000 0.004 0.044
#> SRR1199060 2 0.3570 0.6808 0.000 0.816 0.020 0.024 0.008 0.132
#> SRR1199061 2 0.2308 0.6807 0.000 0.896 0.000 0.016 0.012 0.076
#> SRR1199062 1 0.0146 0.9815 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1199064 1 0.0146 0.9815 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1199065 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 6 0.8791 0.0000 0.004 0.156 0.144 0.276 0.136 0.284
#> SRR1199075 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.1477 0.6679 0.000 0.940 0.000 0.008 0.004 0.048
#> SRR1199077 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.5145 0.6307 0.000 0.708 0.032 0.056 0.028 0.176
#> SRR1199079 2 0.3061 0.6780 0.000 0.840 0.004 0.020 0.008 0.128
#> SRR1199080 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.8770 -0.1643 0.000 0.216 0.204 0.116 0.284 0.180
#> SRR1199082 5 0.7827 0.0318 0.000 0.220 0.028 0.224 0.396 0.132
#> SRR1199083 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.2154 0.6795 0.000 0.908 0.004 0.020 0.004 0.064
#> SRR1199088 3 0.3827 0.6954 0.000 0.008 0.820 0.060 0.036 0.076
#> SRR1199089 3 0.4534 0.6515 0.000 0.000 0.760 0.072 0.072 0.096
#> SRR1199090 5 0.7668 0.0458 0.000 0.248 0.032 0.164 0.432 0.124
#> SRR1199091 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.5397 0.6205 0.000 0.676 0.024 0.060 0.036 0.204
#> SRR1199094 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.5532 0.5705 0.000 0.660 0.004 0.108 0.048 0.180
#> SRR1199096 5 0.6941 0.0519 0.028 0.012 0.080 0.320 0.496 0.064
#> SRR1199097 3 0.7688 -0.2422 0.000 0.340 0.352 0.108 0.028 0.172
#> SRR1199098 2 0.2599 0.6763 0.000 0.888 0.028 0.008 0.008 0.068
#> SRR1199099 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.2776 0.6785 0.000 0.860 0.004 0.020 0.004 0.112
#> SRR1199101 2 0.7626 0.1616 0.000 0.448 0.104 0.140 0.048 0.260
#> SRR1199102 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.3410 0.6850 0.000 0.836 0.036 0.012 0.012 0.104
#> SRR1199104 3 0.3463 0.7135 0.000 0.016 0.844 0.036 0.024 0.080
#> SRR1199105 5 0.2442 0.1244 0.004 0.024 0.024 0.008 0.908 0.032
#> SRR1199106 2 0.4278 0.6627 0.000 0.768 0.112 0.016 0.004 0.100
#> SRR1199107 2 0.1932 0.6787 0.000 0.912 0.004 0.004 0.004 0.076
#> SRR1199108 1 0.4032 0.5617 0.780 0.000 0.000 0.120 0.084 0.016
#> SRR1199109 2 0.2043 0.6794 0.000 0.912 0.012 0.000 0.012 0.064
#> SRR1199110 2 0.7844 -0.1066 0.000 0.412 0.036 0.172 0.240 0.140
#> SRR1199111 2 0.3852 0.6805 0.000 0.808 0.068 0.016 0.008 0.100
#> SRR1199112 3 0.2507 0.7197 0.000 0.000 0.892 0.036 0.016 0.056
#> SRR1199113 3 0.6300 0.4327 0.000 0.000 0.584 0.164 0.148 0.104
#> SRR1199114 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.7415 0.1363 0.000 0.464 0.016 0.204 0.144 0.172
#> SRR1199117 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9862 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.3406 0.6841 0.000 0.844 0.048 0.012 0.016 0.080
#> SRR1199120 3 0.3268 0.7126 0.000 0.008 0.852 0.056 0.016 0.068
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)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds
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)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds
get_signatures(res, k = 6, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds
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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'CV' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.579 0.792 0.911 0.4825 0.496 0.496
#> 3 3 0.567 0.705 0.871 0.2447 0.826 0.670
#> 4 4 0.558 0.703 0.819 0.0410 0.972 0.930
#> 5 5 0.573 0.622 0.820 0.0120 0.980 0.948
#> 6 6 0.580 0.624 0.810 0.0114 1.000 1.000
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.0000 0.8658 0.000 1.000
#> SRR1199009 2 0.0000 0.8658 0.000 1.000
#> SRR1199010 2 0.9988 0.1870 0.480 0.520
#> SRR1199011 1 0.0000 0.9187 1.000 0.000
#> SRR1199012 1 0.7056 0.7259 0.808 0.192
#> SRR1199013 1 0.9608 0.3153 0.616 0.384
#> SRR1199015 1 0.0000 0.9187 1.000 0.000
#> SRR1199016 1 0.3431 0.8692 0.936 0.064
#> SRR1199017 1 0.0000 0.9187 1.000 0.000
#> SRR1199018 1 0.0000 0.9187 1.000 0.000
#> SRR1199019 1 0.0000 0.9187 1.000 0.000
#> SRR1199020 2 0.6887 0.7642 0.184 0.816
#> SRR1199021 2 0.0000 0.8658 0.000 1.000
#> SRR1199022 1 0.0000 0.9187 1.000 0.000
#> SRR1199023 1 0.0000 0.9187 1.000 0.000
#> SRR1199025 1 0.0000 0.9187 1.000 0.000
#> SRR1199026 1 0.0000 0.9187 1.000 0.000
#> SRR1199027 1 0.0000 0.9187 1.000 0.000
#> SRR1199028 2 0.9000 0.6011 0.316 0.684
#> SRR1199029 1 0.0000 0.9187 1.000 0.000
#> SRR1199031 2 0.0000 0.8658 0.000 1.000
#> SRR1199032 2 0.6438 0.7793 0.164 0.836
#> SRR1199033 2 0.4161 0.8293 0.084 0.916
#> SRR1199034 2 0.0000 0.8658 0.000 1.000
#> SRR1199035 2 0.0000 0.8658 0.000 1.000
#> SRR1199036 2 0.0938 0.8629 0.012 0.988
#> SRR1199037 1 0.6048 0.7827 0.852 0.148
#> SRR1199038 2 0.6247 0.7868 0.156 0.844
#> SRR1199040 2 0.0000 0.8658 0.000 1.000
#> SRR1199042 1 0.0000 0.9187 1.000 0.000
#> SRR1199043 2 0.8955 0.6030 0.312 0.688
#> SRR1199044 2 0.4161 0.8317 0.084 0.916
#> SRR1199045 2 0.0000 0.8658 0.000 1.000
#> SRR1199046 2 0.5946 0.7954 0.144 0.856
#> SRR1199047 2 0.8555 0.6422 0.280 0.720
#> SRR1199048 2 0.0000 0.8658 0.000 1.000
#> SRR1199049 1 0.0000 0.9187 1.000 0.000
#> SRR1199050 1 0.0000 0.9187 1.000 0.000
#> SRR1199051 2 0.3733 0.8381 0.072 0.928
#> SRR1199052 2 0.0000 0.8658 0.000 1.000
#> SRR1199054 2 0.0000 0.8658 0.000 1.000
#> SRR1199056 2 0.9988 0.1879 0.480 0.520
#> SRR1199057 2 0.0376 0.8650 0.004 0.996
#> SRR1199059 2 0.0000 0.8658 0.000 1.000
#> SRR1199060 2 0.0000 0.8658 0.000 1.000
#> SRR1199061 2 0.0000 0.8658 0.000 1.000
#> SRR1199062 1 0.0000 0.9187 1.000 0.000
#> SRR1199064 1 0.0000 0.9187 1.000 0.000
#> SRR1199065 1 0.0000 0.9187 1.000 0.000
#> SRR1199067 1 0.0000 0.9187 1.000 0.000
#> SRR1199075 1 0.0000 0.9187 1.000 0.000
#> SRR1199076 2 0.0000 0.8658 0.000 1.000
#> SRR1199077 1 0.0000 0.9187 1.000 0.000
#> SRR1199078 2 0.8608 0.6505 0.284 0.716
#> SRR1199079 2 0.0376 0.8648 0.004 0.996
#> SRR1199080 1 0.0000 0.9187 1.000 0.000
#> SRR1199081 2 0.7602 0.7276 0.220 0.780
#> SRR1199082 1 0.9608 0.3154 0.616 0.384
#> SRR1199083 1 0.0000 0.9187 1.000 0.000
#> SRR1199084 1 0.0000 0.9187 1.000 0.000
#> SRR1199085 1 0.0000 0.9187 1.000 0.000
#> SRR1199086 1 0.0000 0.9187 1.000 0.000
#> SRR1199087 2 0.0000 0.8658 0.000 1.000
#> SRR1199088 1 0.7376 0.7030 0.792 0.208
#> SRR1199089 1 0.9608 0.3165 0.616 0.384
#> SRR1199090 2 0.9996 0.1546 0.488 0.512
#> SRR1199091 1 0.0000 0.9187 1.000 0.000
#> SRR1199092 1 0.0000 0.9187 1.000 0.000
#> SRR1199093 2 0.9427 0.5167 0.360 0.640
#> SRR1199094 1 0.0000 0.9187 1.000 0.000
#> SRR1199095 2 0.9248 0.5583 0.340 0.660
#> SRR1199096 1 0.0000 0.9187 1.000 0.000
#> SRR1199097 2 1.0000 0.0794 0.500 0.500
#> SRR1199098 2 0.0000 0.8658 0.000 1.000
#> SRR1199099 1 0.0000 0.9187 1.000 0.000
#> SRR1199100 2 0.0938 0.8625 0.012 0.988
#> SRR1199101 1 0.9866 0.1463 0.568 0.432
#> SRR1199102 1 0.0000 0.9187 1.000 0.000
#> SRR1199103 2 0.0000 0.8658 0.000 1.000
#> SRR1199104 1 0.8081 0.6387 0.752 0.248
#> SRR1199105 1 0.0000 0.9187 1.000 0.000
#> SRR1199106 2 0.0000 0.8658 0.000 1.000
#> SRR1199107 2 0.0000 0.8658 0.000 1.000
#> SRR1199108 1 0.0000 0.9187 1.000 0.000
#> SRR1199109 2 0.0000 0.8658 0.000 1.000
#> SRR1199110 2 0.9000 0.6013 0.316 0.684
#> SRR1199111 2 0.0000 0.8658 0.000 1.000
#> SRR1199112 1 0.9323 0.4234 0.652 0.348
#> SRR1199113 1 0.4161 0.8516 0.916 0.084
#> SRR1199114 1 0.0000 0.9187 1.000 0.000
#> SRR1199115 1 0.0000 0.9187 1.000 0.000
#> SRR1199116 1 0.8016 0.6444 0.756 0.244
#> SRR1199117 1 0.0000 0.9187 1.000 0.000
#> SRR1199118 1 0.0000 0.9187 1.000 0.000
#> SRR1199119 2 0.0000 0.8658 0.000 1.000
#> SRR1199120 1 0.4939 0.8283 0.892 0.108
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.0424 0.7073 0.000 0.008 0.992
#> SRR1199009 2 0.1964 0.7634 0.000 0.944 0.056
#> SRR1199010 2 0.6309 0.0781 0.500 0.500 0.000
#> SRR1199011 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199012 1 0.5471 0.7187 0.812 0.128 0.060
#> SRR1199013 1 0.6045 0.3094 0.620 0.380 0.000
#> SRR1199015 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199016 1 0.4555 0.6873 0.800 0.000 0.200
#> SRR1199017 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199020 2 0.4465 0.6744 0.176 0.820 0.004
#> SRR1199021 2 0.4654 0.7101 0.000 0.792 0.208
#> SRR1199022 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199027 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199028 2 0.9744 0.1792 0.236 0.428 0.336
#> SRR1199029 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199031 2 0.4399 0.7203 0.000 0.812 0.188
#> SRR1199032 2 0.7158 0.5227 0.032 0.596 0.372
#> SRR1199033 2 0.5524 0.6464 0.040 0.796 0.164
#> SRR1199034 3 0.0000 0.7098 0.000 0.000 1.000
#> SRR1199035 3 0.0000 0.7098 0.000 0.000 1.000
#> SRR1199036 2 0.2590 0.7591 0.004 0.924 0.072
#> SRR1199037 1 0.5295 0.7138 0.808 0.036 0.156
#> SRR1199038 2 0.8850 0.3883 0.128 0.516 0.356
#> SRR1199040 2 0.4654 0.7123 0.000 0.792 0.208
#> SRR1199042 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199043 2 0.8079 0.5912 0.108 0.624 0.268
#> SRR1199044 3 0.0000 0.7098 0.000 0.000 1.000
#> SRR1199045 3 0.0000 0.7098 0.000 0.000 1.000
#> SRR1199046 3 0.3618 0.6295 0.012 0.104 0.884
#> SRR1199047 2 0.5690 0.5430 0.288 0.708 0.004
#> SRR1199048 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199049 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199050 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199051 3 0.6309 -0.3639 0.000 0.500 0.500
#> SRR1199052 3 0.0000 0.7098 0.000 0.000 1.000
#> SRR1199054 2 0.4974 0.6634 0.000 0.764 0.236
#> SRR1199056 1 0.7268 0.0147 0.524 0.448 0.028
#> SRR1199057 2 0.6280 0.2168 0.000 0.540 0.460
#> SRR1199059 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199060 2 0.0237 0.7670 0.000 0.996 0.004
#> SRR1199061 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199064 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199065 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199067 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199075 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199078 2 0.5363 0.5761 0.276 0.724 0.000
#> SRR1199079 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199081 3 0.5663 0.6548 0.096 0.096 0.808
#> SRR1199082 1 0.6045 0.3093 0.620 0.380 0.000
#> SRR1199083 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199088 3 0.6140 0.3866 0.404 0.000 0.596
#> SRR1199089 3 0.6126 0.3951 0.400 0.000 0.600
#> SRR1199090 1 0.8799 0.2794 0.556 0.300 0.144
#> SRR1199091 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199093 2 0.5785 0.5073 0.332 0.668 0.000
#> SRR1199094 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199095 2 0.6333 0.5015 0.332 0.656 0.012
#> SRR1199096 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199097 3 0.3826 0.6924 0.124 0.008 0.868
#> SRR1199098 2 0.4062 0.7316 0.000 0.836 0.164
#> SRR1199099 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199101 1 0.9457 0.1039 0.500 0.264 0.236
#> SRR1199102 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199103 2 0.3941 0.7353 0.000 0.844 0.156
#> SRR1199104 3 0.5733 0.5426 0.324 0.000 0.676
#> SRR1199105 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199106 2 0.5291 0.6689 0.000 0.732 0.268
#> SRR1199107 2 0.0000 0.7669 0.000 1.000 0.000
#> SRR1199108 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199109 2 0.0237 0.7670 0.000 0.996 0.004
#> SRR1199110 2 0.6169 0.4663 0.360 0.636 0.004
#> SRR1199111 2 0.1529 0.7636 0.000 0.960 0.040
#> SRR1199112 3 0.4178 0.6713 0.172 0.000 0.828
#> SRR1199113 1 0.4887 0.6436 0.772 0.000 0.228
#> SRR1199114 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199116 1 0.5098 0.6100 0.752 0.248 0.000
#> SRR1199117 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9100 1.000 0.000 0.000
#> SRR1199119 2 0.0892 0.7670 0.000 0.980 0.020
#> SRR1199120 3 0.6286 0.2096 0.464 0.000 0.536
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0336 0.7045 0.000 0.008 0.992 NA
#> SRR1199009 2 0.3550 0.7481 0.000 0.860 0.044 NA
#> SRR1199010 1 0.7836 -0.1497 0.408 0.304 0.000 NA
#> SRR1199011 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199012 1 0.4606 0.7006 0.808 0.124 0.060 NA
#> SRR1199013 1 0.5511 0.3177 0.620 0.352 0.000 NA
#> SRR1199015 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199016 1 0.3610 0.6683 0.800 0.000 0.200 NA
#> SRR1199017 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199018 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199019 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199020 2 0.6155 0.6571 0.176 0.676 0.000 NA
#> SRR1199021 2 0.6472 0.6983 0.000 0.640 0.148 NA
#> SRR1199022 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199023 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199025 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199026 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199027 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199028 2 0.8555 0.2798 0.252 0.432 0.280 NA
#> SRR1199029 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199031 2 0.5905 0.7119 0.000 0.700 0.156 NA
#> SRR1199032 2 0.7949 0.6102 0.032 0.520 0.288 NA
#> SRR1199033 2 0.6050 0.6354 0.012 0.708 0.104 NA
#> SRR1199034 3 0.0000 0.7075 0.000 0.000 1.000 NA
#> SRR1199035 3 0.0000 0.7075 0.000 0.000 1.000 NA
#> SRR1199036 2 0.4514 0.7428 0.000 0.796 0.056 NA
#> SRR1199037 1 0.4197 0.6964 0.808 0.036 0.156 NA
#> SRR1199038 2 0.8853 0.4793 0.120 0.460 0.300 NA
#> SRR1199040 2 0.6576 0.7043 0.000 0.632 0.168 NA
#> SRR1199042 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199043 2 0.7636 0.6761 0.068 0.616 0.188 NA
#> SRR1199044 3 0.0000 0.7075 0.000 0.000 1.000 NA
#> SRR1199045 3 0.0000 0.7075 0.000 0.000 1.000 NA
#> SRR1199046 3 0.3601 0.5909 0.012 0.100 0.864 NA
#> SRR1199047 2 0.6327 0.5806 0.228 0.648 0.000 NA
#> SRR1199048 2 0.4643 0.7259 0.000 0.656 0.000 NA
#> SRR1199049 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199050 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199051 2 0.7153 0.4550 0.000 0.444 0.424 NA
#> SRR1199052 3 0.0000 0.7075 0.000 0.000 1.000 NA
#> SRR1199054 2 0.5985 0.7029 0.000 0.692 0.168 NA
#> SRR1199056 1 0.7554 -0.1432 0.460 0.416 0.028 NA
#> SRR1199057 2 0.7357 0.4372 0.000 0.500 0.320 NA
#> SRR1199059 2 0.3610 0.7299 0.000 0.800 0.000 NA
#> SRR1199060 2 0.3219 0.7104 0.000 0.836 0.000 NA
#> SRR1199061 2 0.3873 0.7374 0.000 0.772 0.000 NA
#> SRR1199062 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199064 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199065 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199067 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199075 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199076 2 0.3726 0.7293 0.000 0.788 0.000 NA
#> SRR1199077 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199078 2 0.5491 0.5741 0.260 0.688 0.000 NA
#> SRR1199079 2 0.2704 0.7230 0.000 0.876 0.000 NA
#> SRR1199080 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199081 3 0.5696 0.6325 0.100 0.096 0.764 NA
#> SRR1199082 1 0.5599 0.3074 0.616 0.352 0.000 NA
#> SRR1199083 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199084 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199085 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199086 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199087 2 0.3219 0.7405 0.000 0.836 0.000 NA
#> SRR1199088 3 0.4907 0.3933 0.420 0.000 0.580 NA
#> SRR1199089 3 0.4855 0.4374 0.400 0.000 0.600 NA
#> SRR1199090 1 0.8197 0.0711 0.448 0.128 0.048 NA
#> SRR1199091 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199092 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199093 2 0.6162 0.5155 0.304 0.620 0.000 NA
#> SRR1199094 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199095 2 0.6111 0.4872 0.324 0.616 0.004 NA
#> SRR1199096 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199097 3 0.4631 0.6678 0.144 0.008 0.800 NA
#> SRR1199098 2 0.5462 0.7258 0.000 0.736 0.112 NA
#> SRR1199099 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199100 2 0.2589 0.7362 0.000 0.884 0.000 NA
#> SRR1199101 1 0.8245 0.1003 0.500 0.248 0.216 NA
#> SRR1199102 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199103 2 0.5995 0.7172 0.000 0.660 0.084 NA
#> SRR1199104 3 0.4643 0.5458 0.344 0.000 0.656 NA
#> SRR1199105 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199106 2 0.6798 0.6785 0.000 0.604 0.224 NA
#> SRR1199107 2 0.3024 0.7430 0.000 0.852 0.000 NA
#> SRR1199108 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199109 2 0.3123 0.7106 0.000 0.844 0.000 NA
#> SRR1199110 2 0.7238 0.5039 0.296 0.544 0.004 NA
#> SRR1199111 2 0.3937 0.7074 0.000 0.800 0.012 NA
#> SRR1199112 3 0.3311 0.6740 0.172 0.000 0.828 NA
#> SRR1199113 1 0.3873 0.6233 0.772 0.000 0.228 NA
#> SRR1199114 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199115 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199116 1 0.4295 0.6010 0.752 0.240 0.000 NA
#> SRR1199117 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199118 1 0.0000 0.8942 1.000 0.000 0.000 NA
#> SRR1199119 2 0.3479 0.7325 0.000 0.840 0.012 NA
#> SRR1199120 3 0.4941 0.3456 0.436 0.000 0.564 NA
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0771 0.6559 0.000 0.004 0.976 0.020 0.000
#> SRR1199009 2 0.3270 0.7235 0.000 0.852 0.044 0.004 0.100
#> SRR1199010 4 0.4804 0.0000 0.348 0.004 0.000 0.624 0.024
#> SRR1199011 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 1 0.3845 0.5085 0.812 0.124 0.060 0.000 0.004
#> SRR1199013 1 0.4682 -0.1157 0.620 0.356 0.000 0.000 0.024
#> SRR1199015 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 1 0.3109 0.4857 0.800 0.000 0.200 0.000 0.000
#> SRR1199017 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.5656 0.5595 0.176 0.672 0.000 0.016 0.136
#> SRR1199021 2 0.6180 0.6896 0.000 0.612 0.148 0.020 0.220
#> SRR1199022 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199028 2 0.7696 0.1137 0.244 0.436 0.272 0.020 0.028
#> SRR1199029 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.5352 0.7017 0.000 0.684 0.152 0.004 0.160
#> SRR1199032 2 0.7000 0.6188 0.028 0.528 0.272 0.008 0.164
#> SRR1199033 2 0.5381 0.5964 0.012 0.724 0.100 0.016 0.148
#> SRR1199034 3 0.0290 0.6560 0.000 0.000 0.992 0.000 0.008
#> SRR1199035 3 0.0290 0.6560 0.000 0.000 0.992 0.000 0.008
#> SRR1199036 2 0.4333 0.7172 0.000 0.784 0.056 0.016 0.144
#> SRR1199037 1 0.3615 0.5194 0.808 0.036 0.156 0.000 0.000
#> SRR1199038 2 0.8149 0.4625 0.120 0.444 0.292 0.020 0.124
#> SRR1199040 2 0.6209 0.6908 0.000 0.620 0.164 0.024 0.192
#> SRR1199042 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199043 2 0.6774 0.6591 0.068 0.608 0.184 0.004 0.136
#> SRR1199044 3 0.0404 0.6571 0.000 0.000 0.988 0.012 0.000
#> SRR1199045 3 0.0609 0.6564 0.000 0.000 0.980 0.020 0.000
#> SRR1199046 3 0.4084 0.5593 0.008 0.100 0.824 0.040 0.028
#> SRR1199047 2 0.5517 0.4118 0.228 0.652 0.000 0.004 0.116
#> SRR1199048 2 0.6163 0.6374 0.000 0.536 0.000 0.164 0.300
#> SRR1199049 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.6796 0.4671 0.000 0.428 0.408 0.024 0.140
#> SRR1199052 3 0.0510 0.6567 0.000 0.000 0.984 0.016 0.000
#> SRR1199054 2 0.5737 0.6955 0.000 0.676 0.152 0.024 0.148
#> SRR1199056 1 0.6509 -0.3949 0.456 0.420 0.028 0.000 0.096
#> SRR1199057 2 0.6637 0.4205 0.000 0.496 0.320 0.012 0.172
#> SRR1199059 2 0.3461 0.7006 0.000 0.772 0.000 0.004 0.224
#> SRR1199060 2 0.2873 0.6711 0.000 0.856 0.000 0.016 0.128
#> SRR1199061 2 0.4040 0.7091 0.000 0.724 0.000 0.016 0.260
#> SRR1199062 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199065 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199075 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.3550 0.7003 0.000 0.760 0.000 0.004 0.236
#> SRR1199077 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.4936 0.4069 0.260 0.684 0.000 0.008 0.048
#> SRR1199079 2 0.2464 0.6851 0.000 0.888 0.000 0.016 0.096
#> SRR1199080 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 3 0.6232 0.5237 0.084 0.088 0.708 0.068 0.052
#> SRR1199082 1 0.4880 -0.1271 0.616 0.348 0.000 0.000 0.036
#> SRR1199083 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.3160 0.7135 0.000 0.808 0.000 0.004 0.188
#> SRR1199088 3 0.4219 -0.0211 0.416 0.000 0.584 0.000 0.000
#> SRR1199089 3 0.4331 0.0220 0.400 0.000 0.596 0.000 0.004
#> SRR1199090 5 0.5615 0.0000 0.392 0.040 0.000 0.020 0.548
#> SRR1199091 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.5359 0.2925 0.304 0.616 0.000 0.000 0.080
#> SRR1199094 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.5263 0.2321 0.324 0.616 0.004 0.000 0.056
#> SRR1199096 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199097 3 0.4281 0.5374 0.144 0.008 0.788 0.004 0.056
#> SRR1199098 2 0.4944 0.7103 0.000 0.724 0.116 0.004 0.156
#> SRR1199099 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.2233 0.7041 0.000 0.892 0.000 0.004 0.104
#> SRR1199101 1 0.7293 -0.4174 0.496 0.244 0.216 0.004 0.040
#> SRR1199102 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.5449 0.7009 0.000 0.644 0.080 0.008 0.268
#> SRR1199104 3 0.4166 0.1752 0.348 0.000 0.648 0.000 0.004
#> SRR1199105 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199106 2 0.6377 0.6749 0.000 0.588 0.220 0.020 0.172
#> SRR1199107 2 0.2732 0.7122 0.000 0.840 0.000 0.000 0.160
#> SRR1199108 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199109 2 0.2825 0.6713 0.000 0.860 0.000 0.016 0.124
#> SRR1199110 2 0.6753 0.2899 0.284 0.532 0.004 0.020 0.160
#> SRR1199111 2 0.3504 0.6694 0.000 0.816 0.008 0.016 0.160
#> SRR1199112 3 0.3359 0.5209 0.164 0.000 0.816 0.020 0.000
#> SRR1199113 1 0.3336 0.4080 0.772 0.000 0.228 0.000 0.000
#> SRR1199114 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 1 0.3607 0.2808 0.752 0.244 0.000 0.000 0.004
#> SRR1199117 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.8729 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.3712 0.6981 0.000 0.820 0.004 0.052 0.124
#> SRR1199120 3 0.4708 -0.1033 0.436 0.000 0.548 0.016 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0653 0.62331 0.000 0.004 0.980 NA 0.012 0.004
#> SRR1199009 2 0.3018 0.71367 0.000 0.872 0.040 NA 0.052 0.008
#> SRR1199010 6 0.3309 0.00000 0.280 0.000 0.000 NA 0.000 0.720
#> SRR1199011 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199012 1 0.3609 0.54905 0.812 0.116 0.056 NA 0.000 0.000
#> SRR1199013 1 0.4371 -0.03617 0.620 0.352 0.000 NA 0.012 0.000
#> SRR1199015 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199016 1 0.2793 0.51744 0.800 0.000 0.200 NA 0.000 0.000
#> SRR1199017 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199018 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199019 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199020 2 0.5545 0.57876 0.168 0.668 0.000 NA 0.092 0.004
#> SRR1199021 2 0.5151 0.67422 0.000 0.648 0.152 NA 0.192 0.000
#> SRR1199022 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199023 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199025 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199026 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199027 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199028 2 0.7793 0.19808 0.212 0.428 0.248 NA 0.024 0.060
#> SRR1199029 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199031 2 0.4782 0.68649 0.000 0.724 0.152 NA 0.096 0.024
#> SRR1199032 2 0.6939 0.61553 0.028 0.488 0.268 NA 0.044 0.000
#> SRR1199033 2 0.5314 0.54815 0.008 0.616 0.076 NA 0.008 0.004
#> SRR1199034 3 0.0777 0.62293 0.000 0.000 0.972 NA 0.024 0.000
#> SRR1199035 3 0.0777 0.62293 0.000 0.000 0.972 NA 0.024 0.000
#> SRR1199036 2 0.4316 0.70811 0.000 0.776 0.060 NA 0.068 0.000
#> SRR1199037 1 0.3247 0.55143 0.808 0.036 0.156 NA 0.000 0.000
#> SRR1199038 2 0.7698 0.46335 0.120 0.436 0.260 NA 0.140 0.000
#> SRR1199040 2 0.5759 0.67753 0.000 0.628 0.152 NA 0.168 0.000
#> SRR1199042 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199043 2 0.5982 0.65177 0.072 0.640 0.176 NA 0.100 0.008
#> SRR1199044 3 0.0146 0.62487 0.000 0.000 0.996 NA 0.004 0.000
#> SRR1199045 3 0.0508 0.62384 0.000 0.000 0.984 NA 0.012 0.004
#> SRR1199046 3 0.4136 0.50683 0.000 0.100 0.800 NA 0.044 0.040
#> SRR1199047 2 0.5142 0.44731 0.224 0.620 0.000 NA 0.000 0.000
#> SRR1199048 2 0.5742 0.50581 0.000 0.456 0.000 NA 0.084 0.028
#> SRR1199049 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199050 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199051 2 0.6817 0.48859 0.000 0.424 0.356 NA 0.156 0.008
#> SRR1199052 3 0.0260 0.62439 0.000 0.000 0.992 NA 0.008 0.000
#> SRR1199054 2 0.5357 0.68270 0.000 0.668 0.140 NA 0.152 0.000
#> SRR1199056 1 0.6059 -0.33245 0.464 0.396 0.028 NA 0.004 0.000
#> SRR1199057 2 0.6718 0.41407 0.000 0.472 0.316 NA 0.076 0.004
#> SRR1199059 2 0.3338 0.68676 0.000 0.812 0.000 NA 0.152 0.024
#> SRR1199060 2 0.2854 0.66359 0.000 0.792 0.000 NA 0.000 0.000
#> SRR1199061 2 0.3704 0.69676 0.000 0.744 0.000 NA 0.232 0.008
#> SRR1199062 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199064 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199065 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199067 1 0.0865 0.83755 0.964 0.000 0.000 NA 0.000 0.000
#> SRR1199075 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199076 2 0.3516 0.68546 0.000 0.792 0.000 NA 0.172 0.024
#> SRR1199077 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199078 2 0.4793 0.42560 0.260 0.664 0.000 NA 0.008 0.004
#> SRR1199079 2 0.2706 0.68008 0.000 0.832 0.000 NA 0.008 0.000
#> SRR1199080 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199081 3 0.7268 0.39669 0.076 0.052 0.588 NA 0.108 0.040
#> SRR1199082 1 0.4855 -0.05416 0.616 0.320 0.000 NA 0.012 0.000
#> SRR1199083 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199084 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199085 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199086 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199087 2 0.2703 0.70258 0.000 0.860 0.000 NA 0.116 0.016
#> SRR1199088 3 0.4402 -0.00849 0.412 0.000 0.564 NA 0.020 0.000
#> SRR1199089 3 0.4379 0.02249 0.400 0.000 0.576 NA 0.020 0.000
#> SRR1199090 5 0.5394 0.00000 0.368 0.020 0.000 NA 0.552 0.008
#> SRR1199091 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199092 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199093 2 0.4882 0.32683 0.300 0.636 0.000 NA 0.044 0.004
#> SRR1199094 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199095 2 0.5015 0.26177 0.324 0.600 0.004 NA 0.004 0.000
#> SRR1199096 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199097 3 0.4843 0.48618 0.148 0.004 0.736 NA 0.052 0.004
#> SRR1199098 2 0.4336 0.69674 0.000 0.768 0.116 NA 0.092 0.016
#> SRR1199099 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199100 2 0.2949 0.69412 0.000 0.848 0.000 NA 0.028 0.008
#> SRR1199101 1 0.6832 -0.35037 0.496 0.244 0.200 NA 0.028 0.000
#> SRR1199102 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199103 2 0.5202 0.68701 0.000 0.676 0.076 NA 0.212 0.012
#> SRR1199104 3 0.4241 0.16431 0.348 0.000 0.628 NA 0.020 0.000
#> SRR1199105 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199106 2 0.5890 0.66481 0.000 0.608 0.212 NA 0.140 0.008
#> SRR1199107 2 0.3369 0.70194 0.000 0.832 0.000 NA 0.084 0.012
#> SRR1199108 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199109 2 0.2823 0.66370 0.000 0.796 0.000 NA 0.000 0.000
#> SRR1199110 2 0.6668 0.34775 0.272 0.512 0.004 NA 0.104 0.000
#> SRR1199111 2 0.3712 0.66150 0.000 0.744 0.012 NA 0.012 0.000
#> SRR1199112 3 0.2884 0.49232 0.164 0.000 0.824 NA 0.008 0.004
#> SRR1199113 1 0.2996 0.44464 0.772 0.000 0.228 NA 0.000 0.000
#> SRR1199114 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199115 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199116 1 0.4204 0.36264 0.740 0.128 0.000 NA 0.000 0.000
#> SRR1199117 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199118 1 0.0000 0.87960 1.000 0.000 0.000 NA 0.000 0.000
#> SRR1199119 2 0.4207 0.68875 0.000 0.764 0.000 NA 0.024 0.064
#> SRR1199120 3 0.4051 -0.08777 0.432 0.000 0.560 NA 0.008 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds
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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.981 0.992 0.4061 0.601 0.601
#> 3 3 0.790 0.877 0.923 0.5637 0.739 0.566
#> 4 4 0.861 0.896 0.936 0.1129 0.945 0.841
#> 5 5 0.784 0.824 0.844 0.1047 0.897 0.659
#> 6 6 0.791 0.803 0.874 0.0407 0.962 0.823
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.000 0.989 0.000 1.000
#> SRR1199009 2 0.000 0.989 0.000 1.000
#> SRR1199010 2 0.000 0.989 0.000 1.000
#> SRR1199011 2 0.506 0.874 0.112 0.888
#> SRR1199012 2 0.000 0.989 0.000 1.000
#> SRR1199013 2 0.000 0.989 0.000 1.000
#> SRR1199015 1 0.000 0.998 1.000 0.000
#> SRR1199016 2 0.000 0.989 0.000 1.000
#> SRR1199017 1 0.000 0.998 1.000 0.000
#> SRR1199018 1 0.000 0.998 1.000 0.000
#> SRR1199019 1 0.000 0.998 1.000 0.000
#> SRR1199020 2 0.000 0.989 0.000 1.000
#> SRR1199021 2 0.000 0.989 0.000 1.000
#> SRR1199022 1 0.000 0.998 1.000 0.000
#> SRR1199023 1 0.000 0.998 1.000 0.000
#> SRR1199025 1 0.000 0.998 1.000 0.000
#> SRR1199026 1 0.000 0.998 1.000 0.000
#> SRR1199027 2 0.000 0.989 0.000 1.000
#> SRR1199028 2 0.000 0.989 0.000 1.000
#> SRR1199029 1 0.000 0.998 1.000 0.000
#> SRR1199031 2 0.000 0.989 0.000 1.000
#> SRR1199032 2 0.000 0.989 0.000 1.000
#> SRR1199033 2 0.000 0.989 0.000 1.000
#> SRR1199034 2 0.000 0.989 0.000 1.000
#> SRR1199035 2 0.000 0.989 0.000 1.000
#> SRR1199036 2 0.000 0.989 0.000 1.000
#> SRR1199037 2 0.000 0.989 0.000 1.000
#> SRR1199038 2 0.000 0.989 0.000 1.000
#> SRR1199040 2 0.000 0.989 0.000 1.000
#> SRR1199042 2 0.000 0.989 0.000 1.000
#> SRR1199043 2 0.000 0.989 0.000 1.000
#> SRR1199044 2 0.000 0.989 0.000 1.000
#> SRR1199045 2 0.000 0.989 0.000 1.000
#> SRR1199046 2 0.000 0.989 0.000 1.000
#> SRR1199047 2 0.000 0.989 0.000 1.000
#> SRR1199048 2 0.000 0.989 0.000 1.000
#> SRR1199049 2 0.000 0.989 0.000 1.000
#> SRR1199050 2 0.574 0.845 0.136 0.864
#> SRR1199051 2 0.000 0.989 0.000 1.000
#> SRR1199052 2 0.000 0.989 0.000 1.000
#> SRR1199054 2 0.000 0.989 0.000 1.000
#> SRR1199056 2 0.000 0.989 0.000 1.000
#> SRR1199057 2 0.000 0.989 0.000 1.000
#> SRR1199059 2 0.000 0.989 0.000 1.000
#> SRR1199060 2 0.000 0.989 0.000 1.000
#> SRR1199061 2 0.000 0.989 0.000 1.000
#> SRR1199062 2 0.494 0.879 0.108 0.892
#> SRR1199064 2 0.969 0.353 0.396 0.604
#> SRR1199065 1 0.000 0.998 1.000 0.000
#> SRR1199067 2 0.000 0.989 0.000 1.000
#> SRR1199075 1 0.000 0.998 1.000 0.000
#> SRR1199076 2 0.000 0.989 0.000 1.000
#> SRR1199077 1 0.000 0.998 1.000 0.000
#> SRR1199078 2 0.000 0.989 0.000 1.000
#> SRR1199079 2 0.000 0.989 0.000 1.000
#> SRR1199080 1 0.000 0.998 1.000 0.000
#> SRR1199081 2 0.000 0.989 0.000 1.000
#> SRR1199082 2 0.000 0.989 0.000 1.000
#> SRR1199083 1 0.000 0.998 1.000 0.000
#> SRR1199084 1 0.000 0.998 1.000 0.000
#> SRR1199085 1 0.000 0.998 1.000 0.000
#> SRR1199086 1 0.000 0.998 1.000 0.000
#> SRR1199087 2 0.000 0.989 0.000 1.000
#> SRR1199088 2 0.000 0.989 0.000 1.000
#> SRR1199089 2 0.000 0.989 0.000 1.000
#> SRR1199090 2 0.000 0.989 0.000 1.000
#> SRR1199091 1 0.000 0.998 1.000 0.000
#> SRR1199092 1 0.000 0.998 1.000 0.000
#> SRR1199093 2 0.000 0.989 0.000 1.000
#> SRR1199094 1 0.000 0.998 1.000 0.000
#> SRR1199095 2 0.000 0.989 0.000 1.000
#> SRR1199096 2 0.000 0.989 0.000 1.000
#> SRR1199097 2 0.000 0.989 0.000 1.000
#> SRR1199098 2 0.000 0.989 0.000 1.000
#> SRR1199099 1 0.000 0.998 1.000 0.000
#> SRR1199100 2 0.000 0.989 0.000 1.000
#> SRR1199101 2 0.000 0.989 0.000 1.000
#> SRR1199102 1 0.260 0.953 0.956 0.044
#> SRR1199103 2 0.000 0.989 0.000 1.000
#> SRR1199104 2 0.000 0.989 0.000 1.000
#> SRR1199105 2 0.000 0.989 0.000 1.000
#> SRR1199106 2 0.000 0.989 0.000 1.000
#> SRR1199107 2 0.000 0.989 0.000 1.000
#> SRR1199108 2 0.000 0.989 0.000 1.000
#> SRR1199109 2 0.000 0.989 0.000 1.000
#> SRR1199110 2 0.000 0.989 0.000 1.000
#> SRR1199111 2 0.000 0.989 0.000 1.000
#> SRR1199112 2 0.000 0.989 0.000 1.000
#> SRR1199113 2 0.000 0.989 0.000 1.000
#> SRR1199114 1 0.000 0.998 1.000 0.000
#> SRR1199115 1 0.000 0.998 1.000 0.000
#> SRR1199116 2 0.000 0.989 0.000 1.000
#> SRR1199117 1 0.000 0.998 1.000 0.000
#> SRR1199118 1 0.000 0.998 1.000 0.000
#> SRR1199119 2 0.000 0.989 0.000 1.000
#> SRR1199120 2 0.000 0.989 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.6045 0.632 0.000 0.380 0.620
#> SRR1199009 2 0.0237 0.961 0.000 0.996 0.004
#> SRR1199010 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199011 3 0.2804 0.740 0.060 0.016 0.924
#> SRR1199012 2 0.2448 0.905 0.000 0.924 0.076
#> SRR1199013 3 0.1289 0.786 0.000 0.032 0.968
#> SRR1199015 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199016 3 0.5706 0.681 0.000 0.320 0.680
#> SRR1199017 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199020 2 0.0892 0.956 0.000 0.980 0.020
#> SRR1199021 2 0.0747 0.959 0.000 0.984 0.016
#> SRR1199022 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199023 1 0.0237 0.985 0.996 0.000 0.004
#> SRR1199025 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199027 3 0.2356 0.791 0.000 0.072 0.928
#> SRR1199028 2 0.2796 0.895 0.000 0.908 0.092
#> SRR1199029 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199032 2 0.0424 0.961 0.000 0.992 0.008
#> SRR1199033 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199034 3 0.6062 0.626 0.000 0.384 0.616
#> SRR1199035 3 0.6126 0.597 0.000 0.400 0.600
#> SRR1199036 2 0.0747 0.958 0.000 0.984 0.016
#> SRR1199037 2 0.2537 0.905 0.000 0.920 0.080
#> SRR1199038 2 0.2878 0.894 0.000 0.904 0.096
#> SRR1199040 2 0.1163 0.951 0.000 0.972 0.028
#> SRR1199042 3 0.1031 0.780 0.000 0.024 0.976
#> SRR1199043 2 0.0424 0.961 0.000 0.992 0.008
#> SRR1199044 3 0.6008 0.643 0.000 0.372 0.628
#> SRR1199045 3 0.6008 0.643 0.000 0.372 0.628
#> SRR1199046 2 0.4504 0.706 0.000 0.804 0.196
#> SRR1199047 2 0.0237 0.961 0.000 0.996 0.004
#> SRR1199048 3 0.2959 0.786 0.000 0.100 0.900
#> SRR1199049 3 0.1031 0.778 0.000 0.024 0.976
#> SRR1199050 3 0.2998 0.738 0.068 0.016 0.916
#> SRR1199051 2 0.1031 0.953 0.000 0.976 0.024
#> SRR1199052 3 0.6079 0.621 0.000 0.388 0.612
#> SRR1199054 2 0.0592 0.960 0.000 0.988 0.012
#> SRR1199056 2 0.4121 0.799 0.000 0.832 0.168
#> SRR1199057 2 0.1964 0.933 0.000 0.944 0.056
#> SRR1199059 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199062 3 0.2703 0.742 0.056 0.016 0.928
#> SRR1199064 3 0.5899 0.497 0.244 0.020 0.736
#> SRR1199065 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199067 2 0.5431 0.583 0.000 0.716 0.284
#> SRR1199075 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199081 3 0.1289 0.786 0.000 0.032 0.968
#> SRR1199082 3 0.1289 0.786 0.000 0.032 0.968
#> SRR1199083 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199088 3 0.6008 0.643 0.000 0.372 0.628
#> SRR1199089 3 0.6008 0.643 0.000 0.372 0.628
#> SRR1199090 3 0.1289 0.786 0.000 0.032 0.968
#> SRR1199091 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199095 2 0.0424 0.960 0.000 0.992 0.008
#> SRR1199096 3 0.1031 0.782 0.000 0.024 0.976
#> SRR1199097 2 0.0592 0.960 0.000 0.988 0.012
#> SRR1199098 2 0.0237 0.961 0.000 0.996 0.004
#> SRR1199099 1 0.4755 0.788 0.808 0.008 0.184
#> SRR1199100 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199101 2 0.0424 0.961 0.000 0.992 0.008
#> SRR1199102 1 0.3425 0.872 0.884 0.004 0.112
#> SRR1199103 2 0.2165 0.925 0.000 0.936 0.064
#> SRR1199104 3 0.6008 0.643 0.000 0.372 0.628
#> SRR1199105 3 0.1031 0.782 0.000 0.024 0.976
#> SRR1199106 2 0.0424 0.961 0.000 0.992 0.008
#> SRR1199107 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199108 3 0.1031 0.778 0.000 0.024 0.976
#> SRR1199109 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1199110 3 0.2448 0.789 0.000 0.076 0.924
#> SRR1199111 2 0.0237 0.961 0.000 0.996 0.004
#> SRR1199112 3 0.6008 0.643 0.000 0.372 0.628
#> SRR1199113 3 0.4291 0.758 0.000 0.180 0.820
#> SRR1199114 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199116 2 0.1411 0.946 0.000 0.964 0.036
#> SRR1199117 1 0.0237 0.985 0.996 0.000 0.004
#> SRR1199118 1 0.0000 0.988 1.000 0.000 0.000
#> SRR1199119 2 0.0424 0.961 0.000 0.992 0.008
#> SRR1199120 3 0.6008 0.643 0.000 0.372 0.628
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.1302 0.9170 0.000 0.044 0.956 0.000
#> SRR1199009 2 0.0707 0.9393 0.000 0.980 0.020 0.000
#> SRR1199010 2 0.1389 0.9367 0.000 0.952 0.048 0.000
#> SRR1199011 4 0.2837 0.8590 0.036 0.028 0.024 0.912
#> SRR1199012 2 0.3761 0.8831 0.000 0.852 0.080 0.068
#> SRR1199013 4 0.0469 0.8656 0.000 0.000 0.012 0.988
#> SRR1199015 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.6422 0.5344 0.000 0.120 0.632 0.248
#> SRR1199017 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.2198 0.9210 0.000 0.920 0.072 0.008
#> SRR1199021 2 0.1520 0.9379 0.000 0.956 0.024 0.020
#> SRR1199022 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.2814 0.8470 0.868 0.000 0.000 0.132
#> SRR1199025 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.4707 0.6945 0.000 0.036 0.204 0.760
#> SRR1199028 2 0.3647 0.8500 0.000 0.832 0.016 0.152
#> SRR1199029 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0336 0.9407 0.000 0.992 0.008 0.000
#> SRR1199032 2 0.0921 0.9380 0.000 0.972 0.028 0.000
#> SRR1199033 2 0.0921 0.9394 0.000 0.972 0.028 0.000
#> SRR1199034 3 0.1302 0.9170 0.000 0.044 0.956 0.000
#> SRR1199035 3 0.2281 0.8868 0.000 0.096 0.904 0.000
#> SRR1199036 2 0.1109 0.9384 0.000 0.968 0.028 0.004
#> SRR1199037 2 0.4673 0.8273 0.000 0.792 0.076 0.132
#> SRR1199038 2 0.3707 0.8628 0.000 0.840 0.028 0.132
#> SRR1199040 2 0.2124 0.9282 0.000 0.932 0.040 0.028
#> SRR1199042 4 0.1411 0.8691 0.000 0.020 0.020 0.960
#> SRR1199043 2 0.1022 0.9381 0.000 0.968 0.032 0.000
#> SRR1199044 3 0.1302 0.9180 0.000 0.044 0.956 0.000
#> SRR1199045 3 0.1211 0.9151 0.000 0.040 0.960 0.000
#> SRR1199046 2 0.4776 0.7873 0.000 0.776 0.164 0.060
#> SRR1199047 2 0.1022 0.9392 0.000 0.968 0.032 0.000
#> SRR1199048 4 0.1256 0.8611 0.000 0.028 0.008 0.964
#> SRR1199049 4 0.1733 0.8670 0.000 0.028 0.024 0.948
#> SRR1199050 4 0.2627 0.8608 0.036 0.024 0.020 0.920
#> SRR1199051 2 0.2542 0.9110 0.000 0.904 0.084 0.012
#> SRR1199052 3 0.2469 0.8768 0.000 0.108 0.892 0.000
#> SRR1199054 2 0.0188 0.9404 0.000 0.996 0.004 0.000
#> SRR1199056 2 0.4244 0.8169 0.000 0.800 0.032 0.168
#> SRR1199057 2 0.3279 0.8883 0.000 0.872 0.032 0.096
#> SRR1199059 2 0.0188 0.9398 0.000 0.996 0.004 0.000
#> SRR1199060 2 0.0188 0.9398 0.000 0.996 0.004 0.000
#> SRR1199061 2 0.0188 0.9398 0.000 0.996 0.004 0.000
#> SRR1199062 4 0.2432 0.8649 0.020 0.028 0.024 0.928
#> SRR1199064 4 0.2821 0.8573 0.040 0.028 0.020 0.912
#> SRR1199065 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.6262 0.5519 0.000 0.628 0.092 0.280
#> SRR1199075 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0188 0.9398 0.000 0.996 0.004 0.000
#> SRR1199077 1 0.0188 0.9873 0.996 0.000 0.000 0.004
#> SRR1199078 2 0.1302 0.9362 0.000 0.956 0.044 0.000
#> SRR1199079 2 0.0336 0.9401 0.000 0.992 0.008 0.000
#> SRR1199080 1 0.0188 0.9873 0.996 0.000 0.000 0.004
#> SRR1199081 4 0.2401 0.8210 0.000 0.004 0.092 0.904
#> SRR1199082 4 0.0469 0.8656 0.000 0.000 0.012 0.988
#> SRR1199083 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9401 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.1661 0.9176 0.000 0.052 0.944 0.004
#> SRR1199089 3 0.1474 0.9184 0.000 0.052 0.948 0.000
#> SRR1199090 4 0.0469 0.8656 0.000 0.000 0.012 0.988
#> SRR1199091 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.1118 0.9388 0.000 0.964 0.036 0.000
#> SRR1199094 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.1706 0.9377 0.000 0.948 0.036 0.016
#> SRR1199096 4 0.2124 0.8422 0.000 0.008 0.068 0.924
#> SRR1199097 2 0.2149 0.9116 0.000 0.912 0.088 0.000
#> SRR1199098 2 0.0000 0.9401 0.000 1.000 0.000 0.000
#> SRR1199099 4 0.5704 0.0239 0.484 0.012 0.008 0.496
#> SRR1199100 2 0.0188 0.9398 0.000 0.996 0.004 0.000
#> SRR1199101 2 0.1302 0.9380 0.000 0.956 0.044 0.000
#> SRR1199102 1 0.2515 0.9001 0.912 0.012 0.004 0.072
#> SRR1199103 2 0.2675 0.8961 0.000 0.892 0.008 0.100
#> SRR1199104 3 0.1389 0.9196 0.000 0.048 0.952 0.000
#> SRR1199105 4 0.0469 0.8656 0.000 0.000 0.012 0.988
#> SRR1199106 2 0.1389 0.9288 0.000 0.952 0.048 0.000
#> SRR1199107 2 0.0188 0.9398 0.000 0.996 0.004 0.000
#> SRR1199108 4 0.1733 0.8670 0.000 0.028 0.024 0.948
#> SRR1199109 2 0.0000 0.9401 0.000 1.000 0.000 0.000
#> SRR1199110 4 0.5495 0.3758 0.000 0.348 0.028 0.624
#> SRR1199111 2 0.0336 0.9404 0.000 0.992 0.008 0.000
#> SRR1199112 3 0.1474 0.9194 0.000 0.052 0.948 0.000
#> SRR1199113 3 0.5578 0.4969 0.000 0.040 0.648 0.312
#> SRR1199114 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.2761 0.9191 0.000 0.904 0.048 0.048
#> SRR1199117 1 0.0188 0.9872 0.996 0.000 0.004 0.000
#> SRR1199118 1 0.0000 0.9900 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.9401 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.1389 0.9196 0.000 0.048 0.952 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0404 0.9505 0.000 0.012 0.988 0.000 0.000
#> SRR1199009 2 0.3949 0.3245 0.000 0.696 0.000 0.300 0.004
#> SRR1199010 4 0.4238 0.8069 0.000 0.368 0.004 0.628 0.000
#> SRR1199011 5 0.3737 0.8169 0.000 0.004 0.008 0.224 0.764
#> SRR1199012 2 0.3086 0.7528 0.000 0.876 0.036 0.020 0.068
#> SRR1199013 5 0.0727 0.8982 0.000 0.004 0.012 0.004 0.980
#> SRR1199015 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.6249 0.4011 0.000 0.144 0.572 0.012 0.272
#> SRR1199017 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.1970 0.7533 0.000 0.924 0.060 0.004 0.012
#> SRR1199021 2 0.2529 0.7510 0.000 0.900 0.004 0.040 0.056
#> SRR1199022 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.3632 0.8029 0.800 0.000 0.004 0.176 0.020
#> SRR1199025 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.3023 0.8535 0.000 0.028 0.088 0.012 0.872
#> SRR1199028 2 0.3352 0.7032 0.000 0.800 0.004 0.004 0.192
#> SRR1199029 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 4 0.4269 0.8984 0.000 0.300 0.000 0.684 0.016
#> SRR1199032 2 0.3835 0.4749 0.000 0.744 0.012 0.244 0.000
#> SRR1199033 4 0.3774 0.9053 0.000 0.296 0.000 0.704 0.000
#> SRR1199034 3 0.0404 0.9505 0.000 0.012 0.988 0.000 0.000
#> SRR1199035 3 0.0963 0.9393 0.000 0.036 0.964 0.000 0.000
#> SRR1199036 2 0.0807 0.7555 0.000 0.976 0.000 0.012 0.012
#> SRR1199037 2 0.3673 0.7484 0.000 0.844 0.048 0.028 0.080
#> SRR1199038 2 0.3197 0.7327 0.000 0.836 0.024 0.000 0.140
#> SRR1199040 2 0.1195 0.7617 0.000 0.960 0.012 0.000 0.028
#> SRR1199042 5 0.1117 0.8976 0.000 0.020 0.016 0.000 0.964
#> SRR1199043 2 0.1270 0.7386 0.000 0.948 0.000 0.052 0.000
#> SRR1199044 3 0.0404 0.9505 0.000 0.012 0.988 0.000 0.000
#> SRR1199045 3 0.0404 0.9505 0.000 0.012 0.988 0.000 0.000
#> SRR1199046 2 0.5958 0.4240 0.000 0.568 0.288 0.000 0.144
#> SRR1199047 2 0.1908 0.7227 0.000 0.908 0.000 0.092 0.000
#> SRR1199048 5 0.0865 0.8960 0.000 0.024 0.000 0.004 0.972
#> SRR1199049 5 0.1924 0.8904 0.000 0.008 0.004 0.064 0.924
#> SRR1199050 5 0.3737 0.8169 0.000 0.004 0.008 0.224 0.764
#> SRR1199051 2 0.2110 0.7504 0.000 0.912 0.072 0.000 0.016
#> SRR1199052 3 0.1197 0.9290 0.000 0.048 0.952 0.000 0.000
#> SRR1199054 2 0.0880 0.7474 0.000 0.968 0.000 0.032 0.000
#> SRR1199056 2 0.4004 0.6502 0.000 0.748 0.004 0.016 0.232
#> SRR1199057 2 0.2920 0.7371 0.000 0.852 0.016 0.000 0.132
#> SRR1199059 4 0.3452 0.9288 0.000 0.244 0.000 0.756 0.000
#> SRR1199060 4 0.3707 0.9229 0.000 0.284 0.000 0.716 0.000
#> SRR1199061 4 0.3424 0.9277 0.000 0.240 0.000 0.760 0.000
#> SRR1199062 5 0.3737 0.8169 0.000 0.004 0.008 0.224 0.764
#> SRR1199064 5 0.3737 0.8169 0.000 0.004 0.008 0.224 0.764
#> SRR1199065 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.5070 0.5970 0.000 0.688 0.056 0.012 0.244
#> SRR1199075 1 0.0162 0.9628 0.996 0.000 0.004 0.000 0.000
#> SRR1199076 4 0.3366 0.9269 0.000 0.232 0.000 0.768 0.000
#> SRR1199077 1 0.1124 0.9387 0.960 0.000 0.004 0.036 0.000
#> SRR1199078 4 0.3730 0.9222 0.000 0.288 0.000 0.712 0.000
#> SRR1199079 4 0.3366 0.9281 0.000 0.232 0.000 0.768 0.000
#> SRR1199080 1 0.0613 0.9558 0.984 0.000 0.004 0.008 0.004
#> SRR1199081 5 0.0960 0.8986 0.000 0.008 0.016 0.004 0.972
#> SRR1199082 5 0.0613 0.8983 0.000 0.004 0.008 0.004 0.984
#> SRR1199083 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0162 0.9628 0.996 0.000 0.004 0.000 0.000
#> SRR1199087 4 0.3561 0.9295 0.000 0.260 0.000 0.740 0.000
#> SRR1199088 3 0.1124 0.9366 0.000 0.036 0.960 0.000 0.004
#> SRR1199089 3 0.0865 0.9435 0.000 0.024 0.972 0.000 0.004
#> SRR1199090 5 0.0727 0.8982 0.000 0.004 0.012 0.004 0.980
#> SRR1199091 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 4 0.3636 0.9280 0.000 0.272 0.000 0.728 0.000
#> SRR1199094 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 4 0.4276 0.9133 0.000 0.256 0.000 0.716 0.028
#> SRR1199096 5 0.1012 0.8981 0.000 0.012 0.020 0.000 0.968
#> SRR1199097 2 0.3697 0.7175 0.000 0.820 0.080 0.100 0.000
#> SRR1199098 2 0.3796 0.3556 0.000 0.700 0.000 0.300 0.000
#> SRR1199099 1 0.6461 0.3629 0.544 0.000 0.008 0.216 0.232
#> SRR1199100 4 0.3336 0.9260 0.000 0.228 0.000 0.772 0.000
#> SRR1199101 2 0.4341 -0.0875 0.000 0.592 0.004 0.404 0.000
#> SRR1199102 1 0.4153 0.7550 0.756 0.000 0.008 0.212 0.024
#> SRR1199103 2 0.2488 0.7399 0.000 0.872 0.000 0.004 0.124
#> SRR1199104 3 0.0290 0.9500 0.000 0.008 0.992 0.000 0.000
#> SRR1199105 5 0.0960 0.8986 0.000 0.008 0.016 0.004 0.972
#> SRR1199106 2 0.4315 0.6704 0.000 0.772 0.068 0.156 0.004
#> SRR1199107 4 0.3336 0.9260 0.000 0.228 0.000 0.772 0.000
#> SRR1199108 5 0.1990 0.8894 0.000 0.008 0.004 0.068 0.920
#> SRR1199109 4 0.3895 0.8918 0.000 0.320 0.000 0.680 0.000
#> SRR1199110 5 0.1525 0.8869 0.000 0.036 0.012 0.004 0.948
#> SRR1199111 2 0.4030 0.1121 0.000 0.648 0.000 0.352 0.000
#> SRR1199112 3 0.0290 0.9500 0.000 0.008 0.992 0.000 0.000
#> SRR1199113 5 0.4585 0.4316 0.000 0.020 0.352 0.000 0.628
#> SRR1199114 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 4 0.5509 0.7744 0.000 0.304 0.004 0.612 0.080
#> SRR1199117 1 0.0162 0.9628 0.996 0.000 0.004 0.000 0.000
#> SRR1199118 1 0.0000 0.9645 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.1671 0.7276 0.000 0.924 0.000 0.076 0.000
#> SRR1199120 3 0.0290 0.9500 0.000 0.008 0.992 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0146 0.9477 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199009 2 0.5674 0.2748 0.000 0.520 0.000 0.320 0.004 0.156
#> SRR1199010 4 0.3452 0.7529 0.000 0.256 0.004 0.736 0.000 0.004
#> SRR1199011 6 0.3243 0.7684 0.004 0.008 0.000 0.000 0.208 0.780
#> SRR1199012 2 0.2698 0.7698 0.000 0.892 0.032 0.024 0.040 0.012
#> SRR1199013 5 0.0405 0.8960 0.000 0.000 0.000 0.008 0.988 0.004
#> SRR1199015 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.5680 0.4201 0.000 0.176 0.584 0.008 0.228 0.004
#> SRR1199017 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.1485 0.7704 0.000 0.944 0.024 0.028 0.000 0.004
#> SRR1199021 2 0.2747 0.7547 0.000 0.868 0.000 0.096 0.016 0.020
#> SRR1199022 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 6 0.3489 0.6533 0.288 0.000 0.000 0.000 0.004 0.708
#> SRR1199025 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.3531 0.7918 0.000 0.060 0.108 0.004 0.820 0.008
#> SRR1199028 2 0.3642 0.7359 0.000 0.800 0.000 0.048 0.140 0.012
#> SRR1199029 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 4 0.3053 0.8295 0.000 0.172 0.000 0.812 0.004 0.012
#> SRR1199032 2 0.5453 0.3905 0.000 0.568 0.004 0.288 0.000 0.140
#> SRR1199033 4 0.2597 0.8380 0.000 0.176 0.000 0.824 0.000 0.000
#> SRR1199034 3 0.0000 0.9484 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199035 3 0.0870 0.9382 0.000 0.012 0.972 0.004 0.000 0.012
#> SRR1199036 2 0.1390 0.7705 0.000 0.948 0.000 0.032 0.004 0.016
#> SRR1199037 2 0.3134 0.7691 0.000 0.864 0.024 0.048 0.056 0.008
#> SRR1199038 2 0.2990 0.7473 0.000 0.844 0.004 0.024 0.124 0.004
#> SRR1199040 2 0.1346 0.7707 0.000 0.952 0.000 0.024 0.016 0.008
#> SRR1199042 5 0.1225 0.8885 0.000 0.032 0.004 0.004 0.956 0.004
#> SRR1199043 2 0.2726 0.7489 0.000 0.856 0.000 0.112 0.000 0.032
#> SRR1199044 3 0.0146 0.9477 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199045 3 0.0146 0.9477 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199046 2 0.5174 0.5338 0.000 0.636 0.260 0.012 0.088 0.004
#> SRR1199047 2 0.3602 0.7089 0.000 0.784 0.000 0.160 0.000 0.056
#> SRR1199048 5 0.0976 0.8910 0.000 0.008 0.000 0.016 0.968 0.008
#> SRR1199049 5 0.3110 0.8039 0.000 0.028 0.004 0.004 0.836 0.128
#> SRR1199050 6 0.3133 0.7668 0.000 0.008 0.000 0.000 0.212 0.780
#> SRR1199051 2 0.2082 0.7665 0.000 0.916 0.052 0.020 0.004 0.008
#> SRR1199052 3 0.1059 0.9329 0.000 0.016 0.964 0.004 0.000 0.016
#> SRR1199054 2 0.1895 0.7645 0.000 0.912 0.000 0.072 0.000 0.016
#> SRR1199056 2 0.3848 0.6839 0.000 0.752 0.000 0.040 0.204 0.004
#> SRR1199057 2 0.2853 0.7638 0.000 0.868 0.000 0.048 0.072 0.012
#> SRR1199059 4 0.1219 0.8406 0.000 0.048 0.000 0.948 0.000 0.004
#> SRR1199060 4 0.2814 0.8423 0.000 0.172 0.000 0.820 0.000 0.008
#> SRR1199061 4 0.0935 0.8278 0.000 0.032 0.000 0.964 0.000 0.004
#> SRR1199062 6 0.3161 0.7628 0.000 0.008 0.000 0.000 0.216 0.776
#> SRR1199064 6 0.3133 0.7668 0.000 0.008 0.000 0.000 0.212 0.780
#> SRR1199065 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.4125 0.5822 0.000 0.728 0.032 0.008 0.228 0.004
#> SRR1199075 1 0.0146 0.9731 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199076 4 0.0806 0.8267 0.000 0.020 0.000 0.972 0.000 0.008
#> SRR1199077 1 0.3817 0.0662 0.568 0.000 0.000 0.000 0.000 0.432
#> SRR1199078 4 0.2703 0.8436 0.000 0.172 0.000 0.824 0.000 0.004
#> SRR1199079 4 0.1411 0.8484 0.000 0.060 0.000 0.936 0.000 0.004
#> SRR1199080 1 0.0363 0.9660 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1199081 5 0.0405 0.8960 0.000 0.000 0.000 0.008 0.988 0.004
#> SRR1199082 5 0.0260 0.8966 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1199083 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0146 0.9731 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199087 4 0.2070 0.8530 0.000 0.100 0.000 0.892 0.000 0.008
#> SRR1199088 3 0.0891 0.9304 0.000 0.024 0.968 0.000 0.008 0.000
#> SRR1199089 3 0.0717 0.9371 0.000 0.016 0.976 0.000 0.008 0.000
#> SRR1199090 5 0.0405 0.8960 0.000 0.000 0.000 0.008 0.988 0.004
#> SRR1199091 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 4 0.2597 0.8396 0.000 0.176 0.000 0.824 0.000 0.000
#> SRR1199094 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 4 0.3390 0.8353 0.000 0.160 0.000 0.804 0.028 0.008
#> SRR1199096 5 0.1003 0.8917 0.000 0.028 0.000 0.004 0.964 0.004
#> SRR1199097 2 0.5646 0.6493 0.000 0.648 0.060 0.140 0.000 0.152
#> SRR1199098 2 0.5616 0.2703 0.000 0.492 0.000 0.352 0.000 0.156
#> SRR1199099 6 0.3683 0.7509 0.184 0.000 0.000 0.000 0.048 0.768
#> SRR1199100 4 0.0508 0.8249 0.000 0.012 0.000 0.984 0.000 0.004
#> SRR1199101 4 0.5747 0.2039 0.000 0.368 0.004 0.476 0.000 0.152
#> SRR1199102 6 0.3050 0.7218 0.236 0.000 0.000 0.000 0.000 0.764
#> SRR1199103 2 0.3356 0.7559 0.000 0.836 0.000 0.052 0.092 0.020
#> SRR1199104 3 0.0000 0.9484 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199105 5 0.0291 0.8965 0.000 0.004 0.000 0.000 0.992 0.004
#> SRR1199106 2 0.5614 0.6096 0.000 0.632 0.036 0.168 0.000 0.164
#> SRR1199107 4 0.0622 0.8243 0.000 0.012 0.000 0.980 0.000 0.008
#> SRR1199108 5 0.3151 0.7995 0.000 0.028 0.004 0.004 0.832 0.132
#> SRR1199109 4 0.3190 0.8047 0.000 0.220 0.000 0.772 0.000 0.008
#> SRR1199110 5 0.1297 0.8801 0.000 0.040 0.000 0.012 0.948 0.000
#> SRR1199111 2 0.5698 -0.0212 0.000 0.440 0.000 0.400 0.000 0.160
#> SRR1199112 3 0.0000 0.9484 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199113 5 0.4818 0.4344 0.000 0.040 0.348 0.008 0.600 0.004
#> SRR1199114 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 4 0.4286 0.7614 0.000 0.208 0.000 0.724 0.060 0.008
#> SRR1199117 1 0.0260 0.9698 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR1199118 1 0.0000 0.9760 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.3563 0.7268 0.000 0.800 0.000 0.108 0.000 0.092
#> SRR1199120 3 0.0000 0.9484 0.000 0.000 1.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", "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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'CV' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.957 0.959 0.978 0.4741 0.526 0.526
#> 3 3 0.860 0.902 0.950 0.3612 0.828 0.676
#> 4 4 0.733 0.823 0.892 0.1022 0.932 0.814
#> 5 5 0.689 0.775 0.831 0.0547 0.990 0.968
#> 6 6 0.699 0.611 0.782 0.0370 0.984 0.947
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.0672 0.979 0.008 0.992
#> SRR1199009 2 0.0672 0.981 0.008 0.992
#> SRR1199010 2 0.0672 0.979 0.008 0.992
#> SRR1199011 1 0.0672 0.974 0.992 0.008
#> SRR1199012 2 0.0672 0.979 0.008 0.992
#> SRR1199013 2 0.6247 0.822 0.156 0.844
#> SRR1199015 1 0.0672 0.974 0.992 0.008
#> SRR1199016 2 0.0672 0.978 0.008 0.992
#> SRR1199017 1 0.0376 0.972 0.996 0.004
#> SRR1199018 1 0.0672 0.974 0.992 0.008
#> SRR1199019 1 0.0672 0.974 0.992 0.008
#> SRR1199020 2 0.0672 0.979 0.008 0.992
#> SRR1199021 2 0.0376 0.981 0.004 0.996
#> SRR1199022 1 0.0376 0.971 0.996 0.004
#> SRR1199023 1 0.0376 0.971 0.996 0.004
#> SRR1199025 1 0.0000 0.973 1.000 0.000
#> SRR1199026 1 0.0376 0.971 0.996 0.004
#> SRR1199027 1 0.8713 0.596 0.708 0.292
#> SRR1199028 2 0.0672 0.979 0.008 0.992
#> SRR1199029 1 0.0672 0.974 0.992 0.008
#> SRR1199031 2 0.0376 0.981 0.004 0.996
#> SRR1199032 2 0.0376 0.980 0.004 0.996
#> SRR1199033 2 0.0376 0.981 0.004 0.996
#> SRR1199034 2 0.0672 0.979 0.008 0.992
#> SRR1199035 2 0.0672 0.979 0.008 0.992
#> SRR1199036 2 0.0376 0.981 0.004 0.996
#> SRR1199037 2 0.0672 0.979 0.008 0.992
#> SRR1199038 2 0.0376 0.981 0.004 0.996
#> SRR1199040 2 0.0376 0.981 0.004 0.996
#> SRR1199042 1 0.0672 0.974 0.992 0.008
#> SRR1199043 2 0.0672 0.981 0.008 0.992
#> SRR1199044 2 0.0672 0.979 0.008 0.992
#> SRR1199045 2 0.0672 0.979 0.008 0.992
#> SRR1199046 2 0.0672 0.979 0.008 0.992
#> SRR1199047 2 0.0376 0.981 0.004 0.996
#> SRR1199048 2 0.1414 0.971 0.020 0.980
#> SRR1199049 1 0.0376 0.974 0.996 0.004
#> SRR1199050 1 0.0672 0.974 0.992 0.008
#> SRR1199051 2 0.0672 0.979 0.008 0.992
#> SRR1199052 2 0.0672 0.979 0.008 0.992
#> SRR1199054 2 0.0376 0.981 0.004 0.996
#> SRR1199056 2 0.0376 0.981 0.004 0.996
#> SRR1199057 2 0.0000 0.980 0.000 1.000
#> SRR1199059 2 0.0376 0.981 0.004 0.996
#> SRR1199060 2 0.0376 0.981 0.004 0.996
#> SRR1199061 2 0.0376 0.981 0.004 0.996
#> SRR1199062 1 0.0672 0.974 0.992 0.008
#> SRR1199064 1 0.0376 0.971 0.996 0.004
#> SRR1199065 1 0.0376 0.971 0.996 0.004
#> SRR1199067 2 0.0672 0.979 0.008 0.992
#> SRR1199075 1 0.0672 0.974 0.992 0.008
#> SRR1199076 2 0.0376 0.981 0.004 0.996
#> SRR1199077 1 0.0672 0.973 0.992 0.008
#> SRR1199078 2 0.0672 0.979 0.008 0.992
#> SRR1199079 2 0.0376 0.981 0.004 0.996
#> SRR1199080 1 0.0672 0.970 0.992 0.008
#> SRR1199081 2 0.0672 0.980 0.008 0.992
#> SRR1199082 1 0.7815 0.714 0.768 0.232
#> SRR1199083 1 0.0376 0.974 0.996 0.004
#> SRR1199084 1 0.0000 0.973 1.000 0.000
#> SRR1199085 1 0.0672 0.973 0.992 0.008
#> SRR1199086 1 0.0672 0.974 0.992 0.008
#> SRR1199087 2 0.0376 0.981 0.004 0.996
#> SRR1199088 2 0.0672 0.979 0.008 0.992
#> SRR1199089 2 0.0672 0.979 0.008 0.992
#> SRR1199090 2 0.7453 0.743 0.212 0.788
#> SRR1199091 1 0.0672 0.974 0.992 0.008
#> SRR1199092 1 0.0672 0.974 0.992 0.008
#> SRR1199093 2 0.0376 0.981 0.004 0.996
#> SRR1199094 1 0.0000 0.973 1.000 0.000
#> SRR1199095 2 0.0376 0.981 0.004 0.996
#> SRR1199096 2 0.1414 0.971 0.020 0.980
#> SRR1199097 2 0.0672 0.979 0.008 0.992
#> SRR1199098 2 0.0376 0.981 0.004 0.996
#> SRR1199099 1 0.0672 0.973 0.992 0.008
#> SRR1199100 2 0.0938 0.977 0.012 0.988
#> SRR1199101 2 0.0000 0.980 0.000 1.000
#> SRR1199102 1 0.0672 0.974 0.992 0.008
#> SRR1199103 2 0.0376 0.981 0.004 0.996
#> SRR1199104 2 0.0672 0.979 0.008 0.992
#> SRR1199105 1 0.7376 0.747 0.792 0.208
#> SRR1199106 2 0.0672 0.979 0.008 0.992
#> SRR1199107 2 0.0376 0.981 0.004 0.996
#> SRR1199108 1 0.0672 0.974 0.992 0.008
#> SRR1199109 2 0.0376 0.981 0.004 0.996
#> SRR1199110 2 0.6887 0.785 0.184 0.816
#> SRR1199111 2 0.0672 0.979 0.008 0.992
#> SRR1199112 2 0.1414 0.973 0.020 0.980
#> SRR1199113 2 0.7883 0.711 0.236 0.764
#> SRR1199114 1 0.0376 0.974 0.996 0.004
#> SRR1199115 1 0.0672 0.973 0.992 0.008
#> SRR1199116 2 0.0376 0.981 0.004 0.996
#> SRR1199117 1 0.2043 0.956 0.968 0.032
#> SRR1199118 1 0.0672 0.974 0.992 0.008
#> SRR1199119 2 0.0376 0.981 0.004 0.996
#> SRR1199120 2 0.0938 0.978 0.012 0.988
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199009 2 0.0892 0.921 0.000 0.980 0.020
#> SRR1199010 2 0.0237 0.923 0.004 0.996 0.000
#> SRR1199011 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199012 2 0.6244 0.332 0.000 0.560 0.440
#> SRR1199013 2 0.1964 0.888 0.056 0.944 0.000
#> SRR1199015 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199016 3 0.3155 0.901 0.044 0.040 0.916
#> SRR1199017 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199020 2 0.4399 0.802 0.000 0.812 0.188
#> SRR1199021 2 0.0592 0.922 0.000 0.988 0.012
#> SRR1199022 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199026 1 0.0424 0.973 0.992 0.000 0.008
#> SRR1199027 3 0.3619 0.833 0.136 0.000 0.864
#> SRR1199028 2 0.0237 0.922 0.004 0.996 0.000
#> SRR1199029 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199032 2 0.2796 0.886 0.000 0.908 0.092
#> SRR1199033 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199034 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199035 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199036 2 0.2356 0.898 0.000 0.928 0.072
#> SRR1199037 2 0.6079 0.464 0.000 0.612 0.388
#> SRR1199038 2 0.5690 0.659 0.004 0.708 0.288
#> SRR1199040 2 0.2165 0.904 0.000 0.936 0.064
#> SRR1199042 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199043 2 0.2448 0.898 0.000 0.924 0.076
#> SRR1199044 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199045 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199046 3 0.3116 0.850 0.000 0.108 0.892
#> SRR1199047 2 0.1289 0.917 0.000 0.968 0.032
#> SRR1199048 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199049 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199050 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199051 2 0.5138 0.726 0.000 0.748 0.252
#> SRR1199052 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199054 2 0.2356 0.898 0.000 0.928 0.072
#> SRR1199056 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199057 2 0.1411 0.916 0.000 0.964 0.036
#> SRR1199059 2 0.0237 0.923 0.000 0.996 0.004
#> SRR1199060 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199064 1 0.1860 0.936 0.948 0.000 0.052
#> SRR1199065 1 0.2878 0.889 0.904 0.000 0.096
#> SRR1199067 2 0.5859 0.565 0.000 0.656 0.344
#> SRR1199075 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199078 2 0.0237 0.923 0.000 0.996 0.004
#> SRR1199079 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199080 1 0.2356 0.915 0.928 0.000 0.072
#> SRR1199081 3 0.5660 0.750 0.028 0.200 0.772
#> SRR1199082 1 0.5835 0.477 0.660 0.340 0.000
#> SRR1199083 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199088 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199089 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199090 2 0.3267 0.833 0.116 0.884 0.000
#> SRR1199091 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199094 1 0.0237 0.976 0.996 0.000 0.004
#> SRR1199095 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199096 3 0.5843 0.646 0.016 0.252 0.732
#> SRR1199097 3 0.1289 0.921 0.000 0.032 0.968
#> SRR1199098 2 0.0237 0.923 0.000 0.996 0.004
#> SRR1199099 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199101 2 0.0892 0.921 0.000 0.980 0.020
#> SRR1199102 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199103 2 0.0237 0.923 0.000 0.996 0.004
#> SRR1199104 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1199105 1 0.1529 0.939 0.960 0.040 0.000
#> SRR1199106 2 0.4750 0.773 0.000 0.784 0.216
#> SRR1199107 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199108 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199109 2 0.0237 0.923 0.000 0.996 0.004
#> SRR1199110 2 0.4605 0.728 0.204 0.796 0.000
#> SRR1199111 2 0.2356 0.899 0.000 0.928 0.072
#> SRR1199112 3 0.0237 0.936 0.004 0.000 0.996
#> SRR1199113 3 0.3879 0.814 0.152 0.000 0.848
#> SRR1199114 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.923 0.000 1.000 0.000
#> SRR1199117 1 0.0661 0.970 0.988 0.008 0.004
#> SRR1199118 1 0.0000 0.979 1.000 0.000 0.000
#> SRR1199119 2 0.2261 0.901 0.000 0.932 0.068
#> SRR1199120 3 0.0237 0.936 0.004 0.000 0.996
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0188 0.927 0.000 0.000 0.996 0.004
#> SRR1199009 2 0.1284 0.847 0.000 0.964 0.012 0.024
#> SRR1199010 2 0.3946 0.763 0.012 0.812 0.004 0.172
#> SRR1199011 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> SRR1199012 2 0.6007 0.474 0.000 0.604 0.340 0.056
#> SRR1199013 4 0.4225 0.775 0.024 0.184 0.000 0.792
#> SRR1199015 1 0.0000 0.953 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.4003 0.832 0.028 0.036 0.856 0.080
#> SRR1199017 1 0.0895 0.947 0.976 0.004 0.000 0.020
#> SRR1199018 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> SRR1199019 1 0.0524 0.952 0.988 0.004 0.000 0.008
#> SRR1199020 2 0.5309 0.734 0.000 0.744 0.164 0.092
#> SRR1199021 2 0.4228 0.719 0.000 0.760 0.008 0.232
#> SRR1199022 1 0.0000 0.953 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.953 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0592 0.951 0.984 0.000 0.000 0.016
#> SRR1199026 1 0.0000 0.953 1.000 0.000 0.000 0.000
#> SRR1199027 3 0.4711 0.721 0.152 0.000 0.784 0.064
#> SRR1199028 2 0.4925 0.263 0.000 0.572 0.000 0.428
#> SRR1199029 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> SRR1199031 2 0.2345 0.829 0.000 0.900 0.000 0.100
#> SRR1199032 2 0.3948 0.810 0.000 0.840 0.064 0.096
#> SRR1199033 2 0.1902 0.844 0.004 0.932 0.000 0.064
#> SRR1199034 3 0.0188 0.927 0.000 0.004 0.996 0.000
#> SRR1199035 3 0.0524 0.925 0.000 0.008 0.988 0.004
#> SRR1199036 2 0.4234 0.792 0.000 0.816 0.052 0.132
#> SRR1199037 2 0.6033 0.502 0.000 0.620 0.316 0.064
#> SRR1199038 2 0.7648 0.248 0.004 0.500 0.252 0.244
#> SRR1199040 2 0.3320 0.833 0.000 0.876 0.068 0.056
#> SRR1199042 1 0.4955 0.295 0.556 0.000 0.000 0.444
#> SRR1199043 2 0.3547 0.832 0.000 0.864 0.064 0.072
#> SRR1199044 3 0.0000 0.928 0.000 0.000 1.000 0.000
#> SRR1199045 3 0.0000 0.928 0.000 0.000 1.000 0.000
#> SRR1199046 3 0.3107 0.827 0.000 0.080 0.884 0.036
#> SRR1199047 2 0.1724 0.848 0.000 0.948 0.020 0.032
#> SRR1199048 4 0.4193 0.689 0.000 0.268 0.000 0.732
#> SRR1199049 1 0.2149 0.917 0.912 0.000 0.000 0.088
#> SRR1199050 1 0.1637 0.933 0.940 0.000 0.000 0.060
#> SRR1199051 2 0.5646 0.692 0.000 0.708 0.204 0.088
#> SRR1199052 3 0.0524 0.925 0.000 0.008 0.988 0.004
#> SRR1199054 2 0.3383 0.828 0.000 0.872 0.076 0.052
#> SRR1199056 4 0.4994 0.133 0.000 0.480 0.000 0.520
#> SRR1199057 2 0.4360 0.690 0.000 0.744 0.008 0.248
#> SRR1199059 2 0.0592 0.844 0.000 0.984 0.000 0.016
#> SRR1199060 2 0.1305 0.846 0.000 0.960 0.004 0.036
#> SRR1199061 2 0.1474 0.845 0.000 0.948 0.000 0.052
#> SRR1199062 1 0.1637 0.933 0.940 0.000 0.000 0.060
#> SRR1199064 1 0.5398 0.726 0.740 0.016 0.044 0.200
#> SRR1199065 1 0.2542 0.880 0.904 0.000 0.084 0.012
#> SRR1199067 2 0.7059 0.459 0.000 0.568 0.184 0.248
#> SRR1199075 1 0.0376 0.953 0.992 0.004 0.000 0.004
#> SRR1199076 2 0.1474 0.843 0.000 0.948 0.000 0.052
#> SRR1199077 1 0.0336 0.953 0.992 0.000 0.000 0.008
#> SRR1199078 2 0.1635 0.840 0.008 0.948 0.000 0.044
#> SRR1199079 2 0.0707 0.842 0.000 0.980 0.000 0.020
#> SRR1199080 1 0.2399 0.902 0.920 0.000 0.048 0.032
#> SRR1199081 4 0.4866 0.698 0.004 0.060 0.156 0.780
#> SRR1199082 4 0.4931 0.765 0.132 0.092 0.000 0.776
#> SRR1199083 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> SRR1199084 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> SRR1199085 1 0.0000 0.953 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> SRR1199087 2 0.0921 0.845 0.000 0.972 0.000 0.028
#> SRR1199088 3 0.0376 0.926 0.000 0.004 0.992 0.004
#> SRR1199089 3 0.0188 0.926 0.000 0.000 0.996 0.004
#> SRR1199090 4 0.4436 0.796 0.052 0.148 0.000 0.800
#> SRR1199091 1 0.0376 0.953 0.992 0.004 0.000 0.004
#> SRR1199092 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> SRR1199093 2 0.1118 0.846 0.000 0.964 0.000 0.036
#> SRR1199094 1 0.0000 0.953 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.2814 0.814 0.000 0.868 0.000 0.132
#> SRR1199096 4 0.4603 0.683 0.012 0.032 0.160 0.796
#> SRR1199097 3 0.4019 0.686 0.000 0.196 0.792 0.012
#> SRR1199098 2 0.0921 0.845 0.000 0.972 0.000 0.028
#> SRR1199099 1 0.1022 0.946 0.968 0.000 0.000 0.032
#> SRR1199100 2 0.1389 0.847 0.000 0.952 0.000 0.048
#> SRR1199101 2 0.2075 0.838 0.004 0.936 0.016 0.044
#> SRR1199102 1 0.0707 0.950 0.980 0.000 0.000 0.020
#> SRR1199103 2 0.3610 0.752 0.000 0.800 0.000 0.200
#> SRR1199104 3 0.0000 0.928 0.000 0.000 1.000 0.000
#> SRR1199105 4 0.3962 0.697 0.152 0.028 0.000 0.820
#> SRR1199106 2 0.4204 0.739 0.000 0.788 0.192 0.020
#> SRR1199107 2 0.1302 0.844 0.000 0.956 0.000 0.044
#> SRR1199108 1 0.2760 0.880 0.872 0.000 0.000 0.128
#> SRR1199109 2 0.1474 0.844 0.000 0.948 0.000 0.052
#> SRR1199110 4 0.5345 0.777 0.080 0.168 0.004 0.748
#> SRR1199111 2 0.2131 0.848 0.000 0.932 0.036 0.032
#> SRR1199112 3 0.0000 0.928 0.000 0.000 1.000 0.000
#> SRR1199113 3 0.3694 0.776 0.124 0.000 0.844 0.032
#> SRR1199114 1 0.1389 0.938 0.952 0.000 0.000 0.048
#> SRR1199115 1 0.0707 0.950 0.980 0.000 0.000 0.020
#> SRR1199116 2 0.2530 0.823 0.000 0.888 0.000 0.112
#> SRR1199117 1 0.2271 0.922 0.916 0.008 0.000 0.076
#> SRR1199118 1 0.1716 0.932 0.936 0.000 0.000 0.064
#> SRR1199119 2 0.2319 0.846 0.000 0.924 0.040 0.036
#> SRR1199120 3 0.0000 0.928 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0932 0.8925 0.000 0.004 0.972 NA 0.004
#> SRR1199009 2 0.3095 0.8019 0.000 0.868 0.024 NA 0.016
#> SRR1199010 2 0.5790 0.4407 0.000 0.476 0.004 NA 0.076
#> SRR1199011 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199012 2 0.6735 0.5142 0.004 0.532 0.272 NA 0.016
#> SRR1199013 5 0.3439 0.8616 0.020 0.104 0.000 NA 0.848
#> SRR1199015 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199016 3 0.4855 0.7783 0.028 0.036 0.792 NA 0.084
#> SRR1199017 1 0.1469 0.8779 0.948 0.000 0.000 NA 0.016
#> SRR1199018 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199019 1 0.0324 0.8961 0.992 0.004 0.000 NA 0.004
#> SRR1199020 2 0.6275 0.6957 0.000 0.652 0.164 NA 0.072
#> SRR1199021 2 0.5702 0.6570 0.000 0.648 0.008 NA 0.208
#> SRR1199022 1 0.0162 0.8963 0.996 0.000 0.004 NA 0.000
#> SRR1199023 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199025 1 0.0162 0.8967 0.996 0.000 0.000 NA 0.004
#> SRR1199026 1 0.0324 0.8962 0.992 0.000 0.004 NA 0.000
#> SRR1199027 3 0.6846 0.5191 0.184 0.004 0.608 NA 0.100
#> SRR1199028 2 0.5909 0.2342 0.000 0.484 0.004 NA 0.424
#> SRR1199029 1 0.0162 0.8967 0.996 0.000 0.000 NA 0.004
#> SRR1199031 2 0.3593 0.7895 0.000 0.828 0.000 NA 0.084
#> SRR1199032 2 0.5438 0.7307 0.000 0.672 0.032 NA 0.052
#> SRR1199033 2 0.4136 0.7720 0.000 0.764 0.000 NA 0.048
#> SRR1199034 3 0.0960 0.8918 0.000 0.008 0.972 NA 0.004
#> SRR1199035 3 0.1012 0.8897 0.000 0.012 0.968 NA 0.000
#> SRR1199036 2 0.5389 0.7495 0.000 0.732 0.060 NA 0.112
#> SRR1199037 2 0.6402 0.6469 0.000 0.616 0.192 NA 0.040
#> SRR1199038 2 0.7977 0.3731 0.016 0.488 0.160 NA 0.232
#> SRR1199040 2 0.3835 0.7989 0.000 0.836 0.056 NA 0.032
#> SRR1199042 1 0.6638 0.0828 0.412 0.000 0.000 NA 0.364
#> SRR1199043 2 0.4599 0.7768 0.000 0.776 0.064 NA 0.028
#> SRR1199044 3 0.0566 0.8907 0.000 0.000 0.984 NA 0.004
#> SRR1199045 3 0.0162 0.8910 0.000 0.000 0.996 NA 0.004
#> SRR1199046 3 0.4144 0.7716 0.000 0.100 0.800 NA 0.008
#> SRR1199047 2 0.4332 0.7915 0.000 0.780 0.028 NA 0.032
#> SRR1199048 5 0.3435 0.7957 0.004 0.156 0.000 NA 0.820
#> SRR1199049 1 0.4031 0.8028 0.772 0.000 0.000 NA 0.044
#> SRR1199050 1 0.3745 0.8094 0.780 0.000 0.000 NA 0.024
#> SRR1199051 2 0.5728 0.7382 0.000 0.692 0.128 NA 0.040
#> SRR1199052 3 0.1117 0.8882 0.000 0.016 0.964 NA 0.000
#> SRR1199054 2 0.4112 0.7923 0.000 0.812 0.072 NA 0.020
#> SRR1199056 2 0.5736 0.0775 0.000 0.468 0.000 NA 0.448
#> SRR1199057 2 0.5636 0.6171 0.000 0.640 0.012 NA 0.256
#> SRR1199059 2 0.1041 0.7961 0.000 0.964 0.000 NA 0.004
#> SRR1199060 2 0.3051 0.7978 0.000 0.852 0.000 NA 0.028
#> SRR1199061 2 0.3389 0.7936 0.000 0.836 0.000 NA 0.048
#> SRR1199062 1 0.3877 0.7994 0.764 0.000 0.000 NA 0.024
#> SRR1199064 1 0.7335 0.3244 0.476 0.004 0.056 NA 0.144
#> SRR1199065 1 0.2795 0.8272 0.884 0.000 0.080 NA 0.008
#> SRR1199067 2 0.7573 0.3702 0.000 0.436 0.084 NA 0.148
#> SRR1199075 1 0.0566 0.8934 0.984 0.000 0.000 NA 0.004
#> SRR1199076 2 0.2370 0.7942 0.000 0.904 0.000 NA 0.056
#> SRR1199077 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199078 2 0.2798 0.7948 0.000 0.852 0.000 NA 0.008
#> SRR1199079 2 0.2561 0.7990 0.000 0.884 0.000 NA 0.020
#> SRR1199080 1 0.2856 0.8401 0.892 0.004 0.052 NA 0.012
#> SRR1199081 5 0.3756 0.8488 0.008 0.024 0.068 NA 0.848
#> SRR1199082 5 0.4544 0.8478 0.092 0.088 0.000 NA 0.788
#> SRR1199083 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199084 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199085 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199086 1 0.0162 0.8965 0.996 0.000 0.000 NA 0.004
#> SRR1199087 2 0.1943 0.8006 0.000 0.924 0.000 NA 0.020
#> SRR1199088 3 0.1369 0.8891 0.000 0.008 0.956 NA 0.008
#> SRR1199089 3 0.0794 0.8860 0.000 0.000 0.972 NA 0.000
#> SRR1199090 5 0.2580 0.8766 0.020 0.064 0.000 NA 0.900
#> SRR1199091 1 0.0324 0.8954 0.992 0.000 0.000 NA 0.004
#> SRR1199092 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199093 2 0.3003 0.8038 0.000 0.864 0.000 NA 0.044
#> SRR1199094 1 0.0000 0.8971 1.000 0.000 0.000 NA 0.000
#> SRR1199095 2 0.4541 0.7669 0.000 0.752 0.000 NA 0.112
#> SRR1199096 5 0.4402 0.8351 0.012 0.020 0.056 NA 0.804
#> SRR1199097 3 0.5653 0.5161 0.000 0.268 0.632 NA 0.012
#> SRR1199098 2 0.2199 0.8006 0.000 0.916 0.008 NA 0.016
#> SRR1199099 1 0.2909 0.8467 0.848 0.000 0.000 NA 0.012
#> SRR1199100 2 0.2104 0.8018 0.000 0.916 0.000 NA 0.024
#> SRR1199101 2 0.4037 0.7834 0.000 0.780 0.016 NA 0.020
#> SRR1199102 1 0.2971 0.8419 0.836 0.000 0.000 NA 0.008
#> SRR1199103 2 0.4641 0.7454 0.000 0.744 0.004 NA 0.172
#> SRR1199104 3 0.0798 0.8918 0.000 0.008 0.976 NA 0.000
#> SRR1199105 5 0.3886 0.8390 0.072 0.024 0.008 NA 0.840
#> SRR1199106 2 0.4149 0.7658 0.000 0.784 0.128 NA 0.000
#> SRR1199107 2 0.2291 0.7982 0.000 0.908 0.000 NA 0.036
#> SRR1199108 1 0.4681 0.7362 0.696 0.000 0.000 NA 0.052
#> SRR1199109 2 0.2927 0.7995 0.000 0.872 0.000 NA 0.060
#> SRR1199110 5 0.5556 0.8100 0.036 0.068 0.008 NA 0.708
#> SRR1199111 2 0.2988 0.8016 0.000 0.880 0.024 NA 0.024
#> SRR1199112 3 0.0613 0.8892 0.004 0.000 0.984 NA 0.004
#> SRR1199113 3 0.4283 0.7613 0.092 0.000 0.808 NA 0.060
#> SRR1199114 1 0.3419 0.8238 0.804 0.000 0.000 NA 0.016
#> SRR1199115 1 0.2361 0.8650 0.892 0.000 0.000 NA 0.012
#> SRR1199116 2 0.4890 0.7410 0.000 0.720 0.000 NA 0.140
#> SRR1199117 1 0.4000 0.7902 0.748 0.000 0.000 NA 0.024
#> SRR1199118 1 0.3656 0.8114 0.784 0.000 0.000 NA 0.020
#> SRR1199119 2 0.3579 0.7962 0.000 0.840 0.068 NA 0.008
#> SRR1199120 3 0.0798 0.8887 0.000 0.000 0.976 NA 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0458 0.8464 0.000 0.000 0.984 0.016 0.000 0.000
#> SRR1199009 2 0.3824 0.6118 0.000 0.800 0.028 0.140 0.020 0.012
#> SRR1199010 6 0.6661 0.0000 0.004 0.304 0.000 0.312 0.020 0.360
#> SRR1199011 1 0.0000 0.8708 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.6931 -0.0242 0.004 0.436 0.224 0.292 0.012 0.032
#> SRR1199013 5 0.3568 0.7324 0.012 0.052 0.000 0.064 0.840 0.032
#> SRR1199015 1 0.0291 0.8704 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR1199016 3 0.5859 0.6359 0.024 0.024 0.700 0.068 0.084 0.100
#> SRR1199017 1 0.1710 0.8479 0.936 0.000 0.000 0.028 0.016 0.020
#> SRR1199018 1 0.0146 0.8710 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199019 1 0.0260 0.8706 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR1199020 2 0.7294 0.2382 0.000 0.508 0.196 0.176 0.060 0.060
#> SRR1199021 2 0.6502 -0.1421 0.000 0.420 0.016 0.268 0.292 0.004
#> SRR1199022 1 0.0146 0.8705 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199023 1 0.0146 0.8705 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199025 1 0.0000 0.8708 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0363 0.8705 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1199027 3 0.7732 0.2584 0.124 0.000 0.456 0.060 0.124 0.236
#> SRR1199028 2 0.6613 -0.0362 0.004 0.456 0.000 0.120 0.352 0.068
#> SRR1199029 1 0.0146 0.8708 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1199031 2 0.4506 0.5797 0.000 0.724 0.000 0.184 0.076 0.016
#> SRR1199032 2 0.6231 0.3297 0.000 0.588 0.032 0.196 0.020 0.164
#> SRR1199033 2 0.4179 0.5466 0.000 0.760 0.000 0.144 0.012 0.084
#> SRR1199034 3 0.0508 0.8475 0.000 0.000 0.984 0.012 0.000 0.004
#> SRR1199035 3 0.0692 0.8456 0.000 0.000 0.976 0.020 0.000 0.004
#> SRR1199036 2 0.6756 0.3561 0.000 0.572 0.080 0.184 0.132 0.032
#> SRR1199037 2 0.7060 0.1686 0.000 0.500 0.152 0.256 0.044 0.048
#> SRR1199038 2 0.8181 -0.2781 0.004 0.368 0.144 0.228 0.216 0.040
#> SRR1199040 2 0.5048 0.5959 0.000 0.712 0.080 0.160 0.040 0.008
#> SRR1199042 1 0.6816 -0.1066 0.344 0.000 0.000 0.040 0.308 0.308
#> SRR1199043 2 0.5457 0.5246 0.000 0.664 0.048 0.220 0.024 0.044
#> SRR1199044 3 0.0146 0.8470 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR1199045 3 0.0146 0.8471 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199046 3 0.5737 0.4099 0.004 0.116 0.640 0.196 0.040 0.004
#> SRR1199047 2 0.4739 0.5455 0.000 0.688 0.024 0.248 0.020 0.020
#> SRR1199048 5 0.3383 0.6582 0.000 0.104 0.000 0.056 0.828 0.012
#> SRR1199049 1 0.4305 0.7161 0.684 0.000 0.000 0.000 0.056 0.260
#> SRR1199050 1 0.3592 0.7633 0.740 0.000 0.000 0.000 0.020 0.240
#> SRR1199051 2 0.6518 0.3805 0.000 0.560 0.140 0.232 0.028 0.040
#> SRR1199052 3 0.0632 0.8459 0.000 0.000 0.976 0.024 0.000 0.000
#> SRR1199054 2 0.5301 0.4949 0.000 0.628 0.120 0.240 0.004 0.008
#> SRR1199056 2 0.6676 -0.1555 0.000 0.432 0.000 0.188 0.328 0.052
#> SRR1199057 2 0.6319 0.0995 0.000 0.484 0.008 0.188 0.304 0.016
#> SRR1199059 2 0.2001 0.6323 0.000 0.900 0.000 0.092 0.004 0.004
#> SRR1199060 2 0.3385 0.6009 0.000 0.812 0.000 0.144 0.008 0.036
#> SRR1199061 2 0.3582 0.5945 0.000 0.820 0.000 0.096 0.020 0.064
#> SRR1199062 1 0.3956 0.7480 0.716 0.000 0.000 0.004 0.028 0.252
#> SRR1199064 1 0.7147 0.2539 0.452 0.004 0.056 0.080 0.060 0.348
#> SRR1199065 1 0.3585 0.7757 0.844 0.000 0.048 0.024 0.032 0.052
#> SRR1199067 4 0.7445 0.0000 0.000 0.220 0.040 0.488 0.124 0.128
#> SRR1199075 1 0.0725 0.8663 0.976 0.000 0.000 0.012 0.000 0.012
#> SRR1199076 2 0.1926 0.6317 0.000 0.912 0.000 0.068 0.020 0.000
#> SRR1199077 1 0.0000 0.8708 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.3248 0.5934 0.000 0.828 0.000 0.116 0.004 0.052
#> SRR1199079 2 0.2504 0.6162 0.000 0.880 0.000 0.088 0.004 0.028
#> SRR1199080 1 0.3784 0.7682 0.832 0.004 0.048 0.020 0.024 0.072
#> SRR1199081 5 0.2569 0.7510 0.000 0.004 0.044 0.048 0.892 0.012
#> SRR1199082 5 0.3549 0.7535 0.040 0.032 0.000 0.044 0.848 0.036
#> SRR1199083 1 0.0146 0.8705 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199084 1 0.0291 0.8702 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR1199085 1 0.0146 0.8705 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199086 1 0.0603 0.8680 0.980 0.000 0.000 0.000 0.004 0.016
#> SRR1199087 2 0.2519 0.6330 0.000 0.888 0.000 0.072 0.020 0.020
#> SRR1199088 3 0.1218 0.8433 0.000 0.004 0.956 0.028 0.000 0.012
#> SRR1199089 3 0.1442 0.8267 0.000 0.000 0.944 0.012 0.004 0.040
#> SRR1199090 5 0.1887 0.7744 0.008 0.020 0.000 0.016 0.932 0.024
#> SRR1199091 1 0.0405 0.8693 0.988 0.004 0.000 0.000 0.000 0.008
#> SRR1199092 1 0.0146 0.8705 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199093 2 0.2605 0.6296 0.000 0.876 0.000 0.092 0.012 0.020
#> SRR1199094 1 0.0146 0.8705 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199095 2 0.4986 0.5223 0.000 0.664 0.000 0.240 0.072 0.024
#> SRR1199096 5 0.5288 0.6335 0.004 0.008 0.024 0.108 0.688 0.168
#> SRR1199097 3 0.6317 0.1288 0.000 0.248 0.544 0.164 0.008 0.036
#> SRR1199098 2 0.2844 0.6324 0.000 0.856 0.000 0.112 0.012 0.020
#> SRR1199099 1 0.3309 0.7957 0.788 0.000 0.000 0.004 0.016 0.192
#> SRR1199100 2 0.1829 0.6258 0.000 0.920 0.000 0.064 0.004 0.012
#> SRR1199101 2 0.4335 0.5545 0.000 0.736 0.012 0.180 0.000 0.072
#> SRR1199102 1 0.2915 0.8042 0.808 0.000 0.000 0.000 0.008 0.184
#> SRR1199103 2 0.4702 0.5533 0.000 0.708 0.000 0.168 0.112 0.012
#> SRR1199104 3 0.1059 0.8456 0.000 0.000 0.964 0.016 0.004 0.016
#> SRR1199105 5 0.3758 0.7268 0.048 0.000 0.000 0.032 0.808 0.112
#> SRR1199106 2 0.5212 0.4647 0.000 0.640 0.212 0.140 0.004 0.004
#> SRR1199107 2 0.2062 0.6316 0.000 0.900 0.000 0.088 0.004 0.008
#> SRR1199108 1 0.5240 0.5174 0.536 0.000 0.000 0.028 0.044 0.392
#> SRR1199109 2 0.2558 0.6232 0.000 0.868 0.000 0.104 0.000 0.028
#> SRR1199110 5 0.6086 0.5121 0.024 0.016 0.000 0.136 0.576 0.248
#> SRR1199111 2 0.4024 0.6208 0.000 0.760 0.024 0.192 0.012 0.012
#> SRR1199112 3 0.0000 0.8471 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199113 3 0.4909 0.6668 0.080 0.000 0.752 0.020 0.068 0.080
#> SRR1199114 1 0.3259 0.7825 0.772 0.000 0.000 0.000 0.012 0.216
#> SRR1199115 1 0.2520 0.8225 0.844 0.000 0.000 0.000 0.004 0.152
#> SRR1199116 2 0.5374 0.4745 0.000 0.656 0.000 0.208 0.088 0.048
#> SRR1199117 1 0.4519 0.7352 0.692 0.000 0.000 0.036 0.024 0.248
#> SRR1199118 1 0.3695 0.7587 0.732 0.000 0.000 0.000 0.024 0.244
#> SRR1199119 2 0.4408 0.5944 0.000 0.720 0.064 0.204 0.000 0.012
#> SRR1199120 3 0.0363 0.8469 0.000 0.000 0.988 0.000 0.000 0.012
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) 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 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.999 1.000 0.4499 0.551 0.551
#> 3 3 1.000 0.965 0.985 0.0416 0.993 0.988
#> 4 4 1.000 0.973 0.990 0.0528 0.973 0.950
#> 5 5 0.947 0.936 0.973 0.1497 0.905 0.817
#> 6 6 0.800 0.869 0.945 0.0380 0.998 0.996
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.0000 0.999 0.000 1.000
#> SRR1199009 2 0.0000 0.999 0.000 1.000
#> SRR1199010 2 0.0000 0.999 0.000 1.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000
#> SRR1199012 2 0.0000 0.999 0.000 1.000
#> SRR1199013 2 0.0000 0.999 0.000 1.000
#> SRR1199015 1 0.0000 1.000 1.000 0.000
#> SRR1199016 2 0.0000 0.999 0.000 1.000
#> SRR1199017 1 0.0000 1.000 1.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000
#> SRR1199020 2 0.0000 0.999 0.000 1.000
#> SRR1199021 2 0.0000 0.999 0.000 1.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000
#> SRR1199027 2 0.1414 0.980 0.020 0.980
#> SRR1199028 2 0.0000 0.999 0.000 1.000
#> SRR1199029 1 0.0000 1.000 1.000 0.000
#> SRR1199031 2 0.0000 0.999 0.000 1.000
#> SRR1199032 2 0.0000 0.999 0.000 1.000
#> SRR1199033 2 0.0000 0.999 0.000 1.000
#> SRR1199034 2 0.0000 0.999 0.000 1.000
#> SRR1199035 2 0.0000 0.999 0.000 1.000
#> SRR1199036 2 0.0000 0.999 0.000 1.000
#> SRR1199037 2 0.0000 0.999 0.000 1.000
#> SRR1199038 2 0.0000 0.999 0.000 1.000
#> SRR1199040 2 0.0000 0.999 0.000 1.000
#> SRR1199042 2 0.1414 0.980 0.020 0.980
#> SRR1199043 2 0.0000 0.999 0.000 1.000
#> SRR1199044 2 0.0000 0.999 0.000 1.000
#> SRR1199045 2 0.0000 0.999 0.000 1.000
#> SRR1199046 2 0.0000 0.999 0.000 1.000
#> SRR1199047 2 0.0000 0.999 0.000 1.000
#> SRR1199048 2 0.0000 0.999 0.000 1.000
#> SRR1199049 1 0.0000 1.000 1.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000
#> SRR1199051 2 0.0000 0.999 0.000 1.000
#> SRR1199052 2 0.0000 0.999 0.000 1.000
#> SRR1199054 2 0.0000 0.999 0.000 1.000
#> SRR1199056 2 0.0000 0.999 0.000 1.000
#> SRR1199057 2 0.0000 0.999 0.000 1.000
#> SRR1199059 2 0.0000 0.999 0.000 1.000
#> SRR1199060 2 0.0000 0.999 0.000 1.000
#> SRR1199061 2 0.0000 0.999 0.000 1.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000
#> SRR1199064 1 0.0000 1.000 1.000 0.000
#> SRR1199065 1 0.0000 1.000 1.000 0.000
#> SRR1199067 2 0.0000 0.999 0.000 1.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000
#> SRR1199076 2 0.0000 0.999 0.000 1.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000
#> SRR1199078 2 0.0000 0.999 0.000 1.000
#> SRR1199079 2 0.0000 0.999 0.000 1.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000
#> SRR1199081 2 0.0000 0.999 0.000 1.000
#> SRR1199082 2 0.0000 0.999 0.000 1.000
#> SRR1199083 1 0.0000 1.000 1.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000
#> SRR1199087 2 0.0000 0.999 0.000 1.000
#> SRR1199088 2 0.0000 0.999 0.000 1.000
#> SRR1199089 2 0.0000 0.999 0.000 1.000
#> SRR1199090 2 0.0000 0.999 0.000 1.000
#> SRR1199091 1 0.0000 1.000 1.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000
#> SRR1199093 2 0.0000 0.999 0.000 1.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000
#> SRR1199095 2 0.0000 0.999 0.000 1.000
#> SRR1199096 2 0.0000 0.999 0.000 1.000
#> SRR1199097 2 0.0000 0.999 0.000 1.000
#> SRR1199098 2 0.0000 0.999 0.000 1.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000
#> SRR1199100 2 0.0000 0.999 0.000 1.000
#> SRR1199101 2 0.0000 0.999 0.000 1.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000
#> SRR1199103 2 0.0000 0.999 0.000 1.000
#> SRR1199104 2 0.0000 0.999 0.000 1.000
#> SRR1199105 2 0.0000 0.999 0.000 1.000
#> SRR1199106 2 0.0000 0.999 0.000 1.000
#> SRR1199107 2 0.0000 0.999 0.000 1.000
#> SRR1199108 1 0.0376 0.996 0.996 0.004
#> SRR1199109 2 0.0000 0.999 0.000 1.000
#> SRR1199110 2 0.0000 0.999 0.000 1.000
#> SRR1199111 2 0.0000 0.999 0.000 1.000
#> SRR1199112 2 0.0000 0.999 0.000 1.000
#> SRR1199113 2 0.0000 0.999 0.000 1.000
#> SRR1199114 1 0.0000 1.000 1.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000
#> SRR1199116 2 0.0000 0.999 0.000 1.000
#> SRR1199117 1 0.0000 1.000 1.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000
#> SRR1199119 2 0.0000 0.999 0.000 1.000
#> SRR1199120 2 0.0000 0.999 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199009 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199012 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199013 2 0.0892 0.969 0.000 0.980 0.020
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199016 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199027 2 0.6566 0.514 0.016 0.636 0.348
#> SRR1199028 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199034 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199035 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199036 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199037 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199038 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199042 2 0.6566 0.514 0.016 0.636 0.348
#> SRR1199043 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199044 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199045 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199046 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199048 2 0.1860 0.942 0.000 0.948 0.052
#> SRR1199049 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199052 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199054 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199056 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199057 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199064 3 0.5882 0.000 0.348 0.000 0.652
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199081 2 0.0892 0.969 0.000 0.980 0.020
#> SRR1199082 2 0.0892 0.969 0.000 0.980 0.020
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199088 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199089 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199090 2 0.1860 0.942 0.000 0.948 0.052
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199096 2 0.1411 0.956 0.000 0.964 0.036
#> SRR1199097 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199098 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199104 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199105 2 0.4346 0.798 0.000 0.816 0.184
#> SRR1199106 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199108 1 0.0237 0.994 0.996 0.000 0.004
#> SRR1199109 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199110 2 0.0892 0.969 0.000 0.980 0.020
#> SRR1199111 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199112 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199113 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.983 0.000 1.000 0.000
#> SRR1199120 2 0.0000 0.983 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199009 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199013 2 0.1284 0.966 0.000 0.964 0.024 0.012
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199016 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.0469 1.000 0.012 0.000 0.000 0.988
#> SRR1199028 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199034 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199035 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199036 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199038 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.0469 1.000 0.012 0.000 0.000 0.988
#> SRR1199043 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199044 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199045 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199046 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199047 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.2319 0.931 0.000 0.924 0.040 0.036
#> SRR1199049 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199052 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199054 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199057 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199064 3 0.1211 0.000 0.040 0.000 0.960 0.000
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199081 2 0.1284 0.966 0.000 0.964 0.024 0.012
#> SRR1199082 2 0.1151 0.969 0.000 0.968 0.024 0.008
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199088 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199089 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199090 2 0.2319 0.931 0.000 0.924 0.040 0.036
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199096 2 0.3279 0.873 0.000 0.872 0.032 0.096
#> SRR1199097 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199098 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199104 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199105 2 0.5168 0.635 0.000 0.712 0.040 0.248
#> SRR1199106 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199108 1 0.0188 0.996 0.996 0.000 0.000 0.004
#> SRR1199109 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.1151 0.969 0.000 0.968 0.024 0.008
#> SRR1199111 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199112 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199113 2 0.0657 0.980 0.000 0.984 0.012 0.004
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0188 0.985 0.000 0.996 0.000 0.004
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.986 0.000 1.000 0.000 0.000
#> SRR1199120 2 0.0657 0.980 0.000 0.984 0.012 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 2 0.1341 0.944 0.000 0.944 0 0.000 0.056
#> SRR1199009 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199010 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199012 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199013 5 0.3913 0.667 0.000 0.324 0 0.000 0.676
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199016 2 0.1410 0.941 0.000 0.940 0 0.000 0.060
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199020 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199021 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199027 4 0.0000 1.000 0.000 0.000 0 1.000 0.000
#> SRR1199028 2 0.0162 0.978 0.000 0.996 0 0.000 0.004
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199031 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199032 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199033 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199034 2 0.1341 0.944 0.000 0.944 0 0.000 0.056
#> SRR1199035 2 0.1341 0.944 0.000 0.944 0 0.000 0.056
#> SRR1199036 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199037 2 0.0162 0.978 0.000 0.996 0 0.000 0.004
#> SRR1199038 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199040 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199042 4 0.0000 1.000 0.000 0.000 0 1.000 0.000
#> SRR1199043 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199044 2 0.1341 0.944 0.000 0.944 0 0.000 0.056
#> SRR1199045 2 0.1341 0.944 0.000 0.944 0 0.000 0.056
#> SRR1199046 2 0.0290 0.976 0.000 0.992 0 0.000 0.008
#> SRR1199047 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199048 5 0.2020 0.570 0.000 0.100 0 0.000 0.900
#> SRR1199049 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199051 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199052 2 0.1341 0.944 0.000 0.944 0 0.000 0.056
#> SRR1199054 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199056 2 0.1270 0.939 0.000 0.948 0 0.000 0.052
#> SRR1199057 2 0.0162 0.978 0.000 0.996 0 0.000 0.004
#> SRR1199059 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199060 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199061 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199064 3 0.0000 0.000 0.000 0.000 1 0.000 0.000
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199067 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199076 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199078 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199079 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199081 5 0.3876 0.674 0.000 0.316 0 0.000 0.684
#> SRR1199082 5 0.3752 0.678 0.000 0.292 0 0.000 0.708
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199087 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199088 2 0.1410 0.941 0.000 0.940 0 0.000 0.060
#> SRR1199089 2 0.1410 0.941 0.000 0.940 0 0.000 0.060
#> SRR1199090 5 0.2020 0.570 0.000 0.100 0 0.000 0.900
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199093 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199095 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199096 5 0.2230 0.528 0.000 0.116 0 0.000 0.884
#> SRR1199097 2 0.0162 0.978 0.000 0.996 0 0.000 0.004
#> SRR1199098 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199100 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199101 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199103 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199104 2 0.1410 0.941 0.000 0.940 0 0.000 0.060
#> SRR1199105 5 0.2377 0.175 0.000 0.000 0 0.128 0.872
#> SRR1199106 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199107 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199108 1 0.0162 0.996 0.996 0.000 0 0.004 0.000
#> SRR1199109 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199110 5 0.4030 0.627 0.000 0.352 0 0.000 0.648
#> SRR1199111 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199112 2 0.1410 0.941 0.000 0.940 0 0.000 0.060
#> SRR1199113 2 0.1410 0.941 0.000 0.940 0 0.000 0.060
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199116 2 0.0290 0.976 0.000 0.992 0 0.000 0.008
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0 0.000 0.000
#> SRR1199119 2 0.0000 0.980 0.000 1.000 0 0.000 0.000
#> SRR1199120 2 0.1410 0.941 0.000 0.940 0 0.000 0.060
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 2 0.2772 0.810 0.000 0.816 0.000 0.00 0.004 0.180
#> SRR1199009 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199010 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199011 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199012 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199013 5 0.3853 0.569 0.000 0.304 0.000 0.00 0.680 0.016
#> SRR1199015 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199016 2 0.2882 0.806 0.000 0.812 0.000 0.00 0.008 0.180
#> SRR1199017 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199018 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199019 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199020 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199021 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199022 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199023 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199025 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199026 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199027 4 0.0000 1.000 0.000 0.000 0.000 1.00 0.000 0.000
#> SRR1199028 2 0.0291 0.934 0.000 0.992 0.000 0.00 0.004 0.004
#> SRR1199029 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199031 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199032 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199033 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199034 2 0.2772 0.810 0.000 0.816 0.000 0.00 0.004 0.180
#> SRR1199035 2 0.2772 0.810 0.000 0.816 0.000 0.00 0.004 0.180
#> SRR1199036 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199037 2 0.1075 0.911 0.000 0.952 0.000 0.00 0.000 0.048
#> SRR1199038 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199040 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199042 4 0.0000 1.000 0.000 0.000 0.000 1.00 0.000 0.000
#> SRR1199043 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199044 2 0.2772 0.810 0.000 0.816 0.000 0.00 0.004 0.180
#> SRR1199045 2 0.2772 0.810 0.000 0.816 0.000 0.00 0.004 0.180
#> SRR1199046 2 0.0291 0.935 0.000 0.992 0.000 0.00 0.004 0.004
#> SRR1199047 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199048 5 0.1663 0.219 0.000 0.088 0.000 0.00 0.912 0.000
#> SRR1199049 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199050 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199051 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199052 2 0.2772 0.810 0.000 0.816 0.000 0.00 0.004 0.180
#> SRR1199054 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199056 2 0.2506 0.860 0.000 0.880 0.000 0.00 0.052 0.068
#> SRR1199057 2 0.0146 0.935 0.000 0.996 0.000 0.00 0.004 0.000
#> SRR1199059 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199060 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199061 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199062 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199064 6 0.2631 0.000 0.000 0.000 0.180 0.00 0.000 0.820
#> SRR1199065 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199067 2 0.0260 0.935 0.000 0.992 0.000 0.00 0.000 0.008
#> SRR1199075 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199076 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199077 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199078 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199079 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199080 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199081 5 0.3816 0.575 0.000 0.296 0.000 0.00 0.688 0.016
#> SRR1199082 5 0.3534 0.567 0.000 0.276 0.000 0.00 0.716 0.008
#> SRR1199083 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199084 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199085 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199086 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199087 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199088 2 0.2882 0.806 0.000 0.812 0.000 0.00 0.008 0.180
#> SRR1199089 2 0.2882 0.806 0.000 0.812 0.000 0.00 0.008 0.180
#> SRR1199090 5 0.1663 0.219 0.000 0.088 0.000 0.00 0.912 0.000
#> SRR1199091 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199092 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199093 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199094 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199095 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199096 3 0.5922 0.000 0.000 0.024 0.472 0.00 0.388 0.116
#> SRR1199097 2 0.1349 0.903 0.000 0.940 0.000 0.00 0.004 0.056
#> SRR1199098 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199099 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199100 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199101 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199102 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199103 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199104 2 0.2882 0.806 0.000 0.812 0.000 0.00 0.008 0.180
#> SRR1199105 5 0.2662 -0.287 0.000 0.000 0.024 0.12 0.856 0.000
#> SRR1199106 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199107 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199108 1 0.3515 0.545 0.676 0.000 0.324 0.00 0.000 0.000
#> SRR1199109 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199110 5 0.3804 0.523 0.000 0.336 0.000 0.00 0.656 0.008
#> SRR1199111 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199112 2 0.2882 0.806 0.000 0.812 0.000 0.00 0.008 0.180
#> SRR1199113 2 0.2882 0.806 0.000 0.812 0.000 0.00 0.008 0.180
#> SRR1199114 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199115 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199116 2 0.0291 0.934 0.000 0.992 0.000 0.00 0.004 0.004
#> SRR1199117 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199118 1 0.0000 0.989 1.000 0.000 0.000 0.00 0.000 0.000
#> SRR1199119 2 0.0000 0.938 0.000 1.000 0.000 0.00 0.000 0.000
#> SRR1199120 2 0.2882 0.806 0.000 0.812 0.000 0.00 0.008 0.180
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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) 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 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.996 0.998 0.4508 0.551 0.551
#> 3 3 0.788 0.764 0.903 0.3250 0.839 0.707
#> 4 4 0.931 0.911 0.955 0.1048 0.888 0.735
#> 5 5 0.944 0.906 0.960 0.0686 0.938 0.822
#> 6 6 0.899 0.850 0.924 0.0395 0.997 0.991
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
#> SRR1199002 2 0.000 0.997 0.000 1.000
#> SRR1199009 2 0.000 0.997 0.000 1.000
#> SRR1199010 2 0.000 0.997 0.000 1.000
#> SRR1199011 1 0.000 1.000 1.000 0.000
#> SRR1199012 2 0.000 0.997 0.000 1.000
#> SRR1199013 2 0.000 0.997 0.000 1.000
#> SRR1199015 1 0.000 1.000 1.000 0.000
#> SRR1199016 2 0.000 0.997 0.000 1.000
#> SRR1199017 1 0.000 1.000 1.000 0.000
#> SRR1199018 1 0.000 1.000 1.000 0.000
#> SRR1199019 1 0.000 1.000 1.000 0.000
#> SRR1199020 2 0.000 0.997 0.000 1.000
#> SRR1199021 2 0.000 0.997 0.000 1.000
#> SRR1199022 1 0.000 1.000 1.000 0.000
#> SRR1199023 1 0.000 1.000 1.000 0.000
#> SRR1199025 1 0.000 1.000 1.000 0.000
#> SRR1199026 1 0.000 1.000 1.000 0.000
#> SRR1199027 2 0.662 0.792 0.172 0.828
#> SRR1199028 2 0.000 0.997 0.000 1.000
#> SRR1199029 1 0.000 1.000 1.000 0.000
#> SRR1199031 2 0.000 0.997 0.000 1.000
#> SRR1199032 2 0.000 0.997 0.000 1.000
#> SRR1199033 2 0.000 0.997 0.000 1.000
#> SRR1199034 2 0.000 0.997 0.000 1.000
#> SRR1199035 2 0.000 0.997 0.000 1.000
#> SRR1199036 2 0.000 0.997 0.000 1.000
#> SRR1199037 2 0.000 0.997 0.000 1.000
#> SRR1199038 2 0.000 0.997 0.000 1.000
#> SRR1199040 2 0.000 0.997 0.000 1.000
#> SRR1199042 2 0.000 0.997 0.000 1.000
#> SRR1199043 2 0.000 0.997 0.000 1.000
#> SRR1199044 2 0.000 0.997 0.000 1.000
#> SRR1199045 2 0.000 0.997 0.000 1.000
#> SRR1199046 2 0.000 0.997 0.000 1.000
#> SRR1199047 2 0.000 0.997 0.000 1.000
#> SRR1199048 2 0.000 0.997 0.000 1.000
#> SRR1199049 1 0.000 1.000 1.000 0.000
#> SRR1199050 1 0.000 1.000 1.000 0.000
#> SRR1199051 2 0.000 0.997 0.000 1.000
#> SRR1199052 2 0.000 0.997 0.000 1.000
#> SRR1199054 2 0.000 0.997 0.000 1.000
#> SRR1199056 2 0.000 0.997 0.000 1.000
#> SRR1199057 2 0.000 0.997 0.000 1.000
#> SRR1199059 2 0.000 0.997 0.000 1.000
#> SRR1199060 2 0.000 0.997 0.000 1.000
#> SRR1199061 2 0.000 0.997 0.000 1.000
#> SRR1199062 1 0.000 1.000 1.000 0.000
#> SRR1199064 1 0.000 1.000 1.000 0.000
#> SRR1199065 1 0.000 1.000 1.000 0.000
#> SRR1199067 2 0.000 0.997 0.000 1.000
#> SRR1199075 1 0.000 1.000 1.000 0.000
#> SRR1199076 2 0.000 0.997 0.000 1.000
#> SRR1199077 1 0.000 1.000 1.000 0.000
#> SRR1199078 2 0.000 0.997 0.000 1.000
#> SRR1199079 2 0.000 0.997 0.000 1.000
#> SRR1199080 1 0.000 1.000 1.000 0.000
#> SRR1199081 2 0.000 0.997 0.000 1.000
#> SRR1199082 2 0.000 0.997 0.000 1.000
#> SRR1199083 1 0.000 1.000 1.000 0.000
#> SRR1199084 1 0.000 1.000 1.000 0.000
#> SRR1199085 1 0.000 1.000 1.000 0.000
#> SRR1199086 1 0.000 1.000 1.000 0.000
#> SRR1199087 2 0.000 0.997 0.000 1.000
#> SRR1199088 2 0.000 0.997 0.000 1.000
#> SRR1199089 2 0.000 0.997 0.000 1.000
#> SRR1199090 2 0.000 0.997 0.000 1.000
#> SRR1199091 1 0.000 1.000 1.000 0.000
#> SRR1199092 1 0.000 1.000 1.000 0.000
#> SRR1199093 2 0.000 0.997 0.000 1.000
#> SRR1199094 1 0.000 1.000 1.000 0.000
#> SRR1199095 2 0.000 0.997 0.000 1.000
#> SRR1199096 2 0.000 0.997 0.000 1.000
#> SRR1199097 2 0.000 0.997 0.000 1.000
#> SRR1199098 2 0.000 0.997 0.000 1.000
#> SRR1199099 1 0.000 1.000 1.000 0.000
#> SRR1199100 2 0.000 0.997 0.000 1.000
#> SRR1199101 2 0.000 0.997 0.000 1.000
#> SRR1199102 1 0.000 1.000 1.000 0.000
#> SRR1199103 2 0.000 0.997 0.000 1.000
#> SRR1199104 2 0.000 0.997 0.000 1.000
#> SRR1199105 2 0.000 0.997 0.000 1.000
#> SRR1199106 2 0.000 0.997 0.000 1.000
#> SRR1199107 2 0.000 0.997 0.000 1.000
#> SRR1199108 1 0.000 1.000 1.000 0.000
#> SRR1199109 2 0.000 0.997 0.000 1.000
#> SRR1199110 2 0.000 0.997 0.000 1.000
#> SRR1199111 2 0.000 0.997 0.000 1.000
#> SRR1199112 2 0.000 0.997 0.000 1.000
#> SRR1199113 2 0.000 0.997 0.000 1.000
#> SRR1199114 1 0.000 1.000 1.000 0.000
#> SRR1199115 1 0.000 1.000 1.000 0.000
#> SRR1199116 2 0.000 0.997 0.000 1.000
#> SRR1199117 1 0.000 1.000 1.000 0.000
#> SRR1199118 1 0.000 1.000 1.000 0.000
#> SRR1199119 2 0.000 0.997 0.000 1.000
#> SRR1199120 2 0.000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.6305 -0.460 0.000 0.516 0.484
#> SRR1199009 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199011 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199012 2 0.2356 0.790 0.000 0.928 0.072
#> SRR1199013 2 0.6291 -0.377 0.000 0.532 0.468
#> SRR1199015 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199016 3 0.5529 0.775 0.000 0.296 0.704
#> SRR1199017 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199027 3 0.0000 0.601 0.000 0.000 1.000
#> SRR1199028 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199034 2 0.6305 -0.460 0.000 0.516 0.484
#> SRR1199035 2 0.6305 -0.460 0.000 0.516 0.484
#> SRR1199036 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199037 2 0.4178 0.626 0.000 0.828 0.172
#> SRR1199038 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199042 3 0.0237 0.604 0.000 0.004 0.996
#> SRR1199043 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199044 2 0.6309 -0.508 0.000 0.500 0.500
#> SRR1199045 3 0.6309 0.461 0.000 0.500 0.500
#> SRR1199046 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199048 2 0.1643 0.831 0.000 0.956 0.044
#> SRR1199049 1 0.4931 0.786 0.768 0.000 0.232
#> SRR1199050 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199052 3 0.6309 0.461 0.000 0.500 0.500
#> SRR1199054 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199056 2 0.5835 0.119 0.000 0.660 0.340
#> SRR1199057 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199064 1 0.5678 0.700 0.684 0.000 0.316
#> SRR1199065 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199067 2 0.1163 0.846 0.000 0.972 0.028
#> SRR1199075 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199081 3 0.5926 0.760 0.000 0.356 0.644
#> SRR1199082 2 0.6308 -0.402 0.000 0.508 0.492
#> SRR1199083 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199088 3 0.5905 0.764 0.000 0.352 0.648
#> SRR1199089 3 0.5810 0.776 0.000 0.336 0.664
#> SRR1199090 3 0.6286 0.489 0.000 0.464 0.536
#> SRR1199091 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199096 3 0.5431 0.769 0.000 0.284 0.716
#> SRR1199097 2 0.6111 -0.144 0.000 0.604 0.396
#> SRR1199098 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199099 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199102 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199104 3 0.5905 0.764 0.000 0.352 0.648
#> SRR1199105 3 0.0237 0.604 0.000 0.004 0.996
#> SRR1199106 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199108 1 0.5810 0.677 0.664 0.000 0.336
#> SRR1199109 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199110 2 0.1753 0.826 0.000 0.952 0.048
#> SRR1199111 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199112 3 0.5810 0.776 0.000 0.336 0.664
#> SRR1199113 3 0.5529 0.775 0.000 0.296 0.704
#> SRR1199114 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199117 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.976 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.875 0.000 1.000 0.000
#> SRR1199120 3 0.5810 0.776 0.000 0.336 0.664
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.1716 0.929 0.000 0.064 0.936 0.000
#> SRR1199009 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.0188 0.993 0.996 0.000 0.000 0.004
#> SRR1199012 2 0.0707 0.942 0.000 0.980 0.020 0.000
#> SRR1199013 2 0.6162 0.608 0.000 0.676 0.156 0.168
#> SRR1199015 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.0779 0.882 0.000 0.016 0.980 0.004
#> SRR1199017 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.1302 0.727 0.000 0.000 0.044 0.956
#> SRR1199028 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.1716 0.929 0.000 0.064 0.936 0.000
#> SRR1199035 3 0.1716 0.929 0.000 0.064 0.936 0.000
#> SRR1199036 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.1211 0.925 0.000 0.960 0.040 0.000
#> SRR1199038 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.1389 0.726 0.000 0.000 0.048 0.952
#> SRR1199043 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.1716 0.929 0.000 0.064 0.936 0.000
#> SRR1199045 3 0.1716 0.929 0.000 0.064 0.936 0.000
#> SRR1199046 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199047 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.2988 0.849 0.000 0.876 0.012 0.112
#> SRR1199049 4 0.5000 0.126 0.500 0.000 0.000 0.500
#> SRR1199050 1 0.1118 0.959 0.964 0.000 0.000 0.036
#> SRR1199051 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.1716 0.929 0.000 0.064 0.936 0.000
#> SRR1199054 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.4046 0.793 0.000 0.828 0.124 0.048
#> SRR1199057 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.1118 0.959 0.964 0.000 0.000 0.036
#> SRR1199064 4 0.4175 0.718 0.200 0.000 0.016 0.784
#> SRR1199065 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0921 0.936 0.000 0.972 0.028 0.000
#> SRR1199075 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199081 2 0.6224 0.592 0.000 0.668 0.188 0.144
#> SRR1199082 2 0.6993 0.376 0.000 0.556 0.148 0.296
#> SRR1199083 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.1557 0.929 0.000 0.056 0.944 0.000
#> SRR1199089 3 0.1474 0.928 0.000 0.052 0.948 0.000
#> SRR1199090 2 0.7068 0.361 0.000 0.548 0.156 0.296
#> SRR1199091 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199096 3 0.4933 0.533 0.000 0.016 0.688 0.296
#> SRR1199097 3 0.4277 0.590 0.000 0.280 0.720 0.000
#> SRR1199098 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.1557 0.929 0.000 0.056 0.944 0.000
#> SRR1199105 4 0.1557 0.721 0.000 0.000 0.056 0.944
#> SRR1199106 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199108 4 0.3356 0.731 0.176 0.000 0.000 0.824
#> SRR1199109 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.0469 0.948 0.000 0.988 0.012 0.000
#> SRR1199111 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.1474 0.928 0.000 0.052 0.948 0.000
#> SRR1199113 3 0.0592 0.883 0.000 0.016 0.984 0.000
#> SRR1199114 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199117 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.997 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.957 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.1474 0.928 0.000 0.052 0.948 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199009 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199010 2 0.1106 0.969 0.000 0.964 0.000 0.024 0.012
#> SRR1199011 1 0.1608 0.906 0.928 0.000 0.000 0.072 0.000
#> SRR1199012 2 0.1211 0.962 0.000 0.960 0.000 0.024 0.016
#> SRR1199013 5 0.3277 0.636 0.000 0.148 0.008 0.012 0.832
#> SRR1199015 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.0162 0.970 0.000 0.000 0.996 0.004 0.000
#> SRR1199017 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0162 0.989 0.000 0.996 0.000 0.004 0.000
#> SRR1199021 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0162 0.972 0.996 0.000 0.000 0.004 0.000
#> SRR1199025 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.4264 0.409 0.000 0.000 0.004 0.620 0.376
#> SRR1199028 2 0.0566 0.982 0.000 0.984 0.000 0.012 0.004
#> SRR1199029 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199032 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199033 2 0.0162 0.989 0.000 0.996 0.000 0.004 0.000
#> SRR1199034 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199035 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199036 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199037 2 0.1211 0.962 0.000 0.960 0.000 0.024 0.016
#> SRR1199038 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199040 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199042 5 0.4403 -0.215 0.000 0.000 0.004 0.436 0.560
#> SRR1199043 2 0.0290 0.987 0.000 0.992 0.000 0.008 0.000
#> SRR1199044 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199045 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199046 2 0.0290 0.987 0.000 0.992 0.000 0.008 0.000
#> SRR1199047 2 0.0404 0.985 0.000 0.988 0.000 0.012 0.000
#> SRR1199048 5 0.4416 0.455 0.000 0.356 0.000 0.012 0.632
#> SRR1199049 4 0.2179 0.740 0.112 0.000 0.000 0.888 0.000
#> SRR1199050 1 0.3796 0.582 0.700 0.000 0.000 0.300 0.000
#> SRR1199051 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199054 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199056 5 0.5278 0.398 0.000 0.408 0.016 0.024 0.552
#> SRR1199057 2 0.0290 0.987 0.000 0.992 0.000 0.008 0.000
#> SRR1199059 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199060 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199061 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199062 1 0.3796 0.582 0.700 0.000 0.000 0.300 0.000
#> SRR1199064 4 0.2260 0.773 0.028 0.000 0.000 0.908 0.064
#> SRR1199065 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.1471 0.958 0.000 0.952 0.004 0.024 0.020
#> SRR1199075 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199077 1 0.0162 0.972 0.996 0.000 0.000 0.004 0.000
#> SRR1199078 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199079 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199080 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.3587 0.638 0.000 0.140 0.024 0.012 0.824
#> SRR1199082 5 0.1764 0.634 0.000 0.064 0.008 0.000 0.928
#> SRR1199083 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199088 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199089 3 0.0162 0.970 0.000 0.000 0.996 0.004 0.000
#> SRR1199090 5 0.1764 0.634 0.000 0.064 0.008 0.000 0.928
#> SRR1199091 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199094 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199096 5 0.1671 0.533 0.000 0.000 0.076 0.000 0.924
#> SRR1199097 3 0.3621 0.607 0.000 0.192 0.788 0.020 0.000
#> SRR1199098 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199099 1 0.0162 0.972 0.996 0.000 0.000 0.004 0.000
#> SRR1199100 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199101 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199102 1 0.0162 0.972 0.996 0.000 0.000 0.004 0.000
#> SRR1199103 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199104 3 0.0000 0.971 0.000 0.000 1.000 0.000 0.000
#> SRR1199105 5 0.1768 0.519 0.000 0.000 0.004 0.072 0.924
#> SRR1199106 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199108 4 0.1915 0.787 0.032 0.000 0.000 0.928 0.040
#> SRR1199109 2 0.0162 0.989 0.000 0.996 0.000 0.000 0.004
#> SRR1199110 2 0.1893 0.930 0.000 0.928 0.000 0.024 0.048
#> SRR1199111 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199112 3 0.0162 0.970 0.000 0.000 0.996 0.004 0.000
#> SRR1199113 3 0.0162 0.970 0.000 0.000 0.996 0.004 0.000
#> SRR1199114 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.1106 0.969 0.000 0.964 0.000 0.024 0.012
#> SRR1199117 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.990 0.000 1.000 0.000 0.000 0.000
#> SRR1199120 3 0.0000 0.971 0.000 0.000 1.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
#> SRR1199002 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199009 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199010 2 0.4882 0.667 0.000 0.692 0.000 0.052 0.044 0.212
#> SRR1199011 1 0.2664 0.775 0.816 0.000 0.000 0.000 0.000 0.184
#> SRR1199012 2 0.5908 0.528 0.000 0.600 0.000 0.052 0.132 0.216
#> SRR1199013 5 0.1152 0.718 0.000 0.044 0.000 0.000 0.952 0.004
#> SRR1199015 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.1003 0.938 0.000 0.004 0.964 0.004 0.000 0.028
#> SRR1199017 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0458 0.923 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199021 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0865 0.930 0.964 0.000 0.000 0.000 0.000 0.036
#> SRR1199025 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.2994 0.820 0.000 0.000 0.000 0.788 0.208 0.004
#> SRR1199028 2 0.4603 0.724 0.000 0.748 0.000 0.044 0.112 0.096
#> SRR1199029 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199032 2 0.0520 0.923 0.000 0.984 0.000 0.008 0.000 0.008
#> SRR1199033 2 0.1549 0.893 0.000 0.936 0.000 0.044 0.000 0.020
#> SRR1199034 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199035 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199036 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199037 2 0.5656 0.571 0.000 0.624 0.000 0.052 0.100 0.224
#> SRR1199038 2 0.0363 0.924 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199040 2 0.0363 0.924 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199042 4 0.3351 0.837 0.000 0.000 0.000 0.712 0.288 0.000
#> SRR1199043 2 0.0937 0.912 0.000 0.960 0.000 0.000 0.000 0.040
#> SRR1199044 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199045 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199046 2 0.0725 0.920 0.000 0.976 0.000 0.000 0.012 0.012
#> SRR1199047 2 0.2889 0.828 0.000 0.848 0.000 0.044 0.000 0.108
#> SRR1199048 5 0.2871 0.541 0.000 0.192 0.000 0.004 0.804 0.000
#> SRR1199049 6 0.5122 0.582 0.104 0.000 0.000 0.320 0.000 0.576
#> SRR1199050 1 0.3789 0.333 0.584 0.000 0.000 0.000 0.000 0.416
#> SRR1199051 2 0.0363 0.924 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199052 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199054 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199056 5 0.5647 0.427 0.000 0.172 0.004 0.052 0.652 0.120
#> SRR1199057 2 0.1003 0.913 0.000 0.964 0.000 0.000 0.020 0.016
#> SRR1199059 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199060 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199061 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199062 1 0.3828 0.265 0.560 0.000 0.000 0.000 0.000 0.440
#> SRR1199064 6 0.4360 0.508 0.004 0.000 0.004 0.404 0.012 0.576
#> SRR1199065 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.6067 0.478 0.000 0.572 0.000 0.052 0.136 0.240
#> SRR1199075 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199077 1 0.0865 0.930 0.964 0.000 0.000 0.000 0.000 0.036
#> SRR1199078 2 0.0363 0.924 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199079 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199080 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.1219 0.716 0.000 0.048 0.000 0.000 0.948 0.004
#> SRR1199082 5 0.1625 0.696 0.000 0.012 0.000 0.060 0.928 0.000
#> SRR1199083 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199088 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199089 3 0.0837 0.944 0.000 0.004 0.972 0.004 0.000 0.020
#> SRR1199090 5 0.1625 0.696 0.000 0.012 0.000 0.060 0.928 0.000
#> SRR1199091 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199094 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199096 5 0.1750 0.679 0.000 0.000 0.012 0.040 0.932 0.016
#> SRR1199097 3 0.6484 0.374 0.000 0.136 0.596 0.052 0.036 0.180
#> SRR1199098 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199099 1 0.1387 0.905 0.932 0.000 0.000 0.000 0.000 0.068
#> SRR1199100 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199101 2 0.0717 0.919 0.000 0.976 0.000 0.016 0.000 0.008
#> SRR1199102 1 0.1387 0.905 0.932 0.000 0.000 0.000 0.000 0.068
#> SRR1199103 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199104 3 0.0146 0.956 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1199105 5 0.2883 0.448 0.000 0.000 0.000 0.212 0.788 0.000
#> SRR1199106 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199107 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199108 6 0.4067 0.589 0.008 0.000 0.000 0.444 0.000 0.548
#> SRR1199109 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199110 2 0.4923 0.617 0.000 0.668 0.000 0.004 0.144 0.184
#> SRR1199111 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199112 3 0.0291 0.954 0.000 0.004 0.992 0.000 0.000 0.004
#> SRR1199113 3 0.0837 0.944 0.000 0.004 0.972 0.004 0.000 0.020
#> SRR1199114 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.5643 0.586 0.000 0.640 0.000 0.052 0.128 0.180
#> SRR1199117 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199120 3 0.0146 0.956 0.000 0.004 0.996 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", "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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) 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 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.984 0.994 0.4614 0.538 0.538
#> 3 3 1.000 0.966 0.987 0.3266 0.845 0.712
#> 4 4 0.958 0.942 0.975 0.0651 0.947 0.865
#> 5 5 0.935 0.902 0.958 0.0207 0.992 0.977
#> 6 6 0.898 0.863 0.940 0.0249 0.999 0.998
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
#> SRR1199002 2 0.000 0.997 0.000 1.000
#> SRR1199009 2 0.000 0.997 0.000 1.000
#> SRR1199010 2 0.000 0.997 0.000 1.000
#> SRR1199011 1 0.000 0.988 1.000 0.000
#> SRR1199012 2 0.000 0.997 0.000 1.000
#> SRR1199013 2 0.000 0.997 0.000 1.000
#> SRR1199015 1 0.000 0.988 1.000 0.000
#> SRR1199016 2 0.000 0.997 0.000 1.000
#> SRR1199017 1 0.000 0.988 1.000 0.000
#> SRR1199018 1 0.000 0.988 1.000 0.000
#> SRR1199019 1 0.000 0.988 1.000 0.000
#> SRR1199020 2 0.000 0.997 0.000 1.000
#> SRR1199021 2 0.000 0.997 0.000 1.000
#> SRR1199022 1 0.000 0.988 1.000 0.000
#> SRR1199023 1 0.000 0.988 1.000 0.000
#> SRR1199025 1 0.000 0.988 1.000 0.000
#> SRR1199026 1 0.000 0.988 1.000 0.000
#> SRR1199027 1 0.000 0.988 1.000 0.000
#> SRR1199028 2 0.000 0.997 0.000 1.000
#> SRR1199029 1 0.000 0.988 1.000 0.000
#> SRR1199031 2 0.000 0.997 0.000 1.000
#> SRR1199032 2 0.000 0.997 0.000 1.000
#> SRR1199033 2 0.000 0.997 0.000 1.000
#> SRR1199034 2 0.000 0.997 0.000 1.000
#> SRR1199035 2 0.000 0.997 0.000 1.000
#> SRR1199036 2 0.000 0.997 0.000 1.000
#> SRR1199037 2 0.000 0.997 0.000 1.000
#> SRR1199038 2 0.000 0.997 0.000 1.000
#> SRR1199040 2 0.000 0.997 0.000 1.000
#> SRR1199042 1 0.969 0.338 0.604 0.396
#> SRR1199043 2 0.000 0.997 0.000 1.000
#> SRR1199044 2 0.000 0.997 0.000 1.000
#> SRR1199045 2 0.000 0.997 0.000 1.000
#> SRR1199046 2 0.000 0.997 0.000 1.000
#> SRR1199047 2 0.000 0.997 0.000 1.000
#> SRR1199048 2 0.000 0.997 0.000 1.000
#> SRR1199049 1 0.000 0.988 1.000 0.000
#> SRR1199050 1 0.000 0.988 1.000 0.000
#> SRR1199051 2 0.000 0.997 0.000 1.000
#> SRR1199052 2 0.000 0.997 0.000 1.000
#> SRR1199054 2 0.000 0.997 0.000 1.000
#> SRR1199056 2 0.000 0.997 0.000 1.000
#> SRR1199057 2 0.000 0.997 0.000 1.000
#> SRR1199059 2 0.000 0.997 0.000 1.000
#> SRR1199060 2 0.000 0.997 0.000 1.000
#> SRR1199061 2 0.000 0.997 0.000 1.000
#> SRR1199062 1 0.000 0.988 1.000 0.000
#> SRR1199064 1 0.000 0.988 1.000 0.000
#> SRR1199065 1 0.000 0.988 1.000 0.000
#> SRR1199067 2 0.000 0.997 0.000 1.000
#> SRR1199075 1 0.000 0.988 1.000 0.000
#> SRR1199076 2 0.000 0.997 0.000 1.000
#> SRR1199077 1 0.000 0.988 1.000 0.000
#> SRR1199078 2 0.000 0.997 0.000 1.000
#> SRR1199079 2 0.000 0.997 0.000 1.000
#> SRR1199080 1 0.000 0.988 1.000 0.000
#> SRR1199081 2 0.000 0.997 0.000 1.000
#> SRR1199082 2 0.000 0.997 0.000 1.000
#> SRR1199083 1 0.000 0.988 1.000 0.000
#> SRR1199084 1 0.000 0.988 1.000 0.000
#> SRR1199085 1 0.000 0.988 1.000 0.000
#> SRR1199086 1 0.000 0.988 1.000 0.000
#> SRR1199087 2 0.000 0.997 0.000 1.000
#> SRR1199088 2 0.000 0.997 0.000 1.000
#> SRR1199089 2 0.000 0.997 0.000 1.000
#> SRR1199090 2 0.000 0.997 0.000 1.000
#> SRR1199091 1 0.000 0.988 1.000 0.000
#> SRR1199092 1 0.000 0.988 1.000 0.000
#> SRR1199093 2 0.000 0.997 0.000 1.000
#> SRR1199094 1 0.000 0.988 1.000 0.000
#> SRR1199095 2 0.000 0.997 0.000 1.000
#> SRR1199096 2 0.000 0.997 0.000 1.000
#> SRR1199097 2 0.000 0.997 0.000 1.000
#> SRR1199098 2 0.000 0.997 0.000 1.000
#> SRR1199099 1 0.000 0.988 1.000 0.000
#> SRR1199100 2 0.000 0.997 0.000 1.000
#> SRR1199101 2 0.000 0.997 0.000 1.000
#> SRR1199102 1 0.000 0.988 1.000 0.000
#> SRR1199103 2 0.000 0.997 0.000 1.000
#> SRR1199104 2 0.000 0.997 0.000 1.000
#> SRR1199105 2 0.706 0.758 0.192 0.808
#> SRR1199106 2 0.000 0.997 0.000 1.000
#> SRR1199107 2 0.000 0.997 0.000 1.000
#> SRR1199108 1 0.000 0.988 1.000 0.000
#> SRR1199109 2 0.000 0.997 0.000 1.000
#> SRR1199110 2 0.000 0.997 0.000 1.000
#> SRR1199111 2 0.000 0.997 0.000 1.000
#> SRR1199112 2 0.000 0.997 0.000 1.000
#> SRR1199113 2 0.000 0.997 0.000 1.000
#> SRR1199114 1 0.000 0.988 1.000 0.000
#> SRR1199115 1 0.000 0.988 1.000 0.000
#> SRR1199116 2 0.000 0.997 0.000 1.000
#> SRR1199117 1 0.000 0.988 1.000 0.000
#> SRR1199118 1 0.000 0.988 1.000 0.000
#> SRR1199119 2 0.000 0.997 0.000 1.000
#> SRR1199120 2 0.000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199009 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199011 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199012 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199013 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199015 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199016 3 0.0000 0.947 0.000 0.000 1.000
#> SRR1199017 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199027 1 0.0237 0.981 0.996 0.000 0.004
#> SRR1199028 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199034 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199035 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199036 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199037 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199038 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199042 1 0.6498 0.327 0.596 0.396 0.008
#> SRR1199043 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199044 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199045 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199046 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199048 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199049 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199050 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199052 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199054 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199056 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199057 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199064 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199065 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199075 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199081 2 0.0237 0.991 0.000 0.996 0.004
#> SRR1199082 2 0.0237 0.991 0.000 0.996 0.004
#> SRR1199083 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199088 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199089 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199090 2 0.0237 0.991 0.000 0.996 0.004
#> SRR1199091 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199096 3 0.4605 0.746 0.000 0.204 0.796
#> SRR1199097 3 0.6111 0.366 0.000 0.396 0.604
#> SRR1199098 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199099 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199102 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199104 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199105 2 0.5355 0.734 0.168 0.800 0.032
#> SRR1199106 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199108 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199109 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199110 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199111 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199112 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199113 3 0.0237 0.951 0.000 0.004 0.996
#> SRR1199114 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199117 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.995 0.000 1.000 0.000
#> SRR1199120 3 0.0237 0.951 0.000 0.004 0.996
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199009 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199013 2 0.3486 0.739 0.000 0.812 0.000 0.188
#> SRR1199015 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199017 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199027 1 0.4746 0.431 0.632 0.000 0.000 0.368
#> SRR1199028 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199035 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199036 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.0188 0.968 0.000 0.996 0.004 0.000
#> SRR1199038 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.2814 0.620 0.132 0.000 0.000 0.868
#> SRR1199043 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199045 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199046 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199047 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.3486 0.739 0.000 0.812 0.000 0.188
#> SRR1199049 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199054 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.1209 0.934 0.000 0.964 0.032 0.004
#> SRR1199057 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199064 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199065 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199081 2 0.5620 0.549 0.000 0.708 0.084 0.208
#> SRR1199082 4 0.4103 0.667 0.000 0.256 0.000 0.744
#> SRR1199083 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199089 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199090 4 0.3569 0.715 0.000 0.196 0.000 0.804
#> SRR1199091 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199096 4 0.6375 0.506 0.000 0.104 0.272 0.624
#> SRR1199097 2 0.4679 0.370 0.000 0.648 0.352 0.000
#> SRR1199098 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199105 4 0.0336 0.676 0.000 0.008 0.000 0.992
#> SRR1199106 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199108 1 0.0188 0.984 0.996 0.000 0.000 0.004
#> SRR1199109 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199111 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199113 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1199114 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199117 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.972 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.0000 1.000 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199009 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199010 2 0.0290 0.9482 0.000 0.992 0.000 0.000 0.008
#> SRR1199011 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.1686 0.9130 0.000 0.944 0.008 0.020 0.028
#> SRR1199013 2 0.4526 0.4699 0.000 0.672 0.000 0.028 0.300
#> SRR1199015 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.1701 0.9479 0.000 0.000 0.936 0.048 0.016
#> SRR1199017 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199021 2 0.0290 0.9502 0.000 0.992 0.000 0.000 0.008
#> SRR1199022 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.3861 0.3854 0.284 0.000 0.000 0.712 0.004
#> SRR1199028 2 0.0771 0.9423 0.000 0.976 0.000 0.004 0.020
#> SRR1199029 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0162 0.9505 0.000 0.996 0.000 0.000 0.004
#> SRR1199032 2 0.0324 0.9497 0.000 0.992 0.000 0.004 0.004
#> SRR1199033 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199034 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199035 3 0.0162 0.9854 0.000 0.000 0.996 0.004 0.000
#> SRR1199036 2 0.0451 0.9493 0.000 0.988 0.000 0.004 0.008
#> SRR1199037 2 0.1186 0.9292 0.000 0.964 0.020 0.008 0.008
#> SRR1199038 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199040 2 0.0290 0.9502 0.000 0.992 0.000 0.000 0.008
#> SRR1199042 4 0.4758 0.0620 0.048 0.000 0.000 0.676 0.276
#> SRR1199043 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199044 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199045 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199046 2 0.0290 0.9502 0.000 0.992 0.000 0.000 0.008
#> SRR1199047 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199048 2 0.3934 0.5654 0.000 0.716 0.000 0.008 0.276
#> SRR1199049 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199054 2 0.0162 0.9505 0.000 0.996 0.000 0.000 0.004
#> SRR1199056 2 0.3870 0.7800 0.000 0.832 0.048 0.032 0.088
#> SRR1199057 2 0.0510 0.9472 0.000 0.984 0.000 0.000 0.016
#> SRR1199059 2 0.0162 0.9505 0.000 0.996 0.000 0.000 0.004
#> SRR1199060 2 0.0162 0.9505 0.000 0.996 0.000 0.000 0.004
#> SRR1199061 2 0.0162 0.9505 0.000 0.996 0.000 0.000 0.004
#> SRR1199062 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 1 0.0865 0.9646 0.972 0.000 0.000 0.024 0.004
#> SRR1199065 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.1648 0.9047 0.000 0.940 0.000 0.020 0.040
#> SRR1199075 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199077 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0162 0.9498 0.000 0.996 0.000 0.000 0.004
#> SRR1199079 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199080 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 2 0.5941 0.0373 0.000 0.532 0.088 0.008 0.372
#> SRR1199082 5 0.5515 0.4193 0.000 0.260 0.000 0.112 0.628
#> SRR1199083 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199088 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199089 3 0.1041 0.9676 0.000 0.000 0.964 0.032 0.004
#> SRR1199090 5 0.2722 0.5156 0.000 0.108 0.000 0.020 0.872
#> SRR1199091 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0162 0.9501 0.000 0.996 0.000 0.000 0.004
#> SRR1199094 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199096 5 0.7080 0.3667 0.000 0.080 0.124 0.252 0.544
#> SRR1199097 2 0.4142 0.4613 0.000 0.684 0.308 0.004 0.004
#> SRR1199098 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199099 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199101 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199102 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199104 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199105 5 0.3210 0.2432 0.000 0.000 0.000 0.212 0.788
#> SRR1199106 2 0.0000 0.9507 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 2 0.0162 0.9505 0.000 0.996 0.000 0.000 0.004
#> SRR1199108 1 0.2068 0.8731 0.904 0.000 0.000 0.092 0.004
#> SRR1199109 2 0.0162 0.9505 0.000 0.996 0.000 0.000 0.004
#> SRR1199110 2 0.0865 0.9349 0.000 0.972 0.000 0.004 0.024
#> SRR1199111 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199112 3 0.0000 0.9881 0.000 0.000 1.000 0.000 0.000
#> SRR1199113 3 0.1444 0.9573 0.000 0.000 0.948 0.040 0.012
#> SRR1199114 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0510 0.9432 0.000 0.984 0.000 0.000 0.016
#> SRR1199117 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9953 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0162 0.9507 0.000 0.996 0.000 0.000 0.004
#> SRR1199120 3 0.0000 0.9881 0.000 0.000 1.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
#> SRR1199002 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199009 2 0.0291 0.921 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1199010 2 0.0865 0.912 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR1199011 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.2094 0.865 0.000 0.900 0.000 0.000 0.020 0.080
#> SRR1199013 2 0.5583 0.172 0.000 0.540 0.000 0.004 0.308 0.148
#> SRR1199015 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.3050 0.836 0.000 0.000 0.848 0.028 0.016 0.108
#> SRR1199017 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0508 0.920 0.000 0.984 0.000 0.000 0.004 0.012
#> SRR1199021 2 0.0508 0.921 0.000 0.984 0.000 0.000 0.012 0.004
#> SRR1199022 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.4141 0.408 0.112 0.000 0.000 0.756 0.004 0.128
#> SRR1199028 2 0.2152 0.871 0.000 0.904 0.000 0.004 0.024 0.068
#> SRR1199029 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0146 0.921 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199032 2 0.0603 0.921 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR1199033 2 0.0692 0.920 0.000 0.976 0.000 0.000 0.004 0.020
#> SRR1199034 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199035 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199036 2 0.0508 0.919 0.000 0.984 0.000 0.000 0.004 0.012
#> SRR1199037 2 0.3346 0.769 0.000 0.816 0.036 0.000 0.008 0.140
#> SRR1199038 2 0.0291 0.921 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1199040 2 0.0291 0.921 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1199042 4 0.3612 0.337 0.000 0.000 0.000 0.764 0.200 0.036
#> SRR1199043 2 0.0458 0.920 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199044 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199045 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199046 2 0.1223 0.909 0.000 0.960 0.008 0.004 0.012 0.016
#> SRR1199047 2 0.0713 0.916 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR1199048 2 0.5046 0.315 0.000 0.592 0.000 0.008 0.328 0.072
#> SRR1199049 1 0.0508 0.977 0.984 0.000 0.000 0.004 0.000 0.012
#> SRR1199050 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0405 0.919 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR1199052 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199054 2 0.0405 0.919 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR1199056 2 0.5279 0.592 0.000 0.696 0.052 0.008 0.084 0.160
#> SRR1199057 2 0.0603 0.921 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR1199059 2 0.0260 0.921 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1199060 2 0.0363 0.920 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199061 2 0.0363 0.920 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199062 1 0.0146 0.987 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199064 1 0.2389 0.874 0.888 0.000 0.000 0.060 0.000 0.052
#> SRR1199065 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.3449 0.737 0.000 0.796 0.004 0.004 0.024 0.172
#> SRR1199075 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0458 0.920 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199077 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0547 0.920 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1199079 2 0.0458 0.920 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199080 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 2 0.6686 -0.075 0.000 0.476 0.116 0.004 0.320 0.084
#> SRR1199082 5 0.6151 0.224 0.000 0.172 0.000 0.076 0.592 0.160
#> SRR1199083 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0458 0.920 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199088 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199089 3 0.0858 0.957 0.000 0.000 0.968 0.004 0.000 0.028
#> SRR1199090 5 0.3129 0.310 0.000 0.088 0.000 0.028 0.852 0.032
#> SRR1199091 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0363 0.920 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199094 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0458 0.920 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199096 6 0.6753 0.000 0.000 0.028 0.092 0.072 0.292 0.516
#> SRR1199097 2 0.5011 0.313 0.000 0.592 0.332 0.008 0.000 0.068
#> SRR1199098 2 0.0146 0.921 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199099 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0458 0.920 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199101 2 0.0692 0.921 0.000 0.976 0.000 0.000 0.004 0.020
#> SRR1199102 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0291 0.920 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1199104 3 0.0000 0.977 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199105 5 0.4371 0.111 0.000 0.000 0.000 0.180 0.716 0.104
#> SRR1199106 2 0.0405 0.919 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR1199107 2 0.0458 0.920 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199108 1 0.2894 0.826 0.852 0.000 0.000 0.108 0.004 0.036
#> SRR1199109 2 0.0363 0.920 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199110 2 0.2390 0.858 0.000 0.896 0.000 0.008 0.044 0.052
#> SRR1199111 2 0.0146 0.920 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1199112 3 0.0291 0.972 0.000 0.000 0.992 0.004 0.000 0.004
#> SRR1199113 3 0.1946 0.911 0.000 0.000 0.912 0.012 0.004 0.072
#> SRR1199114 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.1757 0.882 0.000 0.916 0.000 0.000 0.008 0.076
#> SRR1199117 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0291 0.920 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1199120 3 0.0000 0.977 0.000 0.000 1.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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.989 0.995 0.45265 0.551 0.551
#> 3 3 0.945 0.940 0.975 0.43480 0.802 0.641
#> 4 4 0.927 0.895 0.962 0.01396 0.989 0.968
#> 5 5 0.941 0.918 0.973 0.01549 0.995 0.987
#> 6 6 0.932 0.894 0.969 0.00531 0.996 0.988
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.000 0.993 0.000 1.000
#> SRR1199009 2 0.000 0.993 0.000 1.000
#> SRR1199010 2 0.000 0.993 0.000 1.000
#> SRR1199011 1 0.000 1.000 1.000 0.000
#> SRR1199012 2 0.000 0.993 0.000 1.000
#> SRR1199013 2 0.000 0.993 0.000 1.000
#> SRR1199015 1 0.000 1.000 1.000 0.000
#> SRR1199016 2 0.000 0.993 0.000 1.000
#> SRR1199017 1 0.000 1.000 1.000 0.000
#> SRR1199018 1 0.000 1.000 1.000 0.000
#> SRR1199019 1 0.000 1.000 1.000 0.000
#> SRR1199020 2 0.000 0.993 0.000 1.000
#> SRR1199021 2 0.000 0.993 0.000 1.000
#> SRR1199022 1 0.000 1.000 1.000 0.000
#> SRR1199023 1 0.000 1.000 1.000 0.000
#> SRR1199025 1 0.000 1.000 1.000 0.000
#> SRR1199026 1 0.000 1.000 1.000 0.000
#> SRR1199027 2 0.886 0.569 0.304 0.696
#> SRR1199028 2 0.000 0.993 0.000 1.000
#> SRR1199029 1 0.000 1.000 1.000 0.000
#> SRR1199031 2 0.000 0.993 0.000 1.000
#> SRR1199032 2 0.000 0.993 0.000 1.000
#> SRR1199033 2 0.000 0.993 0.000 1.000
#> SRR1199034 2 0.000 0.993 0.000 1.000
#> SRR1199035 2 0.000 0.993 0.000 1.000
#> SRR1199036 2 0.000 0.993 0.000 1.000
#> SRR1199037 2 0.000 0.993 0.000 1.000
#> SRR1199038 2 0.000 0.993 0.000 1.000
#> SRR1199040 2 0.000 0.993 0.000 1.000
#> SRR1199042 2 0.595 0.831 0.144 0.856
#> SRR1199043 2 0.000 0.993 0.000 1.000
#> SRR1199044 2 0.000 0.993 0.000 1.000
#> SRR1199045 2 0.000 0.993 0.000 1.000
#> SRR1199046 2 0.000 0.993 0.000 1.000
#> SRR1199047 2 0.000 0.993 0.000 1.000
#> SRR1199048 2 0.000 0.993 0.000 1.000
#> SRR1199049 1 0.000 1.000 1.000 0.000
#> SRR1199050 1 0.000 1.000 1.000 0.000
#> SRR1199051 2 0.000 0.993 0.000 1.000
#> SRR1199052 2 0.000 0.993 0.000 1.000
#> SRR1199054 2 0.000 0.993 0.000 1.000
#> SRR1199056 2 0.000 0.993 0.000 1.000
#> SRR1199057 2 0.000 0.993 0.000 1.000
#> SRR1199059 2 0.000 0.993 0.000 1.000
#> SRR1199060 2 0.000 0.993 0.000 1.000
#> SRR1199061 2 0.000 0.993 0.000 1.000
#> SRR1199062 1 0.000 1.000 1.000 0.000
#> SRR1199064 1 0.000 1.000 1.000 0.000
#> SRR1199065 1 0.000 1.000 1.000 0.000
#> SRR1199067 2 0.000 0.993 0.000 1.000
#> SRR1199075 1 0.000 1.000 1.000 0.000
#> SRR1199076 2 0.000 0.993 0.000 1.000
#> SRR1199077 1 0.000 1.000 1.000 0.000
#> SRR1199078 2 0.000 0.993 0.000 1.000
#> SRR1199079 2 0.000 0.993 0.000 1.000
#> SRR1199080 1 0.000 1.000 1.000 0.000
#> SRR1199081 2 0.000 0.993 0.000 1.000
#> SRR1199082 2 0.000 0.993 0.000 1.000
#> SRR1199083 1 0.000 1.000 1.000 0.000
#> SRR1199084 1 0.000 1.000 1.000 0.000
#> SRR1199085 1 0.000 1.000 1.000 0.000
#> SRR1199086 1 0.000 1.000 1.000 0.000
#> SRR1199087 2 0.000 0.993 0.000 1.000
#> SRR1199088 2 0.000 0.993 0.000 1.000
#> SRR1199089 2 0.000 0.993 0.000 1.000
#> SRR1199090 2 0.000 0.993 0.000 1.000
#> SRR1199091 1 0.000 1.000 1.000 0.000
#> SRR1199092 1 0.000 1.000 1.000 0.000
#> SRR1199093 2 0.000 0.993 0.000 1.000
#> SRR1199094 1 0.000 1.000 1.000 0.000
#> SRR1199095 2 0.000 0.993 0.000 1.000
#> SRR1199096 2 0.000 0.993 0.000 1.000
#> SRR1199097 2 0.000 0.993 0.000 1.000
#> SRR1199098 2 0.000 0.993 0.000 1.000
#> SRR1199099 1 0.000 1.000 1.000 0.000
#> SRR1199100 2 0.000 0.993 0.000 1.000
#> SRR1199101 2 0.000 0.993 0.000 1.000
#> SRR1199102 1 0.000 1.000 1.000 0.000
#> SRR1199103 2 0.000 0.993 0.000 1.000
#> SRR1199104 2 0.000 0.993 0.000 1.000
#> SRR1199105 2 0.000 0.993 0.000 1.000
#> SRR1199106 2 0.000 0.993 0.000 1.000
#> SRR1199107 2 0.000 0.993 0.000 1.000
#> SRR1199108 1 0.000 1.000 1.000 0.000
#> SRR1199109 2 0.000 0.993 0.000 1.000
#> SRR1199110 2 0.000 0.993 0.000 1.000
#> SRR1199111 2 0.000 0.993 0.000 1.000
#> SRR1199112 2 0.000 0.993 0.000 1.000
#> SRR1199113 2 0.000 0.993 0.000 1.000
#> SRR1199114 1 0.000 1.000 1.000 0.000
#> SRR1199115 1 0.000 1.000 1.000 0.000
#> SRR1199116 2 0.000 0.993 0.000 1.000
#> SRR1199117 1 0.000 1.000 1.000 0.000
#> SRR1199118 1 0.000 1.000 1.000 0.000
#> SRR1199119 2 0.000 0.993 0.000 1.000
#> SRR1199120 2 0.000 0.993 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199009 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199012 3 0.6225 0.239 0.000 0.432 0.568
#> SRR1199013 2 0.6204 0.257 0.000 0.576 0.424
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199016 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199027 3 0.4605 0.729 0.204 0.000 0.796
#> SRR1199028 2 0.1964 0.917 0.000 0.944 0.056
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199033 2 0.3412 0.847 0.000 0.876 0.124
#> SRR1199034 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199035 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199036 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199037 2 0.5016 0.679 0.000 0.760 0.240
#> SRR1199038 2 0.1529 0.932 0.000 0.960 0.040
#> SRR1199040 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199042 3 0.6388 0.729 0.064 0.184 0.752
#> SRR1199043 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199044 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199045 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199046 2 0.4121 0.791 0.000 0.832 0.168
#> SRR1199047 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199048 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199049 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199052 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199054 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199056 3 0.3686 0.818 0.000 0.140 0.860
#> SRR1199057 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199064 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199081 3 0.0237 0.945 0.000 0.004 0.996
#> SRR1199082 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199088 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199089 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199090 2 0.5948 0.429 0.000 0.640 0.360
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199096 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199097 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199098 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199104 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199105 3 0.0237 0.945 0.000 0.004 0.996
#> SRR1199106 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199108 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199109 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199110 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199111 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199112 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199113 3 0.0000 0.948 0.000 0.000 1.000
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.965 0.000 1.000 0.000
#> SRR1199120 3 0.0000 0.948 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199009 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199012 3 0.4933 0.0888 0.000 0.432 0.568 0.000
#> SRR1199013 2 0.4916 0.2307 0.000 0.576 0.424 0.000
#> SRR1199015 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199017 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199027 3 0.4998 0.1964 0.000 0.000 0.512 0.488
#> SRR1199028 2 0.1557 0.9031 0.000 0.944 0.056 0.000
#> SRR1199029 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.2704 0.8240 0.000 0.876 0.124 0.000
#> SRR1199034 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199035 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199036 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.3975 0.6393 0.000 0.760 0.240 0.000
#> SRR1199038 2 0.1211 0.9218 0.000 0.960 0.040 0.000
#> SRR1199040 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.7410 -0.2313 0.000 0.184 0.328 0.488
#> SRR1199043 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199045 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199046 2 0.3266 0.7597 0.000 0.832 0.168 0.000
#> SRR1199047 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199049 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199054 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199056 3 0.2921 0.6767 0.000 0.140 0.860 0.000
#> SRR1199057 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199064 4 0.4998 -0.2242 0.488 0.000 0.000 0.512
#> SRR1199065 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199081 3 0.0188 0.9007 0.000 0.004 0.996 0.000
#> SRR1199082 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199083 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199089 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199090 2 0.4713 0.3921 0.000 0.640 0.360 0.000
#> SRR1199091 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199096 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199097 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199098 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199105 3 0.3710 0.7072 0.000 0.004 0.804 0.192
#> SRR1199106 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199108 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199109 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199111 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199113 3 0.0000 0.9057 0.000 0.000 1.000 0.000
#> SRR1199114 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199117 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.9589 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.0000 0.9057 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199009 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199010 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199011 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 3 0.4249 0.208 0.000 0.432 0.568 0.000 0.000
#> SRR1199013 2 0.4235 0.260 0.000 0.576 0.424 0.000 0.000
#> SRR1199015 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199017 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199021 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> SRR1199028 2 0.1341 0.908 0.000 0.944 0.056 0.000 0.000
#> SRR1199029 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199032 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199033 2 0.2329 0.832 0.000 0.876 0.124 0.000 0.000
#> SRR1199034 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199035 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199036 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199037 2 0.3424 0.664 0.000 0.760 0.240 0.000 0.000
#> SRR1199038 2 0.1043 0.925 0.000 0.960 0.040 0.000 0.000
#> SRR1199040 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199042 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> SRR1199043 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199044 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199045 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199046 2 0.2813 0.774 0.000 0.832 0.168 0.000 0.000
#> SRR1199047 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199048 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199049 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199054 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199056 3 0.2516 0.719 0.000 0.140 0.860 0.000 0.000
#> SRR1199057 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199059 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199060 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199061 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199062 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 5 0.1671 0.000 0.076 0.000 0.000 0.000 0.924
#> SRR1199065 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199075 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199077 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199079 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199080 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 3 0.0162 0.928 0.000 0.004 0.996 0.000 0.000
#> SRR1199082 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199083 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199088 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199089 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199090 2 0.4060 0.437 0.000 0.640 0.360 0.000 0.000
#> SRR1199091 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199094 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199096 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199097 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199098 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199099 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199101 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199102 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199104 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199105 3 0.4269 0.701 0.000 0.004 0.780 0.140 0.076
#> SRR1199106 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199108 1 0.3837 0.514 0.692 0.000 0.000 0.308 0.000
#> SRR1199109 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199110 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199111 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199112 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199113 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> SRR1199114 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199117 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.989 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.961 0.000 1.000 0.000 0.000 0.000
#> SRR1199120 3 0.0000 0.933 0.000 0.000 1.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
#> SRR1199002 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199009 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199010 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199011 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199012 3 0.4045 -0.044 0.000 0.428 0.564 0.000 0.008 0
#> SRR1199013 2 0.4025 0.211 0.000 0.576 0.416 0.000 0.008 0
#> SRR1199015 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199016 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199017 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199018 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199019 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199020 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199021 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199022 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199023 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199025 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199026 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199027 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0
#> SRR1199028 2 0.1398 0.910 0.000 0.940 0.052 0.000 0.008 0
#> SRR1199029 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199031 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199032 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199033 2 0.2346 0.829 0.000 0.868 0.124 0.000 0.008 0
#> SRR1199034 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199035 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199036 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199037 2 0.3215 0.648 0.000 0.756 0.240 0.000 0.004 0
#> SRR1199038 2 0.1196 0.923 0.000 0.952 0.040 0.000 0.008 0
#> SRR1199040 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199042 4 0.0146 0.989 0.000 0.000 0.000 0.996 0.004 0
#> SRR1199043 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199044 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199045 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199046 2 0.2778 0.765 0.000 0.824 0.168 0.000 0.008 0
#> SRR1199047 2 0.0146 0.957 0.000 0.996 0.000 0.000 0.004 0
#> SRR1199048 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199049 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199050 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199051 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199052 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199054 2 0.0146 0.957 0.000 0.996 0.000 0.000 0.004 0
#> SRR1199056 3 0.2513 0.498 0.000 0.140 0.852 0.000 0.008 0
#> SRR1199057 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199059 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199060 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199061 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199062 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199064 6 0.0000 0.000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1199065 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199067 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199075 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199076 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199077 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199078 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199079 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199080 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199081 3 0.0405 0.880 0.000 0.004 0.988 0.000 0.008 0
#> SRR1199082 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199083 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199084 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199085 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199086 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199087 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199088 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199089 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199090 2 0.3887 0.385 0.000 0.632 0.360 0.000 0.008 0
#> SRR1199091 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199092 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199093 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199094 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199095 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199096 3 0.0260 0.889 0.000 0.000 0.992 0.000 0.008 0
#> SRR1199097 3 0.0260 0.886 0.000 0.000 0.992 0.000 0.008 0
#> SRR1199098 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199099 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199100 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199101 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199102 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199103 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199104 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199105 5 0.4015 0.000 0.000 0.004 0.396 0.004 0.596 0
#> SRR1199106 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199107 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199108 1 0.3993 0.358 0.592 0.000 0.000 0.008 0.400 0
#> SRR1199109 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199110 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199111 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199112 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199113 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199114 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199115 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199116 2 0.0000 0.958 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199117 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199118 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199119 2 0.0260 0.956 0.000 0.992 0.000 0.000 0.008 0
#> SRR1199120 3 0.0000 0.898 0.000 0.000 1.000 0.000 0.000 0
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) 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 0.881 0.972 0.986 0.4282 0.574 0.574
#> 3 3 0.801 0.855 0.938 0.4548 0.802 0.659
#> 4 4 0.918 0.918 0.956 0.1317 0.885 0.712
#> 5 5 0.870 0.855 0.922 0.1117 0.920 0.729
#> 6 6 0.830 0.825 0.887 0.0364 0.969 0.857
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
#> SRR1199002 2 0.0000 0.987 0.000 1.000
#> SRR1199009 2 0.0000 0.987 0.000 1.000
#> SRR1199010 2 0.0000 0.987 0.000 1.000
#> SRR1199011 1 0.4815 0.891 0.896 0.104
#> SRR1199012 2 0.0000 0.987 0.000 1.000
#> SRR1199013 2 0.0672 0.981 0.008 0.992
#> SRR1199015 1 0.0000 0.983 1.000 0.000
#> SRR1199016 2 0.0000 0.987 0.000 1.000
#> SRR1199017 1 0.0000 0.983 1.000 0.000
#> SRR1199018 1 0.0000 0.983 1.000 0.000
#> SRR1199019 1 0.0000 0.983 1.000 0.000
#> SRR1199020 2 0.0000 0.987 0.000 1.000
#> SRR1199021 2 0.0000 0.987 0.000 1.000
#> SRR1199022 1 0.0000 0.983 1.000 0.000
#> SRR1199023 1 0.0000 0.983 1.000 0.000
#> SRR1199025 1 0.0000 0.983 1.000 0.000
#> SRR1199026 1 0.0000 0.983 1.000 0.000
#> SRR1199027 2 0.4815 0.889 0.104 0.896
#> SRR1199028 2 0.0000 0.987 0.000 1.000
#> SRR1199029 1 0.0000 0.983 1.000 0.000
#> SRR1199031 2 0.0000 0.987 0.000 1.000
#> SRR1199032 2 0.0000 0.987 0.000 1.000
#> SRR1199033 2 0.0000 0.987 0.000 1.000
#> SRR1199034 2 0.0000 0.987 0.000 1.000
#> SRR1199035 2 0.0000 0.987 0.000 1.000
#> SRR1199036 2 0.0000 0.987 0.000 1.000
#> SRR1199037 2 0.0000 0.987 0.000 1.000
#> SRR1199038 2 0.0000 0.987 0.000 1.000
#> SRR1199040 2 0.0000 0.987 0.000 1.000
#> SRR1199042 2 0.4939 0.885 0.108 0.892
#> SRR1199043 2 0.0000 0.987 0.000 1.000
#> SRR1199044 2 0.0000 0.987 0.000 1.000
#> SRR1199045 2 0.0000 0.987 0.000 1.000
#> SRR1199046 2 0.0000 0.987 0.000 1.000
#> SRR1199047 2 0.0000 0.987 0.000 1.000
#> SRR1199048 2 0.0672 0.981 0.008 0.992
#> SRR1199049 2 0.8081 0.682 0.248 0.752
#> SRR1199050 1 0.5737 0.854 0.864 0.136
#> SRR1199051 2 0.0000 0.987 0.000 1.000
#> SRR1199052 2 0.0000 0.987 0.000 1.000
#> SRR1199054 2 0.0000 0.987 0.000 1.000
#> SRR1199056 2 0.0000 0.987 0.000 1.000
#> SRR1199057 2 0.0000 0.987 0.000 1.000
#> SRR1199059 2 0.0000 0.987 0.000 1.000
#> SRR1199060 2 0.0000 0.987 0.000 1.000
#> SRR1199061 2 0.0000 0.987 0.000 1.000
#> SRR1199062 1 0.5737 0.854 0.864 0.136
#> SRR1199064 2 0.4939 0.885 0.108 0.892
#> SRR1199065 1 0.0000 0.983 1.000 0.000
#> SRR1199067 2 0.0000 0.987 0.000 1.000
#> SRR1199075 1 0.0000 0.983 1.000 0.000
#> SRR1199076 2 0.0000 0.987 0.000 1.000
#> SRR1199077 1 0.0000 0.983 1.000 0.000
#> SRR1199078 2 0.0000 0.987 0.000 1.000
#> SRR1199079 2 0.0000 0.987 0.000 1.000
#> SRR1199080 1 0.0000 0.983 1.000 0.000
#> SRR1199081 2 0.0376 0.984 0.004 0.996
#> SRR1199082 2 0.1414 0.971 0.020 0.980
#> SRR1199083 1 0.0000 0.983 1.000 0.000
#> SRR1199084 1 0.0000 0.983 1.000 0.000
#> SRR1199085 1 0.0000 0.983 1.000 0.000
#> SRR1199086 1 0.0000 0.983 1.000 0.000
#> SRR1199087 2 0.0000 0.987 0.000 1.000
#> SRR1199088 2 0.0000 0.987 0.000 1.000
#> SRR1199089 2 0.0000 0.987 0.000 1.000
#> SRR1199090 2 0.1414 0.971 0.020 0.980
#> SRR1199091 1 0.0000 0.983 1.000 0.000
#> SRR1199092 1 0.0000 0.983 1.000 0.000
#> SRR1199093 2 0.0000 0.987 0.000 1.000
#> SRR1199094 1 0.0000 0.983 1.000 0.000
#> SRR1199095 2 0.0000 0.987 0.000 1.000
#> SRR1199096 2 0.0672 0.981 0.008 0.992
#> SRR1199097 2 0.0000 0.987 0.000 1.000
#> SRR1199098 2 0.0000 0.987 0.000 1.000
#> SRR1199099 1 0.2043 0.959 0.968 0.032
#> SRR1199100 2 0.0000 0.987 0.000 1.000
#> SRR1199101 2 0.0000 0.987 0.000 1.000
#> SRR1199102 1 0.0672 0.977 0.992 0.008
#> SRR1199103 2 0.0000 0.987 0.000 1.000
#> SRR1199104 2 0.0000 0.987 0.000 1.000
#> SRR1199105 2 0.4939 0.885 0.108 0.892
#> SRR1199106 2 0.0000 0.987 0.000 1.000
#> SRR1199107 2 0.0000 0.987 0.000 1.000
#> SRR1199108 2 0.4939 0.885 0.108 0.892
#> SRR1199109 2 0.0000 0.987 0.000 1.000
#> SRR1199110 2 0.0000 0.987 0.000 1.000
#> SRR1199111 2 0.0000 0.987 0.000 1.000
#> SRR1199112 2 0.0000 0.987 0.000 1.000
#> SRR1199113 2 0.0000 0.987 0.000 1.000
#> SRR1199114 1 0.0000 0.983 1.000 0.000
#> SRR1199115 1 0.0000 0.983 1.000 0.000
#> SRR1199116 2 0.0000 0.987 0.000 1.000
#> SRR1199117 1 0.3274 0.935 0.940 0.060
#> SRR1199118 1 0.0000 0.983 1.000 0.000
#> SRR1199119 2 0.0000 0.987 0.000 1.000
#> SRR1199120 2 0.0000 0.987 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199009 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199011 1 0.5216 0.650 0.740 0.000 0.260
#> SRR1199012 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199013 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199015 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199016 3 0.4346 0.743 0.000 0.184 0.816
#> SRR1199017 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199027 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199028 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199034 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199035 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199036 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199037 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199038 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199042 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199043 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199044 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199045 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199046 2 0.0424 0.906 0.000 0.992 0.008
#> SRR1199047 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199048 3 0.3941 0.778 0.000 0.156 0.844
#> SRR1199049 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199050 3 0.6111 0.305 0.396 0.000 0.604
#> SRR1199051 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199052 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199054 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199056 2 0.2066 0.863 0.000 0.940 0.060
#> SRR1199057 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199062 3 0.5431 0.539 0.284 0.000 0.716
#> SRR1199064 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199065 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199075 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199081 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199082 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199083 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199088 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199089 3 0.5431 0.563 0.000 0.284 0.716
#> SRR1199090 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199091 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199096 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199097 2 0.1289 0.888 0.000 0.968 0.032
#> SRR1199098 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199099 1 0.2261 0.918 0.932 0.000 0.068
#> SRR1199100 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199102 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199104 2 0.5968 0.489 0.000 0.636 0.364
#> SRR1199105 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199106 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199108 3 0.0000 0.887 0.000 0.000 1.000
#> SRR1199109 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199110 3 0.3482 0.812 0.000 0.128 0.872
#> SRR1199111 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199112 2 0.6302 0.169 0.000 0.520 0.480
#> SRR1199113 3 0.4291 0.749 0.000 0.180 0.820
#> SRR1199114 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199117 1 0.3551 0.846 0.868 0.000 0.132
#> SRR1199118 1 0.0000 0.981 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.912 0.000 1.000 0.000
#> SRR1199120 2 0.5988 0.480 0.000 0.632 0.368
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0376 0.974 0.000 0.004 0.992 0.004
#> SRR1199009 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199011 4 0.4855 0.187 0.400 0.000 0.000 0.600
#> SRR1199012 2 0.0707 0.970 0.000 0.980 0.020 0.000
#> SRR1199013 4 0.3577 0.802 0.000 0.012 0.156 0.832
#> SRR1199015 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.2489 0.923 0.000 0.020 0.912 0.068
#> SRR1199017 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.2973 0.849 0.856 0.000 0.000 0.144
#> SRR1199025 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.0524 0.837 0.000 0.004 0.008 0.988
#> SRR1199028 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199032 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.0376 0.974 0.000 0.004 0.992 0.004
#> SRR1199035 3 0.0376 0.974 0.000 0.004 0.992 0.004
#> SRR1199036 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.1798 0.937 0.000 0.944 0.040 0.016
#> SRR1199038 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.0336 0.835 0.000 0.000 0.008 0.992
#> SRR1199043 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.0376 0.974 0.000 0.004 0.992 0.004
#> SRR1199045 3 0.0376 0.974 0.000 0.004 0.992 0.004
#> SRR1199046 2 0.0524 0.979 0.000 0.988 0.008 0.004
#> SRR1199047 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199048 4 0.3895 0.705 0.000 0.184 0.012 0.804
#> SRR1199049 4 0.0524 0.837 0.000 0.004 0.008 0.988
#> SRR1199050 4 0.2665 0.785 0.088 0.004 0.008 0.900
#> SRR1199051 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.0376 0.974 0.000 0.004 0.992 0.004
#> SRR1199054 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.3679 0.837 0.000 0.856 0.084 0.060
#> SRR1199057 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199060 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199061 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199062 4 0.2076 0.809 0.056 0.004 0.008 0.932
#> SRR1199064 4 0.0524 0.837 0.000 0.004 0.008 0.988
#> SRR1199065 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0376 0.984 0.000 0.992 0.004 0.004
#> SRR1199075 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199077 1 0.2973 0.849 0.856 0.000 0.000 0.144
#> SRR1199078 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199079 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199080 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199081 4 0.3991 0.786 0.000 0.020 0.172 0.808
#> SRR1199082 4 0.3123 0.803 0.000 0.000 0.156 0.844
#> SRR1199083 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.2408 0.881 0.896 0.000 0.000 0.104
#> SRR1199087 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199088 3 0.0188 0.973 0.000 0.000 0.996 0.004
#> SRR1199089 3 0.2489 0.923 0.000 0.020 0.912 0.068
#> SRR1199090 4 0.3123 0.803 0.000 0.000 0.156 0.844
#> SRR1199091 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199094 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199096 4 0.3806 0.800 0.000 0.020 0.156 0.824
#> SRR1199097 2 0.3672 0.789 0.000 0.824 0.164 0.012
#> SRR1199098 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.4454 0.627 0.692 0.000 0.000 0.308
#> SRR1199100 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199101 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.3528 0.800 0.808 0.000 0.000 0.192
#> SRR1199103 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.0188 0.973 0.000 0.000 0.996 0.004
#> SRR1199105 4 0.2973 0.809 0.000 0.000 0.144 0.856
#> SRR1199106 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199108 4 0.0524 0.837 0.000 0.004 0.008 0.988
#> SRR1199109 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199110 4 0.5257 0.646 0.000 0.212 0.060 0.728
#> SRR1199111 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.0817 0.964 0.000 0.000 0.976 0.024
#> SRR1199113 3 0.2489 0.923 0.000 0.020 0.912 0.068
#> SRR1199114 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0524 0.984 0.000 0.988 0.004 0.008
#> SRR1199117 1 0.4643 0.503 0.656 0.000 0.000 0.344
#> SRR1199118 1 0.0000 0.950 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.985 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.0188 0.973 0.000 0.000 0.996 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199009 2 0.0000 0.9082 0.000 1.000 0.000 0.000 0.000
#> SRR1199010 2 0.4150 0.3579 0.000 0.612 0.000 0.388 0.000
#> SRR1199011 5 0.4627 -0.0315 0.444 0.000 0.000 0.012 0.544
#> SRR1199012 2 0.1410 0.8887 0.000 0.940 0.000 0.060 0.000
#> SRR1199013 5 0.4312 0.7952 0.000 0.060 0.136 0.016 0.788
#> SRR1199015 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.1851 0.9113 0.000 0.000 0.912 0.000 0.088
#> SRR1199017 1 0.0693 0.9379 0.980 0.000 0.000 0.012 0.008
#> SRR1199018 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0162 0.9086 0.000 0.996 0.000 0.004 0.000
#> SRR1199021 2 0.0963 0.9016 0.000 0.964 0.000 0.036 0.000
#> SRR1199022 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.3163 0.8282 0.824 0.000 0.000 0.012 0.164
#> SRR1199025 1 0.0404 0.9417 0.988 0.000 0.000 0.012 0.000
#> SRR1199026 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.0324 0.8262 0.000 0.004 0.000 0.004 0.992
#> SRR1199028 2 0.0963 0.9025 0.000 0.964 0.000 0.036 0.000
#> SRR1199029 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.4306 -0.0192 0.000 0.508 0.000 0.492 0.000
#> SRR1199032 2 0.1205 0.8992 0.000 0.956 0.004 0.040 0.000
#> SRR1199033 2 0.1124 0.9011 0.000 0.960 0.004 0.036 0.000
#> SRR1199034 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199035 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199036 2 0.0000 0.9082 0.000 1.000 0.000 0.000 0.000
#> SRR1199037 2 0.1430 0.8934 0.000 0.944 0.000 0.052 0.004
#> SRR1199038 2 0.0771 0.9070 0.000 0.976 0.000 0.020 0.004
#> SRR1199040 2 0.0609 0.9074 0.000 0.980 0.000 0.020 0.000
#> SRR1199042 5 0.1560 0.8286 0.000 0.028 0.004 0.020 0.948
#> SRR1199043 2 0.0609 0.9074 0.000 0.980 0.000 0.020 0.000
#> SRR1199044 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199045 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199046 2 0.3882 0.6725 0.000 0.756 0.000 0.020 0.224
#> SRR1199047 2 0.1124 0.9014 0.000 0.960 0.004 0.036 0.000
#> SRR1199048 5 0.4158 0.8004 0.000 0.056 0.128 0.016 0.800
#> SRR1199049 5 0.0579 0.8242 0.008 0.000 0.000 0.008 0.984
#> SRR1199050 5 0.2189 0.7692 0.084 0.000 0.000 0.012 0.904
#> SRR1199051 2 0.0000 0.9082 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199054 2 0.0000 0.9082 0.000 1.000 0.000 0.000 0.000
#> SRR1199056 2 0.1690 0.8955 0.000 0.944 0.008 0.024 0.024
#> SRR1199057 2 0.0609 0.9074 0.000 0.980 0.000 0.020 0.000
#> SRR1199059 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199060 4 0.3109 0.7830 0.000 0.200 0.000 0.800 0.000
#> SRR1199061 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199062 5 0.0807 0.8210 0.012 0.000 0.000 0.012 0.976
#> SRR1199064 5 0.0566 0.8241 0.004 0.000 0.000 0.012 0.984
#> SRR1199065 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.2516 0.8103 0.000 0.860 0.000 0.140 0.000
#> SRR1199075 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199077 1 0.3163 0.8282 0.824 0.000 0.000 0.012 0.164
#> SRR1199078 4 0.3913 0.5596 0.000 0.324 0.000 0.676 0.000
#> SRR1199079 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199080 1 0.0404 0.9417 0.988 0.000 0.000 0.012 0.000
#> SRR1199081 5 0.4733 0.7808 0.000 0.076 0.144 0.020 0.760
#> SRR1199082 5 0.3730 0.8042 0.000 0.028 0.136 0.016 0.820
#> SRR1199083 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.3039 0.8378 0.836 0.000 0.000 0.012 0.152
#> SRR1199087 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199088 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199089 3 0.1792 0.9157 0.000 0.000 0.916 0.000 0.084
#> SRR1199090 5 0.3730 0.8042 0.000 0.028 0.136 0.016 0.820
#> SRR1199091 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 4 0.3123 0.8046 0.000 0.184 0.004 0.812 0.000
#> SRR1199094 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 4 0.1041 0.9230 0.000 0.032 0.004 0.964 0.000
#> SRR1199096 5 0.4554 0.7745 0.000 0.076 0.156 0.008 0.760
#> SRR1199097 2 0.7066 0.2298 0.000 0.508 0.184 0.040 0.268
#> SRR1199098 2 0.0000 0.9082 0.000 1.000 0.000 0.000 0.000
#> SRR1199099 1 0.4109 0.6664 0.700 0.000 0.000 0.012 0.288
#> SRR1199100 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199101 2 0.1282 0.8980 0.000 0.952 0.004 0.044 0.000
#> SRR1199102 1 0.3427 0.7991 0.796 0.000 0.000 0.012 0.192
#> SRR1199103 2 0.0609 0.9074 0.000 0.980 0.000 0.020 0.000
#> SRR1199104 3 0.0000 0.9740 0.000 0.000 1.000 0.000 0.000
#> SRR1199105 5 0.3164 0.8241 0.000 0.028 0.084 0.020 0.868
#> SRR1199106 2 0.0000 0.9082 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199108 5 0.0579 0.8242 0.008 0.000 0.000 0.008 0.984
#> SRR1199109 4 0.0880 0.9257 0.000 0.032 0.000 0.968 0.000
#> SRR1199110 5 0.5580 0.6131 0.000 0.236 0.132 0.000 0.632
#> SRR1199111 2 0.0000 0.9082 0.000 1.000 0.000 0.000 0.000
#> SRR1199112 3 0.0609 0.9641 0.000 0.000 0.980 0.000 0.020
#> SRR1199113 3 0.1792 0.9157 0.000 0.000 0.916 0.000 0.084
#> SRR1199114 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 4 0.3506 0.8566 0.000 0.084 0.036 0.852 0.028
#> SRR1199117 1 0.4016 0.6827 0.716 0.000 0.000 0.012 0.272
#> SRR1199118 1 0.0000 0.9465 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0290 0.9087 0.000 0.992 0.000 0.008 0.000
#> SRR1199120 3 0.0000 0.9740 0.000 0.000 1.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
#> SRR1199002 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199009 2 0.1327 0.896 0.000 0.936 0.000 0.000 0.000 0.064
#> SRR1199010 2 0.4653 0.741 0.000 0.696 0.004 0.188 0.000 0.112
#> SRR1199011 6 0.4500 0.310 0.088 0.000 0.000 0.000 0.224 0.688
#> SRR1199012 2 0.2979 0.853 0.000 0.804 0.004 0.004 0.000 0.188
#> SRR1199013 5 0.1787 0.821 0.000 0.008 0.068 0.000 0.920 0.004
#> SRR1199015 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.2996 0.722 0.000 0.000 0.772 0.000 0.228 0.000
#> SRR1199017 1 0.2969 0.469 0.776 0.000 0.000 0.000 0.000 0.224
#> SRR1199018 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0820 0.897 0.000 0.972 0.000 0.012 0.000 0.016
#> SRR1199021 2 0.1657 0.883 0.000 0.928 0.000 0.056 0.000 0.016
#> SRR1199022 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 6 0.3823 0.755 0.436 0.000 0.000 0.000 0.000 0.564
#> SRR1199025 1 0.3765 -0.348 0.596 0.000 0.000 0.000 0.000 0.404
#> SRR1199026 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.1556 0.814 0.000 0.000 0.000 0.000 0.920 0.080
#> SRR1199028 2 0.1003 0.901 0.000 0.964 0.000 0.016 0.000 0.020
#> SRR1199029 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.3899 0.443 0.000 0.628 0.000 0.364 0.000 0.008
#> SRR1199032 2 0.2340 0.874 0.000 0.852 0.000 0.000 0.000 0.148
#> SRR1199033 2 0.2431 0.879 0.000 0.860 0.000 0.008 0.000 0.132
#> SRR1199034 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199035 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199036 2 0.1387 0.895 0.000 0.932 0.000 0.000 0.000 0.068
#> SRR1199037 2 0.2810 0.866 0.000 0.832 0.004 0.008 0.000 0.156
#> SRR1199038 2 0.1657 0.883 0.000 0.928 0.000 0.056 0.000 0.016
#> SRR1199040 2 0.1594 0.885 0.000 0.932 0.000 0.052 0.000 0.016
#> SRR1199042 5 0.0547 0.820 0.000 0.000 0.000 0.000 0.980 0.020
#> SRR1199043 2 0.1934 0.893 0.000 0.916 0.000 0.044 0.000 0.040
#> SRR1199044 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199045 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199046 2 0.3343 0.838 0.000 0.840 0.004 0.028 0.100 0.028
#> SRR1199047 2 0.2631 0.859 0.000 0.820 0.000 0.000 0.000 0.180
#> SRR1199048 5 0.1931 0.821 0.000 0.004 0.068 0.008 0.916 0.004
#> SRR1199049 5 0.3265 0.742 0.004 0.000 0.000 0.000 0.748 0.248
#> SRR1199050 5 0.4499 0.456 0.032 0.000 0.000 0.000 0.540 0.428
#> SRR1199051 2 0.0363 0.899 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199052 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199054 2 0.0458 0.900 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199056 2 0.1710 0.897 0.000 0.940 0.012 0.008 0.020 0.020
#> SRR1199057 2 0.1563 0.885 0.000 0.932 0.000 0.056 0.000 0.012
#> SRR1199059 4 0.0146 0.917 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1199060 4 0.2877 0.790 0.000 0.168 0.000 0.820 0.000 0.012
#> SRR1199061 4 0.0146 0.917 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1199062 5 0.3937 0.525 0.004 0.000 0.000 0.000 0.572 0.424
#> SRR1199064 5 0.3266 0.737 0.000 0.000 0.000 0.000 0.728 0.272
#> SRR1199065 1 0.0146 0.921 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199067 2 0.3122 0.856 0.000 0.804 0.000 0.020 0.000 0.176
#> SRR1199075 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 4 0.0260 0.916 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR1199077 6 0.3828 0.750 0.440 0.000 0.000 0.000 0.000 0.560
#> SRR1199078 4 0.3758 0.512 0.000 0.324 0.000 0.668 0.000 0.008
#> SRR1199079 4 0.0000 0.916 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.2912 0.493 0.784 0.000 0.000 0.000 0.000 0.216
#> SRR1199081 5 0.2465 0.815 0.000 0.008 0.072 0.024 0.892 0.004
#> SRR1199082 5 0.1584 0.823 0.000 0.000 0.064 0.000 0.928 0.008
#> SRR1199083 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 6 0.3843 0.730 0.452 0.000 0.000 0.000 0.000 0.548
#> SRR1199087 4 0.0291 0.916 0.000 0.004 0.000 0.992 0.000 0.004
#> SRR1199088 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199089 3 0.2597 0.790 0.000 0.000 0.824 0.000 0.176 0.000
#> SRR1199090 5 0.1584 0.823 0.000 0.000 0.064 0.000 0.928 0.008
#> SRR1199091 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 4 0.2730 0.809 0.000 0.152 0.000 0.836 0.000 0.012
#> SRR1199094 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 4 0.0717 0.912 0.000 0.008 0.000 0.976 0.000 0.016
#> SRR1199096 5 0.2711 0.803 0.000 0.056 0.068 0.000 0.872 0.004
#> SRR1199097 2 0.6288 0.612 0.000 0.576 0.120 0.000 0.100 0.204
#> SRR1199098 2 0.0260 0.899 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1199099 6 0.3905 0.771 0.316 0.000 0.000 0.000 0.016 0.668
#> SRR1199100 4 0.0146 0.917 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1199101 2 0.2848 0.860 0.000 0.816 0.000 0.008 0.000 0.176
#> SRR1199102 6 0.3765 0.776 0.404 0.000 0.000 0.000 0.000 0.596
#> SRR1199103 2 0.1500 0.886 0.000 0.936 0.000 0.052 0.000 0.012
#> SRR1199104 3 0.0000 0.940 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199105 5 0.0405 0.822 0.000 0.000 0.004 0.000 0.988 0.008
#> SRR1199106 2 0.0713 0.900 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR1199107 4 0.0146 0.917 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1199108 5 0.2994 0.767 0.004 0.000 0.000 0.000 0.788 0.208
#> SRR1199109 4 0.0000 0.916 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1199110 5 0.4341 0.651 0.000 0.216 0.068 0.000 0.712 0.004
#> SRR1199111 2 0.0363 0.900 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199112 3 0.0260 0.935 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1199113 3 0.2941 0.734 0.000 0.000 0.780 0.000 0.220 0.000
#> SRR1199114 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 4 0.2651 0.866 0.000 0.052 0.028 0.892 0.016 0.012
#> SRR1199117 6 0.4101 0.763 0.308 0.000 0.000 0.000 0.028 0.664
#> SRR1199118 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0725 0.897 0.000 0.976 0.000 0.012 0.000 0.012
#> SRR1199120 3 0.0000 0.940 0.000 0.000 1.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", "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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'MAD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.978 0.991 0.4636 0.538 0.538
#> 3 3 0.715 0.841 0.890 0.2871 0.860 0.740
#> 4 4 0.750 0.823 0.907 0.0826 0.943 0.862
#> 5 5 0.825 0.770 0.894 0.0787 0.922 0.793
#> 6 6 0.848 0.816 0.911 0.0550 0.933 0.792
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.0000 0.992 0.000 1.000
#> SRR1199009 2 0.0000 0.992 0.000 1.000
#> SRR1199010 2 0.0000 0.992 0.000 1.000
#> SRR1199011 1 0.0000 0.989 1.000 0.000
#> SRR1199012 2 0.0000 0.992 0.000 1.000
#> SRR1199013 2 0.0000 0.992 0.000 1.000
#> SRR1199015 1 0.0000 0.989 1.000 0.000
#> SRR1199016 2 0.0000 0.992 0.000 1.000
#> SRR1199017 1 0.0000 0.989 1.000 0.000
#> SRR1199018 1 0.0000 0.989 1.000 0.000
#> SRR1199019 1 0.0376 0.986 0.996 0.004
#> SRR1199020 2 0.0000 0.992 0.000 1.000
#> SRR1199021 2 0.0000 0.992 0.000 1.000
#> SRR1199022 1 0.0000 0.989 1.000 0.000
#> SRR1199023 1 0.0000 0.989 1.000 0.000
#> SRR1199025 1 0.0000 0.989 1.000 0.000
#> SRR1199026 1 0.3879 0.913 0.924 0.076
#> SRR1199027 1 0.0672 0.982 0.992 0.008
#> SRR1199028 2 0.0000 0.992 0.000 1.000
#> SRR1199029 1 0.0000 0.989 1.000 0.000
#> SRR1199031 2 0.0000 0.992 0.000 1.000
#> SRR1199032 2 0.0000 0.992 0.000 1.000
#> SRR1199033 2 0.0000 0.992 0.000 1.000
#> SRR1199034 2 0.0000 0.992 0.000 1.000
#> SRR1199035 2 0.0000 0.992 0.000 1.000
#> SRR1199036 2 0.0000 0.992 0.000 1.000
#> SRR1199037 2 0.0000 0.992 0.000 1.000
#> SRR1199038 2 0.0000 0.992 0.000 1.000
#> SRR1199040 2 0.0000 0.992 0.000 1.000
#> SRR1199042 1 0.0000 0.989 1.000 0.000
#> SRR1199043 2 0.0000 0.992 0.000 1.000
#> SRR1199044 2 0.0000 0.992 0.000 1.000
#> SRR1199045 2 0.0000 0.992 0.000 1.000
#> SRR1199046 2 0.0000 0.992 0.000 1.000
#> SRR1199047 2 0.0000 0.992 0.000 1.000
#> SRR1199048 2 0.0000 0.992 0.000 1.000
#> SRR1199049 1 0.0000 0.989 1.000 0.000
#> SRR1199050 1 0.0000 0.989 1.000 0.000
#> SRR1199051 2 0.0000 0.992 0.000 1.000
#> SRR1199052 2 0.0000 0.992 0.000 1.000
#> SRR1199054 2 0.0000 0.992 0.000 1.000
#> SRR1199056 2 0.0000 0.992 0.000 1.000
#> SRR1199057 2 0.0000 0.992 0.000 1.000
#> SRR1199059 2 0.0000 0.992 0.000 1.000
#> SRR1199060 2 0.0000 0.992 0.000 1.000
#> SRR1199061 2 0.0000 0.992 0.000 1.000
#> SRR1199062 1 0.0000 0.989 1.000 0.000
#> SRR1199064 1 0.0000 0.989 1.000 0.000
#> SRR1199065 1 0.8386 0.634 0.732 0.268
#> SRR1199067 2 0.0000 0.992 0.000 1.000
#> SRR1199075 1 0.0000 0.989 1.000 0.000
#> SRR1199076 2 0.0000 0.992 0.000 1.000
#> SRR1199077 1 0.0000 0.989 1.000 0.000
#> SRR1199078 2 0.0000 0.992 0.000 1.000
#> SRR1199079 2 0.0000 0.992 0.000 1.000
#> SRR1199080 1 0.0000 0.989 1.000 0.000
#> SRR1199081 2 0.0000 0.992 0.000 1.000
#> SRR1199082 2 0.9833 0.258 0.424 0.576
#> SRR1199083 1 0.0000 0.989 1.000 0.000
#> SRR1199084 1 0.0000 0.989 1.000 0.000
#> SRR1199085 1 0.0000 0.989 1.000 0.000
#> SRR1199086 1 0.0000 0.989 1.000 0.000
#> SRR1199087 2 0.0000 0.992 0.000 1.000
#> SRR1199088 2 0.0000 0.992 0.000 1.000
#> SRR1199089 2 0.0000 0.992 0.000 1.000
#> SRR1199090 2 0.0000 0.992 0.000 1.000
#> SRR1199091 1 0.0000 0.989 1.000 0.000
#> SRR1199092 1 0.0000 0.989 1.000 0.000
#> SRR1199093 2 0.0000 0.992 0.000 1.000
#> SRR1199094 1 0.0000 0.989 1.000 0.000
#> SRR1199095 2 0.0000 0.992 0.000 1.000
#> SRR1199096 2 0.0000 0.992 0.000 1.000
#> SRR1199097 2 0.0000 0.992 0.000 1.000
#> SRR1199098 2 0.0000 0.992 0.000 1.000
#> SRR1199099 1 0.0000 0.989 1.000 0.000
#> SRR1199100 2 0.0000 0.992 0.000 1.000
#> SRR1199101 2 0.0000 0.992 0.000 1.000
#> SRR1199102 1 0.0000 0.989 1.000 0.000
#> SRR1199103 2 0.0000 0.992 0.000 1.000
#> SRR1199104 2 0.0000 0.992 0.000 1.000
#> SRR1199105 2 0.3274 0.930 0.060 0.940
#> SRR1199106 2 0.0000 0.992 0.000 1.000
#> SRR1199107 2 0.0000 0.992 0.000 1.000
#> SRR1199108 1 0.0000 0.989 1.000 0.000
#> SRR1199109 2 0.0000 0.992 0.000 1.000
#> SRR1199110 2 0.0938 0.980 0.012 0.988
#> SRR1199111 2 0.0000 0.992 0.000 1.000
#> SRR1199112 2 0.0000 0.992 0.000 1.000
#> SRR1199113 2 0.0000 0.992 0.000 1.000
#> SRR1199114 1 0.0000 0.989 1.000 0.000
#> SRR1199115 1 0.0000 0.989 1.000 0.000
#> SRR1199116 2 0.0000 0.992 0.000 1.000
#> SRR1199117 1 0.0000 0.989 1.000 0.000
#> SRR1199118 1 0.0000 0.989 1.000 0.000
#> SRR1199119 2 0.0000 0.992 0.000 1.000
#> SRR1199120 2 0.0000 0.992 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.5835 0.9164 0.000 0.340 0.660
#> SRR1199009 2 0.3340 0.8140 0.000 0.880 0.120
#> SRR1199010 2 0.0237 0.8679 0.000 0.996 0.004
#> SRR1199011 1 0.0237 0.9483 0.996 0.000 0.004
#> SRR1199012 2 0.2537 0.8498 0.000 0.920 0.080
#> SRR1199013 2 0.1289 0.8698 0.000 0.968 0.032
#> SRR1199015 1 0.0237 0.9483 0.996 0.000 0.004
#> SRR1199016 3 0.5591 0.9469 0.000 0.304 0.696
#> SRR1199017 1 0.2711 0.9172 0.912 0.000 0.088
#> SRR1199018 1 0.1289 0.9435 0.968 0.000 0.032
#> SRR1199019 1 0.3083 0.9009 0.916 0.060 0.024
#> SRR1199020 2 0.2066 0.8608 0.000 0.940 0.060
#> SRR1199021 2 0.0424 0.8686 0.000 0.992 0.008
#> SRR1199022 1 0.0592 0.9475 0.988 0.000 0.012
#> SRR1199023 1 0.0000 0.9480 1.000 0.000 0.000
#> SRR1199025 1 0.1163 0.9444 0.972 0.000 0.028
#> SRR1199026 1 0.4749 0.8238 0.816 0.012 0.172
#> SRR1199027 1 0.4172 0.8431 0.840 0.004 0.156
#> SRR1199028 2 0.1529 0.8685 0.000 0.960 0.040
#> SRR1199029 1 0.1031 0.9456 0.976 0.000 0.024
#> SRR1199031 2 0.0237 0.8663 0.000 0.996 0.004
#> SRR1199032 2 0.2356 0.8547 0.000 0.928 0.072
#> SRR1199033 2 0.1529 0.8681 0.000 0.960 0.040
#> SRR1199034 3 0.5835 0.9164 0.000 0.340 0.660
#> SRR1199035 3 0.5859 0.9097 0.000 0.344 0.656
#> SRR1199036 2 0.3412 0.8073 0.000 0.876 0.124
#> SRR1199037 2 0.2356 0.8553 0.000 0.928 0.072
#> SRR1199038 2 0.2448 0.8532 0.000 0.924 0.076
#> SRR1199040 2 0.1860 0.8645 0.000 0.948 0.052
#> SRR1199042 1 0.3031 0.8868 0.912 0.076 0.012
#> SRR1199043 2 0.3752 0.7811 0.000 0.856 0.144
#> SRR1199044 3 0.5650 0.9459 0.000 0.312 0.688
#> SRR1199045 3 0.5650 0.9452 0.000 0.312 0.688
#> SRR1199046 2 0.5529 0.4243 0.000 0.704 0.296
#> SRR1199047 2 0.2711 0.8442 0.000 0.912 0.088
#> SRR1199048 2 0.2711 0.8130 0.000 0.912 0.088
#> SRR1199049 1 0.0000 0.9480 1.000 0.000 0.000
#> SRR1199050 1 0.0424 0.9467 0.992 0.000 0.008
#> SRR1199051 2 0.3340 0.8129 0.000 0.880 0.120
#> SRR1199052 3 0.5650 0.9459 0.000 0.312 0.688
#> SRR1199054 2 0.2625 0.8469 0.000 0.916 0.084
#> SRR1199056 2 0.3686 0.7866 0.000 0.860 0.140
#> SRR1199057 2 0.0892 0.8699 0.000 0.980 0.020
#> SRR1199059 2 0.1643 0.8502 0.000 0.956 0.044
#> SRR1199060 2 0.0747 0.8634 0.000 0.984 0.016
#> SRR1199061 2 0.1964 0.8421 0.000 0.944 0.056
#> SRR1199062 1 0.0424 0.9467 0.992 0.000 0.008
#> SRR1199064 1 0.8264 0.4265 0.488 0.076 0.436
#> SRR1199065 1 0.6888 0.4728 0.552 0.016 0.432
#> SRR1199067 2 0.1411 0.8701 0.000 0.964 0.036
#> SRR1199075 1 0.0892 0.9464 0.980 0.000 0.020
#> SRR1199076 2 0.2165 0.8365 0.000 0.936 0.064
#> SRR1199077 1 0.0237 0.9482 0.996 0.000 0.004
#> SRR1199078 2 0.0592 0.8645 0.000 0.988 0.012
#> SRR1199079 2 0.2261 0.8332 0.000 0.932 0.068
#> SRR1199080 1 0.4291 0.8464 0.820 0.000 0.180
#> SRR1199081 2 0.5926 0.1826 0.000 0.644 0.356
#> SRR1199082 2 0.7267 0.4905 0.180 0.708 0.112
#> SRR1199083 1 0.0747 0.9470 0.984 0.000 0.016
#> SRR1199084 1 0.0592 0.9475 0.988 0.000 0.012
#> SRR1199085 1 0.0237 0.9483 0.996 0.000 0.004
#> SRR1199086 1 0.0000 0.9480 1.000 0.000 0.000
#> SRR1199087 2 0.1753 0.8481 0.000 0.952 0.048
#> SRR1199088 3 0.5529 0.9443 0.000 0.296 0.704
#> SRR1199089 3 0.5621 0.9470 0.000 0.308 0.692
#> SRR1199090 2 0.2261 0.8333 0.000 0.932 0.068
#> SRR1199091 1 0.1267 0.9454 0.972 0.004 0.024
#> SRR1199092 1 0.0424 0.9480 0.992 0.000 0.008
#> SRR1199093 2 0.0592 0.8645 0.000 0.988 0.012
#> SRR1199094 1 0.0000 0.9480 1.000 0.000 0.000
#> SRR1199095 2 0.2878 0.8041 0.000 0.904 0.096
#> SRR1199096 2 0.6008 0.0942 0.000 0.628 0.372
#> SRR1199097 2 0.6299 -0.4211 0.000 0.524 0.476
#> SRR1199098 2 0.1529 0.8678 0.000 0.960 0.040
#> SRR1199099 1 0.0237 0.9483 0.996 0.000 0.004
#> SRR1199100 2 0.1860 0.8454 0.000 0.948 0.052
#> SRR1199101 2 0.1643 0.8676 0.000 0.956 0.044
#> SRR1199102 1 0.0000 0.9480 1.000 0.000 0.000
#> SRR1199103 2 0.0237 0.8679 0.000 0.996 0.004
#> SRR1199104 3 0.5291 0.9270 0.000 0.268 0.732
#> SRR1199105 2 0.2926 0.8267 0.040 0.924 0.036
#> SRR1199106 2 0.3686 0.7876 0.000 0.860 0.140
#> SRR1199107 2 0.1860 0.8452 0.000 0.948 0.052
#> SRR1199108 1 0.1182 0.9403 0.976 0.012 0.012
#> SRR1199109 2 0.1411 0.8545 0.000 0.964 0.036
#> SRR1199110 2 0.1620 0.8620 0.024 0.964 0.012
#> SRR1199111 2 0.1753 0.8659 0.000 0.952 0.048
#> SRR1199112 3 0.4842 0.8767 0.000 0.224 0.776
#> SRR1199113 3 0.5254 0.9234 0.000 0.264 0.736
#> SRR1199114 1 0.0000 0.9480 1.000 0.000 0.000
#> SRR1199115 1 0.2261 0.9279 0.932 0.000 0.068
#> SRR1199116 2 0.2261 0.8335 0.000 0.932 0.068
#> SRR1199117 1 0.0747 0.9448 0.984 0.000 0.016
#> SRR1199118 1 0.0892 0.9438 0.980 0.000 0.020
#> SRR1199119 2 0.2537 0.8502 0.000 0.920 0.080
#> SRR1199120 3 0.5016 0.8977 0.000 0.240 0.760
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.1302 0.8094 0.000 0.044 0.956 0.000
#> SRR1199009 2 0.3024 0.8593 0.000 0.852 0.148 0.000
#> SRR1199010 2 0.0469 0.9191 0.000 0.988 0.012 0.000
#> SRR1199011 1 0.1305 0.9032 0.960 0.000 0.004 0.036
#> SRR1199012 2 0.2345 0.8978 0.000 0.900 0.100 0.000
#> SRR1199013 2 0.2586 0.9059 0.000 0.912 0.040 0.048
#> SRR1199015 1 0.0707 0.9043 0.980 0.000 0.000 0.020
#> SRR1199016 3 0.1211 0.8116 0.000 0.040 0.960 0.000
#> SRR1199017 1 0.2654 0.8671 0.888 0.000 0.004 0.108
#> SRR1199018 1 0.2011 0.8844 0.920 0.000 0.000 0.080
#> SRR1199019 1 0.2830 0.8704 0.900 0.040 0.000 0.060
#> SRR1199020 2 0.1792 0.9117 0.000 0.932 0.068 0.000
#> SRR1199021 2 0.1109 0.9205 0.000 0.968 0.028 0.004
#> SRR1199022 1 0.0921 0.9028 0.972 0.000 0.000 0.028
#> SRR1199023 1 0.0921 0.9024 0.972 0.000 0.000 0.028
#> SRR1199025 1 0.1109 0.9055 0.968 0.000 0.004 0.028
#> SRR1199026 1 0.3651 0.8009 0.844 0.012 0.136 0.008
#> SRR1199027 1 0.5646 0.4887 0.656 0.000 0.296 0.048
#> SRR1199028 2 0.1211 0.9201 0.000 0.960 0.040 0.000
#> SRR1199029 1 0.1557 0.8974 0.944 0.000 0.000 0.056
#> SRR1199031 2 0.0524 0.9167 0.000 0.988 0.004 0.008
#> SRR1199032 2 0.1792 0.9116 0.000 0.932 0.068 0.000
#> SRR1199033 2 0.1211 0.9195 0.000 0.960 0.040 0.000
#> SRR1199034 3 0.1302 0.8094 0.000 0.044 0.956 0.000
#> SRR1199035 3 0.1302 0.8094 0.000 0.044 0.956 0.000
#> SRR1199036 2 0.3172 0.8477 0.000 0.840 0.160 0.000
#> SRR1199037 2 0.2466 0.8985 0.000 0.900 0.096 0.004
#> SRR1199038 2 0.2944 0.8771 0.000 0.868 0.128 0.004
#> SRR1199040 2 0.1389 0.9181 0.000 0.952 0.048 0.000
#> SRR1199042 1 0.3808 0.8098 0.812 0.012 0.000 0.176
#> SRR1199043 2 0.3486 0.8148 0.000 0.812 0.188 0.000
#> SRR1199044 3 0.1211 0.8116 0.000 0.040 0.960 0.000
#> SRR1199045 3 0.1211 0.8116 0.000 0.040 0.960 0.000
#> SRR1199046 2 0.4948 0.2360 0.000 0.560 0.440 0.000
#> SRR1199047 2 0.2704 0.8804 0.000 0.876 0.124 0.000
#> SRR1199048 2 0.1902 0.8804 0.000 0.932 0.004 0.064
#> SRR1199049 1 0.3219 0.8350 0.836 0.000 0.000 0.164
#> SRR1199050 1 0.2469 0.8732 0.892 0.000 0.000 0.108
#> SRR1199051 2 0.3219 0.8435 0.000 0.836 0.164 0.000
#> SRR1199052 3 0.1211 0.8116 0.000 0.040 0.960 0.000
#> SRR1199054 2 0.2530 0.8888 0.000 0.888 0.112 0.000
#> SRR1199056 2 0.3123 0.8544 0.000 0.844 0.156 0.000
#> SRR1199057 2 0.1211 0.9196 0.000 0.960 0.040 0.000
#> SRR1199059 2 0.0000 0.9169 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0336 0.9186 0.000 0.992 0.008 0.000
#> SRR1199061 2 0.0000 0.9169 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.2408 0.8762 0.896 0.000 0.000 0.104
#> SRR1199064 4 0.4150 0.0000 0.120 0.000 0.056 0.824
#> SRR1199065 3 0.6175 -0.1691 0.464 0.004 0.492 0.040
#> SRR1199067 2 0.1211 0.9204 0.000 0.960 0.040 0.000
#> SRR1199075 1 0.2408 0.8707 0.896 0.000 0.000 0.104
#> SRR1199076 2 0.0336 0.9141 0.000 0.992 0.000 0.008
#> SRR1199077 1 0.1022 0.9036 0.968 0.000 0.000 0.032
#> SRR1199078 2 0.0000 0.9169 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0336 0.9150 0.000 0.992 0.000 0.008
#> SRR1199080 1 0.3324 0.8102 0.852 0.000 0.136 0.012
#> SRR1199081 3 0.5850 0.0733 0.000 0.456 0.512 0.032
#> SRR1199082 2 0.5080 0.6771 0.092 0.764 0.000 0.144
#> SRR1199083 1 0.1474 0.8958 0.948 0.000 0.000 0.052
#> SRR1199084 1 0.1867 0.8869 0.928 0.000 0.000 0.072
#> SRR1199085 1 0.0707 0.9021 0.980 0.000 0.000 0.020
#> SRR1199086 1 0.1211 0.9061 0.960 0.000 0.000 0.040
#> SRR1199087 2 0.0188 0.9158 0.000 0.996 0.004 0.000
#> SRR1199088 3 0.1211 0.8116 0.000 0.040 0.960 0.000
#> SRR1199089 3 0.1211 0.8116 0.000 0.040 0.960 0.000
#> SRR1199090 2 0.2342 0.8717 0.000 0.912 0.008 0.080
#> SRR1199091 1 0.2831 0.8576 0.876 0.000 0.004 0.120
#> SRR1199092 1 0.1557 0.8934 0.944 0.000 0.000 0.056
#> SRR1199093 2 0.0000 0.9169 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0376 0.9047 0.992 0.004 0.000 0.004
#> SRR1199095 2 0.0657 0.9097 0.000 0.984 0.004 0.012
#> SRR1199096 3 0.5581 0.1398 0.000 0.448 0.532 0.020
#> SRR1199097 3 0.4500 0.4816 0.000 0.316 0.684 0.000
#> SRR1199098 2 0.1211 0.9195 0.000 0.960 0.040 0.000
#> SRR1199099 1 0.2011 0.8896 0.920 0.000 0.000 0.080
#> SRR1199100 2 0.0000 0.9169 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.1474 0.9176 0.000 0.948 0.052 0.000
#> SRR1199102 1 0.1716 0.8956 0.936 0.000 0.000 0.064
#> SRR1199103 2 0.0895 0.9200 0.000 0.976 0.020 0.004
#> SRR1199104 3 0.1211 0.8116 0.000 0.040 0.960 0.000
#> SRR1199105 2 0.5063 0.7228 0.048 0.776 0.016 0.160
#> SRR1199106 2 0.3311 0.8354 0.000 0.828 0.172 0.000
#> SRR1199107 2 0.0336 0.9150 0.000 0.992 0.000 0.008
#> SRR1199108 1 0.3355 0.8342 0.836 0.004 0.000 0.160
#> SRR1199109 2 0.0000 0.9169 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.2945 0.8791 0.024 0.904 0.016 0.056
#> SRR1199111 2 0.1557 0.9160 0.000 0.944 0.056 0.000
#> SRR1199112 3 0.1022 0.8000 0.000 0.032 0.968 0.000
#> SRR1199113 3 0.1118 0.8066 0.000 0.036 0.964 0.000
#> SRR1199114 1 0.1474 0.9001 0.948 0.000 0.000 0.052
#> SRR1199115 1 0.2224 0.8980 0.928 0.000 0.032 0.040
#> SRR1199116 2 0.0524 0.9133 0.000 0.988 0.004 0.008
#> SRR1199117 1 0.3356 0.8276 0.824 0.000 0.000 0.176
#> SRR1199118 1 0.2760 0.8800 0.872 0.000 0.000 0.128
#> SRR1199119 2 0.2530 0.8889 0.000 0.888 0.112 0.000
#> SRR1199120 3 0.1211 0.8116 0.000 0.040 0.960 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0486 0.8156 0.000 0.004 0.988 0.004 0.004
#> SRR1199009 2 0.1682 0.9154 0.000 0.940 0.044 0.012 0.004
#> SRR1199010 2 0.0404 0.9331 0.000 0.988 0.000 0.012 0.000
#> SRR1199011 1 0.0963 0.8724 0.964 0.000 0.000 0.036 0.000
#> SRR1199012 2 0.1173 0.9274 0.000 0.964 0.020 0.012 0.004
#> SRR1199013 2 0.4888 0.5587 0.000 0.644 0.008 0.320 0.028
#> SRR1199015 1 0.0703 0.8784 0.976 0.000 0.000 0.024 0.000
#> SRR1199016 3 0.0404 0.8160 0.000 0.000 0.988 0.012 0.000
#> SRR1199017 1 0.1365 0.8678 0.952 0.000 0.004 0.004 0.040
#> SRR1199018 1 0.0955 0.8736 0.968 0.000 0.004 0.000 0.028
#> SRR1199019 1 0.2429 0.8232 0.904 0.008 0.000 0.068 0.020
#> SRR1199020 2 0.0693 0.9314 0.000 0.980 0.012 0.008 0.000
#> SRR1199021 2 0.1124 0.9278 0.000 0.960 0.004 0.036 0.000
#> SRR1199022 1 0.0451 0.8814 0.988 0.000 0.000 0.004 0.008
#> SRR1199023 1 0.0880 0.8738 0.968 0.000 0.000 0.032 0.000
#> SRR1199025 1 0.0566 0.8801 0.984 0.000 0.000 0.012 0.004
#> SRR1199026 1 0.3356 0.7936 0.864 0.004 0.080 0.028 0.024
#> SRR1199027 3 0.6326 0.2450 0.180 0.000 0.588 0.216 0.016
#> SRR1199028 2 0.1205 0.9258 0.000 0.956 0.004 0.040 0.000
#> SRR1199029 1 0.1153 0.8789 0.964 0.000 0.004 0.024 0.008
#> SRR1199031 2 0.0794 0.9285 0.000 0.972 0.000 0.028 0.000
#> SRR1199032 2 0.0579 0.9320 0.000 0.984 0.008 0.008 0.000
#> SRR1199033 2 0.0324 0.9329 0.000 0.992 0.004 0.004 0.000
#> SRR1199034 3 0.0162 0.8213 0.000 0.000 0.996 0.000 0.004
#> SRR1199035 3 0.0324 0.8190 0.000 0.000 0.992 0.004 0.004
#> SRR1199036 2 0.1605 0.9173 0.000 0.944 0.040 0.012 0.004
#> SRR1199037 2 0.1267 0.9262 0.000 0.960 0.024 0.012 0.004
#> SRR1199038 2 0.1485 0.9258 0.000 0.948 0.032 0.020 0.000
#> SRR1199040 2 0.0451 0.9327 0.000 0.988 0.008 0.004 0.000
#> SRR1199042 4 0.2338 0.4062 0.048 0.008 0.004 0.916 0.024
#> SRR1199043 2 0.2166 0.8951 0.000 0.912 0.072 0.012 0.004
#> SRR1199044 3 0.0000 0.8220 0.000 0.000 1.000 0.000 0.000
#> SRR1199045 3 0.0162 0.8213 0.000 0.000 0.996 0.000 0.004
#> SRR1199046 2 0.5091 0.3354 0.000 0.584 0.372 0.044 0.000
#> SRR1199047 2 0.1442 0.9218 0.000 0.952 0.032 0.012 0.004
#> SRR1199048 2 0.4616 0.6053 0.000 0.680 0.004 0.288 0.028
#> SRR1199049 4 0.3596 0.5920 0.200 0.000 0.000 0.784 0.016
#> SRR1199050 4 0.4494 0.5209 0.380 0.000 0.000 0.608 0.012
#> SRR1199051 2 0.2166 0.8937 0.000 0.912 0.072 0.012 0.004
#> SRR1199052 3 0.0162 0.8213 0.000 0.000 0.996 0.000 0.004
#> SRR1199054 2 0.1012 0.9289 0.000 0.968 0.020 0.012 0.000
#> SRR1199056 2 0.2597 0.8966 0.000 0.896 0.040 0.060 0.004
#> SRR1199057 2 0.1041 0.9291 0.000 0.964 0.004 0.032 0.000
#> SRR1199059 2 0.0000 0.9328 0.000 1.000 0.000 0.000 0.000
#> SRR1199060 2 0.0162 0.9327 0.000 0.996 0.000 0.004 0.000
#> SRR1199061 2 0.0510 0.9316 0.000 0.984 0.000 0.016 0.000
#> SRR1199062 4 0.4403 0.5152 0.384 0.000 0.000 0.608 0.008
#> SRR1199064 5 0.1124 0.0000 0.036 0.000 0.000 0.004 0.960
#> SRR1199065 1 0.5046 0.1233 0.500 0.000 0.468 0.000 0.032
#> SRR1199067 2 0.0693 0.9312 0.000 0.980 0.008 0.012 0.000
#> SRR1199075 1 0.1043 0.8698 0.960 0.000 0.000 0.000 0.040
#> SRR1199076 2 0.0510 0.9316 0.000 0.984 0.000 0.016 0.000
#> SRR1199077 1 0.0404 0.8798 0.988 0.000 0.000 0.012 0.000
#> SRR1199078 2 0.0290 0.9326 0.000 0.992 0.000 0.008 0.000
#> SRR1199079 2 0.0510 0.9316 0.000 0.984 0.000 0.016 0.000
#> SRR1199080 1 0.2206 0.8404 0.912 0.000 0.068 0.016 0.004
#> SRR1199081 3 0.7438 0.1169 0.000 0.280 0.408 0.276 0.036
#> SRR1199082 4 0.5030 0.0496 0.000 0.348 0.004 0.612 0.036
#> SRR1199083 1 0.0404 0.8803 0.988 0.000 0.000 0.000 0.012
#> SRR1199084 1 0.0404 0.8805 0.988 0.000 0.000 0.000 0.012
#> SRR1199085 1 0.0566 0.8808 0.984 0.000 0.000 0.004 0.012
#> SRR1199086 1 0.0451 0.8817 0.988 0.000 0.000 0.004 0.008
#> SRR1199087 2 0.0162 0.9327 0.000 0.996 0.000 0.004 0.000
#> SRR1199088 3 0.0000 0.8220 0.000 0.000 1.000 0.000 0.000
#> SRR1199089 3 0.0162 0.8199 0.000 0.000 0.996 0.004 0.000
#> SRR1199090 2 0.5176 0.3740 0.000 0.560 0.004 0.400 0.036
#> SRR1199091 1 0.1764 0.8531 0.928 0.000 0.000 0.008 0.064
#> SRR1199092 1 0.0510 0.8793 0.984 0.000 0.000 0.000 0.016
#> SRR1199093 2 0.0404 0.9321 0.000 0.988 0.000 0.012 0.000
#> SRR1199094 1 0.0880 0.8738 0.968 0.000 0.000 0.032 0.000
#> SRR1199095 2 0.0510 0.9316 0.000 0.984 0.000 0.016 0.000
#> SRR1199096 3 0.6985 0.1782 0.000 0.332 0.460 0.184 0.024
#> SRR1199097 3 0.4449 0.3296 0.000 0.352 0.636 0.008 0.004
#> SRR1199098 2 0.0290 0.9331 0.000 0.992 0.008 0.000 0.000
#> SRR1199099 1 0.4403 0.1856 0.608 0.000 0.000 0.384 0.008
#> SRR1199100 2 0.0510 0.9316 0.000 0.984 0.000 0.016 0.000
#> SRR1199101 2 0.0807 0.9305 0.000 0.976 0.012 0.012 0.000
#> SRR1199102 1 0.3728 0.5905 0.748 0.000 0.000 0.244 0.008
#> SRR1199103 2 0.1121 0.9222 0.000 0.956 0.000 0.044 0.000
#> SRR1199104 3 0.0000 0.8220 0.000 0.000 1.000 0.000 0.000
#> SRR1199105 4 0.3346 0.2643 0.000 0.092 0.016 0.856 0.036
#> SRR1199106 2 0.2037 0.9020 0.000 0.920 0.064 0.012 0.004
#> SRR1199107 2 0.0794 0.9288 0.000 0.972 0.000 0.028 0.000
#> SRR1199108 4 0.3318 0.5842 0.192 0.000 0.000 0.800 0.008
#> SRR1199109 2 0.0404 0.9321 0.000 0.988 0.000 0.012 0.000
#> SRR1199110 2 0.3987 0.7500 0.024 0.780 0.004 0.188 0.004
#> SRR1199111 2 0.0579 0.9320 0.000 0.984 0.008 0.008 0.000
#> SRR1199112 3 0.0000 0.8220 0.000 0.000 1.000 0.000 0.000
#> SRR1199113 3 0.0404 0.8160 0.000 0.000 0.988 0.012 0.000
#> SRR1199114 1 0.3048 0.7211 0.820 0.000 0.000 0.176 0.004
#> SRR1199115 1 0.3437 0.7286 0.808 0.000 0.004 0.176 0.012
#> SRR1199116 2 0.1205 0.9222 0.000 0.956 0.000 0.040 0.004
#> SRR1199117 4 0.3807 0.5993 0.240 0.000 0.000 0.748 0.012
#> SRR1199118 4 0.5425 0.4116 0.420 0.000 0.000 0.520 0.060
#> SRR1199119 2 0.0992 0.9289 0.000 0.968 0.024 0.008 0.000
#> SRR1199120 3 0.0000 0.8220 0.000 0.000 1.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
#> SRR1199002 3 0.0405 0.8439 0.000 0.008 0.988 0.000 0.004 0.000
#> SRR1199009 2 0.0777 0.9425 0.000 0.972 0.024 0.000 0.004 0.000
#> SRR1199010 2 0.0603 0.9531 0.000 0.980 0.000 0.000 0.016 0.004
#> SRR1199011 1 0.1010 0.9009 0.960 0.000 0.000 0.036 0.004 0.000
#> SRR1199012 2 0.0653 0.9488 0.000 0.980 0.004 0.000 0.012 0.004
#> SRR1199013 5 0.3056 0.7011 0.000 0.160 0.012 0.008 0.820 0.000
#> SRR1199015 1 0.0458 0.9122 0.984 0.000 0.000 0.016 0.000 0.000
#> SRR1199016 3 0.0146 0.8489 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR1199017 1 0.1237 0.9055 0.956 0.000 0.000 0.020 0.004 0.020
#> SRR1199018 1 0.0508 0.9127 0.984 0.000 0.000 0.000 0.004 0.012
#> SRR1199019 1 0.1225 0.8916 0.952 0.000 0.000 0.012 0.036 0.000
#> SRR1199020 2 0.0405 0.9522 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR1199021 2 0.1814 0.9097 0.000 0.900 0.000 0.000 0.100 0.000
#> SRR1199022 1 0.0291 0.9134 0.992 0.000 0.000 0.004 0.000 0.004
#> SRR1199023 1 0.0547 0.9101 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR1199025 1 0.0547 0.9115 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR1199026 1 0.1148 0.8997 0.960 0.000 0.016 0.004 0.020 0.000
#> SRR1199027 3 0.6507 0.1523 0.072 0.000 0.516 0.288 0.120 0.004
#> SRR1199028 2 0.1765 0.9125 0.000 0.904 0.000 0.000 0.096 0.000
#> SRR1199029 1 0.0405 0.9128 0.988 0.000 0.000 0.008 0.004 0.000
#> SRR1199031 2 0.1204 0.9432 0.000 0.944 0.000 0.000 0.056 0.000
#> SRR1199032 2 0.0692 0.9527 0.000 0.976 0.000 0.000 0.020 0.004
#> SRR1199033 2 0.0547 0.9523 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR1199034 3 0.0260 0.8451 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1199035 3 0.0291 0.8463 0.000 0.004 0.992 0.000 0.004 0.000
#> SRR1199036 2 0.1088 0.9418 0.000 0.960 0.024 0.000 0.016 0.000
#> SRR1199037 2 0.0951 0.9433 0.000 0.968 0.008 0.000 0.020 0.004
#> SRR1199038 2 0.1218 0.9471 0.000 0.956 0.012 0.000 0.028 0.004
#> SRR1199040 2 0.0508 0.9519 0.000 0.984 0.000 0.000 0.012 0.004
#> SRR1199042 5 0.4406 0.1441 0.012 0.004 0.000 0.432 0.548 0.004
#> SRR1199043 2 0.1536 0.9258 0.000 0.940 0.040 0.000 0.016 0.004
#> SRR1199044 3 0.0000 0.8493 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199045 3 0.0000 0.8493 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199046 3 0.5075 0.0378 0.000 0.460 0.464 0.000 0.076 0.000
#> SRR1199047 2 0.0862 0.9434 0.000 0.972 0.008 0.000 0.016 0.004
#> SRR1199048 5 0.3315 0.6410 0.000 0.200 0.000 0.020 0.780 0.000
#> SRR1199049 4 0.2886 0.8040 0.064 0.000 0.004 0.860 0.072 0.000
#> SRR1199050 4 0.2212 0.8469 0.112 0.000 0.000 0.880 0.008 0.000
#> SRR1199051 2 0.1296 0.9325 0.000 0.952 0.032 0.000 0.012 0.004
#> SRR1199052 3 0.0146 0.8489 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR1199054 2 0.0405 0.9517 0.000 0.988 0.004 0.000 0.008 0.000
#> SRR1199056 2 0.3888 0.5418 0.000 0.672 0.016 0.000 0.312 0.000
#> SRR1199057 2 0.2178 0.8750 0.000 0.868 0.000 0.000 0.132 0.000
#> SRR1199059 2 0.0777 0.9516 0.000 0.972 0.000 0.004 0.024 0.000
#> SRR1199060 2 0.0790 0.9502 0.000 0.968 0.000 0.000 0.032 0.000
#> SRR1199061 2 0.1082 0.9472 0.000 0.956 0.000 0.004 0.040 0.000
#> SRR1199062 4 0.2346 0.8455 0.124 0.000 0.000 0.868 0.008 0.000
#> SRR1199064 6 0.0260 0.0000 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR1199065 1 0.4932 0.2692 0.560 0.000 0.392 0.028 0.012 0.008
#> SRR1199067 2 0.0508 0.9509 0.000 0.984 0.000 0.000 0.012 0.004
#> SRR1199075 1 0.0508 0.9124 0.984 0.000 0.000 0.000 0.004 0.012
#> SRR1199076 2 0.0858 0.9508 0.000 0.968 0.000 0.004 0.028 0.000
#> SRR1199077 1 0.0260 0.9132 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199078 2 0.0692 0.9522 0.000 0.976 0.000 0.000 0.020 0.004
#> SRR1199079 2 0.0935 0.9504 0.000 0.964 0.000 0.004 0.032 0.000
#> SRR1199080 1 0.1906 0.8706 0.924 0.000 0.032 0.036 0.008 0.000
#> SRR1199081 5 0.3686 0.6657 0.000 0.060 0.136 0.008 0.796 0.000
#> SRR1199082 5 0.3045 0.7046 0.000 0.060 0.000 0.100 0.840 0.000
#> SRR1199083 1 0.0291 0.9131 0.992 0.000 0.000 0.004 0.004 0.000
#> SRR1199084 1 0.0508 0.9131 0.984 0.000 0.000 0.004 0.000 0.012
#> SRR1199085 1 0.0405 0.9135 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR1199086 1 0.0725 0.9136 0.976 0.000 0.000 0.012 0.000 0.012
#> SRR1199087 2 0.0653 0.9525 0.000 0.980 0.000 0.004 0.012 0.004
#> SRR1199088 3 0.0000 0.8493 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199089 3 0.0508 0.8438 0.000 0.000 0.984 0.004 0.012 0.000
#> SRR1199090 5 0.2985 0.7271 0.000 0.116 0.004 0.036 0.844 0.000
#> SRR1199091 1 0.0837 0.9098 0.972 0.000 0.000 0.004 0.004 0.020
#> SRR1199092 1 0.0603 0.9120 0.980 0.000 0.000 0.000 0.004 0.016
#> SRR1199093 2 0.0790 0.9502 0.000 0.968 0.000 0.000 0.032 0.000
#> SRR1199094 1 0.0260 0.9132 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199095 2 0.0922 0.9513 0.000 0.968 0.000 0.004 0.024 0.004
#> SRR1199096 5 0.4560 0.6141 0.004 0.096 0.180 0.004 0.716 0.000
#> SRR1199097 3 0.4159 0.2472 0.000 0.396 0.588 0.000 0.016 0.000
#> SRR1199098 2 0.0458 0.9529 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR1199099 4 0.2854 0.7725 0.208 0.000 0.000 0.792 0.000 0.000
#> SRR1199100 2 0.1155 0.9497 0.000 0.956 0.000 0.004 0.036 0.004
#> SRR1199101 2 0.0405 0.9486 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR1199102 4 0.3499 0.6125 0.320 0.000 0.000 0.680 0.000 0.000
#> SRR1199103 2 0.1327 0.9383 0.000 0.936 0.000 0.000 0.064 0.000
#> SRR1199104 3 0.0146 0.8476 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR1199105 5 0.3145 0.6718 0.004 0.028 0.016 0.104 0.848 0.000
#> SRR1199106 2 0.1728 0.9081 0.000 0.924 0.064 0.000 0.008 0.004
#> SRR1199107 2 0.1152 0.9471 0.000 0.952 0.000 0.004 0.044 0.000
#> SRR1199108 4 0.2723 0.6909 0.020 0.000 0.000 0.856 0.120 0.004
#> SRR1199109 2 0.0632 0.9520 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR1199110 2 0.4585 0.6460 0.004 0.716 0.000 0.172 0.104 0.004
#> SRR1199111 2 0.0260 0.9518 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1199112 3 0.0260 0.8474 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1199113 3 0.0260 0.8474 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1199114 1 0.3828 0.0482 0.560 0.000 0.000 0.440 0.000 0.000
#> SRR1199115 1 0.4040 0.3225 0.632 0.000 0.004 0.356 0.004 0.004
#> SRR1199116 2 0.2006 0.9064 0.000 0.892 0.000 0.004 0.104 0.000
#> SRR1199117 4 0.2237 0.8215 0.068 0.000 0.000 0.896 0.036 0.000
#> SRR1199118 4 0.2904 0.8398 0.112 0.000 0.000 0.852 0.008 0.028
#> SRR1199119 2 0.0837 0.9518 0.000 0.972 0.004 0.000 0.020 0.004
#> SRR1199120 3 0.0000 0.8493 0.000 0.000 1.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["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'ATC' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.998 0.999 0.4504 0.551 0.551
#> 3 3 1.000 0.983 0.997 0.0193 0.993 0.988
#> 4 4 0.970 0.955 0.984 0.0565 0.973 0.950
#> 5 5 0.986 0.955 0.986 0.0351 0.987 0.975
#> 6 6 0.889 0.903 0.975 0.0335 0.987 0.973
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.000 0.998 0.000 1.000
#> SRR1199009 2 0.000 0.998 0.000 1.000
#> SRR1199010 2 0.000 0.998 0.000 1.000
#> SRR1199011 1 0.000 1.000 1.000 0.000
#> SRR1199012 2 0.000 0.998 0.000 1.000
#> SRR1199013 2 0.000 0.998 0.000 1.000
#> SRR1199015 1 0.000 1.000 1.000 0.000
#> SRR1199016 2 0.000 0.998 0.000 1.000
#> SRR1199017 1 0.000 1.000 1.000 0.000
#> SRR1199018 1 0.000 1.000 1.000 0.000
#> SRR1199019 1 0.000 1.000 1.000 0.000
#> SRR1199020 2 0.000 0.998 0.000 1.000
#> SRR1199021 2 0.000 0.998 0.000 1.000
#> SRR1199022 1 0.000 1.000 1.000 0.000
#> SRR1199023 1 0.000 1.000 1.000 0.000
#> SRR1199025 1 0.000 1.000 1.000 0.000
#> SRR1199026 1 0.000 1.000 1.000 0.000
#> SRR1199027 2 0.482 0.884 0.104 0.896
#> SRR1199028 2 0.000 0.998 0.000 1.000
#> SRR1199029 1 0.000 1.000 1.000 0.000
#> SRR1199031 2 0.000 0.998 0.000 1.000
#> SRR1199032 2 0.000 0.998 0.000 1.000
#> SRR1199033 2 0.000 0.998 0.000 1.000
#> SRR1199034 2 0.000 0.998 0.000 1.000
#> SRR1199035 2 0.000 0.998 0.000 1.000
#> SRR1199036 2 0.000 0.998 0.000 1.000
#> SRR1199037 2 0.000 0.998 0.000 1.000
#> SRR1199038 2 0.000 0.998 0.000 1.000
#> SRR1199040 2 0.000 0.998 0.000 1.000
#> SRR1199042 2 0.000 0.998 0.000 1.000
#> SRR1199043 2 0.000 0.998 0.000 1.000
#> SRR1199044 2 0.000 0.998 0.000 1.000
#> SRR1199045 2 0.000 0.998 0.000 1.000
#> SRR1199046 2 0.000 0.998 0.000 1.000
#> SRR1199047 2 0.000 0.998 0.000 1.000
#> SRR1199048 2 0.000 0.998 0.000 1.000
#> SRR1199049 1 0.000 1.000 1.000 0.000
#> SRR1199050 1 0.000 1.000 1.000 0.000
#> SRR1199051 2 0.000 0.998 0.000 1.000
#> SRR1199052 2 0.000 0.998 0.000 1.000
#> SRR1199054 2 0.000 0.998 0.000 1.000
#> SRR1199056 2 0.000 0.998 0.000 1.000
#> SRR1199057 2 0.000 0.998 0.000 1.000
#> SRR1199059 2 0.000 0.998 0.000 1.000
#> SRR1199060 2 0.000 0.998 0.000 1.000
#> SRR1199061 2 0.000 0.998 0.000 1.000
#> SRR1199062 1 0.000 1.000 1.000 0.000
#> SRR1199064 1 0.000 1.000 1.000 0.000
#> SRR1199065 1 0.000 1.000 1.000 0.000
#> SRR1199067 2 0.000 0.998 0.000 1.000
#> SRR1199075 1 0.000 1.000 1.000 0.000
#> SRR1199076 2 0.000 0.998 0.000 1.000
#> SRR1199077 1 0.000 1.000 1.000 0.000
#> SRR1199078 2 0.000 0.998 0.000 1.000
#> SRR1199079 2 0.000 0.998 0.000 1.000
#> SRR1199080 1 0.000 1.000 1.000 0.000
#> SRR1199081 2 0.000 0.998 0.000 1.000
#> SRR1199082 2 0.000 0.998 0.000 1.000
#> SRR1199083 1 0.000 1.000 1.000 0.000
#> SRR1199084 1 0.000 1.000 1.000 0.000
#> SRR1199085 1 0.000 1.000 1.000 0.000
#> SRR1199086 1 0.000 1.000 1.000 0.000
#> SRR1199087 2 0.000 0.998 0.000 1.000
#> SRR1199088 2 0.000 0.998 0.000 1.000
#> SRR1199089 2 0.000 0.998 0.000 1.000
#> SRR1199090 2 0.000 0.998 0.000 1.000
#> SRR1199091 1 0.000 1.000 1.000 0.000
#> SRR1199092 1 0.000 1.000 1.000 0.000
#> SRR1199093 2 0.000 0.998 0.000 1.000
#> SRR1199094 1 0.000 1.000 1.000 0.000
#> SRR1199095 2 0.000 0.998 0.000 1.000
#> SRR1199096 2 0.000 0.998 0.000 1.000
#> SRR1199097 2 0.000 0.998 0.000 1.000
#> SRR1199098 2 0.000 0.998 0.000 1.000
#> SRR1199099 1 0.000 1.000 1.000 0.000
#> SRR1199100 2 0.000 0.998 0.000 1.000
#> SRR1199101 2 0.000 0.998 0.000 1.000
#> SRR1199102 1 0.000 1.000 1.000 0.000
#> SRR1199103 2 0.000 0.998 0.000 1.000
#> SRR1199104 2 0.000 0.998 0.000 1.000
#> SRR1199105 2 0.000 0.998 0.000 1.000
#> SRR1199106 2 0.000 0.998 0.000 1.000
#> SRR1199107 2 0.000 0.998 0.000 1.000
#> SRR1199108 1 0.000 1.000 1.000 0.000
#> SRR1199109 2 0.000 0.998 0.000 1.000
#> SRR1199110 2 0.000 0.998 0.000 1.000
#> SRR1199111 2 0.000 0.998 0.000 1.000
#> SRR1199112 2 0.000 0.998 0.000 1.000
#> SRR1199113 2 0.000 0.998 0.000 1.000
#> SRR1199114 1 0.000 1.000 1.000 0.000
#> SRR1199115 1 0.000 1.000 1.000 0.000
#> SRR1199116 2 0.000 0.998 0.000 1.000
#> SRR1199117 1 0.000 1.000 1.000 0.000
#> SRR1199118 1 0.000 1.000 1.000 0.000
#> SRR1199119 2 0.000 0.998 0.000 1.000
#> SRR1199120 2 0.000 0.998 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199009 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199010 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199011 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199012 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199013 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199015 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199016 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199017 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199018 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199019 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199020 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199021 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199022 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199023 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199025 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199026 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199027 2 0.304 0.882 0.000 0.896 0.104
#> SRR1199028 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199029 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199031 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199032 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199033 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199034 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199035 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199036 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199037 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199038 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199040 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199042 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199043 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199044 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199045 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199046 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199047 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199048 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199049 1 0.304 0.886 0.896 0.000 0.104
#> SRR1199050 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199051 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199052 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199054 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199056 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199057 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199059 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199060 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199061 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199062 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199064 3 0.000 0.000 0.000 0.000 1.000
#> SRR1199065 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199067 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199075 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199076 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199077 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199078 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199079 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199080 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199081 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199082 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199083 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199084 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199085 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199086 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199087 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199088 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199089 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199090 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199091 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199092 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199093 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199094 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199095 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199096 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199097 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199098 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199099 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199100 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199101 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199102 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199103 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199104 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199105 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199106 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199107 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199108 1 0.304 0.886 0.896 0.000 0.104
#> SRR1199109 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199110 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199111 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199112 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199113 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199114 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199115 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199116 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199117 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199118 1 0.000 0.993 1.000 0.000 0.000
#> SRR1199119 2 0.000 0.998 0.000 1.000 0.000
#> SRR1199120 2 0.000 0.998 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199009 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199010 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199011 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199012 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199013 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199015 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199016 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199017 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199018 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199019 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199020 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199021 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199022 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199023 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199025 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199026 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199027 4 0.3837 0.660 0.000 0.224 0 0.776
#> SRR1199028 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199029 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199031 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199032 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199033 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199034 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199035 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199036 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199037 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199038 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199040 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199042 4 0.4564 0.730 0.000 0.328 0 0.672
#> SRR1199043 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199044 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199045 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199046 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199047 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199048 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199049 1 0.4564 0.559 0.672 0.000 0 0.328
#> SRR1199050 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199051 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199052 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199054 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199056 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199057 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199059 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199060 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199061 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199062 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199064 3 0.0000 0.000 0.000 0.000 1 0.000
#> SRR1199065 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199067 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199075 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199076 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199077 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199078 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199079 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199080 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199081 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199082 2 0.0469 0.976 0.000 0.988 0 0.012
#> SRR1199083 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199084 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199085 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199086 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199087 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199088 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199089 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199090 2 0.0188 0.986 0.000 0.996 0 0.004
#> SRR1199091 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199092 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199093 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199094 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199095 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199096 2 0.2868 0.770 0.000 0.864 0 0.136
#> SRR1199097 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199098 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199099 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199100 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199101 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199102 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199103 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199104 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199105 2 0.3837 0.560 0.000 0.776 0 0.224
#> SRR1199106 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199107 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199108 1 0.4564 0.559 0.672 0.000 0 0.328
#> SRR1199109 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199110 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199111 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199112 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199113 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199114 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199115 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199116 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199117 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199118 1 0.0000 0.978 1.000 0.000 0 0.000
#> SRR1199119 2 0.0000 0.991 0.000 1.000 0 0.000
#> SRR1199120 2 0.0000 0.991 0.000 1.000 0 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199009 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199010 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199011 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199012 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199013 2 0.088 0.959 0.000 0.968 0.032 0.000 0
#> SRR1199015 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199016 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199017 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199018 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199019 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199020 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199021 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199022 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199023 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199025 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199026 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199027 4 0.000 0.266 0.000 0.000 0.000 1.000 0
#> SRR1199028 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199029 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199031 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199032 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199033 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199034 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199035 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199036 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199037 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199038 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199040 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199042 4 0.265 0.409 0.000 0.152 0.000 0.848 0
#> SRR1199043 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199044 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199045 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199046 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199047 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199048 2 0.127 0.940 0.000 0.948 0.052 0.000 0
#> SRR1199049 3 0.307 0.945 0.196 0.000 0.804 0.000 0
#> SRR1199050 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199051 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199052 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199054 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199056 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199057 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199059 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199060 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199061 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199062 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199064 5 0.000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1199065 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199067 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199075 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199076 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199077 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199078 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199079 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199080 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199081 2 0.088 0.959 0.000 0.968 0.032 0.000 0
#> SRR1199082 2 0.170 0.923 0.000 0.932 0.060 0.008 0
#> SRR1199083 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199084 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199085 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199086 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199087 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199088 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199089 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199090 2 0.134 0.936 0.000 0.944 0.056 0.000 0
#> SRR1199091 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199092 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199093 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199094 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199095 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199096 2 0.328 0.766 0.000 0.812 0.176 0.012 0
#> SRR1199097 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199098 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199099 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199100 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199101 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199102 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199103 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199104 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199105 2 0.545 0.467 0.000 0.660 0.176 0.164 0
#> SRR1199106 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199107 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199108 3 0.289 0.943 0.176 0.000 0.824 0.000 0
#> SRR1199109 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199110 2 0.104 0.951 0.000 0.960 0.040 0.000 0
#> SRR1199111 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199112 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199113 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199114 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199115 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199116 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199117 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199118 1 0.000 1.000 1.000 0.000 0.000 0.000 0
#> SRR1199119 2 0.000 0.986 0.000 1.000 0.000 0.000 0
#> SRR1199120 2 0.000 0.986 0.000 1.000 0.000 0.000 0
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199009 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199010 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199013 2 0.2003 0.797 0.000 0.884 0.116 0.000 0.000 0.000
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199021 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 5 0.0000 0.253 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1199028 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199032 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199033 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199034 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199035 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199036 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199037 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199038 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199040 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199042 5 0.2907 0.399 0.000 0.152 0.020 0.000 0.828 0.000
#> SRR1199043 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199044 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199045 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199046 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199047 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199048 2 0.3101 0.490 0.000 0.756 0.244 0.000 0.000 0.000
#> SRR1199049 4 0.5686 0.333 0.164 0.000 0.000 0.472 0.000 0.364
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199052 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199054 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199056 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199057 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199059 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199060 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199061 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199064 6 0.3659 0.000 0.000 0.000 0.364 0.000 0.000 0.636
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199079 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 2 0.2003 0.797 0.000 0.884 0.116 0.000 0.000 0.000
#> SRR1199082 2 0.3290 0.451 0.000 0.744 0.252 0.000 0.004 0.000
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199088 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199089 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199090 2 0.3126 0.477 0.000 0.752 0.248 0.000 0.000 0.000
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199096 2 0.2823 0.599 0.000 0.796 0.204 0.000 0.000 0.000
#> SRR1199097 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199098 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199101 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199104 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199105 3 0.4467 0.000 0.000 0.320 0.632 0.000 0.048 0.000
#> SRR1199106 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199107 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199108 4 0.0000 0.224 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1199109 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199110 2 0.2219 0.759 0.000 0.864 0.136 0.000 0.000 0.000
#> SRR1199111 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199112 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199113 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.966 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199120 2 0.0146 0.963 0.000 0.996 0.004 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.4497 0.551 0.551
#> 3 3 0.771 0.717 0.876 0.2674 0.986 0.975
#> 4 4 0.828 0.944 0.947 0.1256 0.798 0.625
#> 5 5 0.924 0.868 0.935 0.0648 0.984 0.954
#> 6 6 0.838 0.813 0.906 0.0453 0.962 0.883
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0 1 0 1
#> SRR1199009 2 0 1 0 1
#> SRR1199010 2 0 1 0 1
#> SRR1199011 1 0 1 1 0
#> SRR1199012 2 0 1 0 1
#> SRR1199013 2 0 1 0 1
#> SRR1199015 1 0 1 1 0
#> SRR1199016 2 0 1 0 1
#> SRR1199017 1 0 1 1 0
#> SRR1199018 1 0 1 1 0
#> SRR1199019 1 0 1 1 0
#> SRR1199020 2 0 1 0 1
#> SRR1199021 2 0 1 0 1
#> SRR1199022 1 0 1 1 0
#> SRR1199023 1 0 1 1 0
#> SRR1199025 1 0 1 1 0
#> SRR1199026 1 0 1 1 0
#> SRR1199027 2 0 1 0 1
#> SRR1199028 2 0 1 0 1
#> SRR1199029 1 0 1 1 0
#> SRR1199031 2 0 1 0 1
#> SRR1199032 2 0 1 0 1
#> SRR1199033 2 0 1 0 1
#> SRR1199034 2 0 1 0 1
#> SRR1199035 2 0 1 0 1
#> SRR1199036 2 0 1 0 1
#> SRR1199037 2 0 1 0 1
#> SRR1199038 2 0 1 0 1
#> SRR1199040 2 0 1 0 1
#> SRR1199042 2 0 1 0 1
#> SRR1199043 2 0 1 0 1
#> SRR1199044 2 0 1 0 1
#> SRR1199045 2 0 1 0 1
#> SRR1199046 2 0 1 0 1
#> SRR1199047 2 0 1 0 1
#> SRR1199048 2 0 1 0 1
#> SRR1199049 1 0 1 1 0
#> SRR1199050 1 0 1 1 0
#> SRR1199051 2 0 1 0 1
#> SRR1199052 2 0 1 0 1
#> SRR1199054 2 0 1 0 1
#> SRR1199056 2 0 1 0 1
#> SRR1199057 2 0 1 0 1
#> SRR1199059 2 0 1 0 1
#> SRR1199060 2 0 1 0 1
#> SRR1199061 2 0 1 0 1
#> SRR1199062 1 0 1 1 0
#> SRR1199064 1 0 1 1 0
#> SRR1199065 1 0 1 1 0
#> SRR1199067 2 0 1 0 1
#> SRR1199075 1 0 1 1 0
#> SRR1199076 2 0 1 0 1
#> SRR1199077 1 0 1 1 0
#> SRR1199078 2 0 1 0 1
#> SRR1199079 2 0 1 0 1
#> SRR1199080 1 0 1 1 0
#> SRR1199081 2 0 1 0 1
#> SRR1199082 2 0 1 0 1
#> SRR1199083 1 0 1 1 0
#> SRR1199084 1 0 1 1 0
#> SRR1199085 1 0 1 1 0
#> SRR1199086 1 0 1 1 0
#> SRR1199087 2 0 1 0 1
#> SRR1199088 2 0 1 0 1
#> SRR1199089 2 0 1 0 1
#> SRR1199090 2 0 1 0 1
#> SRR1199091 1 0 1 1 0
#> SRR1199092 1 0 1 1 0
#> SRR1199093 2 0 1 0 1
#> SRR1199094 1 0 1 1 0
#> SRR1199095 2 0 1 0 1
#> SRR1199096 2 0 1 0 1
#> SRR1199097 2 0 1 0 1
#> SRR1199098 2 0 1 0 1
#> SRR1199099 1 0 1 1 0
#> SRR1199100 2 0 1 0 1
#> SRR1199101 2 0 1 0 1
#> SRR1199102 1 0 1 1 0
#> SRR1199103 2 0 1 0 1
#> SRR1199104 2 0 1 0 1
#> SRR1199105 2 0 1 0 1
#> SRR1199106 2 0 1 0 1
#> SRR1199107 2 0 1 0 1
#> SRR1199108 1 0 1 1 0
#> SRR1199109 2 0 1 0 1
#> SRR1199110 2 0 1 0 1
#> SRR1199111 2 0 1 0 1
#> SRR1199112 2 0 1 0 1
#> SRR1199113 2 0 1 0 1
#> SRR1199114 1 0 1 1 0
#> SRR1199115 1 0 1 1 0
#> SRR1199116 2 0 1 0 1
#> SRR1199117 1 0 1 1 0
#> SRR1199118 1 0 1 1 0
#> SRR1199119 2 0 1 0 1
#> SRR1199120 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.0000 0.3694 0.000 1.000 0.000
#> SRR1199009 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199010 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199011 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199012 2 0.6274 0.7952 0.000 0.544 0.456
#> SRR1199013 2 0.3551 0.5134 0.000 0.868 0.132
#> SRR1199015 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199016 2 0.1031 0.3201 0.000 0.976 0.024
#> SRR1199017 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199020 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199021 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199022 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199027 3 0.6302 0.0000 0.000 0.480 0.520
#> SRR1199028 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199029 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199031 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199032 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199033 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199034 2 0.0000 0.3694 0.000 1.000 0.000
#> SRR1199035 2 0.0237 0.3754 0.000 0.996 0.004
#> SRR1199036 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199037 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199038 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199040 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199042 2 0.6215 -0.8548 0.000 0.572 0.428
#> SRR1199043 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199044 2 0.0000 0.3694 0.000 1.000 0.000
#> SRR1199045 2 0.0237 0.3622 0.000 0.996 0.004
#> SRR1199046 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199047 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199048 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199049 1 0.6309 0.2520 0.504 0.000 0.496
#> SRR1199050 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199051 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199052 2 0.0000 0.3694 0.000 1.000 0.000
#> SRR1199054 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199056 2 0.5216 0.6612 0.000 0.740 0.260
#> SRR1199057 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199059 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199060 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199061 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199062 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199064 1 0.6309 0.2419 0.500 0.000 0.500
#> SRR1199065 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199067 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199075 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199076 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199077 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199078 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199079 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199080 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199081 2 0.0000 0.3694 0.000 1.000 0.000
#> SRR1199082 2 0.3816 0.5031 0.000 0.852 0.148
#> SRR1199083 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199087 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199088 2 0.0237 0.3622 0.000 0.996 0.004
#> SRR1199089 2 0.0237 0.3622 0.000 0.996 0.004
#> SRR1199090 2 0.3752 0.5083 0.000 0.856 0.144
#> SRR1199091 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199093 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199094 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199095 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199096 2 0.1031 0.3201 0.000 0.976 0.024
#> SRR1199097 2 0.4605 0.6126 0.000 0.796 0.204
#> SRR1199098 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199099 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199100 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199101 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199102 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199103 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199104 2 0.0000 0.3694 0.000 1.000 0.000
#> SRR1199105 2 0.3340 0.0128 0.000 0.880 0.120
#> SRR1199106 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199107 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199108 1 0.6309 0.2520 0.504 0.000 0.496
#> SRR1199109 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199110 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199111 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199112 2 0.0237 0.3622 0.000 0.996 0.004
#> SRR1199113 2 0.1031 0.3201 0.000 0.976 0.024
#> SRR1199114 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199116 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199117 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9530 1.000 0.000 0.000
#> SRR1199119 2 0.6302 0.8080 0.000 0.520 0.480
#> SRR1199120 2 0.0237 0.3622 0.000 0.996 0.004
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.3356 0.938 0.000 0.176 0.824 0.000
#> SRR1199009 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.1118 0.971 0.964 0.000 0.036 0.000
#> SRR1199012 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199013 2 0.4281 0.699 0.000 0.792 0.180 0.028
#> SRR1199015 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.2868 0.899 0.000 0.136 0.864 0.000
#> SRR1199017 1 0.0707 0.981 0.980 0.000 0.020 0.000
#> SRR1199018 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0188 0.986 0.996 0.000 0.004 0.000
#> SRR1199020 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0707 0.980 0.980 0.000 0.020 0.000
#> SRR1199025 1 0.0469 0.984 0.988 0.000 0.012 0.000
#> SRR1199026 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.2281 0.870 0.000 0.000 0.096 0.904
#> SRR1199028 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.3356 0.938 0.000 0.176 0.824 0.000
#> SRR1199035 3 0.3400 0.935 0.000 0.180 0.820 0.000
#> SRR1199036 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199038 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.5010 0.663 0.000 0.024 0.276 0.700
#> SRR1199043 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.3356 0.938 0.000 0.176 0.824 0.000
#> SRR1199045 3 0.3356 0.938 0.000 0.176 0.824 0.000
#> SRR1199046 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199047 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.0376 0.974 0.000 0.992 0.004 0.004
#> SRR1199049 4 0.2565 0.888 0.032 0.000 0.056 0.912
#> SRR1199050 1 0.1716 0.951 0.936 0.000 0.064 0.000
#> SRR1199051 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.3356 0.938 0.000 0.176 0.824 0.000
#> SRR1199054 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.2281 0.865 0.000 0.904 0.096 0.000
#> SRR1199057 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199060 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199062 1 0.1716 0.951 0.936 0.000 0.064 0.000
#> SRR1199064 4 0.1488 0.896 0.032 0.000 0.012 0.956
#> SRR1199065 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199077 1 0.0592 0.982 0.984 0.000 0.016 0.000
#> SRR1199078 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199079 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199080 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199081 3 0.4123 0.877 0.000 0.220 0.772 0.008
#> SRR1199082 2 0.4995 0.616 0.000 0.720 0.248 0.032
#> SRR1199083 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199088 3 0.3356 0.938 0.000 0.176 0.824 0.000
#> SRR1199089 3 0.3266 0.934 0.000 0.168 0.832 0.000
#> SRR1199090 2 0.4418 0.704 0.000 0.784 0.184 0.032
#> SRR1199091 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199094 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199096 3 0.3707 0.879 0.000 0.132 0.840 0.028
#> SRR1199097 3 0.4522 0.726 0.000 0.320 0.680 0.000
#> SRR1199098 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.1557 0.957 0.944 0.000 0.056 0.000
#> SRR1199100 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199101 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0921 0.976 0.972 0.000 0.028 0.000
#> SRR1199103 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199104 3 0.3356 0.938 0.000 0.176 0.824 0.000
#> SRR1199105 3 0.5940 0.454 0.000 0.088 0.672 0.240
#> SRR1199106 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199108 4 0.1724 0.897 0.032 0.000 0.020 0.948
#> SRR1199109 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199110 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199111 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.3266 0.934 0.000 0.168 0.832 0.000
#> SRR1199113 3 0.2868 0.899 0.000 0.136 0.864 0.000
#> SRR1199114 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0188 0.977 0.000 0.996 0.000 0.004
#> SRR1199117 1 0.1716 0.951 0.936 0.000 0.064 0.000
#> SRR1199118 1 0.0000 0.988 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.3356 0.938 0.000 0.176 0.824 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199009 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199010 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199011 1 0.2409 0.9230 0.900 0.000 0.032 0.000 0.068
#> SRR1199012 2 0.0290 0.9483 0.000 0.992 0.000 0.000 0.008
#> SRR1199013 2 0.6827 0.0204 0.000 0.504 0.056 0.096 0.344
#> SRR1199015 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.1282 0.8547 0.000 0.044 0.952 0.004 0.000
#> SRR1199017 1 0.1668 0.9471 0.940 0.000 0.032 0.000 0.028
#> SRR1199018 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0162 0.9683 0.996 0.000 0.004 0.000 0.000
#> SRR1199020 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199021 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.1485 0.9506 0.948 0.000 0.020 0.000 0.032
#> SRR1199025 1 0.1661 0.9474 0.940 0.000 0.036 0.000 0.024
#> SRR1199026 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.1121 -0.0360 0.000 0.000 0.044 0.956 0.000
#> SRR1199028 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199029 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199032 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199033 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199034 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199035 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199036 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199037 2 0.0290 0.9483 0.000 0.992 0.000 0.000 0.008
#> SRR1199038 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199040 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199042 4 0.5773 0.6968 0.000 0.008 0.080 0.568 0.344
#> SRR1199043 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199044 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199045 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199046 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199047 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199048 2 0.4045 0.4570 0.000 0.644 0.000 0.000 0.356
#> SRR1199049 5 0.4242 0.9101 0.000 0.000 0.000 0.428 0.572
#> SRR1199050 1 0.3134 0.8798 0.848 0.000 0.032 0.000 0.120
#> SRR1199051 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199052 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199054 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199056 2 0.3897 0.6742 0.000 0.768 0.028 0.000 0.204
#> SRR1199057 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199059 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199060 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199061 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199062 1 0.3134 0.8798 0.848 0.000 0.032 0.000 0.120
#> SRR1199064 5 0.4650 0.8895 0.000 0.000 0.012 0.468 0.520
#> SRR1199065 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.0404 0.9489 0.000 0.988 0.000 0.000 0.012
#> SRR1199075 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199077 1 0.1485 0.9506 0.948 0.000 0.020 0.000 0.032
#> SRR1199078 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199079 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199080 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 3 0.6418 0.2943 0.000 0.100 0.532 0.028 0.340
#> SRR1199082 4 0.7136 0.6200 0.000 0.112 0.068 0.476 0.344
#> SRR1199083 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199088 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199089 3 0.1544 0.8871 0.000 0.068 0.932 0.000 0.000
#> SRR1199090 2 0.7729 -0.4021 0.000 0.372 0.064 0.220 0.344
#> SRR1199091 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199094 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199096 3 0.7485 -0.3272 0.000 0.044 0.392 0.220 0.344
#> SRR1199097 3 0.3366 0.6464 0.000 0.232 0.768 0.000 0.000
#> SRR1199098 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199099 1 0.2712 0.9082 0.880 0.000 0.032 0.000 0.088
#> SRR1199100 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199101 2 0.0162 0.9517 0.000 0.996 0.000 0.000 0.004
#> SRR1199102 1 0.1893 0.9404 0.928 0.000 0.024 0.000 0.048
#> SRR1199103 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199104 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
#> SRR1199105 4 0.6336 0.6872 0.000 0.008 0.136 0.512 0.344
#> SRR1199106 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199107 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199108 5 0.4294 0.9234 0.000 0.000 0.000 0.468 0.532
#> SRR1199109 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199110 2 0.0290 0.9483 0.000 0.992 0.000 0.000 0.008
#> SRR1199111 2 0.0404 0.9503 0.000 0.988 0.000 0.000 0.012
#> SRR1199112 3 0.1608 0.8913 0.000 0.072 0.928 0.000 0.000
#> SRR1199113 3 0.1282 0.8547 0.000 0.044 0.952 0.004 0.000
#> SRR1199114 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0290 0.9483 0.000 0.992 0.000 0.000 0.008
#> SRR1199117 1 0.2793 0.9054 0.876 0.000 0.036 0.000 0.088
#> SRR1199118 1 0.0000 0.9695 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.9522 0.000 1.000 0.000 0.000 0.000
#> SRR1199120 3 0.1671 0.8945 0.000 0.076 0.924 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199009 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199010 2 0.2325 0.854 0.000 0.892 0.000 0.048 0.060 0.000
#> SRR1199011 1 0.3356 0.832 0.808 0.000 0.000 0.140 0.000 0.052
#> SRR1199012 2 0.2795 0.815 0.000 0.856 0.000 0.044 0.100 0.000
#> SRR1199013 5 0.4174 0.390 0.000 0.352 0.016 0.004 0.628 0.000
#> SRR1199015 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.1176 0.940 0.000 0.024 0.956 0.000 0.020 0.000
#> SRR1199017 1 0.1957 0.890 0.888 0.000 0.000 0.112 0.000 0.000
#> SRR1199018 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0692 0.931 0.976 0.000 0.004 0.020 0.000 0.000
#> SRR1199020 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199021 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199022 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.1610 0.906 0.916 0.000 0.000 0.084 0.000 0.000
#> SRR1199025 1 0.2100 0.888 0.884 0.000 0.004 0.112 0.000 0.000
#> SRR1199026 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.5679 0.000 0.000 0.000 0.000 0.436 0.408 0.156
#> SRR1199028 2 0.2679 0.824 0.000 0.864 0.000 0.040 0.096 0.000
#> SRR1199029 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.1010 0.921 0.000 0.960 0.000 0.036 0.004 0.000
#> SRR1199032 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199033 2 0.0547 0.920 0.000 0.980 0.000 0.020 0.000 0.000
#> SRR1199034 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199035 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199036 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199037 2 0.2499 0.842 0.000 0.880 0.000 0.048 0.072 0.000
#> SRR1199038 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199040 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199042 5 0.4627 -0.774 0.000 0.000 0.020 0.436 0.532 0.012
#> SRR1199043 2 0.0146 0.923 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1199044 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199045 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199046 2 0.0146 0.923 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1199047 2 0.0865 0.909 0.000 0.964 0.000 0.036 0.000 0.000
#> SRR1199048 5 0.4712 0.334 0.000 0.384 0.000 0.052 0.564 0.000
#> SRR1199049 6 0.0632 0.792 0.000 0.000 0.000 0.024 0.000 0.976
#> SRR1199050 1 0.4924 0.637 0.652 0.000 0.000 0.144 0.000 0.204
#> SRR1199051 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199052 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199054 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199056 2 0.5093 -0.222 0.000 0.488 0.016 0.044 0.452 0.000
#> SRR1199057 2 0.0891 0.910 0.000 0.968 0.000 0.008 0.024 0.000
#> SRR1199059 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199060 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199061 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199062 1 0.5046 0.604 0.632 0.000 0.000 0.144 0.000 0.224
#> SRR1199064 6 0.4719 0.610 0.000 0.000 0.036 0.304 0.020 0.640
#> SRR1199065 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.2985 0.813 0.000 0.844 0.000 0.056 0.100 0.000
#> SRR1199075 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199077 1 0.1556 0.907 0.920 0.000 0.000 0.080 0.000 0.000
#> SRR1199078 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199079 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199080 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 5 0.5337 0.325 0.000 0.124 0.292 0.004 0.580 0.000
#> SRR1199082 5 0.0717 0.128 0.000 0.008 0.016 0.000 0.976 0.000
#> SRR1199083 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199088 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199089 3 0.1010 0.959 0.000 0.036 0.960 0.000 0.004 0.000
#> SRR1199090 5 0.3231 0.399 0.000 0.200 0.016 0.000 0.784 0.000
#> SRR1199091 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199094 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199096 5 0.3529 0.274 0.000 0.028 0.208 0.000 0.764 0.000
#> SRR1199097 3 0.4022 0.510 0.000 0.252 0.708 0.040 0.000 0.000
#> SRR1199098 2 0.0458 0.923 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR1199099 1 0.3570 0.817 0.792 0.000 0.000 0.144 0.000 0.064
#> SRR1199100 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199101 2 0.0713 0.923 0.000 0.972 0.000 0.028 0.000 0.000
#> SRR1199102 1 0.1663 0.904 0.912 0.000 0.000 0.088 0.000 0.000
#> SRR1199103 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199104 3 0.0937 0.963 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1199105 5 0.2398 -0.115 0.000 0.000 0.020 0.104 0.876 0.000
#> SRR1199106 2 0.0000 0.923 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199107 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199108 6 0.0000 0.799 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1199109 2 0.1531 0.914 0.000 0.928 0.000 0.068 0.004 0.000
#> SRR1199110 2 0.2812 0.821 0.000 0.856 0.000 0.048 0.096 0.000
#> SRR1199111 2 0.1267 0.917 0.000 0.940 0.000 0.060 0.000 0.000
#> SRR1199112 3 0.1010 0.959 0.000 0.036 0.960 0.000 0.004 0.000
#> SRR1199113 3 0.1176 0.940 0.000 0.024 0.956 0.000 0.020 0.000
#> SRR1199114 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.3419 0.818 0.000 0.812 0.000 0.084 0.104 0.000
#> SRR1199117 1 0.3782 0.810 0.784 0.000 0.004 0.140 0.000 0.072
#> SRR1199118 1 0.0000 0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0146 0.924 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1199120 3 0.0937 0.963 0.000 0.040 0.960 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", "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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) 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 1.000 1.000 1.000 0.4565 0.544 0.544
#> 3 3 1.000 0.959 0.979 0.3592 0.822 0.674
#> 4 4 0.989 0.955 0.985 0.0383 0.986 0.961
#> 5 5 0.968 0.902 0.963 0.0248 0.968 0.911
#> 6 6 0.948 0.883 0.950 0.0143 0.993 0.980
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0 1 0 1
#> SRR1199009 2 0 1 0 1
#> SRR1199010 2 0 1 0 1
#> SRR1199011 1 0 1 1 0
#> SRR1199012 2 0 1 0 1
#> SRR1199013 2 0 1 0 1
#> SRR1199015 1 0 1 1 0
#> SRR1199016 2 0 1 0 1
#> SRR1199017 1 0 1 1 0
#> SRR1199018 1 0 1 1 0
#> SRR1199019 1 0 1 1 0
#> SRR1199020 2 0 1 0 1
#> SRR1199021 2 0 1 0 1
#> SRR1199022 1 0 1 1 0
#> SRR1199023 1 0 1 1 0
#> SRR1199025 1 0 1 1 0
#> SRR1199026 1 0 1 1 0
#> SRR1199027 1 0 1 1 0
#> SRR1199028 2 0 1 0 1
#> SRR1199029 1 0 1 1 0
#> SRR1199031 2 0 1 0 1
#> SRR1199032 2 0 1 0 1
#> SRR1199033 2 0 1 0 1
#> SRR1199034 2 0 1 0 1
#> SRR1199035 2 0 1 0 1
#> SRR1199036 2 0 1 0 1
#> SRR1199037 2 0 1 0 1
#> SRR1199038 2 0 1 0 1
#> SRR1199040 2 0 1 0 1
#> SRR1199042 2 0 1 0 1
#> SRR1199043 2 0 1 0 1
#> SRR1199044 2 0 1 0 1
#> SRR1199045 2 0 1 0 1
#> SRR1199046 2 0 1 0 1
#> SRR1199047 2 0 1 0 1
#> SRR1199048 2 0 1 0 1
#> SRR1199049 1 0 1 1 0
#> SRR1199050 1 0 1 1 0
#> SRR1199051 2 0 1 0 1
#> SRR1199052 2 0 1 0 1
#> SRR1199054 2 0 1 0 1
#> SRR1199056 2 0 1 0 1
#> SRR1199057 2 0 1 0 1
#> SRR1199059 2 0 1 0 1
#> SRR1199060 2 0 1 0 1
#> SRR1199061 2 0 1 0 1
#> SRR1199062 1 0 1 1 0
#> SRR1199064 1 0 1 1 0
#> SRR1199065 1 0 1 1 0
#> SRR1199067 2 0 1 0 1
#> SRR1199075 1 0 1 1 0
#> SRR1199076 2 0 1 0 1
#> SRR1199077 1 0 1 1 0
#> SRR1199078 2 0 1 0 1
#> SRR1199079 2 0 1 0 1
#> SRR1199080 1 0 1 1 0
#> SRR1199081 2 0 1 0 1
#> SRR1199082 2 0 1 0 1
#> SRR1199083 1 0 1 1 0
#> SRR1199084 1 0 1 1 0
#> SRR1199085 1 0 1 1 0
#> SRR1199086 1 0 1 1 0
#> SRR1199087 2 0 1 0 1
#> SRR1199088 2 0 1 0 1
#> SRR1199089 2 0 1 0 1
#> SRR1199090 2 0 1 0 1
#> SRR1199091 1 0 1 1 0
#> SRR1199092 1 0 1 1 0
#> SRR1199093 2 0 1 0 1
#> SRR1199094 1 0 1 1 0
#> SRR1199095 2 0 1 0 1
#> SRR1199096 2 0 1 0 1
#> SRR1199097 2 0 1 0 1
#> SRR1199098 2 0 1 0 1
#> SRR1199099 1 0 1 1 0
#> SRR1199100 2 0 1 0 1
#> SRR1199101 2 0 1 0 1
#> SRR1199102 1 0 1 1 0
#> SRR1199103 2 0 1 0 1
#> SRR1199104 2 0 1 0 1
#> SRR1199105 2 0 1 0 1
#> SRR1199106 2 0 1 0 1
#> SRR1199107 2 0 1 0 1
#> SRR1199108 1 0 1 1 0
#> SRR1199109 2 0 1 0 1
#> SRR1199110 2 0 1 0 1
#> SRR1199111 2 0 1 0 1
#> SRR1199112 2 0 1 0 1
#> SRR1199113 2 0 1 0 1
#> SRR1199114 1 0 1 1 0
#> SRR1199115 1 0 1 1 0
#> SRR1199116 2 0 1 0 1
#> SRR1199117 1 0 1 1 0
#> SRR1199118 1 0 1 1 0
#> SRR1199119 2 0 1 0 1
#> SRR1199120 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199009 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199010 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199011 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199012 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199013 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199015 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199016 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199017 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199027 1 0.1163 0.976 0.972 0.000 0.028
#> SRR1199028 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199034 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199035 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199036 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199037 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199038 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199040 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199042 3 0.6305 0.174 0.000 0.484 0.516
#> SRR1199043 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199044 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199045 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199046 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199048 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199049 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199050 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199051 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199052 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199054 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199056 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199057 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199062 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199064 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199065 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199067 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199075 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199081 3 0.5465 0.650 0.000 0.288 0.712
#> SRR1199082 2 0.0747 0.982 0.000 0.984 0.016
#> SRR1199083 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199088 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199089 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199090 2 0.0592 0.986 0.000 0.988 0.012
#> SRR1199091 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199096 3 0.1031 0.897 0.000 0.024 0.976
#> SRR1199097 3 0.5678 0.604 0.000 0.316 0.684
#> SRR1199098 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199099 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199100 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199102 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199103 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199104 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199105 3 0.6309 0.147 0.000 0.496 0.504
#> SRR1199106 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199107 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199108 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199109 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199110 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199111 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199112 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199113 3 0.1163 0.901 0.000 0.028 0.972
#> SRR1199114 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199117 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.999 1.000 0.000 0.000
#> SRR1199119 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1199120 3 0.1163 0.901 0.000 0.028 0.972
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199009 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199013 2 0.0524 0.981 0.000 0.988 0.008 0.004
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199021 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.1474 0.847 0.052 0.000 0.000 0.948
#> SRR1199028 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199034 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199035 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199036 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199037 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199038 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199040 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199042 4 0.0000 0.856 0.000 0.000 0.000 1.000
#> SRR1199043 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199044 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199045 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199046 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199047 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199049 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199054 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.0469 0.980 0.000 0.988 0.012 0.000
#> SRR1199057 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199059 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199064 1 0.0188 0.996 0.996 0.000 0.000 0.004
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199081 3 0.4564 0.329 0.000 0.328 0.672 0.000
#> SRR1199082 2 0.3801 0.714 0.000 0.780 0.000 0.220
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199089 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199090 2 0.2530 0.881 0.000 0.896 0.004 0.100
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199096 3 0.1356 0.863 0.000 0.008 0.960 0.032
#> SRR1199097 3 0.4907 0.187 0.000 0.420 0.580 0.000
#> SRR1199098 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199105 4 0.4829 0.740 0.000 0.068 0.156 0.776
#> SRR1199106 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199108 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199109 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199111 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199113 3 0.0000 0.899 0.000 0.000 1.000 0.000
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0000 0.992 0.000 1.000 0.000 0.000
#> SRR1199120 3 0.0000 0.899 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199009 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199010 2 0.0162 0.963 0.000 0.996 0.000 0.000 0.004
#> SRR1199011 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.1300 0.918 0.000 0.956 0.028 0.000 0.016
#> SRR1199013 2 0.3086 0.665 0.000 0.816 0.004 0.000 0.180
#> SRR1199015 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.0162 0.927 0.000 0.000 0.996 0.000 0.004
#> SRR1199017 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199021 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199022 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.0000 0.727 0.000 0.000 0.000 1.000 0.000
#> SRR1199028 2 0.0290 0.962 0.000 0.992 0.000 0.000 0.008
#> SRR1199029 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199032 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199033 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199034 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199035 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199036 2 0.0290 0.962 0.000 0.992 0.000 0.000 0.008
#> SRR1199037 2 0.0290 0.960 0.000 0.992 0.000 0.000 0.008
#> SRR1199038 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199040 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199042 4 0.4201 0.701 0.000 0.000 0.000 0.592 0.408
#> SRR1199043 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199044 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199045 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199046 2 0.0290 0.962 0.000 0.992 0.000 0.000 0.008
#> SRR1199047 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199048 2 0.2179 0.812 0.000 0.888 0.000 0.000 0.112
#> SRR1199049 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199050 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0290 0.962 0.000 0.992 0.000 0.000 0.008
#> SRR1199052 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199054 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199056 2 0.2291 0.846 0.000 0.908 0.036 0.000 0.056
#> SRR1199057 2 0.0290 0.962 0.000 0.992 0.000 0.000 0.008
#> SRR1199059 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199060 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199061 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199062 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199064 1 0.4203 0.696 0.760 0.000 0.000 0.188 0.052
#> SRR1199065 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.0290 0.962 0.000 0.992 0.000 0.000 0.008
#> SRR1199075 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199077 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199079 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199080 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 3 0.6319 0.033 0.000 0.272 0.524 0.000 0.204
#> SRR1199082 5 0.4808 0.487 0.000 0.400 0.000 0.024 0.576
#> SRR1199083 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199088 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199089 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199090 5 0.4278 0.485 0.000 0.452 0.000 0.000 0.548
#> SRR1199091 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199094 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199096 3 0.4669 0.577 0.000 0.012 0.692 0.024 0.272
#> SRR1199097 2 0.4440 -0.172 0.000 0.528 0.468 0.000 0.004
#> SRR1199098 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199099 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199101 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199102 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199104 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199105 5 0.2424 -0.510 0.000 0.008 0.032 0.052 0.908
#> SRR1199106 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199107 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199108 1 0.0880 0.961 0.968 0.000 0.000 0.032 0.000
#> SRR1199109 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199110 2 0.0609 0.950 0.000 0.980 0.000 0.000 0.020
#> SRR1199111 2 0.0000 0.965 0.000 1.000 0.000 0.000 0.000
#> SRR1199112 3 0.0000 0.930 0.000 0.000 1.000 0.000 0.000
#> SRR1199113 3 0.0162 0.927 0.000 0.000 0.996 0.000 0.004
#> SRR1199114 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.0162 0.963 0.000 0.996 0.000 0.000 0.004
#> SRR1199117 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.991 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0162 0.964 0.000 0.996 0.000 0.000 0.004
#> SRR1199120 3 0.0000 0.930 0.000 0.000 1.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
#> SRR1199002 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199009 2 0.0000 0.9515 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199010 2 0.0713 0.9431 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR1199011 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199012 2 0.1624 0.9038 0.000 0.936 0.012 0.000 0.008 0.044
#> SRR1199013 2 0.3935 0.6400 0.000 0.784 0.004 0.004 0.112 0.096
#> SRR1199015 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.0777 0.9049 0.000 0.000 0.972 0.000 0.004 0.024
#> SRR1199017 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199020 2 0.0260 0.9502 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1199021 2 0.0363 0.9495 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199022 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.0146 0.6324 0.000 0.000 0.000 0.996 0.004 0.000
#> SRR1199028 2 0.0622 0.9457 0.000 0.980 0.000 0.000 0.008 0.012
#> SRR1199029 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0146 0.9515 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199032 2 0.0458 0.9514 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199033 2 0.0363 0.9512 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199034 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199035 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199036 2 0.0146 0.9509 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199037 2 0.0914 0.9375 0.000 0.968 0.000 0.000 0.016 0.016
#> SRR1199038 2 0.0000 0.9515 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199040 2 0.0260 0.9517 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1199042 4 0.5452 0.5969 0.000 0.000 0.000 0.440 0.440 0.120
#> SRR1199043 2 0.0146 0.9509 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199044 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199045 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199046 2 0.0363 0.9491 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199047 2 0.0260 0.9518 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1199048 2 0.2888 0.7738 0.000 0.852 0.000 0.000 0.092 0.056
#> SRR1199049 1 0.0363 0.9785 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1199050 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199051 2 0.0146 0.9509 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199052 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199054 2 0.0146 0.9509 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199056 2 0.3019 0.7897 0.000 0.860 0.036 0.000 0.024 0.080
#> SRR1199057 2 0.0547 0.9482 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1199059 2 0.0363 0.9504 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199060 2 0.0260 0.9514 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1199061 2 0.0363 0.9504 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199062 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199064 6 0.5159 0.0000 0.380 0.000 0.000 0.092 0.000 0.528
#> SRR1199065 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.1542 0.9025 0.000 0.936 0.004 0.000 0.008 0.052
#> SRR1199075 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0458 0.9499 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199077 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199078 2 0.0458 0.9499 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199079 2 0.0458 0.9499 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199080 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199081 3 0.6751 0.0466 0.000 0.240 0.504 0.000 0.152 0.104
#> SRR1199082 5 0.5638 0.4495 0.000 0.368 0.000 0.004 0.492 0.136
#> SRR1199083 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199087 2 0.0458 0.9499 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199088 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199089 3 0.0146 0.9206 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1199090 5 0.5428 0.4551 0.000 0.396 0.000 0.000 0.484 0.120
#> SRR1199091 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0458 0.9510 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199094 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0458 0.9499 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199096 3 0.5681 0.4190 0.000 0.004 0.588 0.012 0.152 0.244
#> SRR1199097 2 0.4389 -0.1766 0.000 0.512 0.468 0.000 0.004 0.016
#> SRR1199098 2 0.0146 0.9520 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199099 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199100 2 0.0458 0.9499 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199101 2 0.0547 0.9505 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1199102 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199103 2 0.0146 0.9515 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199104 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199105 5 0.0837 -0.4877 0.000 0.000 0.020 0.004 0.972 0.004
#> SRR1199106 2 0.0000 0.9515 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1199107 2 0.0363 0.9504 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1199108 1 0.1498 0.8959 0.940 0.000 0.000 0.028 0.000 0.032
#> SRR1199109 2 0.0458 0.9499 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1199110 2 0.1196 0.9210 0.000 0.952 0.000 0.000 0.008 0.040
#> SRR1199111 2 0.0260 0.9517 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1199112 3 0.0000 0.9227 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1199113 3 0.0508 0.9143 0.000 0.000 0.984 0.000 0.004 0.012
#> SRR1199114 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.1124 0.9281 0.000 0.956 0.000 0.000 0.008 0.036
#> SRR1199117 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.9962 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.0146 0.9509 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1199120 3 0.0000 0.9227 0.000 0.000 1.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["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'ATC' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.999 0.999 0.4493 0.551 0.551
#> 3 3 0.794 0.926 0.940 0.3420 0.825 0.682
#> 4 4 0.923 0.921 0.957 0.0436 0.993 0.982
#> 5 5 0.950 0.906 0.972 0.0485 0.979 0.944
#> 6 6 0.958 0.924 0.972 0.0127 0.993 0.980
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.000 1.000 0.000 1.000
#> SRR1199009 2 0.000 1.000 0.000 1.000
#> SRR1199010 2 0.000 1.000 0.000 1.000
#> SRR1199011 1 0.000 0.998 1.000 0.000
#> SRR1199012 2 0.000 1.000 0.000 1.000
#> SRR1199013 2 0.000 1.000 0.000 1.000
#> SRR1199015 1 0.000 0.998 1.000 0.000
#> SRR1199016 2 0.000 1.000 0.000 1.000
#> SRR1199017 1 0.000 0.998 1.000 0.000
#> SRR1199018 1 0.000 0.998 1.000 0.000
#> SRR1199019 1 0.000 0.998 1.000 0.000
#> SRR1199020 2 0.000 1.000 0.000 1.000
#> SRR1199021 2 0.000 1.000 0.000 1.000
#> SRR1199022 1 0.000 0.998 1.000 0.000
#> SRR1199023 1 0.000 0.998 1.000 0.000
#> SRR1199025 1 0.000 0.998 1.000 0.000
#> SRR1199026 1 0.000 0.998 1.000 0.000
#> SRR1199027 2 0.000 1.000 0.000 1.000
#> SRR1199028 2 0.000 1.000 0.000 1.000
#> SRR1199029 1 0.000 0.998 1.000 0.000
#> SRR1199031 2 0.000 1.000 0.000 1.000
#> SRR1199032 2 0.000 1.000 0.000 1.000
#> SRR1199033 2 0.000 1.000 0.000 1.000
#> SRR1199034 2 0.000 1.000 0.000 1.000
#> SRR1199035 2 0.000 1.000 0.000 1.000
#> SRR1199036 2 0.000 1.000 0.000 1.000
#> SRR1199037 2 0.000 1.000 0.000 1.000
#> SRR1199038 2 0.000 1.000 0.000 1.000
#> SRR1199040 2 0.000 1.000 0.000 1.000
#> SRR1199042 2 0.000 1.000 0.000 1.000
#> SRR1199043 2 0.000 1.000 0.000 1.000
#> SRR1199044 2 0.000 1.000 0.000 1.000
#> SRR1199045 2 0.000 1.000 0.000 1.000
#> SRR1199046 2 0.000 1.000 0.000 1.000
#> SRR1199047 2 0.000 1.000 0.000 1.000
#> SRR1199048 2 0.000 1.000 0.000 1.000
#> SRR1199049 1 0.000 0.998 1.000 0.000
#> SRR1199050 1 0.000 0.998 1.000 0.000
#> SRR1199051 2 0.000 1.000 0.000 1.000
#> SRR1199052 2 0.000 1.000 0.000 1.000
#> SRR1199054 2 0.000 1.000 0.000 1.000
#> SRR1199056 2 0.000 1.000 0.000 1.000
#> SRR1199057 2 0.000 1.000 0.000 1.000
#> SRR1199059 2 0.000 1.000 0.000 1.000
#> SRR1199060 2 0.000 1.000 0.000 1.000
#> SRR1199061 2 0.000 1.000 0.000 1.000
#> SRR1199062 1 0.000 0.998 1.000 0.000
#> SRR1199064 1 0.311 0.941 0.944 0.056
#> SRR1199065 1 0.000 0.998 1.000 0.000
#> SRR1199067 2 0.000 1.000 0.000 1.000
#> SRR1199075 1 0.000 0.998 1.000 0.000
#> SRR1199076 2 0.000 1.000 0.000 1.000
#> SRR1199077 1 0.000 0.998 1.000 0.000
#> SRR1199078 2 0.000 1.000 0.000 1.000
#> SRR1199079 2 0.000 1.000 0.000 1.000
#> SRR1199080 1 0.000 0.998 1.000 0.000
#> SRR1199081 2 0.000 1.000 0.000 1.000
#> SRR1199082 2 0.000 1.000 0.000 1.000
#> SRR1199083 1 0.000 0.998 1.000 0.000
#> SRR1199084 1 0.000 0.998 1.000 0.000
#> SRR1199085 1 0.000 0.998 1.000 0.000
#> SRR1199086 1 0.000 0.998 1.000 0.000
#> SRR1199087 2 0.000 1.000 0.000 1.000
#> SRR1199088 2 0.000 1.000 0.000 1.000
#> SRR1199089 2 0.000 1.000 0.000 1.000
#> SRR1199090 2 0.000 1.000 0.000 1.000
#> SRR1199091 1 0.000 0.998 1.000 0.000
#> SRR1199092 1 0.000 0.998 1.000 0.000
#> SRR1199093 2 0.000 1.000 0.000 1.000
#> SRR1199094 1 0.000 0.998 1.000 0.000
#> SRR1199095 2 0.000 1.000 0.000 1.000
#> SRR1199096 2 0.000 1.000 0.000 1.000
#> SRR1199097 2 0.000 1.000 0.000 1.000
#> SRR1199098 2 0.000 1.000 0.000 1.000
#> SRR1199099 1 0.000 0.998 1.000 0.000
#> SRR1199100 2 0.000 1.000 0.000 1.000
#> SRR1199101 2 0.000 1.000 0.000 1.000
#> SRR1199102 1 0.000 0.998 1.000 0.000
#> SRR1199103 2 0.000 1.000 0.000 1.000
#> SRR1199104 2 0.000 1.000 0.000 1.000
#> SRR1199105 2 0.000 1.000 0.000 1.000
#> SRR1199106 2 0.000 1.000 0.000 1.000
#> SRR1199107 2 0.000 1.000 0.000 1.000
#> SRR1199108 1 0.000 0.998 1.000 0.000
#> SRR1199109 2 0.000 1.000 0.000 1.000
#> SRR1199110 2 0.000 1.000 0.000 1.000
#> SRR1199111 2 0.000 1.000 0.000 1.000
#> SRR1199112 2 0.000 1.000 0.000 1.000
#> SRR1199113 2 0.000 1.000 0.000 1.000
#> SRR1199114 1 0.000 0.998 1.000 0.000
#> SRR1199115 1 0.000 0.998 1.000 0.000
#> SRR1199116 2 0.000 1.000 0.000 1.000
#> SRR1199117 1 0.000 0.998 1.000 0.000
#> SRR1199118 1 0.000 0.998 1.000 0.000
#> SRR1199119 2 0.000 1.000 0.000 1.000
#> SRR1199120 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
#> SRR1199002 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199009 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199010 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199011 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199012 2 0.480 0.6233 0.00 0.780 0.220
#> SRR1199013 2 0.604 0.1698 0.00 0.620 0.380
#> SRR1199015 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199016 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199017 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199018 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199019 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199020 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199021 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199022 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199023 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199025 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199026 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199027 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199028 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199029 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199031 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199032 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199033 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199034 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199035 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199036 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199037 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199038 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199040 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199042 2 0.604 0.1703 0.00 0.620 0.380
#> SRR1199043 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199044 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199045 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199046 2 0.355 0.7805 0.00 0.868 0.132
#> SRR1199047 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199048 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199049 1 0.334 0.9037 0.88 0.000 0.120
#> SRR1199050 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199051 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199052 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199054 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199056 2 0.606 0.1525 0.00 0.616 0.384
#> SRR1199057 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199059 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199060 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199061 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199062 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199064 1 0.455 0.8362 0.80 0.000 0.200
#> SRR1199065 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199067 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199075 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199076 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199077 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199078 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199079 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199080 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199081 3 0.493 0.9554 0.00 0.232 0.768
#> SRR1199082 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199083 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199084 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199085 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199086 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199087 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199088 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199089 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199090 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199091 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199092 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199093 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199094 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199095 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199096 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199097 3 0.470 0.9826 0.00 0.212 0.788
#> SRR1199098 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199099 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199100 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199101 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199102 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199103 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199104 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199105 2 0.620 -0.0267 0.00 0.576 0.424
#> SRR1199106 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199107 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199108 1 0.334 0.9037 0.88 0.000 0.120
#> SRR1199109 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199110 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199111 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199112 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199113 3 0.455 0.9962 0.00 0.200 0.800
#> SRR1199114 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199115 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199116 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199117 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199118 1 0.000 0.9890 1.00 0.000 0.000
#> SRR1199119 2 0.000 0.9463 0.00 1.000 0.000
#> SRR1199120 3 0.455 0.9962 0.00 0.200 0.800
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199009 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199010 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199011 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199012 2 0.4086 0.685 0.000 0.776 0.216 0.008
#> SRR1199013 2 0.5085 0.342 0.000 0.616 0.376 0.008
#> SRR1199015 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199016 3 0.2334 0.982 0.000 0.088 0.908 0.004
#> SRR1199017 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199021 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199022 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199027 3 0.4621 0.865 0.000 0.128 0.796 0.076
#> SRR1199028 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199029 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199032 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199033 2 0.0188 0.947 0.000 0.996 0.000 0.004
#> SRR1199034 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199035 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199036 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199037 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199038 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199040 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199042 2 0.5352 0.290 0.000 0.596 0.388 0.016
#> SRR1199043 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199044 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199045 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199046 2 0.3142 0.808 0.000 0.860 0.132 0.008
#> SRR1199047 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199048 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199049 1 0.3894 0.823 0.844 0.000 0.088 0.068
#> SRR1199050 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199051 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199052 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199054 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199056 2 0.5085 0.342 0.000 0.616 0.376 0.008
#> SRR1199057 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199059 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199060 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199061 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199062 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199064 4 0.0336 0.000 0.008 0.000 0.000 0.992
#> SRR1199065 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199075 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199077 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199079 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199080 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199081 3 0.2976 0.934 0.000 0.120 0.872 0.008
#> SRR1199082 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199083 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199088 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199089 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199090 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199091 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199094 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199096 3 0.2480 0.979 0.000 0.088 0.904 0.008
#> SRR1199097 3 0.2675 0.965 0.000 0.100 0.892 0.008
#> SRR1199098 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199099 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199100 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199101 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199102 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199103 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199104 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199105 2 0.5203 0.218 0.000 0.576 0.416 0.008
#> SRR1199106 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199107 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199108 1 0.4036 0.813 0.836 0.000 0.088 0.076
#> SRR1199109 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199110 2 0.0336 0.946 0.000 0.992 0.000 0.008
#> SRR1199111 2 0.0000 0.948 0.000 1.000 0.000 0.000
#> SRR1199112 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199113 3 0.2149 0.985 0.000 0.088 0.912 0.000
#> SRR1199114 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.0188 0.947 0.000 0.996 0.000 0.004
#> SRR1199117 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199118 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.0188 0.947 0.000 0.996 0.000 0.004
#> SRR1199120 3 0.2149 0.985 0.000 0.088 0.912 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199009 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199010 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199011 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199012 2 0.3821 0.654 0.000 0.764 0.216 0.020 0
#> SRR1199013 2 0.4639 0.360 0.000 0.612 0.368 0.020 0
#> SRR1199015 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199016 3 0.0510 0.974 0.000 0.000 0.984 0.016 0
#> SRR1199017 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199018 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199019 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199020 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199021 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199022 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199023 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199025 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199026 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199027 4 0.0579 0.367 0.000 0.008 0.008 0.984 0
#> SRR1199028 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199029 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199031 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199032 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199033 2 0.0510 0.945 0.000 0.984 0.000 0.016 0
#> SRR1199034 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199035 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199036 2 0.0404 0.946 0.000 0.988 0.000 0.012 0
#> SRR1199037 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199038 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199040 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199042 4 0.4419 0.195 0.000 0.312 0.020 0.668 0
#> SRR1199043 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199044 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199045 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199046 2 0.3016 0.787 0.000 0.848 0.132 0.020 0
#> SRR1199047 2 0.0290 0.947 0.000 0.992 0.000 0.008 0
#> SRR1199048 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199049 1 0.3949 0.518 0.668 0.000 0.000 0.332 0
#> SRR1199050 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199051 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199052 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199054 2 0.0404 0.946 0.000 0.988 0.000 0.012 0
#> SRR1199056 2 0.4639 0.359 0.000 0.612 0.368 0.020 0
#> SRR1199057 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199059 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199060 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199061 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199062 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199064 5 0.0000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1199065 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199067 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199075 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199076 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199077 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199078 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199079 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199080 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199081 3 0.1725 0.896 0.000 0.044 0.936 0.020 0
#> SRR1199082 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199083 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199084 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199085 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199086 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199087 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199088 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199089 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199090 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199091 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199092 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199093 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199094 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199095 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199096 3 0.0510 0.974 0.000 0.000 0.984 0.016 0
#> SRR1199097 3 0.0898 0.960 0.000 0.008 0.972 0.020 0
#> SRR1199098 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199099 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199100 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199101 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199102 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199103 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199104 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199105 2 0.4736 0.279 0.000 0.576 0.404 0.020 0
#> SRR1199106 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199107 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199108 4 0.0703 0.331 0.024 0.000 0.000 0.976 0
#> SRR1199109 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199110 2 0.0609 0.944 0.000 0.980 0.000 0.020 0
#> SRR1199111 2 0.0000 0.948 0.000 1.000 0.000 0.000 0
#> SRR1199112 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199113 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
#> SRR1199114 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199115 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199116 2 0.0404 0.946 0.000 0.988 0.000 0.012 0
#> SRR1199117 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199118 1 0.0000 0.988 1.000 0.000 0.000 0.000 0
#> SRR1199119 2 0.0404 0.946 0.000 0.988 0.000 0.012 0
#> SRR1199120 3 0.0000 0.987 0.000 0.000 1.000 0.000 0
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199009 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199010 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199011 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199012 2 0.3699 0.696 0.000 0.752 0.212 0.036 0.000 0
#> SRR1199013 2 0.4420 0.446 0.000 0.604 0.360 0.036 0.000 0
#> SRR1199015 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199016 3 0.0790 0.955 0.000 0.000 0.968 0.032 0.000 0
#> SRR1199017 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199018 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199019 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199020 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199021 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199022 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199023 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199025 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199026 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199027 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0
#> SRR1199028 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199029 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199031 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199032 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199033 2 0.0713 0.944 0.000 0.972 0.000 0.028 0.000 0
#> SRR1199034 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199035 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199036 2 0.0713 0.944 0.000 0.972 0.000 0.028 0.000 0
#> SRR1199037 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199038 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199040 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199042 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0
#> SRR1199043 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199044 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199045 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199046 2 0.3014 0.806 0.000 0.832 0.132 0.036 0.000 0
#> SRR1199047 2 0.0458 0.946 0.000 0.984 0.000 0.016 0.000 0
#> SRR1199048 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199049 4 0.2912 0.396 0.216 0.000 0.000 0.784 0.000 0
#> SRR1199050 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199051 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199052 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199054 2 0.0547 0.946 0.000 0.980 0.000 0.020 0.000 0
#> SRR1199056 2 0.4396 0.460 0.000 0.612 0.352 0.036 0.000 0
#> SRR1199057 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199059 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199060 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199061 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199062 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199064 6 0.0000 0.000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1199065 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199067 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199075 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199076 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199077 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199078 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199079 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199080 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199081 3 0.1863 0.879 0.000 0.044 0.920 0.036 0.000 0
#> SRR1199082 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199083 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199084 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199085 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199086 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199087 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199088 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199089 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199090 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199091 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199092 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199093 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199094 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199095 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199096 3 0.0790 0.955 0.000 0.000 0.968 0.032 0.000 0
#> SRR1199097 3 0.1124 0.941 0.000 0.008 0.956 0.036 0.000 0
#> SRR1199098 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199099 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199100 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199101 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199102 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199103 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199104 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199105 2 0.5082 0.367 0.000 0.564 0.372 0.036 0.028 0
#> SRR1199106 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199107 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199108 4 0.0865 0.256 0.000 0.000 0.000 0.964 0.036 0
#> SRR1199109 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199110 2 0.0865 0.941 0.000 0.964 0.000 0.036 0.000 0
#> SRR1199111 2 0.0000 0.948 0.000 1.000 0.000 0.000 0.000 0
#> SRR1199112 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199113 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
#> SRR1199114 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199115 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199116 2 0.0547 0.946 0.000 0.980 0.000 0.020 0.000 0
#> SRR1199117 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199118 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0
#> SRR1199119 2 0.0632 0.945 0.000 0.976 0.000 0.024 0.000 0
#> SRR1199120 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.973 0.989 0.4577 0.538 0.538
#> 3 3 0.764 0.791 0.911 0.2522 0.926 0.863
#> 4 4 0.680 0.692 0.840 0.1175 0.875 0.742
#> 5 5 0.612 0.494 0.738 0.1359 0.822 0.547
#> 6 6 0.601 0.323 0.691 0.0466 0.927 0.726
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.0000 0.997 0.000 1.000
#> SRR1199009 2 0.0000 0.997 0.000 1.000
#> SRR1199010 2 0.0000 0.997 0.000 1.000
#> SRR1199011 1 0.0000 0.972 1.000 0.000
#> SRR1199012 2 0.0000 0.997 0.000 1.000
#> SRR1199013 2 0.0000 0.997 0.000 1.000
#> SRR1199015 1 0.0000 0.972 1.000 0.000
#> SRR1199016 2 0.0000 0.997 0.000 1.000
#> SRR1199017 1 0.0000 0.972 1.000 0.000
#> SRR1199018 1 0.0000 0.972 1.000 0.000
#> SRR1199019 1 0.0000 0.972 1.000 0.000
#> SRR1199020 2 0.0000 0.997 0.000 1.000
#> SRR1199021 2 0.0000 0.997 0.000 1.000
#> SRR1199022 1 0.0000 0.972 1.000 0.000
#> SRR1199023 1 0.0000 0.972 1.000 0.000
#> SRR1199025 1 0.0000 0.972 1.000 0.000
#> SRR1199026 1 0.0000 0.972 1.000 0.000
#> SRR1199027 1 0.9209 0.519 0.664 0.336
#> SRR1199028 2 0.0000 0.997 0.000 1.000
#> SRR1199029 1 0.0000 0.972 1.000 0.000
#> SRR1199031 2 0.0000 0.997 0.000 1.000
#> SRR1199032 2 0.0000 0.997 0.000 1.000
#> SRR1199033 2 0.0000 0.997 0.000 1.000
#> SRR1199034 2 0.0000 0.997 0.000 1.000
#> SRR1199035 2 0.0000 0.997 0.000 1.000
#> SRR1199036 2 0.0000 0.997 0.000 1.000
#> SRR1199037 2 0.0000 0.997 0.000 1.000
#> SRR1199038 2 0.0000 0.997 0.000 1.000
#> SRR1199040 2 0.0000 0.997 0.000 1.000
#> SRR1199042 1 0.9286 0.501 0.656 0.344
#> SRR1199043 2 0.0000 0.997 0.000 1.000
#> SRR1199044 2 0.0000 0.997 0.000 1.000
#> SRR1199045 2 0.0000 0.997 0.000 1.000
#> SRR1199046 2 0.0000 0.997 0.000 1.000
#> SRR1199047 2 0.0000 0.997 0.000 1.000
#> SRR1199048 2 0.0000 0.997 0.000 1.000
#> SRR1199049 1 0.0000 0.972 1.000 0.000
#> SRR1199050 1 0.0000 0.972 1.000 0.000
#> SRR1199051 2 0.0000 0.997 0.000 1.000
#> SRR1199052 2 0.0000 0.997 0.000 1.000
#> SRR1199054 2 0.0000 0.997 0.000 1.000
#> SRR1199056 2 0.0000 0.997 0.000 1.000
#> SRR1199057 2 0.0000 0.997 0.000 1.000
#> SRR1199059 2 0.0000 0.997 0.000 1.000
#> SRR1199060 2 0.0000 0.997 0.000 1.000
#> SRR1199061 2 0.0000 0.997 0.000 1.000
#> SRR1199062 1 0.0000 0.972 1.000 0.000
#> SRR1199064 1 0.7453 0.736 0.788 0.212
#> SRR1199065 1 0.0000 0.972 1.000 0.000
#> SRR1199067 2 0.0000 0.997 0.000 1.000
#> SRR1199075 1 0.0000 0.972 1.000 0.000
#> SRR1199076 2 0.0000 0.997 0.000 1.000
#> SRR1199077 1 0.0000 0.972 1.000 0.000
#> SRR1199078 2 0.0000 0.997 0.000 1.000
#> SRR1199079 2 0.0000 0.997 0.000 1.000
#> SRR1199080 1 0.0000 0.972 1.000 0.000
#> SRR1199081 2 0.0000 0.997 0.000 1.000
#> SRR1199082 2 0.0672 0.989 0.008 0.992
#> SRR1199083 1 0.0000 0.972 1.000 0.000
#> SRR1199084 1 0.0000 0.972 1.000 0.000
#> SRR1199085 1 0.0000 0.972 1.000 0.000
#> SRR1199086 1 0.0000 0.972 1.000 0.000
#> SRR1199087 2 0.0000 0.997 0.000 1.000
#> SRR1199088 2 0.0000 0.997 0.000 1.000
#> SRR1199089 2 0.0000 0.997 0.000 1.000
#> SRR1199090 2 0.0000 0.997 0.000 1.000
#> SRR1199091 1 0.0000 0.972 1.000 0.000
#> SRR1199092 1 0.0000 0.972 1.000 0.000
#> SRR1199093 2 0.0000 0.997 0.000 1.000
#> SRR1199094 1 0.0000 0.972 1.000 0.000
#> SRR1199095 2 0.0000 0.997 0.000 1.000
#> SRR1199096 2 0.0376 0.993 0.004 0.996
#> SRR1199097 2 0.0000 0.997 0.000 1.000
#> SRR1199098 2 0.0000 0.997 0.000 1.000
#> SRR1199099 1 0.0000 0.972 1.000 0.000
#> SRR1199100 2 0.0000 0.997 0.000 1.000
#> SRR1199101 2 0.0000 0.997 0.000 1.000
#> SRR1199102 1 0.0000 0.972 1.000 0.000
#> SRR1199103 2 0.0000 0.997 0.000 1.000
#> SRR1199104 2 0.0000 0.997 0.000 1.000
#> SRR1199105 2 0.6531 0.789 0.168 0.832
#> SRR1199106 2 0.0000 0.997 0.000 1.000
#> SRR1199107 2 0.0000 0.997 0.000 1.000
#> SRR1199108 1 0.1843 0.948 0.972 0.028
#> SRR1199109 2 0.0000 0.997 0.000 1.000
#> SRR1199110 2 0.0000 0.997 0.000 1.000
#> SRR1199111 2 0.0000 0.997 0.000 1.000
#> SRR1199112 2 0.0000 0.997 0.000 1.000
#> SRR1199113 2 0.0000 0.997 0.000 1.000
#> SRR1199114 1 0.0000 0.972 1.000 0.000
#> SRR1199115 1 0.0000 0.972 1.000 0.000
#> SRR1199116 2 0.0000 0.997 0.000 1.000
#> SRR1199117 1 0.0000 0.972 1.000 0.000
#> SRR1199118 1 0.0000 0.972 1.000 0.000
#> SRR1199119 2 0.0000 0.997 0.000 1.000
#> SRR1199120 2 0.0000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199009 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199010 2 0.0747 0.839 0.000 0.984 0.016
#> SRR1199011 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199012 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199013 2 0.6062 0.467 0.000 0.616 0.384
#> SRR1199015 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199016 2 0.6026 0.477 0.000 0.624 0.376
#> SRR1199017 1 0.0747 0.974 0.984 0.000 0.016
#> SRR1199018 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199020 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199021 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199022 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199025 1 0.0592 0.976 0.988 0.000 0.012
#> SRR1199026 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199027 3 0.0237 0.800 0.004 0.000 0.996
#> SRR1199028 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199029 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199031 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199032 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199033 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199034 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199035 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199036 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199037 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199038 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199040 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199042 3 0.0848 0.803 0.008 0.008 0.984
#> SRR1199043 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199044 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199045 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199046 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199047 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199048 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199049 3 0.4452 0.666 0.192 0.000 0.808
#> SRR1199050 1 0.3482 0.869 0.872 0.000 0.128
#> SRR1199051 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199052 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199054 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199056 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199057 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199059 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199060 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199061 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199062 1 0.4062 0.828 0.836 0.000 0.164
#> SRR1199064 3 0.0747 0.798 0.016 0.000 0.984
#> SRR1199065 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199067 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199075 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199076 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199077 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199078 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199079 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199080 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199081 2 0.5497 0.586 0.000 0.708 0.292
#> SRR1199082 3 0.5098 0.538 0.000 0.248 0.752
#> SRR1199083 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199087 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199088 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199089 2 0.6026 0.477 0.000 0.624 0.376
#> SRR1199090 3 0.6309 -0.261 0.000 0.500 0.500
#> SRR1199091 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199093 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199094 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199095 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199096 2 0.6267 0.305 0.000 0.548 0.452
#> SRR1199097 2 0.5706 0.552 0.000 0.680 0.320
#> SRR1199098 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199099 1 0.1163 0.963 0.972 0.000 0.028
#> SRR1199100 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199101 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199102 1 0.0237 0.982 0.996 0.000 0.004
#> SRR1199103 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199104 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199105 3 0.0424 0.802 0.000 0.008 0.992
#> SRR1199106 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199107 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199108 3 0.3879 0.720 0.152 0.000 0.848
#> SRR1199109 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199110 2 0.6111 0.446 0.000 0.604 0.396
#> SRR1199111 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199112 2 0.6111 0.444 0.000 0.604 0.396
#> SRR1199113 2 0.6026 0.477 0.000 0.624 0.376
#> SRR1199114 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199116 2 0.0000 0.847 0.000 1.000 0.000
#> SRR1199117 1 0.2959 0.898 0.900 0.000 0.100
#> SRR1199118 1 0.0000 0.984 1.000 0.000 0.000
#> SRR1199119 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1199120 2 0.6111 0.444 0.000 0.604 0.396
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 3 0.4843 0.7199 0.000 0.396 0.604 0.000
#> SRR1199009 2 0.1743 0.8102 0.000 0.940 0.056 0.004
#> SRR1199010 2 0.5325 0.6353 0.000 0.728 0.204 0.068
#> SRR1199011 1 0.1022 0.9289 0.968 0.000 0.000 0.032
#> SRR1199012 2 0.2011 0.7759 0.000 0.920 0.080 0.000
#> SRR1199013 2 0.7385 0.0242 0.000 0.484 0.340 0.176
#> SRR1199015 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199016 2 0.7002 -0.0781 0.000 0.520 0.352 0.128
#> SRR1199017 1 0.0188 0.9418 0.996 0.000 0.000 0.004
#> SRR1199018 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.0895 0.8154 0.000 0.976 0.020 0.004
#> SRR1199021 2 0.0657 0.8145 0.000 0.984 0.012 0.004
#> SRR1199022 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.1022 0.9289 0.968 0.000 0.000 0.032
#> SRR1199025 1 0.1474 0.9141 0.948 0.000 0.000 0.052
#> SRR1199026 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199027 4 0.5204 0.5825 0.000 0.012 0.376 0.612
#> SRR1199028 2 0.1637 0.7959 0.000 0.940 0.060 0.000
#> SRR1199029 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199032 2 0.0921 0.8064 0.000 0.972 0.028 0.000
#> SRR1199033 2 0.0921 0.8102 0.000 0.972 0.028 0.000
#> SRR1199034 3 0.4830 0.7263 0.000 0.392 0.608 0.000
#> SRR1199035 3 0.4830 0.7263 0.000 0.392 0.608 0.000
#> SRR1199036 2 0.1661 0.8090 0.000 0.944 0.052 0.004
#> SRR1199037 2 0.3813 0.7488 0.000 0.828 0.148 0.024
#> SRR1199038 2 0.2918 0.7699 0.000 0.876 0.116 0.008
#> SRR1199040 2 0.1489 0.8118 0.000 0.952 0.044 0.004
#> SRR1199042 4 0.6007 0.5123 0.000 0.044 0.408 0.548
#> SRR1199043 2 0.2799 0.7780 0.000 0.884 0.108 0.008
#> SRR1199044 3 0.5112 0.7308 0.000 0.384 0.608 0.008
#> SRR1199045 3 0.5007 0.7384 0.000 0.356 0.636 0.008
#> SRR1199046 2 0.2266 0.7981 0.000 0.912 0.084 0.004
#> SRR1199047 2 0.0657 0.8145 0.000 0.984 0.012 0.004
#> SRR1199048 2 0.5898 0.4113 0.000 0.628 0.316 0.056
#> SRR1199049 1 0.5606 -0.1518 0.500 0.000 0.020 0.480
#> SRR1199050 1 0.3975 0.6560 0.760 0.000 0.000 0.240
#> SRR1199051 2 0.2773 0.7713 0.000 0.880 0.116 0.004
#> SRR1199052 3 0.4950 0.7397 0.000 0.376 0.620 0.004
#> SRR1199054 2 0.0779 0.8147 0.000 0.980 0.016 0.004
#> SRR1199056 2 0.3764 0.6687 0.000 0.784 0.216 0.000
#> SRR1199057 2 0.1305 0.8173 0.000 0.960 0.036 0.004
#> SRR1199059 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199060 2 0.1004 0.8148 0.000 0.972 0.004 0.024
#> SRR1199061 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199062 1 0.4500 0.4896 0.684 0.000 0.000 0.316
#> SRR1199064 4 0.2256 0.5612 0.020 0.000 0.056 0.924
#> SRR1199065 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.4079 0.7078 0.000 0.800 0.180 0.020
#> SRR1199075 1 0.0188 0.9416 0.996 0.000 0.000 0.004
#> SRR1199076 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199077 1 0.1022 0.9289 0.968 0.000 0.000 0.032
#> SRR1199078 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199079 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199080 1 0.0188 0.9418 0.996 0.000 0.000 0.004
#> SRR1199081 2 0.4608 0.5019 0.000 0.692 0.304 0.004
#> SRR1199082 3 0.6574 -0.3536 0.000 0.084 0.532 0.384
#> SRR1199083 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0188 0.9418 0.996 0.000 0.000 0.004
#> SRR1199086 1 0.0592 0.9368 0.984 0.000 0.000 0.016
#> SRR1199087 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199088 3 0.4920 0.7429 0.000 0.368 0.628 0.004
#> SRR1199089 2 0.6797 -0.0536 0.000 0.536 0.356 0.108
#> SRR1199090 3 0.7421 -0.0942 0.000 0.172 0.456 0.372
#> SRR1199091 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.1406 0.8131 0.000 0.960 0.016 0.024
#> SRR1199094 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.1004 0.8148 0.000 0.972 0.004 0.024
#> SRR1199096 2 0.6438 -0.0472 0.000 0.496 0.436 0.068
#> SRR1199097 2 0.4730 0.0692 0.000 0.636 0.364 0.000
#> SRR1199098 2 0.2675 0.7812 0.000 0.892 0.100 0.008
#> SRR1199099 1 0.1211 0.9237 0.960 0.000 0.000 0.040
#> SRR1199100 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199101 2 0.1637 0.7773 0.000 0.940 0.060 0.000
#> SRR1199102 1 0.1118 0.9265 0.964 0.000 0.000 0.036
#> SRR1199103 2 0.3051 0.7891 0.000 0.884 0.088 0.028
#> SRR1199104 3 0.4905 0.7422 0.000 0.364 0.632 0.004
#> SRR1199105 3 0.6445 -0.4580 0.000 0.068 0.488 0.444
#> SRR1199106 2 0.1890 0.8056 0.000 0.936 0.056 0.008
#> SRR1199107 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199108 4 0.5859 -0.0303 0.472 0.000 0.032 0.496
#> SRR1199109 2 0.0817 0.8161 0.000 0.976 0.000 0.024
#> SRR1199110 2 0.7910 -0.2936 0.000 0.352 0.304 0.344
#> SRR1199111 2 0.1004 0.8151 0.000 0.972 0.024 0.004
#> SRR1199112 3 0.6214 0.6465 0.000 0.360 0.576 0.064
#> SRR1199113 2 0.6961 -0.0681 0.000 0.524 0.352 0.124
#> SRR1199114 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.2282 0.8073 0.000 0.924 0.052 0.024
#> SRR1199117 1 0.2704 0.8365 0.876 0.000 0.000 0.124
#> SRR1199118 1 0.0000 0.9427 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.1978 0.8017 0.000 0.928 0.068 0.004
#> SRR1199120 3 0.4920 0.7429 0.000 0.368 0.628 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.4135 0.57952 0.000 0.340 0.656 0.000 0.004
#> SRR1199009 5 0.4971 0.05789 0.000 0.460 0.028 0.000 0.512
#> SRR1199010 2 0.7263 0.04916 0.000 0.456 0.196 0.040 0.308
#> SRR1199011 1 0.1942 0.89703 0.920 0.000 0.000 0.068 0.012
#> SRR1199012 2 0.6121 0.09142 0.000 0.464 0.128 0.000 0.408
#> SRR1199013 5 0.7464 0.03153 0.000 0.148 0.244 0.100 0.508
#> SRR1199015 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.4306 0.45303 0.000 0.044 0.772 0.172 0.012
#> SRR1199017 1 0.1012 0.93071 0.968 0.000 0.000 0.020 0.012
#> SRR1199018 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199020 5 0.4307 -0.00875 0.000 0.496 0.000 0.000 0.504
#> SRR1199021 2 0.4300 -0.02204 0.000 0.524 0.000 0.000 0.476
#> SRR1199022 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.1670 0.90968 0.936 0.000 0.000 0.052 0.012
#> SRR1199025 1 0.2574 0.85211 0.876 0.000 0.000 0.112 0.012
#> SRR1199026 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.5144 0.38599 0.000 0.000 0.292 0.640 0.068
#> SRR1199028 2 0.5906 0.14744 0.000 0.492 0.104 0.000 0.404
#> SRR1199029 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.2852 0.51939 0.000 0.828 0.000 0.000 0.172
#> SRR1199032 2 0.4677 0.38017 0.000 0.664 0.036 0.000 0.300
#> SRR1199033 2 0.4657 0.38595 0.000 0.668 0.036 0.000 0.296
#> SRR1199034 3 0.3983 0.58702 0.000 0.340 0.660 0.000 0.000
#> SRR1199035 3 0.3983 0.58702 0.000 0.340 0.660 0.000 0.000
#> SRR1199036 5 0.4713 0.10546 0.000 0.440 0.016 0.000 0.544
#> SRR1199037 2 0.6094 0.09618 0.000 0.488 0.128 0.000 0.384
#> SRR1199038 5 0.4884 0.13776 0.000 0.404 0.020 0.004 0.572
#> SRR1199040 5 0.4302 0.03748 0.000 0.480 0.000 0.000 0.520
#> SRR1199042 4 0.6285 0.30358 0.000 0.004 0.132 0.468 0.396
#> SRR1199043 5 0.4644 0.07245 0.000 0.460 0.012 0.000 0.528
#> SRR1199044 3 0.3949 0.60077 0.000 0.332 0.668 0.000 0.000
#> SRR1199045 3 0.2471 0.68625 0.000 0.136 0.864 0.000 0.000
#> SRR1199046 2 0.5368 -0.08343 0.000 0.484 0.036 0.008 0.472
#> SRR1199047 5 0.4440 0.05149 0.000 0.468 0.004 0.000 0.528
#> SRR1199048 5 0.6953 0.10627 0.000 0.240 0.160 0.052 0.548
#> SRR1199049 4 0.4655 0.17325 0.476 0.000 0.000 0.512 0.012
#> SRR1199050 1 0.3750 0.67040 0.756 0.000 0.000 0.232 0.012
#> SRR1199051 5 0.3992 0.25216 0.000 0.268 0.012 0.000 0.720
#> SRR1199052 3 0.3949 0.60084 0.000 0.332 0.668 0.000 0.000
#> SRR1199054 2 0.4528 0.08953 0.000 0.548 0.008 0.000 0.444
#> SRR1199056 5 0.6185 0.18314 0.000 0.264 0.188 0.000 0.548
#> SRR1199057 2 0.4659 -0.05371 0.000 0.500 0.012 0.000 0.488
#> SRR1199059 2 0.0324 0.60331 0.000 0.992 0.004 0.000 0.004
#> SRR1199060 2 0.1549 0.60015 0.000 0.944 0.016 0.000 0.040
#> SRR1199061 2 0.0162 0.60322 0.000 0.996 0.000 0.000 0.004
#> SRR1199062 1 0.3835 0.64613 0.744 0.000 0.000 0.244 0.012
#> SRR1199064 4 0.1757 0.50013 0.048 0.000 0.004 0.936 0.012
#> SRR1199065 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 5 0.6180 0.02080 0.000 0.404 0.136 0.000 0.460
#> SRR1199075 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.0000 0.60215 0.000 1.000 0.000 0.000 0.000
#> SRR1199077 1 0.1444 0.91795 0.948 0.000 0.000 0.040 0.012
#> SRR1199078 2 0.1043 0.60079 0.000 0.960 0.000 0.000 0.040
#> SRR1199079 2 0.0510 0.60134 0.000 0.984 0.016 0.000 0.000
#> SRR1199080 1 0.0566 0.93704 0.984 0.000 0.000 0.004 0.012
#> SRR1199081 2 0.7814 -0.01407 0.000 0.404 0.316 0.084 0.196
#> SRR1199082 5 0.6603 -0.06212 0.000 0.044 0.272 0.116 0.568
#> SRR1199083 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.0693 0.93578 0.980 0.000 0.000 0.012 0.008
#> SRR1199087 2 0.0162 0.60153 0.000 0.996 0.000 0.000 0.004
#> SRR1199088 3 0.3074 0.68984 0.000 0.196 0.804 0.000 0.000
#> SRR1199089 3 0.5315 0.56894 0.000 0.116 0.700 0.172 0.012
#> SRR1199090 5 0.6649 -0.02791 0.000 0.052 0.256 0.116 0.576
#> SRR1199091 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.1568 0.60054 0.000 0.944 0.020 0.000 0.036
#> SRR1199094 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.0510 0.60134 0.000 0.984 0.016 0.000 0.000
#> SRR1199096 3 0.6160 0.38127 0.000 0.096 0.660 0.172 0.072
#> SRR1199097 2 0.6114 0.19793 0.000 0.568 0.324 0.024 0.084
#> SRR1199098 5 0.3318 0.28038 0.000 0.180 0.012 0.000 0.808
#> SRR1199099 1 0.2248 0.87867 0.900 0.000 0.000 0.088 0.012
#> SRR1199100 2 0.0162 0.60153 0.000 0.996 0.000 0.000 0.004
#> SRR1199101 2 0.4550 0.41380 0.000 0.688 0.036 0.000 0.276
#> SRR1199102 1 0.2189 0.88261 0.904 0.000 0.000 0.084 0.012
#> SRR1199103 2 0.4822 0.24860 0.000 0.628 0.020 0.008 0.344
#> SRR1199104 3 0.3586 0.66679 0.000 0.264 0.736 0.000 0.000
#> SRR1199105 5 0.6962 -0.29776 0.000 0.024 0.188 0.312 0.476
#> SRR1199106 5 0.4482 0.18393 0.000 0.376 0.012 0.000 0.612
#> SRR1199107 2 0.0162 0.60153 0.000 0.996 0.000 0.000 0.004
#> SRR1199108 4 0.4637 0.32553 0.420 0.000 0.004 0.568 0.008
#> SRR1199109 2 0.0451 0.60485 0.000 0.988 0.004 0.000 0.008
#> SRR1199110 5 0.7441 0.05354 0.000 0.148 0.216 0.112 0.524
#> SRR1199111 5 0.4735 0.06951 0.000 0.460 0.016 0.000 0.524
#> SRR1199112 3 0.3743 0.60656 0.000 0.076 0.824 0.096 0.004
#> SRR1199113 3 0.4306 0.45303 0.000 0.044 0.772 0.172 0.012
#> SRR1199114 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.5928 0.35845 0.000 0.672 0.144 0.040 0.144
#> SRR1199117 1 0.3628 0.70024 0.772 0.000 0.000 0.216 0.012
#> SRR1199118 1 0.0000 0.94294 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 5 0.4627 0.10113 0.000 0.444 0.012 0.000 0.544
#> SRR1199120 3 0.2648 0.69099 0.000 0.152 0.848 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.4101 0.39752 0.000 0.008 0.632 0.008 0.352 0.000
#> SRR1199009 2 0.3887 0.40467 0.000 0.632 0.008 0.000 0.360 0.000
#> SRR1199010 2 0.6659 0.15867 0.000 0.412 0.100 0.100 0.388 0.000
#> SRR1199011 1 0.3737 -0.51253 0.608 0.000 0.000 0.000 0.000 0.392
#> SRR1199012 2 0.4443 0.37009 0.000 0.596 0.036 0.000 0.368 0.000
#> SRR1199013 2 0.6331 -0.04800 0.000 0.548 0.128 0.248 0.076 0.000
#> SRR1199015 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.5312 0.36740 0.000 0.056 0.652 0.244 0.040 0.008
#> SRR1199017 1 0.3944 -0.72739 0.568 0.000 0.000 0.004 0.000 0.428
#> SRR1199018 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.1501 0.55516 0.924 0.000 0.000 0.000 0.000 0.076
#> SRR1199020 2 0.3804 0.31182 0.000 0.576 0.000 0.000 0.424 0.000
#> SRR1199021 2 0.3975 0.26697 0.000 0.544 0.000 0.004 0.452 0.000
#> SRR1199022 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.3706 -0.45952 0.620 0.000 0.000 0.000 0.000 0.380
#> SRR1199025 1 0.3747 -0.53023 0.604 0.000 0.000 0.000 0.000 0.396
#> SRR1199026 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199027 4 0.4870 0.53355 0.000 0.056 0.136 0.732 0.004 0.072
#> SRR1199028 2 0.4238 0.38294 0.000 0.628 0.028 0.000 0.344 0.000
#> SRR1199029 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 5 0.3595 0.40933 0.000 0.288 0.000 0.008 0.704 0.000
#> SRR1199032 5 0.4076 0.20748 0.000 0.396 0.012 0.000 0.592 0.000
#> SRR1199033 5 0.3881 0.21434 0.000 0.396 0.004 0.000 0.600 0.000
#> SRR1199034 3 0.3499 0.49048 0.000 0.000 0.680 0.000 0.320 0.000
#> SRR1199035 3 0.3482 0.49557 0.000 0.000 0.684 0.000 0.316 0.000
#> SRR1199036 2 0.3804 0.43150 0.000 0.656 0.008 0.000 0.336 0.000
#> SRR1199037 2 0.4703 0.39923 0.000 0.628 0.036 0.016 0.320 0.000
#> SRR1199038 2 0.3989 0.47160 0.000 0.696 0.012 0.012 0.280 0.000
#> SRR1199040 2 0.3765 0.35481 0.000 0.596 0.000 0.000 0.404 0.000
#> SRR1199042 4 0.4835 0.52276 0.000 0.136 0.140 0.708 0.012 0.004
#> SRR1199043 2 0.4009 0.41095 0.000 0.632 0.004 0.008 0.356 0.000
#> SRR1199044 3 0.3428 0.52317 0.000 0.000 0.696 0.000 0.304 0.000
#> SRR1199045 3 0.0547 0.57939 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR1199046 2 0.4899 0.35324 0.000 0.560 0.036 0.016 0.388 0.000
#> SRR1199047 2 0.3634 0.41236 0.000 0.644 0.000 0.000 0.356 0.000
#> SRR1199048 2 0.5928 0.10354 0.000 0.564 0.044 0.112 0.280 0.000
#> SRR1199049 4 0.5819 -0.00953 0.368 0.000 0.000 0.444 0.000 0.188
#> SRR1199050 1 0.5339 -0.73530 0.488 0.000 0.000 0.108 0.000 0.404
#> SRR1199051 2 0.2624 0.47332 0.000 0.844 0.004 0.004 0.148 0.000
#> SRR1199052 3 0.3076 0.59182 0.000 0.000 0.760 0.000 0.240 0.000
#> SRR1199054 5 0.3866 -0.11237 0.000 0.484 0.000 0.000 0.516 0.000
#> SRR1199056 2 0.3500 0.40391 0.000 0.816 0.052 0.012 0.120 0.000
#> SRR1199057 2 0.4195 0.28795 0.000 0.548 0.004 0.008 0.440 0.000
#> SRR1199059 5 0.0547 0.65855 0.000 0.020 0.000 0.000 0.980 0.000
#> SRR1199060 5 0.2340 0.60284 0.000 0.148 0.000 0.000 0.852 0.000
#> SRR1199061 5 0.0260 0.65776 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR1199062 1 0.5556 -0.67021 0.452 0.000 0.000 0.136 0.000 0.412
#> SRR1199064 4 0.3993 0.49888 0.000 0.004 0.000 0.520 0.000 0.476
#> SRR1199065 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.4112 0.40393 0.000 0.744 0.040 0.016 0.200 0.000
#> SRR1199075 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199076 5 0.0260 0.65886 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR1199077 1 0.3706 -0.45952 0.620 0.000 0.000 0.000 0.000 0.380
#> SRR1199078 5 0.2402 0.61339 0.000 0.140 0.000 0.004 0.856 0.000
#> SRR1199079 5 0.0146 0.65366 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR1199080 1 0.3531 -0.28928 0.672 0.000 0.000 0.000 0.000 0.328
#> SRR1199081 5 0.7487 -0.11389 0.000 0.264 0.160 0.212 0.364 0.000
#> SRR1199082 2 0.6436 -0.24810 0.000 0.500 0.120 0.308 0.072 0.000
#> SRR1199083 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199086 1 0.3175 0.04905 0.744 0.000 0.000 0.000 0.000 0.256
#> SRR1199087 5 0.0146 0.65366 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR1199088 3 0.1267 0.60527 0.000 0.000 0.940 0.000 0.060 0.000
#> SRR1199089 3 0.5135 0.37059 0.000 0.048 0.664 0.244 0.036 0.008
#> SRR1199090 2 0.6298 -0.20693 0.000 0.524 0.120 0.292 0.064 0.000
#> SRR1199091 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199093 5 0.1765 0.63968 0.000 0.096 0.000 0.000 0.904 0.000
#> SRR1199094 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199095 5 0.0291 0.65400 0.000 0.004 0.000 0.004 0.992 0.000
#> SRR1199096 3 0.6648 0.15824 0.000 0.144 0.504 0.276 0.072 0.004
#> SRR1199097 5 0.6785 0.04814 0.000 0.272 0.220 0.060 0.448 0.000
#> SRR1199098 2 0.2624 0.46192 0.000 0.844 0.004 0.004 0.148 0.000
#> SRR1199099 1 0.3706 -0.45952 0.620 0.000 0.000 0.000 0.000 0.380
#> SRR1199100 5 0.0405 0.65632 0.000 0.008 0.000 0.004 0.988 0.000
#> SRR1199101 5 0.4088 0.25964 0.000 0.368 0.016 0.000 0.616 0.000
#> SRR1199102 1 0.3737 -0.51253 0.608 0.000 0.000 0.000 0.000 0.392
#> SRR1199103 5 0.4803 0.04067 0.000 0.396 0.008 0.040 0.556 0.000
#> SRR1199104 3 0.1141 0.60225 0.000 0.000 0.948 0.000 0.052 0.000
#> SRR1199105 4 0.5815 0.46245 0.000 0.208 0.140 0.608 0.044 0.000
#> SRR1199106 2 0.3349 0.46976 0.000 0.748 0.008 0.000 0.244 0.000
#> SRR1199107 5 0.0000 0.65534 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1199108 4 0.5551 0.41219 0.224 0.000 0.000 0.556 0.000 0.220
#> SRR1199109 5 0.0937 0.65372 0.000 0.040 0.000 0.000 0.960 0.000
#> SRR1199110 2 0.6541 -0.14695 0.000 0.512 0.120 0.276 0.092 0.000
#> SRR1199111 2 0.4098 0.25895 0.000 0.548 0.004 0.004 0.444 0.000
#> SRR1199112 3 0.2420 0.49043 0.000 0.004 0.864 0.128 0.000 0.004
#> SRR1199113 3 0.5312 0.36740 0.000 0.056 0.652 0.244 0.040 0.008
#> SRR1199114 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199116 5 0.5490 0.13675 0.000 0.312 0.044 0.060 0.584 0.000
#> SRR1199117 6 0.3866 0.00000 0.484 0.000 0.000 0.000 0.000 0.516
#> SRR1199118 1 0.0000 0.65520 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.3878 0.41389 0.000 0.644 0.004 0.004 0.348 0.000
#> SRR1199120 3 0.0458 0.57597 0.000 0.000 0.984 0.000 0.016 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)
#> Error in mat[ceiling(1:nr/h_ratio), ceiling(1:nc/w_ratio), drop = FALSE]: subscript out of bounds
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 8516 rows and 96 columns.
#> Top rows (852, 1704, 2555, 3406, 4258) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.977 0.991 0.4531 0.544 0.544
#> 3 3 0.740 0.872 0.913 0.1621 0.993 0.987
#> 4 4 0.631 0.595 0.784 0.1428 0.986 0.975
#> 5 5 0.647 0.794 0.877 0.1111 0.777 0.579
#> 6 6 0.690 0.769 0.870 0.0477 0.977 0.927
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1199002 2 0.000 0.996 0.000 1.000
#> SRR1199009 2 0.000 0.996 0.000 1.000
#> SRR1199010 2 0.000 0.996 0.000 1.000
#> SRR1199011 1 0.000 0.978 1.000 0.000
#> SRR1199012 2 0.000 0.996 0.000 1.000
#> SRR1199013 2 0.000 0.996 0.000 1.000
#> SRR1199015 1 0.000 0.978 1.000 0.000
#> SRR1199016 2 0.000 0.996 0.000 1.000
#> SRR1199017 1 0.000 0.978 1.000 0.000
#> SRR1199018 1 0.000 0.978 1.000 0.000
#> SRR1199019 1 0.000 0.978 1.000 0.000
#> SRR1199020 2 0.000 0.996 0.000 1.000
#> SRR1199021 2 0.000 0.996 0.000 1.000
#> SRR1199022 1 0.000 0.978 1.000 0.000
#> SRR1199023 1 0.000 0.978 1.000 0.000
#> SRR1199025 1 0.000 0.978 1.000 0.000
#> SRR1199026 1 0.000 0.978 1.000 0.000
#> SRR1199027 1 0.900 0.545 0.684 0.316
#> SRR1199028 2 0.000 0.996 0.000 1.000
#> SRR1199029 1 0.000 0.978 1.000 0.000
#> SRR1199031 2 0.000 0.996 0.000 1.000
#> SRR1199032 2 0.000 0.996 0.000 1.000
#> SRR1199033 2 0.000 0.996 0.000 1.000
#> SRR1199034 2 0.000 0.996 0.000 1.000
#> SRR1199035 2 0.000 0.996 0.000 1.000
#> SRR1199036 2 0.000 0.996 0.000 1.000
#> SRR1199037 2 0.000 0.996 0.000 1.000
#> SRR1199038 2 0.000 0.996 0.000 1.000
#> SRR1199040 2 0.000 0.996 0.000 1.000
#> SRR1199042 2 0.767 0.700 0.224 0.776
#> SRR1199043 2 0.000 0.996 0.000 1.000
#> SRR1199044 2 0.000 0.996 0.000 1.000
#> SRR1199045 2 0.000 0.996 0.000 1.000
#> SRR1199046 2 0.000 0.996 0.000 1.000
#> SRR1199047 2 0.000 0.996 0.000 1.000
#> SRR1199048 2 0.000 0.996 0.000 1.000
#> SRR1199049 1 0.000 0.978 1.000 0.000
#> SRR1199050 1 0.000 0.978 1.000 0.000
#> SRR1199051 2 0.000 0.996 0.000 1.000
#> SRR1199052 2 0.000 0.996 0.000 1.000
#> SRR1199054 2 0.000 0.996 0.000 1.000
#> SRR1199056 2 0.000 0.996 0.000 1.000
#> SRR1199057 2 0.000 0.996 0.000 1.000
#> SRR1199059 2 0.000 0.996 0.000 1.000
#> SRR1199060 2 0.000 0.996 0.000 1.000
#> SRR1199061 2 0.000 0.996 0.000 1.000
#> SRR1199062 1 0.000 0.978 1.000 0.000
#> SRR1199064 1 0.946 0.439 0.636 0.364
#> SRR1199065 1 0.000 0.978 1.000 0.000
#> SRR1199067 2 0.000 0.996 0.000 1.000
#> SRR1199075 1 0.000 0.978 1.000 0.000
#> SRR1199076 2 0.000 0.996 0.000 1.000
#> SRR1199077 1 0.000 0.978 1.000 0.000
#> SRR1199078 2 0.000 0.996 0.000 1.000
#> SRR1199079 2 0.000 0.996 0.000 1.000
#> SRR1199080 1 0.000 0.978 1.000 0.000
#> SRR1199081 2 0.000 0.996 0.000 1.000
#> SRR1199082 2 0.000 0.996 0.000 1.000
#> SRR1199083 1 0.000 0.978 1.000 0.000
#> SRR1199084 1 0.000 0.978 1.000 0.000
#> SRR1199085 1 0.000 0.978 1.000 0.000
#> SRR1199086 1 0.000 0.978 1.000 0.000
#> SRR1199087 2 0.000 0.996 0.000 1.000
#> SRR1199088 2 0.000 0.996 0.000 1.000
#> SRR1199089 2 0.000 0.996 0.000 1.000
#> SRR1199090 2 0.000 0.996 0.000 1.000
#> SRR1199091 1 0.000 0.978 1.000 0.000
#> SRR1199092 1 0.000 0.978 1.000 0.000
#> SRR1199093 2 0.000 0.996 0.000 1.000
#> SRR1199094 1 0.000 0.978 1.000 0.000
#> SRR1199095 2 0.000 0.996 0.000 1.000
#> SRR1199096 2 0.000 0.996 0.000 1.000
#> SRR1199097 2 0.000 0.996 0.000 1.000
#> SRR1199098 2 0.000 0.996 0.000 1.000
#> SRR1199099 1 0.000 0.978 1.000 0.000
#> SRR1199100 2 0.000 0.996 0.000 1.000
#> SRR1199101 2 0.000 0.996 0.000 1.000
#> SRR1199102 1 0.000 0.978 1.000 0.000
#> SRR1199103 2 0.000 0.996 0.000 1.000
#> SRR1199104 2 0.000 0.996 0.000 1.000
#> SRR1199105 2 0.000 0.996 0.000 1.000
#> SRR1199106 2 0.000 0.996 0.000 1.000
#> SRR1199107 2 0.000 0.996 0.000 1.000
#> SRR1199108 1 0.000 0.978 1.000 0.000
#> SRR1199109 2 0.000 0.996 0.000 1.000
#> SRR1199110 2 0.000 0.996 0.000 1.000
#> SRR1199111 2 0.000 0.996 0.000 1.000
#> SRR1199112 2 0.000 0.996 0.000 1.000
#> SRR1199113 2 0.000 0.996 0.000 1.000
#> SRR1199114 1 0.000 0.978 1.000 0.000
#> SRR1199115 1 0.000 0.978 1.000 0.000
#> SRR1199116 2 0.000 0.996 0.000 1.000
#> SRR1199117 1 0.000 0.978 1.000 0.000
#> SRR1199118 1 0.000 0.978 1.000 0.000
#> SRR1199119 2 0.000 0.996 0.000 1.000
#> SRR1199120 2 0.000 0.996 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1199002 2 0.5178 0.789 0.000 0.744 0.256
#> SRR1199009 2 0.3038 0.867 0.000 0.896 0.104
#> SRR1199010 2 0.1753 0.870 0.000 0.952 0.048
#> SRR1199011 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199012 2 0.3816 0.850 0.000 0.852 0.148
#> SRR1199013 2 0.2625 0.875 0.000 0.916 0.084
#> SRR1199015 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199016 2 0.5363 0.774 0.000 0.724 0.276
#> SRR1199017 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199018 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199019 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199020 2 0.0424 0.881 0.000 0.992 0.008
#> SRR1199021 2 0.0592 0.879 0.000 0.988 0.012
#> SRR1199022 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199023 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199025 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199026 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199027 1 0.4974 0.333 0.764 0.236 0.000
#> SRR1199028 2 0.0592 0.882 0.000 0.988 0.012
#> SRR1199029 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199031 2 0.1643 0.871 0.000 0.956 0.044
#> SRR1199032 2 0.1529 0.881 0.000 0.960 0.040
#> SRR1199033 2 0.1031 0.882 0.000 0.976 0.024
#> SRR1199034 2 0.5216 0.786 0.000 0.740 0.260
#> SRR1199035 2 0.5216 0.786 0.000 0.740 0.260
#> SRR1199036 2 0.2625 0.873 0.000 0.916 0.084
#> SRR1199037 2 0.1643 0.881 0.000 0.956 0.044
#> SRR1199038 2 0.2165 0.878 0.000 0.936 0.064
#> SRR1199040 2 0.0592 0.881 0.000 0.988 0.012
#> SRR1199042 2 0.7263 0.573 0.224 0.692 0.084
#> SRR1199043 2 0.2537 0.875 0.000 0.920 0.080
#> SRR1199044 2 0.5363 0.773 0.000 0.724 0.276
#> SRR1199045 2 0.5397 0.770 0.000 0.720 0.280
#> SRR1199046 2 0.4002 0.845 0.000 0.840 0.160
#> SRR1199047 2 0.2448 0.876 0.000 0.924 0.076
#> SRR1199048 2 0.2625 0.854 0.000 0.916 0.084
#> SRR1199049 1 0.0237 0.977 0.996 0.000 0.004
#> SRR1199050 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199051 2 0.2356 0.876 0.000 0.928 0.072
#> SRR1199052 2 0.5363 0.773 0.000 0.724 0.276
#> SRR1199054 2 0.1163 0.882 0.000 0.972 0.028
#> SRR1199056 2 0.3879 0.848 0.000 0.848 0.152
#> SRR1199057 2 0.0747 0.878 0.000 0.984 0.016
#> SRR1199059 2 0.2066 0.866 0.000 0.940 0.060
#> SRR1199060 2 0.1860 0.869 0.000 0.948 0.052
#> SRR1199061 2 0.2796 0.850 0.000 0.908 0.092
#> SRR1199062 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199064 3 0.5698 0.000 0.252 0.012 0.736
#> SRR1199065 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199067 2 0.1289 0.882 0.000 0.968 0.032
#> SRR1199075 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199076 2 0.2878 0.847 0.000 0.904 0.096
#> SRR1199077 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199078 2 0.1964 0.867 0.000 0.944 0.056
#> SRR1199079 2 0.3038 0.841 0.000 0.896 0.104
#> SRR1199080 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199081 2 0.4842 0.809 0.000 0.776 0.224
#> SRR1199082 2 0.3340 0.830 0.000 0.880 0.120
#> SRR1199083 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199084 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199085 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199086 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199087 2 0.2711 0.852 0.000 0.912 0.088
#> SRR1199088 2 0.5431 0.766 0.000 0.716 0.284
#> SRR1199089 2 0.5327 0.777 0.000 0.728 0.272
#> SRR1199090 2 0.1643 0.872 0.000 0.956 0.044
#> SRR1199091 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199092 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199093 2 0.1753 0.870 0.000 0.952 0.048
#> SRR1199094 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199095 2 0.3340 0.830 0.000 0.880 0.120
#> SRR1199096 2 0.5058 0.797 0.000 0.756 0.244
#> SRR1199097 2 0.4931 0.805 0.000 0.768 0.232
#> SRR1199098 2 0.0424 0.879 0.000 0.992 0.008
#> SRR1199099 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199100 2 0.2796 0.850 0.000 0.908 0.092
#> SRR1199101 2 0.1529 0.883 0.000 0.960 0.040
#> SRR1199102 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199103 2 0.1860 0.869 0.000 0.948 0.052
#> SRR1199104 2 0.5397 0.770 0.000 0.720 0.280
#> SRR1199105 2 0.1031 0.879 0.000 0.976 0.024
#> SRR1199106 2 0.2165 0.877 0.000 0.936 0.064
#> SRR1199107 2 0.2878 0.847 0.000 0.904 0.096
#> SRR1199108 1 0.0892 0.956 0.980 0.000 0.020
#> SRR1199109 2 0.1964 0.867 0.000 0.944 0.056
#> SRR1199110 2 0.1753 0.870 0.000 0.952 0.048
#> SRR1199111 2 0.0892 0.877 0.000 0.980 0.020
#> SRR1199112 2 0.5431 0.766 0.000 0.716 0.284
#> SRR1199113 2 0.5363 0.774 0.000 0.724 0.276
#> SRR1199114 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199115 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199116 2 0.2448 0.858 0.000 0.924 0.076
#> SRR1199117 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199118 1 0.0000 0.982 1.000 0.000 0.000
#> SRR1199119 2 0.1031 0.882 0.000 0.976 0.024
#> SRR1199120 2 0.5431 0.766 0.000 0.716 0.284
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1199002 2 0.4933 0.376 0.000 0.568 0.000 0.432
#> SRR1199009 2 0.2888 0.587 0.000 0.872 0.004 0.124
#> SRR1199010 2 0.3172 0.493 0.000 0.840 0.000 0.160
#> SRR1199011 1 0.0469 0.938 0.988 0.000 0.012 0.000
#> SRR1199012 2 0.3583 0.558 0.000 0.816 0.004 0.180
#> SRR1199013 2 0.3497 0.577 0.000 0.852 0.024 0.124
#> SRR1199015 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199016 2 0.5244 0.364 0.000 0.556 0.008 0.436
#> SRR1199017 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199018 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199019 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199020 2 0.1305 0.604 0.000 0.960 0.004 0.036
#> SRR1199021 2 0.1716 0.584 0.000 0.936 0.000 0.064
#> SRR1199022 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199023 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199025 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199026 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199027 1 0.7460 0.136 0.620 0.192 0.048 0.140
#> SRR1199028 2 0.0592 0.600 0.000 0.984 0.000 0.016
#> SRR1199029 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199031 2 0.3074 0.501 0.000 0.848 0.000 0.152
#> SRR1199032 2 0.1209 0.604 0.000 0.964 0.004 0.032
#> SRR1199033 2 0.1022 0.604 0.000 0.968 0.000 0.032
#> SRR1199034 2 0.4941 0.373 0.000 0.564 0.000 0.436
#> SRR1199035 2 0.4941 0.373 0.000 0.564 0.000 0.436
#> SRR1199036 2 0.2773 0.591 0.000 0.880 0.004 0.116
#> SRR1199037 2 0.1807 0.604 0.000 0.940 0.008 0.052
#> SRR1199038 2 0.2918 0.590 0.000 0.876 0.008 0.116
#> SRR1199040 2 0.1109 0.604 0.000 0.968 0.004 0.028
#> SRR1199042 4 0.8799 0.000 0.180 0.368 0.064 0.388
#> SRR1199043 2 0.2480 0.598 0.000 0.904 0.008 0.088
#> SRR1199044 2 0.4948 0.369 0.000 0.560 0.000 0.440
#> SRR1199045 2 0.4948 0.369 0.000 0.560 0.000 0.440
#> SRR1199046 2 0.4360 0.506 0.000 0.744 0.008 0.248
#> SRR1199047 2 0.2546 0.597 0.000 0.900 0.008 0.092
#> SRR1199048 2 0.3831 0.439 0.000 0.792 0.004 0.204
#> SRR1199049 1 0.5321 0.640 0.716 0.000 0.056 0.228
#> SRR1199050 1 0.2036 0.897 0.936 0.000 0.032 0.032
#> SRR1199051 2 0.2466 0.599 0.000 0.900 0.004 0.096
#> SRR1199052 2 0.4948 0.369 0.000 0.560 0.000 0.440
#> SRR1199054 2 0.1398 0.603 0.000 0.956 0.004 0.040
#> SRR1199056 2 0.3591 0.562 0.000 0.824 0.008 0.168
#> SRR1199057 2 0.1661 0.576 0.000 0.944 0.004 0.052
#> SRR1199059 2 0.3945 0.425 0.000 0.780 0.004 0.216
#> SRR1199060 2 0.3356 0.477 0.000 0.824 0.000 0.176
#> SRR1199061 2 0.3907 0.396 0.000 0.768 0.000 0.232
#> SRR1199062 1 0.3674 0.813 0.848 0.000 0.036 0.116
#> SRR1199064 3 0.1970 0.000 0.060 0.000 0.932 0.008
#> SRR1199065 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199067 2 0.1489 0.605 0.000 0.952 0.004 0.044
#> SRR1199075 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199076 2 0.4428 0.293 0.000 0.720 0.004 0.276
#> SRR1199077 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199078 2 0.3649 0.442 0.000 0.796 0.000 0.204
#> SRR1199079 2 0.4456 0.283 0.000 0.716 0.004 0.280
#> SRR1199080 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199081 2 0.5279 0.389 0.000 0.588 0.012 0.400
#> SRR1199082 2 0.5742 0.116 0.000 0.648 0.052 0.300
#> SRR1199083 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199085 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199086 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199087 2 0.4452 0.332 0.000 0.732 0.008 0.260
#> SRR1199088 2 0.4948 0.369 0.000 0.560 0.000 0.440
#> SRR1199089 2 0.5244 0.364 0.000 0.556 0.008 0.436
#> SRR1199090 2 0.3763 0.530 0.000 0.832 0.024 0.144
#> SRR1199091 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199093 2 0.3764 0.424 0.000 0.784 0.000 0.216
#> SRR1199094 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199095 2 0.4584 0.227 0.000 0.696 0.004 0.300
#> SRR1199096 2 0.5444 0.363 0.000 0.560 0.016 0.424
#> SRR1199097 2 0.4843 0.402 0.000 0.604 0.000 0.396
#> SRR1199098 2 0.1743 0.574 0.000 0.940 0.004 0.056
#> SRR1199099 1 0.0469 0.938 0.988 0.000 0.012 0.000
#> SRR1199100 2 0.4283 0.341 0.000 0.740 0.004 0.256
#> SRR1199101 2 0.2334 0.581 0.000 0.908 0.004 0.088
#> SRR1199102 1 0.0188 0.943 0.996 0.000 0.004 0.000
#> SRR1199103 2 0.3400 0.473 0.000 0.820 0.000 0.180
#> SRR1199104 2 0.4948 0.369 0.000 0.560 0.000 0.440
#> SRR1199105 2 0.4839 0.494 0.000 0.764 0.052 0.184
#> SRR1199106 2 0.2266 0.599 0.000 0.912 0.004 0.084
#> SRR1199107 2 0.4220 0.357 0.000 0.748 0.004 0.248
#> SRR1199108 1 0.6648 0.187 0.512 0.012 0.056 0.420
#> SRR1199109 2 0.3908 0.431 0.000 0.784 0.004 0.212
#> SRR1199110 2 0.4152 0.479 0.000 0.808 0.032 0.160
#> SRR1199111 2 0.2197 0.559 0.000 0.916 0.004 0.080
#> SRR1199112 2 0.4955 0.364 0.000 0.556 0.000 0.444
#> SRR1199113 2 0.5244 0.364 0.000 0.556 0.008 0.436
#> SRR1199114 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199116 2 0.3626 0.466 0.000 0.812 0.004 0.184
#> SRR1199117 1 0.3032 0.833 0.868 0.000 0.008 0.124
#> SRR1199118 1 0.0000 0.945 1.000 0.000 0.000 0.000
#> SRR1199119 2 0.1489 0.602 0.000 0.952 0.004 0.044
#> SRR1199120 2 0.4955 0.364 0.000 0.556 0.000 0.444
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1199002 3 0.3039 0.9100 0.000 0.192 0.808 0.000 0.000
#> SRR1199009 2 0.3109 0.7824 0.000 0.800 0.200 0.000 0.000
#> SRR1199010 2 0.1525 0.8544 0.000 0.948 0.012 0.036 0.004
#> SRR1199011 1 0.0404 0.9819 0.988 0.000 0.000 0.012 0.000
#> SRR1199012 2 0.3774 0.6365 0.000 0.704 0.296 0.000 0.000
#> SRR1199013 2 0.6125 0.1552 0.000 0.516 0.360 0.120 0.004
#> SRR1199015 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.2909 0.9027 0.000 0.140 0.848 0.012 0.000
#> SRR1199017 1 0.0162 0.9874 0.996 0.000 0.000 0.004 0.000
#> SRR1199018 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199019 1 0.0566 0.9774 0.984 0.000 0.012 0.004 0.000
#> SRR1199020 2 0.2929 0.8237 0.000 0.840 0.152 0.008 0.000
#> SRR1199021 2 0.2720 0.8482 0.000 0.880 0.096 0.020 0.004
#> SRR1199022 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0162 0.9880 0.996 0.000 0.000 0.004 0.000
#> SRR1199025 1 0.0451 0.9809 0.988 0.000 0.008 0.004 0.000
#> SRR1199026 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199027 3 0.5602 0.2433 0.020 0.052 0.604 0.324 0.000
#> SRR1199028 2 0.2166 0.8561 0.000 0.912 0.072 0.012 0.004
#> SRR1199029 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0290 0.8529 0.000 0.992 0.000 0.008 0.000
#> SRR1199032 2 0.1732 0.8542 0.000 0.920 0.080 0.000 0.000
#> SRR1199033 2 0.1851 0.8528 0.000 0.912 0.088 0.000 0.000
#> SRR1199034 3 0.3003 0.9133 0.000 0.188 0.812 0.000 0.000
#> SRR1199035 3 0.3039 0.9100 0.000 0.192 0.808 0.000 0.000
#> SRR1199036 2 0.2929 0.8028 0.000 0.820 0.180 0.000 0.000
#> SRR1199037 2 0.3236 0.8172 0.000 0.828 0.152 0.020 0.000
#> SRR1199038 2 0.3807 0.7188 0.000 0.748 0.240 0.012 0.000
#> SRR1199040 2 0.2629 0.8327 0.000 0.860 0.136 0.004 0.000
#> SRR1199042 4 0.3936 0.2652 0.000 0.052 0.144 0.800 0.004
#> SRR1199043 2 0.3109 0.7833 0.000 0.800 0.200 0.000 0.000
#> SRR1199044 3 0.2891 0.9202 0.000 0.176 0.824 0.000 0.000
#> SRR1199045 3 0.2813 0.9216 0.000 0.168 0.832 0.000 0.000
#> SRR1199046 2 0.4528 0.1721 0.000 0.548 0.444 0.008 0.000
#> SRR1199047 2 0.3003 0.7958 0.000 0.812 0.188 0.000 0.000
#> SRR1199048 2 0.2074 0.8414 0.000 0.920 0.016 0.060 0.004
#> SRR1199049 4 0.2110 0.3177 0.072 0.000 0.016 0.912 0.000
#> SRR1199050 4 0.4451 0.0813 0.492 0.000 0.004 0.504 0.000
#> SRR1199051 2 0.3003 0.7970 0.000 0.812 0.188 0.000 0.000
#> SRR1199052 3 0.2852 0.9216 0.000 0.172 0.828 0.000 0.000
#> SRR1199054 2 0.1478 0.8573 0.000 0.936 0.064 0.000 0.000
#> SRR1199056 2 0.4462 0.5783 0.000 0.672 0.308 0.016 0.004
#> SRR1199057 2 0.2429 0.8544 0.000 0.900 0.076 0.020 0.004
#> SRR1199059 2 0.1106 0.8421 0.000 0.964 0.024 0.012 0.000
#> SRR1199060 2 0.0290 0.8529 0.000 0.992 0.000 0.008 0.000
#> SRR1199061 2 0.1211 0.8409 0.000 0.960 0.024 0.016 0.000
#> SRR1199062 4 0.3916 0.3431 0.256 0.000 0.012 0.732 0.000
#> SRR1199064 5 0.0162 0.0000 0.004 0.000 0.000 0.000 0.996
#> SRR1199065 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199067 2 0.3239 0.8180 0.000 0.828 0.156 0.012 0.004
#> SRR1199075 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199076 2 0.1568 0.8308 0.000 0.944 0.036 0.020 0.000
#> SRR1199077 1 0.0162 0.9880 0.996 0.000 0.000 0.004 0.000
#> SRR1199078 2 0.0510 0.8512 0.000 0.984 0.000 0.016 0.000
#> SRR1199079 2 0.1661 0.8281 0.000 0.940 0.036 0.024 0.000
#> SRR1199080 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199081 3 0.4387 0.8659 0.000 0.208 0.744 0.044 0.004
#> SRR1199082 4 0.5531 0.1636 0.000 0.336 0.072 0.588 0.004
#> SRR1199083 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0162 0.9880 0.996 0.000 0.000 0.004 0.000
#> SRR1199086 1 0.0162 0.9880 0.996 0.000 0.000 0.004 0.000
#> SRR1199087 2 0.1568 0.8308 0.000 0.944 0.036 0.020 0.000
#> SRR1199088 3 0.2773 0.9226 0.000 0.164 0.836 0.000 0.000
#> SRR1199089 3 0.2719 0.9080 0.000 0.144 0.852 0.004 0.000
#> SRR1199090 2 0.4888 0.7227 0.000 0.728 0.108 0.160 0.004
#> SRR1199091 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199092 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199093 2 0.0798 0.8469 0.000 0.976 0.016 0.008 0.000
#> SRR1199094 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199095 2 0.2074 0.8125 0.000 0.920 0.044 0.036 0.000
#> SRR1199096 3 0.4114 0.8908 0.000 0.176 0.776 0.044 0.004
#> SRR1199097 3 0.3796 0.7383 0.000 0.300 0.700 0.000 0.000
#> SRR1199098 2 0.1341 0.8578 0.000 0.944 0.056 0.000 0.000
#> SRR1199099 1 0.2516 0.8182 0.860 0.000 0.000 0.140 0.000
#> SRR1199100 2 0.1485 0.8337 0.000 0.948 0.032 0.020 0.000
#> SRR1199101 2 0.0865 0.8571 0.000 0.972 0.024 0.004 0.000
#> SRR1199102 1 0.0771 0.9703 0.976 0.000 0.004 0.020 0.000
#> SRR1199103 2 0.0451 0.8537 0.000 0.988 0.004 0.008 0.000
#> SRR1199104 3 0.2773 0.9226 0.000 0.164 0.836 0.000 0.000
#> SRR1199105 4 0.6543 -0.2563 0.000 0.172 0.380 0.444 0.004
#> SRR1199106 2 0.2605 0.8260 0.000 0.852 0.148 0.000 0.000
#> SRR1199107 2 0.1485 0.8337 0.000 0.948 0.032 0.020 0.000
#> SRR1199108 4 0.2419 0.2603 0.028 0.004 0.064 0.904 0.000
#> SRR1199109 2 0.0912 0.8460 0.000 0.972 0.016 0.012 0.000
#> SRR1199110 2 0.4617 0.7199 0.000 0.736 0.064 0.196 0.004
#> SRR1199111 2 0.0955 0.8575 0.000 0.968 0.028 0.004 0.000
#> SRR1199112 3 0.2674 0.9032 0.000 0.140 0.856 0.004 0.000
#> SRR1199113 3 0.2886 0.9112 0.000 0.148 0.844 0.008 0.000
#> SRR1199114 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199115 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199116 2 0.1412 0.8482 0.000 0.952 0.008 0.036 0.004
#> SRR1199117 4 0.4404 0.3306 0.264 0.000 0.032 0.704 0.000
#> SRR1199118 1 0.0000 0.9899 1.000 0.000 0.000 0.000 0.000
#> SRR1199119 2 0.2127 0.8463 0.000 0.892 0.108 0.000 0.000
#> SRR1199120 3 0.2732 0.9212 0.000 0.160 0.840 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1199002 3 0.2404 0.8115 0.000 0.112 0.872 0.000 0.016 0.000
#> SRR1199009 2 0.2980 0.7510 0.000 0.800 0.192 0.000 0.008 0.000
#> SRR1199010 2 0.1334 0.8560 0.000 0.948 0.020 0.000 0.032 0.000
#> SRR1199011 1 0.3419 0.7686 0.804 0.000 0.000 0.152 0.040 0.004
#> SRR1199012 2 0.3558 0.6983 0.000 0.760 0.212 0.000 0.028 0.000
#> SRR1199013 5 0.5906 0.5579 0.000 0.352 0.184 0.004 0.460 0.000
#> SRR1199015 1 0.0000 0.9489 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199016 3 0.2879 0.8123 0.000 0.072 0.864 0.008 0.056 0.000
#> SRR1199017 1 0.0767 0.9395 0.976 0.000 0.004 0.008 0.012 0.000
#> SRR1199018 1 0.0260 0.9480 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199019 1 0.3390 0.7875 0.816 0.000 0.016 0.028 0.140 0.000
#> SRR1199020 2 0.2250 0.8449 0.000 0.888 0.092 0.000 0.020 0.000
#> SRR1199021 2 0.2119 0.8540 0.000 0.904 0.060 0.000 0.036 0.000
#> SRR1199022 1 0.0000 0.9489 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199023 1 0.0436 0.9465 0.988 0.000 0.000 0.004 0.004 0.004
#> SRR1199025 1 0.1649 0.9117 0.936 0.000 0.008 0.016 0.040 0.000
#> SRR1199026 1 0.0260 0.9480 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199027 3 0.6101 0.2294 0.000 0.028 0.532 0.176 0.264 0.000
#> SRR1199028 2 0.2119 0.8537 0.000 0.904 0.060 0.000 0.036 0.000
#> SRR1199029 1 0.0000 0.9489 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199031 2 0.0717 0.8530 0.000 0.976 0.008 0.000 0.016 0.000
#> SRR1199032 2 0.1524 0.8577 0.000 0.932 0.060 0.000 0.008 0.000
#> SRR1199033 2 0.1686 0.8570 0.000 0.924 0.064 0.000 0.012 0.000
#> SRR1199034 3 0.2170 0.8273 0.000 0.100 0.888 0.000 0.012 0.000
#> SRR1199035 3 0.2311 0.8217 0.000 0.104 0.880 0.000 0.016 0.000
#> SRR1199036 2 0.2631 0.8011 0.000 0.840 0.152 0.000 0.008 0.000
#> SRR1199037 2 0.2333 0.8472 0.000 0.884 0.092 0.000 0.024 0.000
#> SRR1199038 2 0.3253 0.7392 0.000 0.788 0.192 0.000 0.020 0.000
#> SRR1199040 2 0.2020 0.8448 0.000 0.896 0.096 0.000 0.008 0.000
#> SRR1199042 5 0.6226 0.0718 0.000 0.048 0.180 0.220 0.552 0.000
#> SRR1199043 2 0.2882 0.7678 0.000 0.812 0.180 0.000 0.008 0.000
#> SRR1199044 3 0.1610 0.8394 0.000 0.084 0.916 0.000 0.000 0.000
#> SRR1199045 3 0.1858 0.8377 0.000 0.076 0.912 0.000 0.012 0.000
#> SRR1199046 2 0.4377 0.1048 0.000 0.540 0.436 0.000 0.024 0.000
#> SRR1199047 2 0.2653 0.8072 0.000 0.844 0.144 0.000 0.012 0.000
#> SRR1199048 2 0.3265 0.4949 0.000 0.748 0.000 0.004 0.248 0.000
#> SRR1199049 4 0.3197 0.7171 0.008 0.000 0.012 0.804 0.176 0.000
#> SRR1199050 4 0.2402 0.6915 0.140 0.000 0.000 0.856 0.000 0.004
#> SRR1199051 2 0.2730 0.7998 0.000 0.836 0.152 0.000 0.012 0.000
#> SRR1199052 3 0.2019 0.8354 0.000 0.088 0.900 0.000 0.012 0.000
#> SRR1199054 2 0.1700 0.8521 0.000 0.916 0.080 0.000 0.004 0.000
#> SRR1199056 2 0.4980 0.4319 0.000 0.648 0.168 0.000 0.184 0.000
#> SRR1199057 2 0.2119 0.8525 0.000 0.904 0.060 0.000 0.036 0.000
#> SRR1199059 2 0.0363 0.8514 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR1199060 2 0.0291 0.8538 0.000 0.992 0.004 0.000 0.004 0.000
#> SRR1199061 2 0.0458 0.8491 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR1199062 4 0.2026 0.7565 0.060 0.000 0.012 0.916 0.008 0.004
#> SRR1199064 6 0.0146 0.0000 0.004 0.000 0.000 0.000 0.000 0.996
#> SRR1199065 1 0.0260 0.9480 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199067 2 0.2333 0.8438 0.000 0.884 0.092 0.000 0.024 0.000
#> SRR1199075 1 0.0146 0.9486 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1199076 2 0.0820 0.8415 0.000 0.972 0.012 0.000 0.016 0.000
#> SRR1199077 1 0.0291 0.9478 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR1199078 2 0.0547 0.8497 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR1199079 2 0.0725 0.8421 0.000 0.976 0.012 0.000 0.012 0.000
#> SRR1199080 1 0.0520 0.9456 0.984 0.000 0.000 0.008 0.008 0.000
#> SRR1199081 3 0.5629 -0.0302 0.000 0.148 0.448 0.000 0.404 0.000
#> SRR1199082 5 0.6046 0.6051 0.000 0.360 0.044 0.100 0.496 0.000
#> SRR1199083 1 0.0000 0.9489 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199084 1 0.0000 0.9489 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1199085 1 0.0146 0.9485 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199086 1 0.0291 0.9478 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR1199087 2 0.0622 0.8453 0.000 0.980 0.008 0.000 0.012 0.000
#> SRR1199088 3 0.1700 0.8403 0.000 0.080 0.916 0.000 0.004 0.000
#> SRR1199089 3 0.2507 0.8226 0.000 0.072 0.884 0.004 0.040 0.000
#> SRR1199090 5 0.5168 0.4668 0.000 0.440 0.064 0.008 0.488 0.000
#> SRR1199091 1 0.0508 0.9463 0.984 0.000 0.000 0.012 0.004 0.000
#> SRR1199092 1 0.0146 0.9488 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1199093 2 0.0547 0.8485 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR1199094 1 0.0146 0.9485 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1199095 2 0.1088 0.8362 0.000 0.960 0.016 0.000 0.024 0.000
#> SRR1199096 3 0.5195 0.3175 0.000 0.084 0.540 0.004 0.372 0.000
#> SRR1199097 3 0.3529 0.6035 0.000 0.208 0.764 0.000 0.028 0.000
#> SRR1199098 2 0.1285 0.8583 0.000 0.944 0.052 0.000 0.004 0.000
#> SRR1199099 1 0.3907 0.2827 0.588 0.000 0.000 0.408 0.000 0.004
#> SRR1199100 2 0.0777 0.8450 0.000 0.972 0.004 0.000 0.024 0.000
#> SRR1199101 2 0.1049 0.8596 0.000 0.960 0.032 0.000 0.008 0.000
#> SRR1199102 1 0.2902 0.7492 0.800 0.000 0.000 0.196 0.000 0.004
#> SRR1199103 2 0.0632 0.8475 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR1199104 3 0.1913 0.8403 0.000 0.080 0.908 0.000 0.012 0.000
#> SRR1199105 5 0.6082 0.3159 0.000 0.136 0.268 0.044 0.552 0.000
#> SRR1199106 2 0.2431 0.8189 0.000 0.860 0.132 0.000 0.008 0.000
#> SRR1199107 2 0.0692 0.8464 0.000 0.976 0.004 0.000 0.020 0.000
#> SRR1199108 4 0.3151 0.6485 0.000 0.000 0.000 0.748 0.252 0.000
#> SRR1199109 2 0.0363 0.8497 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR1199110 2 0.5260 0.3438 0.000 0.652 0.056 0.056 0.236 0.000
#> SRR1199111 2 0.0777 0.8586 0.000 0.972 0.024 0.000 0.004 0.000
#> SRR1199112 3 0.2288 0.8283 0.000 0.072 0.896 0.004 0.028 0.000
#> SRR1199113 3 0.3055 0.8057 0.000 0.072 0.852 0.008 0.068 0.000
#> SRR1199114 1 0.0260 0.9480 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199115 1 0.0260 0.9480 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1199116 2 0.1908 0.7916 0.000 0.900 0.004 0.000 0.096 0.000
#> SRR1199117 4 0.4151 0.7046 0.076 0.000 0.004 0.744 0.176 0.000
#> SRR1199118 1 0.0865 0.9340 0.964 0.000 0.000 0.036 0.000 0.000
#> SRR1199119 2 0.2053 0.8392 0.000 0.888 0.108 0.000 0.004 0.000
#> SRR1199120 3 0.1951 0.8381 0.000 0.076 0.908 0.000 0.016 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
sessionInfo()
#> R version 3.6.0 (2019-04-26)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: CentOS Linux 7 (Core)
#>
#> Matrix products: default
#> BLAS: /usr/lib64/libblas.so.3.4.2
#> LAPACK: /usr/lib64/liblapack.so.3.4.2
#>
#> locale:
#> [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8
#> [4] LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
#> [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C
#> [10] LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] grid stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] genefilter_1.66.0 ComplexHeatmap_2.3.1 markdown_1.1 knitr_1.26
#> [5] GetoptLong_0.1.7 cola_1.3.2
#>
#> loaded via a namespace (and not attached):
#> [1] circlize_0.4.8 shape_1.4.4 xfun_0.11 slam_0.1-46
#> [5] lattice_0.20-38 splines_3.6.0 colorspace_1.4-1 vctrs_0.2.0
#> [9] stats4_3.6.0 blob_1.2.0 XML_3.98-1.20 survival_2.44-1.1
#> [13] rlang_0.4.2 pillar_1.4.2 DBI_1.0.0 BiocGenerics_0.30.0
#> [17] bit64_0.9-7 RColorBrewer_1.1-2 matrixStats_0.55.0 stringr_1.4.0
#> [21] GlobalOptions_0.1.1 evaluate_0.14 memoise_1.1.0 Biobase_2.44.0
#> [25] IRanges_2.18.3 parallel_3.6.0 AnnotationDbi_1.46.1 highr_0.8
#> [29] Rcpp_1.0.3 xtable_1.8-4 backports_1.1.5 S4Vectors_0.22.1
#> [33] annotate_1.62.0 skmeans_0.2-11 bit_1.1-14 microbenchmark_1.4-7
#> [37] brew_1.0-6 impute_1.58.0 rjson_0.2.20 png_0.1-7
#> [41] digest_0.6.23 stringi_1.4.3 polyclip_1.10-0 clue_0.3-57
#> [45] tools_3.6.0 bitops_1.0-6 magrittr_1.5 eulerr_6.0.0
#> [49] RCurl_1.95-4.12 RSQLite_2.1.4 tibble_2.1.3 cluster_2.1.0
#> [53] crayon_1.3.4 pkgconfig_2.0.3 zeallot_0.1.0 Matrix_1.2-17
#> [57] xml2_1.2.2 httr_1.4.1 R6_2.4.1 mclust_5.4.5
#> [61] compiler_3.6.0