Date: 2019-12-26 00:44:25 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 16620 rows and 87 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] 16620 87
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 | ||
---|---|---|---|---|---|
CV:skmeans | 2 | 1.000 | 0.958 | 0.983 | ** |
ATC:skmeans | 2 | 1.000 | 0.976 | 0.989 | ** |
ATC:pam | 2 | 1.000 | 0.957 | 0.983 | ** |
CV:hclust | 2 | 0.952 | 0.933 | 0.967 | ** |
MAD:NMF | 2 | 0.928 | 0.930 | 0.971 | * |
SD:NMF | 2 | 0.927 | 0.926 | 0.969 | * |
ATC:NMF | 3 | 0.828 | 0.888 | 0.947 | |
CV:NMF | 2 | 0.814 | 0.882 | 0.951 | |
SD:skmeans | 3 | 0.788 | 0.858 | 0.927 | |
ATC:mclust | 2 | 0.738 | 0.920 | 0.949 | |
MAD:pam | 2 | 0.700 | 0.862 | 0.931 | |
ATC:kmeans | 3 | 0.696 | 0.813 | 0.896 | |
MAD:skmeans | 2 | 0.668 | 0.740 | 0.900 | |
ATC:hclust | 3 | 0.553 | 0.839 | 0.897 | |
SD:pam | 2 | 0.469 | 0.863 | 0.905 | |
MAD:mclust | 5 | 0.469 | 0.533 | 0.692 | |
MAD:hclust | 3 | 0.467 | 0.784 | 0.877 | |
MAD:kmeans | 2 | 0.463 | 0.791 | 0.888 | |
SD:kmeans | 2 | 0.463 | 0.819 | 0.899 | |
SD:hclust | 3 | 0.447 | 0.765 | 0.854 | |
CV:pam | 3 | 0.357 | 0.576 | 0.714 | |
CV:kmeans | 4 | 0.326 | 0.561 | 0.686 | |
CV:mclust | 3 | 0.265 | 0.666 | 0.754 | |
SD:mclust | 3 | 0.140 | 0.246 | 0.622 |
**: 1-PAC > 0.95, *: 1-PAC > 0.9
Cumulative distribution function curves of consensus matrix for all methods.
collect_plots(res_list, fun = plot_ecdf)
Consensus heatmaps for all methods. (What is a consensus heatmap?)
collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)
Membership heatmaps for all methods. (What is a membership heatmap?)
collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)
Signature heatmaps for all methods. (What is a signature heatmap?)
Note in following heatmaps, rows are scaled.
collect_plots(res_list, k = 2, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)
The statistics used for measuring the stability of consensus partitioning. (How are they defined?)
get_stats(res_list, k = 2)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 2 0.927 0.926 0.969 0.462 0.536 0.536
#> CV:NMF 2 0.814 0.882 0.951 0.460 0.524 0.524
#> MAD:NMF 2 0.928 0.930 0.971 0.459 0.536 0.536
#> ATC:NMF 2 0.815 0.852 0.942 0.499 0.497 0.497
#> SD:skmeans 2 0.668 0.814 0.921 0.502 0.500 0.500
#> CV:skmeans 2 1.000 0.958 0.983 0.496 0.500 0.500
#> MAD:skmeans 2 0.668 0.740 0.900 0.503 0.496 0.496
#> ATC:skmeans 2 1.000 0.976 0.989 0.506 0.494 0.494
#> SD:mclust 2 0.542 0.716 0.861 0.340 0.777 0.777
#> CV:mclust 2 0.824 0.937 0.950 0.278 0.743 0.743
#> MAD:mclust 2 0.493 0.725 0.828 0.365 0.518 0.518
#> ATC:mclust 2 0.738 0.920 0.949 0.431 0.530 0.530
#> SD:kmeans 2 0.463 0.819 0.899 0.448 0.524 0.524
#> CV:kmeans 2 0.700 0.849 0.927 0.399 0.586 0.586
#> MAD:kmeans 2 0.463 0.791 0.888 0.464 0.524 0.524
#> ATC:kmeans 2 0.475 0.779 0.898 0.494 0.502 0.502
#> SD:pam 2 0.469 0.863 0.905 0.468 0.500 0.500
#> CV:pam 2 0.368 0.748 0.825 0.362 0.743 0.743
#> MAD:pam 2 0.700 0.862 0.931 0.498 0.500 0.500
#> ATC:pam 2 1.000 0.957 0.983 0.504 0.496 0.496
#> SD:hclust 2 0.758 0.916 0.960 0.334 0.682 0.682
#> CV:hclust 2 0.952 0.933 0.967 0.279 0.682 0.682
#> MAD:hclust 2 0.817 0.941 0.971 0.323 0.682 0.682
#> ATC:hclust 2 0.466 0.776 0.884 0.487 0.513 0.513
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.685 0.772 0.905 0.427 0.693 0.477
#> CV:NMF 3 0.673 0.770 0.896 0.447 0.632 0.398
#> MAD:NMF 3 0.679 0.765 0.898 0.443 0.681 0.461
#> ATC:NMF 3 0.828 0.888 0.947 0.329 0.711 0.483
#> SD:skmeans 3 0.788 0.858 0.927 0.323 0.763 0.555
#> CV:skmeans 3 0.699 0.808 0.904 0.336 0.793 0.605
#> MAD:skmeans 3 0.598 0.806 0.893 0.321 0.725 0.499
#> ATC:skmeans 3 0.825 0.929 0.947 0.301 0.703 0.475
#> SD:mclust 3 0.140 0.246 0.622 0.565 0.621 0.530
#> CV:mclust 3 0.265 0.666 0.754 1.062 0.647 0.529
#> MAD:mclust 3 0.200 0.398 0.709 0.603 0.691 0.467
#> ATC:mclust 3 0.645 0.853 0.905 0.412 0.823 0.680
#> SD:kmeans 3 0.324 0.427 0.633 0.392 0.801 0.640
#> CV:kmeans 3 0.306 0.496 0.661 0.442 0.743 0.584
#> MAD:kmeans 3 0.316 0.414 0.642 0.362 0.706 0.497
#> ATC:kmeans 3 0.696 0.813 0.896 0.319 0.752 0.544
#> SD:pam 3 0.591 0.797 0.889 0.300 0.873 0.754
#> CV:pam 3 0.357 0.576 0.714 0.647 0.644 0.520
#> MAD:pam 3 0.627 0.819 0.906 0.236 0.878 0.760
#> ATC:pam 3 0.855 0.871 0.946 0.274 0.745 0.543
#> SD:hclust 3 0.447 0.765 0.854 0.789 0.750 0.633
#> CV:hclust 3 0.399 0.578 0.717 0.914 0.694 0.552
#> MAD:hclust 3 0.467 0.784 0.877 0.849 0.718 0.586
#> ATC:hclust 3 0.553 0.839 0.897 0.236 0.888 0.781
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.617 0.665 0.837 0.136 0.794 0.474
#> CV:NMF 4 0.649 0.743 0.842 0.128 0.813 0.514
#> MAD:NMF 4 0.652 0.707 0.853 0.131 0.746 0.387
#> ATC:NMF 4 0.802 0.854 0.923 0.128 0.868 0.629
#> SD:skmeans 4 0.654 0.698 0.839 0.121 0.902 0.712
#> CV:skmeans 4 0.600 0.537 0.740 0.120 0.919 0.769
#> MAD:skmeans 4 0.663 0.682 0.837 0.122 0.862 0.616
#> ATC:skmeans 4 0.874 0.804 0.902 0.132 0.888 0.683
#> SD:mclust 4 0.231 0.507 0.605 0.261 0.624 0.320
#> CV:mclust 4 0.346 0.636 0.759 0.207 0.858 0.656
#> MAD:mclust 4 0.278 0.447 0.672 0.094 0.683 0.336
#> ATC:mclust 4 0.524 0.499 0.712 0.131 0.698 0.390
#> SD:kmeans 4 0.391 0.486 0.641 0.143 0.720 0.394
#> CV:kmeans 4 0.326 0.561 0.686 0.181 0.827 0.623
#> MAD:kmeans 4 0.382 0.496 0.699 0.135 0.843 0.595
#> ATC:kmeans 4 0.577 0.573 0.722 0.119 0.889 0.686
#> SD:pam 4 0.708 0.676 0.867 0.179 0.819 0.580
#> CV:pam 4 0.421 0.560 0.697 0.182 0.749 0.440
#> MAD:pam 4 0.735 0.807 0.913 0.160 0.857 0.652
#> ATC:pam 4 0.740 0.828 0.907 0.102 0.721 0.411
#> SD:hclust 4 0.545 0.596 0.770 0.194 0.842 0.641
#> CV:hclust 4 0.416 0.562 0.713 0.182 0.827 0.602
#> MAD:hclust 4 0.573 0.683 0.779 0.185 0.867 0.684
#> ATC:hclust 4 0.602 0.806 0.841 0.124 0.929 0.824
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.650 0.657 0.813 0.0673 0.852 0.500
#> CV:NMF 5 0.656 0.625 0.768 0.0646 0.878 0.569
#> MAD:NMF 5 0.751 0.749 0.867 0.0702 0.865 0.530
#> ATC:NMF 5 0.732 0.689 0.798 0.0694 0.898 0.637
#> SD:skmeans 5 0.677 0.677 0.813 0.0640 0.927 0.724
#> CV:skmeans 5 0.625 0.526 0.697 0.0651 0.876 0.595
#> MAD:skmeans 5 0.688 0.663 0.821 0.0653 0.908 0.666
#> ATC:skmeans 5 0.833 0.832 0.898 0.0581 0.906 0.664
#> SD:mclust 5 0.329 0.287 0.555 0.0921 0.744 0.322
#> CV:mclust 5 0.482 0.584 0.726 0.0908 0.948 0.816
#> MAD:mclust 5 0.469 0.533 0.692 0.2044 0.789 0.417
#> ATC:mclust 5 0.612 0.783 0.817 0.0735 0.751 0.372
#> SD:kmeans 5 0.456 0.426 0.643 0.0739 0.923 0.719
#> CV:kmeans 5 0.395 0.453 0.634 0.0924 0.944 0.849
#> MAD:kmeans 5 0.510 0.515 0.688 0.0773 0.895 0.637
#> ATC:kmeans 5 0.600 0.561 0.719 0.0717 0.866 0.558
#> SD:pam 5 0.694 0.621 0.807 0.0787 0.917 0.715
#> CV:pam 5 0.479 0.518 0.737 0.0553 0.859 0.554
#> MAD:pam 5 0.765 0.742 0.866 0.0857 0.903 0.679
#> ATC:pam 5 0.862 0.837 0.930 0.1071 0.838 0.524
#> SD:hclust 5 0.710 0.671 0.825 0.0822 0.914 0.713
#> CV:hclust 5 0.541 0.633 0.727 0.1404 0.906 0.733
#> MAD:hclust 5 0.675 0.748 0.862 0.0968 0.886 0.641
#> ATC:hclust 5 0.800 0.818 0.891 0.0603 0.993 0.977
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.689 0.549 0.741 0.0441 0.899 0.564
#> CV:NMF 6 0.691 0.659 0.783 0.0412 0.911 0.604
#> MAD:NMF 6 0.707 0.556 0.756 0.0419 0.896 0.552
#> ATC:NMF 6 0.670 0.524 0.742 0.0399 0.915 0.630
#> SD:skmeans 6 0.688 0.554 0.747 0.0409 0.979 0.898
#> CV:skmeans 6 0.653 0.503 0.681 0.0418 0.936 0.715
#> MAD:skmeans 6 0.702 0.623 0.759 0.0396 1.000 1.000
#> ATC:skmeans 6 0.798 0.752 0.843 0.0390 0.947 0.760
#> SD:mclust 6 0.464 0.488 0.669 0.0756 0.796 0.338
#> CV:mclust 6 0.516 0.617 0.706 0.0629 0.918 0.669
#> MAD:mclust 6 0.520 0.391 0.596 0.0343 0.868 0.477
#> ATC:mclust 6 0.548 0.337 0.593 0.0920 0.769 0.301
#> SD:kmeans 6 0.563 0.443 0.640 0.0488 0.977 0.898
#> CV:kmeans 6 0.453 0.344 0.556 0.0535 0.874 0.635
#> MAD:kmeans 6 0.583 0.471 0.665 0.0459 0.928 0.688
#> ATC:kmeans 6 0.657 0.479 0.683 0.0453 0.933 0.716
#> SD:pam 6 0.728 0.648 0.797 0.0366 0.961 0.828
#> CV:pam 6 0.526 0.435 0.637 0.0566 0.830 0.421
#> MAD:pam 6 0.779 0.763 0.859 0.0381 0.971 0.870
#> ATC:pam 6 0.857 0.823 0.911 0.0589 0.903 0.593
#> SD:hclust 6 0.737 0.557 0.754 0.0429 0.878 0.549
#> CV:hclust 6 0.608 0.658 0.780 0.0553 0.944 0.811
#> MAD:hclust 6 0.744 0.694 0.787 0.0465 1.000 1.000
#> ATC:hclust 6 0.767 0.818 0.849 0.0687 0.850 0.560
Following heatmap plots the partition for each combination of methods and the lightness correspond to the silhouette scores for samples in each method. On top the consensus subgroup is inferred from all methods by taking the mean silhouette scores as weight.
collect_stats(res_list, k = 2)
collect_stats(res_list, k = 3)
collect_stats(res_list, k = 4)
collect_stats(res_list, k = 5)
collect_stats(res_list, k = 6)
Collect partitions from all methods:
collect_classes(res_list, k = 2)
collect_classes(res_list, k = 3)
collect_classes(res_list, k = 4)
collect_classes(res_list, k = 5)
collect_classes(res_list, k = 6)
Overlap of top rows from different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "euler")
top_rows_overlap(res_list, top_n = 2000, method = "euler")
top_rows_overlap(res_list, top_n = 3000, method = "euler")
top_rows_overlap(res_list, top_n = 4000, method = "euler")
top_rows_overlap(res_list, top_n = 5000, method = "euler")
Also visualize the correspondance of rankings between different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "correspondance")
top_rows_overlap(res_list, top_n = 2000, method = "correspondance")
top_rows_overlap(res_list, top_n = 3000, method = "correspondance")
top_rows_overlap(res_list, top_n = 4000, method = "correspondance")
top_rows_overlap(res_list, top_n = 5000, method = "correspondance")
Heatmaps of the top rows:
top_rows_heatmap(res_list, top_n = 1000)
top_rows_heatmap(res_list, top_n = 2000)
top_rows_heatmap(res_list, top_n = 3000)
top_rows_heatmap(res_list, top_n = 4000)
top_rows_heatmap(res_list, top_n = 5000)
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "hclust"]
# you can also extract it by
# res = res_list["SD:hclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.758 0.916 0.960 0.3342 0.682 0.682
#> 3 3 0.447 0.765 0.854 0.7894 0.750 0.633
#> 4 4 0.545 0.596 0.770 0.1945 0.842 0.641
#> 5 5 0.710 0.671 0.825 0.0822 0.914 0.713
#> 6 6 0.737 0.557 0.754 0.0429 0.878 0.549
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 2 0.574 0.887 0.136 0.864
#> SRR1785239 2 0.574 0.887 0.136 0.864
#> SRR1785240 1 0.000 0.961 1.000 0.000
#> SRR1785241 1 0.000 0.961 1.000 0.000
#> SRR1785242 1 0.000 0.961 1.000 0.000
#> SRR1785243 1 0.000 0.961 1.000 0.000
#> SRR1785244 1 0.000 0.961 1.000 0.000
#> SRR1785245 1 0.000 0.961 1.000 0.000
#> SRR1785246 1 0.000 0.961 1.000 0.000
#> SRR1785247 1 0.000 0.961 1.000 0.000
#> SRR1785248 2 0.529 0.899 0.120 0.880
#> SRR1785250 1 0.000 0.961 1.000 0.000
#> SRR1785251 1 0.000 0.961 1.000 0.000
#> SRR1785252 1 0.000 0.961 1.000 0.000
#> SRR1785253 1 0.000 0.961 1.000 0.000
#> SRR1785254 1 0.895 0.554 0.688 0.312
#> SRR1785255 1 0.895 0.554 0.688 0.312
#> SRR1785256 1 0.000 0.961 1.000 0.000
#> SRR1785257 1 0.000 0.961 1.000 0.000
#> SRR1785258 1 0.000 0.961 1.000 0.000
#> SRR1785259 1 0.000 0.961 1.000 0.000
#> SRR1785262 1 0.000 0.961 1.000 0.000
#> SRR1785263 1 0.000 0.961 1.000 0.000
#> SRR1785260 1 0.000 0.961 1.000 0.000
#> SRR1785261 1 0.000 0.961 1.000 0.000
#> SRR1785264 2 0.529 0.899 0.120 0.880
#> SRR1785265 2 0.529 0.899 0.120 0.880
#> SRR1785266 2 0.000 0.935 0.000 1.000
#> SRR1785267 2 0.000 0.935 0.000 1.000
#> SRR1785268 1 0.000 0.961 1.000 0.000
#> SRR1785269 1 0.000 0.961 1.000 0.000
#> SRR1785270 1 0.000 0.961 1.000 0.000
#> SRR1785271 1 0.000 0.961 1.000 0.000
#> SRR1785272 1 0.000 0.961 1.000 0.000
#> SRR1785273 1 0.000 0.961 1.000 0.000
#> SRR1785276 1 0.000 0.961 1.000 0.000
#> SRR1785277 1 0.000 0.961 1.000 0.000
#> SRR1785274 1 0.000 0.961 1.000 0.000
#> SRR1785275 1 0.000 0.961 1.000 0.000
#> SRR1785280 2 0.000 0.935 0.000 1.000
#> SRR1785281 2 0.000 0.935 0.000 1.000
#> SRR1785278 1 0.000 0.961 1.000 0.000
#> SRR1785279 1 0.000 0.961 1.000 0.000
#> SRR1785282 1 0.000 0.961 1.000 0.000
#> SRR1785283 1 0.000 0.961 1.000 0.000
#> SRR1785284 1 0.000 0.961 1.000 0.000
#> SRR1785285 1 0.000 0.961 1.000 0.000
#> SRR1785286 1 0.000 0.961 1.000 0.000
#> SRR1785287 1 0.000 0.961 1.000 0.000
#> SRR1785288 1 0.000 0.961 1.000 0.000
#> SRR1785289 1 0.000 0.961 1.000 0.000
#> SRR1785290 2 0.634 0.858 0.160 0.840
#> SRR1785291 2 0.634 0.858 0.160 0.840
#> SRR1785296 1 0.184 0.939 0.972 0.028
#> SRR1785297 1 0.184 0.939 0.972 0.028
#> SRR1785292 2 0.000 0.935 0.000 1.000
#> SRR1785293 2 0.000 0.935 0.000 1.000
#> SRR1785294 1 0.118 0.949 0.984 0.016
#> SRR1785295 1 0.118 0.949 0.984 0.016
#> SRR1785298 1 0.895 0.554 0.688 0.312
#> SRR1785299 1 0.895 0.554 0.688 0.312
#> SRR1785300 1 0.000 0.961 1.000 0.000
#> SRR1785301 1 0.000 0.961 1.000 0.000
#> SRR1785304 1 0.000 0.961 1.000 0.000
#> SRR1785305 1 0.000 0.961 1.000 0.000
#> SRR1785306 1 0.827 0.649 0.740 0.260
#> SRR1785307 1 0.827 0.649 0.740 0.260
#> SRR1785302 1 0.881 0.576 0.700 0.300
#> SRR1785303 1 0.881 0.576 0.700 0.300
#> SRR1785308 1 0.000 0.961 1.000 0.000
#> SRR1785309 1 0.000 0.961 1.000 0.000
#> SRR1785310 1 0.118 0.949 0.984 0.016
#> SRR1785311 1 0.118 0.949 0.984 0.016
#> SRR1785312 1 0.000 0.961 1.000 0.000
#> SRR1785313 1 0.000 0.961 1.000 0.000
#> SRR1785314 1 0.000 0.961 1.000 0.000
#> SRR1785315 1 0.000 0.961 1.000 0.000
#> SRR1785318 2 0.000 0.935 0.000 1.000
#> SRR1785319 2 0.000 0.935 0.000 1.000
#> SRR1785316 1 0.000 0.961 1.000 0.000
#> SRR1785317 1 0.000 0.961 1.000 0.000
#> SRR1785324 2 0.000 0.935 0.000 1.000
#> SRR1785325 2 0.000 0.935 0.000 1.000
#> SRR1785320 1 0.000 0.961 1.000 0.000
#> SRR1785321 1 0.000 0.961 1.000 0.000
#> SRR1785322 1 0.000 0.961 1.000 0.000
#> SRR1785323 1 0.000 0.961 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 2 0.447 0.8974 0.060 0.864 0.076
#> SRR1785239 2 0.447 0.8974 0.060 0.864 0.076
#> SRR1785240 1 0.296 0.7931 0.900 0.000 0.100
#> SRR1785241 1 0.296 0.7931 0.900 0.000 0.100
#> SRR1785242 3 0.207 0.9163 0.060 0.000 0.940
#> SRR1785243 3 0.207 0.9163 0.060 0.000 0.940
#> SRR1785244 1 0.304 0.7977 0.896 0.000 0.104
#> SRR1785245 1 0.304 0.7977 0.896 0.000 0.104
#> SRR1785246 3 0.196 0.9248 0.056 0.000 0.944
#> SRR1785247 3 0.196 0.9248 0.056 0.000 0.944
#> SRR1785248 2 0.409 0.9065 0.052 0.880 0.068
#> SRR1785250 3 0.304 0.9056 0.104 0.000 0.896
#> SRR1785251 3 0.304 0.9056 0.104 0.000 0.896
#> SRR1785252 3 0.207 0.9163 0.060 0.000 0.940
#> SRR1785253 3 0.207 0.9163 0.060 0.000 0.940
#> SRR1785254 1 0.683 0.4843 0.656 0.312 0.032
#> SRR1785255 1 0.683 0.4843 0.656 0.312 0.032
#> SRR1785256 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785257 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785258 1 0.629 0.2913 0.536 0.000 0.464
#> SRR1785259 1 0.629 0.2913 0.536 0.000 0.464
#> SRR1785262 3 0.271 0.9250 0.088 0.000 0.912
#> SRR1785263 3 0.271 0.9250 0.088 0.000 0.912
#> SRR1785260 1 0.116 0.7880 0.972 0.000 0.028
#> SRR1785261 1 0.116 0.7880 0.972 0.000 0.028
#> SRR1785264 2 0.409 0.9065 0.052 0.880 0.068
#> SRR1785265 2 0.409 0.9065 0.052 0.880 0.068
#> SRR1785266 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785267 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785268 1 0.630 0.2888 0.516 0.000 0.484
#> SRR1785269 1 0.630 0.2888 0.516 0.000 0.484
#> SRR1785270 1 0.288 0.7925 0.904 0.000 0.096
#> SRR1785271 1 0.288 0.7925 0.904 0.000 0.096
#> SRR1785272 1 0.630 0.0518 0.520 0.000 0.480
#> SRR1785273 1 0.630 0.0518 0.520 0.000 0.480
#> SRR1785276 3 0.362 0.8955 0.136 0.000 0.864
#> SRR1785277 3 0.362 0.8955 0.136 0.000 0.864
#> SRR1785274 3 0.334 0.9087 0.120 0.000 0.880
#> SRR1785275 3 0.334 0.9087 0.120 0.000 0.880
#> SRR1785280 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785281 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785278 1 0.382 0.7790 0.852 0.000 0.148
#> SRR1785279 1 0.382 0.7790 0.852 0.000 0.148
#> SRR1785282 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785283 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785284 1 0.296 0.7931 0.900 0.000 0.100
#> SRR1785285 1 0.296 0.7931 0.900 0.000 0.100
#> SRR1785286 1 0.254 0.7989 0.920 0.000 0.080
#> SRR1785287 1 0.254 0.7989 0.920 0.000 0.080
#> SRR1785288 1 0.304 0.7977 0.896 0.000 0.104
#> SRR1785289 1 0.304 0.7977 0.896 0.000 0.104
#> SRR1785290 2 0.478 0.8399 0.124 0.840 0.036
#> SRR1785291 2 0.478 0.8399 0.124 0.840 0.036
#> SRR1785296 1 0.158 0.7933 0.964 0.028 0.008
#> SRR1785297 1 0.158 0.7933 0.964 0.028 0.008
#> SRR1785292 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785293 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785294 1 0.134 0.7961 0.972 0.016 0.012
#> SRR1785295 1 0.134 0.7961 0.972 0.016 0.012
#> SRR1785298 1 0.683 0.4843 0.656 0.312 0.032
#> SRR1785299 1 0.683 0.4843 0.656 0.312 0.032
#> SRR1785300 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785301 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785304 1 0.116 0.7880 0.972 0.000 0.028
#> SRR1785305 1 0.116 0.7880 0.972 0.000 0.028
#> SRR1785306 1 0.642 0.6361 0.708 0.260 0.032
#> SRR1785307 1 0.642 0.6361 0.708 0.260 0.032
#> SRR1785302 1 0.674 0.5059 0.668 0.300 0.032
#> SRR1785303 1 0.674 0.5059 0.668 0.300 0.032
#> SRR1785308 3 0.254 0.9025 0.080 0.000 0.920
#> SRR1785309 3 0.254 0.9025 0.080 0.000 0.920
#> SRR1785310 1 0.134 0.7961 0.972 0.016 0.012
#> SRR1785311 1 0.134 0.7961 0.972 0.016 0.012
#> SRR1785312 1 0.630 0.2888 0.516 0.000 0.484
#> SRR1785313 1 0.630 0.2888 0.516 0.000 0.484
#> SRR1785314 1 0.288 0.7925 0.904 0.000 0.096
#> SRR1785315 1 0.288 0.7925 0.904 0.000 0.096
#> SRR1785318 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785319 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785316 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785317 1 0.319 0.7952 0.888 0.000 0.112
#> SRR1785324 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785325 2 0.000 0.9377 0.000 1.000 0.000
#> SRR1785320 3 0.362 0.8955 0.136 0.000 0.864
#> SRR1785321 3 0.362 0.8955 0.136 0.000 0.864
#> SRR1785322 1 0.382 0.7790 0.852 0.000 0.148
#> SRR1785323 1 0.382 0.7790 0.852 0.000 0.148
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 2 0.3891 0.9011 0.012 0.852 0.036 0.100
#> SRR1785239 2 0.3891 0.9011 0.012 0.852 0.036 0.100
#> SRR1785240 1 0.6887 0.3185 0.456 0.000 0.104 0.440
#> SRR1785241 1 0.6887 0.3185 0.456 0.000 0.104 0.440
#> SRR1785242 3 0.0804 0.8355 0.008 0.000 0.980 0.012
#> SRR1785243 3 0.0804 0.8355 0.008 0.000 0.980 0.012
#> SRR1785244 1 0.0592 0.4661 0.984 0.000 0.000 0.016
#> SRR1785245 1 0.0592 0.4661 0.984 0.000 0.000 0.016
#> SRR1785246 3 0.1940 0.8431 0.076 0.000 0.924 0.000
#> SRR1785247 3 0.1940 0.8431 0.076 0.000 0.924 0.000
#> SRR1785248 2 0.3342 0.9070 0.000 0.868 0.032 0.100
#> SRR1785250 3 0.3764 0.7426 0.216 0.000 0.784 0.000
#> SRR1785251 3 0.3764 0.7426 0.216 0.000 0.784 0.000
#> SRR1785252 3 0.0804 0.8355 0.008 0.000 0.980 0.012
#> SRR1785253 3 0.0804 0.8355 0.008 0.000 0.980 0.012
#> SRR1785254 1 0.8054 0.2220 0.424 0.300 0.008 0.268
#> SRR1785255 1 0.8054 0.2220 0.424 0.300 0.008 0.268
#> SRR1785256 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785257 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785258 3 0.6552 -0.0726 0.440 0.000 0.484 0.076
#> SRR1785259 3 0.6552 -0.0726 0.440 0.000 0.484 0.076
#> SRR1785262 3 0.1209 0.8423 0.032 0.000 0.964 0.004
#> SRR1785263 3 0.1209 0.8423 0.032 0.000 0.964 0.004
#> SRR1785260 4 0.4836 0.7710 0.320 0.000 0.008 0.672
#> SRR1785261 4 0.4836 0.7710 0.320 0.000 0.008 0.672
#> SRR1785264 2 0.3342 0.9070 0.000 0.868 0.032 0.100
#> SRR1785265 2 0.3342 0.9070 0.000 0.868 0.032 0.100
#> SRR1785266 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785267 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785268 1 0.4761 0.2534 0.628 0.000 0.372 0.000
#> SRR1785269 1 0.4761 0.2534 0.628 0.000 0.372 0.000
#> SRR1785270 1 0.6929 0.3160 0.452 0.000 0.108 0.440
#> SRR1785271 1 0.6929 0.3160 0.452 0.000 0.108 0.440
#> SRR1785272 1 0.4746 0.0213 0.632 0.000 0.368 0.000
#> SRR1785273 1 0.4746 0.0213 0.632 0.000 0.368 0.000
#> SRR1785276 3 0.3123 0.8230 0.156 0.000 0.844 0.000
#> SRR1785277 3 0.3123 0.8230 0.156 0.000 0.844 0.000
#> SRR1785274 3 0.2660 0.8192 0.036 0.000 0.908 0.056
#> SRR1785275 3 0.2660 0.8192 0.036 0.000 0.908 0.056
#> SRR1785280 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.1118 0.4724 0.964 0.000 0.036 0.000
#> SRR1785279 1 0.1118 0.4724 0.964 0.000 0.036 0.000
#> SRR1785282 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785284 1 0.6887 0.3185 0.456 0.000 0.104 0.440
#> SRR1785285 1 0.6887 0.3185 0.456 0.000 0.104 0.440
#> SRR1785286 4 0.5007 0.4440 0.172 0.000 0.068 0.760
#> SRR1785287 4 0.5007 0.4440 0.172 0.000 0.068 0.760
#> SRR1785288 1 0.0592 0.4661 0.984 0.000 0.000 0.016
#> SRR1785289 1 0.0592 0.4661 0.984 0.000 0.000 0.016
#> SRR1785290 2 0.4241 0.8535 0.036 0.828 0.012 0.124
#> SRR1785291 2 0.4241 0.8535 0.036 0.828 0.012 0.124
#> SRR1785296 4 0.5783 0.7828 0.448 0.016 0.008 0.528
#> SRR1785297 4 0.5783 0.7828 0.448 0.016 0.008 0.528
#> SRR1785292 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.5447 0.7828 0.460 0.004 0.008 0.528
#> SRR1785295 4 0.5447 0.7828 0.460 0.004 0.008 0.528
#> SRR1785298 1 0.8054 0.2220 0.424 0.300 0.008 0.268
#> SRR1785299 1 0.8054 0.2220 0.424 0.300 0.008 0.268
#> SRR1785300 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785304 4 0.4836 0.7710 0.320 0.000 0.008 0.672
#> SRR1785305 4 0.4836 0.7710 0.320 0.000 0.008 0.672
#> SRR1785306 1 0.8649 0.2576 0.384 0.248 0.036 0.332
#> SRR1785307 1 0.8649 0.2576 0.384 0.248 0.036 0.332
#> SRR1785302 1 0.8021 0.2313 0.436 0.288 0.008 0.268
#> SRR1785303 1 0.8021 0.2313 0.436 0.288 0.008 0.268
#> SRR1785308 3 0.3324 0.8038 0.136 0.000 0.852 0.012
#> SRR1785309 3 0.3324 0.8038 0.136 0.000 0.852 0.012
#> SRR1785310 4 0.5447 0.7828 0.460 0.004 0.008 0.528
#> SRR1785311 4 0.5447 0.7828 0.460 0.004 0.008 0.528
#> SRR1785312 1 0.4761 0.2534 0.628 0.000 0.372 0.000
#> SRR1785313 1 0.4761 0.2534 0.628 0.000 0.372 0.000
#> SRR1785314 1 0.6929 0.3160 0.452 0.000 0.108 0.440
#> SRR1785315 1 0.6929 0.3160 0.452 0.000 0.108 0.440
#> SRR1785318 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.4749 1.000 0.000 0.000 0.000
#> SRR1785324 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.9386 0.000 1.000 0.000 0.000
#> SRR1785320 3 0.3123 0.8230 0.156 0.000 0.844 0.000
#> SRR1785321 3 0.3123 0.8230 0.156 0.000 0.844 0.000
#> SRR1785322 1 0.1118 0.4724 0.964 0.000 0.036 0.000
#> SRR1785323 1 0.1118 0.4724 0.964 0.000 0.036 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 2 0.3987 0.890 0.012 0.840 0.036 0.060 0.052
#> SRR1785239 2 0.3987 0.890 0.012 0.840 0.036 0.060 0.052
#> SRR1785240 5 0.1403 0.839 0.024 0.000 0.024 0.000 0.952
#> SRR1785241 5 0.1403 0.839 0.024 0.000 0.024 0.000 0.952
#> SRR1785242 3 0.1043 0.841 0.000 0.000 0.960 0.000 0.040
#> SRR1785243 3 0.1043 0.841 0.000 0.000 0.960 0.000 0.040
#> SRR1785244 1 0.0510 0.640 0.984 0.000 0.000 0.016 0.000
#> SRR1785245 1 0.0510 0.640 0.984 0.000 0.000 0.016 0.000
#> SRR1785246 3 0.1168 0.849 0.032 0.000 0.960 0.000 0.008
#> SRR1785247 3 0.1168 0.849 0.032 0.000 0.960 0.000 0.008
#> SRR1785248 2 0.3515 0.897 0.000 0.856 0.032 0.060 0.052
#> SRR1785250 3 0.3123 0.740 0.184 0.000 0.812 0.000 0.004
#> SRR1785251 3 0.3123 0.740 0.184 0.000 0.812 0.000 0.004
#> SRR1785252 3 0.1043 0.841 0.000 0.000 0.960 0.000 0.040
#> SRR1785253 3 0.1043 0.841 0.000 0.000 0.960 0.000 0.040
#> SRR1785254 1 0.7996 0.171 0.388 0.292 0.000 0.224 0.096
#> SRR1785255 1 0.7996 0.171 0.388 0.292 0.000 0.224 0.096
#> SRR1785256 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785257 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785258 3 0.6757 0.102 0.400 0.000 0.464 0.060 0.076
#> SRR1785259 3 0.6757 0.102 0.400 0.000 0.464 0.060 0.076
#> SRR1785262 3 0.1568 0.848 0.020 0.000 0.944 0.000 0.036
#> SRR1785263 3 0.1568 0.848 0.020 0.000 0.944 0.000 0.036
#> SRR1785260 4 0.1557 0.621 0.052 0.000 0.000 0.940 0.008
#> SRR1785261 4 0.1557 0.621 0.052 0.000 0.000 0.940 0.008
#> SRR1785264 2 0.3515 0.897 0.000 0.856 0.032 0.060 0.052
#> SRR1785265 2 0.3515 0.897 0.000 0.856 0.032 0.060 0.052
#> SRR1785266 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785267 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785268 1 0.4331 0.237 0.596 0.000 0.400 0.000 0.004
#> SRR1785269 1 0.4331 0.237 0.596 0.000 0.400 0.000 0.004
#> SRR1785270 5 0.1399 0.839 0.020 0.000 0.028 0.000 0.952
#> SRR1785271 5 0.1399 0.839 0.020 0.000 0.028 0.000 0.952
#> SRR1785272 1 0.4088 0.188 0.632 0.000 0.368 0.000 0.000
#> SRR1785273 1 0.4088 0.188 0.632 0.000 0.368 0.000 0.000
#> SRR1785276 3 0.2389 0.832 0.116 0.000 0.880 0.000 0.004
#> SRR1785277 3 0.2389 0.832 0.116 0.000 0.880 0.000 0.004
#> SRR1785274 3 0.2917 0.829 0.024 0.000 0.888 0.040 0.048
#> SRR1785275 3 0.2917 0.829 0.024 0.000 0.888 0.040 0.048
#> SRR1785280 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.0963 0.641 0.964 0.000 0.036 0.000 0.000
#> SRR1785279 1 0.0963 0.641 0.964 0.000 0.036 0.000 0.000
#> SRR1785282 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785284 5 0.1403 0.839 0.024 0.000 0.024 0.000 0.952
#> SRR1785285 5 0.1403 0.839 0.024 0.000 0.024 0.000 0.952
#> SRR1785286 5 0.5315 0.226 0.016 0.000 0.024 0.432 0.528
#> SRR1785287 5 0.5315 0.226 0.016 0.000 0.024 0.432 0.528
#> SRR1785288 1 0.0510 0.640 0.984 0.000 0.000 0.016 0.000
#> SRR1785289 1 0.0510 0.640 0.984 0.000 0.000 0.016 0.000
#> SRR1785290 2 0.4142 0.850 0.008 0.816 0.012 0.072 0.092
#> SRR1785291 2 0.4142 0.850 0.008 0.816 0.012 0.072 0.092
#> SRR1785296 4 0.5728 0.724 0.388 0.012 0.000 0.540 0.060
#> SRR1785297 4 0.5728 0.724 0.388 0.012 0.000 0.540 0.060
#> SRR1785292 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785294 4 0.5401 0.723 0.404 0.000 0.000 0.536 0.060
#> SRR1785295 4 0.5401 0.723 0.404 0.000 0.000 0.536 0.060
#> SRR1785298 1 0.7996 0.171 0.388 0.292 0.000 0.224 0.096
#> SRR1785299 1 0.7996 0.171 0.388 0.292 0.000 0.224 0.096
#> SRR1785300 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785304 4 0.1557 0.621 0.052 0.000 0.000 0.940 0.008
#> SRR1785305 4 0.1557 0.621 0.052 0.000 0.000 0.940 0.008
#> SRR1785306 5 0.4626 0.595 0.020 0.236 0.008 0.012 0.724
#> SRR1785307 5 0.4626 0.595 0.020 0.236 0.008 0.012 0.724
#> SRR1785302 1 0.8040 0.173 0.392 0.280 0.000 0.224 0.104
#> SRR1785303 1 0.8040 0.173 0.392 0.280 0.000 0.224 0.104
#> SRR1785308 3 0.2864 0.799 0.136 0.000 0.852 0.000 0.012
#> SRR1785309 3 0.2864 0.799 0.136 0.000 0.852 0.000 0.012
#> SRR1785310 4 0.5401 0.723 0.404 0.000 0.000 0.536 0.060
#> SRR1785311 4 0.5401 0.723 0.404 0.000 0.000 0.536 0.060
#> SRR1785312 1 0.4331 0.237 0.596 0.000 0.400 0.000 0.004
#> SRR1785313 1 0.4331 0.237 0.596 0.000 0.400 0.000 0.004
#> SRR1785314 5 0.1399 0.839 0.020 0.000 0.028 0.000 0.952
#> SRR1785315 5 0.1399 0.839 0.020 0.000 0.028 0.000 0.952
#> SRR1785318 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.648 1.000 0.000 0.000 0.000 0.000
#> SRR1785324 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 3 0.2389 0.832 0.116 0.000 0.880 0.000 0.004
#> SRR1785321 3 0.2389 0.832 0.116 0.000 0.880 0.000 0.004
#> SRR1785322 1 0.0963 0.641 0.964 0.000 0.036 0.000 0.000
#> SRR1785323 1 0.0963 0.641 0.964 0.000 0.036 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 2 0.6384 0.2387 0.012 0.424 0.024 0.136 0.000 0.404
#> SRR1785239 2 0.6384 0.2387 0.012 0.424 0.024 0.136 0.000 0.404
#> SRR1785240 5 0.0146 0.8382 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1785241 5 0.0146 0.8382 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1785242 3 0.1777 0.5826 0.000 0.000 0.928 0.004 0.024 0.044
#> SRR1785243 3 0.1777 0.5826 0.000 0.000 0.928 0.004 0.024 0.044
#> SRR1785244 1 0.3872 0.6929 0.604 0.000 0.000 0.004 0.000 0.392
#> SRR1785245 1 0.3872 0.6929 0.604 0.000 0.000 0.004 0.000 0.392
#> SRR1785246 3 0.4105 0.6575 0.008 0.000 0.640 0.344 0.004 0.004
#> SRR1785247 3 0.4105 0.6575 0.008 0.000 0.640 0.344 0.004 0.004
#> SRR1785248 2 0.6087 0.2441 0.000 0.424 0.020 0.148 0.000 0.408
#> SRR1785250 3 0.4994 0.6041 0.156 0.000 0.660 0.180 0.004 0.000
#> SRR1785251 3 0.4994 0.6041 0.156 0.000 0.660 0.180 0.004 0.000
#> SRR1785252 3 0.1777 0.5826 0.000 0.000 0.928 0.004 0.024 0.044
#> SRR1785253 3 0.1777 0.5826 0.000 0.000 0.928 0.004 0.024 0.044
#> SRR1785254 6 0.2113 0.7407 0.028 0.004 0.000 0.000 0.060 0.908
#> SRR1785255 6 0.2113 0.7407 0.028 0.004 0.000 0.000 0.060 0.908
#> SRR1785256 1 0.3672 0.7036 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1785257 1 0.3672 0.7036 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1785258 3 0.5447 0.2695 0.020 0.000 0.480 0.000 0.068 0.432
#> SRR1785259 3 0.5447 0.2695 0.020 0.000 0.480 0.000 0.068 0.432
#> SRR1785262 3 0.4689 0.6580 0.008 0.000 0.620 0.336 0.028 0.008
#> SRR1785263 3 0.4689 0.6580 0.008 0.000 0.620 0.336 0.028 0.008
#> SRR1785260 4 0.5649 1.0000 0.356 0.000 0.000 0.484 0.000 0.160
#> SRR1785261 4 0.5649 1.0000 0.356 0.000 0.000 0.484 0.000 0.160
#> SRR1785264 2 0.6087 0.2441 0.000 0.424 0.020 0.148 0.000 0.408
#> SRR1785265 2 0.6087 0.2441 0.000 0.424 0.020 0.148 0.000 0.408
#> SRR1785266 2 0.0000 0.7682 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785267 2 0.0000 0.7682 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785268 3 0.6433 0.1260 0.216 0.000 0.408 0.016 0.004 0.356
#> SRR1785269 3 0.6433 0.1260 0.216 0.000 0.408 0.016 0.004 0.356
#> SRR1785270 5 0.0146 0.8381 0.000 0.000 0.004 0.000 0.996 0.000
#> SRR1785271 5 0.0146 0.8381 0.000 0.000 0.004 0.000 0.996 0.000
#> SRR1785272 1 0.5363 0.3154 0.608 0.000 0.192 0.196 0.000 0.004
#> SRR1785273 1 0.5363 0.3154 0.608 0.000 0.192 0.196 0.000 0.004
#> SRR1785276 3 0.5096 0.6510 0.056 0.000 0.564 0.368 0.004 0.008
#> SRR1785277 3 0.5096 0.6510 0.056 0.000 0.564 0.368 0.004 0.008
#> SRR1785274 3 0.5630 0.6414 0.008 0.000 0.560 0.336 0.024 0.072
#> SRR1785275 3 0.5630 0.6414 0.008 0.000 0.560 0.336 0.024 0.072
#> SRR1785280 2 0.0000 0.7682 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.7682 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.4370 0.6911 0.616 0.000 0.020 0.008 0.000 0.356
#> SRR1785279 1 0.4370 0.6911 0.616 0.000 0.020 0.008 0.000 0.356
#> SRR1785282 1 0.3672 0.7036 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1785283 1 0.3672 0.7036 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1785284 5 0.0146 0.8382 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1785285 5 0.0146 0.8382 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1785286 5 0.5221 0.1268 0.372 0.000 0.000 0.020 0.552 0.056
#> SRR1785287 5 0.5221 0.1268 0.372 0.000 0.000 0.020 0.552 0.056
#> SRR1785288 1 0.3872 0.6929 0.604 0.000 0.000 0.004 0.000 0.392
#> SRR1785289 1 0.3872 0.6929 0.604 0.000 0.000 0.004 0.000 0.392
#> SRR1785290 6 0.6843 -0.2189 0.004 0.376 0.008 0.144 0.052 0.416
#> SRR1785291 6 0.6843 -0.2189 0.004 0.376 0.008 0.144 0.052 0.416
#> SRR1785296 1 0.4118 -0.1194 0.740 0.000 0.000 0.020 0.032 0.208
#> SRR1785297 1 0.4118 -0.1194 0.740 0.000 0.000 0.020 0.032 0.208
#> SRR1785292 2 0.0260 0.7665 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785293 2 0.0260 0.7665 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785294 1 0.4000 -0.0819 0.756 0.000 0.000 0.020 0.032 0.192
#> SRR1785295 1 0.4000 -0.0819 0.756 0.000 0.000 0.020 0.032 0.192
#> SRR1785298 6 0.2113 0.7407 0.028 0.004 0.000 0.000 0.060 0.908
#> SRR1785299 6 0.2113 0.7407 0.028 0.004 0.000 0.000 0.060 0.908
#> SRR1785300 1 0.3672 0.7036 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1785301 1 0.3672 0.7036 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1785304 4 0.5649 1.0000 0.356 0.000 0.000 0.484 0.000 0.160
#> SRR1785305 4 0.5649 1.0000 0.356 0.000 0.000 0.484 0.000 0.160
#> SRR1785306 5 0.4606 0.6063 0.000 0.000 0.008 0.112 0.712 0.168
#> SRR1785307 5 0.4606 0.6063 0.000 0.000 0.008 0.112 0.712 0.168
#> SRR1785302 6 0.2145 0.7341 0.028 0.000 0.000 0.000 0.072 0.900
#> SRR1785303 6 0.2145 0.7341 0.028 0.000 0.000 0.000 0.072 0.900
#> SRR1785308 3 0.3196 0.5435 0.136 0.000 0.824 0.004 0.000 0.036
#> SRR1785309 3 0.3196 0.5435 0.136 0.000 0.824 0.004 0.000 0.036
#> SRR1785310 1 0.4000 -0.0819 0.756 0.000 0.000 0.020 0.032 0.192
#> SRR1785311 1 0.4000 -0.0819 0.756 0.000 0.000 0.020 0.032 0.192
#> SRR1785312 3 0.6433 0.1260 0.216 0.000 0.408 0.016 0.004 0.356
#> SRR1785313 3 0.6433 0.1260 0.216 0.000 0.408 0.016 0.004 0.356
#> SRR1785314 5 0.0146 0.8381 0.000 0.000 0.004 0.000 0.996 0.000
#> SRR1785315 5 0.0146 0.8381 0.000 0.000 0.004 0.000 0.996 0.000
#> SRR1785318 2 0.0000 0.7682 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.7682 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 1 0.4153 0.6969 0.636 0.000 0.000 0.024 0.000 0.340
#> SRR1785317 1 0.4153 0.6969 0.636 0.000 0.000 0.024 0.000 0.340
#> SRR1785324 2 0.0260 0.7665 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785325 2 0.0260 0.7665 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785320 3 0.5096 0.6510 0.056 0.000 0.564 0.368 0.004 0.008
#> SRR1785321 3 0.5096 0.6510 0.056 0.000 0.564 0.368 0.004 0.008
#> SRR1785322 1 0.4370 0.6911 0.616 0.000 0.020 0.008 0.000 0.356
#> SRR1785323 1 0.4370 0.6911 0.616 0.000 0.020 0.008 0.000 0.356
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.463 0.819 0.899 0.4477 0.524 0.524
#> 3 3 0.324 0.427 0.633 0.3922 0.801 0.640
#> 4 4 0.391 0.486 0.641 0.1433 0.720 0.394
#> 5 5 0.456 0.426 0.643 0.0739 0.923 0.719
#> 6 6 0.563 0.443 0.640 0.0488 0.977 0.898
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
#> SRR1785238 2 0.9933 0.330 0.452 0.548
#> SRR1785239 2 0.9933 0.330 0.452 0.548
#> SRR1785240 1 0.0376 0.918 0.996 0.004
#> SRR1785241 1 0.0376 0.918 0.996 0.004
#> SRR1785242 1 0.9170 0.492 0.668 0.332
#> SRR1785243 1 0.9170 0.492 0.668 0.332
#> SRR1785244 1 0.0000 0.919 1.000 0.000
#> SRR1785245 1 0.0000 0.919 1.000 0.000
#> SRR1785246 1 0.2236 0.904 0.964 0.036
#> SRR1785247 1 0.2236 0.904 0.964 0.036
#> SRR1785248 2 0.0672 0.829 0.008 0.992
#> SRR1785250 1 0.2236 0.904 0.964 0.036
#> SRR1785251 1 0.2236 0.904 0.964 0.036
#> SRR1785252 1 0.9170 0.492 0.668 0.332
#> SRR1785253 1 0.9170 0.492 0.668 0.332
#> SRR1785254 2 0.7139 0.823 0.196 0.804
#> SRR1785255 2 0.7139 0.823 0.196 0.804
#> SRR1785256 1 0.0000 0.919 1.000 0.000
#> SRR1785257 1 0.0000 0.919 1.000 0.000
#> SRR1785258 1 0.0376 0.919 0.996 0.004
#> SRR1785259 1 0.0376 0.919 0.996 0.004
#> SRR1785262 1 0.0938 0.917 0.988 0.012
#> SRR1785263 1 0.0938 0.917 0.988 0.012
#> SRR1785260 1 0.5842 0.805 0.860 0.140
#> SRR1785261 1 0.5842 0.805 0.860 0.140
#> SRR1785264 2 0.2236 0.843 0.036 0.964
#> SRR1785265 2 0.2236 0.843 0.036 0.964
#> SRR1785266 2 0.1414 0.838 0.020 0.980
#> SRR1785267 2 0.1414 0.838 0.020 0.980
#> SRR1785268 1 0.0000 0.919 1.000 0.000
#> SRR1785269 1 0.0000 0.919 1.000 0.000
#> SRR1785270 2 0.7056 0.826 0.192 0.808
#> SRR1785271 2 0.7056 0.826 0.192 0.808
#> SRR1785272 1 0.2236 0.904 0.964 0.036
#> SRR1785273 1 0.2236 0.904 0.964 0.036
#> SRR1785276 1 0.0938 0.916 0.988 0.012
#> SRR1785277 1 0.0938 0.916 0.988 0.012
#> SRR1785274 1 0.4022 0.866 0.920 0.080
#> SRR1785275 1 0.4022 0.866 0.920 0.080
#> SRR1785280 2 0.1414 0.838 0.020 0.980
#> SRR1785281 2 0.1414 0.838 0.020 0.980
#> SRR1785278 1 0.0000 0.919 1.000 0.000
#> SRR1785279 1 0.0000 0.919 1.000 0.000
#> SRR1785282 1 0.0000 0.919 1.000 0.000
#> SRR1785283 1 0.0000 0.919 1.000 0.000
#> SRR1785284 1 0.6438 0.772 0.836 0.164
#> SRR1785285 1 0.6438 0.772 0.836 0.164
#> SRR1785286 1 0.6531 0.766 0.832 0.168
#> SRR1785287 1 0.6531 0.766 0.832 0.168
#> SRR1785288 1 0.0000 0.919 1.000 0.000
#> SRR1785289 1 0.0000 0.919 1.000 0.000
#> SRR1785290 2 0.3274 0.845 0.060 0.940
#> SRR1785291 2 0.3274 0.845 0.060 0.940
#> SRR1785296 2 0.9896 0.408 0.440 0.560
#> SRR1785297 2 0.9896 0.408 0.440 0.560
#> SRR1785292 2 0.2236 0.841 0.036 0.964
#> SRR1785293 2 0.2236 0.841 0.036 0.964
#> SRR1785294 1 0.6343 0.777 0.840 0.160
#> SRR1785295 1 0.6343 0.777 0.840 0.160
#> SRR1785298 2 0.9795 0.471 0.416 0.584
#> SRR1785299 2 0.9795 0.471 0.416 0.584
#> SRR1785300 1 0.0000 0.919 1.000 0.000
#> SRR1785301 1 0.0000 0.919 1.000 0.000
#> SRR1785304 2 0.5946 0.838 0.144 0.856
#> SRR1785305 2 0.5946 0.838 0.144 0.856
#> SRR1785306 2 0.6712 0.832 0.176 0.824
#> SRR1785307 2 0.6712 0.832 0.176 0.824
#> SRR1785302 2 0.7139 0.823 0.196 0.804
#> SRR1785303 2 0.7139 0.823 0.196 0.804
#> SRR1785308 1 0.2603 0.899 0.956 0.044
#> SRR1785309 1 0.2603 0.899 0.956 0.044
#> SRR1785310 1 0.6247 0.782 0.844 0.156
#> SRR1785311 1 0.6247 0.782 0.844 0.156
#> SRR1785312 1 0.0376 0.918 0.996 0.004
#> SRR1785313 1 0.0376 0.918 0.996 0.004
#> SRR1785314 2 0.7056 0.826 0.192 0.808
#> SRR1785315 2 0.7056 0.826 0.192 0.808
#> SRR1785318 2 0.1414 0.838 0.020 0.980
#> SRR1785319 2 0.1414 0.838 0.020 0.980
#> SRR1785316 1 0.0000 0.919 1.000 0.000
#> SRR1785317 1 0.0000 0.919 1.000 0.000
#> SRR1785324 2 0.2236 0.841 0.036 0.964
#> SRR1785325 2 0.2236 0.841 0.036 0.964
#> SRR1785320 1 0.0000 0.919 1.000 0.000
#> SRR1785321 1 0.0000 0.919 1.000 0.000
#> SRR1785322 1 0.0376 0.919 0.996 0.004
#> SRR1785323 1 0.0376 0.919 0.996 0.004
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.9991 0.22485 0.332 0.316 0.352
#> SRR1785239 3 0.9991 0.22485 0.332 0.316 0.352
#> SRR1785240 1 0.6825 0.24824 0.496 0.012 0.492
#> SRR1785241 1 0.6825 0.24824 0.496 0.012 0.492
#> SRR1785242 3 0.9109 -0.00542 0.364 0.148 0.488
#> SRR1785243 3 0.9109 -0.00542 0.364 0.148 0.488
#> SRR1785244 1 0.5497 0.50057 0.708 0.000 0.292
#> SRR1785245 1 0.5497 0.50057 0.708 0.000 0.292
#> SRR1785246 1 0.6497 0.46576 0.648 0.016 0.336
#> SRR1785247 1 0.6497 0.46576 0.648 0.016 0.336
#> SRR1785248 2 0.1860 0.73777 0.000 0.948 0.052
#> SRR1785250 1 0.6096 0.50538 0.704 0.016 0.280
#> SRR1785251 1 0.6096 0.50538 0.704 0.016 0.280
#> SRR1785252 3 0.9109 -0.00542 0.364 0.148 0.488
#> SRR1785253 3 0.9109 -0.00542 0.364 0.148 0.488
#> SRR1785254 3 0.8784 0.22897 0.116 0.388 0.496
#> SRR1785255 3 0.8784 0.22897 0.116 0.388 0.496
#> SRR1785256 1 0.2796 0.63283 0.908 0.000 0.092
#> SRR1785257 1 0.2796 0.63283 0.908 0.000 0.092
#> SRR1785258 1 0.5365 0.53434 0.744 0.004 0.252
#> SRR1785259 1 0.5365 0.53434 0.744 0.004 0.252
#> SRR1785262 1 0.6608 0.46237 0.628 0.016 0.356
#> SRR1785263 1 0.6608 0.46237 0.628 0.016 0.356
#> SRR1785260 1 0.7256 0.23682 0.532 0.028 0.440
#> SRR1785261 1 0.7256 0.23682 0.532 0.028 0.440
#> SRR1785264 2 0.4128 0.71662 0.012 0.856 0.132
#> SRR1785265 2 0.4128 0.71662 0.012 0.856 0.132
#> SRR1785266 2 0.0475 0.76400 0.004 0.992 0.004
#> SRR1785267 2 0.0475 0.76400 0.004 0.992 0.004
#> SRR1785268 1 0.0592 0.64635 0.988 0.000 0.012
#> SRR1785269 1 0.0592 0.64635 0.988 0.000 0.012
#> SRR1785270 3 0.8275 0.02260 0.076 0.452 0.472
#> SRR1785271 3 0.8275 0.02260 0.076 0.452 0.472
#> SRR1785272 1 0.5115 0.54647 0.768 0.004 0.228
#> SRR1785273 1 0.5115 0.54647 0.768 0.004 0.228
#> SRR1785276 1 0.5687 0.53205 0.756 0.020 0.224
#> SRR1785277 1 0.5687 0.53205 0.756 0.020 0.224
#> SRR1785274 1 0.7319 0.27370 0.548 0.032 0.420
#> SRR1785275 1 0.7319 0.27370 0.548 0.032 0.420
#> SRR1785280 2 0.0592 0.75988 0.000 0.988 0.012
#> SRR1785281 2 0.0592 0.75988 0.000 0.988 0.012
#> SRR1785278 1 0.1529 0.64489 0.960 0.000 0.040
#> SRR1785279 1 0.1529 0.64489 0.960 0.000 0.040
#> SRR1785282 1 0.1411 0.64446 0.964 0.000 0.036
#> SRR1785283 1 0.1411 0.64446 0.964 0.000 0.036
#> SRR1785284 3 0.6627 0.17327 0.336 0.020 0.644
#> SRR1785285 3 0.6627 0.17327 0.336 0.020 0.644
#> SRR1785286 3 0.6566 0.10752 0.348 0.016 0.636
#> SRR1785287 3 0.6566 0.10752 0.348 0.016 0.636
#> SRR1785288 1 0.5497 0.49598 0.708 0.000 0.292
#> SRR1785289 1 0.5497 0.49598 0.708 0.000 0.292
#> SRR1785290 2 0.5643 0.62307 0.020 0.760 0.220
#> SRR1785291 2 0.5643 0.62307 0.020 0.760 0.220
#> SRR1785296 3 0.9309 0.40628 0.216 0.264 0.520
#> SRR1785297 3 0.9309 0.40628 0.216 0.264 0.520
#> SRR1785292 2 0.2486 0.76334 0.008 0.932 0.060
#> SRR1785293 2 0.2486 0.76334 0.008 0.932 0.060
#> SRR1785294 1 0.7489 0.16411 0.496 0.036 0.468
#> SRR1785295 1 0.7489 0.16411 0.496 0.036 0.468
#> SRR1785298 3 0.9503 0.38720 0.208 0.316 0.476
#> SRR1785299 3 0.9503 0.38720 0.208 0.316 0.476
#> SRR1785300 1 0.5327 0.51409 0.728 0.000 0.272
#> SRR1785301 1 0.5327 0.51409 0.728 0.000 0.272
#> SRR1785304 2 0.7634 0.22231 0.044 0.524 0.432
#> SRR1785305 2 0.7634 0.22231 0.044 0.524 0.432
#> SRR1785306 3 0.7920 -0.05500 0.056 0.468 0.476
#> SRR1785307 3 0.7920 -0.05500 0.056 0.468 0.476
#> SRR1785302 3 0.8708 0.18667 0.108 0.404 0.488
#> SRR1785303 3 0.8708 0.18667 0.108 0.404 0.488
#> SRR1785308 1 0.6630 0.46892 0.672 0.028 0.300
#> SRR1785309 1 0.6630 0.46892 0.672 0.028 0.300
#> SRR1785310 1 0.7392 0.16768 0.500 0.032 0.468
#> SRR1785311 1 0.7392 0.16768 0.500 0.032 0.468
#> SRR1785312 1 0.1163 0.64594 0.972 0.000 0.028
#> SRR1785313 1 0.1163 0.64594 0.972 0.000 0.028
#> SRR1785314 2 0.7990 0.01340 0.060 0.488 0.452
#> SRR1785315 2 0.7990 0.01340 0.060 0.488 0.452
#> SRR1785318 2 0.0829 0.76719 0.004 0.984 0.012
#> SRR1785319 2 0.0829 0.76719 0.004 0.984 0.012
#> SRR1785316 1 0.4974 0.54562 0.764 0.000 0.236
#> SRR1785317 1 0.4974 0.54562 0.764 0.000 0.236
#> SRR1785324 2 0.2774 0.75970 0.008 0.920 0.072
#> SRR1785325 2 0.2774 0.75970 0.008 0.920 0.072
#> SRR1785320 1 0.1529 0.64651 0.960 0.000 0.040
#> SRR1785321 1 0.1529 0.64651 0.960 0.000 0.040
#> SRR1785322 1 0.2537 0.63690 0.920 0.000 0.080
#> SRR1785323 1 0.2537 0.63690 0.920 0.000 0.080
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.8205 0.4415 0.100 0.156 0.576 0.168
#> SRR1785239 3 0.8205 0.4415 0.100 0.156 0.576 0.168
#> SRR1785240 4 0.7752 -0.1406 0.184 0.008 0.348 0.460
#> SRR1785241 4 0.7752 -0.1406 0.184 0.008 0.348 0.460
#> SRR1785242 3 0.4389 0.6183 0.044 0.040 0.840 0.076
#> SRR1785243 3 0.4389 0.6183 0.044 0.040 0.840 0.076
#> SRR1785244 1 0.4485 0.5634 0.772 0.000 0.028 0.200
#> SRR1785245 1 0.4485 0.5634 0.772 0.000 0.028 0.200
#> SRR1785246 3 0.6412 0.4608 0.320 0.000 0.592 0.088
#> SRR1785247 3 0.6412 0.4608 0.320 0.000 0.592 0.088
#> SRR1785248 2 0.2859 0.7978 0.000 0.880 0.112 0.008
#> SRR1785250 3 0.5024 0.4013 0.360 0.000 0.632 0.008
#> SRR1785251 3 0.5024 0.4013 0.360 0.000 0.632 0.008
#> SRR1785252 3 0.4389 0.6183 0.044 0.040 0.840 0.076
#> SRR1785253 3 0.4389 0.6183 0.044 0.040 0.840 0.076
#> SRR1785254 4 0.7130 0.4865 0.072 0.256 0.052 0.620
#> SRR1785255 4 0.7130 0.4865 0.072 0.256 0.052 0.620
#> SRR1785256 1 0.3621 0.6570 0.860 0.000 0.072 0.068
#> SRR1785257 1 0.3621 0.6570 0.860 0.000 0.072 0.068
#> SRR1785258 1 0.6700 -0.1001 0.480 0.000 0.432 0.088
#> SRR1785259 1 0.6700 -0.1001 0.480 0.000 0.432 0.088
#> SRR1785262 3 0.7329 0.4317 0.296 0.000 0.516 0.188
#> SRR1785263 3 0.7329 0.4317 0.296 0.000 0.516 0.188
#> SRR1785260 4 0.7065 0.3082 0.424 0.024 0.064 0.488
#> SRR1785261 4 0.7065 0.3082 0.424 0.024 0.064 0.488
#> SRR1785264 2 0.6577 0.5957 0.004 0.648 0.172 0.176
#> SRR1785265 2 0.6577 0.5957 0.004 0.648 0.172 0.176
#> SRR1785266 2 0.1635 0.8295 0.000 0.948 0.044 0.008
#> SRR1785267 2 0.1635 0.8295 0.000 0.948 0.044 0.008
#> SRR1785268 1 0.3958 0.6278 0.824 0.000 0.144 0.032
#> SRR1785269 1 0.3958 0.6278 0.824 0.000 0.144 0.032
#> SRR1785270 4 0.7641 0.4152 0.048 0.204 0.148 0.600
#> SRR1785271 4 0.7641 0.4152 0.048 0.204 0.148 0.600
#> SRR1785272 1 0.5000 -0.1810 0.500 0.000 0.500 0.000
#> SRR1785273 3 0.5000 0.0964 0.500 0.000 0.500 0.000
#> SRR1785276 1 0.7365 -0.1232 0.440 0.000 0.400 0.160
#> SRR1785277 1 0.7365 -0.1232 0.440 0.000 0.400 0.160
#> SRR1785274 3 0.7673 0.4560 0.208 0.004 0.480 0.308
#> SRR1785275 3 0.7673 0.4560 0.208 0.004 0.480 0.308
#> SRR1785280 2 0.1661 0.8240 0.000 0.944 0.052 0.004
#> SRR1785281 2 0.1661 0.8240 0.000 0.944 0.052 0.004
#> SRR1785278 1 0.3037 0.6542 0.880 0.000 0.100 0.020
#> SRR1785279 1 0.3037 0.6542 0.880 0.000 0.100 0.020
#> SRR1785282 1 0.2198 0.6613 0.920 0.000 0.072 0.008
#> SRR1785283 1 0.2198 0.6613 0.920 0.000 0.072 0.008
#> SRR1785284 4 0.5962 0.4774 0.204 0.008 0.088 0.700
#> SRR1785285 4 0.5962 0.4774 0.204 0.008 0.088 0.700
#> SRR1785286 4 0.4862 0.5266 0.228 0.008 0.020 0.744
#> SRR1785287 4 0.4862 0.5266 0.228 0.008 0.020 0.744
#> SRR1785288 1 0.4706 0.5205 0.748 0.000 0.028 0.224
#> SRR1785289 1 0.4706 0.5205 0.748 0.000 0.028 0.224
#> SRR1785290 2 0.6680 0.3122 0.004 0.564 0.088 0.344
#> SRR1785291 2 0.6680 0.3122 0.004 0.564 0.088 0.344
#> SRR1785296 4 0.8180 0.5455 0.144 0.152 0.120 0.584
#> SRR1785297 4 0.8180 0.5455 0.144 0.152 0.120 0.584
#> SRR1785292 2 0.1722 0.8223 0.000 0.944 0.008 0.048
#> SRR1785293 2 0.1722 0.8223 0.000 0.944 0.008 0.048
#> SRR1785294 4 0.6623 0.3799 0.392 0.028 0.036 0.544
#> SRR1785295 4 0.6623 0.3799 0.392 0.028 0.036 0.544
#> SRR1785298 4 0.8376 0.5298 0.152 0.200 0.096 0.552
#> SRR1785299 4 0.8376 0.5298 0.152 0.200 0.096 0.552
#> SRR1785300 1 0.3764 0.5830 0.816 0.000 0.012 0.172
#> SRR1785301 1 0.3764 0.5830 0.816 0.000 0.012 0.172
#> SRR1785304 4 0.6860 0.2562 0.028 0.332 0.060 0.580
#> SRR1785305 4 0.6860 0.2562 0.028 0.332 0.060 0.580
#> SRR1785306 4 0.6419 0.4155 0.016 0.276 0.068 0.640
#> SRR1785307 4 0.6419 0.4155 0.016 0.276 0.068 0.640
#> SRR1785302 4 0.6780 0.4597 0.064 0.284 0.032 0.620
#> SRR1785303 4 0.6780 0.4597 0.064 0.284 0.032 0.620
#> SRR1785308 3 0.5106 0.4522 0.312 0.008 0.672 0.008
#> SRR1785309 3 0.5106 0.4522 0.312 0.008 0.672 0.008
#> SRR1785310 4 0.6656 0.3633 0.408 0.028 0.036 0.528
#> SRR1785311 4 0.6656 0.3633 0.408 0.028 0.036 0.528
#> SRR1785312 1 0.4452 0.6227 0.796 0.000 0.156 0.048
#> SRR1785313 1 0.4452 0.6227 0.796 0.000 0.156 0.048
#> SRR1785314 4 0.6432 0.4160 0.020 0.272 0.064 0.644
#> SRR1785315 4 0.6432 0.4160 0.020 0.272 0.064 0.644
#> SRR1785318 2 0.0937 0.8312 0.000 0.976 0.012 0.012
#> SRR1785319 2 0.0937 0.8312 0.000 0.976 0.012 0.012
#> SRR1785316 1 0.3160 0.6238 0.872 0.000 0.020 0.108
#> SRR1785317 1 0.3160 0.6238 0.872 0.000 0.020 0.108
#> SRR1785324 2 0.1807 0.8181 0.000 0.940 0.008 0.052
#> SRR1785325 2 0.1807 0.8181 0.000 0.940 0.008 0.052
#> SRR1785320 1 0.4462 0.6201 0.792 0.000 0.164 0.044
#> SRR1785321 1 0.4462 0.6201 0.792 0.000 0.164 0.044
#> SRR1785322 1 0.4485 0.5044 0.740 0.000 0.248 0.012
#> SRR1785323 1 0.4485 0.5044 0.740 0.000 0.248 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.794 0.36499 0.120 0.088 0.532 0.048 0.212
#> SRR1785239 3 0.794 0.36499 0.120 0.088 0.532 0.048 0.212
#> SRR1785240 5 0.774 0.27332 0.152 0.000 0.260 0.120 0.468
#> SRR1785241 5 0.774 0.27332 0.152 0.000 0.260 0.120 0.468
#> SRR1785242 3 0.374 0.58902 0.060 0.020 0.848 0.008 0.064
#> SRR1785243 3 0.374 0.58902 0.060 0.020 0.848 0.008 0.064
#> SRR1785244 1 0.685 0.35819 0.508 0.004 0.028 0.324 0.136
#> SRR1785245 1 0.685 0.35819 0.508 0.004 0.028 0.324 0.136
#> SRR1785246 3 0.664 0.42143 0.372 0.000 0.488 0.032 0.108
#> SRR1785247 3 0.664 0.42143 0.372 0.000 0.488 0.032 0.108
#> SRR1785248 2 0.451 0.68644 0.004 0.780 0.148 0.024 0.044
#> SRR1785250 3 0.556 0.35399 0.416 0.004 0.532 0.012 0.036
#> SRR1785251 3 0.556 0.35399 0.416 0.004 0.532 0.012 0.036
#> SRR1785252 3 0.374 0.59171 0.064 0.020 0.848 0.008 0.060
#> SRR1785253 3 0.374 0.59171 0.064 0.020 0.848 0.008 0.060
#> SRR1785254 5 0.755 0.16861 0.036 0.120 0.040 0.312 0.492
#> SRR1785255 5 0.755 0.16861 0.036 0.120 0.040 0.312 0.492
#> SRR1785256 1 0.390 0.60708 0.816 0.000 0.020 0.128 0.036
#> SRR1785257 1 0.390 0.60708 0.816 0.000 0.020 0.128 0.036
#> SRR1785258 1 0.661 -0.09954 0.504 0.000 0.360 0.036 0.100
#> SRR1785259 1 0.661 -0.09954 0.504 0.000 0.360 0.036 0.100
#> SRR1785262 3 0.790 0.37177 0.300 0.000 0.416 0.108 0.176
#> SRR1785263 3 0.790 0.37177 0.300 0.000 0.416 0.108 0.176
#> SRR1785260 4 0.415 0.52360 0.168 0.008 0.012 0.788 0.024
#> SRR1785261 4 0.415 0.52360 0.168 0.008 0.012 0.788 0.024
#> SRR1785264 2 0.835 0.30415 0.020 0.440 0.168 0.124 0.248
#> SRR1785265 2 0.835 0.30415 0.020 0.440 0.168 0.124 0.248
#> SRR1785266 2 0.153 0.76618 0.004 0.952 0.028 0.008 0.008
#> SRR1785267 2 0.153 0.76618 0.004 0.952 0.028 0.008 0.008
#> SRR1785268 1 0.245 0.59083 0.904 0.000 0.056 0.004 0.036
#> SRR1785269 1 0.245 0.59083 0.904 0.000 0.056 0.004 0.036
#> SRR1785270 5 0.639 0.46477 0.008 0.100 0.104 0.120 0.668
#> SRR1785271 5 0.639 0.46477 0.008 0.100 0.104 0.120 0.668
#> SRR1785272 1 0.601 -0.00983 0.556 0.004 0.360 0.024 0.056
#> SRR1785273 1 0.601 -0.00983 0.556 0.004 0.360 0.024 0.056
#> SRR1785276 1 0.684 -0.01488 0.512 0.000 0.232 0.020 0.236
#> SRR1785277 1 0.684 -0.01488 0.512 0.000 0.232 0.020 0.236
#> SRR1785274 5 0.769 -0.02493 0.196 0.000 0.356 0.068 0.380
#> SRR1785275 5 0.769 -0.02493 0.196 0.000 0.356 0.068 0.380
#> SRR1785280 2 0.149 0.76659 0.004 0.952 0.032 0.008 0.004
#> SRR1785281 2 0.149 0.76659 0.004 0.952 0.032 0.008 0.004
#> SRR1785278 1 0.225 0.61366 0.920 0.000 0.016 0.036 0.028
#> SRR1785279 1 0.225 0.61366 0.920 0.000 0.016 0.036 0.028
#> SRR1785282 1 0.252 0.62131 0.904 0.000 0.012 0.056 0.028
#> SRR1785283 1 0.252 0.62131 0.904 0.000 0.012 0.056 0.028
#> SRR1785284 5 0.688 0.21635 0.084 0.004 0.060 0.336 0.516
#> SRR1785285 5 0.688 0.21635 0.084 0.004 0.060 0.336 0.516
#> SRR1785286 4 0.587 0.30829 0.076 0.000 0.020 0.596 0.308
#> SRR1785287 4 0.587 0.30829 0.076 0.000 0.020 0.596 0.308
#> SRR1785288 1 0.688 0.29771 0.476 0.004 0.028 0.364 0.128
#> SRR1785289 1 0.688 0.29771 0.476 0.004 0.028 0.364 0.128
#> SRR1785290 2 0.826 0.06695 0.008 0.352 0.088 0.288 0.264
#> SRR1785291 2 0.826 0.06695 0.008 0.352 0.088 0.288 0.264
#> SRR1785296 4 0.667 0.45443 0.040 0.060 0.056 0.636 0.208
#> SRR1785297 4 0.667 0.45443 0.040 0.060 0.056 0.636 0.208
#> SRR1785292 2 0.282 0.75380 0.000 0.892 0.020 0.052 0.036
#> SRR1785293 2 0.282 0.75380 0.000 0.892 0.020 0.052 0.036
#> SRR1785294 4 0.419 0.56679 0.140 0.008 0.012 0.800 0.040
#> SRR1785295 4 0.419 0.56679 0.140 0.008 0.012 0.800 0.040
#> SRR1785298 4 0.796 0.30641 0.056 0.120 0.056 0.492 0.276
#> SRR1785299 4 0.796 0.30641 0.056 0.120 0.056 0.492 0.276
#> SRR1785300 1 0.484 0.44702 0.612 0.000 0.000 0.356 0.032
#> SRR1785301 1 0.484 0.44702 0.612 0.000 0.000 0.356 0.032
#> SRR1785304 4 0.572 0.41161 0.004 0.124 0.012 0.668 0.192
#> SRR1785305 4 0.572 0.41161 0.004 0.124 0.012 0.668 0.192
#> SRR1785306 5 0.688 0.35597 0.004 0.136 0.048 0.248 0.564
#> SRR1785307 5 0.688 0.35597 0.004 0.136 0.048 0.248 0.564
#> SRR1785302 4 0.717 0.19627 0.012 0.156 0.024 0.472 0.336
#> SRR1785303 4 0.717 0.19627 0.012 0.156 0.024 0.472 0.336
#> SRR1785308 3 0.535 0.49606 0.284 0.008 0.656 0.032 0.020
#> SRR1785309 3 0.535 0.49606 0.284 0.008 0.656 0.032 0.020
#> SRR1785310 4 0.431 0.55033 0.156 0.008 0.000 0.776 0.060
#> SRR1785311 4 0.431 0.55033 0.156 0.008 0.000 0.776 0.060
#> SRR1785312 1 0.275 0.58810 0.888 0.000 0.060 0.004 0.048
#> SRR1785313 1 0.275 0.58810 0.888 0.000 0.060 0.004 0.048
#> SRR1785314 5 0.607 0.35791 0.000 0.128 0.020 0.232 0.620
#> SRR1785315 5 0.607 0.35791 0.000 0.128 0.020 0.232 0.620
#> SRR1785318 2 0.102 0.76863 0.004 0.972 0.012 0.008 0.004
#> SRR1785319 2 0.102 0.76863 0.004 0.972 0.012 0.008 0.004
#> SRR1785316 1 0.555 0.56936 0.708 0.004 0.032 0.164 0.092
#> SRR1785317 1 0.555 0.56936 0.708 0.004 0.032 0.164 0.092
#> SRR1785324 2 0.286 0.74961 0.000 0.892 0.032 0.036 0.040
#> SRR1785325 2 0.286 0.74961 0.000 0.892 0.032 0.036 0.040
#> SRR1785320 1 0.314 0.59322 0.868 0.000 0.056 0.008 0.068
#> SRR1785321 1 0.314 0.59322 0.868 0.000 0.056 0.008 0.068
#> SRR1785322 1 0.448 0.51410 0.792 0.000 0.112 0.048 0.048
#> SRR1785323 1 0.448 0.51410 0.792 0.000 0.112 0.048 0.048
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.865 0.2211 0.076 0.076 0.420 0.072 0.220 NA
#> SRR1785239 3 0.865 0.2211 0.076 0.076 0.420 0.072 0.220 NA
#> SRR1785240 5 0.751 0.2605 0.100 0.000 0.192 0.092 0.512 NA
#> SRR1785241 5 0.751 0.2605 0.100 0.000 0.192 0.092 0.512 NA
#> SRR1785242 3 0.200 0.5443 0.028 0.004 0.920 0.004 0.044 NA
#> SRR1785243 3 0.200 0.5443 0.028 0.004 0.920 0.004 0.044 NA
#> SRR1785244 1 0.721 0.3652 0.416 0.000 0.004 0.280 0.096 NA
#> SRR1785245 1 0.721 0.3652 0.416 0.000 0.004 0.280 0.096 NA
#> SRR1785246 3 0.767 0.3483 0.304 0.000 0.364 0.036 0.072 NA
#> SRR1785247 3 0.767 0.3483 0.304 0.000 0.364 0.036 0.072 NA
#> SRR1785248 2 0.497 0.7230 0.000 0.740 0.108 0.016 0.052 NA
#> SRR1785250 3 0.600 0.3330 0.312 0.000 0.504 0.016 0.000 NA
#> SRR1785251 3 0.600 0.3330 0.312 0.000 0.504 0.016 0.000 NA
#> SRR1785252 3 0.221 0.5446 0.028 0.004 0.912 0.004 0.048 NA
#> SRR1785253 3 0.221 0.5446 0.028 0.004 0.912 0.004 0.048 NA
#> SRR1785254 5 0.702 0.1867 0.016 0.080 0.032 0.296 0.512 NA
#> SRR1785255 5 0.702 0.1867 0.016 0.080 0.032 0.296 0.512 NA
#> SRR1785256 1 0.386 0.5890 0.808 0.000 0.020 0.116 0.012 NA
#> SRR1785257 1 0.386 0.5890 0.808 0.000 0.020 0.116 0.012 NA
#> SRR1785258 1 0.682 0.1202 0.540 0.000 0.256 0.048 0.060 NA
#> SRR1785259 1 0.682 0.1202 0.540 0.000 0.256 0.048 0.060 NA
#> SRR1785262 3 0.861 0.3294 0.248 0.000 0.324 0.156 0.132 NA
#> SRR1785263 3 0.861 0.3294 0.248 0.000 0.324 0.156 0.132 NA
#> SRR1785260 4 0.401 0.5277 0.092 0.004 0.008 0.808 0.024 NA
#> SRR1785261 4 0.401 0.5277 0.092 0.004 0.008 0.808 0.024 NA
#> SRR1785264 2 0.826 0.3336 0.012 0.444 0.132 0.096 0.196 NA
#> SRR1785265 2 0.826 0.3336 0.012 0.444 0.132 0.096 0.196 NA
#> SRR1785266 2 0.231 0.8280 0.000 0.904 0.020 0.004 0.012 NA
#> SRR1785267 2 0.231 0.8280 0.000 0.904 0.020 0.004 0.012 NA
#> SRR1785268 1 0.279 0.5679 0.876 0.000 0.032 0.008 0.008 NA
#> SRR1785269 1 0.279 0.5679 0.876 0.000 0.032 0.008 0.008 NA
#> SRR1785270 5 0.390 0.5414 0.000 0.064 0.024 0.036 0.824 NA
#> SRR1785271 5 0.390 0.5414 0.000 0.064 0.024 0.036 0.824 NA
#> SRR1785272 1 0.634 -0.0352 0.424 0.000 0.324 0.016 0.000 NA
#> SRR1785273 1 0.634 -0.0352 0.424 0.000 0.324 0.016 0.000 NA
#> SRR1785276 1 0.773 0.0735 0.420 0.000 0.136 0.040 0.132 NA
#> SRR1785277 1 0.773 0.0735 0.420 0.000 0.136 0.040 0.132 NA
#> SRR1785274 5 0.847 -0.1894 0.156 0.004 0.312 0.096 0.312 NA
#> SRR1785275 3 0.847 0.0592 0.156 0.004 0.312 0.096 0.312 NA
#> SRR1785280 2 0.149 0.8386 0.000 0.944 0.024 0.000 0.004 NA
#> SRR1785281 2 0.149 0.8386 0.000 0.944 0.024 0.000 0.004 NA
#> SRR1785278 1 0.267 0.5970 0.892 0.000 0.024 0.032 0.008 NA
#> SRR1785279 1 0.267 0.5970 0.892 0.000 0.024 0.032 0.008 NA
#> SRR1785282 1 0.327 0.6057 0.852 0.000 0.016 0.060 0.008 NA
#> SRR1785283 1 0.327 0.6057 0.852 0.000 0.016 0.060 0.008 NA
#> SRR1785284 5 0.641 0.3680 0.040 0.000 0.036 0.264 0.564 NA
#> SRR1785285 5 0.641 0.3680 0.040 0.000 0.036 0.264 0.564 NA
#> SRR1785286 4 0.510 0.2694 0.020 0.000 0.032 0.636 0.292 NA
#> SRR1785287 4 0.510 0.2694 0.020 0.000 0.032 0.636 0.292 NA
#> SRR1785288 1 0.715 0.2858 0.368 0.000 0.000 0.336 0.096 NA
#> SRR1785289 1 0.715 0.2858 0.368 0.000 0.000 0.336 0.096 NA
#> SRR1785290 4 0.826 0.1048 0.004 0.288 0.064 0.300 0.256 NA
#> SRR1785291 4 0.826 0.1048 0.004 0.288 0.064 0.300 0.256 NA
#> SRR1785296 4 0.566 0.4952 0.032 0.024 0.044 0.696 0.164 NA
#> SRR1785297 4 0.566 0.4952 0.032 0.024 0.044 0.696 0.164 NA
#> SRR1785292 2 0.248 0.8256 0.000 0.896 0.008 0.012 0.020 NA
#> SRR1785293 2 0.248 0.8256 0.000 0.896 0.008 0.012 0.020 NA
#> SRR1785294 4 0.259 0.5565 0.092 0.004 0.004 0.880 0.004 NA
#> SRR1785295 4 0.259 0.5565 0.092 0.004 0.004 0.880 0.004 NA
#> SRR1785298 4 0.707 0.3587 0.032 0.072 0.036 0.552 0.244 NA
#> SRR1785299 4 0.707 0.3587 0.032 0.072 0.036 0.552 0.244 NA
#> SRR1785300 1 0.493 0.4669 0.596 0.000 0.004 0.348 0.016 NA
#> SRR1785301 1 0.493 0.4669 0.596 0.000 0.004 0.348 0.016 NA
#> SRR1785304 4 0.575 0.4716 0.000 0.076 0.008 0.660 0.152 NA
#> SRR1785305 4 0.575 0.4716 0.000 0.076 0.008 0.660 0.152 NA
#> SRR1785306 5 0.554 0.4590 0.000 0.068 0.036 0.180 0.680 NA
#> SRR1785307 5 0.554 0.4590 0.000 0.068 0.036 0.180 0.680 NA
#> SRR1785302 4 0.709 0.2366 0.008 0.092 0.028 0.464 0.336 NA
#> SRR1785303 4 0.709 0.2366 0.008 0.092 0.028 0.464 0.336 NA
#> SRR1785308 3 0.475 0.4621 0.192 0.000 0.692 0.008 0.000 NA
#> SRR1785309 3 0.475 0.4621 0.192 0.000 0.692 0.008 0.000 NA
#> SRR1785310 4 0.266 0.5472 0.084 0.004 0.004 0.880 0.024 NA
#> SRR1785311 4 0.266 0.5472 0.084 0.004 0.004 0.880 0.024 NA
#> SRR1785312 1 0.345 0.5646 0.824 0.000 0.040 0.004 0.012 NA
#> SRR1785313 1 0.345 0.5646 0.824 0.000 0.040 0.004 0.012 NA
#> SRR1785314 5 0.502 0.5028 0.000 0.080 0.012 0.132 0.728 NA
#> SRR1785315 5 0.502 0.5028 0.000 0.080 0.012 0.132 0.728 NA
#> SRR1785318 2 0.107 0.8395 0.000 0.964 0.008 0.000 0.008 NA
#> SRR1785319 2 0.107 0.8395 0.000 0.964 0.008 0.000 0.008 NA
#> SRR1785316 1 0.555 0.5534 0.624 0.000 0.008 0.144 0.012 NA
#> SRR1785317 1 0.555 0.5534 0.624 0.000 0.008 0.144 0.012 NA
#> SRR1785324 2 0.223 0.8245 0.000 0.908 0.004 0.008 0.024 NA
#> SRR1785325 2 0.223 0.8245 0.000 0.908 0.004 0.008 0.024 NA
#> SRR1785320 1 0.425 0.5493 0.752 0.000 0.020 0.008 0.036 NA
#> SRR1785321 1 0.425 0.5493 0.752 0.000 0.020 0.008 0.036 NA
#> SRR1785322 1 0.475 0.5245 0.744 0.000 0.076 0.040 0.008 NA
#> SRR1785323 1 0.475 0.5245 0.744 0.000 0.076 0.040 0.008 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.668 0.814 0.921 0.5023 0.500 0.500
#> 3 3 0.788 0.858 0.927 0.3231 0.763 0.555
#> 4 4 0.654 0.698 0.839 0.1213 0.902 0.712
#> 5 5 0.677 0.677 0.813 0.0640 0.927 0.724
#> 6 6 0.688 0.554 0.747 0.0409 0.979 0.898
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 2 0.961 0.471 0.384 0.616
#> SRR1785239 2 0.961 0.471 0.384 0.616
#> SRR1785240 1 0.000 0.903 1.000 0.000
#> SRR1785241 1 0.000 0.903 1.000 0.000
#> SRR1785242 2 0.961 0.471 0.384 0.616
#> SRR1785243 2 0.961 0.471 0.384 0.616
#> SRR1785244 1 0.000 0.903 1.000 0.000
#> SRR1785245 1 0.000 0.903 1.000 0.000
#> SRR1785246 1 0.000 0.903 1.000 0.000
#> SRR1785247 1 0.000 0.903 1.000 0.000
#> SRR1785248 2 0.000 0.904 0.000 1.000
#> SRR1785250 1 0.000 0.903 1.000 0.000
#> SRR1785251 1 0.000 0.903 1.000 0.000
#> SRR1785252 2 0.961 0.471 0.384 0.616
#> SRR1785253 2 0.961 0.471 0.384 0.616
#> SRR1785254 2 0.000 0.904 0.000 1.000
#> SRR1785255 2 0.000 0.904 0.000 1.000
#> SRR1785256 1 0.000 0.903 1.000 0.000
#> SRR1785257 1 0.000 0.903 1.000 0.000
#> SRR1785258 1 0.000 0.903 1.000 0.000
#> SRR1785259 1 0.000 0.903 1.000 0.000
#> SRR1785262 1 0.000 0.903 1.000 0.000
#> SRR1785263 1 0.000 0.903 1.000 0.000
#> SRR1785260 1 0.961 0.476 0.616 0.384
#> SRR1785261 1 0.961 0.476 0.616 0.384
#> SRR1785264 2 0.000 0.904 0.000 1.000
#> SRR1785265 2 0.000 0.904 0.000 1.000
#> SRR1785266 2 0.000 0.904 0.000 1.000
#> SRR1785267 2 0.000 0.904 0.000 1.000
#> SRR1785268 1 0.000 0.903 1.000 0.000
#> SRR1785269 1 0.000 0.903 1.000 0.000
#> SRR1785270 2 0.000 0.904 0.000 1.000
#> SRR1785271 2 0.000 0.904 0.000 1.000
#> SRR1785272 1 0.000 0.903 1.000 0.000
#> SRR1785273 1 0.000 0.903 1.000 0.000
#> SRR1785276 1 0.000 0.903 1.000 0.000
#> SRR1785277 1 0.000 0.903 1.000 0.000
#> SRR1785274 2 0.961 0.471 0.384 0.616
#> SRR1785275 2 0.961 0.471 0.384 0.616
#> SRR1785280 2 0.000 0.904 0.000 1.000
#> SRR1785281 2 0.000 0.904 0.000 1.000
#> SRR1785278 1 0.000 0.903 1.000 0.000
#> SRR1785279 1 0.000 0.903 1.000 0.000
#> SRR1785282 1 0.000 0.903 1.000 0.000
#> SRR1785283 1 0.000 0.903 1.000 0.000
#> SRR1785284 1 0.961 0.476 0.616 0.384
#> SRR1785285 1 0.961 0.476 0.616 0.384
#> SRR1785286 1 0.961 0.476 0.616 0.384
#> SRR1785287 1 0.961 0.476 0.616 0.384
#> SRR1785288 1 0.000 0.903 1.000 0.000
#> SRR1785289 1 0.000 0.903 1.000 0.000
#> SRR1785290 2 0.000 0.904 0.000 1.000
#> SRR1785291 2 0.000 0.904 0.000 1.000
#> SRR1785296 2 0.000 0.904 0.000 1.000
#> SRR1785297 2 0.000 0.904 0.000 1.000
#> SRR1785292 2 0.000 0.904 0.000 1.000
#> SRR1785293 2 0.000 0.904 0.000 1.000
#> SRR1785294 1 0.961 0.476 0.616 0.384
#> SRR1785295 1 0.961 0.476 0.616 0.384
#> SRR1785298 2 0.000 0.904 0.000 1.000
#> SRR1785299 2 0.000 0.904 0.000 1.000
#> SRR1785300 1 0.000 0.903 1.000 0.000
#> SRR1785301 1 0.000 0.903 1.000 0.000
#> SRR1785304 2 0.000 0.904 0.000 1.000
#> SRR1785305 2 0.000 0.904 0.000 1.000
#> SRR1785306 2 0.000 0.904 0.000 1.000
#> SRR1785307 2 0.000 0.904 0.000 1.000
#> SRR1785302 2 0.000 0.904 0.000 1.000
#> SRR1785303 2 0.000 0.904 0.000 1.000
#> SRR1785308 1 0.000 0.903 1.000 0.000
#> SRR1785309 1 0.000 0.903 1.000 0.000
#> SRR1785310 1 0.961 0.476 0.616 0.384
#> SRR1785311 1 0.961 0.476 0.616 0.384
#> SRR1785312 1 0.000 0.903 1.000 0.000
#> SRR1785313 1 0.000 0.903 1.000 0.000
#> SRR1785314 2 0.000 0.904 0.000 1.000
#> SRR1785315 2 0.000 0.904 0.000 1.000
#> SRR1785318 2 0.000 0.904 0.000 1.000
#> SRR1785319 2 0.000 0.904 0.000 1.000
#> SRR1785316 1 0.000 0.903 1.000 0.000
#> SRR1785317 1 0.000 0.903 1.000 0.000
#> SRR1785324 2 0.000 0.904 0.000 1.000
#> SRR1785325 2 0.000 0.904 0.000 1.000
#> SRR1785320 1 0.000 0.903 1.000 0.000
#> SRR1785321 1 0.000 0.903 1.000 0.000
#> SRR1785322 1 0.000 0.903 1.000 0.000
#> SRR1785323 1 0.000 0.903 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.6079 0.405 0.000 0.388 0.612
#> SRR1785239 3 0.6079 0.405 0.000 0.388 0.612
#> SRR1785240 3 0.2066 0.843 0.060 0.000 0.940
#> SRR1785241 3 0.2066 0.843 0.060 0.000 0.940
#> SRR1785242 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785244 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785246 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785248 2 0.1163 0.968 0.000 0.972 0.028
#> SRR1785250 3 0.4399 0.747 0.188 0.000 0.812
#> SRR1785251 3 0.4399 0.747 0.188 0.000 0.812
#> SRR1785252 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785254 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785255 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785256 1 0.2537 0.841 0.920 0.000 0.080
#> SRR1785257 1 0.2537 0.841 0.920 0.000 0.080
#> SRR1785258 3 0.1031 0.873 0.024 0.000 0.976
#> SRR1785259 3 0.1031 0.873 0.024 0.000 0.976
#> SRR1785262 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785263 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785260 1 0.1411 0.847 0.964 0.036 0.000
#> SRR1785261 1 0.1411 0.847 0.964 0.036 0.000
#> SRR1785264 2 0.0424 0.987 0.000 0.992 0.008
#> SRR1785265 2 0.0424 0.987 0.000 0.992 0.008
#> SRR1785266 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785267 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785268 1 0.5058 0.734 0.756 0.000 0.244
#> SRR1785269 1 0.5058 0.734 0.756 0.000 0.244
#> SRR1785270 2 0.1525 0.965 0.004 0.964 0.032
#> SRR1785271 2 0.1525 0.965 0.004 0.964 0.032
#> SRR1785272 3 0.4555 0.732 0.200 0.000 0.800
#> SRR1785273 3 0.4555 0.732 0.200 0.000 0.800
#> SRR1785276 3 0.1411 0.868 0.036 0.000 0.964
#> SRR1785277 3 0.1411 0.868 0.036 0.000 0.964
#> SRR1785274 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785275 3 0.0000 0.880 0.000 0.000 1.000
#> SRR1785280 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785278 1 0.4002 0.805 0.840 0.000 0.160
#> SRR1785279 1 0.4002 0.805 0.840 0.000 0.160
#> SRR1785282 1 0.3619 0.819 0.864 0.000 0.136
#> SRR1785283 1 0.3619 0.819 0.864 0.000 0.136
#> SRR1785284 1 0.5356 0.685 0.784 0.020 0.196
#> SRR1785285 1 0.5356 0.685 0.784 0.020 0.196
#> SRR1785286 1 0.2414 0.839 0.940 0.040 0.020
#> SRR1785287 1 0.2414 0.839 0.940 0.040 0.020
#> SRR1785288 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785290 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785291 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785296 2 0.0747 0.982 0.016 0.984 0.000
#> SRR1785297 2 0.0747 0.982 0.016 0.984 0.000
#> SRR1785292 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785294 1 0.1411 0.847 0.964 0.036 0.000
#> SRR1785295 1 0.1411 0.847 0.964 0.036 0.000
#> SRR1785298 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785299 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785300 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785304 2 0.1411 0.966 0.036 0.964 0.000
#> SRR1785305 2 0.1411 0.966 0.036 0.964 0.000
#> SRR1785306 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785307 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785302 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785303 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785308 3 0.4452 0.743 0.192 0.000 0.808
#> SRR1785309 3 0.4452 0.743 0.192 0.000 0.808
#> SRR1785310 1 0.1411 0.847 0.964 0.036 0.000
#> SRR1785311 1 0.1411 0.847 0.964 0.036 0.000
#> SRR1785312 1 0.5138 0.724 0.748 0.000 0.252
#> SRR1785313 1 0.5138 0.724 0.748 0.000 0.252
#> SRR1785314 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785315 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785318 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785316 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.855 1.000 0.000 0.000
#> SRR1785324 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.992 0.000 1.000 0.000
#> SRR1785320 1 0.5016 0.740 0.760 0.000 0.240
#> SRR1785321 1 0.5016 0.740 0.760 0.000 0.240
#> SRR1785322 1 0.6280 0.247 0.540 0.000 0.460
#> SRR1785323 1 0.6280 0.247 0.540 0.000 0.460
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.4972 0.180 0.000 0.456 0.544 0.000
#> SRR1785239 3 0.4972 0.180 0.000 0.456 0.544 0.000
#> SRR1785240 3 0.5085 0.557 0.032 0.000 0.708 0.260
#> SRR1785241 3 0.5085 0.557 0.032 0.000 0.708 0.260
#> SRR1785242 3 0.0469 0.745 0.000 0.012 0.988 0.000
#> SRR1785243 3 0.0469 0.745 0.000 0.012 0.988 0.000
#> SRR1785244 1 0.3610 0.745 0.800 0.000 0.000 0.200
#> SRR1785245 1 0.3610 0.745 0.800 0.000 0.000 0.200
#> SRR1785246 3 0.1211 0.749 0.040 0.000 0.960 0.000
#> SRR1785247 3 0.1211 0.749 0.040 0.000 0.960 0.000
#> SRR1785248 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785250 3 0.4250 0.643 0.276 0.000 0.724 0.000
#> SRR1785251 3 0.4250 0.643 0.276 0.000 0.724 0.000
#> SRR1785252 3 0.0469 0.745 0.000 0.012 0.988 0.000
#> SRR1785253 3 0.0469 0.745 0.000 0.012 0.988 0.000
#> SRR1785254 2 0.3047 0.789 0.000 0.872 0.012 0.116
#> SRR1785255 2 0.3047 0.789 0.000 0.872 0.012 0.116
#> SRR1785256 1 0.1004 0.874 0.972 0.000 0.004 0.024
#> SRR1785257 1 0.1004 0.874 0.972 0.000 0.004 0.024
#> SRR1785258 3 0.3569 0.685 0.196 0.000 0.804 0.000
#> SRR1785259 3 0.3569 0.685 0.196 0.000 0.804 0.000
#> SRR1785262 3 0.1042 0.743 0.008 0.000 0.972 0.020
#> SRR1785263 3 0.1042 0.743 0.008 0.000 0.972 0.020
#> SRR1785260 4 0.4019 0.708 0.196 0.012 0.000 0.792
#> SRR1785261 4 0.4019 0.708 0.196 0.012 0.000 0.792
#> SRR1785264 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785265 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785266 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785267 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785268 1 0.1867 0.856 0.928 0.000 0.072 0.000
#> SRR1785269 1 0.1867 0.856 0.928 0.000 0.072 0.000
#> SRR1785270 2 0.5549 0.622 0.000 0.672 0.048 0.280
#> SRR1785271 2 0.5549 0.622 0.000 0.672 0.048 0.280
#> SRR1785272 3 0.4955 0.356 0.444 0.000 0.556 0.000
#> SRR1785273 3 0.4948 0.367 0.440 0.000 0.560 0.000
#> SRR1785276 3 0.4950 0.484 0.376 0.000 0.620 0.004
#> SRR1785277 3 0.4950 0.484 0.376 0.000 0.620 0.004
#> SRR1785274 3 0.3668 0.640 0.004 0.000 0.808 0.188
#> SRR1785275 3 0.3668 0.640 0.004 0.000 0.808 0.188
#> SRR1785280 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.0817 0.875 0.976 0.000 0.024 0.000
#> SRR1785279 1 0.0817 0.875 0.976 0.000 0.024 0.000
#> SRR1785282 1 0.0707 0.876 0.980 0.000 0.020 0.000
#> SRR1785283 1 0.0707 0.876 0.980 0.000 0.020 0.000
#> SRR1785284 4 0.4621 0.596 0.128 0.000 0.076 0.796
#> SRR1785285 4 0.4621 0.596 0.128 0.000 0.076 0.796
#> SRR1785286 4 0.0804 0.696 0.012 0.000 0.008 0.980
#> SRR1785287 4 0.0804 0.696 0.012 0.000 0.008 0.980
#> SRR1785288 1 0.3801 0.719 0.780 0.000 0.000 0.220
#> SRR1785289 1 0.3801 0.719 0.780 0.000 0.000 0.220
#> SRR1785290 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785291 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785296 4 0.4866 0.394 0.000 0.404 0.000 0.596
#> SRR1785297 4 0.4866 0.394 0.000 0.404 0.000 0.596
#> SRR1785292 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.4462 0.724 0.164 0.044 0.000 0.792
#> SRR1785295 4 0.4462 0.724 0.164 0.044 0.000 0.792
#> SRR1785298 2 0.4830 0.194 0.000 0.608 0.000 0.392
#> SRR1785299 2 0.4830 0.194 0.000 0.608 0.000 0.392
#> SRR1785300 1 0.3266 0.779 0.832 0.000 0.000 0.168
#> SRR1785301 1 0.3266 0.779 0.832 0.000 0.000 0.168
#> SRR1785304 4 0.5427 0.367 0.016 0.416 0.000 0.568
#> SRR1785305 4 0.5427 0.367 0.016 0.416 0.000 0.568
#> SRR1785306 2 0.4690 0.678 0.000 0.724 0.016 0.260
#> SRR1785307 2 0.4690 0.678 0.000 0.724 0.016 0.260
#> SRR1785302 2 0.4098 0.643 0.000 0.784 0.012 0.204
#> SRR1785303 2 0.4098 0.643 0.000 0.784 0.012 0.204
#> SRR1785308 3 0.4164 0.650 0.264 0.000 0.736 0.000
#> SRR1785309 3 0.4164 0.650 0.264 0.000 0.736 0.000
#> SRR1785310 4 0.4019 0.708 0.196 0.012 0.000 0.792
#> SRR1785311 4 0.4019 0.708 0.196 0.012 0.000 0.792
#> SRR1785312 1 0.1867 0.856 0.928 0.000 0.072 0.000
#> SRR1785313 1 0.1867 0.856 0.928 0.000 0.072 0.000
#> SRR1785314 2 0.4744 0.660 0.000 0.704 0.012 0.284
#> SRR1785315 2 0.4744 0.660 0.000 0.704 0.012 0.284
#> SRR1785318 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.1211 0.865 0.960 0.000 0.000 0.040
#> SRR1785317 1 0.1211 0.865 0.960 0.000 0.000 0.040
#> SRR1785324 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.847 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.1902 0.859 0.932 0.000 0.064 0.004
#> SRR1785321 1 0.1902 0.859 0.932 0.000 0.064 0.004
#> SRR1785322 1 0.3074 0.765 0.848 0.000 0.152 0.000
#> SRR1785323 1 0.3074 0.765 0.848 0.000 0.152 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.4930 0.309 0.000 0.388 0.580 0.000 0.032
#> SRR1785239 3 0.4930 0.309 0.000 0.388 0.580 0.000 0.032
#> SRR1785240 5 0.3838 0.561 0.000 0.000 0.280 0.004 0.716
#> SRR1785241 5 0.3838 0.561 0.000 0.000 0.280 0.004 0.716
#> SRR1785242 3 0.0290 0.666 0.000 0.000 0.992 0.000 0.008
#> SRR1785243 3 0.0290 0.666 0.000 0.000 0.992 0.000 0.008
#> SRR1785244 1 0.4708 0.734 0.712 0.000 0.000 0.220 0.068
#> SRR1785245 1 0.4708 0.734 0.712 0.000 0.000 0.220 0.068
#> SRR1785246 3 0.3102 0.670 0.056 0.000 0.860 0.000 0.084
#> SRR1785247 3 0.3102 0.670 0.056 0.000 0.860 0.000 0.084
#> SRR1785248 2 0.0771 0.827 0.000 0.976 0.020 0.000 0.004
#> SRR1785250 3 0.4138 0.660 0.276 0.000 0.708 0.000 0.016
#> SRR1785251 3 0.4138 0.660 0.276 0.000 0.708 0.000 0.016
#> SRR1785252 3 0.0290 0.666 0.000 0.000 0.992 0.000 0.008
#> SRR1785253 3 0.0290 0.666 0.000 0.000 0.992 0.000 0.008
#> SRR1785254 2 0.4549 0.198 0.000 0.528 0.000 0.008 0.464
#> SRR1785255 2 0.4549 0.198 0.000 0.528 0.000 0.008 0.464
#> SRR1785256 1 0.2878 0.833 0.880 0.000 0.004 0.068 0.048
#> SRR1785257 1 0.2878 0.833 0.880 0.000 0.004 0.068 0.048
#> SRR1785258 3 0.5098 0.496 0.300 0.000 0.644 0.004 0.052
#> SRR1785259 3 0.5098 0.496 0.300 0.000 0.644 0.004 0.052
#> SRR1785262 3 0.3892 0.626 0.024 0.000 0.820 0.036 0.120
#> SRR1785263 3 0.3892 0.626 0.024 0.000 0.820 0.036 0.120
#> SRR1785260 4 0.0451 0.803 0.008 0.000 0.000 0.988 0.004
#> SRR1785261 4 0.0451 0.803 0.008 0.000 0.000 0.988 0.004
#> SRR1785264 2 0.0807 0.833 0.000 0.976 0.012 0.000 0.012
#> SRR1785265 2 0.0807 0.833 0.000 0.976 0.012 0.000 0.012
#> SRR1785266 2 0.0162 0.838 0.000 0.996 0.000 0.000 0.004
#> SRR1785267 2 0.0162 0.838 0.000 0.996 0.000 0.000 0.004
#> SRR1785268 1 0.1310 0.841 0.956 0.000 0.020 0.000 0.024
#> SRR1785269 1 0.1310 0.841 0.956 0.000 0.020 0.000 0.024
#> SRR1785270 5 0.3797 0.662 0.000 0.232 0.008 0.004 0.756
#> SRR1785271 5 0.3797 0.662 0.000 0.232 0.008 0.004 0.756
#> SRR1785272 3 0.4367 0.555 0.372 0.000 0.620 0.000 0.008
#> SRR1785273 3 0.4367 0.555 0.372 0.000 0.620 0.000 0.008
#> SRR1785276 3 0.6416 0.431 0.356 0.000 0.464 0.000 0.180
#> SRR1785277 3 0.6416 0.431 0.356 0.000 0.464 0.000 0.180
#> SRR1785274 5 0.4397 0.363 0.004 0.000 0.432 0.000 0.564
#> SRR1785275 5 0.4397 0.363 0.004 0.000 0.432 0.000 0.564
#> SRR1785280 2 0.0162 0.838 0.000 0.996 0.000 0.000 0.004
#> SRR1785281 2 0.0162 0.838 0.000 0.996 0.000 0.000 0.004
#> SRR1785278 1 0.0451 0.848 0.988 0.000 0.004 0.000 0.008
#> SRR1785279 1 0.0451 0.848 0.988 0.000 0.004 0.000 0.008
#> SRR1785282 1 0.0566 0.850 0.984 0.000 0.000 0.012 0.004
#> SRR1785283 1 0.0566 0.850 0.984 0.000 0.000 0.012 0.004
#> SRR1785284 5 0.3634 0.581 0.012 0.004 0.032 0.116 0.836
#> SRR1785285 5 0.3634 0.581 0.012 0.004 0.032 0.116 0.836
#> SRR1785286 4 0.4268 0.443 0.008 0.000 0.000 0.648 0.344
#> SRR1785287 4 0.4268 0.443 0.008 0.000 0.000 0.648 0.344
#> SRR1785288 1 0.4983 0.675 0.664 0.000 0.000 0.272 0.064
#> SRR1785289 1 0.4983 0.675 0.664 0.000 0.000 0.272 0.064
#> SRR1785290 2 0.1041 0.827 0.000 0.964 0.000 0.004 0.032
#> SRR1785291 2 0.1041 0.827 0.000 0.964 0.000 0.004 0.032
#> SRR1785296 4 0.4524 0.669 0.000 0.208 0.004 0.736 0.052
#> SRR1785297 4 0.4524 0.669 0.000 0.208 0.004 0.736 0.052
#> SRR1785292 2 0.0324 0.838 0.000 0.992 0.000 0.004 0.004
#> SRR1785293 2 0.0324 0.838 0.000 0.992 0.000 0.004 0.004
#> SRR1785294 4 0.0162 0.806 0.000 0.004 0.000 0.996 0.000
#> SRR1785295 4 0.0162 0.806 0.000 0.004 0.000 0.996 0.000
#> SRR1785298 2 0.6145 0.362 0.000 0.532 0.000 0.312 0.156
#> SRR1785299 2 0.6145 0.362 0.000 0.532 0.000 0.312 0.156
#> SRR1785300 1 0.4058 0.752 0.740 0.000 0.000 0.236 0.024
#> SRR1785301 1 0.4058 0.752 0.740 0.000 0.000 0.236 0.024
#> SRR1785304 4 0.3795 0.709 0.000 0.192 0.000 0.780 0.028
#> SRR1785305 4 0.3795 0.709 0.000 0.192 0.000 0.780 0.028
#> SRR1785306 5 0.4302 0.522 0.000 0.344 0.004 0.004 0.648
#> SRR1785307 5 0.4302 0.522 0.000 0.344 0.004 0.004 0.648
#> SRR1785302 2 0.5831 0.533 0.000 0.608 0.000 0.220 0.172
#> SRR1785303 2 0.5831 0.533 0.000 0.608 0.000 0.220 0.172
#> SRR1785308 3 0.3300 0.688 0.204 0.000 0.792 0.000 0.004
#> SRR1785309 3 0.3300 0.688 0.204 0.000 0.792 0.000 0.004
#> SRR1785310 4 0.0451 0.804 0.004 0.000 0.000 0.988 0.008
#> SRR1785311 4 0.0451 0.804 0.004 0.000 0.000 0.988 0.008
#> SRR1785312 1 0.1310 0.841 0.956 0.000 0.020 0.000 0.024
#> SRR1785313 1 0.1310 0.841 0.956 0.000 0.020 0.000 0.024
#> SRR1785314 5 0.4638 0.569 0.000 0.324 0.000 0.028 0.648
#> SRR1785315 5 0.4638 0.569 0.000 0.324 0.000 0.028 0.648
#> SRR1785318 2 0.0000 0.838 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.838 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.2006 0.845 0.916 0.000 0.000 0.072 0.012
#> SRR1785317 1 0.2006 0.845 0.916 0.000 0.000 0.072 0.012
#> SRR1785324 2 0.0566 0.835 0.000 0.984 0.000 0.004 0.012
#> SRR1785325 2 0.0566 0.835 0.000 0.984 0.000 0.004 0.012
#> SRR1785320 1 0.1579 0.837 0.944 0.000 0.024 0.000 0.032
#> SRR1785321 1 0.1579 0.837 0.944 0.000 0.024 0.000 0.032
#> SRR1785322 1 0.2411 0.761 0.884 0.000 0.108 0.000 0.008
#> SRR1785323 1 0.2411 0.761 0.884 0.000 0.108 0.000 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.4937 0.2250 0.000 0.400 0.548 0.000 0.020 0.032
#> SRR1785239 3 0.4937 0.2250 0.000 0.400 0.548 0.000 0.020 0.032
#> SRR1785240 5 0.4937 0.5191 0.000 0.000 0.196 0.000 0.652 0.152
#> SRR1785241 5 0.4937 0.5191 0.000 0.000 0.196 0.000 0.652 0.152
#> SRR1785242 3 0.0405 0.5498 0.000 0.008 0.988 0.000 0.004 0.000
#> SRR1785243 3 0.0405 0.5498 0.000 0.008 0.988 0.000 0.004 0.000
#> SRR1785244 1 0.5734 0.5065 0.628 0.000 0.000 0.156 0.048 0.168
#> SRR1785245 1 0.5734 0.5065 0.628 0.000 0.000 0.156 0.048 0.168
#> SRR1785246 3 0.5235 0.3206 0.064 0.000 0.596 0.000 0.024 0.316
#> SRR1785247 3 0.5235 0.3206 0.064 0.000 0.596 0.000 0.024 0.316
#> SRR1785248 2 0.0858 0.8007 0.000 0.968 0.028 0.000 0.000 0.004
#> SRR1785250 3 0.4937 0.3454 0.196 0.000 0.652 0.000 0.000 0.152
#> SRR1785251 3 0.4937 0.3454 0.196 0.000 0.652 0.000 0.000 0.152
#> SRR1785252 3 0.0405 0.5498 0.000 0.008 0.988 0.000 0.004 0.000
#> SRR1785253 3 0.0405 0.5498 0.000 0.008 0.988 0.000 0.004 0.000
#> SRR1785254 2 0.6088 0.0780 0.000 0.368 0.000 0.000 0.356 0.276
#> SRR1785255 2 0.6088 0.0780 0.000 0.368 0.000 0.000 0.356 0.276
#> SRR1785256 1 0.3361 0.6144 0.832 0.000 0.004 0.040 0.012 0.112
#> SRR1785257 1 0.3361 0.6144 0.832 0.000 0.004 0.040 0.012 0.112
#> SRR1785258 3 0.6041 0.1831 0.208 0.000 0.544 0.000 0.024 0.224
#> SRR1785259 3 0.6041 0.1831 0.208 0.000 0.544 0.000 0.024 0.224
#> SRR1785262 3 0.6350 0.3517 0.028 0.000 0.592 0.052 0.108 0.220
#> SRR1785263 3 0.6350 0.3517 0.028 0.000 0.592 0.052 0.108 0.220
#> SRR1785260 4 0.0767 0.8710 0.004 0.000 0.000 0.976 0.008 0.012
#> SRR1785261 4 0.0767 0.8710 0.004 0.000 0.000 0.976 0.008 0.012
#> SRR1785264 2 0.1148 0.8021 0.000 0.960 0.020 0.000 0.004 0.016
#> SRR1785265 2 0.1148 0.8021 0.000 0.960 0.020 0.000 0.004 0.016
#> SRR1785266 2 0.0405 0.8087 0.000 0.988 0.008 0.000 0.000 0.004
#> SRR1785267 2 0.0405 0.8087 0.000 0.988 0.008 0.000 0.000 0.004
#> SRR1785268 1 0.3163 0.4722 0.764 0.000 0.004 0.000 0.000 0.232
#> SRR1785269 1 0.3163 0.4722 0.764 0.000 0.004 0.000 0.000 0.232
#> SRR1785270 5 0.2766 0.6487 0.000 0.124 0.004 0.000 0.852 0.020
#> SRR1785271 5 0.2766 0.6487 0.000 0.124 0.004 0.000 0.852 0.020
#> SRR1785272 3 0.5736 0.0303 0.320 0.000 0.492 0.000 0.000 0.188
#> SRR1785273 3 0.5736 0.0303 0.320 0.000 0.492 0.000 0.000 0.188
#> SRR1785276 6 0.6663 1.0000 0.244 0.008 0.132 0.000 0.084 0.532
#> SRR1785277 6 0.6663 1.0000 0.244 0.008 0.132 0.000 0.084 0.532
#> SRR1785274 5 0.5850 0.1952 0.000 0.000 0.384 0.000 0.424 0.192
#> SRR1785275 5 0.5850 0.1952 0.000 0.000 0.384 0.000 0.424 0.192
#> SRR1785280 2 0.0146 0.8104 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785281 2 0.0146 0.8104 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785278 1 0.1858 0.6007 0.904 0.000 0.004 0.000 0.000 0.092
#> SRR1785279 1 0.1858 0.6007 0.904 0.000 0.004 0.000 0.000 0.092
#> SRR1785282 1 0.0405 0.6351 0.988 0.000 0.004 0.008 0.000 0.000
#> SRR1785283 1 0.0405 0.6351 0.988 0.000 0.004 0.008 0.000 0.000
#> SRR1785284 5 0.2940 0.6056 0.004 0.000 0.000 0.036 0.848 0.112
#> SRR1785285 5 0.2940 0.6056 0.004 0.000 0.000 0.036 0.848 0.112
#> SRR1785286 5 0.5007 0.1723 0.012 0.000 0.000 0.440 0.504 0.044
#> SRR1785287 5 0.5007 0.1723 0.012 0.000 0.000 0.440 0.504 0.044
#> SRR1785288 1 0.5892 0.4774 0.600 0.000 0.000 0.200 0.044 0.156
#> SRR1785289 1 0.5892 0.4774 0.600 0.000 0.000 0.200 0.044 0.156
#> SRR1785290 2 0.1672 0.7930 0.000 0.932 0.000 0.004 0.016 0.048
#> SRR1785291 2 0.1672 0.7930 0.000 0.932 0.000 0.004 0.016 0.048
#> SRR1785296 4 0.3915 0.8007 0.000 0.108 0.008 0.804 0.020 0.060
#> SRR1785297 4 0.3915 0.8007 0.000 0.108 0.008 0.804 0.020 0.060
#> SRR1785292 2 0.0363 0.8102 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1785293 2 0.0363 0.8102 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1785294 4 0.0146 0.8760 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1785295 4 0.0146 0.8760 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1785298 2 0.6827 0.2644 0.000 0.428 0.000 0.268 0.056 0.248
#> SRR1785299 2 0.6827 0.2644 0.000 0.428 0.000 0.268 0.056 0.248
#> SRR1785300 1 0.4573 0.5651 0.720 0.000 0.000 0.180 0.016 0.084
#> SRR1785301 1 0.4573 0.5651 0.720 0.000 0.000 0.180 0.016 0.084
#> SRR1785304 4 0.3838 0.7735 0.000 0.156 0.000 0.784 0.020 0.040
#> SRR1785305 4 0.3838 0.7735 0.000 0.156 0.000 0.784 0.020 0.040
#> SRR1785306 5 0.3776 0.6125 0.000 0.196 0.000 0.000 0.756 0.048
#> SRR1785307 5 0.3776 0.6125 0.000 0.196 0.000 0.000 0.756 0.048
#> SRR1785302 2 0.7084 0.3924 0.000 0.460 0.000 0.132 0.176 0.232
#> SRR1785303 2 0.7084 0.3924 0.000 0.460 0.000 0.132 0.176 0.232
#> SRR1785308 3 0.3229 0.4871 0.140 0.000 0.816 0.000 0.000 0.044
#> SRR1785309 3 0.3229 0.4871 0.140 0.000 0.816 0.000 0.000 0.044
#> SRR1785310 4 0.0520 0.8740 0.000 0.000 0.000 0.984 0.008 0.008
#> SRR1785311 4 0.0520 0.8740 0.000 0.000 0.000 0.984 0.008 0.008
#> SRR1785312 1 0.3349 0.4609 0.748 0.000 0.008 0.000 0.000 0.244
#> SRR1785313 1 0.3349 0.4609 0.748 0.000 0.008 0.000 0.000 0.244
#> SRR1785314 5 0.3343 0.6334 0.000 0.176 0.000 0.004 0.796 0.024
#> SRR1785315 5 0.3343 0.6334 0.000 0.176 0.000 0.004 0.796 0.024
#> SRR1785318 2 0.0000 0.8108 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.8108 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 1 0.3689 0.6119 0.808 0.000 0.008 0.068 0.004 0.112
#> SRR1785317 1 0.3689 0.6119 0.808 0.000 0.008 0.068 0.004 0.112
#> SRR1785324 2 0.0622 0.8087 0.000 0.980 0.000 0.000 0.008 0.012
#> SRR1785325 2 0.0622 0.8087 0.000 0.980 0.000 0.000 0.008 0.012
#> SRR1785320 1 0.3935 0.3933 0.688 0.000 0.016 0.000 0.004 0.292
#> SRR1785321 1 0.3935 0.3933 0.688 0.000 0.016 0.000 0.004 0.292
#> SRR1785322 1 0.4253 0.3441 0.732 0.000 0.108 0.000 0.000 0.160
#> SRR1785323 1 0.4253 0.3441 0.732 0.000 0.108 0.000 0.000 0.160
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.469 0.863 0.905 0.4678 0.500 0.500
#> 3 3 0.591 0.797 0.889 0.2996 0.873 0.754
#> 4 4 0.708 0.676 0.867 0.1785 0.819 0.580
#> 5 5 0.694 0.621 0.807 0.0787 0.917 0.715
#> 6 6 0.728 0.648 0.797 0.0366 0.961 0.828
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
#> SRR1785238 2 0.6623 0.891 0.172 0.828
#> SRR1785239 2 0.6623 0.891 0.172 0.828
#> SRR1785240 1 0.8267 0.561 0.740 0.260
#> SRR1785241 1 0.6973 0.712 0.812 0.188
#> SRR1785242 2 0.6712 0.892 0.176 0.824
#> SRR1785243 2 0.6712 0.892 0.176 0.824
#> SRR1785244 1 0.0000 0.939 1.000 0.000
#> SRR1785245 1 0.0000 0.939 1.000 0.000
#> SRR1785246 2 0.7139 0.890 0.196 0.804
#> SRR1785247 2 0.7139 0.890 0.196 0.804
#> SRR1785248 2 0.0000 0.822 0.000 1.000
#> SRR1785250 2 0.7602 0.868 0.220 0.780
#> SRR1785251 2 0.7815 0.854 0.232 0.768
#> SRR1785252 2 0.6623 0.891 0.172 0.828
#> SRR1785253 2 0.6623 0.891 0.172 0.828
#> SRR1785254 1 0.2778 0.923 0.952 0.048
#> SRR1785255 1 0.1633 0.933 0.976 0.024
#> SRR1785256 1 0.0000 0.939 1.000 0.000
#> SRR1785257 1 0.0000 0.939 1.000 0.000
#> SRR1785258 2 0.7139 0.890 0.196 0.804
#> SRR1785259 2 0.7139 0.890 0.196 0.804
#> SRR1785262 1 0.0000 0.939 1.000 0.000
#> SRR1785263 1 0.0000 0.939 1.000 0.000
#> SRR1785260 1 0.0000 0.939 1.000 0.000
#> SRR1785261 1 0.0000 0.939 1.000 0.000
#> SRR1785264 2 0.0376 0.825 0.004 0.996
#> SRR1785265 2 0.0376 0.825 0.004 0.996
#> SRR1785266 2 0.0000 0.822 0.000 1.000
#> SRR1785267 2 0.0000 0.822 0.000 1.000
#> SRR1785268 1 0.4690 0.848 0.900 0.100
#> SRR1785269 1 0.2778 0.905 0.952 0.048
#> SRR1785270 2 0.0376 0.825 0.004 0.996
#> SRR1785271 2 0.0376 0.825 0.004 0.996
#> SRR1785272 2 0.7219 0.887 0.200 0.800
#> SRR1785273 2 0.7219 0.887 0.200 0.800
#> SRR1785276 2 0.6623 0.891 0.172 0.828
#> SRR1785277 2 0.6623 0.891 0.172 0.828
#> SRR1785274 2 0.6973 0.891 0.188 0.812
#> SRR1785275 2 0.6973 0.891 0.188 0.812
#> SRR1785280 2 0.0000 0.822 0.000 1.000
#> SRR1785281 2 0.0000 0.822 0.000 1.000
#> SRR1785278 1 0.5408 0.820 0.876 0.124
#> SRR1785279 1 0.5629 0.809 0.868 0.132
#> SRR1785282 2 0.7219 0.887 0.200 0.800
#> SRR1785283 2 0.7219 0.887 0.200 0.800
#> SRR1785284 1 0.0376 0.939 0.996 0.004
#> SRR1785285 1 0.0376 0.939 0.996 0.004
#> SRR1785286 1 0.0000 0.939 1.000 0.000
#> SRR1785287 1 0.0000 0.939 1.000 0.000
#> SRR1785288 1 0.0000 0.939 1.000 0.000
#> SRR1785289 1 0.0000 0.939 1.000 0.000
#> SRR1785290 2 0.6623 0.891 0.172 0.828
#> SRR1785291 2 0.6623 0.891 0.172 0.828
#> SRR1785296 1 0.1633 0.933 0.976 0.024
#> SRR1785297 1 0.1633 0.933 0.976 0.024
#> SRR1785292 2 0.9732 0.158 0.404 0.596
#> SRR1785293 2 0.9686 0.185 0.396 0.604
#> SRR1785294 1 0.1414 0.935 0.980 0.020
#> SRR1785295 1 0.1184 0.936 0.984 0.016
#> SRR1785298 1 0.1633 0.933 0.976 0.024
#> SRR1785299 1 0.1633 0.933 0.976 0.024
#> SRR1785300 1 0.0000 0.939 1.000 0.000
#> SRR1785301 1 0.0000 0.939 1.000 0.000
#> SRR1785304 1 0.1633 0.933 0.976 0.024
#> SRR1785305 1 0.1633 0.933 0.976 0.024
#> SRR1785306 1 0.1843 0.931 0.972 0.028
#> SRR1785307 1 0.2778 0.920 0.952 0.048
#> SRR1785302 1 0.1633 0.933 0.976 0.024
#> SRR1785303 1 0.1633 0.933 0.976 0.024
#> SRR1785308 2 0.7139 0.890 0.196 0.804
#> SRR1785309 2 0.7139 0.890 0.196 0.804
#> SRR1785310 1 0.0376 0.939 0.996 0.004
#> SRR1785311 1 0.0376 0.939 0.996 0.004
#> SRR1785312 1 0.0376 0.938 0.996 0.004
#> SRR1785313 1 0.0938 0.934 0.988 0.012
#> SRR1785314 1 0.7376 0.758 0.792 0.208
#> SRR1785315 1 0.8386 0.683 0.732 0.268
#> SRR1785318 2 0.0000 0.822 0.000 1.000
#> SRR1785319 2 0.0000 0.822 0.000 1.000
#> SRR1785316 1 0.0000 0.939 1.000 0.000
#> SRR1785317 1 0.0000 0.939 1.000 0.000
#> SRR1785324 1 0.9833 0.400 0.576 0.424
#> SRR1785325 1 0.9522 0.517 0.628 0.372
#> SRR1785320 1 0.0376 0.938 0.996 0.004
#> SRR1785321 1 0.0376 0.938 0.996 0.004
#> SRR1785322 2 0.7139 0.890 0.196 0.804
#> SRR1785323 2 0.7139 0.890 0.196 0.804
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.4235 0.757 0.176 0.000 0.824
#> SRR1785239 3 0.4235 0.757 0.176 0.000 0.824
#> SRR1785240 3 0.6302 -0.281 0.480 0.000 0.520
#> SRR1785241 1 0.6252 0.470 0.556 0.000 0.444
#> SRR1785242 3 0.0592 0.832 0.012 0.000 0.988
#> SRR1785243 3 0.0592 0.832 0.012 0.000 0.988
#> SRR1785244 1 0.1529 0.885 0.960 0.000 0.040
#> SRR1785245 1 0.1529 0.885 0.960 0.000 0.040
#> SRR1785246 3 0.0000 0.829 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.829 0.000 0.000 1.000
#> SRR1785248 3 0.6124 0.684 0.036 0.220 0.744
#> SRR1785250 3 0.0747 0.827 0.016 0.000 0.984
#> SRR1785251 3 0.0892 0.825 0.020 0.000 0.980
#> SRR1785252 3 0.1411 0.829 0.036 0.000 0.964
#> SRR1785253 3 0.1411 0.829 0.036 0.000 0.964
#> SRR1785254 1 0.1031 0.875 0.976 0.000 0.024
#> SRR1785255 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785256 1 0.5178 0.783 0.744 0.000 0.256
#> SRR1785257 1 0.5178 0.783 0.744 0.000 0.256
#> SRR1785258 3 0.0000 0.829 0.000 0.000 1.000
#> SRR1785259 3 0.0000 0.829 0.000 0.000 1.000
#> SRR1785262 1 0.5178 0.783 0.744 0.000 0.256
#> SRR1785263 1 0.5178 0.783 0.744 0.000 0.256
#> SRR1785260 1 0.1411 0.885 0.964 0.000 0.036
#> SRR1785261 1 0.1411 0.885 0.964 0.000 0.036
#> SRR1785264 3 0.6348 0.706 0.060 0.188 0.752
#> SRR1785265 3 0.6388 0.708 0.064 0.184 0.752
#> SRR1785266 3 0.6274 0.314 0.000 0.456 0.544
#> SRR1785267 3 0.6154 0.428 0.000 0.408 0.592
#> SRR1785268 1 0.5926 0.656 0.644 0.000 0.356
#> SRR1785269 1 0.5591 0.732 0.696 0.000 0.304
#> SRR1785270 3 0.7866 0.334 0.060 0.388 0.552
#> SRR1785271 3 0.7491 0.490 0.056 0.324 0.620
#> SRR1785272 3 0.0892 0.831 0.020 0.000 0.980
#> SRR1785273 3 0.0892 0.831 0.020 0.000 0.980
#> SRR1785276 3 0.4235 0.757 0.176 0.000 0.824
#> SRR1785277 3 0.4235 0.757 0.176 0.000 0.824
#> SRR1785274 3 0.1411 0.829 0.036 0.000 0.964
#> SRR1785275 3 0.1411 0.829 0.036 0.000 0.964
#> SRR1785280 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785278 1 0.5560 0.707 0.700 0.000 0.300
#> SRR1785279 1 0.5621 0.694 0.692 0.000 0.308
#> SRR1785282 3 0.2537 0.806 0.080 0.000 0.920
#> SRR1785283 3 0.2537 0.806 0.080 0.000 0.920
#> SRR1785284 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785285 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785286 1 0.1411 0.885 0.964 0.000 0.036
#> SRR1785287 1 0.1411 0.885 0.964 0.000 0.036
#> SRR1785288 1 0.1411 0.885 0.964 0.000 0.036
#> SRR1785289 1 0.1411 0.885 0.964 0.000 0.036
#> SRR1785290 3 0.5178 0.697 0.256 0.000 0.744
#> SRR1785291 3 0.5178 0.697 0.256 0.000 0.744
#> SRR1785296 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785297 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785292 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785294 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785295 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785298 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785299 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785300 1 0.4235 0.827 0.824 0.000 0.176
#> SRR1785301 1 0.4235 0.827 0.824 0.000 0.176
#> SRR1785304 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785305 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785306 1 0.2537 0.849 0.920 0.000 0.080
#> SRR1785307 1 0.2796 0.843 0.908 0.000 0.092
#> SRR1785302 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785303 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785308 3 0.0592 0.832 0.012 0.000 0.988
#> SRR1785309 3 0.0592 0.832 0.012 0.000 0.988
#> SRR1785310 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785311 1 0.0000 0.883 1.000 0.000 0.000
#> SRR1785312 1 0.4504 0.821 0.804 0.000 0.196
#> SRR1785313 1 0.4452 0.826 0.808 0.000 0.192
#> SRR1785314 2 0.6400 0.718 0.208 0.740 0.052
#> SRR1785315 2 0.6318 0.744 0.172 0.760 0.068
#> SRR1785318 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785316 1 0.1411 0.885 0.964 0.000 0.036
#> SRR1785317 1 0.1529 0.885 0.960 0.000 0.040
#> SRR1785324 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785320 1 0.4702 0.813 0.788 0.000 0.212
#> SRR1785321 1 0.4750 0.811 0.784 0.000 0.216
#> SRR1785322 3 0.2165 0.816 0.064 0.000 0.936
#> SRR1785323 3 0.2066 0.818 0.060 0.000 0.940
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785239 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785240 1 0.7551 0.3161 0.448 0.000 0.196 0.356
#> SRR1785241 1 0.7276 0.2239 0.448 0.000 0.148 0.404
#> SRR1785242 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785243 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785244 4 0.2589 0.8019 0.116 0.000 0.000 0.884
#> SRR1785245 4 0.2589 0.8017 0.116 0.000 0.000 0.884
#> SRR1785246 1 0.4776 0.3208 0.624 0.000 0.376 0.000
#> SRR1785247 1 0.4679 0.3726 0.648 0.000 0.352 0.000
#> SRR1785248 3 0.1118 0.7789 0.000 0.036 0.964 0.000
#> SRR1785250 1 0.4134 0.4955 0.740 0.000 0.260 0.000
#> SRR1785251 1 0.3907 0.5296 0.768 0.000 0.232 0.000
#> SRR1785252 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785253 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785254 4 0.1004 0.8776 0.004 0.000 0.024 0.972
#> SRR1785255 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785256 4 0.5938 -0.0690 0.480 0.000 0.036 0.484
#> SRR1785257 4 0.5938 -0.0690 0.480 0.000 0.036 0.484
#> SRR1785258 1 0.4855 0.2336 0.600 0.000 0.400 0.000
#> SRR1785259 1 0.4866 0.2235 0.596 0.000 0.404 0.000
#> SRR1785262 4 0.5921 0.0223 0.448 0.000 0.036 0.516
#> SRR1785263 4 0.5921 0.0223 0.448 0.000 0.036 0.516
#> SRR1785260 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785261 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785264 3 0.1209 0.7794 0.000 0.032 0.964 0.004
#> SRR1785265 3 0.1209 0.7794 0.000 0.032 0.964 0.004
#> SRR1785266 3 0.4972 0.2968 0.000 0.456 0.544 0.000
#> SRR1785267 3 0.4877 0.4082 0.000 0.408 0.592 0.000
#> SRR1785268 1 0.0000 0.7158 1.000 0.000 0.000 0.000
#> SRR1785269 1 0.0000 0.7158 1.000 0.000 0.000 0.000
#> SRR1785270 3 0.4164 0.4665 0.000 0.264 0.736 0.000
#> SRR1785271 3 0.3726 0.5624 0.000 0.212 0.788 0.000
#> SRR1785272 3 0.4855 0.3551 0.400 0.000 0.600 0.000
#> SRR1785273 3 0.4877 0.3345 0.408 0.000 0.592 0.000
#> SRR1785276 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785277 3 0.0000 0.7869 0.000 0.000 1.000 0.000
#> SRR1785274 3 0.4250 0.5430 0.276 0.000 0.724 0.000
#> SRR1785275 3 0.4382 0.5112 0.296 0.000 0.704 0.000
#> SRR1785280 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.0000 0.7158 1.000 0.000 0.000 0.000
#> SRR1785279 1 0.0469 0.7122 0.988 0.000 0.000 0.012
#> SRR1785282 1 0.0000 0.7158 1.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.7158 1.000 0.000 0.000 0.000
#> SRR1785284 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785285 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785286 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785287 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785288 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785289 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785290 3 0.1118 0.7720 0.000 0.000 0.964 0.036
#> SRR1785291 3 0.1118 0.7720 0.000 0.000 0.964 0.036
#> SRR1785296 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785297 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785292 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785295 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785298 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785299 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785300 1 0.5000 -0.0117 0.504 0.000 0.000 0.496
#> SRR1785301 1 0.5000 -0.0117 0.504 0.000 0.000 0.496
#> SRR1785304 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785305 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785306 4 0.2868 0.7869 0.000 0.000 0.136 0.864
#> SRR1785307 4 0.3311 0.7470 0.000 0.000 0.172 0.828
#> SRR1785302 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785303 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785308 3 0.3528 0.6716 0.192 0.000 0.808 0.000
#> SRR1785309 3 0.3486 0.6742 0.188 0.000 0.812 0.000
#> SRR1785310 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785311 4 0.0000 0.8967 0.000 0.000 0.000 1.000
#> SRR1785312 1 0.0469 0.7120 0.988 0.000 0.000 0.012
#> SRR1785313 1 0.2081 0.6638 0.916 0.000 0.000 0.084
#> SRR1785314 2 0.5851 0.6548 0.000 0.680 0.236 0.084
#> SRR1785315 2 0.5579 0.6525 0.000 0.688 0.252 0.060
#> SRR1785318 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785316 4 0.1557 0.8584 0.056 0.000 0.000 0.944
#> SRR1785317 4 0.1867 0.8454 0.072 0.000 0.000 0.928
#> SRR1785324 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.9305 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.0000 0.7158 1.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.7158 1.000 0.000 0.000 0.000
#> SRR1785322 3 0.4804 0.3868 0.384 0.000 0.616 0.000
#> SRR1785323 3 0.4804 0.3868 0.384 0.000 0.616 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.0794 0.6740 0.028 0.000 0.972 0.000 0.000
#> SRR1785239 3 0.0794 0.6740 0.028 0.000 0.972 0.000 0.000
#> SRR1785240 5 0.5676 0.5056 0.108 0.000 0.104 0.076 0.712
#> SRR1785241 5 0.5689 0.5152 0.108 0.000 0.088 0.092 0.712
#> SRR1785242 3 0.3508 0.6148 0.000 0.000 0.748 0.000 0.252
#> SRR1785243 3 0.3508 0.6148 0.000 0.000 0.748 0.000 0.252
#> SRR1785244 4 0.2462 0.8099 0.112 0.000 0.000 0.880 0.008
#> SRR1785245 4 0.2462 0.8097 0.112 0.000 0.000 0.880 0.008
#> SRR1785246 1 0.6569 0.1236 0.464 0.000 0.232 0.000 0.304
#> SRR1785247 1 0.6551 0.1290 0.468 0.000 0.228 0.000 0.304
#> SRR1785248 3 0.2891 0.6474 0.000 0.000 0.824 0.000 0.176
#> SRR1785250 5 0.4836 -0.0678 0.356 0.000 0.032 0.000 0.612
#> SRR1785251 5 0.4949 -0.1294 0.396 0.000 0.032 0.000 0.572
#> SRR1785252 3 0.3707 0.6084 0.000 0.000 0.716 0.000 0.284
#> SRR1785253 3 0.3707 0.6084 0.000 0.000 0.716 0.000 0.284
#> SRR1785254 4 0.1267 0.9071 0.004 0.000 0.024 0.960 0.012
#> SRR1785255 4 0.0290 0.9312 0.000 0.000 0.000 0.992 0.008
#> SRR1785256 5 0.5268 0.5218 0.148 0.000 0.000 0.172 0.680
#> SRR1785257 5 0.5268 0.5218 0.148 0.000 0.000 0.172 0.680
#> SRR1785258 5 0.6476 0.2769 0.244 0.000 0.260 0.000 0.496
#> SRR1785259 5 0.6476 0.2759 0.244 0.000 0.260 0.000 0.496
#> SRR1785262 5 0.4948 0.5308 0.108 0.000 0.000 0.184 0.708
#> SRR1785263 5 0.4948 0.5308 0.108 0.000 0.000 0.184 0.708
#> SRR1785260 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785261 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785264 3 0.0880 0.6710 0.000 0.000 0.968 0.000 0.032
#> SRR1785265 3 0.0880 0.6710 0.000 0.000 0.968 0.000 0.032
#> SRR1785266 3 0.4305 0.1008 0.000 0.488 0.512 0.000 0.000
#> SRR1785267 3 0.4262 0.2337 0.000 0.440 0.560 0.000 0.000
#> SRR1785268 1 0.0290 0.6649 0.992 0.000 0.000 0.000 0.008
#> SRR1785269 1 0.0290 0.6649 0.992 0.000 0.000 0.000 0.008
#> SRR1785270 3 0.4873 0.4761 0.000 0.244 0.688 0.000 0.068
#> SRR1785271 3 0.4489 0.5485 0.000 0.192 0.740 0.000 0.068
#> SRR1785272 3 0.5938 0.0468 0.112 0.000 0.512 0.000 0.376
#> SRR1785273 3 0.5925 -0.0727 0.104 0.000 0.472 0.000 0.424
#> SRR1785276 3 0.2433 0.6600 0.056 0.000 0.908 0.024 0.012
#> SRR1785277 3 0.2758 0.6517 0.076 0.000 0.888 0.024 0.012
#> SRR1785274 5 0.4367 0.1981 0.004 0.000 0.416 0.000 0.580
#> SRR1785275 5 0.4299 0.2540 0.004 0.000 0.388 0.000 0.608
#> SRR1785280 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.4015 0.3740 0.652 0.000 0.000 0.000 0.348
#> SRR1785279 1 0.4252 0.3768 0.652 0.000 0.000 0.008 0.340
#> SRR1785282 1 0.4045 0.3615 0.644 0.000 0.000 0.000 0.356
#> SRR1785283 1 0.4074 0.3479 0.636 0.000 0.000 0.000 0.364
#> SRR1785284 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785285 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785286 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785287 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785288 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785289 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785290 3 0.0880 0.6719 0.000 0.000 0.968 0.032 0.000
#> SRR1785291 3 0.0880 0.6719 0.000 0.000 0.968 0.032 0.000
#> SRR1785296 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785297 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785292 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785294 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785295 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785298 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785299 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785300 5 0.6534 0.3340 0.196 0.000 0.000 0.388 0.416
#> SRR1785301 5 0.6534 0.3340 0.196 0.000 0.000 0.388 0.416
#> SRR1785304 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785305 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785306 4 0.5658 0.3070 0.000 0.000 0.096 0.572 0.332
#> SRR1785307 4 0.5903 0.2543 0.000 0.000 0.120 0.548 0.332
#> SRR1785302 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785303 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785308 3 0.5499 0.4476 0.068 0.000 0.532 0.000 0.400
#> SRR1785309 3 0.5499 0.4476 0.068 0.000 0.532 0.000 0.400
#> SRR1785310 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785311 4 0.0000 0.9373 0.000 0.000 0.000 1.000 0.000
#> SRR1785312 1 0.0290 0.6649 0.992 0.000 0.000 0.000 0.008
#> SRR1785313 1 0.0290 0.6649 0.992 0.000 0.000 0.000 0.008
#> SRR1785314 2 0.5831 0.5341 0.000 0.632 0.268 0.064 0.036
#> SRR1785315 2 0.5735 0.5171 0.000 0.628 0.284 0.052 0.036
#> SRR1785318 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 4 0.2471 0.8064 0.136 0.000 0.000 0.864 0.000
#> SRR1785317 4 0.2966 0.7864 0.136 0.000 0.000 0.848 0.016
#> SRR1785324 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.9111 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 1 0.0000 0.6611 1.000 0.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.6611 1.000 0.000 0.000 0.000 0.000
#> SRR1785322 3 0.5523 0.1649 0.080 0.000 0.572 0.000 0.348
#> SRR1785323 3 0.5523 0.1649 0.080 0.000 0.572 0.000 0.348
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.0000 0.590 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785239 3 0.0000 0.590 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785240 6 0.2906 0.625 0.032 0.000 0.044 0.052 0.000 0.872
#> SRR1785241 6 0.2838 0.635 0.032 0.000 0.024 0.072 0.000 0.872
#> SRR1785242 3 0.5223 0.431 0.000 0.000 0.592 0.000 0.272 0.136
#> SRR1785243 3 0.5223 0.431 0.000 0.000 0.592 0.000 0.272 0.136
#> SRR1785244 4 0.3134 0.760 0.036 0.000 0.000 0.820 0.000 0.144
#> SRR1785245 4 0.3134 0.760 0.036 0.000 0.000 0.820 0.000 0.144
#> SRR1785246 1 0.5861 0.216 0.484 0.000 0.252 0.000 0.000 0.264
#> SRR1785247 1 0.5846 0.222 0.488 0.000 0.248 0.000 0.000 0.264
#> SRR1785248 3 0.3336 0.535 0.000 0.000 0.812 0.000 0.132 0.056
#> SRR1785250 6 0.6071 -0.239 0.336 0.000 0.000 0.000 0.272 0.392
#> SRR1785251 1 0.6082 0.160 0.368 0.000 0.000 0.000 0.272 0.360
#> SRR1785252 3 0.5434 0.426 0.000 0.000 0.564 0.000 0.272 0.164
#> SRR1785253 3 0.5434 0.426 0.000 0.000 0.564 0.000 0.272 0.164
#> SRR1785254 4 0.0891 0.935 0.000 0.000 0.024 0.968 0.000 0.008
#> SRR1785255 4 0.0146 0.957 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1785256 6 0.3092 0.636 0.060 0.000 0.000 0.104 0.000 0.836
#> SRR1785257 6 0.3092 0.636 0.060 0.000 0.000 0.104 0.000 0.836
#> SRR1785258 6 0.4834 0.473 0.120 0.000 0.224 0.000 0.000 0.656
#> SRR1785259 6 0.4819 0.473 0.116 0.000 0.228 0.000 0.000 0.656
#> SRR1785262 6 0.2771 0.641 0.032 0.000 0.000 0.116 0.000 0.852
#> SRR1785263 6 0.2771 0.641 0.032 0.000 0.000 0.116 0.000 0.852
#> SRR1785260 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785261 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785264 3 0.1478 0.585 0.000 0.032 0.944 0.020 0.004 0.000
#> SRR1785265 3 0.1760 0.580 0.000 0.020 0.928 0.048 0.004 0.000
#> SRR1785266 3 0.3847 0.178 0.000 0.456 0.544 0.000 0.000 0.000
#> SRR1785267 3 0.3774 0.293 0.000 0.408 0.592 0.000 0.000 0.000
#> SRR1785268 1 0.0146 0.668 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1785269 1 0.0146 0.668 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1785270 5 0.5582 0.712 0.000 0.156 0.172 0.000 0.636 0.036
#> SRR1785271 5 0.5529 0.702 0.000 0.124 0.204 0.000 0.636 0.036
#> SRR1785272 3 0.6344 0.174 0.088 0.000 0.516 0.000 0.092 0.304
#> SRR1785273 3 0.6362 0.097 0.080 0.000 0.484 0.000 0.092 0.344
#> SRR1785276 3 0.2581 0.562 0.128 0.000 0.856 0.000 0.000 0.016
#> SRR1785277 3 0.2744 0.557 0.144 0.000 0.840 0.000 0.000 0.016
#> SRR1785274 6 0.3804 0.150 0.000 0.000 0.424 0.000 0.000 0.576
#> SRR1785275 6 0.3765 0.195 0.000 0.000 0.404 0.000 0.000 0.596
#> SRR1785280 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.3620 0.393 0.648 0.000 0.000 0.000 0.000 0.352
#> SRR1785279 1 0.3833 0.396 0.648 0.000 0.000 0.008 0.000 0.344
#> SRR1785282 1 0.3659 0.373 0.636 0.000 0.000 0.000 0.000 0.364
#> SRR1785283 1 0.3684 0.359 0.628 0.000 0.000 0.000 0.000 0.372
#> SRR1785284 4 0.0547 0.945 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR1785285 4 0.0547 0.945 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR1785286 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785287 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785288 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785289 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785290 3 0.1910 0.552 0.000 0.000 0.892 0.108 0.000 0.000
#> SRR1785291 3 0.1910 0.552 0.000 0.000 0.892 0.108 0.000 0.000
#> SRR1785296 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785297 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785292 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785294 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785295 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785298 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785299 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785300 6 0.5089 0.445 0.108 0.000 0.000 0.300 0.000 0.592
#> SRR1785301 6 0.5089 0.445 0.108 0.000 0.000 0.300 0.000 0.592
#> SRR1785304 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785305 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785306 5 0.6427 0.542 0.000 0.000 0.048 0.172 0.500 0.280
#> SRR1785307 5 0.6502 0.554 0.000 0.000 0.060 0.160 0.500 0.280
#> SRR1785302 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785303 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785308 3 0.6830 0.351 0.056 0.000 0.372 0.000 0.364 0.208
#> SRR1785309 3 0.6830 0.351 0.056 0.000 0.372 0.000 0.364 0.208
#> SRR1785310 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785311 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785312 1 0.0146 0.668 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1785313 1 0.0146 0.668 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1785314 5 0.4808 0.659 0.000 0.272 0.092 0.000 0.636 0.000
#> SRR1785315 5 0.4808 0.659 0.000 0.272 0.092 0.000 0.636 0.000
#> SRR1785318 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 4 0.3693 0.738 0.120 0.000 0.000 0.788 0.092 0.000
#> SRR1785317 4 0.3900 0.732 0.116 0.000 0.000 0.784 0.092 0.008
#> SRR1785324 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785320 1 0.0260 0.666 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR1785321 1 0.0260 0.666 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR1785322 3 0.4925 0.193 0.040 0.000 0.596 0.000 0.020 0.344
#> SRR1785323 3 0.4787 0.182 0.040 0.000 0.596 0.000 0.012 0.352
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.542 0.716 0.861 0.3402 0.777 0.777
#> 3 3 0.140 0.246 0.622 0.5652 0.621 0.530
#> 4 4 0.231 0.507 0.605 0.2607 0.624 0.320
#> 5 5 0.329 0.287 0.555 0.0921 0.744 0.322
#> 6 6 0.464 0.488 0.669 0.0756 0.796 0.338
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 1 0.7815 0.675 0.768 0.232
#> SRR1785239 1 0.7883 0.673 0.764 0.236
#> SRR1785240 1 0.0000 0.818 1.000 0.000
#> SRR1785241 1 0.0000 0.818 1.000 0.000
#> SRR1785242 1 0.9775 0.476 0.588 0.412
#> SRR1785243 1 0.9775 0.476 0.588 0.412
#> SRR1785244 1 0.0000 0.818 1.000 0.000
#> SRR1785245 1 0.0000 0.818 1.000 0.000
#> SRR1785246 1 0.0000 0.818 1.000 0.000
#> SRR1785247 1 0.0000 0.818 1.000 0.000
#> SRR1785248 2 0.5946 0.790 0.144 0.856
#> SRR1785250 1 0.9775 0.476 0.588 0.412
#> SRR1785251 1 0.9775 0.476 0.588 0.412
#> SRR1785252 1 0.9815 0.467 0.580 0.420
#> SRR1785253 1 0.9815 0.467 0.580 0.420
#> SRR1785254 1 0.0000 0.818 1.000 0.000
#> SRR1785255 1 0.0000 0.818 1.000 0.000
#> SRR1785256 1 0.0000 0.818 1.000 0.000
#> SRR1785257 1 0.0000 0.818 1.000 0.000
#> SRR1785258 1 0.0000 0.818 1.000 0.000
#> SRR1785259 1 0.0000 0.818 1.000 0.000
#> SRR1785262 1 0.0000 0.818 1.000 0.000
#> SRR1785263 1 0.0000 0.818 1.000 0.000
#> SRR1785260 1 0.9963 0.418 0.536 0.464
#> SRR1785261 1 0.9963 0.418 0.536 0.464
#> SRR1785264 1 0.9795 0.470 0.584 0.416
#> SRR1785265 1 0.9815 0.465 0.580 0.420
#> SRR1785266 2 0.1414 0.887 0.020 0.980
#> SRR1785267 2 0.1414 0.887 0.020 0.980
#> SRR1785268 1 0.0000 0.818 1.000 0.000
#> SRR1785269 1 0.0000 0.818 1.000 0.000
#> SRR1785270 1 0.0000 0.818 1.000 0.000
#> SRR1785271 1 0.0000 0.818 1.000 0.000
#> SRR1785272 1 0.9710 0.486 0.600 0.400
#> SRR1785273 1 0.9710 0.486 0.600 0.400
#> SRR1785276 1 0.0000 0.818 1.000 0.000
#> SRR1785277 1 0.0000 0.818 1.000 0.000
#> SRR1785274 1 0.0000 0.818 1.000 0.000
#> SRR1785275 1 0.0000 0.818 1.000 0.000
#> SRR1785280 2 0.0376 0.887 0.004 0.996
#> SRR1785281 2 0.0376 0.887 0.004 0.996
#> SRR1785278 1 0.0000 0.818 1.000 0.000
#> SRR1785279 1 0.0000 0.818 1.000 0.000
#> SRR1785282 1 0.2778 0.795 0.952 0.048
#> SRR1785283 1 0.2778 0.795 0.952 0.048
#> SRR1785284 1 0.0000 0.818 1.000 0.000
#> SRR1785285 1 0.0000 0.818 1.000 0.000
#> SRR1785286 1 0.0000 0.818 1.000 0.000
#> SRR1785287 1 0.0000 0.818 1.000 0.000
#> SRR1785288 1 0.4022 0.783 0.920 0.080
#> SRR1785289 1 0.4022 0.783 0.920 0.080
#> SRR1785290 1 0.9833 0.463 0.576 0.424
#> SRR1785291 1 0.9850 0.460 0.572 0.428
#> SRR1785296 1 0.9983 0.400 0.524 0.476
#> SRR1785297 1 0.9983 0.400 0.524 0.476
#> SRR1785292 2 0.3274 0.866 0.060 0.940
#> SRR1785293 2 0.3274 0.866 0.060 0.940
#> SRR1785294 1 0.9881 0.452 0.564 0.436
#> SRR1785295 1 0.9866 0.456 0.568 0.432
#> SRR1785298 1 0.8207 0.668 0.744 0.256
#> SRR1785299 1 0.8144 0.672 0.748 0.252
#> SRR1785300 1 0.2423 0.804 0.960 0.040
#> SRR1785301 1 0.2043 0.807 0.968 0.032
#> SRR1785304 1 0.9815 0.467 0.580 0.420
#> SRR1785305 1 0.9815 0.467 0.580 0.420
#> SRR1785306 1 0.0000 0.818 1.000 0.000
#> SRR1785307 1 0.0000 0.818 1.000 0.000
#> SRR1785302 1 0.3879 0.785 0.924 0.076
#> SRR1785303 1 0.3879 0.785 0.924 0.076
#> SRR1785308 1 0.9710 0.486 0.600 0.400
#> SRR1785309 1 0.9710 0.486 0.600 0.400
#> SRR1785310 1 0.3733 0.786 0.928 0.072
#> SRR1785311 1 0.3733 0.786 0.928 0.072
#> SRR1785312 1 0.0000 0.818 1.000 0.000
#> SRR1785313 1 0.0000 0.818 1.000 0.000
#> SRR1785314 1 0.0000 0.818 1.000 0.000
#> SRR1785315 1 0.0000 0.818 1.000 0.000
#> SRR1785318 2 0.0672 0.889 0.008 0.992
#> SRR1785319 2 0.0672 0.889 0.008 0.992
#> SRR1785316 1 0.3879 0.785 0.924 0.076
#> SRR1785317 1 0.3733 0.787 0.928 0.072
#> SRR1785324 2 0.8713 0.574 0.292 0.708
#> SRR1785325 2 0.8713 0.574 0.292 0.708
#> SRR1785320 1 0.0000 0.818 1.000 0.000
#> SRR1785321 1 0.0000 0.818 1.000 0.000
#> SRR1785322 1 0.1414 0.809 0.980 0.020
#> SRR1785323 1 0.2603 0.797 0.956 0.044
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 1 0.9464 0.02758 0.500 0.252 0.248
#> SRR1785239 1 0.9463 0.03228 0.500 0.256 0.244
#> SRR1785240 1 0.5785 0.04399 0.668 0.000 0.332
#> SRR1785241 1 0.5733 0.06690 0.676 0.000 0.324
#> SRR1785242 3 0.9964 0.10146 0.296 0.336 0.368
#> SRR1785243 3 0.9964 0.10146 0.296 0.336 0.368
#> SRR1785244 1 0.5331 0.37066 0.792 0.024 0.184
#> SRR1785245 1 0.5331 0.37066 0.792 0.024 0.184
#> SRR1785246 1 0.4195 0.41535 0.852 0.012 0.136
#> SRR1785247 1 0.4033 0.41787 0.856 0.008 0.136
#> SRR1785248 2 0.6761 0.39322 0.252 0.700 0.048
#> SRR1785250 1 0.9050 0.00377 0.536 0.296 0.168
#> SRR1785251 1 0.9050 0.00377 0.536 0.296 0.168
#> SRR1785252 3 0.9964 0.10146 0.296 0.336 0.368
#> SRR1785253 3 0.9964 0.10146 0.296 0.336 0.368
#> SRR1785254 3 0.6305 0.50461 0.484 0.000 0.516
#> SRR1785255 3 0.6305 0.50461 0.484 0.000 0.516
#> SRR1785256 1 0.0424 0.47680 0.992 0.000 0.008
#> SRR1785257 1 0.0424 0.47680 0.992 0.000 0.008
#> SRR1785258 1 0.4121 0.33972 0.832 0.000 0.168
#> SRR1785259 1 0.4121 0.33972 0.832 0.000 0.168
#> SRR1785262 1 0.2063 0.46389 0.948 0.008 0.044
#> SRR1785263 1 0.2063 0.46389 0.948 0.008 0.044
#> SRR1785260 2 0.9556 0.08650 0.372 0.432 0.196
#> SRR1785261 2 0.9556 0.08650 0.372 0.432 0.196
#> SRR1785264 1 0.9457 0.03159 0.468 0.340 0.192
#> SRR1785265 1 0.9389 0.02894 0.468 0.352 0.180
#> SRR1785266 2 0.5094 0.46605 0.136 0.824 0.040
#> SRR1785267 2 0.5094 0.46605 0.136 0.824 0.040
#> SRR1785268 1 0.1267 0.47306 0.972 0.004 0.024
#> SRR1785269 1 0.1267 0.47306 0.972 0.004 0.024
#> SRR1785270 3 0.6307 0.50585 0.488 0.000 0.512
#> SRR1785271 3 0.6307 0.50585 0.488 0.000 0.512
#> SRR1785272 1 0.7982 0.13798 0.556 0.376 0.068
#> SRR1785273 1 0.8807 0.04446 0.504 0.376 0.120
#> SRR1785276 1 0.6451 -0.26065 0.608 0.008 0.384
#> SRR1785277 1 0.6451 -0.26065 0.608 0.008 0.384
#> SRR1785274 1 0.6154 -0.30922 0.592 0.000 0.408
#> SRR1785275 1 0.6154 -0.30922 0.592 0.000 0.408
#> SRR1785280 2 0.1919 0.49996 0.024 0.956 0.020
#> SRR1785281 2 0.1919 0.49996 0.024 0.956 0.020
#> SRR1785278 1 0.0475 0.47746 0.992 0.004 0.004
#> SRR1785279 1 0.0475 0.47746 0.992 0.004 0.004
#> SRR1785282 1 0.3295 0.47609 0.896 0.096 0.008
#> SRR1785283 1 0.3295 0.47609 0.896 0.096 0.008
#> SRR1785284 1 0.6267 -0.41292 0.548 0.000 0.452
#> SRR1785285 1 0.6267 -0.41292 0.548 0.000 0.452
#> SRR1785286 1 0.4291 0.34846 0.820 0.000 0.180
#> SRR1785287 1 0.4291 0.34846 0.820 0.000 0.180
#> SRR1785288 1 0.7909 0.36162 0.664 0.148 0.188
#> SRR1785289 1 0.7909 0.36162 0.664 0.148 0.188
#> SRR1785290 2 0.9311 0.05269 0.364 0.468 0.168
#> SRR1785291 2 0.9335 0.04781 0.376 0.456 0.168
#> SRR1785296 2 0.9305 0.02914 0.380 0.456 0.164
#> SRR1785297 2 0.9305 0.02914 0.380 0.456 0.164
#> SRR1785292 2 0.4196 0.46325 0.024 0.864 0.112
#> SRR1785293 2 0.4196 0.46325 0.024 0.864 0.112
#> SRR1785294 2 0.8581 -0.01426 0.444 0.460 0.096
#> SRR1785295 2 0.8405 -0.03659 0.456 0.460 0.084
#> SRR1785298 1 0.9346 0.08729 0.516 0.260 0.224
#> SRR1785299 1 0.9405 0.07570 0.508 0.260 0.232
#> SRR1785300 1 0.7388 0.39162 0.704 0.136 0.160
#> SRR1785301 1 0.7327 0.39216 0.708 0.132 0.160
#> SRR1785304 2 0.9909 -0.06931 0.364 0.368 0.268
#> SRR1785305 2 0.9909 -0.06931 0.364 0.368 0.268
#> SRR1785306 3 0.6302 0.51631 0.480 0.000 0.520
#> SRR1785307 3 0.6302 0.51631 0.480 0.000 0.520
#> SRR1785302 1 0.9112 0.06085 0.524 0.168 0.308
#> SRR1785303 1 0.9112 0.06085 0.524 0.168 0.308
#> SRR1785308 1 0.9371 -0.04661 0.452 0.376 0.172
#> SRR1785309 1 0.9371 -0.04661 0.452 0.376 0.172
#> SRR1785310 1 0.7680 0.36340 0.680 0.188 0.132
#> SRR1785311 1 0.7680 0.36340 0.680 0.188 0.132
#> SRR1785312 1 0.3851 0.39430 0.860 0.004 0.136
#> SRR1785313 1 0.3784 0.39467 0.864 0.004 0.132
#> SRR1785314 3 0.6302 0.51631 0.480 0.000 0.520
#> SRR1785315 3 0.6302 0.51631 0.480 0.000 0.520
#> SRR1785318 2 0.2313 0.49853 0.024 0.944 0.032
#> SRR1785319 2 0.2313 0.49853 0.024 0.944 0.032
#> SRR1785316 1 0.7393 0.39332 0.704 0.140 0.156
#> SRR1785317 1 0.7451 0.39154 0.700 0.144 0.156
#> SRR1785324 2 0.6843 0.32136 0.028 0.640 0.332
#> SRR1785325 2 0.6659 0.33502 0.028 0.668 0.304
#> SRR1785320 1 0.3784 0.39467 0.864 0.004 0.132
#> SRR1785321 1 0.3784 0.39467 0.864 0.004 0.132
#> SRR1785322 1 0.4371 0.46537 0.860 0.108 0.032
#> SRR1785323 1 0.4295 0.46714 0.864 0.104 0.032
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 4 0.549 0.51781 0.056 0.064 0.100 0.780
#> SRR1785239 4 0.542 0.51653 0.056 0.060 0.100 0.784
#> SRR1785240 3 0.570 0.66377 0.184 0.004 0.720 0.092
#> SRR1785241 3 0.573 0.66107 0.188 0.004 0.716 0.092
#> SRR1785242 4 0.619 0.40868 0.088 0.096 0.076 0.740
#> SRR1785243 4 0.619 0.40868 0.088 0.096 0.076 0.740
#> SRR1785244 1 0.712 0.57911 0.580 0.004 0.180 0.236
#> SRR1785245 1 0.711 0.57977 0.580 0.004 0.176 0.240
#> SRR1785246 1 0.746 0.40215 0.532 0.004 0.252 0.212
#> SRR1785247 1 0.746 0.40215 0.532 0.004 0.252 0.212
#> SRR1785248 2 0.648 0.62768 0.008 0.544 0.056 0.392
#> SRR1785250 4 0.622 0.29289 0.296 0.056 0.012 0.636
#> SRR1785251 4 0.622 0.29289 0.296 0.056 0.012 0.636
#> SRR1785252 4 0.619 0.40868 0.088 0.096 0.076 0.740
#> SRR1785253 4 0.619 0.40868 0.088 0.096 0.076 0.740
#> SRR1785254 3 0.627 0.59241 0.112 0.000 0.648 0.240
#> SRR1785255 3 0.627 0.59241 0.112 0.000 0.648 0.240
#> SRR1785256 1 0.331 0.65852 0.840 0.000 0.004 0.156
#> SRR1785257 1 0.331 0.65852 0.840 0.000 0.004 0.156
#> SRR1785258 1 0.705 0.42462 0.568 0.000 0.252 0.180
#> SRR1785259 1 0.708 0.41787 0.564 0.000 0.252 0.184
#> SRR1785262 1 0.724 0.46358 0.568 0.012 0.136 0.284
#> SRR1785263 1 0.724 0.46765 0.568 0.012 0.136 0.284
#> SRR1785260 1 0.853 -0.11769 0.412 0.360 0.044 0.184
#> SRR1785261 1 0.855 -0.12504 0.408 0.360 0.044 0.188
#> SRR1785264 4 0.560 0.45014 0.016 0.136 0.096 0.752
#> SRR1785265 4 0.552 0.43836 0.016 0.144 0.084 0.756
#> SRR1785266 2 0.585 0.82599 0.008 0.680 0.056 0.256
#> SRR1785267 2 0.582 0.82563 0.008 0.684 0.056 0.252
#> SRR1785268 1 0.297 0.65782 0.856 0.000 0.000 0.144
#> SRR1785269 1 0.297 0.65782 0.856 0.000 0.000 0.144
#> SRR1785270 3 0.354 0.70562 0.028 0.000 0.852 0.120
#> SRR1785271 3 0.354 0.70562 0.028 0.000 0.852 0.120
#> SRR1785272 4 0.627 0.23618 0.312 0.048 0.016 0.624
#> SRR1785273 4 0.627 0.23618 0.312 0.048 0.016 0.624
#> SRR1785276 3 0.794 0.18015 0.332 0.004 0.412 0.252
#> SRR1785277 3 0.793 0.18181 0.336 0.004 0.412 0.248
#> SRR1785274 3 0.705 0.54171 0.272 0.004 0.576 0.148
#> SRR1785275 3 0.705 0.53793 0.272 0.004 0.576 0.148
#> SRR1785280 2 0.384 0.83413 0.000 0.776 0.000 0.224
#> SRR1785281 2 0.384 0.83413 0.000 0.776 0.000 0.224
#> SRR1785278 1 0.385 0.65036 0.800 0.000 0.008 0.192
#> SRR1785279 1 0.389 0.64961 0.796 0.000 0.008 0.196
#> SRR1785282 1 0.534 0.57239 0.668 0.032 0.000 0.300
#> SRR1785283 1 0.534 0.57239 0.668 0.032 0.000 0.300
#> SRR1785284 3 0.471 0.71143 0.052 0.004 0.788 0.156
#> SRR1785285 3 0.471 0.71143 0.052 0.004 0.788 0.156
#> SRR1785286 3 0.719 0.39738 0.376 0.004 0.496 0.124
#> SRR1785287 3 0.723 0.36003 0.400 0.004 0.472 0.124
#> SRR1785288 1 0.572 0.46770 0.756 0.084 0.032 0.128
#> SRR1785289 1 0.572 0.46770 0.756 0.084 0.032 0.128
#> SRR1785290 4 0.551 0.35420 0.024 0.268 0.016 0.692
#> SRR1785291 4 0.553 0.35065 0.024 0.272 0.016 0.688
#> SRR1785296 4 0.682 0.44100 0.064 0.328 0.024 0.584
#> SRR1785297 4 0.682 0.44100 0.064 0.328 0.024 0.584
#> SRR1785292 2 0.565 0.80763 0.000 0.664 0.052 0.284
#> SRR1785293 2 0.565 0.80763 0.000 0.664 0.052 0.284
#> SRR1785294 4 0.743 0.43040 0.128 0.360 0.012 0.500
#> SRR1785295 4 0.754 0.43045 0.128 0.360 0.016 0.496
#> SRR1785298 4 0.679 0.51653 0.124 0.136 0.052 0.688
#> SRR1785299 4 0.679 0.51653 0.124 0.136 0.052 0.688
#> SRR1785300 1 0.576 0.54199 0.744 0.080 0.024 0.152
#> SRR1785301 1 0.571 0.54272 0.748 0.080 0.024 0.148
#> SRR1785304 4 0.603 0.39292 0.052 0.244 0.020 0.684
#> SRR1785305 4 0.603 0.39292 0.052 0.244 0.020 0.684
#> SRR1785306 3 0.316 0.69231 0.052 0.000 0.884 0.064
#> SRR1785307 3 0.316 0.69231 0.052 0.000 0.884 0.064
#> SRR1785302 4 0.765 0.28062 0.112 0.036 0.312 0.540
#> SRR1785303 4 0.765 0.28062 0.112 0.036 0.312 0.540
#> SRR1785308 4 0.619 0.26456 0.284 0.052 0.016 0.648
#> SRR1785309 4 0.619 0.26456 0.284 0.052 0.016 0.648
#> SRR1785310 4 0.807 -0.00747 0.388 0.120 0.044 0.448
#> SRR1785311 4 0.809 0.01938 0.376 0.124 0.044 0.456
#> SRR1785312 1 0.540 0.64532 0.756 0.008 0.092 0.144
#> SRR1785313 1 0.540 0.64532 0.756 0.008 0.092 0.144
#> SRR1785314 3 0.316 0.69231 0.052 0.000 0.884 0.064
#> SRR1785315 3 0.316 0.69231 0.052 0.000 0.884 0.064
#> SRR1785318 2 0.384 0.83495 0.000 0.776 0.000 0.224
#> SRR1785319 2 0.384 0.83495 0.000 0.776 0.000 0.224
#> SRR1785316 1 0.570 0.55111 0.744 0.096 0.016 0.144
#> SRR1785317 1 0.575 0.54836 0.740 0.096 0.016 0.148
#> SRR1785324 2 0.694 0.67926 0.000 0.552 0.136 0.312
#> SRR1785325 2 0.694 0.67926 0.000 0.552 0.136 0.312
#> SRR1785320 1 0.546 0.64499 0.752 0.008 0.096 0.144
#> SRR1785321 1 0.540 0.64532 0.756 0.008 0.092 0.144
#> SRR1785322 1 0.609 0.49692 0.596 0.020 0.024 0.360
#> SRR1785323 1 0.631 0.49478 0.596 0.032 0.024 0.348
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 4 0.8126 0.3003 0.364 0.144 0.120 0.364 0.008
#> SRR1785239 4 0.8125 0.3160 0.356 0.144 0.120 0.372 0.008
#> SRR1785240 5 0.6695 0.2389 0.264 0.000 0.000 0.308 0.428
#> SRR1785241 5 0.6710 0.2358 0.272 0.000 0.000 0.304 0.424
#> SRR1785242 1 0.6068 -0.1916 0.468 0.056 0.448 0.028 0.000
#> SRR1785243 1 0.6068 -0.1916 0.468 0.056 0.448 0.028 0.000
#> SRR1785244 1 0.6709 0.1813 0.484 0.000 0.024 0.136 0.356
#> SRR1785245 1 0.6709 0.1813 0.484 0.000 0.024 0.136 0.356
#> SRR1785246 1 0.2983 0.3263 0.864 0.000 0.096 0.000 0.040
#> SRR1785247 1 0.2813 0.3344 0.876 0.000 0.084 0.000 0.040
#> SRR1785248 2 0.6211 0.2745 0.156 0.600 0.016 0.228 0.000
#> SRR1785250 3 0.5690 0.2915 0.436 0.068 0.492 0.000 0.004
#> SRR1785251 3 0.5690 0.2915 0.436 0.068 0.492 0.000 0.004
#> SRR1785252 1 0.6068 -0.1916 0.468 0.056 0.448 0.028 0.000
#> SRR1785253 1 0.6068 -0.1916 0.468 0.056 0.448 0.028 0.000
#> SRR1785254 5 0.7171 0.1107 0.292 0.004 0.008 0.332 0.364
#> SRR1785255 5 0.7171 0.1107 0.292 0.004 0.008 0.332 0.364
#> SRR1785256 1 0.5760 0.2700 0.684 0.000 0.160 0.036 0.120
#> SRR1785257 1 0.5803 0.2687 0.680 0.000 0.160 0.036 0.124
#> SRR1785258 1 0.4124 0.3698 0.820 0.008 0.024 0.044 0.104
#> SRR1785259 1 0.3811 0.3598 0.836 0.008 0.024 0.028 0.104
#> SRR1785262 1 0.5509 0.3619 0.744 0.020 0.112 0.072 0.052
#> SRR1785263 1 0.5566 0.3622 0.740 0.020 0.112 0.076 0.052
#> SRR1785260 4 0.5673 0.1062 0.040 0.020 0.000 0.512 0.428
#> SRR1785261 4 0.5673 0.1062 0.040 0.020 0.000 0.512 0.428
#> SRR1785264 4 0.7580 0.4695 0.188 0.212 0.100 0.500 0.000
#> SRR1785265 4 0.7560 0.4698 0.192 0.204 0.100 0.504 0.000
#> SRR1785266 2 0.2483 0.8787 0.028 0.908 0.016 0.048 0.000
#> SRR1785267 2 0.2483 0.8787 0.028 0.908 0.016 0.048 0.000
#> SRR1785268 1 0.5604 -0.0730 0.468 0.000 0.460 0.000 0.072
#> SRR1785269 1 0.5604 -0.0730 0.468 0.000 0.460 0.000 0.072
#> SRR1785270 5 0.6060 0.2506 0.092 0.000 0.008 0.424 0.476
#> SRR1785271 5 0.6060 0.2506 0.092 0.000 0.008 0.424 0.476
#> SRR1785272 3 0.4268 0.3417 0.444 0.000 0.556 0.000 0.000
#> SRR1785273 3 0.4268 0.3417 0.444 0.000 0.556 0.000 0.000
#> SRR1785276 1 0.5342 0.3734 0.728 0.000 0.052 0.144 0.076
#> SRR1785277 1 0.5130 0.3780 0.748 0.000 0.052 0.124 0.076
#> SRR1785274 1 0.6622 -0.1038 0.504 0.000 0.008 0.284 0.204
#> SRR1785275 1 0.6590 -0.0970 0.508 0.000 0.008 0.288 0.196
#> SRR1785280 2 0.0510 0.9106 0.000 0.984 0.000 0.016 0.000
#> SRR1785281 2 0.0510 0.9106 0.000 0.984 0.000 0.016 0.000
#> SRR1785278 1 0.5539 0.3527 0.728 0.004 0.060 0.092 0.116
#> SRR1785279 1 0.5645 0.3534 0.720 0.004 0.064 0.092 0.120
#> SRR1785282 1 0.6942 0.3319 0.648 0.072 0.056 0.088 0.136
#> SRR1785283 1 0.6942 0.3319 0.648 0.072 0.056 0.088 0.136
#> SRR1785284 5 0.6302 0.2602 0.132 0.000 0.004 0.420 0.444
#> SRR1785285 5 0.6302 0.2602 0.132 0.000 0.004 0.420 0.444
#> SRR1785286 4 0.7042 -0.2522 0.300 0.000 0.008 0.364 0.328
#> SRR1785287 4 0.7048 -0.2490 0.308 0.000 0.008 0.360 0.324
#> SRR1785288 5 0.5844 0.1259 0.272 0.008 0.000 0.112 0.608
#> SRR1785289 5 0.5770 0.1262 0.272 0.004 0.000 0.116 0.608
#> SRR1785290 4 0.6314 0.4440 0.180 0.312 0.000 0.508 0.000
#> SRR1785291 4 0.6325 0.4384 0.180 0.316 0.000 0.504 0.000
#> SRR1785296 4 0.4933 0.4909 0.200 0.084 0.004 0.712 0.000
#> SRR1785297 4 0.4879 0.4907 0.200 0.080 0.004 0.716 0.000
#> SRR1785292 2 0.0798 0.9084 0.000 0.976 0.000 0.016 0.008
#> SRR1785293 2 0.0798 0.9084 0.000 0.976 0.000 0.016 0.008
#> SRR1785294 4 0.6112 0.4681 0.144 0.064 0.008 0.684 0.100
#> SRR1785295 4 0.6319 0.4634 0.144 0.072 0.008 0.668 0.108
#> SRR1785298 4 0.6847 0.4632 0.236 0.104 0.084 0.576 0.000
#> SRR1785299 4 0.6847 0.4632 0.236 0.104 0.084 0.576 0.000
#> SRR1785300 5 0.6173 0.0989 0.388 0.004 0.004 0.104 0.500
#> SRR1785301 5 0.6173 0.0989 0.388 0.004 0.004 0.104 0.500
#> SRR1785304 4 0.6268 0.4878 0.148 0.240 0.004 0.596 0.012
#> SRR1785305 4 0.6268 0.4878 0.148 0.240 0.004 0.596 0.012
#> SRR1785306 4 0.6427 -0.2704 0.152 0.000 0.004 0.452 0.392
#> SRR1785307 4 0.6427 -0.2704 0.152 0.000 0.004 0.452 0.392
#> SRR1785302 4 0.7131 0.4047 0.356 0.084 0.012 0.488 0.060
#> SRR1785303 4 0.7212 0.4075 0.352 0.084 0.016 0.488 0.060
#> SRR1785308 3 0.4235 0.3475 0.424 0.000 0.576 0.000 0.000
#> SRR1785309 3 0.4235 0.3475 0.424 0.000 0.576 0.000 0.000
#> SRR1785310 4 0.8444 0.3884 0.272 0.048 0.092 0.444 0.144
#> SRR1785311 4 0.8444 0.3884 0.272 0.048 0.092 0.444 0.144
#> SRR1785312 3 0.6095 0.1356 0.416 0.000 0.460 0.000 0.124
#> SRR1785313 3 0.6095 0.1356 0.416 0.000 0.460 0.000 0.124
#> SRR1785314 4 0.6424 -0.2706 0.152 0.000 0.004 0.456 0.388
#> SRR1785315 4 0.6424 -0.2706 0.152 0.000 0.004 0.456 0.388
#> SRR1785318 2 0.0162 0.9114 0.000 0.996 0.000 0.004 0.000
#> SRR1785319 2 0.0162 0.9114 0.000 0.996 0.000 0.004 0.000
#> SRR1785316 5 0.6262 0.0735 0.408 0.008 0.016 0.072 0.496
#> SRR1785317 5 0.6304 0.0783 0.404 0.008 0.016 0.076 0.496
#> SRR1785324 2 0.1697 0.8804 0.000 0.932 0.000 0.008 0.060
#> SRR1785325 2 0.1697 0.8804 0.000 0.932 0.000 0.008 0.060
#> SRR1785320 3 0.6095 0.1356 0.416 0.000 0.460 0.000 0.124
#> SRR1785321 3 0.6095 0.1356 0.416 0.000 0.460 0.000 0.124
#> SRR1785322 1 0.5908 0.1728 0.648 0.080 0.232 0.040 0.000
#> SRR1785323 1 0.5807 0.2322 0.680 0.080 0.196 0.040 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 4 0.7993 0.261 0.008 0.296 0.040 0.384 0.164 0.108
#> SRR1785239 4 0.7993 0.261 0.008 0.296 0.040 0.384 0.164 0.108
#> SRR1785240 5 0.5520 0.283 0.232 0.000 0.020 0.000 0.612 0.136
#> SRR1785241 5 0.5520 0.283 0.232 0.000 0.020 0.000 0.612 0.136
#> SRR1785242 6 0.3163 0.995 0.000 0.004 0.232 0.000 0.000 0.764
#> SRR1785243 6 0.3163 0.995 0.000 0.004 0.232 0.000 0.000 0.764
#> SRR1785244 5 0.6960 0.364 0.160 0.000 0.076 0.180 0.548 0.036
#> SRR1785245 5 0.7008 0.353 0.160 0.000 0.076 0.188 0.540 0.036
#> SRR1785246 1 0.8602 0.465 0.428 0.036 0.096 0.136 0.112 0.192
#> SRR1785247 1 0.8563 0.473 0.432 0.036 0.088 0.136 0.116 0.192
#> SRR1785248 2 0.4007 0.640 0.004 0.764 0.004 0.180 0.004 0.044
#> SRR1785250 3 0.3210 0.536 0.036 0.020 0.864 0.024 0.000 0.056
#> SRR1785251 3 0.3210 0.536 0.036 0.020 0.864 0.024 0.000 0.056
#> SRR1785252 6 0.3189 0.995 0.000 0.004 0.236 0.000 0.000 0.760
#> SRR1785253 6 0.3189 0.995 0.000 0.004 0.236 0.000 0.000 0.760
#> SRR1785254 5 0.4237 0.653 0.076 0.036 0.000 0.016 0.796 0.076
#> SRR1785255 5 0.4445 0.647 0.076 0.040 0.004 0.016 0.788 0.076
#> SRR1785256 1 0.6004 0.547 0.660 0.000 0.084 0.032 0.084 0.140
#> SRR1785257 1 0.6004 0.547 0.660 0.000 0.084 0.032 0.084 0.140
#> SRR1785258 1 0.5739 0.574 0.644 0.000 0.052 0.012 0.088 0.204
#> SRR1785259 1 0.5739 0.574 0.644 0.000 0.052 0.012 0.088 0.204
#> SRR1785262 1 0.8921 0.428 0.384 0.084 0.052 0.132 0.140 0.208
#> SRR1785263 1 0.8945 0.427 0.380 0.084 0.052 0.136 0.140 0.208
#> SRR1785260 4 0.3777 0.338 0.088 0.012 0.020 0.820 0.060 0.000
#> SRR1785261 4 0.3777 0.338 0.088 0.012 0.020 0.820 0.060 0.000
#> SRR1785264 2 0.7226 -0.174 0.000 0.412 0.040 0.340 0.164 0.044
#> SRR1785265 2 0.7226 -0.174 0.000 0.412 0.040 0.340 0.164 0.044
#> SRR1785266 2 0.2282 0.756 0.000 0.888 0.000 0.088 0.000 0.024
#> SRR1785267 2 0.2282 0.756 0.000 0.888 0.000 0.088 0.000 0.024
#> SRR1785268 1 0.3536 0.498 0.804 0.000 0.060 0.004 0.000 0.132
#> SRR1785269 1 0.3536 0.498 0.804 0.000 0.060 0.004 0.000 0.132
#> SRR1785270 5 0.1124 0.695 0.008 0.000 0.000 0.000 0.956 0.036
#> SRR1785271 5 0.1124 0.695 0.008 0.000 0.000 0.000 0.956 0.036
#> SRR1785272 3 0.1198 0.588 0.004 0.020 0.960 0.012 0.000 0.004
#> SRR1785273 3 0.1053 0.587 0.004 0.020 0.964 0.012 0.000 0.000
#> SRR1785276 1 0.5834 0.541 0.600 0.000 0.040 0.000 0.144 0.216
#> SRR1785277 1 0.5802 0.544 0.604 0.000 0.040 0.000 0.140 0.216
#> SRR1785274 1 0.6222 0.384 0.496 0.000 0.036 0.000 0.320 0.148
#> SRR1785275 1 0.6212 0.393 0.500 0.000 0.036 0.000 0.316 0.148
#> SRR1785280 2 0.0363 0.785 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1785281 2 0.0363 0.785 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1785278 1 0.7731 0.492 0.488 0.000 0.132 0.112 0.088 0.180
#> SRR1785279 1 0.7749 0.489 0.484 0.000 0.140 0.112 0.084 0.180
#> SRR1785282 3 0.8504 0.292 0.240 0.060 0.348 0.212 0.012 0.128
#> SRR1785283 3 0.8504 0.292 0.240 0.060 0.348 0.212 0.012 0.128
#> SRR1785284 5 0.1781 0.697 0.008 0.000 0.000 0.008 0.924 0.060
#> SRR1785285 5 0.1781 0.697 0.008 0.000 0.000 0.008 0.924 0.060
#> SRR1785286 5 0.2806 0.692 0.040 0.000 0.016 0.012 0.884 0.048
#> SRR1785287 5 0.2806 0.692 0.040 0.000 0.016 0.012 0.884 0.048
#> SRR1785288 4 0.7012 0.146 0.124 0.000 0.024 0.512 0.248 0.092
#> SRR1785289 4 0.7012 0.146 0.124 0.000 0.024 0.512 0.248 0.092
#> SRR1785290 4 0.6408 0.241 0.000 0.340 0.000 0.452 0.172 0.036
#> SRR1785291 4 0.6414 0.235 0.000 0.344 0.000 0.448 0.172 0.036
#> SRR1785296 4 0.6040 0.400 0.000 0.208 0.004 0.584 0.168 0.036
#> SRR1785297 4 0.6040 0.400 0.000 0.208 0.004 0.584 0.168 0.036
#> SRR1785292 2 0.1970 0.764 0.000 0.912 0.000 0.060 0.028 0.000
#> SRR1785293 2 0.1970 0.764 0.000 0.912 0.000 0.060 0.028 0.000
#> SRR1785294 4 0.5126 0.405 0.028 0.056 0.016 0.684 0.216 0.000
#> SRR1785295 4 0.5100 0.405 0.028 0.056 0.016 0.688 0.212 0.000
#> SRR1785298 4 0.7162 0.337 0.000 0.276 0.028 0.464 0.172 0.060
#> SRR1785299 4 0.7162 0.337 0.000 0.276 0.028 0.464 0.172 0.060
#> SRR1785300 4 0.6789 0.159 0.212 0.004 0.028 0.512 0.220 0.024
#> SRR1785301 4 0.6808 0.156 0.212 0.004 0.028 0.508 0.224 0.024
#> SRR1785304 4 0.6630 0.337 0.016 0.228 0.004 0.536 0.180 0.036
#> SRR1785305 4 0.6630 0.337 0.016 0.228 0.004 0.536 0.180 0.036
#> SRR1785306 5 0.1257 0.700 0.020 0.000 0.000 0.000 0.952 0.028
#> SRR1785307 5 0.1257 0.700 0.020 0.000 0.000 0.000 0.952 0.028
#> SRR1785302 5 0.7057 0.145 0.044 0.164 0.000 0.236 0.508 0.048
#> SRR1785303 5 0.7010 0.124 0.036 0.172 0.000 0.240 0.504 0.048
#> SRR1785308 3 0.0862 0.583 0.004 0.016 0.972 0.008 0.000 0.000
#> SRR1785309 3 0.0862 0.583 0.004 0.016 0.972 0.008 0.000 0.000
#> SRR1785310 5 0.7273 0.103 0.060 0.056 0.036 0.348 0.460 0.040
#> SRR1785311 5 0.7273 0.103 0.060 0.056 0.036 0.348 0.460 0.040
#> SRR1785312 1 0.2922 0.545 0.876 0.000 0.060 0.008 0.028 0.028
#> SRR1785313 1 0.2922 0.545 0.876 0.000 0.060 0.008 0.028 0.028
#> SRR1785314 5 0.1408 0.700 0.020 0.000 0.000 0.000 0.944 0.036
#> SRR1785315 5 0.1408 0.700 0.020 0.000 0.000 0.000 0.944 0.036
#> SRR1785318 2 0.0146 0.784 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1785319 2 0.0146 0.784 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1785316 4 0.7610 0.207 0.200 0.008 0.068 0.504 0.144 0.076
#> SRR1785317 4 0.7610 0.207 0.200 0.008 0.068 0.504 0.144 0.076
#> SRR1785324 2 0.2894 0.736 0.004 0.860 0.000 0.020 0.104 0.012
#> SRR1785325 2 0.2894 0.736 0.004 0.860 0.000 0.020 0.104 0.012
#> SRR1785320 1 0.2727 0.544 0.880 0.000 0.064 0.000 0.028 0.028
#> SRR1785321 1 0.2668 0.544 0.884 0.000 0.060 0.000 0.028 0.028
#> SRR1785322 3 0.7519 0.394 0.096 0.188 0.500 0.176 0.016 0.024
#> SRR1785323 3 0.7624 0.384 0.108 0.188 0.488 0.176 0.016 0.024
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.927 0.926 0.969 0.4617 0.536 0.536
#> 3 3 0.685 0.772 0.905 0.4266 0.693 0.477
#> 4 4 0.617 0.665 0.837 0.1356 0.794 0.474
#> 5 5 0.650 0.657 0.813 0.0673 0.852 0.500
#> 6 6 0.689 0.549 0.741 0.0441 0.899 0.564
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
#> SRR1785238 2 0.891 0.578 0.308 0.692
#> SRR1785239 2 0.876 0.600 0.296 0.704
#> SRR1785240 1 0.000 0.975 1.000 0.000
#> SRR1785241 1 0.000 0.975 1.000 0.000
#> SRR1785242 1 0.917 0.497 0.668 0.332
#> SRR1785243 1 0.900 0.533 0.684 0.316
#> SRR1785244 1 0.000 0.975 1.000 0.000
#> SRR1785245 1 0.000 0.975 1.000 0.000
#> SRR1785246 1 0.000 0.975 1.000 0.000
#> SRR1785247 1 0.000 0.975 1.000 0.000
#> SRR1785248 2 0.000 0.951 0.000 1.000
#> SRR1785250 1 0.000 0.975 1.000 0.000
#> SRR1785251 1 0.000 0.975 1.000 0.000
#> SRR1785252 1 0.388 0.901 0.924 0.076
#> SRR1785253 1 0.327 0.918 0.940 0.060
#> SRR1785254 2 0.000 0.951 0.000 1.000
#> SRR1785255 2 0.000 0.951 0.000 1.000
#> SRR1785256 1 0.000 0.975 1.000 0.000
#> SRR1785257 1 0.000 0.975 1.000 0.000
#> SRR1785258 1 0.000 0.975 1.000 0.000
#> SRR1785259 1 0.000 0.975 1.000 0.000
#> SRR1785262 1 0.000 0.975 1.000 0.000
#> SRR1785263 1 0.000 0.975 1.000 0.000
#> SRR1785260 1 0.000 0.975 1.000 0.000
#> SRR1785261 1 0.000 0.975 1.000 0.000
#> SRR1785264 2 0.000 0.951 0.000 1.000
#> SRR1785265 2 0.000 0.951 0.000 1.000
#> SRR1785266 2 0.000 0.951 0.000 1.000
#> SRR1785267 2 0.000 0.951 0.000 1.000
#> SRR1785268 1 0.000 0.975 1.000 0.000
#> SRR1785269 1 0.000 0.975 1.000 0.000
#> SRR1785270 2 0.000 0.951 0.000 1.000
#> SRR1785271 2 0.000 0.951 0.000 1.000
#> SRR1785272 1 0.000 0.975 1.000 0.000
#> SRR1785273 1 0.000 0.975 1.000 0.000
#> SRR1785276 1 0.000 0.975 1.000 0.000
#> SRR1785277 1 0.000 0.975 1.000 0.000
#> SRR1785274 1 0.000 0.975 1.000 0.000
#> SRR1785275 1 0.000 0.975 1.000 0.000
#> SRR1785280 2 0.000 0.951 0.000 1.000
#> SRR1785281 2 0.000 0.951 0.000 1.000
#> SRR1785278 1 0.000 0.975 1.000 0.000
#> SRR1785279 1 0.000 0.975 1.000 0.000
#> SRR1785282 1 0.000 0.975 1.000 0.000
#> SRR1785283 1 0.000 0.975 1.000 0.000
#> SRR1785284 1 0.000 0.975 1.000 0.000
#> SRR1785285 1 0.000 0.975 1.000 0.000
#> SRR1785286 1 0.000 0.975 1.000 0.000
#> SRR1785287 1 0.000 0.975 1.000 0.000
#> SRR1785288 1 0.000 0.975 1.000 0.000
#> SRR1785289 1 0.000 0.975 1.000 0.000
#> SRR1785290 2 0.000 0.951 0.000 1.000
#> SRR1785291 2 0.000 0.951 0.000 1.000
#> SRR1785296 1 0.814 0.652 0.748 0.252
#> SRR1785297 1 0.814 0.652 0.748 0.252
#> SRR1785292 2 0.000 0.951 0.000 1.000
#> SRR1785293 2 0.000 0.951 0.000 1.000
#> SRR1785294 1 0.000 0.975 1.000 0.000
#> SRR1785295 1 0.000 0.975 1.000 0.000
#> SRR1785298 2 0.958 0.421 0.380 0.620
#> SRR1785299 2 0.943 0.470 0.360 0.640
#> SRR1785300 1 0.000 0.975 1.000 0.000
#> SRR1785301 1 0.000 0.975 1.000 0.000
#> SRR1785304 2 0.000 0.951 0.000 1.000
#> SRR1785305 2 0.000 0.951 0.000 1.000
#> SRR1785306 2 0.000 0.951 0.000 1.000
#> SRR1785307 2 0.000 0.951 0.000 1.000
#> SRR1785302 2 0.224 0.923 0.036 0.964
#> SRR1785303 2 0.224 0.923 0.036 0.964
#> SRR1785308 1 0.000 0.975 1.000 0.000
#> SRR1785309 1 0.000 0.975 1.000 0.000
#> SRR1785310 1 0.000 0.975 1.000 0.000
#> SRR1785311 1 0.000 0.975 1.000 0.000
#> SRR1785312 1 0.000 0.975 1.000 0.000
#> SRR1785313 1 0.000 0.975 1.000 0.000
#> SRR1785314 2 0.000 0.951 0.000 1.000
#> SRR1785315 2 0.000 0.951 0.000 1.000
#> SRR1785318 2 0.000 0.951 0.000 1.000
#> SRR1785319 2 0.000 0.951 0.000 1.000
#> SRR1785316 1 0.000 0.975 1.000 0.000
#> SRR1785317 1 0.000 0.975 1.000 0.000
#> SRR1785324 2 0.000 0.951 0.000 1.000
#> SRR1785325 2 0.000 0.951 0.000 1.000
#> SRR1785320 1 0.000 0.975 1.000 0.000
#> SRR1785321 1 0.000 0.975 1.000 0.000
#> SRR1785322 1 0.000 0.975 1.000 0.000
#> SRR1785323 1 0.000 0.975 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.5905 0.3922 0.000 0.352 0.648
#> SRR1785239 3 0.6062 0.3141 0.000 0.384 0.616
#> SRR1785240 3 0.6126 0.4219 0.400 0.000 0.600
#> SRR1785241 3 0.6140 0.4121 0.404 0.000 0.596
#> SRR1785242 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785244 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785246 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785248 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785250 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785251 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785252 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785254 2 0.5327 0.6194 0.272 0.728 0.000
#> SRR1785255 2 0.5254 0.6321 0.264 0.736 0.000
#> SRR1785256 1 0.0747 0.8983 0.984 0.000 0.016
#> SRR1785257 1 0.0892 0.8951 0.980 0.000 0.020
#> SRR1785258 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785259 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785262 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785263 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785260 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785261 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785264 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785265 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785266 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785267 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785268 3 0.5882 0.5286 0.348 0.000 0.652
#> SRR1785269 3 0.5810 0.5486 0.336 0.000 0.664
#> SRR1785270 2 0.4575 0.7407 0.184 0.812 0.004
#> SRR1785271 2 0.4233 0.7663 0.160 0.836 0.004
#> SRR1785272 3 0.2537 0.8260 0.080 0.000 0.920
#> SRR1785273 3 0.2711 0.8226 0.088 0.000 0.912
#> SRR1785276 3 0.0747 0.8539 0.016 0.000 0.984
#> SRR1785277 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785274 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785275 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785280 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785278 1 0.0237 0.9065 0.996 0.000 0.004
#> SRR1785279 1 0.0237 0.9065 0.996 0.000 0.004
#> SRR1785282 1 0.0237 0.9058 0.996 0.000 0.004
#> SRR1785283 1 0.0237 0.9058 0.996 0.000 0.004
#> SRR1785284 1 0.0424 0.9043 0.992 0.000 0.008
#> SRR1785285 1 0.0237 0.9065 0.996 0.000 0.004
#> SRR1785286 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785287 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785288 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785290 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785291 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785296 1 0.5591 0.5293 0.696 0.304 0.000
#> SRR1785297 1 0.5560 0.5374 0.700 0.300 0.000
#> SRR1785292 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785294 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785295 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785298 1 0.6307 -0.0182 0.512 0.488 0.000
#> SRR1785299 2 0.6215 0.2677 0.428 0.572 0.000
#> SRR1785300 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785304 1 0.3340 0.8043 0.880 0.120 0.000
#> SRR1785305 1 0.3941 0.7677 0.844 0.156 0.000
#> SRR1785306 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785307 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785302 1 0.6295 0.0583 0.528 0.472 0.000
#> SRR1785303 1 0.6299 0.0431 0.524 0.476 0.000
#> SRR1785308 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785309 3 0.0000 0.8589 0.000 0.000 1.000
#> SRR1785310 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785311 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785312 3 0.4750 0.7084 0.216 0.000 0.784
#> SRR1785313 3 0.4002 0.7633 0.160 0.000 0.840
#> SRR1785314 2 0.6180 0.2970 0.416 0.584 0.000
#> SRR1785315 2 0.5988 0.4266 0.368 0.632 0.000
#> SRR1785318 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785316 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.9080 1.000 0.000 0.000
#> SRR1785324 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.8931 0.000 1.000 0.000
#> SRR1785320 3 0.6045 0.4667 0.380 0.000 0.620
#> SRR1785321 3 0.6045 0.4667 0.380 0.000 0.620
#> SRR1785322 3 0.3752 0.7809 0.144 0.000 0.856
#> SRR1785323 3 0.3267 0.8039 0.116 0.000 0.884
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.4277 0.516 0.000 0.280 0.720 0.000
#> SRR1785239 3 0.4585 0.423 0.000 0.332 0.668 0.000
#> SRR1785240 1 0.0188 0.764 0.996 0.000 0.000 0.004
#> SRR1785241 1 0.0188 0.764 0.996 0.000 0.000 0.004
#> SRR1785242 3 0.3528 0.686 0.192 0.000 0.808 0.000
#> SRR1785243 3 0.3569 0.683 0.196 0.000 0.804 0.000
#> SRR1785244 4 0.5028 0.234 0.400 0.000 0.004 0.596
#> SRR1785245 4 0.5028 0.234 0.400 0.000 0.004 0.596
#> SRR1785246 1 0.4250 0.410 0.724 0.000 0.276 0.000
#> SRR1785247 1 0.4193 0.427 0.732 0.000 0.268 0.000
#> SRR1785248 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785250 3 0.0469 0.747 0.012 0.000 0.988 0.000
#> SRR1785251 3 0.0469 0.747 0.012 0.000 0.988 0.000
#> SRR1785252 3 0.2868 0.717 0.136 0.000 0.864 0.000
#> SRR1785253 3 0.2868 0.717 0.136 0.000 0.864 0.000
#> SRR1785254 1 0.6785 0.265 0.484 0.420 0.000 0.096
#> SRR1785255 1 0.6822 0.283 0.488 0.412 0.000 0.100
#> SRR1785256 4 0.5994 0.646 0.156 0.000 0.152 0.692
#> SRR1785257 4 0.5993 0.649 0.148 0.000 0.160 0.692
#> SRR1785258 3 0.5000 0.154 0.496 0.000 0.504 0.000
#> SRR1785259 3 0.4998 0.169 0.488 0.000 0.512 0.000
#> SRR1785262 3 0.5137 0.333 0.452 0.000 0.544 0.004
#> SRR1785263 3 0.5132 0.342 0.448 0.000 0.548 0.004
#> SRR1785260 4 0.0188 0.789 0.004 0.000 0.000 0.996
#> SRR1785261 4 0.0188 0.789 0.004 0.000 0.000 0.996
#> SRR1785264 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785265 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785266 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785267 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785268 3 0.5913 0.263 0.352 0.000 0.600 0.048
#> SRR1785269 3 0.5954 0.282 0.344 0.000 0.604 0.052
#> SRR1785270 1 0.0657 0.766 0.984 0.004 0.000 0.012
#> SRR1785271 1 0.0657 0.766 0.984 0.004 0.000 0.012
#> SRR1785272 3 0.0592 0.744 0.000 0.000 0.984 0.016
#> SRR1785273 3 0.0592 0.744 0.000 0.000 0.984 0.016
#> SRR1785276 1 0.1792 0.747 0.932 0.000 0.068 0.000
#> SRR1785277 1 0.1716 0.747 0.936 0.000 0.064 0.000
#> SRR1785274 1 0.0592 0.759 0.984 0.000 0.016 0.000
#> SRR1785275 1 0.0592 0.759 0.984 0.000 0.016 0.000
#> SRR1785280 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785278 4 0.7371 0.407 0.268 0.000 0.212 0.520
#> SRR1785279 4 0.7426 0.399 0.264 0.000 0.224 0.512
#> SRR1785282 4 0.4933 0.609 0.016 0.000 0.296 0.688
#> SRR1785283 4 0.4933 0.609 0.016 0.000 0.296 0.688
#> SRR1785284 1 0.2868 0.744 0.864 0.000 0.000 0.136
#> SRR1785285 1 0.2868 0.744 0.864 0.000 0.000 0.136
#> SRR1785286 1 0.4746 0.514 0.632 0.000 0.000 0.368
#> SRR1785287 1 0.4761 0.507 0.628 0.000 0.000 0.372
#> SRR1785288 4 0.0000 0.791 0.000 0.000 0.000 1.000
#> SRR1785289 4 0.0000 0.791 0.000 0.000 0.000 1.000
#> SRR1785290 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785291 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785296 4 0.4621 0.555 0.000 0.284 0.008 0.708
#> SRR1785297 4 0.4673 0.542 0.000 0.292 0.008 0.700
#> SRR1785292 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.1557 0.786 0.000 0.000 0.056 0.944
#> SRR1785295 4 0.1557 0.786 0.000 0.000 0.056 0.944
#> SRR1785298 4 0.4843 0.342 0.000 0.396 0.000 0.604
#> SRR1785299 4 0.4948 0.216 0.000 0.440 0.000 0.560
#> SRR1785300 4 0.0817 0.793 0.000 0.000 0.024 0.976
#> SRR1785301 4 0.0707 0.793 0.000 0.000 0.020 0.980
#> SRR1785304 4 0.1004 0.787 0.004 0.024 0.000 0.972
#> SRR1785305 4 0.1209 0.784 0.004 0.032 0.000 0.964
#> SRR1785306 1 0.3638 0.726 0.848 0.120 0.000 0.032
#> SRR1785307 1 0.3749 0.720 0.840 0.128 0.000 0.032
#> SRR1785302 2 0.4761 0.353 0.000 0.628 0.000 0.372
#> SRR1785303 2 0.4830 0.300 0.000 0.608 0.000 0.392
#> SRR1785308 3 0.0188 0.746 0.000 0.000 0.996 0.004
#> SRR1785309 3 0.0188 0.746 0.000 0.000 0.996 0.004
#> SRR1785310 4 0.0376 0.791 0.004 0.000 0.004 0.992
#> SRR1785311 4 0.0376 0.791 0.004 0.000 0.004 0.992
#> SRR1785312 1 0.2799 0.734 0.884 0.000 0.108 0.008
#> SRR1785313 1 0.2737 0.736 0.888 0.000 0.104 0.008
#> SRR1785314 1 0.5000 0.708 0.772 0.100 0.000 0.128
#> SRR1785315 1 0.4956 0.710 0.776 0.108 0.000 0.116
#> SRR1785318 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785316 4 0.2546 0.773 0.008 0.000 0.092 0.900
#> SRR1785317 4 0.2546 0.773 0.008 0.000 0.092 0.900
#> SRR1785324 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.944 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.5599 0.515 0.664 0.000 0.288 0.048
#> SRR1785321 1 0.5365 0.557 0.692 0.000 0.264 0.044
#> SRR1785322 3 0.1209 0.738 0.004 0.000 0.964 0.032
#> SRR1785323 3 0.1209 0.738 0.004 0.000 0.964 0.032
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 2 0.5182 0.2215 0.044 0.544 0.412 0.000 0.000
#> SRR1785239 2 0.5118 0.2265 0.040 0.548 0.412 0.000 0.000
#> SRR1785240 5 0.1281 0.7589 0.000 0.000 0.032 0.012 0.956
#> SRR1785241 5 0.1281 0.7589 0.000 0.000 0.032 0.012 0.956
#> SRR1785242 3 0.2411 0.6759 0.008 0.000 0.884 0.000 0.108
#> SRR1785243 3 0.2411 0.6759 0.008 0.000 0.884 0.000 0.108
#> SRR1785244 1 0.3912 0.7368 0.804 0.000 0.000 0.108 0.088
#> SRR1785245 1 0.3912 0.7373 0.804 0.000 0.000 0.108 0.088
#> SRR1785246 5 0.4734 0.3548 0.036 0.000 0.312 0.000 0.652
#> SRR1785247 5 0.4748 0.3794 0.040 0.000 0.300 0.000 0.660
#> SRR1785248 2 0.0404 0.8732 0.000 0.988 0.012 0.000 0.000
#> SRR1785250 3 0.2017 0.7076 0.080 0.000 0.912 0.000 0.008
#> SRR1785251 3 0.2017 0.7076 0.080 0.000 0.912 0.000 0.008
#> SRR1785252 3 0.2189 0.6957 0.012 0.000 0.904 0.000 0.084
#> SRR1785253 3 0.2189 0.6957 0.012 0.000 0.904 0.000 0.084
#> SRR1785254 5 0.8161 0.3117 0.140 0.284 0.004 0.160 0.412
#> SRR1785255 5 0.8229 0.2828 0.140 0.296 0.004 0.168 0.392
#> SRR1785256 1 0.7098 0.4717 0.512 0.000 0.272 0.168 0.048
#> SRR1785257 1 0.6961 0.4468 0.508 0.000 0.300 0.152 0.040
#> SRR1785258 3 0.6394 0.1815 0.344 0.000 0.476 0.000 0.180
#> SRR1785259 3 0.6463 0.2508 0.300 0.000 0.488 0.000 0.212
#> SRR1785262 3 0.6869 0.2032 0.004 0.000 0.412 0.308 0.276
#> SRR1785263 3 0.6891 0.1818 0.004 0.000 0.400 0.316 0.280
#> SRR1785260 4 0.0451 0.8604 0.008 0.000 0.004 0.988 0.000
#> SRR1785261 4 0.0451 0.8604 0.008 0.000 0.004 0.988 0.000
#> SRR1785264 2 0.1282 0.8564 0.004 0.952 0.044 0.000 0.000
#> SRR1785265 2 0.1282 0.8564 0.004 0.952 0.044 0.000 0.000
#> SRR1785266 2 0.0162 0.8745 0.000 0.996 0.004 0.000 0.000
#> SRR1785267 2 0.0162 0.8745 0.000 0.996 0.004 0.000 0.000
#> SRR1785268 1 0.1750 0.7257 0.936 0.000 0.036 0.000 0.028
#> SRR1785269 1 0.2074 0.7266 0.920 0.000 0.044 0.000 0.036
#> SRR1785270 5 0.1502 0.7645 0.056 0.004 0.000 0.000 0.940
#> SRR1785271 5 0.1408 0.7678 0.044 0.008 0.000 0.000 0.948
#> SRR1785272 3 0.3932 0.5813 0.328 0.000 0.672 0.000 0.000
#> SRR1785273 3 0.4066 0.5827 0.324 0.000 0.672 0.004 0.000
#> SRR1785276 5 0.3797 0.6238 0.232 0.004 0.008 0.000 0.756
#> SRR1785277 5 0.3611 0.6521 0.208 0.004 0.008 0.000 0.780
#> SRR1785274 5 0.0510 0.7616 0.000 0.000 0.016 0.000 0.984
#> SRR1785275 5 0.0566 0.7637 0.004 0.000 0.012 0.000 0.984
#> SRR1785280 2 0.0162 0.8745 0.000 0.996 0.004 0.000 0.000
#> SRR1785281 2 0.0162 0.8745 0.000 0.996 0.004 0.000 0.000
#> SRR1785278 1 0.1195 0.7429 0.960 0.000 0.000 0.012 0.028
#> SRR1785279 1 0.1300 0.7440 0.956 0.000 0.000 0.016 0.028
#> SRR1785282 1 0.3090 0.6880 0.860 0.000 0.088 0.052 0.000
#> SRR1785283 1 0.3159 0.6885 0.856 0.000 0.088 0.056 0.000
#> SRR1785284 5 0.3631 0.7402 0.072 0.000 0.000 0.104 0.824
#> SRR1785285 5 0.3682 0.7388 0.072 0.000 0.000 0.108 0.820
#> SRR1785286 4 0.3352 0.6921 0.004 0.000 0.004 0.800 0.192
#> SRR1785287 4 0.3317 0.6975 0.004 0.000 0.004 0.804 0.188
#> SRR1785288 1 0.4268 0.4979 0.648 0.000 0.000 0.344 0.008
#> SRR1785289 1 0.4283 0.4915 0.644 0.000 0.000 0.348 0.008
#> SRR1785290 2 0.0451 0.8737 0.000 0.988 0.008 0.004 0.000
#> SRR1785291 2 0.0451 0.8737 0.000 0.988 0.008 0.004 0.000
#> SRR1785296 4 0.3127 0.7750 0.004 0.128 0.020 0.848 0.000
#> SRR1785297 4 0.3394 0.7509 0.004 0.152 0.020 0.824 0.000
#> SRR1785292 2 0.0162 0.8742 0.000 0.996 0.004 0.000 0.000
#> SRR1785293 2 0.0162 0.8742 0.000 0.996 0.004 0.000 0.000
#> SRR1785294 4 0.1205 0.8487 0.040 0.000 0.004 0.956 0.000
#> SRR1785295 4 0.1282 0.8464 0.044 0.000 0.004 0.952 0.000
#> SRR1785298 2 0.4310 0.7070 0.032 0.772 0.012 0.180 0.004
#> SRR1785299 2 0.4199 0.7205 0.032 0.784 0.012 0.168 0.004
#> SRR1785300 4 0.3861 0.4840 0.284 0.000 0.004 0.712 0.000
#> SRR1785301 4 0.4009 0.4179 0.312 0.000 0.004 0.684 0.000
#> SRR1785304 4 0.0510 0.8599 0.000 0.016 0.000 0.984 0.000
#> SRR1785305 4 0.0510 0.8599 0.000 0.016 0.000 0.984 0.000
#> SRR1785306 5 0.3236 0.7513 0.008 0.028 0.004 0.100 0.860
#> SRR1785307 5 0.3210 0.7524 0.008 0.032 0.004 0.092 0.864
#> SRR1785302 2 0.6297 0.3745 0.276 0.556 0.008 0.160 0.000
#> SRR1785303 2 0.6361 0.3849 0.252 0.556 0.008 0.184 0.000
#> SRR1785308 3 0.2179 0.6972 0.100 0.000 0.896 0.004 0.000
#> SRR1785309 3 0.2179 0.6975 0.100 0.000 0.896 0.004 0.000
#> SRR1785310 4 0.0451 0.8590 0.008 0.000 0.000 0.988 0.004
#> SRR1785311 4 0.0290 0.8594 0.008 0.000 0.000 0.992 0.000
#> SRR1785312 1 0.4653 0.0830 0.516 0.000 0.012 0.000 0.472
#> SRR1785313 1 0.4561 0.0285 0.504 0.000 0.008 0.000 0.488
#> SRR1785314 5 0.5325 0.6964 0.056 0.136 0.000 0.076 0.732
#> SRR1785315 5 0.5301 0.6957 0.052 0.140 0.000 0.076 0.732
#> SRR1785318 2 0.0162 0.8741 0.000 0.996 0.000 0.000 0.004
#> SRR1785319 2 0.0162 0.8741 0.000 0.996 0.000 0.000 0.004
#> SRR1785316 1 0.2179 0.7396 0.896 0.000 0.004 0.100 0.000
#> SRR1785317 1 0.2179 0.7396 0.896 0.000 0.004 0.100 0.000
#> SRR1785324 2 0.0162 0.8741 0.000 0.996 0.000 0.000 0.004
#> SRR1785325 2 0.0162 0.8741 0.000 0.996 0.000 0.000 0.004
#> SRR1785320 1 0.3527 0.6982 0.804 0.000 0.024 0.000 0.172
#> SRR1785321 1 0.3527 0.6990 0.804 0.000 0.024 0.000 0.172
#> SRR1785322 3 0.4457 0.5157 0.368 0.000 0.620 0.012 0.000
#> SRR1785323 3 0.4392 0.5036 0.380 0.000 0.612 0.008 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 2 0.4366 0.62672 0.068 0.720 0.204 0.000 0.000 0.008
#> SRR1785239 2 0.4176 0.63662 0.064 0.732 0.200 0.000 0.000 0.004
#> SRR1785240 5 0.1036 0.78813 0.008 0.000 0.024 0.004 0.964 0.000
#> SRR1785241 5 0.1036 0.78813 0.008 0.000 0.024 0.004 0.964 0.000
#> SRR1785242 3 0.2728 0.66147 0.000 0.000 0.860 0.000 0.100 0.040
#> SRR1785243 3 0.3017 0.65805 0.000 0.000 0.840 0.000 0.108 0.052
#> SRR1785244 6 0.4847 0.40454 0.284 0.000 0.000 0.016 0.056 0.644
#> SRR1785245 6 0.4847 0.40454 0.284 0.000 0.000 0.016 0.056 0.644
#> SRR1785246 1 0.6544 0.01329 0.400 0.000 0.208 0.004 0.364 0.024
#> SRR1785247 1 0.6546 0.00279 0.396 0.000 0.208 0.004 0.368 0.024
#> SRR1785248 2 0.2436 0.79172 0.000 0.880 0.088 0.000 0.000 0.032
#> SRR1785250 3 0.4985 0.41787 0.284 0.000 0.648 0.032 0.016 0.020
#> SRR1785251 3 0.4966 0.42548 0.280 0.000 0.652 0.032 0.016 0.020
#> SRR1785252 3 0.3021 0.66334 0.044 0.000 0.860 0.000 0.076 0.020
#> SRR1785253 3 0.3021 0.66334 0.044 0.000 0.860 0.000 0.076 0.020
#> SRR1785254 6 0.6347 -0.00924 0.008 0.132 0.016 0.008 0.384 0.452
#> SRR1785255 6 0.6253 -0.01834 0.004 0.132 0.016 0.008 0.388 0.452
#> SRR1785256 6 0.7479 0.32194 0.248 0.000 0.232 0.048 0.048 0.424
#> SRR1785257 6 0.7468 0.31467 0.248 0.000 0.244 0.044 0.048 0.416
#> SRR1785258 3 0.6052 0.44963 0.052 0.000 0.552 0.000 0.112 0.284
#> SRR1785259 3 0.6006 0.46569 0.052 0.000 0.564 0.000 0.112 0.272
#> SRR1785262 3 0.6733 0.28986 0.016 0.000 0.408 0.244 0.316 0.016
#> SRR1785263 3 0.6688 0.29891 0.016 0.000 0.420 0.228 0.320 0.016
#> SRR1785260 4 0.0405 0.81197 0.000 0.000 0.000 0.988 0.004 0.008
#> SRR1785261 4 0.0260 0.81147 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR1785264 2 0.5743 0.43884 0.008 0.556 0.224 0.000 0.000 0.212
#> SRR1785265 2 0.5741 0.43746 0.008 0.556 0.228 0.000 0.000 0.208
#> SRR1785266 2 0.0146 0.83002 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785267 2 0.0146 0.83002 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785268 1 0.2068 0.56663 0.904 0.000 0.008 0.000 0.008 0.080
#> SRR1785269 1 0.2169 0.56651 0.900 0.000 0.012 0.000 0.008 0.080
#> SRR1785270 5 0.2950 0.73770 0.148 0.000 0.000 0.000 0.828 0.024
#> SRR1785271 5 0.2945 0.73162 0.156 0.000 0.000 0.000 0.824 0.020
#> SRR1785272 1 0.5585 0.33941 0.556 0.000 0.332 0.028 0.000 0.084
#> SRR1785273 1 0.5637 0.33436 0.552 0.000 0.336 0.036 0.000 0.076
#> SRR1785276 1 0.3754 0.53041 0.788 0.004 0.028 0.000 0.164 0.016
#> SRR1785277 1 0.4210 0.51579 0.760 0.004 0.048 0.000 0.168 0.020
#> SRR1785274 5 0.2122 0.78336 0.028 0.000 0.024 0.000 0.916 0.032
#> SRR1785275 5 0.2195 0.78375 0.028 0.000 0.024 0.000 0.912 0.036
#> SRR1785280 2 0.0000 0.83059 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.83059 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.4180 0.37636 0.632 0.000 0.008 0.012 0.000 0.348
#> SRR1785279 1 0.4299 0.36633 0.620 0.000 0.012 0.012 0.000 0.356
#> SRR1785282 1 0.5234 0.24271 0.520 0.000 0.052 0.020 0.000 0.408
#> SRR1785283 1 0.5228 0.24196 0.524 0.000 0.052 0.020 0.000 0.404
#> SRR1785284 5 0.4357 0.58481 0.016 0.000 0.000 0.020 0.660 0.304
#> SRR1785285 5 0.4374 0.57884 0.016 0.000 0.000 0.020 0.656 0.308
#> SRR1785286 4 0.4787 0.13844 0.000 0.000 0.000 0.516 0.432 0.052
#> SRR1785287 4 0.4731 0.15723 0.000 0.000 0.000 0.524 0.428 0.048
#> SRR1785288 6 0.4844 0.45343 0.200 0.000 0.000 0.112 0.008 0.680
#> SRR1785289 6 0.4934 0.45550 0.196 0.000 0.000 0.124 0.008 0.672
#> SRR1785290 2 0.2666 0.78725 0.000 0.872 0.028 0.008 0.000 0.092
#> SRR1785291 2 0.2222 0.79927 0.000 0.896 0.012 0.008 0.000 0.084
#> SRR1785296 4 0.2653 0.75571 0.004 0.080 0.008 0.880 0.000 0.028
#> SRR1785297 4 0.2808 0.74520 0.004 0.092 0.008 0.868 0.000 0.028
#> SRR1785292 2 0.0363 0.82977 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1785293 2 0.0363 0.82977 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1785294 4 0.0837 0.80339 0.020 0.000 0.004 0.972 0.000 0.004
#> SRR1785295 4 0.1003 0.79984 0.028 0.000 0.004 0.964 0.000 0.004
#> SRR1785298 2 0.5973 0.08637 0.004 0.464 0.024 0.056 0.020 0.432
#> SRR1785299 2 0.5872 0.13606 0.008 0.484 0.032 0.032 0.020 0.424
#> SRR1785300 4 0.4236 0.46139 0.036 0.000 0.000 0.656 0.000 0.308
#> SRR1785301 4 0.4363 0.42668 0.040 0.000 0.000 0.636 0.000 0.324
#> SRR1785304 4 0.1086 0.81199 0.000 0.012 0.000 0.964 0.012 0.012
#> SRR1785305 4 0.1086 0.81199 0.000 0.012 0.000 0.964 0.012 0.012
#> SRR1785306 5 0.3276 0.76308 0.000 0.020 0.028 0.032 0.860 0.060
#> SRR1785307 5 0.3223 0.76515 0.000 0.028 0.024 0.028 0.864 0.056
#> SRR1785302 6 0.4678 0.42515 0.012 0.216 0.008 0.016 0.032 0.716
#> SRR1785303 6 0.4677 0.41713 0.008 0.220 0.008 0.016 0.036 0.712
#> SRR1785308 3 0.4078 0.59207 0.068 0.000 0.748 0.004 0.000 0.180
#> SRR1785309 3 0.4078 0.59207 0.068 0.000 0.748 0.004 0.000 0.180
#> SRR1785310 4 0.1218 0.81069 0.004 0.000 0.000 0.956 0.012 0.028
#> SRR1785311 4 0.1053 0.81210 0.004 0.000 0.000 0.964 0.012 0.020
#> SRR1785312 1 0.2402 0.54951 0.856 0.000 0.000 0.000 0.140 0.004
#> SRR1785313 1 0.2442 0.54747 0.852 0.000 0.000 0.000 0.144 0.004
#> SRR1785314 5 0.5999 0.65399 0.084 0.108 0.000 0.016 0.648 0.144
#> SRR1785315 5 0.6038 0.65049 0.084 0.112 0.000 0.016 0.644 0.144
#> SRR1785318 2 0.0632 0.82811 0.000 0.976 0.000 0.000 0.000 0.024
#> SRR1785319 2 0.0632 0.82811 0.000 0.976 0.000 0.000 0.000 0.024
#> SRR1785316 1 0.4524 0.25332 0.560 0.000 0.000 0.036 0.000 0.404
#> SRR1785317 1 0.4682 0.22203 0.540 0.000 0.004 0.036 0.000 0.420
#> SRR1785324 2 0.0000 0.83059 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.83059 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785320 1 0.2595 0.56167 0.872 0.000 0.000 0.000 0.084 0.044
#> SRR1785321 1 0.2595 0.56167 0.872 0.000 0.000 0.000 0.084 0.044
#> SRR1785322 1 0.5697 0.39297 0.576 0.000 0.296 0.040 0.000 0.088
#> SRR1785323 1 0.5665 0.43119 0.596 0.000 0.268 0.040 0.000 0.096
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.952 0.933 0.967 0.2794 0.682 0.682
#> 3 3 0.399 0.578 0.717 0.9144 0.694 0.552
#> 4 4 0.416 0.562 0.713 0.1822 0.827 0.602
#> 5 5 0.541 0.633 0.727 0.1404 0.906 0.733
#> 6 6 0.608 0.658 0.780 0.0553 0.944 0.811
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
#> SRR1785238 2 0.9954 0.402 0.460 0.540
#> SRR1785239 2 0.9954 0.402 0.460 0.540
#> SRR1785240 1 0.0000 0.996 1.000 0.000
#> SRR1785241 1 0.0000 0.996 1.000 0.000
#> SRR1785242 1 0.0000 0.996 1.000 0.000
#> SRR1785243 1 0.0000 0.996 1.000 0.000
#> SRR1785244 1 0.0000 0.996 1.000 0.000
#> SRR1785245 1 0.0000 0.996 1.000 0.000
#> SRR1785246 1 0.0000 0.996 1.000 0.000
#> SRR1785247 1 0.0000 0.996 1.000 0.000
#> SRR1785248 2 0.2423 0.810 0.040 0.960
#> SRR1785250 1 0.0000 0.996 1.000 0.000
#> SRR1785251 1 0.0000 0.996 1.000 0.000
#> SRR1785252 1 0.0000 0.996 1.000 0.000
#> SRR1785253 1 0.0000 0.996 1.000 0.000
#> SRR1785254 1 0.0000 0.996 1.000 0.000
#> SRR1785255 1 0.0000 0.996 1.000 0.000
#> SRR1785256 1 0.0000 0.996 1.000 0.000
#> SRR1785257 1 0.0000 0.996 1.000 0.000
#> SRR1785258 1 0.0000 0.996 1.000 0.000
#> SRR1785259 1 0.0000 0.996 1.000 0.000
#> SRR1785262 1 0.0000 0.996 1.000 0.000
#> SRR1785263 1 0.0000 0.996 1.000 0.000
#> SRR1785260 1 0.0000 0.996 1.000 0.000
#> SRR1785261 1 0.0000 0.996 1.000 0.000
#> SRR1785264 2 0.9754 0.501 0.408 0.592
#> SRR1785265 2 0.9754 0.501 0.408 0.592
#> SRR1785266 2 0.0000 0.826 0.000 1.000
#> SRR1785267 2 0.0000 0.826 0.000 1.000
#> SRR1785268 1 0.0000 0.996 1.000 0.000
#> SRR1785269 1 0.0000 0.996 1.000 0.000
#> SRR1785270 1 0.1414 0.976 0.980 0.020
#> SRR1785271 1 0.1414 0.976 0.980 0.020
#> SRR1785272 1 0.0000 0.996 1.000 0.000
#> SRR1785273 1 0.0000 0.996 1.000 0.000
#> SRR1785276 1 0.0000 0.996 1.000 0.000
#> SRR1785277 1 0.0000 0.996 1.000 0.000
#> SRR1785274 1 0.0000 0.996 1.000 0.000
#> SRR1785275 1 0.0000 0.996 1.000 0.000
#> SRR1785280 2 0.0000 0.826 0.000 1.000
#> SRR1785281 2 0.0000 0.826 0.000 1.000
#> SRR1785278 1 0.0000 0.996 1.000 0.000
#> SRR1785279 1 0.0000 0.996 1.000 0.000
#> SRR1785282 1 0.0000 0.996 1.000 0.000
#> SRR1785283 1 0.0000 0.996 1.000 0.000
#> SRR1785284 1 0.0000 0.996 1.000 0.000
#> SRR1785285 1 0.0000 0.996 1.000 0.000
#> SRR1785286 1 0.0000 0.996 1.000 0.000
#> SRR1785287 1 0.0000 0.996 1.000 0.000
#> SRR1785288 1 0.0000 0.996 1.000 0.000
#> SRR1785289 1 0.0000 0.996 1.000 0.000
#> SRR1785290 2 0.9944 0.408 0.456 0.544
#> SRR1785291 2 0.9944 0.408 0.456 0.544
#> SRR1785296 1 0.0000 0.996 1.000 0.000
#> SRR1785297 1 0.0000 0.996 1.000 0.000
#> SRR1785292 2 0.0000 0.826 0.000 1.000
#> SRR1785293 2 0.0000 0.826 0.000 1.000
#> SRR1785294 1 0.0000 0.996 1.000 0.000
#> SRR1785295 1 0.0000 0.996 1.000 0.000
#> SRR1785298 1 0.0000 0.996 1.000 0.000
#> SRR1785299 1 0.0000 0.996 1.000 0.000
#> SRR1785300 1 0.0000 0.996 1.000 0.000
#> SRR1785301 1 0.0000 0.996 1.000 0.000
#> SRR1785304 1 0.3431 0.921 0.936 0.064
#> SRR1785305 1 0.3431 0.921 0.936 0.064
#> SRR1785306 1 0.0672 0.988 0.992 0.008
#> SRR1785307 1 0.0672 0.988 0.992 0.008
#> SRR1785302 1 0.0000 0.996 1.000 0.000
#> SRR1785303 1 0.0000 0.996 1.000 0.000
#> SRR1785308 1 0.0000 0.996 1.000 0.000
#> SRR1785309 1 0.0000 0.996 1.000 0.000
#> SRR1785310 1 0.0000 0.996 1.000 0.000
#> SRR1785311 1 0.0000 0.996 1.000 0.000
#> SRR1785312 1 0.0000 0.996 1.000 0.000
#> SRR1785313 1 0.0000 0.996 1.000 0.000
#> SRR1785314 1 0.1414 0.976 0.980 0.020
#> SRR1785315 1 0.1414 0.976 0.980 0.020
#> SRR1785318 2 0.0000 0.826 0.000 1.000
#> SRR1785319 2 0.0000 0.826 0.000 1.000
#> SRR1785316 1 0.0000 0.996 1.000 0.000
#> SRR1785317 1 0.0000 0.996 1.000 0.000
#> SRR1785324 2 0.0000 0.826 0.000 1.000
#> SRR1785325 2 0.0000 0.826 0.000 1.000
#> SRR1785320 1 0.0000 0.996 1.000 0.000
#> SRR1785321 1 0.0000 0.996 1.000 0.000
#> SRR1785322 1 0.0000 0.996 1.000 0.000
#> SRR1785323 1 0.0000 0.996 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 2 0.8066 0.532 0.404 0.528 0.068
#> SRR1785239 2 0.8066 0.532 0.404 0.528 0.068
#> SRR1785240 1 0.3686 0.558 0.860 0.000 0.140
#> SRR1785241 1 0.3686 0.558 0.860 0.000 0.140
#> SRR1785242 1 0.4931 0.402 0.768 0.000 0.232
#> SRR1785243 1 0.4931 0.402 0.768 0.000 0.232
#> SRR1785244 3 0.6308 0.851 0.492 0.000 0.508
#> SRR1785245 3 0.6308 0.851 0.492 0.000 0.508
#> SRR1785246 3 0.6305 0.860 0.484 0.000 0.516
#> SRR1785247 3 0.6305 0.860 0.484 0.000 0.516
#> SRR1785248 2 0.1711 0.825 0.032 0.960 0.008
#> SRR1785250 3 0.5988 0.819 0.368 0.000 0.632
#> SRR1785251 3 0.5988 0.819 0.368 0.000 0.632
#> SRR1785252 1 0.4974 0.395 0.764 0.000 0.236
#> SRR1785253 1 0.4974 0.395 0.764 0.000 0.236
#> SRR1785254 1 0.2711 0.603 0.912 0.000 0.088
#> SRR1785255 1 0.2711 0.603 0.912 0.000 0.088
#> SRR1785256 1 0.6308 -0.821 0.508 0.000 0.492
#> SRR1785257 1 0.6308 -0.821 0.508 0.000 0.492
#> SRR1785258 1 0.2878 0.598 0.904 0.000 0.096
#> SRR1785259 1 0.2878 0.598 0.904 0.000 0.096
#> SRR1785262 1 0.2796 0.585 0.908 0.000 0.092
#> SRR1785263 1 0.2796 0.585 0.908 0.000 0.092
#> SRR1785260 1 0.6280 0.363 0.540 0.000 0.460
#> SRR1785261 1 0.6280 0.363 0.540 0.000 0.460
#> SRR1785264 2 0.8037 0.608 0.352 0.572 0.076
#> SRR1785265 2 0.8037 0.608 0.352 0.572 0.076
#> SRR1785266 2 0.0424 0.835 0.000 0.992 0.008
#> SRR1785267 2 0.0424 0.835 0.000 0.992 0.008
#> SRR1785268 3 0.6215 0.903 0.428 0.000 0.572
#> SRR1785269 3 0.6215 0.903 0.428 0.000 0.572
#> SRR1785270 1 0.2448 0.604 0.924 0.000 0.076
#> SRR1785271 1 0.2448 0.604 0.924 0.000 0.076
#> SRR1785272 3 0.6244 0.906 0.440 0.000 0.560
#> SRR1785273 3 0.6244 0.906 0.440 0.000 0.560
#> SRR1785276 3 0.6305 0.860 0.484 0.000 0.516
#> SRR1785277 3 0.6305 0.860 0.484 0.000 0.516
#> SRR1785274 1 0.2796 0.585 0.908 0.000 0.092
#> SRR1785275 1 0.2796 0.585 0.908 0.000 0.092
#> SRR1785280 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785278 3 0.6225 0.905 0.432 0.000 0.568
#> SRR1785279 3 0.6225 0.905 0.432 0.000 0.568
#> SRR1785282 3 0.6308 0.851 0.492 0.000 0.508
#> SRR1785283 3 0.6308 0.851 0.492 0.000 0.508
#> SRR1785284 1 0.3686 0.558 0.860 0.000 0.140
#> SRR1785285 1 0.3686 0.558 0.860 0.000 0.140
#> SRR1785286 1 0.3038 0.608 0.896 0.000 0.104
#> SRR1785287 1 0.3038 0.608 0.896 0.000 0.104
#> SRR1785288 3 0.6308 0.851 0.492 0.000 0.508
#> SRR1785289 3 0.6308 0.851 0.492 0.000 0.508
#> SRR1785290 2 0.8573 0.564 0.372 0.524 0.104
#> SRR1785291 2 0.8573 0.564 0.372 0.524 0.104
#> SRR1785296 1 0.5291 0.541 0.732 0.000 0.268
#> SRR1785297 1 0.5291 0.541 0.732 0.000 0.268
#> SRR1785292 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785294 1 0.5760 0.484 0.672 0.000 0.328
#> SRR1785295 1 0.5760 0.484 0.672 0.000 0.328
#> SRR1785298 1 0.2711 0.603 0.912 0.000 0.088
#> SRR1785299 1 0.2711 0.603 0.912 0.000 0.088
#> SRR1785300 1 0.6308 -0.821 0.508 0.000 0.492
#> SRR1785301 1 0.6308 -0.821 0.508 0.000 0.492
#> SRR1785304 1 0.7459 0.221 0.584 0.044 0.372
#> SRR1785305 1 0.7459 0.221 0.584 0.044 0.372
#> SRR1785306 1 0.1860 0.615 0.948 0.000 0.052
#> SRR1785307 1 0.1860 0.615 0.948 0.000 0.052
#> SRR1785302 1 0.2959 0.604 0.900 0.000 0.100
#> SRR1785303 1 0.2959 0.604 0.900 0.000 0.100
#> SRR1785308 3 0.6045 0.833 0.380 0.000 0.620
#> SRR1785309 3 0.6045 0.833 0.380 0.000 0.620
#> SRR1785310 1 0.5785 0.478 0.668 0.000 0.332
#> SRR1785311 1 0.5785 0.478 0.668 0.000 0.332
#> SRR1785312 3 0.6302 0.875 0.480 0.000 0.520
#> SRR1785313 3 0.6302 0.875 0.480 0.000 0.520
#> SRR1785314 1 0.2448 0.604 0.924 0.000 0.076
#> SRR1785315 1 0.2448 0.604 0.924 0.000 0.076
#> SRR1785318 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785316 3 0.6244 0.906 0.440 0.000 0.560
#> SRR1785317 3 0.6244 0.906 0.440 0.000 0.560
#> SRR1785324 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.836 0.000 1.000 0.000
#> SRR1785320 1 0.6307 -0.843 0.512 0.000 0.488
#> SRR1785321 1 0.6307 -0.843 0.512 0.000 0.488
#> SRR1785322 3 0.6225 0.905 0.432 0.000 0.568
#> SRR1785323 3 0.6225 0.905 0.432 0.000 0.568
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 2 0.7304 0.494 0.052 0.528 0.052 0.368
#> SRR1785239 2 0.7304 0.494 0.052 0.528 0.052 0.368
#> SRR1785240 4 0.5611 0.568 0.412 0.000 0.024 0.564
#> SRR1785241 4 0.5611 0.568 0.412 0.000 0.024 0.564
#> SRR1785242 4 0.5926 0.171 0.308 0.000 0.060 0.632
#> SRR1785243 4 0.5926 0.171 0.308 0.000 0.060 0.632
#> SRR1785244 1 0.1389 0.728 0.952 0.000 0.000 0.048
#> SRR1785245 1 0.1389 0.728 0.952 0.000 0.000 0.048
#> SRR1785246 3 0.6808 1.000 0.300 0.000 0.572 0.128
#> SRR1785247 3 0.6808 1.000 0.300 0.000 0.572 0.128
#> SRR1785248 2 0.1406 0.783 0.000 0.960 0.016 0.024
#> SRR1785250 1 0.4744 0.425 0.736 0.000 0.024 0.240
#> SRR1785251 1 0.4744 0.425 0.736 0.000 0.024 0.240
#> SRR1785252 4 0.5764 0.165 0.304 0.000 0.052 0.644
#> SRR1785253 4 0.5764 0.165 0.304 0.000 0.052 0.644
#> SRR1785254 4 0.5070 0.618 0.416 0.000 0.004 0.580
#> SRR1785255 4 0.5070 0.618 0.416 0.000 0.004 0.580
#> SRR1785256 1 0.1792 0.714 0.932 0.000 0.000 0.068
#> SRR1785257 1 0.1792 0.714 0.932 0.000 0.000 0.068
#> SRR1785258 4 0.4925 0.613 0.428 0.000 0.000 0.572
#> SRR1785259 4 0.4925 0.613 0.428 0.000 0.000 0.572
#> SRR1785262 4 0.6620 0.551 0.320 0.000 0.104 0.576
#> SRR1785263 4 0.6620 0.551 0.320 0.000 0.104 0.576
#> SRR1785260 4 0.7214 0.237 0.144 0.000 0.380 0.476
#> SRR1785261 4 0.7214 0.237 0.144 0.000 0.380 0.476
#> SRR1785264 2 0.6450 0.573 0.012 0.572 0.052 0.364
#> SRR1785265 2 0.6450 0.573 0.012 0.572 0.052 0.364
#> SRR1785266 2 0.0336 0.795 0.000 0.992 0.000 0.008
#> SRR1785267 2 0.0336 0.795 0.000 0.992 0.000 0.008
#> SRR1785268 1 0.0657 0.723 0.984 0.000 0.012 0.004
#> SRR1785269 1 0.0657 0.723 0.984 0.000 0.012 0.004
#> SRR1785270 4 0.4964 0.582 0.256 0.000 0.028 0.716
#> SRR1785271 4 0.4964 0.582 0.256 0.000 0.028 0.716
#> SRR1785272 1 0.0804 0.730 0.980 0.000 0.012 0.008
#> SRR1785273 1 0.0804 0.730 0.980 0.000 0.012 0.008
#> SRR1785276 3 0.6808 1.000 0.300 0.000 0.572 0.128
#> SRR1785277 3 0.6808 1.000 0.300 0.000 0.572 0.128
#> SRR1785274 4 0.6620 0.551 0.320 0.000 0.104 0.576
#> SRR1785275 4 0.6620 0.551 0.320 0.000 0.104 0.576
#> SRR1785280 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.0469 0.726 0.988 0.000 0.012 0.000
#> SRR1785279 1 0.0469 0.726 0.988 0.000 0.012 0.000
#> SRR1785282 1 0.1389 0.728 0.952 0.000 0.000 0.048
#> SRR1785283 1 0.1389 0.728 0.952 0.000 0.000 0.048
#> SRR1785284 4 0.5611 0.568 0.412 0.000 0.024 0.564
#> SRR1785285 4 0.5611 0.568 0.412 0.000 0.024 0.564
#> SRR1785286 4 0.5793 0.621 0.384 0.000 0.036 0.580
#> SRR1785287 4 0.5793 0.621 0.384 0.000 0.036 0.580
#> SRR1785288 1 0.1389 0.728 0.952 0.000 0.000 0.048
#> SRR1785289 1 0.1389 0.728 0.952 0.000 0.000 0.048
#> SRR1785290 2 0.7140 0.536 0.012 0.524 0.100 0.364
#> SRR1785291 2 0.7140 0.536 0.012 0.524 0.100 0.364
#> SRR1785296 4 0.7423 0.489 0.344 0.000 0.180 0.476
#> SRR1785297 4 0.7423 0.489 0.344 0.000 0.180 0.476
#> SRR1785292 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785294 1 0.7476 -0.408 0.412 0.000 0.176 0.412
#> SRR1785295 1 0.7476 -0.408 0.412 0.000 0.176 0.412
#> SRR1785298 4 0.5070 0.618 0.416 0.000 0.004 0.580
#> SRR1785299 4 0.5070 0.618 0.416 0.000 0.004 0.580
#> SRR1785300 1 0.1792 0.714 0.932 0.000 0.000 0.068
#> SRR1785301 1 0.1792 0.714 0.932 0.000 0.000 0.068
#> SRR1785304 4 0.6484 0.236 0.016 0.044 0.388 0.552
#> SRR1785305 4 0.6484 0.236 0.016 0.044 0.388 0.552
#> SRR1785306 4 0.5036 0.602 0.280 0.000 0.024 0.696
#> SRR1785307 4 0.5036 0.602 0.280 0.000 0.024 0.696
#> SRR1785302 4 0.5080 0.616 0.420 0.000 0.004 0.576
#> SRR1785303 4 0.5080 0.616 0.420 0.000 0.004 0.576
#> SRR1785308 1 0.4567 0.447 0.740 0.000 0.016 0.244
#> SRR1785309 1 0.4567 0.447 0.740 0.000 0.016 0.244
#> SRR1785310 1 0.7476 -0.399 0.416 0.000 0.176 0.408
#> SRR1785311 1 0.7476 -0.399 0.416 0.000 0.176 0.408
#> SRR1785312 1 0.2799 0.626 0.884 0.000 0.108 0.008
#> SRR1785313 1 0.2799 0.626 0.884 0.000 0.108 0.008
#> SRR1785314 4 0.4964 0.582 0.256 0.000 0.028 0.716
#> SRR1785315 4 0.4964 0.582 0.256 0.000 0.028 0.716
#> SRR1785318 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.0804 0.730 0.980 0.000 0.012 0.008
#> SRR1785317 1 0.0804 0.730 0.980 0.000 0.012 0.008
#> SRR1785324 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.796 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.5859 0.150 0.652 0.000 0.284 0.064
#> SRR1785321 1 0.5859 0.150 0.652 0.000 0.284 0.064
#> SRR1785322 1 0.0469 0.726 0.988 0.000 0.012 0.000
#> SRR1785323 1 0.0469 0.726 0.988 0.000 0.012 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 2 0.7177 0.450 0.032 0.464 0.008 0.348 0.148
#> SRR1785239 2 0.7177 0.450 0.032 0.464 0.008 0.348 0.148
#> SRR1785240 5 0.3599 0.545 0.160 0.000 0.008 0.020 0.812
#> SRR1785241 5 0.3599 0.545 0.160 0.000 0.008 0.020 0.812
#> SRR1785242 5 0.8038 0.145 0.160 0.000 0.292 0.140 0.408
#> SRR1785243 5 0.8038 0.145 0.160 0.000 0.292 0.140 0.408
#> SRR1785244 1 0.1764 0.835 0.928 0.000 0.000 0.008 0.064
#> SRR1785245 1 0.1764 0.835 0.928 0.000 0.000 0.008 0.064
#> SRR1785246 3 0.3752 1.000 0.000 0.000 0.708 0.000 0.292
#> SRR1785247 3 0.3752 1.000 0.000 0.000 0.708 0.000 0.292
#> SRR1785248 2 0.1310 0.768 0.000 0.956 0.000 0.024 0.020
#> SRR1785250 1 0.5648 0.467 0.628 0.000 0.288 0.060 0.024
#> SRR1785251 1 0.5648 0.467 0.628 0.000 0.288 0.060 0.024
#> SRR1785252 5 0.8091 0.131 0.156 0.000 0.292 0.152 0.400
#> SRR1785253 5 0.8091 0.131 0.156 0.000 0.292 0.152 0.400
#> SRR1785254 5 0.4584 0.577 0.312 0.000 0.000 0.028 0.660
#> SRR1785255 5 0.4584 0.577 0.312 0.000 0.000 0.028 0.660
#> SRR1785256 1 0.2136 0.817 0.904 0.000 0.000 0.008 0.088
#> SRR1785257 1 0.2136 0.817 0.904 0.000 0.000 0.008 0.088
#> SRR1785258 5 0.4558 0.573 0.324 0.000 0.000 0.024 0.652
#> SRR1785259 5 0.4558 0.573 0.324 0.000 0.000 0.024 0.652
#> SRR1785262 5 0.4986 0.424 0.064 0.000 0.076 0.096 0.764
#> SRR1785263 5 0.4986 0.424 0.064 0.000 0.076 0.096 0.764
#> SRR1785260 4 0.5349 0.828 0.116 0.000 0.004 0.676 0.204
#> SRR1785261 4 0.5349 0.828 0.116 0.000 0.004 0.676 0.204
#> SRR1785264 2 0.6314 0.499 0.000 0.500 0.008 0.364 0.128
#> SRR1785265 2 0.6314 0.499 0.000 0.500 0.008 0.364 0.128
#> SRR1785266 2 0.0609 0.779 0.000 0.980 0.000 0.020 0.000
#> SRR1785267 2 0.0609 0.779 0.000 0.980 0.000 0.020 0.000
#> SRR1785268 1 0.0671 0.839 0.980 0.000 0.000 0.016 0.004
#> SRR1785269 1 0.0671 0.839 0.980 0.000 0.000 0.016 0.004
#> SRR1785270 5 0.4208 0.450 0.052 0.000 0.012 0.148 0.788
#> SRR1785271 5 0.4208 0.450 0.052 0.000 0.012 0.148 0.788
#> SRR1785272 1 0.0510 0.845 0.984 0.000 0.000 0.000 0.016
#> SRR1785273 1 0.0510 0.845 0.984 0.000 0.000 0.000 0.016
#> SRR1785276 3 0.3752 1.000 0.000 0.000 0.708 0.000 0.292
#> SRR1785277 3 0.3752 1.000 0.000 0.000 0.708 0.000 0.292
#> SRR1785274 5 0.4986 0.423 0.064 0.000 0.076 0.096 0.764
#> SRR1785275 5 0.4986 0.423 0.064 0.000 0.076 0.096 0.764
#> SRR1785280 2 0.0000 0.782 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.782 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.0510 0.841 0.984 0.000 0.000 0.016 0.000
#> SRR1785279 1 0.0510 0.841 0.984 0.000 0.000 0.016 0.000
#> SRR1785282 1 0.1764 0.835 0.928 0.000 0.000 0.008 0.064
#> SRR1785283 1 0.1764 0.835 0.928 0.000 0.000 0.008 0.064
#> SRR1785284 5 0.3599 0.545 0.160 0.000 0.008 0.020 0.812
#> SRR1785285 5 0.3599 0.545 0.160 0.000 0.008 0.020 0.812
#> SRR1785286 5 0.4330 0.590 0.204 0.000 0.008 0.036 0.752
#> SRR1785287 5 0.4330 0.590 0.204 0.000 0.008 0.036 0.752
#> SRR1785288 1 0.1764 0.835 0.928 0.000 0.000 0.008 0.064
#> SRR1785289 1 0.1764 0.835 0.928 0.000 0.000 0.008 0.064
#> SRR1785290 2 0.6375 0.437 0.000 0.452 0.008 0.412 0.128
#> SRR1785291 2 0.6375 0.437 0.000 0.452 0.008 0.412 0.128
#> SRR1785296 5 0.6206 0.428 0.252 0.000 0.000 0.200 0.548
#> SRR1785297 5 0.6206 0.428 0.252 0.000 0.000 0.200 0.548
#> SRR1785292 2 0.0162 0.782 0.000 0.996 0.000 0.004 0.000
#> SRR1785293 2 0.0162 0.782 0.000 0.996 0.000 0.004 0.000
#> SRR1785294 5 0.6432 0.362 0.320 0.000 0.000 0.196 0.484
#> SRR1785295 5 0.6432 0.362 0.320 0.000 0.000 0.196 0.484
#> SRR1785298 5 0.4584 0.577 0.312 0.000 0.000 0.028 0.660
#> SRR1785299 5 0.4584 0.577 0.312 0.000 0.000 0.028 0.660
#> SRR1785300 1 0.2136 0.817 0.904 0.000 0.000 0.008 0.088
#> SRR1785301 1 0.2136 0.817 0.904 0.000 0.000 0.008 0.088
#> SRR1785304 4 0.3266 0.823 0.000 0.000 0.004 0.796 0.200
#> SRR1785305 4 0.3266 0.823 0.000 0.000 0.004 0.796 0.200
#> SRR1785306 5 0.3690 0.496 0.052 0.000 0.008 0.112 0.828
#> SRR1785307 5 0.3690 0.496 0.052 0.000 0.008 0.112 0.828
#> SRR1785302 5 0.4584 0.572 0.312 0.000 0.000 0.028 0.660
#> SRR1785303 5 0.4584 0.572 0.312 0.000 0.000 0.028 0.660
#> SRR1785308 1 0.5587 0.503 0.640 0.000 0.280 0.044 0.036
#> SRR1785309 1 0.5587 0.503 0.640 0.000 0.280 0.044 0.036
#> SRR1785310 5 0.6442 0.356 0.324 0.000 0.000 0.196 0.480
#> SRR1785311 5 0.6442 0.356 0.324 0.000 0.000 0.196 0.480
#> SRR1785312 1 0.2304 0.796 0.892 0.000 0.100 0.000 0.008
#> SRR1785313 1 0.2304 0.796 0.892 0.000 0.100 0.000 0.008
#> SRR1785314 5 0.4208 0.450 0.052 0.000 0.012 0.148 0.788
#> SRR1785315 5 0.4208 0.450 0.052 0.000 0.012 0.148 0.788
#> SRR1785318 2 0.0000 0.782 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.782 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.0510 0.845 0.984 0.000 0.000 0.000 0.016
#> SRR1785317 1 0.0510 0.845 0.984 0.000 0.000 0.000 0.016
#> SRR1785324 2 0.0000 0.782 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.782 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 1 0.5524 0.468 0.600 0.000 0.320 0.004 0.076
#> SRR1785321 1 0.5524 0.468 0.600 0.000 0.320 0.004 0.076
#> SRR1785322 1 0.0510 0.841 0.984 0.000 0.000 0.016 0.000
#> SRR1785323 1 0.0510 0.841 0.984 0.000 0.000 0.016 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.6022 0.413 0.032 0.360 0.520 0.020 0.068 0.000
#> SRR1785239 3 0.6022 0.413 0.032 0.360 0.520 0.020 0.068 0.000
#> SRR1785240 5 0.3031 0.618 0.084 0.000 0.016 0.024 0.864 0.012
#> SRR1785241 5 0.3031 0.618 0.084 0.000 0.016 0.024 0.864 0.012
#> SRR1785242 3 0.5203 0.210 0.096 0.000 0.572 0.000 0.328 0.004
#> SRR1785243 3 0.5203 0.210 0.096 0.000 0.572 0.000 0.328 0.004
#> SRR1785244 1 0.2100 0.785 0.884 0.000 0.000 0.004 0.112 0.000
#> SRR1785245 1 0.2100 0.785 0.884 0.000 0.000 0.004 0.112 0.000
#> SRR1785246 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1785247 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1785248 2 0.1686 0.899 0.000 0.924 0.064 0.000 0.012 0.000
#> SRR1785250 1 0.4833 0.267 0.488 0.000 0.464 0.044 0.000 0.004
#> SRR1785251 1 0.4833 0.267 0.488 0.000 0.464 0.044 0.000 0.004
#> SRR1785252 3 0.5228 0.226 0.088 0.000 0.584 0.004 0.320 0.004
#> SRR1785253 3 0.5228 0.226 0.088 0.000 0.584 0.004 0.320 0.004
#> SRR1785254 5 0.3837 0.653 0.224 0.000 0.016 0.016 0.744 0.000
#> SRR1785255 5 0.3837 0.653 0.224 0.000 0.016 0.016 0.744 0.000
#> SRR1785256 1 0.2362 0.768 0.860 0.000 0.000 0.004 0.136 0.000
#> SRR1785257 1 0.2362 0.768 0.860 0.000 0.000 0.004 0.136 0.000
#> SRR1785258 5 0.4062 0.647 0.236 0.000 0.028 0.012 0.724 0.000
#> SRR1785259 5 0.4062 0.647 0.236 0.000 0.028 0.012 0.724 0.000
#> SRR1785262 5 0.5921 0.406 0.044 0.000 0.160 0.000 0.596 0.200
#> SRR1785263 5 0.5921 0.406 0.044 0.000 0.160 0.000 0.596 0.200
#> SRR1785260 4 0.3044 0.827 0.116 0.000 0.000 0.836 0.048 0.000
#> SRR1785261 4 0.3044 0.827 0.116 0.000 0.000 0.836 0.048 0.000
#> SRR1785264 3 0.5287 0.363 0.000 0.396 0.528 0.024 0.052 0.000
#> SRR1785265 3 0.5287 0.363 0.000 0.396 0.528 0.024 0.052 0.000
#> SRR1785266 2 0.0622 0.973 0.000 0.980 0.012 0.008 0.000 0.000
#> SRR1785267 2 0.0622 0.973 0.000 0.980 0.012 0.008 0.000 0.000
#> SRR1785268 1 0.2046 0.778 0.916 0.000 0.044 0.032 0.008 0.000
#> SRR1785269 1 0.2046 0.778 0.916 0.000 0.044 0.032 0.008 0.000
#> SRR1785270 5 0.4093 0.504 0.000 0.000 0.112 0.104 0.772 0.012
#> SRR1785271 5 0.4093 0.504 0.000 0.000 0.112 0.104 0.772 0.012
#> SRR1785272 1 0.1078 0.792 0.964 0.000 0.008 0.012 0.016 0.000
#> SRR1785273 1 0.1078 0.792 0.964 0.000 0.008 0.012 0.016 0.000
#> SRR1785276 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1785277 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1785274 5 0.5921 0.402 0.044 0.000 0.160 0.000 0.596 0.200
#> SRR1785275 5 0.5921 0.402 0.044 0.000 0.160 0.000 0.596 0.200
#> SRR1785280 2 0.0000 0.984 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.984 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.1649 0.779 0.932 0.000 0.036 0.032 0.000 0.000
#> SRR1785279 1 0.1649 0.779 0.932 0.000 0.036 0.032 0.000 0.000
#> SRR1785282 1 0.2100 0.785 0.884 0.000 0.000 0.004 0.112 0.000
#> SRR1785283 1 0.2100 0.785 0.884 0.000 0.000 0.004 0.112 0.000
#> SRR1785284 5 0.3031 0.618 0.084 0.000 0.016 0.024 0.864 0.012
#> SRR1785285 5 0.3031 0.618 0.084 0.000 0.016 0.024 0.864 0.012
#> SRR1785286 5 0.3032 0.665 0.108 0.000 0.004 0.020 0.852 0.016
#> SRR1785287 5 0.3032 0.665 0.108 0.000 0.004 0.020 0.852 0.016
#> SRR1785288 1 0.2100 0.785 0.884 0.000 0.000 0.004 0.112 0.000
#> SRR1785289 1 0.2100 0.785 0.884 0.000 0.000 0.004 0.112 0.000
#> SRR1785290 3 0.5881 0.403 0.000 0.348 0.524 0.080 0.048 0.000
#> SRR1785291 3 0.5881 0.403 0.000 0.348 0.524 0.080 0.048 0.000
#> SRR1785296 5 0.5922 0.546 0.188 0.000 0.020 0.212 0.576 0.004
#> SRR1785297 5 0.5922 0.546 0.188 0.000 0.020 0.212 0.576 0.004
#> SRR1785292 2 0.0260 0.981 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR1785293 2 0.0260 0.981 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR1785294 5 0.6122 0.486 0.260 0.000 0.012 0.212 0.512 0.004
#> SRR1785295 5 0.6122 0.486 0.260 0.000 0.012 0.212 0.512 0.004
#> SRR1785298 5 0.3837 0.653 0.224 0.000 0.016 0.016 0.744 0.000
#> SRR1785299 5 0.3837 0.653 0.224 0.000 0.016 0.016 0.744 0.000
#> SRR1785300 1 0.2362 0.768 0.860 0.000 0.000 0.004 0.136 0.000
#> SRR1785301 1 0.2362 0.768 0.860 0.000 0.000 0.004 0.136 0.000
#> SRR1785304 4 0.2696 0.822 0.000 0.000 0.116 0.856 0.028 0.000
#> SRR1785305 4 0.2696 0.822 0.000 0.000 0.116 0.856 0.028 0.000
#> SRR1785306 5 0.3366 0.546 0.000 0.000 0.100 0.052 0.832 0.016
#> SRR1785307 5 0.3366 0.546 0.000 0.000 0.100 0.052 0.832 0.016
#> SRR1785302 5 0.4124 0.647 0.224 0.000 0.036 0.012 0.728 0.000
#> SRR1785303 5 0.4124 0.647 0.224 0.000 0.036 0.012 0.728 0.000
#> SRR1785308 1 0.4517 0.352 0.560 0.000 0.412 0.012 0.016 0.000
#> SRR1785309 1 0.4517 0.352 0.560 0.000 0.412 0.012 0.016 0.000
#> SRR1785310 5 0.6137 0.481 0.264 0.000 0.012 0.212 0.508 0.004
#> SRR1785311 5 0.6137 0.481 0.264 0.000 0.012 0.212 0.508 0.004
#> SRR1785312 1 0.2938 0.757 0.860 0.000 0.020 0.004 0.016 0.100
#> SRR1785313 1 0.2938 0.757 0.860 0.000 0.020 0.004 0.016 0.100
#> SRR1785314 5 0.4093 0.504 0.000 0.000 0.112 0.104 0.772 0.012
#> SRR1785315 5 0.4093 0.504 0.000 0.000 0.112 0.104 0.772 0.012
#> SRR1785318 2 0.0000 0.984 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.984 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 1 0.1078 0.792 0.964 0.000 0.008 0.012 0.016 0.000
#> SRR1785317 1 0.1078 0.792 0.964 0.000 0.008 0.012 0.016 0.000
#> SRR1785324 2 0.0000 0.984 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.984 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785320 1 0.4856 0.445 0.572 0.000 0.000 0.000 0.068 0.360
#> SRR1785321 1 0.4856 0.445 0.572 0.000 0.000 0.000 0.068 0.360
#> SRR1785322 1 0.1649 0.779 0.932 0.000 0.036 0.032 0.000 0.000
#> SRR1785323 1 0.1649 0.779 0.932 0.000 0.036 0.032 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.700 0.849 0.927 0.3994 0.586 0.586
#> 3 3 0.306 0.496 0.661 0.4420 0.743 0.584
#> 4 4 0.326 0.561 0.686 0.1805 0.827 0.623
#> 5 5 0.395 0.453 0.634 0.0924 0.944 0.849
#> 6 6 0.453 0.344 0.556 0.0535 0.874 0.635
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
#> SRR1785238 1 1.0000 -0.167 0.504 0.496
#> SRR1785239 1 1.0000 -0.167 0.504 0.496
#> SRR1785240 1 0.0672 0.935 0.992 0.008
#> SRR1785241 1 0.0672 0.935 0.992 0.008
#> SRR1785242 1 0.7674 0.693 0.776 0.224
#> SRR1785243 1 0.7674 0.693 0.776 0.224
#> SRR1785244 1 0.0000 0.938 1.000 0.000
#> SRR1785245 1 0.0000 0.938 1.000 0.000
#> SRR1785246 1 0.1184 0.929 0.984 0.016
#> SRR1785247 1 0.1184 0.929 0.984 0.016
#> SRR1785248 2 0.1633 0.873 0.024 0.976
#> SRR1785250 1 0.0672 0.935 0.992 0.008
#> SRR1785251 1 0.0672 0.935 0.992 0.008
#> SRR1785252 1 0.7674 0.693 0.776 0.224
#> SRR1785253 1 0.7674 0.693 0.776 0.224
#> SRR1785254 2 0.9170 0.642 0.332 0.668
#> SRR1785255 2 0.9170 0.642 0.332 0.668
#> SRR1785256 1 0.0000 0.938 1.000 0.000
#> SRR1785257 1 0.0000 0.938 1.000 0.000
#> SRR1785258 1 0.0000 0.938 1.000 0.000
#> SRR1785259 1 0.0000 0.938 1.000 0.000
#> SRR1785262 1 0.0000 0.938 1.000 0.000
#> SRR1785263 1 0.0000 0.938 1.000 0.000
#> SRR1785260 1 0.0376 0.937 0.996 0.004
#> SRR1785261 1 0.0376 0.937 0.996 0.004
#> SRR1785264 2 0.1843 0.876 0.028 0.972
#> SRR1785265 2 0.1843 0.876 0.028 0.972
#> SRR1785266 2 0.1843 0.876 0.028 0.972
#> SRR1785267 2 0.1843 0.876 0.028 0.972
#> SRR1785268 1 0.0376 0.937 0.996 0.004
#> SRR1785269 1 0.0376 0.937 0.996 0.004
#> SRR1785270 2 0.8813 0.689 0.300 0.700
#> SRR1785271 2 0.8813 0.689 0.300 0.700
#> SRR1785272 1 0.0376 0.937 0.996 0.004
#> SRR1785273 1 0.0376 0.937 0.996 0.004
#> SRR1785276 1 0.2778 0.916 0.952 0.048
#> SRR1785277 1 0.2778 0.916 0.952 0.048
#> SRR1785274 1 0.0938 0.933 0.988 0.012
#> SRR1785275 1 0.0938 0.933 0.988 0.012
#> SRR1785280 2 0.1184 0.867 0.016 0.984
#> SRR1785281 2 0.1184 0.867 0.016 0.984
#> SRR1785278 1 0.0000 0.938 1.000 0.000
#> SRR1785279 1 0.0000 0.938 1.000 0.000
#> SRR1785282 1 0.0000 0.938 1.000 0.000
#> SRR1785283 1 0.0000 0.938 1.000 0.000
#> SRR1785284 1 0.0938 0.933 0.988 0.012
#> SRR1785285 1 0.0938 0.933 0.988 0.012
#> SRR1785286 1 0.0938 0.933 0.988 0.012
#> SRR1785287 1 0.0938 0.933 0.988 0.012
#> SRR1785288 1 0.0000 0.938 1.000 0.000
#> SRR1785289 1 0.0000 0.938 1.000 0.000
#> SRR1785290 2 0.3733 0.867 0.072 0.928
#> SRR1785291 2 0.3733 0.867 0.072 0.928
#> SRR1785296 1 0.7602 0.694 0.780 0.220
#> SRR1785297 1 0.7602 0.694 0.780 0.220
#> SRR1785292 2 0.1843 0.876 0.028 0.972
#> SRR1785293 2 0.1843 0.876 0.028 0.972
#> SRR1785294 1 0.0000 0.938 1.000 0.000
#> SRR1785295 1 0.0000 0.938 1.000 0.000
#> SRR1785298 1 0.2043 0.919 0.968 0.032
#> SRR1785299 1 0.2043 0.919 0.968 0.032
#> SRR1785300 1 0.0000 0.938 1.000 0.000
#> SRR1785301 1 0.0000 0.938 1.000 0.000
#> SRR1785304 2 0.3584 0.867 0.068 0.932
#> SRR1785305 2 0.3584 0.867 0.068 0.932
#> SRR1785306 2 0.9248 0.621 0.340 0.660
#> SRR1785307 2 0.9248 0.621 0.340 0.660
#> SRR1785302 1 0.7602 0.698 0.780 0.220
#> SRR1785303 1 0.7602 0.698 0.780 0.220
#> SRR1785308 1 0.0376 0.937 0.996 0.004
#> SRR1785309 1 0.0376 0.937 0.996 0.004
#> SRR1785310 1 0.0000 0.938 1.000 0.000
#> SRR1785311 1 0.0000 0.938 1.000 0.000
#> SRR1785312 1 0.1184 0.929 0.984 0.016
#> SRR1785313 1 0.1184 0.929 0.984 0.016
#> SRR1785314 2 0.8955 0.670 0.312 0.688
#> SRR1785315 2 0.8955 0.670 0.312 0.688
#> SRR1785318 2 0.1843 0.876 0.028 0.972
#> SRR1785319 2 0.1843 0.876 0.028 0.972
#> SRR1785316 1 0.0000 0.938 1.000 0.000
#> SRR1785317 1 0.0000 0.938 1.000 0.000
#> SRR1785324 2 0.1843 0.876 0.028 0.972
#> SRR1785325 2 0.1843 0.876 0.028 0.972
#> SRR1785320 1 0.1184 0.929 0.984 0.016
#> SRR1785321 1 0.1184 0.929 0.984 0.016
#> SRR1785322 1 0.0376 0.937 0.996 0.004
#> SRR1785323 1 0.0376 0.937 0.996 0.004
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.9509 0.50389 0.336 0.200 0.464
#> SRR1785239 3 0.9509 0.50389 0.336 0.200 0.464
#> SRR1785240 3 0.6683 0.09985 0.496 0.008 0.496
#> SRR1785241 1 0.6683 -0.15730 0.496 0.008 0.496
#> SRR1785242 3 0.7785 0.35894 0.420 0.052 0.528
#> SRR1785243 3 0.7785 0.35894 0.420 0.052 0.528
#> SRR1785244 1 0.1964 0.66592 0.944 0.000 0.056
#> SRR1785245 1 0.1964 0.66592 0.944 0.000 0.056
#> SRR1785246 3 0.6500 0.12418 0.464 0.004 0.532
#> SRR1785247 3 0.6500 0.12418 0.464 0.004 0.532
#> SRR1785248 2 0.1711 0.88760 0.008 0.960 0.032
#> SRR1785250 1 0.5443 0.53826 0.736 0.004 0.260
#> SRR1785251 1 0.5443 0.53826 0.736 0.004 0.260
#> SRR1785252 3 0.7767 0.34916 0.412 0.052 0.536
#> SRR1785253 3 0.7767 0.34916 0.412 0.052 0.536
#> SRR1785254 3 0.9489 0.53258 0.228 0.280 0.492
#> SRR1785255 3 0.9489 0.53258 0.228 0.280 0.492
#> SRR1785256 1 0.2448 0.66271 0.924 0.000 0.076
#> SRR1785257 1 0.2448 0.66271 0.924 0.000 0.076
#> SRR1785258 1 0.5098 0.46733 0.752 0.000 0.248
#> SRR1785259 1 0.5098 0.46733 0.752 0.000 0.248
#> SRR1785262 1 0.6267 -0.00514 0.548 0.000 0.452
#> SRR1785263 1 0.6267 -0.00514 0.548 0.000 0.452
#> SRR1785260 1 0.5201 0.54357 0.760 0.004 0.236
#> SRR1785261 1 0.5201 0.54357 0.760 0.004 0.236
#> SRR1785264 2 0.4059 0.84466 0.012 0.860 0.128
#> SRR1785265 2 0.4059 0.84466 0.012 0.860 0.128
#> SRR1785266 2 0.1453 0.88819 0.008 0.968 0.024
#> SRR1785267 2 0.1453 0.88819 0.008 0.968 0.024
#> SRR1785268 1 0.4233 0.60121 0.836 0.004 0.160
#> SRR1785269 1 0.4233 0.60121 0.836 0.004 0.160
#> SRR1785270 3 0.8610 0.38698 0.120 0.324 0.556
#> SRR1785271 3 0.8610 0.38698 0.120 0.324 0.556
#> SRR1785272 1 0.3482 0.62790 0.872 0.000 0.128
#> SRR1785273 1 0.3482 0.62790 0.872 0.000 0.128
#> SRR1785276 3 0.7102 0.24228 0.420 0.024 0.556
#> SRR1785277 3 0.7102 0.24228 0.420 0.024 0.556
#> SRR1785274 1 0.6664 -0.10871 0.528 0.008 0.464
#> SRR1785275 1 0.6664 -0.10871 0.528 0.008 0.464
#> SRR1785280 2 0.1163 0.88330 0.000 0.972 0.028
#> SRR1785281 2 0.1163 0.88330 0.000 0.972 0.028
#> SRR1785278 1 0.1964 0.66466 0.944 0.000 0.056
#> SRR1785279 1 0.1964 0.66466 0.944 0.000 0.056
#> SRR1785282 1 0.0592 0.66703 0.988 0.000 0.012
#> SRR1785283 1 0.0592 0.66703 0.988 0.000 0.012
#> SRR1785284 1 0.6672 -0.10293 0.520 0.008 0.472
#> SRR1785285 1 0.6672 -0.10293 0.520 0.008 0.472
#> SRR1785286 1 0.6669 -0.06855 0.524 0.008 0.468
#> SRR1785287 1 0.6669 -0.06855 0.524 0.008 0.468
#> SRR1785288 1 0.2261 0.66408 0.932 0.000 0.068
#> SRR1785289 1 0.2261 0.66408 0.932 0.000 0.068
#> SRR1785290 2 0.6756 0.69433 0.056 0.712 0.232
#> SRR1785291 2 0.6756 0.69433 0.056 0.712 0.232
#> SRR1785296 3 0.8273 0.31581 0.448 0.076 0.476
#> SRR1785297 3 0.8273 0.31581 0.448 0.076 0.476
#> SRR1785292 2 0.1015 0.89298 0.008 0.980 0.012
#> SRR1785293 2 0.1015 0.89298 0.008 0.980 0.012
#> SRR1785294 1 0.5070 0.55287 0.772 0.004 0.224
#> SRR1785295 1 0.5070 0.55287 0.772 0.004 0.224
#> SRR1785298 1 0.7814 -0.18334 0.512 0.052 0.436
#> SRR1785299 1 0.7814 -0.18334 0.512 0.052 0.436
#> SRR1785300 1 0.2711 0.65869 0.912 0.000 0.088
#> SRR1785301 1 0.2711 0.65869 0.912 0.000 0.088
#> SRR1785304 2 0.7416 0.61632 0.068 0.656 0.276
#> SRR1785305 2 0.7416 0.61632 0.068 0.656 0.276
#> SRR1785306 3 0.8168 0.45840 0.108 0.280 0.612
#> SRR1785307 3 0.8168 0.45840 0.108 0.280 0.612
#> SRR1785302 3 0.8566 0.38102 0.424 0.096 0.480
#> SRR1785303 3 0.8566 0.38102 0.424 0.096 0.480
#> SRR1785308 1 0.3752 0.61494 0.856 0.000 0.144
#> SRR1785309 1 0.3752 0.61494 0.856 0.000 0.144
#> SRR1785310 1 0.4784 0.57155 0.796 0.004 0.200
#> SRR1785311 1 0.4784 0.57155 0.796 0.004 0.200
#> SRR1785312 1 0.4682 0.56028 0.804 0.004 0.192
#> SRR1785313 1 0.4682 0.56028 0.804 0.004 0.192
#> SRR1785314 3 0.8573 0.37715 0.116 0.328 0.556
#> SRR1785315 3 0.8573 0.37715 0.116 0.328 0.556
#> SRR1785318 2 0.1015 0.89251 0.008 0.980 0.012
#> SRR1785319 2 0.1015 0.89251 0.008 0.980 0.012
#> SRR1785316 1 0.1411 0.66462 0.964 0.000 0.036
#> SRR1785317 1 0.1411 0.66462 0.964 0.000 0.036
#> SRR1785324 2 0.1170 0.89298 0.008 0.976 0.016
#> SRR1785325 2 0.1170 0.89298 0.008 0.976 0.016
#> SRR1785320 1 0.4047 0.59451 0.848 0.004 0.148
#> SRR1785321 1 0.4047 0.59451 0.848 0.004 0.148
#> SRR1785322 1 0.3038 0.65953 0.896 0.000 0.104
#> SRR1785323 1 0.3038 0.65953 0.896 0.000 0.104
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.8949 0.531 0.200 0.100 0.476 NA
#> SRR1785239 3 0.8949 0.531 0.200 0.100 0.476 NA
#> SRR1785240 3 0.5962 0.539 0.260 0.000 0.660 NA
#> SRR1785241 3 0.5962 0.539 0.260 0.000 0.660 NA
#> SRR1785242 3 0.7941 0.534 0.192 0.040 0.556 NA
#> SRR1785243 3 0.7941 0.534 0.192 0.040 0.556 NA
#> SRR1785244 1 0.3245 0.684 0.880 0.000 0.056 NA
#> SRR1785245 1 0.3245 0.684 0.880 0.000 0.056 NA
#> SRR1785246 3 0.8041 0.303 0.256 0.008 0.424 NA
#> SRR1785247 3 0.8041 0.303 0.256 0.008 0.424 NA
#> SRR1785248 2 0.3239 0.795 0.000 0.880 0.052 NA
#> SRR1785250 1 0.6897 0.447 0.544 0.000 0.124 NA
#> SRR1785251 1 0.6897 0.447 0.544 0.000 0.124 NA
#> SRR1785252 3 0.8201 0.507 0.204 0.040 0.516 NA
#> SRR1785253 3 0.8201 0.507 0.204 0.040 0.516 NA
#> SRR1785254 3 0.8230 0.490 0.128 0.148 0.580 NA
#> SRR1785255 3 0.8230 0.490 0.128 0.148 0.580 NA
#> SRR1785256 1 0.3667 0.658 0.856 0.000 0.088 NA
#> SRR1785257 1 0.3667 0.658 0.856 0.000 0.088 NA
#> SRR1785258 1 0.6572 0.341 0.608 0.000 0.272 NA
#> SRR1785259 1 0.6572 0.341 0.608 0.000 0.272 NA
#> SRR1785262 3 0.6910 0.468 0.324 0.000 0.548 NA
#> SRR1785263 3 0.6910 0.468 0.324 0.000 0.548 NA
#> SRR1785260 1 0.6644 0.456 0.640 0.004 0.192 NA
#> SRR1785261 1 0.6644 0.456 0.640 0.004 0.192 NA
#> SRR1785264 2 0.6165 0.693 0.008 0.696 0.164 NA
#> SRR1785265 2 0.6165 0.693 0.008 0.696 0.164 NA
#> SRR1785266 2 0.0592 0.819 0.000 0.984 0.000 NA
#> SRR1785267 2 0.0592 0.819 0.000 0.984 0.000 NA
#> SRR1785268 1 0.6027 0.559 0.664 0.000 0.092 NA
#> SRR1785269 1 0.6027 0.559 0.664 0.000 0.092 NA
#> SRR1785270 3 0.6851 0.451 0.044 0.120 0.676 NA
#> SRR1785271 3 0.6851 0.451 0.044 0.120 0.676 NA
#> SRR1785272 1 0.4919 0.620 0.752 0.000 0.048 NA
#> SRR1785273 1 0.4919 0.620 0.752 0.000 0.048 NA
#> SRR1785276 3 0.8011 0.365 0.220 0.012 0.448 NA
#> SRR1785277 3 0.8011 0.365 0.220 0.012 0.448 NA
#> SRR1785274 3 0.5721 0.538 0.284 0.000 0.660 NA
#> SRR1785275 3 0.5721 0.538 0.284 0.000 0.660 NA
#> SRR1785280 2 0.0817 0.819 0.000 0.976 0.000 NA
#> SRR1785281 2 0.0817 0.819 0.000 0.976 0.000 NA
#> SRR1785278 1 0.3333 0.683 0.872 0.000 0.040 NA
#> SRR1785279 1 0.3333 0.683 0.872 0.000 0.040 NA
#> SRR1785282 1 0.1209 0.695 0.964 0.000 0.004 NA
#> SRR1785283 1 0.1209 0.695 0.964 0.000 0.004 NA
#> SRR1785284 3 0.6141 0.500 0.316 0.004 0.620 NA
#> SRR1785285 3 0.6141 0.500 0.316 0.004 0.620 NA
#> SRR1785286 3 0.6509 0.424 0.360 0.004 0.564 NA
#> SRR1785287 3 0.6509 0.424 0.360 0.004 0.564 NA
#> SRR1785288 1 0.3245 0.682 0.880 0.000 0.056 NA
#> SRR1785289 1 0.3245 0.682 0.880 0.000 0.056 NA
#> SRR1785290 2 0.7986 0.479 0.024 0.508 0.272 NA
#> SRR1785291 2 0.7986 0.479 0.024 0.508 0.272 NA
#> SRR1785296 3 0.8342 0.491 0.280 0.056 0.504 NA
#> SRR1785297 3 0.8342 0.491 0.280 0.056 0.504 NA
#> SRR1785292 2 0.1284 0.823 0.000 0.964 0.012 NA
#> SRR1785293 2 0.1284 0.823 0.000 0.964 0.012 NA
#> SRR1785294 1 0.6730 0.416 0.628 0.004 0.212 NA
#> SRR1785295 1 0.6730 0.416 0.628 0.004 0.212 NA
#> SRR1785298 3 0.7749 0.369 0.412 0.036 0.452 NA
#> SRR1785299 3 0.7749 0.369 0.412 0.036 0.452 NA
#> SRR1785300 1 0.4022 0.650 0.836 0.000 0.096 NA
#> SRR1785301 1 0.4022 0.650 0.836 0.000 0.096 NA
#> SRR1785304 2 0.8746 0.388 0.048 0.424 0.272 NA
#> SRR1785305 2 0.8746 0.388 0.048 0.424 0.272 NA
#> SRR1785306 3 0.6027 0.485 0.032 0.116 0.736 NA
#> SRR1785307 3 0.6027 0.485 0.032 0.116 0.736 NA
#> SRR1785302 3 0.8181 0.518 0.244 0.064 0.544 NA
#> SRR1785303 3 0.8181 0.518 0.244 0.064 0.544 NA
#> SRR1785308 1 0.5432 0.578 0.716 0.000 0.068 NA
#> SRR1785309 1 0.5432 0.578 0.716 0.000 0.068 NA
#> SRR1785310 1 0.5998 0.488 0.696 0.004 0.192 NA
#> SRR1785311 1 0.5998 0.488 0.696 0.004 0.192 NA
#> SRR1785312 1 0.5859 0.527 0.652 0.000 0.064 NA
#> SRR1785313 1 0.5859 0.527 0.652 0.000 0.064 NA
#> SRR1785314 3 0.6992 0.431 0.036 0.132 0.656 NA
#> SRR1785315 3 0.6992 0.431 0.036 0.132 0.656 NA
#> SRR1785318 2 0.0804 0.824 0.000 0.980 0.012 NA
#> SRR1785319 2 0.0804 0.824 0.000 0.980 0.012 NA
#> SRR1785316 1 0.2198 0.694 0.920 0.000 0.008 NA
#> SRR1785317 1 0.2198 0.694 0.920 0.000 0.008 NA
#> SRR1785324 2 0.0937 0.823 0.000 0.976 0.012 NA
#> SRR1785325 2 0.0937 0.823 0.000 0.976 0.012 NA
#> SRR1785320 1 0.5184 0.585 0.732 0.000 0.056 NA
#> SRR1785321 1 0.5184 0.585 0.732 0.000 0.056 NA
#> SRR1785322 1 0.5531 0.628 0.732 0.000 0.140 NA
#> SRR1785323 1 0.5531 0.628 0.732 0.000 0.140 NA
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 5 0.870 0.2669 0.144 0.064 0.188 NA 0.464
#> SRR1785239 5 0.870 0.2669 0.144 0.064 0.188 NA 0.464
#> SRR1785240 5 0.822 0.1917 0.140 0.004 0.220 NA 0.424
#> SRR1785241 5 0.822 0.1917 0.140 0.004 0.220 NA 0.424
#> SRR1785242 5 0.793 0.2560 0.120 0.020 0.232 NA 0.504
#> SRR1785243 5 0.793 0.2560 0.120 0.020 0.232 NA 0.504
#> SRR1785244 1 0.317 0.5991 0.876 0.000 0.044 NA 0.040
#> SRR1785245 1 0.317 0.5991 0.876 0.000 0.044 NA 0.040
#> SRR1785246 3 0.636 0.9084 0.132 0.008 0.644 NA 0.176
#> SRR1785247 3 0.636 0.9084 0.132 0.008 0.644 NA 0.176
#> SRR1785248 2 0.372 0.8079 0.000 0.844 0.044 NA 0.040
#> SRR1785250 1 0.814 0.2593 0.384 0.000 0.292 NA 0.128
#> SRR1785251 1 0.814 0.2593 0.384 0.000 0.292 NA 0.128
#> SRR1785252 5 0.787 0.2413 0.108 0.020 0.244 NA 0.504
#> SRR1785253 5 0.787 0.2413 0.108 0.020 0.244 NA 0.504
#> SRR1785254 5 0.618 0.3982 0.076 0.080 0.008 NA 0.676
#> SRR1785255 5 0.618 0.3982 0.076 0.080 0.008 NA 0.676
#> SRR1785256 1 0.327 0.6054 0.852 0.000 0.016 NA 0.112
#> SRR1785257 1 0.327 0.6054 0.852 0.000 0.016 NA 0.112
#> SRR1785258 1 0.753 0.1372 0.452 0.000 0.160 NA 0.312
#> SRR1785259 1 0.753 0.1372 0.452 0.000 0.160 NA 0.312
#> SRR1785262 5 0.765 0.2243 0.236 0.004 0.200 NA 0.484
#> SRR1785263 5 0.765 0.2243 0.236 0.004 0.200 NA 0.484
#> SRR1785260 1 0.630 0.3425 0.540 0.000 0.008 NA 0.308
#> SRR1785261 1 0.630 0.3425 0.540 0.000 0.008 NA 0.308
#> SRR1785264 2 0.646 0.6408 0.004 0.632 0.048 NA 0.172
#> SRR1785265 2 0.646 0.6408 0.004 0.632 0.048 NA 0.172
#> SRR1785266 2 0.137 0.8405 0.000 0.956 0.008 NA 0.008
#> SRR1785267 2 0.137 0.8405 0.000 0.956 0.008 NA 0.008
#> SRR1785268 1 0.719 0.2834 0.496 0.000 0.312 NA 0.076
#> SRR1785269 1 0.719 0.2834 0.496 0.000 0.312 NA 0.076
#> SRR1785270 5 0.710 0.2609 0.008 0.064 0.080 NA 0.448
#> SRR1785271 5 0.710 0.2609 0.008 0.064 0.080 NA 0.448
#> SRR1785272 1 0.560 0.5541 0.700 0.000 0.168 NA 0.044
#> SRR1785273 1 0.560 0.5541 0.700 0.000 0.168 NA 0.044
#> SRR1785276 3 0.657 0.9063 0.108 0.008 0.620 NA 0.212
#> SRR1785277 3 0.657 0.9063 0.108 0.008 0.620 NA 0.212
#> SRR1785274 5 0.797 0.1587 0.164 0.004 0.228 NA 0.468
#> SRR1785275 5 0.797 0.1587 0.164 0.004 0.228 NA 0.468
#> SRR1785280 2 0.112 0.8390 0.000 0.964 0.016 NA 0.000
#> SRR1785281 2 0.112 0.8390 0.000 0.964 0.016 NA 0.000
#> SRR1785278 1 0.510 0.5555 0.748 0.000 0.124 NA 0.044
#> SRR1785279 1 0.510 0.5555 0.748 0.000 0.124 NA 0.044
#> SRR1785282 1 0.191 0.6148 0.932 0.000 0.044 NA 0.008
#> SRR1785283 1 0.191 0.6148 0.932 0.000 0.044 NA 0.008
#> SRR1785284 5 0.812 0.2366 0.164 0.004 0.176 NA 0.452
#> SRR1785285 5 0.812 0.2366 0.164 0.004 0.176 NA 0.452
#> SRR1785286 5 0.734 0.3333 0.212 0.000 0.092 NA 0.532
#> SRR1785287 5 0.734 0.3333 0.212 0.000 0.092 NA 0.532
#> SRR1785288 1 0.309 0.6004 0.880 0.000 0.032 NA 0.044
#> SRR1785289 1 0.309 0.6004 0.880 0.000 0.032 NA 0.044
#> SRR1785290 2 0.732 0.3161 0.008 0.432 0.028 NA 0.352
#> SRR1785291 2 0.732 0.3161 0.008 0.432 0.028 NA 0.352
#> SRR1785296 5 0.548 0.4029 0.180 0.024 0.032 NA 0.720
#> SRR1785297 5 0.548 0.4029 0.180 0.024 0.032 NA 0.720
#> SRR1785292 2 0.168 0.8438 0.000 0.944 0.012 NA 0.012
#> SRR1785293 2 0.168 0.8438 0.000 0.944 0.012 NA 0.012
#> SRR1785294 1 0.688 0.2784 0.480 0.000 0.040 NA 0.356
#> SRR1785295 1 0.688 0.2784 0.480 0.000 0.040 NA 0.356
#> SRR1785298 5 0.558 0.3831 0.244 0.028 0.024 NA 0.676
#> SRR1785299 5 0.558 0.3831 0.244 0.028 0.024 NA 0.676
#> SRR1785300 1 0.357 0.5931 0.812 0.000 0.000 NA 0.152
#> SRR1785301 1 0.357 0.5931 0.812 0.000 0.000 NA 0.152
#> SRR1785304 5 0.807 -0.0576 0.068 0.280 0.008 NA 0.376
#> SRR1785305 5 0.807 -0.0576 0.068 0.280 0.008 NA 0.376
#> SRR1785306 5 0.599 0.3466 0.008 0.036 0.064 NA 0.644
#> SRR1785307 5 0.599 0.3466 0.008 0.036 0.064 NA 0.644
#> SRR1785302 5 0.607 0.4139 0.104 0.036 0.044 NA 0.708
#> SRR1785303 5 0.607 0.4139 0.104 0.036 0.044 NA 0.708
#> SRR1785308 1 0.583 0.5449 0.688 0.000 0.164 NA 0.064
#> SRR1785309 1 0.583 0.5449 0.688 0.000 0.164 NA 0.064
#> SRR1785310 1 0.561 0.3649 0.584 0.000 0.008 NA 0.340
#> SRR1785311 1 0.561 0.3649 0.584 0.000 0.008 NA 0.340
#> SRR1785312 1 0.605 0.1280 0.472 0.000 0.444 NA 0.024
#> SRR1785313 1 0.605 0.1280 0.472 0.000 0.444 NA 0.024
#> SRR1785314 5 0.689 0.2783 0.012 0.064 0.056 NA 0.488
#> SRR1785315 5 0.689 0.2783 0.012 0.064 0.056 NA 0.488
#> SRR1785318 2 0.141 0.8438 0.000 0.956 0.012 NA 0.012
#> SRR1785319 2 0.141 0.8438 0.000 0.956 0.012 NA 0.012
#> SRR1785316 1 0.293 0.6084 0.876 0.000 0.076 NA 0.004
#> SRR1785317 1 0.293 0.6084 0.876 0.000 0.076 NA 0.004
#> SRR1785324 2 0.130 0.8442 0.000 0.960 0.008 NA 0.012
#> SRR1785325 2 0.130 0.8442 0.000 0.960 0.008 NA 0.012
#> SRR1785320 1 0.492 0.4008 0.656 0.000 0.304 NA 0.012
#> SRR1785321 1 0.492 0.4008 0.656 0.000 0.304 NA 0.012
#> SRR1785322 1 0.670 0.5020 0.620 0.000 0.144 NA 0.108
#> SRR1785323 1 0.670 0.5020 0.620 0.000 0.144 NA 0.108
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 4 0.808 -0.0626 0.104 0.032 0.248 0.456 0.100 0.060
#> SRR1785239 4 0.808 -0.0626 0.104 0.032 0.248 0.456 0.100 0.060
#> SRR1785240 5 0.788 0.3621 0.104 0.000 0.052 0.288 0.392 0.164
#> SRR1785241 5 0.788 0.3621 0.104 0.000 0.052 0.288 0.392 0.164
#> SRR1785242 4 0.751 -0.3661 0.052 0.012 0.364 0.400 0.124 0.048
#> SRR1785243 4 0.751 -0.3661 0.052 0.012 0.364 0.400 0.124 0.048
#> SRR1785244 1 0.240 0.5333 0.908 0.000 0.012 0.028 0.032 0.020
#> SRR1785245 1 0.240 0.5333 0.908 0.000 0.012 0.028 0.032 0.020
#> SRR1785246 6 0.594 0.6347 0.076 0.000 0.036 0.084 0.136 0.668
#> SRR1785247 6 0.594 0.6347 0.076 0.000 0.036 0.084 0.136 0.668
#> SRR1785248 2 0.463 0.7727 0.000 0.764 0.096 0.092 0.024 0.024
#> SRR1785250 3 0.627 0.3585 0.188 0.000 0.604 0.064 0.016 0.128
#> SRR1785251 3 0.627 0.3585 0.188 0.000 0.604 0.064 0.016 0.128
#> SRR1785252 3 0.741 0.2502 0.048 0.012 0.400 0.380 0.108 0.052
#> SRR1785253 3 0.741 0.2502 0.048 0.012 0.400 0.380 0.108 0.052
#> SRR1785254 4 0.573 0.2136 0.072 0.008 0.052 0.692 0.144 0.032
#> SRR1785255 4 0.573 0.2136 0.072 0.008 0.052 0.692 0.144 0.032
#> SRR1785256 1 0.414 0.5334 0.776 0.000 0.028 0.152 0.008 0.036
#> SRR1785257 1 0.414 0.5334 0.776 0.000 0.028 0.152 0.008 0.036
#> SRR1785258 1 0.783 -0.0204 0.412 0.000 0.148 0.284 0.080 0.076
#> SRR1785259 1 0.783 -0.0204 0.412 0.000 0.148 0.284 0.080 0.076
#> SRR1785262 4 0.803 0.0990 0.152 0.000 0.148 0.452 0.152 0.096
#> SRR1785263 4 0.803 0.0990 0.152 0.000 0.148 0.452 0.152 0.096
#> SRR1785260 1 0.703 0.2376 0.460 0.000 0.052 0.340 0.060 0.088
#> SRR1785261 1 0.703 0.2376 0.460 0.000 0.052 0.340 0.060 0.088
#> SRR1785264 2 0.666 0.5124 0.000 0.548 0.132 0.240 0.052 0.028
#> SRR1785265 2 0.666 0.5124 0.000 0.548 0.132 0.240 0.052 0.028
#> SRR1785266 2 0.201 0.8709 0.000 0.920 0.036 0.000 0.012 0.032
#> SRR1785267 2 0.201 0.8709 0.000 0.920 0.036 0.000 0.012 0.032
#> SRR1785268 1 0.713 -0.1402 0.360 0.000 0.284 0.024 0.028 0.304
#> SRR1785269 1 0.713 -0.1402 0.360 0.000 0.284 0.024 0.028 0.304
#> SRR1785270 5 0.449 0.5380 0.000 0.032 0.004 0.220 0.716 0.028
#> SRR1785271 5 0.449 0.5380 0.000 0.032 0.004 0.220 0.716 0.028
#> SRR1785272 1 0.585 0.2657 0.540 0.000 0.340 0.044 0.004 0.072
#> SRR1785273 1 0.585 0.2657 0.540 0.000 0.340 0.044 0.004 0.072
#> SRR1785276 6 0.617 0.6273 0.080 0.004 0.028 0.080 0.164 0.644
#> SRR1785277 6 0.617 0.6273 0.080 0.004 0.028 0.080 0.164 0.644
#> SRR1785274 4 0.797 -0.2448 0.120 0.000 0.048 0.360 0.308 0.164
#> SRR1785275 4 0.797 -0.2448 0.120 0.000 0.048 0.360 0.308 0.164
#> SRR1785280 2 0.248 0.8663 0.000 0.892 0.036 0.000 0.012 0.060
#> SRR1785281 2 0.248 0.8663 0.000 0.892 0.036 0.000 0.012 0.060
#> SRR1785278 1 0.605 0.4002 0.644 0.000 0.140 0.052 0.028 0.136
#> SRR1785279 1 0.605 0.4002 0.644 0.000 0.140 0.052 0.028 0.136
#> SRR1785282 1 0.191 0.5201 0.920 0.000 0.056 0.008 0.000 0.016
#> SRR1785283 1 0.191 0.5201 0.920 0.000 0.056 0.008 0.000 0.016
#> SRR1785284 5 0.759 0.3552 0.152 0.000 0.020 0.284 0.408 0.136
#> SRR1785285 5 0.759 0.3552 0.152 0.000 0.020 0.284 0.408 0.136
#> SRR1785286 4 0.735 -0.0414 0.188 0.000 0.020 0.444 0.260 0.088
#> SRR1785287 4 0.735 -0.0414 0.188 0.000 0.020 0.444 0.260 0.088
#> SRR1785288 1 0.238 0.5346 0.908 0.000 0.012 0.032 0.032 0.016
#> SRR1785289 1 0.238 0.5346 0.908 0.000 0.012 0.032 0.032 0.016
#> SRR1785290 4 0.702 -0.0838 0.004 0.348 0.108 0.444 0.080 0.016
#> SRR1785291 4 0.702 -0.0838 0.004 0.348 0.108 0.444 0.080 0.016
#> SRR1785296 4 0.475 0.3278 0.148 0.000 0.072 0.740 0.020 0.020
#> SRR1785297 4 0.475 0.3278 0.148 0.000 0.072 0.740 0.020 0.020
#> SRR1785292 2 0.153 0.8719 0.000 0.948 0.020 0.012 0.012 0.008
#> SRR1785293 2 0.153 0.8719 0.000 0.948 0.020 0.012 0.012 0.008
#> SRR1785294 1 0.595 0.2089 0.448 0.000 0.060 0.444 0.016 0.032
#> SRR1785295 1 0.595 0.2089 0.448 0.000 0.060 0.444 0.016 0.032
#> SRR1785298 4 0.553 0.3013 0.224 0.000 0.016 0.652 0.068 0.040
#> SRR1785299 4 0.553 0.3013 0.224 0.000 0.016 0.652 0.068 0.040
#> SRR1785300 1 0.396 0.5304 0.768 0.000 0.016 0.180 0.004 0.032
#> SRR1785301 1 0.396 0.5304 0.768 0.000 0.016 0.180 0.004 0.032
#> SRR1785304 4 0.855 0.1785 0.068 0.168 0.092 0.460 0.124 0.088
#> SRR1785305 4 0.855 0.1785 0.068 0.168 0.092 0.460 0.124 0.088
#> SRR1785306 5 0.615 0.3959 0.000 0.008 0.092 0.412 0.452 0.036
#> SRR1785307 5 0.615 0.3959 0.000 0.008 0.092 0.412 0.452 0.036
#> SRR1785302 4 0.663 0.2081 0.108 0.000 0.092 0.608 0.144 0.048
#> SRR1785303 4 0.663 0.2081 0.108 0.000 0.092 0.608 0.144 0.048
#> SRR1785308 1 0.573 0.1294 0.496 0.000 0.396 0.084 0.008 0.016
#> SRR1785309 1 0.573 0.1294 0.496 0.000 0.396 0.084 0.008 0.016
#> SRR1785310 1 0.485 0.2801 0.528 0.000 0.020 0.428 0.000 0.024
#> SRR1785311 1 0.485 0.2801 0.528 0.000 0.020 0.428 0.000 0.024
#> SRR1785312 6 0.553 0.3314 0.388 0.000 0.088 0.000 0.016 0.508
#> SRR1785313 6 0.553 0.3314 0.388 0.000 0.088 0.000 0.016 0.508
#> SRR1785314 5 0.497 0.5158 0.000 0.032 0.024 0.236 0.684 0.024
#> SRR1785315 5 0.497 0.5158 0.000 0.032 0.024 0.236 0.684 0.024
#> SRR1785318 2 0.127 0.8733 0.000 0.956 0.016 0.000 0.016 0.012
#> SRR1785319 2 0.127 0.8733 0.000 0.956 0.016 0.000 0.016 0.012
#> SRR1785316 1 0.377 0.4885 0.804 0.000 0.124 0.016 0.004 0.052
#> SRR1785317 1 0.377 0.4885 0.804 0.000 0.124 0.016 0.004 0.052
#> SRR1785324 2 0.157 0.8718 0.000 0.944 0.008 0.008 0.008 0.032
#> SRR1785325 2 0.157 0.8718 0.000 0.944 0.008 0.008 0.008 0.032
#> SRR1785320 1 0.501 0.0152 0.576 0.000 0.044 0.004 0.012 0.364
#> SRR1785321 1 0.501 0.0152 0.576 0.000 0.044 0.004 0.012 0.364
#> SRR1785322 1 0.768 0.2948 0.460 0.000 0.236 0.120 0.056 0.128
#> SRR1785323 1 0.768 0.2948 0.460 0.000 0.236 0.120 0.056 0.128
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "skmeans"]
# you can also extract it by
# res = res_list["CV:skmeans"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.958 0.983 0.4961 0.500 0.500
#> 3 3 0.699 0.808 0.904 0.3365 0.793 0.605
#> 4 4 0.600 0.537 0.740 0.1202 0.919 0.769
#> 5 5 0.625 0.526 0.697 0.0651 0.876 0.595
#> 6 6 0.653 0.503 0.681 0.0418 0.936 0.715
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
#> SRR1785238 2 0.000 0.961 0.000 1.000
#> SRR1785239 2 0.000 0.961 0.000 1.000
#> SRR1785240 1 0.000 1.000 1.000 0.000
#> SRR1785241 1 0.000 1.000 1.000 0.000
#> SRR1785242 2 0.000 0.961 0.000 1.000
#> SRR1785243 2 0.000 0.961 0.000 1.000
#> SRR1785244 1 0.000 1.000 1.000 0.000
#> SRR1785245 1 0.000 1.000 1.000 0.000
#> SRR1785246 1 0.000 1.000 1.000 0.000
#> SRR1785247 1 0.000 1.000 1.000 0.000
#> SRR1785248 2 0.000 0.961 0.000 1.000
#> SRR1785250 1 0.000 1.000 1.000 0.000
#> SRR1785251 1 0.000 1.000 1.000 0.000
#> SRR1785252 2 0.000 0.961 0.000 1.000
#> SRR1785253 2 0.000 0.961 0.000 1.000
#> SRR1785254 2 0.000 0.961 0.000 1.000
#> SRR1785255 2 0.000 0.961 0.000 1.000
#> SRR1785256 1 0.000 1.000 1.000 0.000
#> SRR1785257 1 0.000 1.000 1.000 0.000
#> SRR1785258 1 0.000 1.000 1.000 0.000
#> SRR1785259 1 0.000 1.000 1.000 0.000
#> SRR1785262 1 0.000 1.000 1.000 0.000
#> SRR1785263 1 0.000 1.000 1.000 0.000
#> SRR1785260 1 0.000 1.000 1.000 0.000
#> SRR1785261 1 0.000 1.000 1.000 0.000
#> SRR1785264 2 0.000 0.961 0.000 1.000
#> SRR1785265 2 0.000 0.961 0.000 1.000
#> SRR1785266 2 0.000 0.961 0.000 1.000
#> SRR1785267 2 0.000 0.961 0.000 1.000
#> SRR1785268 1 0.000 1.000 1.000 0.000
#> SRR1785269 1 0.000 1.000 1.000 0.000
#> SRR1785270 2 0.000 0.961 0.000 1.000
#> SRR1785271 2 0.000 0.961 0.000 1.000
#> SRR1785272 1 0.000 1.000 1.000 0.000
#> SRR1785273 1 0.000 1.000 1.000 0.000
#> SRR1785276 2 0.995 0.204 0.460 0.540
#> SRR1785277 2 0.995 0.204 0.460 0.540
#> SRR1785274 1 0.000 1.000 1.000 0.000
#> SRR1785275 1 0.000 1.000 1.000 0.000
#> SRR1785280 2 0.000 0.961 0.000 1.000
#> SRR1785281 2 0.000 0.961 0.000 1.000
#> SRR1785278 1 0.000 1.000 1.000 0.000
#> SRR1785279 1 0.000 1.000 1.000 0.000
#> SRR1785282 1 0.000 1.000 1.000 0.000
#> SRR1785283 1 0.000 1.000 1.000 0.000
#> SRR1785284 1 0.000 1.000 1.000 0.000
#> SRR1785285 1 0.000 1.000 1.000 0.000
#> SRR1785286 1 0.000 1.000 1.000 0.000
#> SRR1785287 1 0.000 1.000 1.000 0.000
#> SRR1785288 1 0.000 1.000 1.000 0.000
#> SRR1785289 1 0.000 1.000 1.000 0.000
#> SRR1785290 2 0.000 0.961 0.000 1.000
#> SRR1785291 2 0.000 0.961 0.000 1.000
#> SRR1785296 2 0.000 0.961 0.000 1.000
#> SRR1785297 2 0.000 0.961 0.000 1.000
#> SRR1785292 2 0.000 0.961 0.000 1.000
#> SRR1785293 2 0.000 0.961 0.000 1.000
#> SRR1785294 1 0.000 1.000 1.000 0.000
#> SRR1785295 1 0.000 1.000 1.000 0.000
#> SRR1785298 2 0.850 0.633 0.276 0.724
#> SRR1785299 2 0.850 0.633 0.276 0.724
#> SRR1785300 1 0.000 1.000 1.000 0.000
#> SRR1785301 1 0.000 1.000 1.000 0.000
#> SRR1785304 2 0.000 0.961 0.000 1.000
#> SRR1785305 2 0.000 0.961 0.000 1.000
#> SRR1785306 2 0.000 0.961 0.000 1.000
#> SRR1785307 2 0.000 0.961 0.000 1.000
#> SRR1785302 2 0.000 0.961 0.000 1.000
#> SRR1785303 2 0.000 0.961 0.000 1.000
#> SRR1785308 1 0.000 1.000 1.000 0.000
#> SRR1785309 1 0.000 1.000 1.000 0.000
#> SRR1785310 1 0.000 1.000 1.000 0.000
#> SRR1785311 1 0.000 1.000 1.000 0.000
#> SRR1785312 1 0.000 1.000 1.000 0.000
#> SRR1785313 1 0.000 1.000 1.000 0.000
#> SRR1785314 2 0.000 0.961 0.000 1.000
#> SRR1785315 2 0.000 0.961 0.000 1.000
#> SRR1785318 2 0.000 0.961 0.000 1.000
#> SRR1785319 2 0.000 0.961 0.000 1.000
#> SRR1785316 1 0.000 1.000 1.000 0.000
#> SRR1785317 1 0.000 1.000 1.000 0.000
#> SRR1785324 2 0.000 0.961 0.000 1.000
#> SRR1785325 2 0.000 0.961 0.000 1.000
#> SRR1785320 1 0.000 1.000 1.000 0.000
#> SRR1785321 1 0.000 1.000 1.000 0.000
#> SRR1785322 1 0.000 1.000 1.000 0.000
#> SRR1785323 1 0.000 1.000 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 2 0.1289 0.8598 0.000 0.968 0.032
#> SRR1785239 2 0.1289 0.8598 0.000 0.968 0.032
#> SRR1785240 3 0.0892 0.8589 0.020 0.000 0.980
#> SRR1785241 3 0.0892 0.8589 0.020 0.000 0.980
#> SRR1785242 3 0.4555 0.7279 0.000 0.200 0.800
#> SRR1785243 3 0.4504 0.7325 0.000 0.196 0.804
#> SRR1785244 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785245 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785246 3 0.0892 0.8567 0.020 0.000 0.980
#> SRR1785247 3 0.0892 0.8567 0.020 0.000 0.980
#> SRR1785248 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785250 1 0.4887 0.8200 0.772 0.000 0.228
#> SRR1785251 1 0.4887 0.8200 0.772 0.000 0.228
#> SRR1785252 3 0.3715 0.7978 0.004 0.128 0.868
#> SRR1785253 3 0.3715 0.7978 0.004 0.128 0.868
#> SRR1785254 2 0.0237 0.8780 0.000 0.996 0.004
#> SRR1785255 2 0.0237 0.8780 0.000 0.996 0.004
#> SRR1785256 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785257 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785258 1 0.4974 0.7848 0.764 0.000 0.236
#> SRR1785259 1 0.5016 0.7794 0.760 0.000 0.240
#> SRR1785262 3 0.1289 0.8552 0.032 0.000 0.968
#> SRR1785263 3 0.1289 0.8552 0.032 0.000 0.968
#> SRR1785260 1 0.1289 0.9151 0.968 0.000 0.032
#> SRR1785261 1 0.1289 0.9151 0.968 0.000 0.032
#> SRR1785264 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785265 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785266 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785267 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785268 1 0.4121 0.8615 0.832 0.000 0.168
#> SRR1785269 1 0.4121 0.8615 0.832 0.000 0.168
#> SRR1785270 2 0.6286 0.0528 0.000 0.536 0.464
#> SRR1785271 2 0.6286 0.0528 0.000 0.536 0.464
#> SRR1785272 1 0.2356 0.9054 0.928 0.000 0.072
#> SRR1785273 1 0.2356 0.9054 0.928 0.000 0.072
#> SRR1785276 3 0.0983 0.8586 0.016 0.004 0.980
#> SRR1785277 3 0.0983 0.8586 0.016 0.004 0.980
#> SRR1785274 3 0.0829 0.8582 0.012 0.004 0.984
#> SRR1785275 3 0.0829 0.8582 0.012 0.004 0.984
#> SRR1785280 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785278 1 0.2448 0.9087 0.924 0.000 0.076
#> SRR1785279 1 0.2448 0.9087 0.924 0.000 0.076
#> SRR1785282 1 0.0000 0.9217 1.000 0.000 0.000
#> SRR1785283 1 0.0000 0.9217 1.000 0.000 0.000
#> SRR1785284 3 0.2796 0.8318 0.092 0.000 0.908
#> SRR1785285 3 0.2796 0.8318 0.092 0.000 0.908
#> SRR1785286 3 0.4887 0.7313 0.228 0.000 0.772
#> SRR1785287 3 0.4887 0.7313 0.228 0.000 0.772
#> SRR1785288 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785289 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785290 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785291 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785296 2 0.6703 0.5819 0.052 0.712 0.236
#> SRR1785297 2 0.6796 0.5768 0.056 0.708 0.236
#> SRR1785292 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785294 1 0.1289 0.9151 0.968 0.000 0.032
#> SRR1785295 1 0.1289 0.9151 0.968 0.000 0.032
#> SRR1785298 2 0.9052 0.3386 0.216 0.556 0.228
#> SRR1785299 2 0.9086 0.3320 0.220 0.552 0.228
#> SRR1785300 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785301 1 0.0237 0.9217 0.996 0.000 0.004
#> SRR1785304 2 0.0424 0.8761 0.000 0.992 0.008
#> SRR1785305 2 0.0424 0.8761 0.000 0.992 0.008
#> SRR1785306 3 0.6307 0.0335 0.000 0.488 0.512
#> SRR1785307 3 0.6305 0.0489 0.000 0.484 0.516
#> SRR1785302 2 0.1411 0.8593 0.000 0.964 0.036
#> SRR1785303 2 0.1411 0.8593 0.000 0.964 0.036
#> SRR1785308 1 0.2261 0.9054 0.932 0.000 0.068
#> SRR1785309 1 0.2261 0.9054 0.932 0.000 0.068
#> SRR1785310 1 0.1289 0.9151 0.968 0.000 0.032
#> SRR1785311 1 0.1289 0.9151 0.968 0.000 0.032
#> SRR1785312 1 0.3879 0.8747 0.848 0.000 0.152
#> SRR1785313 1 0.3879 0.8747 0.848 0.000 0.152
#> SRR1785314 2 0.5291 0.5755 0.000 0.732 0.268
#> SRR1785315 2 0.5291 0.5755 0.000 0.732 0.268
#> SRR1785318 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785316 1 0.0237 0.9216 0.996 0.000 0.004
#> SRR1785317 1 0.0237 0.9216 0.996 0.000 0.004
#> SRR1785324 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.8795 0.000 1.000 0.000
#> SRR1785320 1 0.3879 0.8763 0.848 0.000 0.152
#> SRR1785321 1 0.3879 0.8763 0.848 0.000 0.152
#> SRR1785322 1 0.3267 0.8942 0.884 0.000 0.116
#> SRR1785323 1 0.3267 0.8942 0.884 0.000 0.116
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 2 0.3542 0.71415 0.000 0.852 0.028 0.120
#> SRR1785239 2 0.3542 0.71415 0.000 0.852 0.028 0.120
#> SRR1785240 3 0.0927 0.62700 0.008 0.000 0.976 0.016
#> SRR1785241 3 0.0927 0.62700 0.008 0.000 0.976 0.016
#> SRR1785242 3 0.6616 0.40979 0.000 0.108 0.584 0.308
#> SRR1785243 3 0.6616 0.40979 0.000 0.108 0.584 0.308
#> SRR1785244 1 0.0188 0.67806 0.996 0.000 0.000 0.004
#> SRR1785245 1 0.0188 0.67806 0.996 0.000 0.000 0.004
#> SRR1785246 3 0.4372 0.54552 0.004 0.000 0.728 0.268
#> SRR1785247 3 0.4372 0.54552 0.004 0.000 0.728 0.268
#> SRR1785248 2 0.0188 0.85329 0.000 0.996 0.000 0.004
#> SRR1785250 4 0.6716 0.01364 0.320 0.000 0.112 0.568
#> SRR1785251 4 0.6685 0.00527 0.324 0.000 0.108 0.568
#> SRR1785252 3 0.6324 0.41715 0.000 0.076 0.584 0.340
#> SRR1785253 3 0.6324 0.41715 0.000 0.076 0.584 0.340
#> SRR1785254 2 0.1520 0.83200 0.000 0.956 0.020 0.024
#> SRR1785255 2 0.1624 0.83059 0.000 0.952 0.020 0.028
#> SRR1785256 1 0.0921 0.67219 0.972 0.000 0.000 0.028
#> SRR1785257 1 0.0921 0.67219 0.972 0.000 0.000 0.028
#> SRR1785258 4 0.7716 0.08136 0.380 0.000 0.224 0.396
#> SRR1785259 4 0.7745 0.09442 0.372 0.000 0.232 0.396
#> SRR1785262 3 0.4122 0.55652 0.004 0.000 0.760 0.236
#> SRR1785263 3 0.4122 0.55652 0.004 0.000 0.760 0.236
#> SRR1785260 1 0.4543 0.39318 0.676 0.000 0.000 0.324
#> SRR1785261 1 0.4543 0.39318 0.676 0.000 0.000 0.324
#> SRR1785264 2 0.0188 0.85329 0.000 0.996 0.000 0.004
#> SRR1785265 2 0.0188 0.85329 0.000 0.996 0.000 0.004
#> SRR1785266 2 0.0188 0.85329 0.000 0.996 0.000 0.004
#> SRR1785267 2 0.0188 0.85329 0.000 0.996 0.000 0.004
#> SRR1785268 1 0.6264 0.41234 0.560 0.000 0.064 0.376
#> SRR1785269 1 0.6264 0.41234 0.560 0.000 0.064 0.376
#> SRR1785270 2 0.5888 0.26060 0.000 0.540 0.424 0.036
#> SRR1785271 2 0.5888 0.26060 0.000 0.540 0.424 0.036
#> SRR1785272 1 0.5227 0.48871 0.704 0.000 0.040 0.256
#> SRR1785273 1 0.5227 0.48871 0.704 0.000 0.040 0.256
#> SRR1785276 3 0.5223 0.52556 0.008 0.016 0.684 0.292
#> SRR1785277 3 0.5247 0.52446 0.008 0.016 0.680 0.296
#> SRR1785274 3 0.1545 0.62760 0.008 0.000 0.952 0.040
#> SRR1785275 3 0.1545 0.62760 0.008 0.000 0.952 0.040
#> SRR1785280 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.4252 0.58958 0.744 0.000 0.004 0.252
#> SRR1785279 1 0.4252 0.58958 0.744 0.000 0.004 0.252
#> SRR1785282 1 0.1302 0.67671 0.956 0.000 0.000 0.044
#> SRR1785283 1 0.1302 0.67671 0.956 0.000 0.000 0.044
#> SRR1785284 3 0.4532 0.55182 0.052 0.000 0.792 0.156
#> SRR1785285 3 0.4532 0.55182 0.052 0.000 0.792 0.156
#> SRR1785286 3 0.6931 0.32794 0.184 0.000 0.588 0.228
#> SRR1785287 3 0.6931 0.32794 0.184 0.000 0.588 0.228
#> SRR1785288 1 0.0188 0.67806 0.996 0.000 0.000 0.004
#> SRR1785289 1 0.0188 0.67806 0.996 0.000 0.000 0.004
#> SRR1785290 2 0.0188 0.85253 0.000 0.996 0.000 0.004
#> SRR1785291 2 0.0188 0.85253 0.000 0.996 0.000 0.004
#> SRR1785296 4 0.7938 0.28701 0.020 0.332 0.172 0.476
#> SRR1785297 4 0.7986 0.29057 0.024 0.328 0.168 0.480
#> SRR1785292 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785294 1 0.4697 0.35926 0.644 0.000 0.000 0.356
#> SRR1785295 1 0.4697 0.35926 0.644 0.000 0.000 0.356
#> SRR1785298 4 0.9104 0.31308 0.304 0.228 0.076 0.392
#> SRR1785299 4 0.9039 0.31021 0.304 0.224 0.072 0.400
#> SRR1785300 1 0.1118 0.66891 0.964 0.000 0.000 0.036
#> SRR1785301 1 0.1211 0.66684 0.960 0.000 0.000 0.040
#> SRR1785304 2 0.3942 0.57867 0.000 0.764 0.000 0.236
#> SRR1785305 2 0.3942 0.57867 0.000 0.764 0.000 0.236
#> SRR1785306 3 0.6783 0.13097 0.000 0.388 0.512 0.100
#> SRR1785307 3 0.6775 0.14319 0.000 0.384 0.516 0.100
#> SRR1785302 4 0.7004 0.12841 0.004 0.428 0.100 0.468
#> SRR1785303 4 0.7004 0.12841 0.004 0.428 0.100 0.468
#> SRR1785308 1 0.5434 0.45756 0.696 0.000 0.052 0.252
#> SRR1785309 1 0.5434 0.45756 0.696 0.000 0.052 0.252
#> SRR1785310 1 0.4720 0.38676 0.672 0.000 0.004 0.324
#> SRR1785311 1 0.4720 0.38676 0.672 0.000 0.004 0.324
#> SRR1785312 1 0.6553 0.45289 0.584 0.000 0.100 0.316
#> SRR1785313 1 0.6553 0.45289 0.584 0.000 0.100 0.316
#> SRR1785314 2 0.6355 0.37293 0.000 0.576 0.348 0.076
#> SRR1785315 2 0.6340 0.38129 0.000 0.580 0.344 0.076
#> SRR1785318 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.1389 0.67662 0.952 0.000 0.000 0.048
#> SRR1785317 1 0.1389 0.67662 0.952 0.000 0.000 0.048
#> SRR1785324 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.85411 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.6167 0.51813 0.648 0.000 0.096 0.256
#> SRR1785321 1 0.6167 0.51813 0.648 0.000 0.096 0.256
#> SRR1785322 1 0.4978 0.52865 0.664 0.000 0.012 0.324
#> SRR1785323 1 0.4978 0.52865 0.664 0.000 0.012 0.324
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 2 0.3538 0.7377 0.000 0.804 0.176 0.016 0.004
#> SRR1785239 2 0.3575 0.7333 0.000 0.800 0.180 0.016 0.004
#> SRR1785240 5 0.4283 0.4206 0.004 0.000 0.292 0.012 0.692
#> SRR1785241 5 0.4283 0.4206 0.004 0.000 0.292 0.012 0.692
#> SRR1785242 3 0.2899 0.5854 0.000 0.028 0.872 0.004 0.096
#> SRR1785243 3 0.2899 0.5854 0.000 0.028 0.872 0.004 0.096
#> SRR1785244 1 0.1357 0.5849 0.948 0.000 0.000 0.048 0.004
#> SRR1785245 1 0.1357 0.5849 0.948 0.000 0.000 0.048 0.004
#> SRR1785246 5 0.6493 0.2526 0.020 0.000 0.188 0.220 0.572
#> SRR1785247 5 0.6493 0.2526 0.020 0.000 0.188 0.220 0.572
#> SRR1785248 2 0.0290 0.9028 0.000 0.992 0.008 0.000 0.000
#> SRR1785250 3 0.6875 0.4291 0.176 0.000 0.576 0.188 0.060
#> SRR1785251 3 0.6845 0.4348 0.172 0.000 0.580 0.188 0.060
#> SRR1785252 3 0.2178 0.6017 0.000 0.024 0.920 0.008 0.048
#> SRR1785253 3 0.2178 0.6017 0.000 0.024 0.920 0.008 0.048
#> SRR1785254 2 0.4261 0.7636 0.000 0.804 0.024 0.076 0.096
#> SRR1785255 2 0.4319 0.7597 0.000 0.800 0.024 0.080 0.096
#> SRR1785256 1 0.2989 0.5048 0.852 0.000 0.008 0.132 0.008
#> SRR1785257 1 0.2989 0.5048 0.852 0.000 0.008 0.132 0.008
#> SRR1785258 3 0.6787 0.4122 0.288 0.000 0.548 0.104 0.060
#> SRR1785259 3 0.6737 0.4343 0.276 0.000 0.560 0.104 0.060
#> SRR1785262 3 0.5486 0.3215 0.004 0.000 0.640 0.096 0.260
#> SRR1785263 3 0.5463 0.3298 0.004 0.000 0.644 0.096 0.256
#> SRR1785260 4 0.4256 0.5251 0.436 0.000 0.000 0.564 0.000
#> SRR1785261 4 0.4256 0.5251 0.436 0.000 0.000 0.564 0.000
#> SRR1785264 2 0.0451 0.9021 0.000 0.988 0.008 0.004 0.000
#> SRR1785265 2 0.0451 0.9021 0.000 0.988 0.008 0.004 0.000
#> SRR1785266 2 0.0000 0.9050 0.000 1.000 0.000 0.000 0.000
#> SRR1785267 2 0.0000 0.9050 0.000 1.000 0.000 0.000 0.000
#> SRR1785268 1 0.7418 0.4112 0.508 0.000 0.112 0.260 0.120
#> SRR1785269 1 0.7418 0.4112 0.508 0.000 0.112 0.260 0.120
#> SRR1785270 5 0.5713 0.4510 0.000 0.316 0.024 0.056 0.604
#> SRR1785271 5 0.5713 0.4510 0.000 0.316 0.024 0.056 0.604
#> SRR1785272 1 0.5138 0.2510 0.592 0.000 0.368 0.032 0.008
#> SRR1785273 1 0.5138 0.2510 0.592 0.000 0.368 0.032 0.008
#> SRR1785276 5 0.6554 0.3161 0.028 0.016 0.112 0.236 0.608
#> SRR1785277 5 0.6554 0.3161 0.028 0.016 0.112 0.236 0.608
#> SRR1785274 5 0.4425 0.4016 0.000 0.000 0.296 0.024 0.680
#> SRR1785275 5 0.4404 0.4024 0.000 0.000 0.292 0.024 0.684
#> SRR1785280 2 0.0000 0.9050 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9050 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.5783 0.5731 0.684 0.000 0.048 0.176 0.092
#> SRR1785279 1 0.5783 0.5731 0.684 0.000 0.048 0.176 0.092
#> SRR1785282 1 0.0000 0.6031 1.000 0.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.6031 1.000 0.000 0.000 0.000 0.000
#> SRR1785284 5 0.4572 0.4700 0.020 0.000 0.180 0.044 0.756
#> SRR1785285 5 0.4605 0.4709 0.020 0.000 0.176 0.048 0.756
#> SRR1785286 5 0.7401 0.3235 0.096 0.000 0.164 0.216 0.524
#> SRR1785287 5 0.7420 0.3196 0.100 0.000 0.164 0.212 0.524
#> SRR1785288 1 0.1357 0.5849 0.948 0.000 0.000 0.048 0.004
#> SRR1785289 1 0.1357 0.5849 0.948 0.000 0.000 0.048 0.004
#> SRR1785290 2 0.1059 0.8963 0.000 0.968 0.008 0.020 0.004
#> SRR1785291 2 0.1059 0.8963 0.000 0.968 0.008 0.020 0.004
#> SRR1785296 4 0.6667 0.2852 0.000 0.188 0.296 0.504 0.012
#> SRR1785297 4 0.6680 0.2813 0.000 0.188 0.300 0.500 0.012
#> SRR1785292 2 0.0162 0.9041 0.000 0.996 0.004 0.000 0.000
#> SRR1785293 2 0.0162 0.9041 0.000 0.996 0.004 0.000 0.000
#> SRR1785294 4 0.4622 0.5240 0.440 0.000 0.012 0.548 0.000
#> SRR1785295 4 0.4622 0.5240 0.440 0.000 0.012 0.548 0.000
#> SRR1785298 4 0.8955 0.4621 0.228 0.144 0.072 0.420 0.136
#> SRR1785299 4 0.9027 0.4582 0.228 0.160 0.072 0.408 0.132
#> SRR1785300 1 0.2732 0.4665 0.840 0.000 0.000 0.160 0.000
#> SRR1785301 1 0.2732 0.4665 0.840 0.000 0.000 0.160 0.000
#> SRR1785304 2 0.4350 0.3581 0.000 0.588 0.000 0.408 0.004
#> SRR1785305 2 0.4350 0.3581 0.000 0.588 0.000 0.408 0.004
#> SRR1785306 5 0.7547 0.4066 0.000 0.228 0.144 0.120 0.508
#> SRR1785307 5 0.7547 0.4066 0.000 0.228 0.144 0.120 0.508
#> SRR1785302 4 0.8331 0.0211 0.000 0.184 0.208 0.384 0.224
#> SRR1785303 4 0.8299 0.0161 0.000 0.172 0.208 0.388 0.232
#> SRR1785308 1 0.4610 0.1117 0.556 0.000 0.432 0.012 0.000
#> SRR1785309 1 0.4604 0.1225 0.560 0.000 0.428 0.012 0.000
#> SRR1785310 4 0.4420 0.5078 0.448 0.000 0.004 0.548 0.000
#> SRR1785311 4 0.4420 0.5078 0.448 0.000 0.004 0.548 0.000
#> SRR1785312 1 0.7106 0.4223 0.508 0.000 0.040 0.244 0.208
#> SRR1785313 1 0.7106 0.4223 0.508 0.000 0.040 0.244 0.208
#> SRR1785314 5 0.6133 0.4064 0.000 0.336 0.028 0.076 0.560
#> SRR1785315 5 0.6133 0.4064 0.000 0.336 0.028 0.076 0.560
#> SRR1785318 2 0.0000 0.9050 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9050 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.0693 0.6044 0.980 0.000 0.008 0.012 0.000
#> SRR1785317 1 0.0693 0.6044 0.980 0.000 0.008 0.012 0.000
#> SRR1785324 2 0.0162 0.9041 0.000 0.996 0.004 0.000 0.000
#> SRR1785325 2 0.0162 0.9041 0.000 0.996 0.004 0.000 0.000
#> SRR1785320 1 0.6088 0.5049 0.612 0.000 0.012 0.208 0.168
#> SRR1785321 1 0.6088 0.5049 0.612 0.000 0.012 0.208 0.168
#> SRR1785322 1 0.7047 0.4822 0.552 0.000 0.104 0.248 0.096
#> SRR1785323 1 0.7047 0.4822 0.552 0.000 0.104 0.248 0.096
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 2 0.4548 0.6503 0.004 0.720 0.204 0.020 0.000 0.052
#> SRR1785239 2 0.4538 0.6551 0.004 0.724 0.200 0.024 0.000 0.048
#> SRR1785240 5 0.2113 0.5139 0.004 0.000 0.092 0.000 0.896 0.008
#> SRR1785241 5 0.2113 0.5139 0.004 0.000 0.092 0.000 0.896 0.008
#> SRR1785242 3 0.3883 0.4993 0.000 0.012 0.744 0.024 0.220 0.000
#> SRR1785243 3 0.3883 0.4993 0.000 0.012 0.744 0.024 0.220 0.000
#> SRR1785244 1 0.1932 0.5940 0.924 0.000 0.000 0.040 0.016 0.020
#> SRR1785245 1 0.1932 0.5940 0.924 0.000 0.000 0.040 0.016 0.020
#> SRR1785246 6 0.5336 0.4615 0.016 0.000 0.112 0.004 0.228 0.640
#> SRR1785247 6 0.5297 0.4661 0.016 0.000 0.108 0.004 0.228 0.644
#> SRR1785248 2 0.0862 0.8685 0.000 0.972 0.016 0.004 0.000 0.008
#> SRR1785250 3 0.5605 0.3349 0.116 0.000 0.652 0.064 0.000 0.168
#> SRR1785251 3 0.5605 0.3349 0.116 0.000 0.652 0.064 0.000 0.168
#> SRR1785252 3 0.3385 0.5173 0.000 0.004 0.796 0.028 0.172 0.000
#> SRR1785253 3 0.3385 0.5173 0.000 0.004 0.796 0.028 0.172 0.000
#> SRR1785254 2 0.6231 0.5681 0.000 0.640 0.032 0.104 0.088 0.136
#> SRR1785255 2 0.6186 0.5739 0.000 0.644 0.032 0.104 0.084 0.136
#> SRR1785256 1 0.4100 0.4278 0.756 0.000 0.012 0.192 0.028 0.012
#> SRR1785257 1 0.4100 0.4278 0.756 0.000 0.012 0.192 0.028 0.012
#> SRR1785258 3 0.7508 0.3778 0.208 0.000 0.488 0.052 0.096 0.156
#> SRR1785259 3 0.7484 0.3863 0.196 0.000 0.496 0.052 0.100 0.156
#> SRR1785262 3 0.6427 0.2273 0.012 0.000 0.428 0.116 0.408 0.036
#> SRR1785263 3 0.6429 0.2112 0.012 0.000 0.420 0.116 0.416 0.036
#> SRR1785260 4 0.3684 0.6509 0.332 0.000 0.000 0.664 0.000 0.004
#> SRR1785261 4 0.3684 0.6509 0.332 0.000 0.000 0.664 0.000 0.004
#> SRR1785264 2 0.0767 0.8703 0.000 0.976 0.012 0.004 0.000 0.008
#> SRR1785265 2 0.0767 0.8703 0.000 0.976 0.012 0.004 0.000 0.008
#> SRR1785266 2 0.0291 0.8730 0.000 0.992 0.004 0.004 0.000 0.000
#> SRR1785267 2 0.0291 0.8730 0.000 0.992 0.004 0.004 0.000 0.000
#> SRR1785268 6 0.6544 0.4004 0.324 0.000 0.164 0.052 0.000 0.460
#> SRR1785269 6 0.6551 0.4072 0.316 0.000 0.168 0.052 0.000 0.464
#> SRR1785270 5 0.7392 0.5082 0.000 0.224 0.040 0.136 0.492 0.108
#> SRR1785271 5 0.7392 0.5082 0.000 0.224 0.040 0.136 0.492 0.108
#> SRR1785272 1 0.5683 0.2474 0.496 0.000 0.392 0.024 0.000 0.088
#> SRR1785273 1 0.5683 0.2474 0.496 0.000 0.392 0.024 0.000 0.088
#> SRR1785276 6 0.4377 0.4897 0.016 0.000 0.020 0.016 0.228 0.720
#> SRR1785277 6 0.4377 0.4897 0.016 0.000 0.020 0.016 0.228 0.720
#> SRR1785274 5 0.4044 0.4699 0.000 0.000 0.128 0.020 0.780 0.072
#> SRR1785275 5 0.3990 0.4715 0.000 0.000 0.128 0.020 0.784 0.068
#> SRR1785280 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.5984 0.0377 0.556 0.000 0.084 0.052 0.004 0.304
#> SRR1785279 1 0.5984 0.0377 0.556 0.000 0.084 0.052 0.004 0.304
#> SRR1785282 1 0.1116 0.5949 0.960 0.000 0.004 0.008 0.000 0.028
#> SRR1785283 1 0.1036 0.5962 0.964 0.000 0.004 0.008 0.000 0.024
#> SRR1785284 5 0.1439 0.5419 0.016 0.000 0.008 0.012 0.952 0.012
#> SRR1785285 5 0.1533 0.5409 0.016 0.000 0.008 0.016 0.948 0.012
#> SRR1785286 5 0.5341 0.4036 0.084 0.000 0.036 0.176 0.688 0.016
#> SRR1785287 5 0.5371 0.4009 0.084 0.000 0.036 0.180 0.684 0.016
#> SRR1785288 1 0.1838 0.5937 0.928 0.000 0.000 0.040 0.012 0.020
#> SRR1785289 1 0.1838 0.5937 0.928 0.000 0.000 0.040 0.012 0.020
#> SRR1785290 2 0.1370 0.8574 0.000 0.948 0.004 0.036 0.000 0.012
#> SRR1785291 2 0.1370 0.8574 0.000 0.948 0.004 0.036 0.000 0.012
#> SRR1785296 4 0.6523 0.3516 0.000 0.144 0.212 0.568 0.056 0.020
#> SRR1785297 4 0.6352 0.3588 0.000 0.136 0.216 0.580 0.052 0.016
#> SRR1785292 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785294 4 0.3693 0.6642 0.280 0.000 0.008 0.708 0.000 0.004
#> SRR1785295 4 0.3693 0.6642 0.280 0.000 0.008 0.708 0.000 0.004
#> SRR1785298 4 0.9280 0.3399 0.176 0.092 0.072 0.344 0.140 0.176
#> SRR1785299 4 0.9294 0.3478 0.172 0.104 0.076 0.352 0.132 0.164
#> SRR1785300 1 0.3593 0.3896 0.756 0.000 0.004 0.224 0.004 0.012
#> SRR1785301 1 0.3593 0.3896 0.756 0.000 0.004 0.224 0.004 0.012
#> SRR1785304 2 0.4080 0.2653 0.000 0.536 0.000 0.456 0.000 0.008
#> SRR1785305 2 0.4080 0.2653 0.000 0.536 0.000 0.456 0.000 0.008
#> SRR1785306 5 0.8402 0.4016 0.000 0.132 0.148 0.176 0.396 0.148
#> SRR1785307 5 0.8383 0.4071 0.000 0.132 0.152 0.172 0.400 0.144
#> SRR1785302 3 0.8773 0.0708 0.008 0.096 0.276 0.252 0.128 0.240
#> SRR1785303 3 0.8751 0.0724 0.008 0.092 0.276 0.256 0.128 0.240
#> SRR1785308 1 0.5053 0.1666 0.496 0.000 0.448 0.020 0.000 0.036
#> SRR1785309 1 0.5053 0.1666 0.496 0.000 0.448 0.020 0.000 0.036
#> SRR1785310 4 0.4105 0.6434 0.344 0.000 0.004 0.640 0.004 0.008
#> SRR1785311 4 0.4105 0.6434 0.344 0.000 0.004 0.640 0.004 0.008
#> SRR1785312 6 0.4091 0.5709 0.292 0.000 0.012 0.008 0.004 0.684
#> SRR1785313 6 0.4091 0.5709 0.292 0.000 0.012 0.008 0.004 0.684
#> SRR1785314 5 0.7895 0.4842 0.000 0.224 0.060 0.156 0.436 0.124
#> SRR1785315 5 0.7895 0.4842 0.000 0.224 0.060 0.156 0.436 0.124
#> SRR1785318 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 1 0.2518 0.5550 0.880 0.000 0.012 0.016 0.000 0.092
#> SRR1785317 1 0.2467 0.5583 0.884 0.000 0.012 0.016 0.000 0.088
#> SRR1785324 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.8748 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785320 6 0.4304 0.4070 0.448 0.000 0.000 0.008 0.008 0.536
#> SRR1785321 6 0.4296 0.4204 0.440 0.000 0.000 0.008 0.008 0.544
#> SRR1785322 1 0.7283 -0.0841 0.400 0.000 0.184 0.096 0.008 0.312
#> SRR1785323 1 0.7283 -0.0841 0.400 0.000 0.184 0.096 0.008 0.312
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "pam"]
# you can also extract it by
# res = res_list["CV:pam"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.368 0.748 0.825 0.3616 0.743 0.743
#> 3 3 0.357 0.576 0.714 0.6469 0.644 0.520
#> 4 4 0.421 0.560 0.697 0.1819 0.749 0.440
#> 5 5 0.479 0.518 0.737 0.0553 0.859 0.554
#> 6 6 0.526 0.435 0.637 0.0566 0.830 0.421
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 1 0.7883 0.691 0.764 0.236
#> SRR1785239 1 0.7883 0.691 0.764 0.236
#> SRR1785240 1 0.6887 0.755 0.816 0.184
#> SRR1785241 1 0.6887 0.755 0.816 0.184
#> SRR1785242 1 0.8207 0.743 0.744 0.256
#> SRR1785243 1 0.7674 0.750 0.776 0.224
#> SRR1785244 1 0.0000 0.753 1.000 0.000
#> SRR1785245 1 0.0000 0.753 1.000 0.000
#> SRR1785246 1 0.7602 0.752 0.780 0.220
#> SRR1785247 1 0.7299 0.754 0.796 0.204
#> SRR1785248 2 0.0000 0.987 0.000 1.000
#> SRR1785250 1 0.0672 0.754 0.992 0.008
#> SRR1785251 1 0.0938 0.756 0.988 0.012
#> SRR1785252 1 0.9815 0.647 0.580 0.420
#> SRR1785253 1 0.9815 0.647 0.580 0.420
#> SRR1785254 1 0.7950 0.745 0.760 0.240
#> SRR1785255 1 0.8016 0.745 0.756 0.244
#> SRR1785256 1 0.0000 0.753 1.000 0.000
#> SRR1785257 1 0.0000 0.753 1.000 0.000
#> SRR1785258 1 0.1633 0.749 0.976 0.024
#> SRR1785259 1 0.1633 0.749 0.976 0.024
#> SRR1785262 1 0.6973 0.755 0.812 0.188
#> SRR1785263 1 0.6973 0.755 0.812 0.188
#> SRR1785260 1 0.7453 0.753 0.788 0.212
#> SRR1785261 1 0.8713 0.724 0.708 0.292
#> SRR1785264 2 0.4022 0.865 0.080 0.920
#> SRR1785265 2 0.0000 0.987 0.000 1.000
#> SRR1785266 2 0.0376 0.983 0.004 0.996
#> SRR1785267 2 0.0000 0.987 0.000 1.000
#> SRR1785268 1 0.0000 0.753 1.000 0.000
#> SRR1785269 1 0.0000 0.753 1.000 0.000
#> SRR1785270 1 0.9686 0.521 0.604 0.396
#> SRR1785271 1 0.9775 0.514 0.588 0.412
#> SRR1785272 1 0.1633 0.749 0.976 0.024
#> SRR1785273 1 0.2043 0.749 0.968 0.032
#> SRR1785276 1 0.9815 0.647 0.580 0.420
#> SRR1785277 1 0.9815 0.647 0.580 0.420
#> SRR1785274 1 0.7056 0.755 0.808 0.192
#> SRR1785275 1 0.7056 0.755 0.808 0.192
#> SRR1785280 2 0.0000 0.987 0.000 1.000
#> SRR1785281 2 0.0000 0.987 0.000 1.000
#> SRR1785278 1 0.0000 0.753 1.000 0.000
#> SRR1785279 1 0.0000 0.753 1.000 0.000
#> SRR1785282 1 0.1633 0.749 0.976 0.024
#> SRR1785283 1 0.1633 0.749 0.976 0.024
#> SRR1785284 1 0.9491 0.683 0.632 0.368
#> SRR1785285 1 0.9661 0.665 0.608 0.392
#> SRR1785286 1 0.9661 0.664 0.608 0.392
#> SRR1785287 1 0.9635 0.666 0.612 0.388
#> SRR1785288 1 0.0000 0.753 1.000 0.000
#> SRR1785289 1 0.0000 0.753 1.000 0.000
#> SRR1785290 1 0.9866 0.632 0.568 0.432
#> SRR1785291 1 0.9866 0.632 0.568 0.432
#> SRR1785296 1 0.9686 0.662 0.604 0.396
#> SRR1785297 1 0.9686 0.662 0.604 0.396
#> SRR1785292 2 0.0000 0.987 0.000 1.000
#> SRR1785293 2 0.0000 0.987 0.000 1.000
#> SRR1785294 1 0.9661 0.664 0.608 0.392
#> SRR1785295 1 0.9686 0.662 0.604 0.396
#> SRR1785298 1 0.9686 0.662 0.604 0.396
#> SRR1785299 1 0.9686 0.662 0.604 0.396
#> SRR1785300 1 0.0000 0.753 1.000 0.000
#> SRR1785301 1 0.0000 0.753 1.000 0.000
#> SRR1785304 1 0.9732 0.650 0.596 0.404
#> SRR1785305 1 0.9754 0.645 0.592 0.408
#> SRR1785306 1 0.9815 0.647 0.580 0.420
#> SRR1785307 1 0.9686 0.662 0.604 0.396
#> SRR1785302 1 0.9686 0.662 0.604 0.396
#> SRR1785303 1 0.9686 0.662 0.604 0.396
#> SRR1785308 1 0.1633 0.749 0.976 0.024
#> SRR1785309 1 0.1633 0.749 0.976 0.024
#> SRR1785310 1 0.9686 0.662 0.604 0.396
#> SRR1785311 1 0.9661 0.664 0.608 0.392
#> SRR1785312 1 0.0000 0.753 1.000 0.000
#> SRR1785313 1 0.0000 0.753 1.000 0.000
#> SRR1785314 1 0.9833 0.642 0.576 0.424
#> SRR1785315 1 0.9993 0.542 0.516 0.484
#> SRR1785318 2 0.0000 0.987 0.000 1.000
#> SRR1785319 2 0.0000 0.987 0.000 1.000
#> SRR1785316 1 0.0000 0.753 1.000 0.000
#> SRR1785317 1 0.0000 0.753 1.000 0.000
#> SRR1785324 2 0.0000 0.987 0.000 1.000
#> SRR1785325 2 0.1184 0.968 0.016 0.984
#> SRR1785320 1 0.0000 0.753 1.000 0.000
#> SRR1785321 1 0.0000 0.753 1.000 0.000
#> SRR1785322 1 0.2778 0.754 0.952 0.048
#> SRR1785323 1 0.1633 0.749 0.976 0.024
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.595 0.5633 0.360 0.000 0.640
#> SRR1785239 3 0.599 0.5561 0.368 0.000 0.632
#> SRR1785240 3 0.510 0.7149 0.248 0.000 0.752
#> SRR1785241 3 0.506 0.7134 0.244 0.000 0.756
#> SRR1785242 3 0.525 0.7237 0.264 0.000 0.736
#> SRR1785243 3 0.525 0.7232 0.264 0.000 0.736
#> SRR1785244 1 0.573 0.6603 0.676 0.000 0.324
#> SRR1785245 1 0.571 0.6620 0.680 0.000 0.320
#> SRR1785246 3 0.355 0.6800 0.132 0.000 0.868
#> SRR1785247 3 0.394 0.6768 0.156 0.000 0.844
#> SRR1785248 2 0.644 0.6166 0.276 0.696 0.028
#> SRR1785250 3 0.348 0.5833 0.128 0.000 0.872
#> SRR1785251 3 0.319 0.5998 0.112 0.000 0.888
#> SRR1785252 3 0.599 0.6802 0.368 0.000 0.632
#> SRR1785253 3 0.599 0.6802 0.368 0.000 0.632
#> SRR1785254 1 0.516 0.5751 0.832 0.072 0.096
#> SRR1785255 1 0.497 0.5723 0.840 0.060 0.100
#> SRR1785256 1 0.599 0.6469 0.632 0.000 0.368
#> SRR1785257 1 0.590 0.6549 0.648 0.000 0.352
#> SRR1785258 1 0.615 0.5732 0.592 0.000 0.408
#> SRR1785259 3 0.603 -0.0381 0.376 0.000 0.624
#> SRR1785262 3 0.510 0.7184 0.248 0.000 0.752
#> SRR1785263 3 0.518 0.7168 0.256 0.000 0.744
#> SRR1785260 1 0.450 0.5588 0.804 0.000 0.196
#> SRR1785261 1 0.412 0.5425 0.832 0.000 0.168
#> SRR1785264 2 0.890 0.3660 0.292 0.552 0.156
#> SRR1785265 2 0.667 0.6072 0.276 0.688 0.036
#> SRR1785266 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785267 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785268 3 0.604 -0.2273 0.380 0.000 0.620
#> SRR1785269 3 0.586 -0.1356 0.344 0.000 0.656
#> SRR1785270 3 0.619 0.7174 0.216 0.040 0.744
#> SRR1785271 3 0.611 0.7243 0.240 0.028 0.732
#> SRR1785272 3 0.484 0.4745 0.224 0.000 0.776
#> SRR1785273 3 0.465 0.4902 0.208 0.000 0.792
#> SRR1785276 3 0.571 0.6288 0.320 0.000 0.680
#> SRR1785277 3 0.571 0.6288 0.320 0.000 0.680
#> SRR1785274 3 0.518 0.7120 0.256 0.000 0.744
#> SRR1785275 3 0.543 0.6869 0.284 0.000 0.716
#> SRR1785280 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785281 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785278 1 0.562 0.6672 0.692 0.000 0.308
#> SRR1785279 1 0.568 0.6641 0.684 0.000 0.316
#> SRR1785282 1 0.565 0.6658 0.688 0.000 0.312
#> SRR1785283 1 0.562 0.6672 0.692 0.000 0.308
#> SRR1785284 3 0.603 0.6883 0.376 0.000 0.624
#> SRR1785285 3 0.627 0.6306 0.456 0.000 0.544
#> SRR1785286 1 0.400 0.4041 0.840 0.000 0.160
#> SRR1785287 1 0.280 0.4965 0.908 0.000 0.092
#> SRR1785288 1 0.536 0.6720 0.724 0.000 0.276
#> SRR1785289 1 0.536 0.6720 0.724 0.000 0.276
#> SRR1785290 1 0.346 0.5041 0.904 0.036 0.060
#> SRR1785291 1 0.347 0.5078 0.904 0.056 0.040
#> SRR1785296 3 0.630 0.6087 0.484 0.000 0.516
#> SRR1785297 3 0.631 0.6038 0.488 0.000 0.512
#> SRR1785292 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785293 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785294 1 0.296 0.4770 0.900 0.000 0.100
#> SRR1785295 1 0.296 0.4776 0.900 0.000 0.100
#> SRR1785298 1 0.619 -0.4729 0.580 0.000 0.420
#> SRR1785299 1 0.630 -0.5729 0.528 0.000 0.472
#> SRR1785300 1 0.571 0.6620 0.680 0.000 0.320
#> SRR1785301 1 0.571 0.6620 0.680 0.000 0.320
#> SRR1785304 1 0.337 0.5129 0.904 0.072 0.024
#> SRR1785305 1 0.350 0.5080 0.900 0.072 0.028
#> SRR1785306 3 0.617 0.6578 0.412 0.000 0.588
#> SRR1785307 3 0.617 0.6578 0.412 0.000 0.588
#> SRR1785302 1 0.288 0.4868 0.904 0.000 0.096
#> SRR1785303 1 0.271 0.4941 0.912 0.000 0.088
#> SRR1785308 1 0.540 0.6719 0.720 0.000 0.280
#> SRR1785309 1 0.543 0.6713 0.716 0.000 0.284
#> SRR1785310 1 0.271 0.4960 0.912 0.000 0.088
#> SRR1785311 1 0.236 0.5134 0.928 0.000 0.072
#> SRR1785312 1 0.613 0.5881 0.600 0.000 0.400
#> SRR1785313 1 0.615 0.5763 0.592 0.000 0.408
#> SRR1785314 1 0.953 -0.3749 0.484 0.228 0.288
#> SRR1785315 1 0.841 -0.0304 0.556 0.344 0.100
#> SRR1785318 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785319 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785316 1 0.536 0.6720 0.724 0.000 0.276
#> SRR1785317 1 0.543 0.6713 0.716 0.000 0.284
#> SRR1785324 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785325 2 0.000 0.9033 0.000 1.000 0.000
#> SRR1785320 1 0.576 0.6581 0.672 0.000 0.328
#> SRR1785321 1 0.610 0.6092 0.608 0.000 0.392
#> SRR1785322 1 0.533 0.6720 0.728 0.000 0.272
#> SRR1785323 1 0.559 0.6689 0.696 0.000 0.304
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 1 0.729 0.4223 0.532 0.000 0.200 0.268
#> SRR1785239 1 0.729 0.4223 0.532 0.000 0.200 0.268
#> SRR1785240 3 0.545 0.6481 0.244 0.000 0.700 0.056
#> SRR1785241 3 0.540 0.6434 0.248 0.000 0.700 0.052
#> SRR1785242 3 0.471 0.6608 0.024 0.000 0.740 0.236
#> SRR1785243 3 0.510 0.6827 0.076 0.000 0.756 0.168
#> SRR1785244 1 0.424 0.6896 0.800 0.000 0.032 0.168
#> SRR1785245 1 0.483 0.6736 0.768 0.000 0.056 0.176
#> SRR1785246 3 0.419 0.5677 0.228 0.000 0.764 0.008
#> SRR1785247 3 0.404 0.5499 0.248 0.000 0.752 0.000
#> SRR1785248 2 0.618 0.5289 0.000 0.608 0.072 0.320
#> SRR1785250 3 0.555 0.6628 0.200 0.000 0.716 0.084
#> SRR1785251 3 0.558 0.6673 0.184 0.000 0.720 0.096
#> SRR1785252 3 0.482 0.4964 0.000 0.000 0.612 0.388
#> SRR1785253 3 0.480 0.5003 0.000 0.000 0.616 0.384
#> SRR1785254 4 0.468 0.5969 0.184 0.000 0.044 0.772
#> SRR1785255 4 0.455 0.6044 0.180 0.000 0.040 0.780
#> SRR1785256 4 0.771 -0.0276 0.364 0.000 0.224 0.412
#> SRR1785257 4 0.765 0.0594 0.340 0.000 0.220 0.440
#> SRR1785258 1 0.737 0.3039 0.504 0.000 0.188 0.308
#> SRR1785259 1 0.603 0.4620 0.644 0.000 0.280 0.076
#> SRR1785262 3 0.600 0.6452 0.240 0.000 0.668 0.092
#> SRR1785263 3 0.610 0.6483 0.232 0.000 0.664 0.104
#> SRR1785260 4 0.515 0.5301 0.208 0.000 0.056 0.736
#> SRR1785261 4 0.420 0.5891 0.192 0.000 0.020 0.788
#> SRR1785264 2 0.741 0.2124 0.000 0.444 0.168 0.388
#> SRR1785265 2 0.542 0.5467 0.000 0.640 0.028 0.332
#> SRR1785266 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785267 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785268 1 0.344 0.5101 0.816 0.000 0.184 0.000
#> SRR1785269 1 0.353 0.5021 0.808 0.000 0.192 0.000
#> SRR1785270 3 0.607 0.6695 0.088 0.032 0.728 0.152
#> SRR1785271 3 0.572 0.6648 0.072 0.012 0.724 0.192
#> SRR1785272 1 0.514 0.6333 0.756 0.000 0.160 0.084
#> SRR1785273 1 0.611 0.5537 0.680 0.000 0.176 0.144
#> SRR1785276 3 0.614 0.5030 0.184 0.000 0.676 0.140
#> SRR1785277 3 0.610 0.5069 0.184 0.000 0.680 0.136
#> SRR1785274 3 0.620 0.6780 0.168 0.000 0.672 0.160
#> SRR1785275 3 0.640 0.6676 0.164 0.000 0.652 0.184
#> SRR1785280 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.393 0.6913 0.808 0.000 0.016 0.176
#> SRR1785279 1 0.399 0.6908 0.808 0.000 0.020 0.172
#> SRR1785282 1 0.433 0.6928 0.792 0.000 0.032 0.176
#> SRR1785283 1 0.389 0.6917 0.804 0.000 0.012 0.184
#> SRR1785284 4 0.649 -0.0439 0.072 0.000 0.436 0.492
#> SRR1785285 4 0.682 0.0664 0.100 0.000 0.412 0.488
#> SRR1785286 4 0.423 0.6528 0.132 0.000 0.052 0.816
#> SRR1785287 4 0.364 0.6223 0.172 0.000 0.008 0.820
#> SRR1785288 1 0.430 0.6344 0.716 0.000 0.000 0.284
#> SRR1785289 1 0.456 0.5832 0.672 0.000 0.000 0.328
#> SRR1785290 4 0.162 0.6377 0.020 0.000 0.028 0.952
#> SRR1785291 4 0.192 0.6400 0.024 0.004 0.028 0.944
#> SRR1785296 4 0.450 0.2049 0.000 0.000 0.316 0.684
#> SRR1785297 4 0.448 0.2154 0.000 0.000 0.312 0.688
#> SRR1785292 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.307 0.6334 0.152 0.000 0.000 0.848
#> SRR1785295 4 0.247 0.6547 0.108 0.000 0.000 0.892
#> SRR1785298 4 0.585 0.3589 0.068 0.000 0.272 0.660
#> SRR1785299 4 0.599 0.3050 0.068 0.000 0.296 0.636
#> SRR1785300 1 0.642 0.2533 0.508 0.000 0.068 0.424
#> SRR1785301 4 0.641 0.0126 0.416 0.000 0.068 0.516
#> SRR1785304 4 0.255 0.6530 0.092 0.008 0.000 0.900
#> SRR1785305 4 0.166 0.6503 0.052 0.004 0.000 0.944
#> SRR1785306 3 0.438 0.5828 0.000 0.000 0.704 0.296
#> SRR1785307 3 0.445 0.5783 0.000 0.000 0.692 0.308
#> SRR1785302 4 0.220 0.6197 0.024 0.000 0.048 0.928
#> SRR1785303 4 0.220 0.6197 0.024 0.000 0.048 0.928
#> SRR1785308 1 0.507 0.6833 0.748 0.000 0.060 0.192
#> SRR1785309 1 0.507 0.6833 0.748 0.000 0.060 0.192
#> SRR1785310 4 0.234 0.6569 0.100 0.000 0.000 0.900
#> SRR1785311 4 0.322 0.6237 0.164 0.000 0.000 0.836
#> SRR1785312 1 0.442 0.5115 0.784 0.000 0.184 0.032
#> SRR1785313 1 0.509 0.5059 0.752 0.000 0.180 0.068
#> SRR1785314 4 0.621 0.1181 0.004 0.056 0.348 0.592
#> SRR1785315 4 0.704 0.2423 0.004 0.228 0.176 0.592
#> SRR1785318 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.410 0.6566 0.744 0.000 0.000 0.256
#> SRR1785317 1 0.398 0.6697 0.760 0.000 0.000 0.240
#> SRR1785324 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.000 0.8848 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.471 0.6327 0.792 0.000 0.120 0.088
#> SRR1785321 1 0.390 0.5432 0.816 0.000 0.164 0.020
#> SRR1785322 1 0.564 0.3721 0.548 0.000 0.024 0.428
#> SRR1785323 1 0.600 0.2111 0.508 0.000 0.040 0.452
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 1 0.6151 0.3927 0.532 0.000 0.364 0.084 0.020
#> SRR1785239 1 0.6186 0.3940 0.532 0.000 0.360 0.088 0.020
#> SRR1785240 3 0.4432 0.6181 0.008 0.000 0.772 0.144 0.076
#> SRR1785241 3 0.4473 0.6146 0.008 0.000 0.768 0.148 0.076
#> SRR1785242 3 0.1764 0.6242 0.000 0.000 0.928 0.064 0.008
#> SRR1785243 3 0.2136 0.6526 0.000 0.000 0.904 0.088 0.008
#> SRR1785244 1 0.6662 0.5305 0.532 0.000 0.080 0.328 0.060
#> SRR1785245 1 0.7054 0.4885 0.488 0.000 0.116 0.336 0.060
#> SRR1785246 3 0.5028 0.3193 0.444 0.000 0.524 0.000 0.032
#> SRR1785247 3 0.5044 0.2934 0.464 0.000 0.504 0.000 0.032
#> SRR1785248 2 0.6194 0.4848 0.000 0.620 0.220 0.132 0.028
#> SRR1785250 3 0.3688 0.6447 0.028 0.000 0.828 0.124 0.020
#> SRR1785251 3 0.3455 0.6499 0.024 0.000 0.844 0.112 0.020
#> SRR1785252 3 0.3151 0.5918 0.000 0.000 0.836 0.144 0.020
#> SRR1785253 3 0.3016 0.5872 0.000 0.000 0.848 0.132 0.020
#> SRR1785254 4 0.1741 0.6746 0.000 0.000 0.024 0.936 0.040
#> SRR1785255 4 0.1648 0.6761 0.000 0.000 0.020 0.940 0.040
#> SRR1785256 4 0.6187 0.3875 0.056 0.000 0.244 0.624 0.076
#> SRR1785257 4 0.5881 0.4242 0.040 0.000 0.236 0.648 0.076
#> SRR1785258 4 0.7598 0.0830 0.208 0.000 0.236 0.476 0.080
#> SRR1785259 1 0.7718 0.3578 0.372 0.000 0.348 0.216 0.064
#> SRR1785262 3 0.4648 0.6053 0.008 0.000 0.748 0.172 0.072
#> SRR1785263 3 0.4552 0.6149 0.008 0.000 0.756 0.168 0.068
#> SRR1785260 4 0.2519 0.6314 0.000 0.000 0.100 0.884 0.016
#> SRR1785261 4 0.1981 0.6589 0.000 0.000 0.064 0.920 0.016
#> SRR1785264 2 0.6920 0.2566 0.000 0.476 0.308 0.196 0.020
#> SRR1785265 2 0.5531 0.5489 0.000 0.692 0.156 0.132 0.020
#> SRR1785266 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785267 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785268 1 0.0609 0.4198 0.980 0.000 0.000 0.000 0.020
#> SRR1785269 1 0.0609 0.4198 0.980 0.000 0.000 0.000 0.020
#> SRR1785270 5 0.2199 0.8920 0.000 0.016 0.060 0.008 0.916
#> SRR1785271 5 0.2243 0.8959 0.000 0.016 0.056 0.012 0.916
#> SRR1785272 1 0.7168 0.5315 0.536 0.000 0.192 0.208 0.064
#> SRR1785273 1 0.7074 0.4989 0.528 0.000 0.276 0.128 0.068
#> SRR1785276 1 0.6237 -0.4170 0.456 0.000 0.448 0.064 0.032
#> SRR1785277 1 0.6285 -0.4165 0.456 0.000 0.444 0.068 0.032
#> SRR1785274 3 0.4011 0.6517 0.008 0.000 0.808 0.112 0.072
#> SRR1785275 3 0.4535 0.6163 0.008 0.000 0.760 0.160 0.072
#> SRR1785280 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.6444 0.5330 0.540 0.000 0.060 0.340 0.060
#> SRR1785279 1 0.6577 0.5313 0.536 0.000 0.072 0.332 0.060
#> SRR1785282 1 0.6498 0.5336 0.536 0.000 0.064 0.340 0.060
#> SRR1785283 1 0.6400 0.5312 0.540 0.000 0.056 0.344 0.060
#> SRR1785284 3 0.4658 0.4075 0.000 0.000 0.576 0.408 0.016
#> SRR1785285 3 0.4747 0.2898 0.000 0.000 0.496 0.488 0.016
#> SRR1785286 4 0.2674 0.6359 0.000 0.000 0.120 0.868 0.012
#> SRR1785287 4 0.1211 0.6797 0.000 0.000 0.016 0.960 0.024
#> SRR1785288 1 0.5039 0.4259 0.512 0.000 0.032 0.456 0.000
#> SRR1785289 4 0.5032 -0.3292 0.448 0.000 0.032 0.520 0.000
#> SRR1785290 4 0.3574 0.5771 0.000 0.000 0.168 0.804 0.028
#> SRR1785291 4 0.3525 0.5823 0.000 0.004 0.156 0.816 0.024
#> SRR1785296 3 0.4658 0.1873 0.000 0.000 0.504 0.484 0.012
#> SRR1785297 3 0.4659 0.1767 0.000 0.000 0.500 0.488 0.012
#> SRR1785292 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785294 4 0.0771 0.6772 0.000 0.000 0.020 0.976 0.004
#> SRR1785295 4 0.1628 0.6652 0.000 0.000 0.056 0.936 0.008
#> SRR1785298 4 0.4717 -0.0362 0.000 0.000 0.396 0.584 0.020
#> SRR1785299 4 0.4767 -0.1123 0.000 0.000 0.420 0.560 0.020
#> SRR1785300 4 0.6543 0.3160 0.156 0.000 0.140 0.628 0.076
#> SRR1785301 4 0.5490 0.4869 0.064 0.000 0.140 0.720 0.076
#> SRR1785304 4 0.2866 0.6521 0.000 0.020 0.076 0.884 0.020
#> SRR1785305 4 0.3110 0.6253 0.000 0.004 0.112 0.856 0.028
#> SRR1785306 3 0.4696 0.5618 0.000 0.000 0.736 0.156 0.108
#> SRR1785307 3 0.5046 0.5359 0.000 0.000 0.704 0.140 0.156
#> SRR1785302 4 0.3976 0.5148 0.004 0.000 0.216 0.760 0.020
#> SRR1785303 4 0.3883 0.5165 0.004 0.000 0.216 0.764 0.016
#> SRR1785308 1 0.6221 0.5215 0.520 0.000 0.108 0.360 0.012
#> SRR1785309 1 0.6221 0.5215 0.520 0.000 0.108 0.360 0.012
#> SRR1785310 4 0.1942 0.6560 0.000 0.000 0.068 0.920 0.012
#> SRR1785311 4 0.0162 0.6791 0.000 0.000 0.004 0.996 0.000
#> SRR1785312 1 0.0771 0.4194 0.976 0.000 0.000 0.004 0.020
#> SRR1785313 1 0.0898 0.4179 0.972 0.000 0.000 0.008 0.020
#> SRR1785314 5 0.2470 0.8781 0.000 0.000 0.012 0.104 0.884
#> SRR1785315 5 0.2786 0.8899 0.000 0.020 0.012 0.084 0.884
#> SRR1785318 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.5330 0.4706 0.532 0.000 0.036 0.424 0.008
#> SRR1785317 1 0.5727 0.4932 0.532 0.000 0.036 0.404 0.028
#> SRR1785324 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.8681 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 1 0.2877 0.5413 0.848 0.000 0.004 0.144 0.004
#> SRR1785321 1 0.1444 0.4612 0.948 0.000 0.000 0.040 0.012
#> SRR1785322 4 0.6341 0.0808 0.296 0.000 0.056 0.580 0.068
#> SRR1785323 4 0.5865 0.2762 0.228 0.000 0.060 0.656 0.056
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 1 0.4731 0.3579 0.524 0.000 0.428 0.048 0.000 0.000
#> SRR1785239 1 0.4629 0.3611 0.524 0.000 0.436 0.040 0.000 0.000
#> SRR1785240 5 0.7450 0.4094 0.200 0.000 0.164 0.256 0.380 0.000
#> SRR1785241 5 0.7450 0.4094 0.200 0.000 0.164 0.256 0.380 0.000
#> SRR1785242 3 0.5297 -0.0226 0.048 0.000 0.624 0.052 0.276 0.000
#> SRR1785243 3 0.6062 -0.1055 0.100 0.000 0.560 0.064 0.276 0.000
#> SRR1785244 1 0.2773 0.6082 0.828 0.000 0.004 0.164 0.000 0.004
#> SRR1785245 1 0.2933 0.5877 0.796 0.000 0.000 0.200 0.000 0.004
#> SRR1785246 5 0.0713 0.3662 0.000 0.000 0.028 0.000 0.972 0.000
#> SRR1785247 5 0.0000 0.3540 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785248 3 0.3394 0.4157 0.000 0.200 0.776 0.024 0.000 0.000
#> SRR1785250 5 0.7328 0.3881 0.304 0.000 0.212 0.080 0.392 0.012
#> SRR1785251 5 0.7349 0.3817 0.292 0.000 0.224 0.080 0.392 0.012
#> SRR1785252 3 0.2701 0.4315 0.028 0.000 0.864 0.004 0.104 0.000
#> SRR1785253 3 0.2558 0.4281 0.028 0.000 0.868 0.000 0.104 0.000
#> SRR1785254 4 0.4682 0.4978 0.112 0.000 0.192 0.692 0.004 0.000
#> SRR1785255 4 0.4682 0.4980 0.112 0.000 0.192 0.692 0.004 0.000
#> SRR1785256 4 0.5150 0.2000 0.324 0.000 0.000 0.580 0.092 0.004
#> SRR1785257 4 0.5079 0.2468 0.304 0.000 0.000 0.600 0.092 0.004
#> SRR1785258 1 0.5093 0.0537 0.476 0.000 0.040 0.468 0.012 0.004
#> SRR1785259 1 0.5856 0.3924 0.624 0.000 0.080 0.212 0.080 0.004
#> SRR1785262 5 0.7321 0.3560 0.304 0.000 0.136 0.156 0.400 0.004
#> SRR1785263 5 0.7323 0.3602 0.304 0.000 0.140 0.152 0.400 0.004
#> SRR1785260 4 0.2572 0.5435 0.136 0.000 0.012 0.852 0.000 0.000
#> SRR1785261 4 0.3370 0.5518 0.148 0.000 0.048 0.804 0.000 0.000
#> SRR1785264 3 0.5506 0.4237 0.000 0.236 0.632 0.080 0.052 0.000
#> SRR1785265 3 0.4594 0.2361 0.000 0.404 0.560 0.032 0.004 0.000
#> SRR1785266 2 0.0260 0.9927 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR1785267 2 0.0260 0.9927 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR1785268 5 0.3765 -0.0387 0.404 0.000 0.000 0.000 0.596 0.000
#> SRR1785269 5 0.3765 -0.0387 0.404 0.000 0.000 0.000 0.596 0.000
#> SRR1785270 6 0.0508 1.0000 0.000 0.000 0.012 0.000 0.004 0.984
#> SRR1785271 6 0.0508 1.0000 0.000 0.000 0.012 0.000 0.004 0.984
#> SRR1785272 1 0.3579 0.5638 0.816 0.000 0.120 0.048 0.004 0.012
#> SRR1785273 1 0.3926 0.5394 0.792 0.000 0.140 0.044 0.012 0.012
#> SRR1785276 5 0.1141 0.3369 0.000 0.000 0.052 0.000 0.948 0.000
#> SRR1785277 5 0.0713 0.3486 0.000 0.000 0.028 0.000 0.972 0.000
#> SRR1785274 5 0.7373 0.3778 0.244 0.000 0.188 0.164 0.404 0.000
#> SRR1785275 5 0.7323 0.3435 0.268 0.000 0.164 0.164 0.404 0.000
#> SRR1785280 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.2135 0.6207 0.872 0.000 0.000 0.128 0.000 0.000
#> SRR1785279 1 0.2048 0.6165 0.880 0.000 0.000 0.120 0.000 0.000
#> SRR1785282 1 0.3287 0.5950 0.768 0.000 0.012 0.220 0.000 0.000
#> SRR1785283 1 0.2969 0.5916 0.776 0.000 0.000 0.224 0.000 0.000
#> SRR1785284 3 0.7010 0.2675 0.140 0.000 0.376 0.372 0.112 0.000
#> SRR1785285 4 0.6732 -0.1944 0.148 0.000 0.336 0.440 0.076 0.000
#> SRR1785286 4 0.5711 0.3563 0.132 0.000 0.328 0.528 0.012 0.000
#> SRR1785287 4 0.4722 0.5117 0.116 0.000 0.192 0.688 0.004 0.000
#> SRR1785288 1 0.3531 0.5185 0.672 0.000 0.000 0.328 0.000 0.000
#> SRR1785289 1 0.3684 0.4674 0.628 0.000 0.000 0.372 0.000 0.000
#> SRR1785290 3 0.4004 0.2934 0.012 0.000 0.620 0.368 0.000 0.000
#> SRR1785291 3 0.4150 0.2640 0.016 0.000 0.592 0.392 0.000 0.000
#> SRR1785296 3 0.5422 0.4105 0.012 0.000 0.564 0.324 0.100 0.000
#> SRR1785297 3 0.5422 0.4105 0.012 0.000 0.564 0.324 0.100 0.000
#> SRR1785292 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785294 4 0.5273 0.4123 0.136 0.000 0.284 0.580 0.000 0.000
#> SRR1785295 4 0.5346 0.3274 0.128 0.000 0.324 0.548 0.000 0.000
#> SRR1785298 3 0.5790 0.2124 0.092 0.000 0.520 0.356 0.032 0.000
#> SRR1785299 3 0.5798 0.2153 0.092 0.000 0.516 0.360 0.032 0.000
#> SRR1785300 4 0.3915 0.0866 0.412 0.000 0.000 0.584 0.000 0.004
#> SRR1785301 4 0.3714 0.2926 0.340 0.000 0.000 0.656 0.000 0.004
#> SRR1785304 4 0.4900 0.3518 0.068 0.012 0.280 0.640 0.000 0.000
#> SRR1785305 4 0.4625 0.0911 0.036 0.004 0.388 0.572 0.000 0.000
#> SRR1785306 5 0.6575 0.1064 0.028 0.000 0.364 0.004 0.404 0.200
#> SRR1785307 5 0.6922 0.1627 0.028 0.000 0.304 0.016 0.404 0.248
#> SRR1785302 3 0.4685 0.2254 0.044 0.000 0.520 0.436 0.000 0.000
#> SRR1785303 3 0.4844 0.1762 0.056 0.000 0.504 0.440 0.000 0.000
#> SRR1785308 1 0.5710 0.4836 0.572 0.000 0.232 0.184 0.000 0.012
#> SRR1785309 1 0.5684 0.4838 0.576 0.000 0.232 0.180 0.000 0.012
#> SRR1785310 4 0.5353 0.2554 0.120 0.000 0.352 0.528 0.000 0.000
#> SRR1785311 4 0.5223 0.4289 0.136 0.000 0.272 0.592 0.000 0.000
#> SRR1785312 5 0.3765 -0.0387 0.404 0.000 0.000 0.000 0.596 0.000
#> SRR1785313 5 0.3765 -0.0387 0.404 0.000 0.000 0.000 0.596 0.000
#> SRR1785314 6 0.0508 1.0000 0.000 0.000 0.012 0.000 0.004 0.984
#> SRR1785315 6 0.0508 1.0000 0.000 0.000 0.012 0.000 0.004 0.984
#> SRR1785318 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 1 0.3746 0.5375 0.712 0.000 0.000 0.272 0.004 0.012
#> SRR1785317 1 0.3420 0.5714 0.748 0.000 0.000 0.240 0.000 0.012
#> SRR1785324 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.9982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785320 1 0.4756 0.3554 0.564 0.000 0.000 0.056 0.380 0.000
#> SRR1785321 1 0.4184 0.1578 0.504 0.000 0.000 0.012 0.484 0.000
#> SRR1785322 1 0.4914 0.1067 0.516 0.000 0.052 0.428 0.000 0.004
#> SRR1785323 4 0.4386 -0.0122 0.464 0.000 0.016 0.516 0.000 0.004
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.824 0.937 0.950 0.2777 0.743 0.743
#> 3 3 0.265 0.666 0.754 1.0618 0.647 0.529
#> 4 4 0.346 0.636 0.759 0.2075 0.858 0.656
#> 5 5 0.482 0.584 0.726 0.0908 0.948 0.816
#> 6 6 0.516 0.617 0.706 0.0629 0.918 0.669
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 1 0.4431 0.926 0.908 0.092
#> SRR1785239 1 0.4431 0.926 0.908 0.092
#> SRR1785240 1 0.2043 0.960 0.968 0.032
#> SRR1785241 1 0.2043 0.960 0.968 0.032
#> SRR1785242 1 0.1414 0.960 0.980 0.020
#> SRR1785243 1 0.1414 0.960 0.980 0.020
#> SRR1785244 1 0.1184 0.956 0.984 0.016
#> SRR1785245 1 0.1184 0.956 0.984 0.016
#> SRR1785246 1 0.5737 0.869 0.864 0.136
#> SRR1785247 1 0.5737 0.869 0.864 0.136
#> SRR1785248 2 0.2236 0.934 0.036 0.964
#> SRR1785250 1 0.2603 0.957 0.956 0.044
#> SRR1785251 1 0.2603 0.957 0.956 0.044
#> SRR1785252 1 0.2043 0.959 0.968 0.032
#> SRR1785253 1 0.2043 0.959 0.968 0.032
#> SRR1785254 1 0.2948 0.952 0.948 0.052
#> SRR1785255 1 0.2603 0.956 0.956 0.044
#> SRR1785256 1 0.1414 0.957 0.980 0.020
#> SRR1785257 1 0.1414 0.957 0.980 0.020
#> SRR1785258 1 0.1414 0.960 0.980 0.020
#> SRR1785259 1 0.1414 0.960 0.980 0.020
#> SRR1785262 1 0.1414 0.960 0.980 0.020
#> SRR1785263 1 0.1843 0.961 0.972 0.028
#> SRR1785260 1 0.1184 0.956 0.984 0.016
#> SRR1785261 1 0.1184 0.956 0.984 0.016
#> SRR1785264 2 0.9580 0.399 0.380 0.620
#> SRR1785265 2 0.8386 0.648 0.268 0.732
#> SRR1785266 2 0.1414 0.941 0.020 0.980
#> SRR1785267 2 0.1414 0.941 0.020 0.980
#> SRR1785268 1 0.2603 0.957 0.956 0.044
#> SRR1785269 1 0.2603 0.957 0.956 0.044
#> SRR1785270 1 0.2043 0.959 0.968 0.032
#> SRR1785271 1 0.2043 0.959 0.968 0.032
#> SRR1785272 1 0.2423 0.951 0.960 0.040
#> SRR1785273 1 0.2603 0.951 0.956 0.044
#> SRR1785276 1 0.5737 0.869 0.864 0.136
#> SRR1785277 1 0.5737 0.869 0.864 0.136
#> SRR1785274 1 0.2043 0.960 0.968 0.032
#> SRR1785275 1 0.1843 0.961 0.972 0.028
#> SRR1785280 2 0.1414 0.941 0.020 0.980
#> SRR1785281 2 0.1414 0.941 0.020 0.980
#> SRR1785278 1 0.0938 0.960 0.988 0.012
#> SRR1785279 1 0.1184 0.960 0.984 0.016
#> SRR1785282 1 0.2236 0.956 0.964 0.036
#> SRR1785283 1 0.2423 0.955 0.960 0.040
#> SRR1785284 1 0.1414 0.960 0.980 0.020
#> SRR1785285 1 0.1414 0.960 0.980 0.020
#> SRR1785286 1 0.1184 0.956 0.984 0.016
#> SRR1785287 1 0.1184 0.956 0.984 0.016
#> SRR1785288 1 0.1184 0.956 0.984 0.016
#> SRR1785289 1 0.1184 0.956 0.984 0.016
#> SRR1785290 1 0.3114 0.951 0.944 0.056
#> SRR1785291 1 0.3274 0.949 0.940 0.060
#> SRR1785296 1 0.1184 0.961 0.984 0.016
#> SRR1785297 1 0.1184 0.961 0.984 0.016
#> SRR1785292 2 0.1633 0.941 0.024 0.976
#> SRR1785293 2 0.1633 0.941 0.024 0.976
#> SRR1785294 1 0.1184 0.956 0.984 0.016
#> SRR1785295 1 0.1184 0.956 0.984 0.016
#> SRR1785298 1 0.1414 0.958 0.980 0.020
#> SRR1785299 1 0.1633 0.958 0.976 0.024
#> SRR1785300 1 0.1184 0.956 0.984 0.016
#> SRR1785301 1 0.1184 0.956 0.984 0.016
#> SRR1785304 1 0.3274 0.949 0.940 0.060
#> SRR1785305 1 0.3274 0.949 0.940 0.060
#> SRR1785306 1 0.2236 0.957 0.964 0.036
#> SRR1785307 1 0.2236 0.957 0.964 0.036
#> SRR1785302 1 0.2043 0.959 0.968 0.032
#> SRR1785303 1 0.2043 0.959 0.968 0.032
#> SRR1785308 1 0.2236 0.956 0.964 0.036
#> SRR1785309 1 0.2423 0.955 0.960 0.040
#> SRR1785310 1 0.1184 0.956 0.984 0.016
#> SRR1785311 1 0.1184 0.956 0.984 0.016
#> SRR1785312 1 0.5629 0.871 0.868 0.132
#> SRR1785313 1 0.5629 0.871 0.868 0.132
#> SRR1785314 1 0.2236 0.957 0.964 0.036
#> SRR1785315 1 0.2236 0.957 0.964 0.036
#> SRR1785318 2 0.1633 0.941 0.024 0.976
#> SRR1785319 2 0.1633 0.941 0.024 0.976
#> SRR1785316 1 0.2778 0.951 0.952 0.048
#> SRR1785317 1 0.2778 0.951 0.952 0.048
#> SRR1785324 2 0.1414 0.941 0.020 0.980
#> SRR1785325 2 0.1414 0.941 0.020 0.980
#> SRR1785320 1 0.5178 0.888 0.884 0.116
#> SRR1785321 1 0.5178 0.888 0.884 0.116
#> SRR1785322 1 0.2603 0.957 0.956 0.044
#> SRR1785323 1 0.2603 0.957 0.956 0.044
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 1 0.9145 0.659 0.532 0.184 0.284
#> SRR1785239 1 0.9137 0.664 0.536 0.188 0.276
#> SRR1785240 3 0.3267 0.835 0.116 0.000 0.884
#> SRR1785241 3 0.3267 0.835 0.116 0.000 0.884
#> SRR1785242 1 0.8513 0.675 0.568 0.116 0.316
#> SRR1785243 1 0.8548 0.675 0.568 0.120 0.312
#> SRR1785244 1 0.5404 0.391 0.740 0.004 0.256
#> SRR1785245 1 0.5244 0.440 0.756 0.004 0.240
#> SRR1785246 3 0.3896 0.794 0.060 0.052 0.888
#> SRR1785247 3 0.3896 0.794 0.060 0.052 0.888
#> SRR1785248 2 0.3406 0.757 0.028 0.904 0.068
#> SRR1785250 1 0.7851 0.706 0.644 0.100 0.256
#> SRR1785251 1 0.7851 0.706 0.644 0.100 0.256
#> SRR1785252 1 0.8872 0.658 0.536 0.140 0.324
#> SRR1785253 1 0.8872 0.658 0.536 0.140 0.324
#> SRR1785254 1 0.8454 0.496 0.480 0.088 0.432
#> SRR1785255 1 0.8334 0.489 0.480 0.080 0.440
#> SRR1785256 1 0.2496 0.702 0.928 0.004 0.068
#> SRR1785257 1 0.2590 0.704 0.924 0.004 0.072
#> SRR1785258 1 0.6738 0.613 0.624 0.020 0.356
#> SRR1785259 1 0.6879 0.619 0.616 0.024 0.360
#> SRR1785262 1 0.7015 0.599 0.584 0.024 0.392
#> SRR1785263 1 0.7130 0.516 0.544 0.024 0.432
#> SRR1785260 1 0.2681 0.693 0.932 0.040 0.028
#> SRR1785261 1 0.2681 0.693 0.932 0.040 0.028
#> SRR1785264 2 0.9325 0.110 0.252 0.520 0.228
#> SRR1785265 2 0.9084 0.200 0.232 0.552 0.216
#> SRR1785266 2 0.0592 0.773 0.000 0.988 0.012
#> SRR1785267 2 0.0592 0.773 0.000 0.988 0.012
#> SRR1785268 3 0.6975 0.385 0.356 0.028 0.616
#> SRR1785269 3 0.6934 0.414 0.348 0.028 0.624
#> SRR1785270 3 0.3649 0.827 0.068 0.036 0.896
#> SRR1785271 3 0.3669 0.825 0.064 0.040 0.896
#> SRR1785272 1 0.7485 0.712 0.680 0.096 0.224
#> SRR1785273 1 0.7525 0.710 0.676 0.096 0.228
#> SRR1785276 3 0.4094 0.783 0.028 0.100 0.872
#> SRR1785277 3 0.4094 0.783 0.028 0.100 0.872
#> SRR1785274 3 0.3116 0.835 0.108 0.000 0.892
#> SRR1785275 3 0.3116 0.836 0.108 0.000 0.892
#> SRR1785280 2 0.0747 0.771 0.000 0.984 0.016
#> SRR1785281 2 0.0747 0.771 0.000 0.984 0.016
#> SRR1785278 1 0.4452 0.711 0.808 0.000 0.192
#> SRR1785279 1 0.4291 0.706 0.820 0.000 0.180
#> SRR1785282 1 0.2173 0.692 0.944 0.008 0.048
#> SRR1785283 1 0.2599 0.695 0.932 0.016 0.052
#> SRR1785284 3 0.3482 0.834 0.128 0.000 0.872
#> SRR1785285 3 0.3551 0.833 0.132 0.000 0.868
#> SRR1785286 3 0.4682 0.801 0.192 0.004 0.804
#> SRR1785287 3 0.4682 0.801 0.192 0.004 0.804
#> SRR1785288 1 0.1647 0.674 0.960 0.004 0.036
#> SRR1785289 1 0.1525 0.676 0.964 0.004 0.032
#> SRR1785290 2 0.9873 -0.288 0.348 0.392 0.260
#> SRR1785291 2 0.9873 -0.288 0.348 0.392 0.260
#> SRR1785296 1 0.8378 0.696 0.596 0.120 0.284
#> SRR1785297 1 0.8263 0.705 0.612 0.120 0.268
#> SRR1785292 2 0.1267 0.787 0.024 0.972 0.004
#> SRR1785293 2 0.1267 0.787 0.024 0.972 0.004
#> SRR1785294 1 0.7412 0.735 0.696 0.112 0.192
#> SRR1785295 1 0.7478 0.735 0.692 0.116 0.192
#> SRR1785298 1 0.7065 0.721 0.664 0.048 0.288
#> SRR1785299 1 0.7095 0.720 0.660 0.048 0.292
#> SRR1785300 1 0.1129 0.677 0.976 0.004 0.020
#> SRR1785301 1 0.1129 0.677 0.976 0.004 0.020
#> SRR1785304 1 0.9934 0.352 0.376 0.344 0.280
#> SRR1785305 1 0.9934 0.352 0.376 0.344 0.280
#> SRR1785306 3 0.4217 0.813 0.100 0.032 0.868
#> SRR1785307 3 0.4217 0.813 0.100 0.032 0.868
#> SRR1785302 1 0.7741 0.677 0.608 0.068 0.324
#> SRR1785303 1 0.7741 0.677 0.608 0.068 0.324
#> SRR1785308 1 0.6882 0.723 0.732 0.096 0.172
#> SRR1785309 1 0.6935 0.721 0.728 0.096 0.176
#> SRR1785310 1 0.6059 0.740 0.764 0.048 0.188
#> SRR1785311 1 0.5526 0.739 0.792 0.036 0.172
#> SRR1785312 3 0.5573 0.745 0.160 0.044 0.796
#> SRR1785313 3 0.5514 0.747 0.156 0.044 0.800
#> SRR1785314 3 0.3434 0.826 0.064 0.032 0.904
#> SRR1785315 3 0.3434 0.826 0.064 0.032 0.904
#> SRR1785318 2 0.1399 0.786 0.028 0.968 0.004
#> SRR1785319 2 0.1399 0.786 0.028 0.968 0.004
#> SRR1785316 1 0.3207 0.668 0.904 0.012 0.084
#> SRR1785317 1 0.3207 0.668 0.904 0.012 0.084
#> SRR1785324 2 0.1877 0.784 0.032 0.956 0.012
#> SRR1785325 2 0.1751 0.785 0.028 0.960 0.012
#> SRR1785320 3 0.6414 0.634 0.248 0.036 0.716
#> SRR1785321 3 0.6295 0.657 0.236 0.036 0.728
#> SRR1785322 1 0.7003 0.716 0.692 0.060 0.248
#> SRR1785323 1 0.6875 0.716 0.700 0.056 0.244
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.7397 0.6123 0.152 0.016 0.568 0.264
#> SRR1785239 3 0.7278 0.6411 0.152 0.016 0.588 0.244
#> SRR1785240 1 0.1978 0.7626 0.928 0.000 0.004 0.068
#> SRR1785241 1 0.1978 0.7626 0.928 0.000 0.004 0.068
#> SRR1785242 3 0.6626 0.7066 0.260 0.004 0.620 0.116
#> SRR1785243 3 0.6601 0.7069 0.256 0.004 0.624 0.116
#> SRR1785244 4 0.6534 0.0235 0.424 0.004 0.064 0.508
#> SRR1785245 4 0.6534 0.0235 0.424 0.004 0.064 0.508
#> SRR1785246 1 0.3719 0.7180 0.848 0.008 0.124 0.020
#> SRR1785247 1 0.3719 0.7180 0.848 0.008 0.124 0.020
#> SRR1785248 2 0.5251 0.6472 0.020 0.768 0.160 0.052
#> SRR1785250 3 0.6242 0.6936 0.140 0.004 0.680 0.176
#> SRR1785251 3 0.6242 0.6936 0.140 0.004 0.680 0.176
#> SRR1785252 3 0.6066 0.6966 0.268 0.004 0.656 0.072
#> SRR1785253 3 0.6066 0.6966 0.268 0.004 0.656 0.072
#> SRR1785254 4 0.5832 0.6418 0.132 0.032 0.088 0.748
#> SRR1785255 4 0.5832 0.6418 0.132 0.032 0.088 0.748
#> SRR1785256 4 0.3300 0.6903 0.144 0.000 0.008 0.848
#> SRR1785257 4 0.3300 0.6928 0.144 0.000 0.008 0.848
#> SRR1785258 4 0.6022 0.5309 0.336 0.004 0.048 0.612
#> SRR1785259 4 0.6004 0.5406 0.332 0.004 0.048 0.616
#> SRR1785262 4 0.5152 0.6111 0.316 0.000 0.020 0.664
#> SRR1785263 4 0.5233 0.5933 0.332 0.000 0.020 0.648
#> SRR1785260 4 0.2485 0.6808 0.016 0.004 0.064 0.916
#> SRR1785261 4 0.2485 0.6808 0.016 0.004 0.064 0.916
#> SRR1785264 2 0.7527 0.5121 0.108 0.624 0.196 0.072
#> SRR1785265 2 0.7140 0.5502 0.080 0.652 0.196 0.072
#> SRR1785266 2 0.0469 0.7658 0.000 0.988 0.012 0.000
#> SRR1785267 2 0.0469 0.7658 0.000 0.988 0.012 0.000
#> SRR1785268 1 0.7024 0.4509 0.580 0.004 0.148 0.268
#> SRR1785269 1 0.7001 0.4594 0.584 0.004 0.148 0.264
#> SRR1785270 1 0.2409 0.7477 0.924 0.004 0.040 0.032
#> SRR1785271 1 0.2409 0.7477 0.924 0.004 0.040 0.032
#> SRR1785272 3 0.4789 0.7007 0.020 0.004 0.740 0.236
#> SRR1785273 3 0.4756 0.7006 0.020 0.004 0.744 0.232
#> SRR1785276 1 0.3489 0.7151 0.856 0.012 0.124 0.008
#> SRR1785277 1 0.3489 0.7151 0.856 0.012 0.124 0.008
#> SRR1785274 1 0.1902 0.7621 0.932 0.000 0.004 0.064
#> SRR1785275 1 0.1902 0.7621 0.932 0.000 0.004 0.064
#> SRR1785280 2 0.0469 0.7658 0.000 0.988 0.012 0.000
#> SRR1785281 2 0.0469 0.7658 0.000 0.988 0.012 0.000
#> SRR1785278 4 0.5072 0.6383 0.208 0.000 0.052 0.740
#> SRR1785279 4 0.5072 0.6377 0.208 0.000 0.052 0.740
#> SRR1785282 4 0.3424 0.6772 0.068 0.004 0.052 0.876
#> SRR1785283 4 0.3424 0.6772 0.068 0.004 0.052 0.876
#> SRR1785284 1 0.2125 0.7607 0.920 0.000 0.004 0.076
#> SRR1785285 1 0.2197 0.7593 0.916 0.000 0.004 0.080
#> SRR1785286 1 0.3612 0.7274 0.840 0.012 0.004 0.144
#> SRR1785287 1 0.3632 0.7236 0.832 0.008 0.004 0.156
#> SRR1785288 4 0.5218 0.6071 0.200 0.000 0.064 0.736
#> SRR1785289 4 0.5256 0.6091 0.204 0.000 0.064 0.732
#> SRR1785290 2 0.8421 0.3293 0.112 0.488 0.084 0.316
#> SRR1785291 2 0.8421 0.3293 0.112 0.488 0.084 0.316
#> SRR1785296 4 0.6064 0.6439 0.172 0.012 0.108 0.708
#> SRR1785297 4 0.6009 0.6447 0.172 0.012 0.104 0.712
#> SRR1785292 2 0.0188 0.7687 0.004 0.996 0.000 0.000
#> SRR1785293 2 0.0376 0.7697 0.004 0.992 0.000 0.004
#> SRR1785294 4 0.4188 0.6888 0.108 0.012 0.044 0.836
#> SRR1785295 4 0.4124 0.6908 0.096 0.016 0.044 0.844
#> SRR1785298 4 0.4657 0.6781 0.124 0.012 0.056 0.808
#> SRR1785299 4 0.5048 0.6685 0.128 0.016 0.068 0.788
#> SRR1785300 4 0.2413 0.6788 0.020 0.000 0.064 0.916
#> SRR1785301 4 0.2816 0.6830 0.036 0.000 0.064 0.900
#> SRR1785304 2 0.8395 0.3426 0.112 0.496 0.084 0.308
#> SRR1785305 2 0.8395 0.3426 0.112 0.496 0.084 0.308
#> SRR1785306 1 0.6101 0.3723 0.644 0.004 0.068 0.284
#> SRR1785307 1 0.6124 0.3624 0.640 0.004 0.068 0.288
#> SRR1785302 4 0.7133 0.5919 0.220 0.020 0.144 0.616
#> SRR1785303 4 0.7133 0.5919 0.220 0.020 0.144 0.616
#> SRR1785308 3 0.4699 0.6909 0.000 0.004 0.676 0.320
#> SRR1785309 3 0.4655 0.6930 0.000 0.004 0.684 0.312
#> SRR1785310 4 0.3748 0.6921 0.088 0.008 0.044 0.860
#> SRR1785311 4 0.3726 0.6970 0.092 0.008 0.040 0.860
#> SRR1785312 1 0.6296 0.6298 0.676 0.004 0.152 0.168
#> SRR1785313 1 0.6172 0.6408 0.688 0.004 0.152 0.156
#> SRR1785314 1 0.2164 0.7304 0.924 0.004 0.068 0.004
#> SRR1785315 1 0.2164 0.7304 0.924 0.004 0.068 0.004
#> SRR1785318 2 0.0336 0.7700 0.000 0.992 0.000 0.008
#> SRR1785319 2 0.0336 0.7700 0.000 0.992 0.000 0.008
#> SRR1785316 4 0.4837 0.6392 0.076 0.008 0.120 0.796
#> SRR1785317 4 0.4891 0.6373 0.076 0.008 0.124 0.792
#> SRR1785324 2 0.0524 0.7699 0.000 0.988 0.004 0.008
#> SRR1785325 2 0.0524 0.7699 0.000 0.988 0.004 0.008
#> SRR1785320 1 0.7055 0.4999 0.580 0.004 0.156 0.260
#> SRR1785321 1 0.6932 0.5260 0.600 0.004 0.156 0.240
#> SRR1785322 4 0.5949 0.6001 0.144 0.004 0.144 0.708
#> SRR1785323 4 0.5948 0.5983 0.140 0.004 0.148 0.708
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.7631 0.40695 0.036 0.084 0.556 0.212 0.112
#> SRR1785239 3 0.7659 0.42219 0.040 0.092 0.560 0.204 0.104
#> SRR1785240 5 0.4444 0.76148 0.104 0.000 0.088 0.020 0.788
#> SRR1785241 5 0.4389 0.76321 0.104 0.000 0.084 0.020 0.792
#> SRR1785242 3 0.5736 0.60132 0.028 0.064 0.732 0.060 0.116
#> SRR1785243 3 0.5815 0.60076 0.032 0.064 0.728 0.060 0.116
#> SRR1785244 4 0.3443 0.58493 0.076 0.000 0.012 0.852 0.060
#> SRR1785245 4 0.3266 0.58725 0.076 0.000 0.008 0.860 0.056
#> SRR1785246 5 0.6162 0.46867 0.360 0.000 0.112 0.008 0.520
#> SRR1785247 5 0.6123 0.47577 0.360 0.000 0.108 0.008 0.524
#> SRR1785248 2 0.4715 0.73747 0.016 0.764 0.164 0.044 0.012
#> SRR1785250 3 0.4963 0.51332 0.040 0.004 0.756 0.052 0.148
#> SRR1785251 3 0.4963 0.51332 0.040 0.004 0.756 0.052 0.148
#> SRR1785252 3 0.6137 0.58336 0.016 0.064 0.644 0.036 0.240
#> SRR1785253 3 0.6137 0.58336 0.016 0.064 0.644 0.036 0.240
#> SRR1785254 4 0.7674 0.32239 0.016 0.076 0.124 0.480 0.304
#> SRR1785255 4 0.7628 0.32434 0.016 0.076 0.116 0.480 0.312
#> SRR1785256 4 0.4826 0.59669 0.076 0.000 0.104 0.772 0.048
#> SRR1785257 4 0.4776 0.59789 0.076 0.000 0.100 0.776 0.048
#> SRR1785258 3 0.8128 0.10465 0.108 0.036 0.448 0.312 0.096
#> SRR1785259 3 0.8279 0.08807 0.108 0.036 0.428 0.316 0.112
#> SRR1785262 4 0.8548 0.00365 0.060 0.040 0.292 0.344 0.264
#> SRR1785263 4 0.8594 -0.01537 0.064 0.040 0.296 0.336 0.264
#> SRR1785260 4 0.1012 0.60231 0.020 0.000 0.012 0.968 0.000
#> SRR1785261 4 0.1012 0.60231 0.020 0.000 0.012 0.968 0.000
#> SRR1785264 2 0.6091 0.66905 0.016 0.676 0.188 0.048 0.072
#> SRR1785265 2 0.5976 0.67873 0.016 0.684 0.188 0.048 0.064
#> SRR1785266 2 0.1329 0.81108 0.004 0.956 0.032 0.000 0.008
#> SRR1785267 2 0.1329 0.81108 0.004 0.956 0.032 0.000 0.008
#> SRR1785268 1 0.6168 0.76506 0.640 0.000 0.124 0.040 0.196
#> SRR1785269 1 0.6168 0.76506 0.640 0.000 0.124 0.040 0.196
#> SRR1785270 5 0.0854 0.75950 0.004 0.000 0.012 0.008 0.976
#> SRR1785271 5 0.0854 0.75950 0.004 0.000 0.012 0.008 0.976
#> SRR1785272 3 0.4322 0.54725 0.076 0.000 0.788 0.124 0.012
#> SRR1785273 3 0.4275 0.54594 0.076 0.000 0.792 0.120 0.012
#> SRR1785276 5 0.4347 0.60613 0.356 0.004 0.004 0.000 0.636
#> SRR1785277 5 0.4347 0.60613 0.356 0.004 0.004 0.000 0.636
#> SRR1785274 5 0.4439 0.75879 0.108 0.000 0.084 0.020 0.788
#> SRR1785275 5 0.4494 0.75839 0.108 0.000 0.088 0.020 0.784
#> SRR1785280 2 0.0932 0.81377 0.004 0.972 0.020 0.000 0.004
#> SRR1785281 2 0.0932 0.81377 0.004 0.972 0.020 0.000 0.004
#> SRR1785278 4 0.6290 0.46547 0.096 0.000 0.252 0.608 0.044
#> SRR1785279 4 0.6290 0.46547 0.096 0.000 0.252 0.608 0.044
#> SRR1785282 4 0.4924 0.54827 0.112 0.000 0.136 0.740 0.012
#> SRR1785283 4 0.4965 0.54808 0.112 0.000 0.140 0.736 0.012
#> SRR1785284 5 0.3730 0.76535 0.032 0.000 0.100 0.032 0.836
#> SRR1785285 5 0.3853 0.76465 0.032 0.000 0.092 0.044 0.832
#> SRR1785286 5 0.4121 0.70158 0.024 0.000 0.024 0.164 0.788
#> SRR1785287 5 0.4071 0.70021 0.024 0.000 0.020 0.168 0.788
#> SRR1785288 4 0.2633 0.59498 0.068 0.000 0.012 0.896 0.024
#> SRR1785289 4 0.2521 0.59587 0.068 0.000 0.008 0.900 0.024
#> SRR1785290 2 0.7292 0.56034 0.028 0.584 0.144 0.184 0.060
#> SRR1785291 2 0.7295 0.55240 0.028 0.580 0.132 0.200 0.060
#> SRR1785296 4 0.8351 0.14009 0.036 0.064 0.336 0.376 0.188
#> SRR1785297 4 0.8344 0.15402 0.036 0.064 0.328 0.384 0.188
#> SRR1785292 2 0.0290 0.81628 0.000 0.992 0.000 0.008 0.000
#> SRR1785293 2 0.0290 0.81628 0.000 0.992 0.000 0.008 0.000
#> SRR1785294 4 0.4127 0.58689 0.024 0.012 0.072 0.828 0.064
#> SRR1785295 4 0.4127 0.58689 0.024 0.012 0.072 0.828 0.064
#> SRR1785298 4 0.7668 0.34992 0.036 0.052 0.156 0.532 0.224
#> SRR1785299 4 0.7684 0.34537 0.036 0.052 0.164 0.532 0.216
#> SRR1785300 4 0.0566 0.60588 0.012 0.000 0.000 0.984 0.004
#> SRR1785301 4 0.0566 0.60588 0.012 0.000 0.000 0.984 0.004
#> SRR1785304 2 0.7194 0.54943 0.024 0.584 0.108 0.216 0.068
#> SRR1785305 2 0.7157 0.54567 0.024 0.584 0.100 0.224 0.068
#> SRR1785306 5 0.3379 0.67096 0.016 0.000 0.008 0.148 0.828
#> SRR1785307 5 0.3564 0.66613 0.024 0.000 0.008 0.148 0.820
#> SRR1785302 4 0.7775 0.23813 0.024 0.044 0.156 0.396 0.380
#> SRR1785303 4 0.7729 0.24078 0.024 0.044 0.148 0.396 0.388
#> SRR1785308 3 0.4114 0.55445 0.044 0.000 0.776 0.176 0.004
#> SRR1785309 3 0.4114 0.55445 0.044 0.000 0.776 0.176 0.004
#> SRR1785310 4 0.3737 0.59456 0.020 0.008 0.060 0.848 0.064
#> SRR1785311 4 0.3737 0.59456 0.020 0.008 0.060 0.848 0.064
#> SRR1785312 1 0.4541 0.86284 0.788 0.000 0.084 0.032 0.096
#> SRR1785313 1 0.4541 0.86284 0.788 0.000 0.084 0.032 0.096
#> SRR1785314 5 0.0566 0.75487 0.004 0.000 0.012 0.000 0.984
#> SRR1785315 5 0.0566 0.75487 0.004 0.000 0.012 0.000 0.984
#> SRR1785318 2 0.0324 0.81617 0.000 0.992 0.004 0.004 0.000
#> SRR1785319 2 0.0324 0.81617 0.000 0.992 0.004 0.004 0.000
#> SRR1785316 4 0.5433 0.51555 0.160 0.000 0.148 0.684 0.008
#> SRR1785317 4 0.5470 0.51234 0.160 0.000 0.152 0.680 0.008
#> SRR1785324 2 0.0671 0.81362 0.016 0.980 0.000 0.000 0.004
#> SRR1785325 2 0.0833 0.81419 0.016 0.976 0.004 0.000 0.004
#> SRR1785320 1 0.4271 0.86866 0.808 0.000 0.096 0.040 0.056
#> SRR1785321 1 0.4271 0.86866 0.808 0.000 0.096 0.040 0.056
#> SRR1785322 4 0.6614 0.39640 0.040 0.000 0.236 0.580 0.144
#> SRR1785323 4 0.6626 0.39396 0.040 0.000 0.232 0.580 0.148
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.6864 0.3934 0.140 0.012 0.532 0.248 0.052 0.016
#> SRR1785239 3 0.6811 0.3996 0.140 0.012 0.536 0.248 0.048 0.016
#> SRR1785240 5 0.5378 0.6552 0.032 0.000 0.088 0.012 0.672 0.196
#> SRR1785241 5 0.5432 0.6494 0.032 0.000 0.088 0.012 0.664 0.204
#> SRR1785242 3 0.5283 0.6089 0.036 0.016 0.720 0.140 0.076 0.012
#> SRR1785243 3 0.5253 0.6081 0.040 0.016 0.720 0.140 0.076 0.008
#> SRR1785244 1 0.4159 0.6712 0.800 0.000 0.036 0.016 0.056 0.092
#> SRR1785245 1 0.4015 0.6683 0.808 0.000 0.028 0.016 0.056 0.092
#> SRR1785246 6 0.7014 -0.0508 0.004 0.000 0.148 0.092 0.344 0.412
#> SRR1785247 6 0.6975 -0.0701 0.004 0.000 0.140 0.092 0.352 0.412
#> SRR1785248 2 0.5795 0.5869 0.008 0.564 0.096 0.312 0.004 0.016
#> SRR1785250 3 0.3875 0.6257 0.028 0.008 0.816 0.020 0.112 0.016
#> SRR1785251 3 0.3875 0.6257 0.028 0.008 0.816 0.020 0.112 0.016
#> SRR1785252 3 0.5548 0.6068 0.020 0.012 0.664 0.104 0.192 0.008
#> SRR1785253 3 0.5463 0.6097 0.020 0.012 0.672 0.096 0.192 0.008
#> SRR1785254 4 0.6955 0.7258 0.216 0.024 0.080 0.528 0.152 0.000
#> SRR1785255 4 0.7082 0.7120 0.204 0.028 0.084 0.520 0.164 0.000
#> SRR1785256 1 0.4497 0.7120 0.768 0.000 0.116 0.048 0.008 0.060
#> SRR1785257 1 0.4507 0.7140 0.776 0.004 0.104 0.048 0.008 0.060
#> SRR1785258 3 0.6464 0.5275 0.108 0.000 0.612 0.088 0.032 0.160
#> SRR1785259 3 0.6550 0.5174 0.096 0.000 0.600 0.088 0.036 0.180
#> SRR1785262 3 0.7631 0.4694 0.120 0.000 0.504 0.092 0.112 0.172
#> SRR1785263 3 0.7734 0.4553 0.116 0.000 0.488 0.088 0.128 0.180
#> SRR1785260 1 0.0405 0.7027 0.988 0.000 0.004 0.008 0.000 0.000
#> SRR1785261 1 0.0260 0.7021 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1785264 2 0.6495 0.5137 0.016 0.488 0.104 0.356 0.020 0.016
#> SRR1785265 2 0.6421 0.5196 0.016 0.492 0.104 0.356 0.016 0.016
#> SRR1785266 2 0.2526 0.7316 0.000 0.876 0.024 0.096 0.000 0.004
#> SRR1785267 2 0.2526 0.7316 0.000 0.876 0.024 0.096 0.000 0.004
#> SRR1785268 6 0.4977 0.6241 0.008 0.000 0.120 0.036 0.112 0.724
#> SRR1785269 6 0.4801 0.6307 0.004 0.000 0.120 0.032 0.112 0.732
#> SRR1785270 5 0.1557 0.7385 0.004 0.004 0.008 0.036 0.944 0.004
#> SRR1785271 5 0.1557 0.7385 0.004 0.004 0.008 0.036 0.944 0.004
#> SRR1785272 3 0.3367 0.6335 0.116 0.000 0.832 0.004 0.020 0.028
#> SRR1785273 3 0.3367 0.6335 0.116 0.000 0.832 0.004 0.020 0.028
#> SRR1785276 5 0.5683 0.2938 0.000 0.000 0.024 0.088 0.496 0.392
#> SRR1785277 5 0.5683 0.2938 0.000 0.000 0.024 0.088 0.496 0.392
#> SRR1785274 5 0.5525 0.6581 0.028 0.000 0.088 0.024 0.668 0.192
#> SRR1785275 5 0.5569 0.6562 0.028 0.000 0.092 0.024 0.664 0.192
#> SRR1785280 2 0.2575 0.7304 0.000 0.872 0.024 0.100 0.000 0.004
#> SRR1785281 2 0.2575 0.7304 0.000 0.872 0.024 0.100 0.000 0.004
#> SRR1785278 1 0.6909 0.5418 0.524 0.000 0.260 0.096 0.032 0.088
#> SRR1785279 1 0.6864 0.5475 0.528 0.000 0.260 0.100 0.032 0.080
#> SRR1785282 1 0.5544 0.6779 0.656 0.000 0.204 0.048 0.008 0.084
#> SRR1785283 1 0.5544 0.6779 0.656 0.000 0.204 0.048 0.008 0.084
#> SRR1785284 5 0.3707 0.7341 0.040 0.000 0.108 0.016 0.820 0.016
#> SRR1785285 5 0.3717 0.7341 0.052 0.000 0.100 0.012 0.820 0.016
#> SRR1785286 5 0.3904 0.6797 0.152 0.004 0.020 0.024 0.792 0.008
#> SRR1785287 5 0.3856 0.6810 0.156 0.004 0.016 0.024 0.792 0.008
#> SRR1785288 1 0.2533 0.6944 0.884 0.000 0.000 0.004 0.056 0.056
#> SRR1785289 1 0.2533 0.6944 0.884 0.000 0.000 0.004 0.056 0.056
#> SRR1785290 2 0.7089 0.3246 0.092 0.392 0.116 0.384 0.016 0.000
#> SRR1785291 2 0.7089 0.3246 0.092 0.392 0.116 0.384 0.016 0.000
#> SRR1785296 4 0.6213 0.6916 0.208 0.004 0.176 0.568 0.044 0.000
#> SRR1785297 4 0.6182 0.7178 0.228 0.004 0.156 0.568 0.044 0.000
#> SRR1785292 2 0.0436 0.7378 0.004 0.988 0.000 0.004 0.000 0.004
#> SRR1785293 2 0.0436 0.7378 0.004 0.988 0.000 0.004 0.000 0.004
#> SRR1785294 1 0.3844 0.6090 0.808 0.000 0.084 0.084 0.020 0.004
#> SRR1785295 1 0.3843 0.6116 0.808 0.000 0.080 0.088 0.020 0.004
#> SRR1785298 4 0.5385 0.7374 0.324 0.000 0.036 0.588 0.048 0.004
#> SRR1785299 4 0.5385 0.7374 0.324 0.000 0.036 0.588 0.048 0.004
#> SRR1785300 1 0.0146 0.7037 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR1785301 1 0.0260 0.7041 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR1785304 2 0.7193 0.3177 0.164 0.476 0.112 0.236 0.012 0.000
#> SRR1785305 2 0.7193 0.3177 0.164 0.476 0.112 0.236 0.012 0.000
#> SRR1785306 5 0.2638 0.7062 0.068 0.000 0.012 0.020 0.888 0.012
#> SRR1785307 5 0.2638 0.7062 0.068 0.000 0.012 0.020 0.888 0.012
#> SRR1785302 4 0.6642 0.7494 0.208 0.004 0.060 0.556 0.160 0.012
#> SRR1785303 4 0.6675 0.7460 0.204 0.004 0.060 0.552 0.168 0.012
#> SRR1785308 3 0.2909 0.6126 0.156 0.000 0.828 0.004 0.000 0.012
#> SRR1785309 3 0.2909 0.6126 0.156 0.000 0.828 0.004 0.000 0.012
#> SRR1785310 1 0.3635 0.6281 0.824 0.000 0.072 0.080 0.020 0.004
#> SRR1785311 1 0.3632 0.6246 0.824 0.000 0.068 0.084 0.020 0.004
#> SRR1785312 6 0.2125 0.7277 0.004 0.000 0.068 0.004 0.016 0.908
#> SRR1785313 6 0.2125 0.7277 0.004 0.000 0.068 0.004 0.016 0.908
#> SRR1785314 5 0.0632 0.7367 0.000 0.000 0.000 0.024 0.976 0.000
#> SRR1785315 5 0.0632 0.7367 0.000 0.000 0.000 0.024 0.976 0.000
#> SRR1785318 2 0.0405 0.7376 0.008 0.988 0.000 0.004 0.000 0.000
#> SRR1785319 2 0.0405 0.7376 0.008 0.988 0.000 0.004 0.000 0.000
#> SRR1785316 1 0.5732 0.6631 0.636 0.000 0.200 0.040 0.008 0.116
#> SRR1785317 1 0.5824 0.6604 0.632 0.000 0.200 0.040 0.012 0.116
#> SRR1785324 2 0.0436 0.7374 0.004 0.988 0.000 0.004 0.004 0.000
#> SRR1785325 2 0.0436 0.7374 0.004 0.988 0.000 0.004 0.004 0.000
#> SRR1785320 6 0.1668 0.7264 0.004 0.000 0.060 0.000 0.008 0.928
#> SRR1785321 6 0.1668 0.7264 0.004 0.000 0.060 0.000 0.008 0.928
#> SRR1785322 1 0.5943 0.5120 0.576 0.004 0.280 0.024 0.108 0.008
#> SRR1785323 1 0.5750 0.5270 0.588 0.004 0.276 0.020 0.108 0.004
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.814 0.882 0.951 0.4604 0.524 0.524
#> 3 3 0.673 0.770 0.896 0.4469 0.632 0.398
#> 4 4 0.649 0.743 0.842 0.1277 0.813 0.514
#> 5 5 0.656 0.625 0.768 0.0646 0.878 0.569
#> 6 6 0.691 0.659 0.783 0.0412 0.911 0.604
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
#> SRR1785238 2 0.6048 0.7977 0.148 0.852
#> SRR1785239 2 0.5842 0.8045 0.140 0.860
#> SRR1785240 1 0.0000 0.9775 1.000 0.000
#> SRR1785241 1 0.0000 0.9775 1.000 0.000
#> SRR1785242 2 0.0000 0.8947 0.000 1.000
#> SRR1785243 2 0.0000 0.8947 0.000 1.000
#> SRR1785244 1 0.0000 0.9775 1.000 0.000
#> SRR1785245 1 0.0000 0.9775 1.000 0.000
#> SRR1785246 1 0.0000 0.9775 1.000 0.000
#> SRR1785247 1 0.0000 0.9775 1.000 0.000
#> SRR1785248 2 0.0000 0.8947 0.000 1.000
#> SRR1785250 1 0.0000 0.9775 1.000 0.000
#> SRR1785251 1 0.0000 0.9775 1.000 0.000
#> SRR1785252 2 0.8267 0.6845 0.260 0.740
#> SRR1785253 2 0.9209 0.5668 0.336 0.664
#> SRR1785254 2 0.0000 0.8947 0.000 1.000
#> SRR1785255 2 0.0000 0.8947 0.000 1.000
#> SRR1785256 1 0.0000 0.9775 1.000 0.000
#> SRR1785257 1 0.0000 0.9775 1.000 0.000
#> SRR1785258 1 0.0000 0.9775 1.000 0.000
#> SRR1785259 1 0.0000 0.9775 1.000 0.000
#> SRR1785262 1 0.0000 0.9775 1.000 0.000
#> SRR1785263 1 0.0000 0.9775 1.000 0.000
#> SRR1785260 1 0.0000 0.9775 1.000 0.000
#> SRR1785261 1 0.0000 0.9775 1.000 0.000
#> SRR1785264 2 0.0000 0.8947 0.000 1.000
#> SRR1785265 2 0.0000 0.8947 0.000 1.000
#> SRR1785266 2 0.0000 0.8947 0.000 1.000
#> SRR1785267 2 0.0000 0.8947 0.000 1.000
#> SRR1785268 1 0.0000 0.9775 1.000 0.000
#> SRR1785269 1 0.0000 0.9775 1.000 0.000
#> SRR1785270 2 0.2043 0.8790 0.032 0.968
#> SRR1785271 2 0.0672 0.8911 0.008 0.992
#> SRR1785272 1 0.0000 0.9775 1.000 0.000
#> SRR1785273 1 0.0000 0.9775 1.000 0.000
#> SRR1785276 1 0.0000 0.9775 1.000 0.000
#> SRR1785277 1 0.0000 0.9775 1.000 0.000
#> SRR1785274 1 0.0000 0.9775 1.000 0.000
#> SRR1785275 1 0.0000 0.9775 1.000 0.000
#> SRR1785280 2 0.0000 0.8947 0.000 1.000
#> SRR1785281 2 0.0000 0.8947 0.000 1.000
#> SRR1785278 1 0.0000 0.9775 1.000 0.000
#> SRR1785279 1 0.0000 0.9775 1.000 0.000
#> SRR1785282 1 0.0000 0.9775 1.000 0.000
#> SRR1785283 1 0.0000 0.9775 1.000 0.000
#> SRR1785284 1 0.0000 0.9775 1.000 0.000
#> SRR1785285 1 0.0000 0.9775 1.000 0.000
#> SRR1785286 1 0.0000 0.9775 1.000 0.000
#> SRR1785287 1 0.0000 0.9775 1.000 0.000
#> SRR1785288 1 0.0000 0.9775 1.000 0.000
#> SRR1785289 1 0.0000 0.9775 1.000 0.000
#> SRR1785290 2 0.0000 0.8947 0.000 1.000
#> SRR1785291 2 0.0000 0.8947 0.000 1.000
#> SRR1785296 2 0.9954 0.2450 0.460 0.540
#> SRR1785297 2 0.9998 0.1441 0.492 0.508
#> SRR1785292 2 0.0000 0.8947 0.000 1.000
#> SRR1785293 2 0.0000 0.8947 0.000 1.000
#> SRR1785294 1 0.0000 0.9775 1.000 0.000
#> SRR1785295 1 0.0376 0.9735 0.996 0.004
#> SRR1785298 1 0.8861 0.4972 0.696 0.304
#> SRR1785299 2 1.0000 0.1308 0.500 0.500
#> SRR1785300 1 0.0000 0.9775 1.000 0.000
#> SRR1785301 1 0.0000 0.9775 1.000 0.000
#> SRR1785304 2 0.0000 0.8947 0.000 1.000
#> SRR1785305 2 0.0000 0.8947 0.000 1.000
#> SRR1785306 2 0.8861 0.6143 0.304 0.696
#> SRR1785307 2 0.7674 0.7220 0.224 0.776
#> SRR1785302 1 0.7815 0.6491 0.768 0.232
#> SRR1785303 1 0.2423 0.9339 0.960 0.040
#> SRR1785308 1 0.0000 0.9775 1.000 0.000
#> SRR1785309 1 0.0000 0.9775 1.000 0.000
#> SRR1785310 1 0.0000 0.9775 1.000 0.000
#> SRR1785311 1 0.0000 0.9775 1.000 0.000
#> SRR1785312 1 0.0000 0.9775 1.000 0.000
#> SRR1785313 1 0.0000 0.9775 1.000 0.000
#> SRR1785314 1 0.9963 -0.0357 0.536 0.464
#> SRR1785315 2 0.9170 0.5694 0.332 0.668
#> SRR1785318 2 0.0000 0.8947 0.000 1.000
#> SRR1785319 2 0.0000 0.8947 0.000 1.000
#> SRR1785316 1 0.0000 0.9775 1.000 0.000
#> SRR1785317 1 0.0000 0.9775 1.000 0.000
#> SRR1785324 2 0.0000 0.8947 0.000 1.000
#> SRR1785325 2 0.0000 0.8947 0.000 1.000
#> SRR1785320 1 0.0000 0.9775 1.000 0.000
#> SRR1785321 1 0.0000 0.9775 1.000 0.000
#> SRR1785322 1 0.0000 0.9775 1.000 0.000
#> SRR1785323 1 0.0000 0.9775 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.6299 0.140 0.000 0.476 0.524
#> SRR1785239 3 0.6280 0.190 0.000 0.460 0.540
#> SRR1785240 3 0.2066 0.851 0.060 0.000 0.940
#> SRR1785241 3 0.1964 0.853 0.056 0.000 0.944
#> SRR1785242 3 0.2590 0.823 0.004 0.072 0.924
#> SRR1785243 3 0.3715 0.775 0.004 0.128 0.868
#> SRR1785244 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785246 3 0.0000 0.856 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.856 0.000 0.000 1.000
#> SRR1785248 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785250 3 0.0747 0.858 0.016 0.000 0.984
#> SRR1785251 3 0.0747 0.858 0.016 0.000 0.984
#> SRR1785252 3 0.0237 0.856 0.004 0.000 0.996
#> SRR1785253 3 0.0237 0.856 0.004 0.000 0.996
#> SRR1785254 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785255 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785256 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785257 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785258 3 0.4555 0.747 0.200 0.000 0.800
#> SRR1785259 3 0.4452 0.755 0.192 0.000 0.808
#> SRR1785262 3 0.0892 0.858 0.020 0.000 0.980
#> SRR1785263 3 0.0592 0.858 0.012 0.000 0.988
#> SRR1785260 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785261 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785264 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785265 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785266 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785267 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785268 3 0.3686 0.795 0.140 0.000 0.860
#> SRR1785269 3 0.2878 0.831 0.096 0.000 0.904
#> SRR1785270 2 0.4700 0.740 0.008 0.812 0.180
#> SRR1785271 2 0.4099 0.779 0.008 0.852 0.140
#> SRR1785272 3 0.5905 0.537 0.352 0.000 0.648
#> SRR1785273 3 0.5882 0.544 0.348 0.000 0.652
#> SRR1785276 3 0.0000 0.856 0.000 0.000 1.000
#> SRR1785277 3 0.0000 0.856 0.000 0.000 1.000
#> SRR1785274 3 0.0892 0.858 0.020 0.000 0.980
#> SRR1785275 3 0.2959 0.824 0.100 0.000 0.900
#> SRR1785280 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785278 1 0.0237 0.897 0.996 0.000 0.004
#> SRR1785279 1 0.0237 0.897 0.996 0.000 0.004
#> SRR1785282 1 0.0237 0.897 0.996 0.000 0.004
#> SRR1785283 1 0.0424 0.896 0.992 0.000 0.008
#> SRR1785284 1 0.3340 0.802 0.880 0.000 0.120
#> SRR1785285 1 0.2066 0.859 0.940 0.000 0.060
#> SRR1785286 1 0.1031 0.885 0.976 0.000 0.024
#> SRR1785287 1 0.0592 0.892 0.988 0.000 0.012
#> SRR1785288 1 0.0237 0.897 0.996 0.000 0.004
#> SRR1785289 1 0.0237 0.897 0.996 0.000 0.004
#> SRR1785290 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785291 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785296 1 0.6280 0.210 0.540 0.460 0.000
#> SRR1785297 1 0.5678 0.558 0.684 0.316 0.000
#> SRR1785292 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785294 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785295 1 0.0237 0.897 0.996 0.004 0.000
#> SRR1785298 1 0.1753 0.873 0.952 0.048 0.000
#> SRR1785299 1 0.3412 0.809 0.876 0.124 0.000
#> SRR1785300 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785304 1 0.5810 0.512 0.664 0.336 0.000
#> SRR1785305 1 0.5810 0.512 0.664 0.336 0.000
#> SRR1785306 2 0.6468 0.283 0.004 0.552 0.444
#> SRR1785307 2 0.6451 0.304 0.004 0.560 0.436
#> SRR1785302 2 0.6386 0.209 0.412 0.584 0.004
#> SRR1785303 1 0.5502 0.656 0.744 0.248 0.008
#> SRR1785308 3 0.5926 0.529 0.356 0.000 0.644
#> SRR1785309 3 0.5882 0.544 0.348 0.000 0.652
#> SRR1785310 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785311 1 0.0000 0.898 1.000 0.000 0.000
#> SRR1785312 3 0.0747 0.858 0.016 0.000 0.984
#> SRR1785313 3 0.0892 0.858 0.020 0.000 0.980
#> SRR1785314 2 0.9687 0.335 0.268 0.460 0.272
#> SRR1785315 2 0.7437 0.646 0.108 0.692 0.200
#> SRR1785318 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785316 1 0.0237 0.897 0.996 0.000 0.004
#> SRR1785317 1 0.0237 0.897 0.996 0.000 0.004
#> SRR1785324 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.887 0.000 1.000 0.000
#> SRR1785320 3 0.1860 0.849 0.052 0.000 0.948
#> SRR1785321 3 0.1529 0.854 0.040 0.000 0.960
#> SRR1785322 1 0.6225 0.218 0.568 0.000 0.432
#> SRR1785323 1 0.6111 0.327 0.604 0.000 0.396
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.2530 0.719 0.000 0.112 0.888 0.000
#> SRR1785239 3 0.2334 0.729 0.000 0.088 0.908 0.004
#> SRR1785240 1 0.0336 0.802 0.992 0.000 0.000 0.008
#> SRR1785241 1 0.0336 0.802 0.992 0.000 0.000 0.008
#> SRR1785242 3 0.5268 0.560 0.396 0.012 0.592 0.000
#> SRR1785243 3 0.6201 0.565 0.376 0.060 0.564 0.000
#> SRR1785244 4 0.2589 0.749 0.116 0.000 0.000 0.884
#> SRR1785245 4 0.1792 0.788 0.068 0.000 0.000 0.932
#> SRR1785246 1 0.3266 0.790 0.832 0.000 0.168 0.000
#> SRR1785247 1 0.3219 0.791 0.836 0.000 0.164 0.000
#> SRR1785248 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785250 3 0.2149 0.742 0.088 0.000 0.912 0.000
#> SRR1785251 3 0.2149 0.742 0.088 0.000 0.912 0.000
#> SRR1785252 3 0.4585 0.646 0.332 0.000 0.668 0.000
#> SRR1785253 3 0.4585 0.645 0.332 0.000 0.668 0.000
#> SRR1785254 2 0.3088 0.830 0.008 0.864 0.000 0.128
#> SRR1785255 2 0.3591 0.779 0.008 0.824 0.000 0.168
#> SRR1785256 4 0.2216 0.775 0.092 0.000 0.000 0.908
#> SRR1785257 4 0.2011 0.782 0.080 0.000 0.000 0.920
#> SRR1785258 3 0.4741 0.706 0.228 0.000 0.744 0.028
#> SRR1785259 3 0.4535 0.710 0.240 0.000 0.744 0.016
#> SRR1785262 3 0.5493 0.482 0.456 0.000 0.528 0.016
#> SRR1785263 3 0.5168 0.416 0.496 0.000 0.500 0.004
#> SRR1785260 4 0.0000 0.814 0.000 0.000 0.000 1.000
#> SRR1785261 4 0.0000 0.814 0.000 0.000 0.000 1.000
#> SRR1785264 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785265 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785266 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785267 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785268 1 0.5250 0.289 0.552 0.000 0.440 0.008
#> SRR1785269 1 0.5126 0.288 0.552 0.000 0.444 0.004
#> SRR1785270 1 0.0657 0.805 0.984 0.012 0.000 0.004
#> SRR1785271 1 0.0779 0.805 0.980 0.016 0.000 0.004
#> SRR1785272 3 0.2081 0.736 0.000 0.000 0.916 0.084
#> SRR1785273 3 0.2011 0.737 0.000 0.000 0.920 0.080
#> SRR1785276 1 0.3356 0.786 0.824 0.000 0.176 0.000
#> SRR1785277 1 0.3356 0.786 0.824 0.000 0.176 0.000
#> SRR1785274 1 0.0188 0.802 0.996 0.000 0.000 0.004
#> SRR1785275 1 0.0336 0.802 0.992 0.000 0.000 0.008
#> SRR1785280 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785278 4 0.5038 0.631 0.020 0.000 0.296 0.684
#> SRR1785279 4 0.4770 0.642 0.012 0.000 0.288 0.700
#> SRR1785282 4 0.4477 0.608 0.000 0.000 0.312 0.688
#> SRR1785283 4 0.4522 0.597 0.000 0.000 0.320 0.680
#> SRR1785284 1 0.3172 0.726 0.840 0.000 0.000 0.160
#> SRR1785285 1 0.3400 0.709 0.820 0.000 0.000 0.180
#> SRR1785286 1 0.4193 0.625 0.732 0.000 0.000 0.268
#> SRR1785287 1 0.4277 0.610 0.720 0.000 0.000 0.280
#> SRR1785288 4 0.0000 0.814 0.000 0.000 0.000 1.000
#> SRR1785289 4 0.0000 0.814 0.000 0.000 0.000 1.000
#> SRR1785290 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785291 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785296 4 0.5244 0.328 0.000 0.436 0.008 0.556
#> SRR1785297 4 0.4621 0.618 0.000 0.284 0.008 0.708
#> SRR1785292 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.1557 0.803 0.000 0.000 0.056 0.944
#> SRR1785295 4 0.2408 0.781 0.000 0.000 0.104 0.896
#> SRR1785298 4 0.3219 0.762 0.020 0.112 0.000 0.868
#> SRR1785299 4 0.3672 0.723 0.012 0.164 0.000 0.824
#> SRR1785300 4 0.0000 0.814 0.000 0.000 0.000 1.000
#> SRR1785301 4 0.0000 0.814 0.000 0.000 0.000 1.000
#> SRR1785304 4 0.2408 0.781 0.000 0.104 0.000 0.896
#> SRR1785305 4 0.2216 0.787 0.000 0.092 0.000 0.908
#> SRR1785306 1 0.1109 0.806 0.968 0.004 0.028 0.000
#> SRR1785307 1 0.1356 0.806 0.960 0.008 0.032 0.000
#> SRR1785302 2 0.7365 0.538 0.056 0.636 0.128 0.180
#> SRR1785303 4 0.8582 0.189 0.068 0.368 0.140 0.424
#> SRR1785308 3 0.2530 0.730 0.004 0.000 0.896 0.100
#> SRR1785309 3 0.2466 0.732 0.004 0.000 0.900 0.096
#> SRR1785310 4 0.0469 0.813 0.000 0.000 0.012 0.988
#> SRR1785311 4 0.0336 0.813 0.000 0.000 0.008 0.992
#> SRR1785312 1 0.4103 0.744 0.744 0.000 0.256 0.000
#> SRR1785313 1 0.4040 0.750 0.752 0.000 0.248 0.000
#> SRR1785314 1 0.3960 0.796 0.860 0.036 0.072 0.032
#> SRR1785315 1 0.4555 0.782 0.832 0.068 0.064 0.036
#> SRR1785318 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785316 4 0.4564 0.593 0.000 0.000 0.328 0.672
#> SRR1785317 4 0.4624 0.576 0.000 0.000 0.340 0.660
#> SRR1785324 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.3837 0.764 0.776 0.000 0.224 0.000
#> SRR1785321 1 0.3649 0.776 0.796 0.000 0.204 0.000
#> SRR1785322 3 0.5257 0.559 0.060 0.000 0.728 0.212
#> SRR1785323 3 0.5434 0.479 0.052 0.000 0.696 0.252
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 1 0.5945 0.4330 0.600 0.268 0.124 0.000 0.008
#> SRR1785239 1 0.6159 0.4251 0.600 0.224 0.164 0.000 0.012
#> SRR1785240 5 0.3596 0.6394 0.000 0.000 0.200 0.016 0.784
#> SRR1785241 5 0.3492 0.6524 0.000 0.000 0.188 0.016 0.796
#> SRR1785242 3 0.2806 0.6621 0.000 0.004 0.844 0.000 0.152
#> SRR1785243 3 0.2891 0.6481 0.000 0.000 0.824 0.000 0.176
#> SRR1785244 4 0.5330 0.1746 0.396 0.000 0.000 0.548 0.056
#> SRR1785245 4 0.4854 0.4367 0.308 0.000 0.000 0.648 0.044
#> SRR1785246 5 0.4054 0.5376 0.248 0.000 0.020 0.000 0.732
#> SRR1785247 5 0.4026 0.5428 0.244 0.000 0.020 0.000 0.736
#> SRR1785248 2 0.0162 0.9130 0.004 0.996 0.000 0.000 0.000
#> SRR1785250 3 0.3320 0.6145 0.164 0.000 0.820 0.004 0.012
#> SRR1785251 3 0.3154 0.6231 0.148 0.000 0.836 0.004 0.012
#> SRR1785252 3 0.2233 0.6830 0.004 0.000 0.892 0.000 0.104
#> SRR1785253 3 0.2233 0.6830 0.004 0.000 0.892 0.000 0.104
#> SRR1785254 2 0.4789 0.3569 0.004 0.608 0.000 0.368 0.020
#> SRR1785255 2 0.4949 0.3398 0.004 0.600 0.000 0.368 0.028
#> SRR1785256 4 0.3180 0.7345 0.000 0.000 0.076 0.856 0.068
#> SRR1785257 4 0.2989 0.7433 0.000 0.000 0.072 0.868 0.060
#> SRR1785258 3 0.5474 0.4848 0.260 0.000 0.656 0.020 0.064
#> SRR1785259 3 0.5619 0.4627 0.272 0.000 0.628 0.008 0.092
#> SRR1785262 3 0.5162 0.4344 0.000 0.000 0.628 0.064 0.308
#> SRR1785263 3 0.4714 0.4336 0.000 0.000 0.644 0.032 0.324
#> SRR1785260 4 0.0000 0.7998 0.000 0.000 0.000 1.000 0.000
#> SRR1785261 4 0.0000 0.7998 0.000 0.000 0.000 1.000 0.000
#> SRR1785264 2 0.0865 0.8977 0.004 0.972 0.024 0.000 0.000
#> SRR1785265 2 0.0771 0.9012 0.004 0.976 0.020 0.000 0.000
#> SRR1785266 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785267 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785268 1 0.3350 0.6073 0.844 0.000 0.112 0.004 0.040
#> SRR1785269 1 0.3322 0.6122 0.848 0.000 0.104 0.004 0.044
#> SRR1785270 5 0.2963 0.7138 0.016 0.004 0.092 0.012 0.876
#> SRR1785271 5 0.3161 0.7144 0.024 0.008 0.084 0.012 0.872
#> SRR1785272 1 0.5889 0.0218 0.480 0.000 0.444 0.060 0.016
#> SRR1785273 3 0.5893 -0.0720 0.456 0.000 0.468 0.060 0.016
#> SRR1785276 5 0.4555 0.3821 0.344 0.000 0.020 0.000 0.636
#> SRR1785277 5 0.4508 0.4068 0.332 0.000 0.020 0.000 0.648
#> SRR1785274 5 0.2624 0.7019 0.000 0.000 0.116 0.012 0.872
#> SRR1785275 5 0.2624 0.7019 0.000 0.000 0.116 0.012 0.872
#> SRR1785280 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.2507 0.6462 0.908 0.000 0.028 0.044 0.020
#> SRR1785279 1 0.2575 0.6456 0.904 0.000 0.036 0.044 0.016
#> SRR1785282 1 0.4822 0.5545 0.704 0.000 0.076 0.220 0.000
#> SRR1785283 1 0.4986 0.5448 0.688 0.000 0.084 0.228 0.000
#> SRR1785284 5 0.4214 0.6666 0.004 0.000 0.088 0.120 0.788
#> SRR1785285 5 0.4295 0.6607 0.004 0.000 0.084 0.132 0.780
#> SRR1785286 5 0.5513 0.2216 0.000 0.000 0.068 0.408 0.524
#> SRR1785287 4 0.5459 -0.1175 0.000 0.000 0.060 0.472 0.468
#> SRR1785288 4 0.2813 0.7057 0.168 0.000 0.000 0.832 0.000
#> SRR1785289 4 0.2773 0.7096 0.164 0.000 0.000 0.836 0.000
#> SRR1785290 2 0.0162 0.9130 0.004 0.996 0.000 0.000 0.000
#> SRR1785291 2 0.0162 0.9130 0.004 0.996 0.000 0.000 0.000
#> SRR1785296 4 0.5348 0.5785 0.000 0.232 0.112 0.656 0.000
#> SRR1785297 4 0.4334 0.6964 0.000 0.156 0.080 0.764 0.000
#> SRR1785292 2 0.0162 0.9130 0.004 0.996 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785294 4 0.2370 0.7724 0.056 0.000 0.040 0.904 0.000
#> SRR1785295 4 0.2889 0.7487 0.084 0.000 0.044 0.872 0.000
#> SRR1785298 4 0.3919 0.6930 0.000 0.188 0.000 0.776 0.036
#> SRR1785299 4 0.3656 0.7142 0.000 0.168 0.000 0.800 0.032
#> SRR1785300 4 0.0162 0.7997 0.000 0.000 0.000 0.996 0.004
#> SRR1785301 4 0.0162 0.7997 0.000 0.000 0.000 0.996 0.004
#> SRR1785304 4 0.2068 0.7798 0.004 0.092 0.000 0.904 0.000
#> SRR1785305 4 0.1732 0.7867 0.000 0.080 0.000 0.920 0.000
#> SRR1785306 5 0.4820 0.6465 0.088 0.000 0.180 0.004 0.728
#> SRR1785307 5 0.4624 0.6592 0.096 0.000 0.164 0.000 0.740
#> SRR1785302 2 0.6706 0.2298 0.312 0.544 0.108 0.020 0.016
#> SRR1785303 1 0.7616 0.2370 0.448 0.352 0.124 0.056 0.020
#> SRR1785308 3 0.4537 0.5244 0.184 0.000 0.740 0.076 0.000
#> SRR1785309 3 0.4479 0.5259 0.184 0.000 0.744 0.072 0.000
#> SRR1785310 4 0.1582 0.7904 0.028 0.000 0.028 0.944 0.000
#> SRR1785311 4 0.1018 0.7963 0.016 0.000 0.016 0.968 0.000
#> SRR1785312 1 0.4016 0.5097 0.716 0.000 0.012 0.000 0.272
#> SRR1785313 1 0.4109 0.4973 0.700 0.000 0.012 0.000 0.288
#> SRR1785314 5 0.5309 0.6430 0.208 0.008 0.064 0.016 0.704
#> SRR1785315 5 0.5572 0.6440 0.200 0.020 0.060 0.020 0.700
#> SRR1785318 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.5117 0.5253 0.672 0.000 0.088 0.240 0.000
#> SRR1785317 1 0.5303 0.5207 0.660 0.000 0.108 0.232 0.000
#> SRR1785324 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.9142 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 1 0.4309 0.4793 0.676 0.000 0.016 0.000 0.308
#> SRR1785321 1 0.4384 0.4555 0.660 0.000 0.016 0.000 0.324
#> SRR1785322 1 0.3016 0.6267 0.868 0.000 0.100 0.016 0.016
#> SRR1785323 1 0.3113 0.6277 0.864 0.000 0.100 0.016 0.020
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 1 0.6214 0.3623 0.536 0.224 0.204 0.000 0.000 0.036
#> SRR1785239 1 0.6323 0.3636 0.544 0.168 0.240 0.004 0.000 0.044
#> SRR1785240 5 0.2030 0.7203 0.000 0.000 0.064 0.000 0.908 0.028
#> SRR1785241 5 0.1921 0.7284 0.000 0.000 0.052 0.000 0.916 0.032
#> SRR1785242 3 0.3368 0.6351 0.000 0.000 0.756 0.000 0.232 0.012
#> SRR1785243 3 0.3342 0.6376 0.000 0.000 0.760 0.000 0.228 0.012
#> SRR1785244 1 0.5562 0.4569 0.572 0.000 0.000 0.236 0.188 0.004
#> SRR1785245 1 0.5605 0.4416 0.560 0.000 0.000 0.256 0.180 0.004
#> SRR1785246 6 0.2053 0.8544 0.000 0.000 0.004 0.000 0.108 0.888
#> SRR1785247 6 0.2100 0.8513 0.000 0.000 0.004 0.000 0.112 0.884
#> SRR1785248 2 0.0810 0.9114 0.004 0.976 0.004 0.000 0.008 0.008
#> SRR1785250 3 0.4337 0.5522 0.164 0.000 0.752 0.000 0.040 0.044
#> SRR1785251 3 0.4171 0.5601 0.160 0.000 0.764 0.000 0.040 0.036
#> SRR1785252 3 0.2996 0.6647 0.008 0.000 0.832 0.000 0.144 0.016
#> SRR1785253 3 0.2982 0.6637 0.008 0.000 0.828 0.000 0.152 0.012
#> SRR1785254 2 0.6085 0.4223 0.016 0.572 0.008 0.284 0.100 0.020
#> SRR1785255 2 0.6328 0.3557 0.012 0.532 0.008 0.284 0.148 0.016
#> SRR1785256 4 0.4458 0.6756 0.028 0.000 0.040 0.732 0.196 0.004
#> SRR1785257 4 0.3608 0.7415 0.016 0.000 0.028 0.804 0.148 0.004
#> SRR1785258 3 0.5512 0.4484 0.092 0.000 0.536 0.000 0.356 0.016
#> SRR1785259 3 0.5480 0.4453 0.084 0.000 0.520 0.000 0.380 0.016
#> SRR1785262 3 0.5545 0.4568 0.000 0.000 0.548 0.112 0.328 0.012
#> SRR1785263 3 0.4738 0.4880 0.000 0.000 0.596 0.036 0.356 0.012
#> SRR1785260 4 0.0291 0.8453 0.004 0.000 0.000 0.992 0.000 0.004
#> SRR1785261 4 0.0291 0.8453 0.004 0.000 0.000 0.992 0.000 0.004
#> SRR1785264 2 0.3079 0.8512 0.024 0.868 0.068 0.000 0.020 0.020
#> SRR1785265 2 0.2332 0.8807 0.012 0.908 0.048 0.000 0.012 0.020
#> SRR1785266 2 0.0146 0.9151 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785267 2 0.0260 0.9145 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785268 1 0.5288 0.4350 0.640 0.000 0.060 0.000 0.048 0.252
#> SRR1785269 1 0.5309 0.4338 0.636 0.000 0.060 0.000 0.048 0.256
#> SRR1785270 5 0.2493 0.7474 0.036 0.004 0.000 0.000 0.884 0.076
#> SRR1785271 5 0.2493 0.7474 0.036 0.004 0.000 0.000 0.884 0.076
#> SRR1785272 3 0.5344 0.0606 0.400 0.000 0.520 0.024 0.000 0.056
#> SRR1785273 3 0.5266 0.1077 0.384 0.000 0.540 0.024 0.000 0.052
#> SRR1785276 6 0.2173 0.8825 0.028 0.000 0.004 0.000 0.064 0.904
#> SRR1785277 6 0.2069 0.8803 0.020 0.000 0.004 0.000 0.068 0.908
#> SRR1785274 5 0.1605 0.7475 0.004 0.000 0.016 0.000 0.936 0.044
#> SRR1785275 5 0.1726 0.7486 0.000 0.000 0.012 0.012 0.932 0.044
#> SRR1785280 2 0.0291 0.9149 0.000 0.992 0.004 0.000 0.000 0.004
#> SRR1785281 2 0.0291 0.9149 0.000 0.992 0.004 0.000 0.000 0.004
#> SRR1785278 1 0.2342 0.5820 0.888 0.000 0.000 0.004 0.020 0.088
#> SRR1785279 1 0.2537 0.5824 0.880 0.000 0.000 0.008 0.024 0.088
#> SRR1785282 1 0.4252 0.5612 0.776 0.000 0.108 0.076 0.000 0.040
#> SRR1785283 1 0.4353 0.5552 0.764 0.000 0.124 0.076 0.000 0.036
#> SRR1785284 5 0.2628 0.7444 0.012 0.000 0.004 0.056 0.888 0.040
#> SRR1785285 5 0.2618 0.7431 0.012 0.000 0.004 0.060 0.888 0.036
#> SRR1785286 5 0.3894 0.5096 0.000 0.000 0.004 0.324 0.664 0.008
#> SRR1785287 5 0.4062 0.4721 0.000 0.000 0.004 0.344 0.640 0.012
#> SRR1785288 1 0.4660 0.2550 0.540 0.000 0.000 0.416 0.044 0.000
#> SRR1785289 1 0.4716 0.2894 0.552 0.000 0.004 0.404 0.040 0.000
#> SRR1785290 2 0.2546 0.8801 0.016 0.904 0.008 0.040 0.012 0.020
#> SRR1785291 2 0.2546 0.8802 0.016 0.904 0.008 0.040 0.012 0.020
#> SRR1785296 4 0.4336 0.7268 0.000 0.116 0.092 0.768 0.016 0.008
#> SRR1785297 4 0.3462 0.7816 0.000 0.072 0.072 0.836 0.012 0.008
#> SRR1785292 2 0.0696 0.9125 0.004 0.980 0.004 0.000 0.004 0.008
#> SRR1785293 2 0.0551 0.9135 0.004 0.984 0.004 0.000 0.000 0.008
#> SRR1785294 4 0.1788 0.8213 0.028 0.000 0.040 0.928 0.000 0.004
#> SRR1785295 4 0.2451 0.7936 0.040 0.000 0.068 0.888 0.000 0.004
#> SRR1785298 4 0.7300 0.3996 0.088 0.184 0.004 0.524 0.160 0.040
#> SRR1785299 4 0.7384 0.3798 0.076 0.240 0.012 0.508 0.124 0.040
#> SRR1785300 4 0.0767 0.8425 0.012 0.000 0.000 0.976 0.004 0.008
#> SRR1785301 4 0.0881 0.8425 0.012 0.000 0.000 0.972 0.008 0.008
#> SRR1785304 4 0.1368 0.8416 0.008 0.012 0.004 0.956 0.004 0.016
#> SRR1785305 4 0.1368 0.8416 0.008 0.012 0.004 0.956 0.004 0.016
#> SRR1785306 5 0.6095 0.5605 0.132 0.004 0.080 0.004 0.628 0.152
#> SRR1785307 5 0.6180 0.5682 0.132 0.004 0.076 0.012 0.632 0.144
#> SRR1785302 1 0.7503 0.3154 0.492 0.168 0.060 0.004 0.212 0.064
#> SRR1785303 1 0.7187 0.3908 0.552 0.092 0.060 0.012 0.212 0.072
#> SRR1785308 3 0.3313 0.5467 0.140 0.000 0.820 0.024 0.000 0.016
#> SRR1785309 3 0.3318 0.5469 0.140 0.000 0.820 0.020 0.000 0.020
#> SRR1785310 4 0.0603 0.8428 0.016 0.000 0.004 0.980 0.000 0.000
#> SRR1785311 4 0.0520 0.8443 0.008 0.000 0.008 0.984 0.000 0.000
#> SRR1785312 6 0.2982 0.7933 0.164 0.000 0.004 0.000 0.012 0.820
#> SRR1785313 6 0.2544 0.8394 0.120 0.000 0.004 0.000 0.012 0.864
#> SRR1785314 5 0.5381 0.6027 0.200 0.012 0.028 0.000 0.668 0.092
#> SRR1785315 5 0.5682 0.5973 0.196 0.024 0.028 0.000 0.652 0.100
#> SRR1785318 2 0.0260 0.9145 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785319 2 0.0260 0.9145 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785316 1 0.5175 0.5311 0.700 0.000 0.136 0.100 0.000 0.064
#> SRR1785317 1 0.5181 0.5242 0.696 0.000 0.152 0.088 0.000 0.064
#> SRR1785324 2 0.0146 0.9151 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785325 2 0.0146 0.9151 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785320 6 0.2402 0.8494 0.140 0.000 0.000 0.000 0.004 0.856
#> SRR1785321 6 0.2278 0.8555 0.128 0.000 0.000 0.000 0.004 0.868
#> SRR1785322 1 0.5170 0.4916 0.680 0.000 0.064 0.000 0.060 0.196
#> SRR1785323 1 0.5087 0.4974 0.688 0.000 0.064 0.000 0.056 0.192
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.817 0.941 0.971 0.3231 0.682 0.682
#> 3 3 0.467 0.784 0.877 0.8493 0.718 0.586
#> 4 4 0.573 0.683 0.779 0.1850 0.867 0.684
#> 5 5 0.675 0.748 0.862 0.0968 0.886 0.641
#> 6 6 0.744 0.694 0.787 0.0465 1.000 1.000
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 2 0.4562 0.902 0.096 0.904
#> SRR1785239 2 0.4562 0.902 0.096 0.904
#> SRR1785240 1 0.0000 0.976 1.000 0.000
#> SRR1785241 1 0.0000 0.976 1.000 0.000
#> SRR1785242 1 0.0376 0.973 0.996 0.004
#> SRR1785243 1 0.0376 0.973 0.996 0.004
#> SRR1785244 1 0.0000 0.976 1.000 0.000
#> SRR1785245 1 0.0000 0.976 1.000 0.000
#> SRR1785246 1 0.0000 0.976 1.000 0.000
#> SRR1785247 1 0.0000 0.976 1.000 0.000
#> SRR1785248 2 0.3733 0.917 0.072 0.928
#> SRR1785250 1 0.0000 0.976 1.000 0.000
#> SRR1785251 1 0.0000 0.976 1.000 0.000
#> SRR1785252 1 0.0376 0.973 0.996 0.004
#> SRR1785253 1 0.0376 0.973 0.996 0.004
#> SRR1785254 1 0.7376 0.743 0.792 0.208
#> SRR1785255 1 0.7376 0.743 0.792 0.208
#> SRR1785256 1 0.0000 0.976 1.000 0.000
#> SRR1785257 1 0.0000 0.976 1.000 0.000
#> SRR1785258 1 0.0376 0.973 0.996 0.004
#> SRR1785259 1 0.0376 0.973 0.996 0.004
#> SRR1785262 1 0.0000 0.976 1.000 0.000
#> SRR1785263 1 0.0000 0.976 1.000 0.000
#> SRR1785260 1 0.0000 0.976 1.000 0.000
#> SRR1785261 1 0.0000 0.976 1.000 0.000
#> SRR1785264 2 0.3879 0.915 0.076 0.924
#> SRR1785265 2 0.3879 0.915 0.076 0.924
#> SRR1785266 2 0.0376 0.937 0.004 0.996
#> SRR1785267 2 0.0376 0.937 0.004 0.996
#> SRR1785268 1 0.0000 0.976 1.000 0.000
#> SRR1785269 1 0.0000 0.976 1.000 0.000
#> SRR1785270 1 0.0000 0.976 1.000 0.000
#> SRR1785271 1 0.0000 0.976 1.000 0.000
#> SRR1785272 1 0.0000 0.976 1.000 0.000
#> SRR1785273 1 0.0000 0.976 1.000 0.000
#> SRR1785276 1 0.0000 0.976 1.000 0.000
#> SRR1785277 1 0.0000 0.976 1.000 0.000
#> SRR1785274 1 0.0376 0.973 0.996 0.004
#> SRR1785275 1 0.0376 0.973 0.996 0.004
#> SRR1785280 2 0.0000 0.937 0.000 1.000
#> SRR1785281 2 0.0000 0.937 0.000 1.000
#> SRR1785278 1 0.0000 0.976 1.000 0.000
#> SRR1785279 1 0.0000 0.976 1.000 0.000
#> SRR1785282 1 0.0000 0.976 1.000 0.000
#> SRR1785283 1 0.0000 0.976 1.000 0.000
#> SRR1785284 1 0.0000 0.976 1.000 0.000
#> SRR1785285 1 0.0000 0.976 1.000 0.000
#> SRR1785286 1 0.0000 0.976 1.000 0.000
#> SRR1785287 1 0.0000 0.976 1.000 0.000
#> SRR1785288 1 0.0000 0.976 1.000 0.000
#> SRR1785289 1 0.0000 0.976 1.000 0.000
#> SRR1785290 2 0.8386 0.677 0.268 0.732
#> SRR1785291 2 0.8386 0.677 0.268 0.732
#> SRR1785296 1 0.1843 0.953 0.972 0.028
#> SRR1785297 1 0.1843 0.953 0.972 0.028
#> SRR1785292 2 0.0000 0.937 0.000 1.000
#> SRR1785293 2 0.0000 0.937 0.000 1.000
#> SRR1785294 1 0.0000 0.976 1.000 0.000
#> SRR1785295 1 0.0000 0.976 1.000 0.000
#> SRR1785298 1 0.7376 0.743 0.792 0.208
#> SRR1785299 1 0.7376 0.743 0.792 0.208
#> SRR1785300 1 0.0000 0.976 1.000 0.000
#> SRR1785301 1 0.0000 0.976 1.000 0.000
#> SRR1785304 1 0.0000 0.976 1.000 0.000
#> SRR1785305 1 0.0000 0.976 1.000 0.000
#> SRR1785306 1 0.4939 0.873 0.892 0.108
#> SRR1785307 1 0.4939 0.873 0.892 0.108
#> SRR1785302 1 0.7376 0.743 0.792 0.208
#> SRR1785303 1 0.7376 0.743 0.792 0.208
#> SRR1785308 1 0.0000 0.976 1.000 0.000
#> SRR1785309 1 0.0000 0.976 1.000 0.000
#> SRR1785310 1 0.0000 0.976 1.000 0.000
#> SRR1785311 1 0.0000 0.976 1.000 0.000
#> SRR1785312 1 0.0000 0.976 1.000 0.000
#> SRR1785313 1 0.0000 0.976 1.000 0.000
#> SRR1785314 1 0.0000 0.976 1.000 0.000
#> SRR1785315 1 0.0000 0.976 1.000 0.000
#> SRR1785318 2 0.0000 0.937 0.000 1.000
#> SRR1785319 2 0.0000 0.937 0.000 1.000
#> SRR1785316 1 0.0000 0.976 1.000 0.000
#> SRR1785317 1 0.0000 0.976 1.000 0.000
#> SRR1785324 2 0.0000 0.937 0.000 1.000
#> SRR1785325 2 0.0000 0.937 0.000 1.000
#> SRR1785320 1 0.0000 0.976 1.000 0.000
#> SRR1785321 1 0.0000 0.976 1.000 0.000
#> SRR1785322 1 0.0000 0.976 1.000 0.000
#> SRR1785323 1 0.0000 0.976 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 2 0.3293 0.889 0.012 0.900 0.088
#> SRR1785239 2 0.3293 0.889 0.012 0.900 0.088
#> SRR1785240 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785241 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785242 3 0.0000 0.817 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.817 0.000 0.000 1.000
#> SRR1785244 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785245 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785246 3 0.0747 0.824 0.016 0.000 0.984
#> SRR1785247 3 0.0747 0.824 0.016 0.000 0.984
#> SRR1785248 2 0.2749 0.903 0.012 0.924 0.064
#> SRR1785250 3 0.1643 0.824 0.044 0.000 0.956
#> SRR1785251 3 0.1643 0.824 0.044 0.000 0.956
#> SRR1785252 3 0.0000 0.817 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.817 0.000 0.000 1.000
#> SRR1785254 1 0.7800 0.671 0.668 0.204 0.128
#> SRR1785255 1 0.7800 0.671 0.668 0.204 0.128
#> SRR1785256 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785257 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785258 3 0.6280 -0.166 0.460 0.000 0.540
#> SRR1785259 3 0.6280 -0.166 0.460 0.000 0.540
#> SRR1785262 3 0.1529 0.827 0.040 0.000 0.960
#> SRR1785263 3 0.1529 0.827 0.040 0.000 0.960
#> SRR1785260 1 0.0000 0.839 1.000 0.000 0.000
#> SRR1785261 1 0.0000 0.839 1.000 0.000 0.000
#> SRR1785264 2 0.2845 0.900 0.012 0.920 0.068
#> SRR1785265 2 0.2845 0.900 0.012 0.920 0.068
#> SRR1785266 2 0.0424 0.926 0.000 0.992 0.008
#> SRR1785267 2 0.0424 0.926 0.000 0.992 0.008
#> SRR1785268 1 0.5098 0.712 0.752 0.000 0.248
#> SRR1785269 1 0.5098 0.712 0.752 0.000 0.248
#> SRR1785270 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785271 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785272 3 0.6192 0.518 0.420 0.000 0.580
#> SRR1785273 3 0.6192 0.518 0.420 0.000 0.580
#> SRR1785276 3 0.3267 0.821 0.116 0.000 0.884
#> SRR1785277 3 0.3267 0.821 0.116 0.000 0.884
#> SRR1785274 3 0.2537 0.809 0.080 0.000 0.920
#> SRR1785275 3 0.2537 0.809 0.080 0.000 0.920
#> SRR1785280 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785278 1 0.0424 0.839 0.992 0.000 0.008
#> SRR1785279 1 0.0424 0.839 0.992 0.000 0.008
#> SRR1785282 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785283 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785284 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785285 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785286 1 0.4504 0.799 0.804 0.000 0.196
#> SRR1785287 1 0.4504 0.799 0.804 0.000 0.196
#> SRR1785288 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785289 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785290 2 0.7039 0.660 0.144 0.728 0.128
#> SRR1785291 2 0.7039 0.660 0.144 0.728 0.128
#> SRR1785296 1 0.3966 0.832 0.876 0.024 0.100
#> SRR1785297 1 0.3966 0.832 0.876 0.024 0.100
#> SRR1785292 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785294 1 0.2878 0.836 0.904 0.000 0.096
#> SRR1785295 1 0.2878 0.836 0.904 0.000 0.096
#> SRR1785298 1 0.7800 0.671 0.668 0.204 0.128
#> SRR1785299 1 0.7800 0.671 0.668 0.204 0.128
#> SRR1785300 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785301 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785304 1 0.0000 0.839 1.000 0.000 0.000
#> SRR1785305 1 0.0000 0.839 1.000 0.000 0.000
#> SRR1785306 1 0.7391 0.734 0.696 0.108 0.196
#> SRR1785307 1 0.7391 0.734 0.696 0.108 0.196
#> SRR1785302 1 0.7800 0.671 0.668 0.204 0.128
#> SRR1785303 1 0.7800 0.671 0.668 0.204 0.128
#> SRR1785308 3 0.4887 0.714 0.228 0.000 0.772
#> SRR1785309 3 0.4887 0.714 0.228 0.000 0.772
#> SRR1785310 1 0.2878 0.836 0.904 0.000 0.096
#> SRR1785311 1 0.2878 0.836 0.904 0.000 0.096
#> SRR1785312 1 0.5098 0.712 0.752 0.000 0.248
#> SRR1785313 1 0.5098 0.712 0.752 0.000 0.248
#> SRR1785314 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785315 1 0.5058 0.770 0.756 0.000 0.244
#> SRR1785318 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785316 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785317 1 0.0237 0.840 0.996 0.000 0.004
#> SRR1785324 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.926 0.000 1.000 0.000
#> SRR1785320 3 0.3267 0.821 0.116 0.000 0.884
#> SRR1785321 3 0.3267 0.821 0.116 0.000 0.884
#> SRR1785322 1 0.0424 0.839 0.992 0.000 0.008
#> SRR1785323 1 0.0424 0.839 0.992 0.000 0.008
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 2 0.2894 0.896 0.072 0.900 0.020 0.008
#> SRR1785239 2 0.2894 0.896 0.072 0.900 0.020 0.008
#> SRR1785240 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785241 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785242 3 0.0672 0.856 0.008 0.000 0.984 0.008
#> SRR1785243 3 0.0672 0.856 0.008 0.000 0.984 0.008
#> SRR1785244 1 0.5055 0.573 0.624 0.000 0.008 0.368
#> SRR1785245 1 0.5055 0.573 0.624 0.000 0.008 0.368
#> SRR1785246 3 0.0469 0.858 0.012 0.000 0.988 0.000
#> SRR1785247 3 0.0469 0.858 0.012 0.000 0.988 0.000
#> SRR1785248 2 0.2124 0.906 0.068 0.924 0.000 0.008
#> SRR1785250 3 0.1118 0.855 0.036 0.000 0.964 0.000
#> SRR1785251 3 0.1118 0.855 0.036 0.000 0.964 0.000
#> SRR1785252 3 0.0672 0.856 0.008 0.000 0.984 0.008
#> SRR1785253 3 0.0672 0.856 0.008 0.000 0.984 0.008
#> SRR1785254 1 0.6662 0.445 0.652 0.204 0.012 0.132
#> SRR1785255 1 0.6662 0.445 0.652 0.204 0.012 0.132
#> SRR1785256 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785257 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785258 1 0.5693 0.236 0.504 0.000 0.472 0.024
#> SRR1785259 1 0.5693 0.236 0.504 0.000 0.472 0.024
#> SRR1785262 3 0.2281 0.823 0.096 0.000 0.904 0.000
#> SRR1785263 3 0.2281 0.823 0.096 0.000 0.904 0.000
#> SRR1785260 4 0.1118 0.808 0.036 0.000 0.000 0.964
#> SRR1785261 4 0.1118 0.808 0.036 0.000 0.000 0.964
#> SRR1785264 2 0.2198 0.904 0.072 0.920 0.000 0.008
#> SRR1785265 2 0.2198 0.904 0.072 0.920 0.000 0.008
#> SRR1785266 2 0.0376 0.927 0.004 0.992 0.000 0.004
#> SRR1785267 2 0.0376 0.927 0.004 0.992 0.000 0.004
#> SRR1785268 1 0.6934 0.516 0.580 0.000 0.256 0.164
#> SRR1785269 1 0.6934 0.516 0.580 0.000 0.256 0.164
#> SRR1785270 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785271 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785272 3 0.6752 0.459 0.132 0.000 0.588 0.280
#> SRR1785273 3 0.6752 0.459 0.132 0.000 0.588 0.280
#> SRR1785276 3 0.2983 0.841 0.068 0.000 0.892 0.040
#> SRR1785277 3 0.2983 0.841 0.068 0.000 0.892 0.040
#> SRR1785274 3 0.3196 0.782 0.136 0.000 0.856 0.008
#> SRR1785275 3 0.3196 0.782 0.136 0.000 0.856 0.008
#> SRR1785280 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.5203 0.582 0.636 0.000 0.016 0.348
#> SRR1785279 1 0.5203 0.582 0.636 0.000 0.016 0.348
#> SRR1785282 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785283 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785284 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785285 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785286 1 0.5619 0.190 0.676 0.000 0.056 0.268
#> SRR1785287 1 0.5619 0.190 0.676 0.000 0.056 0.268
#> SRR1785288 1 0.5055 0.573 0.624 0.000 0.008 0.368
#> SRR1785289 1 0.5055 0.573 0.624 0.000 0.008 0.368
#> SRR1785290 2 0.5331 0.662 0.224 0.728 0.012 0.036
#> SRR1785291 2 0.5331 0.662 0.224 0.728 0.012 0.036
#> SRR1785296 4 0.5062 0.830 0.212 0.024 0.016 0.748
#> SRR1785297 4 0.5062 0.830 0.212 0.024 0.016 0.748
#> SRR1785292 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.4364 0.849 0.220 0.000 0.016 0.764
#> SRR1785295 4 0.4364 0.849 0.220 0.000 0.016 0.764
#> SRR1785298 1 0.6662 0.445 0.652 0.204 0.012 0.132
#> SRR1785299 1 0.6662 0.445 0.652 0.204 0.012 0.132
#> SRR1785300 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785301 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785304 4 0.1118 0.808 0.036 0.000 0.000 0.964
#> SRR1785305 4 0.1118 0.808 0.036 0.000 0.000 0.964
#> SRR1785306 1 0.4347 0.517 0.832 0.108 0.036 0.024
#> SRR1785307 1 0.4347 0.517 0.832 0.108 0.036 0.024
#> SRR1785302 1 0.6662 0.445 0.652 0.204 0.012 0.132
#> SRR1785303 1 0.6662 0.445 0.652 0.204 0.012 0.132
#> SRR1785308 3 0.4931 0.719 0.092 0.000 0.776 0.132
#> SRR1785309 3 0.4931 0.719 0.092 0.000 0.776 0.132
#> SRR1785310 4 0.4364 0.849 0.220 0.000 0.016 0.764
#> SRR1785311 4 0.4364 0.849 0.220 0.000 0.016 0.764
#> SRR1785312 1 0.6934 0.516 0.580 0.000 0.256 0.164
#> SRR1785313 1 0.6934 0.516 0.580 0.000 0.256 0.164
#> SRR1785314 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785315 1 0.2943 0.544 0.892 0.000 0.076 0.032
#> SRR1785318 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785317 1 0.5093 0.584 0.640 0.000 0.012 0.348
#> SRR1785324 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.928 0.000 1.000 0.000 0.000
#> SRR1785320 3 0.2983 0.841 0.068 0.000 0.892 0.040
#> SRR1785321 3 0.2983 0.841 0.068 0.000 0.892 0.040
#> SRR1785322 1 0.5203 0.582 0.636 0.000 0.016 0.348
#> SRR1785323 1 0.5203 0.582 0.636 0.000 0.016 0.348
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 2 0.2590 0.89694 0.000 0.900 0.028 0.012 0.060
#> SRR1785239 2 0.2590 0.89694 0.000 0.900 0.028 0.012 0.060
#> SRR1785240 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785241 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785242 3 0.0162 0.80718 0.000 0.000 0.996 0.004 0.000
#> SRR1785243 3 0.0162 0.80718 0.000 0.000 0.996 0.004 0.000
#> SRR1785244 1 0.1270 0.77368 0.948 0.000 0.000 0.052 0.000
#> SRR1785245 1 0.1270 0.77368 0.948 0.000 0.000 0.052 0.000
#> SRR1785246 3 0.0693 0.80943 0.008 0.000 0.980 0.000 0.012
#> SRR1785247 3 0.0693 0.80943 0.008 0.000 0.980 0.000 0.012
#> SRR1785248 2 0.2026 0.90674 0.000 0.924 0.008 0.012 0.056
#> SRR1785250 3 0.1197 0.81346 0.048 0.000 0.952 0.000 0.000
#> SRR1785251 3 0.1197 0.81346 0.048 0.000 0.952 0.000 0.000
#> SRR1785252 3 0.0162 0.80718 0.000 0.000 0.996 0.004 0.000
#> SRR1785253 3 0.0162 0.80718 0.000 0.000 0.996 0.004 0.000
#> SRR1785254 1 0.7806 0.35535 0.468 0.204 0.004 0.088 0.236
#> SRR1785255 1 0.7806 0.35535 0.468 0.204 0.004 0.088 0.236
#> SRR1785256 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785257 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785258 3 0.6160 0.00705 0.404 0.000 0.484 0.008 0.104
#> SRR1785259 3 0.6160 0.00705 0.404 0.000 0.484 0.008 0.104
#> SRR1785262 3 0.2439 0.76043 0.004 0.000 0.876 0.000 0.120
#> SRR1785263 3 0.2439 0.76043 0.004 0.000 0.876 0.000 0.120
#> SRR1785260 4 0.0404 0.74656 0.012 0.000 0.000 0.988 0.000
#> SRR1785261 4 0.0404 0.74656 0.012 0.000 0.000 0.988 0.000
#> SRR1785264 2 0.2095 0.90468 0.000 0.920 0.008 0.012 0.060
#> SRR1785265 2 0.2095 0.90468 0.000 0.920 0.008 0.012 0.060
#> SRR1785266 2 0.0324 0.92786 0.000 0.992 0.004 0.000 0.004
#> SRR1785267 2 0.0324 0.92786 0.000 0.992 0.004 0.000 0.004
#> SRR1785268 1 0.3452 0.58061 0.756 0.000 0.244 0.000 0.000
#> SRR1785269 1 0.3452 0.58061 0.756 0.000 0.244 0.000 0.000
#> SRR1785270 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785271 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785272 3 0.4235 0.47803 0.424 0.000 0.576 0.000 0.000
#> SRR1785273 3 0.4235 0.47803 0.424 0.000 0.576 0.000 0.000
#> SRR1785276 3 0.2439 0.80200 0.120 0.000 0.876 0.000 0.004
#> SRR1785277 3 0.2439 0.80200 0.120 0.000 0.876 0.000 0.004
#> SRR1785274 3 0.2972 0.75395 0.024 0.000 0.864 0.004 0.108
#> SRR1785275 3 0.2972 0.75395 0.024 0.000 0.864 0.004 0.108
#> SRR1785280 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.0162 0.78905 0.996 0.000 0.000 0.000 0.004
#> SRR1785279 1 0.0162 0.78905 0.996 0.000 0.000 0.000 0.004
#> SRR1785282 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785284 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785285 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785286 5 0.4210 0.60333 0.036 0.000 0.000 0.224 0.740
#> SRR1785287 5 0.4210 0.60333 0.036 0.000 0.000 0.224 0.740
#> SRR1785288 1 0.1270 0.77368 0.948 0.000 0.000 0.052 0.000
#> SRR1785289 1 0.1270 0.77368 0.948 0.000 0.000 0.052 0.000
#> SRR1785290 2 0.4506 0.65131 0.012 0.728 0.004 0.020 0.236
#> SRR1785291 2 0.4506 0.65131 0.012 0.728 0.004 0.020 0.236
#> SRR1785296 4 0.5843 0.77737 0.100 0.024 0.004 0.664 0.208
#> SRR1785297 4 0.5843 0.77737 0.100 0.024 0.004 0.664 0.208
#> SRR1785292 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785294 4 0.5312 0.79097 0.124 0.000 0.000 0.668 0.208
#> SRR1785295 4 0.5312 0.79097 0.124 0.000 0.000 0.668 0.208
#> SRR1785298 1 0.7806 0.35535 0.468 0.204 0.004 0.088 0.236
#> SRR1785299 1 0.7806 0.35535 0.468 0.204 0.004 0.088 0.236
#> SRR1785300 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785304 4 0.0404 0.74656 0.012 0.000 0.000 0.988 0.000
#> SRR1785305 4 0.0404 0.74656 0.012 0.000 0.000 0.988 0.000
#> SRR1785306 5 0.2445 0.81444 0.004 0.108 0.000 0.004 0.884
#> SRR1785307 5 0.2445 0.81444 0.004 0.108 0.000 0.004 0.884
#> SRR1785302 1 0.7806 0.35535 0.468 0.204 0.004 0.088 0.236
#> SRR1785303 1 0.7806 0.35535 0.468 0.204 0.004 0.088 0.236
#> SRR1785308 3 0.3521 0.70632 0.232 0.000 0.764 0.004 0.000
#> SRR1785309 3 0.3521 0.70632 0.232 0.000 0.764 0.004 0.000
#> SRR1785310 4 0.5312 0.79097 0.124 0.000 0.000 0.668 0.208
#> SRR1785311 4 0.5312 0.79097 0.124 0.000 0.000 0.668 0.208
#> SRR1785312 1 0.3452 0.58061 0.756 0.000 0.244 0.000 0.000
#> SRR1785313 1 0.3452 0.58061 0.756 0.000 0.244 0.000 0.000
#> SRR1785314 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785315 5 0.0162 0.91209 0.004 0.000 0.000 0.000 0.996
#> SRR1785318 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.79051 1.000 0.000 0.000 0.000 0.000
#> SRR1785324 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.92833 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 3 0.2439 0.80200 0.120 0.000 0.876 0.000 0.004
#> SRR1785321 3 0.2439 0.80200 0.120 0.000 0.876 0.000 0.004
#> SRR1785322 1 0.0162 0.78905 0.996 0.000 0.000 0.000 0.004
#> SRR1785323 1 0.0162 0.78905 0.996 0.000 0.000 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 2 0.1341 0.7811 0.000 0.948 0.028 0.024 0.000 NA
#> SRR1785239 2 0.1341 0.7811 0.000 0.948 0.028 0.024 0.000 NA
#> SRR1785240 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785241 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785242 3 0.0000 0.6407 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1785243 3 0.0000 0.6407 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1785244 1 0.2145 0.7533 0.900 0.000 0.000 0.028 0.000 NA
#> SRR1785245 1 0.2145 0.7533 0.900 0.000 0.000 0.028 0.000 NA
#> SRR1785246 3 0.4158 0.6517 0.004 0.000 0.588 0.004 0.004 NA
#> SRR1785247 3 0.4158 0.6517 0.004 0.000 0.588 0.004 0.004 NA
#> SRR1785248 2 0.1167 0.7940 0.000 0.960 0.008 0.020 0.000 NA
#> SRR1785250 3 0.1865 0.6455 0.040 0.000 0.920 0.000 0.000 NA
#> SRR1785251 3 0.1865 0.6455 0.040 0.000 0.920 0.000 0.000 NA
#> SRR1785252 3 0.0000 0.6407 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1785253 3 0.0000 0.6407 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1785254 1 0.7728 0.3591 0.404 0.244 0.000 0.224 0.036 NA
#> SRR1785255 1 0.7728 0.3591 0.404 0.244 0.000 0.224 0.036 NA
#> SRR1785256 1 0.0000 0.7721 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1785257 1 0.0000 0.7721 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1785258 3 0.6847 0.0846 0.388 0.044 0.456 0.032 0.028 NA
#> SRR1785259 3 0.6847 0.0846 0.388 0.044 0.456 0.032 0.028 NA
#> SRR1785262 3 0.5493 0.6094 0.000 0.000 0.488 0.004 0.112 NA
#> SRR1785263 3 0.5493 0.6094 0.000 0.000 0.488 0.004 0.112 NA
#> SRR1785260 4 0.3023 0.7712 0.000 0.000 0.000 0.768 0.000 NA
#> SRR1785261 4 0.3023 0.7712 0.000 0.000 0.000 0.768 0.000 NA
#> SRR1785264 2 0.0891 0.7884 0.000 0.968 0.008 0.024 0.000 NA
#> SRR1785265 2 0.0891 0.7884 0.000 0.968 0.008 0.024 0.000 NA
#> SRR1785266 2 0.2320 0.8287 0.000 0.864 0.000 0.004 0.000 NA
#> SRR1785267 2 0.2320 0.8287 0.000 0.864 0.000 0.004 0.000 NA
#> SRR1785268 1 0.3630 0.5648 0.756 0.000 0.212 0.000 0.000 NA
#> SRR1785269 1 0.3630 0.5648 0.756 0.000 0.212 0.000 0.000 NA
#> SRR1785270 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785271 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785272 3 0.4355 0.3077 0.420 0.000 0.556 0.000 0.000 NA
#> SRR1785273 3 0.4355 0.3077 0.420 0.000 0.556 0.000 0.000 NA
#> SRR1785276 3 0.5372 0.6513 0.112 0.000 0.484 0.000 0.000 NA
#> SRR1785277 3 0.5372 0.6513 0.112 0.000 0.484 0.000 0.000 NA
#> SRR1785274 3 0.6106 0.6078 0.008 0.036 0.492 0.032 0.032 NA
#> SRR1785275 3 0.6106 0.6078 0.008 0.036 0.492 0.032 0.032 NA
#> SRR1785280 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785281 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785278 1 0.0146 0.7710 0.996 0.000 0.000 0.000 0.000 NA
#> SRR1785279 1 0.0146 0.7710 0.996 0.000 0.000 0.000 0.000 NA
#> SRR1785282 1 0.0000 0.7721 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1785283 1 0.0000 0.7721 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1785284 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785285 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785286 5 0.3695 0.6458 0.024 0.000 0.000 0.244 0.732 NA
#> SRR1785287 5 0.3695 0.6458 0.024 0.000 0.000 0.244 0.732 NA
#> SRR1785288 1 0.2145 0.7533 0.900 0.000 0.000 0.028 0.000 NA
#> SRR1785289 1 0.2145 0.7533 0.900 0.000 0.000 0.028 0.000 NA
#> SRR1785290 2 0.3568 0.5744 0.000 0.764 0.000 0.212 0.016 NA
#> SRR1785291 2 0.3568 0.5744 0.000 0.764 0.000 0.212 0.016 NA
#> SRR1785296 4 0.2736 0.8307 0.072 0.028 0.000 0.880 0.016 NA
#> SRR1785297 4 0.2736 0.8307 0.072 0.028 0.000 0.880 0.016 NA
#> SRR1785292 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785293 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785294 4 0.2356 0.8410 0.096 0.000 0.000 0.884 0.016 NA
#> SRR1785295 4 0.2356 0.8410 0.096 0.000 0.000 0.884 0.016 NA
#> SRR1785298 1 0.7728 0.3591 0.404 0.244 0.000 0.224 0.036 NA
#> SRR1785299 1 0.7728 0.3591 0.404 0.244 0.000 0.224 0.036 NA
#> SRR1785300 1 0.0000 0.7721 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1785301 1 0.0000 0.7721 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1785304 4 0.3023 0.7712 0.000 0.000 0.000 0.768 0.000 NA
#> SRR1785305 4 0.3023 0.7712 0.000 0.000 0.000 0.768 0.000 NA
#> SRR1785306 5 0.3249 0.7900 0.000 0.128 0.000 0.044 0.824 NA
#> SRR1785307 5 0.3249 0.7900 0.000 0.128 0.000 0.044 0.824 NA
#> SRR1785302 1 0.7728 0.3591 0.404 0.244 0.000 0.224 0.036 NA
#> SRR1785303 1 0.7728 0.3591 0.404 0.244 0.000 0.224 0.036 NA
#> SRR1785308 3 0.3217 0.5288 0.224 0.000 0.768 0.000 0.000 NA
#> SRR1785309 3 0.3217 0.5288 0.224 0.000 0.768 0.000 0.000 NA
#> SRR1785310 4 0.2356 0.8410 0.096 0.000 0.000 0.884 0.016 NA
#> SRR1785311 4 0.2356 0.8410 0.096 0.000 0.000 0.884 0.016 NA
#> SRR1785312 1 0.3630 0.5648 0.756 0.000 0.212 0.000 0.000 NA
#> SRR1785313 1 0.3630 0.5648 0.756 0.000 0.212 0.000 0.000 NA
#> SRR1785314 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785315 5 0.0000 0.9115 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1785318 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785319 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785316 1 0.0363 0.7707 0.988 0.000 0.000 0.000 0.000 NA
#> SRR1785317 1 0.0363 0.7707 0.988 0.000 0.000 0.000 0.000 NA
#> SRR1785324 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785325 2 0.3221 0.8331 0.000 0.736 0.000 0.000 0.000 NA
#> SRR1785320 3 0.5372 0.6513 0.112 0.000 0.484 0.000 0.000 NA
#> SRR1785321 3 0.5372 0.6513 0.112 0.000 0.484 0.000 0.000 NA
#> SRR1785322 1 0.0146 0.7710 0.996 0.000 0.000 0.000 0.000 NA
#> SRR1785323 1 0.0146 0.7710 0.996 0.000 0.000 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["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.463 0.791 0.888 0.4642 0.524 0.524
#> 3 3 0.316 0.414 0.642 0.3616 0.706 0.497
#> 4 4 0.382 0.496 0.699 0.1351 0.843 0.595
#> 5 5 0.510 0.515 0.688 0.0773 0.895 0.637
#> 6 6 0.583 0.471 0.665 0.0459 0.928 0.688
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
#> SRR1785238 2 0.9909 0.195 0.444 0.556
#> SRR1785239 2 0.9909 0.195 0.444 0.556
#> SRR1785240 1 0.1633 0.876 0.976 0.024
#> SRR1785241 1 0.1633 0.876 0.976 0.024
#> SRR1785242 1 0.9552 0.449 0.624 0.376
#> SRR1785243 1 0.9552 0.449 0.624 0.376
#> SRR1785244 1 0.0376 0.882 0.996 0.004
#> SRR1785245 1 0.0376 0.882 0.996 0.004
#> SRR1785246 1 0.4431 0.851 0.908 0.092
#> SRR1785247 1 0.4431 0.851 0.908 0.092
#> SRR1785248 2 0.0672 0.846 0.008 0.992
#> SRR1785250 1 0.4431 0.851 0.908 0.092
#> SRR1785251 1 0.4431 0.851 0.908 0.092
#> SRR1785252 1 0.9552 0.449 0.624 0.376
#> SRR1785253 1 0.9552 0.449 0.624 0.376
#> SRR1785254 2 0.6531 0.840 0.168 0.832
#> SRR1785255 2 0.6531 0.840 0.168 0.832
#> SRR1785256 1 0.0000 0.883 1.000 0.000
#> SRR1785257 1 0.0000 0.883 1.000 0.000
#> SRR1785258 1 0.0000 0.883 1.000 0.000
#> SRR1785259 1 0.0000 0.883 1.000 0.000
#> SRR1785262 1 0.3584 0.863 0.932 0.068
#> SRR1785263 1 0.3584 0.863 0.932 0.068
#> SRR1785260 1 0.7139 0.737 0.804 0.196
#> SRR1785261 1 0.7139 0.737 0.804 0.196
#> SRR1785264 2 0.2423 0.858 0.040 0.960
#> SRR1785265 2 0.2423 0.858 0.040 0.960
#> SRR1785266 2 0.1184 0.852 0.016 0.984
#> SRR1785267 2 0.1184 0.852 0.016 0.984
#> SRR1785268 1 0.0000 0.883 1.000 0.000
#> SRR1785269 1 0.0000 0.883 1.000 0.000
#> SRR1785270 2 0.6438 0.842 0.164 0.836
#> SRR1785271 2 0.6438 0.842 0.164 0.836
#> SRR1785272 1 0.4431 0.851 0.908 0.092
#> SRR1785273 1 0.4431 0.851 0.908 0.092
#> SRR1785276 1 0.0672 0.882 0.992 0.008
#> SRR1785277 1 0.0672 0.882 0.992 0.008
#> SRR1785274 1 0.7139 0.729 0.804 0.196
#> SRR1785275 1 0.7139 0.729 0.804 0.196
#> SRR1785280 2 0.1184 0.852 0.016 0.984
#> SRR1785281 2 0.1184 0.852 0.016 0.984
#> SRR1785278 1 0.0000 0.883 1.000 0.000
#> SRR1785279 1 0.0000 0.883 1.000 0.000
#> SRR1785282 1 0.0000 0.883 1.000 0.000
#> SRR1785283 1 0.0000 0.883 1.000 0.000
#> SRR1785284 1 0.7602 0.685 0.780 0.220
#> SRR1785285 1 0.7602 0.685 0.780 0.220
#> SRR1785286 1 0.7745 0.681 0.772 0.228
#> SRR1785287 1 0.7745 0.681 0.772 0.228
#> SRR1785288 1 0.0376 0.882 0.996 0.004
#> SRR1785289 1 0.0376 0.882 0.996 0.004
#> SRR1785290 2 0.2423 0.858 0.040 0.960
#> SRR1785291 2 0.2423 0.858 0.040 0.960
#> SRR1785296 2 0.9580 0.426 0.380 0.620
#> SRR1785297 2 0.9580 0.426 0.380 0.620
#> SRR1785292 2 0.2778 0.860 0.048 0.952
#> SRR1785293 2 0.2778 0.860 0.048 0.952
#> SRR1785294 1 0.7950 0.685 0.760 0.240
#> SRR1785295 1 0.7950 0.685 0.760 0.240
#> SRR1785298 2 0.9129 0.554 0.328 0.672
#> SRR1785299 2 0.9129 0.554 0.328 0.672
#> SRR1785300 1 0.0376 0.882 0.996 0.004
#> SRR1785301 1 0.0376 0.882 0.996 0.004
#> SRR1785304 2 0.5294 0.857 0.120 0.880
#> SRR1785305 2 0.5294 0.857 0.120 0.880
#> SRR1785306 2 0.5294 0.857 0.120 0.880
#> SRR1785307 2 0.5294 0.857 0.120 0.880
#> SRR1785302 2 0.6343 0.844 0.160 0.840
#> SRR1785303 2 0.6343 0.844 0.160 0.840
#> SRR1785308 1 0.4431 0.851 0.908 0.092
#> SRR1785309 1 0.4431 0.851 0.908 0.092
#> SRR1785310 1 0.7528 0.695 0.784 0.216
#> SRR1785311 1 0.7528 0.695 0.784 0.216
#> SRR1785312 1 0.0000 0.883 1.000 0.000
#> SRR1785313 1 0.0000 0.883 1.000 0.000
#> SRR1785314 2 0.6247 0.846 0.156 0.844
#> SRR1785315 2 0.6247 0.846 0.156 0.844
#> SRR1785318 2 0.1184 0.852 0.016 0.984
#> SRR1785319 2 0.1184 0.852 0.016 0.984
#> SRR1785316 1 0.0376 0.882 0.996 0.004
#> SRR1785317 1 0.0376 0.882 0.996 0.004
#> SRR1785324 2 0.3274 0.859 0.060 0.940
#> SRR1785325 2 0.3274 0.859 0.060 0.940
#> SRR1785320 1 0.0000 0.883 1.000 0.000
#> SRR1785321 1 0.0000 0.883 1.000 0.000
#> SRR1785322 1 0.2948 0.870 0.948 0.052
#> SRR1785323 1 0.2948 0.870 0.948 0.052
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 1 0.9836 0.0873 0.420 0.268 0.312
#> SRR1785239 1 0.9836 0.0873 0.420 0.268 0.312
#> SRR1785240 1 0.6950 -0.0352 0.508 0.016 0.476
#> SRR1785241 1 0.6950 -0.0352 0.508 0.016 0.476
#> SRR1785242 1 0.9291 -0.0690 0.476 0.168 0.356
#> SRR1785243 1 0.9291 -0.0690 0.476 0.168 0.356
#> SRR1785244 3 0.5621 0.3430 0.308 0.000 0.692
#> SRR1785245 3 0.5621 0.3430 0.308 0.000 0.692
#> SRR1785246 3 0.6617 0.4800 0.388 0.012 0.600
#> SRR1785247 3 0.6617 0.4800 0.388 0.012 0.600
#> SRR1785248 2 0.1411 0.7683 0.036 0.964 0.000
#> SRR1785250 3 0.5958 0.5676 0.300 0.008 0.692
#> SRR1785251 3 0.5958 0.5676 0.300 0.008 0.692
#> SRR1785252 1 0.9311 -0.0849 0.468 0.168 0.364
#> SRR1785253 1 0.9311 -0.0849 0.468 0.168 0.364
#> SRR1785254 1 0.9154 0.1386 0.468 0.384 0.148
#> SRR1785255 1 0.9154 0.1386 0.468 0.384 0.148
#> SRR1785256 3 0.2066 0.6453 0.060 0.000 0.940
#> SRR1785257 3 0.2066 0.6453 0.060 0.000 0.940
#> SRR1785258 3 0.5138 0.5570 0.252 0.000 0.748
#> SRR1785259 3 0.5138 0.5570 0.252 0.000 0.748
#> SRR1785262 3 0.6869 0.4032 0.424 0.016 0.560
#> SRR1785263 3 0.6869 0.4032 0.424 0.016 0.560
#> SRR1785260 1 0.8141 0.1299 0.472 0.068 0.460
#> SRR1785261 1 0.8141 0.1299 0.472 0.068 0.460
#> SRR1785264 2 0.4249 0.7315 0.108 0.864 0.028
#> SRR1785265 2 0.4249 0.7315 0.108 0.864 0.028
#> SRR1785266 2 0.0237 0.7891 0.004 0.996 0.000
#> SRR1785267 2 0.0237 0.7891 0.004 0.996 0.000
#> SRR1785268 3 0.0424 0.6649 0.008 0.000 0.992
#> SRR1785269 3 0.0424 0.6649 0.008 0.000 0.992
#> SRR1785270 1 0.8972 0.0525 0.460 0.412 0.128
#> SRR1785271 1 0.8972 0.0525 0.460 0.412 0.128
#> SRR1785272 3 0.5517 0.5848 0.268 0.004 0.728
#> SRR1785273 3 0.5517 0.5848 0.268 0.004 0.728
#> SRR1785276 3 0.5366 0.5764 0.208 0.016 0.776
#> SRR1785277 3 0.5366 0.5764 0.208 0.016 0.776
#> SRR1785274 3 0.8065 0.1388 0.452 0.064 0.484
#> SRR1785275 3 0.8065 0.1388 0.452 0.064 0.484
#> SRR1785280 2 0.0237 0.7891 0.004 0.996 0.000
#> SRR1785281 2 0.0237 0.7891 0.004 0.996 0.000
#> SRR1785278 3 0.0892 0.6606 0.020 0.000 0.980
#> SRR1785279 3 0.0892 0.6606 0.020 0.000 0.980
#> SRR1785282 3 0.1529 0.6520 0.040 0.000 0.960
#> SRR1785283 3 0.1529 0.6520 0.040 0.000 0.960
#> SRR1785284 1 0.7181 0.3859 0.648 0.048 0.304
#> SRR1785285 1 0.7181 0.3859 0.648 0.048 0.304
#> SRR1785286 1 0.7112 0.4110 0.680 0.060 0.260
#> SRR1785287 1 0.7112 0.4110 0.680 0.060 0.260
#> SRR1785288 3 0.5706 0.3230 0.320 0.000 0.680
#> SRR1785289 3 0.5706 0.3230 0.320 0.000 0.680
#> SRR1785290 2 0.5122 0.6788 0.200 0.788 0.012
#> SRR1785291 2 0.5122 0.6788 0.200 0.788 0.012
#> SRR1785296 1 0.8590 0.2663 0.560 0.320 0.120
#> SRR1785297 1 0.8590 0.2663 0.560 0.320 0.120
#> SRR1785292 2 0.1964 0.7862 0.056 0.944 0.000
#> SRR1785293 2 0.1964 0.7862 0.056 0.944 0.000
#> SRR1785294 1 0.8419 0.2285 0.504 0.088 0.408
#> SRR1785295 1 0.8419 0.2285 0.504 0.088 0.408
#> SRR1785298 1 0.9004 0.2173 0.488 0.376 0.136
#> SRR1785299 1 0.9004 0.2173 0.488 0.376 0.136
#> SRR1785300 3 0.5431 0.3900 0.284 0.000 0.716
#> SRR1785301 3 0.5431 0.3900 0.284 0.000 0.716
#> SRR1785304 2 0.6994 0.3426 0.424 0.556 0.020
#> SRR1785305 2 0.6994 0.3426 0.424 0.556 0.020
#> SRR1785306 2 0.8063 0.1171 0.448 0.488 0.064
#> SRR1785307 2 0.8063 0.1171 0.448 0.488 0.064
#> SRR1785302 1 0.8686 0.0186 0.464 0.432 0.104
#> SRR1785303 1 0.8686 0.0186 0.464 0.432 0.104
#> SRR1785308 3 0.5896 0.5656 0.292 0.008 0.700
#> SRR1785309 3 0.5896 0.5656 0.292 0.008 0.700
#> SRR1785310 1 0.8093 0.2489 0.516 0.068 0.416
#> SRR1785311 1 0.8093 0.2489 0.516 0.068 0.416
#> SRR1785312 3 0.0592 0.6644 0.012 0.000 0.988
#> SRR1785313 3 0.0592 0.6644 0.012 0.000 0.988
#> SRR1785314 1 0.8277 -0.1001 0.468 0.456 0.076
#> SRR1785315 1 0.8277 -0.1001 0.468 0.456 0.076
#> SRR1785318 2 0.0237 0.7907 0.004 0.996 0.000
#> SRR1785319 2 0.0237 0.7907 0.004 0.996 0.000
#> SRR1785316 3 0.5098 0.4326 0.248 0.000 0.752
#> SRR1785317 3 0.5098 0.4326 0.248 0.000 0.752
#> SRR1785324 2 0.2448 0.7780 0.076 0.924 0.000
#> SRR1785325 2 0.2448 0.7780 0.076 0.924 0.000
#> SRR1785320 3 0.1289 0.6641 0.032 0.000 0.968
#> SRR1785321 3 0.1289 0.6641 0.032 0.000 0.968
#> SRR1785322 3 0.4235 0.6306 0.176 0.000 0.824
#> SRR1785323 3 0.4235 0.6306 0.176 0.000 0.824
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.7753 0.62921 0.168 0.156 0.608 0.068
#> SRR1785239 3 0.7753 0.62921 0.168 0.156 0.608 0.068
#> SRR1785240 4 0.7732 0.14871 0.212 0.004 0.320 0.464
#> SRR1785241 4 0.7732 0.14871 0.212 0.004 0.320 0.464
#> SRR1785242 3 0.6670 0.66852 0.168 0.100 0.688 0.044
#> SRR1785243 3 0.6670 0.66852 0.168 0.100 0.688 0.044
#> SRR1785244 1 0.6091 0.37687 0.596 0.000 0.060 0.344
#> SRR1785245 1 0.6091 0.37687 0.596 0.000 0.060 0.344
#> SRR1785246 3 0.5755 0.44508 0.444 0.000 0.528 0.028
#> SRR1785247 3 0.5755 0.44508 0.444 0.000 0.528 0.028
#> SRR1785248 2 0.2589 0.78695 0.000 0.884 0.116 0.000
#> SRR1785250 1 0.5427 -0.20959 0.544 0.004 0.444 0.008
#> SRR1785251 1 0.5427 -0.20959 0.544 0.004 0.444 0.008
#> SRR1785252 3 0.6630 0.66824 0.172 0.100 0.688 0.040
#> SRR1785253 3 0.6630 0.66824 0.172 0.100 0.688 0.040
#> SRR1785254 4 0.8008 0.55277 0.068 0.180 0.172 0.580
#> SRR1785255 4 0.8008 0.55277 0.068 0.180 0.172 0.580
#> SRR1785256 1 0.2563 0.60362 0.908 0.000 0.020 0.072
#> SRR1785257 1 0.2563 0.60362 0.908 0.000 0.020 0.072
#> SRR1785258 1 0.5511 -0.00479 0.620 0.000 0.352 0.028
#> SRR1785259 1 0.5511 -0.00479 0.620 0.000 0.352 0.028
#> SRR1785262 3 0.7125 0.49089 0.392 0.000 0.476 0.132
#> SRR1785263 3 0.7125 0.49089 0.392 0.000 0.476 0.132
#> SRR1785260 4 0.7855 0.43959 0.264 0.052 0.124 0.560
#> SRR1785261 4 0.7855 0.43959 0.264 0.052 0.124 0.560
#> SRR1785264 2 0.6276 0.60986 0.016 0.676 0.228 0.080
#> SRR1785265 2 0.6276 0.60986 0.016 0.676 0.228 0.080
#> SRR1785266 2 0.1022 0.82099 0.000 0.968 0.032 0.000
#> SRR1785267 2 0.1022 0.82099 0.000 0.968 0.032 0.000
#> SRR1785268 1 0.1661 0.60697 0.944 0.000 0.052 0.004
#> SRR1785269 1 0.1661 0.60697 0.944 0.000 0.052 0.004
#> SRR1785270 4 0.8152 0.50416 0.052 0.188 0.216 0.544
#> SRR1785271 4 0.8152 0.50416 0.052 0.188 0.216 0.544
#> SRR1785272 1 0.5152 -0.01766 0.608 0.004 0.384 0.004
#> SRR1785273 1 0.5152 -0.01766 0.608 0.004 0.384 0.004
#> SRR1785276 1 0.5549 0.18906 0.672 0.000 0.280 0.048
#> SRR1785277 1 0.5549 0.18906 0.672 0.000 0.280 0.048
#> SRR1785274 3 0.8185 0.42397 0.288 0.016 0.440 0.256
#> SRR1785275 3 0.8185 0.42397 0.288 0.016 0.440 0.256
#> SRR1785280 2 0.0921 0.82089 0.000 0.972 0.028 0.000
#> SRR1785281 2 0.0921 0.82089 0.000 0.972 0.028 0.000
#> SRR1785278 1 0.1004 0.61659 0.972 0.000 0.024 0.004
#> SRR1785279 1 0.1004 0.61659 0.972 0.000 0.024 0.004
#> SRR1785282 1 0.1406 0.61632 0.960 0.000 0.024 0.016
#> SRR1785283 1 0.1406 0.61632 0.960 0.000 0.024 0.016
#> SRR1785284 4 0.6039 0.56249 0.104 0.016 0.164 0.716
#> SRR1785285 4 0.6039 0.56249 0.104 0.016 0.164 0.716
#> SRR1785286 4 0.3802 0.60762 0.064 0.008 0.068 0.860
#> SRR1785287 4 0.3802 0.60762 0.064 0.008 0.068 0.860
#> SRR1785288 1 0.6176 0.33962 0.572 0.000 0.060 0.368
#> SRR1785289 1 0.6176 0.33962 0.572 0.000 0.060 0.368
#> SRR1785290 2 0.7196 0.25052 0.008 0.544 0.128 0.320
#> SRR1785291 2 0.7196 0.25052 0.008 0.544 0.128 0.320
#> SRR1785296 4 0.7866 0.53839 0.052 0.164 0.204 0.580
#> SRR1785297 4 0.7866 0.53839 0.052 0.164 0.204 0.580
#> SRR1785292 2 0.2450 0.79489 0.000 0.912 0.016 0.072
#> SRR1785293 2 0.2450 0.79489 0.000 0.912 0.016 0.072
#> SRR1785294 4 0.7151 0.54094 0.200 0.060 0.092 0.648
#> SRR1785295 4 0.7151 0.54094 0.200 0.060 0.092 0.648
#> SRR1785298 4 0.8015 0.53170 0.056 0.188 0.188 0.568
#> SRR1785299 4 0.8015 0.53170 0.056 0.188 0.188 0.568
#> SRR1785300 1 0.5222 0.48653 0.688 0.000 0.032 0.280
#> SRR1785301 1 0.5222 0.48653 0.688 0.000 0.032 0.280
#> SRR1785304 4 0.7010 0.37490 0.012 0.292 0.112 0.584
#> SRR1785305 4 0.7010 0.37490 0.012 0.292 0.112 0.584
#> SRR1785306 4 0.7452 0.49373 0.012 0.224 0.200 0.564
#> SRR1785307 4 0.7452 0.49373 0.012 0.224 0.200 0.564
#> SRR1785302 4 0.7092 0.52023 0.036 0.244 0.096 0.624
#> SRR1785303 4 0.7092 0.52023 0.036 0.244 0.096 0.624
#> SRR1785308 3 0.5798 0.35113 0.452 0.012 0.524 0.012
#> SRR1785309 3 0.5798 0.35113 0.452 0.012 0.524 0.012
#> SRR1785310 4 0.6643 0.53289 0.216 0.056 0.056 0.672
#> SRR1785311 4 0.6643 0.53289 0.216 0.056 0.056 0.672
#> SRR1785312 1 0.1661 0.61019 0.944 0.000 0.052 0.004
#> SRR1785313 1 0.1661 0.61019 0.944 0.000 0.052 0.004
#> SRR1785314 4 0.7340 0.49121 0.016 0.236 0.164 0.584
#> SRR1785315 4 0.7340 0.49121 0.016 0.236 0.164 0.584
#> SRR1785318 2 0.0895 0.82311 0.000 0.976 0.020 0.004
#> SRR1785319 2 0.0895 0.82311 0.000 0.976 0.020 0.004
#> SRR1785316 1 0.4508 0.54908 0.780 0.000 0.036 0.184
#> SRR1785317 1 0.4508 0.54908 0.780 0.000 0.036 0.184
#> SRR1785324 2 0.2635 0.78849 0.000 0.904 0.020 0.076
#> SRR1785325 2 0.2635 0.78849 0.000 0.904 0.020 0.076
#> SRR1785320 1 0.1970 0.61010 0.932 0.000 0.060 0.008
#> SRR1785321 1 0.1970 0.61010 0.932 0.000 0.060 0.008
#> SRR1785322 1 0.4018 0.39451 0.772 0.000 0.224 0.004
#> SRR1785323 1 0.4018 0.39451 0.772 0.000 0.224 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.6127 0.4925 0.040 0.076 0.712 0.072 0.100
#> SRR1785239 3 0.6127 0.4925 0.040 0.076 0.712 0.072 0.100
#> SRR1785240 5 0.7350 0.4637 0.100 0.004 0.232 0.124 0.540
#> SRR1785241 5 0.7350 0.4637 0.100 0.004 0.232 0.124 0.540
#> SRR1785242 3 0.3326 0.6057 0.028 0.040 0.876 0.012 0.044
#> SRR1785243 3 0.3326 0.6057 0.028 0.040 0.876 0.012 0.044
#> SRR1785244 1 0.6193 0.5250 0.592 0.000 0.016 0.256 0.136
#> SRR1785245 1 0.6193 0.5250 0.592 0.000 0.016 0.256 0.136
#> SRR1785246 3 0.6063 0.5499 0.324 0.000 0.576 0.032 0.068
#> SRR1785247 3 0.6063 0.5499 0.324 0.000 0.576 0.032 0.068
#> SRR1785248 2 0.4194 0.6912 0.000 0.780 0.172 0.020 0.028
#> SRR1785250 3 0.5806 0.5160 0.372 0.004 0.560 0.036 0.028
#> SRR1785251 3 0.5806 0.5160 0.372 0.004 0.560 0.036 0.028
#> SRR1785252 3 0.3251 0.6062 0.028 0.040 0.880 0.012 0.040
#> SRR1785253 3 0.3251 0.6062 0.028 0.040 0.880 0.012 0.040
#> SRR1785254 5 0.7198 0.3410 0.020 0.104 0.044 0.320 0.512
#> SRR1785255 5 0.7198 0.3410 0.020 0.104 0.044 0.320 0.512
#> SRR1785256 1 0.3610 0.6868 0.844 0.000 0.020 0.088 0.048
#> SRR1785257 1 0.3610 0.6868 0.844 0.000 0.020 0.088 0.048
#> SRR1785258 1 0.6445 0.0922 0.520 0.000 0.348 0.024 0.108
#> SRR1785259 1 0.6445 0.0922 0.520 0.000 0.348 0.024 0.108
#> SRR1785262 3 0.7280 0.5351 0.232 0.000 0.536 0.128 0.104
#> SRR1785263 3 0.7280 0.5351 0.232 0.000 0.536 0.128 0.104
#> SRR1785260 4 0.4782 0.5815 0.124 0.012 0.032 0.780 0.052
#> SRR1785261 4 0.4782 0.5815 0.124 0.012 0.032 0.780 0.052
#> SRR1785264 2 0.7657 0.4176 0.000 0.476 0.268 0.124 0.132
#> SRR1785265 2 0.7657 0.4176 0.000 0.476 0.268 0.124 0.132
#> SRR1785266 2 0.2026 0.7721 0.000 0.928 0.044 0.016 0.012
#> SRR1785267 2 0.2026 0.7721 0.000 0.928 0.044 0.016 0.012
#> SRR1785268 1 0.2791 0.6606 0.892 0.000 0.056 0.016 0.036
#> SRR1785269 1 0.2791 0.6606 0.892 0.000 0.056 0.016 0.036
#> SRR1785270 5 0.6364 0.5607 0.020 0.112 0.060 0.132 0.676
#> SRR1785271 5 0.6364 0.5607 0.020 0.112 0.060 0.132 0.676
#> SRR1785272 3 0.6190 0.3793 0.444 0.004 0.468 0.060 0.024
#> SRR1785273 3 0.6190 0.3793 0.444 0.004 0.468 0.060 0.024
#> SRR1785276 1 0.7040 0.2266 0.552 0.004 0.260 0.068 0.116
#> SRR1785277 1 0.7040 0.2266 0.552 0.004 0.260 0.068 0.116
#> SRR1785274 5 0.7462 0.1376 0.128 0.004 0.396 0.068 0.404
#> SRR1785275 5 0.7462 0.1376 0.128 0.004 0.396 0.068 0.404
#> SRR1785280 2 0.0968 0.7818 0.000 0.972 0.012 0.004 0.012
#> SRR1785281 2 0.0968 0.7818 0.000 0.972 0.012 0.004 0.012
#> SRR1785278 1 0.2515 0.6817 0.908 0.000 0.032 0.040 0.020
#> SRR1785279 1 0.2515 0.6817 0.908 0.000 0.032 0.040 0.020
#> SRR1785282 1 0.2899 0.6850 0.888 0.000 0.032 0.056 0.024
#> SRR1785283 1 0.2899 0.6850 0.888 0.000 0.032 0.056 0.024
#> SRR1785284 5 0.5925 0.3244 0.072 0.000 0.020 0.336 0.572
#> SRR1785285 5 0.5925 0.3244 0.072 0.000 0.020 0.336 0.572
#> SRR1785286 4 0.5444 0.1415 0.044 0.000 0.012 0.576 0.368
#> SRR1785287 4 0.5444 0.1415 0.044 0.000 0.012 0.576 0.368
#> SRR1785288 1 0.6267 0.4821 0.560 0.000 0.012 0.292 0.136
#> SRR1785289 1 0.6267 0.4821 0.560 0.000 0.012 0.292 0.136
#> SRR1785290 2 0.8012 0.0629 0.000 0.376 0.116 0.332 0.176
#> SRR1785291 2 0.8012 0.0629 0.000 0.376 0.116 0.332 0.176
#> SRR1785296 4 0.6385 0.5472 0.036 0.060 0.136 0.684 0.084
#> SRR1785297 4 0.6385 0.5472 0.036 0.060 0.136 0.684 0.084
#> SRR1785292 2 0.2067 0.7704 0.000 0.924 0.004 0.044 0.028
#> SRR1785293 2 0.2067 0.7704 0.000 0.924 0.004 0.044 0.028
#> SRR1785294 4 0.3685 0.6172 0.108 0.012 0.028 0.840 0.012
#> SRR1785295 4 0.3685 0.6172 0.108 0.012 0.028 0.840 0.012
#> SRR1785298 4 0.7238 0.4740 0.024 0.096 0.128 0.604 0.148
#> SRR1785299 4 0.7238 0.4740 0.024 0.096 0.128 0.604 0.148
#> SRR1785300 1 0.4969 0.6047 0.676 0.000 0.004 0.264 0.056
#> SRR1785301 1 0.4969 0.6047 0.676 0.000 0.004 0.264 0.056
#> SRR1785304 4 0.5645 0.4690 0.004 0.196 0.008 0.668 0.124
#> SRR1785305 4 0.5645 0.4690 0.004 0.196 0.008 0.668 0.124
#> SRR1785306 5 0.6687 0.5092 0.000 0.136 0.052 0.228 0.584
#> SRR1785307 5 0.6687 0.5092 0.000 0.136 0.052 0.228 0.584
#> SRR1785302 4 0.6928 0.1686 0.004 0.120 0.040 0.508 0.328
#> SRR1785303 4 0.6928 0.1686 0.004 0.120 0.040 0.508 0.328
#> SRR1785308 3 0.5002 0.5974 0.248 0.012 0.700 0.020 0.020
#> SRR1785309 3 0.5002 0.5974 0.248 0.012 0.700 0.020 0.020
#> SRR1785310 4 0.4072 0.6080 0.116 0.012 0.024 0.820 0.028
#> SRR1785311 4 0.4072 0.6080 0.116 0.012 0.024 0.820 0.028
#> SRR1785312 1 0.2842 0.6611 0.888 0.000 0.056 0.012 0.044
#> SRR1785313 1 0.2842 0.6611 0.888 0.000 0.056 0.012 0.044
#> SRR1785314 5 0.6292 0.4982 0.000 0.132 0.028 0.236 0.604
#> SRR1785315 5 0.6292 0.4982 0.000 0.132 0.028 0.236 0.604
#> SRR1785318 2 0.1095 0.7818 0.000 0.968 0.012 0.008 0.012
#> SRR1785319 2 0.1095 0.7818 0.000 0.968 0.012 0.008 0.012
#> SRR1785316 1 0.4980 0.6472 0.740 0.000 0.032 0.168 0.060
#> SRR1785317 1 0.4980 0.6472 0.740 0.000 0.032 0.168 0.060
#> SRR1785324 2 0.2313 0.7668 0.000 0.912 0.004 0.040 0.044
#> SRR1785325 2 0.2313 0.7668 0.000 0.912 0.004 0.040 0.044
#> SRR1785320 1 0.3584 0.6582 0.852 0.000 0.060 0.056 0.032
#> SRR1785321 1 0.3584 0.6582 0.852 0.000 0.060 0.056 0.032
#> SRR1785322 1 0.5527 0.3719 0.680 0.004 0.232 0.044 0.040
#> SRR1785323 1 0.5527 0.3719 0.680 0.004 0.232 0.044 0.040
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.708 0.5169 0.064 0.060 0.620 0.068 0.100 0.088
#> SRR1785239 3 0.708 0.5169 0.064 0.060 0.620 0.068 0.100 0.088
#> SRR1785240 5 0.654 0.4884 0.036 0.000 0.168 0.084 0.604 0.108
#> SRR1785241 5 0.654 0.4884 0.036 0.000 0.168 0.084 0.604 0.108
#> SRR1785242 3 0.259 0.6090 0.056 0.028 0.892 0.004 0.020 0.000
#> SRR1785243 3 0.259 0.6090 0.056 0.028 0.892 0.004 0.020 0.000
#> SRR1785244 6 0.656 0.9507 0.384 0.000 0.000 0.120 0.072 0.424
#> SRR1785245 6 0.656 0.9507 0.384 0.000 0.000 0.120 0.072 0.424
#> SRR1785246 3 0.748 0.4205 0.296 0.008 0.444 0.048 0.048 0.156
#> SRR1785247 3 0.748 0.4205 0.296 0.008 0.444 0.048 0.048 0.156
#> SRR1785248 2 0.538 0.6705 0.000 0.668 0.216 0.020 0.032 0.064
#> SRR1785250 3 0.636 0.2454 0.400 0.004 0.456 0.036 0.012 0.092
#> SRR1785251 3 0.636 0.2454 0.400 0.004 0.456 0.036 0.012 0.092
#> SRR1785252 3 0.273 0.6094 0.056 0.028 0.888 0.004 0.020 0.004
#> SRR1785253 3 0.273 0.6094 0.056 0.028 0.888 0.004 0.020 0.004
#> SRR1785254 5 0.670 0.3841 0.008 0.064 0.024 0.304 0.524 0.076
#> SRR1785255 5 0.670 0.3841 0.008 0.064 0.024 0.304 0.524 0.076
#> SRR1785256 1 0.468 0.3813 0.752 0.000 0.040 0.052 0.016 0.140
#> SRR1785257 1 0.468 0.3813 0.752 0.000 0.040 0.052 0.016 0.140
#> SRR1785258 1 0.659 0.1365 0.524 0.000 0.284 0.012 0.080 0.100
#> SRR1785259 1 0.659 0.1365 0.524 0.000 0.284 0.012 0.080 0.100
#> SRR1785262 3 0.831 0.4861 0.164 0.008 0.436 0.148 0.100 0.144
#> SRR1785263 3 0.831 0.4861 0.164 0.008 0.436 0.148 0.100 0.144
#> SRR1785260 4 0.460 0.5213 0.040 0.004 0.016 0.748 0.024 0.168
#> SRR1785261 4 0.460 0.5213 0.040 0.004 0.016 0.748 0.024 0.168
#> SRR1785264 2 0.823 0.3804 0.000 0.396 0.244 0.124 0.120 0.116
#> SRR1785265 2 0.823 0.3804 0.000 0.396 0.244 0.124 0.120 0.116
#> SRR1785266 2 0.333 0.7905 0.000 0.848 0.088 0.012 0.028 0.024
#> SRR1785267 2 0.333 0.7905 0.000 0.848 0.088 0.012 0.028 0.024
#> SRR1785268 1 0.184 0.5491 0.928 0.000 0.008 0.004 0.012 0.048
#> SRR1785269 1 0.184 0.5491 0.928 0.000 0.008 0.004 0.012 0.048
#> SRR1785270 5 0.437 0.6670 0.000 0.064 0.048 0.060 0.796 0.032
#> SRR1785271 5 0.437 0.6670 0.000 0.064 0.048 0.060 0.796 0.032
#> SRR1785272 1 0.667 -0.0225 0.480 0.004 0.312 0.040 0.008 0.156
#> SRR1785273 1 0.667 -0.0225 0.480 0.004 0.312 0.040 0.008 0.156
#> SRR1785276 1 0.761 0.2431 0.504 0.004 0.176 0.064 0.096 0.156
#> SRR1785277 1 0.761 0.2431 0.504 0.004 0.176 0.064 0.096 0.156
#> SRR1785274 3 0.827 0.1999 0.104 0.008 0.360 0.108 0.316 0.104
#> SRR1785275 3 0.827 0.1999 0.104 0.008 0.360 0.108 0.316 0.104
#> SRR1785280 2 0.145 0.8153 0.000 0.948 0.032 0.008 0.008 0.004
#> SRR1785281 2 0.145 0.8153 0.000 0.948 0.032 0.008 0.008 0.004
#> SRR1785278 1 0.216 0.5298 0.908 0.000 0.008 0.028 0.000 0.056
#> SRR1785279 1 0.216 0.5298 0.908 0.000 0.008 0.028 0.000 0.056
#> SRR1785282 1 0.262 0.4945 0.876 0.000 0.012 0.012 0.004 0.096
#> SRR1785283 1 0.262 0.4945 0.876 0.000 0.012 0.012 0.004 0.096
#> SRR1785284 5 0.537 0.5564 0.008 0.000 0.004 0.204 0.632 0.152
#> SRR1785285 5 0.537 0.5564 0.008 0.000 0.004 0.204 0.632 0.152
#> SRR1785286 4 0.547 -0.1039 0.004 0.000 0.008 0.456 0.452 0.080
#> SRR1785287 4 0.547 -0.1039 0.004 0.000 0.008 0.456 0.452 0.080
#> SRR1785288 6 0.663 0.9522 0.368 0.000 0.000 0.152 0.060 0.420
#> SRR1785289 6 0.663 0.9522 0.368 0.000 0.000 0.152 0.060 0.420
#> SRR1785290 4 0.807 0.1856 0.000 0.268 0.088 0.396 0.148 0.100
#> SRR1785291 4 0.807 0.1856 0.000 0.268 0.088 0.396 0.148 0.100
#> SRR1785296 4 0.442 0.5585 0.012 0.028 0.072 0.796 0.072 0.020
#> SRR1785297 4 0.442 0.5585 0.012 0.028 0.072 0.796 0.072 0.020
#> SRR1785292 2 0.307 0.7961 0.000 0.864 0.004 0.040 0.024 0.068
#> SRR1785293 2 0.307 0.7961 0.000 0.864 0.004 0.040 0.024 0.068
#> SRR1785294 4 0.385 0.5812 0.044 0.004 0.012 0.820 0.024 0.096
#> SRR1785295 4 0.385 0.5812 0.044 0.004 0.012 0.820 0.024 0.096
#> SRR1785298 4 0.637 0.4698 0.012 0.068 0.048 0.648 0.148 0.076
#> SRR1785299 4 0.637 0.4698 0.012 0.068 0.048 0.648 0.148 0.076
#> SRR1785300 1 0.589 -0.3003 0.596 0.000 0.016 0.176 0.012 0.200
#> SRR1785301 1 0.589 -0.3003 0.596 0.000 0.016 0.176 0.012 0.200
#> SRR1785304 4 0.552 0.5196 0.000 0.096 0.016 0.696 0.076 0.116
#> SRR1785305 4 0.552 0.5196 0.000 0.096 0.016 0.696 0.076 0.116
#> SRR1785306 5 0.504 0.6383 0.000 0.056 0.028 0.172 0.716 0.028
#> SRR1785307 5 0.504 0.6383 0.000 0.056 0.028 0.172 0.716 0.028
#> SRR1785302 4 0.606 0.2517 0.000 0.080 0.016 0.540 0.328 0.036
#> SRR1785303 4 0.606 0.2517 0.000 0.080 0.016 0.540 0.328 0.036
#> SRR1785308 3 0.565 0.4027 0.284 0.004 0.592 0.008 0.012 0.100
#> SRR1785309 3 0.565 0.4027 0.284 0.004 0.592 0.008 0.012 0.100
#> SRR1785310 4 0.421 0.5711 0.044 0.004 0.000 0.788 0.064 0.100
#> SRR1785311 4 0.421 0.5711 0.044 0.004 0.000 0.788 0.064 0.100
#> SRR1785312 1 0.234 0.5420 0.900 0.000 0.012 0.004 0.016 0.068
#> SRR1785313 1 0.234 0.5420 0.900 0.000 0.012 0.004 0.016 0.068
#> SRR1785314 5 0.462 0.6578 0.000 0.080 0.016 0.132 0.752 0.020
#> SRR1785315 5 0.462 0.6578 0.000 0.080 0.016 0.132 0.752 0.020
#> SRR1785318 2 0.143 0.8156 0.000 0.952 0.008 0.012 0.020 0.008
#> SRR1785319 2 0.143 0.8156 0.000 0.952 0.008 0.012 0.020 0.008
#> SRR1785316 1 0.510 -0.1061 0.640 0.000 0.008 0.060 0.016 0.276
#> SRR1785317 1 0.510 -0.1061 0.640 0.000 0.008 0.060 0.016 0.276
#> SRR1785324 2 0.311 0.7899 0.000 0.868 0.008 0.044 0.040 0.040
#> SRR1785325 2 0.311 0.7899 0.000 0.868 0.008 0.044 0.040 0.040
#> SRR1785320 1 0.373 0.4894 0.812 0.000 0.020 0.008 0.040 0.120
#> SRR1785321 1 0.373 0.4894 0.812 0.000 0.020 0.008 0.040 0.120
#> SRR1785322 1 0.529 0.4672 0.684 0.000 0.120 0.052 0.000 0.144
#> SRR1785323 1 0.529 0.4672 0.684 0.000 0.120 0.052 0.000 0.144
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.668 0.740 0.900 0.5028 0.496 0.496
#> 3 3 0.598 0.806 0.893 0.3212 0.725 0.499
#> 4 4 0.663 0.682 0.837 0.1219 0.862 0.616
#> 5 5 0.688 0.663 0.821 0.0653 0.908 0.666
#> 6 6 0.702 0.623 0.759 0.0396 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
#> SRR1785238 1 0.999 0.185 0.516 0.484
#> SRR1785239 1 0.999 0.185 0.516 0.484
#> SRR1785240 1 0.000 0.892 1.000 0.000
#> SRR1785241 1 0.000 0.892 1.000 0.000
#> SRR1785242 1 0.999 0.185 0.516 0.484
#> SRR1785243 1 0.999 0.185 0.516 0.484
#> SRR1785244 1 0.000 0.892 1.000 0.000
#> SRR1785245 1 0.000 0.892 1.000 0.000
#> SRR1785246 1 0.000 0.892 1.000 0.000
#> SRR1785247 1 0.000 0.892 1.000 0.000
#> SRR1785248 2 0.000 0.853 0.000 1.000
#> SRR1785250 1 0.000 0.892 1.000 0.000
#> SRR1785251 1 0.000 0.892 1.000 0.000
#> SRR1785252 1 0.999 0.185 0.516 0.484
#> SRR1785253 1 0.999 0.185 0.516 0.484
#> SRR1785254 2 0.000 0.853 0.000 1.000
#> SRR1785255 2 0.000 0.853 0.000 1.000
#> SRR1785256 1 0.000 0.892 1.000 0.000
#> SRR1785257 1 0.000 0.892 1.000 0.000
#> SRR1785258 1 0.000 0.892 1.000 0.000
#> SRR1785259 1 0.000 0.892 1.000 0.000
#> SRR1785262 1 0.000 0.892 1.000 0.000
#> SRR1785263 1 0.000 0.892 1.000 0.000
#> SRR1785260 2 0.999 0.258 0.484 0.516
#> SRR1785261 2 0.999 0.258 0.484 0.516
#> SRR1785264 2 0.000 0.853 0.000 1.000
#> SRR1785265 2 0.000 0.853 0.000 1.000
#> SRR1785266 2 0.000 0.853 0.000 1.000
#> SRR1785267 2 0.000 0.853 0.000 1.000
#> SRR1785268 1 0.000 0.892 1.000 0.000
#> SRR1785269 1 0.000 0.892 1.000 0.000
#> SRR1785270 2 0.000 0.853 0.000 1.000
#> SRR1785271 2 0.000 0.853 0.000 1.000
#> SRR1785272 1 0.000 0.892 1.000 0.000
#> SRR1785273 1 0.000 0.892 1.000 0.000
#> SRR1785276 1 0.000 0.892 1.000 0.000
#> SRR1785277 1 0.000 0.892 1.000 0.000
#> SRR1785274 1 0.999 0.185 0.516 0.484
#> SRR1785275 1 0.999 0.185 0.516 0.484
#> SRR1785280 2 0.000 0.853 0.000 1.000
#> SRR1785281 2 0.000 0.853 0.000 1.000
#> SRR1785278 1 0.000 0.892 1.000 0.000
#> SRR1785279 1 0.000 0.892 1.000 0.000
#> SRR1785282 1 0.000 0.892 1.000 0.000
#> SRR1785283 1 0.000 0.892 1.000 0.000
#> SRR1785284 2 0.999 0.258 0.484 0.516
#> SRR1785285 2 0.999 0.258 0.484 0.516
#> SRR1785286 2 0.999 0.258 0.484 0.516
#> SRR1785287 2 0.999 0.258 0.484 0.516
#> SRR1785288 1 0.000 0.892 1.000 0.000
#> SRR1785289 1 0.000 0.892 1.000 0.000
#> SRR1785290 2 0.000 0.853 0.000 1.000
#> SRR1785291 2 0.000 0.853 0.000 1.000
#> SRR1785296 2 0.000 0.853 0.000 1.000
#> SRR1785297 2 0.000 0.853 0.000 1.000
#> SRR1785292 2 0.000 0.853 0.000 1.000
#> SRR1785293 2 0.000 0.853 0.000 1.000
#> SRR1785294 2 0.999 0.258 0.484 0.516
#> SRR1785295 2 0.999 0.258 0.484 0.516
#> SRR1785298 2 0.000 0.853 0.000 1.000
#> SRR1785299 2 0.000 0.853 0.000 1.000
#> SRR1785300 1 0.000 0.892 1.000 0.000
#> SRR1785301 1 0.000 0.892 1.000 0.000
#> SRR1785304 2 0.000 0.853 0.000 1.000
#> SRR1785305 2 0.000 0.853 0.000 1.000
#> SRR1785306 2 0.000 0.853 0.000 1.000
#> SRR1785307 2 0.000 0.853 0.000 1.000
#> SRR1785302 2 0.000 0.853 0.000 1.000
#> SRR1785303 2 0.000 0.853 0.000 1.000
#> SRR1785308 1 0.000 0.892 1.000 0.000
#> SRR1785309 1 0.000 0.892 1.000 0.000
#> SRR1785310 2 0.999 0.258 0.484 0.516
#> SRR1785311 2 0.999 0.258 0.484 0.516
#> SRR1785312 1 0.000 0.892 1.000 0.000
#> SRR1785313 1 0.000 0.892 1.000 0.000
#> SRR1785314 2 0.000 0.853 0.000 1.000
#> SRR1785315 2 0.000 0.853 0.000 1.000
#> SRR1785318 2 0.000 0.853 0.000 1.000
#> SRR1785319 2 0.000 0.853 0.000 1.000
#> SRR1785316 1 0.000 0.892 1.000 0.000
#> SRR1785317 1 0.000 0.892 1.000 0.000
#> SRR1785324 2 0.000 0.853 0.000 1.000
#> SRR1785325 2 0.000 0.853 0.000 1.000
#> SRR1785320 1 0.000 0.892 1.000 0.000
#> SRR1785321 1 0.000 0.892 1.000 0.000
#> SRR1785322 1 0.000 0.892 1.000 0.000
#> SRR1785323 1 0.000 0.892 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.5591 0.533 0.000 0.304 0.696
#> SRR1785239 3 0.5591 0.533 0.000 0.304 0.696
#> SRR1785240 3 0.5335 0.695 0.232 0.008 0.760
#> SRR1785241 3 0.5335 0.695 0.232 0.008 0.760
#> SRR1785242 3 0.0592 0.845 0.000 0.012 0.988
#> SRR1785243 3 0.0592 0.845 0.000 0.012 0.988
#> SRR1785244 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785245 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785246 3 0.0000 0.846 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.846 0.000 0.000 1.000
#> SRR1785248 2 0.3551 0.851 0.000 0.868 0.132
#> SRR1785250 3 0.2796 0.826 0.092 0.000 0.908
#> SRR1785251 3 0.2796 0.826 0.092 0.000 0.908
#> SRR1785252 3 0.0592 0.845 0.000 0.012 0.988
#> SRR1785253 3 0.0592 0.845 0.000 0.012 0.988
#> SRR1785254 2 0.3941 0.821 0.156 0.844 0.000
#> SRR1785255 2 0.3941 0.821 0.156 0.844 0.000
#> SRR1785256 1 0.4346 0.718 0.816 0.000 0.184
#> SRR1785257 1 0.4346 0.718 0.816 0.000 0.184
#> SRR1785258 3 0.4452 0.728 0.192 0.000 0.808
#> SRR1785259 3 0.4452 0.728 0.192 0.000 0.808
#> SRR1785262 3 0.0237 0.846 0.004 0.000 0.996
#> SRR1785263 3 0.0237 0.846 0.004 0.000 0.996
#> SRR1785260 1 0.4700 0.699 0.812 0.180 0.008
#> SRR1785261 1 0.4700 0.699 0.812 0.180 0.008
#> SRR1785264 2 0.3116 0.878 0.000 0.892 0.108
#> SRR1785265 2 0.3116 0.878 0.000 0.892 0.108
#> SRR1785266 2 0.0424 0.959 0.000 0.992 0.008
#> SRR1785267 2 0.0424 0.959 0.000 0.992 0.008
#> SRR1785268 1 0.5397 0.646 0.720 0.000 0.280
#> SRR1785269 1 0.5397 0.646 0.720 0.000 0.280
#> SRR1785270 2 0.3375 0.882 0.100 0.892 0.008
#> SRR1785271 2 0.3375 0.882 0.100 0.892 0.008
#> SRR1785272 3 0.2878 0.824 0.096 0.000 0.904
#> SRR1785273 3 0.2878 0.824 0.096 0.000 0.904
#> SRR1785276 3 0.4654 0.714 0.208 0.000 0.792
#> SRR1785277 3 0.4654 0.714 0.208 0.000 0.792
#> SRR1785274 3 0.0892 0.843 0.000 0.020 0.980
#> SRR1785275 3 0.0892 0.843 0.000 0.020 0.980
#> SRR1785280 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785278 1 0.5254 0.665 0.736 0.000 0.264
#> SRR1785279 1 0.5254 0.665 0.736 0.000 0.264
#> SRR1785282 1 0.5138 0.676 0.748 0.000 0.252
#> SRR1785283 1 0.5138 0.676 0.748 0.000 0.252
#> SRR1785284 1 0.4174 0.722 0.872 0.036 0.092
#> SRR1785285 1 0.4174 0.722 0.872 0.036 0.092
#> SRR1785286 1 0.6922 0.644 0.720 0.200 0.080
#> SRR1785287 1 0.6922 0.644 0.720 0.200 0.080
#> SRR1785288 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785289 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785290 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785291 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785296 2 0.1182 0.954 0.012 0.976 0.012
#> SRR1785297 2 0.1182 0.954 0.012 0.976 0.012
#> SRR1785292 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785294 1 0.5220 0.676 0.780 0.208 0.012
#> SRR1785295 1 0.5220 0.676 0.780 0.208 0.012
#> SRR1785298 2 0.0661 0.958 0.004 0.988 0.008
#> SRR1785299 2 0.0661 0.958 0.004 0.988 0.008
#> SRR1785300 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785301 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785304 2 0.1289 0.948 0.032 0.968 0.000
#> SRR1785305 2 0.1289 0.948 0.032 0.968 0.000
#> SRR1785306 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785307 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785302 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785303 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785308 3 0.2796 0.826 0.092 0.000 0.908
#> SRR1785309 3 0.2796 0.826 0.092 0.000 0.908
#> SRR1785310 1 0.4346 0.701 0.816 0.184 0.000
#> SRR1785311 1 0.4346 0.701 0.816 0.184 0.000
#> SRR1785312 1 0.5397 0.646 0.720 0.000 0.280
#> SRR1785313 1 0.5397 0.646 0.720 0.000 0.280
#> SRR1785314 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785315 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785318 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.961 0.000 1.000 0.000
#> SRR1785316 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785317 1 0.0592 0.774 0.988 0.000 0.012
#> SRR1785324 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785325 2 0.0424 0.960 0.008 0.992 0.000
#> SRR1785320 1 0.5363 0.651 0.724 0.000 0.276
#> SRR1785321 1 0.5363 0.651 0.724 0.000 0.276
#> SRR1785322 3 0.5058 0.656 0.244 0.000 0.756
#> SRR1785323 3 0.5058 0.656 0.244 0.000 0.756
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.4500 0.4835 0.000 0.316 0.684 0.000
#> SRR1785239 3 0.4500 0.4835 0.000 0.316 0.684 0.000
#> SRR1785240 3 0.6261 0.5106 0.060 0.016 0.652 0.272
#> SRR1785241 3 0.6261 0.5106 0.060 0.016 0.652 0.272
#> SRR1785242 3 0.0592 0.7377 0.000 0.016 0.984 0.000
#> SRR1785243 3 0.0592 0.7377 0.000 0.016 0.984 0.000
#> SRR1785244 1 0.3649 0.7235 0.796 0.000 0.000 0.204
#> SRR1785245 1 0.3649 0.7235 0.796 0.000 0.000 0.204
#> SRR1785246 3 0.1854 0.7421 0.048 0.000 0.940 0.012
#> SRR1785247 3 0.1854 0.7421 0.048 0.000 0.940 0.012
#> SRR1785248 2 0.0817 0.8278 0.000 0.976 0.024 0.000
#> SRR1785250 3 0.4621 0.6048 0.284 0.000 0.708 0.008
#> SRR1785251 3 0.4621 0.6048 0.284 0.000 0.708 0.008
#> SRR1785252 3 0.0592 0.7377 0.000 0.016 0.984 0.000
#> SRR1785253 3 0.0592 0.7377 0.000 0.016 0.984 0.000
#> SRR1785254 2 0.4034 0.7398 0.004 0.804 0.012 0.180
#> SRR1785255 2 0.4034 0.7398 0.004 0.804 0.012 0.180
#> SRR1785256 1 0.0817 0.8484 0.976 0.000 0.000 0.024
#> SRR1785257 1 0.0817 0.8484 0.976 0.000 0.000 0.024
#> SRR1785258 3 0.4776 0.3503 0.376 0.000 0.624 0.000
#> SRR1785259 3 0.4776 0.3503 0.376 0.000 0.624 0.000
#> SRR1785262 3 0.1706 0.7362 0.016 0.000 0.948 0.036
#> SRR1785263 3 0.1706 0.7362 0.016 0.000 0.948 0.036
#> SRR1785260 4 0.4669 0.7807 0.100 0.092 0.004 0.804
#> SRR1785261 4 0.4669 0.7807 0.100 0.092 0.004 0.804
#> SRR1785264 2 0.0707 0.8301 0.000 0.980 0.020 0.000
#> SRR1785265 2 0.0707 0.8301 0.000 0.980 0.020 0.000
#> SRR1785266 2 0.0707 0.8301 0.000 0.980 0.020 0.000
#> SRR1785267 2 0.0707 0.8301 0.000 0.980 0.020 0.000
#> SRR1785268 1 0.0592 0.8495 0.984 0.000 0.016 0.000
#> SRR1785269 1 0.0592 0.8495 0.984 0.000 0.016 0.000
#> SRR1785270 2 0.4898 0.6749 0.000 0.716 0.024 0.260
#> SRR1785271 2 0.4898 0.6749 0.000 0.716 0.024 0.260
#> SRR1785272 3 0.5277 0.2640 0.460 0.000 0.532 0.008
#> SRR1785273 3 0.5277 0.2640 0.460 0.000 0.532 0.008
#> SRR1785276 1 0.4769 0.4363 0.684 0.000 0.308 0.008
#> SRR1785277 1 0.4769 0.4363 0.684 0.000 0.308 0.008
#> SRR1785274 3 0.3448 0.6588 0.004 0.000 0.828 0.168
#> SRR1785275 3 0.3448 0.6588 0.004 0.000 0.828 0.168
#> SRR1785280 2 0.0592 0.8309 0.000 0.984 0.016 0.000
#> SRR1785281 2 0.0592 0.8309 0.000 0.984 0.016 0.000
#> SRR1785278 1 0.0469 0.8504 0.988 0.000 0.012 0.000
#> SRR1785279 1 0.0469 0.8504 0.988 0.000 0.012 0.000
#> SRR1785282 1 0.0188 0.8506 0.996 0.000 0.004 0.000
#> SRR1785283 1 0.0188 0.8506 0.996 0.000 0.004 0.000
#> SRR1785284 4 0.4739 0.5874 0.160 0.024 0.024 0.792
#> SRR1785285 4 0.4739 0.5874 0.160 0.024 0.024 0.792
#> SRR1785286 4 0.0992 0.7026 0.004 0.008 0.012 0.976
#> SRR1785287 4 0.0992 0.7026 0.004 0.008 0.012 0.976
#> SRR1785288 1 0.3873 0.6920 0.772 0.000 0.000 0.228
#> SRR1785289 1 0.3873 0.6920 0.772 0.000 0.000 0.228
#> SRR1785290 2 0.0469 0.8304 0.000 0.988 0.012 0.000
#> SRR1785291 2 0.0469 0.8304 0.000 0.988 0.012 0.000
#> SRR1785296 4 0.5189 0.5469 0.000 0.372 0.012 0.616
#> SRR1785297 4 0.5189 0.5469 0.000 0.372 0.012 0.616
#> SRR1785292 2 0.0188 0.8280 0.000 0.996 0.000 0.004
#> SRR1785293 2 0.0188 0.8280 0.000 0.996 0.000 0.004
#> SRR1785294 4 0.4762 0.7765 0.080 0.120 0.004 0.796
#> SRR1785295 4 0.4762 0.7765 0.080 0.120 0.004 0.796
#> SRR1785298 2 0.5088 -0.0264 0.000 0.572 0.004 0.424
#> SRR1785299 2 0.5088 -0.0264 0.000 0.572 0.004 0.424
#> SRR1785300 1 0.3024 0.7829 0.852 0.000 0.000 0.148
#> SRR1785301 1 0.3024 0.7829 0.852 0.000 0.000 0.148
#> SRR1785304 4 0.5039 0.4873 0.004 0.404 0.000 0.592
#> SRR1785305 4 0.5039 0.4873 0.004 0.404 0.000 0.592
#> SRR1785306 2 0.4399 0.7113 0.000 0.760 0.016 0.224
#> SRR1785307 2 0.4399 0.7113 0.000 0.760 0.016 0.224
#> SRR1785302 2 0.3726 0.6215 0.000 0.788 0.000 0.212
#> SRR1785303 2 0.3726 0.6215 0.000 0.788 0.000 0.212
#> SRR1785308 3 0.4483 0.6040 0.284 0.004 0.712 0.000
#> SRR1785309 3 0.4483 0.6040 0.284 0.004 0.712 0.000
#> SRR1785310 4 0.4487 0.7813 0.100 0.092 0.000 0.808
#> SRR1785311 4 0.4487 0.7813 0.100 0.092 0.000 0.808
#> SRR1785312 1 0.0592 0.8495 0.984 0.000 0.016 0.000
#> SRR1785313 1 0.0592 0.8495 0.984 0.000 0.016 0.000
#> SRR1785314 2 0.4690 0.6824 0.000 0.724 0.016 0.260
#> SRR1785315 2 0.4690 0.6824 0.000 0.724 0.016 0.260
#> SRR1785318 2 0.0592 0.8309 0.000 0.984 0.016 0.000
#> SRR1785319 2 0.0592 0.8309 0.000 0.984 0.016 0.000
#> SRR1785316 1 0.1022 0.8455 0.968 0.000 0.000 0.032
#> SRR1785317 1 0.1022 0.8455 0.968 0.000 0.000 0.032
#> SRR1785324 2 0.0188 0.8280 0.000 0.996 0.000 0.004
#> SRR1785325 2 0.0188 0.8280 0.000 0.996 0.000 0.004
#> SRR1785320 1 0.0592 0.8495 0.984 0.000 0.016 0.000
#> SRR1785321 1 0.0592 0.8495 0.984 0.000 0.016 0.000
#> SRR1785322 1 0.4877 0.3559 0.664 0.000 0.328 0.008
#> SRR1785323 1 0.4877 0.3559 0.664 0.000 0.328 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.4470 0.3924 0.000 0.372 0.616 0.000 0.012
#> SRR1785239 3 0.4470 0.3924 0.000 0.372 0.616 0.000 0.012
#> SRR1785240 5 0.3734 0.6030 0.004 0.000 0.240 0.004 0.752
#> SRR1785241 5 0.3734 0.6030 0.004 0.000 0.240 0.004 0.752
#> SRR1785242 3 0.0693 0.7170 0.000 0.012 0.980 0.000 0.008
#> SRR1785243 3 0.0693 0.7170 0.000 0.012 0.980 0.000 0.008
#> SRR1785244 1 0.4433 0.7241 0.740 0.000 0.000 0.200 0.060
#> SRR1785245 1 0.4433 0.7241 0.740 0.000 0.000 0.200 0.060
#> SRR1785246 3 0.2196 0.7291 0.056 0.000 0.916 0.004 0.024
#> SRR1785247 3 0.2196 0.7291 0.056 0.000 0.916 0.004 0.024
#> SRR1785248 2 0.0865 0.8607 0.000 0.972 0.024 0.000 0.004
#> SRR1785250 3 0.4153 0.6741 0.240 0.000 0.736 0.004 0.020
#> SRR1785251 3 0.4153 0.6741 0.240 0.000 0.736 0.004 0.020
#> SRR1785252 3 0.0693 0.7170 0.000 0.012 0.980 0.000 0.008
#> SRR1785253 3 0.0693 0.7170 0.000 0.012 0.980 0.000 0.008
#> SRR1785254 5 0.4331 0.2924 0.000 0.400 0.000 0.004 0.596
#> SRR1785255 5 0.4331 0.2924 0.000 0.400 0.000 0.004 0.596
#> SRR1785256 1 0.2568 0.7993 0.900 0.000 0.012 0.064 0.024
#> SRR1785257 1 0.2568 0.7993 0.900 0.000 0.012 0.064 0.024
#> SRR1785258 3 0.4798 0.0985 0.440 0.000 0.540 0.000 0.020
#> SRR1785259 3 0.4798 0.0985 0.440 0.000 0.540 0.000 0.020
#> SRR1785262 3 0.2523 0.7137 0.028 0.000 0.908 0.024 0.040
#> SRR1785263 3 0.2523 0.7137 0.028 0.000 0.908 0.024 0.040
#> SRR1785260 4 0.0451 0.8562 0.004 0.000 0.000 0.988 0.008
#> SRR1785261 4 0.0451 0.8562 0.004 0.000 0.000 0.988 0.008
#> SRR1785264 2 0.1082 0.8577 0.000 0.964 0.028 0.000 0.008
#> SRR1785265 2 0.1082 0.8577 0.000 0.964 0.028 0.000 0.008
#> SRR1785266 2 0.0579 0.8729 0.000 0.984 0.008 0.000 0.008
#> SRR1785267 2 0.0579 0.8729 0.000 0.984 0.008 0.000 0.008
#> SRR1785268 1 0.0693 0.8009 0.980 0.000 0.008 0.000 0.012
#> SRR1785269 1 0.0693 0.8009 0.980 0.000 0.008 0.000 0.012
#> SRR1785270 5 0.3048 0.6978 0.000 0.176 0.000 0.004 0.820
#> SRR1785271 5 0.3048 0.6978 0.000 0.176 0.000 0.004 0.820
#> SRR1785272 3 0.4607 0.5150 0.368 0.000 0.616 0.004 0.012
#> SRR1785273 3 0.4607 0.5150 0.368 0.000 0.616 0.004 0.012
#> SRR1785276 1 0.5898 0.1226 0.548 0.004 0.348 0.000 0.100
#> SRR1785277 1 0.5898 0.1226 0.548 0.004 0.348 0.000 0.100
#> SRR1785274 5 0.4359 0.4014 0.004 0.000 0.412 0.000 0.584
#> SRR1785275 5 0.4359 0.4014 0.004 0.000 0.412 0.000 0.584
#> SRR1785280 2 0.0290 0.8753 0.000 0.992 0.000 0.000 0.008
#> SRR1785281 2 0.0290 0.8753 0.000 0.992 0.000 0.000 0.008
#> SRR1785278 1 0.0451 0.8048 0.988 0.000 0.000 0.008 0.004
#> SRR1785279 1 0.0451 0.8048 0.988 0.000 0.000 0.008 0.004
#> SRR1785282 1 0.0609 0.8069 0.980 0.000 0.000 0.020 0.000
#> SRR1785283 1 0.0609 0.8069 0.980 0.000 0.000 0.020 0.000
#> SRR1785284 5 0.2519 0.6341 0.016 0.000 0.000 0.100 0.884
#> SRR1785285 5 0.2519 0.6341 0.016 0.000 0.000 0.100 0.884
#> SRR1785286 5 0.4297 0.1786 0.000 0.000 0.000 0.472 0.528
#> SRR1785287 5 0.4297 0.1786 0.000 0.000 0.000 0.472 0.528
#> SRR1785288 1 0.4830 0.6655 0.684 0.000 0.000 0.256 0.060
#> SRR1785289 1 0.4830 0.6655 0.684 0.000 0.000 0.256 0.060
#> SRR1785290 2 0.1117 0.8681 0.000 0.964 0.000 0.016 0.020
#> SRR1785291 2 0.1117 0.8681 0.000 0.964 0.000 0.016 0.020
#> SRR1785296 4 0.4041 0.7632 0.000 0.176 0.004 0.780 0.040
#> SRR1785297 4 0.4041 0.7632 0.000 0.176 0.004 0.780 0.040
#> SRR1785292 2 0.0798 0.8749 0.000 0.976 0.000 0.008 0.016
#> SRR1785293 2 0.0798 0.8749 0.000 0.976 0.000 0.008 0.016
#> SRR1785294 4 0.0162 0.8585 0.004 0.000 0.000 0.996 0.000
#> SRR1785295 4 0.0162 0.8585 0.004 0.000 0.000 0.996 0.000
#> SRR1785298 2 0.5979 0.2496 0.000 0.520 0.000 0.360 0.120
#> SRR1785299 2 0.5979 0.2496 0.000 0.520 0.000 0.360 0.120
#> SRR1785300 1 0.3795 0.7470 0.780 0.000 0.000 0.192 0.028
#> SRR1785301 1 0.3795 0.7470 0.780 0.000 0.000 0.192 0.028
#> SRR1785304 4 0.3630 0.7523 0.000 0.204 0.000 0.780 0.016
#> SRR1785305 4 0.3630 0.7523 0.000 0.204 0.000 0.780 0.016
#> SRR1785306 5 0.3906 0.6172 0.000 0.292 0.000 0.004 0.704
#> SRR1785307 5 0.3906 0.6172 0.000 0.292 0.000 0.004 0.704
#> SRR1785302 2 0.5779 0.5356 0.000 0.616 0.000 0.212 0.172
#> SRR1785303 2 0.5779 0.5356 0.000 0.616 0.000 0.212 0.172
#> SRR1785308 3 0.3851 0.6929 0.212 0.004 0.768 0.000 0.016
#> SRR1785309 3 0.3851 0.6929 0.212 0.004 0.768 0.000 0.016
#> SRR1785310 4 0.0324 0.8582 0.004 0.000 0.000 0.992 0.004
#> SRR1785311 4 0.0324 0.8582 0.004 0.000 0.000 0.992 0.004
#> SRR1785312 1 0.0798 0.8014 0.976 0.000 0.008 0.000 0.016
#> SRR1785313 1 0.0798 0.8014 0.976 0.000 0.008 0.000 0.016
#> SRR1785314 5 0.3551 0.6791 0.000 0.220 0.000 0.008 0.772
#> SRR1785315 5 0.3551 0.6791 0.000 0.220 0.000 0.008 0.772
#> SRR1785318 2 0.0510 0.8749 0.000 0.984 0.000 0.000 0.016
#> SRR1785319 2 0.0510 0.8749 0.000 0.984 0.000 0.000 0.016
#> SRR1785316 1 0.2358 0.7962 0.888 0.000 0.000 0.104 0.008
#> SRR1785317 1 0.2358 0.7962 0.888 0.000 0.000 0.104 0.008
#> SRR1785324 2 0.0898 0.8739 0.000 0.972 0.000 0.008 0.020
#> SRR1785325 2 0.0898 0.8739 0.000 0.972 0.000 0.008 0.020
#> SRR1785320 1 0.0798 0.8022 0.976 0.000 0.008 0.000 0.016
#> SRR1785321 1 0.0798 0.8022 0.976 0.000 0.008 0.000 0.016
#> SRR1785322 1 0.4822 0.2231 0.632 0.000 0.340 0.012 0.016
#> SRR1785323 1 0.4822 0.2231 0.632 0.000 0.340 0.012 0.016
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.4884 0.383 0.000 0.324 0.608 0.000 0.008 NA
#> SRR1785239 3 0.4884 0.383 0.000 0.324 0.608 0.000 0.008 NA
#> SRR1785240 5 0.4464 0.584 0.000 0.000 0.140 0.000 0.712 NA
#> SRR1785241 5 0.4464 0.584 0.000 0.000 0.140 0.000 0.712 NA
#> SRR1785242 3 0.0405 0.670 0.000 0.008 0.988 0.000 0.000 NA
#> SRR1785243 3 0.0405 0.670 0.000 0.008 0.988 0.000 0.000 NA
#> SRR1785244 1 0.5915 0.641 0.572 0.000 0.000 0.108 0.048 NA
#> SRR1785245 1 0.5915 0.641 0.572 0.000 0.000 0.108 0.048 NA
#> SRR1785246 3 0.4799 0.640 0.076 0.000 0.704 0.000 0.028 NA
#> SRR1785247 3 0.4799 0.640 0.076 0.000 0.704 0.000 0.028 NA
#> SRR1785248 2 0.1478 0.827 0.000 0.944 0.032 0.000 0.004 NA
#> SRR1785250 3 0.4772 0.617 0.208 0.000 0.668 0.000 0.000 NA
#> SRR1785251 3 0.4772 0.617 0.208 0.000 0.668 0.000 0.000 NA
#> SRR1785252 3 0.0405 0.670 0.000 0.008 0.988 0.000 0.000 NA
#> SRR1785253 3 0.0405 0.670 0.000 0.008 0.988 0.000 0.000 NA
#> SRR1785254 5 0.6039 0.209 0.000 0.300 0.000 0.000 0.420 NA
#> SRR1785255 5 0.6039 0.209 0.000 0.300 0.000 0.000 0.420 NA
#> SRR1785256 1 0.3716 0.682 0.732 0.000 0.000 0.012 0.008 NA
#> SRR1785257 1 0.3716 0.682 0.732 0.000 0.000 0.012 0.008 NA
#> SRR1785258 3 0.6460 0.172 0.332 0.000 0.416 0.000 0.024 NA
#> SRR1785259 3 0.6460 0.172 0.332 0.000 0.416 0.000 0.024 NA
#> SRR1785262 3 0.4989 0.600 0.016 0.000 0.700 0.028 0.052 NA
#> SRR1785263 3 0.4989 0.600 0.016 0.000 0.700 0.028 0.052 NA
#> SRR1785260 4 0.0717 0.909 0.000 0.000 0.000 0.976 0.008 NA
#> SRR1785261 4 0.0717 0.909 0.000 0.000 0.000 0.976 0.008 NA
#> SRR1785264 2 0.1793 0.823 0.000 0.928 0.032 0.000 0.004 NA
#> SRR1785265 2 0.1793 0.823 0.000 0.928 0.032 0.000 0.004 NA
#> SRR1785266 2 0.1167 0.833 0.000 0.960 0.020 0.000 0.008 NA
#> SRR1785267 2 0.1167 0.833 0.000 0.960 0.020 0.000 0.008 NA
#> SRR1785268 1 0.1556 0.700 0.920 0.000 0.000 0.000 0.000 NA
#> SRR1785269 1 0.1556 0.700 0.920 0.000 0.000 0.000 0.000 NA
#> SRR1785270 5 0.2308 0.692 0.000 0.108 0.004 0.000 0.880 NA
#> SRR1785271 5 0.2308 0.692 0.000 0.108 0.004 0.000 0.880 NA
#> SRR1785272 3 0.5381 0.509 0.296 0.000 0.560 0.000 0.000 NA
#> SRR1785273 3 0.5381 0.509 0.296 0.000 0.560 0.000 0.000 NA
#> SRR1785276 1 0.6574 0.167 0.448 0.004 0.148 0.000 0.048 NA
#> SRR1785277 1 0.6574 0.167 0.448 0.004 0.148 0.000 0.048 NA
#> SRR1785274 5 0.6248 0.163 0.016 0.000 0.388 0.000 0.400 NA
#> SRR1785275 5 0.6248 0.163 0.016 0.000 0.388 0.000 0.400 NA
#> SRR1785280 2 0.0291 0.842 0.000 0.992 0.004 0.000 0.004 NA
#> SRR1785281 2 0.0291 0.842 0.000 0.992 0.004 0.000 0.004 NA
#> SRR1785278 1 0.0865 0.713 0.964 0.000 0.000 0.000 0.000 NA
#> SRR1785279 1 0.0865 0.713 0.964 0.000 0.000 0.000 0.000 NA
#> SRR1785282 1 0.1267 0.721 0.940 0.000 0.000 0.000 0.000 NA
#> SRR1785283 1 0.1267 0.721 0.940 0.000 0.000 0.000 0.000 NA
#> SRR1785284 5 0.2622 0.659 0.000 0.000 0.004 0.024 0.868 NA
#> SRR1785285 5 0.2622 0.659 0.000 0.000 0.004 0.024 0.868 NA
#> SRR1785286 5 0.5308 0.338 0.000 0.000 0.004 0.352 0.544 NA
#> SRR1785287 5 0.5308 0.338 0.000 0.000 0.004 0.352 0.544 NA
#> SRR1785288 1 0.6250 0.605 0.532 0.000 0.000 0.164 0.044 NA
#> SRR1785289 1 0.6250 0.605 0.532 0.000 0.000 0.164 0.044 NA
#> SRR1785290 2 0.1503 0.830 0.000 0.944 0.000 0.016 0.008 NA
#> SRR1785291 2 0.1503 0.830 0.000 0.944 0.000 0.016 0.008 NA
#> SRR1785296 4 0.3756 0.827 0.000 0.080 0.012 0.824 0.024 NA
#> SRR1785297 4 0.3756 0.827 0.000 0.080 0.012 0.824 0.024 NA
#> SRR1785292 2 0.0520 0.841 0.000 0.984 0.000 0.000 0.008 NA
#> SRR1785293 2 0.0520 0.841 0.000 0.984 0.000 0.000 0.008 NA
#> SRR1785294 4 0.0000 0.911 0.000 0.000 0.000 1.000 0.000 NA
#> SRR1785295 4 0.0000 0.911 0.000 0.000 0.000 1.000 0.000 NA
#> SRR1785298 2 0.6869 0.233 0.000 0.428 0.000 0.288 0.064 NA
#> SRR1785299 2 0.6869 0.233 0.000 0.428 0.000 0.288 0.064 NA
#> SRR1785300 1 0.4954 0.664 0.676 0.000 0.000 0.100 0.016 NA
#> SRR1785301 1 0.4954 0.664 0.676 0.000 0.000 0.100 0.016 NA
#> SRR1785304 4 0.2325 0.862 0.000 0.100 0.000 0.884 0.008 NA
#> SRR1785305 4 0.2325 0.862 0.000 0.100 0.000 0.884 0.008 NA
#> SRR1785306 5 0.3839 0.630 0.000 0.212 0.000 0.004 0.748 NA
#> SRR1785307 5 0.3839 0.630 0.000 0.212 0.000 0.004 0.748 NA
#> SRR1785302 2 0.7205 0.241 0.000 0.432 0.000 0.132 0.192 NA
#> SRR1785303 2 0.7205 0.241 0.000 0.432 0.000 0.132 0.192 NA
#> SRR1785308 3 0.4079 0.646 0.172 0.000 0.744 0.000 0.000 NA
#> SRR1785309 3 0.4079 0.646 0.172 0.000 0.744 0.000 0.000 NA
#> SRR1785310 4 0.0806 0.907 0.000 0.000 0.000 0.972 0.008 NA
#> SRR1785311 4 0.0806 0.907 0.000 0.000 0.000 0.972 0.008 NA
#> SRR1785312 1 0.2092 0.703 0.876 0.000 0.000 0.000 0.000 NA
#> SRR1785313 1 0.2092 0.703 0.876 0.000 0.000 0.000 0.000 NA
#> SRR1785314 5 0.3370 0.676 0.000 0.140 0.000 0.004 0.812 NA
#> SRR1785315 5 0.3370 0.676 0.000 0.140 0.000 0.004 0.812 NA
#> SRR1785318 2 0.0260 0.842 0.000 0.992 0.000 0.000 0.008 NA
#> SRR1785319 2 0.0260 0.842 0.000 0.992 0.000 0.000 0.008 NA
#> SRR1785316 1 0.4257 0.708 0.728 0.000 0.000 0.060 0.008 NA
#> SRR1785317 1 0.4257 0.708 0.728 0.000 0.000 0.060 0.008 NA
#> SRR1785324 2 0.0909 0.836 0.000 0.968 0.000 0.000 0.020 NA
#> SRR1785325 2 0.0909 0.836 0.000 0.968 0.000 0.000 0.020 NA
#> SRR1785320 1 0.2595 0.691 0.836 0.000 0.000 0.000 0.004 NA
#> SRR1785321 1 0.2595 0.691 0.836 0.000 0.000 0.000 0.004 NA
#> SRR1785322 1 0.5178 0.108 0.580 0.000 0.304 0.000 0.000 NA
#> SRR1785323 1 0.5178 0.108 0.580 0.000 0.304 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["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.700 0.862 0.931 0.4975 0.500 0.500
#> 3 3 0.627 0.819 0.906 0.2364 0.878 0.760
#> 4 4 0.735 0.807 0.913 0.1596 0.857 0.652
#> 5 5 0.765 0.742 0.866 0.0857 0.903 0.679
#> 6 6 0.779 0.763 0.859 0.0381 0.971 0.870
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
#> SRR1785238 2 0.2043 0.9400 0.032 0.968
#> SRR1785239 2 0.2043 0.9400 0.032 0.968
#> SRR1785240 1 0.7674 0.7184 0.776 0.224
#> SRR1785241 1 0.6887 0.7693 0.816 0.184
#> SRR1785242 2 0.2043 0.9400 0.032 0.968
#> SRR1785243 2 0.2043 0.9400 0.032 0.968
#> SRR1785244 1 0.0000 0.9173 1.000 0.000
#> SRR1785245 1 0.0000 0.9173 1.000 0.000
#> SRR1785246 2 0.2603 0.9383 0.044 0.956
#> SRR1785247 2 0.2603 0.9383 0.044 0.956
#> SRR1785248 2 0.0000 0.9300 0.000 1.000
#> SRR1785250 2 0.7219 0.7686 0.200 0.800
#> SRR1785251 2 0.7219 0.7686 0.200 0.800
#> SRR1785252 2 0.2043 0.9400 0.032 0.968
#> SRR1785253 2 0.2043 0.9400 0.032 0.968
#> SRR1785254 1 0.4022 0.8824 0.920 0.080
#> SRR1785255 1 0.1414 0.9134 0.980 0.020
#> SRR1785256 1 0.0000 0.9173 1.000 0.000
#> SRR1785257 1 0.0000 0.9173 1.000 0.000
#> SRR1785258 2 0.2603 0.9383 0.044 0.956
#> SRR1785259 2 0.2603 0.9383 0.044 0.956
#> SRR1785262 1 0.0000 0.9173 1.000 0.000
#> SRR1785263 1 0.0376 0.9165 0.996 0.004
#> SRR1785260 1 0.0000 0.9173 1.000 0.000
#> SRR1785261 1 0.0000 0.9173 1.000 0.000
#> SRR1785264 2 0.0000 0.9300 0.000 1.000
#> SRR1785265 2 0.0000 0.9300 0.000 1.000
#> SRR1785266 2 0.0000 0.9300 0.000 1.000
#> SRR1785267 2 0.0000 0.9300 0.000 1.000
#> SRR1785268 1 0.7453 0.7315 0.788 0.212
#> SRR1785269 1 0.8207 0.6647 0.744 0.256
#> SRR1785270 2 0.0000 0.9300 0.000 1.000
#> SRR1785271 2 0.0000 0.9300 0.000 1.000
#> SRR1785272 2 0.3114 0.9315 0.056 0.944
#> SRR1785273 2 0.3274 0.9286 0.060 0.940
#> SRR1785276 2 0.2043 0.9400 0.032 0.968
#> SRR1785277 2 0.2043 0.9400 0.032 0.968
#> SRR1785274 2 0.2603 0.9383 0.044 0.956
#> SRR1785275 2 0.2603 0.9383 0.044 0.956
#> SRR1785280 2 0.0000 0.9300 0.000 1.000
#> SRR1785281 2 0.0000 0.9300 0.000 1.000
#> SRR1785278 1 0.8207 0.6650 0.744 0.256
#> SRR1785279 1 0.7056 0.7579 0.808 0.192
#> SRR1785282 2 0.5059 0.8792 0.112 0.888
#> SRR1785283 2 0.6623 0.8078 0.172 0.828
#> SRR1785284 1 0.0000 0.9173 1.000 0.000
#> SRR1785285 1 0.0000 0.9173 1.000 0.000
#> SRR1785286 1 0.0000 0.9173 1.000 0.000
#> SRR1785287 1 0.0000 0.9173 1.000 0.000
#> SRR1785288 1 0.0000 0.9173 1.000 0.000
#> SRR1785289 1 0.0000 0.9173 1.000 0.000
#> SRR1785290 2 0.1633 0.9380 0.024 0.976
#> SRR1785291 2 0.1633 0.9380 0.024 0.976
#> SRR1785296 1 0.0938 0.9147 0.988 0.012
#> SRR1785297 1 0.0938 0.9147 0.988 0.012
#> SRR1785292 2 0.9944 0.0635 0.456 0.544
#> SRR1785293 2 0.9866 0.1533 0.432 0.568
#> SRR1785294 1 0.0938 0.9147 0.988 0.012
#> SRR1785295 1 0.0672 0.9158 0.992 0.008
#> SRR1785298 1 0.0938 0.9147 0.988 0.012
#> SRR1785299 1 0.0938 0.9147 0.988 0.012
#> SRR1785300 1 0.0000 0.9173 1.000 0.000
#> SRR1785301 1 0.0000 0.9173 1.000 0.000
#> SRR1785304 1 0.1414 0.9111 0.980 0.020
#> SRR1785305 1 0.1414 0.9111 0.980 0.020
#> SRR1785306 1 0.2603 0.9001 0.956 0.044
#> SRR1785307 1 0.5294 0.8400 0.880 0.120
#> SRR1785302 1 0.1414 0.9111 0.980 0.020
#> SRR1785303 1 0.1414 0.9111 0.980 0.020
#> SRR1785308 2 0.2778 0.9366 0.048 0.952
#> SRR1785309 2 0.2778 0.9366 0.048 0.952
#> SRR1785310 1 0.0000 0.9173 1.000 0.000
#> SRR1785311 1 0.0000 0.9173 1.000 0.000
#> SRR1785312 1 0.0376 0.9163 0.996 0.004
#> SRR1785313 1 0.0938 0.9130 0.988 0.012
#> SRR1785314 1 0.9087 0.5717 0.676 0.324
#> SRR1785315 1 0.9608 0.4433 0.616 0.384
#> SRR1785318 2 0.0000 0.9300 0.000 1.000
#> SRR1785319 2 0.0000 0.9300 0.000 1.000
#> SRR1785316 1 0.0000 0.9173 1.000 0.000
#> SRR1785317 1 0.0000 0.9173 1.000 0.000
#> SRR1785324 1 0.9552 0.4637 0.624 0.376
#> SRR1785325 1 0.9491 0.4823 0.632 0.368
#> SRR1785320 1 0.6801 0.7722 0.820 0.180
#> SRR1785321 1 0.6712 0.7768 0.824 0.176
#> SRR1785322 2 0.2603 0.9383 0.044 0.956
#> SRR1785323 2 0.2603 0.9383 0.044 0.956
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.4555 0.751 0.200 0.000 0.800
#> SRR1785239 3 0.4555 0.751 0.200 0.000 0.800
#> SRR1785240 1 0.6215 0.510 0.572 0.000 0.428
#> SRR1785241 1 0.6062 0.590 0.616 0.000 0.384
#> SRR1785242 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785244 1 0.0237 0.863 0.996 0.000 0.004
#> SRR1785245 1 0.0237 0.863 0.996 0.000 0.004
#> SRR1785246 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785248 3 0.4605 0.735 0.000 0.204 0.796
#> SRR1785250 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785251 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785252 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785254 1 0.2066 0.836 0.940 0.000 0.060
#> SRR1785255 1 0.0237 0.862 0.996 0.000 0.004
#> SRR1785256 1 0.4605 0.781 0.796 0.000 0.204
#> SRR1785257 1 0.4605 0.781 0.796 0.000 0.204
#> SRR1785258 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785259 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785262 1 0.4605 0.781 0.796 0.000 0.204
#> SRR1785263 1 0.4654 0.780 0.792 0.000 0.208
#> SRR1785260 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785261 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785264 3 0.5020 0.742 0.012 0.192 0.796
#> SRR1785265 3 0.5200 0.746 0.020 0.184 0.796
#> SRR1785266 3 0.4931 0.705 0.000 0.232 0.768
#> SRR1785267 3 0.4750 0.723 0.000 0.216 0.784
#> SRR1785268 1 0.6180 0.533 0.584 0.000 0.416
#> SRR1785269 1 0.6280 0.437 0.540 0.000 0.460
#> SRR1785270 2 0.5517 0.624 0.004 0.728 0.268
#> SRR1785271 2 0.5591 0.557 0.000 0.696 0.304
#> SRR1785272 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785273 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785276 3 0.4555 0.751 0.200 0.000 0.800
#> SRR1785277 3 0.4555 0.751 0.200 0.000 0.800
#> SRR1785274 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785275 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785280 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785278 1 0.6252 0.468 0.556 0.000 0.444
#> SRR1785279 1 0.6095 0.568 0.608 0.000 0.392
#> SRR1785282 3 0.0237 0.898 0.004 0.000 0.996
#> SRR1785283 3 0.0237 0.898 0.004 0.000 0.996
#> SRR1785284 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785285 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785286 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785287 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785288 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785290 3 0.4605 0.748 0.204 0.000 0.796
#> SRR1785291 3 0.4605 0.748 0.204 0.000 0.796
#> SRR1785296 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785297 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785292 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785294 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785295 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785298 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785299 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785300 1 0.4555 0.782 0.800 0.000 0.200
#> SRR1785301 1 0.4555 0.782 0.800 0.000 0.200
#> SRR1785304 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785305 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785306 1 0.3755 0.779 0.872 0.120 0.008
#> SRR1785307 1 0.4519 0.765 0.852 0.116 0.032
#> SRR1785302 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785303 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785308 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785309 3 0.0000 0.899 0.000 0.000 1.000
#> SRR1785310 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785311 1 0.0000 0.863 1.000 0.000 0.000
#> SRR1785312 1 0.4605 0.781 0.796 0.000 0.204
#> SRR1785313 1 0.4702 0.777 0.788 0.000 0.212
#> SRR1785314 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785315 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785318 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785316 1 0.0237 0.863 0.996 0.000 0.004
#> SRR1785317 1 0.0892 0.858 0.980 0.000 0.020
#> SRR1785324 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.942 0.000 1.000 0.000
#> SRR1785320 1 0.6062 0.589 0.616 0.000 0.384
#> SRR1785321 1 0.6045 0.596 0.620 0.000 0.380
#> SRR1785322 3 0.0237 0.898 0.004 0.000 0.996
#> SRR1785323 3 0.0237 0.898 0.004 0.000 0.996
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785239 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785240 4 0.7064 0.420 0.208 0.000 0.220 0.572
#> SRR1785241 4 0.6785 0.490 0.208 0.000 0.184 0.608
#> SRR1785242 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785243 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785244 4 0.0707 0.911 0.020 0.000 0.000 0.980
#> SRR1785245 4 0.0592 0.913 0.016 0.000 0.000 0.984
#> SRR1785246 1 0.4830 0.346 0.608 0.000 0.392 0.000
#> SRR1785247 1 0.4776 0.391 0.624 0.000 0.376 0.000
#> SRR1785248 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785250 1 0.4304 0.586 0.716 0.000 0.284 0.000
#> SRR1785251 1 0.4250 0.599 0.724 0.000 0.276 0.000
#> SRR1785252 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785253 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785254 4 0.1474 0.883 0.000 0.000 0.052 0.948
#> SRR1785255 4 0.0188 0.916 0.000 0.000 0.004 0.996
#> SRR1785256 4 0.3726 0.751 0.212 0.000 0.000 0.788
#> SRR1785257 4 0.3801 0.742 0.220 0.000 0.000 0.780
#> SRR1785258 1 0.2345 0.791 0.900 0.000 0.100 0.000
#> SRR1785259 1 0.4103 0.590 0.744 0.000 0.256 0.000
#> SRR1785262 4 0.3688 0.754 0.208 0.000 0.000 0.792
#> SRR1785263 4 0.3870 0.751 0.208 0.000 0.004 0.788
#> SRR1785260 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785261 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785264 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785265 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785266 3 0.3528 0.739 0.000 0.192 0.808 0.000
#> SRR1785267 3 0.3311 0.760 0.000 0.172 0.828 0.000
#> SRR1785268 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785269 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785270 2 0.4989 0.310 0.000 0.528 0.472 0.000
#> SRR1785271 2 0.5000 0.247 0.000 0.504 0.496 0.000
#> SRR1785272 3 0.4855 0.347 0.400 0.000 0.600 0.000
#> SRR1785273 3 0.4761 0.423 0.372 0.000 0.628 0.000
#> SRR1785276 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785277 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785274 3 0.3528 0.747 0.192 0.000 0.808 0.000
#> SRR1785275 3 0.3610 0.738 0.200 0.000 0.800 0.000
#> SRR1785280 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785279 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785282 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785284 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785285 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785286 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785287 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785288 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785289 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785290 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> SRR1785291 3 0.0188 0.865 0.000 0.000 0.996 0.004
#> SRR1785296 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785297 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785292 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785295 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785298 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785299 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785300 4 0.3688 0.754 0.208 0.000 0.000 0.792
#> SRR1785301 4 0.3688 0.754 0.208 0.000 0.000 0.792
#> SRR1785304 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785305 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785306 4 0.3731 0.798 0.000 0.120 0.036 0.844
#> SRR1785307 4 0.5423 0.693 0.000 0.116 0.144 0.740
#> SRR1785302 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785303 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785308 3 0.3219 0.774 0.164 0.000 0.836 0.000
#> SRR1785309 3 0.3356 0.764 0.176 0.000 0.824 0.000
#> SRR1785310 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785311 4 0.0000 0.918 0.000 0.000 0.000 1.000
#> SRR1785312 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785313 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785314 2 0.0921 0.887 0.000 0.972 0.028 0.000
#> SRR1785315 2 0.0469 0.897 0.000 0.988 0.012 0.000
#> SRR1785318 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785316 4 0.0336 0.916 0.008 0.000 0.000 0.992
#> SRR1785317 4 0.0817 0.909 0.024 0.000 0.000 0.976
#> SRR1785324 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.902 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.858 1.000 0.000 0.000 0.000
#> SRR1785322 3 0.3649 0.735 0.204 0.000 0.796 0.000
#> SRR1785323 3 0.3649 0.735 0.204 0.000 0.796 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.0000 0.8373 0.000 0.000 1.000 0.000 0.000
#> SRR1785239 3 0.0000 0.8373 0.000 0.000 1.000 0.000 0.000
#> SRR1785240 5 0.1798 0.6090 0.004 0.000 0.064 0.004 0.928
#> SRR1785241 5 0.1857 0.6127 0.004 0.000 0.060 0.008 0.928
#> SRR1785242 3 0.1544 0.8230 0.000 0.000 0.932 0.000 0.068
#> SRR1785243 3 0.1544 0.8230 0.000 0.000 0.932 0.000 0.068
#> SRR1785244 4 0.4151 0.3884 0.004 0.000 0.000 0.652 0.344
#> SRR1785245 4 0.4084 0.4272 0.004 0.000 0.000 0.668 0.328
#> SRR1785246 1 0.6333 0.4396 0.496 0.000 0.328 0.000 0.176
#> SRR1785247 1 0.6284 0.4610 0.508 0.000 0.320 0.000 0.172
#> SRR1785248 3 0.1544 0.8230 0.000 0.000 0.932 0.000 0.068
#> SRR1785250 1 0.6269 0.5396 0.528 0.000 0.188 0.000 0.284
#> SRR1785251 1 0.6111 0.5706 0.560 0.000 0.180 0.000 0.260
#> SRR1785252 3 0.1671 0.8227 0.000 0.000 0.924 0.000 0.076
#> SRR1785253 3 0.1671 0.8227 0.000 0.000 0.924 0.000 0.076
#> SRR1785254 4 0.1341 0.8715 0.000 0.000 0.056 0.944 0.000
#> SRR1785255 4 0.0162 0.9192 0.000 0.000 0.004 0.996 0.000
#> SRR1785256 5 0.3282 0.6985 0.008 0.000 0.000 0.188 0.804
#> SRR1785257 5 0.3282 0.6985 0.008 0.000 0.000 0.188 0.804
#> SRR1785258 5 0.4138 0.4342 0.276 0.000 0.016 0.000 0.708
#> SRR1785259 5 0.4268 0.4426 0.268 0.000 0.024 0.000 0.708
#> SRR1785262 5 0.3196 0.6985 0.004 0.000 0.000 0.192 0.804
#> SRR1785263 5 0.3196 0.6985 0.004 0.000 0.000 0.192 0.804
#> SRR1785260 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785261 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785264 3 0.0000 0.8373 0.000 0.000 1.000 0.000 0.000
#> SRR1785265 3 0.0000 0.8373 0.000 0.000 1.000 0.000 0.000
#> SRR1785266 3 0.3039 0.7329 0.000 0.192 0.808 0.000 0.000
#> SRR1785267 3 0.2852 0.7502 0.000 0.172 0.828 0.000 0.000
#> SRR1785268 1 0.1671 0.7996 0.924 0.000 0.000 0.000 0.076
#> SRR1785269 1 0.1671 0.7996 0.924 0.000 0.000 0.000 0.076
#> SRR1785270 2 0.7366 0.1134 0.072 0.404 0.396 0.000 0.128
#> SRR1785271 3 0.7360 -0.1559 0.072 0.380 0.420 0.000 0.128
#> SRR1785272 3 0.5958 0.3868 0.200 0.000 0.592 0.000 0.208
#> SRR1785273 3 0.5725 0.4641 0.156 0.000 0.620 0.000 0.224
#> SRR1785276 3 0.0162 0.8372 0.004 0.000 0.996 0.000 0.000
#> SRR1785277 3 0.0290 0.8367 0.008 0.000 0.992 0.000 0.000
#> SRR1785274 5 0.4440 -0.1190 0.004 0.000 0.468 0.000 0.528
#> SRR1785275 5 0.4425 -0.0739 0.004 0.000 0.452 0.000 0.544
#> SRR1785280 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.2648 0.7823 0.848 0.000 0.000 0.000 0.152
#> SRR1785279 1 0.2648 0.7823 0.848 0.000 0.000 0.000 0.152
#> SRR1785282 1 0.2966 0.7583 0.816 0.000 0.000 0.000 0.184
#> SRR1785283 1 0.2852 0.7691 0.828 0.000 0.000 0.000 0.172
#> SRR1785284 4 0.2329 0.8139 0.000 0.000 0.000 0.876 0.124
#> SRR1785285 4 0.2329 0.8139 0.000 0.000 0.000 0.876 0.124
#> SRR1785286 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785287 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785288 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785289 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785290 3 0.0000 0.8373 0.000 0.000 1.000 0.000 0.000
#> SRR1785291 3 0.0290 0.8353 0.000 0.000 0.992 0.008 0.000
#> SRR1785296 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785297 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785292 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785294 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785295 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785298 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785299 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785300 5 0.3884 0.6325 0.004 0.000 0.000 0.288 0.708
#> SRR1785301 5 0.3884 0.6325 0.004 0.000 0.000 0.288 0.708
#> SRR1785304 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785305 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785306 4 0.6414 0.5254 0.072 0.052 0.016 0.636 0.224
#> SRR1785307 4 0.7355 0.4321 0.072 0.052 0.072 0.580 0.224
#> SRR1785302 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785303 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785308 3 0.3491 0.7323 0.004 0.000 0.768 0.000 0.228
#> SRR1785309 3 0.3579 0.7203 0.004 0.000 0.756 0.000 0.240
#> SRR1785310 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785311 4 0.0000 0.9219 0.000 0.000 0.000 1.000 0.000
#> SRR1785312 1 0.1671 0.7996 0.924 0.000 0.000 0.000 0.076
#> SRR1785313 1 0.1671 0.7996 0.924 0.000 0.000 0.000 0.076
#> SRR1785314 2 0.2166 0.8801 0.072 0.912 0.012 0.000 0.004
#> SRR1785315 2 0.2054 0.8828 0.072 0.916 0.008 0.000 0.004
#> SRR1785318 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 4 0.0671 0.9095 0.016 0.000 0.000 0.980 0.004
#> SRR1785317 4 0.1117 0.8956 0.020 0.000 0.000 0.964 0.016
#> SRR1785324 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.9265 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 1 0.1965 0.7994 0.904 0.000 0.000 0.000 0.096
#> SRR1785321 1 0.1908 0.8002 0.908 0.000 0.000 0.000 0.092
#> SRR1785322 3 0.3455 0.6796 0.008 0.000 0.784 0.000 0.208
#> SRR1785323 3 0.3621 0.6900 0.020 0.000 0.788 0.000 0.192
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.0000 0.815 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785239 3 0.0000 0.815 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785240 6 0.0000 0.622 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1785241 6 0.0000 0.622 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1785242 3 0.2912 0.756 0.000 0.000 0.784 0.000 0.216 0.000
#> SRR1785243 3 0.2912 0.756 0.000 0.000 0.784 0.000 0.216 0.000
#> SRR1785244 4 0.4379 0.223 0.004 0.000 0.000 0.576 0.020 0.400
#> SRR1785245 4 0.4343 0.271 0.004 0.000 0.000 0.592 0.020 0.384
#> SRR1785246 1 0.5195 0.380 0.540 0.000 0.360 0.000 0.000 0.100
#> SRR1785247 1 0.5015 0.408 0.564 0.000 0.352 0.000 0.000 0.084
#> SRR1785248 3 0.2762 0.764 0.000 0.000 0.804 0.000 0.196 0.000
#> SRR1785250 1 0.6398 0.514 0.532 0.000 0.068 0.000 0.256 0.144
#> SRR1785251 1 0.6004 0.555 0.576 0.000 0.060 0.000 0.256 0.108
#> SRR1785252 3 0.3161 0.754 0.000 0.000 0.776 0.000 0.216 0.008
#> SRR1785253 3 0.3161 0.754 0.000 0.000 0.776 0.000 0.216 0.008
#> SRR1785254 4 0.1909 0.872 0.000 0.000 0.052 0.920 0.024 0.004
#> SRR1785255 4 0.0146 0.928 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR1785256 6 0.2632 0.728 0.004 0.000 0.000 0.164 0.000 0.832
#> SRR1785257 6 0.2632 0.728 0.004 0.000 0.000 0.164 0.000 0.832
#> SRR1785258 6 0.3320 0.569 0.212 0.000 0.016 0.000 0.000 0.772
#> SRR1785259 6 0.3374 0.572 0.208 0.000 0.020 0.000 0.000 0.772
#> SRR1785262 6 0.2527 0.727 0.000 0.000 0.000 0.168 0.000 0.832
#> SRR1785263 6 0.2527 0.727 0.000 0.000 0.000 0.168 0.000 0.832
#> SRR1785260 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785261 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785264 3 0.0000 0.815 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785265 3 0.0000 0.815 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785266 3 0.2730 0.721 0.000 0.192 0.808 0.000 0.000 0.000
#> SRR1785267 3 0.2562 0.738 0.000 0.172 0.828 0.000 0.000 0.000
#> SRR1785268 1 0.0547 0.790 0.980 0.000 0.000 0.000 0.000 0.020
#> SRR1785269 1 0.0547 0.790 0.980 0.000 0.000 0.000 0.000 0.020
#> SRR1785270 5 0.4882 0.842 0.000 0.076 0.044 0.000 0.712 0.168
#> SRR1785271 5 0.4893 0.841 0.000 0.072 0.048 0.000 0.712 0.168
#> SRR1785272 3 0.6034 0.458 0.200 0.000 0.588 0.000 0.052 0.160
#> SRR1785273 3 0.5880 0.516 0.164 0.000 0.612 0.000 0.052 0.172
#> SRR1785276 3 0.0458 0.815 0.016 0.000 0.984 0.000 0.000 0.000
#> SRR1785277 3 0.0632 0.814 0.024 0.000 0.976 0.000 0.000 0.000
#> SRR1785274 6 0.3847 -0.197 0.000 0.000 0.456 0.000 0.000 0.544
#> SRR1785275 6 0.3817 -0.128 0.000 0.000 0.432 0.000 0.000 0.568
#> SRR1785280 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.2048 0.775 0.880 0.000 0.000 0.000 0.000 0.120
#> SRR1785279 1 0.2048 0.775 0.880 0.000 0.000 0.000 0.000 0.120
#> SRR1785282 1 0.2597 0.737 0.824 0.000 0.000 0.000 0.000 0.176
#> SRR1785283 1 0.2491 0.748 0.836 0.000 0.000 0.000 0.000 0.164
#> SRR1785284 4 0.2527 0.758 0.000 0.000 0.000 0.832 0.000 0.168
#> SRR1785285 4 0.2527 0.758 0.000 0.000 0.000 0.832 0.000 0.168
#> SRR1785286 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785287 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785288 4 0.0547 0.921 0.000 0.000 0.000 0.980 0.020 0.000
#> SRR1785289 4 0.0547 0.921 0.000 0.000 0.000 0.980 0.020 0.000
#> SRR1785290 3 0.0000 0.815 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785291 3 0.0260 0.814 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR1785296 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785297 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785292 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785294 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785295 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785298 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785299 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785300 6 0.2996 0.688 0.000 0.000 0.000 0.228 0.000 0.772
#> SRR1785301 6 0.2996 0.688 0.000 0.000 0.000 0.228 0.000 0.772
#> SRR1785304 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785305 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785306 5 0.4738 0.818 0.000 0.028 0.004 0.044 0.696 0.228
#> SRR1785307 5 0.4826 0.822 0.000 0.024 0.016 0.036 0.696 0.228
#> SRR1785302 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785303 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785308 3 0.5594 0.652 0.020 0.000 0.588 0.000 0.268 0.124
#> SRR1785309 3 0.5726 0.634 0.020 0.000 0.572 0.000 0.268 0.140
#> SRR1785310 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785311 4 0.0000 0.931 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785312 1 0.0547 0.790 0.980 0.000 0.000 0.000 0.000 0.020
#> SRR1785313 1 0.0547 0.790 0.980 0.000 0.000 0.000 0.000 0.020
#> SRR1785314 5 0.3351 0.699 0.000 0.288 0.000 0.000 0.712 0.000
#> SRR1785315 5 0.3351 0.699 0.000 0.288 0.000 0.000 0.712 0.000
#> SRR1785318 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 4 0.2288 0.858 0.028 0.000 0.000 0.896 0.072 0.004
#> SRR1785317 4 0.2669 0.843 0.032 0.000 0.000 0.880 0.072 0.016
#> SRR1785324 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785320 1 0.1267 0.795 0.940 0.000 0.000 0.000 0.000 0.060
#> SRR1785321 1 0.1267 0.795 0.940 0.000 0.000 0.000 0.000 0.060
#> SRR1785322 3 0.3825 0.692 0.016 0.000 0.776 0.000 0.036 0.172
#> SRR1785323 3 0.3819 0.708 0.028 0.000 0.788 0.000 0.032 0.152
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.493 0.725 0.828 0.3645 0.518 0.518
#> 3 3 0.200 0.398 0.709 0.6033 0.691 0.467
#> 4 4 0.278 0.447 0.672 0.0940 0.683 0.336
#> 5 5 0.469 0.533 0.692 0.2044 0.789 0.417
#> 6 6 0.520 0.391 0.596 0.0343 0.868 0.477
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 1 0.9998 -0.5955 0.508 0.492
#> SRR1785239 2 0.9998 0.6170 0.492 0.508
#> SRR1785240 1 0.1414 0.9110 0.980 0.020
#> SRR1785241 1 0.1414 0.9110 0.980 0.020
#> SRR1785242 2 0.9983 0.6484 0.476 0.524
#> SRR1785243 2 0.9983 0.6484 0.476 0.524
#> SRR1785244 1 0.0000 0.9132 1.000 0.000
#> SRR1785245 1 0.0000 0.9132 1.000 0.000
#> SRR1785246 1 0.7219 0.5484 0.800 0.200
#> SRR1785247 1 0.7219 0.5484 0.800 0.200
#> SRR1785248 2 0.2603 0.5441 0.044 0.956
#> SRR1785250 2 0.9993 0.6454 0.484 0.516
#> SRR1785251 2 0.9993 0.6454 0.484 0.516
#> SRR1785252 2 0.9983 0.6484 0.476 0.524
#> SRR1785253 2 0.9983 0.6484 0.476 0.524
#> SRR1785254 1 0.0672 0.9134 0.992 0.008
#> SRR1785255 1 0.0672 0.9134 0.992 0.008
#> SRR1785256 1 0.0672 0.9099 0.992 0.008
#> SRR1785257 1 0.0672 0.9099 0.992 0.008
#> SRR1785258 1 0.0672 0.9134 0.992 0.008
#> SRR1785259 1 0.0672 0.9134 0.992 0.008
#> SRR1785262 1 0.7376 0.5448 0.792 0.208
#> SRR1785263 1 0.7376 0.5448 0.792 0.208
#> SRR1785260 2 0.9993 0.6454 0.484 0.516
#> SRR1785261 2 0.9993 0.6454 0.484 0.516
#> SRR1785264 2 0.9866 0.6431 0.432 0.568
#> SRR1785265 2 0.9866 0.6431 0.432 0.568
#> SRR1785266 2 0.2236 0.5441 0.036 0.964
#> SRR1785267 2 0.2236 0.5441 0.036 0.964
#> SRR1785268 1 0.0938 0.9068 0.988 0.012
#> SRR1785269 1 0.0938 0.9068 0.988 0.012
#> SRR1785270 1 0.1414 0.9110 0.980 0.020
#> SRR1785271 1 0.1414 0.9110 0.980 0.020
#> SRR1785272 2 0.9996 0.6413 0.488 0.512
#> SRR1785273 2 0.9996 0.6413 0.488 0.512
#> SRR1785276 1 0.0672 0.9134 0.992 0.008
#> SRR1785277 1 0.0672 0.9134 0.992 0.008
#> SRR1785274 1 0.1184 0.9126 0.984 0.016
#> SRR1785275 1 0.1184 0.9126 0.984 0.016
#> SRR1785280 2 0.1633 0.5459 0.024 0.976
#> SRR1785281 2 0.1633 0.5459 0.024 0.976
#> SRR1785278 1 0.0000 0.9132 1.000 0.000
#> SRR1785279 1 0.0000 0.9132 1.000 0.000
#> SRR1785282 1 0.0000 0.9132 1.000 0.000
#> SRR1785283 1 0.0000 0.9132 1.000 0.000
#> SRR1785284 1 0.1414 0.9110 0.980 0.020
#> SRR1785285 1 0.1414 0.9110 0.980 0.020
#> SRR1785286 1 0.1414 0.9110 0.980 0.020
#> SRR1785287 1 0.1414 0.9110 0.980 0.020
#> SRR1785288 1 0.0376 0.9130 0.996 0.004
#> SRR1785289 1 0.0376 0.9130 0.996 0.004
#> SRR1785290 2 0.9970 0.6505 0.468 0.532
#> SRR1785291 2 0.9970 0.6505 0.468 0.532
#> SRR1785296 2 0.9988 0.6421 0.480 0.520
#> SRR1785297 2 0.9983 0.6484 0.476 0.524
#> SRR1785292 2 0.1633 0.5459 0.024 0.976
#> SRR1785293 2 0.1633 0.5459 0.024 0.976
#> SRR1785294 2 0.9983 0.6484 0.476 0.524
#> SRR1785295 2 0.9983 0.6484 0.476 0.524
#> SRR1785298 1 0.9044 0.1306 0.680 0.320
#> SRR1785299 1 0.9044 0.1306 0.680 0.320
#> SRR1785300 1 0.0376 0.9130 0.996 0.004
#> SRR1785301 1 0.0376 0.9130 0.996 0.004
#> SRR1785304 2 0.9983 0.6484 0.476 0.524
#> SRR1785305 2 0.9983 0.6484 0.476 0.524
#> SRR1785306 1 0.1414 0.9110 0.980 0.020
#> SRR1785307 1 0.1414 0.9110 0.980 0.020
#> SRR1785302 1 0.0938 0.9118 0.988 0.012
#> SRR1785303 1 0.0938 0.9118 0.988 0.012
#> SRR1785308 2 0.9996 0.6413 0.488 0.512
#> SRR1785309 2 0.9996 0.6413 0.488 0.512
#> SRR1785310 1 0.0938 0.9118 0.988 0.012
#> SRR1785311 1 0.0938 0.9118 0.988 0.012
#> SRR1785312 1 0.0938 0.9068 0.988 0.012
#> SRR1785313 1 0.0938 0.9068 0.988 0.012
#> SRR1785314 1 0.1414 0.9110 0.980 0.020
#> SRR1785315 1 0.1414 0.9110 0.980 0.020
#> SRR1785318 2 0.1633 0.5459 0.024 0.976
#> SRR1785319 2 0.1633 0.5459 0.024 0.976
#> SRR1785316 1 0.0376 0.9130 0.996 0.004
#> SRR1785317 1 0.0376 0.9130 0.996 0.004
#> SRR1785324 2 0.9963 0.0376 0.464 0.536
#> SRR1785325 2 0.9963 0.0376 0.464 0.536
#> SRR1785320 1 0.0938 0.9068 0.988 0.012
#> SRR1785321 1 0.0938 0.9068 0.988 0.012
#> SRR1785322 1 0.6801 0.6067 0.820 0.180
#> SRR1785323 1 0.5294 0.7367 0.880 0.120
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.9371 0.165 0.188 0.324 0.488
#> SRR1785239 3 0.9371 0.165 0.188 0.324 0.488
#> SRR1785240 1 0.4605 0.518 0.796 0.000 0.204
#> SRR1785241 1 0.4605 0.518 0.796 0.000 0.204
#> SRR1785242 3 0.5875 0.365 0.056 0.160 0.784
#> SRR1785243 3 0.5875 0.365 0.056 0.160 0.784
#> SRR1785244 1 0.6355 0.506 0.696 0.024 0.280
#> SRR1785245 1 0.6355 0.506 0.696 0.024 0.280
#> SRR1785246 3 0.5850 0.412 0.188 0.040 0.772
#> SRR1785247 3 0.5850 0.412 0.188 0.040 0.772
#> SRR1785248 2 0.1163 0.723 0.028 0.972 0.000
#> SRR1785250 3 0.3181 0.478 0.024 0.064 0.912
#> SRR1785251 3 0.3181 0.478 0.024 0.064 0.912
#> SRR1785252 3 0.5875 0.365 0.056 0.160 0.784
#> SRR1785253 3 0.5875 0.365 0.056 0.160 0.784
#> SRR1785254 1 0.3234 0.591 0.908 0.020 0.072
#> SRR1785255 1 0.3502 0.588 0.896 0.020 0.084
#> SRR1785256 3 0.6307 -0.177 0.488 0.000 0.512
#> SRR1785257 3 0.6307 -0.177 0.488 0.000 0.512
#> SRR1785258 3 0.6307 -0.177 0.488 0.000 0.512
#> SRR1785259 3 0.6307 -0.177 0.488 0.000 0.512
#> SRR1785262 3 0.4702 0.378 0.212 0.000 0.788
#> SRR1785263 3 0.4702 0.378 0.212 0.000 0.788
#> SRR1785260 2 0.8716 0.500 0.172 0.588 0.240
#> SRR1785261 2 0.8716 0.500 0.172 0.588 0.240
#> SRR1785264 2 0.8390 0.380 0.100 0.560 0.340
#> SRR1785265 2 0.8352 0.401 0.100 0.568 0.332
#> SRR1785266 2 0.0892 0.722 0.020 0.980 0.000
#> SRR1785267 2 0.0892 0.722 0.020 0.980 0.000
#> SRR1785268 3 0.6308 -0.181 0.492 0.000 0.508
#> SRR1785269 3 0.6308 -0.181 0.492 0.000 0.508
#> SRR1785270 1 0.0747 0.587 0.984 0.000 0.016
#> SRR1785271 1 0.0747 0.587 0.984 0.000 0.016
#> SRR1785272 3 0.4280 0.467 0.020 0.124 0.856
#> SRR1785273 3 0.4540 0.474 0.028 0.124 0.848
#> SRR1785276 1 0.6669 0.206 0.524 0.008 0.468
#> SRR1785277 1 0.6672 0.200 0.520 0.008 0.472
#> SRR1785274 1 0.5497 0.433 0.708 0.000 0.292
#> SRR1785275 1 0.5497 0.433 0.708 0.000 0.292
#> SRR1785280 2 0.0592 0.719 0.012 0.988 0.000
#> SRR1785281 2 0.0592 0.719 0.012 0.988 0.000
#> SRR1785278 1 0.7396 0.152 0.488 0.032 0.480
#> SRR1785279 1 0.7396 0.152 0.488 0.032 0.480
#> SRR1785282 1 0.8507 0.196 0.484 0.092 0.424
#> SRR1785283 1 0.8507 0.196 0.484 0.092 0.424
#> SRR1785284 1 0.1031 0.590 0.976 0.000 0.024
#> SRR1785285 1 0.1163 0.591 0.972 0.000 0.028
#> SRR1785286 1 0.3116 0.587 0.892 0.000 0.108
#> SRR1785287 1 0.3192 0.588 0.888 0.000 0.112
#> SRR1785288 1 0.8657 0.443 0.592 0.164 0.244
#> SRR1785289 1 0.8657 0.443 0.592 0.164 0.244
#> SRR1785290 2 0.6462 0.671 0.116 0.764 0.120
#> SRR1785291 2 0.6462 0.671 0.116 0.764 0.120
#> SRR1785296 2 0.6902 0.641 0.116 0.736 0.148
#> SRR1785297 2 0.6902 0.641 0.116 0.736 0.148
#> SRR1785292 2 0.3784 0.660 0.132 0.864 0.004
#> SRR1785293 2 0.3784 0.660 0.132 0.864 0.004
#> SRR1785294 2 0.7545 0.608 0.136 0.692 0.172
#> SRR1785295 2 0.7545 0.608 0.136 0.692 0.172
#> SRR1785298 3 0.9880 0.171 0.260 0.356 0.384
#> SRR1785299 3 0.9880 0.171 0.260 0.356 0.384
#> SRR1785300 1 0.8301 0.456 0.592 0.108 0.300
#> SRR1785301 1 0.8301 0.456 0.592 0.108 0.300
#> SRR1785304 2 0.8103 0.624 0.248 0.632 0.120
#> SRR1785305 2 0.8103 0.624 0.248 0.632 0.120
#> SRR1785306 1 0.1860 0.553 0.948 0.000 0.052
#> SRR1785307 1 0.1860 0.553 0.948 0.000 0.052
#> SRR1785302 1 0.8392 0.366 0.624 0.176 0.200
#> SRR1785303 1 0.8478 0.350 0.616 0.180 0.204
#> SRR1785308 3 0.4280 0.467 0.020 0.124 0.856
#> SRR1785309 3 0.4280 0.467 0.020 0.124 0.856
#> SRR1785310 3 0.9696 0.170 0.388 0.216 0.396
#> SRR1785311 3 0.9696 0.170 0.388 0.216 0.396
#> SRR1785312 3 0.6308 -0.181 0.492 0.000 0.508
#> SRR1785313 3 0.6308 -0.181 0.492 0.000 0.508
#> SRR1785314 1 0.1529 0.562 0.960 0.000 0.040
#> SRR1785315 1 0.1529 0.562 0.960 0.000 0.040
#> SRR1785318 2 0.0592 0.719 0.012 0.988 0.000
#> SRR1785319 2 0.0592 0.719 0.012 0.988 0.000
#> SRR1785316 1 0.8607 0.444 0.592 0.152 0.256
#> SRR1785317 1 0.8637 0.441 0.588 0.152 0.260
#> SRR1785324 2 0.7909 0.554 0.148 0.664 0.188
#> SRR1785325 2 0.7909 0.554 0.148 0.664 0.188
#> SRR1785320 3 0.6308 -0.181 0.492 0.000 0.508
#> SRR1785321 3 0.6308 -0.181 0.492 0.000 0.508
#> SRR1785322 3 0.7525 0.411 0.208 0.108 0.684
#> SRR1785323 3 0.7457 0.409 0.208 0.104 0.688
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.262 0.51471 0.036 0.028 0.920 0.016
#> SRR1785239 3 0.271 0.51435 0.036 0.032 0.916 0.016
#> SRR1785240 4 0.657 0.49975 0.116 0.000 0.280 0.604
#> SRR1785241 4 0.657 0.49975 0.116 0.000 0.280 0.604
#> SRR1785242 3 0.199 0.51098 0.016 0.024 0.944 0.016
#> SRR1785243 3 0.199 0.51098 0.016 0.024 0.944 0.016
#> SRR1785244 1 0.714 0.51704 0.468 0.000 0.400 0.132
#> SRR1785245 1 0.717 0.52278 0.468 0.000 0.396 0.136
#> SRR1785246 3 0.669 0.21881 0.152 0.008 0.644 0.196
#> SRR1785247 3 0.669 0.21881 0.152 0.008 0.644 0.196
#> SRR1785248 2 0.530 0.74676 0.036 0.788 0.088 0.088
#> SRR1785250 3 0.240 0.47169 0.092 0.004 0.904 0.000
#> SRR1785251 3 0.247 0.46907 0.096 0.004 0.900 0.000
#> SRR1785252 3 0.199 0.51201 0.016 0.024 0.944 0.016
#> SRR1785253 3 0.199 0.51201 0.016 0.024 0.944 0.016
#> SRR1785254 4 0.599 0.67484 0.152 0.000 0.156 0.692
#> SRR1785255 4 0.612 0.66263 0.152 0.000 0.168 0.680
#> SRR1785256 1 0.538 0.57778 0.588 0.000 0.396 0.016
#> SRR1785257 1 0.536 0.58053 0.592 0.000 0.392 0.016
#> SRR1785258 3 0.769 -0.17748 0.268 0.000 0.456 0.276
#> SRR1785259 3 0.769 -0.17748 0.268 0.000 0.456 0.276
#> SRR1785262 3 0.396 0.42049 0.144 0.000 0.824 0.032
#> SRR1785263 3 0.396 0.42049 0.144 0.000 0.824 0.032
#> SRR1785260 2 0.954 0.01609 0.312 0.328 0.244 0.116
#> SRR1785261 2 0.954 0.00876 0.320 0.324 0.240 0.116
#> SRR1785264 3 0.554 0.42472 0.036 0.236 0.712 0.016
#> SRR1785265 3 0.555 0.41495 0.036 0.252 0.700 0.012
#> SRR1785266 2 0.499 0.76015 0.028 0.804 0.084 0.084
#> SRR1785267 2 0.499 0.76015 0.028 0.804 0.084 0.084
#> SRR1785268 1 0.524 0.59198 0.628 0.000 0.356 0.016
#> SRR1785269 1 0.524 0.59198 0.628 0.000 0.356 0.016
#> SRR1785270 4 0.314 0.74719 0.100 0.000 0.024 0.876
#> SRR1785271 4 0.314 0.74719 0.100 0.000 0.024 0.876
#> SRR1785272 3 0.233 0.46867 0.088 0.000 0.908 0.004
#> SRR1785273 3 0.215 0.46993 0.088 0.000 0.912 0.000
#> SRR1785276 3 0.788 -0.11022 0.220 0.008 0.460 0.312
#> SRR1785277 3 0.788 -0.11022 0.220 0.008 0.460 0.312
#> SRR1785274 4 0.717 0.43910 0.168 0.000 0.296 0.536
#> SRR1785275 4 0.717 0.43910 0.168 0.000 0.296 0.536
#> SRR1785280 2 0.131 0.79579 0.004 0.960 0.036 0.000
#> SRR1785281 2 0.131 0.79579 0.004 0.960 0.036 0.000
#> SRR1785278 1 0.570 0.46797 0.488 0.000 0.488 0.024
#> SRR1785279 1 0.570 0.46797 0.488 0.000 0.488 0.024
#> SRR1785282 3 0.551 -0.50899 0.484 0.000 0.500 0.016
#> SRR1785283 3 0.551 -0.50899 0.484 0.000 0.500 0.016
#> SRR1785284 4 0.505 0.74616 0.104 0.008 0.104 0.784
#> SRR1785285 4 0.505 0.74616 0.104 0.008 0.104 0.784
#> SRR1785286 1 0.784 0.20080 0.380 0.000 0.264 0.356
#> SRR1785287 1 0.784 0.20080 0.380 0.000 0.264 0.356
#> SRR1785288 1 0.628 0.50101 0.672 0.040 0.248 0.040
#> SRR1785289 1 0.620 0.50230 0.676 0.040 0.248 0.036
#> SRR1785290 3 0.651 0.22822 0.036 0.428 0.516 0.020
#> SRR1785291 3 0.651 0.22822 0.036 0.428 0.516 0.020
#> SRR1785296 3 0.778 0.31733 0.044 0.332 0.520 0.104
#> SRR1785297 3 0.793 0.30537 0.052 0.336 0.508 0.104
#> SRR1785292 2 0.195 0.79077 0.004 0.940 0.044 0.012
#> SRR1785293 2 0.195 0.79077 0.004 0.940 0.044 0.012
#> SRR1785294 3 0.851 0.28930 0.104 0.312 0.484 0.100
#> SRR1785295 3 0.851 0.28718 0.100 0.312 0.484 0.104
#> SRR1785298 3 0.475 0.49153 0.088 0.040 0.820 0.052
#> SRR1785299 3 0.475 0.49153 0.088 0.040 0.820 0.052
#> SRR1785300 1 0.619 0.56135 0.608 0.032 0.340 0.020
#> SRR1785301 1 0.619 0.56135 0.608 0.032 0.340 0.020
#> SRR1785304 3 0.855 0.22094 0.088 0.348 0.452 0.112
#> SRR1785305 3 0.855 0.22094 0.088 0.348 0.452 0.112
#> SRR1785306 4 0.325 0.74946 0.140 0.000 0.008 0.852
#> SRR1785307 4 0.325 0.74946 0.140 0.000 0.008 0.852
#> SRR1785302 3 0.794 0.07587 0.172 0.024 0.500 0.304
#> SRR1785303 3 0.791 0.09003 0.164 0.024 0.500 0.312
#> SRR1785308 3 0.215 0.46993 0.088 0.000 0.912 0.000
#> SRR1785309 3 0.215 0.46993 0.088 0.000 0.912 0.000
#> SRR1785310 3 0.560 0.44512 0.124 0.048 0.768 0.060
#> SRR1785311 3 0.560 0.44512 0.124 0.048 0.768 0.060
#> SRR1785312 1 0.549 0.53980 0.700 0.000 0.240 0.060
#> SRR1785313 1 0.549 0.53980 0.700 0.000 0.240 0.060
#> SRR1785314 4 0.358 0.74961 0.140 0.008 0.008 0.844
#> SRR1785315 4 0.358 0.74961 0.140 0.008 0.008 0.844
#> SRR1785318 2 0.131 0.79579 0.004 0.960 0.036 0.000
#> SRR1785319 2 0.131 0.79579 0.004 0.960 0.036 0.000
#> SRR1785316 1 0.619 0.56098 0.604 0.036 0.344 0.016
#> SRR1785317 1 0.619 0.56098 0.604 0.036 0.344 0.016
#> SRR1785324 2 0.511 0.58419 0.000 0.704 0.264 0.032
#> SRR1785325 2 0.511 0.58419 0.000 0.704 0.264 0.032
#> SRR1785320 1 0.549 0.53980 0.700 0.000 0.240 0.060
#> SRR1785321 1 0.549 0.53980 0.700 0.000 0.240 0.060
#> SRR1785322 3 0.419 0.37688 0.164 0.004 0.808 0.024
#> SRR1785323 3 0.428 0.36270 0.172 0.004 0.800 0.024
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 4 0.7253 0.2674 0.028 0.124 0.408 0.420 0.020
#> SRR1785239 4 0.7214 0.2743 0.024 0.128 0.408 0.420 0.020
#> SRR1785240 5 0.5323 0.4473 0.188 0.008 0.076 0.016 0.712
#> SRR1785241 5 0.5323 0.4473 0.188 0.008 0.076 0.016 0.712
#> SRR1785242 3 0.5147 0.6689 0.184 0.068 0.724 0.020 0.004
#> SRR1785243 3 0.5147 0.6689 0.184 0.068 0.724 0.020 0.004
#> SRR1785244 1 0.7403 0.2852 0.408 0.004 0.080 0.104 0.404
#> SRR1785245 1 0.7403 0.2852 0.408 0.004 0.080 0.104 0.404
#> SRR1785246 3 0.6017 0.4545 0.392 0.008 0.532 0.024 0.044
#> SRR1785247 3 0.6017 0.4545 0.392 0.008 0.532 0.024 0.044
#> SRR1785248 2 0.4305 0.4916 0.000 0.688 0.012 0.296 0.004
#> SRR1785250 3 0.4419 0.7072 0.212 0.004 0.740 0.044 0.000
#> SRR1785251 3 0.4419 0.7072 0.212 0.004 0.740 0.044 0.000
#> SRR1785252 3 0.5196 0.6651 0.184 0.028 0.724 0.060 0.004
#> SRR1785253 3 0.5196 0.6651 0.184 0.028 0.724 0.060 0.004
#> SRR1785254 5 0.3455 0.7077 0.076 0.016 0.024 0.020 0.864
#> SRR1785255 5 0.3717 0.6976 0.088 0.016 0.028 0.020 0.848
#> SRR1785256 1 0.0451 0.5378 0.988 0.000 0.008 0.004 0.000
#> SRR1785257 1 0.0451 0.5378 0.988 0.000 0.008 0.004 0.000
#> SRR1785258 1 0.6966 0.3354 0.524 0.008 0.192 0.020 0.256
#> SRR1785259 1 0.6966 0.3354 0.524 0.008 0.192 0.020 0.256
#> SRR1785262 3 0.5219 0.5239 0.400 0.000 0.560 0.008 0.032
#> SRR1785263 3 0.5219 0.5239 0.400 0.000 0.560 0.008 0.032
#> SRR1785260 4 0.3773 0.4998 0.056 0.024 0.052 0.852 0.016
#> SRR1785261 4 0.3905 0.4945 0.064 0.024 0.052 0.844 0.016
#> SRR1785264 4 0.6916 0.4562 0.000 0.264 0.296 0.432 0.008
#> SRR1785265 4 0.6921 0.4498 0.000 0.272 0.288 0.432 0.008
#> SRR1785266 2 0.3561 0.6514 0.000 0.740 0.000 0.260 0.000
#> SRR1785267 2 0.3561 0.6514 0.000 0.740 0.000 0.260 0.000
#> SRR1785268 1 0.1571 0.5150 0.936 0.000 0.060 0.004 0.000
#> SRR1785269 1 0.1571 0.5150 0.936 0.000 0.060 0.004 0.000
#> SRR1785270 5 0.0807 0.7060 0.000 0.000 0.012 0.012 0.976
#> SRR1785271 5 0.0807 0.7060 0.000 0.000 0.012 0.012 0.976
#> SRR1785272 3 0.2971 0.6913 0.156 0.000 0.836 0.008 0.000
#> SRR1785273 3 0.3252 0.6897 0.156 0.008 0.828 0.008 0.000
#> SRR1785276 1 0.5871 0.3772 0.676 0.020 0.200 0.016 0.088
#> SRR1785277 1 0.5819 0.3804 0.680 0.020 0.200 0.016 0.084
#> SRR1785274 1 0.6829 -0.0663 0.484 0.008 0.128 0.020 0.360
#> SRR1785275 1 0.6836 -0.0783 0.480 0.008 0.128 0.020 0.364
#> SRR1785280 2 0.0609 0.8470 0.000 0.980 0.000 0.020 0.000
#> SRR1785281 2 0.0609 0.8470 0.000 0.980 0.000 0.020 0.000
#> SRR1785278 1 0.4178 0.5335 0.808 0.020 0.084 0.088 0.000
#> SRR1785279 1 0.4229 0.5354 0.804 0.020 0.080 0.096 0.000
#> SRR1785282 1 0.5706 0.4801 0.636 0.004 0.220 0.140 0.000
#> SRR1785283 1 0.5706 0.4801 0.636 0.004 0.220 0.140 0.000
#> SRR1785284 5 0.1764 0.7078 0.000 0.000 0.064 0.008 0.928
#> SRR1785285 5 0.1764 0.7078 0.000 0.000 0.064 0.008 0.928
#> SRR1785286 5 0.6187 0.5311 0.320 0.000 0.068 0.040 0.572
#> SRR1785287 5 0.6187 0.5311 0.320 0.000 0.068 0.040 0.572
#> SRR1785288 1 0.7591 0.3851 0.376 0.004 0.036 0.336 0.248
#> SRR1785289 1 0.7591 0.3851 0.376 0.004 0.036 0.336 0.248
#> SRR1785290 4 0.5489 0.1138 0.000 0.460 0.044 0.488 0.008
#> SRR1785291 4 0.5491 0.0853 0.000 0.468 0.044 0.480 0.008
#> SRR1785296 4 0.4127 0.6009 0.004 0.104 0.076 0.808 0.008
#> SRR1785297 4 0.4127 0.6009 0.004 0.104 0.076 0.808 0.008
#> SRR1785292 2 0.2426 0.8318 0.000 0.900 0.000 0.064 0.036
#> SRR1785293 2 0.2426 0.8318 0.000 0.900 0.000 0.064 0.036
#> SRR1785294 4 0.3414 0.5975 0.004 0.056 0.056 0.864 0.020
#> SRR1785295 4 0.3274 0.5950 0.004 0.056 0.048 0.872 0.020
#> SRR1785298 4 0.6735 0.5542 0.004 0.100 0.292 0.556 0.048
#> SRR1785299 4 0.6735 0.5542 0.004 0.100 0.292 0.556 0.048
#> SRR1785300 1 0.6183 0.4670 0.584 0.004 0.064 0.312 0.036
#> SRR1785301 1 0.6183 0.4670 0.584 0.004 0.064 0.312 0.036
#> SRR1785304 4 0.4897 0.5387 0.000 0.164 0.040 0.748 0.048
#> SRR1785305 4 0.4897 0.5387 0.000 0.164 0.040 0.748 0.048
#> SRR1785306 5 0.3737 0.6819 0.224 0.008 0.004 0.000 0.764
#> SRR1785307 5 0.3737 0.6819 0.224 0.008 0.004 0.000 0.764
#> SRR1785302 4 0.8745 0.1274 0.200 0.052 0.080 0.364 0.304
#> SRR1785303 4 0.8745 0.1271 0.200 0.052 0.080 0.364 0.304
#> SRR1785308 3 0.2971 0.6913 0.156 0.000 0.836 0.008 0.000
#> SRR1785309 3 0.2971 0.6913 0.156 0.000 0.836 0.008 0.000
#> SRR1785310 4 0.7559 0.4986 0.064 0.052 0.276 0.532 0.076
#> SRR1785311 4 0.7559 0.4986 0.064 0.052 0.276 0.532 0.076
#> SRR1785312 1 0.4555 0.4485 0.720 0.000 0.056 0.000 0.224
#> SRR1785313 1 0.4555 0.4485 0.720 0.000 0.056 0.000 0.224
#> SRR1785314 5 0.3737 0.6819 0.224 0.000 0.004 0.008 0.764
#> SRR1785315 5 0.3737 0.6819 0.224 0.000 0.004 0.008 0.764
#> SRR1785318 2 0.0510 0.8466 0.000 0.984 0.000 0.016 0.000
#> SRR1785319 2 0.0510 0.8466 0.000 0.984 0.000 0.016 0.000
#> SRR1785316 1 0.5994 0.4694 0.588 0.000 0.060 0.316 0.036
#> SRR1785317 1 0.5994 0.4694 0.588 0.000 0.060 0.316 0.036
#> SRR1785324 2 0.2390 0.8055 0.000 0.896 0.000 0.020 0.084
#> SRR1785325 2 0.2570 0.8053 0.000 0.888 0.000 0.028 0.084
#> SRR1785320 1 0.4709 0.4497 0.716 0.000 0.056 0.004 0.224
#> SRR1785321 1 0.4828 0.4523 0.712 0.000 0.056 0.008 0.224
#> SRR1785322 3 0.5350 0.6607 0.168 0.008 0.720 0.084 0.020
#> SRR1785323 3 0.5455 0.6552 0.168 0.008 0.712 0.092 0.020
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 2 0.827 -0.10174 0.120 0.332 0.180 0.316 0.032 0.020
#> SRR1785239 2 0.827 -0.10174 0.120 0.332 0.180 0.316 0.032 0.020
#> SRR1785240 1 0.625 -0.07531 0.452 0.000 0.032 0.076 0.416 0.024
#> SRR1785241 1 0.625 -0.07531 0.452 0.000 0.032 0.076 0.416 0.024
#> SRR1785242 3 0.703 0.35934 0.252 0.040 0.472 0.004 0.020 0.212
#> SRR1785243 3 0.703 0.35934 0.252 0.040 0.472 0.004 0.020 0.212
#> SRR1785244 1 0.780 0.07884 0.336 0.000 0.008 0.212 0.252 0.192
#> SRR1785245 1 0.780 0.07884 0.336 0.000 0.008 0.212 0.252 0.192
#> SRR1785246 1 0.707 0.00491 0.484 0.004 0.244 0.044 0.024 0.200
#> SRR1785247 1 0.707 0.00491 0.484 0.004 0.244 0.044 0.024 0.200
#> SRR1785248 2 0.445 0.52135 0.024 0.740 0.004 0.180 0.000 0.052
#> SRR1785250 3 0.619 0.51621 0.120 0.028 0.548 0.016 0.000 0.288
#> SRR1785251 3 0.619 0.51621 0.120 0.028 0.548 0.016 0.000 0.288
#> SRR1785252 3 0.697 0.36090 0.252 0.036 0.476 0.004 0.020 0.212
#> SRR1785253 3 0.697 0.36090 0.252 0.036 0.476 0.004 0.020 0.212
#> SRR1785254 5 0.414 0.66946 0.208 0.016 0.000 0.024 0.744 0.008
#> SRR1785255 5 0.403 0.67235 0.208 0.016 0.000 0.024 0.748 0.004
#> SRR1785256 6 0.504 0.13000 0.444 0.000 0.008 0.036 0.008 0.504
#> SRR1785257 6 0.504 0.13000 0.444 0.000 0.008 0.036 0.008 0.504
#> SRR1785258 1 0.281 0.42767 0.888 0.000 0.028 0.036 0.028 0.020
#> SRR1785259 1 0.289 0.42749 0.884 0.000 0.028 0.036 0.028 0.024
#> SRR1785262 1 0.690 0.09628 0.532 0.048 0.208 0.184 0.020 0.008
#> SRR1785263 1 0.690 0.09628 0.532 0.048 0.208 0.184 0.020 0.008
#> SRR1785260 4 0.568 0.46843 0.012 0.044 0.008 0.676 0.160 0.100
#> SRR1785261 4 0.568 0.46843 0.012 0.044 0.008 0.676 0.160 0.100
#> SRR1785264 2 0.680 0.16912 0.016 0.508 0.112 0.308 0.024 0.032
#> SRR1785265 2 0.678 0.15677 0.016 0.504 0.108 0.316 0.024 0.032
#> SRR1785266 2 0.379 0.56501 0.016 0.800 0.004 0.132 0.000 0.048
#> SRR1785267 2 0.383 0.56324 0.016 0.796 0.004 0.136 0.000 0.048
#> SRR1785268 6 0.468 0.11117 0.448 0.000 0.020 0.008 0.004 0.520
#> SRR1785269 6 0.468 0.11117 0.448 0.000 0.020 0.008 0.004 0.520
#> SRR1785270 5 0.307 0.71000 0.084 0.000 0.000 0.036 0.856 0.024
#> SRR1785271 5 0.307 0.71000 0.084 0.000 0.000 0.036 0.856 0.024
#> SRR1785272 3 0.370 0.56144 0.016 0.000 0.744 0.008 0.000 0.232
#> SRR1785273 3 0.395 0.55850 0.016 0.008 0.736 0.008 0.000 0.232
#> SRR1785276 1 0.554 0.39939 0.716 0.024 0.136 0.036 0.052 0.036
#> SRR1785277 1 0.554 0.39939 0.716 0.024 0.136 0.036 0.052 0.036
#> SRR1785274 1 0.581 0.27549 0.596 0.000 0.036 0.052 0.288 0.028
#> SRR1785275 1 0.581 0.27549 0.596 0.000 0.036 0.052 0.288 0.028
#> SRR1785280 2 0.128 0.62326 0.000 0.944 0.004 0.052 0.000 0.000
#> SRR1785281 2 0.128 0.62326 0.000 0.944 0.004 0.052 0.000 0.000
#> SRR1785278 1 0.786 -0.28151 0.356 0.032 0.048 0.192 0.028 0.344
#> SRR1785279 1 0.782 -0.28291 0.356 0.032 0.044 0.196 0.028 0.344
#> SRR1785282 6 0.810 0.46417 0.196 0.024 0.152 0.260 0.008 0.360
#> SRR1785283 6 0.810 0.46417 0.196 0.024 0.152 0.260 0.008 0.360
#> SRR1785284 5 0.545 0.57671 0.256 0.000 0.008 0.072 0.632 0.032
#> SRR1785285 5 0.540 0.57942 0.256 0.000 0.008 0.068 0.636 0.032
#> SRR1785286 5 0.338 0.68835 0.016 0.020 0.008 0.084 0.852 0.020
#> SRR1785287 5 0.343 0.68686 0.016 0.020 0.008 0.088 0.848 0.020
#> SRR1785288 6 0.614 0.48903 0.092 0.000 0.000 0.424 0.052 0.432
#> SRR1785289 6 0.614 0.48903 0.092 0.000 0.000 0.424 0.052 0.432
#> SRR1785290 4 0.553 0.29504 0.016 0.348 0.008 0.572 0.032 0.024
#> SRR1785291 4 0.560 0.28862 0.016 0.348 0.008 0.568 0.032 0.028
#> SRR1785296 4 0.399 0.58856 0.004 0.164 0.012 0.780 0.032 0.008
#> SRR1785297 4 0.399 0.58856 0.004 0.164 0.012 0.780 0.032 0.008
#> SRR1785292 2 0.456 0.51817 0.000 0.720 0.000 0.080 0.184 0.016
#> SRR1785293 2 0.456 0.51817 0.000 0.720 0.000 0.080 0.184 0.016
#> SRR1785294 4 0.411 0.62491 0.008 0.100 0.008 0.804 0.052 0.028
#> SRR1785295 4 0.426 0.62351 0.008 0.100 0.008 0.796 0.052 0.036
#> SRR1785298 4 0.606 0.50516 0.024 0.200 0.116 0.620 0.040 0.000
#> SRR1785299 4 0.606 0.50516 0.024 0.200 0.116 0.620 0.040 0.000
#> SRR1785300 6 0.597 0.53925 0.072 0.000 0.004 0.416 0.044 0.464
#> SRR1785301 6 0.597 0.53925 0.072 0.000 0.004 0.416 0.044 0.464
#> SRR1785304 4 0.618 0.52239 0.012 0.148 0.004 0.564 0.252 0.020
#> SRR1785305 4 0.620 0.51748 0.012 0.152 0.004 0.560 0.252 0.020
#> SRR1785306 5 0.385 0.68194 0.084 0.020 0.096 0.000 0.800 0.000
#> SRR1785307 5 0.385 0.68194 0.084 0.020 0.096 0.000 0.800 0.000
#> SRR1785302 5 0.583 -0.12233 0.012 0.100 0.008 0.340 0.536 0.004
#> SRR1785303 5 0.583 -0.12233 0.012 0.100 0.008 0.340 0.536 0.004
#> SRR1785308 3 0.370 0.56144 0.016 0.000 0.744 0.008 0.000 0.232
#> SRR1785309 3 0.370 0.56144 0.016 0.000 0.744 0.008 0.000 0.232
#> SRR1785310 4 0.715 0.43958 0.028 0.064 0.048 0.472 0.344 0.044
#> SRR1785311 4 0.714 0.44351 0.028 0.064 0.048 0.476 0.340 0.044
#> SRR1785312 1 0.389 0.27247 0.664 0.000 0.008 0.000 0.004 0.324
#> SRR1785313 1 0.389 0.27247 0.664 0.000 0.008 0.000 0.004 0.324
#> SRR1785314 5 0.162 0.71642 0.016 0.020 0.008 0.012 0.944 0.000
#> SRR1785315 5 0.162 0.71642 0.016 0.020 0.008 0.012 0.944 0.000
#> SRR1785318 2 0.114 0.62347 0.000 0.948 0.000 0.052 0.000 0.000
#> SRR1785319 2 0.114 0.62347 0.000 0.948 0.000 0.052 0.000 0.000
#> SRR1785316 6 0.647 0.54008 0.072 0.012 0.016 0.392 0.040 0.468
#> SRR1785317 6 0.647 0.54008 0.072 0.012 0.016 0.392 0.040 0.468
#> SRR1785324 2 0.403 0.51755 0.008 0.744 0.000 0.016 0.216 0.016
#> SRR1785325 2 0.403 0.51755 0.008 0.744 0.000 0.016 0.216 0.016
#> SRR1785320 1 0.380 0.27243 0.664 0.000 0.004 0.000 0.004 0.328
#> SRR1785321 1 0.380 0.27296 0.664 0.000 0.004 0.000 0.004 0.328
#> SRR1785322 3 0.694 0.39509 0.048 0.040 0.532 0.132 0.004 0.244
#> SRR1785323 3 0.707 0.38242 0.048 0.040 0.524 0.136 0.008 0.244
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.928 0.930 0.971 0.4586 0.536 0.536
#> 3 3 0.679 0.765 0.898 0.4432 0.681 0.461
#> 4 4 0.652 0.707 0.853 0.1309 0.746 0.387
#> 5 5 0.751 0.749 0.867 0.0702 0.865 0.530
#> 6 6 0.707 0.556 0.756 0.0419 0.896 0.552
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
#> SRR1785238 2 0.9881 0.266 0.436 0.564
#> SRR1785239 2 0.9795 0.324 0.416 0.584
#> SRR1785240 1 0.0000 0.981 1.000 0.000
#> SRR1785241 1 0.0000 0.981 1.000 0.000
#> SRR1785242 1 0.6343 0.805 0.840 0.160
#> SRR1785243 1 0.6531 0.794 0.832 0.168
#> SRR1785244 1 0.0000 0.981 1.000 0.000
#> SRR1785245 1 0.0000 0.981 1.000 0.000
#> SRR1785246 1 0.0000 0.981 1.000 0.000
#> SRR1785247 1 0.0000 0.981 1.000 0.000
#> SRR1785248 2 0.0000 0.946 0.000 1.000
#> SRR1785250 1 0.0000 0.981 1.000 0.000
#> SRR1785251 1 0.0000 0.981 1.000 0.000
#> SRR1785252 1 0.1184 0.968 0.984 0.016
#> SRR1785253 1 0.1184 0.968 0.984 0.016
#> SRR1785254 2 0.0000 0.946 0.000 1.000
#> SRR1785255 2 0.0000 0.946 0.000 1.000
#> SRR1785256 1 0.0000 0.981 1.000 0.000
#> SRR1785257 1 0.0000 0.981 1.000 0.000
#> SRR1785258 1 0.0000 0.981 1.000 0.000
#> SRR1785259 1 0.0000 0.981 1.000 0.000
#> SRR1785262 1 0.0000 0.981 1.000 0.000
#> SRR1785263 1 0.0000 0.981 1.000 0.000
#> SRR1785260 1 0.0000 0.981 1.000 0.000
#> SRR1785261 1 0.0000 0.981 1.000 0.000
#> SRR1785264 2 0.0000 0.946 0.000 1.000
#> SRR1785265 2 0.0000 0.946 0.000 1.000
#> SRR1785266 2 0.0000 0.946 0.000 1.000
#> SRR1785267 2 0.0000 0.946 0.000 1.000
#> SRR1785268 1 0.0000 0.981 1.000 0.000
#> SRR1785269 1 0.0000 0.981 1.000 0.000
#> SRR1785270 2 0.0000 0.946 0.000 1.000
#> SRR1785271 2 0.0000 0.946 0.000 1.000
#> SRR1785272 1 0.0000 0.981 1.000 0.000
#> SRR1785273 1 0.0000 0.981 1.000 0.000
#> SRR1785276 1 0.0000 0.981 1.000 0.000
#> SRR1785277 1 0.0000 0.981 1.000 0.000
#> SRR1785274 1 0.0000 0.981 1.000 0.000
#> SRR1785275 1 0.0000 0.981 1.000 0.000
#> SRR1785280 2 0.0000 0.946 0.000 1.000
#> SRR1785281 2 0.0000 0.946 0.000 1.000
#> SRR1785278 1 0.0000 0.981 1.000 0.000
#> SRR1785279 1 0.0000 0.981 1.000 0.000
#> SRR1785282 1 0.0000 0.981 1.000 0.000
#> SRR1785283 1 0.0000 0.981 1.000 0.000
#> SRR1785284 1 0.2423 0.946 0.960 0.040
#> SRR1785285 1 0.2948 0.934 0.948 0.052
#> SRR1785286 1 0.0000 0.981 1.000 0.000
#> SRR1785287 1 0.0000 0.981 1.000 0.000
#> SRR1785288 1 0.0000 0.981 1.000 0.000
#> SRR1785289 1 0.0000 0.981 1.000 0.000
#> SRR1785290 2 0.0000 0.946 0.000 1.000
#> SRR1785291 2 0.0000 0.946 0.000 1.000
#> SRR1785296 1 0.8016 0.663 0.756 0.244
#> SRR1785297 1 0.8386 0.617 0.732 0.268
#> SRR1785292 2 0.0000 0.946 0.000 1.000
#> SRR1785293 2 0.0000 0.946 0.000 1.000
#> SRR1785294 1 0.0000 0.981 1.000 0.000
#> SRR1785295 1 0.0000 0.981 1.000 0.000
#> SRR1785298 2 0.9323 0.487 0.348 0.652
#> SRR1785299 2 0.9209 0.511 0.336 0.664
#> SRR1785300 1 0.0000 0.981 1.000 0.000
#> SRR1785301 1 0.0000 0.981 1.000 0.000
#> SRR1785304 2 0.0000 0.946 0.000 1.000
#> SRR1785305 2 0.0000 0.946 0.000 1.000
#> SRR1785306 2 0.0000 0.946 0.000 1.000
#> SRR1785307 2 0.0000 0.946 0.000 1.000
#> SRR1785302 2 0.0672 0.940 0.008 0.992
#> SRR1785303 2 0.0672 0.940 0.008 0.992
#> SRR1785308 1 0.0000 0.981 1.000 0.000
#> SRR1785309 1 0.0000 0.981 1.000 0.000
#> SRR1785310 1 0.0000 0.981 1.000 0.000
#> SRR1785311 1 0.0000 0.981 1.000 0.000
#> SRR1785312 1 0.0000 0.981 1.000 0.000
#> SRR1785313 1 0.0000 0.981 1.000 0.000
#> SRR1785314 2 0.0000 0.946 0.000 1.000
#> SRR1785315 2 0.0000 0.946 0.000 1.000
#> SRR1785318 2 0.0000 0.946 0.000 1.000
#> SRR1785319 2 0.0000 0.946 0.000 1.000
#> SRR1785316 1 0.0000 0.981 1.000 0.000
#> SRR1785317 1 0.0000 0.981 1.000 0.000
#> SRR1785324 2 0.0000 0.946 0.000 1.000
#> SRR1785325 2 0.0000 0.946 0.000 1.000
#> SRR1785320 1 0.0000 0.981 1.000 0.000
#> SRR1785321 1 0.0000 0.981 1.000 0.000
#> SRR1785322 1 0.0000 0.981 1.000 0.000
#> SRR1785323 1 0.0000 0.981 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.4235 0.677 0.000 0.176 0.824
#> SRR1785239 3 0.4887 0.596 0.000 0.228 0.772
#> SRR1785240 3 0.6299 0.244 0.476 0.000 0.524
#> SRR1785241 3 0.6295 0.255 0.472 0.000 0.528
#> SRR1785242 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785244 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785246 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785248 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785250 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785251 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785252 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785254 2 0.5621 0.582 0.308 0.692 0.000
#> SRR1785255 2 0.5497 0.609 0.292 0.708 0.000
#> SRR1785256 1 0.3038 0.826 0.896 0.000 0.104
#> SRR1785257 1 0.3116 0.821 0.892 0.000 0.108
#> SRR1785258 3 0.0237 0.860 0.004 0.000 0.996
#> SRR1785259 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785262 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785263 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785260 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785261 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785264 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785265 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785266 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785267 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785268 3 0.5968 0.495 0.364 0.000 0.636
#> SRR1785269 3 0.5882 0.519 0.348 0.000 0.652
#> SRR1785270 2 0.5327 0.641 0.272 0.728 0.000
#> SRR1785271 2 0.5216 0.657 0.260 0.740 0.000
#> SRR1785272 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785273 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785276 3 0.0424 0.858 0.008 0.000 0.992
#> SRR1785277 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785274 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785275 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785280 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785278 1 0.0592 0.912 0.988 0.000 0.012
#> SRR1785279 1 0.0747 0.909 0.984 0.000 0.016
#> SRR1785282 1 0.1529 0.889 0.960 0.000 0.040
#> SRR1785283 1 0.1529 0.889 0.960 0.000 0.040
#> SRR1785284 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785285 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785286 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785287 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785288 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785290 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785291 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785296 2 0.8872 0.472 0.296 0.552 0.152
#> SRR1785297 2 0.8962 0.452 0.304 0.540 0.156
#> SRR1785292 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785294 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785295 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785298 2 0.5216 0.645 0.260 0.740 0.000
#> SRR1785299 2 0.4931 0.699 0.212 0.784 0.004
#> SRR1785300 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785304 1 0.5835 0.408 0.660 0.340 0.000
#> SRR1785305 1 0.6168 0.205 0.588 0.412 0.000
#> SRR1785306 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785307 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785302 1 0.5968 0.339 0.636 0.364 0.000
#> SRR1785303 1 0.6062 0.280 0.616 0.384 0.000
#> SRR1785308 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785309 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785310 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785311 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785312 3 0.6204 0.378 0.424 0.000 0.576
#> SRR1785313 3 0.6126 0.430 0.400 0.000 0.600
#> SRR1785314 2 0.6280 0.228 0.460 0.540 0.000
#> SRR1785315 2 0.5810 0.544 0.336 0.664 0.000
#> SRR1785318 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785316 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.919 1.000 0.000 0.000
#> SRR1785324 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.860 0.000 1.000 0.000
#> SRR1785320 3 0.6140 0.422 0.404 0.000 0.596
#> SRR1785321 3 0.6154 0.415 0.408 0.000 0.592
#> SRR1785322 3 0.0000 0.862 0.000 0.000 1.000
#> SRR1785323 3 0.0000 0.862 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.3166 0.8110 0.016 0.116 0.868 0.000
#> SRR1785239 3 0.3443 0.7922 0.016 0.136 0.848 0.000
#> SRR1785240 1 0.0000 0.7861 1.000 0.000 0.000 0.000
#> SRR1785241 1 0.0000 0.7861 1.000 0.000 0.000 0.000
#> SRR1785242 3 0.1302 0.8664 0.044 0.000 0.956 0.000
#> SRR1785243 3 0.1302 0.8664 0.044 0.000 0.956 0.000
#> SRR1785244 1 0.3975 0.6232 0.760 0.000 0.000 0.240
#> SRR1785245 1 0.4072 0.6068 0.748 0.000 0.000 0.252
#> SRR1785246 3 0.2921 0.8169 0.140 0.000 0.860 0.000
#> SRR1785247 3 0.2973 0.8146 0.144 0.000 0.856 0.000
#> SRR1785248 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785250 3 0.0000 0.8713 0.000 0.000 1.000 0.000
#> SRR1785251 3 0.0000 0.8713 0.000 0.000 1.000 0.000
#> SRR1785252 3 0.0921 0.8689 0.028 0.000 0.972 0.000
#> SRR1785253 3 0.0921 0.8689 0.028 0.000 0.972 0.000
#> SRR1785254 1 0.3545 0.7361 0.828 0.164 0.000 0.008
#> SRR1785255 1 0.3351 0.7455 0.844 0.148 0.000 0.008
#> SRR1785256 4 0.7431 0.1150 0.380 0.000 0.172 0.448
#> SRR1785257 4 0.7458 0.1016 0.380 0.000 0.176 0.444
#> SRR1785258 1 0.3649 0.6954 0.796 0.000 0.204 0.000
#> SRR1785259 1 0.3486 0.7120 0.812 0.000 0.188 0.000
#> SRR1785262 3 0.3831 0.7238 0.204 0.000 0.792 0.004
#> SRR1785263 3 0.3751 0.7323 0.196 0.000 0.800 0.004
#> SRR1785260 4 0.0779 0.7587 0.016 0.000 0.004 0.980
#> SRR1785261 4 0.0779 0.7587 0.016 0.000 0.004 0.980
#> SRR1785264 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785265 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785266 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785267 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785268 3 0.5663 0.0863 0.440 0.000 0.536 0.024
#> SRR1785269 3 0.5663 0.0863 0.440 0.000 0.536 0.024
#> SRR1785270 1 0.1302 0.7851 0.956 0.044 0.000 0.000
#> SRR1785271 1 0.1302 0.7851 0.956 0.044 0.000 0.000
#> SRR1785272 3 0.1022 0.8667 0.000 0.000 0.968 0.032
#> SRR1785273 3 0.1022 0.8667 0.000 0.000 0.968 0.032
#> SRR1785276 1 0.3649 0.7095 0.796 0.000 0.204 0.000
#> SRR1785277 1 0.3873 0.6877 0.772 0.000 0.228 0.000
#> SRR1785274 1 0.0817 0.7857 0.976 0.000 0.024 0.000
#> SRR1785275 1 0.0817 0.7857 0.976 0.000 0.024 0.000
#> SRR1785280 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785278 4 0.6683 0.1838 0.416 0.000 0.088 0.496
#> SRR1785279 4 0.6672 0.1958 0.408 0.000 0.088 0.504
#> SRR1785282 4 0.6388 0.5908 0.156 0.000 0.192 0.652
#> SRR1785283 4 0.6286 0.5984 0.140 0.000 0.200 0.660
#> SRR1785284 1 0.1867 0.7678 0.928 0.000 0.000 0.072
#> SRR1785285 1 0.1867 0.7678 0.928 0.000 0.000 0.072
#> SRR1785286 1 0.4585 0.4776 0.668 0.000 0.000 0.332
#> SRR1785287 1 0.4624 0.4611 0.660 0.000 0.000 0.340
#> SRR1785288 4 0.2011 0.7490 0.080 0.000 0.000 0.920
#> SRR1785289 4 0.2011 0.7490 0.080 0.000 0.000 0.920
#> SRR1785290 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785291 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785296 4 0.5966 0.4878 0.000 0.280 0.072 0.648
#> SRR1785297 4 0.6036 0.4677 0.000 0.292 0.072 0.636
#> SRR1785292 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.1557 0.7499 0.000 0.000 0.056 0.944
#> SRR1785295 4 0.1557 0.7499 0.000 0.000 0.056 0.944
#> SRR1785298 4 0.5947 0.3001 0.000 0.384 0.044 0.572
#> SRR1785299 4 0.6071 0.1090 0.000 0.452 0.044 0.504
#> SRR1785300 4 0.0895 0.7610 0.020 0.000 0.004 0.976
#> SRR1785301 4 0.1489 0.7578 0.044 0.000 0.004 0.952
#> SRR1785304 4 0.1824 0.7455 0.004 0.060 0.000 0.936
#> SRR1785305 4 0.1743 0.7473 0.004 0.056 0.000 0.940
#> SRR1785306 1 0.4790 0.3627 0.620 0.380 0.000 0.000
#> SRR1785307 1 0.4855 0.3113 0.600 0.400 0.000 0.000
#> SRR1785302 2 0.6356 0.3146 0.084 0.596 0.000 0.320
#> SRR1785303 2 0.5623 0.4617 0.048 0.660 0.000 0.292
#> SRR1785308 3 0.0817 0.8690 0.000 0.000 0.976 0.024
#> SRR1785309 3 0.0707 0.8700 0.000 0.000 0.980 0.020
#> SRR1785310 4 0.0336 0.7591 0.008 0.000 0.000 0.992
#> SRR1785311 4 0.0469 0.7586 0.012 0.000 0.000 0.988
#> SRR1785312 1 0.4194 0.6878 0.764 0.000 0.228 0.008
#> SRR1785313 1 0.4194 0.6880 0.764 0.000 0.228 0.008
#> SRR1785314 1 0.2222 0.7793 0.924 0.060 0.000 0.016
#> SRR1785315 1 0.2271 0.7762 0.916 0.076 0.000 0.008
#> SRR1785318 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785316 4 0.2773 0.7234 0.116 0.000 0.004 0.880
#> SRR1785317 4 0.2773 0.7234 0.116 0.000 0.004 0.880
#> SRR1785324 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.9483 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.4661 0.6537 0.728 0.000 0.256 0.016
#> SRR1785321 1 0.4661 0.6537 0.728 0.000 0.256 0.016
#> SRR1785322 3 0.1118 0.8646 0.000 0.000 0.964 0.036
#> SRR1785323 3 0.1118 0.8646 0.000 0.000 0.964 0.036
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.4851 0.489 0.036 0.340 0.624 0.000 0.000
#> SRR1785239 3 0.5002 0.437 0.040 0.364 0.596 0.000 0.000
#> SRR1785240 5 0.0162 0.844 0.004 0.000 0.000 0.000 0.996
#> SRR1785241 5 0.0162 0.844 0.004 0.000 0.000 0.000 0.996
#> SRR1785242 3 0.1282 0.804 0.004 0.000 0.952 0.000 0.044
#> SRR1785243 3 0.1282 0.804 0.004 0.000 0.952 0.000 0.044
#> SRR1785244 1 0.2629 0.804 0.860 0.000 0.000 0.004 0.136
#> SRR1785245 1 0.2771 0.809 0.860 0.000 0.000 0.012 0.128
#> SRR1785246 3 0.2921 0.766 0.020 0.000 0.856 0.000 0.124
#> SRR1785247 3 0.2873 0.769 0.020 0.000 0.860 0.000 0.120
#> SRR1785248 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785250 3 0.0451 0.811 0.008 0.000 0.988 0.004 0.000
#> SRR1785251 3 0.0451 0.811 0.008 0.000 0.988 0.004 0.000
#> SRR1785252 3 0.0510 0.811 0.000 0.000 0.984 0.000 0.016
#> SRR1785253 3 0.0510 0.811 0.000 0.000 0.984 0.000 0.016
#> SRR1785254 5 0.5472 0.586 0.188 0.156 0.000 0.000 0.656
#> SRR1785255 5 0.5587 0.588 0.188 0.152 0.000 0.004 0.656
#> SRR1785256 1 0.5326 0.713 0.696 0.000 0.212 0.028 0.064
#> SRR1785257 1 0.5330 0.716 0.696 0.000 0.208 0.024 0.072
#> SRR1785258 5 0.6581 0.232 0.324 0.000 0.224 0.000 0.452
#> SRR1785259 5 0.6424 0.346 0.288 0.000 0.212 0.000 0.500
#> SRR1785262 3 0.6610 0.248 0.004 0.000 0.476 0.316 0.204
#> SRR1785263 3 0.6543 0.262 0.004 0.000 0.488 0.316 0.192
#> SRR1785260 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR1785261 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR1785264 2 0.0451 0.926 0.004 0.988 0.008 0.000 0.000
#> SRR1785265 2 0.0290 0.928 0.000 0.992 0.008 0.000 0.000
#> SRR1785266 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785267 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785268 1 0.1281 0.846 0.956 0.000 0.032 0.000 0.012
#> SRR1785269 1 0.1364 0.846 0.952 0.000 0.036 0.000 0.012
#> SRR1785270 5 0.0703 0.846 0.024 0.000 0.000 0.000 0.976
#> SRR1785271 5 0.0703 0.846 0.024 0.000 0.000 0.000 0.976
#> SRR1785272 3 0.3582 0.713 0.224 0.000 0.768 0.008 0.000
#> SRR1785273 3 0.3355 0.743 0.184 0.000 0.804 0.012 0.000
#> SRR1785276 5 0.4522 0.679 0.196 0.000 0.068 0.000 0.736
#> SRR1785277 5 0.4571 0.684 0.188 0.000 0.076 0.000 0.736
#> SRR1785274 5 0.0451 0.845 0.008 0.000 0.004 0.000 0.988
#> SRR1785275 5 0.0451 0.845 0.008 0.000 0.004 0.000 0.988
#> SRR1785280 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785278 1 0.0671 0.850 0.980 0.000 0.004 0.000 0.016
#> SRR1785279 1 0.0671 0.850 0.980 0.000 0.004 0.000 0.016
#> SRR1785282 1 0.2504 0.827 0.896 0.000 0.040 0.064 0.000
#> SRR1785283 1 0.2554 0.825 0.892 0.000 0.036 0.072 0.000
#> SRR1785284 5 0.1579 0.841 0.032 0.000 0.000 0.024 0.944
#> SRR1785285 5 0.1668 0.840 0.032 0.000 0.000 0.028 0.940
#> SRR1785286 4 0.4165 0.489 0.008 0.000 0.000 0.672 0.320
#> SRR1785287 4 0.4235 0.460 0.008 0.000 0.000 0.656 0.336
#> SRR1785288 1 0.3635 0.678 0.748 0.000 0.000 0.248 0.004
#> SRR1785289 1 0.3607 0.681 0.752 0.000 0.000 0.244 0.004
#> SRR1785290 2 0.0290 0.928 0.000 0.992 0.000 0.008 0.000
#> SRR1785291 2 0.0290 0.928 0.000 0.992 0.000 0.008 0.000
#> SRR1785296 4 0.2438 0.789 0.000 0.060 0.040 0.900 0.000
#> SRR1785297 4 0.2344 0.790 0.000 0.064 0.032 0.904 0.000
#> SRR1785292 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785293 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785294 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR1785295 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR1785298 2 0.2645 0.850 0.044 0.888 0.000 0.068 0.000
#> SRR1785299 2 0.2446 0.861 0.044 0.900 0.000 0.056 0.000
#> SRR1785300 4 0.4192 0.186 0.404 0.000 0.000 0.596 0.000
#> SRR1785301 4 0.4283 0.020 0.456 0.000 0.000 0.544 0.000
#> SRR1785304 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR1785305 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR1785306 5 0.1026 0.841 0.004 0.004 0.000 0.024 0.968
#> SRR1785307 5 0.1026 0.841 0.004 0.004 0.000 0.024 0.968
#> SRR1785302 2 0.5589 0.250 0.372 0.548 0.000 0.080 0.000
#> SRR1785303 2 0.5701 0.349 0.328 0.580 0.000 0.088 0.004
#> SRR1785308 3 0.1478 0.804 0.064 0.000 0.936 0.000 0.000
#> SRR1785309 3 0.1478 0.804 0.064 0.000 0.936 0.000 0.000
#> SRR1785310 4 0.0162 0.843 0.004 0.000 0.000 0.996 0.000
#> SRR1785311 4 0.0162 0.843 0.004 0.000 0.000 0.996 0.000
#> SRR1785312 1 0.4250 0.619 0.720 0.000 0.028 0.000 0.252
#> SRR1785313 1 0.4506 0.531 0.676 0.000 0.028 0.000 0.296
#> SRR1785314 5 0.2418 0.832 0.024 0.020 0.000 0.044 0.912
#> SRR1785315 5 0.2430 0.834 0.028 0.020 0.000 0.040 0.912
#> SRR1785318 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785316 1 0.2077 0.833 0.908 0.000 0.000 0.084 0.008
#> SRR1785317 1 0.2011 0.830 0.908 0.000 0.000 0.088 0.004
#> SRR1785324 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785325 2 0.0000 0.932 0.000 1.000 0.000 0.000 0.000
#> SRR1785320 1 0.2012 0.840 0.920 0.000 0.020 0.000 0.060
#> SRR1785321 1 0.2012 0.840 0.920 0.000 0.020 0.000 0.060
#> SRR1785322 3 0.3700 0.696 0.240 0.000 0.752 0.008 0.000
#> SRR1785323 3 0.3756 0.688 0.248 0.000 0.744 0.008 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 2 0.5491 0.2920 0.048 0.540 0.368 0.000 0.000 0.044
#> SRR1785239 2 0.5199 0.3235 0.040 0.560 0.368 0.000 0.000 0.032
#> SRR1785240 5 0.0976 0.7143 0.008 0.000 0.016 0.000 0.968 0.008
#> SRR1785241 5 0.0862 0.7148 0.008 0.000 0.016 0.000 0.972 0.004
#> SRR1785242 3 0.3013 0.6586 0.000 0.000 0.844 0.000 0.088 0.068
#> SRR1785243 3 0.2962 0.6595 0.000 0.000 0.848 0.000 0.084 0.068
#> SRR1785244 6 0.4466 0.3941 0.336 0.000 0.000 0.000 0.044 0.620
#> SRR1785245 6 0.4466 0.3941 0.336 0.000 0.000 0.000 0.044 0.620
#> SRR1785246 3 0.5876 0.4811 0.288 0.000 0.564 0.008 0.120 0.020
#> SRR1785247 3 0.5898 0.4650 0.304 0.000 0.552 0.008 0.116 0.020
#> SRR1785248 2 0.2058 0.8126 0.000 0.908 0.056 0.000 0.000 0.036
#> SRR1785250 3 0.3194 0.6414 0.132 0.000 0.828 0.032 0.000 0.008
#> SRR1785251 3 0.3153 0.6435 0.128 0.000 0.832 0.032 0.000 0.008
#> SRR1785252 3 0.1268 0.6760 0.008 0.000 0.952 0.000 0.036 0.004
#> SRR1785253 3 0.1268 0.6760 0.008 0.000 0.952 0.000 0.036 0.004
#> SRR1785254 5 0.5503 0.3995 0.008 0.104 0.004 0.000 0.560 0.324
#> SRR1785255 5 0.5538 0.4024 0.008 0.112 0.004 0.000 0.564 0.312
#> SRR1785256 6 0.7107 0.2777 0.368 0.000 0.116 0.008 0.116 0.392
#> SRR1785257 6 0.7103 0.2909 0.360 0.000 0.116 0.008 0.116 0.400
#> SRR1785258 5 0.7276 -0.0727 0.092 0.000 0.308 0.000 0.316 0.284
#> SRR1785259 5 0.7228 -0.0222 0.088 0.000 0.300 0.000 0.344 0.268
#> SRR1785262 3 0.6141 0.3341 0.004 0.000 0.484 0.292 0.212 0.008
#> SRR1785263 3 0.6104 0.3544 0.004 0.000 0.496 0.280 0.212 0.008
#> SRR1785260 4 0.0260 0.9580 0.000 0.000 0.000 0.992 0.008 0.000
#> SRR1785261 4 0.0260 0.9580 0.000 0.000 0.000 0.992 0.008 0.000
#> SRR1785264 2 0.4354 0.6584 0.008 0.684 0.040 0.000 0.000 0.268
#> SRR1785265 2 0.4289 0.6618 0.008 0.688 0.036 0.000 0.000 0.268
#> SRR1785266 2 0.0260 0.8323 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785267 2 0.0260 0.8323 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1785268 1 0.1777 0.5964 0.932 0.000 0.032 0.000 0.012 0.024
#> SRR1785269 1 0.1857 0.5955 0.928 0.000 0.028 0.000 0.012 0.032
#> SRR1785270 5 0.2979 0.6687 0.188 0.004 0.000 0.000 0.804 0.004
#> SRR1785271 5 0.2913 0.6729 0.180 0.004 0.000 0.000 0.812 0.004
#> SRR1785272 3 0.5839 0.2169 0.400 0.000 0.484 0.048 0.000 0.068
#> SRR1785273 3 0.5876 0.2438 0.388 0.000 0.492 0.052 0.000 0.068
#> SRR1785276 1 0.4246 0.5257 0.796 0.020 0.068 0.000 0.084 0.032
#> SRR1785277 1 0.4321 0.5145 0.784 0.016 0.088 0.000 0.088 0.024
#> SRR1785274 5 0.2078 0.7017 0.032 0.000 0.040 0.000 0.916 0.012
#> SRR1785275 5 0.2271 0.7049 0.032 0.000 0.036 0.000 0.908 0.024
#> SRR1785280 2 0.0146 0.8325 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785281 2 0.0146 0.8325 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785278 1 0.3713 0.4095 0.704 0.000 0.004 0.000 0.008 0.284
#> SRR1785279 1 0.3733 0.3969 0.700 0.000 0.004 0.000 0.008 0.288
#> SRR1785282 1 0.4787 -0.1222 0.488 0.000 0.028 0.012 0.000 0.472
#> SRR1785283 1 0.4875 -0.1497 0.480 0.000 0.024 0.020 0.000 0.476
#> SRR1785284 5 0.3883 0.6747 0.040 0.000 0.000 0.028 0.788 0.144
#> SRR1785285 5 0.3920 0.6728 0.040 0.000 0.000 0.028 0.784 0.148
#> SRR1785286 5 0.4322 0.1888 0.000 0.000 0.000 0.452 0.528 0.020
#> SRR1785287 5 0.4310 0.2234 0.000 0.000 0.000 0.440 0.540 0.020
#> SRR1785288 6 0.5073 0.4684 0.268 0.000 0.000 0.080 0.016 0.636
#> SRR1785289 6 0.5073 0.4684 0.268 0.000 0.000 0.080 0.016 0.636
#> SRR1785290 2 0.3085 0.7756 0.004 0.828 0.012 0.008 0.000 0.148
#> SRR1785291 2 0.2948 0.7795 0.004 0.836 0.008 0.008 0.000 0.144
#> SRR1785296 4 0.2451 0.9109 0.008 0.036 0.024 0.904 0.000 0.028
#> SRR1785297 4 0.2522 0.9066 0.008 0.040 0.024 0.900 0.000 0.028
#> SRR1785292 2 0.0547 0.8311 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1785293 2 0.0547 0.8311 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1785294 4 0.0632 0.9482 0.024 0.000 0.000 0.976 0.000 0.000
#> SRR1785295 4 0.0632 0.9482 0.024 0.000 0.000 0.976 0.000 0.000
#> SRR1785298 2 0.5130 0.2955 0.020 0.540 0.004 0.036 0.000 0.400
#> SRR1785299 2 0.4912 0.3301 0.016 0.560 0.004 0.028 0.000 0.392
#> SRR1785300 6 0.5850 0.2112 0.096 0.000 0.000 0.436 0.028 0.440
#> SRR1785301 6 0.5876 0.2627 0.100 0.000 0.000 0.412 0.028 0.460
#> SRR1785304 4 0.1059 0.9523 0.000 0.004 0.000 0.964 0.016 0.016
#> SRR1785305 4 0.1059 0.9523 0.000 0.004 0.000 0.964 0.016 0.016
#> SRR1785306 5 0.1059 0.7178 0.000 0.016 0.000 0.016 0.964 0.004
#> SRR1785307 5 0.1059 0.7178 0.000 0.016 0.000 0.016 0.964 0.004
#> SRR1785302 6 0.5030 0.4235 0.056 0.172 0.000 0.020 0.036 0.716
#> SRR1785303 6 0.5057 0.4136 0.052 0.192 0.000 0.020 0.032 0.704
#> SRR1785308 3 0.3979 0.5507 0.020 0.000 0.708 0.008 0.000 0.264
#> SRR1785309 3 0.3957 0.5540 0.020 0.000 0.712 0.008 0.000 0.260
#> SRR1785310 4 0.0909 0.9546 0.000 0.000 0.000 0.968 0.012 0.020
#> SRR1785311 4 0.0909 0.9546 0.000 0.000 0.000 0.968 0.012 0.020
#> SRR1785312 1 0.2275 0.5774 0.888 0.000 0.008 0.000 0.096 0.008
#> SRR1785313 1 0.2355 0.5695 0.876 0.000 0.008 0.000 0.112 0.004
#> SRR1785314 5 0.4250 0.6913 0.120 0.036 0.000 0.032 0.788 0.024
#> SRR1785315 5 0.4250 0.6913 0.120 0.036 0.000 0.032 0.788 0.024
#> SRR1785318 2 0.0692 0.8285 0.004 0.976 0.000 0.000 0.000 0.020
#> SRR1785319 2 0.0692 0.8285 0.004 0.976 0.000 0.000 0.000 0.020
#> SRR1785316 1 0.4470 0.2168 0.604 0.000 0.000 0.040 0.000 0.356
#> SRR1785317 1 0.4470 0.2168 0.604 0.000 0.000 0.040 0.000 0.356
#> SRR1785324 2 0.0146 0.8325 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785325 2 0.0146 0.8325 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1785320 1 0.2008 0.5940 0.920 0.000 0.004 0.004 0.040 0.032
#> SRR1785321 1 0.1921 0.5950 0.924 0.000 0.004 0.004 0.044 0.024
#> SRR1785322 1 0.6112 -0.0507 0.456 0.000 0.404 0.060 0.000 0.080
#> SRR1785323 1 0.5916 -0.0186 0.472 0.000 0.404 0.044 0.000 0.080
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.466 0.776 0.884 0.4872 0.513 0.513
#> 3 3 0.553 0.839 0.897 0.2358 0.888 0.781
#> 4 4 0.602 0.806 0.841 0.1236 0.929 0.824
#> 5 5 0.800 0.818 0.891 0.0603 0.993 0.977
#> 6 6 0.767 0.818 0.849 0.0687 0.850 0.560
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 2 0.3584 0.935 0.068 0.932
#> SRR1785239 2 0.3584 0.935 0.068 0.932
#> SRR1785240 1 0.6048 0.763 0.852 0.148
#> SRR1785241 1 0.6048 0.763 0.852 0.148
#> SRR1785242 1 0.9850 0.373 0.572 0.428
#> SRR1785243 1 0.9850 0.373 0.572 0.428
#> SRR1785244 1 0.0000 0.817 1.000 0.000
#> SRR1785245 1 0.0000 0.817 1.000 0.000
#> SRR1785246 2 0.2948 0.939 0.052 0.948
#> SRR1785247 2 0.2948 0.939 0.052 0.948
#> SRR1785248 2 0.0000 0.932 0.000 1.000
#> SRR1785250 1 0.9850 0.373 0.572 0.428
#> SRR1785251 1 0.9850 0.373 0.572 0.428
#> SRR1785252 1 0.9850 0.373 0.572 0.428
#> SRR1785253 1 0.9850 0.373 0.572 0.428
#> SRR1785254 1 0.0672 0.816 0.992 0.008
#> SRR1785255 1 0.0672 0.816 0.992 0.008
#> SRR1785256 1 0.0000 0.817 1.000 0.000
#> SRR1785257 1 0.0000 0.817 1.000 0.000
#> SRR1785258 1 0.0000 0.817 1.000 0.000
#> SRR1785259 1 0.0000 0.817 1.000 0.000
#> SRR1785262 2 0.2948 0.939 0.052 0.948
#> SRR1785263 2 0.2948 0.939 0.052 0.948
#> SRR1785260 2 0.0672 0.935 0.008 0.992
#> SRR1785261 2 0.0672 0.935 0.008 0.992
#> SRR1785264 2 0.3584 0.935 0.068 0.932
#> SRR1785265 2 0.3584 0.935 0.068 0.932
#> SRR1785266 2 0.0000 0.932 0.000 1.000
#> SRR1785267 2 0.0000 0.932 0.000 1.000
#> SRR1785268 1 0.0000 0.817 1.000 0.000
#> SRR1785269 1 0.0000 0.817 1.000 0.000
#> SRR1785270 1 0.5519 0.772 0.872 0.128
#> SRR1785271 1 0.5519 0.772 0.872 0.128
#> SRR1785272 1 0.9850 0.373 0.572 0.428
#> SRR1785273 1 0.9850 0.373 0.572 0.428
#> SRR1785276 1 0.2603 0.808 0.956 0.044
#> SRR1785277 1 0.2603 0.808 0.956 0.044
#> SRR1785274 2 0.6438 0.819 0.164 0.836
#> SRR1785275 2 0.6438 0.819 0.164 0.836
#> SRR1785280 2 0.0000 0.932 0.000 1.000
#> SRR1785281 2 0.0000 0.932 0.000 1.000
#> SRR1785278 1 0.0000 0.817 1.000 0.000
#> SRR1785279 1 0.0000 0.817 1.000 0.000
#> SRR1785282 1 0.0000 0.817 1.000 0.000
#> SRR1785283 1 0.0000 0.817 1.000 0.000
#> SRR1785284 1 0.5842 0.767 0.860 0.140
#> SRR1785285 1 0.5842 0.767 0.860 0.140
#> SRR1785286 1 0.9866 0.366 0.568 0.432
#> SRR1785287 1 0.9866 0.366 0.568 0.432
#> SRR1785288 1 0.0000 0.817 1.000 0.000
#> SRR1785289 1 0.0000 0.817 1.000 0.000
#> SRR1785290 2 0.2603 0.939 0.044 0.956
#> SRR1785291 2 0.2603 0.939 0.044 0.956
#> SRR1785296 2 0.2043 0.943 0.032 0.968
#> SRR1785297 2 0.2043 0.943 0.032 0.968
#> SRR1785292 2 0.5408 0.847 0.124 0.876
#> SRR1785293 2 0.5408 0.847 0.124 0.876
#> SRR1785294 2 0.2043 0.943 0.032 0.968
#> SRR1785295 2 0.2043 0.943 0.032 0.968
#> SRR1785298 2 0.2423 0.943 0.040 0.960
#> SRR1785299 2 0.2423 0.943 0.040 0.960
#> SRR1785300 1 0.0000 0.817 1.000 0.000
#> SRR1785301 1 0.0000 0.817 1.000 0.000
#> SRR1785304 2 0.3114 0.918 0.056 0.944
#> SRR1785305 2 0.3114 0.918 0.056 0.944
#> SRR1785306 1 0.6801 0.744 0.820 0.180
#> SRR1785307 1 0.6801 0.744 0.820 0.180
#> SRR1785302 1 0.7528 0.711 0.784 0.216
#> SRR1785303 1 0.7528 0.711 0.784 0.216
#> SRR1785308 1 0.9850 0.373 0.572 0.428
#> SRR1785309 1 0.9850 0.373 0.572 0.428
#> SRR1785310 1 0.9866 0.366 0.568 0.432
#> SRR1785311 1 0.9866 0.366 0.568 0.432
#> SRR1785312 1 0.0000 0.817 1.000 0.000
#> SRR1785313 1 0.0000 0.817 1.000 0.000
#> SRR1785314 1 0.7528 0.711 0.784 0.216
#> SRR1785315 1 0.7528 0.711 0.784 0.216
#> SRR1785318 2 0.0000 0.932 0.000 1.000
#> SRR1785319 2 0.0000 0.932 0.000 1.000
#> SRR1785316 1 0.0000 0.817 1.000 0.000
#> SRR1785317 1 0.0000 0.817 1.000 0.000
#> SRR1785324 2 0.5408 0.847 0.124 0.876
#> SRR1785325 2 0.5408 0.847 0.124 0.876
#> SRR1785320 1 0.0000 0.817 1.000 0.000
#> SRR1785321 1 0.0000 0.817 1.000 0.000
#> SRR1785322 2 0.4022 0.927 0.080 0.920
#> SRR1785323 2 0.4022 0.927 0.080 0.920
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 2 0.5008 0.852 0.016 0.804 0.180
#> SRR1785239 2 0.5008 0.852 0.016 0.804 0.180
#> SRR1785240 1 0.4228 0.826 0.844 0.148 0.008
#> SRR1785241 1 0.4228 0.826 0.844 0.148 0.008
#> SRR1785242 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785244 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785246 2 0.5733 0.732 0.000 0.676 0.324
#> SRR1785247 2 0.5733 0.732 0.000 0.676 0.324
#> SRR1785248 2 0.1163 0.842 0.000 0.972 0.028
#> SRR1785250 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785251 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785252 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785254 1 0.0424 0.884 0.992 0.008 0.000
#> SRR1785255 1 0.0424 0.884 0.992 0.008 0.000
#> SRR1785256 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785257 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785258 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785259 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785262 2 0.5254 0.792 0.000 0.736 0.264
#> SRR1785263 2 0.5254 0.792 0.000 0.736 0.264
#> SRR1785260 2 0.0592 0.848 0.000 0.988 0.012
#> SRR1785261 2 0.0592 0.848 0.000 0.988 0.012
#> SRR1785264 2 0.5008 0.852 0.016 0.804 0.180
#> SRR1785265 2 0.5008 0.852 0.016 0.804 0.180
#> SRR1785266 2 0.0892 0.843 0.000 0.980 0.020
#> SRR1785267 2 0.0892 0.843 0.000 0.980 0.020
#> SRR1785268 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785269 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785270 1 0.3482 0.841 0.872 0.128 0.000
#> SRR1785271 1 0.3482 0.841 0.872 0.128 0.000
#> SRR1785272 3 0.0592 0.987 0.000 0.012 0.988
#> SRR1785273 3 0.0592 0.987 0.000 0.012 0.988
#> SRR1785276 1 0.2152 0.868 0.948 0.036 0.016
#> SRR1785277 1 0.2152 0.868 0.948 0.036 0.016
#> SRR1785274 2 0.7245 0.770 0.120 0.712 0.168
#> SRR1785275 2 0.7245 0.770 0.120 0.712 0.168
#> SRR1785280 2 0.0892 0.843 0.000 0.980 0.020
#> SRR1785281 2 0.0892 0.843 0.000 0.980 0.020
#> SRR1785278 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785279 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785282 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785283 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785284 1 0.3816 0.830 0.852 0.148 0.000
#> SRR1785285 1 0.3816 0.830 0.852 0.148 0.000
#> SRR1785286 1 0.6608 0.368 0.560 0.432 0.008
#> SRR1785287 1 0.6608 0.368 0.560 0.432 0.008
#> SRR1785288 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785290 2 0.3482 0.859 0.000 0.872 0.128
#> SRR1785291 2 0.3482 0.859 0.000 0.872 0.128
#> SRR1785296 2 0.4121 0.857 0.000 0.832 0.168
#> SRR1785297 2 0.4121 0.857 0.000 0.832 0.168
#> SRR1785292 2 0.3267 0.774 0.116 0.884 0.000
#> SRR1785293 2 0.3267 0.774 0.116 0.884 0.000
#> SRR1785294 2 0.4121 0.857 0.000 0.832 0.168
#> SRR1785295 2 0.4121 0.857 0.000 0.832 0.168
#> SRR1785298 2 0.4473 0.858 0.008 0.828 0.164
#> SRR1785299 2 0.4473 0.858 0.008 0.828 0.164
#> SRR1785300 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785304 2 0.1753 0.828 0.048 0.952 0.000
#> SRR1785305 2 0.1753 0.828 0.048 0.952 0.000
#> SRR1785306 1 0.4399 0.803 0.812 0.188 0.000
#> SRR1785307 1 0.4399 0.803 0.812 0.188 0.000
#> SRR1785302 1 0.4842 0.766 0.776 0.224 0.000
#> SRR1785303 1 0.4842 0.766 0.776 0.224 0.000
#> SRR1785308 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785309 3 0.0000 0.997 0.000 0.000 1.000
#> SRR1785310 1 0.6608 0.368 0.560 0.432 0.008
#> SRR1785311 1 0.6608 0.368 0.560 0.432 0.008
#> SRR1785312 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785313 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785314 1 0.4842 0.766 0.776 0.224 0.000
#> SRR1785315 1 0.4842 0.766 0.776 0.224 0.000
#> SRR1785318 2 0.0892 0.843 0.000 0.980 0.020
#> SRR1785319 2 0.0892 0.843 0.000 0.980 0.020
#> SRR1785316 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785324 2 0.3267 0.774 0.116 0.884 0.000
#> SRR1785325 2 0.3267 0.774 0.116 0.884 0.000
#> SRR1785320 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785321 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1785322 2 0.5348 0.849 0.028 0.796 0.176
#> SRR1785323 2 0.5348 0.849 0.028 0.796 0.176
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 4 0.1229 0.887 0.008 0.004 0.020 0.968
#> SRR1785239 4 0.1229 0.887 0.008 0.004 0.020 0.968
#> SRR1785240 1 0.5331 0.752 0.756 0.100 0.004 0.140
#> SRR1785241 1 0.5331 0.752 0.756 0.100 0.004 0.140
#> SRR1785242 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785243 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785244 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785245 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785246 4 0.3219 0.775 0.000 0.000 0.164 0.836
#> SRR1785247 4 0.3219 0.775 0.000 0.000 0.164 0.836
#> SRR1785248 2 0.2976 0.797 0.000 0.872 0.008 0.120
#> SRR1785250 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785251 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785252 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785253 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785254 1 0.0524 0.849 0.988 0.004 0.000 0.008
#> SRR1785255 1 0.0524 0.849 0.988 0.004 0.000 0.008
#> SRR1785256 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785257 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785258 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785259 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785262 4 0.2593 0.838 0.000 0.004 0.104 0.892
#> SRR1785263 4 0.2593 0.838 0.000 0.004 0.104 0.892
#> SRR1785260 4 0.3208 0.760 0.000 0.004 0.148 0.848
#> SRR1785261 4 0.3208 0.760 0.000 0.004 0.148 0.848
#> SRR1785264 4 0.1229 0.887 0.008 0.004 0.020 0.968
#> SRR1785265 4 0.1229 0.887 0.008 0.004 0.020 0.968
#> SRR1785266 2 0.2647 0.803 0.000 0.880 0.000 0.120
#> SRR1785267 2 0.2647 0.803 0.000 0.880 0.000 0.120
#> SRR1785268 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> SRR1785269 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> SRR1785270 1 0.5010 0.761 0.772 0.120 0.000 0.108
#> SRR1785271 1 0.5010 0.761 0.772 0.120 0.000 0.108
#> SRR1785272 3 0.3219 0.984 0.000 0.000 0.836 0.164
#> SRR1785273 3 0.3219 0.984 0.000 0.000 0.836 0.164
#> SRR1785276 1 0.1743 0.829 0.940 0.004 0.000 0.056
#> SRR1785277 1 0.1743 0.829 0.940 0.004 0.000 0.056
#> SRR1785274 4 0.3317 0.778 0.112 0.008 0.012 0.868
#> SRR1785275 4 0.3317 0.778 0.112 0.008 0.012 0.868
#> SRR1785280 2 0.2647 0.803 0.000 0.880 0.000 0.120
#> SRR1785281 2 0.2647 0.803 0.000 0.880 0.000 0.120
#> SRR1785278 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> SRR1785279 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> SRR1785282 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> SRR1785283 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> SRR1785284 1 0.5562 0.742 0.740 0.124 0.004 0.132
#> SRR1785285 1 0.5562 0.742 0.740 0.124 0.004 0.132
#> SRR1785286 1 0.8015 0.373 0.472 0.144 0.032 0.352
#> SRR1785287 1 0.8015 0.373 0.472 0.144 0.032 0.352
#> SRR1785288 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785289 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785290 4 0.3447 0.801 0.000 0.128 0.020 0.852
#> SRR1785291 4 0.3447 0.801 0.000 0.128 0.020 0.852
#> SRR1785296 4 0.0524 0.886 0.000 0.004 0.008 0.988
#> SRR1785297 4 0.0524 0.886 0.000 0.004 0.008 0.988
#> SRR1785292 2 0.6664 0.611 0.000 0.616 0.152 0.232
#> SRR1785293 2 0.6664 0.611 0.000 0.616 0.152 0.232
#> SRR1785294 4 0.0524 0.886 0.000 0.004 0.008 0.988
#> SRR1785295 4 0.0524 0.886 0.000 0.004 0.008 0.988
#> SRR1785298 4 0.0376 0.887 0.004 0.000 0.004 0.992
#> SRR1785299 4 0.0376 0.887 0.004 0.000 0.004 0.992
#> SRR1785300 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785304 4 0.4638 0.696 0.000 0.060 0.152 0.788
#> SRR1785305 4 0.4638 0.696 0.000 0.060 0.152 0.788
#> SRR1785306 1 0.6484 0.710 0.696 0.136 0.028 0.140
#> SRR1785307 1 0.6484 0.710 0.696 0.136 0.028 0.140
#> SRR1785302 1 0.6870 0.678 0.660 0.172 0.028 0.140
#> SRR1785303 1 0.6870 0.678 0.660 0.172 0.028 0.140
#> SRR1785308 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785309 3 0.3074 0.996 0.000 0.000 0.848 0.152
#> SRR1785310 1 0.8015 0.373 0.472 0.144 0.032 0.352
#> SRR1785311 1 0.8015 0.373 0.472 0.144 0.032 0.352
#> SRR1785312 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785313 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785314 1 0.6870 0.678 0.660 0.172 0.028 0.140
#> SRR1785315 1 0.6870 0.678 0.660 0.172 0.028 0.140
#> SRR1785318 2 0.2647 0.803 0.000 0.880 0.000 0.120
#> SRR1785319 2 0.2647 0.803 0.000 0.880 0.000 0.120
#> SRR1785316 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785324 2 0.6664 0.611 0.000 0.616 0.152 0.232
#> SRR1785325 2 0.6664 0.611 0.000 0.616 0.152 0.232
#> SRR1785320 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> SRR1785322 4 0.1598 0.883 0.020 0.004 0.020 0.956
#> SRR1785323 4 0.1598 0.883 0.020 0.004 0.020 0.956
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 4 0.1012 0.892 0.000 0.000 0.020 0.968 0.012
#> SRR1785239 4 0.1012 0.892 0.000 0.000 0.020 0.968 0.012
#> SRR1785240 1 0.4219 0.697 0.716 0.000 0.000 0.024 0.260
#> SRR1785241 1 0.4219 0.697 0.716 0.000 0.000 0.024 0.260
#> SRR1785242 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785243 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785244 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785245 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785246 4 0.2773 0.817 0.000 0.000 0.164 0.836 0.000
#> SRR1785247 4 0.2773 0.817 0.000 0.000 0.164 0.836 0.000
#> SRR1785248 2 0.0451 0.989 0.000 0.988 0.008 0.004 0.000
#> SRR1785250 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785251 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785252 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785253 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785254 1 0.0671 0.827 0.980 0.004 0.000 0.000 0.016
#> SRR1785255 1 0.0671 0.827 0.980 0.004 0.000 0.000 0.016
#> SRR1785256 1 0.0162 0.828 0.996 0.000 0.000 0.004 0.000
#> SRR1785257 1 0.0162 0.828 0.996 0.000 0.000 0.004 0.000
#> SRR1785258 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785259 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785262 4 0.2392 0.858 0.000 0.004 0.104 0.888 0.004
#> SRR1785263 4 0.2392 0.858 0.000 0.004 0.104 0.888 0.004
#> SRR1785260 4 0.3169 0.804 0.000 0.004 0.016 0.840 0.140
#> SRR1785261 4 0.3169 0.804 0.000 0.004 0.016 0.840 0.140
#> SRR1785264 4 0.1012 0.892 0.000 0.000 0.020 0.968 0.012
#> SRR1785265 4 0.1012 0.892 0.000 0.000 0.020 0.968 0.012
#> SRR1785266 2 0.0162 0.998 0.000 0.996 0.000 0.004 0.000
#> SRR1785267 2 0.0162 0.998 0.000 0.996 0.000 0.004 0.000
#> SRR1785268 1 0.0451 0.828 0.988 0.000 0.000 0.008 0.004
#> SRR1785269 1 0.0451 0.828 0.988 0.000 0.000 0.008 0.004
#> SRR1785270 1 0.3715 0.704 0.736 0.000 0.000 0.004 0.260
#> SRR1785271 1 0.3715 0.704 0.736 0.000 0.000 0.004 0.260
#> SRR1785272 3 0.1478 0.942 0.000 0.000 0.936 0.064 0.000
#> SRR1785273 3 0.1478 0.942 0.000 0.000 0.936 0.064 0.000
#> SRR1785276 1 0.1809 0.801 0.928 0.000 0.000 0.060 0.012
#> SRR1785277 1 0.1809 0.801 0.928 0.000 0.000 0.060 0.012
#> SRR1785274 4 0.3907 0.733 0.100 0.000 0.012 0.820 0.068
#> SRR1785275 4 0.3907 0.733 0.100 0.000 0.012 0.820 0.068
#> SRR1785280 2 0.0162 0.998 0.000 0.996 0.000 0.004 0.000
#> SRR1785281 2 0.0162 0.998 0.000 0.996 0.000 0.004 0.000
#> SRR1785278 1 0.0451 0.828 0.988 0.000 0.000 0.008 0.004
#> SRR1785279 1 0.0451 0.828 0.988 0.000 0.000 0.008 0.004
#> SRR1785282 1 0.0451 0.828 0.988 0.000 0.000 0.008 0.004
#> SRR1785283 1 0.0451 0.828 0.988 0.000 0.000 0.008 0.004
#> SRR1785284 1 0.4130 0.678 0.696 0.000 0.000 0.012 0.292
#> SRR1785285 1 0.4130 0.678 0.696 0.000 0.000 0.012 0.292
#> SRR1785286 1 0.6620 0.253 0.436 0.000 0.000 0.228 0.336
#> SRR1785287 1 0.6620 0.253 0.436 0.000 0.000 0.228 0.336
#> SRR1785288 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785289 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785290 4 0.3632 0.788 0.000 0.176 0.020 0.800 0.004
#> SRR1785291 4 0.3632 0.788 0.000 0.176 0.020 0.800 0.004
#> SRR1785296 4 0.0740 0.890 0.000 0.004 0.008 0.980 0.008
#> SRR1785297 4 0.0740 0.890 0.000 0.004 0.008 0.980 0.008
#> SRR1785292 5 0.1306 1.000 0.000 0.008 0.016 0.016 0.960
#> SRR1785293 5 0.1306 1.000 0.000 0.008 0.016 0.016 0.960
#> SRR1785294 4 0.0740 0.890 0.000 0.004 0.008 0.980 0.008
#> SRR1785295 4 0.0740 0.890 0.000 0.004 0.008 0.980 0.008
#> SRR1785298 4 0.0324 0.891 0.000 0.000 0.004 0.992 0.004
#> SRR1785299 4 0.0324 0.891 0.000 0.000 0.004 0.992 0.004
#> SRR1785300 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785301 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785304 4 0.3883 0.726 0.000 0.004 0.016 0.764 0.216
#> SRR1785305 4 0.3883 0.726 0.000 0.004 0.016 0.764 0.216
#> SRR1785306 1 0.4418 0.636 0.652 0.000 0.000 0.016 0.332
#> SRR1785307 1 0.4418 0.636 0.652 0.000 0.000 0.016 0.332
#> SRR1785302 1 0.4551 0.594 0.616 0.000 0.000 0.016 0.368
#> SRR1785303 1 0.4551 0.594 0.616 0.000 0.000 0.016 0.368
#> SRR1785308 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785309 3 0.0510 0.986 0.000 0.000 0.984 0.016 0.000
#> SRR1785310 1 0.6620 0.253 0.436 0.000 0.000 0.228 0.336
#> SRR1785311 1 0.6620 0.253 0.436 0.000 0.000 0.228 0.336
#> SRR1785312 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785313 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785314 1 0.4551 0.594 0.616 0.000 0.000 0.016 0.368
#> SRR1785315 1 0.4551 0.594 0.616 0.000 0.000 0.016 0.368
#> SRR1785318 2 0.0162 0.998 0.000 0.996 0.000 0.004 0.000
#> SRR1785319 2 0.0162 0.998 0.000 0.996 0.000 0.004 0.000
#> SRR1785316 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785317 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785324 5 0.1306 1.000 0.000 0.008 0.016 0.016 0.960
#> SRR1785325 5 0.1306 1.000 0.000 0.008 0.016 0.016 0.960
#> SRR1785320 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785321 1 0.0162 0.828 0.996 0.004 0.000 0.000 0.000
#> SRR1785322 4 0.1299 0.888 0.008 0.000 0.020 0.960 0.012
#> SRR1785323 4 0.1299 0.888 0.008 0.000 0.020 0.960 0.012
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 4 0.1452 0.872 0.000 0.000 0.020 0.948 0.020 0.012
#> SRR1785239 4 0.1452 0.872 0.000 0.000 0.020 0.948 0.020 0.012
#> SRR1785240 5 0.4010 0.612 0.408 0.000 0.000 0.008 0.584 0.000
#> SRR1785241 5 0.4010 0.612 0.408 0.000 0.000 0.008 0.584 0.000
#> SRR1785242 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785243 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785244 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785245 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785246 4 0.2416 0.757 0.000 0.000 0.156 0.844 0.000 0.000
#> SRR1785247 4 0.2416 0.757 0.000 0.000 0.156 0.844 0.000 0.000
#> SRR1785248 2 0.0260 0.989 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR1785250 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785251 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785252 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785253 3 0.0000 0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785254 1 0.0713 0.956 0.972 0.000 0.000 0.000 0.028 0.000
#> SRR1785255 1 0.0713 0.956 0.972 0.000 0.000 0.000 0.028 0.000
#> SRR1785256 1 0.0363 0.974 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1785257 1 0.0363 0.974 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1785258 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785259 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785262 4 0.1908 0.819 0.000 0.000 0.096 0.900 0.000 0.004
#> SRR1785263 4 0.1908 0.819 0.000 0.000 0.096 0.900 0.000 0.004
#> SRR1785260 6 0.3830 0.910 0.000 0.000 0.000 0.376 0.004 0.620
#> SRR1785261 6 0.3830 0.910 0.000 0.000 0.000 0.376 0.004 0.620
#> SRR1785264 4 0.1452 0.872 0.000 0.000 0.020 0.948 0.020 0.012
#> SRR1785265 4 0.1452 0.872 0.000 0.000 0.020 0.948 0.020 0.012
#> SRR1785266 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785267 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785268 1 0.0547 0.970 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR1785269 1 0.0547 0.970 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR1785270 5 0.3817 0.584 0.432 0.000 0.000 0.000 0.568 0.000
#> SRR1785271 5 0.3817 0.584 0.432 0.000 0.000 0.000 0.568 0.000
#> SRR1785272 3 0.1327 0.922 0.000 0.000 0.936 0.064 0.000 0.000
#> SRR1785273 3 0.1327 0.922 0.000 0.000 0.936 0.064 0.000 0.000
#> SRR1785276 1 0.2136 0.879 0.904 0.000 0.000 0.048 0.048 0.000
#> SRR1785277 1 0.2136 0.879 0.904 0.000 0.000 0.048 0.048 0.000
#> SRR1785274 4 0.3940 0.631 0.068 0.000 0.012 0.796 0.116 0.008
#> SRR1785275 4 0.3940 0.631 0.068 0.000 0.012 0.796 0.116 0.008
#> SRR1785280 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785281 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785278 1 0.0547 0.970 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR1785279 1 0.0547 0.970 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR1785282 1 0.0547 0.970 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR1785283 1 0.0547 0.970 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR1785284 5 0.3727 0.639 0.388 0.000 0.000 0.000 0.612 0.000
#> SRR1785285 5 0.3727 0.639 0.388 0.000 0.000 0.000 0.612 0.000
#> SRR1785286 5 0.6262 0.557 0.192 0.000 0.000 0.088 0.580 0.140
#> SRR1785287 5 0.6262 0.557 0.192 0.000 0.000 0.088 0.580 0.140
#> SRR1785288 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785289 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785290 4 0.3470 0.675 0.000 0.176 0.020 0.792 0.000 0.012
#> SRR1785291 4 0.3470 0.675 0.000 0.176 0.020 0.792 0.000 0.012
#> SRR1785296 4 0.0146 0.861 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1785297 4 0.0146 0.861 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1785292 5 0.4093 -0.119 0.000 0.008 0.000 0.000 0.516 0.476
#> SRR1785293 5 0.4093 -0.119 0.000 0.008 0.000 0.000 0.516 0.476
#> SRR1785294 4 0.0146 0.861 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1785295 4 0.0146 0.861 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1785298 4 0.0622 0.866 0.000 0.000 0.000 0.980 0.012 0.008
#> SRR1785299 4 0.0622 0.866 0.000 0.000 0.000 0.980 0.012 0.008
#> SRR1785300 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785304 6 0.3753 0.918 0.000 0.004 0.000 0.292 0.008 0.696
#> SRR1785305 6 0.3753 0.918 0.000 0.004 0.000 0.292 0.008 0.696
#> SRR1785306 5 0.3592 0.676 0.344 0.000 0.000 0.000 0.656 0.000
#> SRR1785307 5 0.3592 0.676 0.344 0.000 0.000 0.000 0.656 0.000
#> SRR1785302 5 0.3446 0.692 0.308 0.000 0.000 0.000 0.692 0.000
#> SRR1785303 5 0.3446 0.692 0.308 0.000 0.000 0.000 0.692 0.000
#> SRR1785308 3 0.0146 0.979 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1785309 3 0.0146 0.979 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1785310 5 0.6262 0.557 0.192 0.000 0.000 0.088 0.580 0.140
#> SRR1785311 5 0.6262 0.557 0.192 0.000 0.000 0.088 0.580 0.140
#> SRR1785312 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785313 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785314 5 0.3446 0.692 0.308 0.000 0.000 0.000 0.692 0.000
#> SRR1785315 5 0.3446 0.692 0.308 0.000 0.000 0.000 0.692 0.000
#> SRR1785318 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785319 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785316 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785324 5 0.4093 -0.119 0.000 0.008 0.000 0.000 0.516 0.476
#> SRR1785325 5 0.4093 -0.119 0.000 0.008 0.000 0.000 0.516 0.476
#> SRR1785320 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785322 4 0.1592 0.867 0.000 0.000 0.020 0.940 0.032 0.008
#> SRR1785323 4 0.1592 0.867 0.000 0.000 0.020 0.940 0.032 0.008
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.475 0.779 0.898 0.4943 0.502 0.502
#> 3 3 0.696 0.813 0.896 0.3195 0.752 0.544
#> 4 4 0.577 0.573 0.722 0.1187 0.889 0.686
#> 5 5 0.600 0.561 0.719 0.0717 0.866 0.558
#> 6 6 0.657 0.479 0.683 0.0453 0.933 0.716
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 2 0.6438 0.787 0.164 0.836
#> SRR1785239 2 0.6438 0.787 0.164 0.836
#> SRR1785240 1 0.0000 0.931 1.000 0.000
#> SRR1785241 1 0.0000 0.931 1.000 0.000
#> SRR1785242 2 0.6973 0.771 0.188 0.812
#> SRR1785243 2 0.6973 0.771 0.188 0.812
#> SRR1785244 1 0.0000 0.931 1.000 0.000
#> SRR1785245 1 0.0000 0.931 1.000 0.000
#> SRR1785246 2 0.6973 0.771 0.188 0.812
#> SRR1785247 2 0.6973 0.771 0.188 0.812
#> SRR1785248 2 0.0000 0.828 0.000 1.000
#> SRR1785250 2 0.6973 0.771 0.188 0.812
#> SRR1785251 2 0.6973 0.771 0.188 0.812
#> SRR1785252 2 0.6973 0.771 0.188 0.812
#> SRR1785253 2 0.6973 0.771 0.188 0.812
#> SRR1785254 1 0.0000 0.931 1.000 0.000
#> SRR1785255 1 0.0000 0.931 1.000 0.000
#> SRR1785256 1 0.0000 0.931 1.000 0.000
#> SRR1785257 1 0.0000 0.931 1.000 0.000
#> SRR1785258 1 0.0000 0.931 1.000 0.000
#> SRR1785259 1 0.0000 0.931 1.000 0.000
#> SRR1785262 2 0.0000 0.828 0.000 1.000
#> SRR1785263 2 0.0000 0.828 0.000 1.000
#> SRR1785260 2 0.0672 0.831 0.008 0.992
#> SRR1785261 2 0.0672 0.831 0.008 0.992
#> SRR1785264 2 0.0672 0.831 0.008 0.992
#> SRR1785265 2 0.0672 0.831 0.008 0.992
#> SRR1785266 2 0.0672 0.831 0.008 0.992
#> SRR1785267 2 0.0672 0.831 0.008 0.992
#> SRR1785268 1 0.0000 0.931 1.000 0.000
#> SRR1785269 1 0.0000 0.931 1.000 0.000
#> SRR1785270 1 0.3114 0.887 0.944 0.056
#> SRR1785271 1 0.3114 0.887 0.944 0.056
#> SRR1785272 2 0.6973 0.771 0.188 0.812
#> SRR1785273 2 0.6973 0.771 0.188 0.812
#> SRR1785276 1 0.0000 0.931 1.000 0.000
#> SRR1785277 1 0.0000 0.931 1.000 0.000
#> SRR1785274 1 0.9795 0.014 0.584 0.416
#> SRR1785275 1 0.9795 0.014 0.584 0.416
#> SRR1785280 2 0.0672 0.831 0.008 0.992
#> SRR1785281 2 0.0672 0.831 0.008 0.992
#> SRR1785278 1 0.0000 0.931 1.000 0.000
#> SRR1785279 1 0.0000 0.931 1.000 0.000
#> SRR1785282 1 0.0000 0.931 1.000 0.000
#> SRR1785283 1 0.0000 0.931 1.000 0.000
#> SRR1785284 1 0.3114 0.887 0.944 0.056
#> SRR1785285 1 0.3114 0.887 0.944 0.056
#> SRR1785286 2 0.9732 0.336 0.404 0.596
#> SRR1785287 2 0.9732 0.336 0.404 0.596
#> SRR1785288 1 0.0000 0.931 1.000 0.000
#> SRR1785289 1 0.0000 0.931 1.000 0.000
#> SRR1785290 2 0.0672 0.831 0.008 0.992
#> SRR1785291 2 0.0672 0.831 0.008 0.992
#> SRR1785296 2 0.0672 0.831 0.008 0.992
#> SRR1785297 2 0.0672 0.831 0.008 0.992
#> SRR1785292 2 0.7950 0.636 0.240 0.760
#> SRR1785293 2 0.7950 0.636 0.240 0.760
#> SRR1785294 2 0.0672 0.831 0.008 0.992
#> SRR1785295 2 0.0672 0.831 0.008 0.992
#> SRR1785298 2 0.0672 0.831 0.008 0.992
#> SRR1785299 2 0.0672 0.831 0.008 0.992
#> SRR1785300 1 0.0000 0.931 1.000 0.000
#> SRR1785301 1 0.0000 0.931 1.000 0.000
#> SRR1785304 2 0.0672 0.831 0.008 0.992
#> SRR1785305 2 0.0672 0.831 0.008 0.992
#> SRR1785306 2 0.9732 0.336 0.404 0.596
#> SRR1785307 2 0.9732 0.336 0.404 0.596
#> SRR1785302 1 0.7815 0.687 0.768 0.232
#> SRR1785303 1 0.7815 0.687 0.768 0.232
#> SRR1785308 2 0.6973 0.771 0.188 0.812
#> SRR1785309 2 0.6973 0.771 0.188 0.812
#> SRR1785310 2 0.9732 0.336 0.404 0.596
#> SRR1785311 2 0.9732 0.336 0.404 0.596
#> SRR1785312 1 0.0000 0.931 1.000 0.000
#> SRR1785313 1 0.0000 0.931 1.000 0.000
#> SRR1785314 1 0.8207 0.652 0.744 0.256
#> SRR1785315 1 0.8207 0.652 0.744 0.256
#> SRR1785318 2 0.0672 0.831 0.008 0.992
#> SRR1785319 2 0.0672 0.831 0.008 0.992
#> SRR1785316 1 0.0000 0.931 1.000 0.000
#> SRR1785317 1 0.0000 0.931 1.000 0.000
#> SRR1785324 2 0.9732 0.336 0.404 0.596
#> SRR1785325 2 0.9732 0.336 0.404 0.596
#> SRR1785320 1 0.0000 0.931 1.000 0.000
#> SRR1785321 1 0.0000 0.931 1.000 0.000
#> SRR1785322 2 0.7299 0.765 0.204 0.796
#> SRR1785323 2 0.7299 0.765 0.204 0.796
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.5158 0.655 0.004 0.232 0.764
#> SRR1785239 3 0.5158 0.655 0.004 0.232 0.764
#> SRR1785240 1 0.0592 0.970 0.988 0.012 0.000
#> SRR1785241 1 0.0592 0.970 0.988 0.012 0.000
#> SRR1785242 3 0.0661 0.875 0.004 0.008 0.988
#> SRR1785243 3 0.0661 0.875 0.004 0.008 0.988
#> SRR1785244 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785246 3 0.0237 0.874 0.004 0.000 0.996
#> SRR1785247 3 0.0237 0.874 0.004 0.000 0.996
#> SRR1785248 3 0.0424 0.874 0.000 0.008 0.992
#> SRR1785250 3 0.0000 0.873 0.000 0.000 1.000
#> SRR1785251 3 0.0000 0.873 0.000 0.000 1.000
#> SRR1785252 3 0.0661 0.875 0.004 0.008 0.988
#> SRR1785253 3 0.0661 0.875 0.004 0.008 0.988
#> SRR1785254 1 0.0237 0.975 0.996 0.004 0.000
#> SRR1785255 1 0.0237 0.975 0.996 0.004 0.000
#> SRR1785256 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785257 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785258 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785259 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785262 3 0.2796 0.819 0.000 0.092 0.908
#> SRR1785263 3 0.2796 0.819 0.000 0.092 0.908
#> SRR1785260 2 0.6062 0.552 0.000 0.616 0.384
#> SRR1785261 2 0.6062 0.552 0.000 0.616 0.384
#> SRR1785264 2 0.4654 0.745 0.000 0.792 0.208
#> SRR1785265 2 0.4654 0.745 0.000 0.792 0.208
#> SRR1785266 2 0.4842 0.737 0.000 0.776 0.224
#> SRR1785267 2 0.4842 0.737 0.000 0.776 0.224
#> SRR1785268 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785269 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785270 1 0.4452 0.809 0.808 0.192 0.000
#> SRR1785271 1 0.4452 0.809 0.808 0.192 0.000
#> SRR1785272 3 0.0237 0.874 0.004 0.000 0.996
#> SRR1785273 3 0.0237 0.874 0.004 0.000 0.996
#> SRR1785276 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785277 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785274 3 0.8985 0.389 0.160 0.300 0.540
#> SRR1785275 3 0.8985 0.389 0.160 0.300 0.540
#> SRR1785280 2 0.4654 0.744 0.000 0.792 0.208
#> SRR1785281 2 0.4654 0.744 0.000 0.792 0.208
#> SRR1785278 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785279 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785282 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785283 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785284 1 0.3686 0.863 0.860 0.140 0.000
#> SRR1785285 1 0.3686 0.863 0.860 0.140 0.000
#> SRR1785286 2 0.1711 0.770 0.032 0.960 0.008
#> SRR1785287 2 0.1711 0.770 0.032 0.960 0.008
#> SRR1785288 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785290 2 0.5216 0.715 0.000 0.740 0.260
#> SRR1785291 2 0.5216 0.715 0.000 0.740 0.260
#> SRR1785296 2 0.6215 0.496 0.000 0.572 0.428
#> SRR1785297 2 0.6215 0.496 0.000 0.572 0.428
#> SRR1785292 2 0.0237 0.770 0.004 0.996 0.000
#> SRR1785293 2 0.0237 0.770 0.004 0.996 0.000
#> SRR1785294 2 0.6180 0.514 0.000 0.584 0.416
#> SRR1785295 2 0.6180 0.514 0.000 0.584 0.416
#> SRR1785298 2 0.6192 0.508 0.000 0.580 0.420
#> SRR1785299 2 0.6192 0.508 0.000 0.580 0.420
#> SRR1785300 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785304 2 0.0592 0.770 0.000 0.988 0.012
#> SRR1785305 2 0.0592 0.770 0.000 0.988 0.012
#> SRR1785306 2 0.1163 0.769 0.028 0.972 0.000
#> SRR1785307 2 0.1163 0.769 0.028 0.972 0.000
#> SRR1785302 2 0.4002 0.650 0.160 0.840 0.000
#> SRR1785303 2 0.4002 0.650 0.160 0.840 0.000
#> SRR1785308 3 0.0661 0.875 0.004 0.008 0.988
#> SRR1785309 3 0.0661 0.875 0.004 0.008 0.988
#> SRR1785310 2 0.1711 0.770 0.032 0.960 0.008
#> SRR1785311 2 0.1711 0.770 0.032 0.960 0.008
#> SRR1785312 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785313 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785314 2 0.1411 0.766 0.036 0.964 0.000
#> SRR1785315 2 0.1411 0.766 0.036 0.964 0.000
#> SRR1785318 2 0.4702 0.744 0.000 0.788 0.212
#> SRR1785319 2 0.4702 0.744 0.000 0.788 0.212
#> SRR1785316 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785324 2 0.0237 0.770 0.004 0.996 0.000
#> SRR1785325 2 0.0237 0.770 0.004 0.996 0.000
#> SRR1785320 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785321 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1785322 3 0.6354 0.689 0.052 0.204 0.744
#> SRR1785323 3 0.6354 0.689 0.052 0.204 0.744
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.6201 0.4957 0.000 0.080 0.620 0.300
#> SRR1785239 3 0.6201 0.4957 0.000 0.080 0.620 0.300
#> SRR1785240 1 0.5730 0.6126 0.616 0.344 0.000 0.040
#> SRR1785241 1 0.5730 0.6126 0.616 0.344 0.000 0.040
#> SRR1785242 3 0.2335 0.7714 0.000 0.020 0.920 0.060
#> SRR1785243 3 0.2335 0.7714 0.000 0.020 0.920 0.060
#> SRR1785244 1 0.2924 0.8528 0.884 0.100 0.000 0.016
#> SRR1785245 1 0.2924 0.8528 0.884 0.100 0.000 0.016
#> SRR1785246 3 0.2759 0.7563 0.000 0.044 0.904 0.052
#> SRR1785247 3 0.2759 0.7563 0.000 0.044 0.904 0.052
#> SRR1785248 3 0.5374 0.5873 0.000 0.052 0.704 0.244
#> SRR1785250 3 0.0592 0.7795 0.000 0.000 0.984 0.016
#> SRR1785251 3 0.0592 0.7795 0.000 0.000 0.984 0.016
#> SRR1785252 3 0.2335 0.7714 0.000 0.020 0.920 0.060
#> SRR1785253 3 0.2335 0.7714 0.000 0.020 0.920 0.060
#> SRR1785254 1 0.3597 0.8282 0.836 0.148 0.000 0.016
#> SRR1785255 1 0.3597 0.8282 0.836 0.148 0.000 0.016
#> SRR1785256 1 0.2214 0.8694 0.928 0.044 0.000 0.028
#> SRR1785257 1 0.2214 0.8694 0.928 0.044 0.000 0.028
#> SRR1785258 1 0.0469 0.8753 0.988 0.012 0.000 0.000
#> SRR1785259 1 0.0469 0.8753 0.988 0.012 0.000 0.000
#> SRR1785262 3 0.5646 0.5206 0.000 0.048 0.656 0.296
#> SRR1785263 3 0.5646 0.5206 0.000 0.048 0.656 0.296
#> SRR1785260 4 0.5444 0.5490 0.000 0.048 0.264 0.688
#> SRR1785261 4 0.5444 0.5490 0.000 0.048 0.264 0.688
#> SRR1785264 4 0.6709 0.4444 0.000 0.212 0.172 0.616
#> SRR1785265 4 0.6709 0.4444 0.000 0.212 0.172 0.616
#> SRR1785266 4 0.6104 0.4712 0.000 0.232 0.104 0.664
#> SRR1785267 4 0.6104 0.4712 0.000 0.232 0.104 0.664
#> SRR1785268 1 0.2483 0.8659 0.916 0.052 0.000 0.032
#> SRR1785269 1 0.2483 0.8659 0.916 0.052 0.000 0.032
#> SRR1785270 2 0.5161 -0.0799 0.400 0.592 0.000 0.008
#> SRR1785271 2 0.5161 -0.0799 0.400 0.592 0.000 0.008
#> SRR1785272 3 0.0524 0.7792 0.000 0.008 0.988 0.004
#> SRR1785273 3 0.0524 0.7792 0.000 0.008 0.988 0.004
#> SRR1785276 1 0.4274 0.8197 0.828 0.120 0.012 0.040
#> SRR1785277 1 0.4274 0.8197 0.828 0.120 0.012 0.040
#> SRR1785274 2 0.9358 0.0670 0.096 0.372 0.268 0.264
#> SRR1785275 2 0.9358 0.0670 0.096 0.372 0.268 0.264
#> SRR1785280 4 0.6466 0.4280 0.000 0.288 0.104 0.608
#> SRR1785281 4 0.6466 0.4280 0.000 0.288 0.104 0.608
#> SRR1785278 1 0.2830 0.8607 0.900 0.060 0.000 0.040
#> SRR1785279 1 0.2830 0.8607 0.900 0.060 0.000 0.040
#> SRR1785282 1 0.2483 0.8659 0.916 0.052 0.000 0.032
#> SRR1785283 1 0.2483 0.8659 0.916 0.052 0.000 0.032
#> SRR1785284 1 0.5604 0.3712 0.504 0.476 0.000 0.020
#> SRR1785285 1 0.5604 0.3712 0.504 0.476 0.000 0.020
#> SRR1785286 2 0.5168 0.4118 0.004 0.504 0.000 0.492
#> SRR1785287 2 0.5168 0.4118 0.004 0.504 0.000 0.492
#> SRR1785288 1 0.2924 0.8528 0.884 0.100 0.000 0.016
#> SRR1785289 1 0.2924 0.8528 0.884 0.100 0.000 0.016
#> SRR1785290 4 0.4852 0.5532 0.000 0.072 0.152 0.776
#> SRR1785291 4 0.4852 0.5532 0.000 0.072 0.152 0.776
#> SRR1785296 4 0.4820 0.5434 0.000 0.012 0.296 0.692
#> SRR1785297 4 0.4820 0.5434 0.000 0.012 0.296 0.692
#> SRR1785292 2 0.5147 0.1626 0.004 0.536 0.000 0.460
#> SRR1785293 2 0.5147 0.1626 0.004 0.536 0.000 0.460
#> SRR1785294 4 0.5471 0.5513 0.000 0.048 0.268 0.684
#> SRR1785295 4 0.5471 0.5513 0.000 0.048 0.268 0.684
#> SRR1785298 4 0.6375 0.4859 0.000 0.088 0.312 0.600
#> SRR1785299 4 0.6375 0.4859 0.000 0.088 0.312 0.600
#> SRR1785300 1 0.2489 0.8717 0.912 0.068 0.000 0.020
#> SRR1785301 1 0.2489 0.8717 0.912 0.068 0.000 0.020
#> SRR1785304 4 0.4699 -0.0337 0.000 0.320 0.004 0.676
#> SRR1785305 4 0.4699 -0.0337 0.000 0.320 0.004 0.676
#> SRR1785306 2 0.4964 0.5041 0.004 0.616 0.000 0.380
#> SRR1785307 2 0.4964 0.5041 0.004 0.616 0.000 0.380
#> SRR1785302 2 0.6054 0.5100 0.056 0.592 0.000 0.352
#> SRR1785303 2 0.6054 0.5100 0.056 0.592 0.000 0.352
#> SRR1785308 3 0.1733 0.7782 0.000 0.024 0.948 0.028
#> SRR1785309 3 0.1733 0.7782 0.000 0.024 0.948 0.028
#> SRR1785310 4 0.5463 -0.3982 0.004 0.488 0.008 0.500
#> SRR1785311 4 0.5463 -0.3982 0.004 0.488 0.008 0.500
#> SRR1785312 1 0.0469 0.8753 0.988 0.012 0.000 0.000
#> SRR1785313 1 0.0469 0.8753 0.988 0.012 0.000 0.000
#> SRR1785314 2 0.5112 0.5062 0.008 0.608 0.000 0.384
#> SRR1785315 2 0.5112 0.5062 0.008 0.608 0.000 0.384
#> SRR1785318 4 0.6245 0.4422 0.000 0.268 0.096 0.636
#> SRR1785319 4 0.6245 0.4422 0.000 0.268 0.096 0.636
#> SRR1785316 1 0.2142 0.8647 0.928 0.056 0.000 0.016
#> SRR1785317 1 0.2142 0.8647 0.928 0.056 0.000 0.016
#> SRR1785324 2 0.4920 0.3334 0.004 0.628 0.000 0.368
#> SRR1785325 2 0.4920 0.3334 0.004 0.628 0.000 0.368
#> SRR1785320 1 0.0469 0.8753 0.988 0.012 0.000 0.000
#> SRR1785321 1 0.0469 0.8753 0.988 0.012 0.000 0.000
#> SRR1785322 3 0.8596 0.3445 0.064 0.192 0.488 0.256
#> SRR1785323 3 0.8596 0.3445 0.064 0.192 0.488 0.256
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 4 0.7295 0.3467 0.004 0.140 0.316 0.484 0.056
#> SRR1785239 4 0.7295 0.3467 0.004 0.140 0.316 0.484 0.056
#> SRR1785240 5 0.6865 -0.0622 0.352 0.016 0.000 0.184 0.448
#> SRR1785241 5 0.6865 -0.0622 0.352 0.016 0.000 0.184 0.448
#> SRR1785242 3 0.1357 0.8324 0.000 0.048 0.948 0.000 0.004
#> SRR1785243 3 0.1357 0.8324 0.000 0.048 0.948 0.000 0.004
#> SRR1785244 1 0.4158 0.7867 0.828 0.024 0.016 0.056 0.076
#> SRR1785245 1 0.4158 0.7867 0.828 0.024 0.016 0.056 0.076
#> SRR1785246 3 0.4591 0.4646 0.000 0.012 0.648 0.332 0.008
#> SRR1785247 3 0.4591 0.4646 0.000 0.012 0.648 0.332 0.008
#> SRR1785248 3 0.4589 0.1239 0.000 0.472 0.520 0.004 0.004
#> SRR1785250 3 0.1525 0.8270 0.000 0.004 0.948 0.036 0.012
#> SRR1785251 3 0.1525 0.8270 0.000 0.004 0.948 0.036 0.012
#> SRR1785252 3 0.1357 0.8324 0.000 0.048 0.948 0.000 0.004
#> SRR1785253 3 0.1357 0.8324 0.000 0.048 0.948 0.000 0.004
#> SRR1785254 1 0.5849 0.6544 0.684 0.028 0.016 0.076 0.196
#> SRR1785255 1 0.5849 0.6544 0.684 0.028 0.016 0.076 0.196
#> SRR1785256 1 0.4130 0.8058 0.788 0.008 0.004 0.164 0.036
#> SRR1785257 1 0.4130 0.8058 0.788 0.008 0.004 0.164 0.036
#> SRR1785258 1 0.0981 0.8368 0.972 0.012 0.000 0.008 0.008
#> SRR1785259 1 0.0981 0.8368 0.972 0.012 0.000 0.008 0.008
#> SRR1785262 4 0.6114 0.4525 0.000 0.140 0.272 0.580 0.008
#> SRR1785263 4 0.6114 0.4525 0.000 0.140 0.272 0.580 0.008
#> SRR1785260 4 0.6898 0.4521 0.000 0.260 0.128 0.552 0.060
#> SRR1785261 4 0.6898 0.4521 0.000 0.260 0.128 0.552 0.060
#> SRR1785264 4 0.7826 0.3044 0.000 0.284 0.124 0.444 0.148
#> SRR1785265 4 0.7826 0.3044 0.000 0.284 0.124 0.444 0.148
#> SRR1785266 2 0.1568 0.7967 0.000 0.944 0.036 0.020 0.000
#> SRR1785267 2 0.1568 0.7967 0.000 0.944 0.036 0.020 0.000
#> SRR1785268 1 0.4090 0.8058 0.792 0.008 0.004 0.160 0.036
#> SRR1785269 1 0.4090 0.8058 0.792 0.008 0.004 0.160 0.036
#> SRR1785270 5 0.4117 0.5412 0.108 0.008 0.008 0.064 0.812
#> SRR1785271 5 0.4117 0.5412 0.108 0.008 0.008 0.064 0.812
#> SRR1785272 3 0.2629 0.7947 0.000 0.004 0.880 0.104 0.012
#> SRR1785273 3 0.2629 0.7947 0.000 0.004 0.880 0.104 0.012
#> SRR1785276 1 0.5067 0.7442 0.716 0.016 0.004 0.208 0.056
#> SRR1785277 1 0.5067 0.7442 0.716 0.016 0.004 0.208 0.056
#> SRR1785274 4 0.7710 0.1673 0.036 0.048 0.120 0.468 0.328
#> SRR1785275 4 0.7710 0.1673 0.036 0.048 0.120 0.468 0.328
#> SRR1785280 2 0.2130 0.7902 0.000 0.924 0.044 0.016 0.016
#> SRR1785281 2 0.2130 0.7902 0.000 0.924 0.044 0.016 0.016
#> SRR1785278 1 0.4390 0.7922 0.764 0.008 0.004 0.184 0.040
#> SRR1785279 1 0.4390 0.7922 0.764 0.008 0.004 0.184 0.040
#> SRR1785282 1 0.3972 0.8089 0.800 0.008 0.004 0.156 0.032
#> SRR1785283 1 0.3972 0.8089 0.800 0.008 0.004 0.156 0.032
#> SRR1785284 5 0.6074 0.2893 0.280 0.016 0.008 0.088 0.608
#> SRR1785285 5 0.6074 0.2893 0.280 0.016 0.008 0.088 0.608
#> SRR1785286 5 0.4734 0.3046 0.000 0.036 0.000 0.312 0.652
#> SRR1785287 5 0.4734 0.3046 0.000 0.036 0.000 0.312 0.652
#> SRR1785288 1 0.3963 0.7891 0.836 0.016 0.016 0.052 0.080
#> SRR1785289 1 0.3963 0.7891 0.836 0.016 0.016 0.052 0.080
#> SRR1785290 2 0.6165 0.1138 0.000 0.552 0.092 0.336 0.020
#> SRR1785291 2 0.6165 0.1138 0.000 0.552 0.092 0.336 0.020
#> SRR1785296 4 0.6839 0.4387 0.000 0.276 0.140 0.540 0.044
#> SRR1785297 4 0.6839 0.4387 0.000 0.276 0.140 0.540 0.044
#> SRR1785292 5 0.5509 0.2156 0.000 0.464 0.000 0.064 0.472
#> SRR1785293 5 0.5509 0.2156 0.000 0.464 0.000 0.064 0.472
#> SRR1785294 4 0.6860 0.4513 0.000 0.264 0.128 0.552 0.056
#> SRR1785295 4 0.6860 0.4513 0.000 0.264 0.128 0.552 0.056
#> SRR1785298 4 0.6292 0.4840 0.000 0.212 0.140 0.616 0.032
#> SRR1785299 4 0.6292 0.4840 0.000 0.212 0.140 0.616 0.032
#> SRR1785300 1 0.3917 0.8301 0.840 0.016 0.016 0.068 0.060
#> SRR1785301 1 0.3917 0.8301 0.840 0.016 0.016 0.068 0.060
#> SRR1785304 4 0.6797 -0.0028 0.000 0.288 0.000 0.356 0.356
#> SRR1785305 4 0.6797 -0.0028 0.000 0.288 0.000 0.356 0.356
#> SRR1785306 5 0.3442 0.5854 0.000 0.104 0.000 0.060 0.836
#> SRR1785307 5 0.3442 0.5854 0.000 0.104 0.000 0.060 0.836
#> SRR1785302 5 0.3664 0.5783 0.004 0.064 0.000 0.104 0.828
#> SRR1785303 5 0.3664 0.5783 0.004 0.064 0.000 0.104 0.828
#> SRR1785308 3 0.1106 0.8367 0.000 0.024 0.964 0.012 0.000
#> SRR1785309 3 0.1106 0.8367 0.000 0.024 0.964 0.012 0.000
#> SRR1785310 4 0.5114 0.0666 0.000 0.036 0.000 0.492 0.472
#> SRR1785311 4 0.5114 0.0666 0.000 0.036 0.000 0.492 0.472
#> SRR1785312 1 0.0807 0.8378 0.976 0.012 0.000 0.012 0.000
#> SRR1785313 1 0.0807 0.8378 0.976 0.012 0.000 0.012 0.000
#> SRR1785314 5 0.3579 0.5845 0.000 0.100 0.000 0.072 0.828
#> SRR1785315 5 0.3579 0.5845 0.000 0.100 0.000 0.072 0.828
#> SRR1785318 2 0.1728 0.7978 0.000 0.940 0.036 0.004 0.020
#> SRR1785319 2 0.1728 0.7978 0.000 0.940 0.036 0.004 0.020
#> SRR1785316 1 0.2651 0.8202 0.908 0.012 0.016 0.028 0.036
#> SRR1785317 1 0.2651 0.8202 0.908 0.012 0.016 0.028 0.036
#> SRR1785324 5 0.5484 0.3517 0.000 0.392 0.000 0.068 0.540
#> SRR1785325 5 0.5484 0.3517 0.000 0.392 0.000 0.068 0.540
#> SRR1785320 1 0.0566 0.8373 0.984 0.012 0.000 0.004 0.000
#> SRR1785321 1 0.0566 0.8373 0.984 0.012 0.000 0.004 0.000
#> SRR1785322 4 0.6024 0.3456 0.028 0.016 0.220 0.660 0.076
#> SRR1785323 4 0.6024 0.3456 0.028 0.016 0.220 0.660 0.076
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 4 0.698 0.38861 0.000 0.048 0.144 0.492 0.036 0.280
#> SRR1785239 4 0.698 0.38861 0.000 0.048 0.144 0.492 0.036 0.280
#> SRR1785240 6 0.726 0.25007 0.204 0.044 0.004 0.024 0.308 0.416
#> SRR1785241 6 0.726 0.25007 0.204 0.044 0.004 0.024 0.308 0.416
#> SRR1785242 3 0.128 0.82309 0.000 0.012 0.956 0.024 0.004 0.004
#> SRR1785243 3 0.128 0.82309 0.000 0.012 0.956 0.024 0.004 0.004
#> SRR1785244 1 0.196 0.58480 0.928 0.016 0.012 0.000 0.012 0.032
#> SRR1785245 1 0.196 0.58480 0.928 0.016 0.012 0.000 0.012 0.032
#> SRR1785246 3 0.650 0.21905 0.000 0.020 0.416 0.340 0.004 0.220
#> SRR1785247 3 0.650 0.21905 0.000 0.020 0.416 0.340 0.004 0.220
#> SRR1785248 2 0.605 0.27359 0.000 0.476 0.392 0.096 0.008 0.028
#> SRR1785250 3 0.259 0.82336 0.000 0.020 0.892 0.056 0.004 0.028
#> SRR1785251 3 0.259 0.82336 0.000 0.020 0.892 0.056 0.004 0.028
#> SRR1785252 3 0.128 0.82309 0.000 0.012 0.956 0.024 0.004 0.004
#> SRR1785253 3 0.128 0.82309 0.000 0.012 0.956 0.024 0.004 0.004
#> SRR1785254 1 0.529 0.35717 0.704 0.052 0.012 0.000 0.140 0.092
#> SRR1785255 1 0.529 0.35717 0.704 0.052 0.012 0.000 0.140 0.092
#> SRR1785256 1 0.422 0.33829 0.520 0.004 0.000 0.000 0.008 0.468
#> SRR1785257 1 0.422 0.33829 0.520 0.004 0.000 0.000 0.008 0.468
#> SRR1785258 1 0.393 0.62654 0.756 0.032 0.008 0.000 0.004 0.200
#> SRR1785259 1 0.393 0.62654 0.756 0.032 0.008 0.000 0.004 0.200
#> SRR1785262 4 0.421 0.56690 0.000 0.048 0.048 0.784 0.004 0.116
#> SRR1785263 4 0.421 0.56690 0.000 0.048 0.048 0.784 0.004 0.116
#> SRR1785260 4 0.260 0.57019 0.000 0.084 0.004 0.876 0.036 0.000
#> SRR1785261 4 0.260 0.57019 0.000 0.084 0.004 0.876 0.036 0.000
#> SRR1785264 4 0.769 0.39229 0.000 0.128 0.044 0.448 0.140 0.240
#> SRR1785265 4 0.769 0.39229 0.000 0.128 0.044 0.448 0.140 0.240
#> SRR1785266 2 0.371 0.88070 0.000 0.816 0.016 0.120 0.028 0.020
#> SRR1785267 2 0.371 0.88070 0.000 0.816 0.016 0.120 0.028 0.020
#> SRR1785268 1 0.432 0.31754 0.504 0.008 0.000 0.000 0.008 0.480
#> SRR1785269 1 0.432 0.31754 0.504 0.008 0.000 0.000 0.008 0.480
#> SRR1785270 5 0.594 0.46526 0.144 0.056 0.008 0.004 0.644 0.144
#> SRR1785271 5 0.594 0.46526 0.144 0.056 0.008 0.004 0.644 0.144
#> SRR1785272 3 0.419 0.78219 0.000 0.016 0.776 0.100 0.004 0.104
#> SRR1785273 3 0.419 0.78219 0.000 0.016 0.776 0.100 0.004 0.104
#> SRR1785276 6 0.556 0.07917 0.368 0.020 0.000 0.032 0.032 0.548
#> SRR1785277 6 0.556 0.07917 0.368 0.020 0.000 0.032 0.032 0.548
#> SRR1785274 6 0.705 0.01195 0.000 0.028 0.052 0.244 0.188 0.488
#> SRR1785275 6 0.705 0.01195 0.000 0.028 0.052 0.244 0.188 0.488
#> SRR1785280 2 0.340 0.88335 0.000 0.836 0.020 0.100 0.040 0.004
#> SRR1785281 2 0.340 0.88335 0.000 0.836 0.020 0.100 0.040 0.004
#> SRR1785278 6 0.422 -0.30343 0.468 0.004 0.000 0.000 0.008 0.520
#> SRR1785279 6 0.422 -0.30343 0.468 0.004 0.000 0.000 0.008 0.520
#> SRR1785282 1 0.431 0.36306 0.524 0.008 0.000 0.000 0.008 0.460
#> SRR1785283 1 0.431 0.36306 0.524 0.008 0.000 0.000 0.008 0.460
#> SRR1785284 5 0.674 0.26351 0.248 0.052 0.004 0.004 0.500 0.192
#> SRR1785285 5 0.674 0.26351 0.248 0.052 0.004 0.004 0.500 0.192
#> SRR1785286 5 0.440 0.31828 0.000 0.004 0.000 0.352 0.616 0.028
#> SRR1785287 5 0.440 0.31828 0.000 0.004 0.000 0.352 0.616 0.028
#> SRR1785288 1 0.217 0.57989 0.916 0.016 0.008 0.000 0.016 0.044
#> SRR1785289 1 0.217 0.57989 0.916 0.016 0.008 0.000 0.016 0.044
#> SRR1785290 4 0.590 0.13089 0.000 0.368 0.016 0.520 0.028 0.068
#> SRR1785291 4 0.590 0.13089 0.000 0.368 0.016 0.520 0.028 0.068
#> SRR1785296 4 0.239 0.56880 0.000 0.092 0.004 0.884 0.020 0.000
#> SRR1785297 4 0.239 0.56880 0.000 0.092 0.004 0.884 0.020 0.000
#> SRR1785292 5 0.544 0.33200 0.000 0.348 0.008 0.032 0.568 0.044
#> SRR1785293 5 0.544 0.33200 0.000 0.348 0.008 0.032 0.568 0.044
#> SRR1785294 4 0.245 0.57150 0.000 0.084 0.004 0.884 0.028 0.000
#> SRR1785295 4 0.245 0.57150 0.000 0.084 0.004 0.884 0.028 0.000
#> SRR1785298 4 0.275 0.59900 0.000 0.004 0.004 0.868 0.028 0.096
#> SRR1785299 4 0.275 0.59900 0.000 0.004 0.004 0.868 0.028 0.096
#> SRR1785300 1 0.366 0.57988 0.780 0.028 0.000 0.000 0.012 0.180
#> SRR1785301 1 0.366 0.57988 0.780 0.028 0.000 0.000 0.012 0.180
#> SRR1785304 4 0.636 0.00859 0.000 0.120 0.008 0.444 0.392 0.036
#> SRR1785305 4 0.636 0.00859 0.000 0.120 0.008 0.444 0.392 0.036
#> SRR1785306 5 0.240 0.66248 0.000 0.020 0.000 0.044 0.900 0.036
#> SRR1785307 5 0.240 0.66248 0.000 0.020 0.000 0.044 0.900 0.036
#> SRR1785302 5 0.251 0.65574 0.000 0.016 0.000 0.052 0.892 0.040
#> SRR1785303 5 0.251 0.65574 0.000 0.016 0.000 0.052 0.892 0.040
#> SRR1785308 3 0.198 0.82590 0.000 0.004 0.924 0.032 0.008 0.032
#> SRR1785309 3 0.198 0.82590 0.000 0.004 0.924 0.032 0.008 0.032
#> SRR1785310 4 0.526 0.27560 0.000 0.008 0.000 0.572 0.328 0.092
#> SRR1785311 4 0.526 0.27560 0.000 0.008 0.000 0.572 0.328 0.092
#> SRR1785312 1 0.362 0.62207 0.760 0.024 0.000 0.000 0.004 0.212
#> SRR1785313 1 0.362 0.62207 0.760 0.024 0.000 0.000 0.004 0.212
#> SRR1785314 5 0.130 0.66216 0.000 0.012 0.000 0.040 0.948 0.000
#> SRR1785315 5 0.130 0.66216 0.000 0.012 0.000 0.040 0.948 0.000
#> SRR1785318 2 0.336 0.88412 0.000 0.832 0.012 0.112 0.040 0.004
#> SRR1785319 2 0.336 0.88412 0.000 0.832 0.012 0.112 0.040 0.004
#> SRR1785316 1 0.130 0.62310 0.948 0.004 0.004 0.000 0.000 0.044
#> SRR1785317 1 0.130 0.62310 0.948 0.004 0.004 0.000 0.000 0.044
#> SRR1785324 5 0.520 0.39546 0.000 0.316 0.008 0.024 0.608 0.044
#> SRR1785325 5 0.520 0.39546 0.000 0.316 0.008 0.024 0.608 0.044
#> SRR1785320 1 0.353 0.62742 0.772 0.024 0.000 0.000 0.004 0.200
#> SRR1785321 1 0.353 0.62742 0.772 0.024 0.000 0.000 0.004 0.200
#> SRR1785322 4 0.673 0.28298 0.000 0.020 0.104 0.424 0.056 0.396
#> SRR1785323 4 0.673 0.28298 0.000 0.020 0.104 0.424 0.056 0.396
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.976 0.989 0.5055 0.494 0.494
#> 3 3 0.825 0.929 0.947 0.3010 0.703 0.475
#> 4 4 0.874 0.804 0.902 0.1324 0.888 0.683
#> 5 5 0.833 0.832 0.898 0.0581 0.906 0.664
#> 6 6 0.798 0.752 0.843 0.0390 0.947 0.760
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
#> SRR1785238 2 0.000 0.978 0.000 1.000
#> SRR1785239 2 0.000 0.978 0.000 1.000
#> SRR1785240 1 0.000 1.000 1.000 0.000
#> SRR1785241 1 0.000 1.000 1.000 0.000
#> SRR1785242 2 0.000 0.978 0.000 1.000
#> SRR1785243 2 0.000 0.978 0.000 1.000
#> SRR1785244 1 0.000 1.000 1.000 0.000
#> SRR1785245 1 0.000 1.000 1.000 0.000
#> SRR1785246 2 0.000 0.978 0.000 1.000
#> SRR1785247 2 0.000 0.978 0.000 1.000
#> SRR1785248 2 0.000 0.978 0.000 1.000
#> SRR1785250 2 0.000 0.978 0.000 1.000
#> SRR1785251 2 0.000 0.978 0.000 1.000
#> SRR1785252 2 0.000 0.978 0.000 1.000
#> SRR1785253 2 0.000 0.978 0.000 1.000
#> SRR1785254 1 0.000 1.000 1.000 0.000
#> SRR1785255 1 0.000 1.000 1.000 0.000
#> SRR1785256 1 0.000 1.000 1.000 0.000
#> SRR1785257 1 0.000 1.000 1.000 0.000
#> SRR1785258 1 0.000 1.000 1.000 0.000
#> SRR1785259 1 0.000 1.000 1.000 0.000
#> SRR1785262 2 0.000 0.978 0.000 1.000
#> SRR1785263 2 0.000 0.978 0.000 1.000
#> SRR1785260 2 0.000 0.978 0.000 1.000
#> SRR1785261 2 0.000 0.978 0.000 1.000
#> SRR1785264 2 0.000 0.978 0.000 1.000
#> SRR1785265 2 0.000 0.978 0.000 1.000
#> SRR1785266 2 0.000 0.978 0.000 1.000
#> SRR1785267 2 0.000 0.978 0.000 1.000
#> SRR1785268 1 0.000 1.000 1.000 0.000
#> SRR1785269 1 0.000 1.000 1.000 0.000
#> SRR1785270 1 0.000 1.000 1.000 0.000
#> SRR1785271 1 0.000 1.000 1.000 0.000
#> SRR1785272 2 0.000 0.978 0.000 1.000
#> SRR1785273 2 0.000 0.978 0.000 1.000
#> SRR1785276 1 0.000 1.000 1.000 0.000
#> SRR1785277 1 0.000 1.000 1.000 0.000
#> SRR1785274 2 0.904 0.546 0.320 0.680
#> SRR1785275 2 0.904 0.546 0.320 0.680
#> SRR1785280 2 0.000 0.978 0.000 1.000
#> SRR1785281 2 0.000 0.978 0.000 1.000
#> SRR1785278 1 0.000 1.000 1.000 0.000
#> SRR1785279 1 0.000 1.000 1.000 0.000
#> SRR1785282 1 0.000 1.000 1.000 0.000
#> SRR1785283 1 0.000 1.000 1.000 0.000
#> SRR1785284 1 0.000 1.000 1.000 0.000
#> SRR1785285 1 0.000 1.000 1.000 0.000
#> SRR1785286 1 0.000 1.000 1.000 0.000
#> SRR1785287 1 0.000 1.000 1.000 0.000
#> SRR1785288 1 0.000 1.000 1.000 0.000
#> SRR1785289 1 0.000 1.000 1.000 0.000
#> SRR1785290 2 0.000 0.978 0.000 1.000
#> SRR1785291 2 0.000 0.978 0.000 1.000
#> SRR1785296 2 0.000 0.978 0.000 1.000
#> SRR1785297 2 0.000 0.978 0.000 1.000
#> SRR1785292 2 0.595 0.831 0.144 0.856
#> SRR1785293 2 0.595 0.831 0.144 0.856
#> SRR1785294 2 0.000 0.978 0.000 1.000
#> SRR1785295 2 0.000 0.978 0.000 1.000
#> SRR1785298 2 0.000 0.978 0.000 1.000
#> SRR1785299 2 0.000 0.978 0.000 1.000
#> SRR1785300 1 0.000 1.000 1.000 0.000
#> SRR1785301 1 0.000 1.000 1.000 0.000
#> SRR1785304 2 0.000 0.978 0.000 1.000
#> SRR1785305 2 0.000 0.978 0.000 1.000
#> SRR1785306 1 0.000 1.000 1.000 0.000
#> SRR1785307 1 0.000 1.000 1.000 0.000
#> SRR1785302 1 0.000 1.000 1.000 0.000
#> SRR1785303 1 0.000 1.000 1.000 0.000
#> SRR1785308 2 0.000 0.978 0.000 1.000
#> SRR1785309 2 0.000 0.978 0.000 1.000
#> SRR1785310 1 0.000 1.000 1.000 0.000
#> SRR1785311 1 0.000 1.000 1.000 0.000
#> SRR1785312 1 0.000 1.000 1.000 0.000
#> SRR1785313 1 0.000 1.000 1.000 0.000
#> SRR1785314 1 0.000 1.000 1.000 0.000
#> SRR1785315 1 0.000 1.000 1.000 0.000
#> SRR1785318 2 0.000 0.978 0.000 1.000
#> SRR1785319 2 0.000 0.978 0.000 1.000
#> SRR1785316 1 0.000 1.000 1.000 0.000
#> SRR1785317 1 0.000 1.000 1.000 0.000
#> SRR1785324 1 0.000 1.000 1.000 0.000
#> SRR1785325 1 0.000 1.000 1.000 0.000
#> SRR1785320 1 0.000 1.000 1.000 0.000
#> SRR1785321 1 0.000 1.000 1.000 0.000
#> SRR1785322 2 0.000 0.978 0.000 1.000
#> SRR1785323 2 0.000 0.978 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785239 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785240 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785241 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785242 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785244 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785246 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785248 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785250 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785251 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785252 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785254 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785255 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785256 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785257 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785258 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785259 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785262 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785263 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785260 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785261 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785264 2 0.4750 0.860 0.000 0.784 0.216
#> SRR1785265 2 0.4750 0.860 0.000 0.784 0.216
#> SRR1785266 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785267 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785268 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785269 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785270 1 0.1163 0.974 0.972 0.028 0.000
#> SRR1785271 1 0.1163 0.974 0.972 0.028 0.000
#> SRR1785272 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785273 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785276 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785277 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785274 3 0.4555 0.726 0.200 0.000 0.800
#> SRR1785275 3 0.4555 0.726 0.200 0.000 0.800
#> SRR1785280 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785281 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785278 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785279 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785282 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785283 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785284 1 0.0424 0.992 0.992 0.008 0.000
#> SRR1785285 1 0.0424 0.992 0.992 0.008 0.000
#> SRR1785286 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785287 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785288 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785290 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785291 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785296 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785297 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785292 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785294 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785295 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785298 2 0.4974 0.840 0.000 0.764 0.236
#> SRR1785299 2 0.4974 0.840 0.000 0.764 0.236
#> SRR1785300 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785304 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785305 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785306 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785307 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785302 2 0.3879 0.727 0.152 0.848 0.000
#> SRR1785303 2 0.3879 0.727 0.152 0.848 0.000
#> SRR1785308 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785309 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785310 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785311 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785312 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785313 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785314 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785315 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785318 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785319 2 0.4654 0.866 0.000 0.792 0.208
#> SRR1785316 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785324 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.859 0.000 1.000 0.000
#> SRR1785320 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785321 1 0.0000 0.998 1.000 0.000 0.000
#> SRR1785322 3 0.0000 0.972 0.000 0.000 1.000
#> SRR1785323 3 0.0000 0.972 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.0336 0.953 0.000 0.008 0.992 0.000
#> SRR1785239 3 0.0336 0.953 0.000 0.008 0.992 0.000
#> SRR1785240 1 0.0469 0.958 0.988 0.000 0.000 0.012
#> SRR1785241 1 0.0469 0.958 0.988 0.000 0.000 0.012
#> SRR1785242 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785243 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785244 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785245 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785246 3 0.0000 0.955 0.000 0.000 1.000 0.000
#> SRR1785247 3 0.0000 0.955 0.000 0.000 1.000 0.000
#> SRR1785248 2 0.4746 0.428 0.000 0.632 0.368 0.000
#> SRR1785250 3 0.0000 0.955 0.000 0.000 1.000 0.000
#> SRR1785251 3 0.0000 0.955 0.000 0.000 1.000 0.000
#> SRR1785252 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785253 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785254 1 0.0469 0.958 0.988 0.000 0.000 0.012
#> SRR1785255 1 0.0469 0.958 0.988 0.000 0.000 0.012
#> SRR1785256 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785257 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785258 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785259 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785262 3 0.6673 0.466 0.000 0.140 0.608 0.252
#> SRR1785263 3 0.6673 0.466 0.000 0.140 0.608 0.252
#> SRR1785260 2 0.4401 0.741 0.000 0.724 0.004 0.272
#> SRR1785261 2 0.4401 0.741 0.000 0.724 0.004 0.272
#> SRR1785264 2 0.2179 0.723 0.000 0.924 0.012 0.064
#> SRR1785265 2 0.2179 0.723 0.000 0.924 0.012 0.064
#> SRR1785266 2 0.0592 0.755 0.000 0.984 0.000 0.016
#> SRR1785267 2 0.0592 0.755 0.000 0.984 0.000 0.016
#> SRR1785268 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785269 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785270 4 0.4967 0.134 0.452 0.000 0.000 0.548
#> SRR1785271 4 0.4967 0.134 0.452 0.000 0.000 0.548
#> SRR1785272 3 0.0000 0.955 0.000 0.000 1.000 0.000
#> SRR1785273 3 0.0000 0.955 0.000 0.000 1.000 0.000
#> SRR1785276 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785277 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785274 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785275 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785280 2 0.1902 0.728 0.000 0.932 0.004 0.064
#> SRR1785281 2 0.1902 0.728 0.000 0.932 0.004 0.064
#> SRR1785278 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785279 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785282 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785284 1 0.4898 0.244 0.584 0.000 0.000 0.416
#> SRR1785285 1 0.4898 0.244 0.584 0.000 0.000 0.416
#> SRR1785286 4 0.1716 0.579 0.000 0.064 0.000 0.936
#> SRR1785287 4 0.1716 0.579 0.000 0.064 0.000 0.936
#> SRR1785288 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785289 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785290 2 0.0000 0.758 0.000 1.000 0.000 0.000
#> SRR1785291 2 0.0000 0.758 0.000 1.000 0.000 0.000
#> SRR1785296 2 0.4372 0.742 0.000 0.728 0.004 0.268
#> SRR1785297 2 0.4372 0.742 0.000 0.728 0.004 0.268
#> SRR1785292 4 0.4277 0.742 0.000 0.280 0.000 0.720
#> SRR1785293 4 0.4277 0.742 0.000 0.280 0.000 0.720
#> SRR1785294 2 0.4401 0.741 0.000 0.724 0.004 0.272
#> SRR1785295 2 0.4401 0.741 0.000 0.724 0.004 0.272
#> SRR1785298 2 0.4372 0.742 0.000 0.728 0.004 0.268
#> SRR1785299 2 0.4372 0.742 0.000 0.728 0.004 0.268
#> SRR1785300 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785304 4 0.4972 0.253 0.000 0.456 0.000 0.544
#> SRR1785305 4 0.4972 0.253 0.000 0.456 0.000 0.544
#> SRR1785306 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785307 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785302 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785303 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785308 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785309 3 0.0188 0.956 0.000 0.004 0.996 0.000
#> SRR1785310 4 0.2281 0.556 0.000 0.096 0.000 0.904
#> SRR1785311 4 0.2281 0.556 0.000 0.096 0.000 0.904
#> SRR1785312 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785313 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785314 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785315 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785318 2 0.1557 0.735 0.000 0.944 0.000 0.056
#> SRR1785319 2 0.1557 0.735 0.000 0.944 0.000 0.056
#> SRR1785316 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785324 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785325 4 0.4193 0.750 0.000 0.268 0.000 0.732
#> SRR1785320 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.966 1.000 0.000 0.000 0.000
#> SRR1785322 3 0.0000 0.955 0.000 0.000 1.000 0.000
#> SRR1785323 3 0.0000 0.955 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
#> SRR1785238 3 0.4249 0.299 0.000 0.432 0.568 0.000 0.000
#> SRR1785239 3 0.4249 0.299 0.000 0.432 0.568 0.000 0.000
#> SRR1785240 1 0.4382 0.748 0.760 0.004 0.000 0.060 0.176
#> SRR1785241 1 0.4382 0.748 0.760 0.004 0.000 0.060 0.176
#> SRR1785242 3 0.0510 0.925 0.000 0.016 0.984 0.000 0.000
#> SRR1785243 3 0.0510 0.925 0.000 0.016 0.984 0.000 0.000
#> SRR1785244 1 0.1560 0.924 0.948 0.004 0.000 0.020 0.028
#> SRR1785245 1 0.1560 0.924 0.948 0.004 0.000 0.020 0.028
#> SRR1785246 3 0.0162 0.924 0.000 0.004 0.996 0.000 0.000
#> SRR1785247 3 0.0162 0.924 0.000 0.004 0.996 0.000 0.000
#> SRR1785248 2 0.2179 0.834 0.000 0.888 0.112 0.000 0.000
#> SRR1785250 3 0.0000 0.924 0.000 0.000 1.000 0.000 0.000
#> SRR1785251 3 0.0000 0.924 0.000 0.000 1.000 0.000 0.000
#> SRR1785252 3 0.0510 0.925 0.000 0.016 0.984 0.000 0.000
#> SRR1785253 3 0.0510 0.925 0.000 0.016 0.984 0.000 0.000
#> SRR1785254 1 0.5089 0.532 0.636 0.004 0.000 0.048 0.312
#> SRR1785255 1 0.5089 0.532 0.636 0.004 0.000 0.048 0.312
#> SRR1785256 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785257 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785258 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785259 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785262 4 0.4958 0.361 0.000 0.032 0.400 0.568 0.000
#> SRR1785263 4 0.4958 0.361 0.000 0.032 0.400 0.568 0.000
#> SRR1785260 4 0.2648 0.768 0.000 0.152 0.000 0.848 0.000
#> SRR1785261 4 0.2648 0.768 0.000 0.152 0.000 0.848 0.000
#> SRR1785264 2 0.0451 0.965 0.000 0.988 0.000 0.004 0.008
#> SRR1785265 2 0.0451 0.965 0.000 0.988 0.000 0.004 0.008
#> SRR1785266 2 0.0771 0.970 0.000 0.976 0.000 0.020 0.004
#> SRR1785267 2 0.0771 0.970 0.000 0.976 0.000 0.020 0.004
#> SRR1785268 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785269 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785270 5 0.3018 0.778 0.068 0.004 0.000 0.056 0.872
#> SRR1785271 5 0.3018 0.778 0.068 0.004 0.000 0.056 0.872
#> SRR1785272 3 0.0000 0.924 0.000 0.000 1.000 0.000 0.000
#> SRR1785273 3 0.0000 0.924 0.000 0.000 1.000 0.000 0.000
#> SRR1785276 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785277 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785274 3 0.2797 0.882 0.008 0.016 0.896 0.060 0.020
#> SRR1785275 3 0.2797 0.882 0.008 0.016 0.896 0.060 0.020
#> SRR1785280 2 0.0290 0.966 0.000 0.992 0.000 0.000 0.008
#> SRR1785281 2 0.0290 0.966 0.000 0.992 0.000 0.000 0.008
#> SRR1785278 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785279 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785282 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785283 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785284 5 0.4585 0.635 0.216 0.004 0.000 0.052 0.728
#> SRR1785285 5 0.4585 0.635 0.216 0.004 0.000 0.052 0.728
#> SRR1785286 4 0.4126 0.442 0.000 0.000 0.000 0.620 0.380
#> SRR1785287 4 0.4126 0.442 0.000 0.000 0.000 0.620 0.380
#> SRR1785288 1 0.1646 0.922 0.944 0.004 0.000 0.020 0.032
#> SRR1785289 1 0.1646 0.922 0.944 0.004 0.000 0.020 0.032
#> SRR1785290 2 0.0794 0.965 0.000 0.972 0.000 0.028 0.000
#> SRR1785291 2 0.0794 0.965 0.000 0.972 0.000 0.028 0.000
#> SRR1785296 4 0.3109 0.749 0.000 0.200 0.000 0.800 0.000
#> SRR1785297 4 0.3109 0.749 0.000 0.200 0.000 0.800 0.000
#> SRR1785292 5 0.3695 0.777 0.000 0.164 0.000 0.036 0.800
#> SRR1785293 5 0.3695 0.777 0.000 0.164 0.000 0.036 0.800
#> SRR1785294 4 0.2690 0.768 0.000 0.156 0.000 0.844 0.000
#> SRR1785295 4 0.2690 0.768 0.000 0.156 0.000 0.844 0.000
#> SRR1785298 4 0.3143 0.746 0.000 0.204 0.000 0.796 0.000
#> SRR1785299 4 0.3143 0.746 0.000 0.204 0.000 0.796 0.000
#> SRR1785300 1 0.1082 0.934 0.964 0.000 0.000 0.008 0.028
#> SRR1785301 1 0.1082 0.934 0.964 0.000 0.000 0.008 0.028
#> SRR1785304 4 0.4201 0.676 0.000 0.044 0.000 0.752 0.204
#> SRR1785305 4 0.4201 0.676 0.000 0.044 0.000 0.752 0.204
#> SRR1785306 5 0.1364 0.844 0.000 0.012 0.000 0.036 0.952
#> SRR1785307 5 0.1364 0.844 0.000 0.012 0.000 0.036 0.952
#> SRR1785302 5 0.0703 0.846 0.000 0.024 0.000 0.000 0.976
#> SRR1785303 5 0.0703 0.846 0.000 0.024 0.000 0.000 0.976
#> SRR1785308 3 0.0510 0.925 0.000 0.016 0.984 0.000 0.000
#> SRR1785309 3 0.0510 0.925 0.000 0.016 0.984 0.000 0.000
#> SRR1785310 4 0.2605 0.726 0.000 0.000 0.000 0.852 0.148
#> SRR1785311 4 0.2605 0.726 0.000 0.000 0.000 0.852 0.148
#> SRR1785312 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785313 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785314 5 0.1485 0.846 0.000 0.020 0.000 0.032 0.948
#> SRR1785315 5 0.1485 0.846 0.000 0.020 0.000 0.032 0.948
#> SRR1785318 2 0.0771 0.970 0.000 0.976 0.000 0.020 0.004
#> SRR1785319 2 0.0771 0.970 0.000 0.976 0.000 0.020 0.004
#> SRR1785316 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785317 1 0.0162 0.944 0.996 0.000 0.000 0.004 0.000
#> SRR1785324 5 0.3309 0.803 0.000 0.128 0.000 0.036 0.836
#> SRR1785325 5 0.3309 0.803 0.000 0.128 0.000 0.036 0.836
#> SRR1785320 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR1785322 3 0.1357 0.906 0.000 0.004 0.948 0.048 0.000
#> SRR1785323 3 0.1357 0.906 0.000 0.004 0.948 0.048 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.4264 0.4124 0.000 0.352 0.620 0.000 0.000 0.028
#> SRR1785239 3 0.4264 0.4124 0.000 0.352 0.620 0.000 0.000 0.028
#> SRR1785240 6 0.4756 0.6277 0.304 0.000 0.000 0.004 0.064 0.628
#> SRR1785241 6 0.4756 0.6277 0.304 0.000 0.000 0.004 0.064 0.628
#> SRR1785242 3 0.0508 0.8629 0.000 0.004 0.984 0.000 0.000 0.012
#> SRR1785243 3 0.0508 0.8629 0.000 0.004 0.984 0.000 0.000 0.012
#> SRR1785244 1 0.3076 0.6833 0.760 0.000 0.000 0.000 0.000 0.240
#> SRR1785245 1 0.3076 0.6833 0.760 0.000 0.000 0.000 0.000 0.240
#> SRR1785246 3 0.1949 0.8439 0.000 0.004 0.904 0.004 0.000 0.088
#> SRR1785247 3 0.1949 0.8439 0.000 0.004 0.904 0.004 0.000 0.088
#> SRR1785248 2 0.1556 0.8973 0.000 0.920 0.080 0.000 0.000 0.000
#> SRR1785250 3 0.0692 0.8601 0.000 0.000 0.976 0.004 0.000 0.020
#> SRR1785251 3 0.0692 0.8601 0.000 0.000 0.976 0.004 0.000 0.020
#> SRR1785252 3 0.0508 0.8629 0.000 0.004 0.984 0.000 0.000 0.012
#> SRR1785253 3 0.0508 0.8629 0.000 0.004 0.984 0.000 0.000 0.012
#> SRR1785254 6 0.5310 0.6013 0.348 0.000 0.000 0.000 0.116 0.536
#> SRR1785255 6 0.5334 0.6084 0.344 0.000 0.000 0.000 0.120 0.536
#> SRR1785256 1 0.1387 0.8812 0.932 0.000 0.000 0.000 0.000 0.068
#> SRR1785257 1 0.1387 0.8812 0.932 0.000 0.000 0.000 0.000 0.068
#> SRR1785258 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785259 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785262 4 0.4373 0.4009 0.000 0.004 0.344 0.624 0.000 0.028
#> SRR1785263 4 0.4373 0.4009 0.000 0.004 0.344 0.624 0.000 0.028
#> SRR1785260 4 0.1327 0.7820 0.000 0.064 0.000 0.936 0.000 0.000
#> SRR1785261 4 0.1327 0.7820 0.000 0.064 0.000 0.936 0.000 0.000
#> SRR1785264 2 0.1261 0.9654 0.000 0.956 0.004 0.004 0.008 0.028
#> SRR1785265 2 0.1261 0.9654 0.000 0.956 0.004 0.004 0.008 0.028
#> SRR1785266 2 0.0260 0.9825 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1785267 2 0.0260 0.9825 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1785268 1 0.1007 0.8789 0.956 0.000 0.000 0.000 0.000 0.044
#> SRR1785269 1 0.1007 0.8789 0.956 0.000 0.000 0.000 0.000 0.044
#> SRR1785270 6 0.4256 0.4082 0.016 0.000 0.000 0.000 0.464 0.520
#> SRR1785271 6 0.4256 0.4082 0.016 0.000 0.000 0.000 0.464 0.520
#> SRR1785272 3 0.0692 0.8601 0.000 0.000 0.976 0.004 0.000 0.020
#> SRR1785273 3 0.0692 0.8601 0.000 0.000 0.976 0.004 0.000 0.020
#> SRR1785276 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785277 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785274 3 0.5477 0.5878 0.020 0.004 0.548 0.056 0.004 0.368
#> SRR1785275 3 0.5477 0.5878 0.020 0.004 0.548 0.056 0.004 0.368
#> SRR1785280 2 0.0146 0.9810 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1785281 2 0.0146 0.9810 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1785278 1 0.1267 0.8817 0.940 0.000 0.000 0.000 0.000 0.060
#> SRR1785279 1 0.1267 0.8817 0.940 0.000 0.000 0.000 0.000 0.060
#> SRR1785282 1 0.1007 0.8789 0.956 0.000 0.000 0.000 0.000 0.044
#> SRR1785283 1 0.1007 0.8789 0.956 0.000 0.000 0.000 0.000 0.044
#> SRR1785284 6 0.5293 0.6496 0.108 0.000 0.000 0.004 0.320 0.568
#> SRR1785285 6 0.5293 0.6496 0.108 0.000 0.000 0.004 0.320 0.568
#> SRR1785286 5 0.4650 -0.0214 0.000 0.000 0.000 0.472 0.488 0.040
#> SRR1785287 5 0.4650 -0.0214 0.000 0.000 0.000 0.472 0.488 0.040
#> SRR1785288 1 0.3175 0.6601 0.744 0.000 0.000 0.000 0.000 0.256
#> SRR1785289 1 0.3175 0.6601 0.744 0.000 0.000 0.000 0.000 0.256
#> SRR1785290 2 0.0260 0.9825 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1785291 2 0.0260 0.9825 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1785296 4 0.2278 0.7745 0.000 0.128 0.000 0.868 0.000 0.004
#> SRR1785297 4 0.2278 0.7745 0.000 0.128 0.000 0.868 0.000 0.004
#> SRR1785292 5 0.1958 0.7729 0.000 0.100 0.000 0.000 0.896 0.004
#> SRR1785293 5 0.1958 0.7729 0.000 0.100 0.000 0.000 0.896 0.004
#> SRR1785294 4 0.1387 0.7827 0.000 0.068 0.000 0.932 0.000 0.000
#> SRR1785295 4 0.1387 0.7827 0.000 0.068 0.000 0.932 0.000 0.000
#> SRR1785298 4 0.2278 0.7745 0.000 0.128 0.000 0.868 0.000 0.004
#> SRR1785299 4 0.2278 0.7745 0.000 0.128 0.000 0.868 0.000 0.004
#> SRR1785300 1 0.3101 0.7450 0.756 0.000 0.000 0.000 0.000 0.244
#> SRR1785301 1 0.3101 0.7450 0.756 0.000 0.000 0.000 0.000 0.244
#> SRR1785304 4 0.5180 0.0806 0.000 0.032 0.000 0.504 0.432 0.032
#> SRR1785305 4 0.5180 0.0806 0.000 0.032 0.000 0.504 0.432 0.032
#> SRR1785306 5 0.1152 0.7837 0.000 0.004 0.000 0.000 0.952 0.044
#> SRR1785307 5 0.1152 0.7837 0.000 0.004 0.000 0.000 0.952 0.044
#> SRR1785302 5 0.1411 0.7651 0.000 0.004 0.000 0.000 0.936 0.060
#> SRR1785303 5 0.1411 0.7651 0.000 0.004 0.000 0.000 0.936 0.060
#> SRR1785308 3 0.0508 0.8629 0.000 0.004 0.984 0.000 0.000 0.012
#> SRR1785309 3 0.0508 0.8629 0.000 0.004 0.984 0.000 0.000 0.012
#> SRR1785310 4 0.3139 0.6660 0.000 0.000 0.000 0.816 0.152 0.032
#> SRR1785311 4 0.3139 0.6660 0.000 0.000 0.000 0.816 0.152 0.032
#> SRR1785312 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785313 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785314 5 0.0777 0.7934 0.000 0.004 0.000 0.000 0.972 0.024
#> SRR1785315 5 0.0777 0.7934 0.000 0.004 0.000 0.000 0.972 0.024
#> SRR1785318 2 0.0260 0.9825 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1785319 2 0.0260 0.9825 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1785316 1 0.1863 0.8380 0.896 0.000 0.000 0.000 0.000 0.104
#> SRR1785317 1 0.1814 0.8410 0.900 0.000 0.000 0.000 0.000 0.100
#> SRR1785324 5 0.1471 0.7934 0.000 0.064 0.000 0.000 0.932 0.004
#> SRR1785325 5 0.1471 0.7934 0.000 0.064 0.000 0.000 0.932 0.004
#> SRR1785320 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.8878 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785322 3 0.3912 0.7682 0.000 0.004 0.748 0.044 0.000 0.204
#> SRR1785323 3 0.3912 0.7682 0.000 0.004 0.748 0.044 0.000 0.204
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.957 0.983 0.5037 0.496 0.496
#> 3 3 0.855 0.871 0.946 0.2739 0.745 0.543
#> 4 4 0.740 0.828 0.907 0.1025 0.721 0.411
#> 5 5 0.862 0.837 0.930 0.1071 0.838 0.524
#> 6 6 0.857 0.823 0.911 0.0589 0.903 0.593
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
#> SRR1785238 2 0.0000 0.987 0.000 1.000
#> SRR1785239 2 0.0000 0.987 0.000 1.000
#> SRR1785240 1 0.0000 0.975 1.000 0.000
#> SRR1785241 1 0.0000 0.975 1.000 0.000
#> SRR1785242 2 0.0000 0.987 0.000 1.000
#> SRR1785243 2 0.0000 0.987 0.000 1.000
#> SRR1785244 1 0.0000 0.975 1.000 0.000
#> SRR1785245 1 0.0000 0.975 1.000 0.000
#> SRR1785246 2 0.0000 0.987 0.000 1.000
#> SRR1785247 2 0.0000 0.987 0.000 1.000
#> SRR1785248 2 0.0000 0.987 0.000 1.000
#> SRR1785250 2 0.0000 0.987 0.000 1.000
#> SRR1785251 2 0.0000 0.987 0.000 1.000
#> SRR1785252 2 0.0000 0.987 0.000 1.000
#> SRR1785253 2 0.0000 0.987 0.000 1.000
#> SRR1785254 1 0.0000 0.975 1.000 0.000
#> SRR1785255 1 0.0000 0.975 1.000 0.000
#> SRR1785256 1 0.0000 0.975 1.000 0.000
#> SRR1785257 1 0.0000 0.975 1.000 0.000
#> SRR1785258 1 0.0000 0.975 1.000 0.000
#> SRR1785259 1 0.0000 0.975 1.000 0.000
#> SRR1785262 2 0.0000 0.987 0.000 1.000
#> SRR1785263 2 0.0000 0.987 0.000 1.000
#> SRR1785260 2 0.0000 0.987 0.000 1.000
#> SRR1785261 2 0.0000 0.987 0.000 1.000
#> SRR1785264 2 0.0376 0.985 0.004 0.996
#> SRR1785265 2 0.0376 0.985 0.004 0.996
#> SRR1785266 2 0.0000 0.987 0.000 1.000
#> SRR1785267 2 0.0000 0.987 0.000 1.000
#> SRR1785268 1 0.0000 0.975 1.000 0.000
#> SRR1785269 1 0.0000 0.975 1.000 0.000
#> SRR1785270 1 0.0000 0.975 1.000 0.000
#> SRR1785271 1 0.0000 0.975 1.000 0.000
#> SRR1785272 2 0.0000 0.987 0.000 1.000
#> SRR1785273 2 0.0000 0.987 0.000 1.000
#> SRR1785276 1 0.1414 0.959 0.980 0.020
#> SRR1785277 1 0.9460 0.425 0.636 0.364
#> SRR1785274 2 0.0376 0.985 0.004 0.996
#> SRR1785275 2 0.0376 0.985 0.004 0.996
#> SRR1785280 2 0.0000 0.987 0.000 1.000
#> SRR1785281 2 0.0000 0.987 0.000 1.000
#> SRR1785278 1 0.0000 0.975 1.000 0.000
#> SRR1785279 1 0.0000 0.975 1.000 0.000
#> SRR1785282 1 0.0000 0.975 1.000 0.000
#> SRR1785283 1 0.0000 0.975 1.000 0.000
#> SRR1785284 1 0.0000 0.975 1.000 0.000
#> SRR1785285 1 0.0000 0.975 1.000 0.000
#> SRR1785286 1 0.0000 0.975 1.000 0.000
#> SRR1785287 1 0.2043 0.949 0.968 0.032
#> SRR1785288 1 0.0000 0.975 1.000 0.000
#> SRR1785289 1 0.0000 0.975 1.000 0.000
#> SRR1785290 2 0.0000 0.987 0.000 1.000
#> SRR1785291 2 0.0000 0.987 0.000 1.000
#> SRR1785296 2 0.0000 0.987 0.000 1.000
#> SRR1785297 2 0.0000 0.987 0.000 1.000
#> SRR1785292 2 0.0000 0.987 0.000 1.000
#> SRR1785293 2 0.0000 0.987 0.000 1.000
#> SRR1785294 2 0.0000 0.987 0.000 1.000
#> SRR1785295 2 0.0000 0.987 0.000 1.000
#> SRR1785298 2 0.0000 0.987 0.000 1.000
#> SRR1785299 2 0.0000 0.987 0.000 1.000
#> SRR1785300 1 0.0000 0.975 1.000 0.000
#> SRR1785301 1 0.0000 0.975 1.000 0.000
#> SRR1785304 2 0.0000 0.987 0.000 1.000
#> SRR1785305 2 0.0000 0.987 0.000 1.000
#> SRR1785306 2 0.2778 0.942 0.048 0.952
#> SRR1785307 2 0.2236 0.954 0.036 0.964
#> SRR1785302 1 0.0000 0.975 1.000 0.000
#> SRR1785303 1 0.0000 0.975 1.000 0.000
#> SRR1785308 2 0.0376 0.985 0.004 0.996
#> SRR1785309 2 0.0000 0.987 0.000 1.000
#> SRR1785310 1 0.2603 0.938 0.956 0.044
#> SRR1785311 1 0.5629 0.841 0.868 0.132
#> SRR1785312 1 0.0000 0.975 1.000 0.000
#> SRR1785313 1 0.0000 0.975 1.000 0.000
#> SRR1785314 1 0.0000 0.975 1.000 0.000
#> SRR1785315 1 0.0000 0.975 1.000 0.000
#> SRR1785318 2 0.0000 0.987 0.000 1.000
#> SRR1785319 2 0.0000 0.987 0.000 1.000
#> SRR1785316 1 0.0000 0.975 1.000 0.000
#> SRR1785317 1 0.0000 0.975 1.000 0.000
#> SRR1785324 2 0.0376 0.985 0.004 0.996
#> SRR1785325 2 0.0376 0.985 0.004 0.996
#> SRR1785320 1 0.0000 0.975 1.000 0.000
#> SRR1785321 1 0.0000 0.975 1.000 0.000
#> SRR1785322 2 0.9866 0.205 0.432 0.568
#> SRR1785323 1 0.9491 0.425 0.632 0.368
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785239 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785240 1 0.524 0.73205 0.804 0.168 0.028
#> SRR1785241 1 0.524 0.73205 0.804 0.168 0.028
#> SRR1785242 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785243 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785244 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785245 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785246 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785247 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785248 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785250 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785251 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785252 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785253 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785254 1 0.334 0.82454 0.880 0.120 0.000
#> SRR1785255 1 0.586 0.44020 0.656 0.344 0.000
#> SRR1785256 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785257 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785258 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785259 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785262 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785263 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785260 3 0.465 0.73839 0.000 0.208 0.792
#> SRR1785261 3 0.465 0.73839 0.000 0.208 0.792
#> SRR1785264 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785265 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785266 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785267 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785268 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785269 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785270 2 0.153 0.92028 0.040 0.960 0.000
#> SRR1785271 2 0.153 0.92028 0.040 0.960 0.000
#> SRR1785272 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785273 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785276 1 0.631 -0.00442 0.512 0.000 0.488
#> SRR1785277 3 0.254 0.86716 0.080 0.000 0.920
#> SRR1785274 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785275 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785280 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785281 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785278 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785279 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785282 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785283 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785284 2 0.562 0.53005 0.308 0.692 0.000
#> SRR1785285 2 0.562 0.53005 0.308 0.692 0.000
#> SRR1785286 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785287 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785288 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785289 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785290 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785291 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785296 3 0.141 0.90900 0.000 0.036 0.964
#> SRR1785297 3 0.141 0.90900 0.000 0.036 0.964
#> SRR1785292 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785293 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785294 3 0.465 0.73839 0.000 0.208 0.792
#> SRR1785295 3 0.465 0.73839 0.000 0.208 0.792
#> SRR1785298 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785299 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785300 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785301 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785304 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785305 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785306 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785307 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785302 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785303 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785308 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785309 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785310 3 0.945 0.28507 0.304 0.208 0.488
#> SRR1785311 3 0.945 0.28507 0.304 0.208 0.488
#> SRR1785312 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785313 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785314 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785315 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785318 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785319 3 0.000 0.93230 0.000 0.000 1.000
#> SRR1785316 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785317 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785324 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785325 2 0.000 0.95322 0.000 1.000 0.000
#> SRR1785320 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785321 1 0.000 0.93955 1.000 0.000 0.000
#> SRR1785322 3 0.562 0.54685 0.308 0.000 0.692
#> SRR1785323 3 0.579 0.49789 0.332 0.000 0.668
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 1 0.6169 0.542 0.596 0.024 0.024 0.356
#> SRR1785239 1 0.6197 0.527 0.588 0.024 0.024 0.364
#> SRR1785240 1 0.4138 0.796 0.820 0.148 0.024 0.008
#> SRR1785241 1 0.4138 0.796 0.820 0.148 0.024 0.008
#> SRR1785242 3 0.0000 0.870 0.000 0.000 1.000 0.000
#> SRR1785243 3 0.0000 0.870 0.000 0.000 1.000 0.000
#> SRR1785244 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785245 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785246 4 0.1792 0.840 0.000 0.000 0.068 0.932
#> SRR1785247 4 0.0817 0.872 0.000 0.000 0.024 0.976
#> SRR1785248 3 0.0817 0.856 0.000 0.000 0.976 0.024
#> SRR1785250 3 0.0469 0.865 0.000 0.000 0.988 0.012
#> SRR1785251 3 0.0469 0.865 0.000 0.000 0.988 0.012
#> SRR1785252 3 0.0000 0.870 0.000 0.000 1.000 0.000
#> SRR1785253 3 0.0000 0.870 0.000 0.000 1.000 0.000
#> SRR1785254 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785255 1 0.0188 0.881 0.996 0.004 0.000 0.000
#> SRR1785256 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785257 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785258 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785259 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785262 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785263 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785260 4 0.3219 0.794 0.000 0.164 0.000 0.836
#> SRR1785261 4 0.3219 0.794 0.000 0.164 0.000 0.836
#> SRR1785264 1 0.6169 0.542 0.596 0.024 0.024 0.356
#> SRR1785265 1 0.6374 0.340 0.508 0.024 0.024 0.444
#> SRR1785266 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785267 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785268 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785269 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785270 2 0.1211 0.944 0.040 0.960 0.000 0.000
#> SRR1785271 2 0.1211 0.944 0.040 0.960 0.000 0.000
#> SRR1785272 3 0.4977 0.284 0.000 0.000 0.540 0.460
#> SRR1785273 3 0.5000 0.175 0.000 0.000 0.504 0.496
#> SRR1785276 1 0.4393 0.806 0.820 0.024 0.024 0.132
#> SRR1785277 1 0.4829 0.782 0.784 0.024 0.024 0.168
#> SRR1785274 1 0.4873 0.778 0.780 0.024 0.024 0.172
#> SRR1785275 1 0.4873 0.778 0.780 0.024 0.024 0.172
#> SRR1785280 3 0.3726 0.727 0.000 0.000 0.788 0.212
#> SRR1785281 3 0.3726 0.727 0.000 0.000 0.788 0.212
#> SRR1785278 1 0.0817 0.875 0.976 0.024 0.000 0.000
#> SRR1785279 1 0.0707 0.876 0.980 0.020 0.000 0.000
#> SRR1785282 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785284 1 0.3764 0.751 0.784 0.216 0.000 0.000
#> SRR1785285 1 0.3764 0.751 0.784 0.216 0.000 0.000
#> SRR1785286 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785287 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785288 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785289 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785290 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785291 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785296 4 0.1118 0.878 0.000 0.036 0.000 0.964
#> SRR1785297 4 0.1118 0.878 0.000 0.036 0.000 0.964
#> SRR1785292 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.3219 0.794 0.000 0.164 0.000 0.836
#> SRR1785295 4 0.3219 0.794 0.000 0.164 0.000 0.836
#> SRR1785298 4 0.1629 0.861 0.000 0.024 0.024 0.952
#> SRR1785299 4 0.0817 0.872 0.000 0.000 0.024 0.976
#> SRR1785300 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785304 4 0.4877 0.420 0.000 0.408 0.000 0.592
#> SRR1785305 4 0.4331 0.653 0.000 0.288 0.000 0.712
#> SRR1785306 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785307 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785302 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785303 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785308 3 0.0000 0.870 0.000 0.000 1.000 0.000
#> SRR1785309 3 0.0000 0.870 0.000 0.000 1.000 0.000
#> SRR1785310 1 0.6590 0.667 0.676 0.188 0.024 0.112
#> SRR1785311 1 0.7850 0.402 0.532 0.188 0.024 0.256
#> SRR1785312 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785313 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785314 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785315 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785318 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785319 4 0.0000 0.887 0.000 0.000 0.000 1.000
#> SRR1785316 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785324 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.991 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.882 1.000 0.000 0.000 0.000
#> SRR1785322 1 0.4446 0.804 0.816 0.024 0.024 0.136
#> SRR1785323 1 0.4446 0.804 0.816 0.024 0.024 0.136
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 2 0.0162 0.8431 0.000 0.996 0.000 0.004 0.000
#> SRR1785239 2 0.0162 0.8431 0.000 0.996 0.000 0.004 0.000
#> SRR1785240 1 0.2806 0.7826 0.844 0.152 0.000 0.000 0.004
#> SRR1785241 1 0.2806 0.7826 0.844 0.152 0.000 0.000 0.004
#> SRR1785242 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785243 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785244 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785245 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785246 2 0.0162 0.8431 0.000 0.996 0.000 0.004 0.000
#> SRR1785247 2 0.0162 0.8431 0.000 0.996 0.000 0.004 0.000
#> SRR1785248 3 0.0162 0.9965 0.000 0.000 0.996 0.004 0.000
#> SRR1785250 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785251 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785252 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785253 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785254 1 0.2648 0.7820 0.848 0.000 0.000 0.000 0.152
#> SRR1785255 1 0.4161 0.2940 0.608 0.000 0.000 0.000 0.392
#> SRR1785256 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785257 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785258 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785259 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785262 4 0.0162 0.8944 0.000 0.004 0.000 0.996 0.000
#> SRR1785263 4 0.0162 0.8944 0.000 0.004 0.000 0.996 0.000
#> SRR1785260 4 0.0162 0.8947 0.000 0.000 0.000 0.996 0.004
#> SRR1785261 4 0.0162 0.8947 0.000 0.000 0.000 0.996 0.004
#> SRR1785264 2 0.0000 0.8436 0.000 1.000 0.000 0.000 0.000
#> SRR1785265 2 0.0000 0.8436 0.000 1.000 0.000 0.000 0.000
#> SRR1785266 4 0.1270 0.8750 0.000 0.052 0.000 0.948 0.000
#> SRR1785267 4 0.1270 0.8750 0.000 0.052 0.000 0.948 0.000
#> SRR1785268 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785269 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785270 5 0.0880 0.9151 0.032 0.000 0.000 0.000 0.968
#> SRR1785271 5 0.0794 0.9172 0.028 0.000 0.000 0.000 0.972
#> SRR1785272 2 0.0162 0.8428 0.000 0.996 0.004 0.000 0.000
#> SRR1785273 2 0.0162 0.8428 0.000 0.996 0.004 0.000 0.000
#> SRR1785276 1 0.4300 0.0328 0.524 0.476 0.000 0.000 0.000
#> SRR1785277 2 0.1671 0.8000 0.076 0.924 0.000 0.000 0.000
#> SRR1785274 2 0.0000 0.8436 0.000 1.000 0.000 0.000 0.000
#> SRR1785275 2 0.0000 0.8436 0.000 1.000 0.000 0.000 0.000
#> SRR1785280 2 0.1168 0.8300 0.000 0.960 0.000 0.008 0.032
#> SRR1785281 2 0.1168 0.8300 0.000 0.960 0.000 0.008 0.032
#> SRR1785278 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785279 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785282 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785283 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785284 5 0.4118 0.4898 0.336 0.004 0.000 0.000 0.660
#> SRR1785285 5 0.4029 0.5327 0.316 0.004 0.000 0.000 0.680
#> SRR1785286 5 0.0880 0.9113 0.000 0.000 0.000 0.032 0.968
#> SRR1785287 5 0.0880 0.9113 0.000 0.000 0.000 0.032 0.968
#> SRR1785288 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785289 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785290 4 0.4171 0.4033 0.000 0.396 0.000 0.604 0.000
#> SRR1785291 4 0.4192 0.3865 0.000 0.404 0.000 0.596 0.000
#> SRR1785296 4 0.0000 0.8944 0.000 0.000 0.000 1.000 0.000
#> SRR1785297 4 0.0000 0.8944 0.000 0.000 0.000 1.000 0.000
#> SRR1785292 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785293 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785294 4 0.0162 0.8947 0.000 0.000 0.000 0.996 0.004
#> SRR1785295 4 0.0162 0.8947 0.000 0.000 0.000 0.996 0.004
#> SRR1785298 2 0.4138 0.4102 0.000 0.616 0.000 0.384 0.000
#> SRR1785299 2 0.4278 0.2614 0.000 0.548 0.000 0.452 0.000
#> SRR1785300 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785301 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785304 4 0.3534 0.6302 0.000 0.000 0.000 0.744 0.256
#> SRR1785305 4 0.2280 0.8101 0.000 0.000 0.000 0.880 0.120
#> SRR1785306 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785307 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785302 5 0.0880 0.9151 0.032 0.000 0.000 0.000 0.968
#> SRR1785303 5 0.0880 0.9151 0.032 0.000 0.000 0.000 0.968
#> SRR1785308 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785309 3 0.0000 0.9996 0.000 0.000 1.000 0.000 0.000
#> SRR1785310 2 0.6191 0.4995 0.168 0.564 0.000 0.264 0.004
#> SRR1785311 2 0.5819 0.4558 0.096 0.564 0.000 0.336 0.004
#> SRR1785312 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785313 1 0.0162 0.9418 0.996 0.004 0.000 0.000 0.000
#> SRR1785314 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785315 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785318 4 0.1485 0.8805 0.000 0.020 0.000 0.948 0.032
#> SRR1785319 4 0.1485 0.8805 0.000 0.020 0.000 0.948 0.032
#> SRR1785316 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785324 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785325 5 0.0000 0.9250 0.000 0.000 0.000 0.000 1.000
#> SRR1785320 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785321 1 0.0000 0.9414 1.000 0.000 0.000 0.000 0.000
#> SRR1785322 2 0.3661 0.5932 0.276 0.724 0.000 0.000 0.000
#> SRR1785323 2 0.3774 0.5598 0.296 0.704 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785239 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785240 1 0.0937 0.847 0.960 0.040 0.000 0.000 0.000 0.000
#> SRR1785241 1 0.0937 0.847 0.960 0.040 0.000 0.000 0.000 0.000
#> SRR1785242 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785243 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785244 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785245 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785246 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785247 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785248 3 0.0865 0.968 0.000 0.000 0.964 0.000 0.000 0.036
#> SRR1785250 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785251 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785252 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785253 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785254 6 0.3819 0.642 0.372 0.000 0.000 0.000 0.004 0.624
#> SRR1785255 6 0.3911 0.643 0.368 0.000 0.000 0.000 0.008 0.624
#> SRR1785256 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785257 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785258 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785259 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785262 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785263 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785260 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785261 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785264 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785265 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785266 4 0.2070 0.857 0.000 0.008 0.000 0.892 0.000 0.100
#> SRR1785267 4 0.2070 0.857 0.000 0.008 0.000 0.892 0.000 0.100
#> SRR1785268 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785269 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785270 5 0.0260 0.992 0.008 0.000 0.000 0.000 0.992 0.000
#> SRR1785271 5 0.0260 0.992 0.008 0.000 0.000 0.000 0.992 0.000
#> SRR1785272 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785273 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785276 1 0.1327 0.834 0.936 0.064 0.000 0.000 0.000 0.000
#> SRR1785277 1 0.3797 0.302 0.580 0.420 0.000 0.000 0.000 0.000
#> SRR1785274 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785275 2 0.0000 0.881 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1785280 2 0.2070 0.820 0.000 0.892 0.000 0.000 0.008 0.100
#> SRR1785281 2 0.2070 0.820 0.000 0.892 0.000 0.000 0.008 0.100
#> SRR1785278 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785279 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785282 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785283 1 0.0000 0.860 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1785284 1 0.1007 0.839 0.956 0.000 0.000 0.000 0.044 0.000
#> SRR1785285 1 0.1007 0.839 0.956 0.000 0.000 0.000 0.044 0.000
#> SRR1785286 5 0.0260 0.991 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1785287 5 0.0260 0.991 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1785288 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785289 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785290 4 0.3747 0.368 0.000 0.396 0.000 0.604 0.000 0.000
#> SRR1785291 4 0.3774 0.342 0.000 0.408 0.000 0.592 0.000 0.000
#> SRR1785296 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785297 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785292 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785293 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785294 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785295 4 0.0000 0.885 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1785298 2 0.3672 0.380 0.000 0.632 0.000 0.368 0.000 0.000
#> SRR1785299 2 0.3828 0.209 0.000 0.560 0.000 0.440 0.000 0.000
#> SRR1785300 1 0.0363 0.853 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1785301 1 0.0363 0.853 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1785304 4 0.3151 0.641 0.000 0.000 0.000 0.748 0.252 0.000
#> SRR1785305 4 0.2003 0.809 0.000 0.000 0.000 0.884 0.116 0.000
#> SRR1785306 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785307 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785302 5 0.0260 0.992 0.008 0.000 0.000 0.000 0.992 0.000
#> SRR1785303 5 0.0260 0.992 0.008 0.000 0.000 0.000 0.992 0.000
#> SRR1785308 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785309 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785310 1 0.3313 0.736 0.816 0.060 0.000 0.124 0.000 0.000
#> SRR1785311 1 0.5184 0.452 0.584 0.120 0.000 0.296 0.000 0.000
#> SRR1785312 6 0.3446 0.646 0.308 0.000 0.000 0.000 0.000 0.692
#> SRR1785313 1 0.3672 0.237 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1785314 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785315 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785318 4 0.2070 0.856 0.000 0.000 0.000 0.892 0.008 0.100
#> SRR1785319 4 0.2070 0.856 0.000 0.000 0.000 0.892 0.008 0.100
#> SRR1785316 6 0.3684 0.647 0.372 0.000 0.000 0.000 0.000 0.628
#> SRR1785317 6 0.3860 0.446 0.472 0.000 0.000 0.000 0.000 0.528
#> SRR1785324 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785325 5 0.0000 0.996 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1785320 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785321 6 0.1814 0.854 0.100 0.000 0.000 0.000 0.000 0.900
#> SRR1785322 2 0.3804 0.159 0.424 0.576 0.000 0.000 0.000 0.000
#> SRR1785323 1 0.3592 0.470 0.656 0.344 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.738 0.920 0.949 0.4311 0.530 0.530
#> 3 3 0.645 0.853 0.905 0.4125 0.823 0.680
#> 4 4 0.524 0.499 0.712 0.1309 0.698 0.390
#> 5 5 0.612 0.783 0.817 0.0735 0.751 0.372
#> 6 6 0.548 0.337 0.593 0.0920 0.769 0.301
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
#> SRR1785238 2 0.000 0.994 0.000 1.000
#> SRR1785239 2 0.000 0.994 0.000 1.000
#> SRR1785240 1 0.881 0.746 0.700 0.300
#> SRR1785241 1 0.881 0.746 0.700 0.300
#> SRR1785242 2 0.000 0.994 0.000 1.000
#> SRR1785243 2 0.000 0.994 0.000 1.000
#> SRR1785244 1 0.000 0.853 1.000 0.000
#> SRR1785245 1 0.000 0.853 1.000 0.000
#> SRR1785246 2 0.000 0.994 0.000 1.000
#> SRR1785247 2 0.000 0.994 0.000 1.000
#> SRR1785248 2 0.000 0.994 0.000 1.000
#> SRR1785250 2 0.000 0.994 0.000 1.000
#> SRR1785251 2 0.000 0.994 0.000 1.000
#> SRR1785252 2 0.000 0.994 0.000 1.000
#> SRR1785253 2 0.000 0.994 0.000 1.000
#> SRR1785254 1 0.881 0.746 0.700 0.300
#> SRR1785255 1 0.881 0.746 0.700 0.300
#> SRR1785256 1 0.000 0.853 1.000 0.000
#> SRR1785257 1 0.000 0.853 1.000 0.000
#> SRR1785258 1 0.000 0.853 1.000 0.000
#> SRR1785259 1 0.000 0.853 1.000 0.000
#> SRR1785262 2 0.000 0.994 0.000 1.000
#> SRR1785263 2 0.000 0.994 0.000 1.000
#> SRR1785260 2 0.000 0.994 0.000 1.000
#> SRR1785261 2 0.000 0.994 0.000 1.000
#> SRR1785264 2 0.000 0.994 0.000 1.000
#> SRR1785265 2 0.000 0.994 0.000 1.000
#> SRR1785266 2 0.000 0.994 0.000 1.000
#> SRR1785267 2 0.000 0.994 0.000 1.000
#> SRR1785268 1 0.000 0.853 1.000 0.000
#> SRR1785269 1 0.000 0.853 1.000 0.000
#> SRR1785270 1 0.881 0.746 0.700 0.300
#> SRR1785271 1 0.881 0.746 0.700 0.300
#> SRR1785272 2 0.000 0.994 0.000 1.000
#> SRR1785273 2 0.000 0.994 0.000 1.000
#> SRR1785276 1 0.881 0.746 0.700 0.300
#> SRR1785277 1 0.913 0.702 0.672 0.328
#> SRR1785274 2 0.000 0.994 0.000 1.000
#> SRR1785275 2 0.000 0.994 0.000 1.000
#> SRR1785280 2 0.000 0.994 0.000 1.000
#> SRR1785281 2 0.000 0.994 0.000 1.000
#> SRR1785278 1 0.881 0.746 0.700 0.300
#> SRR1785279 1 0.881 0.746 0.700 0.300
#> SRR1785282 1 0.871 0.751 0.708 0.292
#> SRR1785283 1 0.871 0.751 0.708 0.292
#> SRR1785284 1 0.881 0.746 0.700 0.300
#> SRR1785285 1 0.881 0.746 0.700 0.300
#> SRR1785286 2 0.000 0.994 0.000 1.000
#> SRR1785287 2 0.000 0.994 0.000 1.000
#> SRR1785288 1 0.000 0.853 1.000 0.000
#> SRR1785289 1 0.000 0.853 1.000 0.000
#> SRR1785290 2 0.000 0.994 0.000 1.000
#> SRR1785291 2 0.000 0.994 0.000 1.000
#> SRR1785296 2 0.000 0.994 0.000 1.000
#> SRR1785297 2 0.000 0.994 0.000 1.000
#> SRR1785292 2 0.000 0.994 0.000 1.000
#> SRR1785293 2 0.000 0.994 0.000 1.000
#> SRR1785294 2 0.000 0.994 0.000 1.000
#> SRR1785295 2 0.000 0.994 0.000 1.000
#> SRR1785298 2 0.000 0.994 0.000 1.000
#> SRR1785299 2 0.000 0.994 0.000 1.000
#> SRR1785300 1 0.000 0.853 1.000 0.000
#> SRR1785301 1 0.000 0.853 1.000 0.000
#> SRR1785304 2 0.000 0.994 0.000 1.000
#> SRR1785305 2 0.000 0.994 0.000 1.000
#> SRR1785306 2 0.000 0.994 0.000 1.000
#> SRR1785307 2 0.000 0.994 0.000 1.000
#> SRR1785302 2 0.662 0.744 0.172 0.828
#> SRR1785303 2 0.443 0.876 0.092 0.908
#> SRR1785308 2 0.000 0.994 0.000 1.000
#> SRR1785309 2 0.000 0.994 0.000 1.000
#> SRR1785310 2 0.000 0.994 0.000 1.000
#> SRR1785311 2 0.000 0.994 0.000 1.000
#> SRR1785312 1 0.000 0.853 1.000 0.000
#> SRR1785313 1 0.000 0.853 1.000 0.000
#> SRR1785314 2 0.000 0.994 0.000 1.000
#> SRR1785315 2 0.000 0.994 0.000 1.000
#> SRR1785318 2 0.000 0.994 0.000 1.000
#> SRR1785319 2 0.000 0.994 0.000 1.000
#> SRR1785316 1 0.000 0.853 1.000 0.000
#> SRR1785317 1 0.000 0.853 1.000 0.000
#> SRR1785324 2 0.000 0.994 0.000 1.000
#> SRR1785325 2 0.000 0.994 0.000 1.000
#> SRR1785320 1 0.000 0.853 1.000 0.000
#> SRR1785321 1 0.000 0.853 1.000 0.000
#> SRR1785322 2 0.000 0.994 0.000 1.000
#> SRR1785323 2 0.000 0.994 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 2 0.4399 0.867 0.000 0.812 0.188
#> SRR1785239 2 0.4399 0.867 0.000 0.812 0.188
#> SRR1785240 1 0.5334 0.827 0.820 0.060 0.120
#> SRR1785241 1 0.5334 0.827 0.820 0.060 0.120
#> SRR1785242 3 0.0000 0.861 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.861 0.000 0.000 1.000
#> SRR1785244 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785246 3 0.5138 0.817 0.000 0.252 0.748
#> SRR1785247 3 0.6008 0.661 0.000 0.372 0.628
#> SRR1785248 2 0.6095 0.617 0.000 0.608 0.392
#> SRR1785250 3 0.4452 0.847 0.000 0.192 0.808
#> SRR1785251 3 0.4452 0.847 0.000 0.192 0.808
#> SRR1785252 3 0.0000 0.861 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.861 0.000 0.000 1.000
#> SRR1785254 1 0.5241 0.824 0.820 0.048 0.132
#> SRR1785255 1 0.5241 0.824 0.820 0.048 0.132
#> SRR1785256 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785257 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785258 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785259 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785262 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785263 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785260 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785261 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785264 2 0.4399 0.867 0.000 0.812 0.188
#> SRR1785265 2 0.4399 0.867 0.000 0.812 0.188
#> SRR1785266 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785267 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785268 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785269 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785270 2 0.8857 0.375 0.344 0.524 0.132
#> SRR1785271 2 0.8101 0.603 0.228 0.640 0.132
#> SRR1785272 3 0.4452 0.847 0.000 0.192 0.808
#> SRR1785273 3 0.4452 0.847 0.000 0.192 0.808
#> SRR1785276 1 0.5241 0.824 0.820 0.048 0.132
#> SRR1785277 1 0.5241 0.824 0.820 0.048 0.132
#> SRR1785274 2 0.4128 0.872 0.012 0.856 0.132
#> SRR1785275 2 0.4128 0.872 0.012 0.856 0.132
#> SRR1785280 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785281 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785278 1 0.5307 0.827 0.820 0.056 0.124
#> SRR1785279 1 0.5307 0.827 0.820 0.056 0.124
#> SRR1785282 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785283 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785284 1 0.6854 0.718 0.740 0.136 0.124
#> SRR1785285 1 0.6389 0.761 0.768 0.108 0.124
#> SRR1785286 2 0.0237 0.850 0.004 0.996 0.000
#> SRR1785287 2 0.0237 0.850 0.004 0.996 0.000
#> SRR1785288 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785290 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785291 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785296 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785297 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785292 2 0.4755 0.867 0.008 0.808 0.184
#> SRR1785293 2 0.4755 0.867 0.008 0.808 0.184
#> SRR1785294 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785295 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785298 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785299 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785300 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785304 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785305 2 0.0000 0.850 0.000 1.000 0.000
#> SRR1785306 2 0.4128 0.872 0.012 0.856 0.132
#> SRR1785307 2 0.4128 0.872 0.012 0.856 0.132
#> SRR1785302 2 0.4418 0.868 0.020 0.848 0.132
#> SRR1785303 2 0.4128 0.872 0.012 0.856 0.132
#> SRR1785308 3 0.0237 0.861 0.000 0.004 0.996
#> SRR1785309 3 0.0237 0.861 0.000 0.004 0.996
#> SRR1785310 2 0.0237 0.850 0.004 0.996 0.000
#> SRR1785311 2 0.0237 0.850 0.004 0.996 0.000
#> SRR1785312 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785313 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785314 2 0.4128 0.872 0.012 0.856 0.132
#> SRR1785315 2 0.4128 0.872 0.012 0.856 0.132
#> SRR1785318 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785319 2 0.4452 0.866 0.000 0.808 0.192
#> SRR1785316 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785324 2 0.4861 0.867 0.012 0.808 0.180
#> SRR1785325 2 0.4861 0.867 0.012 0.808 0.180
#> SRR1785320 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785321 1 0.0000 0.920 1.000 0.000 0.000
#> SRR1785322 2 0.0237 0.848 0.004 0.996 0.000
#> SRR1785323 2 0.2066 0.806 0.060 0.940 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 2 0.6882 0.602 0.124 0.548 0.000 0.328
#> SRR1785239 2 0.6824 0.602 0.116 0.548 0.000 0.336
#> SRR1785240 2 0.7456 0.560 0.200 0.492 0.000 0.308
#> SRR1785241 2 0.7456 0.560 0.200 0.492 0.000 0.308
#> SRR1785242 3 0.4605 0.647 0.000 0.336 0.664 0.000
#> SRR1785243 3 0.4605 0.647 0.000 0.336 0.664 0.000
#> SRR1785244 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785245 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785246 4 0.4888 0.555 0.000 0.000 0.412 0.588
#> SRR1785247 4 0.4920 0.613 0.000 0.004 0.368 0.628
#> SRR1785248 2 0.2973 0.404 0.000 0.856 0.144 0.000
#> SRR1785250 3 0.4999 -0.519 0.000 0.000 0.508 0.492
#> SRR1785251 3 0.4999 -0.519 0.000 0.000 0.508 0.492
#> SRR1785252 3 0.4605 0.647 0.000 0.336 0.664 0.000
#> SRR1785253 3 0.4605 0.647 0.000 0.336 0.664 0.000
#> SRR1785254 1 0.5781 -0.450 0.492 0.480 0.028 0.000
#> SRR1785255 1 0.5781 -0.450 0.492 0.480 0.028 0.000
#> SRR1785256 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785257 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785258 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785259 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785262 4 0.5857 0.707 0.000 0.056 0.308 0.636
#> SRR1785263 4 0.5857 0.707 0.000 0.056 0.308 0.636
#> SRR1785260 4 0.5557 0.697 0.000 0.040 0.308 0.652
#> SRR1785261 4 0.5557 0.697 0.000 0.040 0.308 0.652
#> SRR1785264 2 0.5152 0.612 0.020 0.664 0.000 0.316
#> SRR1785265 2 0.4936 0.610 0.012 0.672 0.000 0.316
#> SRR1785266 2 0.4382 0.607 0.000 0.704 0.000 0.296
#> SRR1785267 2 0.4382 0.607 0.000 0.704 0.000 0.296
#> SRR1785268 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785269 1 0.4769 0.587 0.684 0.008 0.000 0.308
#> SRR1785270 1 0.5781 -0.450 0.492 0.480 0.028 0.000
#> SRR1785271 1 0.5781 -0.450 0.492 0.480 0.028 0.000
#> SRR1785272 4 0.4985 0.457 0.000 0.000 0.468 0.532
#> SRR1785273 4 0.4985 0.457 0.000 0.000 0.468 0.532
#> SRR1785276 2 0.7456 0.560 0.200 0.492 0.000 0.308
#> SRR1785277 2 0.7456 0.560 0.200 0.492 0.000 0.308
#> SRR1785274 2 0.6961 0.601 0.136 0.548 0.000 0.316
#> SRR1785275 2 0.6985 0.600 0.140 0.548 0.000 0.312
#> SRR1785280 2 0.0000 0.502 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.502 0.000 1.000 0.000 0.000
#> SRR1785278 2 0.7456 0.560 0.200 0.492 0.000 0.308
#> SRR1785279 2 0.7456 0.560 0.200 0.492 0.000 0.308
#> SRR1785282 2 0.7638 0.514 0.232 0.460 0.000 0.308
#> SRR1785283 2 0.7638 0.514 0.232 0.460 0.000 0.308
#> SRR1785284 2 0.4999 0.441 0.492 0.508 0.000 0.000
#> SRR1785285 2 0.4999 0.441 0.492 0.508 0.000 0.000
#> SRR1785286 4 0.7258 0.579 0.208 0.056 0.100 0.636
#> SRR1785287 4 0.7397 0.624 0.156 0.056 0.152 0.636
#> SRR1785288 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785289 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785290 2 0.4830 0.586 0.000 0.608 0.000 0.392
#> SRR1785291 2 0.4624 0.604 0.000 0.660 0.000 0.340
#> SRR1785296 4 0.1557 0.526 0.000 0.056 0.000 0.944
#> SRR1785297 4 0.1557 0.526 0.000 0.056 0.000 0.944
#> SRR1785292 2 0.4454 0.524 0.308 0.692 0.000 0.000
#> SRR1785293 2 0.4454 0.524 0.308 0.692 0.000 0.000
#> SRR1785294 4 0.5857 0.707 0.000 0.056 0.308 0.636
#> SRR1785295 4 0.5857 0.707 0.000 0.056 0.308 0.636
#> SRR1785298 4 0.1557 0.526 0.000 0.056 0.000 0.944
#> SRR1785299 4 0.1557 0.526 0.000 0.056 0.000 0.944
#> SRR1785300 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785304 4 0.5857 0.476 0.308 0.056 0.000 0.636
#> SRR1785305 4 0.5857 0.476 0.308 0.056 0.000 0.636
#> SRR1785306 2 0.5250 0.501 0.440 0.552 0.000 0.008
#> SRR1785307 2 0.5244 0.502 0.436 0.556 0.000 0.008
#> SRR1785302 2 0.4977 0.484 0.460 0.540 0.000 0.000
#> SRR1785303 2 0.4967 0.493 0.452 0.548 0.000 0.000
#> SRR1785308 3 0.0921 0.519 0.000 0.028 0.972 0.000
#> SRR1785309 3 0.0921 0.519 0.000 0.028 0.972 0.000
#> SRR1785310 4 0.6125 0.708 0.008 0.056 0.300 0.636
#> SRR1785311 4 0.6125 0.708 0.008 0.056 0.300 0.636
#> SRR1785312 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785313 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785314 2 0.5257 0.498 0.444 0.548 0.000 0.008
#> SRR1785315 2 0.5257 0.498 0.444 0.548 0.000 0.008
#> SRR1785318 2 0.0000 0.502 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.502 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785317 1 0.0000 0.585 1.000 0.000 0.000 0.000
#> SRR1785324 2 0.4454 0.524 0.308 0.692 0.000 0.000
#> SRR1785325 2 0.4454 0.524 0.308 0.692 0.000 0.000
#> SRR1785320 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785321 1 0.4454 0.596 0.692 0.000 0.000 0.308
#> SRR1785322 4 0.6522 0.690 0.020 0.068 0.276 0.636
#> SRR1785323 4 0.3485 0.544 0.004 0.076 0.048 0.872
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 4 0.4567 0.714 0.008 0.032 0.016 0.760 0.184
#> SRR1785239 4 0.4567 0.714 0.008 0.032 0.016 0.760 0.184
#> SRR1785240 1 0.5038 0.790 0.780 0.032 0.068 0.032 0.088
#> SRR1785241 1 0.5342 0.768 0.756 0.032 0.068 0.032 0.112
#> SRR1785242 3 0.1608 0.776 0.000 0.072 0.928 0.000 0.000
#> SRR1785243 3 0.1608 0.776 0.000 0.072 0.928 0.000 0.000
#> SRR1785244 1 0.0960 0.868 0.972 0.008 0.004 0.000 0.016
#> SRR1785245 1 0.0960 0.868 0.972 0.008 0.004 0.000 0.016
#> SRR1785246 4 0.5810 0.253 0.000 0.000 0.212 0.612 0.176
#> SRR1785247 4 0.5578 0.336 0.000 0.000 0.180 0.644 0.176
#> SRR1785248 2 0.5200 0.912 0.000 0.720 0.084 0.172 0.024
#> SRR1785250 3 0.5362 0.764 0.008 0.004 0.700 0.116 0.172
#> SRR1785251 3 0.5362 0.764 0.008 0.004 0.700 0.116 0.172
#> SRR1785252 3 0.1732 0.773 0.000 0.080 0.920 0.000 0.000
#> SRR1785253 3 0.1732 0.773 0.000 0.080 0.920 0.000 0.000
#> SRR1785254 1 0.3815 0.833 0.832 0.000 0.060 0.020 0.088
#> SRR1785255 1 0.3815 0.833 0.832 0.000 0.060 0.020 0.088
#> SRR1785256 1 0.0162 0.870 0.996 0.004 0.000 0.000 0.000
#> SRR1785257 1 0.0162 0.870 0.996 0.004 0.000 0.000 0.000
#> SRR1785258 1 0.3400 0.791 0.808 0.180 0.004 0.004 0.004
#> SRR1785259 1 0.3400 0.791 0.808 0.180 0.004 0.004 0.004
#> SRR1785262 4 0.1732 0.747 0.000 0.000 0.080 0.920 0.000
#> SRR1785263 4 0.1732 0.747 0.000 0.000 0.080 0.920 0.000
#> SRR1785260 4 0.2165 0.768 0.004 0.056 0.016 0.920 0.004
#> SRR1785261 4 0.2165 0.768 0.004 0.056 0.016 0.920 0.004
#> SRR1785264 4 0.4472 0.711 0.008 0.036 0.008 0.760 0.188
#> SRR1785265 4 0.4472 0.711 0.008 0.036 0.008 0.760 0.188
#> SRR1785266 2 0.4328 0.851 0.000 0.724 0.008 0.248 0.020
#> SRR1785267 2 0.4328 0.851 0.000 0.724 0.008 0.248 0.020
#> SRR1785268 1 0.0566 0.869 0.984 0.004 0.000 0.012 0.000
#> SRR1785269 1 0.0566 0.869 0.984 0.004 0.000 0.012 0.000
#> SRR1785270 1 0.4597 0.636 0.672 0.000 0.004 0.024 0.300
#> SRR1785271 1 0.5690 0.199 0.492 0.000 0.004 0.068 0.436
#> SRR1785272 3 0.5994 0.714 0.008 0.000 0.616 0.200 0.176
#> SRR1785273 3 0.5994 0.714 0.008 0.000 0.616 0.200 0.176
#> SRR1785276 1 0.5638 0.744 0.732 0.032 0.060 0.040 0.136
#> SRR1785277 1 0.5760 0.730 0.720 0.032 0.060 0.040 0.148
#> SRR1785274 4 0.4287 0.720 0.008 0.032 0.008 0.776 0.176
#> SRR1785275 4 0.4287 0.720 0.008 0.032 0.008 0.776 0.176
#> SRR1785280 2 0.4159 0.915 0.000 0.780 0.036 0.172 0.012
#> SRR1785281 2 0.4159 0.915 0.000 0.780 0.036 0.172 0.012
#> SRR1785278 1 0.3209 0.849 0.876 0.024 0.008 0.024 0.068
#> SRR1785279 1 0.3209 0.849 0.876 0.024 0.008 0.024 0.068
#> SRR1785282 1 0.2364 0.860 0.908 0.008 0.000 0.020 0.064
#> SRR1785283 1 0.2364 0.860 0.908 0.008 0.000 0.020 0.064
#> SRR1785284 1 0.3911 0.834 0.840 0.012 0.068 0.020 0.060
#> SRR1785285 1 0.3911 0.834 0.840 0.012 0.068 0.020 0.060
#> SRR1785286 4 0.4137 0.602 0.012 0.000 0.008 0.732 0.248
#> SRR1785287 4 0.4082 0.615 0.012 0.000 0.008 0.740 0.240
#> SRR1785288 1 0.0324 0.869 0.992 0.004 0.000 0.000 0.004
#> SRR1785289 1 0.0324 0.869 0.992 0.004 0.000 0.000 0.004
#> SRR1785290 4 0.3575 0.737 0.008 0.124 0.008 0.836 0.024
#> SRR1785291 4 0.3713 0.730 0.008 0.136 0.008 0.824 0.024
#> SRR1785296 4 0.2255 0.766 0.004 0.060 0.008 0.916 0.012
#> SRR1785297 4 0.2255 0.766 0.004 0.060 0.008 0.916 0.012
#> SRR1785292 5 0.3929 0.897 0.000 0.036 0.004 0.172 0.788
#> SRR1785293 5 0.3929 0.897 0.000 0.036 0.004 0.172 0.788
#> SRR1785294 4 0.1845 0.768 0.000 0.056 0.016 0.928 0.000
#> SRR1785295 4 0.1845 0.768 0.000 0.056 0.016 0.928 0.000
#> SRR1785298 4 0.1248 0.783 0.008 0.004 0.008 0.964 0.016
#> SRR1785299 4 0.1248 0.783 0.008 0.004 0.008 0.964 0.016
#> SRR1785300 1 0.0000 0.870 1.000 0.000 0.000 0.000 0.000
#> SRR1785301 1 0.0000 0.870 1.000 0.000 0.000 0.000 0.000
#> SRR1785304 5 0.4639 0.720 0.008 0.012 0.000 0.344 0.636
#> SRR1785305 5 0.4735 0.660 0.008 0.012 0.000 0.372 0.608
#> SRR1785306 5 0.3875 0.900 0.008 0.012 0.008 0.180 0.792
#> SRR1785307 5 0.3938 0.901 0.008 0.016 0.008 0.176 0.792
#> SRR1785302 5 0.4858 0.848 0.056 0.012 0.008 0.180 0.744
#> SRR1785303 5 0.4432 0.882 0.032 0.012 0.008 0.180 0.768
#> SRR1785308 3 0.2378 0.792 0.000 0.000 0.904 0.048 0.048
#> SRR1785309 3 0.2378 0.792 0.000 0.000 0.904 0.048 0.048
#> SRR1785310 4 0.4080 0.713 0.012 0.016 0.012 0.792 0.168
#> SRR1785311 4 0.4080 0.713 0.012 0.016 0.012 0.792 0.168
#> SRR1785312 1 0.3400 0.791 0.808 0.180 0.004 0.004 0.004
#> SRR1785313 1 0.3400 0.791 0.808 0.180 0.004 0.004 0.004
#> SRR1785314 5 0.3289 0.906 0.000 0.004 0.008 0.172 0.816
#> SRR1785315 5 0.3289 0.906 0.000 0.004 0.008 0.172 0.816
#> SRR1785318 2 0.5090 0.912 0.000 0.728 0.076 0.172 0.024
#> SRR1785319 2 0.5090 0.912 0.000 0.728 0.076 0.172 0.024
#> SRR1785316 1 0.0162 0.869 0.996 0.004 0.000 0.000 0.000
#> SRR1785317 1 0.0162 0.869 0.996 0.004 0.000 0.000 0.000
#> SRR1785324 5 0.3612 0.899 0.000 0.028 0.000 0.172 0.800
#> SRR1785325 5 0.3612 0.899 0.000 0.028 0.000 0.172 0.800
#> SRR1785320 1 0.3400 0.791 0.808 0.180 0.004 0.004 0.004
#> SRR1785321 1 0.3400 0.791 0.808 0.180 0.004 0.004 0.004
#> SRR1785322 4 0.4080 0.739 0.012 0.000 0.076 0.808 0.104
#> SRR1785323 4 0.4020 0.740 0.012 0.000 0.072 0.812 0.104
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 1 0.732 0.12489 0.432 0.340 0.072 0.008 0.028 0.120
#> SRR1785239 1 0.732 0.12489 0.432 0.340 0.072 0.008 0.028 0.120
#> SRR1785240 1 0.659 0.38247 0.588 0.140 0.084 0.000 0.024 0.164
#> SRR1785241 1 0.658 0.37663 0.592 0.156 0.088 0.000 0.024 0.140
#> SRR1785242 3 0.000 0.81012 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785243 3 0.000 0.81012 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785244 6 0.225 0.70118 0.016 0.012 0.000 0.000 0.072 0.900
#> SRR1785245 6 0.225 0.70118 0.016 0.012 0.000 0.000 0.072 0.900
#> SRR1785246 4 0.232 0.68019 0.048 0.000 0.060 0.892 0.000 0.000
#> SRR1785247 4 0.232 0.68019 0.048 0.000 0.060 0.892 0.000 0.000
#> SRR1785248 3 0.550 -0.08359 0.084 0.396 0.508 0.004 0.004 0.004
#> SRR1785250 4 0.253 0.67059 0.024 0.000 0.096 0.876 0.004 0.000
#> SRR1785251 4 0.253 0.67059 0.024 0.000 0.096 0.876 0.004 0.000
#> SRR1785252 3 0.000 0.81012 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785253 3 0.000 0.81012 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1785254 5 0.715 -0.00928 0.048 0.372 0.060 0.004 0.428 0.088
#> SRR1785255 5 0.715 -0.00928 0.048 0.372 0.060 0.004 0.428 0.088
#> SRR1785256 1 0.350 0.19541 0.728 0.000 0.004 0.000 0.004 0.264
#> SRR1785257 1 0.348 0.20273 0.732 0.000 0.004 0.000 0.004 0.260
#> SRR1785258 6 0.026 0.75640 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR1785259 6 0.026 0.75640 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR1785262 4 0.271 0.65065 0.000 0.048 0.000 0.864 0.088 0.000
#> SRR1785263 4 0.276 0.64984 0.000 0.048 0.000 0.860 0.092 0.000
#> SRR1785260 5 0.545 0.11471 0.020 0.208 0.000 0.144 0.628 0.000
#> SRR1785261 5 0.545 0.11471 0.020 0.208 0.000 0.144 0.628 0.000
#> SRR1785264 1 0.730 0.21511 0.460 0.288 0.116 0.008 0.012 0.116
#> SRR1785265 1 0.730 0.21511 0.460 0.288 0.116 0.008 0.012 0.116
#> SRR1785266 2 0.411 0.49186 0.084 0.772 0.128 0.000 0.000 0.016
#> SRR1785267 2 0.411 0.49186 0.084 0.772 0.128 0.000 0.000 0.016
#> SRR1785268 1 0.333 0.26346 0.768 0.000 0.008 0.000 0.004 0.220
#> SRR1785269 1 0.328 0.29089 0.784 0.000 0.012 0.000 0.004 0.200
#> SRR1785270 5 0.670 -0.00471 0.028 0.364 0.060 0.000 0.464 0.084
#> SRR1785271 5 0.657 0.00166 0.024 0.344 0.060 0.000 0.492 0.080
#> SRR1785272 4 0.251 0.67817 0.056 0.000 0.064 0.880 0.000 0.000
#> SRR1785273 4 0.251 0.67817 0.056 0.000 0.064 0.880 0.000 0.000
#> SRR1785276 1 0.732 0.26085 0.520 0.236 0.068 0.020 0.032 0.124
#> SRR1785277 1 0.730 0.26439 0.524 0.232 0.068 0.020 0.032 0.124
#> SRR1785274 1 0.721 0.25802 0.500 0.256 0.096 0.008 0.020 0.120
#> SRR1785275 1 0.719 0.25938 0.504 0.252 0.096 0.008 0.020 0.120
#> SRR1785280 2 0.447 0.35331 0.252 0.692 0.036 0.000 0.020 0.000
#> SRR1785281 2 0.447 0.35331 0.252 0.692 0.036 0.000 0.020 0.000
#> SRR1785278 1 0.353 0.34603 0.812 0.004 0.028 0.016 0.000 0.140
#> SRR1785279 1 0.357 0.34322 0.808 0.004 0.028 0.016 0.000 0.144
#> SRR1785282 1 0.359 0.31373 0.784 0.016 0.000 0.000 0.020 0.180
#> SRR1785283 1 0.356 0.31793 0.788 0.016 0.000 0.000 0.020 0.176
#> SRR1785284 1 0.865 -0.02348 0.312 0.288 0.104 0.024 0.208 0.064
#> SRR1785285 1 0.865 -0.02348 0.312 0.288 0.104 0.024 0.208 0.064
#> SRR1785286 4 0.505 0.54557 0.064 0.016 0.000 0.612 0.308 0.000
#> SRR1785287 4 0.505 0.54557 0.064 0.016 0.000 0.612 0.308 0.000
#> SRR1785288 6 0.556 0.43471 0.432 0.012 0.008 0.000 0.072 0.476
#> SRR1785289 6 0.556 0.43471 0.432 0.012 0.008 0.000 0.072 0.476
#> SRR1785290 2 0.484 0.42104 0.012 0.744 0.144 0.064 0.028 0.008
#> SRR1785291 2 0.463 0.42982 0.012 0.756 0.148 0.052 0.024 0.008
#> SRR1785296 4 0.659 0.12291 0.024 0.284 0.000 0.360 0.332 0.000
#> SRR1785297 4 0.659 0.12291 0.024 0.284 0.000 0.360 0.332 0.000
#> SRR1785292 2 0.501 0.29647 0.028 0.496 0.012 0.000 0.456 0.008
#> SRR1785293 2 0.501 0.29647 0.028 0.496 0.012 0.000 0.456 0.008
#> SRR1785294 5 0.636 -0.07682 0.020 0.232 0.000 0.304 0.444 0.000
#> SRR1785295 5 0.637 -0.07280 0.020 0.236 0.000 0.300 0.444 0.000
#> SRR1785298 4 0.672 0.20652 0.084 0.312 0.020 0.500 0.084 0.000
#> SRR1785299 4 0.641 0.20690 0.056 0.312 0.020 0.528 0.084 0.000
#> SRR1785300 1 0.595 -0.36853 0.472 0.016 0.008 0.072 0.012 0.420
#> SRR1785301 1 0.596 -0.39008 0.460 0.016 0.008 0.072 0.012 0.432
#> SRR1785304 5 0.462 -0.28228 0.004 0.032 0.000 0.420 0.544 0.000
#> SRR1785305 5 0.449 -0.28559 0.000 0.032 0.000 0.424 0.544 0.000
#> SRR1785306 5 0.695 -0.18712 0.172 0.360 0.084 0.000 0.384 0.000
#> SRR1785307 5 0.695 -0.18428 0.172 0.356 0.084 0.000 0.388 0.000
#> SRR1785302 5 0.782 0.00356 0.312 0.228 0.096 0.032 0.332 0.000
#> SRR1785303 5 0.782 0.00356 0.312 0.228 0.096 0.032 0.332 0.000
#> SRR1785308 3 0.374 0.70706 0.072 0.000 0.800 0.012 0.000 0.116
#> SRR1785309 3 0.374 0.70706 0.072 0.000 0.800 0.012 0.000 0.116
#> SRR1785310 4 0.484 0.58358 0.064 0.016 0.000 0.660 0.260 0.000
#> SRR1785311 4 0.484 0.58358 0.064 0.016 0.000 0.660 0.260 0.000
#> SRR1785312 6 0.026 0.75640 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR1785313 6 0.026 0.75640 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR1785314 2 0.658 0.13592 0.096 0.428 0.080 0.000 0.392 0.004
#> SRR1785315 5 0.645 -0.24323 0.080 0.416 0.080 0.000 0.420 0.004
#> SRR1785318 2 0.343 0.44557 0.000 0.720 0.276 0.000 0.004 0.000
#> SRR1785319 2 0.343 0.44557 0.000 0.720 0.276 0.000 0.004 0.000
#> SRR1785316 6 0.407 0.42967 0.448 0.000 0.008 0.000 0.000 0.544
#> SRR1785317 6 0.397 0.42679 0.452 0.000 0.004 0.000 0.000 0.544
#> SRR1785324 2 0.521 0.30136 0.028 0.520 0.024 0.000 0.420 0.008
#> SRR1785325 2 0.514 0.30088 0.024 0.520 0.024 0.000 0.424 0.008
#> SRR1785320 6 0.026 0.75640 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR1785321 6 0.026 0.75640 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR1785322 4 0.413 0.61024 0.212 0.036 0.000 0.736 0.016 0.000
#> SRR1785323 4 0.423 0.60579 0.216 0.040 0.000 0.728 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.
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 16620 rows and 87 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.815 0.852 0.942 0.4990 0.497 0.497
#> 3 3 0.828 0.888 0.947 0.3287 0.711 0.483
#> 4 4 0.802 0.854 0.923 0.1283 0.868 0.629
#> 5 5 0.732 0.689 0.798 0.0694 0.898 0.637
#> 6 6 0.670 0.524 0.742 0.0399 0.915 0.630
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1785238 2 0.0000 0.9475 0.000 1.000
#> SRR1785239 2 0.0000 0.9475 0.000 1.000
#> SRR1785240 1 0.1184 0.9159 0.984 0.016
#> SRR1785241 1 0.1184 0.9159 0.984 0.016
#> SRR1785242 2 0.0000 0.9475 0.000 1.000
#> SRR1785243 2 0.0000 0.9475 0.000 1.000
#> SRR1785244 1 0.0000 0.9252 1.000 0.000
#> SRR1785245 1 0.0000 0.9252 1.000 0.000
#> SRR1785246 2 0.0000 0.9475 0.000 1.000
#> SRR1785247 2 0.0000 0.9475 0.000 1.000
#> SRR1785248 2 0.0000 0.9475 0.000 1.000
#> SRR1785250 2 0.0000 0.9475 0.000 1.000
#> SRR1785251 2 0.0000 0.9475 0.000 1.000
#> SRR1785252 2 0.0000 0.9475 0.000 1.000
#> SRR1785253 2 0.0000 0.9475 0.000 1.000
#> SRR1785254 1 0.0000 0.9252 1.000 0.000
#> SRR1785255 1 0.0000 0.9252 1.000 0.000
#> SRR1785256 1 0.2236 0.9004 0.964 0.036
#> SRR1785257 1 0.2423 0.8970 0.960 0.040
#> SRR1785258 1 0.0376 0.9231 0.996 0.004
#> SRR1785259 1 0.0376 0.9231 0.996 0.004
#> SRR1785262 2 0.0000 0.9475 0.000 1.000
#> SRR1785263 2 0.0000 0.9475 0.000 1.000
#> SRR1785260 1 0.9944 0.1898 0.544 0.456
#> SRR1785261 1 0.9998 0.0621 0.508 0.492
#> SRR1785264 2 0.6148 0.8092 0.152 0.848
#> SRR1785265 2 0.4161 0.8843 0.084 0.916
#> SRR1785266 2 0.0000 0.9475 0.000 1.000
#> SRR1785267 2 0.0000 0.9475 0.000 1.000
#> SRR1785268 1 0.9998 0.0661 0.508 0.492
#> SRR1785269 2 0.9460 0.4004 0.364 0.636
#> SRR1785270 1 0.0000 0.9252 1.000 0.000
#> SRR1785271 1 0.0000 0.9252 1.000 0.000
#> SRR1785272 2 0.0000 0.9475 0.000 1.000
#> SRR1785273 2 0.0000 0.9475 0.000 1.000
#> SRR1785276 2 0.6438 0.7915 0.164 0.836
#> SRR1785277 2 0.2423 0.9212 0.040 0.960
#> SRR1785274 2 0.1633 0.9326 0.024 0.976
#> SRR1785275 2 0.1843 0.9299 0.028 0.972
#> SRR1785280 2 0.0000 0.9475 0.000 1.000
#> SRR1785281 2 0.0000 0.9475 0.000 1.000
#> SRR1785278 1 0.1184 0.9157 0.984 0.016
#> SRR1785279 1 0.1633 0.9100 0.976 0.024
#> SRR1785282 1 0.9850 0.2756 0.572 0.428
#> SRR1785283 1 0.9963 0.1666 0.536 0.464
#> SRR1785284 1 0.0000 0.9252 1.000 0.000
#> SRR1785285 1 0.0000 0.9252 1.000 0.000
#> SRR1785286 1 0.0000 0.9252 1.000 0.000
#> SRR1785287 1 0.0000 0.9252 1.000 0.000
#> SRR1785288 1 0.0000 0.9252 1.000 0.000
#> SRR1785289 1 0.0000 0.9252 1.000 0.000
#> SRR1785290 2 0.0000 0.9475 0.000 1.000
#> SRR1785291 2 0.0000 0.9475 0.000 1.000
#> SRR1785296 2 0.0000 0.9475 0.000 1.000
#> SRR1785297 2 0.0000 0.9475 0.000 1.000
#> SRR1785292 1 0.0000 0.9252 1.000 0.000
#> SRR1785293 1 0.0000 0.9252 1.000 0.000
#> SRR1785294 2 0.4939 0.8594 0.108 0.892
#> SRR1785295 2 0.3879 0.8914 0.076 0.924
#> SRR1785298 2 0.0000 0.9475 0.000 1.000
#> SRR1785299 2 0.0000 0.9475 0.000 1.000
#> SRR1785300 1 0.0000 0.9252 1.000 0.000
#> SRR1785301 1 0.0000 0.9252 1.000 0.000
#> SRR1785304 1 0.0000 0.9252 1.000 0.000
#> SRR1785305 1 0.0000 0.9252 1.000 0.000
#> SRR1785306 1 0.0000 0.9252 1.000 0.000
#> SRR1785307 1 0.0000 0.9252 1.000 0.000
#> SRR1785302 1 0.0000 0.9252 1.000 0.000
#> SRR1785303 1 0.0000 0.9252 1.000 0.000
#> SRR1785308 2 0.0000 0.9475 0.000 1.000
#> SRR1785309 2 0.0000 0.9475 0.000 1.000
#> SRR1785310 1 0.0000 0.9252 1.000 0.000
#> SRR1785311 1 0.0000 0.9252 1.000 0.000
#> SRR1785312 1 0.8499 0.6034 0.724 0.276
#> SRR1785313 1 0.9608 0.3881 0.616 0.384
#> SRR1785314 1 0.0000 0.9252 1.000 0.000
#> SRR1785315 1 0.0000 0.9252 1.000 0.000
#> SRR1785318 2 0.9661 0.3484 0.392 0.608
#> SRR1785319 2 0.9896 0.2079 0.440 0.560
#> SRR1785316 1 0.0000 0.9252 1.000 0.000
#> SRR1785317 1 0.0000 0.9252 1.000 0.000
#> SRR1785324 1 0.0000 0.9252 1.000 0.000
#> SRR1785325 1 0.0000 0.9252 1.000 0.000
#> SRR1785320 1 0.0000 0.9252 1.000 0.000
#> SRR1785321 1 0.0000 0.9252 1.000 0.000
#> SRR1785322 2 0.0000 0.9475 0.000 1.000
#> SRR1785323 2 0.0000 0.9475 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1785238 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785239 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785240 1 0.4399 0.792 0.812 0.000 0.188
#> SRR1785241 1 0.4504 0.785 0.804 0.000 0.196
#> SRR1785242 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785243 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785244 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785245 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785246 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785247 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785248 3 0.5948 0.450 0.000 0.360 0.640
#> SRR1785250 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785251 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785252 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785253 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785254 1 0.0237 0.893 0.996 0.004 0.000
#> SRR1785255 1 0.0892 0.886 0.980 0.020 0.000
#> SRR1785256 1 0.2711 0.868 0.912 0.000 0.088
#> SRR1785257 1 0.2878 0.864 0.904 0.000 0.096
#> SRR1785258 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785259 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785262 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785263 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785260 3 0.3551 0.809 0.132 0.000 0.868
#> SRR1785261 3 0.3551 0.809 0.132 0.000 0.868
#> SRR1785264 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785265 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785266 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785267 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785268 3 0.6307 -0.110 0.488 0.000 0.512
#> SRR1785269 3 0.5431 0.547 0.284 0.000 0.716
#> SRR1785270 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785271 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785272 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785273 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785276 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785277 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785274 3 0.0892 0.933 0.000 0.020 0.980
#> SRR1785275 3 0.0747 0.937 0.000 0.016 0.984
#> SRR1785280 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785281 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785278 1 0.3038 0.859 0.896 0.000 0.104
#> SRR1785279 1 0.2796 0.866 0.908 0.000 0.092
#> SRR1785282 1 0.5016 0.734 0.760 0.000 0.240
#> SRR1785283 1 0.5291 0.694 0.732 0.000 0.268
#> SRR1785284 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785285 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785286 1 0.5678 0.588 0.684 0.316 0.000
#> SRR1785287 1 0.5810 0.552 0.664 0.336 0.000
#> SRR1785288 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785289 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785290 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785291 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785296 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785297 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785292 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785293 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785294 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785295 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785298 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785299 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785300 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785301 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785304 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785305 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785306 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785307 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785302 2 0.3192 0.861 0.112 0.888 0.000
#> SRR1785303 2 0.2356 0.913 0.072 0.928 0.000
#> SRR1785308 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785309 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785310 1 0.4346 0.770 0.816 0.184 0.000
#> SRR1785311 1 0.4921 0.844 0.844 0.084 0.072
#> SRR1785312 1 0.5098 0.723 0.752 0.000 0.248
#> SRR1785313 1 0.6192 0.369 0.580 0.000 0.420
#> SRR1785314 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785315 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785318 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785319 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785316 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785317 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785324 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785325 2 0.0000 0.991 0.000 1.000 0.000
#> SRR1785320 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785321 1 0.0000 0.895 1.000 0.000 0.000
#> SRR1785322 3 0.0000 0.949 0.000 0.000 1.000
#> SRR1785323 3 0.0000 0.949 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1785238 3 0.0000 0.925 0.000 0.000 1.000 0.000
#> SRR1785239 3 0.0000 0.925 0.000 0.000 1.000 0.000
#> SRR1785240 1 0.5022 0.717 0.736 0.000 0.044 0.220
#> SRR1785241 1 0.5312 0.655 0.692 0.000 0.040 0.268
#> SRR1785242 3 0.0188 0.925 0.000 0.000 0.996 0.004
#> SRR1785243 3 0.0188 0.925 0.000 0.000 0.996 0.004
#> SRR1785244 1 0.0469 0.869 0.988 0.000 0.000 0.012
#> SRR1785245 1 0.0592 0.868 0.984 0.000 0.000 0.016
#> SRR1785246 3 0.1118 0.912 0.000 0.000 0.964 0.036
#> SRR1785247 3 0.1118 0.912 0.000 0.000 0.964 0.036
#> SRR1785248 3 0.5759 0.611 0.000 0.232 0.688 0.080
#> SRR1785250 3 0.2469 0.849 0.000 0.000 0.892 0.108
#> SRR1785251 3 0.2469 0.849 0.000 0.000 0.892 0.108
#> SRR1785252 3 0.0000 0.925 0.000 0.000 1.000 0.000
#> SRR1785253 3 0.0000 0.925 0.000 0.000 1.000 0.000
#> SRR1785254 1 0.1975 0.857 0.936 0.048 0.000 0.016
#> SRR1785255 1 0.2799 0.825 0.884 0.108 0.000 0.008
#> SRR1785256 1 0.0592 0.871 0.984 0.000 0.016 0.000
#> SRR1785257 1 0.0469 0.871 0.988 0.000 0.012 0.000
#> SRR1785258 1 0.2704 0.835 0.876 0.000 0.124 0.000
#> SRR1785259 1 0.2868 0.828 0.864 0.000 0.136 0.000
#> SRR1785262 4 0.3688 0.785 0.000 0.000 0.208 0.792
#> SRR1785263 4 0.3610 0.795 0.000 0.000 0.200 0.800
#> SRR1785260 4 0.0188 0.922 0.000 0.000 0.004 0.996
#> SRR1785261 4 0.0188 0.922 0.000 0.000 0.004 0.996
#> SRR1785264 2 0.0188 0.951 0.000 0.996 0.004 0.000
#> SRR1785265 2 0.0921 0.934 0.000 0.972 0.028 0.000
#> SRR1785266 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785267 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785268 1 0.4843 0.490 0.604 0.000 0.396 0.000
#> SRR1785269 3 0.4992 -0.168 0.476 0.000 0.524 0.000
#> SRR1785270 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785271 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785272 3 0.0592 0.922 0.000 0.000 0.984 0.016
#> SRR1785273 3 0.0592 0.922 0.000 0.000 0.984 0.016
#> SRR1785276 3 0.0921 0.904 0.028 0.000 0.972 0.000
#> SRR1785277 3 0.0336 0.920 0.008 0.000 0.992 0.000
#> SRR1785274 3 0.0336 0.923 0.000 0.008 0.992 0.000
#> SRR1785275 3 0.0188 0.924 0.000 0.004 0.996 0.000
#> SRR1785280 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785281 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785278 1 0.0921 0.871 0.972 0.000 0.028 0.000
#> SRR1785279 1 0.1118 0.870 0.964 0.000 0.036 0.000
#> SRR1785282 1 0.4134 0.714 0.740 0.000 0.260 0.000
#> SRR1785283 1 0.4406 0.662 0.700 0.000 0.300 0.000
#> SRR1785284 1 0.3024 0.799 0.852 0.000 0.000 0.148
#> SRR1785285 1 0.3172 0.790 0.840 0.000 0.000 0.160
#> SRR1785286 4 0.0469 0.917 0.012 0.000 0.000 0.988
#> SRR1785287 4 0.0469 0.917 0.012 0.000 0.000 0.988
#> SRR1785288 1 0.1211 0.862 0.960 0.000 0.000 0.040
#> SRR1785289 1 0.1302 0.860 0.956 0.000 0.000 0.044
#> SRR1785290 2 0.3464 0.838 0.000 0.868 0.056 0.076
#> SRR1785291 2 0.3071 0.861 0.000 0.888 0.044 0.068
#> SRR1785296 4 0.1389 0.913 0.000 0.000 0.048 0.952
#> SRR1785297 4 0.1389 0.913 0.000 0.000 0.048 0.952
#> SRR1785292 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785293 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785294 4 0.0707 0.922 0.000 0.000 0.020 0.980
#> SRR1785295 4 0.0707 0.922 0.000 0.000 0.020 0.980
#> SRR1785298 4 0.3569 0.797 0.000 0.000 0.196 0.804
#> SRR1785299 4 0.3569 0.797 0.000 0.000 0.196 0.804
#> SRR1785300 1 0.0592 0.868 0.984 0.000 0.000 0.016
#> SRR1785301 1 0.0592 0.868 0.984 0.000 0.000 0.016
#> SRR1785304 4 0.1576 0.894 0.004 0.048 0.000 0.948
#> SRR1785305 4 0.1474 0.892 0.000 0.052 0.000 0.948
#> SRR1785306 2 0.1118 0.933 0.000 0.964 0.000 0.036
#> SRR1785307 2 0.1022 0.936 0.000 0.968 0.000 0.032
#> SRR1785302 2 0.4382 0.547 0.296 0.704 0.000 0.000
#> SRR1785303 2 0.3688 0.714 0.208 0.792 0.000 0.000
#> SRR1785308 3 0.0000 0.925 0.000 0.000 1.000 0.000
#> SRR1785309 3 0.0000 0.925 0.000 0.000 1.000 0.000
#> SRR1785310 4 0.0000 0.921 0.000 0.000 0.000 1.000
#> SRR1785311 4 0.0000 0.921 0.000 0.000 0.000 1.000
#> SRR1785312 1 0.4543 0.627 0.676 0.000 0.324 0.000
#> SRR1785313 1 0.4804 0.517 0.616 0.000 0.384 0.000
#> SRR1785314 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785315 2 0.0469 0.948 0.000 0.988 0.000 0.012
#> SRR1785318 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785319 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785316 1 0.0188 0.868 0.996 0.000 0.000 0.004
#> SRR1785317 1 0.0336 0.869 0.992 0.000 0.000 0.008
#> SRR1785324 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785325 2 0.0000 0.953 0.000 1.000 0.000 0.000
#> SRR1785320 1 0.2011 0.857 0.920 0.000 0.080 0.000
#> SRR1785321 1 0.2216 0.852 0.908 0.000 0.092 0.000
#> SRR1785322 3 0.2281 0.868 0.000 0.000 0.904 0.096
#> SRR1785323 3 0.2281 0.867 0.000 0.000 0.904 0.096
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1785238 3 0.5414 0.572 0.412 0.060 0.528 0.000 0.000
#> SRR1785239 3 0.5386 0.585 0.396 0.060 0.544 0.000 0.000
#> SRR1785240 5 0.5197 0.381 0.008 0.004 0.292 0.044 0.652
#> SRR1785241 5 0.5236 0.372 0.008 0.004 0.300 0.044 0.644
#> SRR1785242 3 0.1732 0.729 0.080 0.000 0.920 0.000 0.000
#> SRR1785243 3 0.1671 0.729 0.076 0.000 0.924 0.000 0.000
#> SRR1785244 5 0.1410 0.665 0.060 0.000 0.000 0.000 0.940
#> SRR1785245 5 0.1478 0.665 0.064 0.000 0.000 0.000 0.936
#> SRR1785246 3 0.4367 0.711 0.192 0.000 0.748 0.060 0.000
#> SRR1785247 3 0.4558 0.704 0.208 0.000 0.728 0.064 0.000
#> SRR1785248 3 0.2813 0.679 0.032 0.084 0.880 0.004 0.000
#> SRR1785250 3 0.2676 0.731 0.080 0.000 0.884 0.036 0.000
#> SRR1785251 3 0.2554 0.730 0.072 0.000 0.892 0.036 0.000
#> SRR1785252 3 0.2690 0.729 0.156 0.000 0.844 0.000 0.000
#> SRR1785253 3 0.2648 0.729 0.152 0.000 0.848 0.000 0.000
#> SRR1785254 5 0.3201 0.653 0.096 0.052 0.000 0.000 0.852
#> SRR1785255 5 0.3401 0.647 0.096 0.064 0.000 0.000 0.840
#> SRR1785256 5 0.3949 0.472 0.332 0.000 0.000 0.000 0.668
#> SRR1785257 5 0.3966 0.467 0.336 0.000 0.000 0.000 0.664
#> SRR1785258 1 0.3109 0.694 0.800 0.000 0.000 0.000 0.200
#> SRR1785259 1 0.3086 0.715 0.816 0.000 0.004 0.000 0.180
#> SRR1785262 3 0.3693 0.636 0.012 0.000 0.804 0.168 0.016
#> SRR1785263 3 0.3613 0.641 0.012 0.000 0.812 0.160 0.016
#> SRR1785260 4 0.0000 0.923 0.000 0.000 0.000 1.000 0.000
#> SRR1785261 4 0.0000 0.923 0.000 0.000 0.000 1.000 0.000
#> SRR1785264 2 0.1082 0.908 0.028 0.964 0.000 0.000 0.008
#> SRR1785265 2 0.1082 0.909 0.028 0.964 0.000 0.000 0.008
#> SRR1785266 2 0.0771 0.911 0.020 0.976 0.004 0.000 0.000
#> SRR1785267 2 0.0771 0.911 0.020 0.976 0.004 0.000 0.000
#> SRR1785268 1 0.1800 0.749 0.932 0.000 0.048 0.000 0.020
#> SRR1785269 1 0.1809 0.724 0.928 0.000 0.060 0.000 0.012
#> SRR1785270 5 0.4301 0.500 0.020 0.204 0.020 0.000 0.756
#> SRR1785271 5 0.4584 0.442 0.016 0.256 0.020 0.000 0.708
#> SRR1785272 3 0.4818 0.545 0.460 0.000 0.520 0.020 0.000
#> SRR1785273 3 0.4878 0.561 0.440 0.000 0.536 0.024 0.000
#> SRR1785276 3 0.6626 0.125 0.316 0.012 0.500 0.000 0.172
#> SRR1785277 3 0.5686 0.424 0.284 0.012 0.632 0.008 0.064
#> SRR1785274 3 0.5069 0.639 0.076 0.040 0.768 0.012 0.104
#> SRR1785275 3 0.5027 0.640 0.076 0.028 0.764 0.012 0.120
#> SRR1785280 2 0.1648 0.901 0.020 0.940 0.040 0.000 0.000
#> SRR1785281 2 0.1648 0.901 0.020 0.940 0.040 0.000 0.000
#> SRR1785278 5 0.4210 0.343 0.412 0.000 0.000 0.000 0.588
#> SRR1785279 5 0.4210 0.339 0.412 0.000 0.000 0.000 0.588
#> SRR1785282 1 0.1741 0.775 0.936 0.000 0.024 0.000 0.040
#> SRR1785283 1 0.1741 0.775 0.936 0.000 0.024 0.000 0.040
#> SRR1785284 5 0.0854 0.642 0.004 0.000 0.008 0.012 0.976
#> SRR1785285 5 0.0693 0.641 0.000 0.000 0.008 0.012 0.980
#> SRR1785286 4 0.2237 0.871 0.008 0.000 0.004 0.904 0.084
#> SRR1785287 4 0.1924 0.886 0.008 0.000 0.004 0.924 0.064
#> SRR1785288 5 0.2293 0.666 0.084 0.000 0.000 0.016 0.900
#> SRR1785289 5 0.2482 0.665 0.084 0.000 0.000 0.024 0.892
#> SRR1785290 2 0.2354 0.868 0.008 0.904 0.076 0.012 0.000
#> SRR1785291 2 0.1913 0.893 0.008 0.932 0.044 0.016 0.000
#> SRR1785296 4 0.0162 0.923 0.004 0.000 0.000 0.996 0.000
#> SRR1785297 4 0.0162 0.923 0.004 0.000 0.000 0.996 0.000
#> SRR1785292 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1785293 2 0.0162 0.912 0.004 0.996 0.000 0.000 0.000
#> SRR1785294 4 0.0162 0.923 0.004 0.000 0.000 0.996 0.000
#> SRR1785295 4 0.0162 0.923 0.004 0.000 0.000 0.996 0.000
#> SRR1785298 4 0.0671 0.916 0.004 0.000 0.016 0.980 0.000
#> SRR1785299 4 0.0510 0.918 0.000 0.000 0.016 0.984 0.000
#> SRR1785300 5 0.6208 0.261 0.376 0.000 0.000 0.144 0.480
#> SRR1785301 5 0.6153 0.264 0.380 0.000 0.000 0.136 0.484
#> SRR1785304 4 0.1673 0.899 0.016 0.032 0.000 0.944 0.008
#> SRR1785305 4 0.1547 0.901 0.016 0.032 0.000 0.948 0.004
#> SRR1785306 2 0.4544 0.760 0.008 0.752 0.020 0.020 0.200
#> SRR1785307 2 0.4516 0.753 0.008 0.748 0.020 0.016 0.208
#> SRR1785302 2 0.5181 0.595 0.272 0.668 0.000 0.028 0.032
#> SRR1785303 2 0.5139 0.645 0.240 0.692 0.000 0.036 0.032
#> SRR1785308 3 0.4291 0.544 0.464 0.000 0.536 0.000 0.000
#> SRR1785309 3 0.4291 0.544 0.464 0.000 0.536 0.000 0.000
#> SRR1785310 4 0.0000 0.923 0.000 0.000 0.000 1.000 0.000
#> SRR1785311 4 0.0162 0.922 0.000 0.000 0.004 0.996 0.000
#> SRR1785312 1 0.4356 0.401 0.648 0.000 0.012 0.000 0.340
#> SRR1785313 1 0.4397 0.571 0.696 0.000 0.028 0.000 0.276
#> SRR1785314 2 0.2297 0.891 0.008 0.912 0.000 0.020 0.060
#> SRR1785315 2 0.2172 0.892 0.004 0.916 0.000 0.020 0.060
#> SRR1785318 2 0.0771 0.911 0.020 0.976 0.004 0.000 0.000
#> SRR1785319 2 0.0771 0.911 0.020 0.976 0.004 0.000 0.000
#> SRR1785316 5 0.2377 0.654 0.128 0.000 0.000 0.000 0.872
#> SRR1785317 5 0.2377 0.654 0.128 0.000 0.000 0.000 0.872
#> SRR1785324 2 0.0404 0.912 0.000 0.988 0.000 0.000 0.012
#> SRR1785325 2 0.0404 0.912 0.000 0.988 0.000 0.000 0.012
#> SRR1785320 5 0.4297 0.195 0.472 0.000 0.000 0.000 0.528
#> SRR1785321 5 0.4306 0.134 0.492 0.000 0.000 0.000 0.508
#> SRR1785322 4 0.5954 0.400 0.216 0.000 0.192 0.592 0.000
#> SRR1785323 4 0.5672 0.475 0.180 0.000 0.188 0.632 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1785238 3 0.6076 4.49e-01 0.364 0.164 0.456 0.000 0.000 0.016
#> SRR1785239 3 0.6078 5.03e-01 0.292 0.192 0.500 0.000 0.000 0.016
#> SRR1785240 6 0.5404 5.80e-01 0.008 0.000 0.096 0.020 0.236 0.640
#> SRR1785241 6 0.5481 5.92e-01 0.008 0.000 0.108 0.020 0.228 0.636
#> SRR1785242 3 0.1745 6.63e-01 0.020 0.000 0.924 0.000 0.000 0.056
#> SRR1785243 3 0.1950 6.62e-01 0.024 0.000 0.912 0.000 0.000 0.064
#> SRR1785244 5 0.0458 5.73e-01 0.016 0.000 0.000 0.000 0.984 0.000
#> SRR1785245 5 0.0603 5.73e-01 0.016 0.000 0.000 0.000 0.980 0.004
#> SRR1785246 6 0.6485 4.08e-01 0.108 0.000 0.220 0.124 0.000 0.548
#> SRR1785247 6 0.6541 3.96e-01 0.112 0.000 0.224 0.124 0.000 0.540
#> SRR1785248 3 0.3168 6.07e-01 0.024 0.076 0.852 0.000 0.000 0.048
#> SRR1785250 3 0.2842 6.49e-01 0.012 0.000 0.868 0.076 0.000 0.044
#> SRR1785251 3 0.2774 6.50e-01 0.012 0.000 0.872 0.076 0.000 0.040
#> SRR1785252 3 0.2201 6.74e-01 0.052 0.000 0.900 0.000 0.000 0.048
#> SRR1785253 3 0.2328 6.72e-01 0.056 0.000 0.892 0.000 0.000 0.052
#> SRR1785254 5 0.4872 4.71e-01 0.048 0.128 0.000 0.000 0.724 0.100
#> SRR1785255 5 0.5265 4.27e-01 0.044 0.176 0.000 0.000 0.676 0.104
#> SRR1785256 5 0.3860 -1.15e-01 0.472 0.000 0.000 0.000 0.528 0.000
#> SRR1785257 5 0.3991 -1.20e-01 0.472 0.000 0.000 0.000 0.524 0.004
#> SRR1785258 1 0.3152 5.75e-01 0.824 0.004 0.004 0.000 0.148 0.020
#> SRR1785259 1 0.3160 5.86e-01 0.836 0.004 0.012 0.000 0.128 0.020
#> SRR1785262 3 0.6085 1.69e-01 0.008 0.000 0.476 0.244 0.000 0.272
#> SRR1785263 3 0.6122 1.14e-01 0.008 0.000 0.460 0.236 0.000 0.296
#> SRR1785260 4 0.0405 8.42e-01 0.004 0.000 0.000 0.988 0.000 0.008
#> SRR1785261 4 0.0260 8.42e-01 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR1785264 2 0.1779 7.96e-01 0.064 0.920 0.000 0.000 0.000 0.016
#> SRR1785265 2 0.1946 7.93e-01 0.072 0.912 0.004 0.000 0.000 0.012
#> SRR1785266 2 0.1777 8.04e-01 0.024 0.932 0.012 0.000 0.000 0.032
#> SRR1785267 2 0.1777 8.04e-01 0.024 0.932 0.012 0.000 0.000 0.032
#> SRR1785268 1 0.2138 6.11e-01 0.908 0.000 0.036 0.000 0.052 0.004
#> SRR1785269 1 0.2007 6.09e-01 0.916 0.000 0.036 0.000 0.044 0.004
#> SRR1785270 5 0.5058 6.30e-02 0.004 0.068 0.000 0.000 0.536 0.392
#> SRR1785271 5 0.5368 -2.99e-02 0.004 0.096 0.000 0.000 0.492 0.408
#> SRR1785272 3 0.5388 6.12e-01 0.268 0.000 0.616 0.088 0.000 0.028
#> SRR1785273 3 0.5201 6.42e-01 0.228 0.000 0.656 0.084 0.000 0.032
#> SRR1785276 1 0.8002 3.18e-01 0.424 0.028 0.292 0.052 0.132 0.072
#> SRR1785277 1 0.7945 1.10e-01 0.376 0.032 0.368 0.060 0.072 0.092
#> SRR1785274 6 0.4171 6.56e-01 0.036 0.012 0.144 0.008 0.016 0.784
#> SRR1785275 6 0.4056 6.60e-01 0.028 0.008 0.140 0.008 0.024 0.792
#> SRR1785280 2 0.2815 7.81e-01 0.024 0.876 0.056 0.000 0.000 0.044
#> SRR1785281 2 0.2815 7.81e-01 0.024 0.876 0.056 0.000 0.000 0.044
#> SRR1785278 5 0.3868 -1.68e-01 0.496 0.000 0.000 0.000 0.504 0.000
#> SRR1785279 5 0.3868 -1.68e-01 0.496 0.000 0.000 0.000 0.504 0.000
#> SRR1785282 1 0.1888 6.10e-01 0.916 0.000 0.012 0.000 0.068 0.004
#> SRR1785283 1 0.1982 6.10e-01 0.912 0.000 0.016 0.000 0.068 0.004
#> SRR1785284 5 0.3189 4.11e-01 0.004 0.000 0.000 0.000 0.760 0.236
#> SRR1785285 5 0.3265 3.93e-01 0.004 0.000 0.000 0.000 0.748 0.248
#> SRR1785286 4 0.4532 1.50e-01 0.000 0.000 0.000 0.500 0.032 0.468
#> SRR1785287 4 0.4212 2.97e-01 0.000 0.000 0.000 0.560 0.016 0.424
#> SRR1785288 5 0.1148 5.71e-01 0.004 0.000 0.000 0.016 0.960 0.020
#> SRR1785289 5 0.1321 5.69e-01 0.004 0.000 0.000 0.024 0.952 0.020
#> SRR1785290 2 0.4618 4.65e-01 0.008 0.624 0.336 0.008 0.000 0.024
#> SRR1785291 2 0.4620 5.99e-01 0.008 0.684 0.264 0.016 0.004 0.024
#> SRR1785296 4 0.1624 8.25e-01 0.004 0.000 0.020 0.936 0.000 0.040
#> SRR1785297 4 0.1826 8.18e-01 0.004 0.000 0.020 0.924 0.000 0.052
#> SRR1785292 2 0.0405 8.11e-01 0.000 0.988 0.000 0.008 0.000 0.004
#> SRR1785293 2 0.0405 8.11e-01 0.000 0.988 0.000 0.008 0.000 0.004
#> SRR1785294 4 0.0777 8.39e-01 0.000 0.000 0.000 0.972 0.004 0.024
#> SRR1785295 4 0.0777 8.39e-01 0.000 0.000 0.000 0.972 0.004 0.024
#> SRR1785298 4 0.2796 7.89e-01 0.004 0.004 0.056 0.872 0.000 0.064
#> SRR1785299 4 0.2591 7.91e-01 0.004 0.000 0.052 0.880 0.000 0.064
#> SRR1785300 5 0.7219 1.33e-05 0.288 0.000 0.000 0.300 0.328 0.084
#> SRR1785301 5 0.7117 6.06e-03 0.284 0.000 0.000 0.300 0.344 0.072
#> SRR1785304 4 0.4014 7.39e-01 0.024 0.036 0.000 0.804 0.024 0.112
#> SRR1785305 4 0.4014 7.39e-01 0.024 0.036 0.000 0.804 0.024 0.112
#> SRR1785306 6 0.5088 5.08e-01 0.000 0.244 0.004 0.036 0.052 0.664
#> SRR1785307 6 0.5234 5.19e-01 0.000 0.232 0.004 0.036 0.068 0.660
#> SRR1785302 2 0.6764 5.27e-01 0.124 0.576 0.000 0.128 0.024 0.148
#> SRR1785303 2 0.6573 5.50e-01 0.100 0.596 0.000 0.128 0.024 0.152
#> SRR1785308 3 0.4219 5.94e-01 0.320 0.000 0.648 0.000 0.000 0.032
#> SRR1785309 3 0.4170 6.05e-01 0.308 0.000 0.660 0.000 0.000 0.032
#> SRR1785310 4 0.1406 8.40e-01 0.004 0.000 0.020 0.952 0.008 0.016
#> SRR1785311 4 0.1406 8.40e-01 0.004 0.000 0.020 0.952 0.008 0.016
#> SRR1785312 1 0.4274 3.97e-01 0.636 0.000 0.024 0.000 0.336 0.004
#> SRR1785313 1 0.4209 5.14e-01 0.716 0.000 0.044 0.000 0.232 0.008
#> SRR1785314 2 0.5781 5.20e-01 0.016 0.608 0.000 0.100 0.024 0.252
#> SRR1785315 2 0.5588 5.14e-01 0.008 0.608 0.000 0.100 0.020 0.264
#> SRR1785318 2 0.1321 8.08e-01 0.024 0.952 0.004 0.000 0.000 0.020
#> SRR1785319 2 0.1321 8.08e-01 0.024 0.952 0.004 0.000 0.000 0.020
#> SRR1785316 5 0.0603 5.74e-01 0.016 0.000 0.000 0.000 0.980 0.004
#> SRR1785317 5 0.0603 5.74e-01 0.016 0.000 0.000 0.000 0.980 0.004
#> SRR1785324 2 0.1082 8.03e-01 0.000 0.956 0.000 0.000 0.004 0.040
#> SRR1785325 2 0.1010 8.04e-01 0.000 0.960 0.000 0.000 0.004 0.036
#> SRR1785320 1 0.4175 1.33e-01 0.524 0.000 0.000 0.000 0.464 0.012
#> SRR1785321 1 0.4246 1.62e-01 0.532 0.000 0.000 0.000 0.452 0.016
#> SRR1785322 1 0.6323 1.03e-01 0.428 0.000 0.148 0.388 0.000 0.036
#> SRR1785323 1 0.6233 9.96e-02 0.428 0.000 0.152 0.392 0.000 0.028
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
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