Date: 2019-12-25 23:49:54 CET, cola version: 1.3.2
Document is loading...
All available functions which can be applied to this res_list
object:
res_list
#> A 'ConsensusPartitionList' object with 24 methods.
#> On a matrix with 16534 rows and 88 columns.
#> Top rows are extracted by 'SD, CV, MAD, ATC' methods.
#> Subgroups are detected by 'hclust, kmeans, skmeans, pam, mclust, NMF' method.
#> Number of partitions are tried for k = 2, 3, 4, 5, 6.
#> Performed in total 30000 partitions by row resampling.
#>
#> Following methods can be applied to this 'ConsensusPartitionList' object:
#> [1] "cola_report" "collect_classes" "collect_plots" "collect_stats"
#> [5] "colnames" "functional_enrichment" "get_anno_col" "get_anno"
#> [9] "get_classes" "get_matrix" "get_membership" "get_stats"
#> [13] "is_best_k" "is_stable_k" "ncol" "nrow"
#> [17] "rownames" "show" "suggest_best_k" "test_to_known_factors"
#> [21] "top_rows_heatmap" "top_rows_overlap"
#>
#> You can get result for a single method by, e.g. object["SD", "hclust"] or object["SD:hclust"]
#> or a subset of methods by object[c("SD", "CV")], c("hclust", "kmeans")]
The call of run_all_consensus_partition_methods()
was:
#> run_all_consensus_partition_methods(data = mat, mc.cores = 4)
Dimension of the input matrix:
mat = get_matrix(res_list)
dim(mat)
#> [1] 16534 88
The density distribution for each sample is visualized as in one column in the following heatmap. The clustering is based on the distance which is the Kolmogorov-Smirnov statistic between two distributions.
library(ComplexHeatmap)
densityHeatmap(mat, ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
mc.cores = 4)
Folowing table shows the best k
(number of partitions) for each combination
of top-value methods and partition methods. Clicking on the method name in
the table goes to the section for a single combination of methods.
The cola vignette explains the definition of the metrics used for determining the best number of partitions.
suggest_best_k(res_list)
The best k | 1-PAC | Mean silhouette | Concordance | Optional k | ||
---|---|---|---|---|---|---|
CV:kmeans | 2 | 1.000 | 0.977 | 0.991 | ** | |
CV:skmeans | 2 | 1.000 | 0.994 | 0.997 | ** | |
CV:mclust | 2 | 1.000 | 0.976 | 0.991 | ** | |
MAD:kmeans | 2 | 1.000 | 0.976 | 0.989 | ** | |
ATC:kmeans | 2 | 1.000 | 0.959 | 0.984 | ** | |
ATC:skmeans | 2 | 1.000 | 0.962 | 0.986 | ** | |
ATC:mclust | 3 | 1.000 | 0.956 | 0.974 | ** | |
ATC:pam | 2 | 0.988 | 0.951 | 0.977 | ** | |
SD:mclust | 2 | 0.976 | 0.936 | 0.970 | ** | |
CV:NMF | 2 | 0.976 | 0.936 | 0.975 | ** | |
SD:skmeans | 3 | 0.968 | 0.964 | 0.981 | ** | 2 |
MAD:skmeans | 3 | 0.960 | 0.943 | 0.971 | ** | 2 |
SD:pam | 2 | 0.952 | 0.940 | 0.976 | ** | |
MAD:pam | 2 | 0.929 | 0.937 | 0.975 | * | |
SD:kmeans | 2 | 0.885 | 0.953 | 0.978 | ||
SD:NMF | 3 | 0.805 | 0.854 | 0.937 | ||
MAD:NMF | 3 | 0.788 | 0.860 | 0.938 | ||
MAD:mclust | 2 | 0.782 | 0.905 | 0.960 | ||
CV:pam | 2 | 0.776 | 0.872 | 0.943 | ||
CV:hclust | 2 | 0.719 | 0.839 | 0.925 | ||
ATC:hclust | 2 | 0.599 | 0.809 | 0.902 | ||
SD:hclust | 2 | 0.567 | 0.917 | 0.950 | ||
ATC:NMF | 2 | 0.510 | 0.798 | 0.906 | ||
MAD:hclust | 2 | 0.491 | 0.886 | 0.936 |
**: 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.757 0.831 0.933 0.497 0.498 0.498
#> CV:NMF 2 0.976 0.936 0.975 0.503 0.498 0.498
#> MAD:NMF 2 0.775 0.835 0.938 0.495 0.504 0.504
#> ATC:NMF 2 0.510 0.798 0.906 0.462 0.526 0.526
#> SD:skmeans 2 1.000 0.980 0.991 0.506 0.495 0.495
#> CV:skmeans 2 1.000 0.994 0.997 0.505 0.495 0.495
#> MAD:skmeans 2 1.000 0.971 0.987 0.506 0.495 0.495
#> ATC:skmeans 2 1.000 0.962 0.986 0.506 0.495 0.495
#> SD:mclust 2 0.976 0.936 0.970 0.501 0.497 0.497
#> CV:mclust 2 1.000 0.976 0.991 0.501 0.498 0.498
#> MAD:mclust 2 0.782 0.905 0.960 0.501 0.495 0.495
#> ATC:mclust 2 0.602 0.900 0.919 0.453 0.498 0.498
#> SD:kmeans 2 0.885 0.953 0.978 0.506 0.495 0.495
#> CV:kmeans 2 1.000 0.977 0.991 0.504 0.495 0.495
#> MAD:kmeans 2 1.000 0.976 0.989 0.506 0.495 0.495
#> ATC:kmeans 2 1.000 0.959 0.985 0.506 0.495 0.495
#> SD:pam 2 0.952 0.940 0.976 0.501 0.498 0.498
#> CV:pam 2 0.776 0.872 0.943 0.501 0.494 0.494
#> MAD:pam 2 0.929 0.937 0.975 0.502 0.497 0.497
#> ATC:pam 2 0.988 0.951 0.977 0.503 0.495 0.495
#> SD:hclust 2 0.567 0.917 0.950 0.476 0.515 0.515
#> CV:hclust 2 0.719 0.839 0.925 0.478 0.504 0.504
#> MAD:hclust 2 0.491 0.886 0.936 0.480 0.515 0.515
#> ATC:hclust 2 0.599 0.809 0.902 0.446 0.570 0.570
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.805 0.854 0.937 0.323 0.737 0.524
#> CV:NMF 3 0.558 0.558 0.785 0.319 0.747 0.536
#> MAD:NMF 3 0.788 0.860 0.938 0.320 0.722 0.505
#> ATC:NMF 3 0.524 0.731 0.852 0.389 0.697 0.491
#> SD:skmeans 3 0.968 0.964 0.981 0.304 0.791 0.599
#> CV:skmeans 3 0.730 0.677 0.856 0.292 0.824 0.655
#> MAD:skmeans 3 0.960 0.943 0.971 0.299 0.791 0.599
#> ATC:skmeans 3 0.739 0.801 0.833 0.233 0.862 0.729
#> SD:mclust 3 0.846 0.913 0.948 0.256 0.797 0.622
#> CV:mclust 3 0.547 0.715 0.819 0.232 0.744 0.531
#> MAD:mclust 3 0.883 0.876 0.937 0.251 0.835 0.681
#> ATC:mclust 3 1.000 0.956 0.974 0.398 0.770 0.581
#> SD:kmeans 3 0.591 0.746 0.876 0.304 0.791 0.599
#> CV:kmeans 3 0.503 0.484 0.683 0.278 0.880 0.767
#> MAD:kmeans 3 0.579 0.741 0.866 0.299 0.791 0.599
#> ATC:kmeans 3 0.621 0.777 0.879 0.295 0.736 0.517
#> SD:pam 3 0.778 0.798 0.918 0.262 0.800 0.626
#> CV:pam 3 0.534 0.714 0.789 0.279 0.809 0.638
#> MAD:pam 3 0.821 0.891 0.936 0.277 0.773 0.579
#> ATC:pam 3 0.708 0.829 0.915 0.281 0.818 0.649
#> SD:hclust 3 0.629 0.844 0.901 0.372 0.817 0.644
#> CV:hclust 3 0.480 0.606 0.793 0.209 0.943 0.889
#> MAD:hclust 3 0.577 0.783 0.874 0.356 0.817 0.645
#> ATC:hclust 3 0.601 0.650 0.810 0.430 0.733 0.543
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.713 0.766 0.876 0.1127 0.846 0.601
#> CV:NMF 4 0.733 0.774 0.894 0.1271 0.824 0.540
#> MAD:NMF 4 0.682 0.739 0.868 0.1102 0.867 0.646
#> ATC:NMF 4 0.694 0.753 0.856 0.1308 0.775 0.468
#> SD:skmeans 4 0.668 0.716 0.821 0.1227 0.873 0.653
#> CV:skmeans 4 0.684 0.678 0.782 0.1265 0.862 0.646
#> MAD:skmeans 4 0.753 0.752 0.846 0.1230 0.888 0.693
#> ATC:skmeans 4 0.779 0.704 0.834 0.1344 0.917 0.792
#> SD:mclust 4 0.625 0.579 0.812 0.0891 0.994 0.984
#> CV:mclust 4 0.547 0.630 0.795 0.1103 0.903 0.736
#> MAD:mclust 4 0.687 0.693 0.799 0.1130 0.930 0.820
#> ATC:mclust 4 0.768 0.772 0.856 0.1556 0.864 0.641
#> SD:kmeans 4 0.575 0.475 0.664 0.1245 0.863 0.630
#> CV:kmeans 4 0.544 0.586 0.744 0.1437 0.743 0.446
#> MAD:kmeans 4 0.575 0.433 0.657 0.1257 0.889 0.696
#> ATC:kmeans 4 0.706 0.696 0.846 0.1448 0.818 0.523
#> SD:pam 4 0.839 0.899 0.906 0.1284 0.872 0.677
#> CV:pam 4 0.598 0.580 0.750 0.1510 0.804 0.520
#> MAD:pam 4 0.773 0.881 0.892 0.1123 0.855 0.633
#> ATC:pam 4 0.864 0.835 0.933 0.1700 0.850 0.602
#> SD:hclust 4 0.604 0.624 0.779 0.1194 0.968 0.902
#> CV:hclust 4 0.414 0.382 0.658 0.1913 0.769 0.525
#> MAD:hclust 4 0.617 0.717 0.787 0.1084 0.962 0.889
#> ATC:hclust 4 0.610 0.573 0.754 0.1246 0.844 0.573
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.573 0.548 0.745 0.0631 0.861 0.564
#> CV:NMF 5 0.614 0.532 0.752 0.0590 0.946 0.800
#> MAD:NMF 5 0.592 0.562 0.749 0.0669 0.851 0.545
#> ATC:NMF 5 0.641 0.685 0.827 0.0692 0.845 0.505
#> SD:skmeans 5 0.786 0.775 0.875 0.0784 0.864 0.548
#> CV:skmeans 5 0.734 0.654 0.794 0.0871 0.871 0.578
#> MAD:skmeans 5 0.717 0.621 0.758 0.0748 0.864 0.563
#> ATC:skmeans 5 0.820 0.806 0.894 0.0892 0.878 0.635
#> SD:mclust 5 0.587 0.509 0.692 0.0958 0.796 0.484
#> CV:mclust 5 0.644 0.650 0.776 0.0987 0.917 0.736
#> MAD:mclust 5 0.649 0.581 0.794 0.0781 0.849 0.583
#> ATC:mclust 5 0.731 0.710 0.852 0.0606 0.923 0.720
#> SD:kmeans 5 0.614 0.593 0.742 0.0657 0.883 0.603
#> CV:kmeans 5 0.641 0.571 0.668 0.0797 0.907 0.659
#> MAD:kmeans 5 0.610 0.545 0.656 0.0677 0.860 0.555
#> ATC:kmeans 5 0.679 0.631 0.767 0.0566 0.988 0.951
#> SD:pam 5 0.770 0.796 0.849 0.0810 0.941 0.805
#> CV:pam 5 0.671 0.586 0.802 0.0683 0.851 0.524
#> MAD:pam 5 0.788 0.816 0.825 0.1003 0.898 0.657
#> ATC:pam 5 0.810 0.766 0.862 0.0490 0.932 0.739
#> SD:hclust 5 0.608 0.663 0.737 0.0505 0.900 0.677
#> CV:hclust 5 0.485 0.491 0.656 0.1031 0.836 0.489
#> MAD:hclust 5 0.632 0.519 0.719 0.0600 0.925 0.777
#> ATC:hclust 5 0.656 0.688 0.821 0.0436 0.890 0.630
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.555 0.409 0.662 0.0514 0.875 0.543
#> CV:NMF 6 0.662 0.593 0.751 0.0421 0.894 0.591
#> MAD:NMF 6 0.574 0.420 0.685 0.0505 0.857 0.498
#> ATC:NMF 6 0.662 0.645 0.807 0.0410 0.924 0.685
#> SD:skmeans 6 0.732 0.634 0.800 0.0415 0.931 0.681
#> CV:skmeans 6 0.778 0.645 0.808 0.0431 0.910 0.602
#> MAD:skmeans 6 0.712 0.653 0.802 0.0449 0.919 0.644
#> ATC:skmeans 6 0.797 0.760 0.850 0.0364 0.957 0.808
#> SD:mclust 6 0.631 0.545 0.741 0.0569 0.848 0.484
#> CV:mclust 6 0.780 0.750 0.836 0.0771 0.920 0.684
#> MAD:mclust 6 0.642 0.663 0.770 0.0564 0.897 0.626
#> ATC:mclust 6 0.731 0.761 0.832 0.0386 0.935 0.727
#> SD:kmeans 6 0.678 0.525 0.716 0.0423 0.958 0.806
#> CV:kmeans 6 0.727 0.604 0.757 0.0435 0.915 0.624
#> MAD:kmeans 6 0.668 0.563 0.708 0.0433 0.890 0.562
#> ATC:kmeans 6 0.686 0.545 0.673 0.0386 0.916 0.669
#> SD:pam 6 0.832 0.789 0.901 0.0604 0.926 0.707
#> CV:pam 6 0.756 0.586 0.769 0.0539 0.878 0.528
#> MAD:pam 6 0.837 0.820 0.905 0.0541 0.912 0.615
#> ATC:pam 6 0.854 0.794 0.868 0.0417 0.958 0.805
#> SD:hclust 6 0.656 0.732 0.781 0.0331 0.936 0.733
#> CV:hclust 6 0.574 0.538 0.651 0.0562 0.893 0.554
#> MAD:hclust 6 0.705 0.722 0.807 0.0437 0.877 0.606
#> ATC:hclust 6 0.765 0.632 0.820 0.0611 0.974 0.895
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.567 0.917 0.950 0.4756 0.515 0.515
#> 3 3 0.629 0.844 0.901 0.3722 0.817 0.644
#> 4 4 0.604 0.624 0.779 0.1194 0.968 0.902
#> 5 5 0.608 0.663 0.737 0.0505 0.900 0.677
#> 6 6 0.656 0.732 0.781 0.0331 0.936 0.733
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
#> SRR957914 1 0.0000 0.931 1.000 0.000
#> SRR957915 2 0.0000 0.954 0.000 1.000
#> SRR957916 2 0.0376 0.952 0.004 0.996
#> SRR957884 1 0.4562 0.916 0.904 0.096
#> SRR957885 2 0.6623 0.819 0.172 0.828
#> SRR957886 2 0.0000 0.954 0.000 1.000
#> SRR957887 2 0.6712 0.815 0.176 0.824
#> SRR957888 1 0.0000 0.931 1.000 0.000
#> SRR957889 1 0.0000 0.931 1.000 0.000
#> SRR957890 1 0.0000 0.931 1.000 0.000
#> SRR957891 2 0.0000 0.954 0.000 1.000
#> SRR957893 1 0.0000 0.931 1.000 0.000
#> SRR957892 1 0.0000 0.931 1.000 0.000
#> SRR957894 2 0.0000 0.954 0.000 1.000
#> SRR957895 1 0.6623 0.850 0.828 0.172
#> SRR957896 2 0.0000 0.954 0.000 1.000
#> SRR957897 2 0.4939 0.877 0.108 0.892
#> SRR957898 1 0.0672 0.932 0.992 0.008
#> SRR957899 2 0.0000 0.954 0.000 1.000
#> SRR957900 2 0.0376 0.952 0.004 0.996
#> SRR957901 2 0.0000 0.954 0.000 1.000
#> SRR957902 2 0.0000 0.954 0.000 1.000
#> SRR957903 2 0.6623 0.819 0.172 0.828
#> SRR957904 2 0.4815 0.886 0.104 0.896
#> SRR957905 1 0.4562 0.916 0.904 0.096
#> SRR957906 2 0.0000 0.954 0.000 1.000
#> SRR957907 2 0.0000 0.954 0.000 1.000
#> SRR957908 2 0.0000 0.954 0.000 1.000
#> SRR957909 1 0.0000 0.931 1.000 0.000
#> SRR957910 2 0.0000 0.954 0.000 1.000
#> SRR957911 1 0.0000 0.931 1.000 0.000
#> SRR957912 1 0.6343 0.834 0.840 0.160
#> SRR957913 2 0.6623 0.819 0.172 0.828
#> SRR957917 1 0.8327 0.677 0.736 0.264
#> SRR957918 2 0.0000 0.954 0.000 1.000
#> SRR957920 2 0.4815 0.886 0.104 0.896
#> SRR957919 2 0.0000 0.954 0.000 1.000
#> SRR957921 2 0.0000 0.954 0.000 1.000
#> SRR957922 2 0.0376 0.952 0.004 0.996
#> SRR957924 1 0.5946 0.876 0.856 0.144
#> SRR957923 2 0.4939 0.877 0.108 0.892
#> SRR957925 2 0.0000 0.954 0.000 1.000
#> SRR957926 1 0.0376 0.931 0.996 0.004
#> SRR957927 2 0.5408 0.872 0.124 0.876
#> SRR957928 1 0.6343 0.834 0.840 0.160
#> SRR957929 1 0.6343 0.834 0.840 0.160
#> SRR957930 2 0.0000 0.954 0.000 1.000
#> SRR957931 2 0.0000 0.954 0.000 1.000
#> SRR957932 1 0.5294 0.896 0.880 0.120
#> SRR957933 1 0.0376 0.931 0.996 0.004
#> SRR957934 2 0.0376 0.952 0.004 0.996
#> SRR957935 2 0.0376 0.952 0.004 0.996
#> SRR957936 2 0.0000 0.954 0.000 1.000
#> SRR957937 2 0.0000 0.954 0.000 1.000
#> SRR957938 2 0.0000 0.954 0.000 1.000
#> SRR957939 2 0.4939 0.877 0.108 0.892
#> SRR957941 2 0.0376 0.952 0.004 0.996
#> SRR957940 1 0.4815 0.911 0.896 0.104
#> SRR957942 2 0.0000 0.954 0.000 1.000
#> SRR957943 2 0.0000 0.954 0.000 1.000
#> SRR957944 2 0.0000 0.954 0.000 1.000
#> SRR957945 2 0.6623 0.819 0.172 0.828
#> SRR957946 1 0.0000 0.931 1.000 0.000
#> SRR957947 1 0.0000 0.931 1.000 0.000
#> SRR957948 2 0.0000 0.954 0.000 1.000
#> SRR957949 2 0.0376 0.952 0.004 0.996
#> SRR957950 1 0.0000 0.931 1.000 0.000
#> SRR957951 2 0.0000 0.954 0.000 1.000
#> SRR957952 2 0.5059 0.880 0.112 0.888
#> SRR957953 1 0.4562 0.916 0.904 0.096
#> SRR957954 1 0.3879 0.925 0.924 0.076
#> SRR957956 1 0.3879 0.925 0.924 0.076
#> SRR957957 2 0.4939 0.877 0.108 0.892
#> SRR957958 1 0.4562 0.916 0.904 0.096
#> SRR957959 2 0.5059 0.880 0.112 0.888
#> SRR957960 2 0.0000 0.954 0.000 1.000
#> SRR957961 2 0.0000 0.954 0.000 1.000
#> SRR957962 1 0.3584 0.927 0.932 0.068
#> SRR957963 1 0.2043 0.931 0.968 0.032
#> SRR957964 1 0.2423 0.931 0.960 0.040
#> SRR957965 2 0.0000 0.954 0.000 1.000
#> SRR957966 1 0.0000 0.931 1.000 0.000
#> SRR957967 1 0.3733 0.926 0.928 0.072
#> SRR957968 1 0.4562 0.916 0.904 0.096
#> SRR957969 1 0.3733 0.927 0.928 0.072
#> SRR957970 2 0.0000 0.954 0.000 1.000
#> SRR957971 2 0.6623 0.819 0.172 0.828
#> SRR957972 2 0.5519 0.866 0.128 0.872
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957915 2 0.1031 0.928 0.000 0.976 0.024
#> SRR957916 3 0.2945 0.782 0.004 0.088 0.908
#> SRR957884 1 0.3456 0.913 0.904 0.036 0.060
#> SRR957885 3 0.4178 0.762 0.172 0.000 0.828
#> SRR957886 2 0.3482 0.886 0.000 0.872 0.128
#> SRR957887 3 0.4235 0.759 0.176 0.000 0.824
#> SRR957888 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957889 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957890 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957891 3 0.0424 0.796 0.000 0.008 0.992
#> SRR957893 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957894 2 0.0424 0.920 0.000 0.992 0.008
#> SRR957895 1 0.5191 0.846 0.828 0.112 0.060
#> SRR957896 2 0.2261 0.919 0.000 0.932 0.068
#> SRR957897 2 0.3349 0.844 0.108 0.888 0.004
#> SRR957898 1 0.0424 0.931 0.992 0.000 0.008
#> SRR957899 3 0.5650 0.587 0.000 0.312 0.688
#> SRR957900 3 0.2945 0.782 0.004 0.088 0.908
#> SRR957901 3 0.5591 0.594 0.000 0.304 0.696
#> SRR957902 2 0.3482 0.886 0.000 0.872 0.128
#> SRR957903 3 0.4178 0.762 0.172 0.000 0.828
#> SRR957904 3 0.3272 0.802 0.104 0.004 0.892
#> SRR957905 1 0.3456 0.913 0.904 0.036 0.060
#> SRR957906 3 0.6168 0.404 0.000 0.412 0.588
#> SRR957907 2 0.3192 0.894 0.000 0.888 0.112
#> SRR957908 2 0.0424 0.926 0.000 0.992 0.008
#> SRR957909 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957910 2 0.3551 0.882 0.000 0.868 0.132
#> SRR957911 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957912 1 0.4002 0.811 0.840 0.000 0.160
#> SRR957913 3 0.4178 0.762 0.172 0.000 0.828
#> SRR957917 1 0.5443 0.658 0.736 0.004 0.260
#> SRR957918 2 0.1289 0.930 0.000 0.968 0.032
#> SRR957920 3 0.3454 0.803 0.104 0.008 0.888
#> SRR957919 2 0.1163 0.926 0.000 0.972 0.028
#> SRR957921 3 0.0424 0.796 0.000 0.008 0.992
#> SRR957922 3 0.2945 0.782 0.004 0.088 0.908
#> SRR957924 1 0.4642 0.874 0.856 0.084 0.060
#> SRR957923 2 0.3349 0.844 0.108 0.888 0.004
#> SRR957925 2 0.1289 0.930 0.000 0.968 0.032
#> SRR957926 1 0.0237 0.931 0.996 0.000 0.004
#> SRR957927 2 0.4662 0.820 0.124 0.844 0.032
#> SRR957928 1 0.4002 0.811 0.840 0.000 0.160
#> SRR957929 1 0.4002 0.811 0.840 0.000 0.160
#> SRR957930 2 0.3551 0.882 0.000 0.868 0.132
#> SRR957931 3 0.5810 0.542 0.000 0.336 0.664
#> SRR957932 1 0.3340 0.879 0.880 0.000 0.120
#> SRR957933 1 0.0237 0.931 0.996 0.000 0.004
#> SRR957934 3 0.6386 0.441 0.004 0.412 0.584
#> SRR957935 3 0.6359 0.458 0.004 0.404 0.592
#> SRR957936 2 0.0237 0.925 0.000 0.996 0.004
#> SRR957937 2 0.3619 0.879 0.000 0.864 0.136
#> SRR957938 2 0.1529 0.926 0.000 0.960 0.040
#> SRR957939 2 0.3349 0.844 0.108 0.888 0.004
#> SRR957941 3 0.6386 0.441 0.004 0.412 0.584
#> SRR957940 1 0.3623 0.908 0.896 0.032 0.072
#> SRR957942 2 0.1163 0.926 0.000 0.972 0.028
#> SRR957943 2 0.0424 0.926 0.000 0.992 0.008
#> SRR957944 2 0.1529 0.926 0.000 0.960 0.040
#> SRR957945 3 0.4178 0.762 0.172 0.000 0.828
#> SRR957946 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957947 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957948 2 0.1411 0.929 0.000 0.964 0.036
#> SRR957949 3 0.2945 0.782 0.004 0.088 0.908
#> SRR957950 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957951 3 0.0424 0.796 0.000 0.008 0.992
#> SRR957952 3 0.3425 0.800 0.112 0.004 0.884
#> SRR957953 1 0.3456 0.913 0.904 0.036 0.060
#> SRR957954 1 0.2448 0.914 0.924 0.000 0.076
#> SRR957956 1 0.2448 0.914 0.924 0.000 0.076
#> SRR957957 2 0.3349 0.844 0.108 0.888 0.004
#> SRR957958 1 0.3456 0.913 0.904 0.036 0.060
#> SRR957959 3 0.3425 0.800 0.112 0.004 0.884
#> SRR957960 2 0.1289 0.930 0.000 0.968 0.032
#> SRR957961 3 0.0424 0.796 0.000 0.008 0.992
#> SRR957962 1 0.2689 0.922 0.932 0.032 0.036
#> SRR957963 1 0.1289 0.923 0.968 0.032 0.000
#> SRR957964 1 0.1529 0.926 0.960 0.000 0.040
#> SRR957965 2 0.0592 0.922 0.000 0.988 0.012
#> SRR957966 1 0.0000 0.931 1.000 0.000 0.000
#> SRR957967 1 0.2810 0.920 0.928 0.036 0.036
#> SRR957968 1 0.3456 0.913 0.904 0.036 0.060
#> SRR957969 1 0.2496 0.918 0.928 0.004 0.068
#> SRR957970 2 0.1289 0.930 0.000 0.968 0.032
#> SRR957971 3 0.4178 0.762 0.172 0.000 0.828
#> SRR957972 3 0.3715 0.792 0.128 0.004 0.868
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0000 0.630055 1.000 0.000 0.000 0.000
#> SRR957915 2 0.2741 0.852687 0.000 0.892 0.012 0.096
#> SRR957916 3 0.2741 0.725772 0.000 0.096 0.892 0.012
#> SRR957884 1 0.4485 0.642499 0.740 0.000 0.012 0.248
#> SRR957885 3 0.4295 0.674023 0.008 0.000 0.752 0.240
#> SRR957886 2 0.2773 0.827201 0.000 0.880 0.116 0.004
#> SRR957887 3 0.4535 0.669825 0.016 0.000 0.744 0.240
#> SRR957888 1 0.0000 0.630055 1.000 0.000 0.000 0.000
#> SRR957889 1 0.5126 -0.478105 0.552 0.000 0.004 0.444
#> SRR957890 1 0.5112 -0.459106 0.560 0.000 0.004 0.436
#> SRR957891 3 0.0707 0.737795 0.000 0.020 0.980 0.000
#> SRR957893 1 0.0000 0.630055 1.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.630055 1.000 0.000 0.000 0.000
#> SRR957894 2 0.3626 0.810258 0.000 0.812 0.004 0.184
#> SRR957895 1 0.5672 0.581005 0.668 0.036 0.008 0.288
#> SRR957896 2 0.1743 0.854152 0.000 0.940 0.056 0.004
#> SRR957897 2 0.4964 0.680902 0.004 0.616 0.000 0.380
#> SRR957898 1 0.4781 -0.000937 0.660 0.000 0.004 0.336
#> SRR957899 3 0.4699 0.582673 0.000 0.320 0.676 0.004
#> SRR957900 3 0.2741 0.725772 0.000 0.096 0.892 0.012
#> SRR957901 3 0.4655 0.589362 0.000 0.312 0.684 0.004
#> SRR957902 2 0.2773 0.826703 0.000 0.880 0.116 0.004
#> SRR957903 3 0.4295 0.674023 0.008 0.000 0.752 0.240
#> SRR957904 3 0.3498 0.717738 0.000 0.008 0.832 0.160
#> SRR957905 1 0.4485 0.642499 0.740 0.000 0.012 0.248
#> SRR957906 3 0.6176 0.419118 0.000 0.368 0.572 0.060
#> SRR957907 2 0.2530 0.833158 0.000 0.896 0.100 0.004
#> SRR957908 2 0.2053 0.858880 0.000 0.924 0.004 0.072
#> SRR957909 1 0.0000 0.630055 1.000 0.000 0.000 0.000
#> SRR957910 2 0.2831 0.823963 0.000 0.876 0.120 0.004
#> SRR957911 1 0.0921 0.605263 0.972 0.000 0.000 0.028
#> SRR957912 4 0.7398 0.907807 0.412 0.000 0.164 0.424
#> SRR957913 3 0.4295 0.674023 0.008 0.000 0.752 0.240
#> SRR957917 4 0.8011 0.760547 0.300 0.008 0.256 0.436
#> SRR957918 2 0.1624 0.868376 0.000 0.952 0.020 0.028
#> SRR957920 3 0.3625 0.719325 0.000 0.012 0.828 0.160
#> SRR957919 2 0.2489 0.858572 0.000 0.912 0.020 0.068
#> SRR957921 3 0.0707 0.737795 0.000 0.020 0.980 0.000
#> SRR957922 3 0.2741 0.725772 0.000 0.096 0.892 0.012
#> SRR957924 1 0.5269 0.604687 0.692 0.016 0.012 0.280
#> SRR957923 2 0.4964 0.680902 0.004 0.616 0.000 0.380
#> SRR957925 2 0.1724 0.867137 0.000 0.948 0.020 0.032
#> SRR957926 1 0.4950 -0.256386 0.620 0.000 0.004 0.376
#> SRR957927 2 0.4532 0.796999 0.044 0.820 0.020 0.116
#> SRR957928 4 0.7398 0.907807 0.412 0.000 0.164 0.424
#> SRR957929 4 0.7398 0.907807 0.412 0.000 0.164 0.424
#> SRR957930 2 0.2831 0.823963 0.000 0.876 0.120 0.004
#> SRR957931 3 0.4936 0.546153 0.000 0.340 0.652 0.008
#> SRR957932 1 0.4364 0.607203 0.808 0.000 0.056 0.136
#> SRR957933 1 0.4776 -0.242368 0.624 0.000 0.000 0.376
#> SRR957934 3 0.6421 0.460361 0.004 0.352 0.576 0.068
#> SRR957935 3 0.6392 0.475063 0.004 0.344 0.584 0.068
#> SRR957936 2 0.2345 0.855310 0.000 0.900 0.000 0.100
#> SRR957937 2 0.2888 0.820335 0.000 0.872 0.124 0.004
#> SRR957938 2 0.2892 0.859991 0.000 0.896 0.036 0.068
#> SRR957939 2 0.4964 0.680902 0.004 0.616 0.000 0.380
#> SRR957941 3 0.6421 0.460361 0.004 0.352 0.576 0.068
#> SRR957940 1 0.4546 0.638023 0.732 0.000 0.012 0.256
#> SRR957942 2 0.2489 0.858572 0.000 0.912 0.020 0.068
#> SRR957943 2 0.2053 0.858880 0.000 0.924 0.004 0.072
#> SRR957944 2 0.2892 0.859991 0.000 0.896 0.036 0.068
#> SRR957945 3 0.4295 0.674023 0.008 0.000 0.752 0.240
#> SRR957946 1 0.5126 -0.478105 0.552 0.000 0.004 0.444
#> SRR957947 1 0.5126 -0.478105 0.552 0.000 0.004 0.444
#> SRR957948 2 0.1406 0.865196 0.000 0.960 0.024 0.016
#> SRR957949 3 0.2741 0.725772 0.000 0.096 0.892 0.012
#> SRR957950 1 0.0592 0.636022 0.984 0.000 0.000 0.016
#> SRR957951 3 0.0707 0.737795 0.000 0.020 0.980 0.000
#> SRR957952 3 0.3591 0.715650 0.000 0.008 0.824 0.168
#> SRR957953 1 0.4485 0.642499 0.740 0.000 0.012 0.248
#> SRR957954 1 0.3324 0.640418 0.852 0.000 0.012 0.136
#> SRR957956 1 0.3377 0.641681 0.848 0.000 0.012 0.140
#> SRR957957 2 0.4964 0.680902 0.004 0.616 0.000 0.380
#> SRR957958 1 0.4485 0.642499 0.740 0.000 0.012 0.248
#> SRR957959 3 0.3591 0.715650 0.000 0.008 0.824 0.168
#> SRR957960 2 0.1724 0.867137 0.000 0.948 0.020 0.032
#> SRR957961 3 0.0707 0.737795 0.000 0.020 0.980 0.000
#> SRR957962 1 0.3486 0.650213 0.812 0.000 0.000 0.188
#> SRR957963 1 0.2704 0.640262 0.876 0.000 0.000 0.124
#> SRR957964 1 0.5018 0.097366 0.656 0.000 0.012 0.332
#> SRR957965 2 0.3583 0.810801 0.000 0.816 0.004 0.180
#> SRR957966 1 0.0707 0.637448 0.980 0.000 0.000 0.020
#> SRR957967 1 0.4194 0.648669 0.764 0.000 0.008 0.228
#> SRR957968 1 0.4485 0.642499 0.740 0.000 0.012 0.248
#> SRR957969 1 0.3790 0.654045 0.820 0.000 0.016 0.164
#> SRR957970 2 0.2089 0.865897 0.000 0.932 0.020 0.048
#> SRR957971 3 0.4295 0.674023 0.008 0.000 0.752 0.240
#> SRR957972 3 0.3721 0.708929 0.004 0.004 0.816 0.176
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 4 0.285 0.748 0.172 0.000 0.000 0.828 0.000
#> SRR957915 2 0.411 0.698 0.092 0.788 0.000 0.000 0.120
#> SRR957916 5 0.553 0.505 0.008 0.080 0.284 0.000 0.628
#> SRR957884 4 0.201 0.806 0.004 0.000 0.088 0.908 0.000
#> SRR957885 3 0.125 0.741 0.008 0.000 0.956 0.036 0.000
#> SRR957886 2 0.242 0.717 0.000 0.888 0.012 0.000 0.100
#> SRR957887 3 0.128 0.735 0.004 0.000 0.952 0.044 0.000
#> SRR957888 4 0.285 0.748 0.172 0.000 0.000 0.828 0.000
#> SRR957889 1 0.524 0.780 0.664 0.000 0.100 0.236 0.000
#> SRR957890 1 0.517 0.773 0.664 0.000 0.088 0.248 0.000
#> SRR957891 3 0.474 -0.109 0.000 0.016 0.508 0.000 0.476
#> SRR957893 4 0.285 0.748 0.172 0.000 0.000 0.828 0.000
#> SRR957892 4 0.285 0.748 0.172 0.000 0.000 0.828 0.000
#> SRR957894 2 0.557 0.585 0.136 0.636 0.000 0.000 0.228
#> SRR957895 4 0.382 0.739 0.060 0.016 0.084 0.836 0.004
#> SRR957896 2 0.157 0.748 0.004 0.944 0.008 0.000 0.044
#> SRR957897 2 0.797 0.441 0.284 0.424 0.000 0.140 0.152
#> SRR957898 1 0.525 0.419 0.536 0.000 0.048 0.416 0.000
#> SRR957899 5 0.675 0.663 0.000 0.328 0.272 0.000 0.400
#> SRR957900 5 0.553 0.505 0.008 0.080 0.284 0.000 0.628
#> SRR957901 5 0.674 0.662 0.000 0.320 0.272 0.000 0.408
#> SRR957902 2 0.242 0.717 0.000 0.888 0.012 0.000 0.100
#> SRR957903 3 0.125 0.741 0.008 0.000 0.956 0.036 0.000
#> SRR957904 3 0.128 0.734 0.000 0.004 0.952 0.000 0.044
#> SRR957905 4 0.201 0.806 0.004 0.000 0.088 0.908 0.000
#> SRR957906 5 0.644 0.654 0.000 0.344 0.188 0.000 0.468
#> SRR957907 2 0.214 0.723 0.000 0.904 0.008 0.000 0.088
#> SRR957908 2 0.310 0.735 0.028 0.848 0.000 0.000 0.124
#> SRR957909 4 0.285 0.748 0.172 0.000 0.000 0.828 0.000
#> SRR957910 2 0.247 0.713 0.000 0.884 0.012 0.000 0.104
#> SRR957911 4 0.318 0.700 0.208 0.000 0.000 0.792 0.000
#> SRR957912 1 0.654 0.740 0.632 0.000 0.148 0.136 0.084
#> SRR957913 3 0.125 0.741 0.008 0.000 0.956 0.036 0.000
#> SRR957917 1 0.586 0.494 0.588 0.004 0.332 0.052 0.024
#> SRR957918 2 0.232 0.757 0.028 0.904 0.000 0.000 0.068
#> SRR957920 3 0.141 0.732 0.000 0.008 0.948 0.000 0.044
#> SRR957919 2 0.246 0.742 0.008 0.880 0.000 0.000 0.112
#> SRR957921 3 0.474 -0.109 0.000 0.016 0.508 0.000 0.476
#> SRR957922 5 0.553 0.505 0.008 0.080 0.284 0.000 0.628
#> SRR957924 4 0.326 0.766 0.040 0.012 0.088 0.860 0.000
#> SRR957923 2 0.797 0.441 0.284 0.424 0.000 0.140 0.152
#> SRR957925 2 0.158 0.763 0.028 0.944 0.000 0.000 0.028
#> SRR957926 1 0.558 0.688 0.576 0.000 0.088 0.336 0.000
#> SRR957927 2 0.503 0.677 0.028 0.780 0.040 0.096 0.056
#> SRR957928 1 0.654 0.740 0.632 0.000 0.148 0.136 0.084
#> SRR957929 1 0.654 0.740 0.632 0.000 0.148 0.136 0.084
#> SRR957930 2 0.247 0.713 0.000 0.884 0.012 0.000 0.104
#> SRR957931 5 0.668 0.646 0.000 0.348 0.240 0.000 0.412
#> SRR957932 4 0.479 0.743 0.116 0.000 0.156 0.728 0.000
#> SRR957933 1 0.559 0.682 0.572 0.000 0.088 0.340 0.000
#> SRR957934 5 0.652 0.654 0.004 0.336 0.180 0.000 0.480
#> SRR957935 5 0.650 0.654 0.004 0.328 0.180 0.000 0.488
#> SRR957936 2 0.379 0.728 0.048 0.800 0.000 0.000 0.152
#> SRR957937 2 0.252 0.709 0.000 0.880 0.012 0.000 0.108
#> SRR957938 2 0.213 0.749 0.000 0.892 0.000 0.000 0.108
#> SRR957939 2 0.797 0.441 0.284 0.424 0.000 0.140 0.152
#> SRR957941 5 0.652 0.654 0.004 0.336 0.180 0.000 0.480
#> SRR957940 4 0.230 0.801 0.008 0.000 0.100 0.892 0.000
#> SRR957942 2 0.234 0.742 0.004 0.884 0.000 0.000 0.112
#> SRR957943 2 0.310 0.735 0.028 0.848 0.000 0.000 0.124
#> SRR957944 2 0.213 0.749 0.000 0.892 0.000 0.000 0.108
#> SRR957945 3 0.125 0.741 0.008 0.000 0.956 0.036 0.000
#> SRR957946 1 0.524 0.780 0.664 0.000 0.100 0.236 0.000
#> SRR957947 1 0.524 0.780 0.664 0.000 0.100 0.236 0.000
#> SRR957948 2 0.128 0.761 0.012 0.956 0.000 0.000 0.032
#> SRR957949 5 0.553 0.505 0.008 0.080 0.284 0.000 0.628
#> SRR957950 4 0.269 0.759 0.156 0.000 0.000 0.844 0.000
#> SRR957951 3 0.474 -0.109 0.000 0.016 0.508 0.000 0.476
#> SRR957952 3 0.120 0.736 0.000 0.004 0.956 0.000 0.040
#> SRR957953 4 0.201 0.806 0.004 0.000 0.088 0.908 0.000
#> SRR957954 4 0.450 0.775 0.132 0.000 0.112 0.756 0.000
#> SRR957956 4 0.445 0.778 0.128 0.000 0.112 0.760 0.000
#> SRR957957 2 0.797 0.441 0.284 0.424 0.000 0.140 0.152
#> SRR957958 4 0.201 0.806 0.004 0.000 0.088 0.908 0.000
#> SRR957959 3 0.120 0.736 0.000 0.004 0.956 0.000 0.040
#> SRR957960 2 0.158 0.763 0.028 0.944 0.000 0.000 0.028
#> SRR957961 3 0.474 -0.109 0.000 0.016 0.508 0.000 0.476
#> SRR957962 4 0.120 0.806 0.012 0.000 0.028 0.960 0.000
#> SRR957963 4 0.120 0.781 0.048 0.000 0.000 0.952 0.000
#> SRR957964 1 0.568 0.296 0.492 0.000 0.080 0.428 0.000
#> SRR957965 2 0.559 0.578 0.136 0.632 0.000 0.000 0.232
#> SRR957966 4 0.265 0.762 0.152 0.000 0.000 0.848 0.000
#> SRR957967 4 0.148 0.810 0.000 0.000 0.064 0.936 0.000
#> SRR957968 4 0.201 0.806 0.004 0.000 0.088 0.908 0.000
#> SRR957969 4 0.364 0.805 0.080 0.000 0.096 0.824 0.000
#> SRR957970 2 0.198 0.762 0.048 0.924 0.000 0.000 0.028
#> SRR957971 3 0.125 0.741 0.008 0.000 0.956 0.036 0.000
#> SRR957972 3 0.103 0.738 0.004 0.004 0.968 0.000 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 4 0.0713 0.78950 0.028 0.000 0.000 0.972 0.000 0.000
#> SRR957915 2 0.4156 0.63538 0.132 0.780 0.004 0.000 0.028 0.056
#> SRR957916 5 0.2488 0.64701 0.016 0.076 0.020 0.000 0.888 0.000
#> SRR957884 4 0.3961 0.81076 0.000 0.000 0.124 0.764 0.000 0.112
#> SRR957885 3 0.0363 0.93408 0.012 0.000 0.988 0.000 0.000 0.000
#> SRR957886 2 0.1957 0.77265 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR957887 3 0.0622 0.92687 0.012 0.000 0.980 0.008 0.000 0.000
#> SRR957888 4 0.0713 0.78950 0.028 0.000 0.000 0.972 0.000 0.000
#> SRR957889 1 0.3588 0.83356 0.788 0.000 0.060 0.152 0.000 0.000
#> SRR957890 1 0.3679 0.82633 0.772 0.000 0.052 0.176 0.000 0.000
#> SRR957891 5 0.3883 0.53289 0.000 0.012 0.332 0.000 0.656 0.000
#> SRR957893 4 0.0713 0.78950 0.028 0.000 0.000 0.972 0.000 0.000
#> SRR957892 4 0.0713 0.78950 0.028 0.000 0.000 0.972 0.000 0.000
#> SRR957894 2 0.6008 0.26225 0.160 0.580 0.004 0.000 0.032 0.224
#> SRR957895 4 0.4951 0.76073 0.000 0.020 0.120 0.692 0.000 0.168
#> SRR957896 2 0.1285 0.78977 0.000 0.944 0.000 0.000 0.052 0.004
#> SRR957897 6 0.3907 1.00000 0.000 0.268 0.000 0.028 0.000 0.704
#> SRR957898 4 0.4703 -0.17519 0.464 0.000 0.044 0.492 0.000 0.000
#> SRR957899 5 0.5291 0.64406 0.000 0.328 0.120 0.000 0.552 0.000
#> SRR957900 5 0.2488 0.64701 0.016 0.076 0.020 0.000 0.888 0.000
#> SRR957901 5 0.5267 0.64870 0.000 0.320 0.120 0.000 0.560 0.000
#> SRR957902 2 0.1957 0.77236 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR957903 3 0.0363 0.93408 0.012 0.000 0.988 0.000 0.000 0.000
#> SRR957904 3 0.1908 0.90321 0.000 0.004 0.900 0.000 0.096 0.000
#> SRR957905 4 0.3961 0.81076 0.000 0.000 0.124 0.764 0.000 0.112
#> SRR957906 5 0.5492 0.55139 0.016 0.320 0.100 0.000 0.564 0.000
#> SRR957907 2 0.1765 0.77698 0.000 0.904 0.000 0.000 0.096 0.000
#> SRR957908 2 0.3597 0.69958 0.028 0.824 0.000 0.000 0.080 0.068
#> SRR957909 4 0.0713 0.78950 0.028 0.000 0.000 0.972 0.000 0.000
#> SRR957910 2 0.2003 0.77012 0.000 0.884 0.000 0.000 0.116 0.000
#> SRR957911 4 0.1610 0.75326 0.084 0.000 0.000 0.916 0.000 0.000
#> SRR957912 1 0.3765 0.77663 0.800 0.000 0.040 0.028 0.132 0.000
#> SRR957913 3 0.0363 0.93408 0.012 0.000 0.988 0.000 0.000 0.000
#> SRR957917 1 0.4338 0.51566 0.660 0.004 0.300 0.000 0.036 0.000
#> SRR957918 2 0.2478 0.75773 0.012 0.888 0.000 0.000 0.024 0.076
#> SRR957920 3 0.2020 0.90124 0.000 0.008 0.896 0.000 0.096 0.000
#> SRR957919 2 0.2701 0.74262 0.028 0.864 0.000 0.000 0.104 0.004
#> SRR957921 5 0.3883 0.53289 0.000 0.012 0.332 0.000 0.656 0.000
#> SRR957922 5 0.2488 0.64701 0.016 0.076 0.020 0.000 0.888 0.000
#> SRR957924 4 0.4654 0.78131 0.000 0.012 0.124 0.716 0.000 0.148
#> SRR957923 6 0.3907 1.00000 0.000 0.268 0.000 0.028 0.000 0.704
#> SRR957925 2 0.1666 0.78537 0.008 0.936 0.000 0.000 0.020 0.036
#> SRR957926 1 0.4567 0.65572 0.616 0.000 0.052 0.332 0.000 0.000
#> SRR957927 2 0.4501 0.57037 0.000 0.768 0.040 0.048 0.016 0.128
#> SRR957928 1 0.3765 0.77663 0.800 0.000 0.040 0.028 0.132 0.000
#> SRR957929 1 0.3765 0.77663 0.800 0.000 0.040 0.028 0.132 0.000
#> SRR957930 2 0.2003 0.77012 0.000 0.884 0.000 0.000 0.116 0.000
#> SRR957931 5 0.5409 0.60580 0.000 0.348 0.128 0.000 0.524 0.000
#> SRR957932 4 0.3377 0.77327 0.028 0.000 0.188 0.784 0.000 0.000
#> SRR957933 1 0.4524 0.64813 0.616 0.000 0.048 0.336 0.000 0.000
#> SRR957934 5 0.5859 0.54456 0.028 0.340 0.096 0.000 0.532 0.004
#> SRR957935 5 0.5838 0.55265 0.028 0.332 0.096 0.000 0.540 0.004
#> SRR957936 2 0.4322 0.67610 0.068 0.784 0.004 0.000 0.076 0.068
#> SRR957937 2 0.2048 0.76725 0.000 0.880 0.000 0.000 0.120 0.000
#> SRR957938 2 0.2313 0.76949 0.012 0.884 0.000 0.000 0.100 0.004
#> SRR957939 6 0.3907 1.00000 0.000 0.268 0.000 0.028 0.000 0.704
#> SRR957941 5 0.5859 0.54456 0.028 0.340 0.096 0.000 0.532 0.004
#> SRR957940 4 0.4036 0.80878 0.000 0.000 0.136 0.756 0.000 0.108
#> SRR957942 2 0.2492 0.74963 0.020 0.876 0.000 0.000 0.100 0.004
#> SRR957943 2 0.3597 0.69958 0.028 0.824 0.000 0.000 0.080 0.068
#> SRR957944 2 0.2313 0.76949 0.012 0.884 0.000 0.000 0.100 0.004
#> SRR957945 3 0.0363 0.93408 0.012 0.000 0.988 0.000 0.000 0.000
#> SRR957946 1 0.3624 0.83304 0.784 0.000 0.060 0.156 0.000 0.000
#> SRR957947 1 0.3588 0.83356 0.788 0.000 0.060 0.152 0.000 0.000
#> SRR957948 2 0.1458 0.78706 0.016 0.948 0.000 0.000 0.020 0.016
#> SRR957949 5 0.2488 0.64701 0.016 0.076 0.020 0.000 0.888 0.000
#> SRR957950 4 0.1088 0.79648 0.024 0.000 0.000 0.960 0.000 0.016
#> SRR957951 5 0.3883 0.53289 0.000 0.012 0.332 0.000 0.656 0.000
#> SRR957952 3 0.1858 0.90718 0.000 0.004 0.904 0.000 0.092 0.000
#> SRR957953 4 0.3961 0.81076 0.000 0.000 0.124 0.764 0.000 0.112
#> SRR957954 4 0.3062 0.79585 0.032 0.000 0.144 0.824 0.000 0.000
#> SRR957956 4 0.2988 0.79775 0.028 0.000 0.144 0.828 0.000 0.000
#> SRR957957 6 0.3907 1.00000 0.000 0.268 0.000 0.028 0.000 0.704
#> SRR957958 4 0.3961 0.81076 0.000 0.000 0.124 0.764 0.000 0.112
#> SRR957959 3 0.1858 0.90718 0.000 0.004 0.904 0.000 0.092 0.000
#> SRR957960 2 0.1666 0.78537 0.008 0.936 0.000 0.000 0.020 0.036
#> SRR957961 5 0.3883 0.53289 0.000 0.012 0.332 0.000 0.656 0.000
#> SRR957962 4 0.3103 0.81324 0.000 0.000 0.064 0.836 0.000 0.100
#> SRR957963 4 0.1814 0.79581 0.000 0.000 0.000 0.900 0.000 0.100
#> SRR957964 4 0.5034 0.00943 0.404 0.000 0.076 0.520 0.000 0.000
#> SRR957965 2 0.6451 0.01799 0.160 0.432 0.004 0.000 0.032 0.372
#> SRR957966 4 0.0909 0.79629 0.020 0.000 0.000 0.968 0.000 0.012
#> SRR957967 4 0.3701 0.81402 0.000 0.000 0.100 0.788 0.000 0.112
#> SRR957968 4 0.3961 0.81076 0.000 0.000 0.124 0.764 0.000 0.112
#> SRR957969 4 0.3194 0.81530 0.008 0.000 0.132 0.828 0.000 0.032
#> SRR957970 2 0.2045 0.77413 0.016 0.916 0.000 0.000 0.016 0.052
#> SRR957971 3 0.0363 0.93408 0.012 0.000 0.988 0.000 0.000 0.000
#> SRR957972 3 0.1615 0.91658 0.004 0.004 0.928 0.000 0.064 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.885 0.953 0.978 0.5058 0.495 0.495
#> 3 3 0.591 0.746 0.876 0.3042 0.791 0.599
#> 4 4 0.575 0.475 0.664 0.1245 0.863 0.630
#> 5 5 0.614 0.593 0.742 0.0657 0.883 0.603
#> 6 6 0.678 0.525 0.716 0.0423 0.958 0.806
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
#> SRR957914 1 0.000 0.966 1.000 0.000
#> SRR957915 2 0.000 0.987 0.000 1.000
#> SRR957916 2 0.000 0.987 0.000 1.000
#> SRR957884 1 0.680 0.795 0.820 0.180
#> SRR957885 1 0.000 0.966 1.000 0.000
#> SRR957886 2 0.000 0.987 0.000 1.000
#> SRR957887 1 0.000 0.966 1.000 0.000
#> SRR957888 1 0.000 0.966 1.000 0.000
#> SRR957889 1 0.000 0.966 1.000 0.000
#> SRR957890 1 0.000 0.966 1.000 0.000
#> SRR957891 2 0.000 0.987 0.000 1.000
#> SRR957893 1 0.000 0.966 1.000 0.000
#> SRR957892 1 0.000 0.966 1.000 0.000
#> SRR957894 2 0.000 0.987 0.000 1.000
#> SRR957895 1 0.680 0.795 0.820 0.180
#> SRR957896 2 0.000 0.987 0.000 1.000
#> SRR957897 1 0.680 0.795 0.820 0.180
#> SRR957898 1 0.000 0.966 1.000 0.000
#> SRR957899 2 0.000 0.987 0.000 1.000
#> SRR957900 2 0.000 0.987 0.000 1.000
#> SRR957901 2 0.000 0.987 0.000 1.000
#> SRR957902 2 0.000 0.987 0.000 1.000
#> SRR957903 1 0.000 0.966 1.000 0.000
#> SRR957904 1 0.456 0.886 0.904 0.096
#> SRR957905 1 0.000 0.966 1.000 0.000
#> SRR957906 2 0.000 0.987 0.000 1.000
#> SRR957907 2 0.000 0.987 0.000 1.000
#> SRR957908 2 0.000 0.987 0.000 1.000
#> SRR957909 1 0.000 0.966 1.000 0.000
#> SRR957910 2 0.000 0.987 0.000 1.000
#> SRR957911 1 0.000 0.966 1.000 0.000
#> SRR957912 1 0.706 0.776 0.808 0.192
#> SRR957913 1 0.000 0.966 1.000 0.000
#> SRR957917 1 0.722 0.765 0.800 0.200
#> SRR957918 2 0.000 0.987 0.000 1.000
#> SRR957920 2 0.388 0.908 0.076 0.924
#> SRR957919 2 0.000 0.987 0.000 1.000
#> SRR957921 2 0.000 0.987 0.000 1.000
#> SRR957922 2 0.000 0.987 0.000 1.000
#> SRR957924 1 0.000 0.966 1.000 0.000
#> SRR957923 2 0.000 0.987 0.000 1.000
#> SRR957925 2 0.000 0.987 0.000 1.000
#> SRR957926 1 0.000 0.966 1.000 0.000
#> SRR957927 2 0.000 0.987 0.000 1.000
#> SRR957928 1 0.000 0.966 1.000 0.000
#> SRR957929 1 0.706 0.776 0.808 0.192
#> SRR957930 2 0.000 0.987 0.000 1.000
#> SRR957931 2 0.000 0.987 0.000 1.000
#> SRR957932 1 0.000 0.966 1.000 0.000
#> SRR957933 1 0.000 0.966 1.000 0.000
#> SRR957934 2 0.000 0.987 0.000 1.000
#> SRR957935 2 0.000 0.987 0.000 1.000
#> SRR957936 2 0.000 0.987 0.000 1.000
#> SRR957937 2 0.000 0.987 0.000 1.000
#> SRR957938 2 0.000 0.987 0.000 1.000
#> SRR957939 1 0.745 0.750 0.788 0.212
#> SRR957941 2 0.000 0.987 0.000 1.000
#> SRR957940 1 0.000 0.966 1.000 0.000
#> SRR957942 2 0.000 0.987 0.000 1.000
#> SRR957943 2 0.000 0.987 0.000 1.000
#> SRR957944 2 0.000 0.987 0.000 1.000
#> SRR957945 1 0.000 0.966 1.000 0.000
#> SRR957946 1 0.000 0.966 1.000 0.000
#> SRR957947 1 0.000 0.966 1.000 0.000
#> SRR957948 2 0.000 0.987 0.000 1.000
#> SRR957949 2 0.000 0.987 0.000 1.000
#> SRR957950 1 0.000 0.966 1.000 0.000
#> SRR957951 2 0.000 0.987 0.000 1.000
#> SRR957952 2 0.802 0.671 0.244 0.756
#> SRR957953 1 0.000 0.966 1.000 0.000
#> SRR957954 1 0.000 0.966 1.000 0.000
#> SRR957956 1 0.000 0.966 1.000 0.000
#> SRR957957 2 0.722 0.740 0.200 0.800
#> SRR957958 1 0.000 0.966 1.000 0.000
#> SRR957959 2 0.000 0.987 0.000 1.000
#> SRR957960 2 0.000 0.987 0.000 1.000
#> SRR957961 2 0.000 0.987 0.000 1.000
#> SRR957962 1 0.000 0.966 1.000 0.000
#> SRR957963 1 0.000 0.966 1.000 0.000
#> SRR957964 1 0.000 0.966 1.000 0.000
#> SRR957965 2 0.000 0.987 0.000 1.000
#> SRR957966 1 0.000 0.966 1.000 0.000
#> SRR957967 1 0.000 0.966 1.000 0.000
#> SRR957968 1 0.000 0.966 1.000 0.000
#> SRR957969 1 0.000 0.966 1.000 0.000
#> SRR957970 2 0.000 0.987 0.000 1.000
#> SRR957971 1 0.000 0.966 1.000 0.000
#> SRR957972 1 0.000 0.966 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957916 3 0.5560 0.443 0.000 0.300 0.700
#> SRR957884 1 0.7061 0.503 0.632 0.332 0.036
#> SRR957885 3 0.4346 0.665 0.184 0.000 0.816
#> SRR957886 2 0.0747 0.883 0.000 0.984 0.016
#> SRR957887 3 0.3267 0.742 0.116 0.000 0.884
#> SRR957888 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957889 3 0.6225 0.236 0.432 0.000 0.568
#> SRR957890 1 0.4796 0.703 0.780 0.000 0.220
#> SRR957891 2 0.5968 0.555 0.000 0.636 0.364
#> SRR957893 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957895 1 0.6104 0.489 0.648 0.348 0.004
#> SRR957896 2 0.3816 0.834 0.000 0.852 0.148
#> SRR957897 1 0.6498 0.400 0.596 0.396 0.008
#> SRR957898 1 0.4504 0.735 0.804 0.000 0.196
#> SRR957899 2 0.5678 0.640 0.000 0.684 0.316
#> SRR957900 3 0.5621 0.425 0.000 0.308 0.692
#> SRR957901 2 0.3752 0.836 0.000 0.856 0.144
#> SRR957902 2 0.3116 0.855 0.000 0.892 0.108
#> SRR957903 3 0.3116 0.747 0.108 0.000 0.892
#> SRR957904 3 0.0000 0.780 0.000 0.000 1.000
#> SRR957905 1 0.2448 0.820 0.924 0.000 0.076
#> SRR957906 2 0.5397 0.668 0.000 0.720 0.280
#> SRR957907 2 0.1289 0.880 0.000 0.968 0.032
#> SRR957908 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957910 2 0.2878 0.860 0.000 0.904 0.096
#> SRR957911 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957912 3 0.1289 0.778 0.032 0.000 0.968
#> SRR957913 3 0.3116 0.747 0.108 0.000 0.892
#> SRR957917 3 0.0424 0.781 0.000 0.008 0.992
#> SRR957918 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957920 3 0.2261 0.755 0.000 0.068 0.932
#> SRR957919 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957921 3 0.4555 0.615 0.000 0.200 0.800
#> SRR957922 2 0.5835 0.601 0.000 0.660 0.340
#> SRR957924 1 0.0747 0.838 0.984 0.000 0.016
#> SRR957923 2 0.3412 0.764 0.124 0.876 0.000
#> SRR957925 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957926 1 0.4452 0.735 0.808 0.000 0.192
#> SRR957927 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957928 3 0.6008 0.368 0.372 0.000 0.628
#> SRR957929 1 0.5343 0.685 0.816 0.132 0.052
#> SRR957930 2 0.3116 0.855 0.000 0.892 0.108
#> SRR957931 2 0.5835 0.601 0.000 0.660 0.340
#> SRR957932 3 0.6111 0.243 0.396 0.000 0.604
#> SRR957933 1 0.4452 0.735 0.808 0.000 0.192
#> SRR957934 2 0.3752 0.836 0.000 0.856 0.144
#> SRR957935 2 0.3816 0.834 0.000 0.852 0.148
#> SRR957936 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957937 2 0.1411 0.879 0.000 0.964 0.036
#> SRR957938 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957939 1 0.6111 0.401 0.604 0.396 0.000
#> SRR957941 2 0.5785 0.614 0.000 0.668 0.332
#> SRR957940 1 0.4605 0.749 0.796 0.000 0.204
#> SRR957942 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957945 3 0.3192 0.745 0.112 0.000 0.888
#> SRR957946 1 0.4750 0.708 0.784 0.000 0.216
#> SRR957947 1 0.4399 0.739 0.812 0.000 0.188
#> SRR957948 2 0.0424 0.883 0.000 0.992 0.008
#> SRR957949 2 0.3686 0.839 0.000 0.860 0.140
#> SRR957950 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957951 3 0.5650 0.417 0.000 0.312 0.688
#> SRR957952 3 0.0424 0.781 0.000 0.008 0.992
#> SRR957953 1 0.2448 0.820 0.924 0.000 0.076
#> SRR957954 1 0.1031 0.837 0.976 0.000 0.024
#> SRR957956 1 0.2448 0.820 0.924 0.000 0.076
#> SRR957957 2 0.5623 0.526 0.280 0.716 0.004
#> SRR957958 1 0.2448 0.820 0.924 0.000 0.076
#> SRR957959 3 0.0424 0.781 0.000 0.008 0.992
#> SRR957960 2 0.0424 0.883 0.000 0.992 0.008
#> SRR957961 3 0.4555 0.615 0.000 0.200 0.800
#> SRR957962 1 0.0424 0.839 0.992 0.000 0.008
#> SRR957963 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957964 1 0.5431 0.649 0.716 0.000 0.284
#> SRR957965 2 0.0000 0.883 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.839 1.000 0.000 0.000
#> SRR957967 1 0.0424 0.839 0.992 0.000 0.008
#> SRR957968 1 0.2448 0.820 0.924 0.000 0.076
#> SRR957969 1 0.4605 0.746 0.796 0.000 0.204
#> SRR957970 2 0.0424 0.883 0.000 0.992 0.008
#> SRR957971 3 0.3192 0.745 0.112 0.000 0.888
#> SRR957972 3 0.0000 0.780 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.4252 0.5895 0.744 0.000 0.004 0.252
#> SRR957915 2 0.4955 -0.4734 0.000 0.556 0.000 0.444
#> SRR957916 2 0.5142 0.4176 0.000 0.744 0.192 0.064
#> SRR957884 1 0.6523 0.5199 0.636 0.000 0.208 0.156
#> SRR957885 3 0.0469 0.6604 0.012 0.000 0.988 0.000
#> SRR957886 2 0.4790 -0.2353 0.000 0.620 0.000 0.380
#> SRR957887 3 0.0469 0.6604 0.012 0.000 0.988 0.000
#> SRR957888 1 0.4040 0.5925 0.752 0.000 0.000 0.248
#> SRR957889 3 0.7838 -0.0553 0.316 0.000 0.404 0.280
#> SRR957890 1 0.7890 0.1977 0.380 0.000 0.312 0.308
#> SRR957891 2 0.2345 0.5891 0.000 0.900 0.100 0.000
#> SRR957893 1 0.4040 0.5925 0.752 0.000 0.000 0.248
#> SRR957892 1 0.1022 0.6294 0.968 0.000 0.000 0.032
#> SRR957894 4 0.4661 0.8365 0.000 0.348 0.000 0.652
#> SRR957895 1 0.4134 0.5214 0.740 0.000 0.000 0.260
#> SRR957896 2 0.0921 0.6315 0.000 0.972 0.000 0.028
#> SRR957897 1 0.5268 0.2064 0.540 0.000 0.008 0.452
#> SRR957898 1 0.7479 0.4085 0.504 0.000 0.244 0.252
#> SRR957899 2 0.0657 0.6323 0.000 0.984 0.004 0.012
#> SRR957900 2 0.4996 0.4312 0.000 0.752 0.192 0.056
#> SRR957901 2 0.1004 0.6308 0.000 0.972 0.004 0.024
#> SRR957902 2 0.1661 0.6190 0.000 0.944 0.004 0.052
#> SRR957903 3 0.0188 0.6655 0.004 0.000 0.996 0.000
#> SRR957904 3 0.3172 0.6671 0.000 0.160 0.840 0.000
#> SRR957905 1 0.5021 0.5817 0.724 0.000 0.240 0.036
#> SRR957906 2 0.3710 0.4261 0.000 0.804 0.004 0.192
#> SRR957907 2 0.4564 -0.0335 0.000 0.672 0.000 0.328
#> SRR957908 4 0.4585 0.8331 0.000 0.332 0.000 0.668
#> SRR957909 1 0.4040 0.5925 0.752 0.000 0.000 0.248
#> SRR957910 2 0.1743 0.6161 0.000 0.940 0.004 0.056
#> SRR957911 1 0.4252 0.5895 0.744 0.000 0.004 0.252
#> SRR957912 3 0.7925 0.5167 0.020 0.308 0.492 0.180
#> SRR957913 3 0.0188 0.6655 0.004 0.000 0.996 0.000
#> SRR957917 3 0.5814 0.5521 0.000 0.300 0.644 0.056
#> SRR957918 4 0.4998 0.6115 0.000 0.488 0.000 0.512
#> SRR957920 3 0.5119 0.3655 0.000 0.440 0.556 0.004
#> SRR957919 4 0.4624 0.8367 0.000 0.340 0.000 0.660
#> SRR957921 2 0.4992 -0.2229 0.000 0.524 0.476 0.000
#> SRR957922 2 0.1743 0.6094 0.000 0.940 0.004 0.056
#> SRR957924 1 0.4098 0.6051 0.784 0.000 0.204 0.012
#> SRR957923 4 0.5833 0.6872 0.096 0.212 0.000 0.692
#> SRR957925 4 0.5000 0.5837 0.000 0.500 0.000 0.500
#> SRR957926 1 0.7285 0.4098 0.520 0.000 0.180 0.300
#> SRR957927 4 0.4761 0.8252 0.000 0.372 0.000 0.628
#> SRR957928 3 0.8033 0.2193 0.212 0.020 0.488 0.280
#> SRR957929 1 0.7126 0.4260 0.548 0.120 0.008 0.324
#> SRR957930 2 0.1824 0.6194 0.000 0.936 0.004 0.060
#> SRR957931 2 0.0336 0.6306 0.000 0.992 0.008 0.000
#> SRR957932 3 0.1837 0.6282 0.028 0.000 0.944 0.028
#> SRR957933 1 0.7289 0.4296 0.532 0.000 0.200 0.268
#> SRR957934 2 0.1792 0.6106 0.000 0.932 0.000 0.068
#> SRR957935 2 0.1637 0.6184 0.000 0.940 0.000 0.060
#> SRR957936 4 0.4605 0.8354 0.000 0.336 0.000 0.664
#> SRR957937 2 0.4713 -0.1575 0.000 0.640 0.000 0.360
#> SRR957938 4 0.4746 0.8301 0.000 0.368 0.000 0.632
#> SRR957939 1 0.4948 0.2333 0.560 0.000 0.000 0.440
#> SRR957941 2 0.0336 0.6315 0.000 0.992 0.000 0.008
#> SRR957940 1 0.4955 0.5197 0.648 0.000 0.344 0.008
#> SRR957942 4 0.4843 0.8102 0.000 0.396 0.000 0.604
#> SRR957943 4 0.4585 0.8331 0.000 0.332 0.000 0.668
#> SRR957944 4 0.4730 0.8327 0.000 0.364 0.000 0.636
#> SRR957945 3 0.0188 0.6655 0.004 0.000 0.996 0.000
#> SRR957946 1 0.7618 0.3259 0.464 0.000 0.228 0.308
#> SRR957947 1 0.7253 0.4047 0.520 0.000 0.172 0.308
#> SRR957948 2 0.4804 -0.2292 0.000 0.616 0.000 0.384
#> SRR957949 2 0.0707 0.6326 0.000 0.980 0.000 0.020
#> SRR957950 1 0.3569 0.6082 0.804 0.000 0.000 0.196
#> SRR957951 2 0.4134 0.3727 0.000 0.740 0.260 0.000
#> SRR957952 3 0.5329 0.3990 0.000 0.420 0.568 0.012
#> SRR957953 1 0.5021 0.5817 0.724 0.000 0.240 0.036
#> SRR957954 1 0.4711 0.5988 0.740 0.000 0.236 0.024
#> SRR957956 1 0.4898 0.5835 0.716 0.000 0.260 0.024
#> SRR957957 4 0.5866 0.3580 0.324 0.052 0.000 0.624
#> SRR957958 1 0.5021 0.5817 0.724 0.000 0.240 0.036
#> SRR957959 3 0.5345 0.3778 0.000 0.428 0.560 0.012
#> SRR957960 2 0.4907 -0.3652 0.000 0.580 0.000 0.420
#> SRR957961 2 0.4994 -0.2334 0.000 0.520 0.480 0.000
#> SRR957962 1 0.3539 0.6111 0.820 0.000 0.176 0.004
#> SRR957963 1 0.0336 0.6280 0.992 0.000 0.000 0.008
#> SRR957964 3 0.7371 -0.1715 0.232 0.000 0.524 0.244
#> SRR957965 4 0.4817 0.8216 0.000 0.388 0.000 0.612
#> SRR957966 1 0.2469 0.6235 0.892 0.000 0.000 0.108
#> SRR957967 1 0.4248 0.5970 0.768 0.000 0.220 0.012
#> SRR957968 1 0.5113 0.5756 0.712 0.000 0.252 0.036
#> SRR957969 1 0.5620 0.4381 0.560 0.000 0.416 0.024
#> SRR957970 2 0.4925 -0.3955 0.000 0.572 0.000 0.428
#> SRR957971 3 0.0188 0.6655 0.004 0.000 0.996 0.000
#> SRR957972 3 0.3937 0.6468 0.000 0.188 0.800 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.4822 0.7002 0.664 0.048 0.000 0.288 0.000
#> SRR957915 5 0.4824 0.3321 0.028 0.376 0.000 0.000 0.596
#> SRR957916 5 0.5634 0.4387 0.076 0.028 0.232 0.000 0.664
#> SRR957884 4 0.2515 0.7790 0.020 0.032 0.040 0.908 0.000
#> SRR957885 3 0.4254 0.6425 0.080 0.000 0.772 0.148 0.000
#> SRR957886 5 0.3983 0.4580 0.000 0.340 0.000 0.000 0.660
#> SRR957887 3 0.4254 0.6425 0.080 0.000 0.772 0.148 0.000
#> SRR957888 1 0.4902 0.6903 0.648 0.048 0.000 0.304 0.000
#> SRR957889 1 0.5275 0.4641 0.664 0.024 0.276 0.032 0.004
#> SRR957890 1 0.4124 0.6746 0.792 0.008 0.144 0.056 0.000
#> SRR957891 5 0.3943 0.6000 0.020 0.020 0.164 0.000 0.796
#> SRR957893 1 0.4902 0.6903 0.648 0.048 0.000 0.304 0.000
#> SRR957892 4 0.5119 0.0226 0.360 0.048 0.000 0.592 0.000
#> SRR957894 2 0.3684 0.7838 0.056 0.824 0.004 0.000 0.116
#> SRR957895 4 0.3206 0.7314 0.024 0.096 0.004 0.864 0.012
#> SRR957896 5 0.1124 0.6938 0.004 0.036 0.000 0.000 0.960
#> SRR957897 4 0.4789 0.4194 0.020 0.368 0.004 0.608 0.000
#> SRR957898 1 0.3691 0.7431 0.820 0.000 0.076 0.104 0.000
#> SRR957899 5 0.1597 0.6860 0.008 0.024 0.020 0.000 0.948
#> SRR957900 5 0.5303 0.4669 0.068 0.020 0.224 0.000 0.688
#> SRR957901 5 0.1710 0.6894 0.004 0.040 0.016 0.000 0.940
#> SRR957902 5 0.1671 0.6906 0.000 0.076 0.000 0.000 0.924
#> SRR957903 3 0.3992 0.6551 0.080 0.000 0.796 0.124 0.000
#> SRR957904 3 0.1686 0.6517 0.028 0.000 0.944 0.008 0.020
#> SRR957905 4 0.1331 0.7958 0.000 0.008 0.040 0.952 0.000
#> SRR957906 5 0.5070 0.4661 0.028 0.316 0.016 0.000 0.640
#> SRR957907 5 0.3783 0.5677 0.008 0.252 0.000 0.000 0.740
#> SRR957908 2 0.2766 0.8021 0.024 0.884 0.000 0.008 0.084
#> SRR957909 1 0.4902 0.6903 0.648 0.048 0.000 0.304 0.000
#> SRR957910 5 0.1908 0.6865 0.000 0.092 0.000 0.000 0.908
#> SRR957911 1 0.4801 0.7001 0.668 0.048 0.000 0.284 0.000
#> SRR957912 3 0.6799 0.1791 0.400 0.020 0.428 0.000 0.152
#> SRR957913 3 0.3992 0.6551 0.080 0.000 0.796 0.124 0.000
#> SRR957917 3 0.5604 0.5673 0.116 0.020 0.680 0.000 0.184
#> SRR957918 5 0.5289 0.0306 0.048 0.452 0.000 0.000 0.500
#> SRR957920 3 0.4576 0.5390 0.032 0.008 0.712 0.000 0.248
#> SRR957919 2 0.2700 0.8025 0.024 0.884 0.000 0.004 0.088
#> SRR957921 3 0.5324 0.2773 0.036 0.008 0.536 0.000 0.420
#> SRR957922 5 0.5056 0.5753 0.084 0.028 0.148 0.000 0.740
#> SRR957924 4 0.2075 0.7922 0.032 0.004 0.040 0.924 0.000
#> SRR957923 2 0.4272 0.7391 0.048 0.816 0.004 0.084 0.048
#> SRR957925 5 0.5679 0.2195 0.060 0.396 0.004 0.004 0.536
#> SRR957926 1 0.3507 0.7500 0.828 0.000 0.052 0.120 0.000
#> SRR957927 2 0.4981 0.4009 0.020 0.608 0.000 0.012 0.360
#> SRR957928 1 0.4959 0.3009 0.652 0.020 0.308 0.000 0.020
#> SRR957929 1 0.5005 0.6343 0.784 0.032 0.036 0.068 0.080
#> SRR957930 5 0.1831 0.6911 0.000 0.076 0.004 0.000 0.920
#> SRR957931 5 0.3940 0.6204 0.044 0.012 0.136 0.000 0.808
#> SRR957932 3 0.4884 0.6036 0.128 0.000 0.720 0.152 0.000
#> SRR957933 1 0.3507 0.7500 0.828 0.000 0.052 0.120 0.000
#> SRR957934 5 0.3587 0.6788 0.036 0.096 0.024 0.000 0.844
#> SRR957935 5 0.4333 0.6677 0.068 0.092 0.036 0.000 0.804
#> SRR957936 2 0.2732 0.8037 0.020 0.884 0.000 0.008 0.088
#> SRR957937 5 0.3752 0.5249 0.000 0.292 0.000 0.000 0.708
#> SRR957938 2 0.3745 0.7370 0.024 0.780 0.000 0.000 0.196
#> SRR957939 4 0.4961 0.2291 0.020 0.456 0.004 0.520 0.000
#> SRR957941 5 0.2721 0.6747 0.052 0.016 0.036 0.000 0.896
#> SRR957940 4 0.3291 0.7305 0.064 0.000 0.088 0.848 0.000
#> SRR957942 2 0.4734 0.3877 0.024 0.604 0.000 0.000 0.372
#> SRR957943 2 0.2766 0.8021 0.024 0.884 0.000 0.008 0.084
#> SRR957944 2 0.3193 0.7846 0.028 0.840 0.000 0.000 0.132
#> SRR957945 3 0.3992 0.6551 0.080 0.000 0.796 0.124 0.000
#> SRR957946 1 0.3702 0.7345 0.832 0.008 0.080 0.080 0.000
#> SRR957947 1 0.3497 0.7488 0.840 0.008 0.044 0.108 0.000
#> SRR957948 5 0.4425 0.4976 0.024 0.296 0.000 0.000 0.680
#> SRR957949 5 0.3308 0.6674 0.076 0.032 0.028 0.000 0.864
#> SRR957950 1 0.5107 0.6181 0.596 0.048 0.000 0.356 0.000
#> SRR957951 5 0.4061 0.5459 0.024 0.012 0.188 0.000 0.776
#> SRR957952 3 0.5241 0.5164 0.056 0.016 0.672 0.000 0.256
#> SRR957953 4 0.1492 0.7955 0.004 0.008 0.040 0.948 0.000
#> SRR957954 4 0.3894 0.7374 0.080 0.032 0.056 0.832 0.000
#> SRR957956 4 0.2863 0.7698 0.064 0.000 0.060 0.876 0.000
#> SRR957957 2 0.4125 0.5354 0.024 0.748 0.004 0.224 0.000
#> SRR957958 4 0.1331 0.7958 0.000 0.008 0.040 0.952 0.000
#> SRR957959 3 0.4716 0.4864 0.036 0.000 0.656 0.000 0.308
#> SRR957960 5 0.5429 0.3959 0.056 0.328 0.004 0.004 0.608
#> SRR957961 3 0.5159 0.1994 0.024 0.008 0.496 0.000 0.472
#> SRR957962 4 0.1836 0.7540 0.036 0.032 0.000 0.932 0.000
#> SRR957963 4 0.4203 0.5058 0.188 0.052 0.000 0.760 0.000
#> SRR957964 3 0.6698 0.0511 0.368 0.004 0.424 0.204 0.000
#> SRR957965 2 0.4054 0.6912 0.020 0.732 0.000 0.000 0.248
#> SRR957966 1 0.5286 0.4472 0.504 0.048 0.000 0.448 0.000
#> SRR957967 4 0.0833 0.7818 0.016 0.004 0.004 0.976 0.000
#> SRR957968 4 0.1788 0.7929 0.004 0.008 0.056 0.932 0.000
#> SRR957969 4 0.5113 0.5789 0.160 0.004 0.128 0.708 0.000
#> SRR957970 5 0.5172 0.3948 0.048 0.332 0.000 0.004 0.616
#> SRR957971 3 0.3992 0.6551 0.080 0.000 0.796 0.124 0.000
#> SRR957972 3 0.2396 0.6497 0.068 0.000 0.904 0.004 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.1701 0.72290 0.920 0.000 0.000 0.072 0.000 0.008
#> SRR957915 5 0.5340 0.47678 0.016 0.288 0.004 0.004 0.616 0.072
#> SRR957916 6 0.5342 0.23873 0.004 0.008 0.076 0.000 0.372 0.540
#> SRR957884 4 0.1148 0.83611 0.000 0.000 0.016 0.960 0.004 0.020
#> SRR957885 3 0.2488 0.60368 0.000 0.008 0.864 0.124 0.000 0.004
#> SRR957886 5 0.4274 0.45217 0.004 0.336 0.000 0.000 0.636 0.024
#> SRR957887 3 0.2400 0.60852 0.000 0.008 0.872 0.116 0.000 0.004
#> SRR957888 1 0.1814 0.72197 0.900 0.000 0.000 0.100 0.000 0.000
#> SRR957889 1 0.6038 0.23372 0.412 0.004 0.208 0.000 0.000 0.376
#> SRR957890 1 0.5192 0.55141 0.596 0.000 0.108 0.004 0.000 0.292
#> SRR957891 5 0.5344 0.17086 0.004 0.012 0.068 0.004 0.588 0.324
#> SRR957893 1 0.1863 0.72119 0.896 0.000 0.000 0.104 0.000 0.000
#> SRR957892 1 0.3468 0.52193 0.728 0.000 0.000 0.264 0.000 0.008
#> SRR957894 2 0.4856 0.67740 0.012 0.740 0.012 0.012 0.096 0.128
#> SRR957895 4 0.3734 0.74552 0.016 0.020 0.012 0.836 0.036 0.080
#> SRR957896 5 0.0603 0.66849 0.004 0.000 0.000 0.000 0.980 0.016
#> SRR957897 4 0.5630 0.02363 0.008 0.420 0.008 0.476 0.000 0.088
#> SRR957898 1 0.5403 0.67307 0.672 0.008 0.084 0.044 0.000 0.192
#> SRR957899 5 0.3089 0.60882 0.004 0.016 0.004 0.004 0.836 0.136
#> SRR957900 6 0.5372 0.20937 0.004 0.008 0.076 0.000 0.388 0.524
#> SRR957901 5 0.2739 0.63567 0.004 0.016 0.004 0.004 0.868 0.104
#> SRR957902 5 0.1461 0.68939 0.000 0.044 0.000 0.000 0.940 0.016
#> SRR957903 3 0.1444 0.62798 0.000 0.000 0.928 0.072 0.000 0.000
#> SRR957904 3 0.1701 0.56743 0.000 0.000 0.920 0.008 0.000 0.072
#> SRR957905 4 0.0993 0.84832 0.012 0.000 0.024 0.964 0.000 0.000
#> SRR957906 5 0.6039 0.28531 0.016 0.380 0.024 0.008 0.508 0.064
#> SRR957907 5 0.2814 0.64682 0.000 0.172 0.000 0.000 0.820 0.008
#> SRR957908 2 0.1511 0.72851 0.012 0.940 0.000 0.004 0.044 0.000
#> SRR957909 1 0.1863 0.72119 0.896 0.000 0.000 0.104 0.000 0.000
#> SRR957910 5 0.2173 0.69205 0.004 0.064 0.000 0.000 0.904 0.028
#> SRR957911 1 0.1806 0.72450 0.908 0.000 0.000 0.088 0.000 0.004
#> SRR957912 6 0.5690 0.33943 0.140 0.000 0.172 0.000 0.052 0.636
#> SRR957913 3 0.1444 0.62798 0.000 0.000 0.928 0.072 0.000 0.000
#> SRR957917 6 0.5509 0.14986 0.036 0.000 0.340 0.000 0.064 0.560
#> SRR957918 5 0.5328 0.39137 0.008 0.316 0.004 0.008 0.596 0.068
#> SRR957920 3 0.5629 0.11892 0.004 0.000 0.524 0.000 0.148 0.324
#> SRR957919 2 0.1768 0.72728 0.012 0.932 0.000 0.004 0.044 0.008
#> SRR957921 3 0.6307 -0.08618 0.004 0.000 0.368 0.004 0.260 0.364
#> SRR957922 5 0.4877 0.08389 0.016 0.004 0.028 0.000 0.576 0.376
#> SRR957924 4 0.1672 0.84315 0.028 0.000 0.016 0.940 0.004 0.012
#> SRR957923 2 0.5370 0.65819 0.012 0.716 0.012 0.076 0.052 0.132
#> SRR957925 5 0.5162 0.53274 0.008 0.216 0.004 0.008 0.668 0.096
#> SRR957926 1 0.4637 0.65984 0.684 0.004 0.028 0.028 0.000 0.256
#> SRR957927 2 0.4802 -0.04943 0.012 0.504 0.000 0.008 0.460 0.016
#> SRR957928 6 0.5992 -0.22726 0.360 0.000 0.200 0.000 0.004 0.436
#> SRR957929 1 0.4835 0.42308 0.540 0.000 0.000 0.004 0.048 0.408
#> SRR957930 5 0.1434 0.69302 0.000 0.048 0.000 0.000 0.940 0.012
#> SRR957931 5 0.4793 0.18450 0.008 0.000 0.040 0.004 0.608 0.340
#> SRR957932 3 0.3358 0.58522 0.016 0.008 0.832 0.120 0.000 0.024
#> SRR957933 1 0.5145 0.68547 0.672 0.004 0.040 0.060 0.000 0.224
#> SRR957934 5 0.2808 0.67743 0.008 0.048 0.000 0.000 0.868 0.076
#> SRR957935 5 0.3889 0.62217 0.016 0.044 0.000 0.000 0.776 0.164
#> SRR957936 2 0.1152 0.72915 0.000 0.952 0.000 0.000 0.044 0.004
#> SRR957937 5 0.4302 0.53045 0.004 0.292 0.000 0.000 0.668 0.036
#> SRR957938 2 0.3987 0.59336 0.000 0.732 0.000 0.004 0.224 0.040
#> SRR957939 2 0.6123 0.00789 0.020 0.444 0.012 0.416 0.000 0.108
#> SRR957941 5 0.2925 0.59366 0.016 0.000 0.004 0.000 0.832 0.148
#> SRR957940 4 0.2231 0.83641 0.012 0.008 0.048 0.912 0.000 0.020
#> SRR957942 2 0.4641 0.20574 0.012 0.592 0.000 0.004 0.372 0.020
#> SRR957943 2 0.1511 0.72851 0.012 0.940 0.000 0.004 0.044 0.000
#> SRR957944 2 0.2964 0.71044 0.000 0.848 0.000 0.004 0.108 0.040
#> SRR957945 3 0.1444 0.62798 0.000 0.000 0.928 0.072 0.000 0.000
#> SRR957946 1 0.4484 0.63263 0.672 0.000 0.056 0.004 0.000 0.268
#> SRR957947 1 0.4500 0.64950 0.680 0.004 0.024 0.020 0.000 0.272
#> SRR957948 5 0.3901 0.60633 0.004 0.192 0.004 0.004 0.764 0.032
#> SRR957949 5 0.2714 0.61006 0.012 0.004 0.000 0.000 0.848 0.136
#> SRR957950 1 0.2482 0.69627 0.848 0.000 0.000 0.148 0.000 0.004
#> SRR957951 5 0.5323 0.06628 0.004 0.000 0.096 0.004 0.572 0.324
#> SRR957952 3 0.6087 -0.03284 0.016 0.000 0.460 0.000 0.168 0.356
#> SRR957953 4 0.0993 0.84832 0.012 0.000 0.024 0.964 0.000 0.000
#> SRR957954 4 0.4268 0.74272 0.148 0.020 0.064 0.764 0.000 0.004
#> SRR957956 4 0.3471 0.79575 0.076 0.008 0.076 0.832 0.000 0.008
#> SRR957957 2 0.4663 0.54481 0.012 0.720 0.008 0.184 0.000 0.076
#> SRR957958 4 0.0993 0.84832 0.012 0.000 0.024 0.964 0.000 0.000
#> SRR957959 3 0.5934 0.01842 0.000 0.000 0.436 0.004 0.184 0.376
#> SRR957960 5 0.4659 0.60216 0.008 0.160 0.004 0.008 0.732 0.088
#> SRR957961 3 0.6337 -0.05584 0.004 0.000 0.380 0.004 0.288 0.324
#> SRR957962 4 0.2596 0.80074 0.104 0.016 0.004 0.872 0.000 0.004
#> SRR957963 4 0.4404 0.32584 0.400 0.016 0.000 0.576 0.000 0.008
#> SRR957964 3 0.6655 0.30306 0.120 0.016 0.576 0.168 0.000 0.120
#> SRR957965 2 0.4262 0.62620 0.016 0.744 0.000 0.000 0.180 0.060
#> SRR957966 1 0.3679 0.54843 0.724 0.004 0.000 0.260 0.000 0.012
#> SRR957967 4 0.1457 0.84055 0.028 0.016 0.004 0.948 0.000 0.004
#> SRR957968 4 0.1667 0.84325 0.008 0.008 0.044 0.936 0.000 0.004
#> SRR957969 4 0.4246 0.74668 0.052 0.024 0.144 0.772 0.000 0.008
#> SRR957970 5 0.4378 0.59720 0.004 0.176 0.004 0.008 0.744 0.064
#> SRR957971 3 0.1444 0.62798 0.000 0.000 0.928 0.072 0.000 0.000
#> SRR957972 3 0.2225 0.55189 0.008 0.000 0.892 0.008 0.000 0.092
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.980 0.991 0.5060 0.495 0.495
#> 3 3 0.968 0.964 0.981 0.3037 0.791 0.599
#> 4 4 0.668 0.716 0.821 0.1227 0.873 0.653
#> 5 5 0.786 0.775 0.875 0.0784 0.864 0.548
#> 6 6 0.732 0.634 0.800 0.0415 0.931 0.681
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR957914 1 0.0000 0.986 1.000 0.000
#> SRR957915 2 0.0000 0.995 0.000 1.000
#> SRR957916 2 0.0000 0.995 0.000 1.000
#> SRR957884 1 0.0000 0.986 1.000 0.000
#> SRR957885 1 0.0000 0.986 1.000 0.000
#> SRR957886 2 0.0000 0.995 0.000 1.000
#> SRR957887 1 0.0000 0.986 1.000 0.000
#> SRR957888 1 0.0000 0.986 1.000 0.000
#> SRR957889 1 0.0000 0.986 1.000 0.000
#> SRR957890 1 0.0000 0.986 1.000 0.000
#> SRR957891 2 0.0000 0.995 0.000 1.000
#> SRR957893 1 0.0000 0.986 1.000 0.000
#> SRR957892 1 0.0000 0.986 1.000 0.000
#> SRR957894 2 0.0000 0.995 0.000 1.000
#> SRR957895 1 0.0000 0.986 1.000 0.000
#> SRR957896 2 0.0000 0.995 0.000 1.000
#> SRR957897 1 0.0000 0.986 1.000 0.000
#> SRR957898 1 0.0000 0.986 1.000 0.000
#> SRR957899 2 0.0000 0.995 0.000 1.000
#> SRR957900 2 0.0000 0.995 0.000 1.000
#> SRR957901 2 0.0000 0.995 0.000 1.000
#> SRR957902 2 0.0000 0.995 0.000 1.000
#> SRR957903 1 0.0000 0.986 1.000 0.000
#> SRR957904 1 0.0938 0.975 0.988 0.012
#> SRR957905 1 0.0000 0.986 1.000 0.000
#> SRR957906 2 0.0000 0.995 0.000 1.000
#> SRR957907 2 0.0000 0.995 0.000 1.000
#> SRR957908 2 0.0000 0.995 0.000 1.000
#> SRR957909 1 0.0000 0.986 1.000 0.000
#> SRR957910 2 0.0000 0.995 0.000 1.000
#> SRR957911 1 0.0000 0.986 1.000 0.000
#> SRR957912 1 0.7219 0.760 0.800 0.200
#> SRR957913 1 0.0000 0.986 1.000 0.000
#> SRR957917 1 0.7376 0.749 0.792 0.208
#> SRR957918 2 0.0000 0.995 0.000 1.000
#> SRR957920 2 0.0000 0.995 0.000 1.000
#> SRR957919 2 0.0000 0.995 0.000 1.000
#> SRR957921 2 0.0000 0.995 0.000 1.000
#> SRR957922 2 0.0000 0.995 0.000 1.000
#> SRR957924 1 0.0000 0.986 1.000 0.000
#> SRR957923 2 0.0000 0.995 0.000 1.000
#> SRR957925 2 0.0000 0.995 0.000 1.000
#> SRR957926 1 0.0000 0.986 1.000 0.000
#> SRR957927 2 0.0000 0.995 0.000 1.000
#> SRR957928 1 0.0000 0.986 1.000 0.000
#> SRR957929 1 0.7219 0.760 0.800 0.200
#> SRR957930 2 0.0000 0.995 0.000 1.000
#> SRR957931 2 0.0000 0.995 0.000 1.000
#> SRR957932 1 0.0000 0.986 1.000 0.000
#> SRR957933 1 0.0000 0.986 1.000 0.000
#> SRR957934 2 0.0000 0.995 0.000 1.000
#> SRR957935 2 0.0000 0.995 0.000 1.000
#> SRR957936 2 0.0000 0.995 0.000 1.000
#> SRR957937 2 0.0000 0.995 0.000 1.000
#> SRR957938 2 0.0000 0.995 0.000 1.000
#> SRR957939 1 0.0000 0.986 1.000 0.000
#> SRR957941 2 0.0000 0.995 0.000 1.000
#> SRR957940 1 0.0000 0.986 1.000 0.000
#> SRR957942 2 0.0000 0.995 0.000 1.000
#> SRR957943 2 0.0000 0.995 0.000 1.000
#> SRR957944 2 0.0000 0.995 0.000 1.000
#> SRR957945 1 0.0000 0.986 1.000 0.000
#> SRR957946 1 0.0000 0.986 1.000 0.000
#> SRR957947 1 0.0000 0.986 1.000 0.000
#> SRR957948 2 0.0000 0.995 0.000 1.000
#> SRR957949 2 0.0000 0.995 0.000 1.000
#> SRR957950 1 0.0000 0.986 1.000 0.000
#> SRR957951 2 0.0000 0.995 0.000 1.000
#> SRR957952 2 0.0000 0.995 0.000 1.000
#> SRR957953 1 0.0000 0.986 1.000 0.000
#> SRR957954 1 0.0000 0.986 1.000 0.000
#> SRR957956 1 0.0000 0.986 1.000 0.000
#> SRR957957 2 0.7219 0.746 0.200 0.800
#> SRR957958 1 0.0000 0.986 1.000 0.000
#> SRR957959 2 0.0000 0.995 0.000 1.000
#> SRR957960 2 0.0000 0.995 0.000 1.000
#> SRR957961 2 0.0000 0.995 0.000 1.000
#> SRR957962 1 0.0000 0.986 1.000 0.000
#> SRR957963 1 0.0000 0.986 1.000 0.000
#> SRR957964 1 0.0000 0.986 1.000 0.000
#> SRR957965 2 0.0000 0.995 0.000 1.000
#> SRR957966 1 0.0000 0.986 1.000 0.000
#> SRR957967 1 0.0000 0.986 1.000 0.000
#> SRR957968 1 0.0000 0.986 1.000 0.000
#> SRR957969 1 0.0000 0.986 1.000 0.000
#> SRR957970 2 0.0000 0.995 0.000 1.000
#> SRR957971 1 0.0000 0.986 1.000 0.000
#> SRR957972 1 0.0000 0.986 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957916 3 0.2878 0.897 0.000 0.096 0.904
#> SRR957884 1 0.0237 0.973 0.996 0.004 0.000
#> SRR957885 3 0.1031 0.954 0.024 0.000 0.976
#> SRR957886 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957887 3 0.0892 0.956 0.020 0.000 0.980
#> SRR957888 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957889 3 0.0237 0.966 0.004 0.000 0.996
#> SRR957890 1 0.3752 0.854 0.856 0.000 0.144
#> SRR957891 2 0.0424 0.985 0.000 0.992 0.008
#> SRR957893 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957895 1 0.0237 0.973 0.996 0.004 0.000
#> SRR957896 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957897 1 0.0237 0.973 0.996 0.004 0.000
#> SRR957898 1 0.1163 0.962 0.972 0.000 0.028
#> SRR957899 2 0.0237 0.988 0.000 0.996 0.004
#> SRR957900 3 0.3879 0.836 0.000 0.152 0.848
#> SRR957901 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957903 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957904 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957905 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957906 2 0.0237 0.988 0.000 0.996 0.004
#> SRR957907 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957908 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957912 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957913 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957917 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957918 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957920 3 0.0237 0.966 0.000 0.004 0.996
#> SRR957919 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957921 3 0.1163 0.953 0.000 0.028 0.972
#> SRR957922 2 0.0237 0.988 0.000 0.996 0.004
#> SRR957924 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957923 2 0.1031 0.967 0.024 0.976 0.000
#> SRR957925 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957926 1 0.1163 0.962 0.972 0.000 0.028
#> SRR957927 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957928 3 0.0237 0.966 0.004 0.000 0.996
#> SRR957929 1 0.4473 0.791 0.828 0.164 0.008
#> SRR957930 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957931 2 0.0237 0.988 0.000 0.996 0.004
#> SRR957932 3 0.2448 0.905 0.076 0.000 0.924
#> SRR957933 1 0.1163 0.962 0.972 0.000 0.028
#> SRR957934 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957935 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957936 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957939 1 0.0237 0.973 0.996 0.004 0.000
#> SRR957941 2 0.0237 0.988 0.000 0.996 0.004
#> SRR957940 1 0.0892 0.966 0.980 0.000 0.020
#> SRR957942 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957946 1 0.3619 0.862 0.864 0.000 0.136
#> SRR957947 1 0.1031 0.964 0.976 0.000 0.024
#> SRR957948 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957951 3 0.4121 0.817 0.000 0.168 0.832
#> SRR957952 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957953 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957954 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957956 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957957 2 0.4887 0.710 0.228 0.772 0.000
#> SRR957958 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957959 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957960 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957961 3 0.1163 0.953 0.000 0.028 0.972
#> SRR957962 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957963 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957964 1 0.3752 0.854 0.856 0.000 0.144
#> SRR957965 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957967 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957968 1 0.0000 0.975 1.000 0.000 0.000
#> SRR957969 1 0.0592 0.970 0.988 0.000 0.012
#> SRR957970 2 0.0000 0.991 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.968 0.000 0.000 1.000
#> SRR957972 3 0.0000 0.968 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.3873 0.6685 0.772 0.000 0.000 0.228
#> SRR957915 2 0.1118 0.8394 0.000 0.964 0.000 0.036
#> SRR957916 3 0.3569 0.6554 0.000 0.196 0.804 0.000
#> SRR957884 4 0.1557 0.7814 0.056 0.000 0.000 0.944
#> SRR957885 3 0.4741 0.7379 0.228 0.000 0.744 0.028
#> SRR957886 2 0.0000 0.8366 0.000 1.000 0.000 0.000
#> SRR957887 3 0.4741 0.7379 0.228 0.000 0.744 0.028
#> SRR957888 1 0.3873 0.6685 0.772 0.000 0.000 0.228
#> SRR957889 1 0.2408 0.6770 0.896 0.000 0.104 0.000
#> SRR957890 1 0.1389 0.7141 0.952 0.000 0.048 0.000
#> SRR957891 3 0.4925 0.0997 0.000 0.428 0.572 0.000
#> SRR957893 1 0.3873 0.6685 0.772 0.000 0.000 0.228
#> SRR957892 1 0.4008 0.6485 0.756 0.000 0.000 0.244
#> SRR957894 2 0.3311 0.8106 0.000 0.828 0.000 0.172
#> SRR957895 4 0.3117 0.7901 0.092 0.028 0.000 0.880
#> SRR957896 2 0.3942 0.7148 0.000 0.764 0.236 0.000
#> SRR957897 4 0.1256 0.7355 0.008 0.028 0.000 0.964
#> SRR957898 1 0.0000 0.7329 1.000 0.000 0.000 0.000
#> SRR957899 2 0.4008 0.7073 0.000 0.756 0.244 0.000
#> SRR957900 3 0.3569 0.6554 0.000 0.196 0.804 0.000
#> SRR957901 2 0.3569 0.7484 0.000 0.804 0.196 0.000
#> SRR957902 2 0.3172 0.7732 0.000 0.840 0.160 0.000
#> SRR957903 3 0.4741 0.7379 0.228 0.000 0.744 0.028
#> SRR957904 3 0.4053 0.7446 0.228 0.000 0.768 0.004
#> SRR957905 4 0.3311 0.8218 0.172 0.000 0.000 0.828
#> SRR957906 2 0.3392 0.8273 0.000 0.872 0.056 0.072
#> SRR957907 2 0.0000 0.8366 0.000 1.000 0.000 0.000
#> SRR957908 2 0.3444 0.8046 0.000 0.816 0.000 0.184
#> SRR957909 1 0.3873 0.6685 0.772 0.000 0.000 0.228
#> SRR957910 2 0.3123 0.7757 0.000 0.844 0.156 0.000
#> SRR957911 1 0.3873 0.6685 0.772 0.000 0.000 0.228
#> SRR957912 1 0.4925 0.3390 0.572 0.000 0.428 0.000
#> SRR957913 3 0.4741 0.7379 0.228 0.000 0.744 0.028
#> SRR957917 3 0.1389 0.7727 0.048 0.000 0.952 0.000
#> SRR957918 2 0.2216 0.8341 0.000 0.908 0.000 0.092
#> SRR957920 3 0.0188 0.7737 0.000 0.004 0.996 0.000
#> SRR957919 2 0.3400 0.8067 0.000 0.820 0.000 0.180
#> SRR957921 3 0.1792 0.7563 0.000 0.068 0.932 0.000
#> SRR957922 2 0.4103 0.6949 0.000 0.744 0.256 0.000
#> SRR957924 1 0.3873 0.6685 0.772 0.000 0.000 0.228
#> SRR957923 2 0.4977 0.3975 0.000 0.540 0.000 0.460
#> SRR957925 2 0.2647 0.8279 0.000 0.880 0.000 0.120
#> SRR957926 1 0.0000 0.7329 1.000 0.000 0.000 0.000
#> SRR957927 2 0.3444 0.8046 0.000 0.816 0.000 0.184
#> SRR957928 1 0.3356 0.5957 0.824 0.000 0.176 0.000
#> SRR957929 1 0.5338 0.6340 0.772 0.040 0.148 0.040
#> SRR957930 2 0.3311 0.7655 0.000 0.828 0.172 0.000
#> SRR957931 2 0.4103 0.6949 0.000 0.744 0.256 0.000
#> SRR957932 1 0.4599 0.5229 0.760 0.000 0.212 0.028
#> SRR957933 1 0.0000 0.7329 1.000 0.000 0.000 0.000
#> SRR957934 2 0.1302 0.8251 0.000 0.956 0.044 0.000
#> SRR957935 2 0.3485 0.8068 0.000 0.856 0.116 0.028
#> SRR957936 2 0.3444 0.8046 0.000 0.816 0.000 0.184
#> SRR957937 2 0.0000 0.8366 0.000 1.000 0.000 0.000
#> SRR957938 2 0.3123 0.8172 0.000 0.844 0.000 0.156
#> SRR957939 4 0.1256 0.7355 0.008 0.028 0.000 0.964
#> SRR957941 2 0.4072 0.6993 0.000 0.748 0.252 0.000
#> SRR957940 1 0.3569 0.6871 0.804 0.000 0.000 0.196
#> SRR957942 2 0.3123 0.8173 0.000 0.844 0.000 0.156
#> SRR957943 2 0.3444 0.8046 0.000 0.816 0.000 0.184
#> SRR957944 2 0.3311 0.8106 0.000 0.828 0.000 0.172
#> SRR957945 3 0.4741 0.7379 0.228 0.000 0.744 0.028
#> SRR957946 1 0.0707 0.7269 0.980 0.000 0.020 0.000
#> SRR957947 1 0.0188 0.7328 0.996 0.000 0.000 0.004
#> SRR957948 2 0.0000 0.8366 0.000 1.000 0.000 0.000
#> SRR957949 2 0.4103 0.6949 0.000 0.744 0.256 0.000
#> SRR957950 1 0.3873 0.6685 0.772 0.000 0.000 0.228
#> SRR957951 3 0.3486 0.6646 0.000 0.188 0.812 0.000
#> SRR957952 3 0.0000 0.7742 0.000 0.000 1.000 0.000
#> SRR957953 4 0.3311 0.8218 0.172 0.000 0.000 0.828
#> SRR957954 4 0.4977 0.2101 0.460 0.000 0.000 0.540
#> SRR957956 4 0.4830 0.4386 0.392 0.000 0.000 0.608
#> SRR957957 4 0.1940 0.6757 0.000 0.076 0.000 0.924
#> SRR957958 4 0.3311 0.8218 0.172 0.000 0.000 0.828
#> SRR957959 3 0.0000 0.7742 0.000 0.000 1.000 0.000
#> SRR957960 2 0.1302 0.8393 0.000 0.956 0.000 0.044
#> SRR957961 3 0.1716 0.7579 0.000 0.064 0.936 0.000
#> SRR957962 4 0.3444 0.8142 0.184 0.000 0.000 0.816
#> SRR957963 4 0.3726 0.7930 0.212 0.000 0.000 0.788
#> SRR957964 1 0.2214 0.7065 0.928 0.000 0.044 0.028
#> SRR957965 2 0.2011 0.8362 0.000 0.920 0.000 0.080
#> SRR957966 1 0.4543 0.5100 0.676 0.000 0.000 0.324
#> SRR957967 4 0.3444 0.8142 0.184 0.000 0.000 0.816
#> SRR957968 4 0.3311 0.8218 0.172 0.000 0.000 0.828
#> SRR957969 1 0.4564 0.2194 0.672 0.000 0.000 0.328
#> SRR957970 2 0.1118 0.8394 0.000 0.964 0.000 0.036
#> SRR957971 3 0.4741 0.7379 0.228 0.000 0.744 0.028
#> SRR957972 3 0.3873 0.7453 0.228 0.000 0.772 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.0794 0.892 0.972 0.000 0.000 0.028 0.000
#> SRR957915 5 0.4262 0.464 0.000 0.440 0.000 0.000 0.560
#> SRR957916 5 0.1041 0.769 0.000 0.000 0.032 0.004 0.964
#> SRR957884 4 0.0162 0.925 0.000 0.004 0.000 0.996 0.000
#> SRR957885 3 0.0912 0.857 0.016 0.000 0.972 0.012 0.000
#> SRR957886 2 0.4306 -0.312 0.000 0.508 0.000 0.000 0.492
#> SRR957887 3 0.1018 0.855 0.016 0.000 0.968 0.016 0.000
#> SRR957888 1 0.1341 0.888 0.944 0.000 0.000 0.056 0.000
#> SRR957889 1 0.2732 0.801 0.840 0.000 0.160 0.000 0.000
#> SRR957890 1 0.0290 0.891 0.992 0.000 0.008 0.000 0.000
#> SRR957891 5 0.0771 0.783 0.000 0.004 0.020 0.000 0.976
#> SRR957893 1 0.1478 0.885 0.936 0.000 0.000 0.064 0.000
#> SRR957892 1 0.2732 0.815 0.840 0.000 0.000 0.160 0.000
#> SRR957894 2 0.0510 0.847 0.000 0.984 0.000 0.000 0.016
#> SRR957895 4 0.0609 0.918 0.000 0.020 0.000 0.980 0.000
#> SRR957896 5 0.1956 0.801 0.008 0.076 0.000 0.000 0.916
#> SRR957897 4 0.1341 0.891 0.000 0.056 0.000 0.944 0.000
#> SRR957898 1 0.1197 0.884 0.952 0.000 0.048 0.000 0.000
#> SRR957899 5 0.1331 0.798 0.000 0.040 0.008 0.000 0.952
#> SRR957900 5 0.1041 0.769 0.000 0.000 0.032 0.004 0.964
#> SRR957901 5 0.1908 0.801 0.000 0.092 0.000 0.000 0.908
#> SRR957902 5 0.2648 0.788 0.000 0.152 0.000 0.000 0.848
#> SRR957903 3 0.0671 0.860 0.016 0.000 0.980 0.004 0.000
#> SRR957904 3 0.0807 0.861 0.012 0.000 0.976 0.000 0.012
#> SRR957905 4 0.0162 0.927 0.004 0.000 0.000 0.996 0.000
#> SRR957906 2 0.4987 0.232 0.000 0.616 0.044 0.000 0.340
#> SRR957907 5 0.3966 0.639 0.000 0.336 0.000 0.000 0.664
#> SRR957908 2 0.0162 0.847 0.000 0.996 0.000 0.004 0.000
#> SRR957909 1 0.1410 0.887 0.940 0.000 0.000 0.060 0.000
#> SRR957910 5 0.2648 0.788 0.000 0.152 0.000 0.000 0.848
#> SRR957911 1 0.1121 0.891 0.956 0.000 0.000 0.044 0.000
#> SRR957912 1 0.4528 0.695 0.756 0.000 0.080 0.004 0.160
#> SRR957913 3 0.0671 0.860 0.016 0.000 0.980 0.004 0.000
#> SRR957917 3 0.3875 0.796 0.012 0.000 0.756 0.004 0.228
#> SRR957918 2 0.1608 0.811 0.000 0.928 0.000 0.000 0.072
#> SRR957920 3 0.3242 0.806 0.000 0.000 0.784 0.000 0.216
#> SRR957919 2 0.0000 0.848 0.000 1.000 0.000 0.000 0.000
#> SRR957921 3 0.4138 0.626 0.000 0.000 0.616 0.000 0.384
#> SRR957922 5 0.0833 0.782 0.004 0.000 0.016 0.004 0.976
#> SRR957924 1 0.2424 0.843 0.868 0.000 0.000 0.132 0.000
#> SRR957923 2 0.1331 0.824 0.000 0.952 0.000 0.040 0.008
#> SRR957925 2 0.1331 0.834 0.008 0.952 0.000 0.000 0.040
#> SRR957926 1 0.0451 0.892 0.988 0.000 0.008 0.004 0.000
#> SRR957927 2 0.0162 0.847 0.000 0.996 0.000 0.004 0.000
#> SRR957928 1 0.1717 0.872 0.936 0.000 0.052 0.004 0.008
#> SRR957929 1 0.0865 0.883 0.972 0.000 0.000 0.004 0.024
#> SRR957930 5 0.2605 0.790 0.000 0.148 0.000 0.000 0.852
#> SRR957931 5 0.0510 0.783 0.000 0.000 0.016 0.000 0.984
#> SRR957932 3 0.1331 0.844 0.040 0.000 0.952 0.008 0.000
#> SRR957933 1 0.0566 0.892 0.984 0.000 0.012 0.004 0.000
#> SRR957934 5 0.3783 0.714 0.008 0.252 0.000 0.000 0.740
#> SRR957935 5 0.4717 0.569 0.012 0.356 0.004 0.004 0.624
#> SRR957936 2 0.0000 0.848 0.000 1.000 0.000 0.000 0.000
#> SRR957937 5 0.3837 0.672 0.000 0.308 0.000 0.000 0.692
#> SRR957938 2 0.0794 0.843 0.000 0.972 0.000 0.000 0.028
#> SRR957939 2 0.4256 0.180 0.000 0.564 0.000 0.436 0.000
#> SRR957941 5 0.0867 0.790 0.008 0.008 0.008 0.000 0.976
#> SRR957940 1 0.5263 0.402 0.576 0.000 0.056 0.368 0.000
#> SRR957942 2 0.0510 0.845 0.000 0.984 0.000 0.000 0.016
#> SRR957943 2 0.0162 0.847 0.000 0.996 0.000 0.004 0.000
#> SRR957944 2 0.0510 0.847 0.000 0.984 0.000 0.000 0.016
#> SRR957945 3 0.0671 0.860 0.016 0.000 0.980 0.004 0.000
#> SRR957946 1 0.0290 0.891 0.992 0.000 0.008 0.000 0.000
#> SRR957947 1 0.0451 0.892 0.988 0.000 0.008 0.004 0.000
#> SRR957948 5 0.4147 0.656 0.008 0.316 0.000 0.000 0.676
#> SRR957949 5 0.1569 0.800 0.008 0.044 0.000 0.004 0.944
#> SRR957950 1 0.1671 0.880 0.924 0.000 0.000 0.076 0.000
#> SRR957951 5 0.0703 0.777 0.000 0.000 0.024 0.000 0.976
#> SRR957952 3 0.3790 0.786 0.004 0.000 0.744 0.004 0.248
#> SRR957953 4 0.0162 0.927 0.004 0.000 0.000 0.996 0.000
#> SRR957954 4 0.4201 0.728 0.204 0.000 0.044 0.752 0.000
#> SRR957956 4 0.4066 0.751 0.188 0.000 0.044 0.768 0.000
#> SRR957957 2 0.3796 0.478 0.000 0.700 0.000 0.300 0.000
#> SRR957958 4 0.0162 0.927 0.004 0.000 0.000 0.996 0.000
#> SRR957959 3 0.3586 0.778 0.000 0.000 0.736 0.000 0.264
#> SRR957960 5 0.4504 0.475 0.008 0.428 0.000 0.000 0.564
#> SRR957961 3 0.3752 0.752 0.000 0.000 0.708 0.000 0.292
#> SRR957962 4 0.0290 0.927 0.008 0.000 0.000 0.992 0.000
#> SRR957963 4 0.0703 0.920 0.024 0.000 0.000 0.976 0.000
#> SRR957964 1 0.4040 0.690 0.724 0.000 0.260 0.016 0.000
#> SRR957965 2 0.1792 0.794 0.000 0.916 0.000 0.000 0.084
#> SRR957966 1 0.3661 0.685 0.724 0.000 0.000 0.276 0.000
#> SRR957967 4 0.0290 0.927 0.008 0.000 0.000 0.992 0.000
#> SRR957968 4 0.0865 0.917 0.004 0.000 0.024 0.972 0.000
#> SRR957969 4 0.4867 0.715 0.104 0.000 0.180 0.716 0.000
#> SRR957970 5 0.4497 0.484 0.008 0.424 0.000 0.000 0.568
#> SRR957971 3 0.0671 0.860 0.016 0.000 0.980 0.004 0.000
#> SRR957972 3 0.1106 0.860 0.012 0.000 0.964 0.000 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.1802 0.8456 0.916 0.000 0.000 0.012 0.000 0.072
#> SRR957915 5 0.3319 0.6969 0.000 0.164 0.000 0.000 0.800 0.036
#> SRR957916 6 0.3420 0.5611 0.000 0.000 0.012 0.000 0.240 0.748
#> SRR957884 4 0.0000 0.8554 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957885 3 0.0363 0.8248 0.000 0.000 0.988 0.012 0.000 0.000
#> SRR957886 5 0.3489 0.5662 0.000 0.288 0.000 0.000 0.708 0.004
#> SRR957887 3 0.0363 0.8248 0.000 0.000 0.988 0.012 0.000 0.000
#> SRR957888 1 0.2499 0.8400 0.880 0.000 0.000 0.048 0.000 0.072
#> SRR957889 1 0.4461 0.6352 0.704 0.000 0.192 0.000 0.000 0.104
#> SRR957890 1 0.1349 0.8370 0.940 0.000 0.004 0.000 0.000 0.056
#> SRR957891 5 0.3819 0.1520 0.000 0.000 0.004 0.000 0.624 0.372
#> SRR957893 1 0.2499 0.8400 0.880 0.000 0.000 0.048 0.000 0.072
#> SRR957892 1 0.3315 0.8040 0.820 0.000 0.000 0.104 0.000 0.076
#> SRR957894 2 0.3290 0.7066 0.004 0.820 0.000 0.000 0.132 0.044
#> SRR957895 4 0.2466 0.8031 0.008 0.008 0.000 0.872 0.000 0.112
#> SRR957896 5 0.0790 0.7265 0.000 0.000 0.000 0.000 0.968 0.032
#> SRR957897 4 0.4319 0.3624 0.000 0.348 0.000 0.620 0.000 0.032
#> SRR957898 1 0.1984 0.8308 0.912 0.000 0.056 0.000 0.000 0.032
#> SRR957899 5 0.1644 0.6944 0.000 0.004 0.000 0.000 0.920 0.076
#> SRR957900 6 0.3564 0.5481 0.000 0.000 0.012 0.000 0.264 0.724
#> SRR957901 5 0.1462 0.7077 0.000 0.008 0.000 0.000 0.936 0.056
#> SRR957902 5 0.2331 0.7495 0.000 0.080 0.000 0.000 0.888 0.032
#> SRR957903 3 0.0000 0.8294 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957904 3 0.1327 0.7788 0.000 0.000 0.936 0.000 0.000 0.064
#> SRR957905 4 0.0000 0.8554 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957906 2 0.5971 0.2552 0.000 0.544 0.048 0.000 0.308 0.100
#> SRR957907 5 0.2278 0.7334 0.000 0.128 0.000 0.000 0.868 0.004
#> SRR957908 2 0.0146 0.7806 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957909 1 0.2499 0.8400 0.880 0.000 0.000 0.048 0.000 0.072
#> SRR957910 5 0.2201 0.7506 0.000 0.076 0.000 0.000 0.896 0.028
#> SRR957911 1 0.0790 0.8498 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR957912 6 0.4550 -0.1001 0.448 0.000 0.020 0.000 0.008 0.524
#> SRR957913 3 0.0000 0.8294 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957917 6 0.4505 0.4578 0.056 0.000 0.272 0.000 0.004 0.668
#> SRR957918 5 0.4701 0.1927 0.004 0.396 0.000 0.000 0.560 0.040
#> SRR957920 6 0.4768 0.3968 0.000 0.000 0.416 0.000 0.052 0.532
#> SRR957919 2 0.0146 0.7806 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957921 6 0.5319 0.5314 0.000 0.000 0.296 0.000 0.136 0.568
#> SRR957922 6 0.3448 0.4416 0.004 0.000 0.000 0.000 0.280 0.716
#> SRR957924 1 0.3221 0.8138 0.828 0.000 0.000 0.096 0.000 0.076
#> SRR957923 2 0.1988 0.7609 0.004 0.920 0.000 0.004 0.024 0.048
#> SRR957925 2 0.5076 0.0257 0.004 0.476 0.000 0.000 0.456 0.064
#> SRR957926 1 0.1349 0.8370 0.940 0.000 0.004 0.000 0.000 0.056
#> SRR957927 2 0.0146 0.7806 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957928 1 0.4166 0.5268 0.648 0.000 0.028 0.000 0.000 0.324
#> SRR957929 1 0.2848 0.7713 0.816 0.000 0.000 0.000 0.008 0.176
#> SRR957930 5 0.2221 0.7500 0.000 0.072 0.000 0.000 0.896 0.032
#> SRR957931 6 0.3789 0.2978 0.000 0.000 0.000 0.000 0.416 0.584
#> SRR957932 3 0.1245 0.7957 0.032 0.000 0.952 0.000 0.000 0.016
#> SRR957933 1 0.1225 0.8412 0.952 0.000 0.012 0.000 0.000 0.036
#> SRR957934 5 0.3765 0.6821 0.004 0.060 0.000 0.000 0.780 0.156
#> SRR957935 5 0.5904 0.1878 0.004 0.176 0.000 0.000 0.432 0.388
#> SRR957936 2 0.0146 0.7806 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957937 5 0.2750 0.7358 0.000 0.136 0.000 0.000 0.844 0.020
#> SRR957938 2 0.3281 0.6532 0.004 0.784 0.000 0.000 0.200 0.012
#> SRR957939 2 0.5560 0.1278 0.012 0.504 0.000 0.384 0.000 0.100
#> SRR957941 5 0.4088 0.1865 0.004 0.004 0.000 0.000 0.556 0.436
#> SRR957940 1 0.5924 0.2336 0.508 0.000 0.116 0.348 0.000 0.028
#> SRR957942 2 0.2416 0.6866 0.000 0.844 0.000 0.000 0.156 0.000
#> SRR957943 2 0.0146 0.7806 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957944 2 0.0692 0.7777 0.004 0.976 0.000 0.000 0.020 0.000
#> SRR957945 3 0.0000 0.8294 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957946 1 0.1349 0.8370 0.940 0.000 0.004 0.000 0.000 0.056
#> SRR957947 1 0.1349 0.8370 0.940 0.000 0.004 0.000 0.000 0.056
#> SRR957948 5 0.2586 0.7324 0.000 0.100 0.000 0.000 0.868 0.032
#> SRR957949 5 0.2994 0.6267 0.004 0.000 0.000 0.000 0.788 0.208
#> SRR957950 1 0.2618 0.8369 0.872 0.000 0.000 0.052 0.000 0.076
#> SRR957951 5 0.4037 0.1041 0.000 0.000 0.012 0.000 0.608 0.380
#> SRR957952 6 0.4399 0.4769 0.004 0.000 0.352 0.000 0.028 0.616
#> SRR957953 4 0.0000 0.8554 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957954 4 0.4704 0.6185 0.236 0.000 0.100 0.664 0.000 0.000
#> SRR957956 4 0.4650 0.6330 0.220 0.000 0.104 0.676 0.000 0.000
#> SRR957957 2 0.2473 0.6679 0.000 0.856 0.000 0.136 0.000 0.008
#> SRR957958 4 0.0000 0.8554 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957959 6 0.5011 0.4718 0.000 0.000 0.368 0.000 0.080 0.552
#> SRR957960 5 0.3608 0.6973 0.004 0.128 0.000 0.000 0.800 0.068
#> SRR957961 3 0.5818 -0.3718 0.000 0.000 0.424 0.000 0.184 0.392
#> SRR957962 4 0.0547 0.8543 0.020 0.000 0.000 0.980 0.000 0.000
#> SRR957963 4 0.2451 0.8144 0.056 0.000 0.000 0.884 0.000 0.060
#> SRR957964 3 0.4806 0.3320 0.324 0.000 0.620 0.024 0.000 0.032
#> SRR957965 2 0.4067 0.1491 0.000 0.548 0.000 0.000 0.444 0.008
#> SRR957966 1 0.3842 0.7590 0.768 0.000 0.000 0.156 0.000 0.076
#> SRR957967 4 0.0458 0.8550 0.016 0.000 0.000 0.984 0.000 0.000
#> SRR957968 4 0.1007 0.8383 0.000 0.000 0.044 0.956 0.000 0.000
#> SRR957969 4 0.4249 0.6106 0.052 0.000 0.260 0.688 0.000 0.000
#> SRR957970 5 0.3593 0.6963 0.004 0.132 0.000 0.000 0.800 0.064
#> SRR957971 3 0.0000 0.8294 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957972 3 0.2346 0.7022 0.008 0.000 0.868 0.000 0.000 0.124
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.940 0.976 0.5009 0.498 0.498
#> 3 3 0.778 0.798 0.918 0.2624 0.800 0.626
#> 4 4 0.839 0.899 0.906 0.1284 0.872 0.677
#> 5 5 0.770 0.796 0.849 0.0810 0.941 0.805
#> 6 6 0.832 0.789 0.901 0.0604 0.926 0.707
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
#> SRR957914 1 0.0000 0.970 1.000 0.000
#> SRR957915 2 0.0000 0.978 0.000 1.000
#> SRR957916 2 0.0000 0.978 0.000 1.000
#> SRR957884 2 0.0376 0.975 0.004 0.996
#> SRR957885 1 0.0000 0.970 1.000 0.000
#> SRR957886 2 0.0000 0.978 0.000 1.000
#> SRR957887 1 0.6247 0.806 0.844 0.156
#> SRR957888 1 0.0000 0.970 1.000 0.000
#> SRR957889 1 0.0000 0.970 1.000 0.000
#> SRR957890 1 0.0000 0.970 1.000 0.000
#> SRR957891 2 0.0000 0.978 0.000 1.000
#> SRR957893 1 0.0000 0.970 1.000 0.000
#> SRR957892 1 0.0000 0.970 1.000 0.000
#> SRR957894 2 0.0000 0.978 0.000 1.000
#> SRR957895 2 0.0376 0.975 0.004 0.996
#> SRR957896 2 0.0000 0.978 0.000 1.000
#> SRR957897 2 0.0376 0.975 0.004 0.996
#> SRR957898 1 0.0000 0.970 1.000 0.000
#> SRR957899 2 0.0000 0.978 0.000 1.000
#> SRR957900 2 0.0000 0.978 0.000 1.000
#> SRR957901 2 0.0000 0.978 0.000 1.000
#> SRR957902 2 0.0000 0.978 0.000 1.000
#> SRR957903 1 0.0000 0.970 1.000 0.000
#> SRR957904 1 0.0376 0.967 0.996 0.004
#> SRR957905 1 0.9358 0.467 0.648 0.352
#> SRR957906 2 0.0000 0.978 0.000 1.000
#> SRR957907 2 0.0000 0.978 0.000 1.000
#> SRR957908 2 0.0000 0.978 0.000 1.000
#> SRR957909 1 0.0000 0.970 1.000 0.000
#> SRR957910 2 0.0000 0.978 0.000 1.000
#> SRR957911 1 0.0000 0.970 1.000 0.000
#> SRR957912 1 0.0376 0.967 0.996 0.004
#> SRR957913 1 0.0000 0.970 1.000 0.000
#> SRR957917 1 0.0376 0.967 0.996 0.004
#> SRR957918 2 0.0000 0.978 0.000 1.000
#> SRR957920 2 0.9129 0.502 0.328 0.672
#> SRR957919 2 0.0000 0.978 0.000 1.000
#> SRR957921 2 0.0000 0.978 0.000 1.000
#> SRR957922 2 0.0000 0.978 0.000 1.000
#> SRR957924 1 0.0000 0.970 1.000 0.000
#> SRR957923 2 0.0000 0.978 0.000 1.000
#> SRR957925 2 0.0000 0.978 0.000 1.000
#> SRR957926 1 0.0000 0.970 1.000 0.000
#> SRR957927 2 0.0000 0.978 0.000 1.000
#> SRR957928 1 0.0000 0.970 1.000 0.000
#> SRR957929 1 0.0376 0.967 0.996 0.004
#> SRR957930 2 0.0000 0.978 0.000 1.000
#> SRR957931 2 0.0000 0.978 0.000 1.000
#> SRR957932 1 0.0000 0.970 1.000 0.000
#> SRR957933 1 0.0000 0.970 1.000 0.000
#> SRR957934 2 0.0000 0.978 0.000 1.000
#> SRR957935 2 0.0672 0.972 0.008 0.992
#> SRR957936 2 0.0000 0.978 0.000 1.000
#> SRR957937 2 0.0000 0.978 0.000 1.000
#> SRR957938 2 0.0000 0.978 0.000 1.000
#> SRR957939 2 0.5842 0.824 0.140 0.860
#> SRR957941 2 0.0000 0.978 0.000 1.000
#> SRR957940 1 0.0000 0.970 1.000 0.000
#> SRR957942 2 0.0000 0.978 0.000 1.000
#> SRR957943 2 0.0000 0.978 0.000 1.000
#> SRR957944 2 0.0000 0.978 0.000 1.000
#> SRR957945 1 0.0000 0.970 1.000 0.000
#> SRR957946 1 0.0000 0.970 1.000 0.000
#> SRR957947 1 0.0000 0.970 1.000 0.000
#> SRR957948 2 0.0000 0.978 0.000 1.000
#> SRR957949 2 0.0000 0.978 0.000 1.000
#> SRR957950 1 0.0000 0.970 1.000 0.000
#> SRR957951 2 0.0000 0.978 0.000 1.000
#> SRR957952 2 0.2778 0.933 0.048 0.952
#> SRR957953 1 0.7219 0.746 0.800 0.200
#> SRR957954 1 0.0000 0.970 1.000 0.000
#> SRR957956 1 0.0000 0.970 1.000 0.000
#> SRR957957 2 0.0376 0.975 0.004 0.996
#> SRR957958 2 0.9850 0.218 0.428 0.572
#> SRR957959 2 0.0000 0.978 0.000 1.000
#> SRR957960 2 0.0000 0.978 0.000 1.000
#> SRR957961 2 0.0000 0.978 0.000 1.000
#> SRR957962 1 0.0000 0.970 1.000 0.000
#> SRR957963 1 0.0000 0.970 1.000 0.000
#> SRR957964 1 0.0000 0.970 1.000 0.000
#> SRR957965 2 0.0000 0.978 0.000 1.000
#> SRR957966 1 0.0000 0.970 1.000 0.000
#> SRR957967 1 0.0000 0.970 1.000 0.000
#> SRR957968 1 0.9732 0.336 0.596 0.404
#> SRR957969 1 0.0000 0.970 1.000 0.000
#> SRR957970 2 0.0000 0.978 0.000 1.000
#> SRR957971 1 0.0000 0.970 1.000 0.000
#> SRR957972 1 0.0376 0.967 0.996 0.004
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957916 2 0.2261 0.8966 0.000 0.932 0.068
#> SRR957884 2 0.5497 0.5739 0.292 0.708 0.000
#> SRR957885 3 0.2261 0.8949 0.068 0.000 0.932
#> SRR957886 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957887 3 0.2261 0.8949 0.068 0.000 0.932
#> SRR957888 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957889 1 0.6274 0.1014 0.544 0.000 0.456
#> SRR957890 1 0.4178 0.6804 0.828 0.000 0.172
#> SRR957891 2 0.2261 0.8966 0.000 0.932 0.068
#> SRR957893 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957895 2 0.6215 0.2433 0.428 0.572 0.000
#> SRR957896 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957897 2 0.6305 0.0757 0.484 0.516 0.000
#> SRR957898 1 0.3340 0.7532 0.880 0.000 0.120
#> SRR957899 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957900 2 0.2261 0.8966 0.000 0.932 0.068
#> SRR957901 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957903 3 0.2066 0.8988 0.060 0.000 0.940
#> SRR957904 3 0.0000 0.9144 0.000 0.000 1.000
#> SRR957905 1 0.7085 0.3847 0.612 0.356 0.032
#> SRR957906 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957907 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957908 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957912 2 0.7577 0.3907 0.324 0.616 0.060
#> SRR957913 3 0.0000 0.9144 0.000 0.000 1.000
#> SRR957917 3 0.5559 0.7257 0.192 0.028 0.780
#> SRR957918 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957920 3 0.1289 0.9009 0.000 0.032 0.968
#> SRR957919 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957921 3 0.1289 0.9009 0.000 0.032 0.968
#> SRR957922 2 0.2261 0.8966 0.000 0.932 0.068
#> SRR957924 1 0.0747 0.8266 0.984 0.016 0.000
#> SRR957923 2 0.5621 0.5309 0.308 0.692 0.000
#> SRR957925 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957926 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957927 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957928 1 0.6489 0.0609 0.540 0.004 0.456
#> SRR957929 1 0.0747 0.8261 0.984 0.016 0.000
#> SRR957930 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957931 2 0.1964 0.9042 0.000 0.944 0.056
#> SRR957932 3 0.2261 0.8949 0.068 0.000 0.932
#> SRR957933 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957934 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957935 2 0.0237 0.9333 0.004 0.996 0.000
#> SRR957936 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957939 1 0.5591 0.4961 0.696 0.304 0.000
#> SRR957941 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957940 1 0.5529 0.5433 0.704 0.000 0.296
#> SRR957942 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.9144 0.000 0.000 1.000
#> SRR957946 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957947 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957948 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957951 2 0.2261 0.8966 0.000 0.932 0.068
#> SRR957952 3 0.1163 0.9041 0.000 0.028 0.972
#> SRR957953 1 0.5921 0.6243 0.756 0.212 0.032
#> SRR957954 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957956 1 0.5216 0.5932 0.740 0.000 0.260
#> SRR957957 2 0.3482 0.8191 0.128 0.872 0.000
#> SRR957958 1 0.7289 0.0338 0.504 0.468 0.028
#> SRR957959 3 0.1163 0.9041 0.000 0.028 0.972
#> SRR957960 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957961 2 0.2261 0.8966 0.000 0.932 0.068
#> SRR957962 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957963 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957964 3 0.5835 0.4695 0.340 0.000 0.660
#> SRR957965 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.8350 1.000 0.000 0.000
#> SRR957967 1 0.1163 0.8210 0.972 0.000 0.028
#> SRR957968 3 0.3192 0.8575 0.112 0.000 0.888
#> SRR957969 1 0.6225 0.1660 0.568 0.000 0.432
#> SRR957970 2 0.0000 0.9358 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.9144 0.000 0.000 1.000
#> SRR957972 3 0.0000 0.9144 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0188 0.945 0.996 0.000 0.000 0.004
#> SRR957915 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957916 2 0.2469 0.893 0.000 0.892 0.108 0.000
#> SRR957884 4 0.4857 0.864 0.076 0.068 0.040 0.816
#> SRR957885 3 0.2675 0.909 0.008 0.000 0.892 0.100
#> SRR957886 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957887 3 0.2675 0.909 0.008 0.000 0.892 0.100
#> SRR957888 1 0.0188 0.945 0.996 0.000 0.000 0.004
#> SRR957889 3 0.3421 0.896 0.044 0.000 0.868 0.088
#> SRR957890 1 0.5383 0.080 0.536 0.000 0.452 0.012
#> SRR957891 2 0.2469 0.893 0.000 0.892 0.108 0.000
#> SRR957893 1 0.0188 0.945 0.996 0.000 0.000 0.004
#> SRR957892 1 0.0188 0.945 0.996 0.000 0.000 0.004
#> SRR957894 2 0.1211 0.941 0.000 0.960 0.000 0.040
#> SRR957895 4 0.4257 0.857 0.140 0.048 0.000 0.812
#> SRR957896 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957897 4 0.3311 0.855 0.172 0.000 0.000 0.828
#> SRR957898 1 0.4104 0.753 0.832 0.000 0.080 0.088
#> SRR957899 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957900 2 0.2469 0.893 0.000 0.892 0.108 0.000
#> SRR957901 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957902 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957903 3 0.2675 0.909 0.008 0.000 0.892 0.100
#> SRR957904 3 0.0188 0.905 0.000 0.000 0.996 0.004
#> SRR957905 4 0.2739 0.880 0.036 0.000 0.060 0.904
#> SRR957906 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957907 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957908 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957909 1 0.0188 0.945 0.996 0.000 0.000 0.004
#> SRR957910 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957911 1 0.0000 0.944 1.000 0.000 0.000 0.000
#> SRR957912 2 0.3161 0.872 0.012 0.864 0.124 0.000
#> SRR957913 3 0.2149 0.914 0.000 0.000 0.912 0.088
#> SRR957917 3 0.1637 0.876 0.000 0.060 0.940 0.000
#> SRR957918 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957920 3 0.1854 0.880 0.000 0.012 0.940 0.048
#> SRR957919 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957921 3 0.2281 0.843 0.000 0.096 0.904 0.000
#> SRR957922 2 0.2469 0.893 0.000 0.892 0.108 0.000
#> SRR957924 4 0.3837 0.828 0.224 0.000 0.000 0.776
#> SRR957923 2 0.2915 0.909 0.028 0.892 0.000 0.080
#> SRR957925 2 0.0817 0.945 0.000 0.976 0.000 0.024
#> SRR957926 1 0.0000 0.944 1.000 0.000 0.000 0.000
#> SRR957927 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957928 3 0.2011 0.872 0.080 0.000 0.920 0.000
#> SRR957929 1 0.0000 0.944 1.000 0.000 0.000 0.000
#> SRR957930 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957931 2 0.2081 0.909 0.000 0.916 0.084 0.000
#> SRR957932 3 0.2675 0.909 0.008 0.000 0.892 0.100
#> SRR957933 1 0.0000 0.944 1.000 0.000 0.000 0.000
#> SRR957934 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957935 2 0.2401 0.921 0.004 0.904 0.000 0.092
#> SRR957936 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957937 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957938 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957939 4 0.4008 0.798 0.244 0.000 0.000 0.756
#> SRR957941 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957940 4 0.3081 0.883 0.048 0.000 0.064 0.888
#> SRR957942 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957943 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957944 2 0.2281 0.921 0.000 0.904 0.000 0.096
#> SRR957945 3 0.2149 0.914 0.000 0.000 0.912 0.088
#> SRR957946 1 0.0188 0.942 0.996 0.000 0.000 0.004
#> SRR957947 1 0.0000 0.944 1.000 0.000 0.000 0.000
#> SRR957948 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957949 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957950 1 0.0188 0.945 0.996 0.000 0.000 0.004
#> SRR957951 2 0.2469 0.893 0.000 0.892 0.108 0.000
#> SRR957952 3 0.1637 0.876 0.000 0.060 0.940 0.000
#> SRR957953 4 0.2739 0.880 0.036 0.000 0.060 0.904
#> SRR957954 4 0.4406 0.733 0.300 0.000 0.000 0.700
#> SRR957956 4 0.3333 0.890 0.088 0.000 0.040 0.872
#> SRR957957 4 0.2489 0.805 0.020 0.068 0.000 0.912
#> SRR957958 4 0.3128 0.891 0.076 0.000 0.040 0.884
#> SRR957959 3 0.1792 0.870 0.000 0.068 0.932 0.000
#> SRR957960 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957961 2 0.2469 0.893 0.000 0.892 0.108 0.000
#> SRR957962 4 0.3444 0.851 0.184 0.000 0.000 0.816
#> SRR957963 1 0.0469 0.938 0.988 0.000 0.000 0.012
#> SRR957964 3 0.2924 0.905 0.016 0.000 0.884 0.100
#> SRR957965 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957966 1 0.0336 0.942 0.992 0.000 0.000 0.008
#> SRR957967 4 0.3128 0.891 0.076 0.000 0.040 0.884
#> SRR957968 4 0.2480 0.854 0.008 0.000 0.088 0.904
#> SRR957969 4 0.2546 0.848 0.008 0.000 0.092 0.900
#> SRR957970 2 0.0000 0.950 0.000 1.000 0.000 0.000
#> SRR957971 3 0.2149 0.914 0.000 0.000 0.912 0.088
#> SRR957972 3 0.0000 0.904 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
#> SRR957914 1 0.0404 0.9207 0.988 0.000 0.000 0.012 0.000
#> SRR957915 2 0.0162 0.8415 0.000 0.996 0.000 0.004 0.000
#> SRR957916 5 0.3143 0.6992 0.000 0.204 0.000 0.000 0.796
#> SRR957884 4 0.2228 0.9031 0.048 0.000 0.040 0.912 0.000
#> SRR957885 3 0.0000 0.9375 0.000 0.000 1.000 0.000 0.000
#> SRR957886 2 0.1965 0.8360 0.000 0.904 0.000 0.000 0.096
#> SRR957887 3 0.0000 0.9375 0.000 0.000 1.000 0.000 0.000
#> SRR957888 1 0.0404 0.9207 0.988 0.000 0.000 0.012 0.000
#> SRR957889 5 0.4625 0.5972 0.020 0.000 0.324 0.004 0.652
#> SRR957890 5 0.5416 0.5365 0.248 0.000 0.096 0.004 0.652
#> SRR957891 2 0.2561 0.7276 0.000 0.856 0.000 0.000 0.144
#> SRR957893 1 0.0404 0.9207 0.988 0.000 0.000 0.012 0.000
#> SRR957892 1 0.0404 0.9207 0.988 0.000 0.000 0.012 0.000
#> SRR957894 2 0.4168 0.7926 0.000 0.756 0.000 0.044 0.200
#> SRR957895 4 0.2011 0.8921 0.088 0.004 0.000 0.908 0.000
#> SRR957896 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957897 4 0.1764 0.8923 0.064 0.000 0.000 0.928 0.008
#> SRR957898 1 0.3491 0.6732 0.768 0.000 0.228 0.004 0.000
#> SRR957899 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957900 2 0.4262 0.0206 0.000 0.560 0.000 0.000 0.440
#> SRR957901 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957902 2 0.0290 0.8406 0.000 0.992 0.000 0.000 0.008
#> SRR957903 3 0.0000 0.9375 0.000 0.000 1.000 0.000 0.000
#> SRR957904 3 0.2648 0.7545 0.000 0.000 0.848 0.000 0.152
#> SRR957905 4 0.1851 0.8830 0.000 0.000 0.088 0.912 0.000
#> SRR957906 2 0.4725 0.7769 0.000 0.720 0.000 0.080 0.200
#> SRR957907 2 0.0794 0.8434 0.000 0.972 0.000 0.000 0.028
#> SRR957908 2 0.4810 0.7736 0.000 0.712 0.000 0.084 0.204
#> SRR957909 1 0.0404 0.9207 0.988 0.000 0.000 0.012 0.000
#> SRR957910 2 0.0404 0.8426 0.000 0.988 0.000 0.000 0.012
#> SRR957911 1 0.0162 0.9162 0.996 0.000 0.000 0.004 0.000
#> SRR957912 5 0.4140 0.7249 0.016 0.160 0.028 0.004 0.792
#> SRR957913 3 0.0000 0.9375 0.000 0.000 1.000 0.000 0.000
#> SRR957917 5 0.3143 0.7377 0.000 0.000 0.204 0.000 0.796
#> SRR957918 2 0.1410 0.8422 0.000 0.940 0.000 0.000 0.060
#> SRR957920 5 0.3932 0.5975 0.000 0.000 0.328 0.000 0.672
#> SRR957919 2 0.4810 0.7736 0.000 0.712 0.000 0.084 0.204
#> SRR957921 5 0.6627 0.3381 0.000 0.244 0.308 0.000 0.448
#> SRR957922 5 0.3242 0.6934 0.000 0.216 0.000 0.000 0.784
#> SRR957924 4 0.2605 0.8631 0.148 0.000 0.000 0.852 0.000
#> SRR957923 2 0.5350 0.7639 0.028 0.700 0.000 0.072 0.200
#> SRR957925 2 0.3011 0.8183 0.000 0.844 0.000 0.016 0.140
#> SRR957926 1 0.4310 0.3304 0.604 0.000 0.000 0.004 0.392
#> SRR957927 2 0.4926 0.7708 0.000 0.716 0.000 0.132 0.152
#> SRR957928 5 0.3706 0.7425 0.020 0.000 0.184 0.004 0.792
#> SRR957929 1 0.3814 0.5879 0.720 0.000 0.000 0.004 0.276
#> SRR957930 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957931 2 0.2230 0.7568 0.000 0.884 0.000 0.000 0.116
#> SRR957932 3 0.0000 0.9375 0.000 0.000 1.000 0.000 0.000
#> SRR957933 1 0.0162 0.9162 0.996 0.000 0.000 0.004 0.000
#> SRR957934 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957935 2 0.4367 0.6027 0.008 0.620 0.000 0.000 0.372
#> SRR957936 2 0.4810 0.7736 0.000 0.712 0.000 0.084 0.204
#> SRR957937 2 0.1043 0.8421 0.000 0.960 0.000 0.000 0.040
#> SRR957938 2 0.4757 0.7750 0.000 0.716 0.000 0.080 0.204
#> SRR957939 4 0.3661 0.7087 0.276 0.000 0.000 0.724 0.000
#> SRR957941 2 0.3305 0.6467 0.000 0.776 0.000 0.000 0.224
#> SRR957940 4 0.2359 0.8965 0.036 0.000 0.060 0.904 0.000
#> SRR957942 2 0.4757 0.7750 0.000 0.716 0.000 0.080 0.204
#> SRR957943 2 0.4810 0.7736 0.000 0.712 0.000 0.084 0.204
#> SRR957944 2 0.4810 0.7736 0.000 0.712 0.000 0.084 0.204
#> SRR957945 3 0.0000 0.9375 0.000 0.000 1.000 0.000 0.000
#> SRR957946 1 0.0162 0.9162 0.996 0.000 0.000 0.004 0.000
#> SRR957947 1 0.0162 0.9162 0.996 0.000 0.000 0.004 0.000
#> SRR957948 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957949 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957950 1 0.0404 0.9207 0.988 0.000 0.000 0.012 0.000
#> SRR957951 2 0.2561 0.7276 0.000 0.856 0.000 0.000 0.144
#> SRR957952 5 0.3694 0.7513 0.000 0.032 0.172 0.000 0.796
#> SRR957953 4 0.2077 0.8861 0.008 0.000 0.084 0.908 0.000
#> SRR957954 4 0.4184 0.6959 0.284 0.000 0.016 0.700 0.000
#> SRR957956 4 0.2863 0.8969 0.060 0.000 0.064 0.876 0.000
#> SRR957957 4 0.2890 0.7199 0.000 0.004 0.000 0.836 0.160
#> SRR957958 4 0.2228 0.9031 0.048 0.000 0.040 0.912 0.000
#> SRR957959 5 0.3427 0.7470 0.000 0.012 0.192 0.000 0.796
#> SRR957960 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957961 2 0.3489 0.7103 0.000 0.820 0.036 0.000 0.144
#> SRR957962 4 0.1851 0.8921 0.088 0.000 0.000 0.912 0.000
#> SRR957963 1 0.0510 0.9184 0.984 0.000 0.000 0.016 0.000
#> SRR957964 3 0.0566 0.9197 0.012 0.000 0.984 0.004 0.000
#> SRR957965 2 0.1282 0.8419 0.000 0.952 0.000 0.004 0.044
#> SRR957966 1 0.0510 0.9184 0.984 0.000 0.000 0.016 0.000
#> SRR957967 4 0.2228 0.9031 0.048 0.000 0.040 0.912 0.000
#> SRR957968 4 0.1908 0.8806 0.000 0.000 0.092 0.908 0.000
#> SRR957969 4 0.3388 0.7921 0.008 0.000 0.200 0.792 0.000
#> SRR957970 2 0.0000 0.8414 0.000 1.000 0.000 0.000 0.000
#> SRR957971 3 0.0000 0.9375 0.000 0.000 1.000 0.000 0.000
#> SRR957972 3 0.3366 0.6173 0.000 0.000 0.768 0.000 0.232
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957915 5 0.0260 0.8859 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR957916 6 0.0260 0.8254 0.000 0.000 0.000 0.000 0.008 0.992
#> SRR957884 4 0.0547 0.8884 0.020 0.000 0.000 0.980 0.000 0.000
#> SRR957885 3 0.0000 0.9256 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957886 5 0.0508 0.8860 0.000 0.012 0.000 0.004 0.984 0.000
#> SRR957887 3 0.0000 0.9256 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957888 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957889 6 0.2933 0.6453 0.004 0.000 0.200 0.000 0.000 0.796
#> SRR957890 6 0.3607 0.6741 0.092 0.000 0.112 0.000 0.000 0.796
#> SRR957891 5 0.2823 0.7315 0.000 0.000 0.000 0.000 0.796 0.204
#> SRR957893 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957892 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957894 2 0.2573 0.7963 0.000 0.864 0.000 0.024 0.112 0.000
#> SRR957895 4 0.0806 0.8878 0.020 0.008 0.000 0.972 0.000 0.000
#> SRR957896 5 0.0000 0.8871 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957897 4 0.1334 0.8799 0.020 0.032 0.000 0.948 0.000 0.000
#> SRR957898 1 0.3634 0.5484 0.696 0.000 0.296 0.000 0.000 0.008
#> SRR957899 5 0.0000 0.8871 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957900 6 0.3828 0.1443 0.000 0.000 0.000 0.000 0.440 0.560
#> SRR957901 5 0.0000 0.8871 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957902 5 0.0405 0.8870 0.000 0.004 0.000 0.000 0.988 0.008
#> SRR957903 3 0.0000 0.9256 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957904 3 0.2883 0.6846 0.000 0.000 0.788 0.000 0.000 0.212
#> SRR957905 4 0.0790 0.8814 0.000 0.000 0.032 0.968 0.000 0.000
#> SRR957906 5 0.2912 0.7294 0.000 0.216 0.000 0.000 0.784 0.000
#> SRR957907 5 0.0363 0.8862 0.000 0.012 0.000 0.000 0.988 0.000
#> SRR957908 2 0.0260 0.8354 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR957909 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957910 5 0.0000 0.8871 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.9125 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957912 6 0.0260 0.8249 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR957913 3 0.0000 0.9256 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957917 6 0.0260 0.8267 0.000 0.000 0.008 0.000 0.000 0.992
#> SRR957918 5 0.0891 0.8813 0.000 0.008 0.000 0.024 0.968 0.000
#> SRR957920 6 0.2883 0.6328 0.000 0.000 0.212 0.000 0.000 0.788
#> SRR957919 5 0.3620 0.5185 0.000 0.352 0.000 0.000 0.648 0.000
#> SRR957921 6 0.5319 0.3337 0.000 0.000 0.296 0.000 0.136 0.568
#> SRR957922 6 0.0458 0.8236 0.000 0.000 0.000 0.000 0.016 0.984
#> SRR957924 4 0.2070 0.8473 0.100 0.000 0.000 0.892 0.000 0.008
#> SRR957923 2 0.2322 0.8163 0.008 0.896 0.000 0.024 0.072 0.000
#> SRR957925 5 0.1492 0.8669 0.000 0.036 0.000 0.024 0.940 0.000
#> SRR957926 1 0.3817 0.2663 0.568 0.000 0.000 0.000 0.000 0.432
#> SRR957927 5 0.2679 0.8097 0.000 0.096 0.000 0.040 0.864 0.000
#> SRR957928 6 0.0260 0.8249 0.008 0.000 0.000 0.000 0.000 0.992
#> SRR957929 1 0.3993 0.5429 0.676 0.000 0.000 0.024 0.000 0.300
#> SRR957930 5 0.0000 0.8871 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957931 5 0.2631 0.7574 0.000 0.000 0.000 0.000 0.820 0.180
#> SRR957932 3 0.0000 0.9256 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957933 1 0.0260 0.9092 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR957934 5 0.0632 0.8837 0.000 0.000 0.000 0.024 0.976 0.000
#> SRR957935 5 0.4374 0.5358 0.000 0.016 0.000 0.020 0.656 0.308
#> SRR957936 2 0.0547 0.8384 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR957937 5 0.0000 0.8871 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957938 2 0.3991 -0.0208 0.000 0.524 0.000 0.004 0.472 0.000
#> SRR957939 4 0.6083 0.1914 0.296 0.308 0.000 0.396 0.000 0.000
#> SRR957941 5 0.3531 0.5293 0.000 0.000 0.000 0.000 0.672 0.328
#> SRR957940 4 0.0909 0.8878 0.020 0.000 0.012 0.968 0.000 0.000
#> SRR957942 5 0.2219 0.8003 0.000 0.136 0.000 0.000 0.864 0.000
#> SRR957943 2 0.0260 0.8354 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR957944 2 0.0806 0.8351 0.000 0.972 0.000 0.020 0.008 0.000
#> SRR957945 3 0.0000 0.9256 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957946 1 0.0260 0.9092 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR957947 1 0.0000 0.9125 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957948 5 0.0000 0.8871 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957949 5 0.0146 0.8872 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR957950 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957951 5 0.2823 0.7315 0.000 0.000 0.000 0.000 0.796 0.204
#> SRR957952 6 0.0260 0.8267 0.000 0.000 0.008 0.000 0.000 0.992
#> SRR957953 4 0.0777 0.8849 0.004 0.000 0.024 0.972 0.000 0.000
#> SRR957954 4 0.4173 0.6378 0.272 0.000 0.028 0.692 0.000 0.008
#> SRR957956 4 0.3079 0.8185 0.028 0.000 0.128 0.836 0.000 0.008
#> SRR957957 2 0.0363 0.8265 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR957958 4 0.0692 0.8893 0.020 0.000 0.004 0.976 0.000 0.000
#> SRR957959 6 0.0260 0.8267 0.000 0.000 0.008 0.000 0.000 0.992
#> SRR957960 5 0.0632 0.8837 0.000 0.000 0.000 0.024 0.976 0.000
#> SRR957961 5 0.2823 0.7315 0.000 0.000 0.000 0.000 0.796 0.204
#> SRR957962 4 0.0632 0.8884 0.024 0.000 0.000 0.976 0.000 0.000
#> SRR957963 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957964 3 0.0260 0.9183 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR957965 2 0.3266 0.6673 0.000 0.728 0.000 0.000 0.272 0.000
#> SRR957966 1 0.0260 0.9149 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR957967 4 0.0692 0.8893 0.020 0.000 0.004 0.976 0.000 0.000
#> SRR957968 4 0.1327 0.8702 0.000 0.000 0.064 0.936 0.000 0.000
#> SRR957969 4 0.3426 0.6542 0.000 0.000 0.276 0.720 0.000 0.004
#> SRR957970 5 0.0632 0.8837 0.000 0.000 0.000 0.024 0.976 0.000
#> SRR957971 3 0.0000 0.9256 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957972 3 0.3531 0.4955 0.000 0.000 0.672 0.000 0.000 0.328
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.976 0.936 0.970 0.5011 0.497 0.497
#> 3 3 0.846 0.913 0.948 0.2560 0.797 0.622
#> 4 4 0.625 0.579 0.812 0.0891 0.994 0.984
#> 5 5 0.587 0.509 0.692 0.0958 0.796 0.484
#> 6 6 0.631 0.545 0.741 0.0569 0.848 0.484
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
#> SRR957914 1 0.1414 0.985 0.980 0.020
#> SRR957915 2 0.0000 0.957 0.000 1.000
#> SRR957916 2 0.0938 0.951 0.012 0.988
#> SRR957884 1 0.0376 0.981 0.996 0.004
#> SRR957885 1 0.0000 0.982 1.000 0.000
#> SRR957886 2 0.0000 0.957 0.000 1.000
#> SRR957887 1 0.0000 0.982 1.000 0.000
#> SRR957888 1 0.1414 0.985 0.980 0.020
#> SRR957889 1 0.1414 0.985 0.980 0.020
#> SRR957890 1 0.1414 0.985 0.980 0.020
#> SRR957891 2 0.0000 0.957 0.000 1.000
#> SRR957893 1 0.1414 0.985 0.980 0.020
#> SRR957892 1 0.1414 0.985 0.980 0.020
#> SRR957894 2 0.0000 0.957 0.000 1.000
#> SRR957895 1 0.1633 0.982 0.976 0.024
#> SRR957896 2 0.0000 0.957 0.000 1.000
#> SRR957897 1 0.0376 0.981 0.996 0.004
#> SRR957898 1 0.1414 0.985 0.980 0.020
#> SRR957899 2 0.0000 0.957 0.000 1.000
#> SRR957900 2 0.0672 0.953 0.008 0.992
#> SRR957901 2 0.0000 0.957 0.000 1.000
#> SRR957902 2 0.0000 0.957 0.000 1.000
#> SRR957903 1 0.0000 0.982 1.000 0.000
#> SRR957904 1 0.2043 0.973 0.968 0.032
#> SRR957905 1 0.0000 0.982 1.000 0.000
#> SRR957906 2 0.0376 0.954 0.004 0.996
#> SRR957907 2 0.0000 0.957 0.000 1.000
#> SRR957908 2 0.0376 0.954 0.004 0.996
#> SRR957909 1 0.1414 0.985 0.980 0.020
#> SRR957910 2 0.0000 0.957 0.000 1.000
#> SRR957911 1 0.1414 0.985 0.980 0.020
#> SRR957912 2 0.9661 0.391 0.392 0.608
#> SRR957913 1 0.0000 0.982 1.000 0.000
#> SRR957917 2 0.7219 0.745 0.200 0.800
#> SRR957918 2 0.0000 0.957 0.000 1.000
#> SRR957920 2 0.0938 0.951 0.012 0.988
#> SRR957919 2 0.0000 0.957 0.000 1.000
#> SRR957921 2 0.0938 0.951 0.012 0.988
#> SRR957922 2 0.0938 0.951 0.012 0.988
#> SRR957924 1 0.1414 0.985 0.980 0.020
#> SRR957923 2 0.0938 0.951 0.012 0.988
#> SRR957925 2 0.0000 0.957 0.000 1.000
#> SRR957926 1 0.1414 0.985 0.980 0.020
#> SRR957927 2 0.0000 0.957 0.000 1.000
#> SRR957928 2 0.9970 0.169 0.468 0.532
#> SRR957929 2 0.8955 0.565 0.312 0.688
#> SRR957930 2 0.0000 0.957 0.000 1.000
#> SRR957931 2 0.0000 0.957 0.000 1.000
#> SRR957932 1 0.1414 0.985 0.980 0.020
#> SRR957933 1 0.1414 0.985 0.980 0.020
#> SRR957934 2 0.0000 0.957 0.000 1.000
#> SRR957935 2 0.0000 0.957 0.000 1.000
#> SRR957936 2 0.0000 0.957 0.000 1.000
#> SRR957937 2 0.0000 0.957 0.000 1.000
#> SRR957938 2 0.0000 0.957 0.000 1.000
#> SRR957939 1 0.1843 0.979 0.972 0.028
#> SRR957941 2 0.0000 0.957 0.000 1.000
#> SRR957940 1 0.1414 0.985 0.980 0.020
#> SRR957942 2 0.0000 0.957 0.000 1.000
#> SRR957943 2 0.0000 0.957 0.000 1.000
#> SRR957944 2 0.0000 0.957 0.000 1.000
#> SRR957945 1 0.0000 0.982 1.000 0.000
#> SRR957946 1 0.1414 0.985 0.980 0.020
#> SRR957947 1 0.1414 0.985 0.980 0.020
#> SRR957948 2 0.0000 0.957 0.000 1.000
#> SRR957949 2 0.0000 0.957 0.000 1.000
#> SRR957950 1 0.1414 0.985 0.980 0.020
#> SRR957951 2 0.0000 0.957 0.000 1.000
#> SRR957952 2 0.0938 0.951 0.012 0.988
#> SRR957953 1 0.0000 0.982 1.000 0.000
#> SRR957954 1 0.0000 0.982 1.000 0.000
#> SRR957956 1 0.0000 0.982 1.000 0.000
#> SRR957957 1 0.7528 0.725 0.784 0.216
#> SRR957958 1 0.0000 0.982 1.000 0.000
#> SRR957959 2 0.0938 0.951 0.012 0.988
#> SRR957960 2 0.0000 0.957 0.000 1.000
#> SRR957961 2 0.1184 0.950 0.016 0.984
#> SRR957962 1 0.0000 0.982 1.000 0.000
#> SRR957963 1 0.1414 0.985 0.980 0.020
#> SRR957964 1 0.1414 0.985 0.980 0.020
#> SRR957965 2 0.0000 0.957 0.000 1.000
#> SRR957966 1 0.1414 0.985 0.980 0.020
#> SRR957967 1 0.0000 0.982 1.000 0.000
#> SRR957968 1 0.0000 0.982 1.000 0.000
#> SRR957969 1 0.0000 0.982 1.000 0.000
#> SRR957970 2 0.0000 0.957 0.000 1.000
#> SRR957971 1 0.0000 0.982 1.000 0.000
#> SRR957972 2 0.9850 0.295 0.428 0.572
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957916 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957884 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957885 3 0.0000 0.8950 0.000 0.000 1.000
#> SRR957886 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957887 3 0.0000 0.8950 0.000 0.000 1.000
#> SRR957888 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957889 1 0.3192 0.8776 0.888 0.000 0.112
#> SRR957890 1 0.2796 0.8921 0.908 0.000 0.092
#> SRR957891 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957893 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957895 3 0.4808 0.8794 0.188 0.008 0.804
#> SRR957896 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957897 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957898 1 0.2625 0.8756 0.916 0.000 0.084
#> SRR957899 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957900 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957901 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957903 3 0.0000 0.8950 0.000 0.000 1.000
#> SRR957904 3 0.0000 0.8950 0.000 0.000 1.000
#> SRR957905 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957906 2 0.0237 0.9654 0.000 0.996 0.004
#> SRR957907 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957908 2 0.0237 0.9654 0.000 0.996 0.004
#> SRR957909 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957911 1 0.0237 0.9321 0.996 0.000 0.004
#> SRR957912 1 0.5036 0.8379 0.832 0.048 0.120
#> SRR957913 3 0.0000 0.8950 0.000 0.000 1.000
#> SRR957917 2 0.4469 0.8383 0.028 0.852 0.120
#> SRR957918 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957920 2 0.0747 0.9588 0.000 0.984 0.016
#> SRR957919 2 0.0237 0.9654 0.000 0.996 0.004
#> SRR957921 2 0.0592 0.9606 0.000 0.988 0.012
#> SRR957922 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957924 3 0.4931 0.8360 0.232 0.000 0.768
#> SRR957923 2 0.0892 0.9529 0.020 0.980 0.000
#> SRR957925 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957926 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957927 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957928 1 0.3573 0.8701 0.876 0.004 0.120
#> SRR957929 1 0.3482 0.8143 0.872 0.128 0.000
#> SRR957930 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957931 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957932 3 0.1031 0.9013 0.024 0.000 0.976
#> SRR957933 1 0.0237 0.9320 0.996 0.000 0.004
#> SRR957934 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957935 2 0.0747 0.9563 0.016 0.984 0.000
#> SRR957936 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957939 2 0.6345 0.3572 0.400 0.596 0.004
#> SRR957941 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957940 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957942 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957943 2 0.0237 0.9654 0.000 0.996 0.004
#> SRR957944 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.8950 0.000 0.000 1.000
#> SRR957946 1 0.2878 0.8896 0.904 0.000 0.096
#> SRR957947 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957948 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957951 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957952 2 0.4469 0.8383 0.028 0.852 0.120
#> SRR957953 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957954 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957956 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957957 2 0.8887 0.0053 0.124 0.488 0.388
#> SRR957958 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957959 2 0.2959 0.8833 0.000 0.900 0.100
#> SRR957960 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957961 2 0.0747 0.9588 0.000 0.984 0.016
#> SRR957962 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957963 1 0.4346 0.7261 0.816 0.000 0.184
#> SRR957964 3 0.1163 0.9023 0.028 0.000 0.972
#> SRR957965 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.9339 1.000 0.000 0.000
#> SRR957967 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957968 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957969 3 0.3619 0.9229 0.136 0.000 0.864
#> SRR957970 2 0.0000 0.9678 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.8950 0.000 0.000 1.000
#> SRR957972 3 0.3112 0.8314 0.028 0.056 0.916
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.1867 0.8641 0.928 0.000 0.000 0.072
#> SRR957915 2 0.0188 0.6903 0.000 0.996 0.004 0.000
#> SRR957916 2 0.4643 0.2211 0.000 0.656 0.344 0.000
#> SRR957884 4 0.0921 0.7664 0.028 0.000 0.000 0.972
#> SRR957885 4 0.4898 0.6683 0.000 0.000 0.416 0.584
#> SRR957886 2 0.0188 0.6903 0.000 0.996 0.004 0.000
#> SRR957887 4 0.4898 0.6683 0.000 0.000 0.416 0.584
#> SRR957888 1 0.1940 0.8644 0.924 0.000 0.000 0.076
#> SRR957889 1 0.0376 0.8342 0.992 0.000 0.004 0.004
#> SRR957890 1 0.0336 0.8441 0.992 0.000 0.000 0.008
#> SRR957891 2 0.0592 0.6895 0.000 0.984 0.016 0.000
#> SRR957893 1 0.3356 0.7875 0.824 0.000 0.000 0.176
#> SRR957892 1 0.1940 0.8644 0.924 0.000 0.000 0.076
#> SRR957894 2 0.2530 0.6527 0.000 0.888 0.112 0.000
#> SRR957895 4 0.7718 -0.0675 0.144 0.308 0.024 0.524
#> SRR957896 2 0.2760 0.6451 0.000 0.872 0.128 0.000
#> SRR957897 4 0.4493 0.6237 0.028 0.132 0.024 0.816
#> SRR957898 1 0.4331 0.6238 0.712 0.000 0.000 0.288
#> SRR957899 2 0.0592 0.6895 0.000 0.984 0.016 0.000
#> SRR957900 2 0.4643 0.2211 0.000 0.656 0.344 0.000
#> SRR957901 2 0.0469 0.6902 0.000 0.988 0.012 0.000
#> SRR957902 2 0.1716 0.6761 0.000 0.936 0.064 0.000
#> SRR957903 4 0.4898 0.6683 0.000 0.000 0.416 0.584
#> SRR957904 4 0.5872 0.6530 0.004 0.032 0.380 0.584
#> SRR957905 4 0.0592 0.7665 0.016 0.000 0.000 0.984
#> SRR957906 2 0.3801 0.4931 0.000 0.780 0.220 0.000
#> SRR957907 2 0.0188 0.6903 0.000 0.996 0.004 0.000
#> SRR957908 2 0.3801 0.4888 0.000 0.780 0.220 0.000
#> SRR957909 1 0.1940 0.8644 0.924 0.000 0.000 0.076
#> SRR957910 2 0.0000 0.6909 0.000 1.000 0.000 0.000
#> SRR957911 1 0.3356 0.7875 0.824 0.000 0.000 0.176
#> SRR957912 1 0.7109 -0.0295 0.520 0.144 0.336 0.000
#> SRR957913 4 0.4898 0.6683 0.000 0.000 0.416 0.584
#> SRR957917 2 0.4804 0.0554 0.000 0.616 0.384 0.000
#> SRR957918 2 0.0188 0.6910 0.000 0.996 0.004 0.000
#> SRR957920 2 0.4992 -0.1860 0.000 0.524 0.476 0.000
#> SRR957919 2 0.3726 0.4995 0.000 0.788 0.212 0.000
#> SRR957921 2 0.1302 0.6730 0.000 0.956 0.044 0.000
#> SRR957922 2 0.4643 0.2211 0.000 0.656 0.344 0.000
#> SRR957924 4 0.9286 -0.1908 0.348 0.192 0.104 0.356
#> SRR957923 2 0.3123 0.6210 0.000 0.844 0.156 0.000
#> SRR957925 2 0.3726 0.5430 0.000 0.788 0.212 0.000
#> SRR957926 1 0.1940 0.8644 0.924 0.000 0.000 0.076
#> SRR957927 2 0.2469 0.6154 0.000 0.892 0.108 0.000
#> SRR957928 1 0.1396 0.8148 0.960 0.032 0.004 0.004
#> SRR957929 1 0.6420 0.4497 0.664 0.172 0.160 0.004
#> SRR957930 2 0.3024 0.6253 0.000 0.852 0.148 0.000
#> SRR957931 2 0.2868 0.6406 0.000 0.864 0.136 0.000
#> SRR957932 4 0.6162 0.6801 0.168 0.000 0.156 0.676
#> SRR957933 1 0.1940 0.8644 0.924 0.000 0.000 0.076
#> SRR957934 2 0.3123 0.6178 0.000 0.844 0.156 0.000
#> SRR957935 2 0.4103 0.4646 0.000 0.744 0.256 0.000
#> SRR957936 2 0.2647 0.6029 0.000 0.880 0.120 0.000
#> SRR957937 2 0.0188 0.6903 0.000 0.996 0.004 0.000
#> SRR957938 2 0.0188 0.6903 0.000 0.996 0.004 0.000
#> SRR957939 2 0.9779 -0.4825 0.228 0.328 0.164 0.280
#> SRR957941 2 0.3219 0.6151 0.000 0.836 0.164 0.000
#> SRR957940 4 0.3497 0.7194 0.124 0.000 0.024 0.852
#> SRR957942 2 0.3764 0.4938 0.000 0.784 0.216 0.000
#> SRR957943 2 0.3801 0.4888 0.000 0.780 0.220 0.000
#> SRR957944 2 0.3074 0.6216 0.000 0.848 0.152 0.000
#> SRR957945 4 0.4898 0.6683 0.000 0.000 0.416 0.584
#> SRR957946 1 0.0336 0.8441 0.992 0.000 0.000 0.008
#> SRR957947 1 0.0336 0.8441 0.992 0.000 0.000 0.008
#> SRR957948 2 0.0000 0.6909 0.000 1.000 0.000 0.000
#> SRR957949 2 0.4072 0.4733 0.000 0.748 0.252 0.000
#> SRR957950 1 0.1940 0.8644 0.924 0.000 0.000 0.076
#> SRR957951 2 0.0707 0.6901 0.000 0.980 0.020 0.000
#> SRR957952 2 0.5028 -0.0520 0.000 0.596 0.400 0.004
#> SRR957953 4 0.0592 0.7665 0.016 0.000 0.000 0.984
#> SRR957954 4 0.1706 0.7681 0.036 0.000 0.016 0.948
#> SRR957956 4 0.1610 0.7690 0.032 0.000 0.016 0.952
#> SRR957957 2 0.7407 -0.2561 0.012 0.436 0.116 0.436
#> SRR957958 4 0.0592 0.7665 0.016 0.000 0.000 0.984
#> SRR957959 2 0.4401 0.4341 0.000 0.724 0.272 0.004
#> SRR957960 2 0.3726 0.5430 0.000 0.788 0.212 0.000
#> SRR957961 2 0.4250 0.4053 0.000 0.724 0.276 0.000
#> SRR957962 4 0.1118 0.7655 0.036 0.000 0.000 0.964
#> SRR957963 1 0.4941 0.3122 0.564 0.000 0.000 0.436
#> SRR957964 4 0.6771 0.5860 0.248 0.000 0.152 0.600
#> SRR957965 2 0.2589 0.6062 0.000 0.884 0.116 0.000
#> SRR957966 1 0.2011 0.8633 0.920 0.000 0.000 0.080
#> SRR957967 4 0.1118 0.7655 0.036 0.000 0.000 0.964
#> SRR957968 4 0.1042 0.7687 0.020 0.000 0.008 0.972
#> SRR957969 4 0.2227 0.7689 0.036 0.000 0.036 0.928
#> SRR957970 2 0.0336 0.6909 0.000 0.992 0.008 0.000
#> SRR957971 4 0.5060 0.6697 0.004 0.000 0.412 0.584
#> SRR957972 3 0.7464 0.0000 0.100 0.344 0.528 0.028
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.2233 0.8391 0.892 0.000 0.004 0.104 0.000
#> SRR957915 2 0.4242 0.3663 0.000 0.572 0.000 0.000 0.428
#> SRR957916 5 0.1270 0.5516 0.000 0.000 0.052 0.000 0.948
#> SRR957884 4 0.4232 0.6124 0.036 0.052 0.104 0.808 0.000
#> SRR957885 3 0.4088 0.9879 0.000 0.000 0.632 0.368 0.000
#> SRR957886 2 0.4291 0.2936 0.000 0.536 0.000 0.000 0.464
#> SRR957887 3 0.4088 0.9879 0.000 0.000 0.632 0.368 0.000
#> SRR957888 1 0.2424 0.8425 0.868 0.000 0.000 0.132 0.000
#> SRR957889 1 0.1809 0.7785 0.928 0.000 0.060 0.000 0.012
#> SRR957890 1 0.1808 0.7906 0.936 0.000 0.044 0.008 0.012
#> SRR957891 5 0.3895 0.3615 0.000 0.320 0.000 0.000 0.680
#> SRR957893 1 0.2966 0.8053 0.816 0.000 0.000 0.184 0.000
#> SRR957892 1 0.2471 0.8407 0.864 0.000 0.000 0.136 0.000
#> SRR957894 2 0.4256 0.3109 0.000 0.564 0.000 0.000 0.436
#> SRR957895 4 0.8763 0.3661 0.132 0.072 0.240 0.440 0.116
#> SRR957896 5 0.3913 0.3524 0.000 0.324 0.000 0.000 0.676
#> SRR957897 4 0.6332 0.5019 0.048 0.100 0.240 0.612 0.000
#> SRR957898 1 0.4109 0.6491 0.700 0.000 0.012 0.288 0.000
#> SRR957899 5 0.3876 0.3655 0.000 0.316 0.000 0.000 0.684
#> SRR957900 5 0.0000 0.5624 0.000 0.000 0.000 0.000 1.000
#> SRR957901 5 0.3966 0.3325 0.000 0.336 0.000 0.000 0.664
#> SRR957902 5 0.4045 0.2784 0.000 0.356 0.000 0.000 0.644
#> SRR957903 3 0.4060 0.9952 0.000 0.000 0.640 0.360 0.000
#> SRR957904 3 0.4060 0.9952 0.000 0.000 0.640 0.360 0.000
#> SRR957905 4 0.0162 0.6355 0.004 0.000 0.000 0.996 0.000
#> SRR957906 2 0.3731 0.3643 0.000 0.800 0.016 0.012 0.172
#> SRR957907 2 0.4287 0.3010 0.000 0.540 0.000 0.000 0.460
#> SRR957908 2 0.1074 0.4367 0.000 0.968 0.016 0.012 0.004
#> SRR957909 1 0.2424 0.8425 0.868 0.000 0.000 0.132 0.000
#> SRR957910 5 0.4283 -0.0622 0.000 0.456 0.000 0.000 0.544
#> SRR957911 1 0.2966 0.8053 0.816 0.000 0.000 0.184 0.000
#> SRR957912 5 0.5948 -0.2828 0.408 0.000 0.108 0.000 0.484
#> SRR957913 3 0.4060 0.9952 0.000 0.000 0.640 0.360 0.000
#> SRR957917 5 0.2127 0.5216 0.000 0.000 0.108 0.000 0.892
#> SRR957918 2 0.4268 0.3501 0.000 0.556 0.000 0.000 0.444
#> SRR957920 5 0.3735 0.4912 0.000 0.100 0.064 0.008 0.828
#> SRR957919 2 0.4074 0.4557 0.000 0.752 0.012 0.012 0.224
#> SRR957921 5 0.4817 0.3818 0.000 0.300 0.044 0.000 0.656
#> SRR957922 5 0.1270 0.5516 0.000 0.000 0.052 0.000 0.948
#> SRR957924 1 0.6700 0.1747 0.416 0.000 0.000 0.252 0.332
#> SRR957923 5 0.4297 -0.0724 0.000 0.472 0.000 0.000 0.528
#> SRR957925 5 0.3684 0.2861 0.000 0.280 0.000 0.000 0.720
#> SRR957926 1 0.2377 0.8428 0.872 0.000 0.000 0.128 0.000
#> SRR957927 2 0.4470 0.3657 0.004 0.596 0.004 0.000 0.396
#> SRR957928 1 0.3375 0.7215 0.840 0.000 0.104 0.000 0.056
#> SRR957929 1 0.4883 0.6693 0.752 0.000 0.100 0.020 0.128
#> SRR957930 5 0.3586 0.4264 0.000 0.264 0.000 0.000 0.736
#> SRR957931 5 0.3586 0.4272 0.000 0.264 0.000 0.000 0.736
#> SRR957932 4 0.5744 -0.1269 0.108 0.000 0.320 0.572 0.000
#> SRR957933 1 0.2424 0.8425 0.868 0.000 0.000 0.132 0.000
#> SRR957934 5 0.3305 0.4565 0.000 0.224 0.000 0.000 0.776
#> SRR957935 5 0.1732 0.5444 0.000 0.080 0.000 0.000 0.920
#> SRR957936 2 0.1628 0.4599 0.000 0.936 0.000 0.008 0.056
#> SRR957937 2 0.4294 0.2821 0.000 0.532 0.000 0.000 0.468
#> SRR957938 2 0.4235 0.3702 0.000 0.576 0.000 0.000 0.424
#> SRR957939 4 0.9761 0.0812 0.240 0.132 0.240 0.252 0.136
#> SRR957941 5 0.2280 0.5466 0.000 0.120 0.000 0.000 0.880
#> SRR957940 4 0.2574 0.6743 0.112 0.000 0.012 0.876 0.000
#> SRR957942 2 0.3482 0.4694 0.000 0.812 0.012 0.008 0.168
#> SRR957943 2 0.0968 0.4383 0.000 0.972 0.012 0.012 0.004
#> SRR957944 5 0.4305 -0.2232 0.000 0.488 0.000 0.000 0.512
#> SRR957945 3 0.4060 0.9952 0.000 0.000 0.640 0.360 0.000
#> SRR957946 1 0.1921 0.7931 0.932 0.000 0.044 0.012 0.012
#> SRR957947 1 0.2026 0.7951 0.928 0.000 0.044 0.016 0.012
#> SRR957948 2 0.4256 0.3554 0.000 0.564 0.000 0.000 0.436
#> SRR957949 5 0.1270 0.5516 0.000 0.000 0.052 0.000 0.948
#> SRR957950 1 0.2424 0.8425 0.868 0.000 0.000 0.132 0.000
#> SRR957951 5 0.3752 0.3975 0.000 0.292 0.000 0.000 0.708
#> SRR957952 5 0.1502 0.5504 0.000 0.004 0.056 0.000 0.940
#> SRR957953 4 0.0162 0.6355 0.004 0.000 0.000 0.996 0.000
#> SRR957954 4 0.2338 0.6781 0.112 0.000 0.004 0.884 0.000
#> SRR957956 4 0.2249 0.6784 0.096 0.000 0.008 0.896 0.000
#> SRR957957 2 0.6521 -0.2816 0.000 0.484 0.244 0.272 0.000
#> SRR957958 4 0.0162 0.6355 0.004 0.000 0.000 0.996 0.000
#> SRR957959 5 0.1701 0.5546 0.000 0.016 0.048 0.000 0.936
#> SRR957960 5 0.3636 0.2972 0.000 0.272 0.000 0.000 0.728
#> SRR957961 2 0.5383 0.1512 0.000 0.644 0.084 0.004 0.268
#> SRR957962 4 0.2179 0.6789 0.112 0.000 0.000 0.888 0.000
#> SRR957963 4 0.4256 0.1164 0.436 0.000 0.000 0.564 0.000
#> SRR957964 4 0.5449 0.1333 0.108 0.000 0.256 0.636 0.000
#> SRR957965 2 0.1851 0.4675 0.000 0.912 0.000 0.000 0.088
#> SRR957966 1 0.2471 0.8407 0.864 0.000 0.000 0.136 0.000
#> SRR957967 4 0.2358 0.6789 0.104 0.000 0.008 0.888 0.000
#> SRR957968 4 0.0162 0.6355 0.004 0.000 0.000 0.996 0.000
#> SRR957969 4 0.2773 0.6691 0.112 0.000 0.020 0.868 0.000
#> SRR957970 2 0.4262 0.3493 0.000 0.560 0.000 0.000 0.440
#> SRR957971 3 0.4060 0.9952 0.000 0.000 0.640 0.360 0.000
#> SRR957972 5 0.4693 0.4031 0.044 0.008 0.212 0.004 0.732
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.3136 0.8822 0.796 0.000 0.000 0.016 0.000 0.188
#> SRR957915 5 0.4715 0.2895 0.032 0.416 0.008 0.000 0.544 0.000
#> SRR957916 5 0.3474 0.5174 0.056 0.000 0.016 0.000 0.824 0.104
#> SRR957884 4 0.2995 0.7384 0.020 0.064 0.044 0.868 0.000 0.004
#> SRR957885 3 0.2793 0.7724 0.000 0.000 0.800 0.200 0.000 0.000
#> SRR957886 5 0.4303 0.4864 0.032 0.284 0.008 0.000 0.676 0.000
#> SRR957887 3 0.1910 0.8913 0.000 0.000 0.892 0.108 0.000 0.000
#> SRR957888 1 0.3134 0.8980 0.808 0.000 0.000 0.024 0.000 0.168
#> SRR957889 6 0.1327 0.7064 0.064 0.000 0.000 0.000 0.000 0.936
#> SRR957890 6 0.2260 0.7099 0.140 0.000 0.000 0.000 0.000 0.860
#> SRR957891 5 0.3387 0.5575 0.052 0.052 0.044 0.000 0.848 0.004
#> SRR957893 1 0.3730 0.8701 0.772 0.000 0.000 0.060 0.000 0.168
#> SRR957892 1 0.3134 0.8980 0.808 0.000 0.000 0.024 0.000 0.168
#> SRR957894 2 0.4074 0.2429 0.000 0.656 0.016 0.000 0.324 0.004
#> SRR957895 4 0.8181 0.2262 0.192 0.252 0.044 0.400 0.092 0.020
#> SRR957896 5 0.1829 0.5991 0.024 0.056 0.000 0.000 0.920 0.000
#> SRR957897 4 0.6145 0.4236 0.112 0.304 0.044 0.536 0.000 0.004
#> SRR957898 6 0.6166 0.3356 0.184 0.000 0.032 0.252 0.000 0.532
#> SRR957899 5 0.1757 0.5872 0.008 0.052 0.012 0.000 0.928 0.000
#> SRR957900 5 0.2015 0.5708 0.056 0.000 0.016 0.000 0.916 0.012
#> SRR957901 5 0.3415 0.5759 0.028 0.152 0.012 0.000 0.808 0.000
#> SRR957902 5 0.2431 0.5909 0.000 0.132 0.008 0.000 0.860 0.000
#> SRR957903 3 0.1814 0.8970 0.000 0.000 0.900 0.100 0.000 0.000
#> SRR957904 3 0.1814 0.8970 0.000 0.000 0.900 0.100 0.000 0.000
#> SRR957905 4 0.0000 0.7632 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957906 2 0.4612 0.0264 0.020 0.544 0.012 0.000 0.424 0.000
#> SRR957907 5 0.4303 0.4864 0.032 0.284 0.008 0.000 0.676 0.000
#> SRR957908 2 0.0146 0.6175 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR957909 1 0.3134 0.8980 0.808 0.000 0.000 0.024 0.000 0.168
#> SRR957910 5 0.4012 0.5300 0.032 0.232 0.008 0.000 0.728 0.000
#> SRR957911 1 0.3796 0.8663 0.764 0.000 0.000 0.060 0.000 0.176
#> SRR957912 6 0.3667 0.4858 0.012 0.000 0.008 0.000 0.240 0.740
#> SRR957913 3 0.1814 0.8970 0.000 0.000 0.900 0.100 0.000 0.000
#> SRR957917 5 0.6183 0.2538 0.048 0.000 0.136 0.000 0.536 0.280
#> SRR957918 5 0.4715 0.2893 0.032 0.416 0.008 0.000 0.544 0.000
#> SRR957920 5 0.5789 0.1234 0.052 0.056 0.348 0.000 0.540 0.004
#> SRR957919 2 0.2933 0.5209 0.000 0.796 0.004 0.000 0.200 0.000
#> SRR957921 5 0.5286 0.4020 0.052 0.048 0.228 0.000 0.664 0.008
#> SRR957922 5 0.3286 0.5245 0.044 0.000 0.016 0.000 0.836 0.104
#> SRR957924 4 0.5964 0.2918 0.300 0.000 0.000 0.548 0.044 0.108
#> SRR957923 2 0.5652 0.2641 0.092 0.528 0.016 0.000 0.360 0.004
#> SRR957925 5 0.4317 0.2822 0.000 0.408 0.016 0.000 0.572 0.004
#> SRR957926 6 0.4334 0.2424 0.408 0.000 0.000 0.024 0.000 0.568
#> SRR957927 5 0.4086 0.1897 0.000 0.464 0.008 0.000 0.528 0.000
#> SRR957928 6 0.0363 0.6886 0.012 0.000 0.000 0.000 0.000 0.988
#> SRR957929 6 0.1633 0.6776 0.024 0.000 0.000 0.000 0.044 0.932
#> SRR957930 5 0.3325 0.5864 0.028 0.120 0.016 0.000 0.832 0.004
#> SRR957931 5 0.1692 0.5797 0.048 0.008 0.012 0.000 0.932 0.000
#> SRR957932 4 0.5579 0.1891 0.020 0.000 0.396 0.500 0.000 0.084
#> SRR957933 6 0.4666 0.1782 0.420 0.000 0.000 0.044 0.000 0.536
#> SRR957934 5 0.3275 0.5771 0.012 0.148 0.016 0.000 0.820 0.004
#> SRR957935 5 0.2517 0.5939 0.000 0.100 0.016 0.000 0.876 0.008
#> SRR957936 2 0.0547 0.6177 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR957937 5 0.4303 0.4864 0.032 0.284 0.008 0.000 0.676 0.000
#> SRR957938 5 0.3995 0.2053 0.000 0.480 0.004 0.000 0.516 0.000
#> SRR957939 2 0.7271 0.1058 0.376 0.400 0.044 0.128 0.048 0.004
#> SRR957941 5 0.0964 0.5864 0.016 0.000 0.012 0.000 0.968 0.004
#> SRR957940 4 0.2485 0.7689 0.024 0.000 0.008 0.884 0.000 0.084
#> SRR957942 2 0.3911 0.4163 0.032 0.712 0.000 0.000 0.256 0.000
#> SRR957943 2 0.0146 0.6175 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR957944 5 0.4338 0.2685 0.000 0.420 0.016 0.000 0.560 0.004
#> SRR957945 3 0.1814 0.8970 0.000 0.000 0.900 0.100 0.000 0.000
#> SRR957946 6 0.2300 0.7095 0.144 0.000 0.000 0.000 0.000 0.856
#> SRR957947 6 0.2300 0.7095 0.144 0.000 0.000 0.000 0.000 0.856
#> SRR957948 5 0.4616 0.3734 0.032 0.368 0.008 0.000 0.592 0.000
#> SRR957949 5 0.3910 0.5596 0.000 0.092 0.016 0.000 0.792 0.100
#> SRR957950 1 0.3202 0.8929 0.800 0.000 0.000 0.024 0.000 0.176
#> SRR957951 5 0.1969 0.5756 0.052 0.004 0.020 0.000 0.920 0.004
#> SRR957952 5 0.4562 0.4196 0.052 0.000 0.204 0.000 0.716 0.028
#> SRR957953 4 0.0000 0.7632 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957954 4 0.2309 0.7679 0.028 0.000 0.000 0.888 0.000 0.084
#> SRR957956 4 0.1633 0.7792 0.024 0.000 0.000 0.932 0.000 0.044
#> SRR957957 2 0.5232 0.3367 0.104 0.684 0.048 0.164 0.000 0.000
#> SRR957958 4 0.0000 0.7632 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957959 5 0.4540 0.4007 0.052 0.004 0.244 0.000 0.692 0.008
#> SRR957960 5 0.4293 0.2995 0.000 0.396 0.016 0.000 0.584 0.004
#> SRR957961 5 0.6772 -0.1290 0.052 0.172 0.380 0.000 0.392 0.004
#> SRR957962 4 0.2309 0.7679 0.028 0.000 0.000 0.888 0.000 0.084
#> SRR957963 1 0.5015 0.3773 0.564 0.000 0.000 0.352 0.000 0.084
#> SRR957964 4 0.5608 0.2050 0.020 0.000 0.388 0.504 0.000 0.088
#> SRR957965 2 0.3101 0.4677 0.000 0.756 0.000 0.000 0.244 0.000
#> SRR957966 1 0.3134 0.8980 0.808 0.000 0.000 0.024 0.000 0.168
#> SRR957967 4 0.1984 0.7786 0.032 0.000 0.000 0.912 0.000 0.056
#> SRR957968 4 0.0000 0.7632 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957969 4 0.2924 0.7625 0.028 0.000 0.024 0.864 0.000 0.084
#> SRR957970 5 0.4835 0.2974 0.032 0.408 0.008 0.000 0.548 0.004
#> SRR957971 3 0.1814 0.8970 0.000 0.000 0.900 0.100 0.000 0.000
#> SRR957972 3 0.6075 0.3373 0.048 0.000 0.568 0.016 0.292 0.076
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.757 0.831 0.933 0.4967 0.498 0.498
#> 3 3 0.805 0.854 0.937 0.3226 0.737 0.524
#> 4 4 0.713 0.766 0.876 0.1127 0.846 0.601
#> 5 5 0.573 0.548 0.745 0.0631 0.861 0.564
#> 6 6 0.555 0.409 0.662 0.0514 0.875 0.543
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
#> SRR957914 1 0.0000 0.895 1.000 0.000
#> SRR957915 2 0.0000 0.943 0.000 1.000
#> SRR957916 2 0.0376 0.940 0.004 0.996
#> SRR957884 1 0.5629 0.776 0.868 0.132
#> SRR957885 1 0.0000 0.895 1.000 0.000
#> SRR957886 2 0.0000 0.943 0.000 1.000
#> SRR957887 1 0.0000 0.895 1.000 0.000
#> SRR957888 1 0.0376 0.894 0.996 0.004
#> SRR957889 1 0.9491 0.480 0.632 0.368
#> SRR957890 1 0.0000 0.895 1.000 0.000
#> SRR957891 2 0.0376 0.940 0.004 0.996
#> SRR957893 1 0.0376 0.894 0.996 0.004
#> SRR957892 1 0.0376 0.894 0.996 0.004
#> SRR957894 2 0.0000 0.943 0.000 1.000
#> SRR957895 2 0.9922 0.191 0.448 0.552
#> SRR957896 2 0.0000 0.943 0.000 1.000
#> SRR957897 2 0.9815 0.268 0.420 0.580
#> SRR957898 1 0.0000 0.895 1.000 0.000
#> SRR957899 2 0.0000 0.943 0.000 1.000
#> SRR957900 2 0.0376 0.940 0.004 0.996
#> SRR957901 2 0.0000 0.943 0.000 1.000
#> SRR957902 2 0.0000 0.943 0.000 1.000
#> SRR957903 1 0.7056 0.727 0.808 0.192
#> SRR957904 1 0.9909 0.314 0.556 0.444
#> SRR957905 1 0.0376 0.894 0.996 0.004
#> SRR957906 2 0.0000 0.943 0.000 1.000
#> SRR957907 2 0.0000 0.943 0.000 1.000
#> SRR957908 2 0.0000 0.943 0.000 1.000
#> SRR957909 1 0.0376 0.894 0.996 0.004
#> SRR957910 2 0.0000 0.943 0.000 1.000
#> SRR957911 1 0.0000 0.895 1.000 0.000
#> SRR957912 1 0.9833 0.366 0.576 0.424
#> SRR957913 1 0.9754 0.403 0.592 0.408
#> SRR957917 2 0.9323 0.365 0.348 0.652
#> SRR957918 2 0.0000 0.943 0.000 1.000
#> SRR957920 2 0.0376 0.940 0.004 0.996
#> SRR957919 2 0.0000 0.943 0.000 1.000
#> SRR957921 2 0.0376 0.940 0.004 0.996
#> SRR957922 2 0.0000 0.943 0.000 1.000
#> SRR957924 1 0.0376 0.894 0.996 0.004
#> SRR957923 2 0.0000 0.943 0.000 1.000
#> SRR957925 2 0.0000 0.943 0.000 1.000
#> SRR957926 1 0.0000 0.895 1.000 0.000
#> SRR957927 2 0.0000 0.943 0.000 1.000
#> SRR957928 1 0.9775 0.394 0.588 0.412
#> SRR957929 2 0.0000 0.943 0.000 1.000
#> SRR957930 2 0.0000 0.943 0.000 1.000
#> SRR957931 2 0.0000 0.943 0.000 1.000
#> SRR957932 1 0.0000 0.895 1.000 0.000
#> SRR957933 1 0.0000 0.895 1.000 0.000
#> SRR957934 2 0.0000 0.943 0.000 1.000
#> SRR957935 2 0.0000 0.943 0.000 1.000
#> SRR957936 2 0.0000 0.943 0.000 1.000
#> SRR957937 2 0.0000 0.943 0.000 1.000
#> SRR957938 2 0.0000 0.943 0.000 1.000
#> SRR957939 2 0.9795 0.278 0.416 0.584
#> SRR957941 2 0.0000 0.943 0.000 1.000
#> SRR957940 1 0.0000 0.895 1.000 0.000
#> SRR957942 2 0.0000 0.943 0.000 1.000
#> SRR957943 2 0.0000 0.943 0.000 1.000
#> SRR957944 2 0.0000 0.943 0.000 1.000
#> SRR957945 1 0.9460 0.487 0.636 0.364
#> SRR957946 1 0.0000 0.895 1.000 0.000
#> SRR957947 1 0.0000 0.895 1.000 0.000
#> SRR957948 2 0.0000 0.943 0.000 1.000
#> SRR957949 2 0.0000 0.943 0.000 1.000
#> SRR957950 1 0.0376 0.894 0.996 0.004
#> SRR957951 2 0.0376 0.940 0.004 0.996
#> SRR957952 2 0.8713 0.506 0.292 0.708
#> SRR957953 1 0.0000 0.895 1.000 0.000
#> SRR957954 1 0.0000 0.895 1.000 0.000
#> SRR957956 1 0.0000 0.895 1.000 0.000
#> SRR957957 2 0.9087 0.483 0.324 0.676
#> SRR957958 1 0.0376 0.894 0.996 0.004
#> SRR957959 2 0.0376 0.940 0.004 0.996
#> SRR957960 2 0.0000 0.943 0.000 1.000
#> SRR957961 2 0.0376 0.940 0.004 0.996
#> SRR957962 1 0.0000 0.895 1.000 0.000
#> SRR957963 1 0.0376 0.894 0.996 0.004
#> SRR957964 1 0.0000 0.895 1.000 0.000
#> SRR957965 2 0.0000 0.943 0.000 1.000
#> SRR957966 1 0.0376 0.894 0.996 0.004
#> SRR957967 1 0.0000 0.895 1.000 0.000
#> SRR957968 1 0.0000 0.895 1.000 0.000
#> SRR957969 1 0.0000 0.895 1.000 0.000
#> SRR957970 2 0.0000 0.943 0.000 1.000
#> SRR957971 1 0.9754 0.403 0.592 0.408
#> SRR957972 1 0.9954 0.269 0.540 0.460
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957916 2 0.4235 0.8011 0.000 0.824 0.176
#> SRR957884 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957885 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957886 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957887 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957888 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957889 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957890 3 0.0892 0.8518 0.020 0.000 0.980
#> SRR957891 2 0.4605 0.7641 0.000 0.796 0.204
#> SRR957893 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957895 1 0.1031 0.9101 0.976 0.024 0.000
#> SRR957896 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957897 1 0.2625 0.8530 0.916 0.084 0.000
#> SRR957898 3 0.5785 0.5440 0.332 0.000 0.668
#> SRR957899 2 0.0747 0.9584 0.000 0.984 0.016
#> SRR957900 2 0.4235 0.8011 0.000 0.824 0.176
#> SRR957901 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957903 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957904 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957905 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957906 2 0.1411 0.9446 0.000 0.964 0.036
#> SRR957907 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957908 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957912 3 0.1163 0.8484 0.000 0.028 0.972
#> SRR957913 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957917 3 0.1031 0.8502 0.000 0.024 0.976
#> SRR957918 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957920 3 0.3038 0.7809 0.000 0.104 0.896
#> SRR957919 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957921 3 0.6267 0.0507 0.000 0.452 0.548
#> SRR957922 2 0.0892 0.9560 0.000 0.980 0.020
#> SRR957924 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957923 2 0.3038 0.8663 0.104 0.896 0.000
#> SRR957925 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957926 3 0.6204 0.3635 0.424 0.000 0.576
#> SRR957927 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957928 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957929 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957930 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957931 2 0.1753 0.9348 0.000 0.952 0.048
#> SRR957932 3 0.0237 0.8570 0.004 0.000 0.996
#> SRR957933 3 0.6111 0.4277 0.396 0.000 0.604
#> SRR957934 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957935 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957936 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957939 1 0.4452 0.7275 0.808 0.192 0.000
#> SRR957941 2 0.1411 0.9446 0.000 0.964 0.036
#> SRR957940 3 0.6140 0.4105 0.404 0.000 0.596
#> SRR957942 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957946 3 0.3879 0.7556 0.152 0.000 0.848
#> SRR957947 3 0.6215 0.3531 0.428 0.000 0.572
#> SRR957948 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957951 2 0.5706 0.5655 0.000 0.680 0.320
#> SRR957952 3 0.1031 0.8500 0.000 0.024 0.976
#> SRR957953 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957954 1 0.3412 0.8045 0.876 0.000 0.124
#> SRR957956 1 0.5733 0.4302 0.676 0.000 0.324
#> SRR957957 1 0.5529 0.5902 0.704 0.296 0.000
#> SRR957958 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957959 3 0.0747 0.8528 0.000 0.016 0.984
#> SRR957960 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957961 3 0.1529 0.8369 0.000 0.040 0.960
#> SRR957962 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957963 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957964 3 0.1643 0.8380 0.044 0.000 0.956
#> SRR957965 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957967 1 0.0000 0.9288 1.000 0.000 0.000
#> SRR957968 1 0.4504 0.7011 0.804 0.000 0.196
#> SRR957969 3 0.5678 0.5688 0.316 0.000 0.684
#> SRR957970 2 0.0000 0.9680 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.8579 0.000 0.000 1.000
#> SRR957972 3 0.0000 0.8579 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.2469 0.813 0.892 0.000 0.000 0.108
#> SRR957915 2 0.0376 0.914 0.004 0.992 0.000 0.004
#> SRR957916 2 0.1211 0.909 0.040 0.960 0.000 0.000
#> SRR957884 4 0.1940 0.857 0.000 0.000 0.076 0.924
#> SRR957885 3 0.0188 0.800 0.000 0.000 0.996 0.004
#> SRR957886 2 0.0188 0.913 0.000 0.996 0.000 0.004
#> SRR957887 3 0.0188 0.800 0.000 0.000 0.996 0.004
#> SRR957888 1 0.4222 0.671 0.728 0.000 0.000 0.272
#> SRR957889 1 0.4761 0.533 0.664 0.004 0.332 0.000
#> SRR957890 1 0.2530 0.823 0.896 0.004 0.100 0.000
#> SRR957891 2 0.0336 0.913 0.000 0.992 0.008 0.000
#> SRR957893 1 0.4624 0.597 0.660 0.000 0.000 0.340
#> SRR957892 4 0.4250 0.522 0.276 0.000 0.000 0.724
#> SRR957894 2 0.1624 0.909 0.028 0.952 0.000 0.020
#> SRR957895 4 0.2868 0.764 0.136 0.000 0.000 0.864
#> SRR957896 2 0.1211 0.908 0.040 0.960 0.000 0.000
#> SRR957897 4 0.1302 0.866 0.000 0.000 0.044 0.956
#> SRR957898 3 0.5387 0.197 0.400 0.000 0.584 0.016
#> SRR957899 2 0.0000 0.914 0.000 1.000 0.000 0.000
#> SRR957900 2 0.1305 0.909 0.036 0.960 0.004 0.000
#> SRR957901 2 0.0000 0.914 0.000 1.000 0.000 0.000
#> SRR957902 2 0.0000 0.914 0.000 1.000 0.000 0.000
#> SRR957903 3 0.0000 0.801 0.000 0.000 1.000 0.000
#> SRR957904 3 0.1305 0.788 0.036 0.004 0.960 0.000
#> SRR957905 4 0.2408 0.838 0.000 0.000 0.104 0.896
#> SRR957906 3 0.5742 0.426 0.000 0.368 0.596 0.036
#> SRR957907 2 0.0000 0.914 0.000 1.000 0.000 0.000
#> SRR957908 2 0.6249 0.338 0.000 0.580 0.068 0.352
#> SRR957909 1 0.3649 0.757 0.796 0.000 0.000 0.204
#> SRR957910 2 0.0000 0.914 0.000 1.000 0.000 0.000
#> SRR957911 1 0.3306 0.806 0.840 0.000 0.004 0.156
#> SRR957912 1 0.0895 0.829 0.976 0.004 0.020 0.000
#> SRR957913 3 0.0000 0.801 0.000 0.000 1.000 0.000
#> SRR957917 1 0.5989 0.548 0.656 0.080 0.264 0.000
#> SRR957918 2 0.0524 0.914 0.004 0.988 0.000 0.008
#> SRR957920 3 0.3853 0.727 0.020 0.160 0.820 0.000
#> SRR957919 2 0.1824 0.886 0.000 0.936 0.004 0.060
#> SRR957921 3 0.4331 0.608 0.000 0.288 0.712 0.000
#> SRR957922 2 0.2921 0.836 0.140 0.860 0.000 0.000
#> SRR957924 1 0.3172 0.788 0.840 0.000 0.000 0.160
#> SRR957923 4 0.5172 0.557 0.036 0.260 0.000 0.704
#> SRR957925 2 0.2469 0.871 0.108 0.892 0.000 0.000
#> SRR957926 1 0.1635 0.833 0.948 0.000 0.044 0.008
#> SRR957927 2 0.4511 0.725 0.000 0.784 0.040 0.176
#> SRR957928 1 0.2859 0.804 0.880 0.008 0.112 0.000
#> SRR957929 1 0.1940 0.785 0.924 0.076 0.000 0.000
#> SRR957930 2 0.1118 0.910 0.036 0.964 0.000 0.000
#> SRR957931 2 0.0817 0.913 0.024 0.976 0.000 0.000
#> SRR957932 3 0.1174 0.798 0.020 0.000 0.968 0.012
#> SRR957933 1 0.3249 0.802 0.852 0.000 0.140 0.008
#> SRR957934 2 0.1302 0.907 0.044 0.956 0.000 0.000
#> SRR957935 2 0.3219 0.815 0.164 0.836 0.000 0.000
#> SRR957936 2 0.2021 0.882 0.000 0.932 0.012 0.056
#> SRR957937 2 0.0188 0.913 0.000 0.996 0.000 0.004
#> SRR957938 2 0.0657 0.915 0.012 0.984 0.000 0.004
#> SRR957939 4 0.1022 0.848 0.032 0.000 0.000 0.968
#> SRR957941 2 0.0921 0.912 0.028 0.972 0.000 0.000
#> SRR957940 3 0.4163 0.690 0.020 0.000 0.792 0.188
#> SRR957942 2 0.0469 0.912 0.000 0.988 0.000 0.012
#> SRR957943 2 0.5971 0.347 0.000 0.584 0.048 0.368
#> SRR957944 2 0.0895 0.914 0.020 0.976 0.000 0.004
#> SRR957945 3 0.0188 0.800 0.004 0.000 0.996 0.000
#> SRR957946 1 0.2469 0.819 0.892 0.000 0.108 0.000
#> SRR957947 1 0.0895 0.832 0.976 0.000 0.020 0.004
#> SRR957948 2 0.0592 0.914 0.016 0.984 0.000 0.000
#> SRR957949 2 0.4661 0.545 0.348 0.652 0.000 0.000
#> SRR957950 1 0.2647 0.809 0.880 0.000 0.000 0.120
#> SRR957951 2 0.2773 0.821 0.004 0.880 0.116 0.000
#> SRR957952 3 0.7039 0.370 0.256 0.176 0.568 0.000
#> SRR957953 4 0.3837 0.680 0.000 0.000 0.224 0.776
#> SRR957954 3 0.4967 0.198 0.000 0.000 0.548 0.452
#> SRR957956 3 0.4730 0.423 0.000 0.000 0.636 0.364
#> SRR957957 4 0.1637 0.864 0.000 0.000 0.060 0.940
#> SRR957958 4 0.2081 0.854 0.000 0.000 0.084 0.916
#> SRR957959 3 0.3421 0.764 0.044 0.088 0.868 0.000
#> SRR957960 2 0.4925 0.366 0.428 0.572 0.000 0.000
#> SRR957961 3 0.2011 0.777 0.000 0.080 0.920 0.000
#> SRR957962 4 0.0672 0.858 0.008 0.000 0.008 0.984
#> SRR957963 4 0.0336 0.856 0.008 0.000 0.000 0.992
#> SRR957964 3 0.1978 0.773 0.068 0.000 0.928 0.004
#> SRR957965 2 0.0937 0.908 0.000 0.976 0.012 0.012
#> SRR957966 4 0.2530 0.792 0.112 0.000 0.000 0.888
#> SRR957967 4 0.1637 0.865 0.000 0.000 0.060 0.940
#> SRR957968 3 0.4804 0.379 0.000 0.000 0.616 0.384
#> SRR957969 3 0.2408 0.753 0.000 0.000 0.896 0.104
#> SRR957970 2 0.1174 0.911 0.020 0.968 0.000 0.012
#> SRR957971 3 0.0469 0.799 0.012 0.000 0.988 0.000
#> SRR957972 3 0.1978 0.771 0.068 0.004 0.928 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.3422 0.6440 0.792 0.200 0.004 0.004 0.000
#> SRR957915 2 0.4470 0.3543 0.004 0.596 0.000 0.004 0.396
#> SRR957916 5 0.3445 0.7612 0.036 0.140 0.000 0.000 0.824
#> SRR957884 4 0.5525 0.3568 0.004 0.392 0.060 0.544 0.000
#> SRR957885 3 0.1310 0.7487 0.000 0.020 0.956 0.024 0.000
#> SRR957886 5 0.1981 0.7967 0.064 0.016 0.000 0.000 0.920
#> SRR957887 3 0.1124 0.7473 0.000 0.004 0.960 0.036 0.000
#> SRR957888 1 0.5047 0.3677 0.496 0.032 0.000 0.472 0.000
#> SRR957889 3 0.6727 -0.1448 0.364 0.252 0.384 0.000 0.000
#> SRR957890 1 0.5283 0.5792 0.672 0.124 0.204 0.000 0.000
#> SRR957891 5 0.3644 0.7323 0.000 0.096 0.080 0.000 0.824
#> SRR957893 1 0.5052 0.4537 0.552 0.036 0.000 0.412 0.000
#> SRR957892 1 0.6034 0.2173 0.456 0.116 0.000 0.428 0.000
#> SRR957894 2 0.4624 0.4753 0.016 0.676 0.000 0.012 0.296
#> SRR957895 2 0.4858 0.2311 0.064 0.732 0.004 0.192 0.008
#> SRR957896 5 0.2505 0.7880 0.020 0.092 0.000 0.000 0.888
#> SRR957897 4 0.4253 0.4187 0.004 0.332 0.004 0.660 0.000
#> SRR957898 3 0.6178 0.3677 0.304 0.040 0.584 0.072 0.000
#> SRR957899 5 0.2286 0.7760 0.000 0.108 0.004 0.000 0.888
#> SRR957900 5 0.4544 0.6723 0.032 0.228 0.012 0.000 0.728
#> SRR957901 5 0.2230 0.7722 0.000 0.116 0.000 0.000 0.884
#> SRR957902 5 0.0880 0.7994 0.000 0.032 0.000 0.000 0.968
#> SRR957903 3 0.1386 0.7501 0.000 0.032 0.952 0.016 0.000
#> SRR957904 3 0.1857 0.7551 0.060 0.004 0.928 0.000 0.008
#> SRR957905 4 0.6530 0.4188 0.004 0.340 0.180 0.476 0.000
#> SRR957906 5 0.4982 0.6246 0.000 0.020 0.176 0.072 0.732
#> SRR957907 5 0.1341 0.7933 0.000 0.056 0.000 0.000 0.944
#> SRR957908 5 0.5393 0.3781 0.000 0.052 0.008 0.344 0.596
#> SRR957909 1 0.4866 0.5339 0.620 0.036 0.000 0.344 0.000
#> SRR957910 5 0.0963 0.7984 0.000 0.036 0.000 0.000 0.964
#> SRR957911 1 0.4495 0.6446 0.736 0.064 0.000 0.200 0.000
#> SRR957912 1 0.2976 0.6597 0.880 0.012 0.064 0.000 0.044
#> SRR957913 3 0.1443 0.7589 0.044 0.004 0.948 0.004 0.000
#> SRR957917 1 0.6126 0.4397 0.604 0.012 0.224 0.000 0.160
#> SRR957918 5 0.3109 0.6747 0.000 0.200 0.000 0.000 0.800
#> SRR957920 5 0.5864 0.1900 0.064 0.008 0.408 0.004 0.516
#> SRR957919 5 0.2766 0.7936 0.056 0.012 0.000 0.040 0.892
#> SRR957921 3 0.5409 0.4461 0.000 0.080 0.604 0.000 0.316
#> SRR957922 5 0.3171 0.7416 0.176 0.008 0.000 0.000 0.816
#> SRR957924 1 0.4025 0.6485 0.792 0.076 0.000 0.132 0.000
#> SRR957923 2 0.5605 0.3773 0.012 0.672 0.000 0.172 0.144
#> SRR957925 5 0.2953 0.7739 0.144 0.012 0.000 0.000 0.844
#> SRR957926 1 0.2053 0.6814 0.924 0.000 0.048 0.024 0.004
#> SRR957927 5 0.3807 0.6927 0.000 0.028 0.004 0.176 0.792
#> SRR957928 1 0.3722 0.6468 0.824 0.032 0.128 0.000 0.016
#> SRR957929 1 0.3780 0.6044 0.812 0.072 0.000 0.000 0.116
#> SRR957930 5 0.1106 0.8021 0.012 0.024 0.000 0.000 0.964
#> SRR957931 5 0.2069 0.7947 0.076 0.012 0.000 0.000 0.912
#> SRR957932 3 0.2260 0.7541 0.064 0.000 0.908 0.028 0.000
#> SRR957933 1 0.2722 0.6779 0.872 0.000 0.108 0.020 0.000
#> SRR957934 5 0.2358 0.7868 0.104 0.008 0.000 0.000 0.888
#> SRR957935 5 0.4422 0.5454 0.320 0.012 0.000 0.004 0.664
#> SRR957936 5 0.5324 0.4759 0.000 0.204 0.000 0.128 0.668
#> SRR957937 5 0.0703 0.8008 0.000 0.024 0.000 0.000 0.976
#> SRR957938 5 0.2102 0.7959 0.068 0.012 0.000 0.004 0.916
#> SRR957939 2 0.5196 -0.1322 0.028 0.536 0.000 0.428 0.008
#> SRR957941 5 0.2470 0.7845 0.104 0.012 0.000 0.000 0.884
#> SRR957940 3 0.3570 0.7004 0.044 0.004 0.828 0.124 0.000
#> SRR957942 5 0.1200 0.8038 0.012 0.008 0.000 0.016 0.964
#> SRR957943 5 0.4887 0.4702 0.004 0.028 0.004 0.312 0.652
#> SRR957944 5 0.2141 0.7997 0.064 0.016 0.000 0.004 0.916
#> SRR957945 3 0.0404 0.7573 0.000 0.012 0.988 0.000 0.000
#> SRR957946 1 0.4238 0.6539 0.776 0.088 0.136 0.000 0.000
#> SRR957947 1 0.4292 0.6018 0.704 0.272 0.024 0.000 0.000
#> SRR957948 5 0.2929 0.7193 0.000 0.180 0.000 0.000 0.820
#> SRR957949 1 0.6346 0.0899 0.436 0.404 0.000 0.000 0.160
#> SRR957950 2 0.4787 -0.2855 0.432 0.548 0.000 0.020 0.000
#> SRR957951 3 0.6416 0.2047 0.000 0.188 0.480 0.000 0.332
#> SRR957952 3 0.6758 0.2419 0.208 0.008 0.460 0.000 0.324
#> SRR957953 4 0.6639 0.4419 0.004 0.304 0.216 0.476 0.000
#> SRR957954 4 0.4637 0.3847 0.028 0.004 0.292 0.676 0.000
#> SRR957956 4 0.5024 0.0990 0.024 0.004 0.440 0.532 0.000
#> SRR957957 4 0.2429 0.5326 0.000 0.068 0.008 0.904 0.020
#> SRR957958 4 0.6170 0.5030 0.004 0.232 0.188 0.576 0.000
#> SRR957959 3 0.3510 0.7332 0.048 0.032 0.856 0.000 0.064
#> SRR957960 2 0.6700 0.0842 0.356 0.400 0.000 0.000 0.244
#> SRR957961 3 0.3429 0.6999 0.000 0.100 0.848 0.012 0.040
#> SRR957962 4 0.2214 0.5390 0.028 0.052 0.004 0.916 0.000
#> SRR957963 4 0.3051 0.5212 0.060 0.076 0.000 0.864 0.000
#> SRR957964 3 0.1768 0.7505 0.072 0.004 0.924 0.000 0.000
#> SRR957965 2 0.5421 0.1945 0.000 0.500 0.020 0.024 0.456
#> SRR957966 4 0.5087 0.3737 0.152 0.148 0.000 0.700 0.000
#> SRR957967 2 0.6605 -0.1587 0.040 0.536 0.104 0.320 0.000
#> SRR957968 3 0.4779 0.2376 0.000 0.032 0.628 0.340 0.000
#> SRR957969 3 0.2302 0.7189 0.008 0.008 0.904 0.080 0.000
#> SRR957970 2 0.3398 0.4445 0.000 0.828 0.004 0.024 0.144
#> SRR957971 3 0.1012 0.7596 0.020 0.012 0.968 0.000 0.000
#> SRR957972 3 0.2569 0.7554 0.068 0.032 0.896 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 6 0.5256 0.2436 0.444 0.064 0.000 0.012 0.000 0.480
#> SRR957915 2 0.4860 0.1485 0.000 0.568 0.000 0.012 0.380 0.040
#> SRR957916 5 0.4804 0.4999 0.040 0.016 0.004 0.000 0.644 0.296
#> SRR957884 2 0.6073 -0.1226 0.012 0.460 0.112 0.400 0.000 0.016
#> SRR957885 3 0.0363 0.7895 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR957886 5 0.2062 0.6491 0.088 0.004 0.000 0.000 0.900 0.008
#> SRR957887 3 0.0665 0.7883 0.000 0.008 0.980 0.008 0.000 0.004
#> SRR957888 1 0.5727 0.2819 0.520 0.032 0.000 0.364 0.000 0.084
#> SRR957889 6 0.4126 0.5351 0.032 0.084 0.100 0.000 0.000 0.784
#> SRR957890 6 0.4908 0.5642 0.220 0.004 0.116 0.000 0.000 0.660
#> SRR957891 5 0.2518 0.6432 0.004 0.036 0.060 0.000 0.892 0.008
#> SRR957893 4 0.6164 -0.3108 0.400 0.028 0.000 0.432 0.000 0.140
#> SRR957892 1 0.6777 0.2280 0.436 0.116 0.000 0.344 0.000 0.104
#> SRR957894 2 0.3309 0.5280 0.028 0.816 0.000 0.004 0.148 0.004
#> SRR957895 2 0.2739 0.4854 0.024 0.876 0.000 0.024 0.000 0.076
#> SRR957896 5 0.5981 0.2895 0.204 0.268 0.000 0.000 0.516 0.012
#> SRR957897 4 0.4046 0.3302 0.008 0.328 0.004 0.656 0.000 0.004
#> SRR957898 3 0.7991 -0.2540 0.252 0.012 0.276 0.228 0.000 0.232
#> SRR957899 5 0.3261 0.6356 0.024 0.088 0.020 0.000 0.852 0.016
#> SRR957900 5 0.5981 0.0962 0.048 0.080 0.000 0.000 0.440 0.432
#> SRR957901 5 0.3602 0.5947 0.016 0.172 0.008 0.000 0.792 0.012
#> SRR957902 5 0.3903 0.5049 0.012 0.304 0.004 0.000 0.680 0.000
#> SRR957903 3 0.0622 0.7879 0.000 0.008 0.980 0.000 0.000 0.012
#> SRR957904 3 0.1321 0.7924 0.020 0.000 0.952 0.000 0.004 0.024
#> SRR957905 2 0.6902 -0.2320 0.012 0.332 0.316 0.316 0.000 0.024
#> SRR957906 5 0.4406 0.6054 0.024 0.004 0.108 0.080 0.776 0.008
#> SRR957907 5 0.0972 0.6472 0.008 0.028 0.000 0.000 0.964 0.000
#> SRR957908 4 0.5355 -0.1315 0.000 0.092 0.000 0.456 0.448 0.004
#> SRR957909 1 0.5811 0.2736 0.556 0.028 0.000 0.296 0.000 0.120
#> SRR957910 5 0.3248 0.5746 0.004 0.224 0.000 0.000 0.768 0.004
#> SRR957911 1 0.6317 0.2036 0.520 0.028 0.004 0.236 0.000 0.212
#> SRR957912 1 0.5025 0.1697 0.656 0.008 0.016 0.000 0.060 0.260
#> SRR957913 3 0.0993 0.7927 0.012 0.000 0.964 0.000 0.000 0.024
#> SRR957917 1 0.6985 -0.0337 0.360 0.000 0.060 0.000 0.260 0.320
#> SRR957918 5 0.5015 0.1221 0.048 0.468 0.000 0.004 0.476 0.004
#> SRR957920 5 0.5777 0.4154 0.116 0.000 0.296 0.000 0.560 0.028
#> SRR957919 5 0.3383 0.6464 0.072 0.016 0.000 0.060 0.844 0.008
#> SRR957921 5 0.4846 0.4248 0.028 0.012 0.328 0.000 0.620 0.012
#> SRR957922 5 0.4658 0.5636 0.204 0.008 0.000 0.000 0.696 0.092
#> SRR957924 1 0.5547 0.2603 0.600 0.296 0.008 0.060 0.000 0.036
#> SRR957923 2 0.3906 0.5124 0.048 0.816 0.000 0.076 0.052 0.008
#> SRR957925 1 0.5525 0.2076 0.580 0.192 0.000 0.000 0.224 0.004
#> SRR957926 1 0.3870 0.3002 0.784 0.000 0.016 0.052 0.000 0.148
#> SRR957927 5 0.5169 0.4698 0.016 0.080 0.004 0.260 0.640 0.000
#> SRR957928 1 0.4987 -0.1873 0.524 0.000 0.044 0.000 0.012 0.420
#> SRR957929 1 0.3371 0.3546 0.844 0.052 0.000 0.000 0.056 0.048
#> SRR957930 5 0.2581 0.6367 0.020 0.120 0.000 0.000 0.860 0.000
#> SRR957931 5 0.3277 0.6117 0.188 0.004 0.000 0.000 0.792 0.016
#> SRR957932 3 0.2411 0.7805 0.032 0.000 0.900 0.024 0.000 0.044
#> SRR957933 1 0.5437 0.2394 0.668 0.008 0.200 0.056 0.000 0.068
#> SRR957934 5 0.4596 0.4693 0.332 0.032 0.000 0.000 0.624 0.012
#> SRR957935 1 0.4784 0.3112 0.664 0.060 0.000 0.000 0.260 0.016
#> SRR957936 5 0.5472 0.3212 0.004 0.340 0.000 0.096 0.552 0.008
#> SRR957937 5 0.1327 0.6442 0.000 0.064 0.000 0.000 0.936 0.000
#> SRR957938 5 0.4647 0.5774 0.184 0.104 0.000 0.000 0.704 0.008
#> SRR957939 2 0.3866 0.4266 0.036 0.764 0.000 0.188 0.012 0.000
#> SRR957941 5 0.5114 0.4892 0.304 0.040 0.020 0.000 0.624 0.012
#> SRR957940 4 0.5711 0.3448 0.048 0.000 0.292 0.580 0.000 0.080
#> SRR957942 5 0.2923 0.6359 0.024 0.108 0.000 0.004 0.856 0.008
#> SRR957943 5 0.5781 0.0978 0.000 0.152 0.000 0.404 0.440 0.004
#> SRR957944 5 0.5175 0.5386 0.184 0.176 0.000 0.000 0.636 0.004
#> SRR957945 3 0.0260 0.7925 0.008 0.000 0.992 0.000 0.000 0.000
#> SRR957946 6 0.4596 0.5344 0.304 0.008 0.036 0.004 0.000 0.648
#> SRR957947 6 0.4206 0.5994 0.212 0.060 0.004 0.000 0.000 0.724
#> SRR957948 2 0.5914 0.0683 0.136 0.472 0.000 0.000 0.376 0.016
#> SRR957949 6 0.6460 0.3610 0.096 0.292 0.000 0.000 0.100 0.512
#> SRR957950 2 0.6118 -0.2686 0.376 0.388 0.000 0.004 0.000 0.232
#> SRR957951 5 0.5980 0.3239 0.004 0.108 0.320 0.000 0.536 0.032
#> SRR957952 3 0.6813 0.3594 0.172 0.004 0.524 0.000 0.192 0.108
#> SRR957953 4 0.7088 0.2749 0.020 0.236 0.264 0.436 0.000 0.044
#> SRR957954 4 0.2565 0.5361 0.016 0.000 0.104 0.872 0.000 0.008
#> SRR957956 3 0.5032 0.3198 0.020 0.020 0.560 0.388 0.000 0.012
#> SRR957957 4 0.3265 0.4654 0.004 0.164 0.004 0.812 0.012 0.004
#> SRR957958 4 0.5935 0.3838 0.012 0.196 0.200 0.580 0.000 0.012
#> SRR957959 3 0.4548 0.6383 0.028 0.004 0.736 0.000 0.176 0.056
#> SRR957960 2 0.5973 0.1170 0.388 0.484 0.000 0.000 0.068 0.060
#> SRR957961 3 0.2816 0.7386 0.000 0.028 0.876 0.000 0.060 0.036
#> SRR957962 4 0.2265 0.5465 0.028 0.024 0.004 0.912 0.000 0.032
#> SRR957963 4 0.2477 0.5413 0.024 0.032 0.000 0.896 0.000 0.048
#> SRR957964 3 0.3038 0.7595 0.044 0.004 0.860 0.012 0.000 0.080
#> SRR957965 5 0.5671 0.3897 0.008 0.272 0.028 0.028 0.624 0.040
#> SRR957966 4 0.5005 0.3792 0.148 0.068 0.000 0.712 0.000 0.072
#> SRR957967 4 0.7559 0.1518 0.036 0.348 0.068 0.356 0.000 0.192
#> SRR957968 3 0.4624 0.4334 0.004 0.028 0.652 0.300 0.000 0.016
#> SRR957969 3 0.4072 0.6018 0.004 0.004 0.736 0.216 0.000 0.040
#> SRR957970 2 0.3619 0.5331 0.044 0.836 0.008 0.000 0.060 0.052
#> SRR957971 3 0.0717 0.7933 0.008 0.000 0.976 0.000 0.000 0.016
#> SRR957972 3 0.2581 0.7774 0.044 0.008 0.892 0.000 0.008 0.048
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.719 0.839 0.925 0.4784 0.504 0.504
#> 3 3 0.480 0.606 0.793 0.2091 0.943 0.889
#> 4 4 0.414 0.382 0.658 0.1913 0.769 0.525
#> 5 5 0.485 0.491 0.656 0.1031 0.836 0.489
#> 6 6 0.574 0.538 0.651 0.0562 0.893 0.554
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
#> SRR957914 1 0.0000 0.9403 1.000 0.000
#> SRR957915 2 0.1184 0.8964 0.016 0.984
#> SRR957916 1 0.9996 -0.0988 0.512 0.488
#> SRR957884 1 0.7299 0.7077 0.796 0.204
#> SRR957885 1 0.0938 0.9369 0.988 0.012
#> SRR957886 2 0.1633 0.8995 0.024 0.976
#> SRR957887 1 0.1414 0.9333 0.980 0.020
#> SRR957888 1 0.0000 0.9403 1.000 0.000
#> SRR957889 1 0.0000 0.9403 1.000 0.000
#> SRR957890 1 0.0000 0.9403 1.000 0.000
#> SRR957891 2 0.0000 0.8858 0.000 1.000
#> SRR957893 1 0.0000 0.9403 1.000 0.000
#> SRR957892 1 0.0000 0.9403 1.000 0.000
#> SRR957894 2 0.1843 0.8989 0.028 0.972
#> SRR957895 1 0.8207 0.6084 0.744 0.256
#> SRR957896 2 0.6438 0.8158 0.164 0.836
#> SRR957897 1 0.8861 0.5249 0.696 0.304
#> SRR957898 1 0.0000 0.9403 1.000 0.000
#> SRR957899 2 0.1843 0.8994 0.028 0.972
#> SRR957900 1 0.9996 -0.0988 0.512 0.488
#> SRR957901 2 0.1633 0.8992 0.024 0.976
#> SRR957902 2 0.7376 0.7711 0.208 0.792
#> SRR957903 1 0.0938 0.9369 0.988 0.012
#> SRR957904 1 0.1414 0.9327 0.980 0.020
#> SRR957905 1 0.0376 0.9395 0.996 0.004
#> SRR957906 2 0.1633 0.8995 0.024 0.976
#> SRR957907 2 0.1633 0.8995 0.024 0.976
#> SRR957908 2 0.1414 0.8985 0.020 0.980
#> SRR957909 1 0.0000 0.9403 1.000 0.000
#> SRR957910 2 0.1414 0.8983 0.020 0.980
#> SRR957911 1 0.0000 0.9403 1.000 0.000
#> SRR957912 1 0.0000 0.9403 1.000 0.000
#> SRR957913 1 0.0938 0.9369 0.988 0.012
#> SRR957917 1 0.1843 0.9274 0.972 0.028
#> SRR957918 2 0.2423 0.8964 0.040 0.960
#> SRR957920 1 0.1843 0.9270 0.972 0.028
#> SRR957919 2 0.1633 0.8995 0.024 0.976
#> SRR957921 2 0.0376 0.8886 0.004 0.996
#> SRR957922 2 1.0000 0.1180 0.496 0.504
#> SRR957924 1 0.0376 0.9395 0.996 0.004
#> SRR957923 2 0.9896 0.3121 0.440 0.560
#> SRR957925 2 0.4431 0.8718 0.092 0.908
#> SRR957926 1 0.0000 0.9403 1.000 0.000
#> SRR957927 2 0.9170 0.5809 0.332 0.668
#> SRR957928 1 0.0376 0.9395 0.996 0.004
#> SRR957929 1 0.0000 0.9403 1.000 0.000
#> SRR957930 2 0.1414 0.8983 0.020 0.980
#> SRR957931 2 0.4022 0.8759 0.080 0.920
#> SRR957932 1 0.0000 0.9403 1.000 0.000
#> SRR957933 1 0.0000 0.9403 1.000 0.000
#> SRR957934 2 0.3733 0.8830 0.072 0.928
#> SRR957935 2 0.7139 0.7863 0.196 0.804
#> SRR957936 2 0.1414 0.8985 0.020 0.980
#> SRR957937 2 0.1414 0.8985 0.020 0.980
#> SRR957938 2 0.1843 0.8989 0.028 0.972
#> SRR957939 2 0.9896 0.3121 0.440 0.560
#> SRR957941 2 0.7139 0.7863 0.196 0.804
#> SRR957940 1 0.1184 0.9348 0.984 0.016
#> SRR957942 2 0.1633 0.8995 0.024 0.976
#> SRR957943 2 0.1414 0.8985 0.020 0.980
#> SRR957944 2 0.2778 0.8935 0.048 0.952
#> SRR957945 1 0.0938 0.9369 0.988 0.012
#> SRR957946 1 0.0000 0.9403 1.000 0.000
#> SRR957947 1 0.0000 0.9403 1.000 0.000
#> SRR957948 2 0.1843 0.8989 0.028 0.972
#> SRR957949 2 0.9608 0.4683 0.384 0.616
#> SRR957950 1 0.0000 0.9403 1.000 0.000
#> SRR957951 2 0.1633 0.8995 0.024 0.976
#> SRR957952 1 0.1843 0.9274 0.972 0.028
#> SRR957953 1 0.1184 0.9348 0.984 0.016
#> SRR957954 1 0.0000 0.9403 1.000 0.000
#> SRR957956 1 0.0672 0.9384 0.992 0.008
#> SRR957957 1 0.8861 0.5249 0.696 0.304
#> SRR957958 1 0.2423 0.9155 0.960 0.040
#> SRR957959 1 0.1843 0.9274 0.972 0.028
#> SRR957960 2 0.9129 0.6033 0.328 0.672
#> SRR957961 2 0.0376 0.8881 0.004 0.996
#> SRR957962 1 0.0000 0.9403 1.000 0.000
#> SRR957963 1 0.0000 0.9403 1.000 0.000
#> SRR957964 1 0.0000 0.9403 1.000 0.000
#> SRR957965 2 0.0000 0.8858 0.000 1.000
#> SRR957966 1 0.0000 0.9403 1.000 0.000
#> SRR957967 1 0.0000 0.9403 1.000 0.000
#> SRR957968 1 0.6343 0.7707 0.840 0.160
#> SRR957969 1 0.0000 0.9403 1.000 0.000
#> SRR957970 2 0.4431 0.8715 0.092 0.908
#> SRR957971 1 0.0376 0.9395 0.996 0.004
#> SRR957972 1 0.1843 0.9274 0.972 0.028
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957915 2 0.6062 0.1256 0.000 0.616 0.384
#> SRR957916 1 0.9668 -0.1116 0.436 0.344 0.220
#> SRR957884 1 0.4931 0.6780 0.784 0.212 0.004
#> SRR957885 1 0.1765 0.8721 0.956 0.004 0.040
#> SRR957886 2 0.5905 0.1874 0.000 0.648 0.352
#> SRR957887 1 0.2297 0.8697 0.944 0.020 0.036
#> SRR957888 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957889 1 0.3752 0.8612 0.856 0.000 0.144
#> SRR957890 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957891 3 0.5431 0.9183 0.000 0.284 0.716
#> SRR957893 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957892 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957894 2 0.3551 0.4801 0.000 0.868 0.132
#> SRR957895 1 0.6621 0.5642 0.684 0.284 0.032
#> SRR957896 2 0.8436 0.2658 0.108 0.568 0.324
#> SRR957897 1 0.6313 0.4976 0.676 0.308 0.016
#> SRR957898 1 0.3192 0.8618 0.888 0.000 0.112
#> SRR957899 2 0.6421 0.0733 0.004 0.572 0.424
#> SRR957900 1 0.9668 -0.1116 0.436 0.344 0.220
#> SRR957901 2 0.6682 -0.2675 0.008 0.504 0.488
#> SRR957902 2 0.8787 0.2981 0.188 0.584 0.228
#> SRR957903 1 0.1765 0.8721 0.956 0.004 0.040
#> SRR957904 1 0.2173 0.8698 0.944 0.008 0.048
#> SRR957905 1 0.0475 0.8737 0.992 0.004 0.004
#> SRR957906 2 0.3482 0.4723 0.000 0.872 0.128
#> SRR957907 2 0.6432 0.0694 0.004 0.568 0.428
#> SRR957908 2 0.3412 0.4721 0.000 0.876 0.124
#> SRR957909 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957910 2 0.5431 0.3194 0.000 0.716 0.284
#> SRR957911 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957912 1 0.4483 0.8454 0.848 0.024 0.128
#> SRR957913 1 0.1765 0.8721 0.956 0.004 0.040
#> SRR957917 1 0.2681 0.8650 0.932 0.028 0.040
#> SRR957918 2 0.2486 0.5116 0.008 0.932 0.060
#> SRR957920 1 0.2446 0.8674 0.936 0.012 0.052
#> SRR957919 2 0.3482 0.4751 0.000 0.872 0.128
#> SRR957921 3 0.5397 0.9111 0.000 0.280 0.720
#> SRR957922 1 0.9672 -0.1605 0.424 0.360 0.216
#> SRR957924 1 0.3682 0.8612 0.876 0.008 0.116
#> SRR957923 2 0.7353 0.2442 0.396 0.568 0.036
#> SRR957925 2 0.6124 0.4350 0.036 0.744 0.220
#> SRR957926 1 0.3340 0.8606 0.880 0.000 0.120
#> SRR957927 2 0.6541 0.3213 0.304 0.672 0.024
#> SRR957928 1 0.2261 0.8764 0.932 0.000 0.068
#> SRR957929 1 0.3607 0.8599 0.880 0.008 0.112
#> SRR957930 2 0.5431 0.3194 0.000 0.716 0.284
#> SRR957931 2 0.7386 -0.1418 0.032 0.508 0.460
#> SRR957932 1 0.1643 0.8753 0.956 0.000 0.044
#> SRR957933 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957934 2 0.3276 0.5130 0.024 0.908 0.068
#> SRR957935 2 0.5961 0.4532 0.112 0.792 0.096
#> SRR957936 2 0.3619 0.4684 0.000 0.864 0.136
#> SRR957937 2 0.6111 0.0346 0.000 0.604 0.396
#> SRR957938 2 0.2165 0.5062 0.000 0.936 0.064
#> SRR957939 2 0.7366 0.2418 0.400 0.564 0.036
#> SRR957941 2 0.5961 0.4532 0.112 0.792 0.096
#> SRR957940 1 0.1129 0.8714 0.976 0.020 0.004
#> SRR957942 2 0.3482 0.4751 0.000 0.872 0.128
#> SRR957943 2 0.3412 0.4721 0.000 0.876 0.124
#> SRR957944 2 0.3207 0.5121 0.012 0.904 0.084
#> SRR957945 1 0.1765 0.8721 0.956 0.004 0.040
#> SRR957946 1 0.3267 0.8609 0.884 0.000 0.116
#> SRR957947 1 0.3752 0.8612 0.856 0.000 0.144
#> SRR957948 2 0.5591 0.2996 0.000 0.696 0.304
#> SRR957949 2 0.9615 0.1928 0.324 0.456 0.220
#> SRR957950 1 0.4677 0.8411 0.840 0.028 0.132
#> SRR957951 2 0.6505 -0.0915 0.004 0.528 0.468
#> SRR957952 1 0.2681 0.8650 0.932 0.028 0.040
#> SRR957953 1 0.1129 0.8714 0.976 0.020 0.004
#> SRR957954 1 0.1529 0.8748 0.960 0.000 0.040
#> SRR957956 1 0.1999 0.8755 0.952 0.012 0.036
#> SRR957957 1 0.6313 0.4976 0.676 0.308 0.016
#> SRR957958 1 0.1878 0.8612 0.952 0.044 0.004
#> SRR957959 1 0.2681 0.8650 0.932 0.028 0.040
#> SRR957960 2 0.9162 0.2796 0.268 0.536 0.196
#> SRR957961 3 0.5363 0.9187 0.000 0.276 0.724
#> SRR957962 1 0.0000 0.8741 1.000 0.000 0.000
#> SRR957963 1 0.0000 0.8741 1.000 0.000 0.000
#> SRR957964 1 0.1643 0.8753 0.956 0.000 0.044
#> SRR957965 3 0.4887 0.8267 0.000 0.228 0.772
#> SRR957966 1 0.3192 0.8615 0.888 0.000 0.112
#> SRR957967 1 0.0000 0.8741 1.000 0.000 0.000
#> SRR957968 1 0.4062 0.7457 0.836 0.164 0.000
#> SRR957969 1 0.1643 0.8753 0.956 0.000 0.044
#> SRR957970 2 0.6264 0.4231 0.032 0.724 0.244
#> SRR957971 1 0.1411 0.8724 0.964 0.000 0.036
#> SRR957972 1 0.2681 0.8650 0.932 0.028 0.040
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.1389 0.681335 0.952 0.000 0.048 0.000
#> SRR957915 2 0.5155 -0.291667 0.000 0.528 0.004 0.468
#> SRR957916 3 0.9321 -0.223616 0.120 0.344 0.364 0.172
#> SRR957884 3 0.8141 0.389864 0.364 0.180 0.432 0.024
#> SRR957885 3 0.5040 0.639505 0.364 0.000 0.628 0.008
#> SRR957886 2 0.5781 -0.344450 0.000 0.492 0.028 0.480
#> SRR957887 3 0.4661 0.615857 0.348 0.000 0.652 0.000
#> SRR957888 1 0.0000 0.695071 1.000 0.000 0.000 0.000
#> SRR957889 1 0.2081 0.662360 0.916 0.000 0.084 0.000
#> SRR957890 1 0.1389 0.681335 0.952 0.000 0.048 0.000
#> SRR957891 4 0.2408 0.618062 0.000 0.104 0.000 0.896
#> SRR957893 1 0.0000 0.695071 1.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.695071 1.000 0.000 0.000 0.000
#> SRR957894 2 0.4206 0.431083 0.000 0.816 0.048 0.136
#> SRR957895 1 0.6993 0.167994 0.556 0.296 0.148 0.000
#> SRR957896 2 0.7508 0.000258 0.052 0.572 0.084 0.292
#> SRR957897 3 0.8194 0.379661 0.256 0.244 0.476 0.024
#> SRR957898 1 0.1792 0.662241 0.932 0.000 0.068 0.000
#> SRR957899 4 0.5281 0.407946 0.000 0.464 0.008 0.528
#> SRR957900 3 0.9321 -0.223616 0.120 0.344 0.364 0.172
#> SRR957901 4 0.4697 0.567665 0.000 0.356 0.000 0.644
#> SRR957902 2 0.8232 -0.042536 0.144 0.484 0.048 0.324
#> SRR957903 3 0.5040 0.639505 0.364 0.000 0.628 0.008
#> SRR957904 3 0.5165 0.639174 0.352 0.004 0.636 0.008
#> SRR957905 1 0.5611 -0.155351 0.564 0.000 0.412 0.024
#> SRR957906 2 0.5383 0.428977 0.000 0.740 0.100 0.160
#> SRR957907 4 0.5273 0.401456 0.000 0.456 0.008 0.536
#> SRR957908 2 0.5369 0.428392 0.000 0.740 0.096 0.164
#> SRR957909 1 0.0000 0.695071 1.000 0.000 0.000 0.000
#> SRR957910 2 0.4933 -0.233379 0.000 0.568 0.000 0.432
#> SRR957911 1 0.0000 0.695071 1.000 0.000 0.000 0.000
#> SRR957912 1 0.3372 0.609636 0.868 0.036 0.096 0.000
#> SRR957913 3 0.5040 0.639505 0.364 0.000 0.628 0.008
#> SRR957917 3 0.5594 0.546920 0.352 0.024 0.620 0.004
#> SRR957918 2 0.2489 0.453077 0.000 0.912 0.020 0.068
#> SRR957920 3 0.5506 0.637402 0.344 0.012 0.632 0.012
#> SRR957919 2 0.5339 0.432834 0.000 0.744 0.100 0.156
#> SRR957921 4 0.2799 0.615664 0.000 0.108 0.008 0.884
#> SRR957922 2 0.9291 0.080865 0.116 0.360 0.352 0.172
#> SRR957924 1 0.1970 0.682120 0.932 0.008 0.060 0.000
#> SRR957923 2 0.7672 0.230133 0.108 0.504 0.356 0.032
#> SRR957925 2 0.5281 0.298002 0.016 0.756 0.048 0.180
#> SRR957926 1 0.0592 0.694111 0.984 0.000 0.016 0.000
#> SRR957927 2 0.7104 0.346307 0.148 0.600 0.240 0.012
#> SRR957928 1 0.4761 0.262176 0.664 0.004 0.332 0.000
#> SRR957929 1 0.2730 0.648909 0.896 0.016 0.088 0.000
#> SRR957930 2 0.4933 -0.233379 0.000 0.568 0.000 0.432
#> SRR957931 4 0.6282 0.506441 0.004 0.368 0.056 0.572
#> SRR957932 3 0.4999 0.495391 0.492 0.000 0.508 0.000
#> SRR957933 1 0.0000 0.695071 1.000 0.000 0.000 0.000
#> SRR957934 2 0.2546 0.459122 0.008 0.920 0.028 0.044
#> SRR957935 2 0.4865 0.443637 0.056 0.792 0.140 0.012
#> SRR957936 2 0.5412 0.425437 0.000 0.736 0.096 0.168
#> SRR957937 4 0.6500 0.356073 0.000 0.376 0.080 0.544
#> SRR957938 2 0.3009 0.457391 0.000 0.892 0.052 0.056
#> SRR957939 2 0.7716 0.219485 0.112 0.500 0.356 0.032
#> SRR957941 2 0.4865 0.443637 0.056 0.792 0.140 0.012
#> SRR957940 1 0.5650 -0.175717 0.544 0.000 0.432 0.024
#> SRR957942 2 0.5383 0.430700 0.000 0.740 0.100 0.160
#> SRR957943 2 0.5369 0.428392 0.000 0.740 0.096 0.164
#> SRR957944 2 0.3594 0.443774 0.008 0.860 0.024 0.108
#> SRR957945 3 0.5040 0.639505 0.364 0.000 0.628 0.008
#> SRR957946 1 0.1389 0.681335 0.952 0.000 0.048 0.000
#> SRR957947 1 0.2081 0.662360 0.916 0.000 0.084 0.000
#> SRR957948 2 0.5291 -0.029984 0.000 0.652 0.024 0.324
#> SRR957949 2 0.8627 0.139559 0.076 0.476 0.296 0.152
#> SRR957950 1 0.4139 0.578459 0.816 0.040 0.144 0.000
#> SRR957951 4 0.5050 0.479121 0.000 0.408 0.004 0.588
#> SRR957952 3 0.5578 0.550780 0.348 0.024 0.624 0.004
#> SRR957953 1 0.5650 -0.175717 0.544 0.000 0.432 0.024
#> SRR957954 3 0.4994 0.510272 0.480 0.000 0.520 0.000
#> SRR957956 3 0.5147 0.526118 0.460 0.004 0.536 0.000
#> SRR957957 3 0.8194 0.379661 0.256 0.244 0.476 0.024
#> SRR957958 1 0.6441 -0.246148 0.520 0.028 0.428 0.024
#> SRR957959 3 0.5578 0.550780 0.348 0.024 0.624 0.004
#> SRR957960 2 0.8350 0.247527 0.208 0.548 0.084 0.160
#> SRR957961 4 0.2741 0.613104 0.000 0.096 0.012 0.892
#> SRR957962 1 0.5582 -0.142687 0.576 0.000 0.400 0.024
#> SRR957963 1 0.5582 -0.142687 0.576 0.000 0.400 0.024
#> SRR957964 3 0.4999 0.495391 0.492 0.000 0.508 0.000
#> SRR957965 4 0.3877 0.459364 0.000 0.048 0.112 0.840
#> SRR957966 1 0.0817 0.683577 0.976 0.000 0.024 0.000
#> SRR957967 1 0.5582 -0.142687 0.576 0.000 0.400 0.024
#> SRR957968 3 0.8010 0.400871 0.408 0.156 0.412 0.024
#> SRR957969 3 0.4999 0.495391 0.492 0.000 0.508 0.000
#> SRR957970 2 0.5440 0.277759 0.016 0.744 0.052 0.188
#> SRR957971 3 0.4746 0.634074 0.368 0.000 0.632 0.000
#> SRR957972 3 0.5578 0.550780 0.348 0.024 0.624 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.111 0.8154 0.964 0.000 0.012 0.024 0.000
#> SRR957915 5 0.565 0.4974 0.000 0.328 0.084 0.004 0.584
#> SRR957916 3 0.700 0.2924 0.068 0.060 0.556 0.024 0.292
#> SRR957884 4 0.560 0.4580 0.140 0.204 0.004 0.652 0.000
#> SRR957885 4 0.590 0.4530 0.164 0.000 0.200 0.628 0.008
#> SRR957886 5 0.520 0.4715 0.000 0.376 0.024 0.016 0.584
#> SRR957887 4 0.524 0.4851 0.096 0.008 0.204 0.692 0.000
#> SRR957888 1 0.173 0.8316 0.920 0.000 0.000 0.080 0.000
#> SRR957889 1 0.192 0.7957 0.928 0.000 0.040 0.032 0.000
#> SRR957890 1 0.111 0.8154 0.964 0.000 0.012 0.024 0.000
#> SRR957891 5 0.335 0.5329 0.000 0.052 0.060 0.024 0.864
#> SRR957893 1 0.173 0.8316 0.920 0.000 0.000 0.080 0.000
#> SRR957892 1 0.173 0.8316 0.920 0.000 0.000 0.080 0.000
#> SRR957894 2 0.646 0.3516 0.000 0.592 0.208 0.028 0.172
#> SRR957895 1 0.812 0.2405 0.452 0.220 0.200 0.120 0.008
#> SRR957896 5 0.728 0.2731 0.012 0.252 0.332 0.008 0.396
#> SRR957897 4 0.497 0.3502 0.044 0.300 0.004 0.652 0.000
#> SRR957898 1 0.269 0.7301 0.844 0.000 0.000 0.156 0.000
#> SRR957899 5 0.543 0.5706 0.000 0.232 0.120 0.000 0.648
#> SRR957900 3 0.700 0.2924 0.068 0.060 0.556 0.024 0.292
#> SRR957901 5 0.389 0.6119 0.000 0.160 0.040 0.004 0.796
#> SRR957902 5 0.795 0.3071 0.156 0.324 0.076 0.016 0.428
#> SRR957903 4 0.590 0.4530 0.164 0.000 0.200 0.628 0.008
#> SRR957904 4 0.590 0.4453 0.152 0.000 0.200 0.636 0.012
#> SRR957905 4 0.389 0.4975 0.320 0.000 0.000 0.680 0.000
#> SRR957906 2 0.210 0.5486 0.000 0.916 0.000 0.024 0.060
#> SRR957907 5 0.529 0.5781 0.000 0.244 0.088 0.004 0.664
#> SRR957908 2 0.208 0.5484 0.000 0.916 0.000 0.020 0.064
#> SRR957909 1 0.173 0.8316 0.920 0.000 0.000 0.080 0.000
#> SRR957910 5 0.548 0.4674 0.000 0.368 0.072 0.000 0.560
#> SRR957911 1 0.173 0.8316 0.920 0.000 0.000 0.080 0.000
#> SRR957912 1 0.416 0.7570 0.784 0.004 0.164 0.044 0.004
#> SRR957913 4 0.590 0.4530 0.164 0.000 0.200 0.628 0.008
#> SRR957917 3 0.683 0.2252 0.188 0.000 0.412 0.388 0.012
#> SRR957918 2 0.495 0.4679 0.000 0.732 0.116 0.008 0.144
#> SRR957920 4 0.622 0.4054 0.148 0.004 0.216 0.616 0.016
#> SRR957919 2 0.220 0.5515 0.000 0.916 0.004 0.024 0.056
#> SRR957921 5 0.345 0.5319 0.000 0.044 0.076 0.024 0.856
#> SRR957922 3 0.685 0.2612 0.064 0.064 0.560 0.016 0.296
#> SRR957924 1 0.351 0.8086 0.844 0.008 0.060 0.088 0.000
#> SRR957923 2 0.617 0.3427 0.012 0.500 0.072 0.408 0.008
#> SRR957925 2 0.720 -0.0298 0.000 0.432 0.252 0.024 0.292
#> SRR957926 1 0.195 0.8326 0.912 0.000 0.004 0.084 0.000
#> SRR957927 2 0.526 0.4275 0.036 0.664 0.020 0.276 0.004
#> SRR957928 1 0.572 0.2849 0.584 0.000 0.304 0.112 0.000
#> SRR957929 1 0.268 0.7788 0.880 0.000 0.100 0.016 0.004
#> SRR957930 5 0.548 0.4674 0.000 0.368 0.072 0.000 0.560
#> SRR957931 5 0.487 0.5921 0.000 0.124 0.140 0.004 0.732
#> SRR957932 4 0.630 0.4541 0.324 0.000 0.172 0.504 0.000
#> SRR957933 1 0.173 0.8316 0.920 0.000 0.000 0.080 0.000
#> SRR957934 2 0.537 0.4698 0.000 0.696 0.168 0.012 0.124
#> SRR957935 2 0.606 0.4507 0.008 0.596 0.308 0.024 0.064
#> SRR957936 2 0.243 0.5438 0.000 0.900 0.004 0.020 0.076
#> SRR957937 5 0.506 0.3930 0.000 0.428 0.012 0.016 0.544
#> SRR957938 2 0.482 0.4959 0.000 0.736 0.172 0.008 0.084
#> SRR957939 2 0.626 0.3378 0.016 0.496 0.072 0.408 0.008
#> SRR957941 2 0.606 0.4507 0.008 0.596 0.308 0.024 0.064
#> SRR957940 4 0.422 0.5043 0.300 0.008 0.004 0.688 0.000
#> SRR957942 2 0.226 0.5496 0.000 0.912 0.004 0.024 0.060
#> SRR957943 2 0.208 0.5484 0.000 0.916 0.000 0.020 0.064
#> SRR957944 2 0.544 0.3917 0.000 0.688 0.104 0.016 0.192
#> SRR957945 4 0.590 0.4530 0.164 0.000 0.200 0.628 0.008
#> SRR957946 1 0.111 0.8154 0.964 0.000 0.012 0.024 0.000
#> SRR957947 1 0.192 0.7957 0.928 0.000 0.040 0.032 0.000
#> SRR957948 5 0.692 0.3079 0.000 0.352 0.212 0.012 0.424
#> SRR957949 3 0.643 -0.0643 0.020 0.136 0.600 0.008 0.236
#> SRR957950 1 0.517 0.6791 0.712 0.004 0.164 0.116 0.004
#> SRR957951 5 0.483 0.5948 0.000 0.200 0.088 0.000 0.712
#> SRR957952 3 0.682 0.2295 0.184 0.000 0.412 0.392 0.012
#> SRR957953 4 0.422 0.5043 0.300 0.008 0.004 0.688 0.000
#> SRR957954 4 0.601 0.5177 0.252 0.000 0.172 0.576 0.000
#> SRR957956 4 0.595 0.5315 0.220 0.004 0.168 0.608 0.000
#> SRR957957 4 0.497 0.3502 0.044 0.300 0.004 0.652 0.000
#> SRR957958 4 0.463 0.5219 0.276 0.032 0.004 0.688 0.000
#> SRR957959 3 0.682 0.2295 0.184 0.000 0.412 0.392 0.012
#> SRR957960 2 0.907 -0.0538 0.124 0.316 0.268 0.044 0.248
#> SRR957961 5 0.373 0.5277 0.000 0.060 0.060 0.036 0.844
#> SRR957962 4 0.400 0.4859 0.344 0.000 0.000 0.656 0.000
#> SRR957963 4 0.400 0.4859 0.344 0.000 0.000 0.656 0.000
#> SRR957964 4 0.630 0.4541 0.324 0.000 0.172 0.504 0.000
#> SRR957965 5 0.613 0.3307 0.000 0.068 0.252 0.056 0.624
#> SRR957966 1 0.207 0.8132 0.896 0.000 0.000 0.104 0.000
#> SRR957967 4 0.400 0.4859 0.344 0.000 0.000 0.656 0.000
#> SRR957968 4 0.539 0.5114 0.160 0.156 0.004 0.680 0.000
#> SRR957969 4 0.626 0.4646 0.312 0.000 0.172 0.516 0.000
#> SRR957970 2 0.720 -0.0803 0.000 0.408 0.272 0.020 0.300
#> SRR957971 4 0.569 0.4544 0.168 0.000 0.204 0.628 0.000
#> SRR957972 3 0.682 0.2295 0.184 0.000 0.412 0.392 0.012
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.2176 0.8125 0.896 0.000 0.080 0.024 0.000 0.000
#> SRR957915 6 0.6944 -0.2435 0.000 0.240 0.008 0.040 0.336 0.376
#> SRR957916 6 0.4830 0.3628 0.024 0.000 0.044 0.096 0.080 0.756
#> SRR957884 4 0.6571 0.6851 0.088 0.192 0.164 0.552 0.000 0.004
#> SRR957885 3 0.1082 0.7642 0.040 0.000 0.956 0.000 0.004 0.000
#> SRR957886 5 0.6584 0.3507 0.000 0.352 0.012 0.012 0.392 0.232
#> SRR957887 3 0.3117 0.6246 0.052 0.016 0.852 0.080 0.000 0.000
#> SRR957888 1 0.0777 0.8248 0.972 0.000 0.024 0.004 0.000 0.000
#> SRR957889 1 0.3089 0.8030 0.860 0.000 0.080 0.032 0.004 0.024
#> SRR957890 1 0.2176 0.8125 0.896 0.000 0.080 0.024 0.000 0.000
#> SRR957891 5 0.4261 0.4442 0.000 0.048 0.004 0.032 0.768 0.148
#> SRR957893 1 0.0777 0.8248 0.972 0.000 0.024 0.004 0.000 0.000
#> SRR957892 1 0.0777 0.8248 0.972 0.000 0.024 0.004 0.000 0.000
#> SRR957894 2 0.7631 0.1093 0.000 0.364 0.020 0.192 0.108 0.316
#> SRR957895 1 0.7715 0.1769 0.416 0.160 0.020 0.196 0.000 0.208
#> SRR957896 6 0.5884 0.2893 0.000 0.152 0.008 0.044 0.168 0.628
#> SRR957897 4 0.6291 0.5941 0.056 0.300 0.128 0.516 0.000 0.000
#> SRR957898 1 0.3221 0.6664 0.736 0.000 0.264 0.000 0.000 0.000
#> SRR957899 5 0.6025 0.2893 0.000 0.164 0.000 0.012 0.428 0.396
#> SRR957900 6 0.4830 0.3628 0.024 0.000 0.044 0.096 0.080 0.756
#> SRR957901 5 0.5949 0.4546 0.000 0.108 0.008 0.024 0.540 0.320
#> SRR957902 5 0.8691 0.1375 0.096 0.260 0.068 0.024 0.292 0.260
#> SRR957903 3 0.1082 0.7642 0.040 0.000 0.956 0.000 0.004 0.000
#> SRR957904 3 0.1338 0.7590 0.032 0.004 0.952 0.004 0.008 0.000
#> SRR957905 4 0.5683 0.7146 0.220 0.004 0.224 0.552 0.000 0.000
#> SRR957906 2 0.0291 0.6475 0.000 0.992 0.004 0.004 0.000 0.000
#> SRR957907 5 0.6199 0.3237 0.000 0.176 0.004 0.012 0.436 0.372
#> SRR957908 2 0.0291 0.6479 0.000 0.992 0.000 0.004 0.004 0.000
#> SRR957909 1 0.0777 0.8248 0.972 0.000 0.024 0.004 0.000 0.000
#> SRR957910 5 0.6953 0.3246 0.000 0.292 0.020 0.020 0.364 0.304
#> SRR957911 1 0.0777 0.8248 0.972 0.000 0.024 0.004 0.000 0.000
#> SRR957912 1 0.3980 0.7465 0.784 0.000 0.024 0.056 0.000 0.136
#> SRR957913 3 0.1082 0.7642 0.040 0.000 0.956 0.000 0.004 0.000
#> SRR957917 3 0.6350 0.5567 0.100 0.000 0.576 0.076 0.012 0.236
#> SRR957918 2 0.5934 0.4743 0.000 0.588 0.008 0.072 0.060 0.272
#> SRR957920 3 0.2006 0.7556 0.032 0.008 0.928 0.004 0.012 0.016
#> SRR957919 2 0.0798 0.6495 0.000 0.976 0.004 0.004 0.004 0.012
#> SRR957921 5 0.4138 0.4366 0.000 0.036 0.004 0.032 0.772 0.156
#> SRR957922 6 0.4935 0.3650 0.024 0.000 0.068 0.084 0.072 0.752
#> SRR957924 1 0.3931 0.7829 0.804 0.000 0.052 0.088 0.000 0.056
#> SRR957923 4 0.6901 0.0655 0.036 0.404 0.072 0.412 0.000 0.076
#> SRR957925 6 0.6286 0.3157 0.004 0.268 0.008 0.072 0.080 0.568
#> SRR957926 1 0.1124 0.8256 0.956 0.000 0.036 0.008 0.000 0.000
#> SRR957927 2 0.5796 0.2944 0.040 0.652 0.116 0.172 0.000 0.020
#> SRR957928 1 0.6649 0.3201 0.500 0.000 0.220 0.068 0.000 0.212
#> SRR957929 1 0.3931 0.7763 0.804 0.000 0.072 0.044 0.000 0.080
#> SRR957930 5 0.6953 0.3246 0.000 0.292 0.020 0.020 0.364 0.304
#> SRR957931 5 0.6175 0.3979 0.000 0.068 0.036 0.024 0.500 0.372
#> SRR957932 3 0.3333 0.6782 0.192 0.000 0.784 0.024 0.000 0.000
#> SRR957933 1 0.0777 0.8248 0.972 0.000 0.024 0.004 0.000 0.000
#> SRR957934 2 0.5871 0.4574 0.004 0.580 0.012 0.056 0.044 0.304
#> SRR957935 2 0.5824 0.3787 0.004 0.516 0.040 0.056 0.004 0.380
#> SRR957936 2 0.1180 0.6451 0.000 0.960 0.004 0.008 0.024 0.004
#> SRR957937 2 0.6170 -0.3427 0.000 0.448 0.004 0.012 0.364 0.172
#> SRR957938 2 0.5882 0.4983 0.000 0.608 0.020 0.056 0.056 0.260
#> SRR957939 4 0.6916 0.0736 0.040 0.404 0.072 0.412 0.000 0.072
#> SRR957941 2 0.5824 0.3787 0.004 0.516 0.040 0.056 0.004 0.380
#> SRR957940 4 0.5907 0.7178 0.200 0.016 0.236 0.548 0.000 0.000
#> SRR957942 2 0.0912 0.6489 0.000 0.972 0.004 0.004 0.008 0.012
#> SRR957943 2 0.0291 0.6479 0.000 0.992 0.000 0.004 0.004 0.000
#> SRR957944 2 0.6110 0.3804 0.004 0.576 0.020 0.040 0.072 0.288
#> SRR957945 3 0.1082 0.7642 0.040 0.000 0.956 0.000 0.004 0.000
#> SRR957946 1 0.2176 0.8125 0.896 0.000 0.080 0.024 0.000 0.000
#> SRR957947 1 0.3089 0.8030 0.860 0.000 0.080 0.032 0.004 0.024
#> SRR957948 6 0.6769 0.1360 0.000 0.204 0.020 0.052 0.196 0.528
#> SRR957949 6 0.2429 0.4112 0.004 0.028 0.008 0.064 0.000 0.896
#> SRR957950 1 0.5105 0.6230 0.676 0.000 0.020 0.164 0.000 0.140
#> SRR957951 5 0.6021 0.3794 0.000 0.156 0.004 0.012 0.496 0.332
#> SRR957952 3 0.6310 0.5595 0.096 0.000 0.580 0.076 0.012 0.236
#> SRR957953 4 0.5907 0.7178 0.200 0.016 0.236 0.548 0.000 0.000
#> SRR957954 3 0.4311 0.5707 0.196 0.000 0.716 0.088 0.000 0.000
#> SRR957956 3 0.4874 0.4942 0.168 0.008 0.684 0.140 0.000 0.000
#> SRR957957 4 0.6291 0.5941 0.056 0.300 0.128 0.516 0.000 0.000
#> SRR957958 4 0.6063 0.7149 0.176 0.032 0.240 0.552 0.000 0.000
#> SRR957959 3 0.6310 0.5595 0.096 0.000 0.580 0.076 0.012 0.236
#> SRR957960 6 0.7521 0.3385 0.128 0.208 0.020 0.080 0.044 0.520
#> SRR957961 5 0.4616 0.4421 0.000 0.060 0.008 0.036 0.748 0.148
#> SRR957962 4 0.5618 0.7065 0.252 0.000 0.208 0.540 0.000 0.000
#> SRR957963 4 0.5618 0.7065 0.252 0.000 0.208 0.540 0.000 0.000
#> SRR957964 3 0.3333 0.6782 0.192 0.000 0.784 0.024 0.000 0.000
#> SRR957965 5 0.3419 0.2439 0.000 0.040 0.004 0.152 0.804 0.000
#> SRR957966 1 0.1765 0.7927 0.924 0.000 0.052 0.024 0.000 0.000
#> SRR957967 4 0.5618 0.7065 0.252 0.000 0.208 0.540 0.000 0.000
#> SRR957968 4 0.6611 0.6600 0.084 0.152 0.252 0.512 0.000 0.000
#> SRR957969 3 0.3529 0.6645 0.208 0.000 0.764 0.028 0.000 0.000
#> SRR957970 6 0.6118 0.3306 0.000 0.232 0.008 0.084 0.080 0.596
#> SRR957971 3 0.0937 0.7623 0.040 0.000 0.960 0.000 0.000 0.000
#> SRR957972 3 0.6310 0.5595 0.096 0.000 0.580 0.076 0.012 0.236
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.977 0.991 0.5042 0.495 0.495
#> 3 3 0.503 0.484 0.683 0.2780 0.880 0.767
#> 4 4 0.544 0.586 0.744 0.1437 0.743 0.446
#> 5 5 0.641 0.571 0.668 0.0797 0.907 0.659
#> 6 6 0.727 0.604 0.757 0.0435 0.915 0.624
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
#> SRR957914 1 0.000 1.000 1.000 0.000
#> SRR957915 2 0.000 0.981 0.000 1.000
#> SRR957916 2 0.000 0.981 0.000 1.000
#> SRR957884 1 0.000 1.000 1.000 0.000
#> SRR957885 1 0.000 1.000 1.000 0.000
#> SRR957886 2 0.000 0.981 0.000 1.000
#> SRR957887 1 0.000 1.000 1.000 0.000
#> SRR957888 1 0.000 1.000 1.000 0.000
#> SRR957889 1 0.000 1.000 1.000 0.000
#> SRR957890 1 0.000 1.000 1.000 0.000
#> SRR957891 2 0.000 0.981 0.000 1.000
#> SRR957893 1 0.000 1.000 1.000 0.000
#> SRR957892 1 0.000 1.000 1.000 0.000
#> SRR957894 2 0.000 0.981 0.000 1.000
#> SRR957895 1 0.000 1.000 1.000 0.000
#> SRR957896 2 0.000 0.981 0.000 1.000
#> SRR957897 1 0.000 1.000 1.000 0.000
#> SRR957898 1 0.000 1.000 1.000 0.000
#> SRR957899 2 0.000 0.981 0.000 1.000
#> SRR957900 2 0.000 0.981 0.000 1.000
#> SRR957901 2 0.000 0.981 0.000 1.000
#> SRR957902 2 0.000 0.981 0.000 1.000
#> SRR957903 1 0.000 1.000 1.000 0.000
#> SRR957904 1 0.000 1.000 1.000 0.000
#> SRR957905 1 0.000 1.000 1.000 0.000
#> SRR957906 2 0.000 0.981 0.000 1.000
#> SRR957907 2 0.000 0.981 0.000 1.000
#> SRR957908 2 0.000 0.981 0.000 1.000
#> SRR957909 1 0.000 1.000 1.000 0.000
#> SRR957910 2 0.000 0.981 0.000 1.000
#> SRR957911 1 0.000 1.000 1.000 0.000
#> SRR957912 1 0.000 1.000 1.000 0.000
#> SRR957913 1 0.000 1.000 1.000 0.000
#> SRR957917 1 0.000 1.000 1.000 0.000
#> SRR957918 2 0.000 0.981 0.000 1.000
#> SRR957920 2 0.998 0.102 0.476 0.524
#> SRR957919 2 0.000 0.981 0.000 1.000
#> SRR957921 2 0.000 0.981 0.000 1.000
#> SRR957922 2 0.000 0.981 0.000 1.000
#> SRR957924 1 0.000 1.000 1.000 0.000
#> SRR957923 2 0.000 0.981 0.000 1.000
#> SRR957925 2 0.000 0.981 0.000 1.000
#> SRR957926 1 0.000 1.000 1.000 0.000
#> SRR957927 2 0.000 0.981 0.000 1.000
#> SRR957928 1 0.000 1.000 1.000 0.000
#> SRR957929 1 0.000 1.000 1.000 0.000
#> SRR957930 2 0.000 0.981 0.000 1.000
#> SRR957931 2 0.000 0.981 0.000 1.000
#> SRR957932 1 0.000 1.000 1.000 0.000
#> SRR957933 1 0.000 1.000 1.000 0.000
#> SRR957934 2 0.000 0.981 0.000 1.000
#> SRR957935 2 0.000 0.981 0.000 1.000
#> SRR957936 2 0.000 0.981 0.000 1.000
#> SRR957937 2 0.000 0.981 0.000 1.000
#> SRR957938 2 0.000 0.981 0.000 1.000
#> SRR957939 1 0.000 1.000 1.000 0.000
#> SRR957941 2 0.000 0.981 0.000 1.000
#> SRR957940 1 0.000 1.000 1.000 0.000
#> SRR957942 2 0.000 0.981 0.000 1.000
#> SRR957943 2 0.000 0.981 0.000 1.000
#> SRR957944 2 0.000 0.981 0.000 1.000
#> SRR957945 1 0.000 1.000 1.000 0.000
#> SRR957946 1 0.000 1.000 1.000 0.000
#> SRR957947 1 0.000 1.000 1.000 0.000
#> SRR957948 2 0.000 0.981 0.000 1.000
#> SRR957949 2 0.000 0.981 0.000 1.000
#> SRR957950 1 0.000 1.000 1.000 0.000
#> SRR957951 2 0.000 0.981 0.000 1.000
#> SRR957952 1 0.000 1.000 1.000 0.000
#> SRR957953 1 0.000 1.000 1.000 0.000
#> SRR957954 1 0.000 1.000 1.000 0.000
#> SRR957956 1 0.000 1.000 1.000 0.000
#> SRR957957 2 0.866 0.598 0.288 0.712
#> SRR957958 1 0.000 1.000 1.000 0.000
#> SRR957959 2 0.000 0.981 0.000 1.000
#> SRR957960 2 0.000 0.981 0.000 1.000
#> SRR957961 2 0.000 0.981 0.000 1.000
#> SRR957962 1 0.000 1.000 1.000 0.000
#> SRR957963 1 0.000 1.000 1.000 0.000
#> SRR957964 1 0.000 1.000 1.000 0.000
#> SRR957965 2 0.000 0.981 0.000 1.000
#> SRR957966 1 0.000 1.000 1.000 0.000
#> SRR957967 1 0.000 1.000 1.000 0.000
#> SRR957968 1 0.000 1.000 1.000 0.000
#> SRR957969 1 0.000 1.000 1.000 0.000
#> SRR957970 2 0.000 0.981 0.000 1.000
#> SRR957971 1 0.000 1.000 1.000 0.000
#> SRR957972 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
#> SRR957914 1 0.6204 -0.0846 0.576 0.000 0.424
#> SRR957915 2 0.1289 0.8253 0.000 0.968 0.032
#> SRR957916 2 0.5882 0.6891 0.000 0.652 0.348
#> SRR957884 1 0.1525 0.4634 0.964 0.004 0.032
#> SRR957885 1 0.5138 0.2915 0.748 0.000 0.252
#> SRR957886 2 0.2878 0.8148 0.000 0.904 0.096
#> SRR957887 1 0.4172 0.3671 0.840 0.004 0.156
#> SRR957888 1 0.6079 0.0259 0.612 0.000 0.388
#> SRR957889 3 0.6192 0.5031 0.420 0.000 0.580
#> SRR957890 3 0.6302 0.3454 0.480 0.000 0.520
#> SRR957891 2 0.1031 0.8278 0.000 0.976 0.024
#> SRR957893 1 0.6008 0.0775 0.628 0.000 0.372
#> SRR957892 1 0.6045 0.0563 0.620 0.000 0.380
#> SRR957894 2 0.4346 0.8052 0.000 0.816 0.184
#> SRR957895 1 0.7083 -0.1076 0.592 0.028 0.380
#> SRR957896 2 0.4605 0.7983 0.000 0.796 0.204
#> SRR957897 1 0.5020 0.3058 0.796 0.012 0.192
#> SRR957898 1 0.6095 0.0434 0.608 0.000 0.392
#> SRR957899 2 0.3340 0.8211 0.000 0.880 0.120
#> SRR957900 2 0.5650 0.7273 0.000 0.688 0.312
#> SRR957901 2 0.0424 0.8279 0.000 0.992 0.008
#> SRR957902 2 0.4291 0.8049 0.000 0.820 0.180
#> SRR957903 1 0.5201 0.3028 0.760 0.004 0.236
#> SRR957904 1 0.6773 0.0686 0.636 0.024 0.340
#> SRR957905 1 0.0892 0.4748 0.980 0.000 0.020
#> SRR957906 2 0.5378 0.7566 0.008 0.756 0.236
#> SRR957907 2 0.0747 0.8291 0.000 0.984 0.016
#> SRR957908 2 0.5461 0.7515 0.008 0.748 0.244
#> SRR957909 1 0.6045 0.0563 0.620 0.000 0.380
#> SRR957910 2 0.0000 0.8276 0.000 1.000 0.000
#> SRR957911 1 0.6008 0.0775 0.628 0.000 0.372
#> SRR957912 3 0.6487 0.5528 0.268 0.032 0.700
#> SRR957913 1 0.5690 0.2310 0.708 0.004 0.288
#> SRR957917 3 0.7099 0.5195 0.384 0.028 0.588
#> SRR957918 2 0.4291 0.8041 0.000 0.820 0.180
#> SRR957920 1 0.9872 -0.1635 0.408 0.272 0.320
#> SRR957919 2 0.5580 0.7555 0.008 0.736 0.256
#> SRR957921 2 0.4002 0.7978 0.000 0.840 0.160
#> SRR957922 2 0.5835 0.6986 0.000 0.660 0.340
#> SRR957924 1 0.6252 -0.2164 0.556 0.000 0.444
#> SRR957923 2 0.8079 0.6836 0.112 0.628 0.260
#> SRR957925 2 0.4605 0.7978 0.000 0.796 0.204
#> SRR957926 1 0.6192 -0.0327 0.580 0.000 0.420
#> SRR957927 2 0.9301 0.4964 0.232 0.524 0.244
#> SRR957928 3 0.6180 0.5146 0.416 0.000 0.584
#> SRR957929 3 0.6460 0.4353 0.440 0.004 0.556
#> SRR957930 2 0.3116 0.8232 0.000 0.892 0.108
#> SRR957931 2 0.3116 0.8213 0.000 0.892 0.108
#> SRR957932 1 0.5591 0.1721 0.696 0.000 0.304
#> SRR957933 1 0.6140 0.0160 0.596 0.000 0.404
#> SRR957934 2 0.4555 0.8003 0.000 0.800 0.200
#> SRR957935 2 0.5497 0.7427 0.000 0.708 0.292
#> SRR957936 2 0.5016 0.7590 0.000 0.760 0.240
#> SRR957937 2 0.2796 0.8156 0.000 0.908 0.092
#> SRR957938 2 0.4291 0.8031 0.000 0.820 0.180
#> SRR957939 1 0.5986 0.2761 0.704 0.012 0.284
#> SRR957941 2 0.4887 0.7879 0.000 0.772 0.228
#> SRR957940 1 0.1163 0.4728 0.972 0.000 0.028
#> SRR957942 2 0.4931 0.7629 0.000 0.768 0.232
#> SRR957943 2 0.5461 0.7515 0.008 0.748 0.244
#> SRR957944 2 0.4702 0.7837 0.000 0.788 0.212
#> SRR957945 1 0.5363 0.2565 0.724 0.000 0.276
#> SRR957946 1 0.6274 -0.1651 0.544 0.000 0.456
#> SRR957947 1 0.6274 -0.1651 0.544 0.000 0.456
#> SRR957948 2 0.1753 0.8291 0.000 0.952 0.048
#> SRR957949 2 0.4974 0.7813 0.000 0.764 0.236
#> SRR957950 1 0.6302 -0.3089 0.520 0.000 0.480
#> SRR957951 2 0.4178 0.8080 0.000 0.828 0.172
#> SRR957952 3 0.8520 0.4180 0.280 0.132 0.588
#> SRR957953 1 0.0892 0.4748 0.980 0.000 0.020
#> SRR957954 1 0.0000 0.4783 1.000 0.000 0.000
#> SRR957956 1 0.0000 0.4783 1.000 0.000 0.000
#> SRR957957 1 0.9512 0.0590 0.492 0.248 0.260
#> SRR957958 1 0.0892 0.4748 0.980 0.000 0.020
#> SRR957959 2 0.5873 0.6817 0.004 0.684 0.312
#> SRR957960 2 0.4887 0.7850 0.000 0.772 0.228
#> SRR957961 2 0.2711 0.8202 0.000 0.912 0.088
#> SRR957962 1 0.0000 0.4783 1.000 0.000 0.000
#> SRR957963 1 0.3116 0.4154 0.892 0.000 0.108
#> SRR957964 1 0.4178 0.3740 0.828 0.000 0.172
#> SRR957965 2 0.4504 0.7801 0.000 0.804 0.196
#> SRR957966 1 0.6045 0.0563 0.620 0.000 0.380
#> SRR957967 1 0.0424 0.4777 0.992 0.000 0.008
#> SRR957968 1 0.0592 0.4771 0.988 0.000 0.012
#> SRR957969 1 0.3879 0.3927 0.848 0.000 0.152
#> SRR957970 2 0.4452 0.8027 0.000 0.808 0.192
#> SRR957971 1 0.5201 0.2953 0.760 0.004 0.236
#> SRR957972 3 0.7015 0.5166 0.392 0.024 0.584
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.259 0.8154 0.884 0.000 0.000 0.116
#> SRR957915 2 0.492 0.2159 0.008 0.656 0.336 0.000
#> SRR957916 2 0.389 0.6400 0.092 0.844 0.064 0.000
#> SRR957884 4 0.247 0.7013 0.056 0.000 0.028 0.916
#> SRR957885 4 0.669 0.5782 0.160 0.000 0.224 0.616
#> SRR957886 3 0.516 0.4138 0.004 0.480 0.516 0.000
#> SRR957887 4 0.390 0.6753 0.036 0.000 0.132 0.832
#> SRR957888 1 0.383 0.8050 0.792 0.004 0.000 0.204
#> SRR957889 1 0.253 0.7627 0.908 0.008 0.004 0.080
#> SRR957890 1 0.201 0.8061 0.920 0.000 0.000 0.080
#> SRR957891 2 0.470 0.2665 0.004 0.676 0.320 0.000
#> SRR957893 1 0.369 0.8039 0.792 0.000 0.000 0.208
#> SRR957892 1 0.373 0.8014 0.788 0.000 0.000 0.212
#> SRR957894 3 0.589 0.5511 0.020 0.464 0.508 0.008
#> SRR957895 1 0.698 0.2948 0.532 0.096 0.008 0.364
#> SRR957896 2 0.238 0.6547 0.072 0.916 0.004 0.008
#> SRR957897 4 0.545 0.4392 0.036 0.000 0.304 0.660
#> SRR957898 1 0.454 0.6896 0.760 0.000 0.024 0.216
#> SRR957899 2 0.145 0.6487 0.008 0.956 0.036 0.000
#> SRR957900 2 0.347 0.6502 0.072 0.868 0.060 0.000
#> SRR957901 2 0.434 0.3675 0.004 0.732 0.264 0.000
#> SRR957902 2 0.285 0.6600 0.056 0.904 0.036 0.004
#> SRR957903 4 0.642 0.6061 0.120 0.004 0.224 0.652
#> SRR957904 4 0.722 0.5660 0.160 0.016 0.224 0.600
#> SRR957905 4 0.247 0.7094 0.080 0.000 0.012 0.908
#> SRR957906 3 0.394 0.7413 0.000 0.236 0.764 0.000
#> SRR957907 2 0.385 0.4648 0.008 0.800 0.192 0.000
#> SRR957908 3 0.391 0.7439 0.000 0.232 0.768 0.000
#> SRR957909 1 0.365 0.8062 0.796 0.000 0.000 0.204
#> SRR957910 2 0.463 0.2882 0.004 0.688 0.308 0.000
#> SRR957911 1 0.373 0.8014 0.788 0.000 0.000 0.212
#> SRR957912 1 0.482 0.6314 0.808 0.112 0.024 0.056
#> SRR957913 4 0.682 0.5787 0.156 0.004 0.224 0.616
#> SRR957917 2 0.960 0.0609 0.320 0.336 0.204 0.140
#> SRR957918 3 0.597 0.5614 0.024 0.448 0.520 0.008
#> SRR957920 2 0.970 -0.1003 0.140 0.320 0.248 0.292
#> SRR957919 3 0.398 0.7423 0.000 0.240 0.760 0.000
#> SRR957921 2 0.432 0.5823 0.004 0.776 0.208 0.012
#> SRR957922 2 0.398 0.6426 0.096 0.844 0.056 0.004
#> SRR957924 1 0.358 0.8092 0.816 0.004 0.000 0.180
#> SRR957923 3 0.744 0.5785 0.020 0.220 0.584 0.176
#> SRR957925 2 0.260 0.6550 0.084 0.904 0.004 0.008
#> SRR957926 1 0.287 0.8068 0.864 0.000 0.000 0.136
#> SRR957927 3 0.518 0.4557 0.000 0.024 0.672 0.304
#> SRR957928 1 0.428 0.7025 0.820 0.000 0.076 0.104
#> SRR957929 1 0.194 0.7632 0.940 0.028 0.000 0.032
#> SRR957930 2 0.189 0.6418 0.008 0.936 0.056 0.000
#> SRR957931 2 0.172 0.6477 0.008 0.944 0.048 0.000
#> SRR957932 4 0.685 0.5690 0.192 0.000 0.208 0.600
#> SRR957933 1 0.322 0.8112 0.836 0.000 0.000 0.164
#> SRR957934 2 0.241 0.6560 0.084 0.908 0.000 0.008
#> SRR957935 2 0.406 0.6277 0.140 0.828 0.020 0.012
#> SRR957936 3 0.394 0.7441 0.000 0.236 0.764 0.000
#> SRR957937 2 0.517 -0.3758 0.004 0.508 0.488 0.000
#> SRR957938 3 0.599 0.5517 0.024 0.464 0.504 0.008
#> SRR957939 4 0.729 0.3271 0.124 0.016 0.300 0.560
#> SRR957941 2 0.292 0.6590 0.080 0.896 0.016 0.008
#> SRR957940 4 0.253 0.7107 0.100 0.000 0.004 0.896
#> SRR957942 3 0.394 0.7441 0.000 0.236 0.764 0.000
#> SRR957943 3 0.391 0.7439 0.000 0.232 0.768 0.000
#> SRR957944 3 0.518 0.6845 0.004 0.356 0.632 0.008
#> SRR957945 4 0.669 0.5782 0.160 0.000 0.224 0.616
#> SRR957946 1 0.215 0.8079 0.912 0.000 0.000 0.088
#> SRR957947 1 0.215 0.8079 0.912 0.000 0.000 0.088
#> SRR957948 2 0.465 0.4656 0.040 0.784 0.172 0.004
#> SRR957949 2 0.292 0.6537 0.104 0.884 0.004 0.008
#> SRR957950 1 0.360 0.7909 0.848 0.028 0.000 0.124
#> SRR957951 2 0.174 0.6521 0.004 0.940 0.056 0.000
#> SRR957952 2 0.953 0.1274 0.300 0.364 0.204 0.132
#> SRR957953 4 0.247 0.7094 0.080 0.000 0.012 0.908
#> SRR957954 4 0.215 0.7090 0.088 0.000 0.000 0.912
#> SRR957956 4 0.215 0.7090 0.088 0.000 0.000 0.912
#> SRR957957 3 0.543 0.1149 0.004 0.008 0.540 0.448
#> SRR957958 4 0.247 0.7094 0.080 0.000 0.012 0.908
#> SRR957959 2 0.821 0.4003 0.116 0.544 0.256 0.084
#> SRR957960 2 0.273 0.6551 0.092 0.896 0.004 0.008
#> SRR957961 2 0.600 0.2499 0.004 0.564 0.396 0.036
#> SRR957962 4 0.233 0.7082 0.088 0.000 0.004 0.908
#> SRR957963 4 0.458 0.3577 0.300 0.000 0.004 0.696
#> SRR957964 4 0.666 0.5952 0.220 0.000 0.160 0.620
#> SRR957965 3 0.489 0.6488 0.004 0.360 0.636 0.000
#> SRR957966 1 0.369 0.8040 0.792 0.000 0.000 0.208
#> SRR957967 4 0.233 0.7082 0.088 0.000 0.004 0.908
#> SRR957968 4 0.241 0.7090 0.084 0.000 0.008 0.908
#> SRR957969 4 0.605 0.6063 0.256 0.000 0.088 0.656
#> SRR957970 2 0.231 0.6544 0.068 0.920 0.004 0.008
#> SRR957971 4 0.620 0.6105 0.116 0.000 0.224 0.660
#> SRR957972 1 0.993 -0.1203 0.308 0.224 0.216 0.252
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.1205 0.8836 0.956 0.000 0.004 0.040 0.000
#> SRR957915 5 0.5714 0.1290 0.000 0.380 0.048 0.020 0.552
#> SRR957916 5 0.5018 0.5872 0.064 0.004 0.252 0.000 0.680
#> SRR957884 4 0.1661 0.7357 0.036 0.000 0.024 0.940 0.000
#> SRR957885 3 0.5624 0.6199 0.080 0.000 0.532 0.388 0.000
#> SRR957886 2 0.5222 0.3518 0.000 0.600 0.028 0.016 0.356
#> SRR957887 4 0.4965 -0.2564 0.024 0.004 0.404 0.568 0.000
#> SRR957888 1 0.2522 0.8835 0.880 0.000 0.012 0.108 0.000
#> SRR957889 1 0.1682 0.8489 0.940 0.000 0.044 0.012 0.004
#> SRR957890 1 0.0912 0.8703 0.972 0.000 0.012 0.016 0.000
#> SRR957891 5 0.5652 0.1493 0.000 0.380 0.044 0.020 0.556
#> SRR957893 1 0.2338 0.8846 0.884 0.000 0.004 0.112 0.000
#> SRR957892 1 0.2389 0.8827 0.880 0.000 0.004 0.116 0.000
#> SRR957894 2 0.6367 0.2992 0.000 0.464 0.144 0.004 0.388
#> SRR957895 4 0.8076 0.1652 0.284 0.000 0.192 0.400 0.124
#> SRR957896 5 0.4426 0.6095 0.020 0.020 0.220 0.000 0.740
#> SRR957897 4 0.4829 0.4036 0.000 0.300 0.036 0.660 0.004
#> SRR957898 1 0.4078 0.7445 0.784 0.000 0.068 0.148 0.000
#> SRR957899 5 0.3920 0.5363 0.004 0.096 0.056 0.016 0.828
#> SRR957900 5 0.4323 0.6103 0.028 0.004 0.240 0.000 0.728
#> SRR957901 5 0.5180 0.2525 0.000 0.324 0.032 0.016 0.628
#> SRR957902 5 0.5035 0.6237 0.044 0.028 0.216 0.000 0.712
#> SRR957903 3 0.5492 0.6119 0.068 0.000 0.536 0.396 0.000
#> SRR957904 3 0.5598 0.6297 0.080 0.000 0.544 0.376 0.000
#> SRR957905 4 0.0794 0.7464 0.028 0.000 0.000 0.972 0.000
#> SRR957906 2 0.1082 0.6495 0.000 0.964 0.000 0.008 0.028
#> SRR957907 5 0.4529 0.4276 0.000 0.220 0.040 0.008 0.732
#> SRR957908 2 0.0451 0.6557 0.000 0.988 0.000 0.004 0.008
#> SRR957909 1 0.2338 0.8846 0.884 0.000 0.004 0.112 0.000
#> SRR957910 5 0.5493 0.1700 0.000 0.376 0.040 0.016 0.568
#> SRR957911 1 0.2389 0.8827 0.880 0.000 0.004 0.116 0.000
#> SRR957912 1 0.5116 0.5309 0.668 0.000 0.248 0.000 0.084
#> SRR957913 3 0.5607 0.6287 0.080 0.000 0.540 0.380 0.000
#> SRR957917 3 0.5986 0.4245 0.192 0.000 0.640 0.020 0.148
#> SRR957918 2 0.6111 0.3634 0.000 0.532 0.124 0.004 0.340
#> SRR957920 3 0.5191 0.5514 0.048 0.004 0.752 0.084 0.112
#> SRR957919 2 0.1988 0.6392 0.000 0.928 0.016 0.008 0.048
#> SRR957921 5 0.5731 0.4322 0.000 0.184 0.128 0.020 0.668
#> SRR957922 5 0.5398 0.5893 0.064 0.012 0.280 0.000 0.644
#> SRR957924 1 0.2416 0.8856 0.888 0.000 0.012 0.100 0.000
#> SRR957923 2 0.7984 0.4069 0.000 0.448 0.140 0.220 0.192
#> SRR957925 5 0.5145 0.5883 0.024 0.024 0.312 0.000 0.640
#> SRR957926 1 0.1831 0.8854 0.920 0.000 0.004 0.076 0.000
#> SRR957927 2 0.4297 0.4057 0.000 0.692 0.020 0.288 0.000
#> SRR957928 1 0.4623 0.4866 0.680 0.004 0.292 0.020 0.004
#> SRR957929 1 0.1836 0.8465 0.936 0.000 0.040 0.008 0.016
#> SRR957930 5 0.4096 0.6218 0.000 0.052 0.176 0.000 0.772
#> SRR957931 5 0.4379 0.5965 0.000 0.044 0.180 0.012 0.764
#> SRR957932 3 0.5752 0.6175 0.092 0.000 0.524 0.384 0.000
#> SRR957933 1 0.1792 0.8866 0.916 0.000 0.000 0.084 0.000
#> SRR957934 5 0.4669 0.6046 0.008 0.020 0.308 0.000 0.664
#> SRR957935 5 0.5460 0.5904 0.044 0.020 0.320 0.000 0.616
#> SRR957936 2 0.0404 0.6555 0.000 0.988 0.000 0.000 0.012
#> SRR957937 2 0.5270 0.3360 0.000 0.584 0.028 0.016 0.372
#> SRR957938 2 0.6160 0.3353 0.000 0.512 0.124 0.004 0.360
#> SRR957939 4 0.6877 0.4207 0.088 0.204 0.080 0.612 0.016
#> SRR957941 5 0.4995 0.6084 0.020 0.020 0.316 0.000 0.644
#> SRR957940 4 0.2792 0.6826 0.040 0.004 0.072 0.884 0.000
#> SRR957942 2 0.0566 0.6555 0.000 0.984 0.000 0.004 0.012
#> SRR957943 2 0.0451 0.6557 0.000 0.988 0.000 0.004 0.008
#> SRR957944 2 0.5498 0.4709 0.000 0.612 0.096 0.000 0.292
#> SRR957945 3 0.5654 0.6274 0.084 0.000 0.536 0.380 0.000
#> SRR957946 1 0.1082 0.8778 0.964 0.000 0.008 0.028 0.000
#> SRR957947 1 0.0992 0.8770 0.968 0.000 0.008 0.024 0.000
#> SRR957948 5 0.6251 0.4026 0.016 0.196 0.124 0.020 0.644
#> SRR957949 5 0.4903 0.6045 0.036 0.012 0.272 0.000 0.680
#> SRR957950 1 0.2844 0.8488 0.892 0.000 0.044 0.040 0.024
#> SRR957951 5 0.3947 0.5429 0.000 0.072 0.084 0.020 0.824
#> SRR957952 3 0.5936 0.3994 0.172 0.000 0.648 0.020 0.160
#> SRR957953 4 0.0794 0.7464 0.028 0.000 0.000 0.972 0.000
#> SRR957954 4 0.2426 0.7054 0.036 0.000 0.064 0.900 0.000
#> SRR957956 4 0.2426 0.7054 0.036 0.000 0.064 0.900 0.000
#> SRR957957 2 0.5161 0.0716 0.000 0.532 0.032 0.432 0.004
#> SRR957958 4 0.0794 0.7464 0.028 0.000 0.000 0.972 0.000
#> SRR957959 3 0.5320 0.1143 0.048 0.008 0.636 0.004 0.304
#> SRR957960 5 0.5235 0.5903 0.036 0.020 0.300 0.000 0.644
#> SRR957961 5 0.6869 0.0557 0.000 0.348 0.172 0.020 0.460
#> SRR957962 4 0.1124 0.7459 0.036 0.004 0.000 0.960 0.000
#> SRR957963 4 0.3456 0.5984 0.204 0.004 0.004 0.788 0.000
#> SRR957964 3 0.5905 0.5552 0.088 0.004 0.488 0.420 0.000
#> SRR957965 2 0.5324 0.4197 0.000 0.636 0.040 0.020 0.304
#> SRR957966 1 0.2389 0.8827 0.880 0.000 0.004 0.116 0.000
#> SRR957967 4 0.1124 0.7459 0.036 0.004 0.000 0.960 0.000
#> SRR957968 4 0.0880 0.7464 0.032 0.000 0.000 0.968 0.000
#> SRR957969 4 0.5927 -0.0139 0.128 0.004 0.280 0.588 0.000
#> SRR957970 5 0.4675 0.5881 0.020 0.020 0.256 0.000 0.704
#> SRR957971 3 0.5689 0.6130 0.072 0.004 0.528 0.396 0.000
#> SRR957972 3 0.5036 0.5468 0.180 0.000 0.732 0.036 0.052
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.1223 0.8910 0.960 0.004 0.016 0.008 0.000 0.012
#> SRR957915 6 0.4330 0.7112 0.000 0.132 0.008 0.000 0.116 0.744
#> SRR957916 5 0.7024 0.2180 0.032 0.032 0.188 0.000 0.440 0.308
#> SRR957884 4 0.1152 0.7986 0.004 0.016 0.008 0.964 0.004 0.004
#> SRR957885 3 0.3559 0.6937 0.012 0.000 0.744 0.240 0.000 0.004
#> SRR957886 6 0.4079 0.4885 0.000 0.380 0.004 0.000 0.008 0.608
#> SRR957887 3 0.4453 0.3065 0.004 0.000 0.524 0.452 0.000 0.020
#> SRR957888 1 0.1699 0.8935 0.936 0.008 0.004 0.040 0.000 0.012
#> SRR957889 1 0.4877 0.7272 0.752 0.032 0.116 0.000 0.048 0.052
#> SRR957890 1 0.1092 0.8814 0.960 0.000 0.020 0.000 0.000 0.020
#> SRR957891 6 0.3481 0.7311 0.000 0.160 0.000 0.000 0.048 0.792
#> SRR957893 1 0.1906 0.8923 0.928 0.008 0.008 0.040 0.000 0.016
#> SRR957892 1 0.1699 0.8935 0.936 0.008 0.004 0.040 0.000 0.012
#> SRR957894 5 0.6096 0.2703 0.004 0.296 0.020 0.004 0.536 0.140
#> SRR957895 4 0.7185 0.1172 0.116 0.024 0.024 0.436 0.360 0.040
#> SRR957896 5 0.3813 0.5508 0.004 0.008 0.020 0.004 0.768 0.196
#> SRR957897 4 0.3879 0.5771 0.000 0.220 0.012 0.748 0.008 0.012
#> SRR957898 1 0.4554 0.6721 0.732 0.000 0.156 0.092 0.000 0.020
#> SRR957899 6 0.3290 0.5542 0.000 0.004 0.000 0.000 0.252 0.744
#> SRR957900 5 0.6856 0.2086 0.020 0.032 0.188 0.000 0.440 0.320
#> SRR957901 6 0.3694 0.7051 0.000 0.076 0.000 0.000 0.140 0.784
#> SRR957902 5 0.5940 0.3780 0.012 0.004 0.124 0.004 0.516 0.340
#> SRR957903 3 0.3559 0.6937 0.012 0.000 0.744 0.240 0.000 0.004
#> SRR957904 3 0.3437 0.6966 0.008 0.000 0.752 0.236 0.000 0.004
#> SRR957905 4 0.0665 0.8052 0.004 0.008 0.008 0.980 0.000 0.000
#> SRR957906 2 0.2101 0.7746 0.000 0.892 0.004 0.000 0.004 0.100
#> SRR957907 5 0.4770 0.1035 0.000 0.040 0.000 0.004 0.508 0.448
#> SRR957908 2 0.1812 0.7916 0.000 0.912 0.000 0.000 0.008 0.080
#> SRR957909 1 0.1699 0.8935 0.936 0.008 0.004 0.040 0.000 0.012
#> SRR957910 6 0.3686 0.7291 0.000 0.124 0.000 0.000 0.088 0.788
#> SRR957911 1 0.1699 0.8935 0.936 0.008 0.004 0.040 0.000 0.012
#> SRR957912 1 0.6521 0.4375 0.564 0.024 0.128 0.000 0.232 0.052
#> SRR957913 3 0.3437 0.6966 0.008 0.000 0.752 0.236 0.000 0.004
#> SRR957917 3 0.6597 0.3427 0.092 0.020 0.592 0.004 0.184 0.108
#> SRR957918 5 0.6088 0.2686 0.004 0.300 0.024 0.004 0.540 0.128
#> SRR957920 3 0.3159 0.6088 0.000 0.000 0.856 0.032 0.056 0.056
#> SRR957919 2 0.2052 0.7819 0.000 0.912 0.004 0.000 0.028 0.056
#> SRR957921 6 0.3725 0.5990 0.000 0.012 0.056 0.000 0.136 0.796
#> SRR957922 5 0.6660 0.3333 0.032 0.028 0.188 0.000 0.532 0.220
#> SRR957924 1 0.1226 0.8943 0.952 0.000 0.004 0.040 0.000 0.004
#> SRR957923 5 0.7091 -0.1125 0.004 0.380 0.024 0.144 0.400 0.048
#> SRR957925 5 0.2454 0.5766 0.000 0.016 0.000 0.004 0.876 0.104
#> SRR957926 1 0.1749 0.8920 0.936 0.004 0.012 0.032 0.000 0.016
#> SRR957927 2 0.3624 0.6139 0.000 0.756 0.016 0.220 0.000 0.008
#> SRR957928 1 0.6112 0.3890 0.560 0.020 0.304 0.000 0.060 0.056
#> SRR957929 1 0.0767 0.8843 0.976 0.000 0.012 0.000 0.004 0.008
#> SRR957930 5 0.5343 0.2156 0.000 0.012 0.072 0.000 0.472 0.444
#> SRR957931 6 0.4476 0.3511 0.000 0.000 0.052 0.000 0.308 0.640
#> SRR957932 3 0.4370 0.6791 0.028 0.004 0.712 0.236 0.000 0.020
#> SRR957933 1 0.1391 0.8933 0.944 0.000 0.000 0.040 0.000 0.016
#> SRR957934 5 0.2791 0.5818 0.000 0.008 0.024 0.008 0.872 0.088
#> SRR957935 5 0.4003 0.5542 0.008 0.008 0.076 0.004 0.796 0.108
#> SRR957936 2 0.1866 0.7905 0.000 0.908 0.000 0.000 0.008 0.084
#> SRR957937 6 0.3330 0.6411 0.000 0.284 0.000 0.000 0.000 0.716
#> SRR957938 5 0.5830 0.2123 0.004 0.336 0.012 0.004 0.532 0.112
#> SRR957939 4 0.5457 0.5609 0.040 0.136 0.016 0.708 0.088 0.012
#> SRR957941 5 0.3893 0.5544 0.004 0.008 0.076 0.004 0.800 0.108
#> SRR957940 4 0.2932 0.7316 0.004 0.008 0.116 0.852 0.000 0.020
#> SRR957942 2 0.2009 0.7891 0.000 0.904 0.004 0.000 0.008 0.084
#> SRR957943 2 0.1812 0.7916 0.000 0.912 0.000 0.000 0.008 0.080
#> SRR957944 2 0.5932 0.0846 0.004 0.496 0.020 0.004 0.380 0.096
#> SRR957945 3 0.3533 0.6956 0.012 0.000 0.748 0.236 0.000 0.004
#> SRR957946 1 0.1148 0.8849 0.960 0.000 0.020 0.004 0.000 0.016
#> SRR957947 1 0.1485 0.8774 0.944 0.000 0.024 0.000 0.004 0.028
#> SRR957948 5 0.5214 0.1837 0.004 0.032 0.028 0.000 0.532 0.404
#> SRR957949 5 0.3183 0.5727 0.004 0.020 0.036 0.000 0.852 0.088
#> SRR957950 1 0.2290 0.8762 0.916 0.008 0.024 0.008 0.012 0.032
#> SRR957951 6 0.3025 0.6120 0.000 0.000 0.024 0.000 0.156 0.820
#> SRR957952 3 0.6595 0.3082 0.088 0.020 0.576 0.000 0.200 0.116
#> SRR957953 4 0.0696 0.8051 0.004 0.008 0.004 0.980 0.000 0.004
#> SRR957954 4 0.3128 0.7341 0.012 0.004 0.104 0.848 0.000 0.032
#> SRR957956 4 0.3029 0.7328 0.008 0.004 0.104 0.852 0.000 0.032
#> SRR957957 2 0.4273 0.3757 0.000 0.628 0.012 0.348 0.000 0.012
#> SRR957958 4 0.0551 0.8057 0.004 0.008 0.004 0.984 0.000 0.000
#> SRR957959 3 0.6384 0.0860 0.012 0.016 0.484 0.000 0.184 0.304
#> SRR957960 5 0.3479 0.5718 0.004 0.020 0.020 0.004 0.824 0.128
#> SRR957961 6 0.4016 0.6996 0.000 0.132 0.088 0.000 0.008 0.772
#> SRR957962 4 0.1148 0.8036 0.016 0.000 0.004 0.960 0.000 0.020
#> SRR957963 4 0.2940 0.7380 0.100 0.008 0.008 0.860 0.000 0.024
#> SRR957964 3 0.4901 0.6339 0.028 0.004 0.660 0.268 0.000 0.040
#> SRR957965 6 0.4293 0.3138 0.004 0.448 0.012 0.000 0.000 0.536
#> SRR957966 1 0.1699 0.8935 0.936 0.008 0.004 0.040 0.000 0.012
#> SRR957967 4 0.0837 0.8046 0.004 0.000 0.004 0.972 0.000 0.020
#> SRR957968 4 0.1565 0.7948 0.004 0.000 0.028 0.940 0.000 0.028
#> SRR957969 4 0.5107 0.3620 0.032 0.004 0.284 0.636 0.000 0.044
#> SRR957970 5 0.3413 0.5627 0.000 0.020 0.016 0.004 0.816 0.144
#> SRR957971 3 0.3934 0.6846 0.012 0.000 0.728 0.240 0.000 0.020
#> SRR957972 3 0.4808 0.5359 0.080 0.016 0.768 0.008 0.064 0.064
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.994 0.997 0.5049 0.495 0.495
#> 3 3 0.730 0.677 0.856 0.2915 0.824 0.655
#> 4 4 0.684 0.678 0.782 0.1265 0.862 0.646
#> 5 5 0.734 0.654 0.794 0.0871 0.871 0.578
#> 6 6 0.778 0.645 0.808 0.0431 0.910 0.602
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
#> SRR957914 1 0.000 1.000 1.000 0.000
#> SRR957915 2 0.000 0.994 0.000 1.000
#> SRR957916 2 0.000 0.994 0.000 1.000
#> SRR957884 1 0.000 1.000 1.000 0.000
#> SRR957885 1 0.000 1.000 1.000 0.000
#> SRR957886 2 0.000 0.994 0.000 1.000
#> SRR957887 1 0.000 1.000 1.000 0.000
#> SRR957888 1 0.000 1.000 1.000 0.000
#> SRR957889 1 0.000 1.000 1.000 0.000
#> SRR957890 1 0.000 1.000 1.000 0.000
#> SRR957891 2 0.000 0.994 0.000 1.000
#> SRR957893 1 0.000 1.000 1.000 0.000
#> SRR957892 1 0.000 1.000 1.000 0.000
#> SRR957894 2 0.000 0.994 0.000 1.000
#> SRR957895 1 0.000 1.000 1.000 0.000
#> SRR957896 2 0.000 0.994 0.000 1.000
#> SRR957897 1 0.000 1.000 1.000 0.000
#> SRR957898 1 0.000 1.000 1.000 0.000
#> SRR957899 2 0.000 0.994 0.000 1.000
#> SRR957900 2 0.000 0.994 0.000 1.000
#> SRR957901 2 0.000 0.994 0.000 1.000
#> SRR957902 2 0.000 0.994 0.000 1.000
#> SRR957903 1 0.000 1.000 1.000 0.000
#> SRR957904 1 0.000 1.000 1.000 0.000
#> SRR957905 1 0.000 1.000 1.000 0.000
#> SRR957906 2 0.000 0.994 0.000 1.000
#> SRR957907 2 0.000 0.994 0.000 1.000
#> SRR957908 2 0.000 0.994 0.000 1.000
#> SRR957909 1 0.000 1.000 1.000 0.000
#> SRR957910 2 0.000 0.994 0.000 1.000
#> SRR957911 1 0.000 1.000 1.000 0.000
#> SRR957912 1 0.000 1.000 1.000 0.000
#> SRR957913 1 0.000 1.000 1.000 0.000
#> SRR957917 1 0.000 1.000 1.000 0.000
#> SRR957918 2 0.000 0.994 0.000 1.000
#> SRR957920 2 0.204 0.963 0.032 0.968
#> SRR957919 2 0.000 0.994 0.000 1.000
#> SRR957921 2 0.000 0.994 0.000 1.000
#> SRR957922 2 0.000 0.994 0.000 1.000
#> SRR957924 1 0.000 1.000 1.000 0.000
#> SRR957923 2 0.000 0.994 0.000 1.000
#> SRR957925 2 0.000 0.994 0.000 1.000
#> SRR957926 1 0.000 1.000 1.000 0.000
#> SRR957927 2 0.000 0.994 0.000 1.000
#> SRR957928 1 0.000 1.000 1.000 0.000
#> SRR957929 1 0.000 1.000 1.000 0.000
#> SRR957930 2 0.000 0.994 0.000 1.000
#> SRR957931 2 0.000 0.994 0.000 1.000
#> SRR957932 1 0.000 1.000 1.000 0.000
#> SRR957933 1 0.000 1.000 1.000 0.000
#> SRR957934 2 0.000 0.994 0.000 1.000
#> SRR957935 2 0.000 0.994 0.000 1.000
#> SRR957936 2 0.000 0.994 0.000 1.000
#> SRR957937 2 0.000 0.994 0.000 1.000
#> SRR957938 2 0.000 0.994 0.000 1.000
#> SRR957939 1 0.000 1.000 1.000 0.000
#> SRR957941 2 0.000 0.994 0.000 1.000
#> SRR957940 1 0.000 1.000 1.000 0.000
#> SRR957942 2 0.000 0.994 0.000 1.000
#> SRR957943 2 0.000 0.994 0.000 1.000
#> SRR957944 2 0.000 0.994 0.000 1.000
#> SRR957945 1 0.000 1.000 1.000 0.000
#> SRR957946 1 0.000 1.000 1.000 0.000
#> SRR957947 1 0.000 1.000 1.000 0.000
#> SRR957948 2 0.000 0.994 0.000 1.000
#> SRR957949 2 0.000 0.994 0.000 1.000
#> SRR957950 1 0.000 1.000 1.000 0.000
#> SRR957951 2 0.000 0.994 0.000 1.000
#> SRR957952 1 0.000 1.000 1.000 0.000
#> SRR957953 1 0.000 1.000 1.000 0.000
#> SRR957954 1 0.000 1.000 1.000 0.000
#> SRR957956 1 0.000 1.000 1.000 0.000
#> SRR957957 2 0.722 0.751 0.200 0.800
#> SRR957958 1 0.000 1.000 1.000 0.000
#> SRR957959 2 0.000 0.994 0.000 1.000
#> SRR957960 2 0.000 0.994 0.000 1.000
#> SRR957961 2 0.000 0.994 0.000 1.000
#> SRR957962 1 0.000 1.000 1.000 0.000
#> SRR957963 1 0.000 1.000 1.000 0.000
#> SRR957964 1 0.000 1.000 1.000 0.000
#> SRR957965 2 0.000 0.994 0.000 1.000
#> SRR957966 1 0.000 1.000 1.000 0.000
#> SRR957967 1 0.000 1.000 1.000 0.000
#> SRR957968 1 0.000 1.000 1.000 0.000
#> SRR957969 1 0.000 1.000 1.000 0.000
#> SRR957970 2 0.000 0.994 0.000 1.000
#> SRR957971 1 0.000 1.000 1.000 0.000
#> SRR957972 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
#> SRR957914 3 0.6309 0.662 0.496 0.000 0.504
#> SRR957915 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957916 2 0.4058 0.879 0.044 0.880 0.076
#> SRR957884 1 0.6154 0.699 0.592 0.000 0.408
#> SRR957885 3 0.0237 0.444 0.004 0.000 0.996
#> SRR957886 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957887 3 0.6307 -0.622 0.488 0.000 0.512
#> SRR957888 3 0.6309 0.660 0.500 0.000 0.500
#> SRR957889 3 0.6168 0.662 0.412 0.000 0.588
#> SRR957890 3 0.6280 0.665 0.460 0.000 0.540
#> SRR957891 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957893 3 0.6302 0.660 0.480 0.000 0.520
#> SRR957892 3 0.6302 0.660 0.480 0.000 0.520
#> SRR957894 2 0.0237 0.959 0.004 0.996 0.000
#> SRR957895 1 0.0592 0.182 0.988 0.000 0.012
#> SRR957896 2 0.0592 0.956 0.012 0.988 0.000
#> SRR957897 1 0.6154 0.699 0.592 0.000 0.408
#> SRR957898 3 0.4654 0.520 0.208 0.000 0.792
#> SRR957899 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957900 2 0.3406 0.898 0.028 0.904 0.068
#> SRR957901 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957903 3 0.0424 0.438 0.008 0.000 0.992
#> SRR957904 3 0.0237 0.444 0.004 0.000 0.996
#> SRR957905 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957906 2 0.0424 0.957 0.008 0.992 0.000
#> SRR957907 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957908 2 0.0424 0.957 0.008 0.992 0.000
#> SRR957909 3 0.6309 0.660 0.496 0.000 0.504
#> SRR957910 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957911 3 0.6302 0.660 0.480 0.000 0.520
#> SRR957912 3 0.6168 0.662 0.412 0.000 0.588
#> SRR957913 3 0.0000 0.449 0.000 0.000 1.000
#> SRR957917 3 0.6154 0.660 0.408 0.000 0.592
#> SRR957918 2 0.0237 0.959 0.004 0.996 0.000
#> SRR957920 3 0.3851 0.328 0.004 0.136 0.860
#> SRR957919 2 0.0424 0.957 0.008 0.992 0.000
#> SRR957921 2 0.2261 0.913 0.000 0.932 0.068
#> SRR957922 2 0.3967 0.883 0.044 0.884 0.072
#> SRR957924 1 0.6299 -0.679 0.524 0.000 0.476
#> SRR957923 2 0.6295 0.165 0.472 0.528 0.000
#> SRR957925 2 0.0592 0.956 0.012 0.988 0.000
#> SRR957926 3 0.6280 0.669 0.460 0.000 0.540
#> SRR957927 1 0.9367 0.334 0.476 0.344 0.180
#> SRR957928 3 0.6168 0.662 0.412 0.000 0.588
#> SRR957929 1 0.6309 -0.687 0.504 0.000 0.496
#> SRR957930 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957931 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957932 3 0.1289 0.481 0.032 0.000 0.968
#> SRR957933 3 0.6280 0.669 0.460 0.000 0.540
#> SRR957934 2 0.0592 0.956 0.012 0.988 0.000
#> SRR957935 2 0.5733 0.560 0.324 0.676 0.000
#> SRR957936 2 0.0237 0.959 0.004 0.996 0.000
#> SRR957937 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957939 1 0.2261 0.280 0.932 0.000 0.068
#> SRR957941 2 0.0592 0.956 0.012 0.988 0.000
#> SRR957940 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957942 2 0.0237 0.959 0.004 0.996 0.000
#> SRR957943 2 0.0424 0.957 0.008 0.992 0.000
#> SRR957944 2 0.0237 0.959 0.004 0.996 0.000
#> SRR957945 3 0.0000 0.449 0.000 0.000 1.000
#> SRR957946 3 0.6302 0.667 0.480 0.000 0.520
#> SRR957947 3 0.6308 0.664 0.492 0.000 0.508
#> SRR957948 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957949 2 0.1643 0.936 0.044 0.956 0.000
#> SRR957950 1 0.6299 -0.679 0.524 0.000 0.476
#> SRR957951 2 0.0000 0.959 0.000 1.000 0.000
#> SRR957952 3 0.6373 0.658 0.408 0.004 0.588
#> SRR957953 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957954 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957956 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957957 1 0.8149 0.626 0.520 0.072 0.408
#> SRR957958 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957959 2 0.3769 0.872 0.016 0.880 0.104
#> SRR957960 2 0.1643 0.936 0.044 0.956 0.000
#> SRR957961 2 0.0237 0.959 0.000 0.996 0.004
#> SRR957962 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957963 1 0.6140 0.695 0.596 0.000 0.404
#> SRR957964 3 0.2448 0.413 0.076 0.000 0.924
#> SRR957965 2 0.0237 0.959 0.004 0.996 0.000
#> SRR957966 3 0.6309 0.660 0.496 0.000 0.504
#> SRR957967 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957968 1 0.6168 0.701 0.588 0.000 0.412
#> SRR957969 3 0.3038 0.389 0.104 0.000 0.896
#> SRR957970 2 0.0592 0.956 0.012 0.988 0.000
#> SRR957971 3 0.1411 0.389 0.036 0.000 0.964
#> SRR957972 3 0.6140 0.662 0.404 0.000 0.596
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0000 0.8957 1.000 0.000 0.000 0.000
#> SRR957915 2 0.2011 0.8156 0.000 0.920 0.080 0.000
#> SRR957916 2 0.4281 0.7585 0.028 0.792 0.180 0.000
#> SRR957884 4 0.1474 0.6889 0.000 0.000 0.052 0.948
#> SRR957885 3 0.6299 0.5983 0.060 0.000 0.520 0.420
#> SRR957886 2 0.3528 0.7900 0.000 0.808 0.192 0.000
#> SRR957887 4 0.4898 -0.3002 0.000 0.000 0.416 0.584
#> SRR957888 1 0.0779 0.8980 0.980 0.000 0.004 0.016
#> SRR957889 1 0.0188 0.8940 0.996 0.000 0.004 0.000
#> SRR957890 1 0.0000 0.8957 1.000 0.000 0.000 0.000
#> SRR957891 2 0.1792 0.8151 0.000 0.932 0.068 0.000
#> SRR957893 1 0.1022 0.8932 0.968 0.000 0.000 0.032
#> SRR957892 1 0.0921 0.8954 0.972 0.000 0.000 0.028
#> SRR957894 2 0.3486 0.8063 0.000 0.812 0.188 0.000
#> SRR957895 1 0.7802 0.2724 0.524 0.044 0.108 0.324
#> SRR957896 2 0.2814 0.8013 0.000 0.868 0.132 0.000
#> SRR957897 4 0.3837 0.5955 0.000 0.000 0.224 0.776
#> SRR957898 1 0.4452 0.5389 0.732 0.000 0.008 0.260
#> SRR957899 2 0.2011 0.8154 0.000 0.920 0.080 0.000
#> SRR957900 2 0.3808 0.7743 0.012 0.812 0.176 0.000
#> SRR957901 2 0.0817 0.8218 0.000 0.976 0.024 0.000
#> SRR957902 2 0.2271 0.8151 0.008 0.916 0.076 0.000
#> SRR957903 3 0.6050 0.5826 0.044 0.000 0.524 0.432
#> SRR957904 3 0.6285 0.6094 0.060 0.000 0.528 0.412
#> SRR957905 4 0.0000 0.7046 0.000 0.000 0.000 1.000
#> SRR957906 2 0.4699 0.7156 0.000 0.676 0.320 0.004
#> SRR957907 2 0.1022 0.8221 0.000 0.968 0.032 0.000
#> SRR957908 2 0.4699 0.7156 0.000 0.676 0.320 0.004
#> SRR957909 1 0.0707 0.8976 0.980 0.000 0.000 0.020
#> SRR957910 2 0.1792 0.8151 0.000 0.932 0.068 0.000
#> SRR957911 1 0.1022 0.8932 0.968 0.000 0.000 0.032
#> SRR957912 1 0.2198 0.8416 0.920 0.008 0.072 0.000
#> SRR957913 3 0.6285 0.6094 0.060 0.000 0.528 0.412
#> SRR957917 3 0.5137 0.2868 0.452 0.004 0.544 0.000
#> SRR957918 2 0.3569 0.8038 0.000 0.804 0.196 0.000
#> SRR957920 3 0.6679 0.4923 0.004 0.148 0.632 0.216
#> SRR957919 2 0.4699 0.7156 0.000 0.676 0.320 0.004
#> SRR957921 2 0.4776 0.4480 0.000 0.624 0.376 0.000
#> SRR957922 2 0.3763 0.7886 0.024 0.832 0.144 0.000
#> SRR957924 1 0.0657 0.8960 0.984 0.000 0.012 0.004
#> SRR957923 4 0.7165 0.3383 0.000 0.140 0.372 0.488
#> SRR957925 2 0.3764 0.7979 0.000 0.784 0.216 0.000
#> SRR957926 1 0.0921 0.8954 0.972 0.000 0.000 0.028
#> SRR957927 4 0.6394 0.4313 0.000 0.088 0.316 0.596
#> SRR957928 1 0.0000 0.8957 1.000 0.000 0.000 0.000
#> SRR957929 1 0.1211 0.8741 0.960 0.000 0.040 0.000
#> SRR957930 2 0.2011 0.8149 0.000 0.920 0.080 0.000
#> SRR957931 2 0.0921 0.8208 0.000 0.972 0.028 0.000
#> SRR957932 4 0.7871 -0.3578 0.332 0.000 0.284 0.384
#> SRR957933 1 0.1022 0.8932 0.968 0.000 0.000 0.032
#> SRR957934 2 0.2868 0.8001 0.000 0.864 0.136 0.000
#> SRR957935 2 0.6133 0.6854 0.136 0.676 0.188 0.000
#> SRR957936 2 0.4699 0.7156 0.000 0.676 0.320 0.004
#> SRR957937 2 0.2345 0.8126 0.000 0.900 0.100 0.000
#> SRR957938 2 0.3528 0.8065 0.000 0.808 0.192 0.000
#> SRR957939 4 0.6386 0.4856 0.124 0.000 0.236 0.640
#> SRR957941 2 0.3074 0.7941 0.000 0.848 0.152 0.000
#> SRR957940 4 0.0336 0.7031 0.008 0.000 0.000 0.992
#> SRR957942 2 0.4699 0.7156 0.000 0.676 0.320 0.004
#> SRR957943 2 0.4836 0.7123 0.000 0.672 0.320 0.008
#> SRR957944 2 0.4564 0.7227 0.000 0.672 0.328 0.000
#> SRR957945 3 0.6285 0.6094 0.060 0.000 0.528 0.412
#> SRR957946 1 0.0000 0.8957 1.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.8957 1.000 0.000 0.000 0.000
#> SRR957948 2 0.2814 0.8060 0.000 0.868 0.132 0.000
#> SRR957949 2 0.3024 0.7958 0.000 0.852 0.148 0.000
#> SRR957950 1 0.1389 0.8715 0.952 0.000 0.048 0.000
#> SRR957951 2 0.1867 0.8111 0.000 0.928 0.072 0.000
#> SRR957952 3 0.6677 0.4316 0.348 0.100 0.552 0.000
#> SRR957953 4 0.0000 0.7046 0.000 0.000 0.000 1.000
#> SRR957954 4 0.0336 0.7031 0.008 0.000 0.000 0.992
#> SRR957956 4 0.0336 0.7031 0.008 0.000 0.000 0.992
#> SRR957957 4 0.4252 0.5731 0.000 0.004 0.252 0.744
#> SRR957958 4 0.0000 0.7046 0.000 0.000 0.000 1.000
#> SRR957959 3 0.5371 0.2815 0.020 0.364 0.616 0.000
#> SRR957960 2 0.2921 0.8030 0.000 0.860 0.140 0.000
#> SRR957961 2 0.4941 0.2783 0.000 0.564 0.436 0.000
#> SRR957962 4 0.0188 0.7043 0.004 0.000 0.000 0.996
#> SRR957963 4 0.2011 0.6573 0.080 0.000 0.000 0.920
#> SRR957964 4 0.7771 -0.3045 0.320 0.000 0.256 0.424
#> SRR957965 2 0.3528 0.7897 0.000 0.808 0.192 0.000
#> SRR957966 1 0.0817 0.8968 0.976 0.000 0.000 0.024
#> SRR957967 4 0.0188 0.7043 0.004 0.000 0.000 0.996
#> SRR957968 4 0.0000 0.7046 0.000 0.000 0.000 1.000
#> SRR957969 1 0.5396 0.0716 0.524 0.000 0.012 0.464
#> SRR957970 2 0.2921 0.8030 0.000 0.860 0.140 0.000
#> SRR957971 3 0.6235 0.6011 0.056 0.000 0.524 0.420
#> SRR957972 3 0.6413 0.4193 0.392 0.008 0.548 0.052
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.0162 0.946 0.996 0.000 0.004 0.000 0.000
#> SRR957915 2 0.5761 -0.104 0.000 0.492 0.088 0.000 0.420
#> SRR957916 5 0.3647 0.629 0.004 0.004 0.228 0.000 0.764
#> SRR957884 4 0.0865 0.833 0.004 0.024 0.000 0.972 0.000
#> SRR957885 3 0.3779 0.834 0.024 0.000 0.776 0.200 0.000
#> SRR957886 2 0.3558 0.598 0.000 0.828 0.064 0.000 0.108
#> SRR957887 4 0.4278 -0.185 0.000 0.000 0.452 0.548 0.000
#> SRR957888 1 0.0162 0.947 0.996 0.000 0.000 0.004 0.000
#> SRR957889 1 0.0955 0.932 0.968 0.000 0.028 0.000 0.004
#> SRR957890 1 0.0290 0.945 0.992 0.000 0.008 0.000 0.000
#> SRR957891 2 0.6034 -0.182 0.000 0.456 0.116 0.000 0.428
#> SRR957893 1 0.0290 0.946 0.992 0.000 0.000 0.008 0.000
#> SRR957892 1 0.0162 0.947 0.996 0.000 0.000 0.004 0.000
#> SRR957894 2 0.4597 0.282 0.000 0.564 0.012 0.000 0.424
#> SRR957895 1 0.6244 0.239 0.504 0.000 0.000 0.336 0.160
#> SRR957896 5 0.0794 0.663 0.000 0.028 0.000 0.000 0.972
#> SRR957897 4 0.3160 0.713 0.000 0.188 0.000 0.808 0.004
#> SRR957898 1 0.3934 0.724 0.800 0.000 0.076 0.124 0.000
#> SRR957899 5 0.4946 0.513 0.000 0.276 0.060 0.000 0.664
#> SRR957900 5 0.3551 0.633 0.000 0.008 0.220 0.000 0.772
#> SRR957901 5 0.5645 0.348 0.000 0.376 0.084 0.000 0.540
#> SRR957902 5 0.6243 0.297 0.000 0.380 0.148 0.000 0.472
#> SRR957903 3 0.3779 0.834 0.024 0.000 0.776 0.200 0.000
#> SRR957904 3 0.3639 0.835 0.024 0.000 0.792 0.184 0.000
#> SRR957905 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR957906 2 0.0000 0.664 0.000 1.000 0.000 0.000 0.000
#> SRR957907 5 0.5042 0.152 0.000 0.460 0.032 0.000 0.508
#> SRR957908 2 0.0000 0.664 0.000 1.000 0.000 0.000 0.000
#> SRR957909 1 0.0162 0.947 0.996 0.000 0.000 0.004 0.000
#> SRR957910 2 0.5989 -0.132 0.000 0.476 0.112 0.000 0.412
#> SRR957911 1 0.0290 0.946 0.992 0.000 0.000 0.008 0.000
#> SRR957912 1 0.2011 0.884 0.908 0.000 0.004 0.000 0.088
#> SRR957913 3 0.3779 0.834 0.024 0.000 0.776 0.200 0.000
#> SRR957917 3 0.2723 0.754 0.124 0.000 0.864 0.000 0.012
#> SRR957918 2 0.3876 0.466 0.000 0.684 0.000 0.000 0.316
#> SRR957920 3 0.0880 0.758 0.000 0.032 0.968 0.000 0.000
#> SRR957919 2 0.0000 0.664 0.000 1.000 0.000 0.000 0.000
#> SRR957921 5 0.6681 0.357 0.000 0.328 0.248 0.000 0.424
#> SRR957922 5 0.3616 0.630 0.004 0.004 0.224 0.000 0.768
#> SRR957924 1 0.0162 0.947 0.996 0.000 0.000 0.004 0.000
#> SRR957923 2 0.4693 0.461 0.000 0.724 0.000 0.196 0.080
#> SRR957925 5 0.2329 0.593 0.000 0.124 0.000 0.000 0.876
#> SRR957926 1 0.0290 0.946 0.992 0.000 0.000 0.008 0.000
#> SRR957927 2 0.3586 0.378 0.000 0.736 0.000 0.264 0.000
#> SRR957928 1 0.1197 0.919 0.952 0.000 0.048 0.000 0.000
#> SRR957929 1 0.0798 0.937 0.976 0.000 0.008 0.000 0.016
#> SRR957930 5 0.6016 0.432 0.000 0.312 0.140 0.000 0.548
#> SRR957931 5 0.5756 0.568 0.000 0.204 0.176 0.000 0.620
#> SRR957932 3 0.4522 0.812 0.080 0.000 0.744 0.176 0.000
#> SRR957933 1 0.0290 0.946 0.992 0.000 0.000 0.008 0.000
#> SRR957934 5 0.1117 0.660 0.000 0.020 0.016 0.000 0.964
#> SRR957935 5 0.4616 0.504 0.028 0.128 0.068 0.000 0.776
#> SRR957936 2 0.0000 0.664 0.000 1.000 0.000 0.000 0.000
#> SRR957937 2 0.4810 0.470 0.000 0.712 0.084 0.000 0.204
#> SRR957938 2 0.4182 0.330 0.000 0.600 0.000 0.000 0.400
#> SRR957939 4 0.4492 0.664 0.052 0.204 0.000 0.740 0.004
#> SRR957941 5 0.1768 0.642 0.000 0.004 0.072 0.000 0.924
#> SRR957940 4 0.0703 0.829 0.000 0.000 0.024 0.976 0.000
#> SRR957942 2 0.0000 0.664 0.000 1.000 0.000 0.000 0.000
#> SRR957943 2 0.0000 0.664 0.000 1.000 0.000 0.000 0.000
#> SRR957944 2 0.1571 0.638 0.000 0.936 0.004 0.000 0.060
#> SRR957945 3 0.3779 0.834 0.024 0.000 0.776 0.200 0.000
#> SRR957946 1 0.0162 0.946 0.996 0.000 0.004 0.000 0.000
#> SRR957947 1 0.0290 0.945 0.992 0.000 0.008 0.000 0.000
#> SRR957948 5 0.3305 0.561 0.000 0.224 0.000 0.000 0.776
#> SRR957949 5 0.0162 0.661 0.000 0.000 0.004 0.000 0.996
#> SRR957950 1 0.0794 0.933 0.972 0.000 0.000 0.000 0.028
#> SRR957951 5 0.6043 0.426 0.000 0.320 0.140 0.000 0.540
#> SRR957952 3 0.2946 0.757 0.088 0.000 0.868 0.000 0.044
#> SRR957953 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR957954 4 0.0162 0.842 0.000 0.000 0.004 0.996 0.000
#> SRR957956 4 0.0290 0.840 0.000 0.000 0.008 0.992 0.000
#> SRR957957 4 0.4452 0.213 0.000 0.496 0.000 0.500 0.004
#> SRR957958 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR957959 3 0.1717 0.714 0.004 0.008 0.936 0.000 0.052
#> SRR957960 5 0.1043 0.657 0.000 0.040 0.000 0.000 0.960
#> SRR957961 2 0.6486 0.182 0.000 0.480 0.308 0.000 0.212
#> SRR957962 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR957963 4 0.1341 0.806 0.056 0.000 0.000 0.944 0.000
#> SRR957964 3 0.5252 0.577 0.056 0.000 0.580 0.364 0.000
#> SRR957965 2 0.3966 0.573 0.000 0.796 0.072 0.000 0.132
#> SRR957966 1 0.0162 0.947 0.996 0.000 0.000 0.004 0.000
#> SRR957967 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR957968 4 0.0000 0.844 0.000 0.000 0.000 1.000 0.000
#> SRR957969 4 0.5277 0.431 0.228 0.000 0.108 0.664 0.000
#> SRR957970 5 0.1341 0.652 0.000 0.056 0.000 0.000 0.944
#> SRR957971 3 0.3779 0.834 0.024 0.000 0.776 0.200 0.000
#> SRR957972 3 0.2612 0.771 0.124 0.000 0.868 0.000 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.0291 0.9242 0.992 0.000 0.004 0.000 0.000 0.004
#> SRR957915 6 0.6024 0.4457 0.000 0.308 0.000 0.000 0.268 0.424
#> SRR957916 6 0.3139 0.3740 0.008 0.000 0.036 0.000 0.120 0.836
#> SRR957884 4 0.0436 0.8611 0.004 0.004 0.000 0.988 0.000 0.004
#> SRR957885 3 0.1226 0.8758 0.004 0.000 0.952 0.040 0.000 0.004
#> SRR957886 2 0.4585 0.2678 0.000 0.648 0.000 0.000 0.068 0.284
#> SRR957887 4 0.4126 0.0411 0.000 0.000 0.480 0.512 0.004 0.004
#> SRR957888 1 0.0458 0.9266 0.984 0.000 0.000 0.016 0.000 0.000
#> SRR957889 1 0.2199 0.8633 0.892 0.000 0.020 0.000 0.000 0.088
#> SRR957890 1 0.0508 0.9222 0.984 0.000 0.004 0.000 0.000 0.012
#> SRR957891 6 0.5484 0.5778 0.000 0.228 0.000 0.000 0.204 0.568
#> SRR957893 1 0.0547 0.9260 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR957892 1 0.0547 0.9260 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR957894 5 0.4776 -0.0348 0.000 0.460 0.004 0.000 0.496 0.040
#> SRR957895 1 0.6092 0.0344 0.400 0.000 0.000 0.224 0.372 0.004
#> SRR957896 5 0.1644 0.6414 0.000 0.004 0.000 0.000 0.920 0.076
#> SRR957897 4 0.3380 0.6307 0.000 0.244 0.000 0.748 0.004 0.004
#> SRR957898 1 0.3640 0.6881 0.764 0.000 0.204 0.028 0.000 0.004
#> SRR957899 6 0.5487 0.4528 0.000 0.136 0.000 0.000 0.356 0.508
#> SRR957900 6 0.2930 0.3784 0.000 0.000 0.036 0.000 0.124 0.840
#> SRR957901 6 0.5682 0.5362 0.000 0.208 0.000 0.000 0.268 0.524
#> SRR957902 6 0.5458 0.5952 0.004 0.152 0.012 0.000 0.204 0.628
#> SRR957903 3 0.1082 0.8768 0.004 0.000 0.956 0.040 0.000 0.000
#> SRR957904 3 0.1082 0.8750 0.000 0.004 0.956 0.040 0.000 0.000
#> SRR957905 4 0.0146 0.8638 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR957906 2 0.0632 0.7716 0.000 0.976 0.000 0.000 0.000 0.024
#> SRR957907 5 0.6108 -0.3682 0.000 0.292 0.000 0.000 0.364 0.344
#> SRR957908 2 0.0000 0.7819 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957909 1 0.0458 0.9266 0.984 0.000 0.000 0.016 0.000 0.000
#> SRR957910 6 0.5484 0.5778 0.000 0.228 0.000 0.000 0.204 0.568
#> SRR957911 1 0.0547 0.9260 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR957912 1 0.2982 0.7954 0.828 0.000 0.008 0.000 0.152 0.012
#> SRR957913 3 0.1082 0.8768 0.004 0.000 0.956 0.040 0.000 0.000
#> SRR957917 3 0.5301 0.4382 0.124 0.000 0.556 0.000 0.000 0.320
#> SRR957918 2 0.4542 0.1544 0.000 0.556 0.004 0.000 0.412 0.028
#> SRR957920 3 0.2039 0.8158 0.000 0.020 0.904 0.000 0.000 0.076
#> SRR957919 2 0.0000 0.7819 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957921 6 0.3086 0.5493 0.000 0.076 0.020 0.000 0.048 0.856
#> SRR957922 6 0.4132 0.2261 0.016 0.000 0.036 0.000 0.212 0.736
#> SRR957924 1 0.0363 0.9267 0.988 0.000 0.000 0.012 0.000 0.000
#> SRR957923 2 0.3198 0.6498 0.000 0.816 0.004 0.008 0.160 0.012
#> SRR957925 5 0.0632 0.6636 0.000 0.024 0.000 0.000 0.976 0.000
#> SRR957926 1 0.0520 0.9261 0.984 0.000 0.008 0.008 0.000 0.000
#> SRR957927 2 0.1765 0.7123 0.000 0.904 0.000 0.096 0.000 0.000
#> SRR957928 1 0.2230 0.8613 0.892 0.000 0.024 0.000 0.000 0.084
#> SRR957929 1 0.0551 0.9227 0.984 0.000 0.004 0.000 0.004 0.008
#> SRR957930 6 0.4906 0.5935 0.000 0.136 0.000 0.000 0.212 0.652
#> SRR957931 6 0.3367 0.5109 0.000 0.080 0.000 0.000 0.104 0.816
#> SRR957932 3 0.2082 0.8567 0.036 0.000 0.916 0.040 0.004 0.004
#> SRR957933 1 0.0547 0.9260 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR957934 5 0.2631 0.6155 0.000 0.000 0.000 0.000 0.820 0.180
#> SRR957935 5 0.4551 0.5114 0.008 0.040 0.004 0.000 0.668 0.280
#> SRR957936 2 0.0146 0.7815 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR957937 6 0.5153 0.2514 0.000 0.456 0.000 0.000 0.084 0.460
#> SRR957938 5 0.4264 0.0237 0.000 0.484 0.000 0.000 0.500 0.016
#> SRR957939 4 0.4370 0.5796 0.016 0.252 0.004 0.704 0.020 0.004
#> SRR957941 5 0.3563 0.4901 0.000 0.000 0.000 0.000 0.664 0.336
#> SRR957940 4 0.2544 0.7692 0.000 0.000 0.140 0.852 0.004 0.004
#> SRR957942 2 0.0260 0.7802 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR957943 2 0.0000 0.7819 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957944 2 0.1845 0.7399 0.000 0.916 0.004 0.000 0.072 0.008
#> SRR957945 3 0.1082 0.8768 0.004 0.000 0.956 0.040 0.000 0.000
#> SRR957946 1 0.0291 0.9242 0.992 0.000 0.004 0.000 0.000 0.004
#> SRR957947 1 0.0508 0.9222 0.984 0.000 0.004 0.000 0.000 0.012
#> SRR957948 5 0.2872 0.5475 0.000 0.024 0.000 0.000 0.836 0.140
#> SRR957949 5 0.1714 0.6504 0.000 0.000 0.000 0.000 0.908 0.092
#> SRR957950 1 0.0632 0.9194 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR957951 6 0.4908 0.5880 0.000 0.116 0.004 0.000 0.220 0.660
#> SRR957952 6 0.4941 -0.2858 0.064 0.000 0.444 0.000 0.000 0.492
#> SRR957953 4 0.0000 0.8644 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957954 4 0.1429 0.8426 0.000 0.000 0.052 0.940 0.004 0.004
#> SRR957956 4 0.1429 0.8426 0.000 0.000 0.052 0.940 0.004 0.004
#> SRR957957 2 0.3954 0.2475 0.000 0.620 0.000 0.372 0.004 0.004
#> SRR957958 4 0.0000 0.8644 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957959 6 0.3052 0.3726 0.004 0.000 0.216 0.000 0.000 0.780
#> SRR957960 5 0.0363 0.6615 0.000 0.000 0.000 0.000 0.988 0.012
#> SRR957961 6 0.6395 0.5506 0.000 0.264 0.048 0.000 0.176 0.512
#> SRR957962 4 0.0000 0.8644 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957963 4 0.0458 0.8560 0.016 0.000 0.000 0.984 0.000 0.000
#> SRR957964 3 0.4320 0.5471 0.036 0.000 0.688 0.268 0.004 0.004
#> SRR957965 2 0.4783 0.1854 0.000 0.616 0.000 0.000 0.076 0.308
#> SRR957966 1 0.0547 0.9260 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR957967 4 0.0000 0.8644 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957968 4 0.0405 0.8623 0.000 0.000 0.008 0.988 0.004 0.000
#> SRR957969 4 0.5107 0.4371 0.088 0.000 0.288 0.616 0.004 0.004
#> SRR957970 5 0.1141 0.6484 0.000 0.000 0.000 0.000 0.948 0.052
#> SRR957971 3 0.1226 0.8758 0.004 0.000 0.952 0.040 0.004 0.000
#> SRR957972 3 0.3620 0.6973 0.044 0.000 0.772 0.000 0.000 0.184
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.776 0.872 0.943 0.5006 0.494 0.494
#> 3 3 0.534 0.714 0.789 0.2793 0.809 0.638
#> 4 4 0.598 0.580 0.750 0.1510 0.804 0.520
#> 5 5 0.671 0.586 0.802 0.0683 0.851 0.524
#> 6 6 0.756 0.586 0.769 0.0539 0.878 0.528
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
#> SRR957914 1 0.0000 0.909 1.000 0.000
#> SRR957915 2 0.0000 0.966 0.000 1.000
#> SRR957916 2 0.0672 0.961 0.008 0.992
#> SRR957884 2 0.3733 0.909 0.072 0.928
#> SRR957885 1 0.0000 0.909 1.000 0.000
#> SRR957886 2 0.0000 0.966 0.000 1.000
#> SRR957887 1 0.9795 0.399 0.584 0.416
#> SRR957888 1 0.0000 0.909 1.000 0.000
#> SRR957889 1 0.0000 0.909 1.000 0.000
#> SRR957890 1 0.0000 0.909 1.000 0.000
#> SRR957891 2 0.0000 0.966 0.000 1.000
#> SRR957893 1 0.0000 0.909 1.000 0.000
#> SRR957892 1 0.0000 0.909 1.000 0.000
#> SRR957894 2 0.0000 0.966 0.000 1.000
#> SRR957895 2 0.3733 0.909 0.072 0.928
#> SRR957896 2 0.0000 0.966 0.000 1.000
#> SRR957897 1 0.9954 0.243 0.540 0.460
#> SRR957898 1 0.0000 0.909 1.000 0.000
#> SRR957899 2 0.0000 0.966 0.000 1.000
#> SRR957900 2 0.0000 0.966 0.000 1.000
#> SRR957901 2 0.0000 0.966 0.000 1.000
#> SRR957902 2 0.0000 0.966 0.000 1.000
#> SRR957903 1 0.9522 0.489 0.628 0.372
#> SRR957904 1 0.6438 0.781 0.836 0.164
#> SRR957905 2 0.9393 0.418 0.356 0.644
#> SRR957906 2 0.0000 0.966 0.000 1.000
#> SRR957907 2 0.0000 0.966 0.000 1.000
#> SRR957908 2 0.0000 0.966 0.000 1.000
#> SRR957909 1 0.0000 0.909 1.000 0.000
#> SRR957910 2 0.0000 0.966 0.000 1.000
#> SRR957911 1 0.0000 0.909 1.000 0.000
#> SRR957912 1 0.0000 0.909 1.000 0.000
#> SRR957913 1 0.0000 0.909 1.000 0.000
#> SRR957917 1 0.0376 0.907 0.996 0.004
#> SRR957918 2 0.0000 0.966 0.000 1.000
#> SRR957920 1 0.9129 0.554 0.672 0.328
#> SRR957919 2 0.0000 0.966 0.000 1.000
#> SRR957921 2 0.0000 0.966 0.000 1.000
#> SRR957922 2 0.3733 0.909 0.072 0.928
#> SRR957924 1 0.0000 0.909 1.000 0.000
#> SRR957923 2 0.3733 0.909 0.072 0.928
#> SRR957925 2 0.3733 0.909 0.072 0.928
#> SRR957926 1 0.0000 0.909 1.000 0.000
#> SRR957927 2 0.7219 0.717 0.200 0.800
#> SRR957928 1 0.0000 0.909 1.000 0.000
#> SRR957929 1 0.0000 0.909 1.000 0.000
#> SRR957930 2 0.0000 0.966 0.000 1.000
#> SRR957931 2 0.0000 0.966 0.000 1.000
#> SRR957932 1 0.0000 0.909 1.000 0.000
#> SRR957933 1 0.0000 0.909 1.000 0.000
#> SRR957934 2 0.0000 0.966 0.000 1.000
#> SRR957935 2 0.6438 0.801 0.164 0.836
#> SRR957936 2 0.0000 0.966 0.000 1.000
#> SRR957937 2 0.0000 0.966 0.000 1.000
#> SRR957938 2 0.0000 0.966 0.000 1.000
#> SRR957939 1 0.9944 0.252 0.544 0.456
#> SRR957941 2 0.1843 0.946 0.028 0.972
#> SRR957940 1 0.0000 0.909 1.000 0.000
#> SRR957942 2 0.0000 0.966 0.000 1.000
#> SRR957943 2 0.0000 0.966 0.000 1.000
#> SRR957944 2 0.0000 0.966 0.000 1.000
#> SRR957945 1 0.0000 0.909 1.000 0.000
#> SRR957946 1 0.0000 0.909 1.000 0.000
#> SRR957947 1 0.0000 0.909 1.000 0.000
#> SRR957948 2 0.0000 0.966 0.000 1.000
#> SRR957949 2 0.0000 0.966 0.000 1.000
#> SRR957950 1 0.0000 0.909 1.000 0.000
#> SRR957951 2 0.0000 0.966 0.000 1.000
#> SRR957952 1 0.9044 0.576 0.680 0.320
#> SRR957953 1 0.9087 0.572 0.676 0.324
#> SRR957954 1 0.0000 0.909 1.000 0.000
#> SRR957956 1 0.0000 0.909 1.000 0.000
#> SRR957957 2 0.6801 0.751 0.180 0.820
#> SRR957958 1 0.8955 0.600 0.688 0.312
#> SRR957959 2 0.0000 0.966 0.000 1.000
#> SRR957960 2 0.0000 0.966 0.000 1.000
#> SRR957961 2 0.0000 0.966 0.000 1.000
#> SRR957962 1 0.0000 0.909 1.000 0.000
#> SRR957963 1 0.0000 0.909 1.000 0.000
#> SRR957964 1 0.0000 0.909 1.000 0.000
#> SRR957965 2 0.0000 0.966 0.000 1.000
#> SRR957966 1 0.0000 0.909 1.000 0.000
#> SRR957967 1 0.9323 0.525 0.652 0.348
#> SRR957968 1 0.7219 0.738 0.800 0.200
#> SRR957969 1 0.0000 0.909 1.000 0.000
#> SRR957970 2 0.0000 0.966 0.000 1.000
#> SRR957971 1 0.0000 0.909 1.000 0.000
#> SRR957972 1 0.0000 0.909 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.3116 0.780 0.892 0.000 0.108
#> SRR957915 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957916 2 0.4351 0.735 0.004 0.828 0.168
#> SRR957884 3 0.9347 0.652 0.204 0.288 0.508
#> SRR957885 1 0.4555 0.731 0.800 0.000 0.200
#> SRR957886 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957887 3 0.5591 0.649 0.304 0.000 0.696
#> SRR957888 1 0.0000 0.795 1.000 0.000 0.000
#> SRR957889 1 0.4682 0.741 0.804 0.004 0.192
#> SRR957890 1 0.4002 0.755 0.840 0.000 0.160
#> SRR957891 2 0.4178 0.826 0.000 0.828 0.172
#> SRR957893 1 0.0000 0.795 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.795 1.000 0.000 0.000
#> SRR957894 2 0.0592 0.831 0.000 0.988 0.012
#> SRR957895 2 0.8465 -0.187 0.096 0.528 0.376
#> SRR957896 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957897 3 0.9333 0.693 0.268 0.216 0.516
#> SRR957898 1 0.2261 0.789 0.932 0.000 0.068
#> SRR957899 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957900 2 0.3482 0.770 0.000 0.872 0.128
#> SRR957901 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957902 2 0.3879 0.750 0.000 0.848 0.152
#> SRR957903 1 0.7853 0.541 0.668 0.144 0.188
#> SRR957904 1 0.7220 0.635 0.660 0.056 0.284
#> SRR957905 3 0.9351 0.645 0.228 0.256 0.516
#> SRR957906 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957907 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957908 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957909 1 0.0000 0.795 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957911 1 0.0237 0.793 0.996 0.000 0.004
#> SRR957912 1 0.4642 0.761 0.856 0.060 0.084
#> SRR957913 1 0.5763 0.692 0.716 0.008 0.276
#> SRR957917 1 0.8883 0.467 0.568 0.176 0.256
#> SRR957918 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957920 2 0.9192 0.281 0.176 0.516 0.308
#> SRR957919 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957921 2 0.5948 0.720 0.000 0.640 0.360
#> SRR957922 2 0.4840 0.727 0.016 0.816 0.168
#> SRR957924 1 0.0000 0.795 1.000 0.000 0.000
#> SRR957923 2 0.0747 0.824 0.016 0.984 0.000
#> SRR957925 2 0.0747 0.824 0.016 0.984 0.000
#> SRR957926 1 0.0747 0.788 0.984 0.000 0.016
#> SRR957927 3 0.8411 0.498 0.088 0.404 0.508
#> SRR957928 1 0.2878 0.798 0.904 0.000 0.096
#> SRR957929 1 0.1964 0.797 0.944 0.000 0.056
#> SRR957930 2 0.3816 0.753 0.000 0.852 0.148
#> SRR957931 2 0.4399 0.821 0.000 0.812 0.188
#> SRR957932 1 0.5678 0.676 0.684 0.000 0.316
#> SRR957933 1 0.0237 0.793 0.996 0.000 0.004
#> SRR957934 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957935 2 0.8650 0.374 0.276 0.580 0.144
#> SRR957936 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957937 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957938 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957939 3 0.9117 0.698 0.328 0.160 0.512
#> SRR957941 2 0.2173 0.811 0.008 0.944 0.048
#> SRR957940 3 0.6600 0.682 0.384 0.012 0.604
#> SRR957942 2 0.3879 0.829 0.000 0.848 0.152
#> SRR957943 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957944 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957945 1 0.5061 0.731 0.784 0.008 0.208
#> SRR957946 1 0.2165 0.799 0.936 0.000 0.064
#> SRR957947 1 0.3038 0.782 0.896 0.000 0.104
#> SRR957948 2 0.3619 0.830 0.000 0.864 0.136
#> SRR957949 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.795 1.000 0.000 0.000
#> SRR957951 2 0.0237 0.829 0.000 0.996 0.004
#> SRR957952 2 0.9537 0.203 0.224 0.480 0.296
#> SRR957953 3 0.8108 0.733 0.392 0.072 0.536
#> SRR957954 3 0.6305 0.644 0.484 0.000 0.516
#> SRR957956 3 0.6295 0.635 0.472 0.000 0.528
#> SRR957957 3 0.9207 0.637 0.172 0.320 0.508
#> SRR957958 3 0.8270 0.737 0.376 0.084 0.540
#> SRR957959 2 0.5621 0.589 0.000 0.692 0.308
#> SRR957960 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957961 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957962 3 0.6299 0.653 0.476 0.000 0.524
#> SRR957963 1 0.6302 -0.627 0.520 0.000 0.480
#> SRR957964 1 0.3267 0.770 0.884 0.000 0.116
#> SRR957965 2 0.4121 0.826 0.000 0.832 0.168
#> SRR957966 1 0.0000 0.795 1.000 0.000 0.000
#> SRR957967 3 0.8373 0.736 0.388 0.088 0.524
#> SRR957968 3 0.6737 0.706 0.384 0.016 0.600
#> SRR957969 1 0.2261 0.792 0.932 0.000 0.068
#> SRR957970 2 0.0000 0.829 0.000 1.000 0.000
#> SRR957971 3 0.4452 0.577 0.192 0.000 0.808
#> SRR957972 1 0.7644 0.595 0.624 0.068 0.308
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.2654 0.8123 0.888 0.000 0.108 0.004
#> SRR957915 2 0.3726 0.7141 0.000 0.788 0.212 0.000
#> SRR957916 3 0.1059 0.5194 0.016 0.012 0.972 0.000
#> SRR957884 4 0.3094 0.8279 0.048 0.020 0.032 0.900
#> SRR957885 4 0.6707 -0.0641 0.444 0.000 0.088 0.468
#> SRR957886 2 0.1792 0.7377 0.000 0.932 0.068 0.000
#> SRR957887 4 0.0779 0.8432 0.004 0.000 0.016 0.980
#> SRR957888 1 0.0188 0.8252 0.996 0.000 0.000 0.004
#> SRR957889 1 0.4621 0.7300 0.708 0.000 0.284 0.008
#> SRR957890 1 0.3837 0.7680 0.776 0.000 0.224 0.000
#> SRR957891 2 0.3764 0.7116 0.000 0.784 0.216 0.000
#> SRR957893 1 0.1022 0.8224 0.968 0.000 0.000 0.032
#> SRR957892 1 0.0592 0.8223 0.984 0.000 0.000 0.016
#> SRR957894 3 0.4981 0.2883 0.000 0.464 0.536 0.000
#> SRR957895 3 0.8680 0.2880 0.068 0.188 0.476 0.268
#> SRR957896 3 0.4888 0.3364 0.000 0.412 0.588 0.000
#> SRR957897 4 0.2874 0.8338 0.064 0.012 0.020 0.904
#> SRR957898 1 0.3117 0.7866 0.880 0.000 0.028 0.092
#> SRR957899 2 0.3688 0.7122 0.000 0.792 0.208 0.000
#> SRR957900 3 0.2530 0.5117 0.000 0.112 0.888 0.000
#> SRR957901 2 0.3726 0.7141 0.000 0.788 0.212 0.000
#> SRR957902 3 0.3837 0.4763 0.000 0.224 0.776 0.000
#> SRR957903 1 0.8631 0.2640 0.408 0.036 0.264 0.292
#> SRR957904 3 0.6727 -0.2110 0.384 0.000 0.520 0.096
#> SRR957905 4 0.4610 0.7925 0.084 0.080 0.016 0.820
#> SRR957906 2 0.0779 0.7415 0.000 0.980 0.016 0.004
#> SRR957907 3 0.4961 0.2762 0.000 0.448 0.552 0.000
#> SRR957908 2 0.0895 0.7399 0.000 0.976 0.020 0.004
#> SRR957909 1 0.0188 0.8252 0.996 0.000 0.000 0.004
#> SRR957910 3 0.4817 0.3519 0.000 0.388 0.612 0.000
#> SRR957911 1 0.0592 0.8239 0.984 0.000 0.000 0.016
#> SRR957912 1 0.4897 0.6762 0.660 0.008 0.332 0.000
#> SRR957913 3 0.6780 -0.2969 0.416 0.000 0.488 0.096
#> SRR957917 3 0.2593 0.5032 0.104 0.000 0.892 0.004
#> SRR957918 2 0.3123 0.7466 0.000 0.844 0.156 0.000
#> SRR957920 3 0.3128 0.4854 0.108 0.008 0.876 0.008
#> SRR957919 2 0.5039 -0.0974 0.000 0.592 0.404 0.004
#> SRR957921 3 0.4933 -0.1403 0.000 0.432 0.568 0.000
#> SRR957922 3 0.1059 0.5194 0.016 0.012 0.972 0.000
#> SRR957924 1 0.0188 0.8252 0.996 0.000 0.000 0.004
#> SRR957923 3 0.6043 0.3464 0.020 0.412 0.552 0.016
#> SRR957925 3 0.4972 0.3186 0.000 0.456 0.544 0.000
#> SRR957926 1 0.2101 0.8107 0.928 0.000 0.012 0.060
#> SRR957927 4 0.4685 0.7554 0.024 0.108 0.052 0.816
#> SRR957928 1 0.5530 0.6746 0.632 0.000 0.336 0.032
#> SRR957929 1 0.2345 0.8132 0.900 0.000 0.100 0.000
#> SRR957930 3 0.3764 0.4746 0.000 0.216 0.784 0.000
#> SRR957931 2 0.4817 0.4297 0.000 0.612 0.388 0.000
#> SRR957932 1 0.6575 0.6444 0.560 0.000 0.348 0.092
#> SRR957933 1 0.1406 0.8191 0.960 0.000 0.024 0.016
#> SRR957934 3 0.5310 0.3303 0.012 0.412 0.576 0.000
#> SRR957935 3 0.4561 0.4938 0.172 0.036 0.788 0.004
#> SRR957936 2 0.1109 0.7378 0.000 0.968 0.028 0.004
#> SRR957937 2 0.2530 0.7563 0.000 0.888 0.112 0.000
#> SRR957938 2 0.0469 0.7461 0.000 0.988 0.012 0.000
#> SRR957939 4 0.2928 0.8266 0.108 0.000 0.012 0.880
#> SRR957941 3 0.3958 0.4956 0.024 0.160 0.816 0.000
#> SRR957940 4 0.3117 0.8060 0.092 0.000 0.028 0.880
#> SRR957942 2 0.4103 0.4401 0.000 0.744 0.256 0.000
#> SRR957943 2 0.0895 0.7399 0.000 0.976 0.020 0.004
#> SRR957944 3 0.4981 0.3009 0.000 0.464 0.536 0.000
#> SRR957945 1 0.6775 0.4877 0.492 0.000 0.412 0.096
#> SRR957946 1 0.3071 0.8187 0.888 0.000 0.068 0.044
#> SRR957947 1 0.3161 0.8081 0.864 0.000 0.124 0.012
#> SRR957948 2 0.4948 0.1362 0.000 0.560 0.440 0.000
#> SRR957949 3 0.4888 0.3364 0.000 0.412 0.588 0.000
#> SRR957950 1 0.0000 0.8254 1.000 0.000 0.000 0.000
#> SRR957951 3 0.4877 0.3413 0.000 0.408 0.592 0.000
#> SRR957952 3 0.2737 0.5029 0.104 0.000 0.888 0.008
#> SRR957953 4 0.0469 0.8476 0.012 0.000 0.000 0.988
#> SRR957954 4 0.1118 0.8444 0.036 0.000 0.000 0.964
#> SRR957956 4 0.1940 0.8360 0.076 0.000 0.000 0.924
#> SRR957957 4 0.3189 0.8237 0.020 0.048 0.036 0.896
#> SRR957958 4 0.0592 0.8481 0.016 0.000 0.000 0.984
#> SRR957959 3 0.0336 0.5144 0.000 0.000 0.992 0.008
#> SRR957960 3 0.4830 0.3526 0.000 0.392 0.608 0.000
#> SRR957961 2 0.3123 0.7466 0.000 0.844 0.156 0.000
#> SRR957962 4 0.0469 0.8476 0.012 0.000 0.000 0.988
#> SRR957963 4 0.3444 0.7402 0.184 0.000 0.000 0.816
#> SRR957964 4 0.5750 0.0959 0.440 0.000 0.028 0.532
#> SRR957965 2 0.2053 0.7497 0.000 0.924 0.072 0.004
#> SRR957966 1 0.0188 0.8252 0.996 0.000 0.000 0.004
#> SRR957967 4 0.0469 0.8476 0.012 0.000 0.000 0.988
#> SRR957968 4 0.1474 0.8444 0.052 0.000 0.000 0.948
#> SRR957969 1 0.4720 0.5778 0.672 0.000 0.004 0.324
#> SRR957970 3 0.5440 0.3569 0.020 0.384 0.596 0.000
#> SRR957971 4 0.5149 0.5308 0.016 0.000 0.336 0.648
#> SRR957972 3 0.4814 -0.0107 0.316 0.000 0.676 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.1082 0.8842 0.964 0.008 0.028 0.000 0.000
#> SRR957915 2 0.4300 0.4765 0.000 0.524 0.000 0.000 0.476
#> SRR957916 5 0.6773 0.4034 0.032 0.192 0.224 0.000 0.552
#> SRR957884 4 0.1168 0.8864 0.032 0.000 0.000 0.960 0.008
#> SRR957885 3 0.3280 0.6878 0.012 0.000 0.812 0.176 0.000
#> SRR957886 5 0.4249 -0.2282 0.000 0.432 0.000 0.000 0.568
#> SRR957887 4 0.4088 0.3311 0.000 0.000 0.368 0.632 0.000
#> SRR957888 1 0.0000 0.8886 1.000 0.000 0.000 0.000 0.000
#> SRR957889 1 0.4373 0.7311 0.760 0.080 0.160 0.000 0.000
#> SRR957890 1 0.3146 0.8143 0.856 0.052 0.092 0.000 0.000
#> SRR957891 2 0.4528 0.4808 0.000 0.548 0.008 0.000 0.444
#> SRR957893 1 0.0609 0.8865 0.980 0.000 0.000 0.020 0.000
#> SRR957892 1 0.0703 0.8826 0.976 0.000 0.000 0.024 0.000
#> SRR957894 5 0.3177 0.5058 0.000 0.208 0.000 0.000 0.792
#> SRR957895 5 0.5447 0.2539 0.072 0.000 0.000 0.356 0.572
#> SRR957896 5 0.0000 0.5499 0.000 0.000 0.000 0.000 1.000
#> SRR957897 4 0.1267 0.8876 0.024 0.012 0.004 0.960 0.000
#> SRR957898 1 0.3649 0.7607 0.808 0.000 0.152 0.040 0.000
#> SRR957899 5 0.3966 -0.2032 0.000 0.336 0.000 0.000 0.664
#> SRR957900 5 0.4757 0.4792 0.000 0.120 0.148 0.000 0.732
#> SRR957901 5 0.4305 -0.4993 0.000 0.488 0.000 0.000 0.512
#> SRR957902 5 0.4711 0.5107 0.000 0.116 0.148 0.000 0.736
#> SRR957903 3 0.2784 0.7918 0.012 0.000 0.888 0.072 0.028
#> SRR957904 3 0.1444 0.8278 0.012 0.000 0.948 0.040 0.000
#> SRR957905 4 0.3218 0.8013 0.012 0.000 0.016 0.848 0.124
#> SRR957906 2 0.3607 0.5942 0.000 0.752 0.004 0.000 0.244
#> SRR957907 5 0.0404 0.5469 0.000 0.012 0.000 0.000 0.988
#> SRR957908 2 0.3231 0.6328 0.000 0.800 0.004 0.000 0.196
#> SRR957909 1 0.0000 0.8886 1.000 0.000 0.000 0.000 0.000
#> SRR957910 5 0.3305 0.4154 0.000 0.224 0.000 0.000 0.776
#> SRR957911 1 0.0703 0.8848 0.976 0.000 0.000 0.024 0.000
#> SRR957912 1 0.6255 0.5700 0.644 0.108 0.188 0.000 0.060
#> SRR957913 3 0.1444 0.8278 0.012 0.000 0.948 0.040 0.000
#> SRR957917 5 0.7574 0.2899 0.092 0.148 0.296 0.000 0.464
#> SRR957918 5 0.4015 -0.2216 0.000 0.348 0.000 0.000 0.652
#> SRR957920 3 0.0963 0.8001 0.000 0.036 0.964 0.000 0.000
#> SRR957919 5 0.4182 0.2583 0.000 0.352 0.004 0.000 0.644
#> SRR957921 2 0.5284 0.4006 0.000 0.660 0.104 0.000 0.236
#> SRR957922 5 0.6676 0.4040 0.024 0.200 0.224 0.000 0.552
#> SRR957924 1 0.0000 0.8886 1.000 0.000 0.000 0.000 0.000
#> SRR957923 5 0.4405 0.5232 0.028 0.132 0.000 0.052 0.788
#> SRR957925 5 0.2179 0.5272 0.000 0.100 0.004 0.000 0.896
#> SRR957926 1 0.1836 0.8663 0.932 0.000 0.032 0.036 0.000
#> SRR957927 4 0.2612 0.8092 0.000 0.008 0.000 0.868 0.124
#> SRR957928 1 0.5268 0.6057 0.668 0.112 0.220 0.000 0.000
#> SRR957929 1 0.0703 0.8866 0.976 0.000 0.024 0.000 0.000
#> SRR957930 5 0.4083 0.5088 0.000 0.132 0.080 0.000 0.788
#> SRR957931 2 0.5511 0.4384 0.000 0.576 0.080 0.000 0.344
#> SRR957932 3 0.1741 0.8259 0.000 0.024 0.936 0.040 0.000
#> SRR957933 1 0.2707 0.8007 0.860 0.000 0.132 0.008 0.000
#> SRR957934 5 0.0000 0.5499 0.000 0.000 0.000 0.000 1.000
#> SRR957935 5 0.6338 0.4427 0.044 0.144 0.184 0.000 0.628
#> SRR957936 2 0.2648 0.6301 0.000 0.848 0.000 0.000 0.152
#> SRR957937 2 0.4262 0.5095 0.000 0.560 0.000 0.000 0.440
#> SRR957938 5 0.4287 -0.3054 0.000 0.460 0.000 0.000 0.540
#> SRR957939 4 0.1732 0.8667 0.080 0.000 0.000 0.920 0.000
#> SRR957941 5 0.5485 0.4668 0.028 0.100 0.172 0.000 0.700
#> SRR957940 4 0.2583 0.7845 0.004 0.000 0.132 0.864 0.000
#> SRR957942 5 0.4238 0.1332 0.000 0.368 0.004 0.000 0.628
#> SRR957943 2 0.3231 0.6328 0.000 0.800 0.004 0.000 0.196
#> SRR957944 5 0.3913 0.3926 0.000 0.324 0.000 0.000 0.676
#> SRR957945 3 0.1444 0.8278 0.012 0.000 0.948 0.040 0.000
#> SRR957946 1 0.1442 0.8826 0.952 0.012 0.004 0.032 0.000
#> SRR957947 1 0.1569 0.8815 0.948 0.012 0.032 0.008 0.000
#> SRR957948 5 0.2020 0.4398 0.000 0.100 0.000 0.000 0.900
#> SRR957949 5 0.0703 0.5514 0.000 0.024 0.000 0.000 0.976
#> SRR957950 1 0.0404 0.8863 0.988 0.000 0.000 0.000 0.012
#> SRR957951 5 0.0912 0.5531 0.000 0.012 0.016 0.000 0.972
#> SRR957952 5 0.7769 0.3012 0.132 0.140 0.264 0.000 0.464
#> SRR957953 4 0.0000 0.8929 0.000 0.000 0.000 1.000 0.000
#> SRR957954 4 0.0000 0.8929 0.000 0.000 0.000 1.000 0.000
#> SRR957956 4 0.0609 0.8927 0.020 0.000 0.000 0.980 0.000
#> SRR957957 4 0.3710 0.7356 0.004 0.216 0.004 0.772 0.004
#> SRR957958 4 0.0162 0.8933 0.004 0.000 0.000 0.996 0.000
#> SRR957959 3 0.6253 0.0267 0.000 0.156 0.492 0.000 0.352
#> SRR957960 5 0.0000 0.5499 0.000 0.000 0.000 0.000 1.000
#> SRR957961 5 0.5989 -0.3502 0.000 0.336 0.128 0.000 0.536
#> SRR957962 4 0.0000 0.8929 0.000 0.000 0.000 1.000 0.000
#> SRR957963 4 0.2516 0.7862 0.140 0.000 0.000 0.860 0.000
#> SRR957964 3 0.4446 0.0310 0.004 0.000 0.520 0.476 0.000
#> SRR957965 2 0.3534 0.6392 0.000 0.744 0.000 0.000 0.256
#> SRR957966 1 0.0000 0.8886 1.000 0.000 0.000 0.000 0.000
#> SRR957967 4 0.0000 0.8929 0.000 0.000 0.000 1.000 0.000
#> SRR957968 4 0.0794 0.8902 0.028 0.000 0.000 0.972 0.000
#> SRR957969 1 0.4527 0.6499 0.692 0.000 0.036 0.272 0.000
#> SRR957970 5 0.0404 0.5520 0.012 0.000 0.000 0.000 0.988
#> SRR957971 3 0.1915 0.8239 0.000 0.032 0.928 0.040 0.000
#> SRR957972 3 0.2179 0.7587 0.004 0.100 0.896 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.1327 0.8785 0.936 0.000 0.000 0.000 0.000 0.064
#> SRR957915 5 0.3446 0.1524 0.000 0.000 0.000 0.000 0.692 0.308
#> SRR957916 6 0.0508 0.6908 0.012 0.004 0.000 0.000 0.000 0.984
#> SRR957884 4 0.0653 0.9087 0.012 0.004 0.000 0.980 0.000 0.004
#> SRR957885 3 0.0000 0.8651 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957886 5 0.5956 0.0523 0.000 0.224 0.000 0.000 0.420 0.356
#> SRR957887 3 0.3857 0.1504 0.000 0.000 0.532 0.468 0.000 0.000
#> SRR957888 1 0.0951 0.8813 0.968 0.008 0.000 0.020 0.000 0.004
#> SRR957889 1 0.3023 0.7693 0.768 0.000 0.000 0.000 0.000 0.232
#> SRR957890 1 0.1663 0.8725 0.912 0.000 0.000 0.000 0.000 0.088
#> SRR957891 5 0.1444 0.3949 0.000 0.000 0.000 0.000 0.928 0.072
#> SRR957893 1 0.0603 0.8821 0.980 0.004 0.000 0.016 0.000 0.000
#> SRR957892 1 0.0951 0.8813 0.968 0.008 0.000 0.020 0.000 0.004
#> SRR957894 6 0.5001 0.5245 0.000 0.196 0.000 0.000 0.160 0.644
#> SRR957895 2 0.7466 0.0263 0.056 0.408 0.000 0.336 0.060 0.140
#> SRR957896 5 0.4095 0.3419 0.000 0.480 0.000 0.000 0.512 0.008
#> SRR957897 4 0.0291 0.9139 0.004 0.004 0.000 0.992 0.000 0.000
#> SRR957898 1 0.3555 0.6648 0.712 0.008 0.280 0.000 0.000 0.000
#> SRR957899 5 0.3817 0.3706 0.000 0.432 0.000 0.000 0.568 0.000
#> SRR957900 6 0.4162 0.5786 0.000 0.120 0.000 0.000 0.136 0.744
#> SRR957901 5 0.1257 0.4214 0.000 0.020 0.000 0.000 0.952 0.028
#> SRR957902 6 0.2488 0.7005 0.000 0.044 0.000 0.000 0.076 0.880
#> SRR957903 3 0.0000 0.8651 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957904 3 0.0000 0.8651 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957905 4 0.2984 0.8547 0.048 0.012 0.028 0.876 0.036 0.000
#> SRR957906 2 0.3955 0.1880 0.000 0.560 0.000 0.004 0.436 0.000
#> SRR957907 5 0.5833 0.0395 0.000 0.192 0.000 0.000 0.444 0.364
#> SRR957908 2 0.3996 0.2002 0.000 0.512 0.000 0.004 0.484 0.000
#> SRR957909 1 0.0603 0.8821 0.980 0.004 0.000 0.016 0.000 0.000
#> SRR957910 6 0.3288 0.5749 0.000 0.000 0.000 0.000 0.276 0.724
#> SRR957911 1 0.1313 0.8791 0.952 0.016 0.000 0.028 0.000 0.004
#> SRR957912 1 0.6094 0.3548 0.440 0.308 0.000 0.004 0.000 0.248
#> SRR957913 3 0.0000 0.8651 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957917 6 0.1168 0.6839 0.028 0.000 0.016 0.000 0.000 0.956
#> SRR957918 5 0.2805 0.4398 0.000 0.184 0.000 0.000 0.812 0.004
#> SRR957920 3 0.2260 0.7977 0.000 0.000 0.860 0.000 0.000 0.140
#> SRR957919 2 0.3954 0.0962 0.000 0.684 0.000 0.004 0.016 0.296
#> SRR957921 5 0.2219 0.3423 0.000 0.000 0.000 0.000 0.864 0.136
#> SRR957922 6 0.0260 0.6925 0.000 0.000 0.000 0.000 0.008 0.992
#> SRR957924 1 0.1167 0.8826 0.960 0.012 0.000 0.020 0.000 0.008
#> SRR957923 6 0.4631 0.5949 0.016 0.164 0.000 0.004 0.088 0.728
#> SRR957925 6 0.4896 0.5250 0.004 0.212 0.000 0.000 0.120 0.664
#> SRR957926 1 0.1269 0.8792 0.956 0.012 0.020 0.012 0.000 0.000
#> SRR957927 4 0.3380 0.7963 0.004 0.056 0.000 0.844 0.024 0.072
#> SRR957928 1 0.3445 0.7347 0.732 0.008 0.000 0.000 0.000 0.260
#> SRR957929 1 0.1707 0.8818 0.928 0.012 0.000 0.004 0.000 0.056
#> SRR957930 6 0.2609 0.6991 0.000 0.036 0.000 0.000 0.096 0.868
#> SRR957931 5 0.1745 0.3927 0.000 0.012 0.000 0.000 0.920 0.068
#> SRR957932 3 0.1075 0.8560 0.000 0.000 0.952 0.000 0.000 0.048
#> SRR957933 1 0.2789 0.8343 0.872 0.016 0.088 0.020 0.000 0.004
#> SRR957934 5 0.4225 0.3394 0.000 0.480 0.000 0.004 0.508 0.008
#> SRR957935 6 0.3832 0.6553 0.060 0.048 0.000 0.020 0.044 0.828
#> SRR957936 2 0.4226 0.1925 0.000 0.504 0.000 0.004 0.484 0.008
#> SRR957937 5 0.1007 0.4070 0.000 0.000 0.000 0.000 0.956 0.044
#> SRR957938 5 0.5665 0.1939 0.000 0.224 0.000 0.000 0.532 0.244
#> SRR957939 4 0.1296 0.8926 0.044 0.004 0.000 0.948 0.000 0.004
#> SRR957941 6 0.5702 0.1928 0.012 0.108 0.000 0.004 0.352 0.524
#> SRR957940 4 0.2896 0.7793 0.016 0.000 0.160 0.824 0.000 0.000
#> SRR957942 2 0.5731 0.0459 0.000 0.516 0.000 0.000 0.260 0.224
#> SRR957943 2 0.3996 0.2002 0.000 0.512 0.000 0.004 0.484 0.000
#> SRR957944 6 0.3490 0.5749 0.000 0.008 0.000 0.000 0.268 0.724
#> SRR957945 3 0.0000 0.8651 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957946 1 0.1531 0.8778 0.928 0.000 0.004 0.000 0.000 0.068
#> SRR957947 1 0.1501 0.8761 0.924 0.000 0.000 0.000 0.000 0.076
#> SRR957948 5 0.4095 0.3419 0.000 0.480 0.000 0.000 0.512 0.008
#> SRR957949 2 0.5937 -0.0621 0.004 0.480 0.000 0.000 0.208 0.308
#> SRR957950 1 0.2278 0.8711 0.900 0.044 0.000 0.004 0.000 0.052
#> SRR957951 5 0.5817 0.2779 0.000 0.244 0.000 0.000 0.496 0.260
#> SRR957952 6 0.0865 0.6800 0.036 0.000 0.000 0.000 0.000 0.964
#> SRR957953 4 0.0547 0.9140 0.000 0.000 0.020 0.980 0.000 0.000
#> SRR957954 4 0.0806 0.9134 0.000 0.008 0.020 0.972 0.000 0.000
#> SRR957956 4 0.0436 0.9150 0.004 0.004 0.004 0.988 0.000 0.000
#> SRR957957 4 0.3810 0.3820 0.000 0.428 0.000 0.572 0.000 0.000
#> SRR957958 4 0.0458 0.9149 0.000 0.000 0.016 0.984 0.000 0.000
#> SRR957959 6 0.4700 0.3401 0.000 0.000 0.288 0.000 0.076 0.636
#> SRR957960 2 0.5700 -0.1370 0.004 0.480 0.000 0.000 0.144 0.372
#> SRR957961 5 0.3269 0.4387 0.000 0.184 0.024 0.000 0.792 0.000
#> SRR957962 4 0.0547 0.9140 0.000 0.000 0.020 0.980 0.000 0.000
#> SRR957963 4 0.1807 0.8826 0.060 0.000 0.020 0.920 0.000 0.000
#> SRR957964 3 0.3384 0.6470 0.004 0.008 0.760 0.228 0.000 0.000
#> SRR957965 5 0.4444 -0.2471 0.000 0.436 0.000 0.000 0.536 0.028
#> SRR957966 1 0.1528 0.8829 0.936 0.000 0.000 0.016 0.000 0.048
#> SRR957967 4 0.0547 0.9140 0.000 0.000 0.020 0.980 0.000 0.000
#> SRR957968 4 0.0291 0.9146 0.004 0.000 0.004 0.992 0.000 0.000
#> SRR957969 1 0.4944 0.6730 0.676 0.008 0.148 0.168 0.000 0.000
#> SRR957970 2 0.6222 -0.0502 0.012 0.476 0.000 0.004 0.204 0.304
#> SRR957971 3 0.1267 0.8510 0.000 0.000 0.940 0.000 0.000 0.060
#> SRR957972 3 0.3136 0.7102 0.004 0.000 0.768 0.000 0.000 0.228
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.991 0.5011 0.498 0.498
#> 3 3 0.547 0.715 0.819 0.2316 0.744 0.531
#> 4 4 0.547 0.630 0.795 0.1103 0.903 0.736
#> 5 5 0.644 0.650 0.776 0.0987 0.917 0.736
#> 6 6 0.780 0.750 0.836 0.0771 0.920 0.684
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
#> SRR957914 1 0.000 0.9952 1.000 0.000
#> SRR957915 2 0.000 0.9852 0.000 1.000
#> SRR957916 2 0.000 0.9852 0.000 1.000
#> SRR957884 1 0.000 0.9952 1.000 0.000
#> SRR957885 1 0.000 0.9952 1.000 0.000
#> SRR957886 2 0.000 0.9852 0.000 1.000
#> SRR957887 1 0.000 0.9952 1.000 0.000
#> SRR957888 1 0.000 0.9952 1.000 0.000
#> SRR957889 1 0.000 0.9952 1.000 0.000
#> SRR957890 1 0.000 0.9952 1.000 0.000
#> SRR957891 2 0.000 0.9852 0.000 1.000
#> SRR957893 1 0.000 0.9952 1.000 0.000
#> SRR957892 1 0.000 0.9952 1.000 0.000
#> SRR957894 2 0.000 0.9852 0.000 1.000
#> SRR957895 1 0.000 0.9952 1.000 0.000
#> SRR957896 2 0.000 0.9852 0.000 1.000
#> SRR957897 1 0.000 0.9952 1.000 0.000
#> SRR957898 1 0.000 0.9952 1.000 0.000
#> SRR957899 2 0.000 0.9852 0.000 1.000
#> SRR957900 2 0.000 0.9852 0.000 1.000
#> SRR957901 2 0.000 0.9852 0.000 1.000
#> SRR957902 2 0.000 0.9852 0.000 1.000
#> SRR957903 1 0.000 0.9952 1.000 0.000
#> SRR957904 1 0.000 0.9952 1.000 0.000
#> SRR957905 1 0.000 0.9952 1.000 0.000
#> SRR957906 2 0.000 0.9852 0.000 1.000
#> SRR957907 2 0.000 0.9852 0.000 1.000
#> SRR957908 2 0.000 0.9852 0.000 1.000
#> SRR957909 1 0.000 0.9952 1.000 0.000
#> SRR957910 2 0.000 0.9852 0.000 1.000
#> SRR957911 1 0.000 0.9952 1.000 0.000
#> SRR957912 1 0.000 0.9952 1.000 0.000
#> SRR957913 1 0.000 0.9952 1.000 0.000
#> SRR957917 1 0.000 0.9952 1.000 0.000
#> SRR957918 2 0.000 0.9852 0.000 1.000
#> SRR957920 1 0.000 0.9952 1.000 0.000
#> SRR957919 2 0.000 0.9852 0.000 1.000
#> SRR957921 2 0.000 0.9852 0.000 1.000
#> SRR957922 2 0.000 0.9852 0.000 1.000
#> SRR957924 1 0.000 0.9952 1.000 0.000
#> SRR957923 2 0.000 0.9852 0.000 1.000
#> SRR957925 2 0.000 0.9852 0.000 1.000
#> SRR957926 1 0.000 0.9952 1.000 0.000
#> SRR957927 2 0.388 0.9083 0.076 0.924
#> SRR957928 1 0.000 0.9952 1.000 0.000
#> SRR957929 1 0.000 0.9952 1.000 0.000
#> SRR957930 2 0.000 0.9852 0.000 1.000
#> SRR957931 2 0.000 0.9852 0.000 1.000
#> SRR957932 1 0.000 0.9952 1.000 0.000
#> SRR957933 1 0.000 0.9952 1.000 0.000
#> SRR957934 2 0.000 0.9852 0.000 1.000
#> SRR957935 1 0.760 0.7110 0.780 0.220
#> SRR957936 2 0.000 0.9852 0.000 1.000
#> SRR957937 2 0.000 0.9852 0.000 1.000
#> SRR957938 2 0.000 0.9852 0.000 1.000
#> SRR957939 1 0.000 0.9952 1.000 0.000
#> SRR957941 2 0.000 0.9852 0.000 1.000
#> SRR957940 1 0.000 0.9952 1.000 0.000
#> SRR957942 2 0.000 0.9852 0.000 1.000
#> SRR957943 2 0.000 0.9852 0.000 1.000
#> SRR957944 2 0.000 0.9852 0.000 1.000
#> SRR957945 1 0.000 0.9952 1.000 0.000
#> SRR957946 1 0.000 0.9952 1.000 0.000
#> SRR957947 1 0.000 0.9952 1.000 0.000
#> SRR957948 2 0.000 0.9852 0.000 1.000
#> SRR957949 2 0.000 0.9852 0.000 1.000
#> SRR957950 1 0.000 0.9952 1.000 0.000
#> SRR957951 2 0.000 0.9852 0.000 1.000
#> SRR957952 1 0.000 0.9952 1.000 0.000
#> SRR957953 1 0.000 0.9952 1.000 0.000
#> SRR957954 1 0.000 0.9952 1.000 0.000
#> SRR957956 1 0.000 0.9952 1.000 0.000
#> SRR957957 2 0.998 0.0877 0.476 0.524
#> SRR957958 1 0.000 0.9952 1.000 0.000
#> SRR957959 2 0.141 0.9669 0.020 0.980
#> SRR957960 2 0.000 0.9852 0.000 1.000
#> SRR957961 2 0.000 0.9852 0.000 1.000
#> SRR957962 1 0.000 0.9952 1.000 0.000
#> SRR957963 1 0.000 0.9952 1.000 0.000
#> SRR957964 1 0.000 0.9952 1.000 0.000
#> SRR957965 2 0.000 0.9852 0.000 1.000
#> SRR957966 1 0.000 0.9952 1.000 0.000
#> SRR957967 1 0.000 0.9952 1.000 0.000
#> SRR957968 1 0.000 0.9952 1.000 0.000
#> SRR957969 1 0.000 0.9952 1.000 0.000
#> SRR957970 2 0.000 0.9852 0.000 1.000
#> SRR957971 1 0.000 0.9952 1.000 0.000
#> SRR957972 1 0.000 0.9952 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.1163 0.7595 0.972 0.028 0.000
#> SRR957915 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957916 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957884 3 0.7218 0.7387 0.296 0.052 0.652
#> SRR957885 3 0.6597 0.7485 0.312 0.024 0.664
#> SRR957886 2 0.0424 0.9158 0.000 0.992 0.008
#> SRR957887 3 0.5363 0.7668 0.276 0.000 0.724
#> SRR957888 1 0.0237 0.7615 0.996 0.004 0.000
#> SRR957889 1 0.4974 0.6479 0.764 0.236 0.000
#> SRR957890 1 0.3340 0.7311 0.880 0.120 0.000
#> SRR957891 2 0.0237 0.9149 0.004 0.996 0.000
#> SRR957893 1 0.3784 0.6585 0.864 0.004 0.132
#> SRR957892 1 0.0237 0.7615 0.996 0.004 0.000
#> SRR957894 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957895 1 0.5785 0.4997 0.668 0.332 0.000
#> SRR957896 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957897 3 0.6662 0.7038 0.232 0.052 0.716
#> SRR957898 1 0.6969 -0.1367 0.596 0.024 0.380
#> SRR957899 2 0.0237 0.9165 0.004 0.996 0.000
#> SRR957900 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957901 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957903 3 0.6541 0.7505 0.304 0.024 0.672
#> SRR957904 3 0.6541 0.7505 0.304 0.024 0.672
#> SRR957905 3 0.5254 0.7647 0.264 0.000 0.736
#> SRR957906 3 0.6204 0.0515 0.000 0.424 0.576
#> SRR957907 2 0.1129 0.9108 0.004 0.976 0.020
#> SRR957908 3 0.6062 0.0809 0.000 0.384 0.616
#> SRR957909 1 0.0237 0.7615 0.996 0.004 0.000
#> SRR957910 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957911 1 0.3425 0.6782 0.884 0.004 0.112
#> SRR957912 1 0.5291 0.6011 0.732 0.268 0.000
#> SRR957913 3 0.6541 0.7505 0.304 0.024 0.672
#> SRR957917 1 0.8382 0.3440 0.492 0.424 0.084
#> SRR957918 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957920 3 0.8561 0.6581 0.244 0.156 0.600
#> SRR957919 2 0.5926 0.5265 0.000 0.644 0.356
#> SRR957921 2 0.0237 0.9149 0.004 0.996 0.000
#> SRR957922 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957924 1 0.0237 0.7615 0.996 0.004 0.000
#> SRR957923 2 0.4281 0.8432 0.072 0.872 0.056
#> SRR957925 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957926 1 0.4094 0.6833 0.872 0.028 0.100
#> SRR957927 3 0.7807 0.3673 0.068 0.336 0.596
#> SRR957928 1 0.1585 0.7574 0.964 0.028 0.008
#> SRR957929 1 0.5291 0.6011 0.732 0.268 0.000
#> SRR957930 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957931 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957932 3 0.6677 0.7446 0.324 0.024 0.652
#> SRR957933 1 0.1765 0.7462 0.956 0.004 0.040
#> SRR957934 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957935 2 0.2448 0.8682 0.076 0.924 0.000
#> SRR957936 2 0.6062 0.5202 0.000 0.616 0.384
#> SRR957937 2 0.0237 0.9157 0.000 0.996 0.004
#> SRR957938 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957939 1 0.8513 0.3940 0.596 0.264 0.140
#> SRR957941 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957940 3 0.5291 0.7657 0.268 0.000 0.732
#> SRR957942 2 0.5591 0.6271 0.000 0.696 0.304
#> SRR957943 3 0.6008 0.1083 0.000 0.372 0.628
#> SRR957944 2 0.1129 0.9108 0.004 0.976 0.020
#> SRR957945 3 0.6541 0.7505 0.304 0.024 0.672
#> SRR957946 1 0.1163 0.7595 0.972 0.028 0.000
#> SRR957947 1 0.1163 0.7595 0.972 0.028 0.000
#> SRR957948 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957949 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957950 1 0.0747 0.7629 0.984 0.016 0.000
#> SRR957951 2 0.0000 0.9163 0.000 1.000 0.000
#> SRR957952 2 0.8501 -0.1313 0.368 0.532 0.100
#> SRR957953 3 0.5254 0.7647 0.264 0.000 0.736
#> SRR957954 3 0.5397 0.7624 0.280 0.000 0.720
#> SRR957956 3 0.5291 0.7653 0.268 0.000 0.732
#> SRR957957 3 0.7165 0.5368 0.112 0.172 0.716
#> SRR957958 3 0.5254 0.7647 0.264 0.000 0.736
#> SRR957959 2 0.0661 0.9111 0.004 0.988 0.008
#> SRR957960 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957961 2 0.6460 0.0883 0.004 0.556 0.440
#> SRR957962 3 0.5465 0.7579 0.288 0.000 0.712
#> SRR957963 3 0.6302 0.4080 0.480 0.000 0.520
#> SRR957964 3 0.6702 0.7422 0.328 0.024 0.648
#> SRR957965 2 0.4452 0.7875 0.000 0.808 0.192
#> SRR957966 1 0.0237 0.7615 0.996 0.004 0.000
#> SRR957967 3 0.5621 0.7580 0.308 0.000 0.692
#> SRR957968 3 0.5216 0.7645 0.260 0.000 0.740
#> SRR957969 3 0.6750 0.7360 0.336 0.024 0.640
#> SRR957970 2 0.1031 0.9137 0.024 0.976 0.000
#> SRR957971 3 0.6541 0.7505 0.304 0.024 0.672
#> SRR957972 1 0.9447 0.2366 0.464 0.348 0.188
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0937 0.86068 0.976 0.012 0.000 0.012
#> SRR957915 2 0.1471 0.75132 0.004 0.960 0.012 0.024
#> SRR957916 2 0.1004 0.75346 0.004 0.972 0.000 0.024
#> SRR957884 4 0.7666 0.51974 0.104 0.184 0.092 0.620
#> SRR957885 4 0.7031 0.66158 0.200 0.000 0.224 0.576
#> SRR957886 2 0.5131 0.22309 0.000 0.692 0.280 0.028
#> SRR957887 4 0.7075 0.58057 0.104 0.216 0.040 0.640
#> SRR957888 1 0.0927 0.85935 0.976 0.008 0.000 0.016
#> SRR957889 1 0.1174 0.85951 0.968 0.020 0.000 0.012
#> SRR957890 1 0.1174 0.85951 0.968 0.020 0.000 0.012
#> SRR957891 2 0.5311 0.05967 0.000 0.648 0.328 0.024
#> SRR957893 1 0.3852 0.70559 0.800 0.008 0.000 0.192
#> SRR957892 1 0.1890 0.84706 0.936 0.008 0.000 0.056
#> SRR957894 2 0.1707 0.75855 0.020 0.952 0.004 0.024
#> SRR957895 2 0.5550 0.18387 0.428 0.552 0.000 0.020
#> SRR957896 2 0.1520 0.75878 0.020 0.956 0.000 0.024
#> SRR957897 4 0.6791 0.59914 0.084 0.160 0.068 0.688
#> SRR957898 1 0.5713 0.25396 0.620 0.000 0.040 0.340
#> SRR957899 2 0.0992 0.75691 0.004 0.976 0.008 0.012
#> SRR957900 2 0.1004 0.75346 0.004 0.972 0.000 0.024
#> SRR957901 2 0.5405 0.10614 0.004 0.660 0.312 0.024
#> SRR957902 2 0.1151 0.75418 0.008 0.968 0.000 0.024
#> SRR957903 4 0.6578 0.67883 0.108 0.000 0.300 0.592
#> SRR957904 4 0.6578 0.67883 0.108 0.000 0.300 0.592
#> SRR957905 4 0.2216 0.71907 0.092 0.000 0.000 0.908
#> SRR957906 3 0.5085 0.89367 0.000 0.304 0.676 0.020
#> SRR957907 2 0.0524 0.75864 0.000 0.988 0.008 0.004
#> SRR957908 3 0.4988 0.89543 0.000 0.288 0.692 0.020
#> SRR957909 1 0.1635 0.85463 0.948 0.008 0.000 0.044
#> SRR957910 2 0.1339 0.75106 0.004 0.964 0.008 0.024
#> SRR957911 1 0.4194 0.63862 0.764 0.008 0.000 0.228
#> SRR957912 1 0.1411 0.83425 0.960 0.020 0.000 0.020
#> SRR957913 4 0.6578 0.67883 0.108 0.000 0.300 0.592
#> SRR957917 2 0.5214 0.24891 0.364 0.624 0.004 0.008
#> SRR957918 2 0.2329 0.75276 0.020 0.932 0.024 0.024
#> SRR957920 4 0.7811 0.32085 0.144 0.336 0.024 0.496
#> SRR957919 2 0.5252 0.10298 0.000 0.644 0.336 0.020
#> SRR957921 2 0.5137 0.19049 0.000 0.680 0.296 0.024
#> SRR957922 2 0.0188 0.75875 0.004 0.996 0.000 0.000
#> SRR957924 1 0.0804 0.85448 0.980 0.008 0.000 0.012
#> SRR957923 2 0.1962 0.75764 0.024 0.944 0.008 0.024
#> SRR957925 2 0.2443 0.74597 0.024 0.924 0.008 0.044
#> SRR957926 1 0.3978 0.69740 0.796 0.012 0.000 0.192
#> SRR957927 3 0.7509 0.77349 0.036 0.300 0.560 0.104
#> SRR957928 1 0.1059 0.86033 0.972 0.016 0.000 0.012
#> SRR957929 1 0.0927 0.84694 0.976 0.016 0.000 0.008
#> SRR957930 2 0.1004 0.75346 0.004 0.972 0.000 0.024
#> SRR957931 2 0.1004 0.75346 0.004 0.972 0.000 0.024
#> SRR957932 4 0.6110 0.52686 0.368 0.000 0.056 0.576
#> SRR957933 1 0.3764 0.73092 0.816 0.012 0.000 0.172
#> SRR957934 2 0.1920 0.75526 0.024 0.944 0.004 0.028
#> SRR957935 2 0.2739 0.73692 0.036 0.912 0.008 0.044
#> SRR957936 3 0.5013 0.89677 0.000 0.292 0.688 0.020
#> SRR957937 2 0.5250 0.09267 0.000 0.660 0.316 0.024
#> SRR957938 2 0.1707 0.75855 0.020 0.952 0.004 0.024
#> SRR957939 2 0.7823 0.18632 0.136 0.612 0.160 0.092
#> SRR957941 2 0.1811 0.75744 0.020 0.948 0.004 0.028
#> SRR957940 4 0.2654 0.72233 0.108 0.000 0.004 0.888
#> SRR957942 3 0.5339 0.84040 0.000 0.356 0.624 0.020
#> SRR957943 3 0.4988 0.89543 0.000 0.288 0.692 0.020
#> SRR957944 2 0.0804 0.76023 0.012 0.980 0.008 0.000
#> SRR957945 4 0.6578 0.67883 0.108 0.000 0.300 0.592
#> SRR957946 1 0.1059 0.86033 0.972 0.016 0.000 0.012
#> SRR957947 1 0.1059 0.86033 0.972 0.016 0.000 0.012
#> SRR957948 2 0.1707 0.75855 0.020 0.952 0.004 0.024
#> SRR957949 2 0.1629 0.75749 0.024 0.952 0.000 0.024
#> SRR957950 1 0.0937 0.84473 0.976 0.012 0.000 0.012
#> SRR957951 2 0.2115 0.72688 0.004 0.936 0.036 0.024
#> SRR957952 2 0.5232 0.27780 0.340 0.644 0.004 0.012
#> SRR957953 4 0.2281 0.72008 0.096 0.000 0.000 0.904
#> SRR957954 4 0.3975 0.66663 0.240 0.000 0.000 0.760
#> SRR957956 4 0.2408 0.72114 0.104 0.000 0.000 0.896
#> SRR957957 4 0.8778 -0.03894 0.056 0.280 0.228 0.436
#> SRR957958 4 0.2281 0.72008 0.096 0.000 0.000 0.904
#> SRR957959 2 0.6162 0.48092 0.116 0.736 0.096 0.052
#> SRR957960 2 0.2443 0.74597 0.024 0.924 0.008 0.044
#> SRR957961 3 0.5815 0.68103 0.000 0.428 0.540 0.032
#> SRR957962 4 0.3975 0.66663 0.240 0.000 0.000 0.760
#> SRR957963 4 0.4999 0.04689 0.492 0.000 0.000 0.508
#> SRR957964 4 0.6201 0.52261 0.376 0.000 0.060 0.564
#> SRR957965 2 0.5388 -0.43542 0.000 0.532 0.456 0.012
#> SRR957966 1 0.1635 0.85463 0.948 0.008 0.000 0.044
#> SRR957967 4 0.2704 0.72043 0.124 0.000 0.000 0.876
#> SRR957968 4 0.2281 0.72008 0.096 0.000 0.000 0.904
#> SRR957969 4 0.6031 0.50538 0.388 0.000 0.048 0.564
#> SRR957970 2 0.2443 0.74597 0.024 0.924 0.008 0.044
#> SRR957971 4 0.6578 0.67883 0.108 0.000 0.300 0.592
#> SRR957972 1 0.7484 -0.00706 0.512 0.184 0.004 0.300
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.1430 0.8864 0.944 0.000 0.052 0.000 0.004
#> SRR957915 5 0.2074 0.7008 0.000 0.104 0.000 0.000 0.896
#> SRR957916 5 0.0451 0.7202 0.004 0.008 0.000 0.000 0.988
#> SRR957884 4 0.6646 0.6628 0.040 0.108 0.168 0.648 0.036
#> SRR957885 3 0.3421 0.6474 0.080 0.000 0.840 0.080 0.000
#> SRR957886 5 0.4769 0.0919 0.004 0.440 0.000 0.012 0.544
#> SRR957887 3 0.4879 0.4783 0.020 0.028 0.748 0.184 0.020
#> SRR957888 1 0.1412 0.8932 0.952 0.008 0.000 0.036 0.004
#> SRR957889 1 0.1557 0.8858 0.940 0.000 0.052 0.000 0.008
#> SRR957890 1 0.1557 0.8858 0.940 0.000 0.052 0.000 0.008
#> SRR957891 5 0.4696 0.1715 0.004 0.400 0.000 0.012 0.584
#> SRR957893 1 0.2468 0.8738 0.908 0.004 0.048 0.036 0.004
#> SRR957892 1 0.2394 0.8749 0.912 0.004 0.044 0.036 0.004
#> SRR957894 5 0.5201 0.6635 0.040 0.176 0.000 0.060 0.724
#> SRR957895 1 0.5290 0.1373 0.560 0.004 0.000 0.044 0.392
#> SRR957896 5 0.3034 0.7085 0.040 0.020 0.000 0.060 0.880
#> SRR957897 4 0.5049 0.6152 0.028 0.124 0.056 0.768 0.024
#> SRR957898 1 0.5067 0.5717 0.700 0.000 0.172 0.128 0.000
#> SRR957899 5 0.2787 0.6882 0.004 0.136 0.000 0.004 0.856
#> SRR957900 5 0.0162 0.7190 0.004 0.000 0.000 0.000 0.996
#> SRR957901 5 0.4696 0.1913 0.004 0.400 0.000 0.012 0.584
#> SRR957902 5 0.0451 0.7193 0.004 0.008 0.000 0.000 0.988
#> SRR957903 3 0.0162 0.6638 0.000 0.000 0.996 0.004 0.000
#> SRR957904 3 0.1124 0.6715 0.000 0.000 0.960 0.036 0.004
#> SRR957905 4 0.3419 0.7535 0.016 0.000 0.180 0.804 0.000
#> SRR957906 2 0.2338 0.8743 0.000 0.884 0.004 0.000 0.112
#> SRR957907 5 0.4833 0.6985 0.040 0.144 0.000 0.056 0.760
#> SRR957908 2 0.2124 0.8745 0.000 0.900 0.000 0.004 0.096
#> SRR957909 1 0.1573 0.8935 0.948 0.008 0.004 0.036 0.004
#> SRR957910 5 0.2733 0.6923 0.004 0.112 0.000 0.012 0.872
#> SRR957911 1 0.2234 0.8754 0.916 0.000 0.044 0.036 0.004
#> SRR957912 1 0.0290 0.8841 0.992 0.000 0.000 0.000 0.008
#> SRR957913 3 0.0963 0.6714 0.000 0.000 0.964 0.036 0.000
#> SRR957917 5 0.6844 0.0860 0.284 0.008 0.252 0.000 0.456
#> SRR957918 5 0.5914 0.5727 0.040 0.260 0.000 0.068 0.632
#> SRR957920 3 0.6832 0.3129 0.004 0.096 0.584 0.076 0.240
#> SRR957919 5 0.4367 0.3138 0.000 0.416 0.000 0.004 0.580
#> SRR957921 5 0.4517 0.2211 0.000 0.388 0.000 0.012 0.600
#> SRR957922 5 0.0566 0.7163 0.004 0.012 0.000 0.000 0.984
#> SRR957924 1 0.1124 0.8939 0.960 0.000 0.000 0.036 0.004
#> SRR957923 5 0.6017 0.6087 0.044 0.184 0.000 0.112 0.660
#> SRR957925 5 0.4389 0.6746 0.040 0.100 0.000 0.060 0.800
#> SRR957926 1 0.2238 0.8772 0.912 0.000 0.064 0.020 0.004
#> SRR957927 2 0.4526 0.8169 0.000 0.784 0.040 0.048 0.128
#> SRR957928 1 0.1430 0.8864 0.944 0.000 0.052 0.000 0.004
#> SRR957929 1 0.0451 0.8867 0.988 0.000 0.000 0.004 0.008
#> SRR957930 5 0.0162 0.7190 0.004 0.000 0.000 0.000 0.996
#> SRR957931 5 0.2179 0.7033 0.004 0.100 0.000 0.000 0.896
#> SRR957932 3 0.6085 0.4356 0.216 0.000 0.572 0.212 0.000
#> SRR957933 1 0.2308 0.8743 0.912 0.000 0.048 0.036 0.004
#> SRR957934 5 0.3213 0.7058 0.040 0.028 0.000 0.060 0.872
#> SRR957935 5 0.4228 0.6709 0.040 0.088 0.000 0.060 0.812
#> SRR957936 2 0.2124 0.8745 0.000 0.900 0.000 0.004 0.096
#> SRR957937 5 0.4705 0.1610 0.004 0.404 0.000 0.012 0.580
#> SRR957938 5 0.5166 0.6671 0.040 0.172 0.000 0.060 0.728
#> SRR957939 4 0.8077 0.0543 0.060 0.132 0.044 0.440 0.324
#> SRR957941 5 0.3455 0.7005 0.040 0.040 0.000 0.060 0.860
#> SRR957940 4 0.3675 0.7498 0.024 0.000 0.188 0.788 0.000
#> SRR957942 2 0.3266 0.7866 0.000 0.796 0.000 0.004 0.200
#> SRR957943 2 0.2124 0.8745 0.000 0.900 0.000 0.004 0.096
#> SRR957944 5 0.4380 0.7037 0.028 0.136 0.000 0.048 0.788
#> SRR957945 3 0.1043 0.6709 0.000 0.000 0.960 0.040 0.000
#> SRR957946 1 0.1502 0.8847 0.940 0.000 0.056 0.000 0.004
#> SRR957947 1 0.1430 0.8864 0.944 0.000 0.052 0.000 0.004
#> SRR957948 5 0.4389 0.7096 0.040 0.100 0.000 0.060 0.800
#> SRR957949 5 0.3034 0.7085 0.040 0.020 0.000 0.060 0.880
#> SRR957950 1 0.0798 0.8922 0.976 0.000 0.000 0.016 0.008
#> SRR957951 5 0.3618 0.6181 0.004 0.196 0.000 0.012 0.788
#> SRR957952 5 0.6829 0.2117 0.232 0.016 0.252 0.000 0.500
#> SRR957953 4 0.3419 0.7535 0.016 0.000 0.180 0.804 0.000
#> SRR957954 4 0.5334 0.6539 0.148 0.000 0.180 0.672 0.000
#> SRR957956 4 0.3602 0.7539 0.024 0.000 0.180 0.796 0.000
#> SRR957957 4 0.6346 0.4464 0.016 0.196 0.044 0.652 0.092
#> SRR957958 4 0.3419 0.7535 0.016 0.000 0.180 0.804 0.000
#> SRR957959 5 0.5210 0.5147 0.000 0.200 0.088 0.012 0.700
#> SRR957960 5 0.4228 0.6709 0.040 0.088 0.000 0.060 0.812
#> SRR957961 2 0.6136 0.3267 0.004 0.468 0.112 0.000 0.416
#> SRR957962 4 0.5334 0.6539 0.148 0.000 0.180 0.672 0.000
#> SRR957963 4 0.4969 0.4941 0.292 0.000 0.056 0.652 0.000
#> SRR957964 3 0.5824 0.4899 0.224 0.000 0.608 0.168 0.000
#> SRR957965 2 0.3022 0.8593 0.004 0.848 0.000 0.012 0.136
#> SRR957966 1 0.1573 0.8935 0.948 0.008 0.004 0.036 0.004
#> SRR957967 4 0.3759 0.7537 0.024 0.000 0.180 0.792 0.004
#> SRR957968 4 0.3419 0.7535 0.016 0.000 0.180 0.804 0.000
#> SRR957969 3 0.6685 0.2007 0.380 0.000 0.384 0.236 0.000
#> SRR957970 5 0.4173 0.6739 0.040 0.084 0.000 0.060 0.816
#> SRR957971 3 0.0162 0.6638 0.000 0.000 0.996 0.004 0.000
#> SRR957972 3 0.7457 0.3796 0.360 0.004 0.444 0.100 0.092
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.1075 0.8913 0.952 0.000 0.048 0.000 0.000 0.000
#> SRR957915 5 0.4079 0.5643 0.000 0.032 0.000 0.000 0.680 0.288
#> SRR957916 5 0.3052 0.6898 0.000 0.004 0.000 0.000 0.780 0.216
#> SRR957884 4 0.2367 0.8874 0.016 0.008 0.000 0.888 0.000 0.088
#> SRR957885 3 0.3017 0.8567 0.020 0.000 0.816 0.164 0.000 0.000
#> SRR957886 5 0.5848 -0.2439 0.000 0.192 0.000 0.000 0.428 0.380
#> SRR957887 3 0.4119 0.5866 0.016 0.004 0.644 0.336 0.000 0.000
#> SRR957888 1 0.0146 0.8939 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR957889 1 0.3044 0.8673 0.836 0.000 0.048 0.000 0.000 0.116
#> SRR957890 1 0.2212 0.8825 0.880 0.000 0.008 0.000 0.000 0.112
#> SRR957891 6 0.4455 0.7879 0.000 0.160 0.000 0.000 0.128 0.712
#> SRR957893 1 0.1010 0.8888 0.960 0.000 0.000 0.036 0.000 0.004
#> SRR957892 1 0.0547 0.8945 0.980 0.000 0.000 0.020 0.000 0.000
#> SRR957894 5 0.1461 0.7809 0.000 0.044 0.000 0.000 0.940 0.016
#> SRR957895 1 0.6279 0.0473 0.436 0.000 0.000 0.124 0.396 0.044
#> SRR957896 5 0.0000 0.7911 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957897 4 0.2926 0.8672 0.012 0.012 0.012 0.860 0.000 0.104
#> SRR957898 1 0.4663 0.5459 0.656 0.000 0.272 0.068 0.000 0.004
#> SRR957899 6 0.4651 -0.0340 0.000 0.040 0.000 0.000 0.480 0.480
#> SRR957900 5 0.3023 0.6899 0.000 0.004 0.000 0.000 0.784 0.212
#> SRR957901 6 0.4455 0.7879 0.000 0.160 0.000 0.000 0.128 0.712
#> SRR957902 5 0.3136 0.6865 0.000 0.004 0.000 0.000 0.768 0.228
#> SRR957903 3 0.2003 0.8513 0.000 0.000 0.884 0.116 0.000 0.000
#> SRR957904 3 0.2340 0.8598 0.000 0.000 0.852 0.148 0.000 0.000
#> SRR957905 4 0.0000 0.9207 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957906 2 0.0000 0.8056 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957907 5 0.3493 0.6991 0.000 0.056 0.000 0.000 0.796 0.148
#> SRR957908 2 0.0000 0.8056 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957909 1 0.0405 0.8946 0.988 0.000 0.000 0.008 0.000 0.004
#> SRR957910 5 0.4444 0.1432 0.000 0.028 0.000 0.000 0.536 0.436
#> SRR957911 1 0.0632 0.8949 0.976 0.000 0.000 0.024 0.000 0.000
#> SRR957912 1 0.2048 0.8786 0.880 0.000 0.000 0.000 0.000 0.120
#> SRR957913 3 0.2340 0.8598 0.000 0.000 0.852 0.148 0.000 0.000
#> SRR957917 3 0.4183 0.7206 0.048 0.000 0.756 0.000 0.024 0.172
#> SRR957918 5 0.3455 0.6393 0.000 0.144 0.000 0.000 0.800 0.056
#> SRR957920 3 0.3792 0.7680 0.004 0.012 0.812 0.032 0.016 0.124
#> SRR957919 2 0.4258 -0.0989 0.000 0.516 0.000 0.000 0.468 0.016
#> SRR957921 6 0.4455 0.7879 0.000 0.160 0.000 0.000 0.128 0.712
#> SRR957922 5 0.2883 0.6983 0.000 0.000 0.000 0.000 0.788 0.212
#> SRR957924 1 0.1141 0.8947 0.948 0.000 0.000 0.000 0.000 0.052
#> SRR957923 5 0.3095 0.6881 0.000 0.112 0.000 0.028 0.844 0.016
#> SRR957925 5 0.0260 0.7884 0.000 0.000 0.000 0.000 0.992 0.008
#> SRR957926 1 0.1913 0.8738 0.908 0.000 0.080 0.000 0.000 0.012
#> SRR957927 2 0.3337 0.5486 0.000 0.736 0.000 0.260 0.004 0.000
#> SRR957928 1 0.2999 0.8691 0.840 0.000 0.048 0.000 0.000 0.112
#> SRR957929 1 0.1700 0.8890 0.916 0.000 0.000 0.000 0.004 0.080
#> SRR957930 5 0.2823 0.6994 0.000 0.000 0.000 0.000 0.796 0.204
#> SRR957931 5 0.4084 0.3042 0.000 0.012 0.000 0.000 0.588 0.400
#> SRR957932 3 0.3409 0.8481 0.024 0.000 0.788 0.184 0.000 0.004
#> SRR957933 1 0.1168 0.8946 0.956 0.000 0.000 0.028 0.000 0.016
#> SRR957934 5 0.0000 0.7911 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957935 5 0.0790 0.7727 0.000 0.000 0.000 0.000 0.968 0.032
#> SRR957936 2 0.0000 0.8056 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957937 6 0.5383 0.6843 0.000 0.184 0.000 0.000 0.232 0.584
#> SRR957938 5 0.1549 0.7797 0.000 0.044 0.000 0.000 0.936 0.020
#> SRR957939 4 0.5819 0.7097 0.036 0.068 0.012 0.700 0.080 0.104
#> SRR957941 5 0.0000 0.7911 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957940 4 0.0820 0.9131 0.012 0.000 0.016 0.972 0.000 0.000
#> SRR957942 2 0.2197 0.7313 0.000 0.900 0.000 0.000 0.044 0.056
#> SRR957943 2 0.0000 0.8056 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957944 5 0.1297 0.7887 0.000 0.012 0.000 0.000 0.948 0.040
#> SRR957945 3 0.2416 0.8589 0.000 0.000 0.844 0.156 0.000 0.000
#> SRR957946 1 0.2263 0.8855 0.896 0.000 0.048 0.000 0.000 0.056
#> SRR957947 1 0.2070 0.8882 0.908 0.000 0.048 0.000 0.000 0.044
#> SRR957948 5 0.1334 0.7847 0.000 0.032 0.000 0.000 0.948 0.020
#> SRR957949 5 0.0000 0.7911 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957950 1 0.0937 0.8949 0.960 0.000 0.000 0.000 0.000 0.040
#> SRR957951 6 0.4402 0.7682 0.000 0.104 0.000 0.000 0.184 0.712
#> SRR957952 3 0.4122 0.7237 0.020 0.000 0.764 0.000 0.056 0.160
#> SRR957953 4 0.0000 0.9207 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957954 4 0.0632 0.9169 0.024 0.000 0.000 0.976 0.000 0.000
#> SRR957956 4 0.0363 0.9212 0.012 0.000 0.000 0.988 0.000 0.000
#> SRR957957 4 0.3500 0.8255 0.000 0.064 0.012 0.820 0.000 0.104
#> SRR957958 4 0.0000 0.9207 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957959 6 0.3500 0.5986 0.000 0.012 0.120 0.000 0.052 0.816
#> SRR957960 5 0.0260 0.7884 0.000 0.000 0.000 0.000 0.992 0.008
#> SRR957961 6 0.5130 0.6218 0.000 0.224 0.080 0.000 0.032 0.664
#> SRR957962 4 0.0632 0.9169 0.024 0.000 0.000 0.976 0.000 0.000
#> SRR957963 4 0.2260 0.8128 0.140 0.000 0.000 0.860 0.000 0.000
#> SRR957964 3 0.3312 0.8497 0.028 0.000 0.792 0.180 0.000 0.000
#> SRR957965 2 0.1297 0.7706 0.000 0.948 0.000 0.000 0.040 0.012
#> SRR957966 1 0.0405 0.8946 0.988 0.000 0.000 0.008 0.000 0.004
#> SRR957967 4 0.0363 0.9212 0.012 0.000 0.000 0.988 0.000 0.000
#> SRR957968 4 0.0000 0.9207 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957969 3 0.4719 0.7864 0.100 0.000 0.692 0.200 0.000 0.008
#> SRR957970 5 0.0146 0.7898 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR957971 3 0.2003 0.8513 0.000 0.000 0.884 0.116 0.000 0.000
#> SRR957972 3 0.3795 0.7460 0.044 0.000 0.792 0.004 0.012 0.148
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.976 0.936 0.975 0.5030 0.498 0.498
#> 3 3 0.558 0.558 0.785 0.3194 0.747 0.536
#> 4 4 0.733 0.774 0.894 0.1271 0.824 0.540
#> 5 5 0.614 0.532 0.752 0.0590 0.946 0.800
#> 6 6 0.662 0.593 0.751 0.0421 0.894 0.591
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
#> SRR957914 1 0.0000 0.9786 1.000 0.000
#> SRR957915 2 0.0000 0.9693 0.000 1.000
#> SRR957916 2 0.0000 0.9693 0.000 1.000
#> SRR957884 1 0.0000 0.9786 1.000 0.000
#> SRR957885 1 0.0000 0.9786 1.000 0.000
#> SRR957886 2 0.0000 0.9693 0.000 1.000
#> SRR957887 1 0.0000 0.9786 1.000 0.000
#> SRR957888 1 0.0000 0.9786 1.000 0.000
#> SRR957889 2 0.9850 0.2550 0.428 0.572
#> SRR957890 1 0.5519 0.8434 0.872 0.128
#> SRR957891 2 0.0000 0.9693 0.000 1.000
#> SRR957893 1 0.0000 0.9786 1.000 0.000
#> SRR957892 1 0.0000 0.9786 1.000 0.000
#> SRR957894 2 0.0000 0.9693 0.000 1.000
#> SRR957895 1 0.4431 0.8873 0.908 0.092
#> SRR957896 2 0.0000 0.9693 0.000 1.000
#> SRR957897 1 0.0000 0.9786 1.000 0.000
#> SRR957898 1 0.0000 0.9786 1.000 0.000
#> SRR957899 2 0.0000 0.9693 0.000 1.000
#> SRR957900 2 0.0000 0.9693 0.000 1.000
#> SRR957901 2 0.0000 0.9693 0.000 1.000
#> SRR957902 2 0.0000 0.9693 0.000 1.000
#> SRR957903 1 0.0000 0.9786 1.000 0.000
#> SRR957904 2 0.9286 0.4899 0.344 0.656
#> SRR957905 1 0.0000 0.9786 1.000 0.000
#> SRR957906 2 0.0000 0.9693 0.000 1.000
#> SRR957907 2 0.0000 0.9693 0.000 1.000
#> SRR957908 2 0.0000 0.9693 0.000 1.000
#> SRR957909 1 0.0000 0.9786 1.000 0.000
#> SRR957910 2 0.0000 0.9693 0.000 1.000
#> SRR957911 1 0.0000 0.9786 1.000 0.000
#> SRR957912 2 0.9710 0.3358 0.400 0.600
#> SRR957913 1 0.0000 0.9786 1.000 0.000
#> SRR957917 2 0.0000 0.9693 0.000 1.000
#> SRR957918 2 0.0000 0.9693 0.000 1.000
#> SRR957920 2 0.0000 0.9693 0.000 1.000
#> SRR957919 2 0.0000 0.9693 0.000 1.000
#> SRR957921 2 0.0000 0.9693 0.000 1.000
#> SRR957922 2 0.0000 0.9693 0.000 1.000
#> SRR957924 1 0.0000 0.9786 1.000 0.000
#> SRR957923 2 0.0000 0.9693 0.000 1.000
#> SRR957925 2 0.0000 0.9693 0.000 1.000
#> SRR957926 1 0.0000 0.9786 1.000 0.000
#> SRR957927 2 0.7376 0.7282 0.208 0.792
#> SRR957928 1 0.0376 0.9754 0.996 0.004
#> SRR957929 2 0.0672 0.9623 0.008 0.992
#> SRR957930 2 0.0000 0.9693 0.000 1.000
#> SRR957931 2 0.0000 0.9693 0.000 1.000
#> SRR957932 1 0.0000 0.9786 1.000 0.000
#> SRR957933 1 0.0000 0.9786 1.000 0.000
#> SRR957934 2 0.0000 0.9693 0.000 1.000
#> SRR957935 2 0.0000 0.9693 0.000 1.000
#> SRR957936 2 0.0000 0.9693 0.000 1.000
#> SRR957937 2 0.0000 0.9693 0.000 1.000
#> SRR957938 2 0.0000 0.9693 0.000 1.000
#> SRR957939 1 0.4298 0.8910 0.912 0.088
#> SRR957941 2 0.0000 0.9693 0.000 1.000
#> SRR957940 1 0.0000 0.9786 1.000 0.000
#> SRR957942 2 0.0000 0.9693 0.000 1.000
#> SRR957943 2 0.0376 0.9659 0.004 0.996
#> SRR957944 2 0.0000 0.9693 0.000 1.000
#> SRR957945 1 0.0000 0.9786 1.000 0.000
#> SRR957946 1 0.0000 0.9786 1.000 0.000
#> SRR957947 1 0.0000 0.9786 1.000 0.000
#> SRR957948 2 0.0000 0.9693 0.000 1.000
#> SRR957949 2 0.0000 0.9693 0.000 1.000
#> SRR957950 1 0.0672 0.9720 0.992 0.008
#> SRR957951 2 0.0000 0.9693 0.000 1.000
#> SRR957952 2 0.0000 0.9693 0.000 1.000
#> SRR957953 1 0.0000 0.9786 1.000 0.000
#> SRR957954 1 0.0000 0.9786 1.000 0.000
#> SRR957956 1 0.0000 0.9786 1.000 0.000
#> SRR957957 1 0.9977 0.0709 0.528 0.472
#> SRR957958 1 0.0000 0.9786 1.000 0.000
#> SRR957959 2 0.0000 0.9693 0.000 1.000
#> SRR957960 2 0.0000 0.9693 0.000 1.000
#> SRR957961 2 0.0000 0.9693 0.000 1.000
#> SRR957962 1 0.0000 0.9786 1.000 0.000
#> SRR957963 1 0.0000 0.9786 1.000 0.000
#> SRR957964 1 0.0000 0.9786 1.000 0.000
#> SRR957965 2 0.0000 0.9693 0.000 1.000
#> SRR957966 1 0.0000 0.9786 1.000 0.000
#> SRR957967 1 0.0000 0.9786 1.000 0.000
#> SRR957968 1 0.0000 0.9786 1.000 0.000
#> SRR957969 1 0.0000 0.9786 1.000 0.000
#> SRR957970 2 0.0000 0.9693 0.000 1.000
#> SRR957971 1 0.0000 0.9786 1.000 0.000
#> SRR957972 2 0.0000 0.9693 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.2959 0.4502 0.900 0.000 0.100
#> SRR957915 2 0.0237 0.8434 0.000 0.996 0.004
#> SRR957916 2 0.3267 0.7749 0.000 0.884 0.116
#> SRR957884 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957885 3 0.0747 0.5496 0.016 0.000 0.984
#> SRR957886 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957887 3 0.1411 0.5351 0.036 0.000 0.964
#> SRR957888 1 0.0000 0.5397 1.000 0.000 0.000
#> SRR957889 3 0.6192 0.3119 0.420 0.000 0.580
#> SRR957890 3 0.6280 0.2752 0.460 0.000 0.540
#> SRR957891 2 0.2959 0.7895 0.000 0.900 0.100
#> SRR957893 1 0.5882 0.5972 0.652 0.000 0.348
#> SRR957892 1 0.3752 0.5832 0.856 0.000 0.144
#> SRR957894 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957895 1 0.0475 0.5369 0.992 0.004 0.004
#> SRR957896 2 0.6416 0.5489 0.376 0.616 0.008
#> SRR957897 1 0.7517 0.5691 0.540 0.040 0.420
#> SRR957898 3 0.3879 0.3980 0.152 0.000 0.848
#> SRR957899 2 0.1753 0.8257 0.000 0.952 0.048
#> SRR957900 2 0.2959 0.7892 0.000 0.900 0.100
#> SRR957901 2 0.0747 0.8398 0.000 0.984 0.016
#> SRR957902 2 0.0237 0.8434 0.000 0.996 0.004
#> SRR957903 3 0.0000 0.5560 0.000 0.000 1.000
#> SRR957904 3 0.0000 0.5560 0.000 0.000 1.000
#> SRR957905 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957906 2 0.3816 0.7244 0.000 0.852 0.148
#> SRR957907 2 0.0237 0.8434 0.000 0.996 0.004
#> SRR957908 2 0.0661 0.8403 0.004 0.988 0.008
#> SRR957909 1 0.0000 0.5397 1.000 0.000 0.000
#> SRR957910 2 0.0237 0.8434 0.000 0.996 0.004
#> SRR957911 1 0.4887 0.5857 0.772 0.000 0.228
#> SRR957912 3 0.7213 0.2981 0.420 0.028 0.552
#> SRR957913 3 0.0000 0.5560 0.000 0.000 1.000
#> SRR957917 3 0.6924 0.3247 0.020 0.400 0.580
#> SRR957918 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957920 3 0.6192 0.2963 0.000 0.420 0.580
#> SRR957919 2 0.0661 0.8403 0.004 0.988 0.008
#> SRR957921 2 0.4235 0.7056 0.000 0.824 0.176
#> SRR957922 2 0.1964 0.8212 0.000 0.944 0.056
#> SRR957924 1 0.0424 0.5363 0.992 0.000 0.008
#> SRR957923 2 0.5621 0.4935 0.308 0.692 0.000
#> SRR957925 2 0.6180 0.4947 0.416 0.584 0.000
#> SRR957926 3 0.5016 0.2372 0.240 0.000 0.760
#> SRR957927 3 0.9804 -0.3513 0.336 0.248 0.416
#> SRR957928 3 0.6192 0.3119 0.420 0.000 0.580
#> SRR957929 1 0.6416 -0.0854 0.616 0.376 0.008
#> SRR957930 2 0.0237 0.8434 0.000 0.996 0.004
#> SRR957931 2 0.2066 0.8184 0.000 0.940 0.060
#> SRR957932 3 0.0747 0.5496 0.016 0.000 0.984
#> SRR957933 3 0.5216 0.2430 0.260 0.000 0.740
#> SRR957934 2 0.5785 0.5956 0.332 0.668 0.000
#> SRR957935 2 0.6079 0.5343 0.388 0.612 0.000
#> SRR957936 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957939 1 0.6585 0.5709 0.736 0.064 0.200
#> SRR957941 2 0.4485 0.7710 0.136 0.844 0.020
#> SRR957940 3 0.5016 0.2132 0.240 0.000 0.760
#> SRR957942 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957943 2 0.6254 0.6471 0.108 0.776 0.116
#> SRR957944 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.5560 0.000 0.000 1.000
#> SRR957946 1 0.6302 -0.2560 0.520 0.000 0.480
#> SRR957947 1 0.6260 -0.2102 0.552 0.000 0.448
#> SRR957948 2 0.3030 0.8022 0.092 0.904 0.004
#> SRR957949 2 0.6553 0.5000 0.412 0.580 0.008
#> SRR957950 1 0.0237 0.5383 0.996 0.000 0.004
#> SRR957951 2 0.3941 0.7310 0.000 0.844 0.156
#> SRR957952 3 0.6252 0.2525 0.000 0.444 0.556
#> SRR957953 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957954 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957956 1 0.6225 0.5814 0.568 0.000 0.432
#> SRR957957 1 0.8675 0.5069 0.476 0.104 0.420
#> SRR957958 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957959 3 0.6252 0.2520 0.000 0.444 0.556
#> SRR957960 2 0.6410 0.4890 0.420 0.576 0.004
#> SRR957961 3 0.6180 0.3084 0.000 0.416 0.584
#> SRR957962 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957963 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957964 3 0.2625 0.4887 0.084 0.000 0.916
#> SRR957965 2 0.0000 0.8436 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.5397 1.000 0.000 0.000
#> SRR957967 1 0.6192 0.5929 0.580 0.000 0.420
#> SRR957968 1 0.6204 0.5892 0.576 0.000 0.424
#> SRR957969 3 0.3619 0.4237 0.136 0.000 0.864
#> SRR957970 2 0.6386 0.5017 0.412 0.584 0.004
#> SRR957971 3 0.0237 0.5545 0.004 0.000 0.996
#> SRR957972 3 0.6192 0.3019 0.000 0.420 0.580
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0000 0.8502 1.000 0.000 0.000 0.000
#> SRR957915 2 0.0336 0.9053 0.000 0.992 0.008 0.000
#> SRR957916 2 0.2281 0.8608 0.000 0.904 0.096 0.000
#> SRR957884 4 0.0188 0.8931 0.000 0.000 0.004 0.996
#> SRR957885 3 0.0817 0.8493 0.000 0.000 0.976 0.024
#> SRR957886 2 0.0188 0.9043 0.000 0.996 0.000 0.004
#> SRR957887 3 0.2408 0.8068 0.000 0.000 0.896 0.104
#> SRR957888 1 0.0000 0.8502 1.000 0.000 0.000 0.000
#> SRR957889 3 0.5060 0.3286 0.412 0.004 0.584 0.000
#> SRR957890 1 0.0336 0.8477 0.992 0.000 0.008 0.000
#> SRR957891 2 0.0921 0.9003 0.000 0.972 0.028 0.000
#> SRR957893 1 0.5483 0.1880 0.536 0.000 0.016 0.448
#> SRR957892 1 0.4950 0.4075 0.620 0.000 0.004 0.376
#> SRR957894 2 0.1022 0.8965 0.000 0.968 0.000 0.032
#> SRR957895 1 0.0000 0.8502 1.000 0.000 0.000 0.000
#> SRR957896 1 0.4356 0.5641 0.708 0.292 0.000 0.000
#> SRR957897 4 0.0188 0.8931 0.000 0.000 0.004 0.996
#> SRR957898 3 0.3219 0.7539 0.000 0.000 0.836 0.164
#> SRR957899 2 0.0707 0.9030 0.000 0.980 0.020 0.000
#> SRR957900 2 0.1716 0.8822 0.000 0.936 0.064 0.000
#> SRR957901 2 0.0336 0.9053 0.000 0.992 0.008 0.000
#> SRR957902 2 0.0336 0.9053 0.000 0.992 0.008 0.000
#> SRR957903 3 0.0592 0.8509 0.000 0.000 0.984 0.016
#> SRR957904 3 0.0000 0.8510 0.000 0.000 1.000 0.000
#> SRR957905 4 0.1637 0.8838 0.000 0.000 0.060 0.940
#> SRR957906 2 0.3356 0.7840 0.000 0.824 0.000 0.176
#> SRR957907 2 0.0469 0.9047 0.000 0.988 0.012 0.000
#> SRR957908 2 0.4843 0.3776 0.000 0.604 0.000 0.396
#> SRR957909 1 0.0188 0.8495 0.996 0.000 0.000 0.004
#> SRR957910 2 0.0336 0.9053 0.000 0.992 0.008 0.000
#> SRR957911 1 0.3443 0.7438 0.848 0.000 0.016 0.136
#> SRR957912 1 0.0188 0.8491 0.996 0.000 0.004 0.000
#> SRR957913 3 0.0336 0.8519 0.000 0.000 0.992 0.008
#> SRR957917 3 0.2888 0.7987 0.004 0.124 0.872 0.000
#> SRR957918 2 0.1389 0.8892 0.000 0.952 0.000 0.048
#> SRR957920 3 0.2530 0.8117 0.000 0.112 0.888 0.000
#> SRR957919 2 0.4222 0.6463 0.000 0.728 0.000 0.272
#> SRR957921 2 0.4855 0.3131 0.000 0.600 0.400 0.000
#> SRR957922 2 0.0927 0.9033 0.008 0.976 0.016 0.000
#> SRR957924 1 0.0000 0.8502 1.000 0.000 0.000 0.000
#> SRR957923 4 0.5000 -0.0974 0.000 0.496 0.000 0.504
#> SRR957925 1 0.1211 0.8341 0.960 0.040 0.000 0.000
#> SRR957926 3 0.6934 0.5007 0.256 0.000 0.580 0.164
#> SRR957927 4 0.0707 0.8820 0.000 0.020 0.000 0.980
#> SRR957928 3 0.2973 0.7809 0.144 0.000 0.856 0.000
#> SRR957929 1 0.0000 0.8502 1.000 0.000 0.000 0.000
#> SRR957930 2 0.0336 0.9053 0.000 0.992 0.008 0.000
#> SRR957931 2 0.0592 0.9039 0.000 0.984 0.016 0.000
#> SRR957932 3 0.1211 0.8442 0.000 0.000 0.960 0.040
#> SRR957933 3 0.6474 0.5546 0.256 0.000 0.624 0.120
#> SRR957934 2 0.4679 0.4372 0.352 0.648 0.000 0.000
#> SRR957935 1 0.5000 -0.0287 0.500 0.500 0.000 0.000
#> SRR957936 2 0.2345 0.8538 0.000 0.900 0.000 0.100
#> SRR957937 2 0.0000 0.9048 0.000 1.000 0.000 0.000
#> SRR957938 2 0.0336 0.9038 0.000 0.992 0.000 0.008
#> SRR957939 4 0.0804 0.8835 0.008 0.012 0.000 0.980
#> SRR957941 2 0.2081 0.8594 0.084 0.916 0.000 0.000
#> SRR957940 4 0.4855 0.3003 0.000 0.000 0.400 0.600
#> SRR957942 2 0.2011 0.8689 0.000 0.920 0.000 0.080
#> SRR957943 4 0.2589 0.7953 0.000 0.116 0.000 0.884
#> SRR957944 2 0.1211 0.8931 0.000 0.960 0.000 0.040
#> SRR957945 3 0.0336 0.8519 0.000 0.000 0.992 0.008
#> SRR957946 1 0.3123 0.7331 0.844 0.000 0.156 0.000
#> SRR957947 1 0.0817 0.8402 0.976 0.000 0.024 0.000
#> SRR957948 2 0.2714 0.8312 0.112 0.884 0.004 0.000
#> SRR957949 1 0.1118 0.8364 0.964 0.036 0.000 0.000
#> SRR957950 1 0.0000 0.8502 1.000 0.000 0.000 0.000
#> SRR957951 2 0.2814 0.8233 0.000 0.868 0.132 0.000
#> SRR957952 3 0.3610 0.7298 0.000 0.200 0.800 0.000
#> SRR957953 4 0.1389 0.8887 0.000 0.000 0.048 0.952
#> SRR957954 4 0.1637 0.8840 0.000 0.000 0.060 0.940
#> SRR957956 4 0.1637 0.8831 0.000 0.000 0.060 0.940
#> SRR957957 4 0.0336 0.8884 0.000 0.008 0.000 0.992
#> SRR957958 4 0.0707 0.8942 0.000 0.000 0.020 0.980
#> SRR957959 3 0.3074 0.7764 0.000 0.152 0.848 0.000
#> SRR957960 1 0.0000 0.8502 1.000 0.000 0.000 0.000
#> SRR957961 3 0.1211 0.8420 0.000 0.040 0.960 0.000
#> SRR957962 4 0.1743 0.8842 0.004 0.000 0.056 0.940
#> SRR957963 4 0.0336 0.8938 0.000 0.000 0.008 0.992
#> SRR957964 3 0.1637 0.8348 0.000 0.000 0.940 0.060
#> SRR957965 2 0.0592 0.9019 0.000 0.984 0.000 0.016
#> SRR957966 1 0.4134 0.6266 0.740 0.000 0.000 0.260
#> SRR957967 4 0.2011 0.8696 0.000 0.000 0.080 0.920
#> SRR957968 4 0.1118 0.8932 0.000 0.000 0.036 0.964
#> SRR957969 3 0.4164 0.6216 0.000 0.000 0.736 0.264
#> SRR957970 1 0.4103 0.6181 0.744 0.256 0.000 0.000
#> SRR957971 3 0.0336 0.8519 0.000 0.000 0.992 0.008
#> SRR957972 3 0.1118 0.8433 0.000 0.036 0.964 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.3109 0.49452 0.800 0.000 0.000 0.000 0.200
#> SRR957915 2 0.2621 0.75242 0.004 0.876 0.000 0.008 0.112
#> SRR957916 5 0.5584 -0.05034 0.012 0.456 0.044 0.000 0.488
#> SRR957884 4 0.2907 0.81086 0.012 0.000 0.008 0.864 0.116
#> SRR957885 3 0.1408 0.62566 0.000 0.000 0.948 0.008 0.044
#> SRR957886 2 0.0703 0.80254 0.000 0.976 0.000 0.000 0.024
#> SRR957887 3 0.2712 0.62889 0.000 0.000 0.880 0.032 0.088
#> SRR957888 1 0.2970 0.58233 0.828 0.000 0.000 0.004 0.168
#> SRR957889 5 0.6097 -0.01815 0.276 0.000 0.168 0.000 0.556
#> SRR957890 1 0.4703 0.28954 0.632 0.000 0.028 0.000 0.340
#> SRR957891 2 0.0798 0.80171 0.000 0.976 0.008 0.000 0.016
#> SRR957893 1 0.8229 0.24034 0.404 0.000 0.208 0.164 0.224
#> SRR957892 1 0.6398 0.47005 0.576 0.000 0.016 0.180 0.228
#> SRR957894 2 0.4032 0.70705 0.004 0.800 0.000 0.072 0.124
#> SRR957895 1 0.4369 0.49250 0.720 0.012 0.000 0.016 0.252
#> SRR957896 1 0.5826 0.04153 0.500 0.404 0.000 0.000 0.096
#> SRR957897 4 0.1768 0.83077 0.000 0.004 0.000 0.924 0.072
#> SRR957898 3 0.4634 0.53191 0.004 0.000 0.752 0.100 0.144
#> SRR957899 2 0.1278 0.79919 0.020 0.960 0.004 0.000 0.016
#> SRR957900 2 0.6082 -0.32747 0.076 0.464 0.016 0.000 0.444
#> SRR957901 2 0.0566 0.80295 0.000 0.984 0.004 0.000 0.012
#> SRR957902 2 0.0703 0.80377 0.000 0.976 0.000 0.000 0.024
#> SRR957903 3 0.1205 0.62747 0.000 0.000 0.956 0.004 0.040
#> SRR957904 3 0.0794 0.62978 0.000 0.000 0.972 0.000 0.028
#> SRR957905 3 0.7171 -0.08151 0.020 0.000 0.400 0.340 0.240
#> SRR957906 2 0.4010 0.73151 0.000 0.828 0.068 0.060 0.044
#> SRR957907 2 0.0404 0.80360 0.000 0.988 0.000 0.000 0.012
#> SRR957908 4 0.4760 0.23509 0.000 0.416 0.000 0.564 0.020
#> SRR957909 1 0.3550 0.56053 0.760 0.000 0.000 0.004 0.236
#> SRR957910 2 0.0510 0.80330 0.000 0.984 0.000 0.000 0.016
#> SRR957911 1 0.6182 0.46861 0.608 0.000 0.080 0.044 0.268
#> SRR957912 1 0.2629 0.55322 0.860 0.000 0.004 0.000 0.136
#> SRR957913 3 0.1410 0.62733 0.000 0.000 0.940 0.000 0.060
#> SRR957917 3 0.5691 0.21252 0.048 0.016 0.524 0.000 0.412
#> SRR957918 2 0.4284 0.62697 0.000 0.736 0.000 0.224 0.040
#> SRR957920 3 0.4901 0.45525 0.000 0.184 0.712 0.000 0.104
#> SRR957919 2 0.3910 0.66454 0.000 0.772 0.000 0.196 0.032
#> SRR957921 2 0.5831 0.13147 0.000 0.592 0.268 0.000 0.140
#> SRR957922 2 0.4161 0.57395 0.040 0.752 0.000 0.000 0.208
#> SRR957924 1 0.2329 0.58832 0.876 0.000 0.000 0.000 0.124
#> SRR957923 4 0.4888 0.62766 0.004 0.176 0.000 0.724 0.096
#> SRR957925 1 0.3759 0.58175 0.808 0.056 0.000 0.000 0.136
#> SRR957926 3 0.7133 0.00684 0.300 0.000 0.356 0.012 0.332
#> SRR957927 4 0.0955 0.82939 0.000 0.004 0.000 0.968 0.028
#> SRR957928 3 0.5915 0.12771 0.088 0.000 0.476 0.004 0.432
#> SRR957929 1 0.1851 0.58393 0.912 0.000 0.000 0.000 0.088
#> SRR957930 2 0.0609 0.80415 0.000 0.980 0.000 0.000 0.020
#> SRR957931 2 0.1544 0.78544 0.000 0.932 0.000 0.000 0.068
#> SRR957932 3 0.2629 0.60587 0.000 0.000 0.860 0.004 0.136
#> SRR957933 3 0.6888 -0.07292 0.336 0.000 0.392 0.004 0.268
#> SRR957934 1 0.6631 0.12291 0.444 0.360 0.000 0.004 0.192
#> SRR957935 1 0.6350 0.36529 0.572 0.180 0.000 0.012 0.236
#> SRR957936 2 0.4010 0.64644 0.000 0.760 0.000 0.208 0.032
#> SRR957937 2 0.0794 0.80344 0.000 0.972 0.000 0.000 0.028
#> SRR957938 2 0.2100 0.79476 0.016 0.924 0.000 0.012 0.048
#> SRR957939 4 0.1124 0.82973 0.000 0.004 0.000 0.960 0.036
#> SRR957941 2 0.5617 0.47947 0.108 0.664 0.004 0.008 0.216
#> SRR957940 3 0.5476 0.10609 0.000 0.000 0.544 0.388 0.068
#> SRR957942 2 0.1992 0.79148 0.000 0.924 0.000 0.044 0.032
#> SRR957943 4 0.3193 0.74865 0.000 0.132 0.000 0.840 0.028
#> SRR957944 2 0.2344 0.78248 0.000 0.904 0.000 0.064 0.032
#> SRR957945 3 0.0510 0.63039 0.000 0.000 0.984 0.000 0.016
#> SRR957946 1 0.6018 0.19322 0.568 0.000 0.160 0.000 0.272
#> SRR957947 1 0.4968 0.06479 0.516 0.000 0.028 0.000 0.456
#> SRR957948 2 0.3180 0.73137 0.076 0.856 0.000 0.000 0.068
#> SRR957949 1 0.4728 0.40949 0.664 0.040 0.000 0.000 0.296
#> SRR957950 1 0.2329 0.56869 0.876 0.000 0.000 0.000 0.124
#> SRR957951 2 0.5262 0.52245 0.028 0.724 0.148 0.000 0.100
#> SRR957952 3 0.6698 0.10044 0.016 0.156 0.472 0.000 0.356
#> SRR957953 4 0.3319 0.75490 0.000 0.000 0.160 0.820 0.020
#> SRR957954 4 0.3736 0.79294 0.000 0.000 0.052 0.808 0.140
#> SRR957956 4 0.4593 0.73208 0.000 0.000 0.124 0.748 0.128
#> SRR957957 4 0.1168 0.83082 0.000 0.008 0.000 0.960 0.032
#> SRR957958 4 0.3146 0.80681 0.000 0.000 0.092 0.856 0.052
#> SRR957959 3 0.6040 0.28181 0.000 0.156 0.560 0.000 0.284
#> SRR957960 1 0.2389 0.57184 0.880 0.004 0.000 0.000 0.116
#> SRR957961 3 0.3370 0.53329 0.000 0.148 0.824 0.000 0.028
#> SRR957962 4 0.2754 0.81158 0.004 0.000 0.080 0.884 0.032
#> SRR957963 4 0.1588 0.83204 0.008 0.000 0.016 0.948 0.028
#> SRR957964 3 0.2291 0.63240 0.000 0.000 0.908 0.036 0.056
#> SRR957965 2 0.2423 0.77525 0.000 0.896 0.000 0.080 0.024
#> SRR957966 1 0.5124 0.45215 0.644 0.000 0.000 0.288 0.068
#> SRR957967 4 0.4253 0.75755 0.012 0.000 0.100 0.796 0.092
#> SRR957968 4 0.1764 0.82632 0.000 0.000 0.064 0.928 0.008
#> SRR957969 3 0.5028 0.22311 0.000 0.000 0.564 0.400 0.036
#> SRR957970 1 0.6547 0.27379 0.528 0.228 0.000 0.008 0.236
#> SRR957971 3 0.2690 0.59440 0.000 0.000 0.844 0.000 0.156
#> SRR957972 3 0.4108 0.45252 0.000 0.008 0.684 0.000 0.308
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.5994 0.00987 0.388 0.232 0.000 0.000 0.000 0.380
#> SRR957915 5 0.3508 0.51997 0.000 0.292 0.004 0.000 0.704 0.000
#> SRR957916 6 0.3710 0.62240 0.000 0.064 0.004 0.000 0.144 0.788
#> SRR957884 4 0.3844 0.76664 0.140 0.028 0.040 0.792 0.000 0.000
#> SRR957885 3 0.1555 0.72507 0.004 0.004 0.932 0.000 0.000 0.060
#> SRR957886 5 0.1471 0.78453 0.000 0.064 0.000 0.000 0.932 0.004
#> SRR957887 3 0.4135 0.67992 0.000 0.000 0.668 0.032 0.000 0.300
#> SRR957888 1 0.1578 0.62684 0.936 0.048 0.000 0.004 0.000 0.012
#> SRR957889 6 0.3707 0.54689 0.000 0.312 0.008 0.000 0.000 0.680
#> SRR957890 6 0.4470 0.54541 0.072 0.228 0.004 0.000 0.000 0.696
#> SRR957891 5 0.1232 0.78524 0.000 0.024 0.016 0.000 0.956 0.004
#> SRR957893 1 0.4718 0.45747 0.612 0.016 0.344 0.024 0.000 0.004
#> SRR957892 1 0.1440 0.63648 0.948 0.004 0.012 0.032 0.000 0.004
#> SRR957894 5 0.5102 0.12331 0.000 0.428 0.000 0.052 0.508 0.012
#> SRR957895 2 0.2908 0.59593 0.140 0.840 0.008 0.004 0.000 0.008
#> SRR957896 2 0.3886 0.55525 0.028 0.708 0.000 0.000 0.264 0.000
#> SRR957897 4 0.2998 0.80236 0.072 0.008 0.064 0.856 0.000 0.000
#> SRR957898 3 0.2755 0.61552 0.108 0.008 0.864 0.016 0.000 0.004
#> SRR957899 5 0.2214 0.75992 0.004 0.092 0.012 0.000 0.892 0.000
#> SRR957900 6 0.5855 0.29887 0.000 0.240 0.000 0.000 0.276 0.484
#> SRR957901 5 0.0935 0.78597 0.000 0.032 0.004 0.000 0.964 0.000
#> SRR957902 5 0.0951 0.79152 0.000 0.020 0.004 0.008 0.968 0.000
#> SRR957903 3 0.1556 0.73341 0.000 0.000 0.920 0.000 0.000 0.080
#> SRR957904 3 0.2062 0.73552 0.000 0.008 0.900 0.000 0.004 0.088
#> SRR957905 3 0.4122 0.55083 0.048 0.116 0.792 0.036 0.000 0.008
#> SRR957906 5 0.3042 0.76392 0.000 0.088 0.044 0.004 0.856 0.008
#> SRR957907 5 0.1010 0.78624 0.000 0.036 0.004 0.000 0.960 0.000
#> SRR957908 4 0.5353 0.02045 0.000 0.092 0.004 0.464 0.440 0.000
#> SRR957909 1 0.1293 0.63549 0.956 0.016 0.020 0.004 0.000 0.004
#> SRR957910 5 0.0922 0.79000 0.000 0.024 0.004 0.000 0.968 0.004
#> SRR957911 1 0.4013 0.53083 0.712 0.016 0.260 0.008 0.000 0.004
#> SRR957912 2 0.6089 0.13458 0.300 0.392 0.000 0.000 0.000 0.308
#> SRR957913 3 0.3221 0.69888 0.000 0.000 0.736 0.000 0.000 0.264
#> SRR957917 6 0.1124 0.66348 0.000 0.008 0.036 0.000 0.000 0.956
#> SRR957918 5 0.5262 0.53986 0.028 0.060 0.000 0.244 0.656 0.012
#> SRR957920 3 0.6184 0.39960 0.008 0.012 0.496 0.000 0.308 0.176
#> SRR957919 5 0.3193 0.76413 0.024 0.088 0.004 0.032 0.852 0.000
#> SRR957921 5 0.4794 0.56434 0.004 0.024 0.060 0.000 0.700 0.212
#> SRR957922 5 0.4670 0.32251 0.012 0.028 0.000 0.000 0.580 0.380
#> SRR957924 1 0.2404 0.60966 0.884 0.080 0.000 0.000 0.000 0.036
#> SRR957923 4 0.4250 0.58463 0.000 0.244 0.000 0.708 0.036 0.012
#> SRR957925 1 0.3837 0.49800 0.752 0.196 0.000 0.000 0.052 0.000
#> SRR957926 1 0.4235 0.58003 0.724 0.000 0.084 0.000 0.000 0.192
#> SRR957927 4 0.0717 0.82013 0.000 0.000 0.000 0.976 0.008 0.016
#> SRR957928 6 0.0777 0.66518 0.004 0.000 0.024 0.000 0.000 0.972
#> SRR957929 1 0.4466 0.51041 0.708 0.116 0.000 0.000 0.000 0.176
#> SRR957930 5 0.0603 0.79183 0.000 0.016 0.000 0.000 0.980 0.004
#> SRR957931 5 0.2014 0.78790 0.016 0.032 0.004 0.000 0.924 0.024
#> SRR957932 3 0.4015 0.61577 0.012 0.000 0.616 0.000 0.000 0.372
#> SRR957933 1 0.3809 0.55413 0.716 0.012 0.264 0.000 0.000 0.008
#> SRR957934 1 0.6173 0.28437 0.528 0.100 0.000 0.000 0.308 0.064
#> SRR957935 1 0.4970 0.48947 0.696 0.104 0.000 0.000 0.172 0.028
#> SRR957936 5 0.4308 0.67146 0.000 0.088 0.000 0.164 0.740 0.008
#> SRR957937 5 0.0405 0.79223 0.000 0.000 0.004 0.000 0.988 0.008
#> SRR957938 5 0.2968 0.75821 0.052 0.092 0.000 0.000 0.852 0.004
#> SRR957939 4 0.1196 0.81490 0.000 0.040 0.000 0.952 0.000 0.008
#> SRR957941 5 0.5943 -0.01115 0.428 0.100 0.000 0.000 0.440 0.032
#> SRR957940 3 0.3383 0.40690 0.000 0.000 0.728 0.268 0.000 0.004
#> SRR957942 5 0.1806 0.77617 0.000 0.088 0.000 0.004 0.908 0.000
#> SRR957943 4 0.4095 0.68152 0.000 0.088 0.000 0.756 0.152 0.004
#> SRR957944 5 0.2871 0.76979 0.012 0.100 0.000 0.016 0.864 0.008
#> SRR957945 3 0.2003 0.73483 0.000 0.000 0.884 0.000 0.000 0.116
#> SRR957946 6 0.5250 0.57071 0.120 0.140 0.052 0.000 0.000 0.688
#> SRR957947 6 0.4095 0.58554 0.064 0.208 0.000 0.000 0.000 0.728
#> SRR957948 2 0.4181 0.01684 0.012 0.512 0.000 0.000 0.476 0.000
#> SRR957949 2 0.4509 0.55552 0.060 0.756 0.000 0.000 0.060 0.124
#> SRR957950 2 0.3840 0.49390 0.284 0.696 0.000 0.000 0.000 0.020
#> SRR957951 5 0.5678 0.38592 0.000 0.244 0.148 0.000 0.588 0.020
#> SRR957952 6 0.2696 0.62901 0.004 0.000 0.048 0.000 0.076 0.872
#> SRR957953 4 0.0937 0.82497 0.000 0.000 0.040 0.960 0.000 0.000
#> SRR957954 4 0.3475 0.78454 0.052 0.004 0.124 0.816 0.000 0.004
#> SRR957956 4 0.4932 0.66780 0.128 0.004 0.160 0.696 0.000 0.012
#> SRR957957 4 0.1792 0.81926 0.016 0.032 0.004 0.936 0.008 0.004
#> SRR957958 4 0.3217 0.72623 0.008 0.000 0.224 0.768 0.000 0.000
#> SRR957959 6 0.4277 0.51487 0.004 0.012 0.108 0.000 0.112 0.764
#> SRR957960 2 0.3426 0.51655 0.276 0.720 0.000 0.000 0.000 0.004
#> SRR957961 3 0.5146 0.60563 0.000 0.024 0.676 0.000 0.164 0.136
#> SRR957962 4 0.2238 0.81607 0.016 0.004 0.068 0.904 0.000 0.008
#> SRR957963 4 0.1237 0.82429 0.020 0.000 0.020 0.956 0.000 0.004
#> SRR957964 3 0.3748 0.68150 0.000 0.000 0.688 0.012 0.000 0.300
#> SRR957965 5 0.2591 0.76574 0.000 0.052 0.004 0.064 0.880 0.000
#> SRR957966 1 0.5953 0.25907 0.568 0.216 0.028 0.188 0.000 0.000
#> SRR957967 4 0.1313 0.82411 0.000 0.028 0.016 0.952 0.000 0.004
#> SRR957968 4 0.0777 0.82425 0.000 0.000 0.024 0.972 0.000 0.004
#> SRR957969 4 0.4771 0.47469 0.000 0.000 0.248 0.652 0.000 0.100
#> SRR957970 2 0.3493 0.61234 0.056 0.816 0.004 0.000 0.120 0.004
#> SRR957971 3 0.4322 0.47418 0.000 0.000 0.528 0.020 0.000 0.452
#> SRR957972 6 0.3850 0.03958 0.004 0.004 0.340 0.000 0.000 0.652
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.491 0.886 0.936 0.4800 0.515 0.515
#> 3 3 0.577 0.783 0.874 0.3564 0.817 0.645
#> 4 4 0.617 0.717 0.787 0.1084 0.962 0.889
#> 5 5 0.632 0.519 0.719 0.0600 0.925 0.777
#> 6 6 0.705 0.722 0.807 0.0437 0.877 0.606
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
#> SRR957914 1 0.0000 0.926 1.000 0.000
#> SRR957915 2 0.0000 0.927 0.000 1.000
#> SRR957916 2 0.2043 0.913 0.032 0.968
#> SRR957884 1 0.3274 0.926 0.940 0.060
#> SRR957885 2 0.8327 0.695 0.264 0.736
#> SRR957886 2 0.0000 0.927 0.000 1.000
#> SRR957887 2 0.8327 0.695 0.264 0.736
#> SRR957888 1 0.0000 0.926 1.000 0.000
#> SRR957889 1 0.0000 0.926 1.000 0.000
#> SRR957890 1 0.1414 0.927 0.980 0.020
#> SRR957891 2 0.0000 0.927 0.000 1.000
#> SRR957893 1 0.0000 0.926 1.000 0.000
#> SRR957892 1 0.0000 0.926 1.000 0.000
#> SRR957894 2 0.0000 0.927 0.000 1.000
#> SRR957895 1 0.4690 0.902 0.900 0.100
#> SRR957896 2 0.0000 0.927 0.000 1.000
#> SRR957897 2 0.8081 0.696 0.248 0.752
#> SRR957898 1 0.0000 0.926 1.000 0.000
#> SRR957899 2 0.0000 0.927 0.000 1.000
#> SRR957900 2 0.2043 0.913 0.032 0.968
#> SRR957901 2 0.0000 0.927 0.000 1.000
#> SRR957902 2 0.0000 0.927 0.000 1.000
#> SRR957903 2 0.8327 0.695 0.264 0.736
#> SRR957904 2 0.4815 0.864 0.104 0.896
#> SRR957905 1 0.3274 0.926 0.940 0.060
#> SRR957906 2 0.0000 0.927 0.000 1.000
#> SRR957907 2 0.0000 0.927 0.000 1.000
#> SRR957908 2 0.0000 0.927 0.000 1.000
#> SRR957909 1 0.0000 0.926 1.000 0.000
#> SRR957910 2 0.0000 0.927 0.000 1.000
#> SRR957911 1 0.0000 0.926 1.000 0.000
#> SRR957912 1 0.5519 0.865 0.872 0.128
#> SRR957913 2 0.8327 0.695 0.264 0.736
#> SRR957917 1 0.7674 0.743 0.776 0.224
#> SRR957918 2 0.0000 0.927 0.000 1.000
#> SRR957920 2 0.4815 0.864 0.104 0.896
#> SRR957919 2 0.0000 0.927 0.000 1.000
#> SRR957921 2 0.0000 0.927 0.000 1.000
#> SRR957922 2 0.2043 0.913 0.032 0.968
#> SRR957924 1 0.3733 0.921 0.928 0.072
#> SRR957923 2 0.8081 0.696 0.248 0.752
#> SRR957925 2 0.0000 0.927 0.000 1.000
#> SRR957926 1 0.4431 0.903 0.908 0.092
#> SRR957927 2 0.4690 0.870 0.100 0.900
#> SRR957928 1 0.5519 0.865 0.872 0.128
#> SRR957929 1 0.5519 0.865 0.872 0.128
#> SRR957930 2 0.0000 0.927 0.000 1.000
#> SRR957931 2 0.0000 0.927 0.000 1.000
#> SRR957932 1 0.6148 0.843 0.848 0.152
#> SRR957933 1 0.4431 0.903 0.908 0.092
#> SRR957934 2 0.0000 0.927 0.000 1.000
#> SRR957935 2 0.0376 0.925 0.004 0.996
#> SRR957936 2 0.0000 0.927 0.000 1.000
#> SRR957937 2 0.0000 0.927 0.000 1.000
#> SRR957938 2 0.0000 0.927 0.000 1.000
#> SRR957939 2 0.8081 0.696 0.248 0.752
#> SRR957941 2 0.0000 0.927 0.000 1.000
#> SRR957940 1 0.5059 0.888 0.888 0.112
#> SRR957942 2 0.0000 0.927 0.000 1.000
#> SRR957943 2 0.0000 0.927 0.000 1.000
#> SRR957944 2 0.0000 0.927 0.000 1.000
#> SRR957945 2 0.8327 0.695 0.264 0.736
#> SRR957946 1 0.0000 0.926 1.000 0.000
#> SRR957947 1 0.0000 0.926 1.000 0.000
#> SRR957948 2 0.0000 0.927 0.000 1.000
#> SRR957949 2 0.2043 0.913 0.032 0.968
#> SRR957950 1 0.0000 0.926 1.000 0.000
#> SRR957951 2 0.0000 0.927 0.000 1.000
#> SRR957952 2 0.4815 0.864 0.104 0.896
#> SRR957953 1 0.3274 0.926 0.940 0.060
#> SRR957954 1 0.5178 0.885 0.884 0.116
#> SRR957956 1 0.5178 0.885 0.884 0.116
#> SRR957957 2 0.8081 0.696 0.248 0.752
#> SRR957958 1 0.3274 0.926 0.940 0.060
#> SRR957959 2 0.4690 0.867 0.100 0.900
#> SRR957960 2 0.0000 0.927 0.000 1.000
#> SRR957961 2 0.0000 0.927 0.000 1.000
#> SRR957962 1 0.3274 0.926 0.940 0.060
#> SRR957963 1 0.3274 0.926 0.940 0.060
#> SRR957964 1 0.5178 0.885 0.884 0.116
#> SRR957965 2 0.0000 0.927 0.000 1.000
#> SRR957966 1 0.0000 0.926 1.000 0.000
#> SRR957967 1 0.3274 0.926 0.940 0.060
#> SRR957968 1 0.3274 0.926 0.940 0.060
#> SRR957969 1 0.5178 0.885 0.884 0.116
#> SRR957970 2 0.0000 0.927 0.000 1.000
#> SRR957971 2 0.8327 0.695 0.264 0.736
#> SRR957972 2 0.7674 0.750 0.224 0.776
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957915 2 0.1411 0.874 0.000 0.964 0.036
#> SRR957916 3 0.3340 0.768 0.000 0.120 0.880
#> SRR957884 1 0.2301 0.901 0.936 0.060 0.004
#> SRR957885 3 0.4796 0.691 0.220 0.000 0.780
#> SRR957886 2 0.3038 0.824 0.000 0.896 0.104
#> SRR957887 3 0.4796 0.691 0.220 0.000 0.780
#> SRR957888 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957889 1 0.1643 0.904 0.956 0.000 0.044
#> SRR957890 1 0.2066 0.903 0.940 0.000 0.060
#> SRR957891 3 0.3340 0.767 0.000 0.120 0.880
#> SRR957893 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957894 2 0.2261 0.835 0.000 0.932 0.068
#> SRR957895 1 0.3377 0.870 0.896 0.092 0.012
#> SRR957896 2 0.1163 0.876 0.000 0.972 0.028
#> SRR957897 2 0.7222 0.598 0.244 0.684 0.072
#> SRR957898 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957899 3 0.6045 0.520 0.000 0.380 0.620
#> SRR957900 3 0.3340 0.768 0.000 0.120 0.880
#> SRR957901 3 0.5988 0.539 0.000 0.368 0.632
#> SRR957902 2 0.1163 0.876 0.000 0.972 0.028
#> SRR957903 3 0.4796 0.691 0.220 0.000 0.780
#> SRR957904 3 0.4092 0.778 0.088 0.036 0.876
#> SRR957905 1 0.2301 0.901 0.936 0.060 0.004
#> SRR957906 2 0.6305 -0.225 0.000 0.516 0.484
#> SRR957907 2 0.1163 0.876 0.000 0.972 0.028
#> SRR957908 2 0.0237 0.874 0.000 0.996 0.004
#> SRR957909 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957910 2 0.1163 0.876 0.000 0.972 0.028
#> SRR957911 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957912 1 0.4235 0.811 0.824 0.000 0.176
#> SRR957913 3 0.4796 0.691 0.220 0.000 0.780
#> SRR957917 1 0.5921 0.714 0.756 0.032 0.212
#> SRR957918 2 0.0424 0.873 0.000 0.992 0.008
#> SRR957920 3 0.4092 0.778 0.088 0.036 0.876
#> SRR957919 2 0.2066 0.859 0.000 0.940 0.060
#> SRR957921 3 0.3267 0.768 0.000 0.116 0.884
#> SRR957922 3 0.3340 0.768 0.000 0.120 0.880
#> SRR957924 1 0.2590 0.892 0.924 0.072 0.004
#> SRR957923 2 0.7222 0.598 0.244 0.684 0.072
#> SRR957925 2 0.1031 0.877 0.000 0.976 0.024
#> SRR957926 1 0.3116 0.874 0.892 0.000 0.108
#> SRR957927 2 0.6031 0.697 0.096 0.788 0.116
#> SRR957928 1 0.4235 0.811 0.824 0.000 0.176
#> SRR957929 1 0.4235 0.811 0.824 0.000 0.176
#> SRR957930 2 0.1163 0.876 0.000 0.972 0.028
#> SRR957931 3 0.6260 0.314 0.000 0.448 0.552
#> SRR957932 1 0.3879 0.820 0.848 0.000 0.152
#> SRR957933 1 0.3038 0.875 0.896 0.000 0.104
#> SRR957934 3 0.6308 0.213 0.000 0.492 0.508
#> SRR957935 3 0.6274 0.302 0.000 0.456 0.544
#> SRR957936 2 0.0892 0.868 0.000 0.980 0.020
#> SRR957937 2 0.3038 0.824 0.000 0.896 0.104
#> SRR957938 2 0.2066 0.860 0.000 0.940 0.060
#> SRR957939 2 0.7222 0.598 0.244 0.684 0.072
#> SRR957941 3 0.6308 0.213 0.000 0.492 0.508
#> SRR957940 1 0.3267 0.863 0.884 0.000 0.116
#> SRR957942 2 0.2066 0.859 0.000 0.940 0.060
#> SRR957943 2 0.0237 0.874 0.000 0.996 0.004
#> SRR957944 2 0.2066 0.860 0.000 0.940 0.060
#> SRR957945 3 0.4796 0.691 0.220 0.000 0.780
#> SRR957946 1 0.1643 0.904 0.956 0.000 0.044
#> SRR957947 1 0.1643 0.904 0.956 0.000 0.044
#> SRR957948 2 0.0892 0.877 0.000 0.980 0.020
#> SRR957949 3 0.3340 0.768 0.000 0.120 0.880
#> SRR957950 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957951 3 0.3340 0.767 0.000 0.120 0.880
#> SRR957952 3 0.3889 0.777 0.084 0.032 0.884
#> SRR957953 1 0.2301 0.901 0.936 0.060 0.004
#> SRR957954 1 0.3267 0.859 0.884 0.000 0.116
#> SRR957956 1 0.3267 0.859 0.884 0.000 0.116
#> SRR957957 2 0.7222 0.598 0.244 0.684 0.072
#> SRR957958 1 0.2301 0.901 0.936 0.060 0.004
#> SRR957959 3 0.4007 0.778 0.084 0.036 0.880
#> SRR957960 2 0.1031 0.877 0.000 0.976 0.024
#> SRR957961 3 0.3340 0.767 0.000 0.120 0.880
#> SRR957962 1 0.2066 0.902 0.940 0.060 0.000
#> SRR957963 1 0.2066 0.902 0.940 0.060 0.000
#> SRR957964 1 0.3267 0.859 0.884 0.000 0.116
#> SRR957965 2 0.2165 0.838 0.000 0.936 0.064
#> SRR957966 1 0.0000 0.913 1.000 0.000 0.000
#> SRR957967 1 0.2066 0.902 0.940 0.060 0.000
#> SRR957968 1 0.2301 0.901 0.936 0.060 0.004
#> SRR957969 1 0.3267 0.859 0.884 0.000 0.116
#> SRR957970 2 0.1031 0.877 0.000 0.976 0.024
#> SRR957971 3 0.4796 0.691 0.220 0.000 0.780
#> SRR957972 3 0.4291 0.729 0.180 0.000 0.820
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957915 2 0.2563 0.826 0.000 0.908 0.020 0.072
#> SRR957916 3 0.2973 0.727 0.000 0.096 0.884 0.020
#> SRR957884 1 0.3710 0.719 0.804 0.000 0.004 0.192
#> SRR957885 3 0.5720 0.607 0.052 0.000 0.652 0.296
#> SRR957886 2 0.3160 0.806 0.000 0.872 0.108 0.020
#> SRR957887 3 0.5769 0.605 0.056 0.000 0.652 0.292
#> SRR957888 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957889 1 0.5143 0.692 0.752 0.000 0.076 0.172
#> SRR957890 1 0.5530 0.682 0.712 0.000 0.076 0.212
#> SRR957891 3 0.2401 0.728 0.000 0.092 0.904 0.004
#> SRR957893 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957892 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957894 2 0.4134 0.398 0.000 0.740 0.000 0.260
#> SRR957895 1 0.4429 0.682 0.764 0.012 0.004 0.220
#> SRR957896 2 0.1256 0.867 0.000 0.964 0.028 0.008
#> SRR957897 4 0.6694 1.000 0.088 0.348 0.004 0.560
#> SRR957898 1 0.1022 0.790 0.968 0.000 0.000 0.032
#> SRR957899 3 0.5070 0.506 0.000 0.372 0.620 0.008
#> SRR957900 3 0.2973 0.727 0.000 0.096 0.884 0.020
#> SRR957901 3 0.4905 0.522 0.000 0.364 0.632 0.004
#> SRR957902 2 0.1109 0.867 0.000 0.968 0.028 0.004
#> SRR957903 3 0.5720 0.607 0.052 0.000 0.652 0.296
#> SRR957904 3 0.3130 0.716 0.012 0.024 0.892 0.072
#> SRR957905 1 0.3710 0.719 0.804 0.000 0.004 0.192
#> SRR957906 3 0.5933 0.235 0.000 0.464 0.500 0.036
#> SRR957907 2 0.1256 0.867 0.000 0.964 0.028 0.008
#> SRR957908 2 0.1807 0.842 0.000 0.940 0.008 0.052
#> SRR957909 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957910 2 0.1256 0.867 0.000 0.964 0.028 0.008
#> SRR957911 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957912 1 0.6215 0.608 0.664 0.000 0.208 0.128
#> SRR957913 3 0.5720 0.607 0.052 0.000 0.652 0.296
#> SRR957917 1 0.7161 0.508 0.596 0.020 0.264 0.120
#> SRR957918 2 0.1661 0.836 0.000 0.944 0.004 0.052
#> SRR957920 3 0.3130 0.716 0.012 0.024 0.892 0.072
#> SRR957919 2 0.3464 0.812 0.000 0.868 0.076 0.056
#> SRR957921 3 0.2480 0.728 0.000 0.088 0.904 0.008
#> SRR957922 3 0.2973 0.727 0.000 0.096 0.884 0.020
#> SRR957924 1 0.4074 0.709 0.792 0.008 0.004 0.196
#> SRR957923 4 0.6694 1.000 0.088 0.348 0.004 0.560
#> SRR957925 2 0.1297 0.864 0.000 0.964 0.020 0.016
#> SRR957926 1 0.4508 0.733 0.780 0.000 0.036 0.184
#> SRR957927 2 0.5905 0.496 0.088 0.748 0.124 0.040
#> SRR957928 1 0.6215 0.608 0.664 0.000 0.208 0.128
#> SRR957929 1 0.6215 0.608 0.664 0.000 0.208 0.128
#> SRR957930 2 0.1256 0.867 0.000 0.964 0.028 0.008
#> SRR957931 3 0.5444 0.367 0.000 0.424 0.560 0.016
#> SRR957932 1 0.4104 0.724 0.808 0.000 0.028 0.164
#> SRR957933 1 0.4466 0.735 0.784 0.000 0.036 0.180
#> SRR957934 3 0.6347 0.318 0.000 0.412 0.524 0.064
#> SRR957935 3 0.6326 0.393 0.000 0.376 0.556 0.068
#> SRR957936 2 0.2401 0.800 0.000 0.904 0.004 0.092
#> SRR957937 2 0.3048 0.806 0.000 0.876 0.108 0.016
#> SRR957938 2 0.3474 0.815 0.000 0.868 0.068 0.064
#> SRR957939 4 0.6694 1.000 0.088 0.348 0.004 0.560
#> SRR957941 3 0.6347 0.318 0.000 0.412 0.524 0.064
#> SRR957940 1 0.3710 0.740 0.804 0.000 0.004 0.192
#> SRR957942 2 0.3128 0.825 0.000 0.884 0.076 0.040
#> SRR957943 2 0.1807 0.842 0.000 0.940 0.008 0.052
#> SRR957944 2 0.3400 0.819 0.000 0.872 0.064 0.064
#> SRR957945 3 0.5720 0.607 0.052 0.000 0.652 0.296
#> SRR957946 1 0.5143 0.692 0.752 0.000 0.076 0.172
#> SRR957947 1 0.5143 0.692 0.752 0.000 0.076 0.172
#> SRR957948 2 0.1042 0.866 0.000 0.972 0.020 0.008
#> SRR957949 3 0.2973 0.727 0.000 0.096 0.884 0.020
#> SRR957950 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957951 3 0.2401 0.728 0.000 0.092 0.904 0.004
#> SRR957952 3 0.2950 0.715 0.012 0.020 0.900 0.068
#> SRR957953 1 0.3710 0.719 0.804 0.000 0.004 0.192
#> SRR957954 1 0.3123 0.745 0.844 0.000 0.000 0.156
#> SRR957956 1 0.3219 0.744 0.836 0.000 0.000 0.164
#> SRR957957 4 0.6694 1.000 0.088 0.348 0.004 0.560
#> SRR957958 1 0.3710 0.719 0.804 0.000 0.004 0.192
#> SRR957959 3 0.3057 0.716 0.012 0.024 0.896 0.068
#> SRR957960 2 0.1297 0.864 0.000 0.964 0.020 0.016
#> SRR957961 3 0.2401 0.728 0.000 0.092 0.904 0.004
#> SRR957962 1 0.3710 0.722 0.804 0.000 0.004 0.192
#> SRR957963 1 0.3710 0.722 0.804 0.000 0.004 0.192
#> SRR957964 1 0.3444 0.742 0.816 0.000 0.000 0.184
#> SRR957965 2 0.4103 0.409 0.000 0.744 0.000 0.256
#> SRR957966 1 0.0524 0.792 0.988 0.000 0.004 0.008
#> SRR957967 1 0.3444 0.726 0.816 0.000 0.000 0.184
#> SRR957968 1 0.3710 0.719 0.804 0.000 0.004 0.192
#> SRR957969 1 0.3074 0.748 0.848 0.000 0.000 0.152
#> SRR957970 2 0.1520 0.861 0.000 0.956 0.020 0.024
#> SRR957971 3 0.5720 0.607 0.052 0.000 0.652 0.296
#> SRR957972 3 0.4337 0.681 0.052 0.000 0.808 0.140
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.0000 0.72418 1.000 0.000 0.000 0.000 0.000
#> SRR957915 2 0.2457 0.70056 0.000 0.900 0.008 0.076 0.016
#> SRR957916 5 0.5042 1.00000 0.000 0.032 0.460 0.000 0.508
#> SRR957884 1 0.3596 0.63882 0.776 0.000 0.012 0.212 0.000
#> SRR957885 3 0.4404 0.48476 0.004 0.000 0.716 0.028 0.252
#> SRR957886 2 0.2665 0.72561 0.000 0.900 0.020 0.032 0.048
#> SRR957887 3 0.4441 0.48245 0.008 0.000 0.716 0.024 0.252
#> SRR957888 1 0.0000 0.72418 1.000 0.000 0.000 0.000 0.000
#> SRR957889 1 0.7169 0.48094 0.544 0.000 0.116 0.100 0.240
#> SRR957890 1 0.7217 0.47252 0.516 0.000 0.116 0.088 0.280
#> SRR957891 3 0.5219 -0.74556 0.000 0.032 0.560 0.008 0.400
#> SRR957893 1 0.0000 0.72418 1.000 0.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.72418 1.000 0.000 0.000 0.000 0.000
#> SRR957894 2 0.5120 0.34162 0.000 0.648 0.004 0.292 0.056
#> SRR957895 1 0.4017 0.60044 0.736 0.004 0.012 0.248 0.000
#> SRR957896 2 0.0162 0.74006 0.000 0.996 0.004 0.000 0.000
#> SRR957897 4 0.3705 1.00000 0.064 0.120 0.000 0.816 0.000
#> SRR957898 1 0.2305 0.71308 0.916 0.000 0.012 0.028 0.044
#> SRR957899 3 0.6660 -0.30425 0.000 0.384 0.388 0.000 0.228
#> SRR957900 5 0.5042 1.00000 0.000 0.032 0.460 0.000 0.508
#> SRR957901 3 0.6671 -0.31725 0.000 0.372 0.396 0.000 0.232
#> SRR957902 2 0.0451 0.74058 0.000 0.988 0.004 0.008 0.000
#> SRR957903 3 0.4404 0.48476 0.004 0.000 0.716 0.028 0.252
#> SRR957904 3 0.1026 0.34230 0.000 0.024 0.968 0.004 0.004
#> SRR957905 1 0.3596 0.63882 0.776 0.000 0.012 0.212 0.000
#> SRR957906 2 0.7607 0.10462 0.000 0.460 0.212 0.072 0.256
#> SRR957907 2 0.0566 0.74070 0.000 0.984 0.004 0.012 0.000
#> SRR957908 2 0.3652 0.63895 0.000 0.784 0.004 0.200 0.012
#> SRR957909 1 0.0000 0.72418 1.000 0.000 0.000 0.000 0.000
#> SRR957910 2 0.0162 0.74006 0.000 0.996 0.004 0.000 0.000
#> SRR957911 1 0.0162 0.72392 0.996 0.000 0.000 0.004 0.000
#> SRR957912 1 0.7406 0.41088 0.484 0.000 0.152 0.076 0.288
#> SRR957913 3 0.4404 0.48476 0.004 0.000 0.716 0.028 0.252
#> SRR957917 1 0.8128 0.30017 0.420 0.020 0.288 0.068 0.204
#> SRR957918 2 0.3583 0.63121 0.000 0.792 0.004 0.192 0.012
#> SRR957920 3 0.1026 0.34230 0.000 0.024 0.968 0.004 0.004
#> SRR957919 2 0.3393 0.71230 0.000 0.848 0.008 0.100 0.044
#> SRR957921 3 0.5138 -0.73440 0.000 0.028 0.568 0.008 0.396
#> SRR957922 5 0.5042 1.00000 0.000 0.032 0.460 0.000 0.508
#> SRR957924 1 0.3815 0.63008 0.764 0.004 0.012 0.220 0.000
#> SRR957923 4 0.3705 1.00000 0.064 0.120 0.000 0.816 0.000
#> SRR957925 2 0.1205 0.73308 0.000 0.956 0.004 0.040 0.000
#> SRR957926 1 0.5569 0.60816 0.668 0.000 0.064 0.032 0.236
#> SRR957927 2 0.6987 0.36007 0.060 0.596 0.120 0.208 0.016
#> SRR957928 1 0.7406 0.41088 0.484 0.000 0.152 0.076 0.288
#> SRR957929 1 0.7406 0.41088 0.484 0.000 0.152 0.076 0.288
#> SRR957930 2 0.0162 0.74006 0.000 0.996 0.004 0.000 0.000
#> SRR957931 2 0.7334 -0.12671 0.000 0.444 0.252 0.036 0.268
#> SRR957932 1 0.3835 0.65254 0.796 0.000 0.048 0.000 0.156
#> SRR957933 1 0.5543 0.61056 0.672 0.000 0.064 0.032 0.232
#> SRR957934 2 0.7964 0.00247 0.000 0.408 0.236 0.096 0.260
#> SRR957935 2 0.8040 -0.10624 0.000 0.372 0.236 0.096 0.296
#> SRR957936 2 0.4000 0.59898 0.000 0.748 0.000 0.228 0.024
#> SRR957937 2 0.2665 0.72571 0.000 0.900 0.020 0.032 0.048
#> SRR957938 2 0.3163 0.71728 0.000 0.864 0.012 0.092 0.032
#> SRR957939 4 0.3705 1.00000 0.064 0.120 0.000 0.816 0.000
#> SRR957941 2 0.7964 0.00247 0.000 0.408 0.236 0.096 0.260
#> SRR957940 1 0.4381 0.65905 0.776 0.000 0.012 0.060 0.152
#> SRR957942 2 0.3113 0.72157 0.000 0.868 0.008 0.080 0.044
#> SRR957943 2 0.3652 0.63895 0.000 0.784 0.004 0.200 0.012
#> SRR957944 2 0.3052 0.71889 0.000 0.868 0.008 0.092 0.032
#> SRR957945 3 0.4404 0.48476 0.004 0.000 0.716 0.028 0.252
#> SRR957946 1 0.7149 0.48339 0.548 0.000 0.116 0.100 0.236
#> SRR957947 1 0.7169 0.48094 0.544 0.000 0.116 0.100 0.240
#> SRR957948 2 0.0671 0.73772 0.000 0.980 0.004 0.016 0.000
#> SRR957949 5 0.5042 1.00000 0.000 0.032 0.460 0.000 0.508
#> SRR957950 1 0.0000 0.72418 1.000 0.000 0.000 0.000 0.000
#> SRR957951 3 0.5219 -0.74556 0.000 0.032 0.560 0.008 0.400
#> SRR957952 3 0.1216 0.33212 0.000 0.020 0.960 0.000 0.020
#> SRR957953 1 0.3596 0.63882 0.776 0.000 0.012 0.212 0.000
#> SRR957954 1 0.3081 0.67014 0.832 0.000 0.012 0.000 0.156
#> SRR957956 1 0.3667 0.66744 0.812 0.000 0.012 0.020 0.156
#> SRR957957 4 0.3705 1.00000 0.064 0.120 0.000 0.816 0.000
#> SRR957958 1 0.3596 0.63882 0.776 0.000 0.012 0.212 0.000
#> SRR957959 3 0.1106 0.33629 0.000 0.024 0.964 0.000 0.012
#> SRR957960 2 0.1205 0.73308 0.000 0.956 0.004 0.040 0.000
#> SRR957961 3 0.5219 -0.74556 0.000 0.032 0.560 0.008 0.400
#> SRR957962 1 0.2966 0.64877 0.816 0.000 0.000 0.184 0.000
#> SRR957963 1 0.2966 0.64877 0.816 0.000 0.000 0.184 0.000
#> SRR957964 1 0.4130 0.65755 0.768 0.000 0.012 0.024 0.196
#> SRR957965 2 0.5160 0.34297 0.000 0.648 0.004 0.288 0.060
#> SRR957966 1 0.0000 0.72418 1.000 0.000 0.000 0.000 0.000
#> SRR957967 1 0.3355 0.65308 0.804 0.000 0.012 0.184 0.000
#> SRR957968 1 0.3596 0.63882 0.776 0.000 0.012 0.212 0.000
#> SRR957969 1 0.3039 0.67282 0.836 0.000 0.012 0.000 0.152
#> SRR957970 2 0.1357 0.73057 0.000 0.948 0.004 0.048 0.000
#> SRR957971 3 0.4404 0.48476 0.004 0.000 0.716 0.028 0.252
#> SRR957972 3 0.2899 0.41617 0.004 0.000 0.872 0.028 0.096
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 4 0.0260 0.789 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957915 2 0.2302 0.810 0.060 0.900 0.000 0.000 0.008 0.032
#> SRR957916 5 0.2766 0.632 0.124 0.020 0.004 0.000 0.852 0.000
#> SRR957884 4 0.3230 0.748 0.000 0.000 0.012 0.776 0.000 0.212
#> SRR957885 3 0.0790 0.794 0.000 0.000 0.968 0.000 0.032 0.000
#> SRR957886 2 0.2364 0.803 0.004 0.892 0.000 0.000 0.072 0.032
#> SRR957887 3 0.0935 0.791 0.000 0.000 0.964 0.004 0.032 0.000
#> SRR957888 4 0.0260 0.789 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957889 1 0.4533 0.863 0.704 0.000 0.140 0.156 0.000 0.000
#> SRR957890 1 0.5066 0.804 0.636 0.000 0.176 0.188 0.000 0.000
#> SRR957891 5 0.1176 0.612 0.000 0.024 0.020 0.000 0.956 0.000
#> SRR957893 4 0.0260 0.789 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957892 4 0.0260 0.789 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957894 2 0.5579 0.502 0.140 0.644 0.032 0.000 0.004 0.180
#> SRR957895 4 0.3608 0.710 0.000 0.004 0.012 0.736 0.000 0.248
#> SRR957896 2 0.0363 0.841 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR957897 6 0.1152 1.000 0.000 0.044 0.000 0.004 0.000 0.952
#> SRR957898 4 0.3558 0.575 0.248 0.000 0.016 0.736 0.000 0.000
#> SRR957899 5 0.3830 0.556 0.000 0.376 0.004 0.000 0.620 0.000
#> SRR957900 5 0.2766 0.632 0.124 0.020 0.004 0.000 0.852 0.000
#> SRR957901 5 0.3795 0.567 0.000 0.364 0.004 0.000 0.632 0.000
#> SRR957902 2 0.0653 0.842 0.004 0.980 0.000 0.000 0.012 0.004
#> SRR957903 3 0.0790 0.794 0.000 0.000 0.968 0.000 0.032 0.000
#> SRR957904 3 0.4474 0.667 0.012 0.020 0.608 0.000 0.360 0.000
#> SRR957905 4 0.3230 0.748 0.000 0.000 0.012 0.776 0.000 0.212
#> SRR957906 5 0.5320 0.316 0.020 0.460 0.000 0.000 0.464 0.056
#> SRR957907 2 0.0767 0.842 0.004 0.976 0.000 0.000 0.012 0.008
#> SRR957908 2 0.3471 0.748 0.020 0.784 0.000 0.000 0.008 0.188
#> SRR957909 4 0.0260 0.789 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957910 2 0.0363 0.841 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR957911 4 0.2003 0.739 0.116 0.000 0.000 0.884 0.000 0.000
#> SRR957912 1 0.3348 0.848 0.836 0.000 0.036 0.100 0.028 0.000
#> SRR957913 3 0.0790 0.794 0.000 0.000 0.968 0.000 0.032 0.000
#> SRR957917 1 0.5598 0.708 0.680 0.016 0.092 0.060 0.152 0.000
#> SRR957918 2 0.3630 0.751 0.040 0.780 0.000 0.000 0.004 0.176
#> SRR957920 3 0.4474 0.667 0.012 0.020 0.608 0.000 0.360 0.000
#> SRR957919 2 0.3059 0.789 0.020 0.856 0.000 0.000 0.040 0.084
#> SRR957921 5 0.1257 0.603 0.000 0.020 0.028 0.000 0.952 0.000
#> SRR957922 5 0.2766 0.632 0.124 0.020 0.004 0.000 0.852 0.000
#> SRR957924 4 0.3426 0.738 0.000 0.004 0.012 0.764 0.000 0.220
#> SRR957923 6 0.1152 1.000 0.000 0.044 0.000 0.004 0.000 0.952
#> SRR957925 2 0.1138 0.841 0.012 0.960 0.000 0.000 0.004 0.024
#> SRR957926 4 0.5389 0.242 0.268 0.000 0.160 0.572 0.000 0.000
#> SRR957927 2 0.6791 0.478 0.028 0.588 0.024 0.060 0.092 0.208
#> SRR957928 1 0.3348 0.848 0.836 0.000 0.036 0.100 0.028 0.000
#> SRR957929 1 0.3348 0.848 0.836 0.000 0.036 0.100 0.028 0.000
#> SRR957930 2 0.0363 0.841 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR957931 5 0.4991 0.370 0.024 0.436 0.000 0.000 0.512 0.028
#> SRR957932 4 0.2933 0.696 0.000 0.000 0.200 0.796 0.004 0.000
#> SRR957933 4 0.5336 0.278 0.256 0.000 0.160 0.584 0.000 0.000
#> SRR957934 5 0.6235 0.394 0.068 0.400 0.000 0.000 0.448 0.084
#> SRR957935 5 0.6536 0.441 0.104 0.364 0.000 0.000 0.448 0.084
#> SRR957936 2 0.4170 0.722 0.060 0.740 0.000 0.000 0.008 0.192
#> SRR957937 2 0.2364 0.804 0.004 0.892 0.000 0.000 0.072 0.032
#> SRR957938 2 0.2999 0.798 0.024 0.860 0.000 0.000 0.032 0.084
#> SRR957939 6 0.1152 1.000 0.000 0.044 0.000 0.004 0.000 0.952
#> SRR957941 5 0.6235 0.394 0.068 0.400 0.000 0.000 0.448 0.084
#> SRR957940 4 0.3695 0.735 0.000 0.000 0.164 0.776 0.000 0.060
#> SRR957942 2 0.2719 0.802 0.012 0.876 0.000 0.000 0.040 0.072
#> SRR957943 2 0.3471 0.748 0.020 0.784 0.000 0.000 0.008 0.188
#> SRR957944 2 0.2924 0.801 0.024 0.864 0.000 0.000 0.028 0.084
#> SRR957945 3 0.0790 0.794 0.000 0.000 0.968 0.000 0.032 0.000
#> SRR957946 1 0.4599 0.859 0.696 0.000 0.140 0.164 0.000 0.000
#> SRR957947 1 0.4533 0.863 0.704 0.000 0.140 0.156 0.000 0.000
#> SRR957948 2 0.0405 0.842 0.008 0.988 0.000 0.000 0.004 0.000
#> SRR957949 5 0.2766 0.632 0.124 0.020 0.004 0.000 0.852 0.000
#> SRR957950 4 0.0260 0.789 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957951 5 0.1176 0.612 0.000 0.024 0.020 0.000 0.956 0.000
#> SRR957952 3 0.4632 0.660 0.024 0.016 0.600 0.000 0.360 0.000
#> SRR957953 4 0.3230 0.748 0.000 0.000 0.012 0.776 0.000 0.212
#> SRR957954 4 0.2527 0.724 0.000 0.000 0.168 0.832 0.000 0.000
#> SRR957956 4 0.3053 0.726 0.000 0.000 0.168 0.812 0.000 0.020
#> SRR957957 6 0.1152 1.000 0.000 0.044 0.000 0.004 0.000 0.952
#> SRR957958 4 0.3230 0.748 0.000 0.000 0.012 0.776 0.000 0.212
#> SRR957959 3 0.4558 0.663 0.016 0.020 0.604 0.000 0.360 0.000
#> SRR957960 2 0.1138 0.841 0.012 0.960 0.000 0.000 0.004 0.024
#> SRR957961 5 0.1176 0.612 0.000 0.024 0.020 0.000 0.956 0.000
#> SRR957962 4 0.2664 0.758 0.000 0.000 0.000 0.816 0.000 0.184
#> SRR957963 4 0.2664 0.758 0.000 0.000 0.000 0.816 0.000 0.184
#> SRR957964 4 0.3894 0.660 0.072 0.000 0.168 0.760 0.000 0.000
#> SRR957965 2 0.5655 0.502 0.140 0.644 0.032 0.000 0.008 0.176
#> SRR957966 4 0.0260 0.789 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957967 4 0.3014 0.759 0.000 0.000 0.012 0.804 0.000 0.184
#> SRR957968 4 0.3230 0.748 0.000 0.000 0.012 0.776 0.000 0.212
#> SRR957969 4 0.2491 0.727 0.000 0.000 0.164 0.836 0.000 0.000
#> SRR957970 2 0.1313 0.839 0.016 0.952 0.000 0.000 0.004 0.028
#> SRR957971 3 0.0790 0.794 0.000 0.000 0.968 0.000 0.032 0.000
#> SRR957972 3 0.2762 0.749 0.000 0.000 0.804 0.000 0.196 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "kmeans"]
# you can also extract it by
# res = res_list["MAD:kmeans"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.976 0.989 0.5059 0.495 0.495
#> 3 3 0.579 0.741 0.866 0.2992 0.791 0.599
#> 4 4 0.575 0.433 0.657 0.1257 0.889 0.696
#> 5 5 0.610 0.545 0.656 0.0677 0.860 0.555
#> 6 6 0.668 0.563 0.708 0.0433 0.890 0.562
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
#> SRR957914 1 0.0000 0.982 1.000 0.000
#> SRR957915 2 0.0000 0.995 0.000 1.000
#> SRR957916 2 0.0000 0.995 0.000 1.000
#> SRR957884 1 0.0672 0.976 0.992 0.008
#> SRR957885 1 0.0000 0.982 1.000 0.000
#> SRR957886 2 0.0000 0.995 0.000 1.000
#> SRR957887 1 0.0000 0.982 1.000 0.000
#> SRR957888 1 0.0000 0.982 1.000 0.000
#> SRR957889 1 0.0000 0.982 1.000 0.000
#> SRR957890 1 0.0000 0.982 1.000 0.000
#> SRR957891 2 0.0000 0.995 0.000 1.000
#> SRR957893 1 0.0000 0.982 1.000 0.000
#> SRR957892 1 0.0000 0.982 1.000 0.000
#> SRR957894 2 0.0000 0.995 0.000 1.000
#> SRR957895 1 0.0672 0.976 0.992 0.008
#> SRR957896 2 0.0000 0.995 0.000 1.000
#> SRR957897 1 0.0672 0.976 0.992 0.008
#> SRR957898 1 0.0000 0.982 1.000 0.000
#> SRR957899 2 0.0000 0.995 0.000 1.000
#> SRR957900 2 0.0000 0.995 0.000 1.000
#> SRR957901 2 0.0000 0.995 0.000 1.000
#> SRR957902 2 0.0000 0.995 0.000 1.000
#> SRR957903 1 0.0000 0.982 1.000 0.000
#> SRR957904 1 0.7139 0.771 0.804 0.196
#> SRR957905 1 0.0000 0.982 1.000 0.000
#> SRR957906 2 0.0000 0.995 0.000 1.000
#> SRR957907 2 0.0000 0.995 0.000 1.000
#> SRR957908 2 0.0000 0.995 0.000 1.000
#> SRR957909 1 0.0000 0.982 1.000 0.000
#> SRR957910 2 0.0000 0.995 0.000 1.000
#> SRR957911 1 0.0000 0.982 1.000 0.000
#> SRR957912 1 0.6531 0.809 0.832 0.168
#> SRR957913 1 0.0000 0.982 1.000 0.000
#> SRR957917 1 0.7299 0.760 0.796 0.204
#> SRR957918 2 0.0000 0.995 0.000 1.000
#> SRR957920 2 0.0672 0.987 0.008 0.992
#> SRR957919 2 0.0000 0.995 0.000 1.000
#> SRR957921 2 0.0000 0.995 0.000 1.000
#> SRR957922 2 0.0000 0.995 0.000 1.000
#> SRR957924 1 0.0000 0.982 1.000 0.000
#> SRR957923 2 0.0000 0.995 0.000 1.000
#> SRR957925 2 0.0000 0.995 0.000 1.000
#> SRR957926 1 0.0000 0.982 1.000 0.000
#> SRR957927 2 0.0000 0.995 0.000 1.000
#> SRR957928 1 0.0000 0.982 1.000 0.000
#> SRR957929 1 0.6531 0.809 0.832 0.168
#> SRR957930 2 0.0000 0.995 0.000 1.000
#> SRR957931 2 0.0000 0.995 0.000 1.000
#> SRR957932 1 0.0000 0.982 1.000 0.000
#> SRR957933 1 0.0000 0.982 1.000 0.000
#> SRR957934 2 0.0000 0.995 0.000 1.000
#> SRR957935 2 0.0000 0.995 0.000 1.000
#> SRR957936 2 0.0000 0.995 0.000 1.000
#> SRR957937 2 0.0000 0.995 0.000 1.000
#> SRR957938 2 0.0000 0.995 0.000 1.000
#> SRR957939 1 0.0938 0.973 0.988 0.012
#> SRR957941 2 0.0000 0.995 0.000 1.000
#> SRR957940 1 0.0000 0.982 1.000 0.000
#> SRR957942 2 0.0000 0.995 0.000 1.000
#> SRR957943 2 0.0000 0.995 0.000 1.000
#> SRR957944 2 0.0000 0.995 0.000 1.000
#> SRR957945 1 0.0000 0.982 1.000 0.000
#> SRR957946 1 0.0000 0.982 1.000 0.000
#> SRR957947 1 0.0000 0.982 1.000 0.000
#> SRR957948 2 0.0000 0.995 0.000 1.000
#> SRR957949 2 0.0000 0.995 0.000 1.000
#> SRR957950 1 0.0000 0.982 1.000 0.000
#> SRR957951 2 0.0000 0.995 0.000 1.000
#> SRR957952 2 0.0938 0.983 0.012 0.988
#> SRR957953 1 0.0000 0.982 1.000 0.000
#> SRR957954 1 0.0000 0.982 1.000 0.000
#> SRR957956 1 0.0000 0.982 1.000 0.000
#> SRR957957 2 0.7219 0.747 0.200 0.800
#> SRR957958 1 0.0000 0.982 1.000 0.000
#> SRR957959 2 0.0000 0.995 0.000 1.000
#> SRR957960 2 0.0000 0.995 0.000 1.000
#> SRR957961 2 0.0000 0.995 0.000 1.000
#> SRR957962 1 0.0000 0.982 1.000 0.000
#> SRR957963 1 0.0000 0.982 1.000 0.000
#> SRR957964 1 0.0000 0.982 1.000 0.000
#> SRR957965 2 0.0000 0.995 0.000 1.000
#> SRR957966 1 0.0000 0.982 1.000 0.000
#> SRR957967 1 0.0000 0.982 1.000 0.000
#> SRR957968 1 0.0000 0.982 1.000 0.000
#> SRR957969 1 0.0000 0.982 1.000 0.000
#> SRR957970 2 0.0000 0.995 0.000 1.000
#> SRR957971 1 0.0000 0.982 1.000 0.000
#> SRR957972 1 0.0000 0.982 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957915 2 0.0747 0.891 0.000 0.984 0.016
#> SRR957916 3 0.5859 0.330 0.000 0.344 0.656
#> SRR957884 1 0.6231 0.704 0.772 0.148 0.080
#> SRR957885 3 0.5591 0.444 0.304 0.000 0.696
#> SRR957886 2 0.0892 0.891 0.000 0.980 0.020
#> SRR957887 3 0.4702 0.601 0.212 0.000 0.788
#> SRR957888 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957889 3 0.6026 0.353 0.376 0.000 0.624
#> SRR957890 1 0.5327 0.667 0.728 0.000 0.272
#> SRR957891 2 0.5529 0.685 0.000 0.704 0.296
#> SRR957893 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957892 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957894 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957895 1 0.5526 0.693 0.792 0.172 0.036
#> SRR957896 2 0.3412 0.858 0.000 0.876 0.124
#> SRR957897 1 0.6253 0.618 0.732 0.232 0.036
#> SRR957898 1 0.5098 0.692 0.752 0.000 0.248
#> SRR957899 2 0.4346 0.812 0.000 0.816 0.184
#> SRR957900 3 0.5859 0.330 0.000 0.344 0.656
#> SRR957901 2 0.3412 0.858 0.000 0.876 0.124
#> SRR957902 2 0.3412 0.858 0.000 0.876 0.124
#> SRR957903 3 0.4654 0.605 0.208 0.000 0.792
#> SRR957904 3 0.0237 0.704 0.004 0.000 0.996
#> SRR957905 1 0.2625 0.826 0.916 0.000 0.084
#> SRR957906 2 0.4399 0.803 0.000 0.812 0.188
#> SRR957907 2 0.0592 0.892 0.000 0.988 0.012
#> SRR957908 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957909 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957910 2 0.3340 0.860 0.000 0.880 0.120
#> SRR957911 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957912 3 0.1999 0.704 0.036 0.012 0.952
#> SRR957913 3 0.4654 0.605 0.208 0.000 0.792
#> SRR957917 3 0.1529 0.711 0.000 0.040 0.960
#> SRR957918 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957920 3 0.3038 0.687 0.000 0.104 0.896
#> SRR957919 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957921 3 0.5591 0.416 0.000 0.304 0.696
#> SRR957922 2 0.5591 0.675 0.000 0.696 0.304
#> SRR957924 1 0.0747 0.841 0.984 0.000 0.016
#> SRR957923 2 0.4062 0.714 0.164 0.836 0.000
#> SRR957925 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957926 1 0.5178 0.681 0.744 0.000 0.256
#> SRR957927 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957928 3 0.4750 0.609 0.216 0.000 0.784
#> SRR957929 1 0.6067 0.673 0.736 0.028 0.236
#> SRR957930 2 0.3412 0.858 0.000 0.876 0.124
#> SRR957931 2 0.5591 0.675 0.000 0.696 0.304
#> SRR957932 3 0.6045 0.244 0.380 0.000 0.620
#> SRR957933 1 0.5098 0.690 0.752 0.000 0.248
#> SRR957934 2 0.3267 0.860 0.000 0.884 0.116
#> SRR957935 2 0.4399 0.808 0.000 0.812 0.188
#> SRR957936 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957937 2 0.0892 0.891 0.000 0.980 0.020
#> SRR957938 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957939 1 0.5016 0.612 0.760 0.240 0.000
#> SRR957941 2 0.5529 0.688 0.000 0.704 0.296
#> SRR957940 1 0.5327 0.700 0.728 0.000 0.272
#> SRR957942 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957945 3 0.4654 0.605 0.208 0.000 0.792
#> SRR957946 1 0.5138 0.682 0.748 0.000 0.252
#> SRR957947 1 0.5098 0.687 0.752 0.000 0.248
#> SRR957948 2 0.0747 0.891 0.000 0.984 0.016
#> SRR957949 2 0.4605 0.800 0.000 0.796 0.204
#> SRR957950 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957951 3 0.5859 0.331 0.000 0.344 0.656
#> SRR957952 3 0.1643 0.711 0.000 0.044 0.956
#> SRR957953 1 0.2625 0.826 0.916 0.000 0.084
#> SRR957954 1 0.1163 0.839 0.972 0.000 0.028
#> SRR957956 1 0.2625 0.826 0.916 0.000 0.084
#> SRR957957 2 0.6441 0.506 0.276 0.696 0.028
#> SRR957958 1 0.2625 0.826 0.916 0.000 0.084
#> SRR957959 3 0.2796 0.697 0.000 0.092 0.908
#> SRR957960 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957961 3 0.5497 0.439 0.000 0.292 0.708
#> SRR957962 1 0.1031 0.840 0.976 0.000 0.024
#> SRR957963 1 0.0000 0.840 1.000 0.000 0.000
#> SRR957964 1 0.5785 0.630 0.668 0.000 0.332
#> SRR957965 2 0.0747 0.891 0.000 0.984 0.016
#> SRR957966 1 0.0237 0.841 0.996 0.000 0.004
#> SRR957967 1 0.1529 0.837 0.960 0.000 0.040
#> SRR957968 1 0.2625 0.826 0.916 0.000 0.084
#> SRR957969 1 0.5216 0.712 0.740 0.000 0.260
#> SRR957970 2 0.0000 0.891 0.000 1.000 0.000
#> SRR957971 3 0.4605 0.605 0.204 0.000 0.796
#> SRR957972 3 0.0747 0.702 0.016 0.000 0.984
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0336 0.6560 0.992 0.000 0.000 0.008
#> SRR957915 2 0.1716 0.6236 0.000 0.936 0.000 0.064
#> SRR957916 4 0.7050 0.4383 0.000 0.264 0.172 0.564
#> SRR957884 1 0.8192 0.5693 0.508 0.048 0.152 0.292
#> SRR957885 3 0.1256 0.6788 0.028 0.000 0.964 0.008
#> SRR957886 2 0.2647 0.5907 0.000 0.880 0.000 0.120
#> SRR957887 3 0.1042 0.6845 0.020 0.000 0.972 0.008
#> SRR957888 1 0.0000 0.6587 1.000 0.000 0.000 0.000
#> SRR957889 1 0.6101 0.2141 0.560 0.000 0.388 0.052
#> SRR957890 1 0.5807 0.3612 0.636 0.000 0.312 0.052
#> SRR957891 4 0.6491 0.2886 0.000 0.432 0.072 0.496
#> SRR957893 1 0.0000 0.6587 1.000 0.000 0.000 0.000
#> SRR957892 1 0.3219 0.6729 0.836 0.000 0.000 0.164
#> SRR957894 2 0.2973 0.6054 0.000 0.856 0.000 0.144
#> SRR957895 1 0.7690 0.5285 0.524 0.172 0.016 0.288
#> SRR957896 2 0.4981 -0.0568 0.000 0.536 0.000 0.464
#> SRR957897 4 0.8059 -0.3863 0.360 0.216 0.012 0.412
#> SRR957898 1 0.4647 0.4413 0.704 0.000 0.288 0.008
#> SRR957899 2 0.5137 -0.0546 0.000 0.544 0.004 0.452
#> SRR957900 4 0.7048 0.4360 0.000 0.284 0.160 0.556
#> SRR957901 2 0.4933 0.0312 0.000 0.568 0.000 0.432
#> SRR957902 2 0.4916 0.0554 0.000 0.576 0.000 0.424
#> SRR957903 3 0.0707 0.6899 0.020 0.000 0.980 0.000
#> SRR957904 3 0.3219 0.6420 0.000 0.000 0.836 0.164
#> SRR957905 1 0.7113 0.6032 0.552 0.000 0.172 0.276
#> SRR957906 2 0.5127 0.1811 0.000 0.632 0.012 0.356
#> SRR957907 2 0.2760 0.5834 0.000 0.872 0.000 0.128
#> SRR957908 2 0.3024 0.5982 0.000 0.852 0.000 0.148
#> SRR957909 1 0.0000 0.6587 1.000 0.000 0.000 0.000
#> SRR957910 2 0.4817 0.1526 0.000 0.612 0.000 0.388
#> SRR957911 1 0.0672 0.6539 0.984 0.000 0.008 0.008
#> SRR957912 3 0.6779 0.5083 0.116 0.000 0.560 0.324
#> SRR957913 3 0.0707 0.6899 0.020 0.000 0.980 0.000
#> SRR957917 3 0.4761 0.5151 0.000 0.004 0.664 0.332
#> SRR957918 2 0.0707 0.6342 0.000 0.980 0.000 0.020
#> SRR957920 3 0.5478 0.2226 0.000 0.016 0.540 0.444
#> SRR957919 2 0.2868 0.6055 0.000 0.864 0.000 0.136
#> SRR957921 4 0.5853 -0.0847 0.000 0.032 0.460 0.508
#> SRR957922 4 0.5636 0.2881 0.000 0.424 0.024 0.552
#> SRR957924 1 0.5968 0.6482 0.664 0.000 0.084 0.252
#> SRR957923 2 0.5110 0.3615 0.012 0.636 0.000 0.352
#> SRR957925 2 0.0817 0.6340 0.000 0.976 0.000 0.024
#> SRR957926 1 0.5279 0.4584 0.716 0.000 0.232 0.052
#> SRR957927 2 0.1716 0.6308 0.000 0.936 0.000 0.064
#> SRR957928 3 0.6446 0.3387 0.328 0.000 0.584 0.088
#> SRR957929 1 0.5677 0.4658 0.736 0.016 0.072 0.176
#> SRR957930 2 0.4916 0.0670 0.000 0.576 0.000 0.424
#> SRR957931 4 0.5155 0.2193 0.000 0.468 0.004 0.528
#> SRR957932 3 0.3166 0.5843 0.116 0.000 0.868 0.016
#> SRR957933 1 0.4775 0.4805 0.740 0.000 0.232 0.028
#> SRR957934 2 0.5250 -0.0243 0.000 0.552 0.008 0.440
#> SRR957935 2 0.5607 -0.2534 0.000 0.492 0.020 0.488
#> SRR957936 2 0.3024 0.5982 0.000 0.852 0.000 0.148
#> SRR957937 2 0.2868 0.5769 0.000 0.864 0.000 0.136
#> SRR957938 2 0.2760 0.6109 0.000 0.872 0.000 0.128
#> SRR957939 4 0.7710 -0.3797 0.368 0.224 0.000 0.408
#> SRR957941 4 0.5682 0.2406 0.000 0.456 0.024 0.520
#> SRR957940 1 0.7721 0.5291 0.440 0.000 0.312 0.248
#> SRR957942 2 0.1118 0.6340 0.000 0.964 0.000 0.036
#> SRR957943 2 0.3024 0.5982 0.000 0.852 0.000 0.148
#> SRR957944 2 0.2921 0.6071 0.000 0.860 0.000 0.140
#> SRR957945 3 0.0707 0.6899 0.020 0.000 0.980 0.000
#> SRR957946 1 0.5546 0.4090 0.680 0.000 0.268 0.052
#> SRR957947 1 0.5279 0.4584 0.716 0.000 0.232 0.052
#> SRR957948 2 0.2408 0.6034 0.000 0.896 0.000 0.104
#> SRR957949 4 0.5508 0.1901 0.000 0.476 0.016 0.508
#> SRR957950 1 0.2011 0.6719 0.920 0.000 0.000 0.080
#> SRR957951 4 0.7353 0.4288 0.000 0.288 0.196 0.516
#> SRR957952 3 0.5143 0.2509 0.000 0.004 0.540 0.456
#> SRR957953 1 0.7113 0.6032 0.552 0.000 0.172 0.276
#> SRR957954 1 0.5812 0.6506 0.708 0.000 0.156 0.136
#> SRR957956 1 0.6788 0.6267 0.608 0.000 0.188 0.204
#> SRR957957 2 0.7471 0.1017 0.124 0.456 0.012 0.408
#> SRR957958 1 0.7113 0.6032 0.552 0.000 0.172 0.276
#> SRR957959 3 0.5147 0.2235 0.000 0.004 0.536 0.460
#> SRR957960 2 0.1716 0.6272 0.000 0.936 0.000 0.064
#> SRR957961 4 0.5928 -0.0784 0.000 0.036 0.456 0.508
#> SRR957962 1 0.6118 0.6488 0.672 0.000 0.120 0.208
#> SRR957963 1 0.3649 0.6678 0.796 0.000 0.000 0.204
#> SRR957964 1 0.5408 0.2555 0.500 0.000 0.488 0.012
#> SRR957965 2 0.2760 0.6236 0.000 0.872 0.000 0.128
#> SRR957966 1 0.2530 0.6731 0.888 0.000 0.000 0.112
#> SRR957967 1 0.6921 0.6167 0.580 0.000 0.160 0.260
#> SRR957968 1 0.7210 0.5977 0.540 0.000 0.184 0.276
#> SRR957969 3 0.7253 -0.4438 0.428 0.000 0.428 0.144
#> SRR957970 2 0.1716 0.6272 0.000 0.936 0.000 0.064
#> SRR957971 3 0.0707 0.6899 0.020 0.000 0.980 0.000
#> SRR957972 3 0.3024 0.6522 0.000 0.000 0.852 0.148
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.3074 0.6819 0.804 0.000 0.000 0.196 0.000
#> SRR957915 2 0.1956 0.6248 0.008 0.928 0.012 0.000 0.052
#> SRR957916 5 0.3583 0.6014 0.004 0.192 0.012 0.000 0.792
#> SRR957884 4 0.1808 0.7599 0.020 0.000 0.040 0.936 0.004
#> SRR957885 3 0.7598 0.8469 0.152 0.000 0.516 0.180 0.152
#> SRR957886 2 0.2520 0.6101 0.004 0.888 0.012 0.000 0.096
#> SRR957887 3 0.7657 0.8497 0.152 0.000 0.508 0.180 0.160
#> SRR957888 1 0.3210 0.6730 0.788 0.000 0.000 0.212 0.000
#> SRR957889 1 0.4468 0.4482 0.728 0.000 0.228 0.004 0.040
#> SRR957890 1 0.2976 0.6363 0.852 0.000 0.132 0.012 0.004
#> SRR957891 5 0.4846 0.3604 0.004 0.388 0.020 0.000 0.588
#> SRR957893 1 0.3210 0.6730 0.788 0.000 0.000 0.212 0.000
#> SRR957892 1 0.4452 0.0250 0.500 0.000 0.004 0.496 0.000
#> SRR957894 2 0.4749 0.5569 0.004 0.668 0.300 0.024 0.004
#> SRR957895 4 0.3629 0.6983 0.036 0.040 0.076 0.848 0.000
#> SRR957896 2 0.4947 0.1022 0.004 0.576 0.024 0.000 0.396
#> SRR957897 4 0.4088 0.6063 0.008 0.036 0.176 0.780 0.000
#> SRR957898 1 0.2735 0.7000 0.880 0.000 0.084 0.036 0.000
#> SRR957899 2 0.4758 0.0234 0.004 0.552 0.012 0.000 0.432
#> SRR957900 5 0.3282 0.6013 0.000 0.188 0.008 0.000 0.804
#> SRR957901 2 0.4676 0.1511 0.004 0.592 0.012 0.000 0.392
#> SRR957902 2 0.4706 0.2728 0.004 0.632 0.020 0.000 0.344
#> SRR957903 3 0.7618 0.8654 0.152 0.000 0.508 0.136 0.204
#> SRR957904 3 0.6200 0.5883 0.080 0.000 0.472 0.020 0.428
#> SRR957905 4 0.2299 0.7669 0.052 0.000 0.032 0.912 0.004
#> SRR957906 2 0.5821 0.3848 0.000 0.608 0.108 0.008 0.276
#> SRR957907 2 0.2806 0.5754 0.004 0.844 0.000 0.000 0.152
#> SRR957908 2 0.5238 0.5396 0.000 0.612 0.336 0.044 0.008
#> SRR957909 1 0.3210 0.6730 0.788 0.000 0.000 0.212 0.000
#> SRR957910 2 0.3790 0.4620 0.004 0.744 0.004 0.000 0.248
#> SRR957911 1 0.2852 0.6878 0.828 0.000 0.000 0.172 0.000
#> SRR957912 5 0.6414 0.0786 0.224 0.004 0.236 0.000 0.536
#> SRR957913 3 0.7618 0.8654 0.152 0.000 0.508 0.136 0.204
#> SRR957917 5 0.4855 0.1990 0.060 0.004 0.236 0.000 0.700
#> SRR957918 2 0.0671 0.6297 0.004 0.980 0.016 0.000 0.000
#> SRR957920 5 0.3353 0.3521 0.008 0.000 0.196 0.000 0.796
#> SRR957919 2 0.5355 0.5368 0.000 0.604 0.340 0.044 0.012
#> SRR957921 5 0.3299 0.5349 0.004 0.040 0.108 0.000 0.848
#> SRR957922 5 0.4883 0.5452 0.004 0.260 0.052 0.000 0.684
#> SRR957924 4 0.2390 0.7403 0.084 0.000 0.020 0.896 0.000
#> SRR957923 2 0.6866 0.2985 0.004 0.448 0.316 0.228 0.004
#> SRR957925 2 0.2481 0.6197 0.004 0.908 0.056 0.008 0.024
#> SRR957926 1 0.2962 0.7128 0.868 0.000 0.084 0.048 0.000
#> SRR957927 2 0.2968 0.6230 0.000 0.872 0.092 0.028 0.008
#> SRR957928 1 0.6525 0.0486 0.484 0.000 0.264 0.000 0.252
#> SRR957929 1 0.6909 0.5564 0.624 0.040 0.120 0.040 0.176
#> SRR957930 2 0.4468 0.3978 0.004 0.696 0.024 0.000 0.276
#> SRR957931 5 0.4359 0.5157 0.004 0.288 0.016 0.000 0.692
#> SRR957932 3 0.7461 0.8286 0.160 0.000 0.532 0.180 0.128
#> SRR957933 1 0.3043 0.7151 0.864 0.000 0.080 0.056 0.000
#> SRR957934 2 0.4946 0.1328 0.000 0.596 0.036 0.000 0.368
#> SRR957935 5 0.5543 0.2329 0.004 0.448 0.056 0.000 0.492
#> SRR957936 2 0.4986 0.5434 0.000 0.624 0.336 0.036 0.004
#> SRR957937 2 0.3078 0.5920 0.004 0.848 0.016 0.000 0.132
#> SRR957938 2 0.4589 0.5694 0.000 0.680 0.292 0.020 0.008
#> SRR957939 4 0.5005 0.5560 0.016 0.064 0.204 0.716 0.000
#> SRR957941 5 0.5376 0.3506 0.004 0.404 0.048 0.000 0.544
#> SRR957940 4 0.3924 0.7028 0.120 0.000 0.068 0.808 0.004
#> SRR957942 2 0.3450 0.6105 0.000 0.808 0.176 0.008 0.008
#> SRR957943 2 0.5238 0.5396 0.000 0.612 0.336 0.044 0.008
#> SRR957944 2 0.4773 0.5540 0.000 0.656 0.312 0.024 0.008
#> SRR957945 3 0.7618 0.8654 0.152 0.000 0.508 0.136 0.204
#> SRR957946 1 0.2361 0.6740 0.892 0.000 0.096 0.012 0.000
#> SRR957947 1 0.2654 0.7184 0.888 0.000 0.064 0.048 0.000
#> SRR957948 2 0.2517 0.6037 0.008 0.884 0.004 0.000 0.104
#> SRR957949 5 0.5431 0.2601 0.004 0.448 0.048 0.000 0.500
#> SRR957950 1 0.3857 0.5416 0.688 0.000 0.000 0.312 0.000
#> SRR957951 5 0.4969 0.5526 0.004 0.264 0.056 0.000 0.676
#> SRR957952 5 0.3606 0.3982 0.024 0.004 0.164 0.000 0.808
#> SRR957953 4 0.2299 0.7669 0.052 0.000 0.032 0.912 0.004
#> SRR957954 4 0.4890 0.5850 0.256 0.000 0.064 0.680 0.000
#> SRR957956 4 0.4283 0.7000 0.136 0.000 0.080 0.780 0.004
#> SRR957957 4 0.6692 0.1144 0.000 0.248 0.336 0.416 0.000
#> SRR957958 4 0.2299 0.7669 0.052 0.000 0.032 0.912 0.004
#> SRR957959 5 0.2890 0.4218 0.000 0.004 0.160 0.000 0.836
#> SRR957960 2 0.3167 0.5991 0.004 0.864 0.036 0.004 0.092
#> SRR957961 5 0.4239 0.5206 0.004 0.080 0.132 0.000 0.784
#> SRR957962 4 0.3003 0.6728 0.188 0.000 0.000 0.812 0.000
#> SRR957963 4 0.4045 0.3658 0.356 0.000 0.000 0.644 0.000
#> SRR957964 3 0.7044 0.4426 0.372 0.000 0.408 0.200 0.020
#> SRR957965 2 0.4360 0.5979 0.004 0.752 0.208 0.008 0.028
#> SRR957966 1 0.4264 0.4136 0.620 0.000 0.004 0.376 0.000
#> SRR957967 4 0.1270 0.7601 0.052 0.000 0.000 0.948 0.000
#> SRR957968 4 0.2538 0.7631 0.048 0.000 0.048 0.900 0.004
#> SRR957969 4 0.5946 0.4590 0.276 0.000 0.132 0.588 0.004
#> SRR957970 2 0.2741 0.6077 0.004 0.888 0.024 0.004 0.080
#> SRR957971 3 0.7550 0.8622 0.152 0.000 0.516 0.128 0.204
#> SRR957972 3 0.6634 0.6652 0.132 0.000 0.472 0.020 0.376
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.1663 0.7385 0.912 0.000 0.000 0.088 0.000 0.000
#> SRR957915 5 0.4358 0.4524 0.008 0.352 0.000 0.000 0.620 0.020
#> SRR957916 6 0.4596 0.5315 0.008 0.008 0.020 0.000 0.352 0.612
#> SRR957884 4 0.0725 0.8064 0.000 0.012 0.012 0.976 0.000 0.000
#> SRR957885 3 0.2048 0.8737 0.000 0.000 0.880 0.120 0.000 0.000
#> SRR957886 5 0.3717 0.4379 0.000 0.384 0.000 0.000 0.616 0.000
#> SRR957887 3 0.1910 0.8811 0.000 0.000 0.892 0.108 0.000 0.000
#> SRR957888 1 0.1910 0.7323 0.892 0.000 0.000 0.108 0.000 0.000
#> SRR957889 1 0.6462 0.4297 0.436 0.004 0.284 0.016 0.000 0.260
#> SRR957890 1 0.5316 0.6784 0.632 0.000 0.148 0.012 0.000 0.208
#> SRR957891 5 0.4623 -0.0388 0.004 0.004 0.048 0.000 0.652 0.292
#> SRR957893 1 0.1910 0.7323 0.892 0.000 0.000 0.108 0.000 0.000
#> SRR957892 1 0.3398 0.5640 0.740 0.000 0.000 0.252 0.000 0.008
#> SRR957894 2 0.4488 0.7029 0.024 0.784 0.032 0.004 0.100 0.056
#> SRR957895 4 0.3567 0.7353 0.008 0.052 0.028 0.848 0.012 0.052
#> SRR957896 5 0.1829 0.5783 0.000 0.056 0.000 0.000 0.920 0.024
#> SRR957897 4 0.5240 0.4895 0.004 0.276 0.032 0.632 0.000 0.056
#> SRR957898 1 0.4600 0.7286 0.732 0.000 0.120 0.020 0.000 0.128
#> SRR957899 5 0.2006 0.4492 0.000 0.004 0.000 0.000 0.892 0.104
#> SRR957900 6 0.4642 0.5225 0.008 0.008 0.020 0.000 0.368 0.596
#> SRR957901 5 0.2365 0.5365 0.000 0.040 0.000 0.000 0.888 0.072
#> SRR957902 5 0.2950 0.6003 0.000 0.148 0.000 0.000 0.828 0.024
#> SRR957903 3 0.1663 0.8868 0.000 0.000 0.912 0.088 0.000 0.000
#> SRR957904 3 0.2737 0.6605 0.004 0.000 0.832 0.000 0.004 0.160
#> SRR957905 4 0.0547 0.8076 0.000 0.000 0.020 0.980 0.000 0.000
#> SRR957906 5 0.5651 0.2131 0.004 0.432 0.040 0.000 0.476 0.048
#> SRR957907 5 0.3330 0.5441 0.000 0.284 0.000 0.000 0.716 0.000
#> SRR957908 2 0.1010 0.7670 0.000 0.960 0.004 0.000 0.036 0.000
#> SRR957909 1 0.1910 0.7323 0.892 0.000 0.000 0.108 0.000 0.000
#> SRR957910 5 0.3483 0.5745 0.000 0.236 0.000 0.000 0.748 0.016
#> SRR957911 1 0.1714 0.7376 0.908 0.000 0.000 0.092 0.000 0.000
#> SRR957912 6 0.5460 0.4591 0.104 0.000 0.152 0.000 0.072 0.672
#> SRR957913 3 0.1663 0.8868 0.000 0.000 0.912 0.088 0.000 0.000
#> SRR957917 6 0.5333 0.5206 0.044 0.000 0.204 0.000 0.092 0.660
#> SRR957918 5 0.5258 0.3955 0.020 0.368 0.004 0.004 0.564 0.040
#> SRR957920 6 0.6065 0.5443 0.016 0.000 0.320 0.000 0.176 0.488
#> SRR957919 2 0.1155 0.7667 0.000 0.956 0.004 0.000 0.036 0.004
#> SRR957921 6 0.6105 0.5475 0.004 0.004 0.200 0.000 0.348 0.444
#> SRR957922 6 0.5098 0.3490 0.056 0.004 0.004 0.000 0.432 0.504
#> SRR957924 4 0.1268 0.7931 0.036 0.000 0.008 0.952 0.000 0.004
#> SRR957923 2 0.6420 0.5837 0.024 0.644 0.032 0.152 0.056 0.092
#> SRR957925 5 0.5684 0.4569 0.028 0.304 0.008 0.008 0.592 0.060
#> SRR957926 1 0.4936 0.6966 0.672 0.000 0.080 0.020 0.000 0.228
#> SRR957927 5 0.5157 0.2063 0.016 0.468 0.004 0.008 0.480 0.024
#> SRR957928 6 0.5814 -0.0147 0.280 0.000 0.200 0.000 0.004 0.516
#> SRR957929 1 0.5781 0.3562 0.484 0.000 0.036 0.008 0.056 0.416
#> SRR957930 5 0.3221 0.5913 0.000 0.188 0.000 0.000 0.792 0.020
#> SRR957931 5 0.4311 -0.2997 0.004 0.004 0.008 0.000 0.556 0.428
#> SRR957932 3 0.2445 0.8679 0.004 0.000 0.868 0.120 0.000 0.008
#> SRR957933 1 0.4970 0.7261 0.696 0.000 0.092 0.032 0.000 0.180
#> SRR957934 5 0.4622 0.5741 0.024 0.116 0.004 0.004 0.752 0.100
#> SRR957935 5 0.6133 0.2915 0.052 0.080 0.008 0.004 0.564 0.292
#> SRR957936 2 0.1007 0.7670 0.000 0.956 0.000 0.000 0.044 0.000
#> SRR957937 5 0.3769 0.4779 0.000 0.356 0.000 0.000 0.640 0.004
#> SRR957938 2 0.2742 0.7201 0.008 0.856 0.004 0.000 0.124 0.008
#> SRR957939 4 0.5788 0.3022 0.016 0.360 0.028 0.536 0.000 0.060
#> SRR957941 5 0.4235 0.1773 0.032 0.000 0.004 0.000 0.672 0.292
#> SRR957940 4 0.1349 0.7922 0.000 0.000 0.056 0.940 0.000 0.004
#> SRR957942 2 0.3636 0.2792 0.000 0.676 0.004 0.000 0.320 0.000
#> SRR957943 2 0.1010 0.7670 0.000 0.960 0.004 0.000 0.036 0.000
#> SRR957944 2 0.3362 0.7283 0.016 0.840 0.004 0.004 0.104 0.032
#> SRR957945 3 0.1663 0.8868 0.000 0.000 0.912 0.088 0.000 0.000
#> SRR957946 1 0.4951 0.7050 0.672 0.000 0.108 0.012 0.000 0.208
#> SRR957947 1 0.4959 0.7215 0.684 0.000 0.080 0.028 0.000 0.208
#> SRR957948 5 0.3935 0.5235 0.004 0.292 0.000 0.000 0.688 0.016
#> SRR957949 5 0.4416 0.4173 0.032 0.024 0.004 0.004 0.736 0.200
#> SRR957950 1 0.2854 0.6356 0.792 0.000 0.000 0.208 0.000 0.000
#> SRR957951 5 0.4707 -0.0882 0.004 0.004 0.048 0.000 0.632 0.312
#> SRR957952 6 0.6490 0.5783 0.040 0.000 0.280 0.000 0.204 0.476
#> SRR957953 4 0.0547 0.8076 0.000 0.000 0.020 0.980 0.000 0.000
#> SRR957954 4 0.4940 0.5644 0.264 0.004 0.060 0.656 0.000 0.016
#> SRR957956 4 0.3448 0.7380 0.108 0.004 0.072 0.816 0.000 0.000
#> SRR957957 2 0.4965 0.3265 0.000 0.636 0.024 0.288 0.000 0.052
#> SRR957958 4 0.0458 0.8079 0.000 0.000 0.016 0.984 0.000 0.000
#> SRR957959 6 0.6031 0.5706 0.004 0.000 0.260 0.000 0.268 0.468
#> SRR957960 5 0.5545 0.5058 0.028 0.260 0.008 0.008 0.632 0.064
#> SRR957961 5 0.6084 -0.4171 0.004 0.004 0.208 0.000 0.468 0.316
#> SRR957962 4 0.3394 0.7018 0.172 0.004 0.008 0.800 0.000 0.016
#> SRR957963 4 0.4542 0.3038 0.412 0.004 0.000 0.556 0.000 0.028
#> SRR957964 3 0.5615 0.6518 0.096 0.000 0.656 0.164 0.000 0.084
#> SRR957965 2 0.3915 0.4778 0.004 0.692 0.000 0.000 0.288 0.016
#> SRR957966 1 0.3570 0.5929 0.752 0.004 0.000 0.228 0.000 0.016
#> SRR957967 4 0.1109 0.8078 0.004 0.004 0.012 0.964 0.000 0.016
#> SRR957968 4 0.1219 0.7969 0.000 0.004 0.048 0.948 0.000 0.000
#> SRR957969 4 0.5531 0.5377 0.124 0.004 0.204 0.640 0.000 0.028
#> SRR957970 5 0.5200 0.5055 0.020 0.276 0.008 0.008 0.644 0.044
#> SRR957971 3 0.1663 0.8868 0.000 0.000 0.912 0.088 0.000 0.000
#> SRR957972 3 0.2838 0.6361 0.000 0.000 0.808 0.000 0.004 0.188
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.971 0.987 0.5059 0.495 0.495
#> 3 3 0.960 0.943 0.971 0.2991 0.791 0.599
#> 4 4 0.753 0.752 0.846 0.1230 0.888 0.693
#> 5 5 0.717 0.621 0.758 0.0748 0.864 0.563
#> 6 6 0.712 0.653 0.802 0.0449 0.919 0.644
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR957914 1 0.000 0.979 1.000 0.000
#> SRR957915 2 0.000 0.995 0.000 1.000
#> SRR957916 2 0.000 0.995 0.000 1.000
#> SRR957884 1 0.000 0.979 1.000 0.000
#> SRR957885 1 0.000 0.979 1.000 0.000
#> SRR957886 2 0.000 0.995 0.000 1.000
#> SRR957887 1 0.000 0.979 1.000 0.000
#> SRR957888 1 0.000 0.979 1.000 0.000
#> SRR957889 1 0.000 0.979 1.000 0.000
#> SRR957890 1 0.000 0.979 1.000 0.000
#> SRR957891 2 0.000 0.995 0.000 1.000
#> SRR957893 1 0.000 0.979 1.000 0.000
#> SRR957892 1 0.000 0.979 1.000 0.000
#> SRR957894 2 0.000 0.995 0.000 1.000
#> SRR957895 1 0.000 0.979 1.000 0.000
#> SRR957896 2 0.000 0.995 0.000 1.000
#> SRR957897 1 0.000 0.979 1.000 0.000
#> SRR957898 1 0.000 0.979 1.000 0.000
#> SRR957899 2 0.000 0.995 0.000 1.000
#> SRR957900 2 0.000 0.995 0.000 1.000
#> SRR957901 2 0.000 0.995 0.000 1.000
#> SRR957902 2 0.000 0.995 0.000 1.000
#> SRR957903 1 0.000 0.979 1.000 0.000
#> SRR957904 1 0.662 0.798 0.828 0.172
#> SRR957905 1 0.000 0.979 1.000 0.000
#> SRR957906 2 0.000 0.995 0.000 1.000
#> SRR957907 2 0.000 0.995 0.000 1.000
#> SRR957908 2 0.000 0.995 0.000 1.000
#> SRR957909 1 0.000 0.979 1.000 0.000
#> SRR957910 2 0.000 0.995 0.000 1.000
#> SRR957911 1 0.000 0.979 1.000 0.000
#> SRR957912 1 0.722 0.760 0.800 0.200
#> SRR957913 1 0.000 0.979 1.000 0.000
#> SRR957917 1 0.939 0.476 0.644 0.356
#> SRR957918 2 0.000 0.995 0.000 1.000
#> SRR957920 2 0.000 0.995 0.000 1.000
#> SRR957919 2 0.000 0.995 0.000 1.000
#> SRR957921 2 0.000 0.995 0.000 1.000
#> SRR957922 2 0.000 0.995 0.000 1.000
#> SRR957924 1 0.000 0.979 1.000 0.000
#> SRR957923 2 0.000 0.995 0.000 1.000
#> SRR957925 2 0.000 0.995 0.000 1.000
#> SRR957926 1 0.000 0.979 1.000 0.000
#> SRR957927 2 0.000 0.995 0.000 1.000
#> SRR957928 1 0.000 0.979 1.000 0.000
#> SRR957929 1 0.722 0.760 0.800 0.200
#> SRR957930 2 0.000 0.995 0.000 1.000
#> SRR957931 2 0.000 0.995 0.000 1.000
#> SRR957932 1 0.000 0.979 1.000 0.000
#> SRR957933 1 0.000 0.979 1.000 0.000
#> SRR957934 2 0.000 0.995 0.000 1.000
#> SRR957935 2 0.000 0.995 0.000 1.000
#> SRR957936 2 0.000 0.995 0.000 1.000
#> SRR957937 2 0.000 0.995 0.000 1.000
#> SRR957938 2 0.000 0.995 0.000 1.000
#> SRR957939 1 0.000 0.979 1.000 0.000
#> SRR957941 2 0.000 0.995 0.000 1.000
#> SRR957940 1 0.000 0.979 1.000 0.000
#> SRR957942 2 0.000 0.995 0.000 1.000
#> SRR957943 2 0.000 0.995 0.000 1.000
#> SRR957944 2 0.000 0.995 0.000 1.000
#> SRR957945 1 0.000 0.979 1.000 0.000
#> SRR957946 1 0.000 0.979 1.000 0.000
#> SRR957947 1 0.000 0.979 1.000 0.000
#> SRR957948 2 0.000 0.995 0.000 1.000
#> SRR957949 2 0.000 0.995 0.000 1.000
#> SRR957950 1 0.000 0.979 1.000 0.000
#> SRR957951 2 0.000 0.995 0.000 1.000
#> SRR957952 2 0.000 0.995 0.000 1.000
#> SRR957953 1 0.000 0.979 1.000 0.000
#> SRR957954 1 0.000 0.979 1.000 0.000
#> SRR957956 1 0.000 0.979 1.000 0.000
#> SRR957957 2 0.722 0.744 0.200 0.800
#> SRR957958 1 0.000 0.979 1.000 0.000
#> SRR957959 2 0.000 0.995 0.000 1.000
#> SRR957960 2 0.000 0.995 0.000 1.000
#> SRR957961 2 0.000 0.995 0.000 1.000
#> SRR957962 1 0.000 0.979 1.000 0.000
#> SRR957963 1 0.000 0.979 1.000 0.000
#> SRR957964 1 0.000 0.979 1.000 0.000
#> SRR957965 2 0.000 0.995 0.000 1.000
#> SRR957966 1 0.000 0.979 1.000 0.000
#> SRR957967 1 0.000 0.979 1.000 0.000
#> SRR957968 1 0.000 0.979 1.000 0.000
#> SRR957969 1 0.000 0.979 1.000 0.000
#> SRR957970 2 0.000 0.995 0.000 1.000
#> SRR957971 1 0.000 0.979 1.000 0.000
#> SRR957972 1 0.000 0.979 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957916 3 0.3038 0.876 0.000 0.104 0.896
#> SRR957884 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957885 3 0.4121 0.783 0.168 0.000 0.832
#> SRR957886 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957887 3 0.4002 0.793 0.160 0.000 0.840
#> SRR957888 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957889 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957890 1 0.2878 0.914 0.904 0.000 0.096
#> SRR957891 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957893 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957895 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957896 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957897 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957898 1 0.2625 0.924 0.916 0.000 0.084
#> SRR957899 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957900 3 0.3340 0.861 0.000 0.120 0.880
#> SRR957901 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957903 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957904 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957905 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957906 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957907 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957908 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957912 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957913 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957917 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957918 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957920 3 0.1031 0.922 0.000 0.024 0.976
#> SRR957919 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957921 3 0.2711 0.887 0.000 0.088 0.912
#> SRR957922 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957924 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957923 2 0.2625 0.896 0.084 0.916 0.000
#> SRR957925 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957926 1 0.2711 0.921 0.912 0.000 0.088
#> SRR957927 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957928 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957929 1 0.6119 0.741 0.772 0.164 0.064
#> SRR957930 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957931 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957932 3 0.5621 0.549 0.308 0.000 0.692
#> SRR957933 1 0.2625 0.924 0.916 0.000 0.084
#> SRR957934 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957935 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957936 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957939 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957941 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957940 1 0.1411 0.953 0.964 0.000 0.036
#> SRR957942 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957946 1 0.2711 0.921 0.912 0.000 0.088
#> SRR957947 1 0.2711 0.921 0.912 0.000 0.088
#> SRR957948 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957951 3 0.4842 0.741 0.000 0.224 0.776
#> SRR957952 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957953 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957954 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957956 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957957 2 0.5327 0.636 0.272 0.728 0.000
#> SRR957958 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957959 3 0.0892 0.924 0.000 0.020 0.980
#> SRR957960 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957961 3 0.2711 0.887 0.000 0.088 0.912
#> SRR957962 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957963 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957964 1 0.2796 0.918 0.908 0.000 0.092
#> SRR957965 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957967 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957968 1 0.0000 0.970 1.000 0.000 0.000
#> SRR957969 1 0.1411 0.953 0.964 0.000 0.036
#> SRR957970 2 0.0000 0.988 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.929 0.000 0.000 1.000
#> SRR957972 3 0.0000 0.929 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.1022 0.6534 0.968 0.000 0.000 0.032
#> SRR957915 2 0.0336 0.8913 0.000 0.992 0.000 0.008
#> SRR957916 3 0.5672 0.7698 0.000 0.056 0.668 0.276
#> SRR957884 4 0.4304 0.9305 0.284 0.000 0.000 0.716
#> SRR957885 3 0.3081 0.6914 0.064 0.000 0.888 0.048
#> SRR957886 2 0.0000 0.8908 0.000 1.000 0.000 0.000
#> SRR957887 3 0.2675 0.7151 0.044 0.000 0.908 0.048
#> SRR957888 1 0.1211 0.6483 0.960 0.000 0.000 0.040
#> SRR957889 1 0.4331 0.7087 0.712 0.000 0.288 0.000
#> SRR957890 1 0.4277 0.7141 0.720 0.000 0.280 0.000
#> SRR957891 2 0.7530 0.2649 0.000 0.492 0.236 0.272
#> SRR957893 1 0.1211 0.6483 0.960 0.000 0.000 0.040
#> SRR957892 1 0.1867 0.6144 0.928 0.000 0.000 0.072
#> SRR957894 2 0.1118 0.8869 0.000 0.964 0.000 0.036
#> SRR957895 4 0.5522 0.9143 0.288 0.044 0.000 0.668
#> SRR957896 2 0.3071 0.8509 0.000 0.888 0.044 0.068
#> SRR957897 4 0.5497 0.9119 0.284 0.044 0.000 0.672
#> SRR957898 1 0.4222 0.7195 0.728 0.000 0.272 0.000
#> SRR957899 2 0.3071 0.8509 0.000 0.888 0.044 0.068
#> SRR957900 3 0.5877 0.7602 0.000 0.068 0.656 0.276
#> SRR957901 2 0.2919 0.8548 0.000 0.896 0.044 0.060
#> SRR957902 2 0.1584 0.8805 0.000 0.952 0.012 0.036
#> SRR957903 3 0.2494 0.7225 0.036 0.000 0.916 0.048
#> SRR957904 3 0.1211 0.7653 0.000 0.000 0.960 0.040
#> SRR957905 4 0.4477 0.9402 0.312 0.000 0.000 0.688
#> SRR957906 2 0.4307 0.7834 0.000 0.808 0.144 0.048
#> SRR957907 2 0.0000 0.8908 0.000 1.000 0.000 0.000
#> SRR957908 2 0.1118 0.8869 0.000 0.964 0.000 0.036
#> SRR957909 1 0.1211 0.6483 0.960 0.000 0.000 0.040
#> SRR957910 2 0.1584 0.8805 0.000 0.952 0.012 0.036
#> SRR957911 1 0.0000 0.6696 1.000 0.000 0.000 0.000
#> SRR957912 1 0.7474 0.2407 0.500 0.000 0.280 0.220
#> SRR957913 3 0.2494 0.7225 0.036 0.000 0.916 0.048
#> SRR957917 3 0.3801 0.7915 0.000 0.000 0.780 0.220
#> SRR957918 2 0.0592 0.8905 0.000 0.984 0.000 0.016
#> SRR957920 3 0.4372 0.7958 0.000 0.004 0.728 0.268
#> SRR957919 2 0.1118 0.8869 0.000 0.964 0.000 0.036
#> SRR957921 3 0.4690 0.7922 0.000 0.012 0.712 0.276
#> SRR957922 2 0.6124 0.5942 0.000 0.640 0.084 0.276
#> SRR957924 1 0.1557 0.6331 0.944 0.000 0.000 0.056
#> SRR957923 2 0.5000 0.0206 0.000 0.500 0.000 0.500
#> SRR957925 2 0.1022 0.8880 0.000 0.968 0.000 0.032
#> SRR957926 1 0.4222 0.7196 0.728 0.000 0.272 0.000
#> SRR957927 2 0.1118 0.8869 0.000 0.964 0.000 0.036
#> SRR957928 1 0.4800 0.6585 0.656 0.000 0.340 0.004
#> SRR957929 1 0.5532 0.6322 0.708 0.004 0.056 0.232
#> SRR957930 2 0.1584 0.8805 0.000 0.952 0.012 0.036
#> SRR957931 2 0.6124 0.5942 0.000 0.640 0.084 0.276
#> SRR957932 1 0.5773 0.6552 0.632 0.000 0.320 0.048
#> SRR957933 1 0.4193 0.7212 0.732 0.000 0.268 0.000
#> SRR957934 2 0.2675 0.8604 0.000 0.908 0.044 0.048
#> SRR957935 2 0.4322 0.7933 0.000 0.804 0.044 0.152
#> SRR957936 2 0.1118 0.8869 0.000 0.964 0.000 0.036
#> SRR957937 2 0.0376 0.8899 0.000 0.992 0.004 0.004
#> SRR957938 2 0.1022 0.8880 0.000 0.968 0.000 0.032
#> SRR957939 4 0.5497 0.9119 0.284 0.044 0.000 0.672
#> SRR957941 2 0.5203 0.7030 0.000 0.720 0.048 0.232
#> SRR957940 1 0.2915 0.6966 0.892 0.000 0.080 0.028
#> SRR957942 2 0.0921 0.8888 0.000 0.972 0.000 0.028
#> SRR957943 2 0.1118 0.8869 0.000 0.964 0.000 0.036
#> SRR957944 2 0.1118 0.8869 0.000 0.964 0.000 0.036
#> SRR957945 3 0.2494 0.7225 0.036 0.000 0.916 0.048
#> SRR957946 1 0.4250 0.7170 0.724 0.000 0.276 0.000
#> SRR957947 1 0.4222 0.7195 0.728 0.000 0.272 0.000
#> SRR957948 2 0.0000 0.8908 0.000 1.000 0.000 0.000
#> SRR957949 2 0.5022 0.7216 0.000 0.736 0.044 0.220
#> SRR957950 1 0.1302 0.6448 0.956 0.000 0.000 0.044
#> SRR957951 3 0.5742 0.7674 0.000 0.060 0.664 0.276
#> SRR957952 3 0.4250 0.7951 0.000 0.000 0.724 0.276
#> SRR957953 4 0.4477 0.9402 0.312 0.000 0.000 0.688
#> SRR957954 1 0.3942 0.2862 0.764 0.000 0.000 0.236
#> SRR957956 1 0.4790 -0.2882 0.620 0.000 0.000 0.380
#> SRR957957 4 0.6010 0.8322 0.220 0.104 0.000 0.676
#> SRR957958 4 0.4477 0.9402 0.312 0.000 0.000 0.688
#> SRR957959 3 0.4428 0.7944 0.000 0.004 0.720 0.276
#> SRR957960 2 0.0336 0.8912 0.000 0.992 0.000 0.008
#> SRR957961 3 0.4663 0.7936 0.000 0.012 0.716 0.272
#> SRR957962 4 0.4477 0.9402 0.312 0.000 0.000 0.688
#> SRR957963 4 0.4713 0.8960 0.360 0.000 0.000 0.640
#> SRR957964 1 0.5574 0.6900 0.668 0.000 0.284 0.048
#> SRR957965 2 0.0469 0.8910 0.000 0.988 0.000 0.012
#> SRR957966 1 0.2216 0.5868 0.908 0.000 0.000 0.092
#> SRR957967 4 0.4477 0.9402 0.312 0.000 0.000 0.688
#> SRR957968 4 0.4477 0.9402 0.312 0.000 0.000 0.688
#> SRR957969 1 0.7324 0.5444 0.532 0.000 0.240 0.228
#> SRR957970 2 0.0336 0.8913 0.000 0.992 0.000 0.008
#> SRR957971 3 0.2494 0.7225 0.036 0.000 0.916 0.048
#> SRR957972 3 0.0188 0.7527 0.004 0.000 0.996 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.1478 0.8563 0.936 0.000 0.000 0.064 0.000
#> SRR957915 5 0.3210 0.2674 0.000 0.212 0.000 0.000 0.788
#> SRR957916 5 0.4304 0.3281 0.000 0.000 0.484 0.000 0.516
#> SRR957884 4 0.0000 0.8487 0.000 0.000 0.000 1.000 0.000
#> SRR957885 3 0.6386 0.7053 0.056 0.388 0.504 0.052 0.000
#> SRR957886 5 0.2813 0.3846 0.000 0.168 0.000 0.000 0.832
#> SRR957887 3 0.6331 0.7074 0.052 0.388 0.508 0.052 0.000
#> SRR957888 1 0.2074 0.8479 0.896 0.000 0.000 0.104 0.000
#> SRR957889 1 0.2605 0.7534 0.852 0.148 0.000 0.000 0.000
#> SRR957890 1 0.0000 0.8562 1.000 0.000 0.000 0.000 0.000
#> SRR957891 5 0.4256 0.3873 0.000 0.000 0.436 0.000 0.564
#> SRR957893 1 0.2074 0.8479 0.896 0.000 0.000 0.104 0.000
#> SRR957892 1 0.2732 0.8132 0.840 0.000 0.000 0.160 0.000
#> SRR957894 2 0.4235 0.8305 0.000 0.576 0.000 0.000 0.424
#> SRR957895 4 0.1357 0.8285 0.004 0.048 0.000 0.948 0.000
#> SRR957896 5 0.1732 0.5913 0.000 0.000 0.080 0.000 0.920
#> SRR957897 4 0.1341 0.8250 0.000 0.056 0.000 0.944 0.000
#> SRR957898 1 0.0955 0.8524 0.968 0.028 0.000 0.004 0.000
#> SRR957899 5 0.2377 0.5887 0.000 0.000 0.128 0.000 0.872
#> SRR957900 5 0.4304 0.3281 0.000 0.000 0.484 0.000 0.516
#> SRR957901 5 0.1544 0.5903 0.000 0.000 0.068 0.000 0.932
#> SRR957902 5 0.1205 0.5591 0.000 0.040 0.004 0.000 0.956
#> SRR957903 3 0.5946 0.7232 0.052 0.388 0.532 0.028 0.000
#> SRR957904 3 0.4193 0.7272 0.012 0.304 0.684 0.000 0.000
#> SRR957905 4 0.0000 0.8487 0.000 0.000 0.000 1.000 0.000
#> SRR957906 5 0.5191 0.2253 0.000 0.192 0.124 0.000 0.684
#> SRR957907 5 0.2127 0.4837 0.000 0.108 0.000 0.000 0.892
#> SRR957908 2 0.4161 0.8477 0.000 0.608 0.000 0.000 0.392
#> SRR957909 1 0.2074 0.8479 0.896 0.000 0.000 0.104 0.000
#> SRR957910 5 0.1205 0.5591 0.000 0.040 0.004 0.000 0.956
#> SRR957911 1 0.1608 0.8558 0.928 0.000 0.000 0.072 0.000
#> SRR957912 1 0.4350 0.3991 0.588 0.004 0.408 0.000 0.000
#> SRR957913 3 0.5871 0.7251 0.052 0.388 0.536 0.024 0.000
#> SRR957917 3 0.1461 0.6548 0.028 0.016 0.952 0.000 0.004
#> SRR957918 5 0.4291 -0.6458 0.000 0.464 0.000 0.000 0.536
#> SRR957920 3 0.0451 0.6488 0.000 0.008 0.988 0.000 0.004
#> SRR957919 2 0.4161 0.8477 0.000 0.608 0.000 0.000 0.392
#> SRR957921 3 0.3039 0.4191 0.000 0.000 0.808 0.000 0.192
#> SRR957922 5 0.4249 0.4017 0.000 0.000 0.432 0.000 0.568
#> SRR957924 1 0.2605 0.8238 0.852 0.000 0.000 0.148 0.000
#> SRR957923 2 0.5876 0.6024 0.000 0.604 0.000 0.204 0.192
#> SRR957925 2 0.4300 0.7474 0.000 0.524 0.000 0.000 0.476
#> SRR957926 1 0.0162 0.8561 0.996 0.004 0.000 0.000 0.000
#> SRR957927 2 0.4161 0.8477 0.000 0.608 0.000 0.000 0.392
#> SRR957928 1 0.2193 0.8140 0.900 0.008 0.092 0.000 0.000
#> SRR957929 1 0.1560 0.8445 0.948 0.004 0.020 0.000 0.028
#> SRR957930 5 0.1205 0.5591 0.000 0.040 0.004 0.000 0.956
#> SRR957931 5 0.4235 0.4091 0.000 0.000 0.424 0.000 0.576
#> SRR957932 3 0.6726 0.6850 0.084 0.388 0.476 0.052 0.000
#> SRR957933 1 0.0162 0.8570 0.996 0.000 0.000 0.004 0.000
#> SRR957934 5 0.0807 0.5736 0.000 0.012 0.012 0.000 0.976
#> SRR957935 5 0.2859 0.5364 0.000 0.068 0.056 0.000 0.876
#> SRR957936 2 0.4161 0.8477 0.000 0.608 0.000 0.000 0.392
#> SRR957937 5 0.1478 0.5344 0.000 0.064 0.000 0.000 0.936
#> SRR957938 2 0.4256 0.8168 0.000 0.564 0.000 0.000 0.436
#> SRR957939 4 0.4192 0.3074 0.000 0.404 0.000 0.596 0.000
#> SRR957941 5 0.3774 0.5463 0.000 0.000 0.296 0.000 0.704
#> SRR957940 1 0.5433 0.5496 0.640 0.088 0.004 0.268 0.000
#> SRR957942 2 0.4227 0.8284 0.000 0.580 0.000 0.000 0.420
#> SRR957943 2 0.4161 0.8477 0.000 0.608 0.000 0.000 0.392
#> SRR957944 2 0.4227 0.8337 0.000 0.580 0.000 0.000 0.420
#> SRR957945 3 0.5871 0.7251 0.052 0.388 0.536 0.024 0.000
#> SRR957946 1 0.0000 0.8562 1.000 0.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.8562 1.000 0.000 0.000 0.000 0.000
#> SRR957948 5 0.2230 0.4722 0.000 0.116 0.000 0.000 0.884
#> SRR957949 5 0.3039 0.5752 0.000 0.000 0.192 0.000 0.808
#> SRR957950 1 0.2230 0.8420 0.884 0.000 0.000 0.116 0.000
#> SRR957951 5 0.4268 0.3767 0.000 0.000 0.444 0.000 0.556
#> SRR957952 3 0.1124 0.6234 0.000 0.004 0.960 0.000 0.036
#> SRR957953 4 0.0000 0.8487 0.000 0.000 0.000 1.000 0.000
#> SRR957954 4 0.5656 0.4926 0.284 0.100 0.004 0.612 0.000
#> SRR957956 4 0.5665 0.5276 0.260 0.112 0.004 0.624 0.000
#> SRR957957 2 0.4430 -0.0427 0.000 0.540 0.000 0.456 0.004
#> SRR957958 4 0.0000 0.8487 0.000 0.000 0.000 1.000 0.000
#> SRR957959 3 0.1121 0.6153 0.000 0.000 0.956 0.000 0.044
#> SRR957960 5 0.3109 0.3003 0.000 0.200 0.000 0.000 0.800
#> SRR957961 3 0.2773 0.4989 0.000 0.000 0.836 0.000 0.164
#> SRR957962 4 0.0000 0.8487 0.000 0.000 0.000 1.000 0.000
#> SRR957963 4 0.1197 0.8272 0.048 0.000 0.000 0.952 0.000
#> SRR957964 1 0.6715 0.1423 0.484 0.380 0.084 0.052 0.000
#> SRR957965 5 0.4307 -0.7156 0.000 0.496 0.000 0.000 0.504
#> SRR957966 1 0.2929 0.7956 0.820 0.000 0.000 0.180 0.000
#> SRR957967 4 0.0000 0.8487 0.000 0.000 0.000 1.000 0.000
#> SRR957968 4 0.1732 0.8046 0.000 0.080 0.000 0.920 0.000
#> SRR957969 4 0.6253 0.4813 0.204 0.228 0.004 0.564 0.000
#> SRR957970 5 0.3143 0.2898 0.000 0.204 0.000 0.000 0.796
#> SRR957971 3 0.5871 0.7251 0.052 0.388 0.536 0.024 0.000
#> SRR957972 3 0.4748 0.7295 0.040 0.300 0.660 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.2106 0.8324 0.904 0.000 0.000 0.064 0.000 0.032
#> SRR957915 5 0.3431 0.6908 0.000 0.228 0.000 0.000 0.756 0.016
#> SRR957916 6 0.2823 0.6846 0.000 0.000 0.000 0.000 0.204 0.796
#> SRR957884 4 0.0551 0.8169 0.000 0.004 0.004 0.984 0.000 0.008
#> SRR957885 3 0.0363 0.8972 0.000 0.000 0.988 0.012 0.000 0.000
#> SRR957886 5 0.3636 0.5735 0.000 0.320 0.000 0.000 0.676 0.004
#> SRR957887 3 0.0260 0.8992 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR957888 1 0.2771 0.8213 0.852 0.000 0.000 0.116 0.000 0.032
#> SRR957889 1 0.3284 0.7222 0.800 0.000 0.168 0.000 0.000 0.032
#> SRR957890 1 0.1480 0.8252 0.940 0.000 0.040 0.000 0.000 0.020
#> SRR957891 5 0.3706 -0.0713 0.000 0.000 0.000 0.000 0.620 0.380
#> SRR957893 1 0.2942 0.8134 0.836 0.000 0.000 0.132 0.000 0.032
#> SRR957892 1 0.3352 0.7851 0.792 0.000 0.000 0.176 0.000 0.032
#> SRR957894 2 0.3505 0.7010 0.016 0.804 0.000 0.000 0.152 0.028
#> SRR957895 4 0.1686 0.7965 0.000 0.012 0.000 0.924 0.000 0.064
#> SRR957896 5 0.0806 0.7034 0.000 0.020 0.000 0.000 0.972 0.008
#> SRR957897 4 0.3247 0.7003 0.000 0.156 0.000 0.808 0.000 0.036
#> SRR957898 1 0.2170 0.8146 0.888 0.000 0.100 0.012 0.000 0.000
#> SRR957899 5 0.1225 0.6688 0.000 0.012 0.000 0.000 0.952 0.036
#> SRR957900 6 0.3126 0.6658 0.000 0.000 0.000 0.000 0.248 0.752
#> SRR957901 5 0.1498 0.6974 0.000 0.032 0.000 0.000 0.940 0.028
#> SRR957902 5 0.2278 0.7456 0.000 0.128 0.000 0.000 0.868 0.004
#> SRR957903 3 0.0146 0.9026 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR957904 3 0.2854 0.6872 0.000 0.000 0.792 0.000 0.000 0.208
#> SRR957905 4 0.0146 0.8191 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR957906 2 0.4996 0.4581 0.000 0.640 0.020 0.000 0.276 0.064
#> SRR957907 5 0.2941 0.7100 0.000 0.220 0.000 0.000 0.780 0.000
#> SRR957908 2 0.0260 0.7941 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR957909 1 0.2771 0.8213 0.852 0.000 0.000 0.116 0.000 0.032
#> SRR957910 5 0.2178 0.7454 0.000 0.132 0.000 0.000 0.868 0.000
#> SRR957911 1 0.1812 0.8326 0.912 0.000 0.008 0.080 0.000 0.000
#> SRR957912 6 0.4284 0.2250 0.384 0.000 0.012 0.000 0.008 0.596
#> SRR957913 3 0.0146 0.9026 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR957917 6 0.3276 0.6064 0.052 0.000 0.132 0.000 0.000 0.816
#> SRR957918 5 0.4469 0.3706 0.016 0.388 0.000 0.000 0.584 0.012
#> SRR957920 6 0.4282 0.6173 0.000 0.004 0.200 0.000 0.072 0.724
#> SRR957919 2 0.0405 0.7934 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR957921 6 0.4828 0.6670 0.000 0.000 0.136 0.000 0.200 0.664
#> SRR957922 6 0.3956 0.5598 0.036 0.000 0.000 0.000 0.252 0.712
#> SRR957924 1 0.3352 0.7882 0.792 0.000 0.000 0.176 0.000 0.032
#> SRR957923 2 0.2764 0.7570 0.016 0.888 0.000 0.040 0.016 0.040
#> SRR957925 2 0.4939 -0.0582 0.020 0.480 0.000 0.000 0.472 0.028
#> SRR957926 1 0.1408 0.8250 0.944 0.000 0.036 0.000 0.000 0.020
#> SRR957927 2 0.0260 0.7941 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR957928 1 0.4513 0.1566 0.528 0.000 0.032 0.000 0.000 0.440
#> SRR957929 1 0.2980 0.6703 0.800 0.000 0.000 0.000 0.008 0.192
#> SRR957930 5 0.2362 0.7459 0.000 0.136 0.000 0.000 0.860 0.004
#> SRR957931 6 0.3838 0.4177 0.000 0.000 0.000 0.000 0.448 0.552
#> SRR957932 3 0.1049 0.8787 0.032 0.000 0.960 0.008 0.000 0.000
#> SRR957933 1 0.1624 0.8284 0.936 0.000 0.044 0.008 0.000 0.012
#> SRR957934 5 0.4052 0.6979 0.024 0.116 0.000 0.000 0.784 0.076
#> SRR957935 6 0.6325 -0.0335 0.036 0.148 0.000 0.000 0.392 0.424
#> SRR957936 2 0.0260 0.7941 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR957937 5 0.2697 0.7296 0.000 0.188 0.000 0.000 0.812 0.000
#> SRR957938 2 0.2876 0.7305 0.016 0.844 0.000 0.000 0.132 0.008
#> SRR957939 4 0.4812 0.3708 0.000 0.344 0.000 0.588 0.000 0.068
#> SRR957941 5 0.4456 0.0539 0.028 0.004 0.000 0.000 0.596 0.372
#> SRR957940 1 0.5458 0.4515 0.572 0.000 0.196 0.232 0.000 0.000
#> SRR957942 2 0.1858 0.7596 0.000 0.904 0.000 0.000 0.092 0.004
#> SRR957943 2 0.0260 0.7941 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR957944 2 0.2262 0.7667 0.016 0.896 0.000 0.000 0.080 0.008
#> SRR957945 3 0.0146 0.9026 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR957946 1 0.1480 0.8252 0.940 0.000 0.040 0.000 0.000 0.020
#> SRR957947 1 0.1480 0.8252 0.940 0.000 0.040 0.000 0.000 0.020
#> SRR957948 5 0.2838 0.7234 0.000 0.188 0.000 0.000 0.808 0.004
#> SRR957949 5 0.3120 0.6168 0.028 0.008 0.000 0.000 0.832 0.132
#> SRR957950 1 0.3176 0.8001 0.812 0.000 0.000 0.156 0.000 0.032
#> SRR957951 5 0.3782 -0.1635 0.000 0.000 0.000 0.000 0.588 0.412
#> SRR957952 6 0.3513 0.6325 0.020 0.000 0.152 0.000 0.024 0.804
#> SRR957953 4 0.0146 0.8191 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR957954 4 0.5663 0.4346 0.248 0.000 0.220 0.532 0.000 0.000
#> SRR957956 4 0.5648 0.4450 0.240 0.000 0.224 0.536 0.000 0.000
#> SRR957957 2 0.3432 0.5161 0.000 0.764 0.000 0.216 0.000 0.020
#> SRR957958 4 0.0146 0.8191 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR957959 6 0.4736 0.6533 0.000 0.000 0.164 0.000 0.156 0.680
#> SRR957960 5 0.3913 0.6873 0.020 0.200 0.000 0.000 0.756 0.024
#> SRR957961 6 0.5838 0.4663 0.000 0.000 0.192 0.000 0.368 0.440
#> SRR957962 4 0.1010 0.8129 0.036 0.000 0.004 0.960 0.000 0.000
#> SRR957963 4 0.1720 0.8008 0.040 0.000 0.000 0.928 0.000 0.032
#> SRR957964 3 0.3023 0.7387 0.140 0.000 0.828 0.032 0.000 0.000
#> SRR957965 2 0.3862 -0.0521 0.000 0.524 0.000 0.000 0.476 0.000
#> SRR957966 1 0.3385 0.7830 0.788 0.000 0.000 0.180 0.000 0.032
#> SRR957967 4 0.0405 0.8192 0.008 0.000 0.004 0.988 0.000 0.000
#> SRR957968 4 0.1141 0.8012 0.000 0.000 0.052 0.948 0.000 0.000
#> SRR957969 4 0.5735 0.3045 0.176 0.000 0.352 0.472 0.000 0.000
#> SRR957970 5 0.3648 0.7054 0.012 0.188 0.000 0.000 0.776 0.024
#> SRR957971 3 0.0146 0.9026 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR957972 3 0.3023 0.6487 0.000 0.000 0.768 0.000 0.000 0.232
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.929 0.937 0.975 0.5025 0.497 0.497
#> 3 3 0.821 0.891 0.936 0.2773 0.773 0.579
#> 4 4 0.773 0.881 0.892 0.1123 0.855 0.633
#> 5 5 0.788 0.816 0.825 0.1003 0.898 0.657
#> 6 6 0.837 0.820 0.905 0.0541 0.912 0.615
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
#> SRR957914 1 0.0000 0.968 1.000 0.000
#> SRR957915 2 0.0000 0.977 0.000 1.000
#> SRR957916 2 0.0000 0.977 0.000 1.000
#> SRR957884 2 0.0376 0.973 0.004 0.996
#> SRR957885 1 0.0000 0.968 1.000 0.000
#> SRR957886 2 0.0000 0.977 0.000 1.000
#> SRR957887 1 0.2603 0.928 0.956 0.044
#> SRR957888 1 0.0000 0.968 1.000 0.000
#> SRR957889 1 0.0000 0.968 1.000 0.000
#> SRR957890 1 0.0000 0.968 1.000 0.000
#> SRR957891 2 0.0000 0.977 0.000 1.000
#> SRR957893 1 0.0000 0.968 1.000 0.000
#> SRR957892 1 0.0000 0.968 1.000 0.000
#> SRR957894 2 0.0000 0.977 0.000 1.000
#> SRR957895 2 0.7139 0.750 0.196 0.804
#> SRR957896 2 0.0000 0.977 0.000 1.000
#> SRR957897 2 0.7139 0.750 0.196 0.804
#> SRR957898 1 0.0000 0.968 1.000 0.000
#> SRR957899 2 0.0000 0.977 0.000 1.000
#> SRR957900 2 0.0000 0.977 0.000 1.000
#> SRR957901 2 0.0000 0.977 0.000 1.000
#> SRR957902 2 0.0000 0.977 0.000 1.000
#> SRR957903 1 0.0000 0.968 1.000 0.000
#> SRR957904 1 0.0000 0.968 1.000 0.000
#> SRR957905 1 0.7219 0.746 0.800 0.200
#> SRR957906 2 0.0000 0.977 0.000 1.000
#> SRR957907 2 0.0000 0.977 0.000 1.000
#> SRR957908 2 0.0000 0.977 0.000 1.000
#> SRR957909 1 0.0000 0.968 1.000 0.000
#> SRR957910 2 0.0000 0.977 0.000 1.000
#> SRR957911 1 0.0000 0.968 1.000 0.000
#> SRR957912 1 0.0000 0.968 1.000 0.000
#> SRR957913 1 0.0000 0.968 1.000 0.000
#> SRR957917 1 0.0000 0.968 1.000 0.000
#> SRR957918 2 0.0000 0.977 0.000 1.000
#> SRR957920 2 0.9710 0.322 0.400 0.600
#> SRR957919 2 0.0000 0.977 0.000 1.000
#> SRR957921 2 0.0000 0.977 0.000 1.000
#> SRR957922 2 0.0000 0.977 0.000 1.000
#> SRR957924 1 0.0000 0.968 1.000 0.000
#> SRR957923 2 0.0000 0.977 0.000 1.000
#> SRR957925 2 0.0000 0.977 0.000 1.000
#> SRR957926 1 0.0000 0.968 1.000 0.000
#> SRR957927 2 0.0000 0.977 0.000 1.000
#> SRR957928 1 0.0000 0.968 1.000 0.000
#> SRR957929 1 0.0000 0.968 1.000 0.000
#> SRR957930 2 0.0000 0.977 0.000 1.000
#> SRR957931 2 0.0000 0.977 0.000 1.000
#> SRR957932 1 0.0000 0.968 1.000 0.000
#> SRR957933 1 0.0000 0.968 1.000 0.000
#> SRR957934 2 0.0000 0.977 0.000 1.000
#> SRR957935 2 0.0000 0.977 0.000 1.000
#> SRR957936 2 0.0000 0.977 0.000 1.000
#> SRR957937 2 0.0000 0.977 0.000 1.000
#> SRR957938 2 0.0000 0.977 0.000 1.000
#> SRR957939 2 0.7376 0.731 0.208 0.792
#> SRR957941 2 0.0000 0.977 0.000 1.000
#> SRR957940 1 0.0000 0.968 1.000 0.000
#> SRR957942 2 0.0000 0.977 0.000 1.000
#> SRR957943 2 0.0000 0.977 0.000 1.000
#> SRR957944 2 0.0000 0.977 0.000 1.000
#> SRR957945 1 0.0000 0.968 1.000 0.000
#> SRR957946 1 0.0000 0.968 1.000 0.000
#> SRR957947 1 0.0000 0.968 1.000 0.000
#> SRR957948 2 0.0000 0.977 0.000 1.000
#> SRR957949 2 0.0000 0.977 0.000 1.000
#> SRR957950 1 0.0000 0.968 1.000 0.000
#> SRR957951 2 0.0000 0.977 0.000 1.000
#> SRR957952 2 0.0000 0.977 0.000 1.000
#> SRR957953 1 0.7056 0.757 0.808 0.192
#> SRR957954 1 0.0000 0.968 1.000 0.000
#> SRR957956 1 0.0000 0.968 1.000 0.000
#> SRR957957 2 0.0000 0.977 0.000 1.000
#> SRR957958 1 0.9944 0.172 0.544 0.456
#> SRR957959 2 0.0000 0.977 0.000 1.000
#> SRR957960 2 0.0000 0.977 0.000 1.000
#> SRR957961 2 0.0000 0.977 0.000 1.000
#> SRR957962 1 0.0000 0.968 1.000 0.000
#> SRR957963 1 0.0000 0.968 1.000 0.000
#> SRR957964 1 0.0000 0.968 1.000 0.000
#> SRR957965 2 0.0000 0.977 0.000 1.000
#> SRR957966 1 0.0000 0.968 1.000 0.000
#> SRR957967 1 0.0000 0.968 1.000 0.000
#> SRR957968 1 0.9286 0.482 0.656 0.344
#> SRR957969 1 0.0000 0.968 1.000 0.000
#> SRR957970 2 0.0000 0.977 0.000 1.000
#> SRR957971 1 0.0000 0.968 1.000 0.000
#> SRR957972 1 0.0000 0.968 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957916 2 0.2356 0.924 0.000 0.928 0.072
#> SRR957884 2 0.6445 0.527 0.308 0.672 0.020
#> SRR957885 3 0.3482 0.895 0.128 0.000 0.872
#> SRR957886 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957887 3 0.3482 0.895 0.128 0.000 0.872
#> SRR957888 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957889 1 0.5098 0.639 0.752 0.000 0.248
#> SRR957890 1 0.2625 0.858 0.916 0.000 0.084
#> SRR957891 2 0.2356 0.924 0.000 0.928 0.072
#> SRR957893 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957895 1 0.0892 0.915 0.980 0.020 0.000
#> SRR957896 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957897 1 0.2846 0.866 0.924 0.020 0.056
#> SRR957898 1 0.2261 0.887 0.932 0.000 0.068
#> SRR957899 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957900 2 0.2356 0.924 0.000 0.928 0.072
#> SRR957901 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957903 3 0.3412 0.897 0.124 0.000 0.876
#> SRR957904 3 0.1964 0.884 0.056 0.000 0.944
#> SRR957905 1 0.1289 0.913 0.968 0.000 0.032
#> SRR957906 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957907 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957908 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957909 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957912 1 0.7778 0.516 0.656 0.240 0.104
#> SRR957913 3 0.3340 0.897 0.120 0.000 0.880
#> SRR957917 3 0.3148 0.872 0.048 0.036 0.916
#> SRR957918 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957920 3 0.1643 0.841 0.000 0.044 0.956
#> SRR957919 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957921 3 0.3551 0.801 0.000 0.132 0.868
#> SRR957922 2 0.2356 0.924 0.000 0.928 0.072
#> SRR957924 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957923 1 0.5988 0.695 0.776 0.168 0.056
#> SRR957925 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957926 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957927 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957928 3 0.4235 0.867 0.176 0.000 0.824
#> SRR957929 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957930 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957931 2 0.2066 0.931 0.000 0.940 0.060
#> SRR957932 3 0.3482 0.895 0.128 0.000 0.872
#> SRR957933 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957934 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957935 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957936 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957937 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957938 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957939 1 0.0892 0.915 0.980 0.020 0.000
#> SRR957941 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957940 1 0.1163 0.915 0.972 0.000 0.028
#> SRR957942 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957943 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957944 2 0.1964 0.944 0.000 0.944 0.056
#> SRR957945 3 0.3412 0.897 0.124 0.000 0.876
#> SRR957946 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957947 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957948 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957951 2 0.2356 0.924 0.000 0.928 0.072
#> SRR957952 3 0.2878 0.831 0.000 0.096 0.904
#> SRR957953 1 0.1163 0.915 0.972 0.000 0.028
#> SRR957954 1 0.0237 0.926 0.996 0.000 0.004
#> SRR957956 3 0.6308 0.200 0.492 0.000 0.508
#> SRR957957 2 0.3797 0.902 0.052 0.892 0.056
#> SRR957958 1 0.5803 0.646 0.760 0.212 0.028
#> SRR957959 3 0.2711 0.835 0.000 0.088 0.912
#> SRR957960 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957961 2 0.2356 0.924 0.000 0.928 0.072
#> SRR957962 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957963 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957964 3 0.3752 0.885 0.144 0.000 0.856
#> SRR957965 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.928 1.000 0.000 0.000
#> SRR957967 1 0.1163 0.915 0.972 0.000 0.028
#> SRR957968 3 0.4178 0.861 0.172 0.000 0.828
#> SRR957969 1 0.5882 0.408 0.652 0.000 0.348
#> SRR957970 2 0.0000 0.961 0.000 1.000 0.000
#> SRR957971 3 0.2959 0.896 0.100 0.000 0.900
#> SRR957972 3 0.1964 0.884 0.056 0.000 0.944
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957915 2 0.1118 0.932 0.000 0.964 0.000 0.036
#> SRR957916 2 0.2281 0.894 0.000 0.904 0.096 0.000
#> SRR957884 4 0.5191 0.852 0.072 0.060 0.068 0.800
#> SRR957885 3 0.2546 0.856 0.008 0.000 0.900 0.092
#> SRR957886 2 0.0188 0.941 0.000 0.996 0.000 0.004
#> SRR957887 3 0.2610 0.858 0.012 0.000 0.900 0.088
#> SRR957888 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957889 3 0.2662 0.859 0.016 0.000 0.900 0.084
#> SRR957890 3 0.5268 0.224 0.452 0.000 0.540 0.008
#> SRR957891 2 0.2281 0.894 0.000 0.904 0.096 0.000
#> SRR957893 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957894 2 0.1398 0.932 0.000 0.956 0.004 0.040
#> SRR957895 4 0.4508 0.816 0.184 0.036 0.000 0.780
#> SRR957896 2 0.0000 0.940 0.000 1.000 0.000 0.000
#> SRR957897 4 0.3444 0.818 0.184 0.000 0.000 0.816
#> SRR957898 1 0.4106 0.763 0.832 0.000 0.084 0.084
#> SRR957899 2 0.0000 0.940 0.000 1.000 0.000 0.000
#> SRR957900 2 0.2281 0.894 0.000 0.904 0.096 0.000
#> SRR957901 2 0.0000 0.940 0.000 1.000 0.000 0.000
#> SRR957902 2 0.0188 0.941 0.000 0.996 0.004 0.000
#> SRR957903 3 0.2466 0.854 0.004 0.000 0.900 0.096
#> SRR957904 3 0.0000 0.847 0.000 0.000 1.000 0.000
#> SRR957905 4 0.2868 0.827 0.000 0.000 0.136 0.864
#> SRR957906 2 0.2530 0.910 0.000 0.896 0.004 0.100
#> SRR957907 2 0.0188 0.941 0.000 0.996 0.004 0.000
#> SRR957908 2 0.2999 0.894 0.000 0.864 0.004 0.132
#> SRR957909 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957910 2 0.0376 0.941 0.000 0.992 0.004 0.004
#> SRR957911 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957912 2 0.3391 0.845 0.004 0.844 0.148 0.004
#> SRR957913 3 0.2542 0.860 0.012 0.000 0.904 0.084
#> SRR957917 3 0.2999 0.780 0.000 0.132 0.864 0.004
#> SRR957918 2 0.0188 0.941 0.000 0.996 0.000 0.004
#> SRR957920 3 0.3533 0.789 0.000 0.056 0.864 0.080
#> SRR957919 2 0.3052 0.893 0.000 0.860 0.004 0.136
#> SRR957921 3 0.2921 0.779 0.000 0.140 0.860 0.000
#> SRR957922 2 0.2530 0.894 0.000 0.896 0.100 0.004
#> SRR957924 4 0.4669 0.811 0.200 0.036 0.000 0.764
#> SRR957923 2 0.3988 0.859 0.020 0.820 0.004 0.156
#> SRR957925 2 0.0376 0.941 0.000 0.992 0.004 0.004
#> SRR957926 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957927 2 0.2530 0.910 0.000 0.896 0.004 0.100
#> SRR957928 3 0.2888 0.791 0.124 0.000 0.872 0.004
#> SRR957929 1 0.0188 0.978 0.996 0.000 0.000 0.004
#> SRR957930 2 0.0188 0.941 0.000 0.996 0.004 0.000
#> SRR957931 2 0.1940 0.907 0.000 0.924 0.076 0.000
#> SRR957932 3 0.2662 0.859 0.016 0.000 0.900 0.084
#> SRR957933 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957934 2 0.0188 0.941 0.000 0.996 0.000 0.004
#> SRR957935 2 0.2466 0.912 0.000 0.900 0.004 0.096
#> SRR957936 2 0.2999 0.894 0.000 0.864 0.004 0.132
#> SRR957937 2 0.0188 0.941 0.000 0.996 0.000 0.004
#> SRR957938 2 0.2868 0.894 0.000 0.864 0.000 0.136
#> SRR957939 4 0.3444 0.818 0.184 0.000 0.000 0.816
#> SRR957941 2 0.0376 0.941 0.000 0.992 0.004 0.004
#> SRR957940 4 0.4203 0.859 0.068 0.000 0.108 0.824
#> SRR957942 2 0.2466 0.911 0.000 0.900 0.004 0.096
#> SRR957943 2 0.3052 0.893 0.000 0.860 0.004 0.136
#> SRR957944 2 0.3052 0.893 0.000 0.860 0.004 0.136
#> SRR957945 3 0.2542 0.860 0.012 0.000 0.904 0.084
#> SRR957946 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957948 2 0.0000 0.940 0.000 1.000 0.000 0.000
#> SRR957949 2 0.0188 0.941 0.000 0.996 0.000 0.004
#> SRR957950 1 0.0000 0.982 1.000 0.000 0.000 0.000
#> SRR957951 2 0.2281 0.894 0.000 0.904 0.096 0.000
#> SRR957952 3 0.3105 0.773 0.000 0.140 0.856 0.004
#> SRR957953 4 0.3052 0.830 0.004 0.000 0.136 0.860
#> SRR957954 4 0.5942 0.457 0.412 0.000 0.040 0.548
#> SRR957956 4 0.4483 0.860 0.088 0.000 0.104 0.808
#> SRR957957 4 0.2586 0.785 0.040 0.048 0.000 0.912
#> SRR957958 4 0.4699 0.859 0.072 0.036 0.068 0.824
#> SRR957959 3 0.2868 0.780 0.000 0.136 0.864 0.000
#> SRR957960 2 0.0376 0.941 0.000 0.992 0.004 0.004
#> SRR957961 2 0.2281 0.894 0.000 0.904 0.096 0.000
#> SRR957962 4 0.4137 0.812 0.208 0.000 0.012 0.780
#> SRR957963 1 0.0592 0.965 0.984 0.000 0.000 0.016
#> SRR957964 3 0.2662 0.859 0.016 0.000 0.900 0.084
#> SRR957965 2 0.1211 0.932 0.000 0.960 0.000 0.040
#> SRR957966 1 0.0188 0.978 0.996 0.000 0.000 0.004
#> SRR957967 4 0.3764 0.852 0.040 0.000 0.116 0.844
#> SRR957968 4 0.2868 0.827 0.000 0.000 0.136 0.864
#> SRR957969 4 0.3196 0.826 0.008 0.000 0.136 0.856
#> SRR957970 2 0.0188 0.941 0.000 0.996 0.000 0.004
#> SRR957971 3 0.2542 0.860 0.012 0.000 0.904 0.084
#> SRR957972 3 0.0188 0.847 0.004 0.000 0.996 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957915 5 0.0000 0.844 0.000 0.000 0.000 0.000 1.000
#> SRR957916 5 0.4015 0.597 0.000 0.000 0.348 0.000 0.652
#> SRR957884 4 0.0404 0.922 0.012 0.000 0.000 0.988 0.000
#> SRR957885 3 0.4836 0.796 0.000 0.304 0.652 0.044 0.000
#> SRR957886 2 0.4126 0.894 0.000 0.620 0.000 0.000 0.380
#> SRR957887 3 0.4836 0.796 0.000 0.304 0.652 0.044 0.000
#> SRR957888 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957889 3 0.3597 0.755 0.008 0.116 0.832 0.044 0.000
#> SRR957890 3 0.4545 0.028 0.432 0.004 0.560 0.004 0.000
#> SRR957891 5 0.2230 0.795 0.000 0.000 0.116 0.000 0.884
#> SRR957893 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957894 2 0.4227 0.840 0.000 0.580 0.000 0.000 0.420
#> SRR957895 4 0.1121 0.915 0.044 0.000 0.000 0.956 0.000
#> SRR957896 5 0.0000 0.844 0.000 0.000 0.000 0.000 1.000
#> SRR957897 4 0.1121 0.915 0.044 0.000 0.000 0.956 0.000
#> SRR957898 1 0.3474 0.787 0.836 0.116 0.004 0.044 0.000
#> SRR957899 5 0.0000 0.844 0.000 0.000 0.000 0.000 1.000
#> SRR957900 5 0.3636 0.668 0.000 0.000 0.272 0.000 0.728
#> SRR957901 5 0.0000 0.844 0.000 0.000 0.000 0.000 1.000
#> SRR957902 5 0.0162 0.844 0.000 0.004 0.000 0.000 0.996
#> SRR957903 3 0.4836 0.796 0.000 0.304 0.652 0.044 0.000
#> SRR957904 3 0.3160 0.778 0.000 0.188 0.808 0.004 0.000
#> SRR957905 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR957906 2 0.3816 0.943 0.000 0.696 0.000 0.000 0.304
#> SRR957907 5 0.0703 0.827 0.000 0.024 0.000 0.000 0.976
#> SRR957908 2 0.3837 0.943 0.000 0.692 0.000 0.000 0.308
#> SRR957909 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957910 5 0.0510 0.836 0.000 0.016 0.000 0.000 0.984
#> SRR957911 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957912 5 0.4730 0.573 0.008 0.008 0.356 0.004 0.624
#> SRR957913 3 0.4836 0.796 0.000 0.304 0.652 0.044 0.000
#> SRR957917 3 0.0162 0.721 0.000 0.004 0.996 0.000 0.000
#> SRR957918 5 0.1043 0.811 0.000 0.040 0.000 0.000 0.960
#> SRR957920 3 0.0162 0.721 0.000 0.004 0.996 0.000 0.000
#> SRR957919 2 0.3816 0.943 0.000 0.696 0.000 0.000 0.304
#> SRR957921 5 0.4367 0.537 0.000 0.008 0.372 0.000 0.620
#> SRR957922 5 0.4283 0.595 0.000 0.008 0.348 0.000 0.644
#> SRR957924 4 0.1628 0.910 0.056 0.000 0.000 0.936 0.008
#> SRR957923 2 0.5759 0.862 0.012 0.604 0.000 0.084 0.300
#> SRR957925 5 0.1502 0.796 0.000 0.056 0.000 0.004 0.940
#> SRR957926 1 0.3003 0.783 0.812 0.000 0.188 0.000 0.000
#> SRR957927 2 0.3816 0.943 0.000 0.696 0.000 0.000 0.304
#> SRR957928 3 0.0566 0.716 0.012 0.000 0.984 0.004 0.000
#> SRR957929 1 0.3797 0.727 0.756 0.008 0.232 0.004 0.000
#> SRR957930 5 0.0162 0.844 0.000 0.004 0.000 0.000 0.996
#> SRR957931 5 0.1908 0.809 0.000 0.000 0.092 0.000 0.908
#> SRR957932 3 0.4836 0.796 0.000 0.304 0.652 0.044 0.000
#> SRR957933 1 0.0162 0.951 0.996 0.000 0.000 0.004 0.000
#> SRR957934 5 0.0162 0.844 0.000 0.004 0.000 0.000 0.996
#> SRR957935 5 0.2989 0.739 0.000 0.080 0.044 0.004 0.872
#> SRR957936 2 0.3837 0.943 0.000 0.692 0.000 0.000 0.308
#> SRR957937 2 0.4242 0.843 0.000 0.572 0.000 0.000 0.428
#> SRR957938 2 0.3837 0.942 0.000 0.692 0.000 0.000 0.308
#> SRR957939 4 0.2732 0.826 0.160 0.000 0.000 0.840 0.000
#> SRR957941 5 0.1408 0.823 0.000 0.008 0.044 0.000 0.948
#> SRR957940 4 0.0290 0.922 0.008 0.000 0.000 0.992 0.000
#> SRR957942 2 0.3837 0.943 0.000 0.692 0.000 0.000 0.308
#> SRR957943 2 0.3816 0.943 0.000 0.696 0.000 0.000 0.304
#> SRR957944 2 0.3816 0.943 0.000 0.696 0.000 0.000 0.304
#> SRR957945 3 0.4836 0.796 0.000 0.304 0.652 0.044 0.000
#> SRR957946 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957948 5 0.0000 0.844 0.000 0.000 0.000 0.000 1.000
#> SRR957949 5 0.0162 0.844 0.000 0.004 0.000 0.000 0.996
#> SRR957950 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957951 5 0.2230 0.795 0.000 0.000 0.116 0.000 0.884
#> SRR957952 3 0.4562 -0.369 0.000 0.008 0.500 0.000 0.492
#> SRR957953 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR957954 4 0.4171 0.402 0.396 0.000 0.000 0.604 0.000
#> SRR957956 4 0.1960 0.898 0.020 0.048 0.004 0.928 0.000
#> SRR957957 4 0.2891 0.793 0.000 0.176 0.000 0.824 0.000
#> SRR957958 4 0.0404 0.922 0.012 0.000 0.000 0.988 0.000
#> SRR957959 3 0.1831 0.673 0.000 0.004 0.920 0.000 0.076
#> SRR957960 5 0.0290 0.843 0.000 0.008 0.000 0.000 0.992
#> SRR957961 5 0.2561 0.780 0.000 0.000 0.144 0.000 0.856
#> SRR957962 4 0.1197 0.914 0.048 0.000 0.000 0.952 0.000
#> SRR957963 1 0.0290 0.948 0.992 0.000 0.000 0.008 0.000
#> SRR957964 3 0.5104 0.793 0.008 0.304 0.644 0.044 0.000
#> SRR957965 2 0.4242 0.843 0.000 0.572 0.000 0.000 0.428
#> SRR957966 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000
#> SRR957967 4 0.0162 0.921 0.004 0.000 0.000 0.996 0.000
#> SRR957968 4 0.0162 0.918 0.000 0.000 0.004 0.996 0.000
#> SRR957969 4 0.2513 0.831 0.000 0.116 0.008 0.876 0.000
#> SRR957970 5 0.0324 0.843 0.000 0.004 0.000 0.004 0.992
#> SRR957971 3 0.4836 0.796 0.000 0.304 0.652 0.044 0.000
#> SRR957972 3 0.3003 0.777 0.000 0.188 0.812 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957915 5 0.0363 0.881 0.000 0.012 0.000 0.000 0.988 0.000
#> SRR957916 6 0.0790 0.896 0.000 0.000 0.000 0.000 0.032 0.968
#> SRR957884 4 0.0146 0.903 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR957885 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957886 2 0.3482 0.684 0.000 0.684 0.000 0.000 0.316 0.000
#> SRR957887 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957888 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957889 6 0.2854 0.731 0.000 0.000 0.208 0.000 0.000 0.792
#> SRR957890 6 0.2915 0.782 0.184 0.000 0.008 0.000 0.000 0.808
#> SRR957891 5 0.0937 0.869 0.000 0.000 0.000 0.000 0.960 0.040
#> SRR957893 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957894 2 0.2191 0.737 0.000 0.876 0.000 0.000 0.120 0.004
#> SRR957895 4 0.0146 0.903 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR957896 5 0.0713 0.880 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR957897 4 0.0146 0.903 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR957898 1 0.2823 0.724 0.796 0.000 0.204 0.000 0.000 0.000
#> SRR957899 5 0.0713 0.880 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR957900 5 0.2883 0.687 0.000 0.000 0.000 0.000 0.788 0.212
#> SRR957901 5 0.0713 0.880 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR957902 5 0.1075 0.863 0.000 0.048 0.000 0.000 0.952 0.000
#> SRR957903 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957904 3 0.2664 0.789 0.000 0.000 0.816 0.000 0.000 0.184
#> SRR957905 4 0.0146 0.902 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR957906 2 0.3189 0.749 0.000 0.760 0.000 0.004 0.236 0.000
#> SRR957907 2 0.3828 0.487 0.000 0.560 0.000 0.000 0.440 0.000
#> SRR957908 2 0.0405 0.735 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR957909 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957910 5 0.0458 0.880 0.000 0.016 0.000 0.000 0.984 0.000
#> SRR957911 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957912 6 0.0717 0.905 0.000 0.008 0.000 0.000 0.016 0.976
#> SRR957913 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957917 6 0.0146 0.911 0.000 0.000 0.004 0.000 0.000 0.996
#> SRR957918 5 0.3993 -0.284 0.000 0.476 0.000 0.000 0.520 0.004
#> SRR957920 6 0.0146 0.911 0.000 0.000 0.004 0.000 0.000 0.996
#> SRR957919 2 0.3136 0.752 0.000 0.768 0.000 0.004 0.228 0.000
#> SRR957921 5 0.3725 0.515 0.000 0.000 0.008 0.000 0.676 0.316
#> SRR957922 6 0.1970 0.857 0.000 0.008 0.000 0.000 0.092 0.900
#> SRR957924 4 0.0458 0.898 0.016 0.000 0.000 0.984 0.000 0.000
#> SRR957923 2 0.2653 0.664 0.004 0.868 0.000 0.100 0.028 0.000
#> SRR957925 2 0.3795 0.610 0.000 0.632 0.000 0.000 0.364 0.004
#> SRR957926 6 0.3023 0.726 0.232 0.000 0.000 0.000 0.000 0.768
#> SRR957927 2 0.3648 0.744 0.000 0.740 0.000 0.016 0.240 0.004
#> SRR957928 6 0.0146 0.911 0.000 0.000 0.004 0.000 0.000 0.996
#> SRR957929 6 0.1679 0.893 0.028 0.008 0.000 0.000 0.028 0.936
#> SRR957930 5 0.0000 0.879 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957931 5 0.0405 0.878 0.000 0.008 0.000 0.000 0.988 0.004
#> SRR957932 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957933 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957934 5 0.1806 0.851 0.000 0.088 0.000 0.000 0.908 0.004
#> SRR957935 2 0.5807 0.536 0.000 0.484 0.000 0.000 0.308 0.208
#> SRR957936 2 0.0405 0.735 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR957937 5 0.1327 0.839 0.000 0.064 0.000 0.000 0.936 0.000
#> SRR957938 2 0.2402 0.766 0.000 0.856 0.000 0.000 0.140 0.004
#> SRR957939 4 0.4488 0.703 0.164 0.128 0.000 0.708 0.000 0.000
#> SRR957941 5 0.3163 0.760 0.000 0.040 0.000 0.000 0.820 0.140
#> SRR957940 4 0.0146 0.903 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR957942 2 0.3215 0.748 0.000 0.756 0.000 0.004 0.240 0.000
#> SRR957943 2 0.0405 0.735 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR957944 2 0.1010 0.729 0.000 0.960 0.000 0.000 0.036 0.004
#> SRR957945 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957946 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957948 5 0.0713 0.880 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR957949 5 0.0508 0.878 0.000 0.012 0.000 0.000 0.984 0.004
#> SRR957950 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957951 5 0.1075 0.869 0.000 0.000 0.000 0.000 0.952 0.048
#> SRR957952 6 0.0000 0.910 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957953 4 0.0146 0.902 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR957954 4 0.3765 0.369 0.404 0.000 0.000 0.596 0.000 0.000
#> SRR957956 4 0.2100 0.830 0.004 0.000 0.112 0.884 0.000 0.000
#> SRR957957 4 0.3765 0.450 0.000 0.404 0.000 0.596 0.000 0.000
#> SRR957958 4 0.0146 0.903 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR957959 6 0.0146 0.910 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR957960 5 0.1806 0.851 0.000 0.088 0.000 0.000 0.908 0.004
#> SRR957961 5 0.1327 0.860 0.000 0.000 0.000 0.000 0.936 0.064
#> SRR957962 4 0.0260 0.902 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR957963 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957964 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957965 2 0.3804 0.256 0.000 0.576 0.000 0.000 0.424 0.000
#> SRR957966 1 0.0000 0.981 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957967 4 0.0146 0.902 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR957968 4 0.0363 0.899 0.000 0.000 0.012 0.988 0.000 0.000
#> SRR957969 4 0.2823 0.736 0.000 0.000 0.204 0.796 0.000 0.000
#> SRR957970 5 0.1700 0.851 0.000 0.080 0.000 0.000 0.916 0.004
#> SRR957971 3 0.0000 0.953 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957972 3 0.2823 0.764 0.000 0.000 0.796 0.000 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["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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.782 0.905 0.960 0.5012 0.495 0.495
#> 3 3 0.883 0.876 0.937 0.2508 0.835 0.681
#> 4 4 0.687 0.693 0.799 0.1130 0.930 0.820
#> 5 5 0.649 0.581 0.794 0.0781 0.849 0.583
#> 6 6 0.642 0.663 0.770 0.0564 0.897 0.626
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
#> SRR957914 1 0.0000 0.951 1.000 0.000
#> SRR957915 2 0.0000 0.959 0.000 1.000
#> SRR957916 2 0.5842 0.851 0.140 0.860
#> SRR957884 1 0.0376 0.948 0.996 0.004
#> SRR957885 1 0.0000 0.951 1.000 0.000
#> SRR957886 2 0.0000 0.959 0.000 1.000
#> SRR957887 1 0.0000 0.951 1.000 0.000
#> SRR957888 1 0.0000 0.951 1.000 0.000
#> SRR957889 1 0.0000 0.951 1.000 0.000
#> SRR957890 1 0.0000 0.951 1.000 0.000
#> SRR957891 2 0.0000 0.959 0.000 1.000
#> SRR957893 1 0.0000 0.951 1.000 0.000
#> SRR957892 1 0.0000 0.951 1.000 0.000
#> SRR957894 2 0.0000 0.959 0.000 1.000
#> SRR957895 1 0.0376 0.948 0.996 0.004
#> SRR957896 2 0.0000 0.959 0.000 1.000
#> SRR957897 1 0.0000 0.951 1.000 0.000
#> SRR957898 1 0.0000 0.951 1.000 0.000
#> SRR957899 2 0.0000 0.959 0.000 1.000
#> SRR957900 2 0.2778 0.928 0.048 0.952
#> SRR957901 2 0.0000 0.959 0.000 1.000
#> SRR957902 2 0.0000 0.959 0.000 1.000
#> SRR957903 1 0.0000 0.951 1.000 0.000
#> SRR957904 1 0.4815 0.849 0.896 0.104
#> SRR957905 1 0.0000 0.951 1.000 0.000
#> SRR957906 2 0.0000 0.959 0.000 1.000
#> SRR957907 2 0.0000 0.959 0.000 1.000
#> SRR957908 2 0.0000 0.959 0.000 1.000
#> SRR957909 1 0.0000 0.951 1.000 0.000
#> SRR957910 2 0.0000 0.959 0.000 1.000
#> SRR957911 1 0.0000 0.951 1.000 0.000
#> SRR957912 1 0.9775 0.282 0.588 0.412
#> SRR957913 1 0.0000 0.951 1.000 0.000
#> SRR957917 2 0.9170 0.527 0.332 0.668
#> SRR957918 2 0.0000 0.959 0.000 1.000
#> SRR957920 2 0.6148 0.838 0.152 0.848
#> SRR957919 2 0.0000 0.959 0.000 1.000
#> SRR957921 2 0.5842 0.851 0.140 0.860
#> SRR957922 2 0.5519 0.863 0.128 0.872
#> SRR957924 1 0.0000 0.951 1.000 0.000
#> SRR957923 2 0.6148 0.838 0.152 0.848
#> SRR957925 2 0.0000 0.959 0.000 1.000
#> SRR957926 1 0.0000 0.951 1.000 0.000
#> SRR957927 2 0.0000 0.959 0.000 1.000
#> SRR957928 1 0.9552 0.380 0.624 0.376
#> SRR957929 1 0.9909 0.179 0.556 0.444
#> SRR957930 2 0.0000 0.959 0.000 1.000
#> SRR957931 2 0.0000 0.959 0.000 1.000
#> SRR957932 1 0.0000 0.951 1.000 0.000
#> SRR957933 1 0.0000 0.951 1.000 0.000
#> SRR957934 2 0.0000 0.959 0.000 1.000
#> SRR957935 2 0.0000 0.959 0.000 1.000
#> SRR957936 2 0.0000 0.959 0.000 1.000
#> SRR957937 2 0.0000 0.959 0.000 1.000
#> SRR957938 2 0.0000 0.959 0.000 1.000
#> SRR957939 1 0.0672 0.944 0.992 0.008
#> SRR957941 2 0.0000 0.959 0.000 1.000
#> SRR957940 1 0.0000 0.951 1.000 0.000
#> SRR957942 2 0.0000 0.959 0.000 1.000
#> SRR957943 2 0.0000 0.959 0.000 1.000
#> SRR957944 2 0.0000 0.959 0.000 1.000
#> SRR957945 1 0.0000 0.951 1.000 0.000
#> SRR957946 1 0.0000 0.951 1.000 0.000
#> SRR957947 1 0.0000 0.951 1.000 0.000
#> SRR957948 2 0.0000 0.959 0.000 1.000
#> SRR957949 2 0.0000 0.959 0.000 1.000
#> SRR957950 1 0.0000 0.951 1.000 0.000
#> SRR957951 2 0.1184 0.950 0.016 0.984
#> SRR957952 2 0.6531 0.818 0.168 0.832
#> SRR957953 1 0.0000 0.951 1.000 0.000
#> SRR957954 1 0.0000 0.951 1.000 0.000
#> SRR957956 1 0.0000 0.951 1.000 0.000
#> SRR957957 1 0.8207 0.629 0.744 0.256
#> SRR957958 1 0.0000 0.951 1.000 0.000
#> SRR957959 2 0.6148 0.838 0.152 0.848
#> SRR957960 2 0.0000 0.959 0.000 1.000
#> SRR957961 2 0.5842 0.851 0.140 0.860
#> SRR957962 1 0.0000 0.951 1.000 0.000
#> SRR957963 1 0.0000 0.951 1.000 0.000
#> SRR957964 1 0.0000 0.951 1.000 0.000
#> SRR957965 2 0.0000 0.959 0.000 1.000
#> SRR957966 1 0.0000 0.951 1.000 0.000
#> SRR957967 1 0.0000 0.951 1.000 0.000
#> SRR957968 1 0.0000 0.951 1.000 0.000
#> SRR957969 1 0.0000 0.951 1.000 0.000
#> SRR957970 2 0.0000 0.959 0.000 1.000
#> SRR957971 1 0.0000 0.951 1.000 0.000
#> SRR957972 1 0.9552 0.380 0.624 0.376
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957916 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957884 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957885 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957886 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957887 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957888 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957889 1 0.4555 0.7601 0.800 0.000 0.200
#> SRR957890 1 0.3551 0.8095 0.868 0.000 0.132
#> SRR957891 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957893 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957895 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957896 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957897 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957898 1 0.0424 0.8686 0.992 0.000 0.008
#> SRR957899 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957900 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957901 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957903 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957904 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957905 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957906 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957907 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957908 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957912 1 0.4733 0.7611 0.800 0.004 0.196
#> SRR957913 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957917 2 0.2066 0.9185 0.000 0.940 0.060
#> SRR957918 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957920 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957919 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957921 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957922 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957924 1 0.6299 -0.2383 0.524 0.000 0.476
#> SRR957923 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957925 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957926 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957927 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957928 1 0.4555 0.7601 0.800 0.000 0.200
#> SRR957929 1 0.4452 0.6815 0.808 0.192 0.000
#> SRR957930 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957931 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957932 3 0.0424 0.8480 0.008 0.000 0.992
#> SRR957933 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957934 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957935 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957936 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957939 2 0.8951 0.0374 0.396 0.476 0.128
#> SRR957941 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957940 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957942 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957946 1 0.3879 0.7968 0.848 0.000 0.152
#> SRR957947 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957948 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957951 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957952 2 0.0424 0.9684 0.000 0.992 0.008
#> SRR957953 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957954 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957956 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957957 2 0.9198 0.1690 0.200 0.532 0.268
#> SRR957958 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957959 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957960 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957961 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957962 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957963 1 0.5621 0.3868 0.692 0.000 0.308
#> SRR957964 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957965 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.8742 1.000 0.000 0.000
#> SRR957967 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957968 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957969 3 0.4555 0.8788 0.200 0.000 0.800
#> SRR957970 2 0.0000 0.9753 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.8463 0.000 0.000 1.000
#> SRR957972 3 0.1753 0.8034 0.000 0.048 0.952
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.2345 0.852 0.900 0.000 0.000 0.100
#> SRR957915 2 0.0188 0.832 0.000 0.996 0.004 0.000
#> SRR957916 2 0.4925 0.695 0.000 0.572 0.428 0.000
#> SRR957884 4 0.1637 0.702 0.060 0.000 0.000 0.940
#> SRR957885 4 0.5512 -0.786 0.016 0.000 0.488 0.496
#> SRR957886 2 0.0188 0.832 0.000 0.996 0.004 0.000
#> SRR957887 3 0.5510 0.771 0.016 0.000 0.504 0.480
#> SRR957888 1 0.2345 0.852 0.900 0.000 0.000 0.100
#> SRR957889 1 0.0469 0.813 0.988 0.000 0.012 0.000
#> SRR957890 1 0.0336 0.825 0.992 0.000 0.000 0.008
#> SRR957891 2 0.0921 0.829 0.000 0.972 0.028 0.000
#> SRR957893 1 0.3266 0.810 0.832 0.000 0.000 0.168
#> SRR957892 1 0.2530 0.849 0.888 0.000 0.000 0.112
#> SRR957894 2 0.1211 0.831 0.000 0.960 0.040 0.000
#> SRR957895 4 0.4123 0.623 0.136 0.044 0.000 0.820
#> SRR957896 2 0.2921 0.810 0.000 0.860 0.140 0.000
#> SRR957897 4 0.2943 0.684 0.076 0.032 0.000 0.892
#> SRR957898 1 0.3311 0.804 0.828 0.000 0.000 0.172
#> SRR957899 2 0.0469 0.832 0.000 0.988 0.012 0.000
#> SRR957900 2 0.4925 0.695 0.000 0.572 0.428 0.000
#> SRR957901 2 0.0000 0.832 0.000 1.000 0.000 0.000
#> SRR957902 2 0.0000 0.832 0.000 1.000 0.000 0.000
#> SRR957903 3 0.5508 0.776 0.016 0.000 0.508 0.476
#> SRR957904 3 0.6583 0.690 0.016 0.044 0.488 0.452
#> SRR957905 4 0.0469 0.669 0.012 0.000 0.000 0.988
#> SRR957906 2 0.1716 0.806 0.000 0.936 0.064 0.000
#> SRR957907 2 0.0000 0.832 0.000 1.000 0.000 0.000
#> SRR957908 2 0.1716 0.806 0.000 0.936 0.064 0.000
#> SRR957909 1 0.2530 0.849 0.888 0.000 0.000 0.112
#> SRR957910 2 0.0188 0.832 0.000 0.996 0.004 0.000
#> SRR957911 1 0.3219 0.812 0.836 0.000 0.000 0.164
#> SRR957912 1 0.6693 0.299 0.488 0.088 0.424 0.000
#> SRR957913 3 0.5508 0.776 0.016 0.000 0.508 0.476
#> SRR957917 2 0.5842 0.640 0.032 0.520 0.448 0.000
#> SRR957918 2 0.0336 0.832 0.000 0.992 0.008 0.000
#> SRR957920 2 0.4713 0.738 0.000 0.640 0.360 0.000
#> SRR957919 2 0.1716 0.806 0.000 0.936 0.064 0.000
#> SRR957921 2 0.1022 0.828 0.000 0.968 0.032 0.000
#> SRR957922 2 0.4916 0.697 0.000 0.576 0.424 0.000
#> SRR957924 1 0.5378 0.117 0.540 0.000 0.012 0.448
#> SRR957923 2 0.4730 0.732 0.000 0.636 0.364 0.000
#> SRR957925 2 0.4776 0.725 0.000 0.624 0.376 0.000
#> SRR957926 1 0.2345 0.852 0.900 0.000 0.000 0.100
#> SRR957927 2 0.1716 0.806 0.000 0.936 0.064 0.000
#> SRR957928 1 0.2596 0.764 0.908 0.068 0.024 0.000
#> SRR957929 1 0.6342 0.553 0.668 0.092 0.228 0.012
#> SRR957930 2 0.4605 0.745 0.000 0.664 0.336 0.000
#> SRR957931 2 0.3801 0.790 0.000 0.780 0.220 0.000
#> SRR957932 4 0.7065 -0.545 0.124 0.000 0.404 0.472
#> SRR957933 1 0.2345 0.852 0.900 0.000 0.000 0.100
#> SRR957934 2 0.4661 0.740 0.000 0.652 0.348 0.000
#> SRR957935 2 0.4817 0.717 0.000 0.612 0.388 0.000
#> SRR957936 2 0.0469 0.829 0.000 0.988 0.012 0.000
#> SRR957937 2 0.0188 0.832 0.000 0.996 0.004 0.000
#> SRR957938 2 0.0336 0.832 0.000 0.992 0.008 0.000
#> SRR957939 4 0.7637 0.306 0.156 0.036 0.224 0.584
#> SRR957941 2 0.4746 0.734 0.000 0.632 0.368 0.000
#> SRR957940 4 0.2773 0.683 0.116 0.000 0.004 0.880
#> SRR957942 2 0.1716 0.806 0.000 0.936 0.064 0.000
#> SRR957943 2 0.1716 0.806 0.000 0.936 0.064 0.000
#> SRR957944 2 0.4697 0.736 0.000 0.644 0.356 0.000
#> SRR957945 3 0.5508 0.776 0.016 0.000 0.508 0.476
#> SRR957946 1 0.0000 0.820 1.000 0.000 0.000 0.000
#> SRR957947 1 0.0592 0.828 0.984 0.000 0.000 0.016
#> SRR957948 2 0.0336 0.832 0.000 0.992 0.008 0.000
#> SRR957949 2 0.4830 0.717 0.000 0.608 0.392 0.000
#> SRR957950 1 0.2469 0.851 0.892 0.000 0.000 0.108
#> SRR957951 2 0.0921 0.829 0.000 0.972 0.028 0.000
#> SRR957952 2 0.4933 0.688 0.000 0.568 0.432 0.000
#> SRR957953 4 0.0707 0.675 0.020 0.000 0.000 0.980
#> SRR957954 4 0.2149 0.704 0.088 0.000 0.000 0.912
#> SRR957956 4 0.2011 0.706 0.080 0.000 0.000 0.920
#> SRR957957 4 0.4507 0.481 0.044 0.168 0.000 0.788
#> SRR957958 4 0.0592 0.673 0.016 0.000 0.000 0.984
#> SRR957959 2 0.4730 0.736 0.000 0.636 0.364 0.000
#> SRR957960 2 0.4776 0.725 0.000 0.624 0.376 0.000
#> SRR957961 2 0.2281 0.799 0.000 0.904 0.096 0.000
#> SRR957962 4 0.2081 0.705 0.084 0.000 0.000 0.916
#> SRR957963 4 0.4522 0.442 0.320 0.000 0.000 0.680
#> SRR957964 4 0.7172 -0.488 0.140 0.000 0.376 0.484
#> SRR957965 2 0.0000 0.832 0.000 1.000 0.000 0.000
#> SRR957966 1 0.2589 0.847 0.884 0.000 0.000 0.116
#> SRR957967 4 0.2081 0.705 0.084 0.000 0.000 0.916
#> SRR957968 4 0.0707 0.675 0.020 0.000 0.000 0.980
#> SRR957969 4 0.3810 0.649 0.092 0.000 0.060 0.848
#> SRR957970 2 0.0000 0.832 0.000 1.000 0.000 0.000
#> SRR957971 3 0.5938 0.740 0.036 0.000 0.488 0.476
#> SRR957972 3 0.5677 0.267 0.120 0.044 0.764 0.072
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.0162 0.8214 0.996 0.000 0.000 0.004 0.000
#> SRR957915 2 0.0000 0.7815 0.000 1.000 0.000 0.000 0.000
#> SRR957916 5 0.2732 0.7332 0.000 0.160 0.000 0.000 0.840
#> SRR957884 4 0.6723 0.0961 0.280 0.000 0.300 0.420 0.000
#> SRR957885 3 0.0963 0.5632 0.000 0.000 0.964 0.036 0.000
#> SRR957886 2 0.0000 0.7815 0.000 1.000 0.000 0.000 0.000
#> SRR957887 3 0.0510 0.5610 0.000 0.000 0.984 0.016 0.000
#> SRR957888 1 0.0000 0.8210 1.000 0.000 0.000 0.000 0.000
#> SRR957889 1 0.2474 0.7686 0.896 0.000 0.008 0.084 0.012
#> SRR957890 1 0.2077 0.7781 0.908 0.000 0.000 0.084 0.008
#> SRR957891 2 0.4192 0.2674 0.000 0.596 0.000 0.000 0.404
#> SRR957893 1 0.1043 0.7969 0.960 0.000 0.000 0.040 0.000
#> SRR957892 1 0.0609 0.8097 0.980 0.000 0.000 0.020 0.000
#> SRR957894 2 0.0703 0.7763 0.000 0.976 0.000 0.000 0.024
#> SRR957895 4 0.4895 0.7505 0.336 0.020 0.012 0.632 0.000
#> SRR957896 2 0.1908 0.7433 0.000 0.908 0.000 0.000 0.092
#> SRR957897 4 0.4673 0.7501 0.288 0.020 0.012 0.680 0.000
#> SRR957898 1 0.2885 0.7017 0.880 0.000 0.052 0.064 0.004
#> SRR957899 2 0.3508 0.5162 0.000 0.748 0.000 0.000 0.252
#> SRR957900 5 0.2852 0.7274 0.000 0.172 0.000 0.000 0.828
#> SRR957901 2 0.1410 0.7726 0.000 0.940 0.000 0.000 0.060
#> SRR957902 2 0.0880 0.7749 0.000 0.968 0.000 0.000 0.032
#> SRR957903 3 0.0000 0.5568 0.000 0.000 1.000 0.000 0.000
#> SRR957904 3 0.1478 0.5182 0.000 0.000 0.936 0.000 0.064
#> SRR957905 3 0.5718 0.4400 0.084 0.000 0.496 0.420 0.000
#> SRR957906 2 0.3707 0.6587 0.000 0.768 0.008 0.004 0.220
#> SRR957907 2 0.0000 0.7815 0.000 1.000 0.000 0.000 0.000
#> SRR957908 2 0.3154 0.7135 0.000 0.864 0.008 0.040 0.088
#> SRR957909 1 0.0000 0.8210 1.000 0.000 0.000 0.000 0.000
#> SRR957910 2 0.0404 0.7802 0.000 0.988 0.000 0.000 0.012
#> SRR957911 1 0.1043 0.7969 0.960 0.000 0.000 0.040 0.000
#> SRR957912 5 0.4775 0.3321 0.256 0.040 0.000 0.008 0.696
#> SRR957913 3 0.0000 0.5568 0.000 0.000 1.000 0.000 0.000
#> SRR957917 5 0.2136 0.7332 0.000 0.088 0.008 0.000 0.904
#> SRR957918 2 0.0609 0.7780 0.000 0.980 0.000 0.000 0.020
#> SRR957920 5 0.2358 0.7133 0.000 0.104 0.008 0.000 0.888
#> SRR957919 2 0.1121 0.7714 0.000 0.956 0.000 0.000 0.044
#> SRR957921 2 0.4367 0.1776 0.000 0.580 0.004 0.000 0.416
#> SRR957922 5 0.2732 0.7332 0.000 0.160 0.000 0.000 0.840
#> SRR957924 1 0.7191 -0.1624 0.528 0.004 0.260 0.056 0.152
#> SRR957923 2 0.3913 0.3245 0.000 0.676 0.000 0.000 0.324
#> SRR957925 2 0.4249 -0.0271 0.000 0.568 0.000 0.000 0.432
#> SRR957926 1 0.0579 0.8199 0.984 0.000 0.000 0.008 0.008
#> SRR957927 2 0.2011 0.7432 0.000 0.908 0.000 0.004 0.088
#> SRR957928 1 0.5080 0.6433 0.764 0.040 0.008 0.092 0.096
#> SRR957929 1 0.7119 0.1868 0.508 0.092 0.000 0.092 0.308
#> SRR957930 2 0.2690 0.6774 0.000 0.844 0.000 0.000 0.156
#> SRR957931 2 0.4256 0.1153 0.000 0.564 0.000 0.000 0.436
#> SRR957932 3 0.4860 0.4967 0.228 0.000 0.704 0.064 0.004
#> SRR957933 1 0.0162 0.8212 0.996 0.000 0.000 0.000 0.004
#> SRR957934 2 0.3752 0.4333 0.000 0.708 0.000 0.000 0.292
#> SRR957935 5 0.4210 0.3843 0.000 0.412 0.000 0.000 0.588
#> SRR957936 2 0.1638 0.7591 0.000 0.932 0.000 0.004 0.064
#> SRR957937 2 0.0000 0.7815 0.000 1.000 0.000 0.000 0.000
#> SRR957938 2 0.0290 0.7808 0.000 0.992 0.000 0.000 0.008
#> SRR957939 4 0.4934 0.7287 0.352 0.024 0.008 0.616 0.000
#> SRR957941 5 0.4161 0.4166 0.000 0.392 0.000 0.000 0.608
#> SRR957940 3 0.6405 0.2832 0.384 0.000 0.444 0.172 0.000
#> SRR957942 2 0.1608 0.7570 0.000 0.928 0.000 0.000 0.072
#> SRR957943 2 0.2011 0.7430 0.000 0.908 0.000 0.004 0.088
#> SRR957944 2 0.3074 0.5949 0.000 0.804 0.000 0.000 0.196
#> SRR957945 3 0.0000 0.5568 0.000 0.000 1.000 0.000 0.000
#> SRR957946 1 0.2077 0.7781 0.908 0.000 0.000 0.084 0.008
#> SRR957947 1 0.1952 0.7798 0.912 0.000 0.000 0.084 0.004
#> SRR957948 2 0.0000 0.7815 0.000 1.000 0.000 0.000 0.000
#> SRR957949 5 0.4235 0.3638 0.000 0.424 0.000 0.000 0.576
#> SRR957950 1 0.0000 0.8210 1.000 0.000 0.000 0.000 0.000
#> SRR957951 2 0.4219 0.1869 0.000 0.584 0.000 0.000 0.416
#> SRR957952 5 0.2304 0.7351 0.000 0.100 0.008 0.000 0.892
#> SRR957953 3 0.5867 0.4503 0.100 0.000 0.496 0.404 0.000
#> SRR957954 3 0.6202 0.3714 0.356 0.000 0.496 0.148 0.000
#> SRR957956 3 0.6300 0.3798 0.336 0.000 0.496 0.168 0.000
#> SRR957957 4 0.6008 0.6442 0.196 0.112 0.008 0.660 0.024
#> SRR957958 3 0.5795 0.4463 0.092 0.000 0.496 0.412 0.000
#> SRR957959 5 0.2612 0.7364 0.000 0.124 0.008 0.000 0.868
#> SRR957960 2 0.4262 -0.0553 0.000 0.560 0.000 0.000 0.440
#> SRR957961 5 0.4889 -0.1856 0.000 0.476 0.016 0.004 0.504
#> SRR957962 3 0.6253 0.3673 0.352 0.000 0.492 0.156 0.000
#> SRR957963 1 0.3821 0.5473 0.800 0.000 0.052 0.148 0.000
#> SRR957964 3 0.4967 0.4891 0.244 0.000 0.688 0.064 0.004
#> SRR957965 2 0.1357 0.7660 0.000 0.948 0.000 0.004 0.048
#> SRR957966 1 0.0609 0.8097 0.980 0.000 0.000 0.020 0.000
#> SRR957967 3 0.6264 0.3724 0.344 0.000 0.496 0.160 0.000
#> SRR957968 3 0.5831 0.4487 0.096 0.000 0.496 0.408 0.000
#> SRR957969 3 0.6084 0.3708 0.376 0.000 0.508 0.112 0.004
#> SRR957970 2 0.0510 0.7788 0.000 0.984 0.000 0.000 0.016
#> SRR957971 3 0.0000 0.5568 0.000 0.000 1.000 0.000 0.000
#> SRR957972 5 0.5252 0.5704 0.032 0.060 0.200 0.000 0.708
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.0858 0.7655 0.968 0.004 0.000 0.028 0.000 0.000
#> SRR957915 5 0.0713 0.7962 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR957916 6 0.2826 0.7849 0.000 0.024 0.008 0.000 0.112 0.856
#> SRR957884 4 0.2364 0.5264 0.032 0.072 0.000 0.892 0.004 0.000
#> SRR957885 3 0.2092 0.7492 0.000 0.000 0.876 0.124 0.000 0.000
#> SRR957886 5 0.0790 0.7956 0.000 0.032 0.000 0.000 0.968 0.000
#> SRR957887 3 0.1141 0.8078 0.000 0.000 0.948 0.052 0.000 0.000
#> SRR957888 1 0.0713 0.7648 0.972 0.000 0.000 0.028 0.000 0.000
#> SRR957889 1 0.4382 0.7035 0.696 0.228 0.000 0.000 0.000 0.076
#> SRR957890 1 0.4281 0.7092 0.708 0.220 0.000 0.000 0.000 0.072
#> SRR957891 6 0.4308 0.7247 0.000 0.040 0.004 0.000 0.280 0.676
#> SRR957893 1 0.1387 0.7479 0.932 0.000 0.000 0.068 0.000 0.000
#> SRR957892 1 0.0713 0.7648 0.972 0.000 0.000 0.028 0.000 0.000
#> SRR957894 5 0.3595 0.7541 0.000 0.120 0.000 0.000 0.796 0.084
#> SRR957895 4 0.5031 0.0518 0.116 0.208 0.000 0.664 0.012 0.000
#> SRR957896 5 0.3592 0.6803 0.000 0.020 0.000 0.000 0.740 0.240
#> SRR957897 2 0.4984 0.4278 0.048 0.480 0.000 0.464 0.008 0.000
#> SRR957898 1 0.4177 0.7004 0.772 0.052 0.000 0.140 0.000 0.036
#> SRR957899 5 0.3838 -0.1740 0.000 0.000 0.000 0.000 0.552 0.448
#> SRR957900 6 0.2783 0.7871 0.000 0.016 0.000 0.000 0.148 0.836
#> SRR957901 5 0.1610 0.7822 0.000 0.000 0.000 0.000 0.916 0.084
#> SRR957902 5 0.2933 0.7433 0.000 0.004 0.000 0.000 0.796 0.200
#> SRR957903 3 0.0865 0.8130 0.000 0.000 0.964 0.036 0.000 0.000
#> SRR957904 3 0.2066 0.7697 0.000 0.000 0.904 0.024 0.000 0.072
#> SRR957905 4 0.2358 0.7043 0.016 0.000 0.108 0.876 0.000 0.000
#> SRR957906 5 0.4894 0.6567 0.000 0.092 0.020 0.000 0.688 0.200
#> SRR957907 5 0.0260 0.7992 0.000 0.000 0.000 0.000 0.992 0.008
#> SRR957908 5 0.4129 0.6520 0.000 0.200 0.020 0.000 0.744 0.036
#> SRR957909 1 0.0713 0.7648 0.972 0.000 0.000 0.028 0.000 0.000
#> SRR957910 5 0.1245 0.7951 0.000 0.032 0.000 0.000 0.952 0.016
#> SRR957911 1 0.1387 0.7479 0.932 0.000 0.000 0.068 0.000 0.000
#> SRR957912 6 0.5647 0.4117 0.072 0.284 0.008 0.000 0.036 0.600
#> SRR957913 3 0.0865 0.8130 0.000 0.000 0.964 0.036 0.000 0.000
#> SRR957917 6 0.4761 0.7073 0.016 0.120 0.072 0.000 0.040 0.752
#> SRR957918 5 0.0937 0.8001 0.000 0.000 0.000 0.000 0.960 0.040
#> SRR957920 6 0.3275 0.7564 0.000 0.032 0.088 0.000 0.036 0.844
#> SRR957919 5 0.3195 0.7426 0.000 0.116 0.012 0.000 0.836 0.036
#> SRR957921 6 0.5133 0.7266 0.000 0.040 0.080 0.000 0.204 0.676
#> SRR957922 6 0.3079 0.7774 0.000 0.028 0.008 0.000 0.128 0.836
#> SRR957924 1 0.5813 -0.0732 0.484 0.036 0.068 0.408 0.000 0.004
#> SRR957923 2 0.5967 0.0694 0.004 0.484 0.000 0.008 0.348 0.156
#> SRR957925 5 0.3681 0.7572 0.000 0.064 0.000 0.000 0.780 0.156
#> SRR957926 1 0.3803 0.7555 0.808 0.092 0.000 0.028 0.000 0.072
#> SRR957927 5 0.3784 0.7632 0.000 0.080 0.000 0.000 0.776 0.144
#> SRR957928 1 0.5830 0.5440 0.508 0.344 0.016 0.000 0.000 0.132
#> SRR957929 1 0.6617 0.4963 0.480 0.320 0.016 0.000 0.036 0.148
#> SRR957930 5 0.3403 0.7404 0.000 0.020 0.000 0.000 0.768 0.212
#> SRR957931 6 0.3376 0.7648 0.000 0.016 0.000 0.000 0.220 0.764
#> SRR957932 3 0.4860 0.4859 0.160 0.000 0.664 0.176 0.000 0.000
#> SRR957933 1 0.3546 0.7584 0.828 0.072 0.000 0.028 0.000 0.072
#> SRR957934 5 0.3460 0.7348 0.000 0.020 0.000 0.000 0.760 0.220
#> SRR957935 5 0.4167 0.5938 0.000 0.024 0.000 0.000 0.632 0.344
#> SRR957936 5 0.3424 0.6971 0.000 0.160 0.004 0.000 0.800 0.036
#> SRR957937 5 0.1245 0.7951 0.000 0.032 0.000 0.000 0.952 0.016
#> SRR957938 5 0.1625 0.7913 0.000 0.060 0.000 0.000 0.928 0.012
#> SRR957939 2 0.6561 0.5547 0.124 0.480 0.004 0.336 0.052 0.004
#> SRR957941 6 0.3665 0.6855 0.000 0.020 0.000 0.000 0.252 0.728
#> SRR957940 4 0.4414 0.7333 0.180 0.000 0.108 0.712 0.000 0.000
#> SRR957942 5 0.1851 0.7746 0.000 0.024 0.012 0.000 0.928 0.036
#> SRR957943 5 0.4071 0.6302 0.000 0.216 0.012 0.000 0.736 0.036
#> SRR957944 5 0.3736 0.7556 0.000 0.068 0.000 0.000 0.776 0.156
#> SRR957945 3 0.0865 0.8130 0.000 0.000 0.964 0.036 0.000 0.000
#> SRR957946 1 0.4228 0.7139 0.716 0.212 0.000 0.000 0.000 0.072
#> SRR957947 1 0.4228 0.7139 0.716 0.212 0.000 0.000 0.000 0.072
#> SRR957948 5 0.0935 0.7966 0.000 0.032 0.000 0.000 0.964 0.004
#> SRR957949 5 0.4241 0.5471 0.000 0.024 0.000 0.000 0.608 0.368
#> SRR957950 1 0.0713 0.7648 0.972 0.000 0.000 0.028 0.000 0.000
#> SRR957951 6 0.3663 0.7897 0.000 0.040 0.004 0.000 0.180 0.776
#> SRR957952 6 0.2994 0.7806 0.000 0.008 0.076 0.000 0.060 0.856
#> SRR957953 4 0.2527 0.7077 0.024 0.000 0.108 0.868 0.000 0.000
#> SRR957954 4 0.4960 0.6767 0.308 0.000 0.092 0.600 0.000 0.000
#> SRR957956 4 0.4666 0.7401 0.216 0.000 0.108 0.676 0.000 0.000
#> SRR957957 2 0.5314 0.5727 0.004 0.524 0.004 0.388 0.080 0.000
#> SRR957958 4 0.2358 0.7043 0.016 0.000 0.108 0.876 0.000 0.000
#> SRR957959 6 0.4102 0.7819 0.000 0.036 0.084 0.000 0.092 0.788
#> SRR957960 5 0.3566 0.7595 0.000 0.056 0.000 0.000 0.788 0.156
#> SRR957961 6 0.5093 0.6754 0.000 0.076 0.096 0.000 0.116 0.712
#> SRR957962 4 0.4945 0.6822 0.304 0.000 0.092 0.604 0.000 0.000
#> SRR957963 1 0.3851 -0.2387 0.540 0.000 0.000 0.460 0.000 0.000
#> SRR957964 3 0.5039 0.4546 0.180 0.000 0.640 0.180 0.000 0.000
#> SRR957965 5 0.2053 0.7723 0.000 0.108 0.004 0.000 0.888 0.000
#> SRR957966 1 0.0790 0.7634 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR957967 4 0.4503 0.7459 0.192 0.000 0.108 0.700 0.000 0.000
#> SRR957968 4 0.2358 0.7043 0.016 0.000 0.108 0.876 0.000 0.000
#> SRR957969 4 0.5519 0.6567 0.280 0.000 0.172 0.548 0.000 0.000
#> SRR957970 5 0.2163 0.7942 0.000 0.016 0.000 0.000 0.892 0.092
#> SRR957971 3 0.0865 0.8130 0.000 0.000 0.964 0.036 0.000 0.000
#> SRR957972 3 0.5978 0.0425 0.004 0.108 0.476 0.004 0.016 0.392
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.775 0.835 0.938 0.4952 0.504 0.504
#> 3 3 0.788 0.860 0.938 0.3199 0.722 0.505
#> 4 4 0.682 0.739 0.868 0.1102 0.867 0.646
#> 5 5 0.592 0.562 0.749 0.0669 0.851 0.545
#> 6 6 0.574 0.420 0.685 0.0505 0.857 0.498
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
#> SRR957914 1 0.000 0.919 1.000 0.000
#> SRR957915 2 0.000 0.936 0.000 1.000
#> SRR957916 2 0.000 0.936 0.000 1.000
#> SRR957884 1 0.204 0.892 0.968 0.032
#> SRR957885 1 0.000 0.919 1.000 0.000
#> SRR957886 2 0.000 0.936 0.000 1.000
#> SRR957887 1 0.000 0.919 1.000 0.000
#> SRR957888 1 0.000 0.919 1.000 0.000
#> SRR957889 1 0.936 0.466 0.648 0.352
#> SRR957890 1 0.000 0.919 1.000 0.000
#> SRR957891 2 0.000 0.936 0.000 1.000
#> SRR957893 1 0.000 0.919 1.000 0.000
#> SRR957892 1 0.000 0.919 1.000 0.000
#> SRR957894 2 0.000 0.936 0.000 1.000
#> SRR957895 1 0.971 0.291 0.600 0.400
#> SRR957896 2 0.000 0.936 0.000 1.000
#> SRR957897 2 1.000 0.023 0.492 0.508
#> SRR957898 1 0.000 0.919 1.000 0.000
#> SRR957899 2 0.000 0.936 0.000 1.000
#> SRR957900 2 0.000 0.936 0.000 1.000
#> SRR957901 2 0.000 0.936 0.000 1.000
#> SRR957902 2 0.000 0.936 0.000 1.000
#> SRR957903 1 0.833 0.622 0.736 0.264
#> SRR957904 2 0.978 0.243 0.412 0.588
#> SRR957905 1 0.000 0.919 1.000 0.000
#> SRR957906 2 0.000 0.936 0.000 1.000
#> SRR957907 2 0.000 0.936 0.000 1.000
#> SRR957908 2 0.000 0.936 0.000 1.000
#> SRR957909 1 0.000 0.919 1.000 0.000
#> SRR957910 2 0.000 0.936 0.000 1.000
#> SRR957911 1 0.000 0.919 1.000 0.000
#> SRR957912 2 0.997 0.050 0.468 0.532
#> SRR957913 1 0.978 0.324 0.588 0.412
#> SRR957917 2 0.634 0.762 0.160 0.840
#> SRR957918 2 0.000 0.936 0.000 1.000
#> SRR957920 2 0.000 0.936 0.000 1.000
#> SRR957919 2 0.000 0.936 0.000 1.000
#> SRR957921 2 0.000 0.936 0.000 1.000
#> SRR957922 2 0.000 0.936 0.000 1.000
#> SRR957924 1 0.000 0.919 1.000 0.000
#> SRR957923 2 0.000 0.936 0.000 1.000
#> SRR957925 2 0.000 0.936 0.000 1.000
#> SRR957926 1 0.000 0.919 1.000 0.000
#> SRR957927 2 0.000 0.936 0.000 1.000
#> SRR957928 1 0.990 0.244 0.560 0.440
#> SRR957929 2 0.000 0.936 0.000 1.000
#> SRR957930 2 0.000 0.936 0.000 1.000
#> SRR957931 2 0.000 0.936 0.000 1.000
#> SRR957932 1 0.000 0.919 1.000 0.000
#> SRR957933 1 0.000 0.919 1.000 0.000
#> SRR957934 2 0.000 0.936 0.000 1.000
#> SRR957935 2 0.000 0.936 0.000 1.000
#> SRR957936 2 0.000 0.936 0.000 1.000
#> SRR957937 2 0.000 0.936 0.000 1.000
#> SRR957938 2 0.000 0.936 0.000 1.000
#> SRR957939 2 0.987 0.216 0.432 0.568
#> SRR957941 2 0.000 0.936 0.000 1.000
#> SRR957940 1 0.000 0.919 1.000 0.000
#> SRR957942 2 0.000 0.936 0.000 1.000
#> SRR957943 2 0.000 0.936 0.000 1.000
#> SRR957944 2 0.000 0.936 0.000 1.000
#> SRR957945 1 0.939 0.457 0.644 0.356
#> SRR957946 1 0.000 0.919 1.000 0.000
#> SRR957947 1 0.000 0.919 1.000 0.000
#> SRR957948 2 0.000 0.936 0.000 1.000
#> SRR957949 2 0.000 0.936 0.000 1.000
#> SRR957950 1 0.000 0.919 1.000 0.000
#> SRR957951 2 0.000 0.936 0.000 1.000
#> SRR957952 2 0.680 0.735 0.180 0.820
#> SRR957953 1 0.000 0.919 1.000 0.000
#> SRR957954 1 0.000 0.919 1.000 0.000
#> SRR957956 1 0.000 0.919 1.000 0.000
#> SRR957957 2 0.827 0.604 0.260 0.740
#> SRR957958 1 0.000 0.919 1.000 0.000
#> SRR957959 2 0.000 0.936 0.000 1.000
#> SRR957960 2 0.000 0.936 0.000 1.000
#> SRR957961 2 0.000 0.936 0.000 1.000
#> SRR957962 1 0.000 0.919 1.000 0.000
#> SRR957963 1 0.000 0.919 1.000 0.000
#> SRR957964 1 0.000 0.919 1.000 0.000
#> SRR957965 2 0.000 0.936 0.000 1.000
#> SRR957966 1 0.000 0.919 1.000 0.000
#> SRR957967 1 0.000 0.919 1.000 0.000
#> SRR957968 1 0.000 0.919 1.000 0.000
#> SRR957969 1 0.000 0.919 1.000 0.000
#> SRR957970 2 0.000 0.936 0.000 1.000
#> SRR957971 1 0.973 0.345 0.596 0.404
#> SRR957972 2 0.949 0.367 0.368 0.632
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957916 2 0.2448 0.9126 0.000 0.924 0.076
#> SRR957884 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957885 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957886 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957887 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957888 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957889 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957890 3 0.1163 0.8384 0.028 0.000 0.972
#> SRR957891 2 0.3482 0.8535 0.000 0.872 0.128
#> SRR957893 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957895 1 0.0424 0.9261 0.992 0.008 0.000
#> SRR957896 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957897 1 0.1529 0.8972 0.960 0.040 0.000
#> SRR957898 3 0.5431 0.6174 0.284 0.000 0.716
#> SRR957899 2 0.0592 0.9700 0.000 0.988 0.012
#> SRR957900 2 0.2356 0.9167 0.000 0.928 0.072
#> SRR957901 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957903 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957904 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957905 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957906 2 0.0892 0.9646 0.000 0.980 0.020
#> SRR957907 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957908 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957911 1 0.0237 0.9295 0.996 0.000 0.004
#> SRR957912 3 0.4002 0.7588 0.000 0.160 0.840
#> SRR957913 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957917 3 0.3816 0.7691 0.000 0.148 0.852
#> SRR957918 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957920 3 0.3816 0.7537 0.000 0.148 0.852
#> SRR957919 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957921 3 0.6308 -0.0349 0.000 0.492 0.508
#> SRR957922 2 0.0424 0.9726 0.000 0.992 0.008
#> SRR957924 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957923 2 0.3816 0.8183 0.148 0.852 0.000
#> SRR957925 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957926 3 0.5905 0.5128 0.352 0.000 0.648
#> SRR957927 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957928 3 0.0237 0.8457 0.000 0.004 0.996
#> SRR957929 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957930 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957931 2 0.0892 0.9644 0.000 0.980 0.020
#> SRR957932 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957933 3 0.5810 0.5410 0.336 0.000 0.664
#> SRR957934 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957935 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957936 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957939 1 0.3412 0.8038 0.876 0.124 0.000
#> SRR957941 2 0.0747 0.9673 0.000 0.984 0.016
#> SRR957940 3 0.6111 0.4175 0.396 0.000 0.604
#> SRR957942 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957945 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957946 3 0.3340 0.7821 0.120 0.000 0.880
#> SRR957947 3 0.6260 0.2780 0.448 0.000 0.552
#> SRR957948 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957949 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957950 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957951 2 0.5465 0.5926 0.000 0.712 0.288
#> SRR957952 3 0.4062 0.7557 0.000 0.164 0.836
#> SRR957953 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957954 1 0.4346 0.7248 0.816 0.000 0.184
#> SRR957956 1 0.5859 0.3947 0.656 0.000 0.344
#> SRR957957 1 0.4931 0.6663 0.768 0.232 0.000
#> SRR957958 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957959 3 0.1643 0.8316 0.000 0.044 0.956
#> SRR957960 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957961 3 0.2066 0.8211 0.000 0.060 0.940
#> SRR957962 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957963 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957964 3 0.1163 0.8375 0.028 0.000 0.972
#> SRR957965 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957967 1 0.0000 0.9323 1.000 0.000 0.000
#> SRR957968 1 0.5216 0.5917 0.740 0.000 0.260
#> SRR957969 3 0.4842 0.6909 0.224 0.000 0.776
#> SRR957970 2 0.0000 0.9774 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.8465 0.000 0.000 1.000
#> SRR957972 3 0.0000 0.8465 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.3123 0.6888 0.844 0.000 0.000 0.156
#> SRR957915 2 0.0469 0.9043 0.000 0.988 0.000 0.012
#> SRR957916 2 0.2345 0.8849 0.100 0.900 0.000 0.000
#> SRR957884 4 0.1398 0.8156 0.004 0.000 0.040 0.956
#> SRR957885 3 0.0000 0.8294 0.000 0.000 1.000 0.000
#> SRR957886 2 0.0524 0.9070 0.008 0.988 0.000 0.004
#> SRR957887 3 0.0188 0.8291 0.004 0.000 0.996 0.000
#> SRR957888 4 0.5000 -0.0698 0.496 0.000 0.000 0.504
#> SRR957889 1 0.4661 0.4850 0.652 0.000 0.348 0.000
#> SRR957890 1 0.3271 0.7344 0.856 0.000 0.132 0.012
#> SRR957891 2 0.1059 0.9034 0.016 0.972 0.012 0.000
#> SRR957893 4 0.4961 0.0827 0.448 0.000 0.000 0.552
#> SRR957892 4 0.3764 0.6185 0.216 0.000 0.000 0.784
#> SRR957894 2 0.1584 0.9011 0.012 0.952 0.000 0.036
#> SRR957895 4 0.1256 0.8141 0.028 0.008 0.000 0.964
#> SRR957896 2 0.2011 0.8933 0.080 0.920 0.000 0.000
#> SRR957897 4 0.0657 0.8181 0.000 0.012 0.004 0.984
#> SRR957898 3 0.4744 0.5606 0.240 0.000 0.736 0.024
#> SRR957899 2 0.0469 0.9060 0.012 0.988 0.000 0.000
#> SRR957900 2 0.2408 0.8838 0.104 0.896 0.000 0.000
#> SRR957901 2 0.0188 0.9063 0.004 0.996 0.000 0.000
#> SRR957902 2 0.0469 0.9073 0.012 0.988 0.000 0.000
#> SRR957903 3 0.0000 0.8294 0.000 0.000 1.000 0.000
#> SRR957904 3 0.0672 0.8278 0.008 0.008 0.984 0.000
#> SRR957905 4 0.2976 0.7648 0.008 0.000 0.120 0.872
#> SRR957906 2 0.5756 0.0350 0.004 0.524 0.452 0.020
#> SRR957907 2 0.0188 0.9055 0.000 0.996 0.000 0.004
#> SRR957908 2 0.4640 0.7274 0.004 0.776 0.032 0.188
#> SRR957909 1 0.4761 0.3887 0.628 0.000 0.000 0.372
#> SRR957910 2 0.0336 0.9070 0.008 0.992 0.000 0.000
#> SRR957911 1 0.3764 0.6435 0.784 0.000 0.000 0.216
#> SRR957912 1 0.0817 0.7382 0.976 0.024 0.000 0.000
#> SRR957913 3 0.0000 0.8294 0.000 0.000 1.000 0.000
#> SRR957917 1 0.5690 0.5585 0.708 0.196 0.096 0.000
#> SRR957918 2 0.1004 0.9080 0.024 0.972 0.000 0.004
#> SRR957920 3 0.4194 0.6535 0.008 0.228 0.764 0.000
#> SRR957919 2 0.1022 0.8999 0.000 0.968 0.000 0.032
#> SRR957921 3 0.5387 0.3769 0.016 0.400 0.584 0.000
#> SRR957922 2 0.4331 0.6865 0.288 0.712 0.000 0.000
#> SRR957924 1 0.4406 0.5319 0.700 0.000 0.000 0.300
#> SRR957923 4 0.4228 0.5485 0.008 0.232 0.000 0.760
#> SRR957925 2 0.2973 0.8520 0.144 0.856 0.000 0.000
#> SRR957926 1 0.1182 0.7477 0.968 0.000 0.016 0.016
#> SRR957927 2 0.2266 0.8671 0.004 0.912 0.000 0.084
#> SRR957928 1 0.1677 0.7420 0.948 0.012 0.040 0.000
#> SRR957929 1 0.1302 0.7286 0.956 0.044 0.000 0.000
#> SRR957930 2 0.2011 0.8931 0.080 0.920 0.000 0.000
#> SRR957931 2 0.1867 0.8961 0.072 0.928 0.000 0.000
#> SRR957932 3 0.0336 0.8285 0.008 0.000 0.992 0.000
#> SRR957933 1 0.4050 0.7190 0.808 0.000 0.168 0.024
#> SRR957934 2 0.2589 0.8737 0.116 0.884 0.000 0.000
#> SRR957935 2 0.3024 0.8526 0.148 0.852 0.000 0.000
#> SRR957936 2 0.2053 0.8756 0.004 0.924 0.000 0.072
#> SRR957937 2 0.0000 0.9059 0.000 1.000 0.000 0.000
#> SRR957938 2 0.1042 0.9082 0.020 0.972 0.000 0.008
#> SRR957939 4 0.0927 0.8158 0.008 0.016 0.000 0.976
#> SRR957941 2 0.1940 0.8949 0.076 0.924 0.000 0.000
#> SRR957940 3 0.3161 0.7749 0.012 0.000 0.864 0.124
#> SRR957942 2 0.0779 0.9031 0.004 0.980 0.000 0.016
#> SRR957943 2 0.4074 0.7467 0.004 0.792 0.008 0.196
#> SRR957944 2 0.1545 0.9056 0.040 0.952 0.000 0.008
#> SRR957945 3 0.0188 0.8291 0.004 0.000 0.996 0.000
#> SRR957946 1 0.3443 0.7325 0.848 0.000 0.136 0.016
#> SRR957947 1 0.1610 0.7497 0.952 0.000 0.032 0.016
#> SRR957948 2 0.0707 0.9073 0.020 0.980 0.000 0.000
#> SRR957949 2 0.3801 0.7798 0.220 0.780 0.000 0.000
#> SRR957950 1 0.4406 0.5354 0.700 0.000 0.000 0.300
#> SRR957951 2 0.3219 0.8267 0.020 0.868 0.112 0.000
#> SRR957952 1 0.7906 0.0825 0.352 0.348 0.300 0.000
#> SRR957953 4 0.4387 0.6008 0.012 0.000 0.236 0.752
#> SRR957954 3 0.5203 0.3347 0.008 0.000 0.576 0.416
#> SRR957956 3 0.5024 0.4659 0.008 0.000 0.632 0.360
#> SRR957957 4 0.1484 0.8155 0.004 0.016 0.020 0.960
#> SRR957958 4 0.1824 0.8087 0.004 0.000 0.060 0.936
#> SRR957959 3 0.4285 0.7132 0.040 0.156 0.804 0.000
#> SRR957960 2 0.4543 0.6219 0.324 0.676 0.000 0.000
#> SRR957961 3 0.3160 0.7643 0.008 0.120 0.868 0.004
#> SRR957962 4 0.0779 0.8170 0.016 0.000 0.004 0.980
#> SRR957963 4 0.0707 0.8147 0.020 0.000 0.000 0.980
#> SRR957964 3 0.0921 0.8191 0.028 0.000 0.972 0.000
#> SRR957965 2 0.0895 0.9023 0.004 0.976 0.000 0.020
#> SRR957966 4 0.2011 0.7807 0.080 0.000 0.000 0.920
#> SRR957967 4 0.1970 0.8102 0.008 0.000 0.060 0.932
#> SRR957968 3 0.4872 0.4751 0.004 0.000 0.640 0.356
#> SRR957969 3 0.2198 0.8065 0.008 0.000 0.920 0.072
#> SRR957970 2 0.1209 0.9008 0.004 0.964 0.000 0.032
#> SRR957971 3 0.0336 0.8285 0.008 0.000 0.992 0.000
#> SRR957972 3 0.1398 0.8136 0.040 0.004 0.956 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.1907 0.5501 0.928 0.044 0.000 0.028 0.000
#> SRR957915 2 0.3969 0.3435 0.004 0.692 0.000 0.000 0.304
#> SRR957916 5 0.4114 0.7711 0.060 0.164 0.000 0.000 0.776
#> SRR957884 2 0.5071 0.4009 0.000 0.540 0.036 0.424 0.000
#> SRR957885 3 0.1560 0.8410 0.004 0.028 0.948 0.020 0.000
#> SRR957886 5 0.0451 0.8036 0.008 0.004 0.000 0.000 0.988
#> SRR957887 3 0.1399 0.8419 0.000 0.028 0.952 0.020 0.000
#> SRR957888 4 0.3928 0.3816 0.296 0.004 0.000 0.700 0.000
#> SRR957889 1 0.6322 0.3374 0.480 0.140 0.376 0.000 0.004
#> SRR957890 1 0.4651 0.5384 0.708 0.036 0.248 0.008 0.000
#> SRR957891 5 0.3991 0.7771 0.004 0.156 0.048 0.000 0.792
#> SRR957893 4 0.4182 0.3151 0.352 0.004 0.000 0.644 0.000
#> SRR957892 4 0.6024 0.3059 0.364 0.124 0.000 0.512 0.000
#> SRR957894 2 0.4336 0.4876 0.052 0.768 0.000 0.008 0.172
#> SRR957895 2 0.5101 0.4875 0.108 0.704 0.000 0.184 0.004
#> SRR957896 5 0.2707 0.8007 0.008 0.132 0.000 0.000 0.860
#> SRR957897 4 0.4452 -0.4096 0.000 0.496 0.004 0.500 0.000
#> SRR957898 3 0.5941 0.3734 0.196 0.004 0.612 0.188 0.000
#> SRR957899 5 0.2891 0.7869 0.000 0.176 0.000 0.000 0.824
#> SRR957900 5 0.4800 0.7264 0.088 0.196 0.000 0.000 0.716
#> SRR957901 5 0.3143 0.7728 0.000 0.204 0.000 0.000 0.796
#> SRR957902 5 0.2648 0.7928 0.000 0.152 0.000 0.000 0.848
#> SRR957903 3 0.1153 0.8462 0.004 0.024 0.964 0.008 0.000
#> SRR957904 3 0.1074 0.8450 0.016 0.004 0.968 0.000 0.012
#> SRR957905 2 0.6324 0.3194 0.000 0.432 0.156 0.412 0.000
#> SRR957906 5 0.5002 0.6907 0.000 0.040 0.168 0.052 0.740
#> SRR957907 5 0.2377 0.7975 0.000 0.128 0.000 0.000 0.872
#> SRR957908 5 0.6127 0.4925 0.000 0.220 0.004 0.192 0.584
#> SRR957909 4 0.4375 0.1899 0.420 0.004 0.000 0.576 0.000
#> SRR957910 5 0.2561 0.7942 0.000 0.144 0.000 0.000 0.856
#> SRR957911 1 0.4321 0.1466 0.600 0.004 0.000 0.396 0.000
#> SRR957912 1 0.5059 0.5843 0.748 0.020 0.064 0.012 0.156
#> SRR957913 3 0.0566 0.8481 0.012 0.004 0.984 0.000 0.000
#> SRR957917 1 0.6705 0.4740 0.524 0.020 0.176 0.000 0.280
#> SRR957918 5 0.3561 0.7041 0.000 0.260 0.000 0.000 0.740
#> SRR957920 5 0.4855 0.5723 0.032 0.016 0.260 0.000 0.692
#> SRR957919 5 0.1569 0.7974 0.012 0.032 0.000 0.008 0.948
#> SRR957921 5 0.5981 0.1464 0.008 0.084 0.432 0.000 0.476
#> SRR957922 5 0.2331 0.7676 0.080 0.020 0.000 0.000 0.900
#> SRR957924 1 0.4496 0.3829 0.724 0.040 0.000 0.232 0.004
#> SRR957923 2 0.5487 0.5364 0.064 0.712 0.000 0.164 0.060
#> SRR957925 5 0.1701 0.7927 0.048 0.016 0.000 0.000 0.936
#> SRR957926 1 0.5810 0.5540 0.720 0.016 0.064 0.120 0.080
#> SRR957927 5 0.3191 0.7804 0.000 0.052 0.004 0.084 0.860
#> SRR957928 1 0.5306 0.5826 0.716 0.024 0.156 0.000 0.104
#> SRR957929 1 0.4487 0.5492 0.752 0.020 0.000 0.032 0.196
#> SRR957930 5 0.2505 0.8081 0.020 0.092 0.000 0.000 0.888
#> SRR957931 5 0.1300 0.7943 0.028 0.016 0.000 0.000 0.956
#> SRR957932 3 0.1018 0.8493 0.016 0.000 0.968 0.016 0.000
#> SRR957933 1 0.6322 0.5005 0.652 0.012 0.128 0.172 0.036
#> SRR957934 5 0.1195 0.7948 0.028 0.012 0.000 0.000 0.960
#> SRR957935 5 0.3952 0.6843 0.132 0.024 0.000 0.032 0.812
#> SRR957936 5 0.5488 0.2759 0.000 0.428 0.000 0.064 0.508
#> SRR957937 5 0.2179 0.8009 0.000 0.112 0.000 0.000 0.888
#> SRR957938 5 0.1012 0.7999 0.012 0.020 0.000 0.000 0.968
#> SRR957939 2 0.5379 0.4514 0.052 0.600 0.000 0.340 0.008
#> SRR957941 5 0.1493 0.7918 0.028 0.024 0.000 0.000 0.948
#> SRR957940 3 0.2124 0.8103 0.004 0.000 0.900 0.096 0.000
#> SRR957942 5 0.1851 0.8072 0.000 0.088 0.000 0.000 0.912
#> SRR957943 5 0.5354 0.6103 0.000 0.128 0.000 0.208 0.664
#> SRR957944 5 0.0912 0.8038 0.012 0.016 0.000 0.000 0.972
#> SRR957945 3 0.0162 0.8502 0.000 0.004 0.996 0.000 0.000
#> SRR957946 1 0.3660 0.5740 0.800 0.016 0.176 0.008 0.000
#> SRR957947 1 0.3170 0.5516 0.852 0.120 0.012 0.016 0.000
#> SRR957948 5 0.3561 0.7196 0.000 0.260 0.000 0.000 0.740
#> SRR957949 1 0.6538 0.2576 0.444 0.352 0.000 0.000 0.204
#> SRR957950 1 0.5003 0.2552 0.544 0.424 0.000 0.032 0.000
#> SRR957951 3 0.6952 -0.0233 0.008 0.256 0.408 0.000 0.328
#> SRR957952 5 0.6163 0.3244 0.120 0.008 0.332 0.000 0.540
#> SRR957953 2 0.6615 0.2893 0.000 0.408 0.216 0.376 0.000
#> SRR957954 4 0.4183 0.3038 0.000 0.008 0.324 0.668 0.000
#> SRR957956 4 0.4867 0.0220 0.000 0.024 0.432 0.544 0.000
#> SRR957957 4 0.4116 0.1538 0.000 0.248 0.004 0.732 0.016
#> SRR957958 2 0.5995 0.3600 0.000 0.468 0.112 0.420 0.000
#> SRR957959 3 0.3780 0.6962 0.020 0.020 0.812 0.000 0.148
#> SRR957960 1 0.6813 0.0213 0.356 0.340 0.000 0.000 0.304
#> SRR957961 3 0.3545 0.7544 0.004 0.128 0.832 0.004 0.032
#> SRR957962 4 0.1697 0.4541 0.008 0.060 0.000 0.932 0.000
#> SRR957963 4 0.1914 0.4597 0.016 0.060 0.000 0.924 0.000
#> SRR957964 3 0.0693 0.8470 0.012 0.000 0.980 0.008 0.000
#> SRR957965 2 0.4253 0.2956 0.004 0.660 0.000 0.004 0.332
#> SRR957966 4 0.4262 0.4702 0.124 0.100 0.000 0.776 0.000
#> SRR957967 2 0.5868 0.4810 0.028 0.624 0.076 0.272 0.000
#> SRR957968 3 0.5240 0.4746 0.000 0.096 0.660 0.244 0.000
#> SRR957969 3 0.1547 0.8447 0.004 0.016 0.948 0.032 0.000
#> SRR957970 2 0.3013 0.5155 0.028 0.880 0.000 0.024 0.068
#> SRR957971 3 0.0324 0.8499 0.004 0.004 0.992 0.000 0.000
#> SRR957972 3 0.1018 0.8473 0.016 0.016 0.968 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.3957 0.4152 0.752 0.012 0.000 0.036 0.000 0.200
#> SRR957915 2 0.4525 0.3957 0.008 0.664 0.004 0.000 0.288 0.036
#> SRR957916 5 0.4199 0.5106 0.244 0.000 0.016 0.000 0.712 0.028
#> SRR957884 2 0.5164 0.3354 0.000 0.616 0.080 0.288 0.000 0.016
#> SRR957885 3 0.0692 0.7953 0.000 0.004 0.976 0.000 0.000 0.020
#> SRR957886 5 0.2400 0.6121 0.004 0.008 0.000 0.000 0.872 0.116
#> SRR957887 3 0.0508 0.7962 0.000 0.004 0.984 0.000 0.000 0.012
#> SRR957888 4 0.5933 0.3061 0.164 0.012 0.000 0.496 0.000 0.328
#> SRR957889 1 0.4619 0.5264 0.752 0.040 0.084 0.000 0.004 0.120
#> SRR957890 1 0.3612 0.5729 0.804 0.004 0.100 0.000 0.000 0.092
#> SRR957891 5 0.3016 0.6174 0.000 0.048 0.092 0.000 0.852 0.008
#> SRR957893 4 0.5811 0.3434 0.224 0.012 0.000 0.556 0.000 0.208
#> SRR957892 4 0.7139 0.1801 0.308 0.096 0.000 0.392 0.000 0.204
#> SRR957894 2 0.2724 0.5762 0.016 0.876 0.000 0.000 0.076 0.032
#> SRR957895 2 0.3311 0.5136 0.052 0.844 0.000 0.016 0.004 0.084
#> SRR957896 5 0.5643 0.4835 0.020 0.176 0.004 0.000 0.620 0.180
#> SRR957897 2 0.4093 0.1283 0.000 0.516 0.000 0.476 0.000 0.008
#> SRR957898 3 0.7463 -0.0877 0.172 0.004 0.384 0.288 0.000 0.152
#> SRR957899 5 0.2225 0.6187 0.000 0.092 0.008 0.000 0.892 0.008
#> SRR957900 5 0.5824 0.3125 0.348 0.044 0.024 0.000 0.548 0.036
#> SRR957901 5 0.3329 0.5467 0.000 0.220 0.004 0.000 0.768 0.008
#> SRR957902 5 0.4722 0.1505 0.000 0.468 0.004 0.000 0.492 0.036
#> SRR957903 3 0.0806 0.7945 0.000 0.008 0.972 0.000 0.000 0.020
#> SRR957904 3 0.0717 0.7961 0.000 0.000 0.976 0.000 0.016 0.008
#> SRR957905 2 0.6663 -0.0441 0.000 0.380 0.232 0.352 0.000 0.036
#> SRR957906 5 0.3051 0.6263 0.000 0.016 0.092 0.020 0.860 0.012
#> SRR957907 5 0.1967 0.6279 0.000 0.084 0.000 0.000 0.904 0.012
#> SRR957908 5 0.5778 0.3347 0.000 0.160 0.004 0.252 0.572 0.012
#> SRR957909 4 0.6198 0.2602 0.220 0.012 0.000 0.448 0.000 0.320
#> SRR957910 5 0.3861 0.4022 0.000 0.352 0.000 0.000 0.640 0.008
#> SRR957911 4 0.6395 0.1397 0.320 0.012 0.000 0.372 0.000 0.296
#> SRR957912 6 0.5706 0.4274 0.384 0.004 0.008 0.000 0.112 0.492
#> SRR957913 3 0.0260 0.7958 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR957917 5 0.7381 -0.3979 0.292 0.012 0.068 0.000 0.324 0.304
#> SRR957918 2 0.4432 0.1738 0.000 0.600 0.000 0.000 0.364 0.036
#> SRR957920 5 0.4883 0.4415 0.004 0.000 0.216 0.000 0.664 0.116
#> SRR957919 5 0.2382 0.6289 0.004 0.020 0.000 0.008 0.896 0.072
#> SRR957921 5 0.3277 0.5740 0.000 0.004 0.188 0.000 0.792 0.016
#> SRR957922 5 0.4999 0.4046 0.092 0.012 0.000 0.000 0.652 0.244
#> SRR957924 6 0.6121 0.3022 0.148 0.232 0.000 0.052 0.000 0.568
#> SRR957923 2 0.2421 0.5714 0.004 0.904 0.000 0.028 0.032 0.032
#> SRR957925 6 0.6189 0.2422 0.020 0.212 0.000 0.000 0.272 0.496
#> SRR957926 6 0.5608 0.3797 0.320 0.004 0.012 0.056 0.024 0.584
#> SRR957927 5 0.4445 0.5888 0.000 0.096 0.000 0.116 0.756 0.032
#> SRR957928 6 0.5510 0.2971 0.452 0.004 0.016 0.000 0.068 0.460
#> SRR957929 6 0.5393 0.4896 0.260 0.028 0.000 0.000 0.092 0.620
#> SRR957930 5 0.4438 0.5724 0.004 0.208 0.000 0.000 0.708 0.080
#> SRR957931 5 0.2706 0.5787 0.008 0.000 0.000 0.000 0.832 0.160
#> SRR957932 3 0.1511 0.7854 0.000 0.004 0.940 0.012 0.000 0.044
#> SRR957933 6 0.6942 0.1473 0.256 0.004 0.176 0.088 0.000 0.476
#> SRR957934 5 0.4289 0.3556 0.020 0.008 0.000 0.000 0.640 0.332
#> SRR957935 6 0.5590 0.2607 0.052 0.048 0.000 0.000 0.364 0.536
#> SRR957936 2 0.4463 -0.0423 0.000 0.516 0.000 0.028 0.456 0.000
#> SRR957937 5 0.2191 0.6163 0.000 0.120 0.000 0.000 0.876 0.004
#> SRR957938 5 0.5167 0.5165 0.004 0.164 0.000 0.000 0.636 0.196
#> SRR957939 2 0.3269 0.5303 0.008 0.832 0.000 0.108 0.000 0.052
#> SRR957941 5 0.4859 0.3715 0.004 0.028 0.024 0.000 0.624 0.320
#> SRR957940 4 0.5797 0.2943 0.072 0.004 0.276 0.592 0.000 0.056
#> SRR957942 5 0.2968 0.5937 0.000 0.168 0.000 0.000 0.816 0.016
#> SRR957943 5 0.5761 0.2878 0.000 0.224 0.000 0.236 0.536 0.004
#> SRR957944 5 0.6100 0.3014 0.004 0.268 0.000 0.000 0.444 0.284
#> SRR957945 3 0.0405 0.7964 0.004 0.000 0.988 0.000 0.000 0.008
#> SRR957946 1 0.3869 0.5476 0.784 0.004 0.044 0.012 0.000 0.156
#> SRR957947 1 0.0820 0.5953 0.972 0.016 0.000 0.000 0.000 0.012
#> SRR957948 2 0.5641 0.1617 0.004 0.512 0.000 0.000 0.340 0.144
#> SRR957949 1 0.6094 0.2702 0.576 0.184 0.000 0.000 0.192 0.048
#> SRR957950 1 0.5583 0.3299 0.568 0.272 0.000 0.008 0.000 0.152
#> SRR957951 5 0.5173 0.4592 0.008 0.088 0.240 0.000 0.652 0.012
#> SRR957952 3 0.6645 0.2661 0.064 0.012 0.524 0.000 0.264 0.136
#> SRR957953 4 0.6928 -0.0147 0.000 0.324 0.220 0.392 0.000 0.064
#> SRR957954 4 0.2252 0.5090 0.000 0.012 0.072 0.900 0.000 0.016
#> SRR957956 3 0.4742 0.3970 0.000 0.020 0.584 0.372 0.000 0.024
#> SRR957957 4 0.4027 0.1811 0.000 0.308 0.000 0.672 0.008 0.012
#> SRR957958 4 0.6186 0.0270 0.000 0.328 0.140 0.496 0.000 0.036
#> SRR957959 3 0.4076 0.2693 0.000 0.000 0.592 0.000 0.396 0.012
#> SRR957960 2 0.7082 0.0141 0.156 0.452 0.000 0.000 0.136 0.256
#> SRR957961 3 0.3123 0.7475 0.004 0.024 0.860 0.000 0.072 0.040
#> SRR957962 4 0.2842 0.5208 0.028 0.040 0.004 0.880 0.000 0.048
#> SRR957963 4 0.2116 0.5218 0.024 0.024 0.000 0.916 0.000 0.036
#> SRR957964 3 0.2833 0.7493 0.040 0.000 0.864 0.008 0.000 0.088
#> SRR957965 5 0.4901 0.0899 0.000 0.428 0.016 0.004 0.528 0.024
#> SRR957966 4 0.3795 0.4923 0.060 0.020 0.000 0.800 0.000 0.120
#> SRR957967 2 0.7923 0.0443 0.100 0.388 0.052 0.272 0.000 0.188
#> SRR957968 3 0.4713 0.5561 0.000 0.044 0.696 0.224 0.000 0.036
#> SRR957969 3 0.4283 0.6406 0.012 0.000 0.740 0.180 0.000 0.068
#> SRR957970 2 0.3060 0.5702 0.020 0.864 0.004 0.000 0.064 0.048
#> SRR957971 3 0.0508 0.7958 0.004 0.000 0.984 0.000 0.000 0.012
#> SRR957972 3 0.1736 0.7874 0.004 0.008 0.936 0.000 0.020 0.032
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.599 0.809 0.902 0.4464 0.570 0.570
#> 3 3 0.601 0.650 0.810 0.4299 0.733 0.543
#> 4 4 0.610 0.573 0.754 0.1246 0.844 0.573
#> 5 5 0.656 0.688 0.821 0.0436 0.890 0.630
#> 6 6 0.765 0.632 0.820 0.0611 0.974 0.895
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
#> SRR957914 1 0.0000 0.950 1.000 0.000
#> SRR957915 2 0.0000 0.855 0.000 1.000
#> SRR957916 2 0.2948 0.838 0.052 0.948
#> SRR957884 2 0.8763 0.683 0.296 0.704
#> SRR957885 2 0.9522 0.584 0.372 0.628
#> SRR957886 2 0.0000 0.855 0.000 1.000
#> SRR957887 2 0.9286 0.631 0.344 0.656
#> SRR957888 1 0.0000 0.950 1.000 0.000
#> SRR957889 1 0.0000 0.950 1.000 0.000
#> SRR957890 1 0.0000 0.950 1.000 0.000
#> SRR957891 2 0.0000 0.855 0.000 1.000
#> SRR957893 1 0.0000 0.950 1.000 0.000
#> SRR957892 1 0.0000 0.950 1.000 0.000
#> SRR957894 2 0.0000 0.855 0.000 1.000
#> SRR957895 2 0.9209 0.641 0.336 0.664
#> SRR957896 2 0.0000 0.855 0.000 1.000
#> SRR957897 2 0.8267 0.714 0.260 0.740
#> SRR957898 1 0.0000 0.950 1.000 0.000
#> SRR957899 2 0.0000 0.855 0.000 1.000
#> SRR957900 2 0.2948 0.838 0.052 0.948
#> SRR957901 2 0.0000 0.855 0.000 1.000
#> SRR957902 2 0.0000 0.855 0.000 1.000
#> SRR957903 2 0.9286 0.631 0.344 0.656
#> SRR957904 2 0.8955 0.667 0.312 0.688
#> SRR957905 2 0.9323 0.626 0.348 0.652
#> SRR957906 2 0.0000 0.855 0.000 1.000
#> SRR957907 2 0.0000 0.855 0.000 1.000
#> SRR957908 2 0.0000 0.855 0.000 1.000
#> SRR957909 1 0.0000 0.950 1.000 0.000
#> SRR957910 2 0.0000 0.855 0.000 1.000
#> SRR957911 1 0.0000 0.950 1.000 0.000
#> SRR957912 1 0.7056 0.706 0.808 0.192
#> SRR957913 2 0.9286 0.631 0.344 0.656
#> SRR957917 1 0.7056 0.706 0.808 0.192
#> SRR957918 2 0.0000 0.855 0.000 1.000
#> SRR957920 2 0.9996 0.253 0.488 0.512
#> SRR957919 2 0.0000 0.855 0.000 1.000
#> SRR957921 2 0.0000 0.855 0.000 1.000
#> SRR957922 2 0.0376 0.854 0.004 0.996
#> SRR957924 2 0.9323 0.626 0.348 0.652
#> SRR957923 2 0.7883 0.732 0.236 0.764
#> SRR957925 2 0.0376 0.854 0.004 0.996
#> SRR957926 1 0.0000 0.950 1.000 0.000
#> SRR957927 2 0.4431 0.820 0.092 0.908
#> SRR957928 1 0.0000 0.950 1.000 0.000
#> SRR957929 1 0.0000 0.950 1.000 0.000
#> SRR957930 2 0.0000 0.855 0.000 1.000
#> SRR957931 2 0.0000 0.855 0.000 1.000
#> SRR957932 1 0.9491 0.249 0.632 0.368
#> SRR957933 1 0.0000 0.950 1.000 0.000
#> SRR957934 2 0.0376 0.854 0.004 0.996
#> SRR957935 2 0.0376 0.854 0.004 0.996
#> SRR957936 2 0.0000 0.855 0.000 1.000
#> SRR957937 2 0.0000 0.855 0.000 1.000
#> SRR957938 2 0.0000 0.855 0.000 1.000
#> SRR957939 2 0.8207 0.717 0.256 0.744
#> SRR957941 2 0.0376 0.854 0.004 0.996
#> SRR957940 1 0.8327 0.557 0.736 0.264
#> SRR957942 2 0.0000 0.855 0.000 1.000
#> SRR957943 2 0.0000 0.855 0.000 1.000
#> SRR957944 2 0.0000 0.855 0.000 1.000
#> SRR957945 2 0.9522 0.584 0.372 0.628
#> SRR957946 1 0.0000 0.950 1.000 0.000
#> SRR957947 1 0.0000 0.950 1.000 0.000
#> SRR957948 2 0.0000 0.855 0.000 1.000
#> SRR957949 2 0.0376 0.854 0.004 0.996
#> SRR957950 1 0.0000 0.950 1.000 0.000
#> SRR957951 2 0.0000 0.855 0.000 1.000
#> SRR957952 2 0.8861 0.675 0.304 0.696
#> SRR957953 2 0.9323 0.626 0.348 0.652
#> SRR957954 1 0.0000 0.950 1.000 0.000
#> SRR957956 2 0.9323 0.626 0.348 0.652
#> SRR957957 2 0.7815 0.735 0.232 0.768
#> SRR957958 2 0.9323 0.626 0.348 0.652
#> SRR957959 2 0.3584 0.832 0.068 0.932
#> SRR957960 2 0.0376 0.854 0.004 0.996
#> SRR957961 2 0.0000 0.855 0.000 1.000
#> SRR957962 1 0.0000 0.950 1.000 0.000
#> SRR957963 1 0.0000 0.950 1.000 0.000
#> SRR957964 1 0.0000 0.950 1.000 0.000
#> SRR957965 2 0.0000 0.855 0.000 1.000
#> SRR957966 1 0.0000 0.950 1.000 0.000
#> SRR957967 1 0.1184 0.935 0.984 0.016
#> SRR957968 2 0.9323 0.626 0.348 0.652
#> SRR957969 1 0.0000 0.950 1.000 0.000
#> SRR957970 2 0.0000 0.855 0.000 1.000
#> SRR957971 2 0.9286 0.631 0.344 0.656
#> SRR957972 2 0.9286 0.631 0.344 0.656
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957915 2 0.3192 0.6339 0.000 0.888 0.112
#> SRR957916 3 0.5835 -0.1174 0.000 0.340 0.660
#> SRR957884 3 0.1453 0.6825 0.008 0.024 0.968
#> SRR957885 3 0.2066 0.7105 0.060 0.000 0.940
#> SRR957886 2 0.3686 0.6357 0.000 0.860 0.140
#> SRR957887 3 0.1289 0.7231 0.032 0.000 0.968
#> SRR957888 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957889 1 0.0892 0.9404 0.980 0.000 0.020
#> SRR957890 1 0.1411 0.9344 0.964 0.000 0.036
#> SRR957891 2 0.6111 0.6891 0.000 0.604 0.396
#> SRR957893 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957892 1 0.0892 0.9404 0.980 0.000 0.020
#> SRR957894 2 0.0000 0.5652 0.000 1.000 0.000
#> SRR957895 3 0.1399 0.7189 0.028 0.004 0.968
#> SRR957896 2 0.6299 0.6459 0.000 0.524 0.476
#> SRR957897 3 0.6260 0.3491 0.000 0.448 0.552
#> SRR957898 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957899 2 0.6062 0.6937 0.000 0.616 0.384
#> SRR957900 3 0.5835 -0.1174 0.000 0.340 0.660
#> SRR957901 2 0.6062 0.6937 0.000 0.616 0.384
#> SRR957902 2 0.6299 0.6459 0.000 0.524 0.476
#> SRR957903 3 0.1289 0.7231 0.032 0.000 0.968
#> SRR957904 3 0.0000 0.6990 0.000 0.000 1.000
#> SRR957905 3 0.1411 0.7239 0.036 0.000 0.964
#> SRR957906 2 0.6111 0.6891 0.000 0.604 0.396
#> SRR957907 2 0.6299 0.6459 0.000 0.524 0.476
#> SRR957908 2 0.0000 0.5652 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957910 2 0.6062 0.6937 0.000 0.616 0.384
#> SRR957911 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957912 1 0.6204 0.3305 0.576 0.000 0.424
#> SRR957913 3 0.1289 0.7231 0.032 0.000 0.968
#> SRR957917 1 0.6204 0.3305 0.576 0.000 0.424
#> SRR957918 2 0.3752 0.6353 0.000 0.856 0.144
#> SRR957920 3 0.5356 0.5746 0.196 0.020 0.784
#> SRR957919 2 0.3482 0.5629 0.000 0.872 0.128
#> SRR957921 2 0.6111 0.6891 0.000 0.604 0.396
#> SRR957922 2 0.6309 0.6250 0.000 0.504 0.496
#> SRR957924 3 0.1411 0.7239 0.036 0.000 0.964
#> SRR957923 3 0.6295 0.3220 0.000 0.472 0.528
#> SRR957925 2 0.6308 0.6292 0.000 0.508 0.492
#> SRR957926 1 0.0892 0.9404 0.980 0.000 0.020
#> SRR957927 3 0.5621 0.1293 0.000 0.308 0.692
#> SRR957928 1 0.0892 0.9404 0.980 0.000 0.020
#> SRR957929 1 0.1163 0.9378 0.972 0.000 0.028
#> SRR957930 2 0.6274 0.6645 0.000 0.544 0.456
#> SRR957931 2 0.6111 0.6891 0.000 0.604 0.396
#> SRR957932 3 0.5706 0.3688 0.320 0.000 0.680
#> SRR957933 1 0.0892 0.9404 0.980 0.000 0.020
#> SRR957934 2 0.6309 0.6250 0.000 0.504 0.496
#> SRR957935 3 0.6309 -0.6340 0.000 0.496 0.504
#> SRR957936 2 0.0000 0.5652 0.000 1.000 0.000
#> SRR957937 2 0.3192 0.6339 0.000 0.888 0.112
#> SRR957938 2 0.1289 0.5869 0.000 0.968 0.032
#> SRR957939 3 0.6267 0.3452 0.000 0.452 0.548
#> SRR957941 2 0.6309 0.6250 0.000 0.504 0.496
#> SRR957940 3 0.6309 -0.1385 0.500 0.000 0.500
#> SRR957942 2 0.3686 0.6357 0.000 0.860 0.140
#> SRR957943 2 0.0000 0.5652 0.000 1.000 0.000
#> SRR957944 2 0.3412 0.5650 0.000 0.876 0.124
#> SRR957945 3 0.2066 0.7105 0.060 0.000 0.940
#> SRR957946 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957947 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957948 2 0.6062 0.6937 0.000 0.616 0.384
#> SRR957949 2 0.6309 0.6250 0.000 0.504 0.496
#> SRR957950 1 0.0892 0.9404 0.980 0.000 0.020
#> SRR957951 2 0.6111 0.6891 0.000 0.604 0.396
#> SRR957952 3 0.0424 0.6932 0.000 0.008 0.992
#> SRR957953 3 0.1411 0.7239 0.036 0.000 0.964
#> SRR957954 1 0.2066 0.9180 0.940 0.000 0.060
#> SRR957956 3 0.1411 0.7239 0.036 0.000 0.964
#> SRR957957 3 0.6299 0.3168 0.000 0.476 0.524
#> SRR957958 3 0.1411 0.7239 0.036 0.000 0.964
#> SRR957959 3 0.5733 -0.0624 0.000 0.324 0.676
#> SRR957960 2 0.6308 0.6292 0.000 0.508 0.492
#> SRR957961 2 0.6111 0.6891 0.000 0.604 0.396
#> SRR957962 1 0.1529 0.9253 0.960 0.000 0.040
#> SRR957963 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957964 1 0.1529 0.9326 0.960 0.000 0.040
#> SRR957965 2 0.0000 0.5652 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.9397 1.000 0.000 0.000
#> SRR957967 1 0.3941 0.8186 0.844 0.000 0.156
#> SRR957968 3 0.1411 0.7239 0.036 0.000 0.964
#> SRR957969 1 0.2066 0.9180 0.940 0.000 0.060
#> SRR957970 2 0.6295 0.6502 0.000 0.528 0.472
#> SRR957971 3 0.1289 0.7231 0.032 0.000 0.968
#> SRR957972 3 0.1289 0.7231 0.032 0.000 0.968
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0188 0.93321 0.996 0.000 0.004 0.000
#> SRR957915 2 0.0000 0.54903 0.000 1.000 0.000 0.000
#> SRR957916 4 0.6929 0.39495 0.000 0.108 0.440 0.452
#> SRR957884 3 0.2081 0.74492 0.000 0.000 0.916 0.084
#> SRR957885 3 0.1109 0.79699 0.028 0.000 0.968 0.004
#> SRR957886 2 0.2973 0.49233 0.000 0.856 0.000 0.144
#> SRR957887 3 0.0469 0.80461 0.000 0.000 0.988 0.012
#> SRR957888 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957889 1 0.1389 0.92661 0.952 0.000 0.048 0.000
#> SRR957890 1 0.1716 0.92172 0.936 0.000 0.064 0.000
#> SRR957891 2 0.5690 0.34385 0.000 0.700 0.216 0.084
#> SRR957893 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957892 1 0.1302 0.92772 0.956 0.000 0.044 0.000
#> SRR957894 2 0.2760 0.52758 0.000 0.872 0.000 0.128
#> SRR957895 3 0.1118 0.79603 0.000 0.000 0.964 0.036
#> SRR957896 4 0.7803 0.51591 0.000 0.340 0.256 0.404
#> SRR957897 4 0.7798 -0.04365 0.000 0.264 0.320 0.416
#> SRR957898 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957899 2 0.5397 0.36597 0.000 0.720 0.212 0.068
#> SRR957900 4 0.6929 0.39495 0.000 0.108 0.440 0.452
#> SRR957901 2 0.5397 0.36597 0.000 0.720 0.212 0.068
#> SRR957902 4 0.7803 0.51591 0.000 0.340 0.256 0.404
#> SRR957903 3 0.0469 0.80461 0.000 0.000 0.988 0.012
#> SRR957904 3 0.1474 0.77239 0.000 0.000 0.948 0.052
#> SRR957905 3 0.0592 0.80708 0.000 0.000 0.984 0.016
#> SRR957906 2 0.5690 0.34385 0.000 0.700 0.216 0.084
#> SRR957907 4 0.7808 0.51100 0.000 0.344 0.256 0.400
#> SRR957908 2 0.2760 0.52758 0.000 0.872 0.000 0.128
#> SRR957909 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957910 2 0.5397 0.36597 0.000 0.720 0.212 0.068
#> SRR957911 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957912 3 0.7502 0.11729 0.356 0.000 0.456 0.188
#> SRR957913 3 0.0469 0.80461 0.000 0.000 0.988 0.012
#> SRR957917 3 0.7502 0.11729 0.356 0.000 0.456 0.188
#> SRR957918 2 0.3024 0.48870 0.000 0.852 0.000 0.148
#> SRR957920 3 0.5851 0.58538 0.008 0.056 0.680 0.256
#> SRR957919 2 0.5842 0.21096 0.000 0.520 0.032 0.448
#> SRR957921 2 0.7677 -0.29901 0.000 0.412 0.216 0.372
#> SRR957922 4 0.7768 0.53245 0.000 0.312 0.260 0.428
#> SRR957924 3 0.0592 0.80708 0.000 0.000 0.984 0.016
#> SRR957923 4 0.7730 0.00297 0.000 0.264 0.292 0.444
#> SRR957925 4 0.7777 0.53269 0.000 0.316 0.260 0.424
#> SRR957926 1 0.4801 0.81961 0.764 0.000 0.048 0.188
#> SRR957927 4 0.7149 0.35724 0.000 0.156 0.316 0.528
#> SRR957928 1 0.4801 0.81961 0.764 0.000 0.048 0.188
#> SRR957929 1 0.5030 0.80927 0.752 0.000 0.060 0.188
#> SRR957930 4 0.7822 0.47299 0.000 0.364 0.256 0.380
#> SRR957931 2 0.7677 -0.29901 0.000 0.412 0.216 0.372
#> SRR957932 3 0.4304 0.52159 0.284 0.000 0.716 0.000
#> SRR957933 1 0.4801 0.81961 0.764 0.000 0.048 0.188
#> SRR957934 4 0.7768 0.53245 0.000 0.312 0.260 0.428
#> SRR957935 4 0.7795 0.53022 0.000 0.312 0.268 0.420
#> SRR957936 2 0.2760 0.52758 0.000 0.872 0.000 0.128
#> SRR957937 2 0.0000 0.54903 0.000 1.000 0.000 0.000
#> SRR957938 2 0.2281 0.53632 0.000 0.904 0.000 0.096
#> SRR957939 4 0.7782 -0.03095 0.000 0.264 0.312 0.424
#> SRR957941 4 0.7768 0.53245 0.000 0.312 0.260 0.428
#> SRR957940 3 0.7459 0.28972 0.280 0.004 0.524 0.192
#> SRR957942 2 0.2281 0.52178 0.000 0.904 0.000 0.096
#> SRR957943 2 0.2760 0.52758 0.000 0.872 0.000 0.128
#> SRR957944 2 0.5833 0.22493 0.000 0.528 0.032 0.440
#> SRR957945 3 0.1109 0.79699 0.028 0.000 0.968 0.004
#> SRR957946 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957948 2 0.5397 0.36597 0.000 0.720 0.212 0.068
#> SRR957949 4 0.7768 0.53245 0.000 0.312 0.260 0.428
#> SRR957950 1 0.1302 0.92772 0.956 0.000 0.044 0.000
#> SRR957951 2 0.7677 -0.29901 0.000 0.412 0.216 0.372
#> SRR957952 3 0.1940 0.74939 0.000 0.000 0.924 0.076
#> SRR957953 3 0.0592 0.80708 0.000 0.000 0.984 0.016
#> SRR957954 1 0.2450 0.91082 0.912 0.000 0.072 0.016
#> SRR957956 3 0.0592 0.80708 0.000 0.000 0.984 0.016
#> SRR957957 4 0.7732 0.00800 0.000 0.268 0.288 0.444
#> SRR957958 3 0.0592 0.80708 0.000 0.000 0.984 0.016
#> SRR957959 3 0.5231 0.00665 0.000 0.012 0.604 0.384
#> SRR957960 4 0.7777 0.53269 0.000 0.316 0.260 0.424
#> SRR957961 2 0.7677 -0.29901 0.000 0.412 0.216 0.372
#> SRR957962 1 0.1510 0.91965 0.956 0.000 0.028 0.016
#> SRR957963 1 0.0000 0.93289 1.000 0.000 0.000 0.000
#> SRR957964 1 0.1867 0.91874 0.928 0.000 0.072 0.000
#> SRR957965 2 0.2760 0.52758 0.000 0.872 0.000 0.128
#> SRR957966 1 0.0188 0.93321 0.996 0.000 0.004 0.000
#> SRR957967 1 0.3881 0.79787 0.812 0.000 0.172 0.016
#> SRR957968 3 0.0592 0.80708 0.000 0.000 0.984 0.016
#> SRR957969 1 0.2450 0.91082 0.912 0.000 0.072 0.016
#> SRR957970 4 0.7799 0.50380 0.000 0.348 0.252 0.400
#> SRR957971 3 0.0469 0.80461 0.000 0.000 0.988 0.012
#> SRR957972 3 0.0592 0.80376 0.000 0.000 0.984 0.016
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.1124 0.9124 0.960 0.000 0.004 0.036 0.000
#> SRR957915 2 0.3790 0.6568 0.000 0.724 0.000 0.004 0.272
#> SRR957916 5 0.5322 0.4179 0.000 0.000 0.228 0.112 0.660
#> SRR957884 3 0.5185 0.7458 0.000 0.000 0.672 0.100 0.228
#> SRR957885 3 0.4072 0.8280 0.028 0.000 0.772 0.008 0.192
#> SRR957886 2 0.4390 0.4918 0.000 0.568 0.000 0.004 0.428
#> SRR957887 3 0.3039 0.8354 0.000 0.000 0.808 0.000 0.192
#> SRR957888 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957889 1 0.1043 0.9055 0.960 0.000 0.040 0.000 0.000
#> SRR957890 1 0.1341 0.9018 0.944 0.000 0.056 0.000 0.000
#> SRR957891 5 0.4161 0.2991 0.000 0.392 0.000 0.000 0.608
#> SRR957893 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957892 1 0.0963 0.9065 0.964 0.000 0.036 0.000 0.000
#> SRR957894 2 0.0000 0.7100 0.000 1.000 0.000 0.000 0.000
#> SRR957895 3 0.4237 0.8208 0.000 0.000 0.752 0.048 0.200
#> SRR957896 5 0.1267 0.7123 0.000 0.024 0.012 0.004 0.960
#> SRR957897 4 0.3503 0.9511 0.000 0.012 0.060 0.848 0.080
#> SRR957898 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957899 5 0.4256 0.2272 0.000 0.436 0.000 0.000 0.564
#> SRR957900 5 0.5322 0.4179 0.000 0.000 0.228 0.112 0.660
#> SRR957901 5 0.4256 0.2272 0.000 0.436 0.000 0.000 0.564
#> SRR957902 5 0.1267 0.7123 0.000 0.024 0.012 0.004 0.960
#> SRR957903 3 0.3039 0.8354 0.000 0.000 0.808 0.000 0.192
#> SRR957904 3 0.4204 0.8080 0.000 0.000 0.756 0.048 0.196
#> SRR957905 3 0.3760 0.8365 0.000 0.000 0.784 0.028 0.188
#> SRR957906 5 0.4161 0.2991 0.000 0.392 0.000 0.000 0.608
#> SRR957907 5 0.1356 0.7111 0.000 0.028 0.012 0.004 0.956
#> SRR957908 2 0.0000 0.7100 0.000 1.000 0.000 0.000 0.000
#> SRR957909 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957910 5 0.4256 0.2272 0.000 0.436 0.000 0.000 0.564
#> SRR957911 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957912 3 0.4313 0.1444 0.356 0.000 0.636 0.008 0.000
#> SRR957913 3 0.3039 0.8354 0.000 0.000 0.808 0.000 0.192
#> SRR957917 3 0.4313 0.1444 0.356 0.000 0.636 0.008 0.000
#> SRR957918 2 0.4397 0.4843 0.000 0.564 0.000 0.004 0.432
#> SRR957920 3 0.3159 0.5572 0.000 0.000 0.856 0.056 0.088
#> SRR957919 5 0.4974 -0.0615 0.000 0.408 0.000 0.032 0.560
#> SRR957921 5 0.3075 0.6727 0.000 0.092 0.000 0.048 0.860
#> SRR957922 5 0.0404 0.7163 0.000 0.000 0.012 0.000 0.988
#> SRR957924 3 0.3760 0.8365 0.000 0.000 0.784 0.028 0.188
#> SRR957923 4 0.3063 0.9667 0.000 0.012 0.020 0.864 0.104
#> SRR957925 5 0.0566 0.7156 0.000 0.000 0.012 0.004 0.984
#> SRR957926 1 0.3612 0.7755 0.764 0.000 0.228 0.008 0.000
#> SRR957927 5 0.5066 0.3886 0.000 0.020 0.028 0.296 0.656
#> SRR957928 1 0.3612 0.7755 0.764 0.000 0.228 0.008 0.000
#> SRR957929 1 0.3700 0.7646 0.752 0.000 0.240 0.008 0.000
#> SRR957930 5 0.1757 0.7055 0.000 0.048 0.012 0.004 0.936
#> SRR957931 5 0.3075 0.6727 0.000 0.092 0.000 0.048 0.860
#> SRR957932 3 0.4086 0.5041 0.284 0.000 0.704 0.012 0.000
#> SRR957933 1 0.3612 0.7755 0.764 0.000 0.228 0.008 0.000
#> SRR957934 5 0.0404 0.7163 0.000 0.000 0.012 0.000 0.988
#> SRR957935 5 0.0798 0.7148 0.000 0.000 0.016 0.008 0.976
#> SRR957936 2 0.0000 0.7100 0.000 1.000 0.000 0.000 0.000
#> SRR957937 2 0.3790 0.6568 0.000 0.724 0.000 0.004 0.272
#> SRR957938 2 0.3300 0.7019 0.000 0.792 0.000 0.004 0.204
#> SRR957939 4 0.3207 0.9666 0.000 0.012 0.040 0.864 0.084
#> SRR957941 5 0.0404 0.7163 0.000 0.000 0.012 0.000 0.988
#> SRR957940 3 0.4433 0.3253 0.280 0.000 0.696 0.016 0.008
#> SRR957942 2 0.4276 0.5664 0.000 0.616 0.000 0.004 0.380
#> SRR957943 2 0.0000 0.7100 0.000 1.000 0.000 0.000 0.000
#> SRR957944 5 0.4989 -0.0788 0.000 0.416 0.000 0.032 0.552
#> SRR957945 3 0.4072 0.8280 0.028 0.000 0.772 0.008 0.192
#> SRR957946 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957947 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957948 5 0.4256 0.2272 0.000 0.436 0.000 0.000 0.564
#> SRR957949 5 0.0404 0.7163 0.000 0.000 0.012 0.000 0.988
#> SRR957950 1 0.0963 0.9065 0.964 0.000 0.036 0.000 0.000
#> SRR957951 5 0.3075 0.6727 0.000 0.092 0.000 0.048 0.860
#> SRR957952 3 0.4394 0.7910 0.000 0.000 0.732 0.048 0.220
#> SRR957953 3 0.3760 0.8365 0.000 0.000 0.784 0.028 0.188
#> SRR957954 1 0.2054 0.8910 0.920 0.000 0.052 0.028 0.000
#> SRR957956 3 0.3760 0.8365 0.000 0.000 0.784 0.028 0.188
#> SRR957957 4 0.3069 0.9634 0.000 0.016 0.016 0.864 0.104
#> SRR957958 3 0.3760 0.8365 0.000 0.000 0.784 0.028 0.188
#> SRR957959 5 0.5795 -0.1351 0.000 0.000 0.412 0.092 0.496
#> SRR957960 5 0.0566 0.7156 0.000 0.000 0.012 0.004 0.984
#> SRR957961 5 0.3075 0.6727 0.000 0.092 0.000 0.048 0.860
#> SRR957962 1 0.1522 0.8995 0.944 0.000 0.012 0.044 0.000
#> SRR957963 1 0.0963 0.9118 0.964 0.000 0.000 0.036 0.000
#> SRR957964 1 0.1571 0.8997 0.936 0.000 0.060 0.004 0.000
#> SRR957965 2 0.0000 0.7100 0.000 1.000 0.000 0.000 0.000
#> SRR957966 1 0.1124 0.9124 0.960 0.000 0.004 0.036 0.000
#> SRR957967 1 0.3412 0.7850 0.820 0.000 0.152 0.028 0.000
#> SRR957968 3 0.3760 0.8365 0.000 0.000 0.784 0.028 0.188
#> SRR957969 1 0.2054 0.8910 0.920 0.000 0.052 0.028 0.000
#> SRR957970 5 0.1243 0.7108 0.000 0.028 0.008 0.004 0.960
#> SRR957971 3 0.3039 0.8354 0.000 0.000 0.808 0.000 0.192
#> SRR957972 3 0.3196 0.8346 0.000 0.000 0.804 0.004 0.192
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.0508 0.87945 0.984 0.000 0.004 0.000 0.000 0.012
#> SRR957915 2 0.3288 0.62967 0.000 0.724 0.000 0.000 0.276 0.000
#> SRR957916 6 0.6354 1.00000 0.000 0.000 0.124 0.052 0.368 0.456
#> SRR957884 3 0.3150 0.75440 0.000 0.000 0.848 0.096 0.024 0.032
#> SRR957885 3 0.0713 0.82234 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR957886 2 0.3955 0.45211 0.000 0.560 0.000 0.000 0.436 0.004
#> SRR957887 3 0.0260 0.82635 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR957888 1 0.0146 0.87752 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957889 1 0.2230 0.86947 0.892 0.000 0.024 0.000 0.000 0.084
#> SRR957890 1 0.2867 0.86003 0.848 0.000 0.040 0.000 0.000 0.112
#> SRR957891 5 0.5179 0.24872 0.000 0.392 0.000 0.000 0.516 0.092
#> SRR957893 1 0.0146 0.87752 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957892 1 0.2147 0.87031 0.896 0.000 0.020 0.000 0.000 0.084
#> SRR957894 2 0.0000 0.72768 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957895 3 0.1755 0.81561 0.000 0.000 0.932 0.028 0.008 0.032
#> SRR957896 5 0.0547 0.53128 0.000 0.020 0.000 0.000 0.980 0.000
#> SRR957897 4 0.1789 0.93698 0.000 0.000 0.044 0.924 0.032 0.000
#> SRR957898 1 0.0858 0.86606 0.968 0.000 0.000 0.004 0.000 0.028
#> SRR957899 5 0.4936 0.19000 0.000 0.436 0.000 0.000 0.500 0.064
#> SRR957900 6 0.6354 1.00000 0.000 0.000 0.124 0.052 0.368 0.456
#> SRR957901 5 0.4936 0.19000 0.000 0.436 0.000 0.000 0.500 0.064
#> SRR957902 5 0.0547 0.53128 0.000 0.020 0.000 0.000 0.980 0.000
#> SRR957903 3 0.0260 0.82635 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR957904 3 0.1500 0.79884 0.000 0.000 0.936 0.012 0.000 0.052
#> SRR957905 3 0.0935 0.82728 0.000 0.000 0.964 0.000 0.004 0.032
#> SRR957906 5 0.5310 0.24367 0.000 0.392 0.004 0.000 0.512 0.092
#> SRR957907 5 0.0632 0.53195 0.000 0.024 0.000 0.000 0.976 0.000
#> SRR957908 2 0.0000 0.72768 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957909 1 0.0146 0.87752 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957910 5 0.4791 0.19280 0.000 0.436 0.000 0.000 0.512 0.052
#> SRR957911 1 0.0146 0.87752 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957912 3 0.5845 0.28299 0.192 0.000 0.432 0.000 0.000 0.376
#> SRR957913 3 0.0260 0.82635 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR957917 3 0.5845 0.28299 0.192 0.000 0.432 0.000 0.000 0.376
#> SRR957918 2 0.3961 0.44417 0.000 0.556 0.000 0.000 0.440 0.004
#> SRR957920 3 0.4668 0.54970 0.000 0.000 0.660 0.012 0.052 0.276
#> SRR957919 5 0.4521 -0.01100 0.000 0.400 0.000 0.028 0.568 0.004
#> SRR957921 5 0.5347 0.05130 0.000 0.080 0.000 0.016 0.564 0.340
#> SRR957922 5 0.1007 0.50887 0.000 0.000 0.000 0.000 0.956 0.044
#> SRR957924 3 0.0935 0.82728 0.000 0.000 0.964 0.000 0.004 0.032
#> SRR957923 4 0.1204 0.95912 0.000 0.000 0.000 0.944 0.056 0.000
#> SRR957925 5 0.0865 0.50953 0.000 0.000 0.000 0.000 0.964 0.036
#> SRR957926 1 0.4273 0.64235 0.596 0.000 0.024 0.000 0.000 0.380
#> SRR957927 5 0.4668 0.00476 0.000 0.020 0.004 0.328 0.628 0.020
#> SRR957928 1 0.4310 0.62478 0.580 0.000 0.024 0.000 0.000 0.396
#> SRR957929 1 0.4508 0.61164 0.568 0.000 0.036 0.000 0.000 0.396
#> SRR957930 5 0.1082 0.53085 0.000 0.040 0.000 0.000 0.956 0.004
#> SRR957931 5 0.5398 -0.01940 0.000 0.080 0.000 0.016 0.544 0.360
#> SRR957932 3 0.3979 0.55657 0.256 0.000 0.708 0.000 0.000 0.036
#> SRR957933 1 0.4078 0.70232 0.656 0.000 0.024 0.000 0.000 0.320
#> SRR957934 5 0.1007 0.50887 0.000 0.000 0.000 0.000 0.956 0.044
#> SRR957935 5 0.1285 0.49909 0.000 0.000 0.000 0.004 0.944 0.052
#> SRR957936 2 0.0000 0.72768 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957937 2 0.3288 0.62967 0.000 0.724 0.000 0.000 0.276 0.000
#> SRR957938 2 0.2854 0.67753 0.000 0.792 0.000 0.000 0.208 0.000
#> SRR957939 4 0.1408 0.95928 0.000 0.000 0.020 0.944 0.036 0.000
#> SRR957941 5 0.1007 0.50887 0.000 0.000 0.000 0.000 0.956 0.044
#> SRR957940 3 0.5646 0.36943 0.140 0.000 0.500 0.000 0.004 0.356
#> SRR957942 2 0.3727 0.53456 0.000 0.612 0.000 0.000 0.388 0.000
#> SRR957943 2 0.0000 0.72768 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957944 5 0.4536 -0.02994 0.000 0.408 0.000 0.028 0.560 0.004
#> SRR957945 3 0.0713 0.82234 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR957946 1 0.0146 0.87752 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957947 1 0.0146 0.87752 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957948 5 0.4791 0.19280 0.000 0.436 0.000 0.000 0.512 0.052
#> SRR957949 5 0.1007 0.50887 0.000 0.000 0.000 0.000 0.956 0.044
#> SRR957950 1 0.2147 0.87031 0.896 0.000 0.020 0.000 0.000 0.084
#> SRR957951 5 0.5347 0.05130 0.000 0.080 0.000 0.016 0.564 0.340
#> SRR957952 3 0.2123 0.78547 0.000 0.000 0.912 0.012 0.024 0.052
#> SRR957953 3 0.0935 0.82728 0.000 0.000 0.964 0.000 0.004 0.032
#> SRR957954 1 0.2771 0.86016 0.852 0.000 0.032 0.000 0.000 0.116
#> SRR957956 3 0.0935 0.82728 0.000 0.000 0.964 0.000 0.004 0.032
#> SRR957957 4 0.1349 0.95810 0.000 0.004 0.000 0.940 0.056 0.000
#> SRR957958 3 0.0935 0.82728 0.000 0.000 0.964 0.000 0.004 0.032
#> SRR957959 3 0.5380 0.23080 0.000 0.000 0.592 0.024 0.080 0.304
#> SRR957960 5 0.0865 0.50953 0.000 0.000 0.000 0.000 0.964 0.036
#> SRR957961 5 0.5347 0.05130 0.000 0.080 0.000 0.016 0.564 0.340
#> SRR957962 1 0.1584 0.87030 0.928 0.000 0.008 0.000 0.000 0.064
#> SRR957963 1 0.0146 0.87752 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957964 1 0.2956 0.85727 0.840 0.000 0.040 0.000 0.000 0.120
#> SRR957965 2 0.0000 0.72768 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957966 1 0.0291 0.87817 0.992 0.000 0.004 0.004 0.000 0.000
#> SRR957967 1 0.4083 0.76546 0.752 0.000 0.132 0.000 0.000 0.116
#> SRR957968 3 0.0935 0.82728 0.000 0.000 0.964 0.000 0.004 0.032
#> SRR957969 1 0.2771 0.86016 0.852 0.000 0.032 0.000 0.000 0.116
#> SRR957970 5 0.0891 0.53224 0.000 0.024 0.000 0.000 0.968 0.008
#> SRR957971 3 0.0260 0.82635 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR957972 3 0.0363 0.82557 0.000 0.000 0.988 0.000 0.000 0.012
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.959 0.985 0.5056 0.495 0.495
#> 3 3 0.621 0.777 0.879 0.2954 0.736 0.517
#> 4 4 0.706 0.696 0.846 0.1448 0.818 0.523
#> 5 5 0.679 0.631 0.767 0.0566 0.988 0.951
#> 6 6 0.686 0.545 0.673 0.0386 0.916 0.669
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
#> SRR957914 1 0.0000 0.997 1.000 0.000
#> SRR957915 2 0.0000 0.971 0.000 1.000
#> SRR957916 2 0.0000 0.971 0.000 1.000
#> SRR957884 2 0.8909 0.558 0.308 0.692
#> SRR957885 1 0.0000 0.997 1.000 0.000
#> SRR957886 2 0.0000 0.971 0.000 1.000
#> SRR957887 1 0.0000 0.997 1.000 0.000
#> SRR957888 1 0.0000 0.997 1.000 0.000
#> SRR957889 1 0.0000 0.997 1.000 0.000
#> SRR957890 1 0.0000 0.997 1.000 0.000
#> SRR957891 2 0.0000 0.971 0.000 1.000
#> SRR957893 1 0.0000 0.997 1.000 0.000
#> SRR957892 1 0.0000 0.997 1.000 0.000
#> SRR957894 2 0.0000 0.971 0.000 1.000
#> SRR957895 1 0.5178 0.862 0.884 0.116
#> SRR957896 2 0.0000 0.971 0.000 1.000
#> SRR957897 2 0.9970 0.151 0.468 0.532
#> SRR957898 1 0.0000 0.997 1.000 0.000
#> SRR957899 2 0.0000 0.971 0.000 1.000
#> SRR957900 2 0.0000 0.971 0.000 1.000
#> SRR957901 2 0.0000 0.971 0.000 1.000
#> SRR957902 2 0.0000 0.971 0.000 1.000
#> SRR957903 1 0.0000 0.997 1.000 0.000
#> SRR957904 1 0.0000 0.997 1.000 0.000
#> SRR957905 1 0.0000 0.997 1.000 0.000
#> SRR957906 2 0.0000 0.971 0.000 1.000
#> SRR957907 2 0.0000 0.971 0.000 1.000
#> SRR957908 2 0.0000 0.971 0.000 1.000
#> SRR957909 1 0.0000 0.997 1.000 0.000
#> SRR957910 2 0.0000 0.971 0.000 1.000
#> SRR957911 1 0.0000 0.997 1.000 0.000
#> SRR957912 1 0.0000 0.997 1.000 0.000
#> SRR957913 1 0.0000 0.997 1.000 0.000
#> SRR957917 1 0.0000 0.997 1.000 0.000
#> SRR957918 2 0.0000 0.971 0.000 1.000
#> SRR957920 2 0.0376 0.968 0.004 0.996
#> SRR957919 2 0.0000 0.971 0.000 1.000
#> SRR957921 2 0.0000 0.971 0.000 1.000
#> SRR957922 2 0.0000 0.971 0.000 1.000
#> SRR957924 1 0.0000 0.997 1.000 0.000
#> SRR957923 2 0.0000 0.971 0.000 1.000
#> SRR957925 2 0.0000 0.971 0.000 1.000
#> SRR957926 1 0.0000 0.997 1.000 0.000
#> SRR957927 2 0.0000 0.971 0.000 1.000
#> SRR957928 1 0.0000 0.997 1.000 0.000
#> SRR957929 1 0.0000 0.997 1.000 0.000
#> SRR957930 2 0.0000 0.971 0.000 1.000
#> SRR957931 2 0.0000 0.971 0.000 1.000
#> SRR957932 1 0.0000 0.997 1.000 0.000
#> SRR957933 1 0.0000 0.997 1.000 0.000
#> SRR957934 2 0.0000 0.971 0.000 1.000
#> SRR957935 2 0.0000 0.971 0.000 1.000
#> SRR957936 2 0.0000 0.971 0.000 1.000
#> SRR957937 2 0.0000 0.971 0.000 1.000
#> SRR957938 2 0.0000 0.971 0.000 1.000
#> SRR957939 2 0.9963 0.164 0.464 0.536
#> SRR957941 2 0.0000 0.971 0.000 1.000
#> SRR957940 1 0.0000 0.997 1.000 0.000
#> SRR957942 2 0.0000 0.971 0.000 1.000
#> SRR957943 2 0.0000 0.971 0.000 1.000
#> SRR957944 2 0.0000 0.971 0.000 1.000
#> SRR957945 1 0.0000 0.997 1.000 0.000
#> SRR957946 1 0.0000 0.997 1.000 0.000
#> SRR957947 1 0.0000 0.997 1.000 0.000
#> SRR957948 2 0.0000 0.971 0.000 1.000
#> SRR957949 2 0.0000 0.971 0.000 1.000
#> SRR957950 1 0.0000 0.997 1.000 0.000
#> SRR957951 2 0.0000 0.971 0.000 1.000
#> SRR957952 1 0.0376 0.993 0.996 0.004
#> SRR957953 1 0.0000 0.997 1.000 0.000
#> SRR957954 1 0.0000 0.997 1.000 0.000
#> SRR957956 1 0.0000 0.997 1.000 0.000
#> SRR957957 2 0.0000 0.971 0.000 1.000
#> SRR957958 1 0.0000 0.997 1.000 0.000
#> SRR957959 2 0.0000 0.971 0.000 1.000
#> SRR957960 2 0.0000 0.971 0.000 1.000
#> SRR957961 2 0.0000 0.971 0.000 1.000
#> SRR957962 1 0.0000 0.997 1.000 0.000
#> SRR957963 1 0.0000 0.997 1.000 0.000
#> SRR957964 1 0.0000 0.997 1.000 0.000
#> SRR957965 2 0.0000 0.971 0.000 1.000
#> SRR957966 1 0.0000 0.997 1.000 0.000
#> SRR957967 1 0.0000 0.997 1.000 0.000
#> SRR957968 1 0.0000 0.997 1.000 0.000
#> SRR957969 1 0.0000 0.997 1.000 0.000
#> SRR957970 2 0.0000 0.971 0.000 1.000
#> SRR957971 1 0.0000 0.997 1.000 0.000
#> SRR957972 1 0.0000 0.997 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.9452 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957916 3 0.6225 -0.0473 0.000 0.432 0.568
#> SRR957884 3 0.3607 0.7688 0.112 0.008 0.880
#> SRR957885 3 0.4121 0.7472 0.168 0.000 0.832
#> SRR957886 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957887 3 0.3192 0.7688 0.112 0.000 0.888
#> SRR957888 1 0.0000 0.9452 1.000 0.000 0.000
#> SRR957889 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957890 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957891 2 0.3879 0.8728 0.000 0.848 0.152
#> SRR957893 1 0.0000 0.9452 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.9452 1.000 0.000 0.000
#> SRR957894 2 0.0237 0.8905 0.000 0.996 0.004
#> SRR957895 3 0.4741 0.7591 0.152 0.020 0.828
#> SRR957896 2 0.4796 0.8289 0.000 0.780 0.220
#> SRR957897 3 0.6600 0.4693 0.012 0.384 0.604
#> SRR957898 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957899 2 0.4178 0.8635 0.000 0.828 0.172
#> SRR957900 3 0.6274 -0.1344 0.000 0.456 0.544
#> SRR957901 2 0.3879 0.8728 0.000 0.848 0.152
#> SRR957902 2 0.4504 0.8507 0.000 0.804 0.196
#> SRR957903 3 0.3267 0.7685 0.116 0.000 0.884
#> SRR957904 3 0.0424 0.7396 0.008 0.000 0.992
#> SRR957905 3 0.4235 0.7480 0.176 0.000 0.824
#> SRR957906 2 0.3879 0.8728 0.000 0.848 0.152
#> SRR957907 2 0.3879 0.8728 0.000 0.848 0.152
#> SRR957908 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.9452 1.000 0.000 0.000
#> SRR957910 2 0.3116 0.8841 0.000 0.892 0.108
#> SRR957911 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957912 3 0.4796 0.7078 0.220 0.000 0.780
#> SRR957913 3 0.3267 0.7685 0.116 0.000 0.884
#> SRR957917 3 0.3038 0.7679 0.104 0.000 0.896
#> SRR957918 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957920 3 0.0237 0.7370 0.000 0.004 0.996
#> SRR957919 2 0.0237 0.8905 0.000 0.996 0.004
#> SRR957921 2 0.5216 0.7859 0.000 0.740 0.260
#> SRR957922 3 0.6286 -0.1551 0.000 0.464 0.536
#> SRR957924 3 0.4399 0.7415 0.188 0.000 0.812
#> SRR957923 2 0.0424 0.8889 0.000 0.992 0.008
#> SRR957925 2 0.2959 0.8297 0.000 0.900 0.100
#> SRR957926 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957927 2 0.2959 0.8181 0.000 0.900 0.100
#> SRR957928 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957929 1 0.0237 0.9456 0.996 0.000 0.004
#> SRR957930 2 0.3192 0.8842 0.000 0.888 0.112
#> SRR957931 2 0.4178 0.8635 0.000 0.828 0.172
#> SRR957932 3 0.4504 0.7197 0.196 0.000 0.804
#> SRR957933 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957934 2 0.4842 0.8286 0.000 0.776 0.224
#> SRR957935 3 0.6252 -0.0824 0.000 0.444 0.556
#> SRR957936 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957939 3 0.6632 0.4550 0.012 0.392 0.596
#> SRR957941 2 0.5397 0.7605 0.000 0.720 0.280
#> SRR957940 3 0.4346 0.7344 0.184 0.000 0.816
#> SRR957942 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957944 2 0.0237 0.8905 0.000 0.996 0.004
#> SRR957945 3 0.4002 0.7520 0.160 0.000 0.840
#> SRR957946 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957947 1 0.0592 0.9457 0.988 0.000 0.012
#> SRR957948 2 0.3116 0.8841 0.000 0.892 0.108
#> SRR957949 2 0.4842 0.8286 0.000 0.776 0.224
#> SRR957950 1 0.0000 0.9452 1.000 0.000 0.000
#> SRR957951 2 0.5397 0.7605 0.000 0.720 0.280
#> SRR957952 3 0.0424 0.7396 0.008 0.000 0.992
#> SRR957953 3 0.4235 0.7480 0.176 0.000 0.824
#> SRR957954 1 0.4796 0.6982 0.780 0.000 0.220
#> SRR957956 3 0.4235 0.7480 0.176 0.000 0.824
#> SRR957957 2 0.0424 0.8889 0.000 0.992 0.008
#> SRR957958 3 0.4062 0.7558 0.164 0.000 0.836
#> SRR957959 3 0.5650 0.3274 0.000 0.312 0.688
#> SRR957960 3 0.5678 0.3546 0.000 0.316 0.684
#> SRR957961 2 0.5216 0.7859 0.000 0.740 0.260
#> SRR957962 1 0.0892 0.9352 0.980 0.000 0.020
#> SRR957963 1 0.0237 0.9429 0.996 0.000 0.004
#> SRR957964 1 0.1163 0.9366 0.972 0.000 0.028
#> SRR957965 2 0.0000 0.8913 0.000 1.000 0.000
#> SRR957966 1 0.0237 0.9429 0.996 0.000 0.004
#> SRR957967 1 0.6215 0.2168 0.572 0.000 0.428
#> SRR957968 3 0.3752 0.7643 0.144 0.000 0.856
#> SRR957969 1 0.5098 0.6596 0.752 0.000 0.248
#> SRR957970 2 0.0592 0.8916 0.000 0.988 0.012
#> SRR957971 3 0.3267 0.7685 0.116 0.000 0.884
#> SRR957972 3 0.0424 0.7396 0.008 0.000 0.992
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.1339 0.9539 0.964 0.024 0.008 0.004
#> SRR957915 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957916 3 0.1004 0.7321 0.000 0.004 0.972 0.024
#> SRR957884 4 0.0779 0.8331 0.000 0.004 0.016 0.980
#> SRR957885 4 0.2300 0.8362 0.016 0.000 0.064 0.920
#> SRR957886 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957887 4 0.2334 0.8323 0.004 0.000 0.088 0.908
#> SRR957888 1 0.1339 0.9539 0.964 0.024 0.008 0.004
#> SRR957889 1 0.0657 0.9519 0.984 0.012 0.004 0.000
#> SRR957890 1 0.0657 0.9519 0.984 0.012 0.004 0.000
#> SRR957891 2 0.4817 0.3423 0.000 0.612 0.388 0.000
#> SRR957893 1 0.1339 0.9539 0.964 0.024 0.008 0.004
#> SRR957892 1 0.1484 0.9457 0.960 0.020 0.004 0.016
#> SRR957894 2 0.1792 0.7536 0.000 0.932 0.068 0.000
#> SRR957895 4 0.1545 0.8210 0.000 0.008 0.040 0.952
#> SRR957896 3 0.2266 0.7489 0.000 0.084 0.912 0.004
#> SRR957897 4 0.5855 0.3868 0.000 0.356 0.044 0.600
#> SRR957898 1 0.0895 0.9542 0.976 0.020 0.004 0.000
#> SRR957899 3 0.4996 0.0431 0.000 0.484 0.516 0.000
#> SRR957900 3 0.1004 0.7321 0.000 0.004 0.972 0.024
#> SRR957901 2 0.4817 0.3423 0.000 0.612 0.388 0.000
#> SRR957902 3 0.2466 0.7436 0.000 0.096 0.900 0.004
#> SRR957903 4 0.2530 0.8297 0.004 0.000 0.100 0.896
#> SRR957904 4 0.3831 0.7614 0.004 0.000 0.204 0.792
#> SRR957905 4 0.0188 0.8373 0.000 0.000 0.004 0.996
#> SRR957906 2 0.4817 0.3423 0.000 0.612 0.388 0.000
#> SRR957907 3 0.3837 0.6304 0.000 0.224 0.776 0.000
#> SRR957908 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957909 1 0.1339 0.9539 0.964 0.024 0.008 0.004
#> SRR957910 2 0.4817 0.3423 0.000 0.612 0.388 0.000
#> SRR957911 1 0.0895 0.9542 0.976 0.020 0.004 0.000
#> SRR957912 4 0.7083 0.5538 0.288 0.012 0.120 0.580
#> SRR957913 4 0.2530 0.8297 0.004 0.000 0.100 0.896
#> SRR957917 4 0.5229 0.5915 0.008 0.008 0.336 0.648
#> SRR957918 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957920 3 0.4509 0.3787 0.004 0.000 0.708 0.288
#> SRR957919 2 0.4790 0.3172 0.000 0.620 0.380 0.000
#> SRR957921 3 0.5004 0.2970 0.000 0.392 0.604 0.004
#> SRR957922 3 0.1520 0.7412 0.000 0.020 0.956 0.024
#> SRR957924 4 0.0000 0.8379 0.000 0.000 0.000 1.000
#> SRR957923 2 0.6187 0.3400 0.000 0.596 0.336 0.068
#> SRR957925 3 0.5343 0.5071 0.000 0.240 0.708 0.052
#> SRR957926 1 0.0804 0.9512 0.980 0.012 0.008 0.000
#> SRR957927 3 0.6148 -0.0619 0.000 0.468 0.484 0.048
#> SRR957928 1 0.0804 0.9512 0.980 0.012 0.008 0.000
#> SRR957929 1 0.0804 0.9512 0.980 0.012 0.008 0.000
#> SRR957930 3 0.3486 0.6661 0.000 0.188 0.812 0.000
#> SRR957931 3 0.4948 0.1877 0.000 0.440 0.560 0.000
#> SRR957932 4 0.3168 0.8267 0.068 0.004 0.040 0.888
#> SRR957933 1 0.0657 0.9519 0.984 0.012 0.004 0.000
#> SRR957934 3 0.2266 0.7489 0.000 0.084 0.912 0.004
#> SRR957935 3 0.1520 0.7412 0.000 0.020 0.956 0.024
#> SRR957936 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957937 2 0.2814 0.7081 0.000 0.868 0.132 0.000
#> SRR957938 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957939 4 0.6197 0.2708 0.000 0.400 0.056 0.544
#> SRR957941 3 0.1978 0.7500 0.000 0.068 0.928 0.004
#> SRR957940 4 0.1520 0.8392 0.020 0.000 0.024 0.956
#> SRR957942 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957943 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957944 2 0.2868 0.7016 0.000 0.864 0.136 0.000
#> SRR957945 4 0.2530 0.8297 0.004 0.000 0.100 0.896
#> SRR957946 1 0.1042 0.9541 0.972 0.020 0.008 0.000
#> SRR957947 1 0.1042 0.9541 0.972 0.020 0.008 0.000
#> SRR957948 2 0.4817 0.3423 0.000 0.612 0.388 0.000
#> SRR957949 3 0.2197 0.7466 0.000 0.080 0.916 0.004
#> SRR957950 1 0.1707 0.9409 0.952 0.020 0.004 0.024
#> SRR957951 3 0.2197 0.7488 0.000 0.080 0.916 0.004
#> SRR957952 4 0.5070 0.4432 0.004 0.000 0.416 0.580
#> SRR957953 4 0.0188 0.8373 0.000 0.000 0.004 0.996
#> SRR957954 4 0.5392 0.2197 0.424 0.008 0.004 0.564
#> SRR957956 4 0.0000 0.8379 0.000 0.000 0.000 1.000
#> SRR957957 2 0.6153 0.3657 0.000 0.604 0.328 0.068
#> SRR957958 4 0.0188 0.8373 0.000 0.000 0.004 0.996
#> SRR957959 3 0.1716 0.7027 0.000 0.000 0.936 0.064
#> SRR957960 3 0.3243 0.7157 0.000 0.036 0.876 0.088
#> SRR957961 3 0.3908 0.6453 0.000 0.212 0.784 0.004
#> SRR957962 1 0.4725 0.6399 0.728 0.012 0.004 0.256
#> SRR957963 1 0.1543 0.9521 0.956 0.032 0.008 0.004
#> SRR957964 1 0.3895 0.7465 0.804 0.012 0.000 0.184
#> SRR957965 2 0.1389 0.7650 0.000 0.952 0.048 0.000
#> SRR957966 1 0.1339 0.9533 0.964 0.024 0.008 0.004
#> SRR957967 4 0.2778 0.8067 0.080 0.016 0.004 0.900
#> SRR957968 4 0.0188 0.8373 0.000 0.000 0.004 0.996
#> SRR957969 4 0.4899 0.5287 0.300 0.008 0.004 0.688
#> SRR957970 3 0.4933 0.1486 0.000 0.432 0.568 0.000
#> SRR957971 4 0.2530 0.8297 0.004 0.000 0.100 0.896
#> SRR957972 4 0.3791 0.7646 0.004 0.000 0.200 0.796
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.2605 0.87488 0.852 0.000 NA 0.000 0.000
#> SRR957915 2 0.1579 0.72128 0.000 0.944 NA 0.000 0.032
#> SRR957916 5 0.2517 0.68582 0.000 0.008 NA 0.004 0.884
#> SRR957884 4 0.3981 0.67092 0.004 0.004 NA 0.748 0.008
#> SRR957885 4 0.2723 0.73719 0.000 0.000 NA 0.864 0.012
#> SRR957886 2 0.3409 0.69158 0.000 0.836 NA 0.000 0.052
#> SRR957887 4 0.3309 0.73304 0.000 0.000 NA 0.836 0.036
#> SRR957888 1 0.2605 0.87488 0.852 0.000 NA 0.000 0.000
#> SRR957889 1 0.2046 0.85503 0.916 0.000 NA 0.016 0.000
#> SRR957890 1 0.2046 0.85503 0.916 0.000 NA 0.016 0.000
#> SRR957891 2 0.6092 0.41984 0.000 0.564 NA 0.000 0.256
#> SRR957893 1 0.2605 0.87488 0.852 0.000 NA 0.000 0.000
#> SRR957892 1 0.3012 0.84241 0.876 0.008 NA 0.060 0.000
#> SRR957894 2 0.2171 0.69385 0.000 0.912 NA 0.000 0.024
#> SRR957895 4 0.4642 0.60371 0.004 0.004 NA 0.644 0.012
#> SRR957896 5 0.3192 0.69733 0.000 0.040 NA 0.000 0.848
#> SRR957897 4 0.7022 0.27332 0.000 0.244 NA 0.404 0.012
#> SRR957898 1 0.2389 0.87710 0.880 0.000 NA 0.004 0.000
#> SRR957899 5 0.6566 0.00311 0.000 0.380 NA 0.000 0.416
#> SRR957900 5 0.2517 0.68582 0.000 0.008 NA 0.004 0.884
#> SRR957901 2 0.6092 0.41984 0.000 0.564 NA 0.000 0.256
#> SRR957902 5 0.3115 0.69820 0.000 0.036 NA 0.000 0.852
#> SRR957903 4 0.3445 0.72624 0.000 0.000 NA 0.824 0.036
#> SRR957904 4 0.5993 0.52075 0.000 0.000 NA 0.580 0.248
#> SRR957905 4 0.2338 0.73261 0.004 0.000 NA 0.884 0.000
#> SRR957906 2 0.6174 0.40946 0.000 0.552 NA 0.000 0.256
#> SRR957907 5 0.4748 0.61899 0.000 0.100 NA 0.000 0.728
#> SRR957908 2 0.0510 0.72290 0.000 0.984 NA 0.000 0.016
#> SRR957909 1 0.2605 0.87488 0.852 0.000 NA 0.000 0.000
#> SRR957910 2 0.5875 0.44720 0.000 0.592 NA 0.000 0.256
#> SRR957911 1 0.2377 0.87701 0.872 0.000 NA 0.000 0.000
#> SRR957912 4 0.8401 0.37717 0.208 0.000 NA 0.364 0.192
#> SRR957913 4 0.3445 0.72624 0.000 0.000 NA 0.824 0.036
#> SRR957917 4 0.7352 0.42654 0.044 0.000 NA 0.464 0.256
#> SRR957918 2 0.1750 0.71922 0.000 0.936 NA 0.000 0.028
#> SRR957920 5 0.5476 0.40281 0.000 0.000 NA 0.160 0.656
#> SRR957919 2 0.6043 0.22665 0.000 0.540 NA 0.000 0.320
#> SRR957921 5 0.6496 0.27376 0.000 0.280 NA 0.000 0.488
#> SRR957922 5 0.1310 0.71043 0.000 0.020 NA 0.000 0.956
#> SRR957924 4 0.0912 0.74588 0.016 0.000 NA 0.972 0.000
#> SRR957923 2 0.6768 0.23863 0.000 0.440 NA 0.008 0.200
#> SRR957925 5 0.3555 0.64587 0.000 0.052 NA 0.000 0.824
#> SRR957926 1 0.1571 0.86064 0.936 0.000 NA 0.004 0.000
#> SRR957927 5 0.6299 0.15689 0.000 0.348 NA 0.004 0.504
#> SRR957928 1 0.2351 0.84734 0.896 0.000 NA 0.016 0.000
#> SRR957929 1 0.2490 0.85132 0.896 0.000 NA 0.020 0.004
#> SRR957930 5 0.3752 0.67951 0.000 0.064 NA 0.000 0.812
#> SRR957931 5 0.6428 0.29334 0.000 0.272 NA 0.000 0.504
#> SRR957932 4 0.5063 0.69525 0.120 0.004 NA 0.732 0.008
#> SRR957933 1 0.2046 0.85503 0.916 0.000 NA 0.016 0.000
#> SRR957934 5 0.1331 0.71604 0.000 0.040 NA 0.000 0.952
#> SRR957935 5 0.0771 0.71445 0.000 0.020 NA 0.000 0.976
#> SRR957936 2 0.0510 0.72290 0.000 0.984 NA 0.000 0.016
#> SRR957937 2 0.4309 0.64025 0.000 0.768 NA 0.000 0.084
#> SRR957938 2 0.0609 0.72202 0.000 0.980 NA 0.000 0.020
#> SRR957939 4 0.7251 0.21102 0.000 0.272 NA 0.368 0.020
#> SRR957941 5 0.1836 0.71792 0.000 0.032 NA 0.000 0.932
#> SRR957940 4 0.1597 0.73916 0.048 0.000 NA 0.940 0.000
#> SRR957942 2 0.3033 0.69496 0.000 0.864 NA 0.000 0.052
#> SRR957943 2 0.0510 0.72290 0.000 0.984 NA 0.000 0.016
#> SRR957944 2 0.3752 0.63929 0.000 0.812 NA 0.000 0.064
#> SRR957945 4 0.3284 0.72891 0.000 0.000 NA 0.828 0.024
#> SRR957946 1 0.2389 0.87710 0.880 0.000 NA 0.004 0.000
#> SRR957947 1 0.2439 0.87732 0.876 0.000 NA 0.004 0.000
#> SRR957948 2 0.5875 0.44720 0.000 0.592 NA 0.000 0.256
#> SRR957949 5 0.1041 0.71549 0.000 0.032 NA 0.000 0.964
#> SRR957950 1 0.3384 0.82441 0.852 0.008 NA 0.084 0.000
#> SRR957951 5 0.4054 0.67078 0.000 0.036 NA 0.000 0.760
#> SRR957952 5 0.6392 -0.15405 0.000 0.000 NA 0.372 0.456
#> SRR957953 4 0.2338 0.73261 0.004 0.000 NA 0.884 0.000
#> SRR957954 4 0.4981 0.34573 0.360 0.012 NA 0.608 0.000
#> SRR957956 4 0.0865 0.74468 0.004 0.000 NA 0.972 0.000
#> SRR957957 2 0.6779 0.26028 0.000 0.452 NA 0.012 0.184
#> SRR957958 4 0.2389 0.73141 0.004 0.000 NA 0.880 0.000
#> SRR957959 5 0.3343 0.62246 0.000 0.000 NA 0.016 0.812
#> SRR957960 5 0.2264 0.70301 0.000 0.024 NA 0.004 0.912
#> SRR957961 5 0.5821 0.51408 0.000 0.156 NA 0.000 0.604
#> SRR957962 1 0.5721 0.41487 0.576 0.012 NA 0.344 0.000
#> SRR957963 1 0.2971 0.87218 0.836 0.008 NA 0.000 0.000
#> SRR957964 1 0.3918 0.74130 0.804 0.008 NA 0.144 0.000
#> SRR957965 2 0.0510 0.72290 0.000 0.984 NA 0.000 0.016
#> SRR957966 1 0.2488 0.87806 0.872 0.004 NA 0.000 0.000
#> SRR957967 4 0.4343 0.64692 0.176 0.012 NA 0.768 0.000
#> SRR957968 4 0.2338 0.73272 0.004 0.000 NA 0.884 0.000
#> SRR957969 4 0.4754 0.46840 0.304 0.012 NA 0.664 0.000
#> SRR957970 5 0.5928 0.43153 0.000 0.212 NA 0.000 0.596
#> SRR957971 4 0.3445 0.72624 0.000 0.000 NA 0.824 0.036
#> SRR957972 4 0.5971 0.52459 0.000 0.000 NA 0.584 0.244
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.2361 0.7491 0.896 0.000 0.032 0.008 0.000 0.064
#> SRR957915 2 0.0881 0.6884 0.000 0.972 0.012 0.000 0.008 0.008
#> SRR957916 5 0.3835 0.6729 0.000 0.000 0.204 0.000 0.748 0.048
#> SRR957884 4 0.5257 0.1524 0.000 0.000 0.104 0.524 0.000 0.372
#> SRR957885 3 0.4300 0.3765 0.004 0.000 0.528 0.456 0.000 0.012
#> SRR957886 2 0.1962 0.6826 0.000 0.924 0.020 0.000 0.028 0.028
#> SRR957887 3 0.4268 0.4312 0.004 0.000 0.556 0.428 0.000 0.012
#> SRR957888 1 0.2361 0.7491 0.896 0.000 0.032 0.008 0.000 0.064
#> SRR957889 1 0.5637 0.7203 0.648 0.000 0.068 0.200 0.004 0.080
#> SRR957890 1 0.5637 0.7203 0.648 0.000 0.068 0.200 0.004 0.080
#> SRR957891 2 0.6670 0.3705 0.000 0.480 0.060 0.000 0.252 0.208
#> SRR957893 1 0.2361 0.7491 0.896 0.000 0.032 0.008 0.000 0.064
#> SRR957892 1 0.6217 0.6078 0.468 0.000 0.084 0.380 0.000 0.068
#> SRR957894 2 0.2039 0.6222 0.000 0.904 0.020 0.000 0.000 0.076
#> SRR957895 6 0.5517 0.1014 0.000 0.000 0.092 0.408 0.012 0.488
#> SRR957896 5 0.0858 0.7489 0.000 0.004 0.000 0.000 0.968 0.028
#> SRR957897 6 0.6348 0.5628 0.000 0.124 0.084 0.240 0.000 0.552
#> SRR957898 1 0.0146 0.7602 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR957899 5 0.6974 0.1230 0.000 0.264 0.076 0.000 0.428 0.232
#> SRR957900 5 0.3835 0.6729 0.000 0.000 0.204 0.000 0.748 0.048
#> SRR957901 2 0.6670 0.3705 0.000 0.480 0.060 0.000 0.252 0.208
#> SRR957902 5 0.1080 0.7496 0.000 0.004 0.004 0.000 0.960 0.032
#> SRR957903 3 0.4256 0.4432 0.004 0.000 0.564 0.420 0.000 0.012
#> SRR957904 3 0.4533 0.5144 0.004 0.000 0.700 0.208 0.088 0.000
#> SRR957905 4 0.4526 0.5466 0.000 0.000 0.164 0.704 0.000 0.132
#> SRR957906 2 0.6949 0.3117 0.000 0.436 0.076 0.000 0.260 0.228
#> SRR957907 5 0.3529 0.6943 0.000 0.048 0.016 0.000 0.816 0.120
#> SRR957908 2 0.0508 0.6865 0.000 0.984 0.012 0.000 0.000 0.004
#> SRR957909 1 0.2361 0.7491 0.896 0.000 0.032 0.008 0.000 0.064
#> SRR957910 2 0.6355 0.3888 0.000 0.508 0.040 0.000 0.264 0.188
#> SRR957911 1 0.0458 0.7581 0.984 0.000 0.000 0.000 0.000 0.016
#> SRR957912 3 0.7779 0.1787 0.092 0.000 0.432 0.280 0.096 0.100
#> SRR957913 3 0.4256 0.4432 0.004 0.000 0.564 0.420 0.000 0.012
#> SRR957917 3 0.6183 0.4139 0.004 0.000 0.604 0.164 0.148 0.080
#> SRR957918 2 0.1251 0.6779 0.000 0.956 0.008 0.000 0.012 0.024
#> SRR957920 3 0.4966 0.0663 0.000 0.000 0.516 0.036 0.432 0.016
#> SRR957919 2 0.5901 0.0174 0.000 0.528 0.020 0.000 0.308 0.144
#> SRR957921 5 0.6688 0.3538 0.000 0.168 0.088 0.000 0.508 0.236
#> SRR957922 5 0.2313 0.7236 0.000 0.004 0.100 0.000 0.884 0.012
#> SRR957924 4 0.4280 0.4868 0.000 0.000 0.228 0.716 0.012 0.044
#> SRR957923 6 0.5814 0.4937 0.000 0.348 0.004 0.020 0.104 0.524
#> SRR957925 5 0.3858 0.6789 0.000 0.024 0.068 0.000 0.800 0.108
#> SRR957926 1 0.5793 0.7196 0.640 0.000 0.084 0.188 0.004 0.084
#> SRR957927 5 0.5802 0.1733 0.000 0.304 0.000 0.004 0.508 0.184
#> SRR957928 1 0.6302 0.6900 0.588 0.000 0.112 0.196 0.004 0.100
#> SRR957929 1 0.6596 0.6927 0.548 0.000 0.108 0.216 0.004 0.124
#> SRR957930 5 0.2342 0.7404 0.000 0.024 0.032 0.000 0.904 0.040
#> SRR957931 5 0.6400 0.3818 0.000 0.168 0.068 0.000 0.544 0.220
#> SRR957932 4 0.4334 -0.1835 0.004 0.000 0.392 0.588 0.004 0.012
#> SRR957933 1 0.5637 0.7203 0.648 0.000 0.068 0.200 0.004 0.080
#> SRR957934 5 0.1152 0.7456 0.000 0.004 0.044 0.000 0.952 0.000
#> SRR957935 5 0.1901 0.7354 0.000 0.004 0.076 0.000 0.912 0.008
#> SRR957936 2 0.0508 0.6865 0.000 0.984 0.012 0.000 0.000 0.004
#> SRR957937 2 0.3633 0.6243 0.000 0.792 0.004 0.000 0.056 0.148
#> SRR957938 2 0.0508 0.6857 0.000 0.984 0.012 0.000 0.000 0.004
#> SRR957939 6 0.6447 0.6029 0.000 0.168 0.084 0.196 0.000 0.552
#> SRR957941 5 0.1036 0.7504 0.000 0.004 0.008 0.000 0.964 0.024
#> SRR957940 4 0.3455 0.4670 0.000 0.000 0.200 0.776 0.004 0.020
#> SRR957942 2 0.1003 0.6903 0.000 0.964 0.000 0.000 0.020 0.016
#> SRR957943 2 0.0508 0.6865 0.000 0.984 0.012 0.000 0.000 0.004
#> SRR957944 2 0.3526 0.5282 0.000 0.816 0.020 0.000 0.040 0.124
#> SRR957945 3 0.4262 0.4426 0.004 0.000 0.560 0.424 0.000 0.012
#> SRR957946 1 0.0363 0.7600 0.988 0.000 0.012 0.000 0.000 0.000
#> SRR957947 1 0.0508 0.7602 0.984 0.000 0.012 0.000 0.000 0.004
#> SRR957948 2 0.6355 0.3888 0.000 0.508 0.040 0.000 0.264 0.188
#> SRR957949 5 0.1707 0.7404 0.000 0.004 0.056 0.000 0.928 0.012
#> SRR957950 1 0.6235 0.5777 0.448 0.000 0.084 0.400 0.000 0.068
#> SRR957951 5 0.4382 0.6442 0.000 0.004 0.080 0.000 0.716 0.200
#> SRR957952 3 0.4736 0.3997 0.000 0.000 0.620 0.072 0.308 0.000
#> SRR957953 4 0.4526 0.5466 0.000 0.000 0.164 0.704 0.000 0.132
#> SRR957954 4 0.2400 0.4603 0.116 0.000 0.004 0.872 0.000 0.008
#> SRR957956 4 0.4120 0.5148 0.000 0.000 0.204 0.728 0.000 0.068
#> SRR957957 6 0.5711 0.4927 0.000 0.352 0.004 0.016 0.100 0.528
#> SRR957958 4 0.4566 0.5452 0.000 0.000 0.160 0.700 0.000 0.140
#> SRR957959 5 0.4535 0.5449 0.000 0.000 0.296 0.000 0.644 0.060
#> SRR957960 5 0.2830 0.7152 0.000 0.004 0.064 0.000 0.864 0.068
#> SRR957961 5 0.5873 0.5254 0.000 0.072 0.088 0.000 0.600 0.240
#> SRR957962 4 0.4826 -0.0986 0.312 0.000 0.036 0.628 0.000 0.024
#> SRR957963 1 0.3843 0.7254 0.808 0.000 0.036 0.088 0.000 0.068
#> SRR957964 1 0.5687 0.6257 0.572 0.000 0.064 0.316 0.004 0.044
#> SRR957965 2 0.0508 0.6880 0.000 0.984 0.012 0.000 0.000 0.004
#> SRR957966 1 0.4442 0.7389 0.752 0.000 0.036 0.144 0.000 0.068
#> SRR957967 4 0.0767 0.5115 0.012 0.000 0.004 0.976 0.000 0.008
#> SRR957968 4 0.4563 0.5446 0.000 0.000 0.164 0.700 0.000 0.136
#> SRR957969 4 0.2420 0.4650 0.108 0.000 0.008 0.876 0.000 0.008
#> SRR957970 5 0.4780 0.5775 0.000 0.180 0.024 0.000 0.708 0.088
#> SRR957971 3 0.4262 0.4426 0.004 0.000 0.560 0.424 0.000 0.012
#> SRR957972 3 0.4541 0.5141 0.004 0.000 0.704 0.196 0.096 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "skmeans"]
# you can also extract it by
# res = res_list["ATC:skmeans"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.962 0.986 0.5059 0.495 0.495
#> 3 3 0.739 0.801 0.833 0.2329 0.862 0.729
#> 4 4 0.779 0.704 0.834 0.1344 0.917 0.792
#> 5 5 0.820 0.806 0.894 0.0892 0.878 0.635
#> 6 6 0.797 0.760 0.850 0.0364 0.957 0.808
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
#> SRR957914 1 0.000 0.9821 1.000 0.000
#> SRR957915 2 0.000 0.9884 0.000 1.000
#> SRR957916 2 0.000 0.9884 0.000 1.000
#> SRR957884 1 0.615 0.8166 0.848 0.152
#> SRR957885 1 0.000 0.9821 1.000 0.000
#> SRR957886 2 0.000 0.9884 0.000 1.000
#> SRR957887 1 0.000 0.9821 1.000 0.000
#> SRR957888 1 0.000 0.9821 1.000 0.000
#> SRR957889 1 0.000 0.9821 1.000 0.000
#> SRR957890 1 0.000 0.9821 1.000 0.000
#> SRR957891 2 0.000 0.9884 0.000 1.000
#> SRR957893 1 0.000 0.9821 1.000 0.000
#> SRR957892 1 0.000 0.9821 1.000 0.000
#> SRR957894 2 0.000 0.9884 0.000 1.000
#> SRR957895 1 0.000 0.9821 1.000 0.000
#> SRR957896 2 0.000 0.9884 0.000 1.000
#> SRR957897 1 0.978 0.2918 0.588 0.412
#> SRR957898 1 0.000 0.9821 1.000 0.000
#> SRR957899 2 0.000 0.9884 0.000 1.000
#> SRR957900 2 0.000 0.9884 0.000 1.000
#> SRR957901 2 0.000 0.9884 0.000 1.000
#> SRR957902 2 0.000 0.9884 0.000 1.000
#> SRR957903 1 0.000 0.9821 1.000 0.000
#> SRR957904 1 0.000 0.9821 1.000 0.000
#> SRR957905 1 0.000 0.9821 1.000 0.000
#> SRR957906 2 0.000 0.9884 0.000 1.000
#> SRR957907 2 0.000 0.9884 0.000 1.000
#> SRR957908 2 0.000 0.9884 0.000 1.000
#> SRR957909 1 0.000 0.9821 1.000 0.000
#> SRR957910 2 0.000 0.9884 0.000 1.000
#> SRR957911 1 0.000 0.9821 1.000 0.000
#> SRR957912 1 0.000 0.9821 1.000 0.000
#> SRR957913 1 0.000 0.9821 1.000 0.000
#> SRR957917 1 0.000 0.9821 1.000 0.000
#> SRR957918 2 0.000 0.9884 0.000 1.000
#> SRR957920 2 0.000 0.9884 0.000 1.000
#> SRR957919 2 0.000 0.9884 0.000 1.000
#> SRR957921 2 0.000 0.9884 0.000 1.000
#> SRR957922 2 0.000 0.9884 0.000 1.000
#> SRR957924 1 0.000 0.9821 1.000 0.000
#> SRR957923 2 0.000 0.9884 0.000 1.000
#> SRR957925 2 0.000 0.9884 0.000 1.000
#> SRR957926 1 0.000 0.9821 1.000 0.000
#> SRR957927 2 0.000 0.9884 0.000 1.000
#> SRR957928 1 0.000 0.9821 1.000 0.000
#> SRR957929 1 0.000 0.9821 1.000 0.000
#> SRR957930 2 0.000 0.9884 0.000 1.000
#> SRR957931 2 0.000 0.9884 0.000 1.000
#> SRR957932 1 0.000 0.9821 1.000 0.000
#> SRR957933 1 0.000 0.9821 1.000 0.000
#> SRR957934 2 0.000 0.9884 0.000 1.000
#> SRR957935 2 0.000 0.9884 0.000 1.000
#> SRR957936 2 0.000 0.9884 0.000 1.000
#> SRR957937 2 0.000 0.9884 0.000 1.000
#> SRR957938 2 0.000 0.9884 0.000 1.000
#> SRR957939 2 0.998 0.0655 0.476 0.524
#> SRR957941 2 0.000 0.9884 0.000 1.000
#> SRR957940 1 0.000 0.9821 1.000 0.000
#> SRR957942 2 0.000 0.9884 0.000 1.000
#> SRR957943 2 0.000 0.9884 0.000 1.000
#> SRR957944 2 0.000 0.9884 0.000 1.000
#> SRR957945 1 0.000 0.9821 1.000 0.000
#> SRR957946 1 0.000 0.9821 1.000 0.000
#> SRR957947 1 0.000 0.9821 1.000 0.000
#> SRR957948 2 0.000 0.9884 0.000 1.000
#> SRR957949 2 0.000 0.9884 0.000 1.000
#> SRR957950 1 0.000 0.9821 1.000 0.000
#> SRR957951 2 0.000 0.9884 0.000 1.000
#> SRR957952 1 0.730 0.7398 0.796 0.204
#> SRR957953 1 0.000 0.9821 1.000 0.000
#> SRR957954 1 0.000 0.9821 1.000 0.000
#> SRR957956 1 0.000 0.9821 1.000 0.000
#> SRR957957 2 0.000 0.9884 0.000 1.000
#> SRR957958 1 0.000 0.9821 1.000 0.000
#> SRR957959 2 0.000 0.9884 0.000 1.000
#> SRR957960 2 0.000 0.9884 0.000 1.000
#> SRR957961 2 0.000 0.9884 0.000 1.000
#> SRR957962 1 0.000 0.9821 1.000 0.000
#> SRR957963 1 0.000 0.9821 1.000 0.000
#> SRR957964 1 0.000 0.9821 1.000 0.000
#> SRR957965 2 0.000 0.9884 0.000 1.000
#> SRR957966 1 0.000 0.9821 1.000 0.000
#> SRR957967 1 0.000 0.9821 1.000 0.000
#> SRR957968 1 0.000 0.9821 1.000 0.000
#> SRR957969 1 0.000 0.9821 1.000 0.000
#> SRR957970 2 0.000 0.9884 0.000 1.000
#> SRR957971 1 0.000 0.9821 1.000 0.000
#> SRR957972 1 0.000 0.9821 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957916 2 0.5058 0.7094 0.000 0.756 0.244
#> SRR957884 3 0.9267 -0.0979 0.380 0.160 0.460
#> SRR957885 1 0.6180 0.2224 0.584 0.000 0.416
#> SRR957886 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957887 3 0.0592 0.6478 0.012 0.000 0.988
#> SRR957888 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957889 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957890 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957891 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957893 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957892 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957894 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957895 1 0.5680 0.6590 0.764 0.024 0.212
#> SRR957896 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957897 1 0.7824 0.5249 0.664 0.124 0.212
#> SRR957898 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957899 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957900 2 0.5058 0.7094 0.000 0.756 0.244
#> SRR957901 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957902 2 0.0237 0.9516 0.000 0.996 0.004
#> SRR957903 3 0.4605 0.7632 0.204 0.000 0.796
#> SRR957904 3 0.4702 0.7614 0.212 0.000 0.788
#> SRR957905 1 0.5968 0.5597 0.636 0.000 0.364
#> SRR957906 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957907 2 0.0237 0.9516 0.000 0.996 0.004
#> SRR957908 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957910 2 0.0237 0.9516 0.000 0.996 0.004
#> SRR957911 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957912 1 0.4974 0.5344 0.764 0.000 0.236
#> SRR957913 3 0.4605 0.7632 0.204 0.000 0.796
#> SRR957917 3 0.6140 0.5101 0.404 0.000 0.596
#> SRR957918 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957920 3 0.6081 0.3709 0.004 0.344 0.652
#> SRR957919 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957921 2 0.4974 0.7210 0.000 0.764 0.236
#> SRR957922 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957924 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957923 2 0.0424 0.9472 0.000 0.992 0.008
#> SRR957925 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957926 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957927 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957928 1 0.1529 0.8274 0.960 0.000 0.040
#> SRR957929 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957930 2 0.0237 0.9516 0.000 0.996 0.004
#> SRR957931 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957932 1 0.5591 0.5051 0.696 0.000 0.304
#> SRR957933 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957934 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957935 2 0.1031 0.9446 0.000 0.976 0.024
#> SRR957936 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957939 1 0.9017 0.3319 0.560 0.228 0.212
#> SRR957941 2 0.4931 0.7263 0.000 0.768 0.232
#> SRR957940 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957942 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957945 3 0.4974 0.7364 0.236 0.000 0.764
#> SRR957946 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957947 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957948 2 0.0237 0.9516 0.000 0.996 0.004
#> SRR957949 2 0.0237 0.9516 0.000 0.996 0.004
#> SRR957950 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957951 2 0.4974 0.7210 0.000 0.764 0.236
#> SRR957952 3 0.5305 0.7595 0.192 0.020 0.788
#> SRR957953 1 0.5968 0.5597 0.636 0.000 0.364
#> SRR957954 1 0.3340 0.7737 0.880 0.000 0.120
#> SRR957956 1 0.4062 0.7309 0.836 0.000 0.164
#> SRR957957 2 0.0424 0.9472 0.000 0.992 0.008
#> SRR957958 1 0.5968 0.5597 0.636 0.000 0.364
#> SRR957959 3 0.5835 0.3879 0.000 0.340 0.660
#> SRR957960 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957961 2 0.4974 0.7210 0.000 0.764 0.236
#> SRR957962 1 0.0237 0.8561 0.996 0.000 0.004
#> SRR957963 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957964 1 0.2261 0.8147 0.932 0.000 0.068
#> SRR957965 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.8579 1.000 0.000 0.000
#> SRR957967 1 0.0237 0.8561 0.996 0.000 0.004
#> SRR957968 1 0.6299 0.3506 0.524 0.000 0.476
#> SRR957969 1 0.3340 0.7737 0.880 0.000 0.120
#> SRR957970 2 0.0000 0.9519 0.000 1.000 0.000
#> SRR957971 3 0.4605 0.7632 0.204 0.000 0.796
#> SRR957972 3 0.4702 0.7614 0.212 0.000 0.788
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957915 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957916 2 0.4843 0.7528 0.000 0.604 0.396 0.000
#> SRR957884 4 0.0188 0.6041 0.000 0.004 0.000 0.996
#> SRR957885 3 0.7644 0.3825 0.208 0.000 0.412 0.380
#> SRR957886 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957887 3 0.4804 0.6843 0.000 0.000 0.616 0.384
#> SRR957888 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957889 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957890 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957891 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957893 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957894 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957895 4 0.4761 0.5248 0.000 0.372 0.000 0.628
#> SRR957896 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957897 4 0.4790 0.5213 0.000 0.380 0.000 0.620
#> SRR957898 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957899 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957900 2 0.4843 0.7528 0.000 0.604 0.396 0.000
#> SRR957901 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957902 2 0.4697 0.7671 0.000 0.644 0.356 0.000
#> SRR957903 3 0.4790 0.6873 0.000 0.000 0.620 0.380
#> SRR957904 3 0.4697 0.6856 0.000 0.000 0.644 0.356
#> SRR957905 4 0.0188 0.6048 0.004 0.000 0.000 0.996
#> SRR957906 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957907 2 0.4697 0.7671 0.000 0.644 0.356 0.000
#> SRR957908 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957909 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957910 2 0.4697 0.7671 0.000 0.644 0.356 0.000
#> SRR957911 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957912 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957913 3 0.4790 0.6873 0.000 0.000 0.620 0.380
#> SRR957917 1 0.4252 0.6225 0.744 0.000 0.252 0.004
#> SRR957918 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957920 3 0.0188 0.4601 0.000 0.000 0.996 0.004
#> SRR957919 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957921 2 0.4843 0.7528 0.000 0.604 0.396 0.000
#> SRR957922 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957924 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957923 2 0.4877 -0.2051 0.000 0.592 0.000 0.408
#> SRR957925 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957926 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957927 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957928 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957929 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957930 2 0.4679 0.7672 0.000 0.648 0.352 0.000
#> SRR957931 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957932 1 0.4643 0.5303 0.656 0.000 0.000 0.344
#> SRR957933 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957934 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957935 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957936 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957937 2 0.4643 0.7669 0.000 0.656 0.344 0.000
#> SRR957938 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957939 4 0.4790 0.5213 0.000 0.380 0.000 0.620
#> SRR957941 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957940 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957942 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957943 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957944 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957945 3 0.4790 0.6873 0.000 0.000 0.620 0.380
#> SRR957946 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957948 2 0.4679 0.7672 0.000 0.648 0.352 0.000
#> SRR957949 2 0.4790 0.7632 0.000 0.620 0.380 0.000
#> SRR957950 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957951 2 0.4843 0.7528 0.000 0.604 0.396 0.000
#> SRR957952 3 0.0336 0.4629 0.000 0.000 0.992 0.008
#> SRR957953 4 0.0188 0.6048 0.004 0.000 0.000 0.996
#> SRR957954 1 0.4713 0.5023 0.640 0.000 0.000 0.360
#> SRR957956 4 0.4907 -0.0176 0.420 0.000 0.000 0.580
#> SRR957957 2 0.4907 -0.2357 0.000 0.580 0.000 0.420
#> SRR957958 4 0.0188 0.6048 0.004 0.000 0.000 0.996
#> SRR957959 3 0.3649 0.0576 0.000 0.204 0.796 0.000
#> SRR957960 2 0.1302 0.7120 0.000 0.956 0.044 0.000
#> SRR957961 2 0.4843 0.7528 0.000 0.604 0.396 0.000
#> SRR957962 1 0.3649 0.7414 0.796 0.000 0.000 0.204
#> SRR957963 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957964 1 0.3444 0.7600 0.816 0.000 0.000 0.184
#> SRR957965 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957966 1 0.0000 0.9178 1.000 0.000 0.000 0.000
#> SRR957967 1 0.3649 0.7414 0.796 0.000 0.000 0.204
#> SRR957968 4 0.0000 0.6008 0.000 0.000 0.000 1.000
#> SRR957969 1 0.4661 0.5218 0.652 0.000 0.000 0.348
#> SRR957970 2 0.0000 0.7006 0.000 1.000 0.000 0.000
#> SRR957971 3 0.4790 0.6873 0.000 0.000 0.620 0.380
#> SRR957972 3 0.4679 0.6839 0.000 0.000 0.648 0.352
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957915 2 0.0162 0.9381 0.000 0.996 0.000 0.000 0.004
#> SRR957916 5 0.0794 0.7198 0.000 0.000 0.028 0.000 0.972
#> SRR957884 4 0.0000 0.8342 0.000 0.000 0.000 1.000 0.000
#> SRR957885 3 0.1750 0.8697 0.036 0.000 0.936 0.028 0.000
#> SRR957886 2 0.0290 0.9353 0.000 0.992 0.000 0.000 0.008
#> SRR957887 3 0.0794 0.8949 0.000 0.000 0.972 0.028 0.000
#> SRR957888 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957889 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957890 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957891 5 0.3366 0.8714 0.000 0.232 0.000 0.000 0.768
#> SRR957893 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957894 2 0.0000 0.9380 0.000 1.000 0.000 0.000 0.000
#> SRR957895 4 0.0794 0.8250 0.000 0.028 0.000 0.972 0.000
#> SRR957896 5 0.3003 0.8720 0.000 0.188 0.000 0.000 0.812
#> SRR957897 4 0.2179 0.7658 0.000 0.112 0.000 0.888 0.000
#> SRR957898 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957899 5 0.3305 0.8739 0.000 0.224 0.000 0.000 0.776
#> SRR957900 5 0.0794 0.7198 0.000 0.000 0.028 0.000 0.972
#> SRR957901 5 0.3366 0.8714 0.000 0.232 0.000 0.000 0.768
#> SRR957902 5 0.3730 0.8308 0.000 0.288 0.000 0.000 0.712
#> SRR957903 3 0.0794 0.8949 0.000 0.000 0.972 0.028 0.000
#> SRR957904 3 0.0404 0.8867 0.000 0.000 0.988 0.000 0.012
#> SRR957905 4 0.0404 0.8355 0.000 0.000 0.012 0.988 0.000
#> SRR957906 5 0.3395 0.8694 0.000 0.236 0.000 0.000 0.764
#> SRR957907 5 0.3730 0.8308 0.000 0.288 0.000 0.000 0.712
#> SRR957908 2 0.0162 0.9381 0.000 0.996 0.000 0.000 0.004
#> SRR957909 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957910 5 0.3730 0.8308 0.000 0.288 0.000 0.000 0.712
#> SRR957911 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957912 1 0.0609 0.8977 0.980 0.000 0.020 0.000 0.000
#> SRR957913 3 0.0794 0.8949 0.000 0.000 0.972 0.028 0.000
#> SRR957917 3 0.4341 0.3690 0.364 0.000 0.628 0.000 0.008
#> SRR957918 2 0.0162 0.9381 0.000 0.996 0.000 0.000 0.004
#> SRR957920 3 0.2929 0.7974 0.000 0.000 0.820 0.000 0.180
#> SRR957919 2 0.0000 0.9380 0.000 1.000 0.000 0.000 0.000
#> SRR957921 5 0.3109 0.8746 0.000 0.200 0.000 0.000 0.800
#> SRR957922 5 0.0955 0.7244 0.000 0.004 0.028 0.000 0.968
#> SRR957924 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957923 2 0.0794 0.9161 0.000 0.972 0.000 0.028 0.000
#> SRR957925 2 0.1341 0.8865 0.000 0.944 0.000 0.000 0.056
#> SRR957926 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957927 2 0.0000 0.9380 0.000 1.000 0.000 0.000 0.000
#> SRR957928 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957929 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957930 5 0.3730 0.8308 0.000 0.288 0.000 0.000 0.712
#> SRR957931 5 0.3210 0.8758 0.000 0.212 0.000 0.000 0.788
#> SRR957932 1 0.4818 0.0633 0.520 0.000 0.460 0.020 0.000
#> SRR957933 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957934 5 0.2966 0.8707 0.000 0.184 0.000 0.000 0.816
#> SRR957935 5 0.1121 0.7805 0.000 0.044 0.000 0.000 0.956
#> SRR957936 2 0.0000 0.9380 0.000 1.000 0.000 0.000 0.000
#> SRR957937 2 0.4268 -0.2061 0.000 0.556 0.000 0.000 0.444
#> SRR957938 2 0.0162 0.9381 0.000 0.996 0.000 0.000 0.004
#> SRR957939 4 0.4182 0.3189 0.000 0.400 0.000 0.600 0.000
#> SRR957941 5 0.2966 0.8707 0.000 0.184 0.000 0.000 0.816
#> SRR957940 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957942 2 0.0290 0.9353 0.000 0.992 0.000 0.000 0.008
#> SRR957943 2 0.0000 0.9380 0.000 1.000 0.000 0.000 0.000
#> SRR957944 2 0.0000 0.9380 0.000 1.000 0.000 0.000 0.000
#> SRR957945 3 0.0794 0.8949 0.000 0.000 0.972 0.028 0.000
#> SRR957946 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957948 5 0.3730 0.8308 0.000 0.288 0.000 0.000 0.712
#> SRR957949 5 0.2966 0.8617 0.000 0.184 0.000 0.000 0.816
#> SRR957950 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957951 5 0.3210 0.8758 0.000 0.212 0.000 0.000 0.788
#> SRR957952 3 0.2813 0.8062 0.000 0.000 0.832 0.000 0.168
#> SRR957953 4 0.0693 0.8319 0.008 0.000 0.012 0.980 0.000
#> SRR957954 1 0.4299 0.4157 0.608 0.000 0.004 0.388 0.000
#> SRR957956 4 0.4482 0.2194 0.376 0.000 0.012 0.612 0.000
#> SRR957957 2 0.0794 0.9161 0.000 0.972 0.000 0.028 0.000
#> SRR957958 4 0.0404 0.8355 0.000 0.000 0.012 0.988 0.000
#> SRR957959 5 0.4697 -0.0175 0.000 0.020 0.388 0.000 0.592
#> SRR957960 2 0.3730 0.5301 0.000 0.712 0.000 0.000 0.288
#> SRR957961 5 0.3242 0.8753 0.000 0.216 0.000 0.000 0.784
#> SRR957962 1 0.4251 0.4450 0.624 0.000 0.004 0.372 0.000
#> SRR957963 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957964 1 0.0324 0.9069 0.992 0.000 0.004 0.004 0.000
#> SRR957965 2 0.0162 0.9381 0.000 0.996 0.000 0.000 0.004
#> SRR957966 1 0.0000 0.9128 1.000 0.000 0.000 0.000 0.000
#> SRR957967 1 0.4251 0.4450 0.624 0.000 0.004 0.372 0.000
#> SRR957968 4 0.0404 0.8355 0.000 0.000 0.012 0.988 0.000
#> SRR957969 1 0.4299 0.4157 0.608 0.000 0.004 0.388 0.000
#> SRR957970 2 0.0162 0.9381 0.000 0.996 0.000 0.000 0.004
#> SRR957971 3 0.0794 0.8949 0.000 0.000 0.972 0.028 0.000
#> SRR957972 3 0.0404 0.8867 0.000 0.000 0.988 0.000 0.012
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957915 2 0.0508 0.9297 0.000 0.984 0.000 0.000 0.012 0.004
#> SRR957916 6 0.3634 0.6557 0.000 0.000 0.000 0.000 0.356 0.644
#> SRR957884 4 0.0993 0.7877 0.000 0.000 0.012 0.964 0.000 0.024
#> SRR957885 3 0.0603 0.7813 0.016 0.000 0.980 0.004 0.000 0.000
#> SRR957886 2 0.0508 0.9297 0.000 0.984 0.000 0.000 0.012 0.004
#> SRR957887 3 0.0146 0.7875 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR957888 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957889 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957890 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957891 5 0.2912 0.8491 0.000 0.216 0.000 0.000 0.784 0.000
#> SRR957893 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957892 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957894 2 0.0291 0.9325 0.000 0.992 0.000 0.004 0.000 0.004
#> SRR957895 4 0.1462 0.7689 0.000 0.008 0.000 0.936 0.000 0.056
#> SRR957896 5 0.3681 0.8031 0.000 0.156 0.000 0.000 0.780 0.064
#> SRR957897 4 0.3416 0.6641 0.000 0.140 0.000 0.804 0.000 0.056
#> SRR957898 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957899 5 0.2912 0.8491 0.000 0.216 0.000 0.000 0.784 0.000
#> SRR957900 6 0.3634 0.6557 0.000 0.000 0.000 0.000 0.356 0.644
#> SRR957901 5 0.2912 0.8491 0.000 0.216 0.000 0.000 0.784 0.000
#> SRR957902 5 0.3650 0.8144 0.000 0.280 0.000 0.000 0.708 0.012
#> SRR957903 3 0.0146 0.7875 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR957904 3 0.2563 0.7506 0.000 0.000 0.876 0.000 0.052 0.072
#> SRR957905 4 0.1204 0.7997 0.000 0.000 0.056 0.944 0.000 0.000
#> SRR957906 5 0.3050 0.8440 0.000 0.236 0.000 0.000 0.764 0.000
#> SRR957907 5 0.3615 0.8065 0.000 0.292 0.000 0.000 0.700 0.008
#> SRR957908 2 0.0000 0.9356 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957909 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957910 5 0.3634 0.8027 0.000 0.296 0.000 0.000 0.696 0.008
#> SRR957911 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957912 1 0.2773 0.7846 0.828 0.000 0.004 0.000 0.004 0.164
#> SRR957913 3 0.0146 0.7875 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR957917 3 0.6777 0.3626 0.292 0.000 0.416 0.000 0.048 0.244
#> SRR957918 2 0.0146 0.9356 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957920 3 0.5635 0.4992 0.000 0.000 0.536 0.000 0.208 0.256
#> SRR957919 2 0.0291 0.9325 0.000 0.992 0.000 0.004 0.000 0.004
#> SRR957921 5 0.2838 0.8372 0.000 0.188 0.000 0.000 0.808 0.004
#> SRR957922 6 0.2178 0.6947 0.000 0.000 0.000 0.000 0.132 0.868
#> SRR957924 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957923 2 0.2263 0.8472 0.000 0.896 0.000 0.048 0.000 0.056
#> SRR957925 6 0.3955 0.4757 0.000 0.340 0.000 0.004 0.008 0.648
#> SRR957926 1 0.0146 0.9139 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR957927 2 0.0146 0.9356 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957928 1 0.1753 0.8622 0.912 0.000 0.004 0.000 0.000 0.084
#> SRR957929 1 0.1141 0.8859 0.948 0.000 0.000 0.000 0.000 0.052
#> SRR957930 5 0.6081 0.3601 0.000 0.340 0.000 0.000 0.384 0.276
#> SRR957931 5 0.3261 0.8438 0.000 0.204 0.000 0.000 0.780 0.016
#> SRR957932 3 0.3998 0.0106 0.492 0.000 0.504 0.004 0.000 0.000
#> SRR957933 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957934 5 0.5249 0.5460 0.000 0.156 0.000 0.000 0.600 0.244
#> SRR957935 6 0.3634 0.5569 0.000 0.000 0.000 0.000 0.356 0.644
#> SRR957936 2 0.0000 0.9356 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957937 2 0.3955 -0.2396 0.000 0.560 0.000 0.000 0.436 0.004
#> SRR957938 2 0.0146 0.9352 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR957939 4 0.4532 0.4321 0.000 0.308 0.000 0.636 0.000 0.056
#> SRR957941 5 0.3681 0.7986 0.000 0.156 0.000 0.000 0.780 0.064
#> SRR957940 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957942 2 0.0405 0.9323 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR957943 2 0.0000 0.9356 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957944 2 0.0291 0.9325 0.000 0.992 0.000 0.004 0.000 0.004
#> SRR957945 3 0.0146 0.7875 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR957946 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.9151 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957948 5 0.3634 0.8027 0.000 0.296 0.000 0.000 0.696 0.008
#> SRR957949 6 0.3725 0.6047 0.000 0.008 0.000 0.000 0.316 0.676
#> SRR957950 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957951 5 0.2902 0.8429 0.000 0.196 0.000 0.000 0.800 0.004
#> SRR957952 3 0.4898 0.6086 0.000 0.000 0.656 0.000 0.200 0.144
#> SRR957953 4 0.1462 0.7961 0.008 0.000 0.056 0.936 0.000 0.000
#> SRR957954 1 0.4750 0.4588 0.608 0.000 0.040 0.340 0.000 0.012
#> SRR957956 4 0.4717 0.2311 0.364 0.000 0.056 0.580 0.000 0.000
#> SRR957957 2 0.2263 0.8472 0.000 0.896 0.000 0.048 0.000 0.056
#> SRR957958 4 0.1204 0.7997 0.000 0.000 0.056 0.944 0.000 0.000
#> SRR957959 5 0.5337 -0.0249 0.000 0.024 0.212 0.000 0.644 0.120
#> SRR957960 6 0.4451 0.6106 0.000 0.248 0.000 0.000 0.072 0.680
#> SRR957961 5 0.2933 0.8446 0.000 0.200 0.000 0.000 0.796 0.004
#> SRR957962 1 0.4167 0.5167 0.636 0.000 0.008 0.344 0.000 0.012
#> SRR957963 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957964 1 0.0547 0.9077 0.980 0.000 0.020 0.000 0.000 0.000
#> SRR957965 2 0.0146 0.9356 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR957966 1 0.0622 0.9150 0.980 0.000 0.000 0.008 0.000 0.012
#> SRR957967 1 0.4167 0.5167 0.636 0.000 0.008 0.344 0.000 0.012
#> SRR957968 4 0.1204 0.7997 0.000 0.000 0.056 0.944 0.000 0.000
#> SRR957969 1 0.4737 0.4675 0.612 0.000 0.040 0.336 0.000 0.012
#> SRR957970 2 0.1500 0.8800 0.000 0.936 0.000 0.000 0.052 0.012
#> SRR957971 3 0.0146 0.7875 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR957972 3 0.1682 0.7642 0.000 0.000 0.928 0.000 0.020 0.052
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "pam"]
# you can also extract it by
# res = res_list["ATC:pam"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.988 0.951 0.977 0.5032 0.495 0.495
#> 3 3 0.708 0.829 0.915 0.2810 0.818 0.649
#> 4 4 0.864 0.835 0.933 0.1700 0.850 0.602
#> 5 5 0.810 0.766 0.862 0.0490 0.932 0.739
#> 6 6 0.854 0.794 0.868 0.0417 0.958 0.805
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
#> SRR957914 1 0.0000 0.970 1.000 0.000
#> SRR957915 2 0.0000 0.981 0.000 1.000
#> SRR957916 2 0.0000 0.981 0.000 1.000
#> SRR957884 2 0.2603 0.940 0.044 0.956
#> SRR957885 1 0.0000 0.970 1.000 0.000
#> SRR957886 2 0.0000 0.981 0.000 1.000
#> SRR957887 1 0.5737 0.863 0.864 0.136
#> SRR957888 1 0.0000 0.970 1.000 0.000
#> SRR957889 1 0.0000 0.970 1.000 0.000
#> SRR957890 1 0.0000 0.970 1.000 0.000
#> SRR957891 2 0.0000 0.981 0.000 1.000
#> SRR957893 1 0.0000 0.970 1.000 0.000
#> SRR957892 1 0.0000 0.970 1.000 0.000
#> SRR957894 2 0.0000 0.981 0.000 1.000
#> SRR957895 1 0.9323 0.475 0.652 0.348
#> SRR957896 2 0.0000 0.981 0.000 1.000
#> SRR957897 2 0.9815 0.268 0.420 0.580
#> SRR957898 1 0.0000 0.970 1.000 0.000
#> SRR957899 2 0.0000 0.981 0.000 1.000
#> SRR957900 2 0.0000 0.981 0.000 1.000
#> SRR957901 2 0.0000 0.981 0.000 1.000
#> SRR957902 2 0.0000 0.981 0.000 1.000
#> SRR957903 1 0.5737 0.863 0.864 0.136
#> SRR957904 1 0.4161 0.913 0.916 0.084
#> SRR957905 1 0.3274 0.933 0.940 0.060
#> SRR957906 2 0.0000 0.981 0.000 1.000
#> SRR957907 2 0.0000 0.981 0.000 1.000
#> SRR957908 2 0.0000 0.981 0.000 1.000
#> SRR957909 1 0.0000 0.970 1.000 0.000
#> SRR957910 2 0.0000 0.981 0.000 1.000
#> SRR957911 1 0.0000 0.970 1.000 0.000
#> SRR957912 1 0.0000 0.970 1.000 0.000
#> SRR957913 1 0.3879 0.920 0.924 0.076
#> SRR957917 1 0.0376 0.968 0.996 0.004
#> SRR957918 2 0.0000 0.981 0.000 1.000
#> SRR957920 2 0.4562 0.884 0.096 0.904
#> SRR957919 2 0.0000 0.981 0.000 1.000
#> SRR957921 2 0.0000 0.981 0.000 1.000
#> SRR957922 2 0.0000 0.981 0.000 1.000
#> SRR957924 1 0.0000 0.970 1.000 0.000
#> SRR957923 2 0.0938 0.971 0.012 0.988
#> SRR957925 2 0.0000 0.981 0.000 1.000
#> SRR957926 1 0.0000 0.970 1.000 0.000
#> SRR957927 2 0.0000 0.981 0.000 1.000
#> SRR957928 1 0.0000 0.970 1.000 0.000
#> SRR957929 1 0.0000 0.970 1.000 0.000
#> SRR957930 2 0.0000 0.981 0.000 1.000
#> SRR957931 2 0.0000 0.981 0.000 1.000
#> SRR957932 1 0.0000 0.970 1.000 0.000
#> SRR957933 1 0.0000 0.970 1.000 0.000
#> SRR957934 2 0.0000 0.981 0.000 1.000
#> SRR957935 2 0.0000 0.981 0.000 1.000
#> SRR957936 2 0.0000 0.981 0.000 1.000
#> SRR957937 2 0.0000 0.981 0.000 1.000
#> SRR957938 2 0.0000 0.981 0.000 1.000
#> SRR957939 2 0.4022 0.904 0.080 0.920
#> SRR957941 2 0.0000 0.981 0.000 1.000
#> SRR957940 1 0.0000 0.970 1.000 0.000
#> SRR957942 2 0.0000 0.981 0.000 1.000
#> SRR957943 2 0.0000 0.981 0.000 1.000
#> SRR957944 2 0.0000 0.981 0.000 1.000
#> SRR957945 1 0.0000 0.970 1.000 0.000
#> SRR957946 1 0.0000 0.970 1.000 0.000
#> SRR957947 1 0.0000 0.970 1.000 0.000
#> SRR957948 2 0.0000 0.981 0.000 1.000
#> SRR957949 2 0.0000 0.981 0.000 1.000
#> SRR957950 1 0.0000 0.970 1.000 0.000
#> SRR957951 2 0.0000 0.981 0.000 1.000
#> SRR957952 2 0.6531 0.789 0.168 0.832
#> SRR957953 1 0.3274 0.933 0.940 0.060
#> SRR957954 1 0.0000 0.970 1.000 0.000
#> SRR957956 1 0.0672 0.966 0.992 0.008
#> SRR957957 2 0.0000 0.981 0.000 1.000
#> SRR957958 1 0.3274 0.933 0.940 0.060
#> SRR957959 2 0.0000 0.981 0.000 1.000
#> SRR957960 2 0.0000 0.981 0.000 1.000
#> SRR957961 2 0.0000 0.981 0.000 1.000
#> SRR957962 1 0.0000 0.970 1.000 0.000
#> SRR957963 1 0.0000 0.970 1.000 0.000
#> SRR957964 1 0.0000 0.970 1.000 0.000
#> SRR957965 2 0.0000 0.981 0.000 1.000
#> SRR957966 1 0.0000 0.970 1.000 0.000
#> SRR957967 1 0.0000 0.970 1.000 0.000
#> SRR957968 1 0.3274 0.933 0.940 0.060
#> SRR957969 1 0.0000 0.970 1.000 0.000
#> SRR957970 2 0.0000 0.981 0.000 1.000
#> SRR957971 1 0.4161 0.913 0.916 0.084
#> SRR957972 1 0.3879 0.919 0.924 0.076
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957915 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957916 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957884 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957885 3 0.4654 0.701 0.208 0.000 0.792
#> SRR957886 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957887 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957888 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957889 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957890 1 0.0237 0.937 0.996 0.000 0.004
#> SRR957891 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957893 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957892 1 0.4452 0.714 0.808 0.000 0.192
#> SRR957894 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957895 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957896 2 0.2796 0.886 0.000 0.908 0.092
#> SRR957897 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957898 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957899 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957900 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957901 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957902 2 0.4605 0.831 0.000 0.796 0.204
#> SRR957903 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957904 3 0.4555 0.693 0.200 0.000 0.800
#> SRR957905 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957906 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957907 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957908 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957909 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957910 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957911 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957912 3 0.6260 0.203 0.448 0.000 0.552
#> SRR957913 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957917 3 0.6192 0.280 0.420 0.000 0.580
#> SRR957918 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957920 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957919 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957921 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957922 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957924 3 0.4555 0.693 0.200 0.000 0.800
#> SRR957923 2 0.0747 0.911 0.000 0.984 0.016
#> SRR957925 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957926 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957927 2 0.4555 0.834 0.000 0.800 0.200
#> SRR957928 1 0.2796 0.852 0.908 0.000 0.092
#> SRR957929 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957930 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957931 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957932 1 0.6008 0.286 0.628 0.000 0.372
#> SRR957933 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957934 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957935 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957936 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957937 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957938 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957939 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957941 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957940 3 0.4654 0.701 0.208 0.000 0.792
#> SRR957942 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957943 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957944 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957945 3 0.3752 0.755 0.144 0.000 0.856
#> SRR957946 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957947 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957948 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957949 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957950 1 0.4796 0.677 0.780 0.000 0.220
#> SRR957951 2 0.4452 0.838 0.000 0.808 0.192
#> SRR957952 3 0.6008 0.238 0.000 0.372 0.628
#> SRR957953 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957954 3 0.4654 0.701 0.208 0.000 0.792
#> SRR957956 3 0.4178 0.734 0.172 0.000 0.828
#> SRR957957 2 0.0747 0.911 0.000 0.984 0.016
#> SRR957958 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957959 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957960 2 0.4654 0.829 0.000 0.792 0.208
#> SRR957961 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957962 3 0.5926 0.466 0.356 0.000 0.644
#> SRR957963 1 0.1163 0.916 0.972 0.000 0.028
#> SRR957964 1 0.0237 0.937 0.996 0.000 0.004
#> SRR957965 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957966 1 0.0000 0.940 1.000 0.000 0.000
#> SRR957967 3 0.4654 0.701 0.208 0.000 0.792
#> SRR957968 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957969 3 0.4654 0.701 0.208 0.000 0.792
#> SRR957970 2 0.0000 0.921 0.000 1.000 0.000
#> SRR957971 3 0.0000 0.819 0.000 0.000 1.000
#> SRR957972 3 0.4555 0.693 0.200 0.000 0.800
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957915 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957916 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957884 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957885 4 0.0188 0.895 0.000 0.000 0.004 0.996
#> SRR957886 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957887 4 0.0188 0.895 0.000 0.000 0.004 0.996
#> SRR957888 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957889 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957890 1 0.0188 0.938 0.996 0.000 0.000 0.004
#> SRR957891 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957893 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957892 1 0.4713 0.380 0.640 0.000 0.000 0.360
#> SRR957894 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957895 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957896 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957897 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957898 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957899 3 0.4830 0.343 0.000 0.392 0.608 0.000
#> SRR957900 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957901 2 0.4543 0.496 0.000 0.676 0.324 0.000
#> SRR957902 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957903 4 0.0188 0.895 0.000 0.000 0.004 0.996
#> SRR957904 3 0.4830 0.293 0.000 0.000 0.608 0.392
#> SRR957905 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957906 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957907 3 0.0817 0.926 0.000 0.024 0.976 0.000
#> SRR957908 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957909 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957910 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957911 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957912 4 0.5685 0.141 0.460 0.000 0.024 0.516
#> SRR957913 4 0.0188 0.895 0.000 0.000 0.004 0.996
#> SRR957917 4 0.6296 0.287 0.388 0.000 0.064 0.548
#> SRR957918 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957920 3 0.0000 0.939 0.000 0.000 1.000 0.000
#> SRR957919 2 0.3528 0.748 0.000 0.808 0.192 0.000
#> SRR957921 3 0.4072 0.639 0.000 0.252 0.748 0.000
#> SRR957922 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957924 4 0.3873 0.670 0.228 0.000 0.000 0.772
#> SRR957923 2 0.4776 0.457 0.000 0.624 0.376 0.000
#> SRR957925 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957926 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957927 2 0.4843 0.413 0.000 0.604 0.396 0.000
#> SRR957928 1 0.2345 0.846 0.900 0.000 0.000 0.100
#> SRR957929 1 0.1557 0.894 0.944 0.000 0.000 0.056
#> SRR957930 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957931 3 0.1389 0.905 0.000 0.048 0.952 0.000
#> SRR957932 4 0.5080 0.296 0.420 0.000 0.004 0.576
#> SRR957933 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957934 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957935 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957936 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957937 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957938 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957939 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957941 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957940 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957942 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957943 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957944 2 0.0592 0.907 0.000 0.984 0.016 0.000
#> SRR957945 4 0.0188 0.895 0.000 0.000 0.004 0.996
#> SRR957946 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957948 2 0.3610 0.715 0.000 0.800 0.200 0.000
#> SRR957949 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957950 1 0.4790 0.333 0.620 0.000 0.000 0.380
#> SRR957951 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957952 3 0.0000 0.939 0.000 0.000 1.000 0.000
#> SRR957953 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957954 4 0.1022 0.876 0.032 0.000 0.000 0.968
#> SRR957956 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957957 2 0.1302 0.889 0.000 0.956 0.044 0.000
#> SRR957958 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957959 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957960 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957961 3 0.0336 0.939 0.000 0.008 0.992 0.000
#> SRR957962 4 0.4661 0.440 0.348 0.000 0.000 0.652
#> SRR957963 1 0.0469 0.932 0.988 0.000 0.000 0.012
#> SRR957964 1 0.0188 0.938 0.996 0.000 0.000 0.004
#> SRR957965 2 0.0000 0.915 0.000 1.000 0.000 0.000
#> SRR957966 1 0.0000 0.940 1.000 0.000 0.000 0.000
#> SRR957967 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957968 4 0.0000 0.896 0.000 0.000 0.000 1.000
#> SRR957969 4 0.1118 0.873 0.036 0.000 0.000 0.964
#> SRR957970 3 0.0188 0.942 0.000 0.004 0.996 0.000
#> SRR957971 4 0.0188 0.895 0.000 0.000 0.004 0.996
#> SRR957972 4 0.4103 0.621 0.000 0.000 0.256 0.744
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.3895 0.747 0.680 0.000 0.320 0.000 0.000
#> SRR957915 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957916 5 0.2329 0.856 0.000 0.000 0.124 0.000 0.876
#> SRR957884 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957885 4 0.0000 0.760 0.000 0.000 0.000 1.000 0.000
#> SRR957886 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957887 4 0.0000 0.760 0.000 0.000 0.000 1.000 0.000
#> SRR957888 1 0.3752 0.773 0.708 0.000 0.292 0.000 0.000
#> SRR957889 3 0.1671 0.747 0.076 0.000 0.924 0.000 0.000
#> SRR957890 3 0.1671 0.747 0.076 0.000 0.924 0.000 0.000
#> SRR957891 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957893 1 0.3752 0.773 0.708 0.000 0.292 0.000 0.000
#> SRR957892 3 0.2471 0.729 0.136 0.000 0.864 0.000 0.000
#> SRR957894 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957895 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957896 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957897 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957898 1 0.3752 0.773 0.708 0.000 0.292 0.000 0.000
#> SRR957899 5 0.4114 0.377 0.000 0.376 0.000 0.000 0.624
#> SRR957900 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957901 2 0.3913 0.508 0.000 0.676 0.000 0.000 0.324
#> SRR957902 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957903 4 0.0000 0.760 0.000 0.000 0.000 1.000 0.000
#> SRR957904 4 0.5475 0.349 0.000 0.000 0.124 0.644 0.232
#> SRR957905 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957906 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957907 5 0.0510 0.927 0.000 0.016 0.000 0.000 0.984
#> SRR957908 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957909 1 0.3752 0.773 0.708 0.000 0.292 0.000 0.000
#> SRR957910 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957911 1 0.3752 0.773 0.708 0.000 0.292 0.000 0.000
#> SRR957912 3 0.0807 0.701 0.000 0.000 0.976 0.012 0.012
#> SRR957913 4 0.0000 0.760 0.000 0.000 0.000 1.000 0.000
#> SRR957917 3 0.4574 0.197 0.000 0.000 0.576 0.412 0.012
#> SRR957918 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957920 5 0.3992 0.792 0.000 0.000 0.124 0.080 0.796
#> SRR957919 2 0.3039 0.744 0.000 0.808 0.000 0.000 0.192
#> SRR957921 5 0.3424 0.663 0.000 0.240 0.000 0.000 0.760
#> SRR957922 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957924 4 0.4793 0.642 0.076 0.000 0.216 0.708 0.000
#> SRR957923 2 0.4613 0.452 0.020 0.620 0.000 0.000 0.360
#> SRR957925 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957926 3 0.2329 0.723 0.124 0.000 0.876 0.000 0.000
#> SRR957927 2 0.4182 0.383 0.000 0.600 0.000 0.000 0.400
#> SRR957928 3 0.0000 0.717 0.000 0.000 1.000 0.000 0.000
#> SRR957929 3 0.1121 0.734 0.044 0.000 0.956 0.000 0.000
#> SRR957930 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957931 5 0.1270 0.901 0.000 0.052 0.000 0.000 0.948
#> SRR957932 3 0.4126 0.361 0.000 0.000 0.620 0.380 0.000
#> SRR957933 3 0.2329 0.723 0.124 0.000 0.876 0.000 0.000
#> SRR957934 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957935 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957936 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957937 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957938 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957939 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957941 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957940 4 0.3741 0.829 0.264 0.000 0.004 0.732 0.000
#> SRR957942 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957943 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957944 2 0.0404 0.901 0.000 0.988 0.000 0.000 0.012
#> SRR957945 4 0.1908 0.690 0.000 0.000 0.092 0.908 0.000
#> SRR957946 1 0.3895 0.743 0.680 0.000 0.320 0.000 0.000
#> SRR957947 3 0.3796 0.397 0.300 0.000 0.700 0.000 0.000
#> SRR957948 2 0.3109 0.718 0.000 0.800 0.000 0.000 0.200
#> SRR957949 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957950 3 0.3519 0.653 0.216 0.000 0.776 0.008 0.000
#> SRR957951 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957952 5 0.3413 0.824 0.000 0.000 0.124 0.044 0.832
#> SRR957953 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957954 4 0.5711 0.730 0.252 0.000 0.136 0.612 0.000
#> SRR957956 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957957 2 0.1270 0.874 0.000 0.948 0.000 0.000 0.052
#> SRR957958 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957959 5 0.0404 0.929 0.000 0.000 0.000 0.012 0.988
#> SRR957960 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957961 5 0.1952 0.878 0.000 0.004 0.000 0.084 0.912
#> SRR957962 1 0.6604 -0.316 0.440 0.000 0.224 0.336 0.000
#> SRR957963 1 0.2377 0.573 0.872 0.000 0.128 0.000 0.000
#> SRR957964 3 0.2843 0.730 0.076 0.000 0.876 0.048 0.000
#> SRR957965 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000
#> SRR957966 1 0.4294 0.445 0.532 0.000 0.468 0.000 0.000
#> SRR957967 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957968 4 0.3752 0.833 0.292 0.000 0.000 0.708 0.000
#> SRR957969 4 0.6297 0.623 0.256 0.000 0.212 0.532 0.000
#> SRR957970 5 0.0000 0.935 0.000 0.000 0.000 0.000 1.000
#> SRR957971 4 0.0000 0.760 0.000 0.000 0.000 1.000 0.000
#> SRR957972 4 0.2488 0.655 0.000 0.000 0.124 0.872 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.1007 0.8852 0.956 0.000 0.000 0.000 0.000 0.044
#> SRR957915 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957916 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957884 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957885 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957886 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957887 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957888 1 0.0000 0.9082 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957889 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957890 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957891 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957893 1 0.0000 0.9082 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957892 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957894 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957895 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957896 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957897 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957898 1 0.0632 0.8973 0.976 0.000 0.000 0.000 0.000 0.024
#> SRR957899 5 0.3409 0.5665 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR957900 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957901 2 0.3515 0.4931 0.000 0.676 0.000 0.000 0.324 0.000
#> SRR957902 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957903 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957904 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957905 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957906 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957907 5 0.0146 0.9127 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR957908 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957909 1 0.0000 0.9082 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957910 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957911 1 0.0000 0.9082 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957912 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957913 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957917 6 0.3828 0.2066 0.000 0.000 0.440 0.000 0.000 0.560
#> SRR957918 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957920 5 0.3833 0.2404 0.000 0.000 0.444 0.000 0.556 0.000
#> SRR957919 2 0.2527 0.7755 0.000 0.832 0.000 0.000 0.168 0.000
#> SRR957921 5 0.2996 0.6861 0.000 0.228 0.000 0.000 0.772 0.000
#> SRR957922 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957924 4 0.3756 0.2407 0.000 0.000 0.000 0.600 0.000 0.400
#> SRR957923 2 0.4895 0.5690 0.000 0.632 0.000 0.104 0.264 0.000
#> SRR957925 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957926 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957927 2 0.3756 0.4142 0.000 0.600 0.000 0.000 0.400 0.000
#> SRR957928 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957929 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957930 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957931 5 0.1814 0.8348 0.000 0.100 0.000 0.000 0.900 0.000
#> SRR957932 6 0.3857 0.1286 0.000 0.000 0.468 0.000 0.000 0.532
#> SRR957933 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957934 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957935 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957936 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957937 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957938 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957939 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957941 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957940 4 0.2933 0.6714 0.000 0.000 0.200 0.796 0.000 0.004
#> SRR957942 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957943 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957944 2 0.0363 0.8993 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR957945 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957946 1 0.3659 0.3839 0.636 0.000 0.000 0.000 0.000 0.364
#> SRR957947 6 0.2793 0.6330 0.200 0.000 0.000 0.000 0.000 0.800
#> SRR957948 2 0.2793 0.7182 0.000 0.800 0.000 0.000 0.200 0.000
#> SRR957949 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957950 6 0.2823 0.6082 0.204 0.000 0.000 0.000 0.000 0.796
#> SRR957951 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957952 5 0.3823 0.2611 0.000 0.000 0.436 0.000 0.564 0.000
#> SRR957953 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957954 4 0.3756 0.3386 0.000 0.000 0.000 0.600 0.000 0.400
#> SRR957956 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957957 2 0.1957 0.8259 0.000 0.888 0.000 0.000 0.112 0.000
#> SRR957958 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957959 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957960 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957961 5 0.1858 0.8368 0.000 0.004 0.092 0.000 0.904 0.000
#> SRR957962 4 0.5865 0.0774 0.360 0.000 0.000 0.440 0.000 0.200
#> SRR957963 1 0.0000 0.9082 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957964 6 0.0000 0.8296 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR957965 2 0.0000 0.9061 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957966 1 0.2793 0.7145 0.800 0.000 0.000 0.000 0.000 0.200
#> SRR957967 4 0.0260 0.8633 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR957968 4 0.0000 0.8677 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR957969 6 0.3857 -0.0743 0.000 0.000 0.000 0.468 0.000 0.532
#> SRR957970 5 0.0000 0.9152 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR957971 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957972 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.602 0.900 0.919 0.4534 0.498 0.498
#> 3 3 1.000 0.956 0.974 0.3982 0.770 0.581
#> 4 4 0.768 0.772 0.856 0.1556 0.864 0.641
#> 5 5 0.731 0.710 0.852 0.0606 0.923 0.720
#> 6 6 0.731 0.761 0.832 0.0386 0.935 0.727
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
#> SRR957914 1 0.8016 0.854 0.756 0.244
#> SRR957915 2 0.0000 0.978 0.000 1.000
#> SRR957916 2 0.0000 0.978 0.000 1.000
#> SRR957884 1 0.4161 0.782 0.916 0.084
#> SRR957885 1 0.0000 0.815 1.000 0.000
#> SRR957886 2 0.0000 0.978 0.000 1.000
#> SRR957887 1 0.0000 0.815 1.000 0.000
#> SRR957888 1 0.8016 0.854 0.756 0.244
#> SRR957889 1 0.8016 0.854 0.756 0.244
#> SRR957890 1 0.8016 0.854 0.756 0.244
#> SRR957891 2 0.0000 0.978 0.000 1.000
#> SRR957893 1 0.8016 0.854 0.756 0.244
#> SRR957892 1 0.8016 0.854 0.756 0.244
#> SRR957894 2 0.0000 0.978 0.000 1.000
#> SRR957895 1 0.9129 0.759 0.672 0.328
#> SRR957896 2 0.0000 0.978 0.000 1.000
#> SRR957897 1 0.4161 0.782 0.916 0.084
#> SRR957898 1 0.8016 0.854 0.756 0.244
#> SRR957899 2 0.0000 0.978 0.000 1.000
#> SRR957900 2 0.0000 0.978 0.000 1.000
#> SRR957901 2 0.0000 0.978 0.000 1.000
#> SRR957902 2 0.0000 0.978 0.000 1.000
#> SRR957903 1 0.0000 0.815 1.000 0.000
#> SRR957904 2 0.4161 0.894 0.084 0.916
#> SRR957905 1 0.0000 0.815 1.000 0.000
#> SRR957906 2 0.0000 0.978 0.000 1.000
#> SRR957907 2 0.0000 0.978 0.000 1.000
#> SRR957908 2 0.0000 0.978 0.000 1.000
#> SRR957909 1 0.8016 0.854 0.756 0.244
#> SRR957910 2 0.0000 0.978 0.000 1.000
#> SRR957911 1 0.8016 0.854 0.756 0.244
#> SRR957912 2 0.4161 0.894 0.084 0.916
#> SRR957913 1 0.0938 0.819 0.988 0.012
#> SRR957917 2 0.4161 0.894 0.084 0.916
#> SRR957918 2 0.0000 0.978 0.000 1.000
#> SRR957920 2 0.0000 0.978 0.000 1.000
#> SRR957919 2 0.0000 0.978 0.000 1.000
#> SRR957921 2 0.0000 0.978 0.000 1.000
#> SRR957922 2 0.0000 0.978 0.000 1.000
#> SRR957924 1 0.8016 0.854 0.756 0.244
#> SRR957923 2 0.6438 0.747 0.164 0.836
#> SRR957925 2 0.0000 0.978 0.000 1.000
#> SRR957926 1 0.8016 0.854 0.756 0.244
#> SRR957927 2 0.0000 0.978 0.000 1.000
#> SRR957928 2 0.4298 0.890 0.088 0.912
#> SRR957929 2 0.4161 0.894 0.084 0.916
#> SRR957930 2 0.0000 0.978 0.000 1.000
#> SRR957931 2 0.0000 0.978 0.000 1.000
#> SRR957932 1 0.8016 0.854 0.756 0.244
#> SRR957933 1 0.8016 0.854 0.756 0.244
#> SRR957934 2 0.0000 0.978 0.000 1.000
#> SRR957935 2 0.0000 0.978 0.000 1.000
#> SRR957936 2 0.0000 0.978 0.000 1.000
#> SRR957937 2 0.0000 0.978 0.000 1.000
#> SRR957938 2 0.0000 0.978 0.000 1.000
#> SRR957939 1 0.9129 0.759 0.672 0.328
#> SRR957941 2 0.0000 0.978 0.000 1.000
#> SRR957940 1 0.8016 0.854 0.756 0.244
#> SRR957942 2 0.0000 0.978 0.000 1.000
#> SRR957943 2 0.0000 0.978 0.000 1.000
#> SRR957944 2 0.0000 0.978 0.000 1.000
#> SRR957945 1 0.8016 0.854 0.756 0.244
#> SRR957946 1 0.8016 0.854 0.756 0.244
#> SRR957947 1 0.8016 0.854 0.756 0.244
#> SRR957948 2 0.0000 0.978 0.000 1.000
#> SRR957949 2 0.0000 0.978 0.000 1.000
#> SRR957950 1 0.8016 0.854 0.756 0.244
#> SRR957951 2 0.0000 0.978 0.000 1.000
#> SRR957952 2 0.4161 0.894 0.084 0.916
#> SRR957953 1 0.0000 0.815 1.000 0.000
#> SRR957954 1 0.0000 0.815 1.000 0.000
#> SRR957956 1 0.0000 0.815 1.000 0.000
#> SRR957957 1 0.9129 0.759 0.672 0.328
#> SRR957958 1 0.0000 0.815 1.000 0.000
#> SRR957959 2 0.0000 0.978 0.000 1.000
#> SRR957960 2 0.0000 0.978 0.000 1.000
#> SRR957961 2 0.0000 0.978 0.000 1.000
#> SRR957962 1 0.0000 0.815 1.000 0.000
#> SRR957963 1 0.8016 0.854 0.756 0.244
#> SRR957964 1 0.8016 0.854 0.756 0.244
#> SRR957965 2 0.0000 0.978 0.000 1.000
#> SRR957966 1 0.8016 0.854 0.756 0.244
#> SRR957967 1 0.0000 0.815 1.000 0.000
#> SRR957968 1 0.0000 0.815 1.000 0.000
#> SRR957969 1 0.1414 0.820 0.980 0.020
#> SRR957970 2 0.0000 0.978 0.000 1.000
#> SRR957971 1 0.0000 0.815 1.000 0.000
#> SRR957972 2 0.6148 0.798 0.152 0.848
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957915 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957916 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957884 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957885 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957886 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957887 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957888 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957889 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957890 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957891 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957893 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957892 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957894 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957895 3 0.0237 0.963 0.000 0.004 0.996
#> SRR957896 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957897 3 0.0237 0.963 0.000 0.004 0.996
#> SRR957898 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957899 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957900 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957901 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957902 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957903 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957904 3 0.1774 0.934 0.024 0.016 0.960
#> SRR957905 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957906 2 0.0237 0.978 0.004 0.996 0.000
#> SRR957907 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957908 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957909 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957910 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957911 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957912 1 0.1170 0.958 0.976 0.016 0.008
#> SRR957913 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957917 1 0.1170 0.958 0.976 0.016 0.008
#> SRR957918 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957920 2 0.1453 0.961 0.024 0.968 0.008
#> SRR957919 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957921 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957922 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957924 3 0.4974 0.689 0.236 0.000 0.764
#> SRR957923 2 0.0892 0.974 0.020 0.980 0.000
#> SRR957925 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957926 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957927 2 0.1031 0.966 0.024 0.976 0.000
#> SRR957928 1 0.0747 0.960 0.984 0.016 0.000
#> SRR957929 1 0.1529 0.951 0.960 0.040 0.000
#> SRR957930 2 0.0237 0.979 0.004 0.996 0.000
#> SRR957931 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957932 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957933 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957934 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957935 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957936 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957937 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957938 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957939 2 0.6483 0.339 0.008 0.600 0.392
#> SRR957941 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957940 3 0.0424 0.961 0.008 0.000 0.992
#> SRR957942 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957943 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957944 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957945 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957946 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957947 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957948 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957949 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957950 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957951 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957952 2 0.5277 0.760 0.024 0.796 0.180
#> SRR957953 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957954 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957956 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957957 2 0.1529 0.947 0.000 0.960 0.040
#> SRR957958 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957959 2 0.1453 0.961 0.024 0.968 0.008
#> SRR957960 2 0.0000 0.979 0.000 1.000 0.000
#> SRR957961 2 0.1031 0.966 0.024 0.976 0.000
#> SRR957962 3 0.4605 0.747 0.204 0.000 0.796
#> SRR957963 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957964 3 0.4654 0.740 0.208 0.000 0.792
#> SRR957965 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957966 1 0.1289 0.990 0.968 0.000 0.032
#> SRR957967 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957968 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957969 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957970 2 0.0424 0.979 0.008 0.992 0.000
#> SRR957971 3 0.0000 0.966 0.000 0.000 1.000
#> SRR957972 3 0.1774 0.934 0.024 0.016 0.960
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957915 2 0.1557 0.7065 0.000 0.944 0.056 0.000
#> SRR957916 3 0.3444 0.7973 0.000 0.184 0.816 0.000
#> SRR957884 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957885 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957886 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957887 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957888 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957889 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957890 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957891 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957893 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957892 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957894 2 0.0000 0.6920 0.000 1.000 0.000 0.000
#> SRR957895 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957896 3 0.4072 0.8006 0.000 0.252 0.748 0.000
#> SRR957897 4 0.6675 0.5712 0.004 0.268 0.116 0.612
#> SRR957898 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957899 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957900 3 0.3444 0.7973 0.000 0.184 0.816 0.000
#> SRR957901 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957902 2 0.4713 0.6008 0.000 0.640 0.360 0.000
#> SRR957903 4 0.0469 0.8929 0.000 0.000 0.012 0.988
#> SRR957904 4 0.5000 0.2334 0.000 0.000 0.496 0.504
#> SRR957905 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957906 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957907 2 0.4605 0.6400 0.000 0.664 0.336 0.000
#> SRR957908 2 0.0000 0.6920 0.000 1.000 0.000 0.000
#> SRR957909 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957910 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957911 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957912 1 0.4635 0.7879 0.796 0.000 0.080 0.124
#> SRR957913 4 0.0469 0.8929 0.000 0.000 0.012 0.988
#> SRR957917 3 0.6894 0.0703 0.128 0.000 0.552 0.320
#> SRR957918 2 0.0592 0.6985 0.000 0.984 0.016 0.000
#> SRR957920 3 0.2647 0.7344 0.000 0.120 0.880 0.000
#> SRR957919 2 0.3024 0.6041 0.000 0.852 0.148 0.000
#> SRR957921 2 0.4605 0.6440 0.000 0.664 0.336 0.000
#> SRR957922 3 0.3688 0.8068 0.000 0.208 0.792 0.000
#> SRR957924 4 0.0592 0.8904 0.016 0.000 0.000 0.984
#> SRR957923 2 0.3668 0.5513 0.004 0.808 0.188 0.000
#> SRR957925 3 0.4072 0.8006 0.000 0.252 0.748 0.000
#> SRR957926 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957927 2 0.4643 0.6339 0.000 0.656 0.344 0.000
#> SRR957928 1 0.1792 0.9380 0.932 0.000 0.068 0.000
#> SRR957929 1 0.1792 0.9380 0.932 0.000 0.068 0.000
#> SRR957930 3 0.4103 0.7944 0.000 0.256 0.744 0.000
#> SRR957931 3 0.4605 0.6593 0.000 0.336 0.664 0.000
#> SRR957932 4 0.0188 0.8949 0.000 0.000 0.004 0.996
#> SRR957933 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957934 3 0.4072 0.8006 0.000 0.252 0.748 0.000
#> SRR957935 3 0.3764 0.8083 0.000 0.216 0.784 0.000
#> SRR957936 2 0.0000 0.6920 0.000 1.000 0.000 0.000
#> SRR957937 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957938 2 0.0469 0.6971 0.000 0.988 0.012 0.000
#> SRR957939 4 0.6769 0.5574 0.004 0.276 0.120 0.600
#> SRR957941 3 0.3942 0.8064 0.000 0.236 0.764 0.000
#> SRR957940 4 0.0336 0.8937 0.008 0.000 0.000 0.992
#> SRR957942 2 0.3907 0.7141 0.000 0.768 0.232 0.000
#> SRR957943 2 0.0000 0.6920 0.000 1.000 0.000 0.000
#> SRR957944 2 0.0469 0.6971 0.000 0.988 0.012 0.000
#> SRR957945 4 0.0469 0.8929 0.000 0.000 0.012 0.988
#> SRR957946 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957947 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957948 2 0.4193 0.7061 0.000 0.732 0.268 0.000
#> SRR957949 3 0.4072 0.8006 0.000 0.252 0.748 0.000
#> SRR957950 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957951 2 0.4985 0.3517 0.000 0.532 0.468 0.000
#> SRR957952 3 0.6779 0.2874 0.000 0.116 0.560 0.324
#> SRR957953 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957954 4 0.1792 0.8557 0.068 0.000 0.000 0.932
#> SRR957956 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957957 2 0.5446 0.4619 0.004 0.736 0.184 0.076
#> SRR957958 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957959 3 0.3400 0.7946 0.000 0.180 0.820 0.000
#> SRR957960 3 0.4072 0.8006 0.000 0.252 0.748 0.000
#> SRR957961 2 0.4877 0.5626 0.000 0.592 0.408 0.000
#> SRR957962 4 0.4072 0.6627 0.252 0.000 0.000 0.748
#> SRR957963 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957964 4 0.4382 0.5900 0.296 0.000 0.000 0.704
#> SRR957965 2 0.0000 0.6920 0.000 1.000 0.000 0.000
#> SRR957966 1 0.0188 0.9831 0.996 0.000 0.000 0.004
#> SRR957967 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957968 4 0.0000 0.8956 0.000 0.000 0.000 1.000
#> SRR957969 4 0.1792 0.8557 0.068 0.000 0.000 0.932
#> SRR957970 2 0.4605 0.6400 0.000 0.664 0.336 0.000
#> SRR957971 4 0.0469 0.8929 0.000 0.000 0.012 0.988
#> SRR957972 4 0.4985 0.2958 0.000 0.000 0.468 0.532
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957915 2 0.1205 0.79021 0.000 0.956 0.000 0.040 0.004
#> SRR957916 5 0.1197 0.66711 0.000 0.048 0.000 0.000 0.952
#> SRR957884 3 0.1768 0.79216 0.000 0.004 0.924 0.072 0.000
#> SRR957885 3 0.2377 0.83013 0.000 0.000 0.872 0.128 0.000
#> SRR957886 2 0.0451 0.79271 0.000 0.988 0.000 0.004 0.008
#> SRR957887 3 0.2377 0.83013 0.000 0.000 0.872 0.128 0.000
#> SRR957888 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957889 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957890 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957891 2 0.3327 0.68065 0.000 0.828 0.000 0.028 0.144
#> SRR957893 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957892 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957894 2 0.2966 0.72023 0.000 0.816 0.000 0.184 0.000
#> SRR957895 3 0.2358 0.76108 0.000 0.008 0.888 0.104 0.000
#> SRR957896 5 0.3932 0.58373 0.000 0.328 0.000 0.000 0.672
#> SRR957897 4 0.3039 0.87856 0.000 0.012 0.152 0.836 0.000
#> SRR957898 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957899 2 0.4668 0.26176 0.000 0.624 0.000 0.024 0.352
#> SRR957900 5 0.1197 0.66711 0.000 0.048 0.000 0.000 0.952
#> SRR957901 2 0.3146 0.69952 0.000 0.844 0.000 0.028 0.128
#> SRR957902 5 0.4723 0.36551 0.000 0.448 0.000 0.016 0.536
#> SRR957903 3 0.2377 0.83013 0.000 0.000 0.872 0.128 0.000
#> SRR957904 5 0.4375 0.00152 0.000 0.000 0.420 0.004 0.576
#> SRR957905 3 0.0162 0.83125 0.000 0.000 0.996 0.004 0.000
#> SRR957906 2 0.3863 0.59795 0.000 0.772 0.000 0.028 0.200
#> SRR957907 2 0.4599 0.18697 0.000 0.624 0.000 0.020 0.356
#> SRR957908 2 0.2966 0.72023 0.000 0.816 0.000 0.184 0.000
#> SRR957909 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957910 2 0.1310 0.77773 0.000 0.956 0.000 0.020 0.024
#> SRR957911 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957912 1 0.6598 -0.00881 0.448 0.000 0.324 0.000 0.228
#> SRR957913 3 0.2377 0.83013 0.000 0.000 0.872 0.128 0.000
#> SRR957917 5 0.4897 0.21670 0.004 0.028 0.352 0.000 0.616
#> SRR957918 2 0.1410 0.78529 0.000 0.940 0.000 0.060 0.000
#> SRR957920 5 0.1197 0.66711 0.000 0.048 0.000 0.000 0.952
#> SRR957919 2 0.4496 0.67885 0.000 0.752 0.000 0.156 0.092
#> SRR957921 5 0.4893 0.26909 0.000 0.404 0.000 0.028 0.568
#> SRR957922 5 0.1197 0.66711 0.000 0.048 0.000 0.000 0.952
#> SRR957924 3 0.3734 0.74477 0.168 0.000 0.796 0.000 0.036
#> SRR957923 4 0.3300 0.65281 0.000 0.204 0.000 0.792 0.004
#> SRR957925 5 0.4348 0.57696 0.000 0.316 0.000 0.016 0.668
#> SRR957926 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957927 2 0.4957 0.32547 0.000 0.624 0.000 0.044 0.332
#> SRR957928 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957929 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957930 5 0.4192 0.47841 0.000 0.404 0.000 0.000 0.596
#> SRR957931 5 0.3913 0.56716 0.000 0.324 0.000 0.000 0.676
#> SRR957932 3 0.2536 0.83046 0.004 0.000 0.868 0.128 0.000
#> SRR957933 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957934 5 0.3796 0.60312 0.000 0.300 0.000 0.000 0.700
#> SRR957935 5 0.1671 0.67554 0.000 0.076 0.000 0.000 0.924
#> SRR957936 2 0.2966 0.72023 0.000 0.816 0.000 0.184 0.000
#> SRR957937 2 0.0290 0.79214 0.000 0.992 0.000 0.000 0.008
#> SRR957938 2 0.2561 0.74529 0.000 0.856 0.000 0.144 0.000
#> SRR957939 4 0.3309 0.89863 0.000 0.036 0.128 0.836 0.000
#> SRR957941 5 0.1732 0.67571 0.000 0.080 0.000 0.000 0.920
#> SRR957940 3 0.2773 0.76667 0.164 0.000 0.836 0.000 0.000
#> SRR957942 2 0.0579 0.79291 0.000 0.984 0.000 0.008 0.008
#> SRR957943 2 0.2966 0.72023 0.000 0.816 0.000 0.184 0.000
#> SRR957944 2 0.2690 0.73720 0.000 0.844 0.000 0.156 0.000
#> SRR957945 3 0.2377 0.83013 0.000 0.000 0.872 0.128 0.000
#> SRR957946 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957948 2 0.0579 0.79040 0.000 0.984 0.000 0.008 0.008
#> SRR957949 5 0.3796 0.60312 0.000 0.300 0.000 0.000 0.700
#> SRR957950 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957951 5 0.4382 0.50548 0.000 0.288 0.000 0.024 0.688
#> SRR957952 5 0.4066 0.27593 0.000 0.000 0.324 0.004 0.672
#> SRR957953 3 0.0162 0.83125 0.000 0.000 0.996 0.004 0.000
#> SRR957954 3 0.0880 0.82347 0.032 0.000 0.968 0.000 0.000
#> SRR957956 3 0.0162 0.83125 0.000 0.000 0.996 0.004 0.000
#> SRR957957 4 0.3309 0.89863 0.000 0.036 0.128 0.836 0.000
#> SRR957958 3 0.0290 0.83016 0.000 0.000 0.992 0.008 0.000
#> SRR957959 5 0.0451 0.63731 0.000 0.008 0.004 0.000 0.988
#> SRR957960 5 0.3752 0.60612 0.000 0.292 0.000 0.000 0.708
#> SRR957961 5 0.4876 0.28734 0.000 0.396 0.000 0.028 0.576
#> SRR957962 3 0.4150 0.40436 0.388 0.000 0.612 0.000 0.000
#> SRR957963 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957964 3 0.4307 0.15085 0.496 0.000 0.504 0.000 0.000
#> SRR957965 2 0.2929 0.72322 0.000 0.820 0.000 0.180 0.000
#> SRR957966 1 0.0000 0.96459 1.000 0.000 0.000 0.000 0.000
#> SRR957967 3 0.0162 0.83165 0.004 0.000 0.996 0.000 0.000
#> SRR957968 3 0.0162 0.83125 0.000 0.000 0.996 0.004 0.000
#> SRR957969 3 0.2690 0.77522 0.156 0.000 0.844 0.000 0.000
#> SRR957970 2 0.1549 0.78456 0.000 0.944 0.000 0.016 0.040
#> SRR957971 3 0.2377 0.83013 0.000 0.000 0.872 0.128 0.000
#> SRR957972 3 0.5960 0.38033 0.000 0.000 0.516 0.116 0.368
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957915 2 0.0000 0.876 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957916 5 0.0547 0.757 0.000 0.000 0.000 0.000 0.980 0.020
#> SRR957884 4 0.3652 0.663 0.000 0.004 0.324 0.672 0.000 0.000
#> SRR957885 4 0.1556 0.747 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR957886 2 0.0260 0.875 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR957887 4 0.1714 0.743 0.000 0.000 0.000 0.908 0.000 0.092
#> SRR957888 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957889 1 0.2706 0.913 0.860 0.000 0.000 0.000 0.036 0.104
#> SRR957890 1 0.1765 0.933 0.904 0.000 0.000 0.000 0.000 0.096
#> SRR957891 6 0.3720 0.798 0.000 0.236 0.000 0.000 0.028 0.736
#> SRR957893 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957892 1 0.1765 0.933 0.904 0.000 0.000 0.000 0.000 0.096
#> SRR957894 2 0.0000 0.876 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957895 4 0.5066 0.423 0.000 0.104 0.304 0.592 0.000 0.000
#> SRR957896 5 0.2302 0.755 0.000 0.120 0.000 0.000 0.872 0.008
#> SRR957897 3 0.1863 0.912 0.000 0.104 0.896 0.000 0.000 0.000
#> SRR957898 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957899 6 0.3808 0.799 0.000 0.228 0.000 0.000 0.036 0.736
#> SRR957900 5 0.0547 0.757 0.000 0.000 0.000 0.000 0.980 0.020
#> SRR957901 6 0.4210 0.683 0.000 0.336 0.000 0.000 0.028 0.636
#> SRR957902 5 0.3307 0.708 0.000 0.148 0.000 0.000 0.808 0.044
#> SRR957903 4 0.1714 0.743 0.000 0.000 0.000 0.908 0.000 0.092
#> SRR957904 4 0.5209 0.200 0.000 0.000 0.000 0.564 0.324 0.112
#> SRR957905 4 0.2730 0.744 0.000 0.000 0.192 0.808 0.000 0.000
#> SRR957906 6 0.3720 0.798 0.000 0.236 0.000 0.000 0.028 0.736
#> SRR957907 2 0.5304 0.339 0.000 0.572 0.000 0.000 0.292 0.136
#> SRR957908 2 0.1075 0.854 0.000 0.952 0.048 0.000 0.000 0.000
#> SRR957909 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957910 2 0.1564 0.840 0.000 0.936 0.000 0.000 0.024 0.040
#> SRR957911 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957912 5 0.6818 0.334 0.204 0.000 0.000 0.212 0.492 0.092
#> SRR957913 4 0.1714 0.743 0.000 0.000 0.000 0.908 0.000 0.092
#> SRR957917 5 0.5751 0.514 0.092 0.000 0.000 0.176 0.640 0.092
#> SRR957918 2 0.0000 0.876 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957920 5 0.1930 0.764 0.000 0.036 0.000 0.012 0.924 0.028
#> SRR957919 2 0.2762 0.700 0.000 0.804 0.000 0.000 0.196 0.000
#> SRR957921 6 0.4074 0.749 0.000 0.140 0.000 0.000 0.108 0.752
#> SRR957922 5 0.0363 0.760 0.000 0.000 0.000 0.000 0.988 0.012
#> SRR957924 4 0.3011 0.732 0.192 0.000 0.004 0.800 0.004 0.000
#> SRR957923 3 0.3602 0.865 0.000 0.136 0.792 0.000 0.072 0.000
#> SRR957925 5 0.2969 0.661 0.000 0.224 0.000 0.000 0.776 0.000
#> SRR957926 1 0.1814 0.933 0.900 0.000 0.000 0.000 0.000 0.100
#> SRR957927 2 0.4403 0.538 0.000 0.648 0.048 0.000 0.304 0.000
#> SRR957928 1 0.3213 0.886 0.820 0.000 0.000 0.000 0.048 0.132
#> SRR957929 1 0.3213 0.886 0.820 0.000 0.000 0.000 0.048 0.132
#> SRR957930 5 0.2302 0.755 0.000 0.120 0.000 0.000 0.872 0.008
#> SRR957931 5 0.4703 0.501 0.000 0.164 0.000 0.000 0.684 0.152
#> SRR957932 4 0.3315 0.756 0.104 0.000 0.000 0.820 0.000 0.076
#> SRR957933 1 0.1765 0.933 0.904 0.000 0.000 0.000 0.000 0.096
#> SRR957934 5 0.2048 0.759 0.000 0.120 0.000 0.000 0.880 0.000
#> SRR957935 5 0.1349 0.767 0.000 0.056 0.000 0.000 0.940 0.004
#> SRR957936 2 0.1075 0.854 0.000 0.952 0.048 0.000 0.000 0.000
#> SRR957937 2 0.0363 0.873 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR957938 2 0.0000 0.876 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR957939 3 0.1910 0.915 0.000 0.108 0.892 0.000 0.000 0.000
#> SRR957941 5 0.1327 0.748 0.000 0.000 0.000 0.000 0.936 0.064
#> SRR957940 4 0.2994 0.724 0.208 0.000 0.004 0.788 0.000 0.000
#> SRR957942 2 0.0260 0.875 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR957943 2 0.1075 0.854 0.000 0.952 0.048 0.000 0.000 0.000
#> SRR957944 2 0.1267 0.845 0.000 0.940 0.000 0.000 0.060 0.000
#> SRR957945 4 0.1610 0.746 0.000 0.000 0.000 0.916 0.000 0.084
#> SRR957946 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957947 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957948 2 0.0993 0.861 0.000 0.964 0.000 0.000 0.024 0.012
#> SRR957949 5 0.2048 0.759 0.000 0.120 0.000 0.000 0.880 0.000
#> SRR957950 1 0.1765 0.933 0.904 0.000 0.000 0.000 0.000 0.096
#> SRR957951 6 0.3795 0.483 0.000 0.004 0.000 0.000 0.364 0.632
#> SRR957952 5 0.4910 0.541 0.000 0.000 0.000 0.244 0.640 0.116
#> SRR957953 4 0.2491 0.752 0.000 0.000 0.164 0.836 0.000 0.000
#> SRR957954 4 0.4646 0.707 0.144 0.000 0.028 0.732 0.000 0.096
#> SRR957956 4 0.2300 0.756 0.000 0.000 0.144 0.856 0.000 0.000
#> SRR957957 3 0.3078 0.909 0.000 0.108 0.836 0.000 0.056 0.000
#> SRR957958 4 0.2793 0.741 0.000 0.000 0.200 0.800 0.000 0.000
#> SRR957959 5 0.2520 0.695 0.000 0.000 0.000 0.004 0.844 0.152
#> SRR957960 5 0.2048 0.759 0.000 0.120 0.000 0.000 0.880 0.000
#> SRR957961 6 0.3614 0.671 0.000 0.028 0.000 0.000 0.220 0.752
#> SRR957962 4 0.5040 0.547 0.284 0.000 0.004 0.616 0.000 0.096
#> SRR957963 1 0.0000 0.940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR957964 4 0.5217 0.342 0.392 0.000 0.000 0.512 0.000 0.096
#> SRR957965 2 0.1075 0.854 0.000 0.952 0.048 0.000 0.000 0.000
#> SRR957966 1 0.1765 0.933 0.904 0.000 0.000 0.000 0.000 0.096
#> SRR957967 4 0.4452 0.729 0.104 0.000 0.040 0.760 0.000 0.096
#> SRR957968 4 0.2793 0.741 0.000 0.000 0.200 0.800 0.000 0.000
#> SRR957969 4 0.4224 0.708 0.156 0.000 0.004 0.744 0.000 0.096
#> SRR957970 2 0.2814 0.727 0.000 0.820 0.000 0.000 0.172 0.008
#> SRR957971 4 0.1714 0.743 0.000 0.000 0.000 0.908 0.000 0.092
#> SRR957972 5 0.5535 0.227 0.000 0.000 0.000 0.428 0.440 0.132
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 16534 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.510 0.798 0.906 0.4625 0.526 0.526
#> 3 3 0.524 0.731 0.852 0.3887 0.697 0.491
#> 4 4 0.694 0.753 0.856 0.1308 0.775 0.468
#> 5 5 0.641 0.685 0.827 0.0692 0.845 0.505
#> 6 6 0.662 0.645 0.807 0.0410 0.924 0.685
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
#> SRR957914 1 0.0376 0.8387 0.996 0.004
#> SRR957915 2 0.0000 0.9165 0.000 1.000
#> SRR957916 2 0.0376 0.9140 0.004 0.996
#> SRR957884 2 0.7139 0.7461 0.196 0.804
#> SRR957885 1 0.0000 0.8384 1.000 0.000
#> SRR957886 2 0.0000 0.9165 0.000 1.000
#> SRR957887 1 0.9522 0.4036 0.628 0.372
#> SRR957888 1 0.0000 0.8384 1.000 0.000
#> SRR957889 1 0.6247 0.8038 0.844 0.156
#> SRR957890 1 0.5946 0.8115 0.856 0.144
#> SRR957891 2 0.0000 0.9165 0.000 1.000
#> SRR957893 1 0.0376 0.8387 0.996 0.004
#> SRR957892 1 0.2423 0.8337 0.960 0.040
#> SRR957894 2 0.0000 0.9165 0.000 1.000
#> SRR957895 2 0.7139 0.7461 0.196 0.804
#> SRR957896 2 0.0000 0.9165 0.000 1.000
#> SRR957897 2 0.7139 0.7461 0.196 0.804
#> SRR957898 1 0.0000 0.8384 1.000 0.000
#> SRR957899 2 0.0000 0.9165 0.000 1.000
#> SRR957900 2 0.0376 0.9140 0.004 0.996
#> SRR957901 2 0.0000 0.9165 0.000 1.000
#> SRR957902 2 0.0000 0.9165 0.000 1.000
#> SRR957903 1 0.7674 0.7499 0.776 0.224
#> SRR957904 1 0.9775 0.4881 0.588 0.412
#> SRR957905 2 0.7219 0.7424 0.200 0.800
#> SRR957906 2 0.0000 0.9165 0.000 1.000
#> SRR957907 2 0.0000 0.9165 0.000 1.000
#> SRR957908 2 0.0376 0.9143 0.004 0.996
#> SRR957909 1 0.0376 0.8387 0.996 0.004
#> SRR957910 2 0.0000 0.9165 0.000 1.000
#> SRR957911 1 0.0000 0.8384 1.000 0.000
#> SRR957912 1 0.7745 0.7528 0.772 0.228
#> SRR957913 1 0.8909 0.6679 0.692 0.308
#> SRR957917 2 0.9608 0.1884 0.384 0.616
#> SRR957918 2 0.0000 0.9165 0.000 1.000
#> SRR957920 2 0.0376 0.9140 0.004 0.996
#> SRR957919 2 0.0000 0.9165 0.000 1.000
#> SRR957921 2 0.0376 0.9140 0.004 0.996
#> SRR957922 2 0.0000 0.9165 0.000 1.000
#> SRR957924 2 0.9983 0.0831 0.476 0.524
#> SRR957923 2 0.5178 0.8245 0.116 0.884
#> SRR957925 2 0.0000 0.9165 0.000 1.000
#> SRR957926 1 0.7139 0.7723 0.804 0.196
#> SRR957927 2 0.0376 0.9143 0.004 0.996
#> SRR957928 1 0.7139 0.7723 0.804 0.196
#> SRR957929 2 0.6343 0.7386 0.160 0.840
#> SRR957930 2 0.0000 0.9165 0.000 1.000
#> SRR957931 2 0.0000 0.9165 0.000 1.000
#> SRR957932 1 0.4562 0.8331 0.904 0.096
#> SRR957933 1 0.5519 0.8200 0.872 0.128
#> SRR957934 2 0.0000 0.9165 0.000 1.000
#> SRR957935 2 0.0000 0.9165 0.000 1.000
#> SRR957936 2 0.0000 0.9165 0.000 1.000
#> SRR957937 2 0.0000 0.9165 0.000 1.000
#> SRR957938 2 0.0000 0.9165 0.000 1.000
#> SRR957939 2 0.6343 0.7838 0.160 0.840
#> SRR957941 2 0.0000 0.9165 0.000 1.000
#> SRR957940 2 0.8081 0.5759 0.248 0.752
#> SRR957942 2 0.0000 0.9165 0.000 1.000
#> SRR957943 2 0.0672 0.9117 0.008 0.992
#> SRR957944 2 0.0000 0.9165 0.000 1.000
#> SRR957945 1 0.5842 0.8138 0.860 0.140
#> SRR957946 1 0.4022 0.8374 0.920 0.080
#> SRR957947 1 0.3879 0.8381 0.924 0.076
#> SRR957948 2 0.0000 0.9165 0.000 1.000
#> SRR957949 2 0.0000 0.9165 0.000 1.000
#> SRR957950 1 0.4690 0.8068 0.900 0.100
#> SRR957951 2 0.0000 0.9165 0.000 1.000
#> SRR957952 2 0.9608 0.1885 0.384 0.616
#> SRR957953 2 0.8813 0.6036 0.300 0.700
#> SRR957954 1 0.0000 0.8384 1.000 0.000
#> SRR957956 1 0.9881 0.2035 0.564 0.436
#> SRR957957 2 0.5946 0.7987 0.144 0.856
#> SRR957958 2 0.8555 0.6381 0.280 0.720
#> SRR957959 2 0.0376 0.9140 0.004 0.996
#> SRR957960 2 0.0000 0.9165 0.000 1.000
#> SRR957961 2 0.0000 0.9165 0.000 1.000
#> SRR957962 1 0.0376 0.8387 0.996 0.004
#> SRR957963 1 0.0672 0.8388 0.992 0.008
#> SRR957964 1 0.0376 0.8394 0.996 0.004
#> SRR957965 2 0.0000 0.9165 0.000 1.000
#> SRR957966 1 0.8555 0.6023 0.720 0.280
#> SRR957967 1 0.9358 0.4570 0.648 0.352
#> SRR957968 2 0.7674 0.7165 0.224 0.776
#> SRR957969 1 0.0000 0.8384 1.000 0.000
#> SRR957970 2 0.0000 0.9165 0.000 1.000
#> SRR957971 1 0.4298 0.8355 0.912 0.088
#> SRR957972 1 0.9983 0.3176 0.524 0.476
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR957914 3 0.4399 0.6797 0.188 0.000 0.812
#> SRR957915 2 0.3879 0.8426 0.152 0.848 0.000
#> SRR957916 2 0.0892 0.8505 0.000 0.980 0.020
#> SRR957884 1 0.0000 0.7924 1.000 0.000 0.000
#> SRR957885 3 0.5780 0.7592 0.080 0.120 0.800
#> SRR957886 2 0.3816 0.8444 0.148 0.852 0.000
#> SRR957887 3 0.8979 0.1439 0.420 0.128 0.452
#> SRR957888 3 0.3752 0.7171 0.144 0.000 0.856
#> SRR957889 3 0.3412 0.7753 0.000 0.124 0.876
#> SRR957890 3 0.0747 0.7920 0.000 0.016 0.984
#> SRR957891 2 0.0000 0.8584 0.000 1.000 0.000
#> SRR957893 3 0.4605 0.6626 0.204 0.000 0.796
#> SRR957892 1 0.4002 0.7526 0.840 0.000 0.160
#> SRR957894 2 0.6126 0.4836 0.400 0.600 0.000
#> SRR957895 1 0.0592 0.7914 0.988 0.012 0.000
#> SRR957896 2 0.0592 0.8606 0.012 0.988 0.000
#> SRR957897 1 0.0592 0.7914 0.988 0.012 0.000
#> SRR957898 3 0.0000 0.7896 0.000 0.000 1.000
#> SRR957899 2 0.0000 0.8584 0.000 1.000 0.000
#> SRR957900 2 0.0892 0.8505 0.000 0.980 0.020
#> SRR957901 2 0.0892 0.8617 0.020 0.980 0.000
#> SRR957902 2 0.3619 0.8490 0.136 0.864 0.000
#> SRR957903 3 0.6034 0.7489 0.068 0.152 0.780
#> SRR957904 2 0.5619 0.5575 0.012 0.744 0.244
#> SRR957905 1 0.0747 0.7944 0.984 0.000 0.016
#> SRR957906 2 0.1267 0.8550 0.024 0.972 0.004
#> SRR957907 2 0.3752 0.8461 0.144 0.856 0.000
#> SRR957908 1 0.5254 0.5202 0.736 0.264 0.000
#> SRR957909 3 0.4452 0.6753 0.192 0.000 0.808
#> SRR957910 2 0.3551 0.8502 0.132 0.868 0.000
#> SRR957911 3 0.0747 0.7837 0.016 0.000 0.984
#> SRR957912 2 0.5560 0.4467 0.000 0.700 0.300
#> SRR957913 3 0.5219 0.7342 0.016 0.196 0.788
#> SRR957917 2 0.2537 0.8052 0.000 0.920 0.080
#> SRR957918 2 0.4235 0.8263 0.176 0.824 0.000
#> SRR957920 2 0.1129 0.8486 0.004 0.976 0.020
#> SRR957919 2 0.3816 0.8444 0.148 0.852 0.000
#> SRR957921 2 0.1620 0.8419 0.012 0.964 0.024
#> SRR957922 2 0.0237 0.8593 0.004 0.996 0.000
#> SRR957924 3 0.6140 0.1155 0.404 0.000 0.596
#> SRR957923 1 0.1860 0.7705 0.948 0.052 0.000
#> SRR957925 2 0.3816 0.8444 0.148 0.852 0.000
#> SRR957926 3 0.4291 0.6696 0.000 0.180 0.820
#> SRR957927 2 0.6305 0.2481 0.484 0.516 0.000
#> SRR957928 3 0.6280 0.3177 0.000 0.460 0.540
#> SRR957929 2 0.3528 0.8338 0.016 0.892 0.092
#> SRR957930 2 0.3267 0.8535 0.116 0.884 0.000
#> SRR957931 2 0.0000 0.8584 0.000 1.000 0.000
#> SRR957932 3 0.3445 0.7840 0.016 0.088 0.896
#> SRR957933 3 0.0000 0.7896 0.000 0.000 1.000
#> SRR957934 2 0.0892 0.8615 0.020 0.980 0.000
#> SRR957935 2 0.0892 0.8615 0.020 0.980 0.000
#> SRR957936 1 0.6280 -0.0978 0.540 0.460 0.000
#> SRR957937 2 0.3551 0.8501 0.132 0.868 0.000
#> SRR957938 2 0.3879 0.8423 0.152 0.848 0.000
#> SRR957939 1 0.0747 0.7903 0.984 0.016 0.000
#> SRR957941 2 0.0000 0.8584 0.000 1.000 0.000
#> SRR957940 3 0.8340 0.5889 0.144 0.236 0.620
#> SRR957942 2 0.4178 0.8290 0.172 0.828 0.000
#> SRR957943 1 0.4654 0.6235 0.792 0.208 0.000
#> SRR957944 2 0.4002 0.8374 0.160 0.840 0.000
#> SRR957945 3 0.4782 0.7551 0.016 0.164 0.820
#> SRR957946 3 0.0000 0.7896 0.000 0.000 1.000
#> SRR957947 3 0.0000 0.7896 0.000 0.000 1.000
#> SRR957948 2 0.3816 0.8444 0.148 0.852 0.000
#> SRR957949 2 0.3192 0.8542 0.112 0.888 0.000
#> SRR957950 1 0.4002 0.7526 0.840 0.000 0.160
#> SRR957951 2 0.0829 0.8533 0.012 0.984 0.004
#> SRR957952 2 0.4128 0.7333 0.012 0.856 0.132
#> SRR957953 1 0.4589 0.7375 0.820 0.008 0.172
#> SRR957954 1 0.5988 0.5212 0.632 0.000 0.368
#> SRR957956 1 0.6416 0.5945 0.676 0.020 0.304
#> SRR957957 1 0.1289 0.7826 0.968 0.032 0.000
#> SRR957958 1 0.2066 0.7906 0.940 0.000 0.060
#> SRR957959 2 0.1751 0.8394 0.012 0.960 0.028
#> SRR957960 2 0.3879 0.8426 0.152 0.848 0.000
#> SRR957961 2 0.1015 0.8516 0.012 0.980 0.008
#> SRR957962 1 0.4121 0.7401 0.832 0.000 0.168
#> SRR957963 1 0.4121 0.7462 0.832 0.000 0.168
#> SRR957964 3 0.1015 0.7906 0.012 0.008 0.980
#> SRR957965 2 0.4235 0.8261 0.176 0.824 0.000
#> SRR957966 1 0.3941 0.7553 0.844 0.000 0.156
#> SRR957967 1 0.3752 0.7573 0.856 0.000 0.144
#> SRR957968 1 0.5551 0.6737 0.768 0.020 0.212
#> SRR957969 3 0.3425 0.7418 0.112 0.004 0.884
#> SRR957970 2 0.6432 0.4040 0.428 0.568 0.004
#> SRR957971 3 0.5060 0.7582 0.028 0.156 0.816
#> SRR957972 2 0.6113 0.4415 0.012 0.688 0.300
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR957914 1 0.1022 0.8202 0.968 0.000 0.000 0.032
#> SRR957915 2 0.1661 0.9272 0.000 0.944 0.004 0.052
#> SRR957916 2 0.0927 0.9221 0.016 0.976 0.008 0.000
#> SRR957884 4 0.2921 0.7175 0.000 0.000 0.140 0.860
#> SRR957885 3 0.0188 0.8558 0.004 0.000 0.996 0.000
#> SRR957886 2 0.1209 0.9316 0.000 0.964 0.004 0.032
#> SRR957887 3 0.0188 0.8563 0.000 0.004 0.996 0.000
#> SRR957888 1 0.1388 0.8209 0.960 0.000 0.012 0.028
#> SRR957889 1 0.2676 0.7898 0.896 0.012 0.092 0.000
#> SRR957890 1 0.3356 0.7334 0.824 0.000 0.176 0.000
#> SRR957891 2 0.3450 0.8055 0.000 0.836 0.156 0.008
#> SRR957893 1 0.2805 0.7873 0.888 0.000 0.012 0.100
#> SRR957892 1 0.4950 0.3750 0.620 0.000 0.004 0.376
#> SRR957894 4 0.4866 0.3901 0.000 0.404 0.000 0.596
#> SRR957895 4 0.0376 0.7255 0.004 0.000 0.004 0.992
#> SRR957896 2 0.0188 0.9297 0.000 0.996 0.004 0.000
#> SRR957897 4 0.0000 0.7259 0.000 0.000 0.000 1.000
#> SRR957898 1 0.2704 0.7753 0.876 0.000 0.124 0.000
#> SRR957899 2 0.2197 0.8847 0.000 0.916 0.080 0.004
#> SRR957900 2 0.0927 0.9221 0.016 0.976 0.008 0.000
#> SRR957901 2 0.2408 0.9119 0.000 0.920 0.044 0.036
#> SRR957902 2 0.1489 0.9298 0.000 0.952 0.004 0.044
#> SRR957903 3 0.0000 0.8565 0.000 0.000 1.000 0.000
#> SRR957904 3 0.1151 0.8522 0.008 0.024 0.968 0.000
#> SRR957905 4 0.4804 0.4056 0.000 0.000 0.384 0.616
#> SRR957906 3 0.4675 0.6289 0.000 0.244 0.736 0.020
#> SRR957907 2 0.1489 0.9298 0.000 0.952 0.004 0.044
#> SRR957908 4 0.4776 0.6964 0.000 0.164 0.060 0.776
#> SRR957909 1 0.1211 0.8173 0.960 0.000 0.000 0.040
#> SRR957910 2 0.1576 0.9287 0.000 0.948 0.004 0.048
#> SRR957911 1 0.0804 0.8241 0.980 0.000 0.012 0.008
#> SRR957912 1 0.5466 0.2609 0.548 0.436 0.016 0.000
#> SRR957913 3 0.0000 0.8565 0.000 0.000 1.000 0.000
#> SRR957917 2 0.2101 0.8874 0.060 0.928 0.012 0.000
#> SRR957918 2 0.3105 0.8441 0.000 0.856 0.004 0.140
#> SRR957920 2 0.2799 0.8484 0.008 0.884 0.108 0.000
#> SRR957919 2 0.1474 0.9277 0.000 0.948 0.000 0.052
#> SRR957921 3 0.4999 0.0928 0.000 0.492 0.508 0.000
#> SRR957922 2 0.0707 0.9221 0.020 0.980 0.000 0.000
#> SRR957924 1 0.7175 0.1340 0.496 0.000 0.144 0.360
#> SRR957923 4 0.1022 0.7298 0.000 0.032 0.000 0.968
#> SRR957925 2 0.1284 0.9314 0.012 0.964 0.000 0.024
#> SRR957926 1 0.0469 0.8210 0.988 0.012 0.000 0.000
#> SRR957927 4 0.5546 0.5922 0.000 0.292 0.044 0.664
#> SRR957928 1 0.4908 0.5538 0.692 0.292 0.016 0.000
#> SRR957929 2 0.4804 0.2784 0.384 0.616 0.000 0.000
#> SRR957930 2 0.0376 0.9297 0.004 0.992 0.000 0.004
#> SRR957931 2 0.0188 0.9297 0.000 0.996 0.004 0.000
#> SRR957932 3 0.0188 0.8558 0.004 0.000 0.996 0.000
#> SRR957933 1 0.0469 0.8238 0.988 0.000 0.012 0.000
#> SRR957934 2 0.0188 0.9284 0.004 0.996 0.000 0.000
#> SRR957935 2 0.0336 0.9271 0.008 0.992 0.000 0.000
#> SRR957936 4 0.4769 0.5772 0.000 0.308 0.008 0.684
#> SRR957937 2 0.1398 0.9310 0.000 0.956 0.004 0.040
#> SRR957938 2 0.1474 0.9277 0.000 0.948 0.000 0.052
#> SRR957939 4 0.0188 0.7246 0.004 0.000 0.000 0.996
#> SRR957941 2 0.0336 0.9293 0.000 0.992 0.008 0.000
#> SRR957940 3 0.0937 0.8565 0.012 0.012 0.976 0.000
#> SRR957942 2 0.1978 0.9183 0.000 0.928 0.004 0.068
#> SRR957943 4 0.4057 0.7066 0.000 0.152 0.032 0.816
#> SRR957944 2 0.1557 0.9259 0.000 0.944 0.000 0.056
#> SRR957945 3 0.0336 0.8561 0.008 0.000 0.992 0.000
#> SRR957946 1 0.0592 0.8240 0.984 0.000 0.016 0.000
#> SRR957947 1 0.0336 0.8237 0.992 0.000 0.008 0.000
#> SRR957948 2 0.1489 0.9298 0.000 0.952 0.004 0.044
#> SRR957949 2 0.0336 0.9271 0.008 0.992 0.000 0.000
#> SRR957950 4 0.5250 0.0887 0.440 0.000 0.008 0.552
#> SRR957951 3 0.5039 0.3570 0.000 0.404 0.592 0.004
#> SRR957952 3 0.4059 0.6989 0.012 0.200 0.788 0.000
#> SRR957953 3 0.4746 0.2912 0.000 0.000 0.632 0.368
#> SRR957954 3 0.2032 0.8357 0.036 0.000 0.936 0.028
#> SRR957956 3 0.1004 0.8488 0.004 0.000 0.972 0.024
#> SRR957957 4 0.1635 0.7347 0.000 0.008 0.044 0.948
#> SRR957958 4 0.3401 0.7083 0.008 0.000 0.152 0.840
#> SRR957959 3 0.2647 0.7817 0.000 0.120 0.880 0.000
#> SRR957960 2 0.1488 0.9310 0.012 0.956 0.000 0.032
#> SRR957961 3 0.2053 0.8172 0.000 0.072 0.924 0.004
#> SRR957962 4 0.3958 0.6780 0.052 0.000 0.112 0.836
#> SRR957963 4 0.2973 0.6291 0.144 0.000 0.000 0.856
#> SRR957964 3 0.1557 0.8349 0.056 0.000 0.944 0.000
#> SRR957965 2 0.3725 0.7848 0.000 0.812 0.008 0.180
#> SRR957966 4 0.4543 0.3947 0.324 0.000 0.000 0.676
#> SRR957967 4 0.4741 0.6400 0.028 0.000 0.228 0.744
#> SRR957968 3 0.1940 0.8146 0.000 0.000 0.924 0.076
#> SRR957969 3 0.2610 0.8062 0.088 0.000 0.900 0.012
#> SRR957970 4 0.6677 0.4568 0.000 0.348 0.100 0.552
#> SRR957971 3 0.0000 0.8565 0.000 0.000 1.000 0.000
#> SRR957972 3 0.0779 0.8543 0.016 0.004 0.980 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR957914 1 0.2843 0.7688 0.876 0.000 0.000 0.076 0.048
#> SRR957915 2 0.0566 0.8365 0.000 0.984 0.004 0.012 0.000
#> SRR957916 5 0.4134 0.6603 0.004 0.284 0.008 0.000 0.704
#> SRR957884 4 0.3243 0.7289 0.000 0.004 0.180 0.812 0.004
#> SRR957885 3 0.0162 0.8275 0.000 0.000 0.996 0.004 0.000
#> SRR957886 2 0.2660 0.7735 0.000 0.864 0.000 0.008 0.128
#> SRR957887 3 0.0324 0.8280 0.000 0.004 0.992 0.004 0.000
#> SRR957888 1 0.0579 0.7960 0.984 0.000 0.000 0.008 0.008
#> SRR957889 5 0.4890 0.4173 0.224 0.008 0.060 0.000 0.708
#> SRR957890 1 0.5931 0.0938 0.460 0.000 0.436 0.000 0.104
#> SRR957891 2 0.0798 0.8355 0.000 0.976 0.016 0.000 0.008
#> SRR957893 1 0.2260 0.7757 0.908 0.000 0.000 0.064 0.028
#> SRR957892 4 0.5855 0.3374 0.344 0.004 0.004 0.564 0.084
#> SRR957894 2 0.4127 0.5772 0.000 0.680 0.000 0.312 0.008
#> SRR957895 4 0.2234 0.7572 0.004 0.004 0.016 0.916 0.060
#> SRR957896 2 0.3039 0.6779 0.000 0.808 0.000 0.000 0.192
#> SRR957897 4 0.1498 0.7578 0.000 0.024 0.016 0.952 0.008
#> SRR957898 1 0.2068 0.7629 0.904 0.000 0.092 0.000 0.004
#> SRR957899 2 0.1582 0.8256 0.000 0.944 0.028 0.000 0.028
#> SRR957900 5 0.4156 0.6552 0.004 0.288 0.008 0.000 0.700
#> SRR957901 2 0.0451 0.8361 0.000 0.988 0.008 0.000 0.004
#> SRR957902 2 0.2618 0.8214 0.000 0.900 0.012 0.036 0.052
#> SRR957903 3 0.0324 0.8291 0.000 0.004 0.992 0.000 0.004
#> SRR957904 3 0.1493 0.8191 0.000 0.024 0.948 0.000 0.028
#> SRR957905 4 0.4302 0.2246 0.000 0.000 0.480 0.520 0.000
#> SRR957906 2 0.3863 0.6416 0.000 0.772 0.200 0.028 0.000
#> SRR957907 2 0.1026 0.8337 0.000 0.968 0.004 0.004 0.024
#> SRR957908 2 0.3759 0.6825 0.000 0.764 0.016 0.220 0.000
#> SRR957909 1 0.1626 0.7957 0.940 0.000 0.000 0.016 0.044
#> SRR957910 2 0.0324 0.8370 0.000 0.992 0.004 0.004 0.000
#> SRR957911 1 0.0324 0.7971 0.992 0.000 0.004 0.000 0.004
#> SRR957912 5 0.4479 0.6312 0.184 0.072 0.000 0.000 0.744
#> SRR957913 3 0.0324 0.8289 0.000 0.004 0.992 0.000 0.004
#> SRR957917 5 0.4161 0.7324 0.012 0.236 0.012 0.000 0.740
#> SRR957918 2 0.1928 0.8210 0.000 0.920 0.004 0.072 0.004
#> SRR957920 3 0.6708 -0.1501 0.000 0.376 0.380 0.000 0.244
#> SRR957919 2 0.2358 0.7874 0.000 0.888 0.000 0.008 0.104
#> SRR957921 3 0.4906 0.0877 0.000 0.480 0.496 0.000 0.024
#> SRR957922 5 0.3274 0.7428 0.000 0.220 0.000 0.000 0.780
#> SRR957924 5 0.6795 0.2620 0.064 0.004 0.132 0.200 0.600
#> SRR957923 4 0.2825 0.6953 0.000 0.124 0.000 0.860 0.016
#> SRR957925 5 0.4526 0.6579 0.000 0.300 0.000 0.028 0.672
#> SRR957926 1 0.4090 0.5827 0.716 0.016 0.000 0.000 0.268
#> SRR957927 2 0.4169 0.6544 0.000 0.724 0.016 0.256 0.004
#> SRR957928 5 0.4612 0.6454 0.180 0.084 0.000 0.000 0.736
#> SRR957929 5 0.4328 0.6943 0.108 0.108 0.000 0.004 0.780
#> SRR957930 2 0.1831 0.8048 0.000 0.920 0.000 0.004 0.076
#> SRR957931 2 0.3534 0.6014 0.000 0.744 0.000 0.000 0.256
#> SRR957932 3 0.0162 0.8286 0.000 0.000 0.996 0.000 0.004
#> SRR957933 1 0.3821 0.6771 0.764 0.000 0.020 0.000 0.216
#> SRR957934 2 0.3305 0.6404 0.000 0.776 0.000 0.000 0.224
#> SRR957935 5 0.3684 0.6977 0.000 0.280 0.000 0.000 0.720
#> SRR957936 2 0.3455 0.7017 0.000 0.784 0.008 0.208 0.000
#> SRR957937 2 0.0324 0.8360 0.000 0.992 0.004 0.000 0.004
#> SRR957938 2 0.0693 0.8370 0.000 0.980 0.000 0.008 0.012
#> SRR957939 4 0.0932 0.7578 0.000 0.004 0.004 0.972 0.020
#> SRR957941 2 0.4923 0.4550 0.000 0.680 0.068 0.000 0.252
#> SRR957940 3 0.0902 0.8289 0.004 0.008 0.976 0.004 0.008
#> SRR957942 2 0.0854 0.8380 0.000 0.976 0.004 0.012 0.008
#> SRR957943 2 0.4040 0.6298 0.000 0.712 0.012 0.276 0.000
#> SRR957944 2 0.2291 0.8224 0.000 0.908 0.000 0.036 0.056
#> SRR957945 3 0.0324 0.8289 0.000 0.004 0.992 0.000 0.004
#> SRR957946 1 0.0451 0.7969 0.988 0.000 0.004 0.000 0.008
#> SRR957947 1 0.2719 0.7392 0.852 0.000 0.004 0.000 0.144
#> SRR957948 2 0.0324 0.8370 0.000 0.992 0.004 0.004 0.000
#> SRR957949 5 0.4197 0.6884 0.004 0.212 0.000 0.032 0.752
#> SRR957950 4 0.4765 0.6786 0.112 0.004 0.004 0.752 0.128
#> SRR957951 3 0.4696 0.2598 0.000 0.428 0.556 0.000 0.016
#> SRR957952 3 0.3471 0.7509 0.000 0.092 0.836 0.000 0.072
#> SRR957953 3 0.3968 0.4622 0.000 0.004 0.716 0.276 0.004
#> SRR957954 3 0.1329 0.8174 0.008 0.000 0.956 0.032 0.004
#> SRR957956 3 0.1121 0.8103 0.000 0.000 0.956 0.044 0.000
#> SRR957957 4 0.2027 0.7559 0.000 0.040 0.024 0.928 0.008
#> SRR957958 4 0.3421 0.7127 0.000 0.000 0.204 0.788 0.008
#> SRR957959 3 0.2951 0.7632 0.000 0.112 0.860 0.000 0.028
#> SRR957960 5 0.5179 0.6739 0.000 0.288 0.000 0.072 0.640
#> SRR957961 3 0.2471 0.7534 0.000 0.136 0.864 0.000 0.000
#> SRR957962 4 0.3949 0.7237 0.100 0.000 0.048 0.824 0.028
#> SRR957963 1 0.5467 0.0703 0.500 0.012 0.004 0.456 0.028
#> SRR957964 3 0.2890 0.7079 0.160 0.004 0.836 0.000 0.000
#> SRR957965 2 0.1124 0.8304 0.000 0.960 0.004 0.036 0.000
#> SRR957966 4 0.4627 0.6300 0.188 0.000 0.000 0.732 0.080
#> SRR957967 4 0.5452 0.6651 0.044 0.016 0.208 0.704 0.028
#> SRR957968 3 0.1544 0.7909 0.000 0.000 0.932 0.068 0.000
#> SRR957969 3 0.0960 0.8235 0.008 0.000 0.972 0.016 0.004
#> SRR957970 4 0.6004 0.6637 0.000 0.136 0.068 0.680 0.116
#> SRR957971 3 0.0162 0.8286 0.000 0.000 0.996 0.000 0.004
#> SRR957972 3 0.2583 0.7661 0.000 0.004 0.864 0.000 0.132
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR957914 1 0.3865 0.7076 0.792 0.068 0.000 0.124 0.000 0.016
#> SRR957915 5 0.0858 0.7989 0.000 0.028 0.000 0.004 0.968 0.000
#> SRR957916 2 0.3984 0.6789 0.000 0.780 0.012 0.000 0.124 0.084
#> SRR957884 4 0.3690 0.4777 0.000 0.012 0.288 0.700 0.000 0.000
#> SRR957885 3 0.0000 0.8743 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957886 5 0.3607 0.5557 0.000 0.000 0.000 0.000 0.652 0.348
#> SRR957887 3 0.0000 0.8743 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957888 1 0.0146 0.7945 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR957889 2 0.4229 0.5613 0.108 0.792 0.052 0.000 0.024 0.024
#> SRR957890 1 0.5368 0.1887 0.472 0.440 0.080 0.000 0.004 0.004
#> SRR957891 5 0.1873 0.8018 0.000 0.020 0.008 0.000 0.924 0.048
#> SRR957893 1 0.1918 0.7675 0.904 0.008 0.000 0.088 0.000 0.000
#> SRR957892 4 0.6091 0.4324 0.208 0.208 0.000 0.552 0.000 0.032
#> SRR957894 5 0.4233 0.6436 0.000 0.100 0.000 0.140 0.752 0.008
#> SRR957895 4 0.4720 0.5219 0.000 0.236 0.000 0.688 0.032 0.044
#> SRR957896 5 0.4539 0.5642 0.000 0.048 0.000 0.004 0.644 0.304
#> SRR957897 4 0.2020 0.5771 0.000 0.000 0.008 0.896 0.096 0.000
#> SRR957898 1 0.0806 0.7908 0.972 0.008 0.020 0.000 0.000 0.000
#> SRR957899 5 0.2815 0.7916 0.000 0.044 0.024 0.000 0.876 0.056
#> SRR957900 2 0.3934 0.6760 0.000 0.780 0.012 0.000 0.140 0.068
#> SRR957901 5 0.1552 0.8010 0.000 0.036 0.004 0.000 0.940 0.020
#> SRR957902 5 0.7139 0.4992 0.000 0.048 0.124 0.096 0.540 0.192
#> SRR957903 3 0.0000 0.8743 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957904 3 0.0767 0.8695 0.000 0.012 0.976 0.000 0.008 0.004
#> SRR957905 3 0.3575 0.5473 0.000 0.008 0.708 0.284 0.000 0.000
#> SRR957906 5 0.2635 0.7582 0.000 0.004 0.100 0.020 0.872 0.004
#> SRR957907 5 0.2848 0.7631 0.000 0.004 0.000 0.008 0.828 0.160
#> SRR957908 5 0.1958 0.7656 0.000 0.004 0.000 0.100 0.896 0.000
#> SRR957909 1 0.1850 0.7821 0.924 0.008 0.000 0.016 0.000 0.052
#> SRR957910 5 0.1003 0.8045 0.000 0.016 0.000 0.000 0.964 0.020
#> SRR957911 1 0.0260 0.7951 0.992 0.008 0.000 0.000 0.000 0.000
#> SRR957912 6 0.2110 0.7348 0.084 0.004 0.000 0.000 0.012 0.900
#> SRR957913 3 0.0260 0.8732 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR957917 6 0.1511 0.7515 0.000 0.012 0.004 0.000 0.044 0.940
#> SRR957918 5 0.2813 0.7828 0.000 0.008 0.000 0.092 0.864 0.036
#> SRR957920 6 0.3382 0.6873 0.000 0.004 0.112 0.000 0.064 0.820
#> SRR957919 5 0.3804 0.5816 0.000 0.000 0.000 0.008 0.656 0.336
#> SRR957921 3 0.5461 0.3193 0.000 0.020 0.568 0.000 0.324 0.088
#> SRR957922 6 0.1970 0.7492 0.000 0.060 0.000 0.000 0.028 0.912
#> SRR957924 4 0.7707 0.3070 0.012 0.256 0.108 0.396 0.008 0.220
#> SRR957923 4 0.5233 0.4442 0.000 0.112 0.000 0.648 0.220 0.020
#> SRR957925 6 0.2623 0.6723 0.000 0.132 0.000 0.000 0.016 0.852
#> SRR957926 6 0.3899 0.3334 0.364 0.000 0.000 0.000 0.008 0.628
#> SRR957927 5 0.4944 0.3846 0.000 0.004 0.040 0.360 0.584 0.012
#> SRR957928 6 0.2463 0.7392 0.068 0.020 0.000 0.000 0.020 0.892
#> SRR957929 6 0.1364 0.7464 0.016 0.020 0.000 0.000 0.012 0.952
#> SRR957930 5 0.2932 0.7773 0.000 0.024 0.000 0.004 0.840 0.132
#> SRR957931 6 0.2933 0.6420 0.000 0.004 0.000 0.000 0.200 0.796
#> SRR957932 3 0.0000 0.8743 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957933 1 0.4350 0.5833 0.696 0.020 0.028 0.000 0.000 0.256
#> SRR957934 5 0.3993 0.4337 0.000 0.008 0.000 0.000 0.592 0.400
#> SRR957935 6 0.1434 0.7533 0.000 0.012 0.000 0.000 0.048 0.940
#> SRR957936 5 0.1897 0.7733 0.000 0.004 0.000 0.084 0.908 0.004
#> SRR957937 5 0.1168 0.8046 0.000 0.016 0.000 0.000 0.956 0.028
#> SRR957938 5 0.1908 0.8008 0.000 0.000 0.000 0.004 0.900 0.096
#> SRR957939 4 0.3774 0.5753 0.000 0.116 0.000 0.804 0.056 0.024
#> SRR957941 6 0.6037 -0.0741 0.000 0.032 0.112 0.000 0.424 0.432
#> SRR957940 3 0.1251 0.8658 0.008 0.000 0.956 0.024 0.000 0.012
#> SRR957942 5 0.1138 0.8054 0.000 0.004 0.000 0.012 0.960 0.024
#> SRR957943 5 0.2738 0.7178 0.000 0.004 0.000 0.176 0.820 0.000
#> SRR957944 5 0.4118 0.6910 0.000 0.016 0.000 0.032 0.732 0.220
#> SRR957945 3 0.0260 0.8732 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR957946 1 0.0603 0.7946 0.980 0.016 0.000 0.000 0.000 0.004
#> SRR957947 1 0.4399 0.2206 0.516 0.460 0.000 0.000 0.000 0.024
#> SRR957948 5 0.1245 0.8060 0.000 0.016 0.000 0.000 0.952 0.032
#> SRR957949 2 0.2613 0.6480 0.000 0.884 0.000 0.032 0.068 0.016
#> SRR957950 4 0.5325 0.4599 0.036 0.300 0.000 0.604 0.000 0.060
#> SRR957951 5 0.5053 0.4943 0.000 0.080 0.264 0.000 0.640 0.016
#> SRR957952 3 0.3185 0.7666 0.000 0.024 0.840 0.000 0.024 0.112
#> SRR957953 3 0.2848 0.7423 0.000 0.008 0.816 0.176 0.000 0.000
#> SRR957954 3 0.2048 0.8126 0.000 0.000 0.880 0.120 0.000 0.000
#> SRR957956 3 0.0777 0.8684 0.000 0.004 0.972 0.024 0.000 0.000
#> SRR957957 4 0.2909 0.5571 0.000 0.000 0.028 0.836 0.136 0.000
#> SRR957958 4 0.3695 0.4856 0.000 0.016 0.272 0.712 0.000 0.000
#> SRR957959 3 0.2170 0.8281 0.000 0.016 0.908 0.000 0.060 0.016
#> SRR957960 6 0.6573 0.2927 0.000 0.264 0.000 0.140 0.084 0.512
#> SRR957961 3 0.2527 0.7379 0.000 0.000 0.832 0.000 0.168 0.000
#> SRR957962 4 0.3372 0.5641 0.112 0.008 0.040 0.832 0.008 0.000
#> SRR957963 4 0.5041 0.0496 0.420 0.012 0.000 0.520 0.048 0.000
#> SRR957964 3 0.2632 0.7527 0.164 0.000 0.832 0.000 0.000 0.004
#> SRR957965 5 0.0458 0.7968 0.000 0.000 0.000 0.016 0.984 0.000
#> SRR957966 4 0.5145 0.5462 0.128 0.140 0.000 0.692 0.000 0.040
#> SRR957967 4 0.6254 0.3820 0.100 0.012 0.268 0.564 0.056 0.000
#> SRR957968 3 0.1398 0.8540 0.000 0.008 0.940 0.052 0.000 0.000
#> SRR957969 3 0.0520 0.8726 0.000 0.008 0.984 0.008 0.000 0.000
#> SRR957970 2 0.6417 -0.3072 0.000 0.444 0.016 0.404 0.092 0.044
#> SRR957971 3 0.0000 0.8743 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR957972 3 0.3563 0.5104 0.000 0.336 0.664 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.
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