Date: 2019-12-26 00:34:08 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 17717 rows and 83 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] 17717 83
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:hclust | 3 | 1.000 | 0.969 | 0.991 | ** | 2 |
CV:kmeans | 2 | 1.000 | 0.997 | 0.996 | ** | |
CV:pam | 2 | 1.000 | 0.992 | 0.996 | ** | |
ATC:kmeans | 2 | 1.000 | 0.994 | 0.997 | ** | |
ATC:skmeans | 2 | 1.000 | 0.961 | 0.984 | ** | |
ATC:pam | 2 | 1.000 | 0.954 | 0.983 | ** | |
ATC:mclust | 2 | 1.000 | 0.985 | 0.993 | ** | |
ATC:NMF | 2 | 1.000 | 0.996 | 0.998 | ** | |
SD:skmeans | 3 | 0.960 | 0.931 | 0.961 | ** | |
ATC:hclust | 2 | 0.948 | 0.956 | 0.978 | * | |
CV:NMF | 2 | 0.946 | 0.946 | 0.967 | * | |
MAD:skmeans | 3 | 0.912 | 0.916 | 0.965 | * | |
MAD:NMF | 3 | 0.885 | 0.918 | 0.953 | ||
CV:skmeans | 3 | 0.873 | 0.904 | 0.947 | ||
SD:NMF | 2 | 0.697 | 0.813 | 0.925 | ||
MAD:pam | 2 | 0.654 | 0.896 | 0.934 | ||
SD:pam | 2 | 0.549 | 0.852 | 0.919 | ||
MAD:mclust | 5 | 0.459 | 0.555 | 0.728 | ||
MAD:kmeans | 3 | 0.420 | 0.793 | 0.836 | ||
SD:kmeans | 3 | 0.380 | 0.690 | 0.789 | ||
CV:mclust | 3 | 0.372 | 0.715 | 0.789 | ||
SD:hclust | 3 | 0.325 | 0.704 | 0.833 | ||
MAD:hclust | 3 | 0.314 | 0.622 | 0.809 | ||
SD:mclust | 3 | 0.210 | 0.608 | 0.760 |
**: 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.697 0.813 0.925 0.5020 0.496 0.496
#> CV:NMF 2 0.946 0.946 0.967 0.3617 0.656 0.656
#> MAD:NMF 2 0.703 0.840 0.935 0.5025 0.495 0.495
#> ATC:NMF 2 1.000 0.996 0.998 0.3467 0.656 0.656
#> SD:skmeans 2 0.338 0.440 0.767 0.5043 0.500 0.500
#> CV:skmeans 2 0.878 0.936 0.971 0.4054 0.606 0.606
#> MAD:skmeans 2 0.316 0.653 0.771 0.5040 0.498 0.498
#> ATC:skmeans 2 1.000 0.961 0.984 0.4020 0.594 0.594
#> SD:mclust 2 0.369 0.257 0.698 0.3229 0.533 0.533
#> CV:mclust 2 0.486 0.806 0.900 0.3937 0.630 0.630
#> MAD:mclust 2 0.126 0.517 0.726 0.3589 0.844 0.844
#> ATC:mclust 2 1.000 0.985 0.993 0.3517 0.656 0.656
#> SD:kmeans 2 0.137 0.576 0.769 0.4634 0.520 0.520
#> CV:kmeans 2 1.000 0.997 0.996 0.3142 0.685 0.685
#> MAD:kmeans 2 0.191 0.336 0.681 0.4957 0.494 0.494
#> ATC:kmeans 2 1.000 0.994 0.997 0.3277 0.670 0.670
#> SD:pam 2 0.549 0.852 0.919 0.4524 0.556 0.556
#> CV:pam 2 1.000 0.992 0.996 0.3008 0.700 0.700
#> MAD:pam 2 0.654 0.896 0.934 0.4614 0.540 0.540
#> ATC:pam 2 1.000 0.954 0.983 0.3376 0.643 0.643
#> SD:hclust 2 0.486 0.891 0.898 0.1669 0.929 0.929
#> CV:hclust 2 1.000 0.996 0.998 0.0747 0.929 0.929
#> MAD:hclust 2 0.373 0.876 0.849 0.1831 0.929 0.929
#> ATC:hclust 2 0.948 0.956 0.978 0.3233 0.670 0.670
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.620 0.730 0.877 0.3005 0.787 0.597
#> CV:NMF 3 0.851 0.883 0.928 0.7812 0.678 0.517
#> MAD:NMF 3 0.885 0.918 0.953 0.3278 0.730 0.509
#> ATC:NMF 3 0.782 0.887 0.939 0.7492 0.728 0.586
#> SD:skmeans 3 0.960 0.931 0.961 0.3308 0.722 0.498
#> CV:skmeans 3 0.873 0.904 0.947 0.6075 0.669 0.484
#> MAD:skmeans 3 0.912 0.916 0.965 0.3306 0.732 0.511
#> ATC:skmeans 3 0.879 0.921 0.964 0.5565 0.719 0.545
#> SD:mclust 3 0.210 0.608 0.760 0.7007 0.587 0.379
#> CV:mclust 3 0.372 0.715 0.789 0.5513 0.666 0.493
#> MAD:mclust 3 0.181 0.380 0.660 0.4700 0.664 0.616
#> ATC:mclust 3 0.551 0.705 0.855 0.7394 0.689 0.530
#> SD:kmeans 3 0.380 0.690 0.789 0.3576 0.748 0.546
#> CV:kmeans 3 0.490 0.653 0.828 0.7376 0.732 0.609
#> MAD:kmeans 3 0.420 0.793 0.836 0.3022 0.665 0.423
#> ATC:kmeans 3 0.647 0.907 0.925 0.6668 0.746 0.623
#> SD:pam 3 0.504 0.771 0.890 0.1088 0.973 0.951
#> CV:pam 3 0.752 0.925 0.958 0.0666 0.992 0.989
#> MAD:pam 3 0.515 0.790 0.878 0.1185 0.977 0.958
#> ATC:pam 3 0.649 0.811 0.915 0.7891 0.669 0.510
#> SD:hclust 3 0.325 0.704 0.833 1.9882 0.565 0.532
#> CV:hclust 3 1.000 0.969 0.991 3.2674 0.744 0.725
#> MAD:hclust 3 0.314 0.622 0.809 1.8238 0.565 0.532
#> ATC:hclust 3 0.855 0.901 0.874 0.0868 0.982 0.974
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.545 0.523 0.726 0.1372 0.826 0.551
#> CV:NMF 4 0.663 0.739 0.826 0.1392 0.873 0.653
#> MAD:NMF 4 0.614 0.592 0.770 0.1170 0.911 0.745
#> ATC:NMF 4 0.577 0.676 0.852 0.0917 0.917 0.799
#> SD:skmeans 4 0.663 0.626 0.743 0.1090 0.907 0.730
#> CV:skmeans 4 0.747 0.789 0.888 0.1243 0.901 0.725
#> MAD:skmeans 4 0.676 0.565 0.765 0.1120 0.882 0.664
#> ATC:skmeans 4 0.735 0.716 0.860 0.1436 0.919 0.783
#> SD:mclust 4 0.324 0.300 0.644 0.2582 0.837 0.606
#> CV:mclust 4 0.475 0.464 0.725 0.1244 0.926 0.801
#> MAD:mclust 4 0.305 0.483 0.675 0.2495 0.503 0.285
#> ATC:mclust 4 0.795 0.781 0.895 0.1942 0.776 0.465
#> SD:kmeans 4 0.454 0.601 0.740 0.1261 0.865 0.647
#> CV:kmeans 4 0.510 0.696 0.756 0.1949 0.833 0.646
#> MAD:kmeans 4 0.522 0.627 0.754 0.1089 0.942 0.833
#> ATC:kmeans 4 0.579 0.633 0.773 0.2114 0.817 0.620
#> SD:pam 4 0.585 0.733 0.887 0.2151 0.857 0.734
#> CV:pam 4 0.748 0.909 0.948 0.0827 0.967 0.953
#> MAD:pam 4 0.636 0.772 0.897 0.2060 0.818 0.665
#> ATC:pam 4 0.666 0.716 0.881 0.0480 0.929 0.827
#> SD:hclust 4 0.299 0.561 0.734 0.2247 0.890 0.782
#> CV:hclust 4 1.000 0.968 0.992 0.0200 0.994 0.990
#> MAD:hclust 4 0.367 0.565 0.767 0.1674 0.886 0.774
#> ATC:hclust 4 0.746 0.802 0.906 0.1615 0.948 0.920
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.692 0.625 0.806 0.0811 0.819 0.427
#> CV:NMF 5 0.762 0.728 0.797 0.0753 0.921 0.699
#> MAD:NMF 5 0.678 0.664 0.808 0.0754 0.813 0.430
#> ATC:NMF 5 0.576 0.705 0.834 0.1018 0.879 0.666
#> SD:skmeans 5 0.659 0.650 0.778 0.0741 0.914 0.688
#> CV:skmeans 5 0.832 0.841 0.915 0.0717 0.922 0.724
#> MAD:skmeans 5 0.677 0.515 0.720 0.0723 0.901 0.646
#> ATC:skmeans 5 0.823 0.830 0.898 0.0846 0.880 0.630
#> SD:mclust 5 0.546 0.589 0.741 0.0635 0.768 0.415
#> CV:mclust 5 0.472 0.431 0.669 0.0754 0.800 0.495
#> MAD:mclust 5 0.459 0.555 0.728 0.0996 0.850 0.604
#> ATC:mclust 5 0.663 0.685 0.827 0.0305 0.971 0.890
#> SD:kmeans 5 0.530 0.549 0.689 0.0913 0.919 0.729
#> CV:kmeans 5 0.559 0.616 0.759 0.1079 0.913 0.762
#> MAD:kmeans 5 0.563 0.550 0.709 0.0750 0.935 0.793
#> ATC:kmeans 5 0.548 0.452 0.711 0.1220 0.791 0.507
#> SD:pam 5 0.584 0.596 0.823 0.1003 0.959 0.899
#> CV:pam 5 0.528 0.608 0.870 0.3231 0.926 0.889
#> MAD:pam 5 0.586 0.502 0.809 0.1301 0.934 0.835
#> ATC:pam 5 0.756 0.812 0.922 0.0362 0.971 0.922
#> SD:hclust 5 0.447 0.559 0.720 0.1988 0.821 0.583
#> CV:hclust 5 0.807 0.875 0.930 0.2343 0.995 0.992
#> MAD:hclust 5 0.526 0.537 0.737 0.2105 0.812 0.549
#> ATC:hclust 5 0.698 0.842 0.915 0.1150 0.955 0.926
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.702 0.606 0.788 0.03701 0.898 0.557
#> CV:NMF 6 0.809 0.845 0.866 0.04382 0.927 0.662
#> MAD:NMF 6 0.662 0.534 0.719 0.03657 0.929 0.675
#> ATC:NMF 6 0.608 0.621 0.800 0.05925 0.980 0.922
#> SD:skmeans 6 0.732 0.551 0.719 0.04255 0.909 0.610
#> CV:skmeans 6 0.878 0.858 0.925 0.04827 0.929 0.691
#> MAD:skmeans 6 0.687 0.556 0.743 0.04171 0.880 0.511
#> ATC:skmeans 6 0.762 0.719 0.819 0.03972 0.984 0.932
#> SD:mclust 6 0.582 0.345 0.646 0.05795 0.861 0.555
#> CV:mclust 6 0.521 0.610 0.679 0.05492 0.867 0.582
#> MAD:mclust 6 0.425 0.398 0.603 0.06913 0.839 0.493
#> ATC:mclust 6 0.683 0.640 0.794 0.03381 0.952 0.817
#> SD:kmeans 6 0.620 0.544 0.706 0.04802 0.946 0.769
#> CV:kmeans 6 0.650 0.668 0.763 0.06774 0.877 0.600
#> MAD:kmeans 6 0.639 0.599 0.718 0.05127 0.905 0.653
#> ATC:kmeans 6 0.643 0.594 0.699 0.06020 0.858 0.542
#> SD:pam 6 0.649 0.647 0.818 0.09761 0.935 0.827
#> CV:pam 6 0.655 0.792 0.889 0.20383 0.888 0.812
#> MAD:pam 6 0.685 0.689 0.827 0.06426 0.896 0.712
#> ATC:pam 6 0.761 0.817 0.927 0.00365 0.998 0.995
#> SD:hclust 6 0.542 0.585 0.742 0.07139 0.897 0.640
#> CV:hclust 6 0.614 0.773 0.895 0.26055 0.892 0.837
#> MAD:hclust 6 0.561 0.479 0.702 0.07452 0.885 0.589
#> ATC:hclust 6 0.834 0.780 0.901 0.11095 0.978 0.961
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 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.486 0.891 0.898 0.1669 0.929 0.929
#> 3 3 0.325 0.704 0.833 1.9882 0.565 0.532
#> 4 4 0.299 0.561 0.734 0.2247 0.890 0.782
#> 5 5 0.447 0.559 0.720 0.1988 0.821 0.583
#> 6 6 0.542 0.585 0.742 0.0714 0.897 0.640
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
#> SRR1663209 2 0.204 0.898 0.032 0.968
#> SRR1663210 2 0.204 0.898 0.032 0.968
#> SRR1663213 2 0.204 0.887 0.032 0.968
#> SRR1663211 2 0.184 0.889 0.028 0.972
#> SRR1663212 2 0.184 0.889 0.028 0.972
#> SRR1663214 2 0.204 0.887 0.032 0.968
#> SRR1663215 2 0.204 0.887 0.032 0.968
#> SRR1663216 2 0.204 0.898 0.032 0.968
#> SRR1663217 2 0.204 0.887 0.032 0.968
#> SRR1663218 2 0.204 0.887 0.032 0.968
#> SRR1663219 1 0.204 1.000 0.968 0.032
#> SRR1663220 1 0.204 1.000 0.968 0.032
#> SRR1663221 2 0.653 0.885 0.168 0.832
#> SRR1663222 2 0.295 0.904 0.052 0.948
#> SRR1663224 2 0.184 0.895 0.028 0.972
#> SRR1663225 2 0.653 0.885 0.168 0.832
#> SRR1663226 2 0.653 0.885 0.168 0.832
#> SRR1663223 2 0.697 0.873 0.188 0.812
#> SRR1663229 2 0.706 0.870 0.192 0.808
#> SRR1663231 2 0.402 0.903 0.080 0.920
#> SRR1663232 2 0.402 0.903 0.080 0.920
#> SRR1663227 2 0.653 0.885 0.168 0.832
#> SRR1663228 2 0.653 0.885 0.168 0.832
#> SRR1663230 2 0.706 0.870 0.192 0.808
#> SRR1663235 2 0.204 0.898 0.032 0.968
#> SRR1663233 2 0.697 0.873 0.188 0.812
#> SRR1663236 2 0.278 0.905 0.048 0.952
#> SRR1663237 2 0.697 0.873 0.188 0.812
#> SRR1663238 2 0.204 0.887 0.032 0.968
#> SRR1663234 2 0.760 0.848 0.220 0.780
#> SRR1663240 2 0.163 0.891 0.024 0.976
#> SRR1663239 2 0.163 0.891 0.024 0.976
#> SRR1663241 2 0.327 0.904 0.060 0.940
#> SRR1663242 2 0.443 0.902 0.092 0.908
#> SRR1663243 2 0.697 0.873 0.188 0.812
#> SRR1663244 2 0.821 0.811 0.256 0.744
#> SRR1663246 2 0.204 0.887 0.032 0.968
#> SRR1663245 2 0.697 0.873 0.188 0.812
#> SRR1663247 2 0.697 0.873 0.188 0.812
#> SRR1663248 2 0.204 0.898 0.032 0.968
#> SRR1663250 2 0.118 0.899 0.016 0.984
#> SRR1663249 2 0.697 0.873 0.188 0.812
#> SRR1663251 2 0.697 0.873 0.188 0.812
#> SRR1663252 2 0.653 0.885 0.168 0.832
#> SRR1663253 2 0.163 0.891 0.024 0.976
#> SRR1663254 2 0.644 0.884 0.164 0.836
#> SRR1663255 2 0.118 0.897 0.016 0.984
#> SRR1663256 2 0.295 0.904 0.052 0.948
#> SRR1663259 2 0.443 0.903 0.092 0.908
#> SRR1663258 2 0.653 0.885 0.168 0.832
#> SRR1663257 2 0.416 0.902 0.084 0.916
#> SRR1663263 2 0.204 0.887 0.032 0.968
#> SRR1663260 2 0.141 0.892 0.020 0.980
#> SRR1663262 2 0.714 0.868 0.196 0.804
#> SRR1663261 2 0.689 0.875 0.184 0.816
#> SRR1663265 2 0.697 0.873 0.188 0.812
#> SRR1663266 2 0.430 0.902 0.088 0.912
#> SRR1663267 1 0.204 1.000 0.968 0.032
#> SRR1663264 2 0.295 0.904 0.052 0.948
#> SRR1663268 2 0.141 0.892 0.020 0.980
#> SRR1663269 2 0.163 0.891 0.024 0.976
#> SRR1663271 2 0.697 0.873 0.188 0.812
#> SRR1663270 2 0.141 0.892 0.020 0.980
#> SRR1663273 2 0.204 0.887 0.032 0.968
#> SRR1663272 2 0.204 0.887 0.032 0.968
#> SRR1663275 2 0.697 0.873 0.188 0.812
#> SRR1663274 2 0.706 0.872 0.192 0.808
#> SRR1663276 2 0.644 0.884 0.164 0.836
#> SRR1663277 2 0.644 0.884 0.164 0.836
#> SRR1663279 2 0.242 0.900 0.040 0.960
#> SRR1663278 2 0.416 0.902 0.084 0.916
#> SRR1663280 2 0.430 0.902 0.088 0.912
#> SRR1663281 2 0.184 0.895 0.028 0.972
#> SRR1663282 2 0.184 0.895 0.028 0.972
#> SRR1663283 2 0.163 0.901 0.024 0.976
#> SRR1663284 2 0.163 0.901 0.024 0.976
#> SRR1663286 2 0.697 0.873 0.188 0.812
#> SRR1663287 2 0.714 0.868 0.196 0.804
#> SRR1663288 2 0.653 0.885 0.168 0.832
#> SRR1663291 2 0.163 0.901 0.024 0.976
#> SRR1663289 2 0.697 0.873 0.188 0.812
#> SRR1663290 2 0.697 0.873 0.188 0.812
#> SRR1663285 2 0.204 0.887 0.032 0.968
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 3 0.5517 0.6678 0.004 0.268 0.728
#> SRR1663210 3 0.5517 0.6678 0.004 0.268 0.728
#> SRR1663213 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663211 3 0.5067 0.6762 0.052 0.116 0.832
#> SRR1663212 3 0.5067 0.6762 0.052 0.116 0.832
#> SRR1663214 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663215 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663216 3 0.5517 0.6678 0.004 0.268 0.728
#> SRR1663217 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663218 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663219 1 0.3752 1.0000 0.856 0.144 0.000
#> SRR1663220 1 0.3752 1.0000 0.856 0.144 0.000
#> SRR1663221 2 0.3253 0.8351 0.052 0.912 0.036
#> SRR1663222 2 0.5012 0.7369 0.008 0.788 0.204
#> SRR1663224 2 0.7442 0.4878 0.056 0.628 0.316
#> SRR1663225 2 0.3253 0.8351 0.052 0.912 0.036
#> SRR1663226 2 0.3253 0.8351 0.052 0.912 0.036
#> SRR1663223 2 0.0747 0.8372 0.016 0.984 0.000
#> SRR1663229 2 0.2400 0.8356 0.064 0.932 0.004
#> SRR1663231 2 0.4782 0.7710 0.016 0.820 0.164
#> SRR1663232 2 0.4782 0.7710 0.016 0.820 0.164
#> SRR1663227 2 0.4357 0.8259 0.052 0.868 0.080
#> SRR1663228 2 0.4357 0.8259 0.052 0.868 0.080
#> SRR1663230 2 0.1989 0.8369 0.048 0.948 0.004
#> SRR1663235 3 0.5517 0.6678 0.004 0.268 0.728
#> SRR1663233 2 0.1399 0.8364 0.028 0.968 0.004
#> SRR1663236 2 0.6096 0.7084 0.040 0.752 0.208
#> SRR1663237 2 0.1399 0.8364 0.028 0.968 0.004
#> SRR1663238 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663234 2 0.2772 0.8134 0.080 0.916 0.004
#> SRR1663240 3 0.6008 0.5623 0.004 0.332 0.664
#> SRR1663239 3 0.6333 0.5607 0.012 0.332 0.656
#> SRR1663241 2 0.5269 0.7393 0.016 0.784 0.200
#> SRR1663242 2 0.4615 0.7899 0.144 0.836 0.020
#> SRR1663243 2 0.0747 0.8372 0.016 0.984 0.000
#> SRR1663244 2 0.3340 0.7744 0.120 0.880 0.000
#> SRR1663246 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663245 2 0.0747 0.8372 0.016 0.984 0.000
#> SRR1663247 2 0.0892 0.8366 0.020 0.980 0.000
#> SRR1663248 3 0.3851 0.6935 0.004 0.136 0.860
#> SRR1663250 2 0.6927 0.6319 0.060 0.700 0.240
#> SRR1663249 2 0.0892 0.8366 0.020 0.980 0.000
#> SRR1663251 2 0.0892 0.8366 0.020 0.980 0.000
#> SRR1663252 2 0.4269 0.8272 0.052 0.872 0.076
#> SRR1663253 3 0.6333 0.5607 0.012 0.332 0.656
#> SRR1663254 2 0.6648 0.3180 0.016 0.620 0.364
#> SRR1663255 2 0.7199 0.5945 0.064 0.676 0.260
#> SRR1663256 2 0.5109 0.7287 0.008 0.780 0.212
#> SRR1663259 2 0.6144 0.7674 0.132 0.780 0.088
#> SRR1663258 2 0.4269 0.8272 0.052 0.872 0.076
#> SRR1663257 2 0.6087 0.7674 0.144 0.780 0.076
#> SRR1663263 3 0.0592 0.6882 0.012 0.000 0.988
#> SRR1663260 3 0.7787 0.5019 0.064 0.348 0.588
#> SRR1663262 2 0.2165 0.8347 0.064 0.936 0.000
#> SRR1663261 2 0.3045 0.8234 0.020 0.916 0.064
#> SRR1663265 2 0.0747 0.8372 0.016 0.984 0.000
#> SRR1663266 2 0.4874 0.7875 0.144 0.828 0.028
#> SRR1663267 1 0.3752 1.0000 0.856 0.144 0.000
#> SRR1663264 2 0.5012 0.7369 0.008 0.788 0.204
#> SRR1663268 3 0.7787 0.5019 0.064 0.348 0.588
#> SRR1663269 3 0.6008 0.5623 0.004 0.332 0.664
#> SRR1663271 2 0.1399 0.8364 0.028 0.968 0.004
#> SRR1663270 3 0.4565 0.6786 0.064 0.076 0.860
#> SRR1663273 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663272 3 0.0000 0.6904 0.000 0.000 1.000
#> SRR1663275 2 0.1399 0.8364 0.028 0.968 0.004
#> SRR1663274 2 0.1525 0.8361 0.032 0.964 0.004
#> SRR1663276 2 0.6896 0.2328 0.020 0.588 0.392
#> SRR1663277 2 0.6896 0.2328 0.020 0.588 0.392
#> SRR1663279 3 0.6769 0.5931 0.028 0.320 0.652
#> SRR1663278 2 0.6087 0.7674 0.144 0.780 0.076
#> SRR1663280 2 0.4874 0.7875 0.144 0.828 0.028
#> SRR1663281 2 0.7417 0.4919 0.056 0.632 0.312
#> SRR1663282 2 0.7417 0.4919 0.056 0.632 0.312
#> SRR1663283 3 0.7835 0.0995 0.052 0.456 0.492
#> SRR1663284 3 0.7835 0.0995 0.052 0.456 0.492
#> SRR1663286 2 0.1399 0.8364 0.028 0.968 0.004
#> SRR1663287 2 0.2165 0.8347 0.064 0.936 0.000
#> SRR1663288 2 0.3253 0.8351 0.052 0.912 0.036
#> SRR1663291 3 0.7835 0.0995 0.052 0.456 0.492
#> SRR1663289 2 0.1399 0.8364 0.028 0.968 0.004
#> SRR1663290 2 0.1399 0.8364 0.028 0.968 0.004
#> SRR1663285 3 0.0592 0.6882 0.012 0.000 0.988
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 1 0.7943 0.522 0.480 0.264 0.244 0.012
#> SRR1663210 1 0.7943 0.522 0.480 0.264 0.244 0.012
#> SRR1663213 3 0.0000 0.716 0.000 0.000 1.000 0.000
#> SRR1663211 3 0.4416 0.603 0.132 0.004 0.812 0.052
#> SRR1663212 3 0.4416 0.603 0.132 0.004 0.812 0.052
#> SRR1663214 3 0.0000 0.716 0.000 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.716 0.000 0.000 1.000 0.000
#> SRR1663216 1 0.7943 0.522 0.480 0.264 0.244 0.012
#> SRR1663217 1 0.5404 0.219 0.600 0.004 0.384 0.012
#> SRR1663218 1 0.5404 0.219 0.600 0.004 0.384 0.012
#> SRR1663219 4 0.3142 1.000 0.008 0.132 0.000 0.860
#> SRR1663220 4 0.3142 1.000 0.008 0.132 0.000 0.860
#> SRR1663221 2 0.2409 0.689 0.032 0.924 0.004 0.040
#> SRR1663222 2 0.5773 0.452 0.408 0.564 0.024 0.004
#> SRR1663224 2 0.7985 0.319 0.172 0.544 0.244 0.040
#> SRR1663225 2 0.2409 0.689 0.032 0.924 0.004 0.040
#> SRR1663226 2 0.2409 0.689 0.032 0.924 0.004 0.040
#> SRR1663223 2 0.2867 0.691 0.104 0.884 0.000 0.012
#> SRR1663229 2 0.1661 0.693 0.004 0.944 0.000 0.052
#> SRR1663231 2 0.5907 0.487 0.368 0.596 0.024 0.012
#> SRR1663232 2 0.5907 0.487 0.368 0.596 0.024 0.012
#> SRR1663227 2 0.5118 0.623 0.220 0.736 0.004 0.040
#> SRR1663228 2 0.5118 0.623 0.220 0.736 0.004 0.040
#> SRR1663230 2 0.1022 0.696 0.000 0.968 0.000 0.032
#> SRR1663235 1 0.7943 0.522 0.480 0.264 0.244 0.012
#> SRR1663233 2 0.0469 0.698 0.000 0.988 0.000 0.012
#> SRR1663236 2 0.7480 0.381 0.368 0.508 0.096 0.028
#> SRR1663237 2 0.0469 0.698 0.000 0.988 0.000 0.012
#> SRR1663238 3 0.0000 0.716 0.000 0.000 1.000 0.000
#> SRR1663234 2 0.3082 0.673 0.032 0.884 0.000 0.084
#> SRR1663240 3 0.7035 0.324 0.176 0.228 0.592 0.004
#> SRR1663239 3 0.7286 0.324 0.176 0.228 0.584 0.012
#> SRR1663241 2 0.6185 0.439 0.404 0.552 0.032 0.012
#> SRR1663242 2 0.5962 0.539 0.180 0.692 0.000 0.128
#> SRR1663243 2 0.2867 0.691 0.104 0.884 0.000 0.012
#> SRR1663244 2 0.5823 0.592 0.176 0.704 0.000 0.120
#> SRR1663246 3 0.0000 0.716 0.000 0.000 1.000 0.000
#> SRR1663245 2 0.2867 0.691 0.104 0.884 0.000 0.012
#> SRR1663247 2 0.4630 0.613 0.252 0.732 0.000 0.016
#> SRR1663248 1 0.6961 0.434 0.612 0.132 0.244 0.012
#> SRR1663250 2 0.8317 0.282 0.336 0.456 0.168 0.040
#> SRR1663249 2 0.4661 0.609 0.256 0.728 0.000 0.016
#> SRR1663251 2 0.4661 0.609 0.256 0.728 0.000 0.016
#> SRR1663252 2 0.4973 0.633 0.204 0.752 0.004 0.040
#> SRR1663253 3 0.7286 0.324 0.176 0.228 0.584 0.012
#> SRR1663254 1 0.6109 0.239 0.560 0.400 0.024 0.016
#> SRR1663255 2 0.8483 0.254 0.320 0.448 0.188 0.044
#> SRR1663256 2 0.5947 0.442 0.408 0.556 0.032 0.004
#> SRR1663259 2 0.6647 0.511 0.212 0.656 0.016 0.116
#> SRR1663258 2 0.4973 0.633 0.204 0.752 0.004 0.040
#> SRR1663257 2 0.6624 0.497 0.220 0.644 0.008 0.128
#> SRR1663263 3 0.0524 0.713 0.004 0.000 0.988 0.008
#> SRR1663260 3 0.8226 0.273 0.204 0.220 0.528 0.048
#> SRR1663262 2 0.1807 0.693 0.008 0.940 0.000 0.052
#> SRR1663261 2 0.5146 0.562 0.280 0.696 0.008 0.016
#> SRR1663265 2 0.2867 0.691 0.104 0.884 0.000 0.012
#> SRR1663266 2 0.6277 0.532 0.180 0.684 0.008 0.128
#> SRR1663267 4 0.3142 1.000 0.008 0.132 0.000 0.860
#> SRR1663264 2 0.5773 0.452 0.408 0.564 0.024 0.004
#> SRR1663268 3 0.8226 0.273 0.204 0.220 0.528 0.048
#> SRR1663269 3 0.7035 0.324 0.176 0.228 0.592 0.004
#> SRR1663271 2 0.0469 0.698 0.000 0.988 0.000 0.012
#> SRR1663270 3 0.4114 0.644 0.048 0.048 0.856 0.048
#> SRR1663273 3 0.0000 0.716 0.000 0.000 1.000 0.000
#> SRR1663272 3 0.0000 0.716 0.000 0.000 1.000 0.000
#> SRR1663275 2 0.0469 0.698 0.000 0.988 0.000 0.012
#> SRR1663274 2 0.1624 0.699 0.028 0.952 0.000 0.020
#> SRR1663276 1 0.6333 0.299 0.560 0.388 0.036 0.016
#> SRR1663277 1 0.6333 0.299 0.560 0.388 0.036 0.016
#> SRR1663279 1 0.8331 0.493 0.452 0.316 0.200 0.032
#> SRR1663278 2 0.6624 0.497 0.220 0.644 0.008 0.128
#> SRR1663280 2 0.6277 0.532 0.180 0.684 0.008 0.128
#> SRR1663281 2 0.7951 0.320 0.168 0.548 0.244 0.040
#> SRR1663282 2 0.7951 0.320 0.168 0.548 0.244 0.040
#> SRR1663283 1 0.7536 0.441 0.580 0.252 0.136 0.032
#> SRR1663284 1 0.7536 0.441 0.580 0.252 0.136 0.032
#> SRR1663286 2 0.0469 0.698 0.000 0.988 0.000 0.012
#> SRR1663287 2 0.1807 0.693 0.008 0.940 0.000 0.052
#> SRR1663288 2 0.2409 0.689 0.032 0.924 0.004 0.040
#> SRR1663291 1 0.7536 0.441 0.580 0.252 0.136 0.032
#> SRR1663289 2 0.0469 0.698 0.000 0.988 0.000 0.012
#> SRR1663290 2 0.0469 0.698 0.000 0.988 0.000 0.012
#> SRR1663285 3 0.0524 0.713 0.004 0.000 0.988 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 5 0.4969 0.8148 0.000 0.264 0.032 0.020 0.684
#> SRR1663210 5 0.4969 0.8148 0.000 0.264 0.032 0.020 0.684
#> SRR1663213 3 0.0000 0.7534 0.000 0.000 1.000 0.000 0.000
#> SRR1663211 3 0.4028 0.6306 0.032 0.000 0.812 0.032 0.124
#> SRR1663212 3 0.4028 0.6306 0.032 0.000 0.812 0.032 0.124
#> SRR1663214 3 0.0000 0.7534 0.000 0.000 1.000 0.000 0.000
#> SRR1663215 3 0.0000 0.7534 0.000 0.000 1.000 0.000 0.000
#> SRR1663216 5 0.4969 0.8148 0.000 0.264 0.032 0.020 0.684
#> SRR1663217 5 0.3214 0.5990 0.000 0.000 0.120 0.036 0.844
#> SRR1663218 5 0.3214 0.5990 0.000 0.000 0.120 0.036 0.844
#> SRR1663219 1 0.2344 1.0000 0.904 0.032 0.000 0.064 0.000
#> SRR1663220 1 0.2344 1.0000 0.904 0.032 0.000 0.064 0.000
#> SRR1663221 2 0.1285 0.5968 0.004 0.956 0.000 0.004 0.036
#> SRR1663222 4 0.4238 0.6934 0.000 0.088 0.000 0.776 0.136
#> SRR1663224 2 0.7404 0.1002 0.008 0.372 0.232 0.368 0.020
#> SRR1663225 2 0.1285 0.5968 0.004 0.956 0.000 0.004 0.036
#> SRR1663226 2 0.1285 0.5968 0.004 0.956 0.000 0.004 0.036
#> SRR1663223 2 0.5045 0.4833 0.032 0.620 0.000 0.340 0.008
#> SRR1663229 2 0.0566 0.6080 0.012 0.984 0.000 0.000 0.004
#> SRR1663231 4 0.4575 0.7055 0.012 0.108 0.012 0.788 0.080
#> SRR1663232 4 0.4575 0.7055 0.012 0.108 0.012 0.788 0.080
#> SRR1663227 2 0.5258 -0.2001 0.004 0.488 0.000 0.472 0.036
#> SRR1663228 2 0.5258 -0.2001 0.004 0.488 0.000 0.472 0.036
#> SRR1663230 2 0.1485 0.6195 0.020 0.948 0.000 0.032 0.000
#> SRR1663235 5 0.4969 0.8148 0.000 0.264 0.032 0.020 0.684
#> SRR1663233 2 0.2595 0.6300 0.032 0.888 0.000 0.080 0.000
#> SRR1663236 4 0.3383 0.6741 0.000 0.012 0.072 0.856 0.060
#> SRR1663237 2 0.2595 0.6300 0.032 0.888 0.000 0.080 0.000
#> SRR1663238 3 0.0162 0.7540 0.000 0.000 0.996 0.004 0.000
#> SRR1663234 2 0.5182 0.5501 0.112 0.680 0.000 0.208 0.000
#> SRR1663240 3 0.5292 0.4489 0.000 0.028 0.576 0.380 0.016
#> SRR1663239 3 0.5554 0.4485 0.008 0.028 0.568 0.380 0.016
#> SRR1663241 4 0.4046 0.6994 0.000 0.068 0.008 0.804 0.120
#> SRR1663242 2 0.7200 0.4600 0.084 0.540 0.000 0.232 0.144
#> SRR1663243 2 0.5045 0.4833 0.032 0.620 0.000 0.340 0.008
#> SRR1663244 4 0.6105 0.3944 0.148 0.280 0.000 0.568 0.004
#> SRR1663246 3 0.0162 0.7540 0.000 0.000 0.996 0.004 0.000
#> SRR1663245 2 0.5045 0.4833 0.032 0.620 0.000 0.340 0.008
#> SRR1663247 4 0.3985 0.5871 0.028 0.196 0.000 0.772 0.004
#> SRR1663248 5 0.3862 0.7224 0.000 0.132 0.032 0.020 0.816
#> SRR1663250 4 0.3456 0.5738 0.004 0.004 0.152 0.824 0.016
#> SRR1663249 4 0.3844 0.6052 0.028 0.180 0.000 0.788 0.004
#> SRR1663251 4 0.3844 0.6052 0.028 0.180 0.000 0.788 0.004
#> SRR1663252 2 0.5246 -0.1434 0.004 0.512 0.000 0.448 0.036
#> SRR1663253 3 0.5554 0.4485 0.008 0.028 0.568 0.380 0.016
#> SRR1663254 4 0.6088 0.5265 0.024 0.076 0.004 0.592 0.304
#> SRR1663255 4 0.4110 0.5491 0.008 0.016 0.172 0.788 0.016
#> SRR1663256 4 0.4404 0.6912 0.000 0.080 0.008 0.776 0.136
#> SRR1663259 2 0.7685 0.4001 0.076 0.508 0.012 0.224 0.180
#> SRR1663258 2 0.5246 -0.1434 0.004 0.512 0.000 0.448 0.036
#> SRR1663257 2 0.7723 0.3968 0.084 0.496 0.008 0.228 0.184
#> SRR1663263 3 0.0451 0.7522 0.008 0.000 0.988 0.000 0.004
#> SRR1663260 3 0.5518 0.3934 0.012 0.016 0.516 0.440 0.016
#> SRR1663262 2 0.0854 0.6098 0.012 0.976 0.000 0.004 0.008
#> SRR1663261 4 0.3897 0.6027 0.028 0.204 0.000 0.768 0.000
#> SRR1663265 2 0.5045 0.4833 0.032 0.620 0.000 0.340 0.008
#> SRR1663266 2 0.7459 0.4526 0.084 0.532 0.008 0.232 0.144
#> SRR1663267 1 0.2344 1.0000 0.904 0.032 0.000 0.064 0.000
#> SRR1663264 4 0.4238 0.6934 0.000 0.088 0.000 0.776 0.136
#> SRR1663268 3 0.5518 0.3934 0.012 0.016 0.516 0.440 0.016
#> SRR1663269 3 0.5292 0.4489 0.000 0.028 0.576 0.380 0.016
#> SRR1663271 2 0.2595 0.6300 0.032 0.888 0.000 0.080 0.000
#> SRR1663270 3 0.3218 0.7005 0.012 0.000 0.848 0.124 0.016
#> SRR1663273 3 0.0162 0.7540 0.000 0.000 0.996 0.004 0.000
#> SRR1663272 3 0.0162 0.7540 0.000 0.000 0.996 0.004 0.000
#> SRR1663275 2 0.2595 0.6300 0.032 0.888 0.000 0.080 0.000
#> SRR1663274 2 0.4066 0.5959 0.044 0.768 0.000 0.188 0.000
#> SRR1663276 4 0.6511 0.4854 0.028 0.088 0.008 0.548 0.328
#> SRR1663277 4 0.6511 0.4854 0.028 0.088 0.008 0.548 0.328
#> SRR1663279 5 0.5725 0.7120 0.012 0.308 0.036 0.024 0.620
#> SRR1663278 2 0.7723 0.3968 0.084 0.496 0.008 0.228 0.184
#> SRR1663280 2 0.7459 0.4526 0.084 0.532 0.008 0.232 0.144
#> SRR1663281 2 0.7418 0.0996 0.012 0.372 0.232 0.368 0.016
#> SRR1663282 2 0.7418 0.0996 0.012 0.372 0.232 0.368 0.016
#> SRR1663283 4 0.6873 0.4569 0.008 0.036 0.108 0.516 0.332
#> SRR1663284 4 0.6873 0.4569 0.008 0.036 0.108 0.516 0.332
#> SRR1663286 2 0.2595 0.6300 0.032 0.888 0.000 0.080 0.000
#> SRR1663287 2 0.0854 0.6098 0.012 0.976 0.000 0.004 0.008
#> SRR1663288 2 0.1285 0.5968 0.004 0.956 0.000 0.004 0.036
#> SRR1663291 4 0.6873 0.4569 0.008 0.036 0.108 0.516 0.332
#> SRR1663289 2 0.2595 0.6300 0.032 0.888 0.000 0.080 0.000
#> SRR1663290 2 0.2595 0.6300 0.032 0.888 0.000 0.080 0.000
#> SRR1663285 3 0.0451 0.7522 0.008 0.000 0.988 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 6 0.4301 0.825 0.000 0.240 0.000 0.000 0.064 0.696
#> SRR1663210 6 0.4301 0.825 0.000 0.240 0.000 0.000 0.064 0.696
#> SRR1663213 3 0.0260 0.754 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1663211 3 0.2762 0.635 0.000 0.000 0.804 0.000 0.196 0.000
#> SRR1663212 3 0.2762 0.635 0.000 0.000 0.804 0.000 0.196 0.000
#> SRR1663214 3 0.0260 0.754 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1663215 3 0.0260 0.754 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1663216 6 0.4301 0.825 0.000 0.240 0.000 0.000 0.064 0.696
#> SRR1663217 6 0.1387 0.610 0.000 0.000 0.068 0.000 0.000 0.932
#> SRR1663218 6 0.1387 0.610 0.000 0.000 0.068 0.000 0.000 0.932
#> SRR1663219 1 0.0146 1.000 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1663220 1 0.0146 1.000 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1663221 2 0.1977 0.704 0.000 0.920 0.000 0.008 0.032 0.040
#> SRR1663222 4 0.3544 0.643 0.000 0.048 0.000 0.804 0.008 0.140
#> SRR1663224 5 0.8098 0.397 0.000 0.152 0.224 0.204 0.376 0.044
#> SRR1663225 2 0.1977 0.704 0.000 0.920 0.000 0.008 0.032 0.040
#> SRR1663226 2 0.1977 0.704 0.000 0.920 0.000 0.008 0.032 0.040
#> SRR1663223 5 0.6833 0.375 0.004 0.300 0.000 0.312 0.352 0.032
#> SRR1663229 2 0.1218 0.711 0.004 0.956 0.000 0.000 0.028 0.012
#> SRR1663231 4 0.3868 0.646 0.004 0.080 0.012 0.812 0.008 0.084
#> SRR1663232 4 0.3868 0.646 0.004 0.080 0.012 0.812 0.008 0.084
#> SRR1663227 4 0.4779 0.122 0.000 0.468 0.000 0.488 0.004 0.040
#> SRR1663228 4 0.4779 0.122 0.000 0.468 0.000 0.488 0.004 0.040
#> SRR1663230 2 0.1938 0.734 0.020 0.920 0.000 0.052 0.008 0.000
#> SRR1663235 6 0.4301 0.825 0.000 0.240 0.000 0.000 0.064 0.696
#> SRR1663233 2 0.3225 0.736 0.024 0.828 0.000 0.136 0.008 0.004
#> SRR1663236 4 0.3932 0.600 0.000 0.000 0.076 0.804 0.044 0.076
#> SRR1663237 2 0.3225 0.736 0.024 0.828 0.000 0.136 0.008 0.004
#> SRR1663238 3 0.0000 0.754 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663234 2 0.5468 0.516 0.108 0.628 0.000 0.240 0.008 0.016
#> SRR1663240 3 0.5115 0.461 0.000 0.020 0.572 0.364 0.004 0.040
#> SRR1663239 3 0.5307 0.460 0.000 0.020 0.564 0.364 0.012 0.040
#> SRR1663241 4 0.3476 0.644 0.000 0.036 0.008 0.820 0.008 0.128
#> SRR1663242 5 0.1765 0.510 0.000 0.096 0.000 0.000 0.904 0.000
#> SRR1663243 5 0.6833 0.375 0.004 0.300 0.000 0.312 0.352 0.032
#> SRR1663244 4 0.5783 0.396 0.140 0.228 0.000 0.604 0.012 0.016
#> SRR1663246 3 0.0000 0.754 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663245 5 0.6833 0.375 0.004 0.300 0.000 0.312 0.352 0.032
#> SRR1663247 4 0.3282 0.547 0.004 0.116 0.000 0.836 0.016 0.028
#> SRR1663248 6 0.3150 0.748 0.000 0.120 0.000 0.000 0.052 0.828
#> SRR1663250 4 0.4635 0.510 0.000 0.000 0.156 0.732 0.080 0.032
#> SRR1663249 4 0.2935 0.560 0.004 0.112 0.000 0.852 0.004 0.028
#> SRR1663251 4 0.2935 0.560 0.004 0.112 0.000 0.852 0.004 0.028
#> SRR1663252 2 0.4776 -0.130 0.000 0.496 0.000 0.460 0.004 0.040
#> SRR1663253 3 0.5307 0.460 0.000 0.020 0.564 0.364 0.012 0.040
#> SRR1663254 4 0.4830 0.445 0.004 0.016 0.000 0.612 0.032 0.336
#> SRR1663255 4 0.5021 0.481 0.000 0.008 0.176 0.704 0.084 0.028
#> SRR1663256 4 0.3731 0.641 0.000 0.044 0.008 0.800 0.008 0.140
#> SRR1663259 5 0.3210 0.515 0.000 0.168 0.000 0.000 0.804 0.028
#> SRR1663258 2 0.4776 -0.130 0.000 0.496 0.000 0.460 0.004 0.040
#> SRR1663257 5 0.2454 0.529 0.000 0.160 0.000 0.000 0.840 0.000
#> SRR1663263 3 0.0547 0.753 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR1663260 3 0.6053 0.414 0.000 0.012 0.508 0.360 0.092 0.028
#> SRR1663262 2 0.2723 0.644 0.004 0.852 0.000 0.000 0.128 0.016
#> SRR1663261 4 0.2809 0.586 0.004 0.128 0.000 0.848 0.000 0.020
#> SRR1663265 5 0.6833 0.375 0.004 0.300 0.000 0.312 0.352 0.032
#> SRR1663266 5 0.1663 0.509 0.000 0.088 0.000 0.000 0.912 0.000
#> SRR1663267 1 0.0146 1.000 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1663264 4 0.3544 0.643 0.000 0.048 0.000 0.804 0.008 0.140
#> SRR1663268 3 0.6053 0.414 0.000 0.012 0.508 0.360 0.092 0.028
#> SRR1663269 3 0.5115 0.461 0.000 0.020 0.572 0.364 0.004 0.040
#> SRR1663271 2 0.3225 0.736 0.024 0.828 0.000 0.136 0.008 0.004
#> SRR1663270 3 0.3483 0.692 0.000 0.000 0.828 0.044 0.100 0.028
#> SRR1663273 3 0.0000 0.754 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663272 3 0.0000 0.754 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663275 2 0.3225 0.736 0.024 0.828 0.000 0.136 0.008 0.004
#> SRR1663274 2 0.4490 0.610 0.032 0.704 0.000 0.240 0.008 0.016
#> SRR1663276 4 0.5354 0.410 0.008 0.036 0.000 0.564 0.032 0.360
#> SRR1663277 4 0.5354 0.410 0.008 0.036 0.000 0.564 0.032 0.360
#> SRR1663279 6 0.5187 0.728 0.000 0.244 0.000 0.000 0.148 0.608
#> SRR1663278 5 0.2454 0.529 0.000 0.160 0.000 0.000 0.840 0.000
#> SRR1663280 5 0.1663 0.509 0.000 0.088 0.000 0.000 0.912 0.000
#> SRR1663281 5 0.8049 0.397 0.000 0.152 0.224 0.204 0.380 0.040
#> SRR1663282 5 0.8049 0.397 0.000 0.152 0.224 0.204 0.380 0.040
#> SRR1663283 4 0.6800 0.384 0.000 0.008 0.096 0.436 0.096 0.364
#> SRR1663284 4 0.6800 0.384 0.000 0.008 0.096 0.436 0.096 0.364
#> SRR1663286 2 0.3225 0.736 0.024 0.828 0.000 0.136 0.008 0.004
#> SRR1663287 2 0.2723 0.644 0.004 0.852 0.000 0.000 0.128 0.016
#> SRR1663288 2 0.1977 0.704 0.000 0.920 0.000 0.008 0.032 0.040
#> SRR1663291 4 0.6800 0.384 0.000 0.008 0.096 0.436 0.096 0.364
#> SRR1663289 2 0.3225 0.736 0.024 0.828 0.000 0.136 0.008 0.004
#> SRR1663290 2 0.3225 0.736 0.024 0.828 0.000 0.136 0.008 0.004
#> SRR1663285 3 0.0547 0.753 0.000 0.000 0.980 0.000 0.020 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 17717 rows and 83 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 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.137 0.576 0.769 0.4634 0.520 0.520
#> 3 3 0.380 0.690 0.789 0.3576 0.748 0.546
#> 4 4 0.454 0.601 0.740 0.1261 0.865 0.647
#> 5 5 0.530 0.549 0.689 0.0913 0.919 0.729
#> 6 6 0.620 0.544 0.706 0.0480 0.946 0.769
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
#> SRR1663209 2 0.4690 0.63751 0.100 0.900
#> SRR1663210 2 0.4690 0.63751 0.100 0.900
#> SRR1663213 1 0.8207 0.77404 0.744 0.256
#> SRR1663211 1 0.8386 0.76598 0.732 0.268
#> SRR1663212 1 0.8386 0.76598 0.732 0.268
#> SRR1663214 1 0.8016 0.77771 0.756 0.244
#> SRR1663215 1 0.8016 0.77771 0.756 0.244
#> SRR1663216 2 0.9983 -0.34740 0.476 0.524
#> SRR1663217 1 0.8386 0.73461 0.732 0.268
#> SRR1663218 1 0.8386 0.73461 0.732 0.268
#> SRR1663219 2 0.9580 0.52832 0.380 0.620
#> SRR1663220 2 0.9580 0.52832 0.380 0.620
#> SRR1663221 2 0.1184 0.69393 0.016 0.984
#> SRR1663222 2 0.7299 0.64567 0.204 0.796
#> SRR1663224 1 0.9998 0.40948 0.508 0.492
#> SRR1663225 2 0.8016 0.42477 0.244 0.756
#> SRR1663226 2 0.8016 0.42477 0.244 0.756
#> SRR1663223 2 0.0672 0.69536 0.008 0.992
#> SRR1663229 2 0.0938 0.69486 0.012 0.988
#> SRR1663231 2 0.7376 0.64333 0.208 0.792
#> SRR1663232 2 0.7376 0.64333 0.208 0.792
#> SRR1663227 2 0.8327 0.61821 0.264 0.736
#> SRR1663228 2 0.8327 0.61821 0.264 0.736
#> SRR1663230 2 0.0376 0.69674 0.004 0.996
#> SRR1663235 2 0.9896 -0.21467 0.440 0.560
#> SRR1663233 2 0.0376 0.69674 0.004 0.996
#> SRR1663236 1 0.8909 0.36270 0.692 0.308
#> SRR1663237 2 0.1633 0.69188 0.024 0.976
#> SRR1663238 1 0.5059 0.73941 0.888 0.112
#> SRR1663234 2 0.7299 0.65136 0.204 0.796
#> SRR1663240 1 0.6343 0.76288 0.840 0.160
#> SRR1663239 1 0.9522 0.63843 0.628 0.372
#> SRR1663241 2 0.9998 0.20624 0.492 0.508
#> SRR1663242 2 0.4562 0.64245 0.096 0.904
#> SRR1663243 2 0.3733 0.65974 0.072 0.928
#> SRR1663244 2 0.7815 0.63743 0.232 0.768
#> SRR1663246 1 0.6623 0.77572 0.828 0.172
#> SRR1663245 2 0.7883 0.44528 0.236 0.764
#> SRR1663247 2 0.8267 0.62010 0.260 0.740
#> SRR1663248 2 0.8713 0.37956 0.292 0.708
#> SRR1663250 1 0.5737 0.72708 0.864 0.136
#> SRR1663249 2 0.8713 0.59360 0.292 0.708
#> SRR1663251 2 0.8763 0.59009 0.296 0.704
#> SRR1663252 2 0.4022 0.68692 0.080 0.920
#> SRR1663253 1 0.9933 0.33363 0.548 0.452
#> SRR1663254 2 0.9896 0.41865 0.440 0.560
#> SRR1663255 1 0.6973 0.76435 0.812 0.188
#> SRR1663256 1 0.9775 0.26244 0.588 0.412
#> SRR1663259 2 0.9129 0.19835 0.328 0.672
#> SRR1663258 2 0.5519 0.67462 0.128 0.872
#> SRR1663257 1 0.9552 0.63236 0.624 0.376
#> SRR1663263 1 0.8016 0.77771 0.756 0.244
#> SRR1663260 1 0.7528 0.77586 0.784 0.216
#> SRR1663262 2 0.1414 0.69462 0.020 0.980
#> SRR1663261 2 0.9129 0.57112 0.328 0.672
#> SRR1663265 2 0.1414 0.69503 0.020 0.980
#> SRR1663266 2 0.9944 -0.28161 0.456 0.544
#> SRR1663267 2 0.9580 0.52832 0.380 0.620
#> SRR1663264 1 0.9248 0.53122 0.660 0.340
#> SRR1663268 1 0.7674 0.77682 0.776 0.224
#> SRR1663269 1 0.6148 0.76560 0.848 0.152
#> SRR1663271 2 0.2043 0.68826 0.032 0.968
#> SRR1663270 1 0.8016 0.77771 0.756 0.244
#> SRR1663273 1 0.5629 0.75949 0.868 0.132
#> SRR1663272 1 0.5059 0.73941 0.888 0.112
#> SRR1663275 2 0.2043 0.68826 0.032 0.968
#> SRR1663274 2 0.7299 0.65436 0.204 0.796
#> SRR1663276 2 0.9286 0.57781 0.344 0.656
#> SRR1663277 2 0.9286 0.57781 0.344 0.656
#> SRR1663279 2 0.9608 -0.00508 0.384 0.616
#> SRR1663278 2 0.5294 0.61540 0.120 0.880
#> SRR1663280 2 0.9491 0.05870 0.368 0.632
#> SRR1663281 1 0.8608 0.75988 0.716 0.284
#> SRR1663282 1 0.8608 0.75988 0.716 0.284
#> SRR1663283 1 0.8661 0.27512 0.712 0.288
#> SRR1663284 1 0.8661 0.27512 0.712 0.288
#> SRR1663286 2 0.2043 0.68826 0.032 0.968
#> SRR1663287 2 0.0000 0.69658 0.000 1.000
#> SRR1663288 2 0.7745 0.45565 0.228 0.772
#> SRR1663291 1 0.3274 0.66677 0.940 0.060
#> SRR1663289 2 0.0376 0.69674 0.004 0.996
#> SRR1663290 2 0.0376 0.69674 0.004 0.996
#> SRR1663285 1 0.8016 0.77771 0.756 0.244
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0424 0.835 0.008 0.992 0.000
#> SRR1663210 2 0.0424 0.835 0.008 0.992 0.000
#> SRR1663213 3 0.2682 0.838 0.004 0.076 0.920
#> SRR1663211 3 0.4642 0.824 0.060 0.084 0.856
#> SRR1663212 3 0.4642 0.824 0.060 0.084 0.856
#> SRR1663214 3 0.2682 0.838 0.004 0.076 0.920
#> SRR1663215 3 0.2682 0.838 0.004 0.076 0.920
#> SRR1663216 2 0.3765 0.793 0.028 0.888 0.084
#> SRR1663217 3 0.5710 0.783 0.080 0.116 0.804
#> SRR1663218 3 0.5710 0.783 0.080 0.116 0.804
#> SRR1663219 1 0.4811 0.679 0.828 0.148 0.024
#> SRR1663220 1 0.4811 0.679 0.828 0.148 0.024
#> SRR1663221 2 0.2651 0.827 0.060 0.928 0.012
#> SRR1663222 2 0.9071 -0.480 0.432 0.432 0.136
#> SRR1663224 2 0.6634 0.674 0.104 0.752 0.144
#> SRR1663225 2 0.2926 0.825 0.040 0.924 0.036
#> SRR1663226 2 0.2926 0.825 0.040 0.924 0.036
#> SRR1663223 2 0.2866 0.818 0.076 0.916 0.008
#> SRR1663229 2 0.1950 0.831 0.040 0.952 0.008
#> SRR1663231 1 0.9299 0.479 0.432 0.408 0.160
#> SRR1663232 1 0.9299 0.479 0.432 0.408 0.160
#> SRR1663227 1 0.9102 0.503 0.452 0.408 0.140
#> SRR1663228 1 0.9102 0.503 0.452 0.408 0.140
#> SRR1663230 2 0.1289 0.830 0.032 0.968 0.000
#> SRR1663235 2 0.4479 0.770 0.044 0.860 0.096
#> SRR1663233 2 0.1411 0.830 0.036 0.964 0.000
#> SRR1663236 1 0.6648 0.472 0.620 0.016 0.364
#> SRR1663237 2 0.1163 0.832 0.028 0.972 0.000
#> SRR1663238 3 0.1129 0.819 0.020 0.004 0.976
#> SRR1663234 1 0.7773 0.634 0.612 0.316 0.072
#> SRR1663240 3 0.2651 0.806 0.060 0.012 0.928
#> SRR1663239 3 0.4139 0.819 0.016 0.124 0.860
#> SRR1663241 1 0.8094 0.610 0.612 0.100 0.288
#> SRR1663242 2 0.4731 0.779 0.128 0.840 0.032
#> SRR1663243 2 0.4602 0.772 0.152 0.832 0.016
#> SRR1663244 1 0.7889 0.665 0.624 0.288 0.088
#> SRR1663246 3 0.0829 0.821 0.012 0.004 0.984
#> SRR1663245 2 0.4865 0.777 0.136 0.832 0.032
#> SRR1663247 1 0.7388 0.702 0.692 0.208 0.100
#> SRR1663248 2 0.3780 0.788 0.064 0.892 0.044
#> SRR1663250 3 0.4575 0.742 0.160 0.012 0.828
#> SRR1663249 1 0.6920 0.718 0.736 0.132 0.132
#> SRR1663251 1 0.7327 0.722 0.708 0.160 0.132
#> SRR1663252 2 0.4836 0.721 0.080 0.848 0.072
#> SRR1663253 3 0.8511 0.274 0.152 0.244 0.604
#> SRR1663254 1 0.5393 0.672 0.808 0.044 0.148
#> SRR1663255 3 0.5355 0.730 0.160 0.036 0.804
#> SRR1663256 1 0.9514 0.517 0.468 0.204 0.328
#> SRR1663259 2 0.4399 0.788 0.092 0.864 0.044
#> SRR1663258 2 0.8173 -0.301 0.420 0.508 0.072
#> SRR1663257 3 0.8384 0.336 0.088 0.392 0.520
#> SRR1663263 3 0.2682 0.838 0.004 0.076 0.920
#> SRR1663260 3 0.2636 0.819 0.048 0.020 0.932
#> SRR1663262 2 0.2280 0.827 0.052 0.940 0.008
#> SRR1663261 1 0.7199 0.715 0.712 0.180 0.108
#> SRR1663265 2 0.3532 0.795 0.108 0.884 0.008
#> SRR1663266 2 0.6363 0.685 0.096 0.768 0.136
#> SRR1663267 1 0.4811 0.679 0.828 0.148 0.024
#> SRR1663264 3 0.7562 0.483 0.148 0.160 0.692
#> SRR1663268 3 0.2846 0.817 0.056 0.020 0.924
#> SRR1663269 3 0.1129 0.820 0.020 0.004 0.976
#> SRR1663271 2 0.1031 0.833 0.024 0.976 0.000
#> SRR1663270 3 0.4652 0.826 0.064 0.080 0.856
#> SRR1663273 3 0.0983 0.820 0.016 0.004 0.980
#> SRR1663272 3 0.0983 0.820 0.016 0.004 0.980
#> SRR1663275 2 0.1163 0.832 0.028 0.972 0.000
#> SRR1663274 2 0.8120 -0.303 0.396 0.532 0.072
#> SRR1663276 1 0.8243 0.554 0.548 0.368 0.084
#> SRR1663277 1 0.8243 0.554 0.548 0.368 0.084
#> SRR1663279 2 0.3998 0.802 0.060 0.884 0.056
#> SRR1663278 2 0.4121 0.795 0.108 0.868 0.024
#> SRR1663280 2 0.5582 0.741 0.100 0.812 0.088
#> SRR1663281 3 0.6111 0.794 0.104 0.112 0.784
#> SRR1663282 3 0.6111 0.794 0.104 0.112 0.784
#> SRR1663283 1 0.5356 0.557 0.784 0.020 0.196
#> SRR1663284 1 0.5356 0.557 0.784 0.020 0.196
#> SRR1663286 2 0.0892 0.833 0.020 0.980 0.000
#> SRR1663287 2 0.2280 0.829 0.052 0.940 0.008
#> SRR1663288 2 0.2550 0.828 0.040 0.936 0.024
#> SRR1663291 1 0.6935 0.359 0.604 0.024 0.372
#> SRR1663289 2 0.1411 0.830 0.036 0.964 0.000
#> SRR1663290 2 0.1411 0.830 0.036 0.964 0.000
#> SRR1663285 3 0.2682 0.838 0.004 0.076 0.920
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.1909 0.7636 0.048 0.940 0.004 0.008
#> SRR1663210 2 0.1909 0.7636 0.048 0.940 0.004 0.008
#> SRR1663213 3 0.0921 0.8089 0.000 0.028 0.972 0.000
#> SRR1663211 3 0.4219 0.7536 0.136 0.040 0.820 0.004
#> SRR1663212 3 0.4219 0.7536 0.136 0.040 0.820 0.004
#> SRR1663214 3 0.0921 0.8089 0.000 0.028 0.972 0.000
#> SRR1663215 3 0.0921 0.8089 0.000 0.028 0.972 0.000
#> SRR1663216 2 0.3846 0.7564 0.088 0.860 0.028 0.024
#> SRR1663217 3 0.7120 0.5194 0.200 0.100 0.648 0.052
#> SRR1663218 3 0.7120 0.5194 0.200 0.100 0.648 0.052
#> SRR1663219 1 0.6234 0.5565 0.584 0.068 0.000 0.348
#> SRR1663220 1 0.6234 0.5565 0.584 0.068 0.000 0.348
#> SRR1663221 2 0.3338 0.7525 0.052 0.884 0.008 0.056
#> SRR1663222 4 0.5897 0.5585 0.028 0.232 0.040 0.700
#> SRR1663224 2 0.7472 0.6139 0.180 0.632 0.120 0.068
#> SRR1663225 2 0.3211 0.7604 0.056 0.892 0.012 0.040
#> SRR1663226 2 0.3211 0.7604 0.056 0.892 0.012 0.040
#> SRR1663223 2 0.4493 0.7326 0.080 0.820 0.008 0.092
#> SRR1663229 2 0.2505 0.7588 0.052 0.920 0.008 0.020
#> SRR1663231 4 0.5610 0.5798 0.008 0.216 0.060 0.716
#> SRR1663232 4 0.5610 0.5798 0.008 0.216 0.060 0.716
#> SRR1663227 4 0.6428 0.5527 0.048 0.236 0.044 0.672
#> SRR1663228 4 0.6428 0.5527 0.048 0.236 0.044 0.672
#> SRR1663230 2 0.2892 0.7447 0.068 0.896 0.000 0.036
#> SRR1663235 2 0.6462 0.5905 0.196 0.692 0.064 0.048
#> SRR1663233 2 0.2983 0.7421 0.068 0.892 0.000 0.040
#> SRR1663236 4 0.4915 0.4951 0.056 0.012 0.144 0.788
#> SRR1663237 2 0.2907 0.7433 0.064 0.900 0.004 0.032
#> SRR1663238 3 0.1902 0.7951 0.004 0.000 0.932 0.064
#> SRR1663234 4 0.6455 0.3302 0.156 0.180 0.004 0.660
#> SRR1663240 3 0.5303 0.5290 0.020 0.008 0.684 0.288
#> SRR1663239 3 0.4309 0.7448 0.040 0.132 0.820 0.008
#> SRR1663241 4 0.3899 0.5526 0.000 0.052 0.108 0.840
#> SRR1663242 2 0.7090 0.6368 0.208 0.644 0.044 0.104
#> SRR1663243 2 0.7207 0.6342 0.196 0.636 0.040 0.128
#> SRR1663244 4 0.5602 0.3264 0.144 0.116 0.004 0.736
#> SRR1663246 3 0.1489 0.8014 0.004 0.000 0.952 0.044
#> SRR1663245 2 0.7022 0.6487 0.188 0.656 0.044 0.112
#> SRR1663247 4 0.4586 0.4367 0.112 0.068 0.008 0.812
#> SRR1663248 2 0.6286 0.5873 0.192 0.704 0.052 0.052
#> SRR1663250 4 0.6640 0.3010 0.072 0.008 0.360 0.560
#> SRR1663249 4 0.3869 0.4507 0.096 0.028 0.020 0.856
#> SRR1663251 4 0.4611 0.4167 0.128 0.040 0.020 0.812
#> SRR1663252 2 0.6130 0.0706 0.048 0.584 0.004 0.364
#> SRR1663253 4 0.7662 0.5097 0.028 0.184 0.216 0.572
#> SRR1663254 4 0.3894 0.3744 0.140 0.004 0.024 0.832
#> SRR1663255 4 0.7550 0.3204 0.124 0.024 0.316 0.536
#> SRR1663256 4 0.6043 0.5787 0.024 0.132 0.116 0.728
#> SRR1663259 2 0.5883 0.6811 0.200 0.720 0.036 0.044
#> SRR1663258 4 0.6405 0.4320 0.072 0.332 0.004 0.592
#> SRR1663257 2 0.8757 0.2016 0.208 0.428 0.308 0.056
#> SRR1663263 3 0.1510 0.8068 0.016 0.028 0.956 0.000
#> SRR1663260 3 0.6211 0.5991 0.072 0.016 0.676 0.236
#> SRR1663262 2 0.3089 0.7566 0.044 0.896 0.008 0.052
#> SRR1663261 4 0.5319 0.3830 0.148 0.076 0.012 0.764
#> SRR1663265 2 0.5509 0.6767 0.108 0.756 0.012 0.124
#> SRR1663266 2 0.7362 0.6244 0.208 0.632 0.076 0.084
#> SRR1663267 1 0.6234 0.5565 0.584 0.068 0.000 0.348
#> SRR1663264 4 0.7256 0.4892 0.024 0.120 0.264 0.592
#> SRR1663268 3 0.5859 0.5882 0.044 0.016 0.684 0.256
#> SRR1663269 3 0.2198 0.7948 0.008 0.000 0.920 0.072
#> SRR1663271 2 0.2441 0.7531 0.056 0.920 0.004 0.020
#> SRR1663270 3 0.4627 0.7528 0.128 0.024 0.812 0.036
#> SRR1663273 3 0.1661 0.7987 0.004 0.000 0.944 0.052
#> SRR1663272 3 0.1902 0.7951 0.004 0.000 0.932 0.064
#> SRR1663275 2 0.2809 0.7457 0.064 0.904 0.004 0.028
#> SRR1663274 4 0.6322 0.3818 0.060 0.360 0.004 0.576
#> SRR1663276 1 0.8963 0.3197 0.352 0.288 0.052 0.308
#> SRR1663277 1 0.8963 0.3197 0.352 0.288 0.052 0.308
#> SRR1663279 2 0.4819 0.7357 0.116 0.808 0.048 0.028
#> SRR1663278 2 0.6696 0.6572 0.204 0.672 0.040 0.084
#> SRR1663280 2 0.7267 0.6318 0.204 0.640 0.072 0.084
#> SRR1663281 3 0.7498 0.6206 0.120 0.100 0.644 0.136
#> SRR1663282 3 0.7498 0.6206 0.120 0.100 0.644 0.136
#> SRR1663283 1 0.6650 0.3746 0.484 0.000 0.084 0.432
#> SRR1663284 1 0.6650 0.3746 0.484 0.000 0.084 0.432
#> SRR1663286 2 0.1994 0.7581 0.052 0.936 0.004 0.008
#> SRR1663287 2 0.3385 0.7510 0.072 0.880 0.008 0.040
#> SRR1663288 2 0.3211 0.7604 0.056 0.892 0.012 0.040
#> SRR1663291 4 0.7610 -0.1102 0.316 0.008 0.176 0.500
#> SRR1663289 2 0.3093 0.7454 0.064 0.892 0.004 0.040
#> SRR1663290 2 0.3093 0.7454 0.064 0.892 0.004 0.040
#> SRR1663285 3 0.1624 0.8061 0.020 0.028 0.952 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.3197 0.6068 0.024 0.836 0.000 0.000 0.140
#> SRR1663210 2 0.3197 0.6068 0.024 0.836 0.000 0.000 0.140
#> SRR1663213 3 0.0486 0.7377 0.004 0.000 0.988 0.004 0.004
#> SRR1663211 3 0.4902 0.6083 0.032 0.000 0.684 0.016 0.268
#> SRR1663212 3 0.4902 0.6083 0.032 0.000 0.684 0.016 0.268
#> SRR1663214 3 0.0324 0.7372 0.004 0.000 0.992 0.000 0.004
#> SRR1663215 3 0.0324 0.7372 0.004 0.000 0.992 0.000 0.004
#> SRR1663216 2 0.4992 0.5476 0.048 0.760 0.028 0.016 0.148
#> SRR1663217 3 0.8558 0.1705 0.112 0.136 0.448 0.052 0.252
#> SRR1663218 3 0.8558 0.1705 0.112 0.136 0.448 0.052 0.252
#> SRR1663219 1 0.3507 0.5604 0.828 0.052 0.000 0.120 0.000
#> SRR1663220 1 0.3507 0.5604 0.828 0.052 0.000 0.120 0.000
#> SRR1663221 2 0.5977 0.5164 0.056 0.660 0.000 0.080 0.204
#> SRR1663222 4 0.3611 0.5919 0.004 0.208 0.008 0.780 0.000
#> SRR1663224 5 0.6896 0.7864 0.032 0.268 0.080 0.040 0.580
#> SRR1663225 2 0.6140 0.5132 0.064 0.648 0.004 0.064 0.220
#> SRR1663226 2 0.6140 0.5132 0.064 0.648 0.004 0.064 0.220
#> SRR1663223 2 0.5813 0.0285 0.056 0.552 0.000 0.020 0.372
#> SRR1663229 2 0.5105 0.5775 0.048 0.736 0.000 0.052 0.164
#> SRR1663231 4 0.3354 0.6179 0.004 0.140 0.024 0.832 0.000
#> SRR1663232 4 0.3354 0.6179 0.004 0.140 0.024 0.832 0.000
#> SRR1663227 4 0.5124 0.5717 0.052 0.152 0.008 0.748 0.040
#> SRR1663228 4 0.5124 0.5717 0.052 0.152 0.008 0.748 0.040
#> SRR1663230 2 0.1205 0.6857 0.004 0.956 0.000 0.040 0.000
#> SRR1663235 2 0.7067 0.3093 0.096 0.524 0.024 0.036 0.320
#> SRR1663233 2 0.1270 0.6845 0.000 0.948 0.000 0.052 0.000
#> SRR1663236 4 0.3880 0.5620 0.040 0.000 0.088 0.832 0.040
#> SRR1663237 2 0.1270 0.6845 0.000 0.948 0.000 0.052 0.000
#> SRR1663238 3 0.1430 0.7321 0.004 0.000 0.944 0.052 0.000
#> SRR1663234 4 0.6800 0.4072 0.276 0.160 0.000 0.532 0.032
#> SRR1663240 3 0.5088 0.3388 0.024 0.000 0.596 0.368 0.012
#> SRR1663239 3 0.4095 0.7063 0.024 0.056 0.836 0.024 0.060
#> SRR1663241 4 0.2957 0.6020 0.024 0.028 0.048 0.892 0.008
#> SRR1663242 5 0.4863 0.8686 0.004 0.248 0.024 0.020 0.704
#> SRR1663243 5 0.6057 0.8300 0.036 0.264 0.020 0.044 0.636
#> SRR1663244 4 0.6744 0.3878 0.292 0.080 0.000 0.552 0.076
#> SRR1663246 3 0.1043 0.7333 0.000 0.000 0.960 0.040 0.000
#> SRR1663245 5 0.6185 0.8272 0.040 0.272 0.024 0.040 0.624
#> SRR1663247 4 0.5649 0.4544 0.252 0.008 0.000 0.636 0.104
#> SRR1663248 2 0.6599 0.3153 0.092 0.564 0.008 0.036 0.300
#> SRR1663250 4 0.5819 0.4544 0.028 0.000 0.196 0.664 0.112
#> SRR1663249 4 0.5472 0.4709 0.200 0.004 0.004 0.676 0.116
#> SRR1663251 4 0.5663 0.4341 0.280 0.008 0.004 0.628 0.080
#> SRR1663252 4 0.6764 0.1001 0.056 0.428 0.000 0.436 0.080
#> SRR1663253 4 0.5458 0.5742 0.020 0.160 0.108 0.708 0.004
#> SRR1663254 4 0.5613 0.3784 0.160 0.004 0.012 0.684 0.140
#> SRR1663255 4 0.6392 0.4323 0.028 0.008 0.152 0.628 0.184
#> SRR1663256 4 0.3661 0.6065 0.012 0.080 0.060 0.844 0.004
#> SRR1663259 5 0.4734 0.8247 0.000 0.312 0.036 0.000 0.652
#> SRR1663258 4 0.5566 0.4932 0.048 0.264 0.000 0.652 0.036
#> SRR1663257 5 0.5767 0.7896 0.008 0.212 0.096 0.016 0.668
#> SRR1663263 3 0.1626 0.7262 0.016 0.000 0.940 0.000 0.044
#> SRR1663260 3 0.6022 0.5713 0.032 0.000 0.640 0.220 0.108
#> SRR1663262 2 0.4550 0.5532 0.044 0.764 0.000 0.024 0.168
#> SRR1663261 4 0.5641 0.4359 0.312 0.048 0.004 0.616 0.020
#> SRR1663265 2 0.6871 -0.1987 0.144 0.452 0.000 0.028 0.376
#> SRR1663266 5 0.5023 0.8710 0.004 0.248 0.032 0.020 0.696
#> SRR1663267 1 0.3507 0.5604 0.828 0.052 0.000 0.120 0.000
#> SRR1663264 4 0.5016 0.5769 0.012 0.100 0.144 0.740 0.004
#> SRR1663268 3 0.5866 0.5717 0.032 0.000 0.648 0.232 0.088
#> SRR1663269 3 0.2429 0.7245 0.020 0.000 0.900 0.076 0.004
#> SRR1663271 2 0.1197 0.6851 0.000 0.952 0.000 0.048 0.000
#> SRR1663270 3 0.4770 0.6385 0.028 0.000 0.716 0.024 0.232
#> SRR1663273 3 0.1043 0.7333 0.000 0.000 0.960 0.040 0.000
#> SRR1663272 3 0.1121 0.7322 0.000 0.000 0.956 0.044 0.000
#> SRR1663275 2 0.1270 0.6845 0.000 0.948 0.000 0.052 0.000
#> SRR1663274 4 0.5087 0.4114 0.028 0.376 0.000 0.588 0.008
#> SRR1663276 1 0.8829 0.4181 0.292 0.276 0.012 0.188 0.232
#> SRR1663277 1 0.8829 0.4181 0.292 0.276 0.012 0.188 0.232
#> SRR1663279 5 0.5900 0.5249 0.024 0.432 0.040 0.004 0.500
#> SRR1663278 5 0.4896 0.8725 0.000 0.252 0.032 0.020 0.696
#> SRR1663280 5 0.5049 0.8726 0.004 0.252 0.032 0.020 0.692
#> SRR1663281 3 0.7496 0.2142 0.044 0.020 0.408 0.124 0.404
#> SRR1663282 3 0.7496 0.2142 0.044 0.020 0.408 0.124 0.404
#> SRR1663283 1 0.7273 0.4420 0.484 0.000 0.048 0.272 0.196
#> SRR1663284 1 0.7273 0.4420 0.484 0.000 0.048 0.272 0.196
#> SRR1663286 2 0.0992 0.6838 0.000 0.968 0.000 0.024 0.008
#> SRR1663287 2 0.5510 0.5371 0.056 0.696 0.000 0.052 0.196
#> SRR1663288 2 0.6192 0.5019 0.064 0.640 0.004 0.064 0.228
#> SRR1663291 4 0.7820 -0.2283 0.220 0.000 0.076 0.396 0.308
#> SRR1663289 2 0.1270 0.6845 0.000 0.948 0.000 0.052 0.000
#> SRR1663290 2 0.1270 0.6845 0.000 0.948 0.000 0.052 0.000
#> SRR1663285 3 0.1626 0.7262 0.016 0.000 0.940 0.000 0.044
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.4436 0.5132 0.140 0.736 0.000 0.004 0.116 0.004
#> SRR1663210 2 0.4436 0.5132 0.140 0.736 0.000 0.004 0.116 0.004
#> SRR1663213 3 0.1167 0.7465 0.012 0.000 0.960 0.008 0.020 0.000
#> SRR1663211 3 0.5288 0.5251 0.084 0.004 0.584 0.000 0.320 0.008
#> SRR1663212 3 0.5288 0.5251 0.084 0.004 0.584 0.000 0.320 0.008
#> SRR1663214 3 0.0891 0.7456 0.008 0.000 0.968 0.000 0.024 0.000
#> SRR1663215 3 0.0891 0.7456 0.008 0.000 0.968 0.000 0.024 0.000
#> SRR1663216 2 0.5439 0.3836 0.212 0.628 0.000 0.020 0.140 0.000
#> SRR1663217 1 0.6268 0.4564 0.544 0.120 0.288 0.024 0.024 0.000
#> SRR1663218 1 0.6268 0.4564 0.544 0.120 0.288 0.024 0.024 0.000
#> SRR1663219 6 0.1321 0.6739 0.000 0.020 0.000 0.024 0.004 0.952
#> SRR1663220 6 0.1321 0.6739 0.000 0.020 0.000 0.024 0.004 0.952
#> SRR1663221 2 0.7327 0.3948 0.228 0.448 0.000 0.128 0.188 0.008
#> SRR1663222 4 0.3183 0.6271 0.008 0.200 0.000 0.788 0.000 0.004
#> SRR1663224 5 0.6393 0.6696 0.156 0.104 0.076 0.032 0.628 0.004
#> SRR1663225 2 0.7436 0.3718 0.252 0.412 0.000 0.120 0.208 0.008
#> SRR1663226 2 0.7436 0.3718 0.252 0.412 0.000 0.120 0.208 0.008
#> SRR1663223 5 0.6596 0.3504 0.108 0.324 0.000 0.032 0.500 0.036
#> SRR1663229 2 0.6682 0.4763 0.212 0.544 0.000 0.092 0.144 0.008
#> SRR1663231 4 0.3094 0.6528 0.008 0.128 0.012 0.840 0.000 0.012
#> SRR1663232 4 0.3094 0.6528 0.008 0.128 0.012 0.840 0.000 0.012
#> SRR1663227 4 0.4036 0.5792 0.140 0.040 0.000 0.788 0.020 0.012
#> SRR1663228 4 0.4036 0.5792 0.140 0.040 0.000 0.788 0.020 0.012
#> SRR1663230 2 0.0653 0.6340 0.004 0.980 0.000 0.012 0.000 0.004
#> SRR1663235 1 0.4998 0.3887 0.548 0.392 0.000 0.012 0.048 0.000
#> SRR1663233 2 0.0603 0.6311 0.000 0.980 0.000 0.016 0.000 0.004
#> SRR1663236 4 0.4011 0.6055 0.056 0.004 0.048 0.824 0.032 0.036
#> SRR1663237 2 0.0653 0.6299 0.000 0.980 0.000 0.012 0.004 0.004
#> SRR1663238 3 0.0922 0.7441 0.004 0.000 0.968 0.024 0.004 0.000
#> SRR1663234 4 0.7013 0.4030 0.036 0.208 0.000 0.460 0.028 0.268
#> SRR1663240 3 0.4924 0.4096 0.060 0.000 0.596 0.336 0.008 0.000
#> SRR1663239 3 0.4257 0.6874 0.044 0.056 0.800 0.024 0.076 0.000
#> SRR1663241 4 0.2900 0.6414 0.020 0.052 0.020 0.884 0.004 0.020
#> SRR1663242 5 0.1644 0.7731 0.000 0.076 0.000 0.000 0.920 0.004
#> SRR1663243 5 0.5178 0.7214 0.104 0.084 0.000 0.032 0.732 0.048
#> SRR1663244 4 0.7484 0.3849 0.036 0.120 0.000 0.464 0.128 0.252
#> SRR1663246 3 0.0692 0.7449 0.000 0.000 0.976 0.020 0.004 0.000
#> SRR1663245 5 0.5095 0.7246 0.136 0.084 0.000 0.032 0.724 0.024
#> SRR1663247 4 0.6528 0.4520 0.104 0.004 0.000 0.560 0.128 0.204
#> SRR1663248 1 0.4672 0.3863 0.532 0.432 0.000 0.008 0.028 0.000
#> SRR1663250 4 0.5678 0.5092 0.092 0.000 0.132 0.680 0.080 0.016
#> SRR1663249 4 0.6453 0.4709 0.108 0.008 0.000 0.584 0.120 0.180
#> SRR1663251 4 0.6486 0.4400 0.092 0.008 0.000 0.552 0.100 0.248
#> SRR1663252 4 0.6957 0.0585 0.224 0.268 0.000 0.448 0.048 0.012
#> SRR1663253 4 0.4503 0.6313 0.036 0.120 0.080 0.760 0.004 0.000
#> SRR1663254 4 0.6288 0.3628 0.216 0.000 0.012 0.588 0.064 0.120
#> SRR1663255 4 0.6106 0.4797 0.084 0.004 0.112 0.648 0.136 0.016
#> SRR1663256 4 0.3575 0.6452 0.020 0.112 0.028 0.828 0.004 0.008
#> SRR1663259 5 0.3407 0.7281 0.016 0.168 0.016 0.000 0.800 0.000
#> SRR1663258 4 0.4738 0.5547 0.148 0.100 0.000 0.728 0.016 0.008
#> SRR1663257 5 0.3900 0.7085 0.048 0.084 0.052 0.000 0.812 0.004
#> SRR1663263 3 0.2257 0.7325 0.040 0.000 0.904 0.000 0.048 0.008
#> SRR1663260 3 0.6021 0.5711 0.088 0.000 0.616 0.196 0.096 0.004
#> SRR1663262 2 0.5200 0.4403 0.068 0.656 0.000 0.024 0.244 0.008
#> SRR1663261 4 0.5484 0.4714 0.072 0.012 0.000 0.620 0.024 0.272
#> SRR1663265 5 0.7484 0.3579 0.124 0.272 0.000 0.028 0.444 0.132
#> SRR1663266 5 0.1983 0.7721 0.000 0.072 0.020 0.000 0.908 0.000
#> SRR1663267 6 0.1321 0.6739 0.000 0.020 0.000 0.024 0.004 0.952
#> SRR1663264 4 0.3788 0.6392 0.016 0.104 0.068 0.808 0.004 0.000
#> SRR1663268 3 0.5879 0.5560 0.096 0.000 0.612 0.228 0.060 0.004
#> SRR1663269 3 0.2209 0.7260 0.024 0.000 0.900 0.072 0.004 0.000
#> SRR1663271 2 0.0508 0.6307 0.000 0.984 0.000 0.012 0.000 0.004
#> SRR1663270 3 0.4710 0.6435 0.080 0.000 0.696 0.004 0.212 0.008
#> SRR1663273 3 0.0547 0.7448 0.000 0.000 0.980 0.020 0.000 0.000
#> SRR1663272 3 0.0922 0.7441 0.004 0.000 0.968 0.024 0.004 0.000
#> SRR1663275 2 0.0508 0.6307 0.000 0.984 0.000 0.012 0.000 0.004
#> SRR1663274 4 0.4403 0.3606 0.008 0.460 0.000 0.520 0.000 0.012
#> SRR1663276 1 0.7438 0.4175 0.436 0.284 0.004 0.076 0.024 0.176
#> SRR1663277 1 0.7438 0.4175 0.436 0.284 0.004 0.076 0.024 0.176
#> SRR1663279 5 0.5482 0.5106 0.104 0.292 0.012 0.004 0.588 0.000
#> SRR1663278 5 0.2163 0.7736 0.000 0.096 0.008 0.004 0.892 0.000
#> SRR1663280 5 0.2039 0.7732 0.000 0.076 0.020 0.000 0.904 0.000
#> SRR1663281 3 0.7763 0.1540 0.160 0.016 0.356 0.100 0.352 0.016
#> SRR1663282 3 0.7763 0.1540 0.160 0.016 0.356 0.100 0.352 0.016
#> SRR1663283 6 0.7613 0.3885 0.224 0.000 0.032 0.208 0.100 0.436
#> SRR1663284 6 0.7613 0.3885 0.224 0.000 0.032 0.208 0.100 0.436
#> SRR1663286 2 0.0551 0.6326 0.004 0.984 0.000 0.008 0.004 0.000
#> SRR1663287 2 0.6968 0.3957 0.200 0.492 0.000 0.084 0.216 0.008
#> SRR1663288 2 0.7451 0.3656 0.252 0.408 0.000 0.120 0.212 0.008
#> SRR1663291 1 0.7847 -0.1524 0.396 0.000 0.052 0.296 0.140 0.116
#> SRR1663289 2 0.0748 0.6325 0.004 0.976 0.000 0.016 0.000 0.004
#> SRR1663290 2 0.0748 0.6325 0.004 0.976 0.000 0.016 0.000 0.004
#> SRR1663285 3 0.2257 0.7325 0.040 0.000 0.904 0.000 0.048 0.008
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.338 0.440 0.767 0.5043 0.500 0.500
#> 3 3 0.960 0.931 0.961 0.3308 0.722 0.498
#> 4 4 0.663 0.626 0.743 0.1090 0.907 0.730
#> 5 5 0.659 0.650 0.778 0.0741 0.914 0.688
#> 6 6 0.732 0.551 0.719 0.0426 0.909 0.610
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
#> SRR1663209 2 0.295 0.6254 0.052 0.948
#> SRR1663210 2 0.295 0.6254 0.052 0.948
#> SRR1663213 1 0.929 0.4643 0.656 0.344
#> SRR1663211 1 0.929 0.4643 0.656 0.344
#> SRR1663212 1 0.929 0.4643 0.656 0.344
#> SRR1663214 1 0.929 0.4643 0.656 0.344
#> SRR1663215 1 0.929 0.4643 0.656 0.344
#> SRR1663216 2 0.992 -0.0777 0.448 0.552
#> SRR1663217 1 0.990 0.2989 0.560 0.440
#> SRR1663218 1 0.990 0.2989 0.560 0.440
#> SRR1663219 2 1.000 0.2049 0.496 0.504
#> SRR1663220 2 1.000 0.2049 0.496 0.504
#> SRR1663221 2 0.000 0.6451 0.000 1.000
#> SRR1663222 2 1.000 0.2049 0.496 0.504
#> SRR1663224 2 1.000 -0.2086 0.500 0.500
#> SRR1663225 2 0.416 0.6055 0.084 0.916
#> SRR1663226 2 0.416 0.6055 0.084 0.916
#> SRR1663223 2 0.000 0.6451 0.000 1.000
#> SRR1663229 2 0.000 0.6451 0.000 1.000
#> SRR1663231 1 0.966 0.0458 0.608 0.392
#> SRR1663232 1 0.966 0.0458 0.608 0.392
#> SRR1663227 2 1.000 0.2049 0.496 0.504
#> SRR1663228 2 1.000 0.2049 0.496 0.504
#> SRR1663230 2 0.000 0.6451 0.000 1.000
#> SRR1663235 2 0.992 -0.0777 0.448 0.552
#> SRR1663233 2 0.000 0.6451 0.000 1.000
#> SRR1663236 1 0.373 0.6089 0.928 0.072
#> SRR1663237 2 0.000 0.6451 0.000 1.000
#> SRR1663238 1 0.000 0.6471 1.000 0.000
#> SRR1663234 2 0.929 0.4033 0.344 0.656
#> SRR1663240 1 0.000 0.6471 1.000 0.000
#> SRR1663239 1 1.000 0.1773 0.504 0.496
#> SRR1663241 1 0.552 0.5506 0.872 0.128
#> SRR1663242 2 0.373 0.6136 0.072 0.928
#> SRR1663243 2 0.295 0.6254 0.052 0.948
#> SRR1663244 2 0.958 0.3662 0.380 0.620
#> SRR1663246 1 0.000 0.6471 1.000 0.000
#> SRR1663245 2 0.662 0.5067 0.172 0.828
#> SRR1663247 2 1.000 0.2049 0.496 0.504
#> SRR1663248 2 0.482 0.5905 0.104 0.896
#> SRR1663250 1 0.000 0.6471 1.000 0.000
#> SRR1663249 1 0.996 -0.1476 0.536 0.464
#> SRR1663251 1 0.996 -0.1476 0.536 0.464
#> SRR1663252 2 0.929 0.4033 0.344 0.656
#> SRR1663253 1 0.388 0.6057 0.924 0.076
#> SRR1663254 1 0.814 0.3541 0.748 0.252
#> SRR1663255 1 0.000 0.6471 1.000 0.000
#> SRR1663256 1 0.373 0.6089 0.928 0.072
#> SRR1663259 2 0.876 0.2948 0.296 0.704
#> SRR1663258 2 0.929 0.4033 0.344 0.656
#> SRR1663257 1 1.000 0.1773 0.504 0.496
#> SRR1663263 1 0.929 0.4643 0.656 0.344
#> SRR1663260 1 0.000 0.6471 1.000 0.000
#> SRR1663262 2 0.000 0.6451 0.000 1.000
#> SRR1663261 2 1.000 0.2049 0.496 0.504
#> SRR1663265 2 0.000 0.6451 0.000 1.000
#> SRR1663266 2 1.000 -0.1795 0.488 0.512
#> SRR1663267 2 1.000 0.2049 0.496 0.504
#> SRR1663264 1 0.373 0.6089 0.928 0.072
#> SRR1663268 1 0.000 0.6471 1.000 0.000
#> SRR1663269 1 0.000 0.6471 1.000 0.000
#> SRR1663271 2 0.000 0.6451 0.000 1.000
#> SRR1663270 1 0.929 0.4643 0.656 0.344
#> SRR1663273 1 0.000 0.6471 1.000 0.000
#> SRR1663272 1 0.000 0.6471 1.000 0.000
#> SRR1663275 2 0.000 0.6451 0.000 1.000
#> SRR1663274 2 0.929 0.4033 0.344 0.656
#> SRR1663276 2 0.981 0.3216 0.420 0.580
#> SRR1663277 2 0.981 0.3216 0.420 0.580
#> SRR1663279 2 0.929 0.1941 0.344 0.656
#> SRR1663278 2 0.430 0.6029 0.088 0.912
#> SRR1663280 2 0.929 0.1941 0.344 0.656
#> SRR1663281 1 0.929 0.4643 0.656 0.344
#> SRR1663282 1 0.929 0.4643 0.656 0.344
#> SRR1663283 1 0.295 0.6220 0.948 0.052
#> SRR1663284 1 0.295 0.6220 0.948 0.052
#> SRR1663286 2 0.000 0.6451 0.000 1.000
#> SRR1663287 2 0.000 0.6451 0.000 1.000
#> SRR1663288 2 0.373 0.6136 0.072 0.928
#> SRR1663291 1 0.000 0.6471 1.000 0.000
#> SRR1663289 2 0.000 0.6451 0.000 1.000
#> SRR1663290 2 0.000 0.6451 0.000 1.000
#> SRR1663285 1 0.929 0.4643 0.656 0.344
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663210 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663213 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663211 3 0.0237 0.949 0.000 0.004 0.996
#> SRR1663212 3 0.0237 0.949 0.000 0.004 0.996
#> SRR1663214 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663215 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663216 2 0.1643 0.947 0.000 0.956 0.044
#> SRR1663217 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663218 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663219 1 0.0237 0.961 0.996 0.004 0.000
#> SRR1663220 1 0.0237 0.961 0.996 0.004 0.000
#> SRR1663221 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663222 1 0.2356 0.937 0.928 0.072 0.000
#> SRR1663224 3 0.2301 0.904 0.004 0.060 0.936
#> SRR1663225 2 0.0424 0.967 0.000 0.992 0.008
#> SRR1663226 2 0.0424 0.967 0.000 0.992 0.008
#> SRR1663223 2 0.2356 0.939 0.072 0.928 0.000
#> SRR1663229 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663231 1 0.2339 0.948 0.940 0.048 0.012
#> SRR1663232 1 0.2339 0.948 0.940 0.048 0.012
#> SRR1663227 1 0.2261 0.940 0.932 0.068 0.000
#> SRR1663228 1 0.2261 0.940 0.932 0.068 0.000
#> SRR1663230 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663235 2 0.0424 0.967 0.000 0.992 0.008
#> SRR1663233 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663236 1 0.2200 0.933 0.940 0.004 0.056
#> SRR1663237 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663238 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663234 1 0.0237 0.961 0.996 0.004 0.000
#> SRR1663240 3 0.0237 0.949 0.004 0.000 0.996
#> SRR1663239 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663241 1 0.1643 0.943 0.956 0.000 0.044
#> SRR1663242 2 0.2356 0.937 0.072 0.928 0.000
#> SRR1663243 2 0.2356 0.937 0.072 0.928 0.000
#> SRR1663244 1 0.0237 0.961 0.996 0.004 0.000
#> SRR1663246 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663245 2 0.2356 0.937 0.072 0.928 0.000
#> SRR1663247 1 0.0000 0.960 1.000 0.000 0.000
#> SRR1663248 2 0.0237 0.968 0.000 0.996 0.004
#> SRR1663250 3 0.3272 0.867 0.104 0.004 0.892
#> SRR1663249 1 0.0237 0.959 0.996 0.004 0.000
#> SRR1663251 1 0.0000 0.960 1.000 0.000 0.000
#> SRR1663252 2 0.3116 0.872 0.108 0.892 0.000
#> SRR1663253 3 0.5678 0.549 0.316 0.000 0.684
#> SRR1663254 1 0.0237 0.959 0.996 0.004 0.000
#> SRR1663255 3 0.2682 0.894 0.076 0.004 0.920
#> SRR1663256 1 0.2448 0.920 0.924 0.000 0.076
#> SRR1663259 2 0.1774 0.953 0.016 0.960 0.024
#> SRR1663258 1 0.2356 0.937 0.928 0.072 0.000
#> SRR1663257 3 0.5690 0.594 0.004 0.288 0.708
#> SRR1663263 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663260 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663262 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663261 1 0.0237 0.961 0.996 0.004 0.000
#> SRR1663265 2 0.2356 0.939 0.072 0.928 0.000
#> SRR1663266 2 0.5466 0.790 0.040 0.800 0.160
#> SRR1663267 1 0.0237 0.961 0.996 0.004 0.000
#> SRR1663264 3 0.5835 0.498 0.340 0.000 0.660
#> SRR1663268 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663269 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663271 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663270 3 0.0475 0.947 0.004 0.004 0.992
#> SRR1663273 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663272 3 0.0000 0.951 0.000 0.000 1.000
#> SRR1663275 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663274 1 0.2165 0.942 0.936 0.064 0.000
#> SRR1663276 1 0.1015 0.960 0.980 0.012 0.008
#> SRR1663277 1 0.1015 0.960 0.980 0.012 0.008
#> SRR1663279 2 0.0747 0.964 0.000 0.984 0.016
#> SRR1663278 2 0.2261 0.939 0.068 0.932 0.000
#> SRR1663280 2 0.3589 0.917 0.048 0.900 0.052
#> SRR1663281 3 0.0475 0.947 0.004 0.004 0.992
#> SRR1663282 3 0.0475 0.947 0.004 0.004 0.992
#> SRR1663283 1 0.0829 0.956 0.984 0.004 0.012
#> SRR1663284 1 0.0829 0.956 0.984 0.004 0.012
#> SRR1663286 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663287 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663288 2 0.0424 0.967 0.000 0.992 0.008
#> SRR1663291 1 0.4883 0.743 0.788 0.004 0.208
#> SRR1663289 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663290 2 0.0237 0.969 0.004 0.996 0.000
#> SRR1663285 3 0.0000 0.951 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.2216 0.80811 0.000 0.908 0.000 0.092
#> SRR1663210 2 0.2216 0.80811 0.000 0.908 0.000 0.092
#> SRR1663213 3 0.0000 0.83968 0.000 0.000 1.000 0.000
#> SRR1663211 3 0.2530 0.80059 0.000 0.000 0.888 0.112
#> SRR1663212 3 0.2530 0.80059 0.000 0.000 0.888 0.112
#> SRR1663214 3 0.0000 0.83968 0.000 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.83968 0.000 0.000 1.000 0.000
#> SRR1663216 2 0.4482 0.78426 0.004 0.816 0.088 0.092
#> SRR1663217 3 0.6254 0.48267 0.300 0.004 0.624 0.072
#> SRR1663218 3 0.6254 0.48267 0.300 0.004 0.624 0.072
#> SRR1663219 1 0.1938 0.67284 0.936 0.012 0.000 0.052
#> SRR1663220 1 0.1938 0.67284 0.936 0.012 0.000 0.052
#> SRR1663221 2 0.1557 0.80660 0.000 0.944 0.000 0.056
#> SRR1663222 4 0.5797 0.43284 0.340 0.024 0.012 0.624
#> SRR1663224 3 0.7111 0.52508 0.008 0.148 0.584 0.260
#> SRR1663225 2 0.1557 0.80660 0.000 0.944 0.000 0.056
#> SRR1663226 2 0.1557 0.80660 0.000 0.944 0.000 0.056
#> SRR1663223 2 0.4727 0.75553 0.108 0.792 0.000 0.100
#> SRR1663229 2 0.1557 0.80660 0.000 0.944 0.000 0.056
#> SRR1663231 4 0.5498 0.43115 0.352 0.004 0.020 0.624
#> SRR1663232 4 0.5498 0.43115 0.352 0.004 0.020 0.624
#> SRR1663227 4 0.5807 0.43551 0.312 0.052 0.000 0.636
#> SRR1663228 4 0.5807 0.43551 0.312 0.052 0.000 0.636
#> SRR1663230 2 0.2704 0.79317 0.000 0.876 0.000 0.124
#> SRR1663235 2 0.6776 0.62031 0.220 0.656 0.032 0.092
#> SRR1663233 2 0.2814 0.79122 0.000 0.868 0.000 0.132
#> SRR1663236 4 0.5731 0.26611 0.428 0.000 0.028 0.544
#> SRR1663237 2 0.3052 0.78821 0.004 0.860 0.000 0.136
#> SRR1663238 3 0.0817 0.83543 0.000 0.000 0.976 0.024
#> SRR1663234 1 0.4248 0.56800 0.768 0.012 0.000 0.220
#> SRR1663240 3 0.2469 0.76312 0.000 0.000 0.892 0.108
#> SRR1663239 3 0.0000 0.83968 0.000 0.000 1.000 0.000
#> SRR1663241 4 0.5626 0.37520 0.384 0.000 0.028 0.588
#> SRR1663242 2 0.6909 0.64745 0.096 0.612 0.020 0.272
#> SRR1663243 2 0.7101 0.64409 0.128 0.612 0.020 0.240
#> SRR1663244 1 0.5038 0.42341 0.652 0.012 0.000 0.336
#> SRR1663246 3 0.0707 0.83642 0.000 0.000 0.980 0.020
#> SRR1663245 2 0.7065 0.64596 0.116 0.608 0.020 0.256
#> SRR1663247 1 0.4804 0.33685 0.616 0.000 0.000 0.384
#> SRR1663248 2 0.6670 0.52530 0.288 0.608 0.008 0.096
#> SRR1663250 4 0.5688 -0.11290 0.024 0.000 0.464 0.512
#> SRR1663249 1 0.4730 0.34790 0.636 0.000 0.000 0.364
#> SRR1663251 1 0.4661 0.38657 0.652 0.000 0.000 0.348
#> SRR1663252 4 0.5444 0.23204 0.016 0.424 0.000 0.560
#> SRR1663253 4 0.5355 0.40414 0.020 0.000 0.360 0.620
#> SRR1663254 1 0.1118 0.66311 0.964 0.000 0.000 0.036
#> SRR1663255 4 0.5673 -0.12802 0.024 0.000 0.448 0.528
#> SRR1663256 4 0.5966 0.45128 0.316 0.000 0.060 0.624
#> SRR1663259 2 0.5722 0.68724 0.012 0.684 0.040 0.264
#> SRR1663258 4 0.6513 0.38574 0.176 0.184 0.000 0.640
#> SRR1663257 3 0.8121 -0.00726 0.008 0.356 0.372 0.264
#> SRR1663263 3 0.0707 0.83744 0.000 0.000 0.980 0.020
#> SRR1663260 3 0.1118 0.82940 0.000 0.000 0.964 0.036
#> SRR1663262 2 0.0336 0.81250 0.008 0.992 0.000 0.000
#> SRR1663261 1 0.4431 0.48282 0.696 0.000 0.000 0.304
#> SRR1663265 2 0.4888 0.74786 0.124 0.780 0.000 0.096
#> SRR1663266 2 0.7165 0.62395 0.036 0.608 0.092 0.264
#> SRR1663267 1 0.1938 0.67284 0.936 0.012 0.000 0.052
#> SRR1663264 4 0.5666 0.41286 0.036 0.000 0.348 0.616
#> SRR1663268 3 0.1118 0.82940 0.000 0.000 0.964 0.036
#> SRR1663269 3 0.0817 0.83543 0.000 0.000 0.976 0.024
#> SRR1663271 2 0.2469 0.80003 0.000 0.892 0.000 0.108
#> SRR1663270 3 0.3591 0.75701 0.008 0.000 0.824 0.168
#> SRR1663273 3 0.0707 0.83642 0.000 0.000 0.980 0.020
#> SRR1663272 3 0.0817 0.83543 0.000 0.000 0.976 0.024
#> SRR1663275 2 0.2647 0.79679 0.000 0.880 0.000 0.120
#> SRR1663274 1 0.5590 0.08868 0.524 0.020 0.000 0.456
#> SRR1663276 1 0.2843 0.60820 0.892 0.020 0.000 0.088
#> SRR1663277 1 0.2843 0.60820 0.892 0.020 0.000 0.088
#> SRR1663279 2 0.3694 0.78698 0.000 0.844 0.032 0.124
#> SRR1663278 2 0.6751 0.65591 0.088 0.628 0.020 0.264
#> SRR1663280 2 0.6970 0.63548 0.032 0.620 0.084 0.264
#> SRR1663281 3 0.4353 0.70921 0.012 0.000 0.756 0.232
#> SRR1663282 3 0.4353 0.70921 0.012 0.000 0.756 0.232
#> SRR1663283 1 0.2401 0.61877 0.904 0.000 0.004 0.092
#> SRR1663284 1 0.2401 0.61877 0.904 0.000 0.004 0.092
#> SRR1663286 2 0.2345 0.80127 0.000 0.900 0.000 0.100
#> SRR1663287 2 0.1398 0.80890 0.004 0.956 0.000 0.040
#> SRR1663288 2 0.1557 0.80660 0.000 0.944 0.000 0.056
#> SRR1663291 1 0.4890 0.47556 0.776 0.000 0.080 0.144
#> SRR1663289 2 0.2973 0.78502 0.000 0.856 0.000 0.144
#> SRR1663290 2 0.2973 0.78502 0.000 0.856 0.000 0.144
#> SRR1663285 3 0.0921 0.83542 0.000 0.000 0.972 0.028
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.2818 0.697 0.008 0.860 0.000 0.004 0.128
#> SRR1663210 2 0.2818 0.697 0.008 0.860 0.000 0.004 0.128
#> SRR1663213 3 0.0290 0.851 0.000 0.000 0.992 0.000 0.008
#> SRR1663211 3 0.2891 0.758 0.000 0.000 0.824 0.000 0.176
#> SRR1663212 3 0.2891 0.758 0.000 0.000 0.824 0.000 0.176
#> SRR1663214 3 0.0290 0.851 0.000 0.000 0.992 0.000 0.008
#> SRR1663215 3 0.0290 0.851 0.000 0.000 0.992 0.000 0.008
#> SRR1663216 2 0.4472 0.644 0.008 0.780 0.080 0.004 0.128
#> SRR1663217 3 0.6914 0.372 0.264 0.196 0.516 0.004 0.020
#> SRR1663218 3 0.6914 0.372 0.264 0.196 0.516 0.004 0.020
#> SRR1663219 1 0.3237 0.717 0.864 0.012 0.000 0.076 0.048
#> SRR1663220 1 0.3237 0.717 0.864 0.012 0.000 0.076 0.048
#> SRR1663221 2 0.6450 0.449 0.000 0.492 0.000 0.212 0.296
#> SRR1663222 4 0.4504 0.639 0.152 0.068 0.012 0.768 0.000
#> SRR1663224 5 0.3132 0.698 0.000 0.008 0.172 0.000 0.820
#> SRR1663225 2 0.6385 0.518 0.000 0.556 0.008 0.200 0.236
#> SRR1663226 2 0.6385 0.518 0.000 0.556 0.008 0.200 0.236
#> SRR1663223 5 0.5610 0.613 0.124 0.212 0.000 0.008 0.656
#> SRR1663229 2 0.6312 0.490 0.000 0.524 0.000 0.200 0.276
#> SRR1663231 4 0.4081 0.635 0.172 0.032 0.012 0.784 0.000
#> SRR1663232 4 0.4081 0.635 0.172 0.032 0.012 0.784 0.000
#> SRR1663227 4 0.2073 0.618 0.008 0.044 0.004 0.928 0.016
#> SRR1663228 4 0.2073 0.618 0.008 0.044 0.004 0.928 0.016
#> SRR1663230 2 0.0955 0.751 0.000 0.968 0.000 0.004 0.028
#> SRR1663235 2 0.5520 0.594 0.132 0.724 0.048 0.004 0.092
#> SRR1663233 2 0.1082 0.750 0.000 0.964 0.000 0.008 0.028
#> SRR1663236 4 0.4163 0.559 0.228 0.000 0.032 0.740 0.000
#> SRR1663237 2 0.0290 0.748 0.000 0.992 0.000 0.008 0.000
#> SRR1663238 3 0.0162 0.850 0.000 0.000 0.996 0.004 0.000
#> SRR1663234 1 0.4473 0.682 0.772 0.024 0.000 0.160 0.044
#> SRR1663240 3 0.2891 0.661 0.000 0.000 0.824 0.176 0.000
#> SRR1663239 3 0.0404 0.851 0.000 0.000 0.988 0.000 0.012
#> SRR1663241 4 0.3586 0.609 0.188 0.000 0.020 0.792 0.000
#> SRR1663242 5 0.0833 0.827 0.004 0.016 0.004 0.000 0.976
#> SRR1663243 5 0.3127 0.779 0.128 0.020 0.004 0.000 0.848
#> SRR1663244 1 0.5570 0.508 0.596 0.012 0.000 0.332 0.060
#> SRR1663246 3 0.0162 0.850 0.000 0.000 0.996 0.004 0.000
#> SRR1663245 5 0.3142 0.794 0.108 0.032 0.004 0.000 0.856
#> SRR1663247 1 0.5518 0.413 0.544 0.000 0.000 0.384 0.072
#> SRR1663248 2 0.4557 0.578 0.204 0.736 0.000 0.004 0.056
#> SRR1663250 4 0.6781 0.415 0.048 0.000 0.324 0.520 0.108
#> SRR1663249 1 0.5272 0.389 0.552 0.000 0.000 0.396 0.052
#> SRR1663251 1 0.5226 0.426 0.572 0.000 0.000 0.376 0.052
#> SRR1663252 4 0.4491 0.228 0.000 0.328 0.000 0.652 0.020
#> SRR1663253 4 0.4642 0.555 0.000 0.032 0.308 0.660 0.000
#> SRR1663254 1 0.1285 0.694 0.956 0.004 0.000 0.036 0.004
#> SRR1663255 4 0.7094 0.441 0.048 0.000 0.252 0.520 0.180
#> SRR1663256 4 0.4705 0.649 0.132 0.056 0.040 0.772 0.000
#> SRR1663259 5 0.2017 0.812 0.000 0.080 0.008 0.000 0.912
#> SRR1663258 4 0.2935 0.589 0.004 0.120 0.000 0.860 0.016
#> SRR1663257 5 0.2597 0.796 0.004 0.040 0.060 0.000 0.896
#> SRR1663263 3 0.0609 0.849 0.000 0.000 0.980 0.000 0.020
#> SRR1663260 3 0.0566 0.848 0.000 0.000 0.984 0.012 0.004
#> SRR1663262 2 0.4483 0.544 0.008 0.672 0.000 0.012 0.308
#> SRR1663261 1 0.4451 0.626 0.712 0.000 0.000 0.248 0.040
#> SRR1663265 5 0.5781 0.580 0.168 0.180 0.000 0.008 0.644
#> SRR1663266 5 0.0960 0.827 0.004 0.016 0.008 0.000 0.972
#> SRR1663267 1 0.3237 0.717 0.864 0.012 0.000 0.076 0.048
#> SRR1663264 4 0.4703 0.616 0.024 0.032 0.212 0.732 0.000
#> SRR1663268 3 0.0404 0.849 0.000 0.000 0.988 0.012 0.000
#> SRR1663269 3 0.0162 0.850 0.000 0.000 0.996 0.004 0.000
#> SRR1663271 2 0.0955 0.751 0.000 0.968 0.000 0.004 0.028
#> SRR1663270 3 0.2966 0.743 0.000 0.000 0.816 0.000 0.184
#> SRR1663273 3 0.0162 0.850 0.000 0.000 0.996 0.004 0.000
#> SRR1663272 3 0.0162 0.850 0.000 0.000 0.996 0.004 0.000
#> SRR1663275 2 0.0898 0.751 0.000 0.972 0.000 0.008 0.020
#> SRR1663274 4 0.6658 0.119 0.328 0.208 0.000 0.460 0.004
#> SRR1663276 1 0.3203 0.637 0.848 0.124 0.000 0.020 0.008
#> SRR1663277 1 0.3203 0.637 0.848 0.124 0.000 0.020 0.008
#> SRR1663279 5 0.3752 0.558 0.000 0.292 0.000 0.000 0.708
#> SRR1663278 5 0.1731 0.825 0.004 0.060 0.004 0.000 0.932
#> SRR1663280 5 0.1484 0.827 0.000 0.048 0.008 0.000 0.944
#> SRR1663281 3 0.4996 0.309 0.016 0.004 0.544 0.004 0.432
#> SRR1663282 3 0.4996 0.309 0.016 0.004 0.544 0.004 0.432
#> SRR1663283 1 0.3742 0.642 0.828 0.004 0.004 0.056 0.108
#> SRR1663284 1 0.3742 0.642 0.828 0.004 0.004 0.056 0.108
#> SRR1663286 2 0.0324 0.748 0.000 0.992 0.000 0.004 0.004
#> SRR1663287 2 0.6469 0.473 0.004 0.512 0.000 0.192 0.292
#> SRR1663288 2 0.6484 0.491 0.000 0.536 0.008 0.200 0.256
#> SRR1663291 1 0.4038 0.618 0.816 0.004 0.016 0.048 0.116
#> SRR1663289 2 0.1310 0.748 0.000 0.956 0.000 0.020 0.024
#> SRR1663290 2 0.1310 0.748 0.000 0.956 0.000 0.020 0.024
#> SRR1663285 3 0.0703 0.848 0.000 0.000 0.976 0.000 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.4234 0.6601 0.000 0.712 0.000 0.008 0.044 0.236
#> SRR1663210 2 0.4234 0.6601 0.000 0.712 0.000 0.008 0.044 0.236
#> SRR1663213 3 0.0405 0.9118 0.000 0.000 0.988 0.000 0.008 0.004
#> SRR1663211 3 0.3163 0.6734 0.000 0.000 0.764 0.000 0.232 0.004
#> SRR1663212 3 0.3163 0.6734 0.000 0.000 0.764 0.000 0.232 0.004
#> SRR1663214 3 0.0405 0.9118 0.000 0.000 0.988 0.000 0.008 0.004
#> SRR1663215 3 0.0405 0.9118 0.000 0.000 0.988 0.000 0.008 0.004
#> SRR1663216 2 0.5338 0.5915 0.000 0.640 0.044 0.012 0.040 0.264
#> SRR1663217 6 0.6940 0.3235 0.072 0.120 0.336 0.004 0.012 0.456
#> SRR1663218 6 0.6940 0.3235 0.072 0.120 0.336 0.004 0.012 0.456
#> SRR1663219 1 0.0000 0.6953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.6953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663221 4 0.6444 0.2081 0.000 0.320 0.000 0.492 0.112 0.076
#> SRR1663222 4 0.5918 0.1998 0.020 0.100 0.008 0.504 0.000 0.368
#> SRR1663224 5 0.2918 0.6989 0.000 0.000 0.088 0.004 0.856 0.052
#> SRR1663225 4 0.6709 0.2135 0.000 0.268 0.000 0.492 0.088 0.152
#> SRR1663226 4 0.6709 0.2135 0.000 0.268 0.000 0.492 0.088 0.152
#> SRR1663223 5 0.5708 0.5811 0.188 0.096 0.000 0.020 0.656 0.040
#> SRR1663229 4 0.6404 0.1990 0.000 0.332 0.000 0.488 0.104 0.076
#> SRR1663231 4 0.5890 0.2107 0.052 0.052 0.008 0.516 0.000 0.372
#> SRR1663232 4 0.5890 0.2107 0.052 0.052 0.008 0.516 0.000 0.372
#> SRR1663227 4 0.1562 0.3340 0.024 0.004 0.000 0.940 0.000 0.032
#> SRR1663228 4 0.1562 0.3340 0.024 0.004 0.000 0.940 0.000 0.032
#> SRR1663230 2 0.0291 0.7746 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1663235 2 0.5008 0.4133 0.000 0.500 0.012 0.008 0.028 0.452
#> SRR1663233 2 0.0146 0.7756 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1663236 4 0.6067 0.0955 0.148 0.000 0.012 0.420 0.004 0.416
#> SRR1663237 2 0.0260 0.7740 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1663238 3 0.0363 0.9077 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1663234 1 0.2027 0.6879 0.920 0.016 0.000 0.032 0.000 0.032
#> SRR1663240 3 0.3315 0.6279 0.000 0.000 0.804 0.156 0.000 0.040
#> SRR1663239 3 0.0363 0.9123 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR1663241 4 0.5628 0.1660 0.092 0.000 0.012 0.500 0.004 0.392
#> SRR1663242 5 0.0951 0.7574 0.020 0.008 0.000 0.000 0.968 0.004
#> SRR1663243 5 0.3438 0.6725 0.184 0.008 0.000 0.000 0.788 0.020
#> SRR1663244 1 0.4853 0.5996 0.744 0.016 0.000 0.116 0.036 0.088
#> SRR1663246 3 0.0000 0.9113 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663245 5 0.2990 0.7168 0.124 0.000 0.004 0.004 0.844 0.024
#> SRR1663247 1 0.5297 0.5548 0.684 0.000 0.000 0.112 0.056 0.148
#> SRR1663248 2 0.4617 0.4329 0.008 0.524 0.000 0.000 0.024 0.444
#> SRR1663250 6 0.7221 0.0961 0.008 0.000 0.232 0.328 0.068 0.364
#> SRR1663249 1 0.5126 0.5305 0.668 0.000 0.000 0.164 0.016 0.152
#> SRR1663251 1 0.4733 0.5557 0.708 0.000 0.000 0.144 0.012 0.136
#> SRR1663252 4 0.4258 0.3513 0.000 0.204 0.000 0.724 0.004 0.068
#> SRR1663253 4 0.6603 -0.0152 0.000 0.052 0.200 0.476 0.000 0.272
#> SRR1663254 1 0.3878 0.6000 0.688 0.000 0.000 0.008 0.008 0.296
#> SRR1663255 6 0.7040 0.0116 0.000 0.000 0.124 0.360 0.132 0.384
#> SRR1663256 4 0.5732 0.1789 0.020 0.044 0.020 0.504 0.004 0.408
#> SRR1663259 5 0.1401 0.7513 0.000 0.020 0.004 0.000 0.948 0.028
#> SRR1663258 4 0.1296 0.3441 0.004 0.044 0.000 0.948 0.000 0.004
#> SRR1663257 5 0.1625 0.7385 0.000 0.000 0.012 0.000 0.928 0.060
#> SRR1663263 3 0.0603 0.9103 0.000 0.000 0.980 0.000 0.016 0.004
#> SRR1663260 3 0.0777 0.9003 0.000 0.000 0.972 0.004 0.000 0.024
#> SRR1663262 2 0.5935 0.5052 0.148 0.644 0.000 0.024 0.144 0.040
#> SRR1663261 1 0.1297 0.6921 0.948 0.000 0.000 0.040 0.000 0.012
#> SRR1663265 5 0.5677 0.2712 0.412 0.048 0.000 0.008 0.496 0.036
#> SRR1663266 5 0.0696 0.7570 0.004 0.008 0.004 0.000 0.980 0.004
#> SRR1663267 1 0.0000 0.6953 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663264 4 0.5932 0.1457 0.000 0.052 0.076 0.504 0.000 0.368
#> SRR1663268 3 0.0820 0.9014 0.000 0.000 0.972 0.016 0.000 0.012
#> SRR1663269 3 0.0260 0.9095 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1663271 2 0.0146 0.7756 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1663270 3 0.3164 0.7521 0.000 0.000 0.824 0.004 0.140 0.032
#> SRR1663273 3 0.0000 0.9113 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663272 3 0.0363 0.9077 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1663275 2 0.0146 0.7756 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1663274 2 0.7343 -0.0580 0.164 0.404 0.000 0.260 0.000 0.172
#> SRR1663276 1 0.5590 0.4105 0.532 0.144 0.000 0.000 0.004 0.320
#> SRR1663277 1 0.5590 0.4105 0.532 0.144 0.000 0.000 0.004 0.320
#> SRR1663279 5 0.4731 0.5642 0.000 0.160 0.004 0.004 0.704 0.128
#> SRR1663278 5 0.0603 0.7582 0.004 0.016 0.000 0.000 0.980 0.000
#> SRR1663280 5 0.0508 0.7579 0.000 0.012 0.004 0.000 0.984 0.000
#> SRR1663281 5 0.5491 0.2516 0.000 0.000 0.372 0.004 0.508 0.116
#> SRR1663282 5 0.5491 0.2516 0.000 0.000 0.372 0.004 0.508 0.116
#> SRR1663283 1 0.4799 0.5659 0.652 0.000 0.000 0.008 0.072 0.268
#> SRR1663284 1 0.4799 0.5659 0.652 0.000 0.000 0.008 0.072 0.268
#> SRR1663286 2 0.0405 0.7745 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR1663287 4 0.6934 0.1667 0.016 0.336 0.000 0.448 0.132 0.068
#> SRR1663288 4 0.6709 0.2135 0.000 0.268 0.000 0.492 0.088 0.152
#> SRR1663291 1 0.5604 0.4586 0.536 0.000 0.008 0.008 0.096 0.352
#> SRR1663289 2 0.0291 0.7746 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1663290 2 0.0291 0.7746 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1663285 3 0.0692 0.9089 0.000 0.000 0.976 0.000 0.020 0.004
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 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.549 0.852 0.919 0.4524 0.556 0.556
#> 3 3 0.504 0.771 0.890 0.1088 0.973 0.951
#> 4 4 0.585 0.733 0.887 0.2151 0.857 0.734
#> 5 5 0.584 0.596 0.823 0.1003 0.959 0.899
#> 6 6 0.649 0.647 0.818 0.0976 0.935 0.827
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
#> SRR1663209 2 0.0000 0.9167 0.000 1.000
#> SRR1663210 2 0.0000 0.9167 0.000 1.000
#> SRR1663213 2 0.0000 0.9167 0.000 1.000
#> SRR1663211 2 0.0000 0.9167 0.000 1.000
#> SRR1663212 2 0.0000 0.9167 0.000 1.000
#> SRR1663214 2 0.0000 0.9167 0.000 1.000
#> SRR1663215 2 0.0000 0.9167 0.000 1.000
#> SRR1663216 2 0.0000 0.9167 0.000 1.000
#> SRR1663217 2 0.0000 0.9167 0.000 1.000
#> SRR1663218 2 0.0000 0.9167 0.000 1.000
#> SRR1663219 1 0.0000 0.8793 1.000 0.000
#> SRR1663220 1 0.0000 0.8793 1.000 0.000
#> SRR1663221 2 0.8386 0.6930 0.268 0.732
#> SRR1663222 1 0.0672 0.8829 0.992 0.008
#> SRR1663224 2 0.0000 0.9167 0.000 1.000
#> SRR1663225 2 0.0376 0.9156 0.004 0.996
#> SRR1663226 2 0.0376 0.9156 0.004 0.996
#> SRR1663223 2 0.7219 0.7900 0.200 0.800
#> SRR1663229 2 0.7219 0.7900 0.200 0.800
#> SRR1663231 1 0.0672 0.8829 0.992 0.008
#> SRR1663232 1 0.0672 0.8829 0.992 0.008
#> SRR1663227 1 0.1843 0.8868 0.972 0.028
#> SRR1663228 1 0.1843 0.8868 0.972 0.028
#> SRR1663230 2 0.7219 0.7900 0.200 0.800
#> SRR1663235 2 0.0000 0.9167 0.000 1.000
#> SRR1663233 2 0.7219 0.7900 0.200 0.800
#> SRR1663236 1 0.7376 0.8509 0.792 0.208
#> SRR1663237 2 0.7219 0.7900 0.200 0.800
#> SRR1663238 1 0.7376 0.8509 0.792 0.208
#> SRR1663234 1 0.2423 0.8689 0.960 0.040
#> SRR1663240 1 0.7950 0.8210 0.760 0.240
#> SRR1663239 2 0.0000 0.9167 0.000 1.000
#> SRR1663241 1 0.7376 0.8509 0.792 0.208
#> SRR1663242 2 0.0376 0.9156 0.004 0.996
#> SRR1663243 2 0.0000 0.9167 0.000 1.000
#> SRR1663244 1 0.0672 0.8829 0.992 0.008
#> SRR1663246 2 0.0000 0.9167 0.000 1.000
#> SRR1663245 2 0.0000 0.9167 0.000 1.000
#> SRR1663247 1 0.2778 0.8855 0.952 0.048
#> SRR1663248 2 0.0376 0.9156 0.004 0.996
#> SRR1663250 1 0.7376 0.8509 0.792 0.208
#> SRR1663249 1 0.7376 0.8509 0.792 0.208
#> SRR1663251 1 0.0672 0.8829 0.992 0.008
#> SRR1663252 2 0.0376 0.9156 0.004 0.996
#> SRR1663253 2 0.0000 0.9167 0.000 1.000
#> SRR1663254 1 0.7376 0.8509 0.792 0.208
#> SRR1663255 2 0.3274 0.8660 0.060 0.940
#> SRR1663256 2 1.0000 -0.2708 0.500 0.500
#> SRR1663259 2 0.0000 0.9167 0.000 1.000
#> SRR1663258 1 0.0672 0.8829 0.992 0.008
#> SRR1663257 2 0.0000 0.9167 0.000 1.000
#> SRR1663263 2 0.0000 0.9167 0.000 1.000
#> SRR1663260 2 0.0000 0.9167 0.000 1.000
#> SRR1663262 2 0.7219 0.7900 0.200 0.800
#> SRR1663261 1 0.2043 0.8869 0.968 0.032
#> SRR1663265 2 0.0000 0.9167 0.000 1.000
#> SRR1663266 2 0.0000 0.9167 0.000 1.000
#> SRR1663267 1 0.0000 0.8793 1.000 0.000
#> SRR1663264 2 0.9833 0.0426 0.424 0.576
#> SRR1663268 2 0.0000 0.9167 0.000 1.000
#> SRR1663269 1 0.7950 0.8211 0.760 0.240
#> SRR1663271 2 0.7219 0.7900 0.200 0.800
#> SRR1663270 2 0.0000 0.9167 0.000 1.000
#> SRR1663273 2 0.0000 0.9167 0.000 1.000
#> SRR1663272 1 0.7376 0.8509 0.792 0.208
#> SRR1663275 2 0.7219 0.7900 0.200 0.800
#> SRR1663274 1 0.0672 0.8829 0.992 0.008
#> SRR1663276 2 0.4690 0.8623 0.100 0.900
#> SRR1663277 2 0.5519 0.8419 0.128 0.872
#> SRR1663279 2 0.0000 0.9167 0.000 1.000
#> SRR1663278 2 0.0000 0.9167 0.000 1.000
#> SRR1663280 2 0.0376 0.9156 0.004 0.996
#> SRR1663281 2 0.0000 0.9167 0.000 1.000
#> SRR1663282 2 0.0000 0.9167 0.000 1.000
#> SRR1663283 1 0.7376 0.8468 0.792 0.208
#> SRR1663284 1 0.7219 0.8503 0.800 0.200
#> SRR1663286 2 0.7219 0.7900 0.200 0.800
#> SRR1663287 2 0.7219 0.7900 0.200 0.800
#> SRR1663288 2 0.0376 0.9156 0.004 0.996
#> SRR1663291 1 0.7376 0.8509 0.792 0.208
#> SRR1663289 2 0.7219 0.7900 0.200 0.800
#> SRR1663290 2 0.7219 0.7900 0.200 0.800
#> SRR1663285 2 0.0000 0.9167 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663213 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663211 2 0.4235 0.808 0.000 0.824 0.176
#> SRR1663212 2 0.4235 0.808 0.000 0.824 0.176
#> SRR1663214 2 0.4235 0.808 0.000 0.824 0.176
#> SRR1663215 2 0.4235 0.808 0.000 0.824 0.176
#> SRR1663216 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663217 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663218 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663219 3 0.4235 0.776 0.176 0.000 0.824
#> SRR1663220 3 0.4235 0.776 0.176 0.000 0.824
#> SRR1663221 2 0.5291 0.692 0.268 0.732 0.000
#> SRR1663222 1 0.0000 0.767 1.000 0.000 0.000
#> SRR1663224 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663225 2 0.0237 0.886 0.004 0.996 0.000
#> SRR1663226 2 0.0237 0.886 0.004 0.996 0.000
#> SRR1663223 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663229 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663231 1 0.0000 0.767 1.000 0.000 0.000
#> SRR1663232 1 0.0000 0.767 1.000 0.000 0.000
#> SRR1663227 1 0.0892 0.776 0.980 0.020 0.000
#> SRR1663228 1 0.0892 0.776 0.980 0.020 0.000
#> SRR1663230 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663235 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663233 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663236 1 0.4555 0.722 0.800 0.200 0.000
#> SRR1663237 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663238 1 0.5223 0.666 0.800 0.024 0.176
#> SRR1663234 1 0.0000 0.767 1.000 0.000 0.000
#> SRR1663240 1 0.4654 0.712 0.792 0.208 0.000
#> SRR1663239 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663241 1 0.4555 0.722 0.800 0.200 0.000
#> SRR1663242 2 0.0237 0.886 0.004 0.996 0.000
#> SRR1663243 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663244 1 0.0000 0.767 1.000 0.000 0.000
#> SRR1663246 2 0.4235 0.808 0.000 0.824 0.176
#> SRR1663245 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663247 1 0.1529 0.776 0.960 0.040 0.000
#> SRR1663248 2 0.0237 0.886 0.004 0.996 0.000
#> SRR1663250 1 0.4555 0.722 0.800 0.200 0.000
#> SRR1663249 1 0.4605 0.717 0.796 0.204 0.000
#> SRR1663251 1 0.1031 0.762 0.976 0.000 0.024
#> SRR1663252 2 0.0237 0.886 0.004 0.996 0.000
#> SRR1663253 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663254 1 0.4555 0.722 0.800 0.200 0.000
#> SRR1663255 2 0.2066 0.840 0.060 0.940 0.000
#> SRR1663256 2 0.6305 -0.213 0.484 0.516 0.000
#> SRR1663259 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663258 1 0.0000 0.767 1.000 0.000 0.000
#> SRR1663257 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663263 2 0.4235 0.808 0.000 0.824 0.176
#> SRR1663260 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663262 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663261 1 0.1774 0.771 0.960 0.016 0.024
#> SRR1663265 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663266 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663267 3 0.4235 0.776 0.176 0.000 0.824
#> SRR1663264 2 0.6095 0.162 0.392 0.608 0.000
#> SRR1663268 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663269 1 0.4555 0.722 0.800 0.200 0.000
#> SRR1663271 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663270 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663273 2 0.4235 0.808 0.000 0.824 0.176
#> SRR1663272 1 0.5223 0.666 0.800 0.024 0.176
#> SRR1663275 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663274 1 0.0000 0.767 1.000 0.000 0.000
#> SRR1663276 2 0.2959 0.853 0.100 0.900 0.000
#> SRR1663277 2 0.3482 0.837 0.128 0.872 0.000
#> SRR1663279 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663278 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663280 2 0.0237 0.886 0.004 0.996 0.000
#> SRR1663281 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663282 2 0.0000 0.886 0.000 1.000 0.000
#> SRR1663283 1 0.9602 -0.134 0.400 0.200 0.400
#> SRR1663284 3 0.9602 -0.172 0.400 0.200 0.400
#> SRR1663286 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663287 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663288 2 0.0237 0.886 0.004 0.996 0.000
#> SRR1663291 1 0.4555 0.722 0.800 0.200 0.000
#> SRR1663289 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663290 2 0.4555 0.790 0.200 0.800 0.000
#> SRR1663285 2 0.4235 0.808 0.000 0.824 0.176
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663210 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663213 2 0.1022 0.8613 0.0 0.968 0.032 0.000
#> SRR1663211 3 0.4277 0.4679 0.0 0.280 0.720 0.000
#> SRR1663212 3 0.3942 0.5393 0.0 0.236 0.764 0.000
#> SRR1663214 3 0.0000 0.8596 0.0 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.8596 0.0 0.000 1.000 0.000
#> SRR1663216 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663217 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663218 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663219 1 0.0000 0.7299 1.0 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.7299 1.0 0.000 0.000 0.000
#> SRR1663221 2 0.4164 0.7030 0.0 0.736 0.000 0.264
#> SRR1663222 4 0.0000 0.7348 0.0 0.000 0.000 1.000
#> SRR1663224 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663225 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663226 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663223 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663229 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663231 4 0.0000 0.7348 0.0 0.000 0.000 1.000
#> SRR1663232 4 0.0000 0.7348 0.0 0.000 0.000 1.000
#> SRR1663227 4 0.0707 0.7411 0.0 0.020 0.000 0.980
#> SRR1663228 4 0.0707 0.7411 0.0 0.020 0.000 0.980
#> SRR1663230 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663235 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663233 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663236 4 0.6886 0.5045 0.0 0.200 0.204 0.596
#> SRR1663237 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663238 3 0.2814 0.6918 0.0 0.000 0.868 0.132
#> SRR1663234 4 0.0000 0.7348 0.0 0.000 0.000 1.000
#> SRR1663240 4 0.7506 0.3699 0.0 0.208 0.308 0.484
#> SRR1663239 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663241 4 0.3610 0.6725 0.0 0.200 0.000 0.800
#> SRR1663242 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663243 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663244 4 0.0000 0.7348 0.0 0.000 0.000 1.000
#> SRR1663246 3 0.0000 0.8596 0.0 0.000 1.000 0.000
#> SRR1663245 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663247 4 0.1302 0.7391 0.0 0.044 0.000 0.956
#> SRR1663248 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663250 4 0.3610 0.6725 0.0 0.200 0.000 0.800
#> SRR1663249 4 0.3649 0.6692 0.0 0.204 0.000 0.796
#> SRR1663251 4 0.3610 0.6170 0.2 0.000 0.000 0.800
#> SRR1663252 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663253 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663254 4 0.3610 0.6725 0.0 0.200 0.000 0.800
#> SRR1663255 2 0.1637 0.8364 0.0 0.940 0.000 0.060
#> SRR1663256 2 0.4996 -0.1933 0.0 0.516 0.000 0.484
#> SRR1663259 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663258 4 0.0000 0.7348 0.0 0.000 0.000 1.000
#> SRR1663257 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663263 3 0.0000 0.8596 0.0 0.000 1.000 0.000
#> SRR1663260 2 0.4454 0.5013 0.0 0.692 0.308 0.000
#> SRR1663262 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663261 4 0.3610 0.6170 0.2 0.000 0.000 0.800
#> SRR1663265 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663266 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663267 1 0.0000 0.7299 1.0 0.000 0.000 0.000
#> SRR1663264 2 0.4830 0.1574 0.0 0.608 0.000 0.392
#> SRR1663268 2 0.4103 0.5977 0.0 0.744 0.256 0.000
#> SRR1663269 4 0.7456 0.3796 0.0 0.200 0.308 0.492
#> SRR1663271 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663270 2 0.3610 0.6836 0.0 0.800 0.200 0.000
#> SRR1663273 3 0.0000 0.8596 0.0 0.000 1.000 0.000
#> SRR1663272 3 0.0000 0.8596 0.0 0.000 1.000 0.000
#> SRR1663275 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663274 4 0.0000 0.7348 0.0 0.000 0.000 1.000
#> SRR1663276 2 0.2345 0.8407 0.0 0.900 0.000 0.100
#> SRR1663277 2 0.2760 0.8242 0.0 0.872 0.000 0.128
#> SRR1663279 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663278 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663280 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663281 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663282 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663283 1 0.7610 -0.2640 0.4 0.200 0.000 0.400
#> SRR1663284 4 0.7610 -0.0294 0.4 0.200 0.000 0.400
#> SRR1663286 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663287 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663288 2 0.0000 0.8791 0.0 1.000 0.000 0.000
#> SRR1663291 4 0.3610 0.6725 0.0 0.200 0.000 0.800
#> SRR1663289 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663290 2 0.3610 0.7820 0.0 0.800 0.000 0.200
#> SRR1663285 3 0.0000 0.8596 0.0 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
#> SRR1663209 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663213 2 0.0880 0.72836 0.00 0.968 0.032 0.000 0.000
#> SRR1663211 3 0.4548 0.49030 0.00 0.232 0.716 0.000 0.052
#> SRR1663212 3 0.4238 0.55834 0.00 0.192 0.756 0.000 0.052
#> SRR1663214 3 0.0000 0.86609 0.00 0.000 1.000 0.000 0.000
#> SRR1663215 3 0.0000 0.86609 0.00 0.000 1.000 0.000 0.000
#> SRR1663216 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663217 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663218 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663219 1 0.0000 1.00000 1.00 0.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 1.00000 1.00 0.000 0.000 0.000 0.000
#> SRR1663221 5 0.5211 -0.07207 0.00 0.432 0.000 0.044 0.524
#> SRR1663222 4 0.0000 0.70812 0.00 0.000 0.000 1.000 0.000
#> SRR1663224 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663225 2 0.4060 0.33838 0.00 0.640 0.000 0.000 0.360
#> SRR1663226 2 0.4045 0.34572 0.00 0.644 0.000 0.000 0.356
#> SRR1663223 2 0.5700 0.48586 0.00 0.628 0.000 0.196 0.176
#> SRR1663229 5 0.4249 -0.12653 0.00 0.432 0.000 0.000 0.568
#> SRR1663231 4 0.0000 0.70812 0.00 0.000 0.000 1.000 0.000
#> SRR1663232 4 0.0000 0.70812 0.00 0.000 0.000 1.000 0.000
#> SRR1663227 4 0.3143 0.73809 0.00 0.000 0.000 0.796 0.204
#> SRR1663228 4 0.3143 0.73809 0.00 0.000 0.000 0.796 0.204
#> SRR1663230 2 0.5567 0.50148 0.00 0.644 0.000 0.196 0.160
#> SRR1663235 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663233 2 0.5567 0.50148 0.00 0.644 0.000 0.196 0.160
#> SRR1663236 4 0.5904 0.56088 0.00 0.000 0.204 0.600 0.196
#> SRR1663237 2 0.5567 0.50148 0.00 0.644 0.000 0.196 0.160
#> SRR1663238 3 0.2424 0.70477 0.00 0.000 0.868 0.132 0.000
#> SRR1663234 4 0.0000 0.70812 0.00 0.000 0.000 1.000 0.000
#> SRR1663240 4 0.6719 0.16739 0.00 0.208 0.308 0.476 0.008
#> SRR1663239 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663241 4 0.3074 0.73891 0.00 0.000 0.000 0.804 0.196
#> SRR1663242 2 0.1908 0.69709 0.00 0.908 0.000 0.000 0.092
#> SRR1663243 2 0.0290 0.73801 0.00 0.992 0.000 0.000 0.008
#> SRR1663244 4 0.0510 0.69699 0.00 0.000 0.000 0.984 0.016
#> SRR1663246 3 0.0000 0.86609 0.00 0.000 1.000 0.000 0.000
#> SRR1663245 2 0.0290 0.73801 0.00 0.992 0.000 0.000 0.008
#> SRR1663247 4 0.3210 0.73562 0.00 0.000 0.000 0.788 0.212
#> SRR1663248 2 0.0609 0.73514 0.00 0.980 0.000 0.000 0.020
#> SRR1663250 4 0.3074 0.54949 0.00 0.196 0.000 0.804 0.000
#> SRR1663249 4 0.3421 0.53353 0.00 0.204 0.000 0.788 0.008
#> SRR1663251 4 0.3109 0.67432 0.20 0.000 0.000 0.800 0.000
#> SRR1663252 2 0.4242 0.18925 0.00 0.572 0.000 0.000 0.428
#> SRR1663253 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663254 4 0.3282 0.73887 0.00 0.008 0.000 0.804 0.188
#> SRR1663255 2 0.1478 0.69499 0.00 0.936 0.000 0.064 0.000
#> SRR1663256 2 0.4304 -0.25111 0.00 0.516 0.000 0.484 0.000
#> SRR1663259 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663258 4 0.3177 0.73746 0.00 0.000 0.000 0.792 0.208
#> SRR1663257 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663263 3 0.0000 0.86609 0.00 0.000 1.000 0.000 0.000
#> SRR1663260 2 0.3837 0.29557 0.00 0.692 0.308 0.000 0.000
#> SRR1663262 2 0.5731 0.48119 0.00 0.624 0.000 0.196 0.180
#> SRR1663261 4 0.3177 0.73746 0.00 0.000 0.000 0.792 0.208
#> SRR1663265 2 0.0290 0.73801 0.00 0.992 0.000 0.000 0.008
#> SRR1663266 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663267 1 0.0000 1.00000 1.00 0.000 0.000 0.000 0.000
#> SRR1663264 2 0.4171 -0.00597 0.00 0.604 0.000 0.396 0.000
#> SRR1663268 2 0.5900 0.15701 0.00 0.600 0.212 0.000 0.188
#> SRR1663269 4 0.6399 0.19559 0.00 0.196 0.308 0.496 0.000
#> SRR1663271 2 0.5567 0.50148 0.00 0.644 0.000 0.196 0.160
#> SRR1663270 2 0.3109 0.50193 0.00 0.800 0.200 0.000 0.000
#> SRR1663273 3 0.0000 0.86609 0.00 0.000 1.000 0.000 0.000
#> SRR1663272 3 0.0000 0.86609 0.00 0.000 1.000 0.000 0.000
#> SRR1663275 2 0.5567 0.50148 0.00 0.644 0.000 0.196 0.160
#> SRR1663274 4 0.2377 0.56335 0.00 0.000 0.000 0.872 0.128
#> SRR1663276 2 0.2824 0.68368 0.00 0.872 0.000 0.096 0.032
#> SRR1663277 2 0.3182 0.66160 0.00 0.844 0.000 0.124 0.032
#> SRR1663279 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663278 2 0.0162 0.73944 0.00 0.996 0.000 0.000 0.004
#> SRR1663280 2 0.0510 0.73786 0.00 0.984 0.000 0.000 0.016
#> SRR1663281 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663282 2 0.0000 0.74059 0.00 1.000 0.000 0.000 0.000
#> SRR1663283 5 0.7555 0.24798 0.06 0.200 0.000 0.308 0.432
#> SRR1663284 5 0.7555 0.24798 0.06 0.200 0.000 0.308 0.432
#> SRR1663286 2 0.5532 0.50487 0.00 0.648 0.000 0.196 0.156
#> SRR1663287 2 0.4846 0.35287 0.00 0.588 0.000 0.028 0.384
#> SRR1663288 2 0.3949 0.37535 0.00 0.668 0.000 0.000 0.332
#> SRR1663291 5 0.6523 0.14344 0.00 0.196 0.000 0.372 0.432
#> SRR1663289 2 0.5567 0.50148 0.00 0.644 0.000 0.196 0.160
#> SRR1663290 2 0.5567 0.50148 0.00 0.644 0.000 0.196 0.160
#> SRR1663285 3 0.0000 0.86609 0.00 0.000 1.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663213 2 0.0790 0.7386 0.000 0.968 0.032 0.000 0.000 0.000
#> SRR1663211 3 0.6294 0.1257 0.184 0.016 0.444 0.000 0.352 0.004
#> SRR1663212 3 0.6313 0.1295 0.184 0.012 0.444 0.000 0.352 0.008
#> SRR1663214 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663215 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663216 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663217 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663218 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663219 1 0.3706 1.0000 0.620 0.000 0.000 0.000 0.000 0.380
#> SRR1663220 1 0.3706 1.0000 0.620 0.000 0.000 0.000 0.000 0.380
#> SRR1663221 5 0.0000 0.7939 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1663222 4 0.0000 0.6601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663224 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663225 5 0.1957 0.8443 0.000 0.112 0.000 0.000 0.888 0.000
#> SRR1663226 5 0.2003 0.8425 0.000 0.116 0.000 0.000 0.884 0.000
#> SRR1663223 2 0.6221 0.5589 0.192 0.560 0.000 0.196 0.052 0.000
#> SRR1663229 5 0.0000 0.7939 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1663231 4 0.0000 0.6601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663232 4 0.0000 0.6601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663227 4 0.2762 0.7102 0.000 0.000 0.000 0.804 0.196 0.000
#> SRR1663228 4 0.2762 0.7102 0.000 0.000 0.000 0.804 0.196 0.000
#> SRR1663230 2 0.5491 0.5854 0.196 0.600 0.000 0.196 0.008 0.000
#> SRR1663235 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663233 2 0.5491 0.5854 0.196 0.600 0.000 0.196 0.008 0.000
#> SRR1663236 4 0.5303 0.5068 0.000 0.000 0.204 0.600 0.196 0.000
#> SRR1663237 2 0.5491 0.5854 0.196 0.600 0.000 0.196 0.008 0.000
#> SRR1663238 3 0.2092 0.6800 0.000 0.000 0.876 0.124 0.000 0.000
#> SRR1663234 4 0.0000 0.6601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663240 4 0.5906 -0.0974 0.000 0.208 0.368 0.424 0.000 0.000
#> SRR1663239 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663241 4 0.2762 0.7102 0.000 0.000 0.000 0.804 0.196 0.000
#> SRR1663242 2 0.6198 -0.1003 0.184 0.408 0.000 0.000 0.392 0.016
#> SRR1663243 2 0.1007 0.7305 0.000 0.956 0.000 0.000 0.044 0.000
#> SRR1663244 4 0.2730 0.6171 0.192 0.000 0.000 0.808 0.000 0.000
#> SRR1663246 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663245 2 0.1007 0.7305 0.000 0.956 0.000 0.000 0.044 0.000
#> SRR1663247 4 0.3076 0.6847 0.000 0.000 0.000 0.760 0.240 0.000
#> SRR1663248 2 0.0146 0.7466 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1663250 4 0.2871 0.5073 0.000 0.192 0.000 0.804 0.000 0.004
#> SRR1663249 4 0.3883 0.4644 0.000 0.200 0.000 0.752 0.044 0.004
#> SRR1663251 4 0.3104 0.6274 0.016 0.000 0.000 0.800 0.000 0.184
#> SRR1663252 5 0.1007 0.8174 0.000 0.044 0.000 0.000 0.956 0.000
#> SRR1663253 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663254 4 0.3056 0.7092 0.000 0.008 0.000 0.804 0.184 0.004
#> SRR1663255 2 0.1923 0.7123 0.004 0.916 0.000 0.064 0.000 0.016
#> SRR1663256 2 0.3866 -0.2146 0.000 0.516 0.000 0.484 0.000 0.000
#> SRR1663259 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663258 4 0.2793 0.7097 0.000 0.000 0.000 0.800 0.200 0.000
#> SRR1663257 2 0.3014 0.6743 0.184 0.804 0.000 0.000 0.000 0.012
#> SRR1663263 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663260 2 0.3672 0.1811 0.000 0.632 0.368 0.000 0.000 0.000
#> SRR1663262 2 0.6396 0.5439 0.196 0.544 0.000 0.196 0.064 0.000
#> SRR1663261 4 0.2793 0.7097 0.000 0.000 0.000 0.800 0.200 0.000
#> SRR1663265 2 0.1007 0.7305 0.000 0.956 0.000 0.000 0.044 0.000
#> SRR1663266 2 0.3104 0.6728 0.184 0.800 0.000 0.000 0.000 0.016
#> SRR1663267 1 0.3706 1.0000 0.620 0.000 0.000 0.000 0.000 0.380
#> SRR1663264 2 0.3747 0.0723 0.000 0.604 0.000 0.396 0.000 0.000
#> SRR1663268 5 0.4085 0.5535 0.000 0.232 0.052 0.000 0.716 0.000
#> SRR1663269 4 0.5856 -0.0769 0.000 0.196 0.368 0.436 0.000 0.000
#> SRR1663271 2 0.5491 0.5854 0.196 0.600 0.000 0.196 0.008 0.000
#> SRR1663270 2 0.3043 0.5306 0.000 0.792 0.200 0.000 0.000 0.008
#> SRR1663273 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663272 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663275 2 0.5491 0.5854 0.196 0.600 0.000 0.196 0.008 0.000
#> SRR1663274 4 0.2762 0.4235 0.196 0.000 0.000 0.804 0.000 0.000
#> SRR1663276 2 0.2163 0.7300 0.000 0.892 0.000 0.096 0.008 0.004
#> SRR1663277 2 0.2488 0.7194 0.000 0.864 0.000 0.124 0.008 0.004
#> SRR1663279 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663278 2 0.3834 0.6556 0.184 0.768 0.000 0.000 0.036 0.012
#> SRR1663280 2 0.3966 0.6508 0.184 0.760 0.000 0.000 0.044 0.012
#> SRR1663281 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663282 2 0.0000 0.7467 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663283 6 0.5228 0.9842 0.000 0.192 0.000 0.196 0.000 0.612
#> SRR1663284 6 0.5228 0.9842 0.000 0.192 0.000 0.196 0.000 0.612
#> SRR1663286 2 0.5387 0.5956 0.180 0.616 0.000 0.196 0.008 0.000
#> SRR1663287 2 0.6042 0.5040 0.196 0.552 0.000 0.028 0.224 0.000
#> SRR1663288 5 0.2135 0.8284 0.000 0.128 0.000 0.000 0.872 0.000
#> SRR1663291 6 0.5280 0.9680 0.004 0.176 0.000 0.200 0.000 0.620
#> SRR1663289 2 0.5491 0.5854 0.196 0.600 0.000 0.196 0.008 0.000
#> SRR1663290 2 0.5491 0.5854 0.196 0.600 0.000 0.196 0.008 0.000
#> SRR1663285 3 0.0000 0.8343 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["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 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.369 0.257 0.698 0.3229 0.533 0.533
#> 3 3 0.210 0.608 0.760 0.7007 0.587 0.379
#> 4 4 0.324 0.300 0.644 0.2582 0.837 0.606
#> 5 5 0.546 0.589 0.741 0.0635 0.768 0.415
#> 6 6 0.582 0.345 0.646 0.0580 0.861 0.555
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
#> SRR1663209 2 0.0000 0.4338 0.000 1.000
#> SRR1663210 2 0.0000 0.4338 0.000 1.000
#> SRR1663213 2 0.9954 0.2587 0.460 0.540
#> SRR1663211 1 0.9993 -0.0404 0.516 0.484
#> SRR1663212 1 0.9993 -0.0404 0.516 0.484
#> SRR1663214 2 0.9983 0.2166 0.476 0.524
#> SRR1663215 2 0.9983 0.2166 0.476 0.524
#> SRR1663216 2 0.0376 0.4346 0.004 0.996
#> SRR1663217 1 0.3879 0.3532 0.924 0.076
#> SRR1663218 1 0.3879 0.3532 0.924 0.076
#> SRR1663219 1 0.0000 0.3761 1.000 0.000
#> SRR1663220 1 0.0000 0.3761 1.000 0.000
#> SRR1663221 2 0.1843 0.4338 0.028 0.972
#> SRR1663222 2 0.9944 0.2663 0.456 0.544
#> SRR1663224 2 1.0000 0.0903 0.496 0.504
#> SRR1663225 2 0.0000 0.4338 0.000 1.000
#> SRR1663226 2 0.0000 0.4338 0.000 1.000
#> SRR1663223 2 0.9710 0.3533 0.400 0.600
#> SRR1663229 2 0.0000 0.4338 0.000 1.000
#> SRR1663231 2 0.9954 0.2587 0.460 0.540
#> SRR1663232 2 0.9954 0.2587 0.460 0.540
#> SRR1663227 2 0.9954 0.2587 0.460 0.540
#> SRR1663228 2 0.9954 0.2587 0.460 0.540
#> SRR1663230 2 0.0000 0.4338 0.000 1.000
#> SRR1663235 2 0.2948 0.4113 0.052 0.948
#> SRR1663233 2 0.0672 0.4347 0.008 0.992
#> SRR1663236 1 0.9993 -0.0404 0.516 0.484
#> SRR1663237 2 0.0000 0.4338 0.000 1.000
#> SRR1663238 1 0.9983 -0.0320 0.524 0.476
#> SRR1663234 1 0.9988 -0.0377 0.520 0.480
#> SRR1663240 2 0.9954 0.2587 0.460 0.540
#> SRR1663239 2 0.9896 0.2892 0.440 0.560
#> SRR1663241 2 0.9954 0.2587 0.460 0.540
#> SRR1663242 2 0.9710 0.3533 0.400 0.600
#> SRR1663243 2 0.9710 0.3533 0.400 0.600
#> SRR1663244 1 0.9993 -0.0404 0.516 0.484
#> SRR1663246 2 0.9970 0.2429 0.468 0.532
#> SRR1663245 2 0.9732 0.3482 0.404 0.596
#> SRR1663247 1 0.9996 -0.0599 0.512 0.488
#> SRR1663248 1 0.9850 0.0717 0.572 0.428
#> SRR1663250 1 0.9993 -0.0404 0.516 0.484
#> SRR1663249 1 0.9993 -0.0404 0.516 0.484
#> SRR1663251 1 0.9993 -0.0404 0.516 0.484
#> SRR1663252 2 0.8555 0.4172 0.280 0.720
#> SRR1663253 2 0.9909 0.2839 0.444 0.556
#> SRR1663254 1 0.3879 0.3590 0.924 0.076
#> SRR1663255 1 0.9993 -0.0404 0.516 0.484
#> SRR1663256 2 0.9944 0.2663 0.456 0.544
#> SRR1663259 2 0.9710 0.3533 0.400 0.600
#> SRR1663258 2 0.9635 0.3626 0.388 0.612
#> SRR1663257 2 0.9775 0.3355 0.412 0.588
#> SRR1663263 1 0.9983 -0.0320 0.524 0.476
#> SRR1663260 1 0.9993 -0.0404 0.516 0.484
#> SRR1663262 2 0.9248 0.4041 0.340 0.660
#> SRR1663261 1 0.9970 -0.0322 0.532 0.468
#> SRR1663265 2 0.9732 0.3482 0.404 0.596
#> SRR1663266 2 0.9963 0.2114 0.464 0.536
#> SRR1663267 1 0.0000 0.3761 1.000 0.000
#> SRR1663264 2 0.9944 0.2663 0.456 0.544
#> SRR1663268 2 0.9970 0.2320 0.468 0.532
#> SRR1663269 2 0.9970 0.2429 0.468 0.532
#> SRR1663271 2 0.0000 0.4338 0.000 1.000
#> SRR1663270 1 0.9983 -0.0320 0.524 0.476
#> SRR1663273 2 0.9970 0.2429 0.468 0.532
#> SRR1663272 2 0.9970 0.2429 0.468 0.532
#> SRR1663275 2 0.0376 0.4346 0.004 0.996
#> SRR1663274 2 0.9896 0.2892 0.440 0.560
#> SRR1663276 1 0.3879 0.3532 0.924 0.076
#> SRR1663277 1 0.3879 0.3532 0.924 0.076
#> SRR1663279 2 0.9286 0.4018 0.344 0.656
#> SRR1663278 2 0.9710 0.3533 0.400 0.600
#> SRR1663280 2 0.9710 0.3533 0.400 0.600
#> SRR1663281 1 0.9993 -0.0404 0.516 0.484
#> SRR1663282 1 0.9993 -0.0404 0.516 0.484
#> SRR1663283 1 0.0000 0.3761 1.000 0.000
#> SRR1663284 1 0.0000 0.3761 1.000 0.000
#> SRR1663286 2 0.0000 0.4338 0.000 1.000
#> SRR1663287 2 0.9248 0.4045 0.340 0.660
#> SRR1663288 2 0.0000 0.4338 0.000 1.000
#> SRR1663291 1 0.2948 0.3688 0.948 0.052
#> SRR1663289 2 0.0000 0.4338 0.000 1.000
#> SRR1663290 2 0.0000 0.4338 0.000 1.000
#> SRR1663285 1 0.9983 -0.0320 0.524 0.476
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.669 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.669 0.000 1.000 0.000
#> SRR1663213 3 0.1585 0.685 0.028 0.008 0.964
#> SRR1663211 3 0.4346 0.480 0.184 0.000 0.816
#> SRR1663212 3 0.4346 0.480 0.184 0.000 0.816
#> SRR1663214 3 0.1015 0.686 0.012 0.008 0.980
#> SRR1663215 3 0.1015 0.686 0.012 0.008 0.980
#> SRR1663216 2 0.3120 0.684 0.012 0.908 0.080
#> SRR1663217 1 0.7263 0.787 0.592 0.036 0.372
#> SRR1663218 1 0.7263 0.787 0.592 0.036 0.372
#> SRR1663219 1 0.5988 0.808 0.632 0.000 0.368
#> SRR1663220 1 0.5988 0.808 0.632 0.000 0.368
#> SRR1663221 2 0.3412 0.677 0.000 0.876 0.124
#> SRR1663222 3 0.8894 0.551 0.192 0.236 0.572
#> SRR1663224 3 0.5945 0.632 0.024 0.236 0.740
#> SRR1663225 2 0.5397 0.510 0.000 0.720 0.280
#> SRR1663226 2 0.4002 0.664 0.000 0.840 0.160
#> SRR1663223 2 0.7268 0.303 0.028 0.524 0.448
#> SRR1663229 2 0.4235 0.594 0.000 0.824 0.176
#> SRR1663231 3 0.8457 0.600 0.168 0.216 0.616
#> SRR1663232 3 0.8675 0.581 0.184 0.220 0.596
#> SRR1663227 3 0.8873 0.558 0.200 0.224 0.576
#> SRR1663228 3 0.8873 0.558 0.200 0.224 0.576
#> SRR1663230 2 0.0000 0.669 0.000 1.000 0.000
#> SRR1663235 2 0.3031 0.681 0.012 0.912 0.076
#> SRR1663233 2 0.0592 0.674 0.000 0.988 0.012
#> SRR1663236 3 0.3112 0.673 0.056 0.028 0.916
#> SRR1663237 2 0.0000 0.669 0.000 1.000 0.000
#> SRR1663238 3 0.1031 0.673 0.024 0.000 0.976
#> SRR1663234 2 0.7487 0.379 0.040 0.552 0.408
#> SRR1663240 3 0.2339 0.678 0.048 0.012 0.940
#> SRR1663239 3 0.5945 0.658 0.024 0.236 0.740
#> SRR1663241 3 0.6410 0.685 0.092 0.144 0.764
#> SRR1663242 2 0.8768 0.289 0.112 0.480 0.408
#> SRR1663243 2 0.7807 0.515 0.068 0.596 0.336
#> SRR1663244 2 0.7286 0.258 0.028 0.508 0.464
#> SRR1663246 3 0.2173 0.677 0.048 0.008 0.944
#> SRR1663245 3 0.6986 0.575 0.056 0.256 0.688
#> SRR1663247 3 0.5921 0.653 0.032 0.212 0.756
#> SRR1663248 1 0.8249 0.250 0.500 0.424 0.076
#> SRR1663250 3 0.1289 0.671 0.032 0.000 0.968
#> SRR1663249 3 0.6348 0.660 0.060 0.188 0.752
#> SRR1663251 3 0.6595 0.659 0.076 0.180 0.744
#> SRR1663252 3 0.6577 0.314 0.008 0.420 0.572
#> SRR1663253 3 0.8643 0.581 0.188 0.212 0.600
#> SRR1663254 1 0.7263 0.799 0.592 0.036 0.372
#> SRR1663255 3 0.3425 0.706 0.004 0.112 0.884
#> SRR1663256 3 0.8650 0.577 0.200 0.200 0.600
#> SRR1663259 2 0.7228 0.491 0.036 0.600 0.364
#> SRR1663258 2 0.8673 0.472 0.160 0.588 0.252
#> SRR1663257 3 0.7872 0.544 0.112 0.236 0.652
#> SRR1663263 3 0.0661 0.679 0.004 0.008 0.988
#> SRR1663260 3 0.3918 0.700 0.004 0.140 0.856
#> SRR1663262 2 0.5285 0.624 0.004 0.752 0.244
#> SRR1663261 2 0.8108 0.353 0.072 0.536 0.392
#> SRR1663265 2 0.7013 0.488 0.028 0.608 0.364
#> SRR1663266 2 0.8676 0.405 0.112 0.520 0.368
#> SRR1663267 1 0.5988 0.808 0.632 0.000 0.368
#> SRR1663264 3 0.8442 0.595 0.192 0.188 0.620
#> SRR1663268 3 0.4840 0.695 0.016 0.168 0.816
#> SRR1663269 3 0.3045 0.675 0.064 0.020 0.916
#> SRR1663271 2 0.0000 0.669 0.000 1.000 0.000
#> SRR1663270 3 0.2384 0.646 0.056 0.008 0.936
#> SRR1663273 3 0.2486 0.675 0.060 0.008 0.932
#> SRR1663272 3 0.2486 0.675 0.060 0.008 0.932
#> SRR1663275 2 0.0983 0.675 0.004 0.980 0.016
#> SRR1663274 2 0.8948 0.459 0.208 0.568 0.224
#> SRR1663276 1 0.6491 0.681 0.732 0.052 0.216
#> SRR1663277 1 0.6491 0.681 0.732 0.052 0.216
#> SRR1663279 2 0.6659 0.564 0.028 0.668 0.304
#> SRR1663278 2 0.8113 0.528 0.092 0.596 0.312
#> SRR1663280 3 0.8496 0.333 0.112 0.324 0.564
#> SRR1663281 3 0.1989 0.700 0.004 0.048 0.948
#> SRR1663282 3 0.1267 0.690 0.004 0.024 0.972
#> SRR1663283 1 0.7030 0.797 0.580 0.024 0.396
#> SRR1663284 1 0.7030 0.797 0.580 0.024 0.396
#> SRR1663286 2 0.0000 0.669 0.000 1.000 0.000
#> SRR1663287 2 0.6500 0.109 0.004 0.532 0.464
#> SRR1663288 2 0.2796 0.685 0.000 0.908 0.092
#> SRR1663291 1 0.6897 0.776 0.548 0.016 0.436
#> SRR1663289 2 0.0237 0.671 0.000 0.996 0.004
#> SRR1663290 2 0.0237 0.671 0.000 0.996 0.004
#> SRR1663285 3 0.0237 0.678 0.004 0.000 0.996
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.69036 0.000 1.000 0.000 0.000
#> SRR1663210 2 0.0000 0.69036 0.000 1.000 0.000 0.000
#> SRR1663213 3 0.5172 -0.26660 0.000 0.008 0.588 0.404
#> SRR1663211 3 0.3907 0.18261 0.000 0.000 0.768 0.232
#> SRR1663212 3 0.3942 0.18204 0.000 0.000 0.764 0.236
#> SRR1663214 3 0.5427 -0.12055 0.000 0.016 0.568 0.416
#> SRR1663215 3 0.5517 -0.11547 0.000 0.020 0.568 0.412
#> SRR1663216 2 0.2216 0.69726 0.000 0.908 0.092 0.000
#> SRR1663217 1 0.8976 0.54791 0.484 0.232 0.136 0.148
#> SRR1663218 1 0.8976 0.54791 0.484 0.232 0.136 0.148
#> SRR1663219 1 0.0188 0.63981 0.996 0.000 0.004 0.000
#> SRR1663220 1 0.0188 0.63981 0.996 0.000 0.004 0.000
#> SRR1663221 2 0.6269 0.45068 0.000 0.632 0.272 0.096
#> SRR1663222 4 0.5428 0.39043 0.000 0.020 0.380 0.600
#> SRR1663224 3 0.5254 0.26348 0.000 0.220 0.724 0.056
#> SRR1663225 2 0.3486 0.65934 0.000 0.812 0.188 0.000
#> SRR1663226 2 0.3123 0.67909 0.000 0.844 0.156 0.000
#> SRR1663223 3 0.6413 -0.18000 0.000 0.416 0.516 0.068
#> SRR1663229 2 0.4568 0.62384 0.000 0.800 0.124 0.076
#> SRR1663231 4 0.5550 0.37673 0.000 0.020 0.428 0.552
#> SRR1663232 4 0.5526 0.38474 0.000 0.020 0.416 0.564
#> SRR1663227 4 0.5601 0.39459 0.020 0.004 0.380 0.596
#> SRR1663228 4 0.5601 0.39459 0.020 0.004 0.380 0.596
#> SRR1663230 2 0.0000 0.69036 0.000 1.000 0.000 0.000
#> SRR1663235 2 0.5856 0.50306 0.132 0.752 0.060 0.056
#> SRR1663233 2 0.0524 0.69345 0.000 0.988 0.008 0.004
#> SRR1663236 4 0.7811 0.13795 0.260 0.000 0.336 0.404
#> SRR1663237 2 0.0000 0.69036 0.000 1.000 0.000 0.000
#> SRR1663238 3 0.7603 -0.18845 0.204 0.000 0.436 0.360
#> SRR1663234 2 0.9073 0.12729 0.236 0.444 0.228 0.092
#> SRR1663240 4 0.4977 0.31385 0.000 0.000 0.460 0.540
#> SRR1663239 3 0.5712 0.02725 0.000 0.384 0.584 0.032
#> SRR1663241 3 0.7397 -0.21194 0.200 0.000 0.508 0.292
#> SRR1663242 3 0.5290 -0.31193 0.000 0.476 0.516 0.008
#> SRR1663243 2 0.4994 0.33739 0.000 0.520 0.480 0.000
#> SRR1663244 3 0.6974 0.16788 0.072 0.092 0.676 0.160
#> SRR1663246 4 0.4981 0.26591 0.000 0.000 0.464 0.536
#> SRR1663245 3 0.4936 -0.06482 0.000 0.372 0.624 0.004
#> SRR1663247 3 0.7518 -0.08838 0.236 0.004 0.524 0.236
#> SRR1663248 1 0.7601 0.36668 0.484 0.388 0.032 0.096
#> SRR1663250 4 0.7714 0.13260 0.224 0.000 0.376 0.400
#> SRR1663249 3 0.7592 -0.12671 0.268 0.000 0.480 0.252
#> SRR1663251 3 0.7679 -0.12563 0.376 0.000 0.408 0.216
#> SRR1663252 2 0.7392 0.15348 0.000 0.460 0.372 0.168
#> SRR1663253 4 0.6337 0.32524 0.000 0.060 0.464 0.476
#> SRR1663254 1 0.6205 0.53662 0.668 0.000 0.196 0.136
#> SRR1663255 3 0.3074 0.08485 0.000 0.000 0.848 0.152
#> SRR1663256 3 0.5696 -0.40180 0.000 0.024 0.492 0.484
#> SRR1663259 2 0.5151 0.36023 0.000 0.532 0.464 0.004
#> SRR1663258 2 0.7369 0.20527 0.000 0.432 0.160 0.408
#> SRR1663257 3 0.5442 0.04512 0.000 0.336 0.636 0.028
#> SRR1663263 3 0.4431 0.16863 0.000 0.000 0.696 0.304
#> SRR1663260 3 0.2760 0.15346 0.000 0.000 0.872 0.128
#> SRR1663262 2 0.3890 0.65866 0.028 0.836 0.132 0.004
#> SRR1663261 2 0.9538 0.00394 0.256 0.376 0.240 0.128
#> SRR1663265 2 0.4898 0.38372 0.000 0.584 0.416 0.000
#> SRR1663266 2 0.5290 0.28797 0.000 0.516 0.476 0.008
#> SRR1663267 1 0.0188 0.63981 0.996 0.000 0.004 0.000
#> SRR1663264 3 0.5273 -0.39748 0.000 0.008 0.536 0.456
#> SRR1663268 3 0.4746 -0.30925 0.000 0.000 0.632 0.368
#> SRR1663269 4 0.4888 0.26885 0.000 0.000 0.412 0.588
#> SRR1663271 2 0.0000 0.69036 0.000 1.000 0.000 0.000
#> SRR1663270 3 0.4406 0.17156 0.000 0.000 0.700 0.300
#> SRR1663273 4 0.5417 0.24658 0.016 0.000 0.412 0.572
#> SRR1663272 4 0.5298 0.31438 0.016 0.000 0.372 0.612
#> SRR1663275 2 0.0524 0.69345 0.000 0.988 0.008 0.004
#> SRR1663274 2 0.7305 0.21910 0.020 0.496 0.092 0.392
#> SRR1663276 1 0.5678 0.45557 0.500 0.004 0.016 0.480
#> SRR1663277 1 0.5805 0.45693 0.500 0.008 0.016 0.476
#> SRR1663279 2 0.3626 0.64049 0.000 0.812 0.184 0.004
#> SRR1663278 2 0.4994 0.33739 0.000 0.520 0.480 0.000
#> SRR1663280 3 0.5496 -0.06621 0.000 0.372 0.604 0.024
#> SRR1663281 3 0.2216 0.21567 0.000 0.000 0.908 0.092
#> SRR1663282 3 0.2345 0.21692 0.000 0.000 0.900 0.100
#> SRR1663283 1 0.4482 0.61963 0.804 0.000 0.128 0.068
#> SRR1663284 1 0.4482 0.61963 0.804 0.000 0.128 0.068
#> SRR1663286 2 0.0000 0.69036 0.000 1.000 0.000 0.000
#> SRR1663287 2 0.5962 0.53104 0.000 0.660 0.260 0.080
#> SRR1663288 2 0.3123 0.67909 0.000 0.844 0.156 0.000
#> SRR1663291 1 0.7043 0.38360 0.504 0.000 0.368 0.128
#> SRR1663289 2 0.1474 0.70001 0.000 0.948 0.052 0.000
#> SRR1663290 2 0.1792 0.69837 0.000 0.932 0.068 0.000
#> SRR1663285 3 0.4431 0.16863 0.000 0.000 0.696 0.304
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0566 0.6683 0.012 0.984 0.000 0.000 0.004
#> SRR1663210 2 0.0693 0.6667 0.012 0.980 0.000 0.000 0.008
#> SRR1663213 3 0.6266 0.7594 0.164 0.000 0.612 0.200 0.024
#> SRR1663211 3 0.1949 0.6271 0.012 0.000 0.932 0.040 0.016
#> SRR1663212 3 0.1949 0.6271 0.012 0.000 0.932 0.040 0.016
#> SRR1663214 3 0.6010 0.7550 0.168 0.000 0.632 0.184 0.016
#> SRR1663215 3 0.6010 0.7550 0.168 0.000 0.632 0.184 0.016
#> SRR1663216 2 0.1251 0.6769 0.008 0.956 0.000 0.036 0.000
#> SRR1663217 5 0.6881 0.5531 0.024 0.180 0.020 0.192 0.584
#> SRR1663218 5 0.6881 0.5531 0.024 0.180 0.020 0.192 0.584
#> SRR1663219 1 0.3562 0.7534 0.788 0.000 0.000 0.196 0.016
#> SRR1663220 1 0.3562 0.7534 0.788 0.000 0.000 0.196 0.016
#> SRR1663221 2 0.2900 0.6784 0.000 0.864 0.028 0.108 0.000
#> SRR1663222 4 0.4464 0.5950 0.008 0.000 0.004 0.632 0.356
#> SRR1663224 2 0.6841 0.5685 0.012 0.496 0.352 0.120 0.020
#> SRR1663225 2 0.2017 0.6865 0.000 0.912 0.008 0.080 0.000
#> SRR1663226 2 0.2017 0.6865 0.000 0.912 0.008 0.080 0.000
#> SRR1663223 2 0.6502 0.6066 0.020 0.528 0.348 0.096 0.008
#> SRR1663229 2 0.1956 0.6862 0.000 0.916 0.008 0.076 0.000
#> SRR1663231 4 0.3790 0.6428 0.000 0.000 0.004 0.724 0.272
#> SRR1663232 4 0.4066 0.6192 0.000 0.000 0.004 0.672 0.324
#> SRR1663227 4 0.4196 0.5953 0.000 0.000 0.004 0.640 0.356
#> SRR1663228 4 0.4196 0.5953 0.000 0.000 0.004 0.640 0.356
#> SRR1663230 2 0.0807 0.6650 0.012 0.976 0.000 0.000 0.012
#> SRR1663235 2 0.4911 -0.4177 0.012 0.504 0.000 0.008 0.476
#> SRR1663233 2 0.0807 0.6650 0.012 0.976 0.000 0.000 0.012
#> SRR1663236 4 0.1270 0.5706 0.000 0.000 0.052 0.948 0.000
#> SRR1663237 2 0.0992 0.6666 0.008 0.968 0.000 0.000 0.024
#> SRR1663238 3 0.4101 0.6986 0.000 0.000 0.628 0.372 0.000
#> SRR1663234 4 0.3634 0.4052 0.012 0.184 0.008 0.796 0.000
#> SRR1663240 3 0.6752 0.6585 0.032 0.000 0.548 0.252 0.168
#> SRR1663239 2 0.5835 0.4362 0.004 0.636 0.100 0.248 0.012
#> SRR1663241 4 0.2518 0.6298 0.008 0.000 0.016 0.896 0.080
#> SRR1663242 2 0.6720 0.5963 0.016 0.508 0.364 0.088 0.024
#> SRR1663243 2 0.6597 0.6016 0.016 0.516 0.364 0.084 0.020
#> SRR1663244 4 0.3521 0.5381 0.008 0.012 0.172 0.808 0.000
#> SRR1663246 3 0.6509 0.7485 0.144 0.000 0.604 0.208 0.044
#> SRR1663245 2 0.6750 0.5988 0.020 0.512 0.356 0.092 0.020
#> SRR1663247 4 0.0671 0.5969 0.004 0.000 0.016 0.980 0.000
#> SRR1663248 5 0.4819 0.4189 0.012 0.404 0.000 0.008 0.576
#> SRR1663250 3 0.4287 0.6151 0.000 0.000 0.540 0.460 0.000
#> SRR1663249 4 0.0566 0.5978 0.012 0.000 0.004 0.984 0.000
#> SRR1663251 4 0.2416 0.5214 0.100 0.000 0.012 0.888 0.000
#> SRR1663252 2 0.4604 0.3300 0.000 0.584 0.008 0.404 0.004
#> SRR1663253 4 0.5750 0.5762 0.000 0.060 0.020 0.588 0.332
#> SRR1663254 4 0.4376 0.3706 0.084 0.008 0.024 0.808 0.076
#> SRR1663255 3 0.4622 0.7442 0.024 0.000 0.700 0.264 0.012
#> SRR1663256 4 0.5936 0.5906 0.008 0.020 0.052 0.576 0.344
#> SRR1663259 2 0.6262 0.6120 0.020 0.552 0.344 0.076 0.008
#> SRR1663258 2 0.6739 0.0628 0.000 0.392 0.000 0.260 0.348
#> SRR1663257 2 0.6022 0.5304 0.016 0.468 0.460 0.044 0.012
#> SRR1663263 3 0.3697 0.7687 0.008 0.000 0.796 0.180 0.016
#> SRR1663260 3 0.5251 0.3677 0.012 0.000 0.504 0.460 0.024
#> SRR1663262 2 0.3616 0.6760 0.000 0.804 0.164 0.032 0.000
#> SRR1663261 4 0.1692 0.6019 0.020 0.008 0.008 0.948 0.016
#> SRR1663265 2 0.6491 0.6057 0.020 0.532 0.344 0.096 0.008
#> SRR1663266 2 0.6517 0.5947 0.016 0.512 0.380 0.068 0.024
#> SRR1663267 1 0.3562 0.7534 0.788 0.000 0.000 0.196 0.016
#> SRR1663264 4 0.6797 0.4209 0.004 0.000 0.236 0.420 0.340
#> SRR1663268 4 0.6988 -0.3474 0.044 0.000 0.392 0.440 0.124
#> SRR1663269 3 0.6980 0.7056 0.084 0.000 0.568 0.224 0.124
#> SRR1663271 2 0.0807 0.6650 0.012 0.976 0.000 0.000 0.012
#> SRR1663270 3 0.2304 0.7026 0.008 0.000 0.892 0.100 0.000
#> SRR1663273 3 0.6535 0.7482 0.144 0.000 0.600 0.212 0.044
#> SRR1663272 3 0.6372 0.6967 0.024 0.000 0.596 0.216 0.164
#> SRR1663275 2 0.0807 0.6650 0.012 0.976 0.000 0.000 0.012
#> SRR1663274 2 0.6314 0.2968 0.000 0.528 0.008 0.140 0.324
#> SRR1663276 5 0.2270 0.4948 0.016 0.000 0.004 0.072 0.908
#> SRR1663277 5 0.2270 0.4948 0.016 0.000 0.004 0.072 0.908
#> SRR1663279 2 0.4295 0.6759 0.004 0.776 0.164 0.052 0.004
#> SRR1663278 2 0.6597 0.6016 0.016 0.516 0.364 0.084 0.020
#> SRR1663280 2 0.6630 0.6005 0.016 0.516 0.364 0.080 0.024
#> SRR1663281 3 0.4654 0.7587 0.024 0.000 0.732 0.216 0.028
#> SRR1663282 3 0.4654 0.7592 0.024 0.000 0.732 0.216 0.028
#> SRR1663283 1 0.6304 0.5789 0.464 0.000 0.012 0.416 0.108
#> SRR1663284 1 0.6211 0.5811 0.464 0.000 0.008 0.420 0.108
#> SRR1663286 2 0.0693 0.6666 0.008 0.980 0.000 0.000 0.012
#> SRR1663287 2 0.4247 0.6800 0.000 0.776 0.132 0.092 0.000
#> SRR1663288 2 0.2017 0.6865 0.000 0.912 0.008 0.080 0.000
#> SRR1663291 3 0.7223 0.5427 0.076 0.000 0.500 0.300 0.124
#> SRR1663289 2 0.1498 0.6740 0.008 0.952 0.000 0.016 0.024
#> SRR1663290 2 0.1690 0.6767 0.008 0.944 0.000 0.024 0.024
#> SRR1663285 3 0.3660 0.7676 0.008 0.000 0.800 0.176 0.016
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.4310 -0.4515 0.000 0.540 0.000 0.000 0.440 0.020
#> SRR1663210 2 0.4310 -0.4515 0.000 0.540 0.000 0.000 0.440 0.020
#> SRR1663213 3 0.4438 0.5949 0.012 0.272 0.684 0.024 0.008 0.000
#> SRR1663211 3 0.7314 0.5115 0.072 0.268 0.416 0.016 0.228 0.000
#> SRR1663212 3 0.7290 0.5191 0.072 0.264 0.424 0.016 0.224 0.000
#> SRR1663214 3 0.0291 0.6307 0.000 0.000 0.992 0.004 0.004 0.000
#> SRR1663215 3 0.0291 0.6307 0.000 0.000 0.992 0.004 0.004 0.000
#> SRR1663216 5 0.3966 0.5080 0.000 0.444 0.004 0.000 0.552 0.000
#> SRR1663217 1 0.5171 0.4434 0.628 0.228 0.140 0.004 0.000 0.000
#> SRR1663218 1 0.5171 0.4434 0.628 0.228 0.140 0.004 0.000 0.000
#> SRR1663219 6 0.0547 1.0000 0.020 0.000 0.000 0.000 0.000 0.980
#> SRR1663220 6 0.0547 1.0000 0.020 0.000 0.000 0.000 0.000 0.980
#> SRR1663221 5 0.5065 0.5146 0.000 0.396 0.004 0.068 0.532 0.000
#> SRR1663222 4 0.1180 0.5707 0.000 0.008 0.004 0.960 0.024 0.004
#> SRR1663224 5 0.4051 0.3187 0.000 0.152 0.056 0.020 0.772 0.000
#> SRR1663225 5 0.3937 0.5290 0.000 0.424 0.000 0.004 0.572 0.000
#> SRR1663226 5 0.3930 0.5293 0.000 0.420 0.000 0.004 0.576 0.000
#> SRR1663223 5 0.1367 0.5761 0.000 0.044 0.000 0.012 0.944 0.000
#> SRR1663229 5 0.4101 0.5354 0.000 0.408 0.000 0.012 0.580 0.000
#> SRR1663231 4 0.1749 0.5860 0.008 0.000 0.036 0.932 0.024 0.000
#> SRR1663232 4 0.1552 0.5813 0.000 0.004 0.036 0.940 0.020 0.000
#> SRR1663227 4 0.0603 0.5751 0.004 0.000 0.000 0.980 0.016 0.000
#> SRR1663228 4 0.0603 0.5751 0.004 0.000 0.000 0.980 0.016 0.000
#> SRR1663230 5 0.3998 0.4472 0.004 0.492 0.000 0.000 0.504 0.000
#> SRR1663235 1 0.4366 0.3566 0.540 0.440 0.004 0.000 0.016 0.000
#> SRR1663233 5 0.3998 0.4472 0.004 0.492 0.000 0.000 0.504 0.000
#> SRR1663236 4 0.7022 0.4476 0.236 0.008 0.112 0.532 0.020 0.092
#> SRR1663237 2 0.3991 -0.4745 0.004 0.524 0.000 0.000 0.472 0.000
#> SRR1663238 3 0.5637 0.5242 0.312 0.136 0.544 0.004 0.000 0.004
#> SRR1663234 5 0.8293 0.0743 0.168 0.020 0.036 0.192 0.408 0.176
#> SRR1663240 2 0.6730 -0.3973 0.016 0.384 0.308 0.280 0.012 0.000
#> SRR1663239 2 0.5413 -0.0683 0.008 0.660 0.168 0.020 0.144 0.000
#> SRR1663241 4 0.5733 0.5365 0.196 0.020 0.080 0.664 0.016 0.024
#> SRR1663242 5 0.0508 0.5645 0.000 0.004 0.000 0.012 0.984 0.000
#> SRR1663243 5 0.0363 0.5651 0.000 0.000 0.000 0.012 0.988 0.000
#> SRR1663244 4 0.6896 0.4206 0.088 0.000 0.036 0.560 0.188 0.128
#> SRR1663246 3 0.2658 0.5799 0.036 0.000 0.864 0.100 0.000 0.000
#> SRR1663245 5 0.0260 0.5648 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1663247 4 0.6441 0.4626 0.192 0.000 0.036 0.576 0.028 0.168
#> SRR1663248 1 0.3782 0.3727 0.588 0.412 0.000 0.000 0.000 0.000
#> SRR1663250 3 0.7897 0.4251 0.264 0.224 0.392 0.060 0.008 0.052
#> SRR1663249 4 0.6130 0.4348 0.112 0.000 0.032 0.580 0.020 0.256
#> SRR1663251 4 0.5282 0.3290 0.024 0.000 0.024 0.568 0.020 0.364
#> SRR1663252 5 0.6199 0.4908 0.008 0.304 0.028 0.136 0.524 0.000
#> SRR1663253 4 0.6142 0.1535 0.000 0.384 0.068 0.472 0.076 0.000
#> SRR1663254 1 0.7854 0.2169 0.476 0.220 0.076 0.064 0.016 0.148
#> SRR1663255 2 0.7632 -0.3982 0.132 0.424 0.296 0.048 0.100 0.000
#> SRR1663256 4 0.6237 0.1462 0.000 0.372 0.088 0.480 0.056 0.004
#> SRR1663259 5 0.2006 0.5787 0.000 0.104 0.000 0.004 0.892 0.000
#> SRR1663258 5 0.4308 0.3011 0.000 0.012 0.004 0.468 0.516 0.000
#> SRR1663257 5 0.2263 0.5185 0.000 0.036 0.060 0.004 0.900 0.000
#> SRR1663263 3 0.4234 0.6269 0.108 0.012 0.768 0.004 0.108 0.000
#> SRR1663260 2 0.8096 -0.3847 0.116 0.388 0.280 0.088 0.128 0.000
#> SRR1663262 5 0.3782 0.5607 0.000 0.360 0.000 0.004 0.636 0.000
#> SRR1663261 4 0.6728 0.4623 0.204 0.008 0.032 0.564 0.036 0.156
#> SRR1663265 5 0.1196 0.5773 0.000 0.040 0.000 0.008 0.952 0.000
#> SRR1663266 5 0.1173 0.5493 0.000 0.016 0.008 0.016 0.960 0.000
#> SRR1663267 6 0.0547 1.0000 0.020 0.000 0.000 0.000 0.000 0.980
#> SRR1663264 4 0.6170 0.0190 0.000 0.396 0.132 0.440 0.032 0.000
#> SRR1663268 2 0.7189 -0.3886 0.044 0.396 0.340 0.192 0.028 0.000
#> SRR1663269 3 0.6305 0.5089 0.016 0.244 0.540 0.184 0.012 0.004
#> SRR1663271 2 0.3860 -0.4744 0.000 0.528 0.000 0.000 0.472 0.000
#> SRR1663270 3 0.6825 0.5651 0.096 0.244 0.504 0.004 0.152 0.000
#> SRR1663273 3 0.2866 0.5756 0.052 0.004 0.860 0.084 0.000 0.000
#> SRR1663272 3 0.3905 0.5570 0.136 0.008 0.780 0.076 0.000 0.000
#> SRR1663275 2 0.3995 -0.4806 0.004 0.516 0.000 0.000 0.480 0.000
#> SRR1663274 5 0.4939 0.3077 0.008 0.036 0.004 0.444 0.508 0.000
#> SRR1663276 1 0.3872 0.3045 0.604 0.004 0.000 0.392 0.000 0.000
#> SRR1663277 1 0.3872 0.3045 0.604 0.004 0.000 0.392 0.000 0.000
#> SRR1663279 5 0.3881 0.5427 0.000 0.396 0.004 0.000 0.600 0.000
#> SRR1663278 5 0.0458 0.5627 0.000 0.016 0.000 0.000 0.984 0.000
#> SRR1663280 5 0.0260 0.5648 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1663281 2 0.7424 -0.3974 0.116 0.420 0.312 0.024 0.128 0.000
#> SRR1663282 2 0.7378 -0.4038 0.128 0.420 0.320 0.024 0.108 0.000
#> SRR1663283 1 0.5374 0.1653 0.612 0.000 0.076 0.032 0.000 0.280
#> SRR1663284 1 0.5374 0.1653 0.612 0.000 0.076 0.032 0.000 0.280
#> SRR1663286 2 0.3867 -0.4931 0.000 0.512 0.000 0.000 0.488 0.000
#> SRR1663287 5 0.3967 0.5603 0.000 0.356 0.000 0.012 0.632 0.000
#> SRR1663288 5 0.3937 0.5290 0.000 0.424 0.000 0.004 0.572 0.000
#> SRR1663291 1 0.6146 0.1675 0.616 0.224 0.084 0.028 0.004 0.044
#> SRR1663289 5 0.3991 0.4745 0.004 0.472 0.000 0.000 0.524 0.000
#> SRR1663290 5 0.3982 0.4862 0.004 0.460 0.000 0.000 0.536 0.000
#> SRR1663285 3 0.4233 0.6270 0.112 0.012 0.768 0.004 0.104 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "NMF"]
# you can also extract it by
# res = res_list["SD:NMF"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.697 0.813 0.925 0.5020 0.496 0.496
#> 3 3 0.620 0.730 0.877 0.3005 0.787 0.597
#> 4 4 0.545 0.523 0.726 0.1372 0.826 0.551
#> 5 5 0.692 0.625 0.806 0.0811 0.819 0.427
#> 6 6 0.702 0.606 0.788 0.0370 0.898 0.557
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
#> SRR1663209 2 0.0000 0.9210 0.000 1.000
#> SRR1663210 2 0.0000 0.9210 0.000 1.000
#> SRR1663213 1 0.0000 0.9005 1.000 0.000
#> SRR1663211 1 0.0376 0.8993 0.996 0.004
#> SRR1663212 1 0.0376 0.8993 0.996 0.004
#> SRR1663214 1 0.0000 0.9005 1.000 0.000
#> SRR1663215 1 0.0000 0.9005 1.000 0.000
#> SRR1663216 2 0.0000 0.9210 0.000 1.000
#> SRR1663217 1 0.1184 0.8941 0.984 0.016
#> SRR1663218 1 0.1184 0.8941 0.984 0.016
#> SRR1663219 1 0.7453 0.7195 0.788 0.212
#> SRR1663220 1 0.7453 0.7195 0.788 0.212
#> SRR1663221 2 0.0000 0.9210 0.000 1.000
#> SRR1663222 2 0.0000 0.9210 0.000 1.000
#> SRR1663224 2 0.9754 0.3067 0.408 0.592
#> SRR1663225 2 0.0000 0.9210 0.000 1.000
#> SRR1663226 2 0.0000 0.9210 0.000 1.000
#> SRR1663223 2 0.0000 0.9210 0.000 1.000
#> SRR1663229 2 0.0000 0.9210 0.000 1.000
#> SRR1663231 1 0.9732 0.2946 0.596 0.404
#> SRR1663232 1 0.9248 0.4546 0.660 0.340
#> SRR1663227 2 0.0000 0.9210 0.000 1.000
#> SRR1663228 2 0.0672 0.9155 0.008 0.992
#> SRR1663230 2 0.0000 0.9210 0.000 1.000
#> SRR1663235 2 0.0000 0.9210 0.000 1.000
#> SRR1663233 2 0.0000 0.9210 0.000 1.000
#> SRR1663236 1 0.0000 0.9005 1.000 0.000
#> SRR1663237 2 0.0000 0.9210 0.000 1.000
#> SRR1663238 1 0.0000 0.9005 1.000 0.000
#> SRR1663234 2 0.0000 0.9210 0.000 1.000
#> SRR1663240 1 0.0000 0.9005 1.000 0.000
#> SRR1663239 1 0.9970 0.0914 0.532 0.468
#> SRR1663241 1 0.3733 0.8561 0.928 0.072
#> SRR1663242 2 0.0376 0.9183 0.004 0.996
#> SRR1663243 2 0.0000 0.9210 0.000 1.000
#> SRR1663244 2 0.0000 0.9210 0.000 1.000
#> SRR1663246 1 0.0000 0.9005 1.000 0.000
#> SRR1663245 2 0.4298 0.8404 0.088 0.912
#> SRR1663247 2 0.8955 0.4971 0.312 0.688
#> SRR1663248 2 0.0000 0.9210 0.000 1.000
#> SRR1663250 1 0.0000 0.9005 1.000 0.000
#> SRR1663249 1 0.7815 0.6988 0.768 0.232
#> SRR1663251 1 0.7453 0.7195 0.788 0.212
#> SRR1663252 2 0.0000 0.9210 0.000 1.000
#> SRR1663253 2 0.9754 0.3083 0.408 0.592
#> SRR1663254 1 0.7299 0.7291 0.796 0.204
#> SRR1663255 1 0.0672 0.8976 0.992 0.008
#> SRR1663256 1 0.3114 0.8676 0.944 0.056
#> SRR1663259 2 0.1414 0.9061 0.020 0.980
#> SRR1663258 2 0.0000 0.9210 0.000 1.000
#> SRR1663257 1 1.0000 -0.0172 0.504 0.496
#> SRR1663263 1 0.0000 0.9005 1.000 0.000
#> SRR1663260 1 0.0000 0.9005 1.000 0.000
#> SRR1663262 2 0.0000 0.9210 0.000 1.000
#> SRR1663261 2 0.9170 0.4558 0.332 0.668
#> SRR1663265 2 0.0000 0.9210 0.000 1.000
#> SRR1663266 2 0.9850 0.2490 0.428 0.572
#> SRR1663267 1 0.7453 0.7195 0.788 0.212
#> SRR1663264 1 0.3274 0.8644 0.940 0.060
#> SRR1663268 1 0.2043 0.8878 0.968 0.032
#> SRR1663269 1 0.0000 0.9005 1.000 0.000
#> SRR1663271 2 0.0000 0.9210 0.000 1.000
#> SRR1663270 1 0.0000 0.9005 1.000 0.000
#> SRR1663273 1 0.0000 0.9005 1.000 0.000
#> SRR1663272 1 0.0000 0.9005 1.000 0.000
#> SRR1663275 2 0.0000 0.9210 0.000 1.000
#> SRR1663274 2 0.0000 0.9210 0.000 1.000
#> SRR1663276 2 0.9427 0.3872 0.360 0.640
#> SRR1663277 2 0.9087 0.4718 0.324 0.676
#> SRR1663279 2 0.1843 0.8995 0.028 0.972
#> SRR1663278 2 0.0000 0.9210 0.000 1.000
#> SRR1663280 2 0.7528 0.6822 0.216 0.784
#> SRR1663281 1 0.0000 0.9005 1.000 0.000
#> SRR1663282 1 0.0000 0.9005 1.000 0.000
#> SRR1663283 1 0.0000 0.9005 1.000 0.000
#> SRR1663284 1 0.0000 0.9005 1.000 0.000
#> SRR1663286 2 0.0000 0.9210 0.000 1.000
#> SRR1663287 2 0.0000 0.9210 0.000 1.000
#> SRR1663288 2 0.0000 0.9210 0.000 1.000
#> SRR1663291 1 0.0000 0.9005 1.000 0.000
#> SRR1663289 2 0.0000 0.9210 0.000 1.000
#> SRR1663290 2 0.0000 0.9210 0.000 1.000
#> SRR1663285 1 0.0000 0.9005 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0237 0.8711 0.004 0.996 0.000
#> SRR1663210 2 0.0237 0.8711 0.004 0.996 0.000
#> SRR1663213 3 0.0424 0.8686 0.000 0.008 0.992
#> SRR1663211 3 0.1289 0.8599 0.000 0.032 0.968
#> SRR1663212 3 0.1289 0.8599 0.000 0.032 0.968
#> SRR1663214 3 0.0237 0.8690 0.000 0.004 0.996
#> SRR1663215 3 0.0237 0.8690 0.000 0.004 0.996
#> SRR1663216 2 0.0237 0.8711 0.004 0.996 0.000
#> SRR1663217 3 0.5348 0.7169 0.176 0.028 0.796
#> SRR1663218 3 0.5778 0.6779 0.200 0.032 0.768
#> SRR1663219 1 0.1753 0.8017 0.952 0.000 0.048
#> SRR1663220 1 0.1753 0.8017 0.952 0.000 0.048
#> SRR1663221 2 0.1411 0.8586 0.036 0.964 0.000
#> SRR1663222 2 0.3551 0.7864 0.132 0.868 0.000
#> SRR1663224 3 0.6235 0.1813 0.000 0.436 0.564
#> SRR1663225 2 0.0000 0.8708 0.000 1.000 0.000
#> SRR1663226 2 0.0000 0.8708 0.000 1.000 0.000
#> SRR1663223 2 0.2356 0.8400 0.072 0.928 0.000
#> SRR1663229 2 0.0424 0.8704 0.008 0.992 0.000
#> SRR1663231 1 0.9514 0.3171 0.468 0.328 0.204
#> SRR1663232 1 0.9386 0.3922 0.500 0.296 0.204
#> SRR1663227 2 0.6282 0.3078 0.384 0.612 0.004
#> SRR1663228 2 0.6617 0.1338 0.436 0.556 0.008
#> SRR1663230 2 0.0424 0.8711 0.008 0.992 0.000
#> SRR1663235 2 0.0747 0.8671 0.016 0.984 0.000
#> SRR1663233 2 0.0424 0.8711 0.008 0.992 0.000
#> SRR1663236 3 0.6299 -0.0308 0.476 0.000 0.524
#> SRR1663237 2 0.0424 0.8711 0.008 0.992 0.000
#> SRR1663238 3 0.0237 0.8687 0.004 0.000 0.996
#> SRR1663234 1 0.2959 0.7655 0.900 0.100 0.000
#> SRR1663240 3 0.1289 0.8607 0.032 0.000 0.968
#> SRR1663239 3 0.2261 0.8368 0.000 0.068 0.932
#> SRR1663241 1 0.2165 0.7872 0.936 0.000 0.064
#> SRR1663242 2 0.4963 0.7160 0.200 0.792 0.008
#> SRR1663243 2 0.6045 0.4096 0.380 0.620 0.000
#> SRR1663244 1 0.6305 -0.1074 0.516 0.484 0.000
#> SRR1663246 3 0.0237 0.8687 0.004 0.000 0.996
#> SRR1663245 2 0.4931 0.6848 0.232 0.768 0.000
#> SRR1663247 1 0.4291 0.6764 0.820 0.180 0.000
#> SRR1663248 2 0.2448 0.8251 0.076 0.924 0.000
#> SRR1663250 1 0.5431 0.5545 0.716 0.000 0.284
#> SRR1663249 1 0.0848 0.8019 0.984 0.008 0.008
#> SRR1663251 1 0.0747 0.8009 0.984 0.000 0.016
#> SRR1663252 2 0.1964 0.8475 0.056 0.944 0.000
#> SRR1663253 2 0.7809 0.2728 0.056 0.548 0.396
#> SRR1663254 1 0.1529 0.8026 0.960 0.000 0.040
#> SRR1663255 3 0.4399 0.7264 0.188 0.000 0.812
#> SRR1663256 1 0.7329 0.1513 0.544 0.032 0.424
#> SRR1663259 2 0.3551 0.7738 0.000 0.868 0.132
#> SRR1663258 2 0.1964 0.8475 0.056 0.944 0.000
#> SRR1663257 3 0.6313 0.5142 0.016 0.308 0.676
#> SRR1663263 3 0.0237 0.8690 0.000 0.004 0.996
#> SRR1663260 3 0.1411 0.8590 0.036 0.000 0.964
#> SRR1663262 2 0.0000 0.8708 0.000 1.000 0.000
#> SRR1663261 1 0.0475 0.8017 0.992 0.004 0.004
#> SRR1663265 2 0.3686 0.7838 0.140 0.860 0.000
#> SRR1663266 2 0.9299 0.0151 0.160 0.432 0.408
#> SRR1663267 1 0.1753 0.8017 0.952 0.000 0.048
#> SRR1663264 3 0.2200 0.8496 0.056 0.004 0.940
#> SRR1663268 3 0.1753 0.8539 0.048 0.000 0.952
#> SRR1663269 3 0.0000 0.8680 0.000 0.000 1.000
#> SRR1663271 2 0.0237 0.8711 0.004 0.996 0.000
#> SRR1663270 3 0.2261 0.8288 0.068 0.000 0.932
#> SRR1663273 3 0.0000 0.8680 0.000 0.000 1.000
#> SRR1663272 3 0.0237 0.8687 0.004 0.000 0.996
#> SRR1663275 2 0.0237 0.8711 0.004 0.996 0.000
#> SRR1663274 2 0.2711 0.8300 0.088 0.912 0.000
#> SRR1663276 1 0.4749 0.7597 0.844 0.116 0.040
#> SRR1663277 1 0.5028 0.7508 0.828 0.132 0.040
#> SRR1663279 2 0.0237 0.8711 0.004 0.996 0.000
#> SRR1663278 2 0.4555 0.7215 0.200 0.800 0.000
#> SRR1663280 2 0.6318 0.6946 0.172 0.760 0.068
#> SRR1663281 3 0.4291 0.7056 0.180 0.000 0.820
#> SRR1663282 3 0.4555 0.6831 0.200 0.000 0.800
#> SRR1663283 1 0.2066 0.7968 0.940 0.000 0.060
#> SRR1663284 1 0.2066 0.7968 0.940 0.000 0.060
#> SRR1663286 2 0.0237 0.8711 0.004 0.996 0.000
#> SRR1663287 2 0.0747 0.8680 0.016 0.984 0.000
#> SRR1663288 2 0.0000 0.8708 0.000 1.000 0.000
#> SRR1663291 1 0.3816 0.7443 0.852 0.000 0.148
#> SRR1663289 2 0.0424 0.8705 0.008 0.992 0.000
#> SRR1663290 2 0.0424 0.8705 0.008 0.992 0.000
#> SRR1663285 3 0.0237 0.8690 0.000 0.004 0.996
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.4855 0.581 0.000 0.600 0.000 0.400
#> SRR1663210 2 0.4855 0.581 0.000 0.600 0.000 0.400
#> SRR1663213 3 0.0000 0.793 0.000 0.000 1.000 0.000
#> SRR1663211 3 0.4431 0.628 0.000 0.304 0.696 0.000
#> SRR1663212 3 0.4382 0.634 0.000 0.296 0.704 0.000
#> SRR1663214 3 0.0188 0.793 0.000 0.004 0.996 0.000
#> SRR1663215 3 0.0188 0.793 0.000 0.004 0.996 0.000
#> SRR1663216 2 0.4888 0.575 0.000 0.588 0.000 0.412
#> SRR1663217 3 0.8924 0.233 0.276 0.096 0.460 0.168
#> SRR1663218 3 0.8920 0.216 0.288 0.092 0.452 0.168
#> SRR1663219 1 0.0188 0.732 0.996 0.000 0.000 0.004
#> SRR1663220 1 0.0188 0.732 0.996 0.000 0.000 0.004
#> SRR1663221 4 0.4222 0.339 0.000 0.272 0.000 0.728
#> SRR1663222 4 0.1631 0.582 0.016 0.020 0.008 0.956
#> SRR1663224 2 0.3790 0.499 0.000 0.820 0.164 0.016
#> SRR1663225 2 0.4920 0.578 0.000 0.628 0.004 0.368
#> SRR1663226 2 0.4889 0.583 0.000 0.636 0.004 0.360
#> SRR1663223 2 0.2782 0.580 0.024 0.904 0.004 0.068
#> SRR1663229 2 0.4977 0.449 0.000 0.540 0.000 0.460
#> SRR1663231 4 0.6467 0.326 0.168 0.012 0.144 0.676
#> SRR1663232 4 0.6149 0.307 0.180 0.000 0.144 0.676
#> SRR1663227 4 0.3189 0.575 0.048 0.060 0.004 0.888
#> SRR1663228 4 0.3538 0.551 0.084 0.044 0.004 0.868
#> SRR1663230 2 0.4989 0.504 0.000 0.528 0.000 0.472
#> SRR1663235 2 0.5582 0.568 0.024 0.576 0.000 0.400
#> SRR1663233 2 0.4998 0.496 0.000 0.512 0.000 0.488
#> SRR1663236 1 0.7883 0.264 0.384 0.000 0.316 0.300
#> SRR1663237 4 0.5000 -0.522 0.000 0.500 0.000 0.500
#> SRR1663238 3 0.0895 0.789 0.004 0.000 0.976 0.020
#> SRR1663234 1 0.4453 0.644 0.744 0.012 0.000 0.244
#> SRR1663240 3 0.2197 0.753 0.004 0.000 0.916 0.080
#> SRR1663239 3 0.1118 0.784 0.000 0.036 0.964 0.000
#> SRR1663241 4 0.5132 -0.266 0.448 0.000 0.004 0.548
#> SRR1663242 2 0.3352 0.556 0.072 0.884 0.016 0.028
#> SRR1663243 2 0.3858 0.532 0.116 0.844 0.004 0.036
#> SRR1663244 4 0.7156 0.107 0.136 0.388 0.000 0.476
#> SRR1663246 3 0.0657 0.791 0.004 0.000 0.984 0.012
#> SRR1663245 2 0.3276 0.559 0.064 0.888 0.012 0.036
#> SRR1663247 1 0.5070 0.512 0.620 0.008 0.000 0.372
#> SRR1663248 2 0.6700 0.476 0.088 0.480 0.000 0.432
#> SRR1663250 1 0.6326 0.576 0.636 0.000 0.108 0.256
#> SRR1663249 1 0.4304 0.619 0.716 0.000 0.000 0.284
#> SRR1663251 1 0.4543 0.581 0.676 0.000 0.000 0.324
#> SRR1663252 4 0.3219 0.516 0.000 0.164 0.000 0.836
#> SRR1663253 4 0.4182 0.513 0.000 0.024 0.180 0.796
#> SRR1663254 1 0.0592 0.731 0.984 0.000 0.000 0.016
#> SRR1663255 3 0.9028 0.248 0.068 0.232 0.392 0.308
#> SRR1663256 4 0.5288 0.405 0.056 0.000 0.224 0.720
#> SRR1663259 2 0.2310 0.568 0.004 0.920 0.068 0.008
#> SRR1663258 4 0.2216 0.560 0.000 0.092 0.000 0.908
#> SRR1663257 2 0.3545 0.502 0.008 0.828 0.164 0.000
#> SRR1663263 3 0.0336 0.792 0.000 0.008 0.992 0.000
#> SRR1663260 3 0.0524 0.793 0.000 0.004 0.988 0.008
#> SRR1663262 2 0.4509 0.609 0.000 0.708 0.004 0.288
#> SRR1663261 1 0.4804 0.503 0.616 0.000 0.000 0.384
#> SRR1663265 2 0.4287 0.541 0.156 0.808 0.004 0.032
#> SRR1663266 2 0.3550 0.535 0.044 0.860 0.096 0.000
#> SRR1663267 1 0.0188 0.732 0.996 0.000 0.000 0.004
#> SRR1663264 4 0.4950 0.254 0.000 0.004 0.376 0.620
#> SRR1663268 3 0.4536 0.596 0.008 0.016 0.772 0.204
#> SRR1663269 3 0.1042 0.787 0.008 0.000 0.972 0.020
#> SRR1663271 2 0.4955 0.555 0.000 0.556 0.000 0.444
#> SRR1663270 3 0.4844 0.622 0.012 0.300 0.688 0.000
#> SRR1663273 3 0.0657 0.791 0.004 0.000 0.984 0.012
#> SRR1663272 3 0.1004 0.787 0.004 0.000 0.972 0.024
#> SRR1663275 2 0.4972 0.548 0.000 0.544 0.000 0.456
#> SRR1663274 4 0.2060 0.537 0.016 0.052 0.000 0.932
#> SRR1663276 1 0.5249 0.477 0.708 0.044 0.000 0.248
#> SRR1663277 1 0.5444 0.439 0.688 0.048 0.000 0.264
#> SRR1663279 2 0.1733 0.585 0.000 0.948 0.028 0.024
#> SRR1663278 2 0.2587 0.564 0.076 0.908 0.004 0.012
#> SRR1663280 2 0.3103 0.566 0.044 0.900 0.036 0.020
#> SRR1663281 3 0.6973 0.493 0.144 0.300 0.556 0.000
#> SRR1663282 3 0.7730 0.326 0.264 0.292 0.444 0.000
#> SRR1663283 1 0.0188 0.729 0.996 0.000 0.000 0.004
#> SRR1663284 1 0.0188 0.729 0.996 0.000 0.000 0.004
#> SRR1663286 2 0.4888 0.568 0.000 0.588 0.000 0.412
#> SRR1663287 2 0.4941 0.490 0.000 0.564 0.000 0.436
#> SRR1663288 2 0.4855 0.586 0.000 0.644 0.004 0.352
#> SRR1663291 1 0.3947 0.656 0.848 0.076 0.072 0.004
#> SRR1663289 4 0.4866 -0.310 0.000 0.404 0.000 0.596
#> SRR1663290 4 0.4790 -0.246 0.000 0.380 0.000 0.620
#> SRR1663285 3 0.0592 0.791 0.000 0.016 0.984 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 5 0.4593 0.6952 0.000 0.124 0.000 0.128 0.748
#> SRR1663210 5 0.3921 0.7550 0.000 0.072 0.000 0.128 0.800
#> SRR1663213 3 0.0703 0.9000 0.000 0.024 0.976 0.000 0.000
#> SRR1663211 2 0.4242 0.0548 0.000 0.572 0.428 0.000 0.000
#> SRR1663212 2 0.4291 -0.0652 0.000 0.536 0.464 0.000 0.000
#> SRR1663214 3 0.0880 0.8988 0.000 0.032 0.968 0.000 0.000
#> SRR1663215 3 0.0880 0.8988 0.000 0.032 0.968 0.000 0.000
#> SRR1663216 5 0.2332 0.8343 0.000 0.016 0.004 0.076 0.904
#> SRR1663217 5 0.3831 0.6966 0.008 0.004 0.216 0.004 0.768
#> SRR1663218 5 0.3831 0.6966 0.008 0.004 0.216 0.004 0.768
#> SRR1663219 1 0.0290 0.8386 0.992 0.000 0.000 0.000 0.008
#> SRR1663220 1 0.0290 0.8386 0.992 0.000 0.000 0.000 0.008
#> SRR1663221 4 0.4167 0.1817 0.000 0.252 0.000 0.724 0.024
#> SRR1663222 4 0.4101 0.4399 0.000 0.000 0.000 0.628 0.372
#> SRR1663224 2 0.2124 0.6661 0.000 0.900 0.096 0.000 0.004
#> SRR1663225 2 0.5638 0.3980 0.000 0.492 0.000 0.432 0.076
#> SRR1663226 2 0.5962 0.3750 0.000 0.468 0.000 0.424 0.108
#> SRR1663223 2 0.4311 0.5945 0.004 0.712 0.000 0.264 0.020
#> SRR1663229 4 0.5396 -0.2264 0.000 0.376 0.000 0.560 0.064
#> SRR1663231 4 0.5812 0.5937 0.076 0.004 0.060 0.696 0.164
#> SRR1663232 4 0.6244 0.5760 0.096 0.004 0.072 0.664 0.164
#> SRR1663227 4 0.0162 0.6091 0.000 0.000 0.000 0.996 0.004
#> SRR1663228 4 0.0162 0.6091 0.000 0.000 0.000 0.996 0.004
#> SRR1663230 5 0.1952 0.8436 0.000 0.004 0.000 0.084 0.912
#> SRR1663235 5 0.3242 0.7584 0.000 0.012 0.000 0.172 0.816
#> SRR1663233 5 0.0771 0.8405 0.000 0.004 0.000 0.020 0.976
#> SRR1663236 1 0.7399 -0.0428 0.384 0.012 0.204 0.380 0.020
#> SRR1663237 5 0.0865 0.8456 0.000 0.004 0.000 0.024 0.972
#> SRR1663238 3 0.0404 0.8937 0.000 0.000 0.988 0.012 0.000
#> SRR1663234 1 0.5954 0.3273 0.584 0.008 0.000 0.296 0.112
#> SRR1663240 3 0.2068 0.8169 0.000 0.004 0.904 0.092 0.000
#> SRR1663239 3 0.1522 0.8914 0.000 0.044 0.944 0.000 0.012
#> SRR1663241 4 0.6011 0.3584 0.296 0.004 0.040 0.608 0.052
#> SRR1663242 2 0.0451 0.6817 0.008 0.988 0.000 0.004 0.000
#> SRR1663243 2 0.1502 0.6704 0.056 0.940 0.000 0.004 0.000
#> SRR1663244 4 0.5747 0.1556 0.072 0.460 0.000 0.464 0.004
#> SRR1663246 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR1663245 2 0.4350 0.6392 0.084 0.764 0.000 0.152 0.000
#> SRR1663247 1 0.1661 0.8240 0.940 0.024 0.000 0.036 0.000
#> SRR1663248 5 0.1285 0.8467 0.004 0.004 0.000 0.036 0.956
#> SRR1663250 1 0.3725 0.7356 0.816 0.008 0.036 0.140 0.000
#> SRR1663249 1 0.1331 0.8285 0.952 0.008 0.000 0.040 0.000
#> SRR1663251 1 0.1628 0.8207 0.936 0.008 0.000 0.056 0.000
#> SRR1663252 4 0.0865 0.5956 0.000 0.004 0.000 0.972 0.024
#> SRR1663253 4 0.5594 0.5168 0.000 0.000 0.108 0.608 0.284
#> SRR1663254 1 0.0290 0.8386 0.992 0.000 0.000 0.000 0.008
#> SRR1663255 2 0.7353 -0.1714 0.016 0.340 0.304 0.336 0.004
#> SRR1663256 4 0.4538 0.4499 0.000 0.000 0.016 0.620 0.364
#> SRR1663259 2 0.0451 0.6823 0.000 0.988 0.004 0.000 0.008
#> SRR1663258 4 0.1341 0.6235 0.000 0.000 0.000 0.944 0.056
#> SRR1663257 2 0.0451 0.6817 0.000 0.988 0.008 0.000 0.004
#> SRR1663263 3 0.1197 0.8919 0.000 0.048 0.952 0.000 0.000
#> SRR1663260 3 0.1648 0.8951 0.000 0.040 0.940 0.020 0.000
#> SRR1663262 2 0.6056 0.4660 0.000 0.552 0.000 0.296 0.152
#> SRR1663261 4 0.4304 -0.0428 0.484 0.000 0.000 0.516 0.000
#> SRR1663265 2 0.4527 0.6330 0.072 0.752 0.000 0.172 0.004
#> SRR1663266 2 0.0290 0.6814 0.000 0.992 0.008 0.000 0.000
#> SRR1663267 1 0.0290 0.8386 0.992 0.000 0.000 0.000 0.008
#> SRR1663264 4 0.6202 0.5114 0.000 0.004 0.260 0.564 0.172
#> SRR1663268 3 0.4448 0.1982 0.000 0.004 0.516 0.480 0.000
#> SRR1663269 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR1663271 5 0.1331 0.8473 0.000 0.008 0.000 0.040 0.952
#> SRR1663270 3 0.4219 0.3282 0.000 0.416 0.584 0.000 0.000
#> SRR1663273 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR1663272 3 0.0671 0.8890 0.000 0.004 0.980 0.016 0.000
#> SRR1663275 5 0.0671 0.8403 0.000 0.004 0.000 0.016 0.980
#> SRR1663274 5 0.1851 0.8032 0.000 0.000 0.000 0.088 0.912
#> SRR1663276 5 0.1943 0.8080 0.056 0.000 0.000 0.020 0.924
#> SRR1663277 5 0.1943 0.8080 0.056 0.000 0.000 0.020 0.924
#> SRR1663279 2 0.3503 0.6625 0.000 0.848 0.012 0.080 0.060
#> SRR1663278 2 0.0798 0.6812 0.016 0.976 0.000 0.000 0.008
#> SRR1663280 2 0.0162 0.6820 0.000 0.996 0.004 0.000 0.000
#> SRR1663281 2 0.5555 0.5111 0.220 0.640 0.140 0.000 0.000
#> SRR1663282 2 0.5732 0.4113 0.296 0.588 0.116 0.000 0.000
#> SRR1663283 1 0.1538 0.8259 0.948 0.036 0.000 0.008 0.008
#> SRR1663284 1 0.0867 0.8369 0.976 0.008 0.000 0.008 0.008
#> SRR1663286 5 0.2136 0.8375 0.000 0.008 0.000 0.088 0.904
#> SRR1663287 2 0.5230 0.3913 0.000 0.504 0.000 0.452 0.044
#> SRR1663288 2 0.5304 0.4731 0.000 0.560 0.000 0.384 0.056
#> SRR1663291 1 0.5718 0.5878 0.672 0.180 0.008 0.008 0.132
#> SRR1663289 5 0.3300 0.6446 0.000 0.004 0.000 0.204 0.792
#> SRR1663290 5 0.3861 0.5209 0.000 0.008 0.000 0.264 0.728
#> SRR1663285 3 0.1341 0.8870 0.000 0.056 0.944 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.4545 0.57254 0.000 0.668 0.000 0.020 0.032 0.280
#> SRR1663210 2 0.4243 0.60269 0.000 0.696 0.000 0.020 0.020 0.264
#> SRR1663213 3 0.0291 0.93342 0.000 0.004 0.992 0.000 0.004 0.000
#> SRR1663211 5 0.3171 0.61825 0.000 0.000 0.204 0.012 0.784 0.000
#> SRR1663212 5 0.3230 0.61322 0.000 0.000 0.212 0.012 0.776 0.000
#> SRR1663214 3 0.0260 0.93353 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1663215 3 0.0260 0.93353 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1663216 2 0.3616 0.65874 0.000 0.748 0.000 0.012 0.008 0.232
#> SRR1663217 2 0.2558 0.63380 0.004 0.840 0.156 0.000 0.000 0.000
#> SRR1663218 2 0.2362 0.65590 0.004 0.860 0.136 0.000 0.000 0.000
#> SRR1663219 1 0.0458 0.70557 0.984 0.016 0.000 0.000 0.000 0.000
#> SRR1663220 1 0.0458 0.70557 0.984 0.016 0.000 0.000 0.000 0.000
#> SRR1663221 6 0.1219 0.69172 0.000 0.000 0.000 0.048 0.004 0.948
#> SRR1663222 4 0.1268 0.71379 0.000 0.036 0.000 0.952 0.004 0.008
#> SRR1663224 5 0.7038 0.24522 0.000 0.040 0.352 0.020 0.392 0.196
#> SRR1663225 6 0.0951 0.70906 0.000 0.004 0.000 0.008 0.020 0.968
#> SRR1663226 6 0.0951 0.70906 0.000 0.004 0.000 0.008 0.020 0.968
#> SRR1663223 6 0.4172 0.44842 0.000 0.012 0.000 0.016 0.300 0.672
#> SRR1663229 6 0.1237 0.70736 0.000 0.004 0.000 0.020 0.020 0.956
#> SRR1663231 4 0.1194 0.71892 0.000 0.000 0.008 0.956 0.004 0.032
#> SRR1663232 4 0.1086 0.72211 0.000 0.012 0.012 0.964 0.000 0.012
#> SRR1663227 6 0.3979 0.02262 0.004 0.000 0.000 0.456 0.000 0.540
#> SRR1663228 6 0.3998 -0.07677 0.004 0.000 0.000 0.492 0.000 0.504
#> SRR1663230 2 0.5110 0.70870 0.000 0.640 0.000 0.144 0.004 0.212
#> SRR1663235 2 0.1549 0.74232 0.000 0.936 0.000 0.020 0.000 0.044
#> SRR1663233 2 0.4518 0.72540 0.000 0.708 0.000 0.204 0.008 0.080
#> SRR1663236 4 0.4455 0.58425 0.048 0.000 0.144 0.764 0.020 0.024
#> SRR1663237 2 0.3129 0.74680 0.000 0.820 0.000 0.152 0.004 0.024
#> SRR1663238 3 0.0363 0.93068 0.000 0.000 0.988 0.012 0.000 0.000
#> SRR1663234 4 0.5642 0.51095 0.056 0.084 0.000 0.660 0.188 0.012
#> SRR1663240 3 0.3045 0.79216 0.000 0.000 0.840 0.100 0.000 0.060
#> SRR1663239 3 0.0458 0.93082 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR1663241 4 0.2316 0.68250 0.064 0.004 0.004 0.900 0.000 0.028
#> SRR1663242 5 0.0405 0.69572 0.000 0.000 0.000 0.004 0.988 0.008
#> SRR1663243 5 0.2164 0.66665 0.032 0.000 0.000 0.000 0.900 0.068
#> SRR1663244 5 0.3357 0.45093 0.004 0.000 0.000 0.224 0.764 0.008
#> SRR1663246 3 0.0146 0.93362 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR1663245 6 0.5916 0.37514 0.072 0.036 0.000 0.020 0.288 0.584
#> SRR1663247 1 0.3247 0.68218 0.852 0.000 0.000 0.052 0.048 0.048
#> SRR1663248 2 0.0692 0.74924 0.000 0.976 0.000 0.020 0.000 0.004
#> SRR1663250 4 0.4726 0.53996 0.136 0.000 0.028 0.740 0.088 0.008
#> SRR1663249 1 0.4945 0.22600 0.528 0.000 0.000 0.412 0.056 0.004
#> SRR1663251 1 0.4315 0.40778 0.636 0.000 0.000 0.328 0.036 0.000
#> SRR1663252 6 0.2135 0.62442 0.000 0.000 0.000 0.128 0.000 0.872
#> SRR1663253 4 0.5358 0.18609 0.000 0.320 0.048 0.588 0.000 0.044
#> SRR1663254 1 0.3348 0.62607 0.768 0.016 0.000 0.216 0.000 0.000
#> SRR1663255 4 0.5205 0.14272 0.008 0.004 0.032 0.476 0.468 0.012
#> SRR1663256 4 0.1219 0.71312 0.000 0.048 0.004 0.948 0.000 0.000
#> SRR1663259 5 0.1542 0.68454 0.000 0.008 0.004 0.000 0.936 0.052
#> SRR1663258 4 0.3860 0.03623 0.000 0.000 0.000 0.528 0.000 0.472
#> SRR1663257 5 0.0291 0.69489 0.000 0.000 0.004 0.000 0.992 0.004
#> SRR1663263 3 0.0547 0.92931 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR1663260 3 0.1536 0.90032 0.004 0.000 0.940 0.016 0.000 0.040
#> SRR1663262 6 0.5283 0.49052 0.000 0.172 0.000 0.016 0.164 0.648
#> SRR1663261 1 0.5583 0.25624 0.508 0.000 0.000 0.156 0.000 0.336
#> SRR1663265 6 0.7438 0.12292 0.336 0.076 0.000 0.020 0.204 0.364
#> SRR1663266 5 0.0363 0.69569 0.000 0.000 0.000 0.000 0.988 0.012
#> SRR1663267 1 0.0363 0.70522 0.988 0.012 0.000 0.000 0.000 0.000
#> SRR1663264 4 0.1503 0.72004 0.000 0.016 0.032 0.944 0.000 0.008
#> SRR1663268 6 0.4268 0.46002 0.004 0.000 0.272 0.040 0.000 0.684
#> SRR1663269 3 0.0146 0.93362 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR1663271 2 0.4064 0.75923 0.000 0.768 0.000 0.132 0.008 0.092
#> SRR1663270 3 0.3954 0.27157 0.004 0.000 0.620 0.000 0.372 0.004
#> SRR1663273 3 0.0146 0.93362 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR1663272 3 0.0790 0.91756 0.000 0.000 0.968 0.032 0.000 0.000
#> SRR1663275 2 0.3425 0.74450 0.000 0.800 0.000 0.164 0.008 0.028
#> SRR1663274 2 0.4440 0.39652 0.000 0.556 0.000 0.420 0.008 0.016
#> SRR1663276 2 0.2129 0.73457 0.056 0.904 0.000 0.040 0.000 0.000
#> SRR1663277 2 0.2129 0.73457 0.056 0.904 0.000 0.040 0.000 0.000
#> SRR1663279 5 0.7786 0.00876 0.000 0.316 0.116 0.020 0.316 0.232
#> SRR1663278 5 0.0725 0.69443 0.000 0.000 0.000 0.012 0.976 0.012
#> SRR1663280 5 0.0508 0.69645 0.000 0.000 0.000 0.004 0.984 0.012
#> SRR1663281 5 0.6622 0.17804 0.168 0.012 0.396 0.000 0.396 0.028
#> SRR1663282 5 0.6785 0.21022 0.272 0.008 0.328 0.000 0.368 0.024
#> SRR1663283 1 0.4582 0.63494 0.732 0.072 0.000 0.020 0.172 0.004
#> SRR1663284 1 0.4764 0.65551 0.736 0.072 0.000 0.044 0.144 0.004
#> SRR1663286 2 0.4798 0.69796 0.000 0.664 0.000 0.096 0.004 0.236
#> SRR1663287 6 0.1049 0.70738 0.000 0.000 0.000 0.008 0.032 0.960
#> SRR1663288 6 0.0891 0.70579 0.000 0.008 0.000 0.000 0.024 0.968
#> SRR1663291 1 0.6938 0.22359 0.336 0.300 0.000 0.040 0.320 0.004
#> SRR1663289 2 0.5033 0.66365 0.000 0.636 0.000 0.268 0.012 0.084
#> SRR1663290 2 0.5476 0.63264 0.000 0.588 0.000 0.284 0.016 0.112
#> SRR1663285 3 0.0713 0.92366 0.000 0.000 0.972 0.000 0.028 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "hclust"]
# you can also extract it by
# res = res_list["CV:hclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.996 0.998 0.0747 0.929 0.929
#> 3 3 1.000 0.969 0.991 3.2674 0.744 0.725
#> 4 4 1.000 0.968 0.992 0.0200 0.994 0.990
#> 5 5 0.807 0.875 0.930 0.2343 0.995 0.992
#> 6 6 0.614 0.773 0.895 0.2606 0.892 0.837
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
#> SRR1663209 2 0.0000 0.998 0.000 1.000
#> SRR1663210 2 0.0000 0.998 0.000 1.000
#> SRR1663213 2 0.0000 0.998 0.000 1.000
#> SRR1663211 2 0.0000 0.998 0.000 1.000
#> SRR1663212 2 0.0000 0.998 0.000 1.000
#> SRR1663214 2 0.0000 0.998 0.000 1.000
#> SRR1663215 2 0.0000 0.998 0.000 1.000
#> SRR1663216 2 0.0000 0.998 0.000 1.000
#> SRR1663217 2 0.0672 0.992 0.008 0.992
#> SRR1663218 2 0.0672 0.992 0.008 0.992
#> SRR1663219 2 0.0672 0.992 0.008 0.992
#> SRR1663220 2 0.0672 0.992 0.008 0.992
#> SRR1663221 2 0.0000 0.998 0.000 1.000
#> SRR1663222 2 0.0000 0.998 0.000 1.000
#> SRR1663224 2 0.0000 0.998 0.000 1.000
#> SRR1663225 2 0.0000 0.998 0.000 1.000
#> SRR1663226 2 0.0000 0.998 0.000 1.000
#> SRR1663223 2 0.0000 0.998 0.000 1.000
#> SRR1663229 2 0.0000 0.998 0.000 1.000
#> SRR1663231 2 0.0000 0.998 0.000 1.000
#> SRR1663232 2 0.0000 0.998 0.000 1.000
#> SRR1663227 2 0.0672 0.992 0.008 0.992
#> SRR1663228 2 0.0672 0.992 0.008 0.992
#> SRR1663230 2 0.0000 0.998 0.000 1.000
#> SRR1663235 2 0.0000 0.998 0.000 1.000
#> SRR1663233 2 0.0000 0.998 0.000 1.000
#> SRR1663236 1 0.0000 1.000 1.000 0.000
#> SRR1663237 2 0.0000 0.998 0.000 1.000
#> SRR1663238 2 0.0000 0.998 0.000 1.000
#> SRR1663234 2 0.0000 0.998 0.000 1.000
#> SRR1663240 2 0.0000 0.998 0.000 1.000
#> SRR1663239 2 0.0000 0.998 0.000 1.000
#> SRR1663241 1 0.0000 1.000 1.000 0.000
#> SRR1663242 2 0.0000 0.998 0.000 1.000
#> SRR1663243 2 0.0000 0.998 0.000 1.000
#> SRR1663244 2 0.0000 0.998 0.000 1.000
#> SRR1663246 2 0.0000 0.998 0.000 1.000
#> SRR1663245 2 0.0000 0.998 0.000 1.000
#> SRR1663247 1 0.0000 1.000 1.000 0.000
#> SRR1663248 2 0.0000 0.998 0.000 1.000
#> SRR1663250 2 0.0000 0.998 0.000 1.000
#> SRR1663249 2 0.0000 0.998 0.000 1.000
#> SRR1663251 2 0.0938 0.989 0.012 0.988
#> SRR1663252 2 0.0000 0.998 0.000 1.000
#> SRR1663253 2 0.0000 0.998 0.000 1.000
#> SRR1663254 2 0.0672 0.992 0.008 0.992
#> SRR1663255 2 0.0000 0.998 0.000 1.000
#> SRR1663256 2 0.0000 0.998 0.000 1.000
#> SRR1663259 2 0.0000 0.998 0.000 1.000
#> SRR1663258 2 0.0000 0.998 0.000 1.000
#> SRR1663257 2 0.0000 0.998 0.000 1.000
#> SRR1663263 2 0.0000 0.998 0.000 1.000
#> SRR1663260 2 0.0000 0.998 0.000 1.000
#> SRR1663262 2 0.0000 0.998 0.000 1.000
#> SRR1663261 2 0.0000 0.998 0.000 1.000
#> SRR1663265 2 0.0000 0.998 0.000 1.000
#> SRR1663266 2 0.0000 0.998 0.000 1.000
#> SRR1663267 2 0.0000 0.998 0.000 1.000
#> SRR1663264 2 0.0000 0.998 0.000 1.000
#> SRR1663268 2 0.0000 0.998 0.000 1.000
#> SRR1663269 2 0.0000 0.998 0.000 1.000
#> SRR1663271 2 0.0000 0.998 0.000 1.000
#> SRR1663270 2 0.0000 0.998 0.000 1.000
#> SRR1663273 2 0.0000 0.998 0.000 1.000
#> SRR1663272 2 0.0000 0.998 0.000 1.000
#> SRR1663275 2 0.0000 0.998 0.000 1.000
#> SRR1663274 2 0.0938 0.989 0.012 0.988
#> SRR1663276 2 0.0672 0.992 0.008 0.992
#> SRR1663277 2 0.0672 0.992 0.008 0.992
#> SRR1663279 2 0.0000 0.998 0.000 1.000
#> SRR1663278 2 0.0000 0.998 0.000 1.000
#> SRR1663280 2 0.0000 0.998 0.000 1.000
#> SRR1663281 2 0.0000 0.998 0.000 1.000
#> SRR1663282 2 0.0000 0.998 0.000 1.000
#> SRR1663283 2 0.2423 0.962 0.040 0.960
#> SRR1663284 2 0.2423 0.962 0.040 0.960
#> SRR1663286 2 0.0000 0.998 0.000 1.000
#> SRR1663287 2 0.0000 0.998 0.000 1.000
#> SRR1663288 2 0.0000 0.998 0.000 1.000
#> SRR1663291 2 0.0000 0.998 0.000 1.000
#> SRR1663289 2 0.0000 0.998 0.000 1.000
#> SRR1663290 2 0.0000 0.998 0.000 1.000
#> SRR1663285 2 0.0000 0.998 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663213 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663211 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663212 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663214 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663215 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663216 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663217 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1663218 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1663219 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1663220 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1663221 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663222 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663224 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663225 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663226 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663223 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663229 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663231 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663232 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663227 1 0.5431 0.422 0.716 0.284 0.000
#> SRR1663228 1 0.5431 0.422 0.716 0.284 0.000
#> SRR1663230 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663235 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663233 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663236 3 0.0000 1.000 0.000 0.000 1.000
#> SRR1663237 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663238 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663234 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663240 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663239 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663241 3 0.0000 1.000 0.000 0.000 1.000
#> SRR1663242 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663243 2 0.0592 0.989 0.012 0.988 0.000
#> SRR1663244 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663246 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663245 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663247 3 0.0000 1.000 0.000 0.000 1.000
#> SRR1663248 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663250 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663249 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663251 1 0.0237 0.883 0.996 0.000 0.004
#> SRR1663252 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663253 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663254 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1663255 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663256 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663259 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663258 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663257 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663263 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663260 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663262 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663261 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663265 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663266 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663267 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663264 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663268 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663269 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663271 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663270 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663273 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663272 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663275 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663274 1 0.0237 0.883 0.996 0.000 0.004
#> SRR1663276 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1663277 1 0.0000 0.885 1.000 0.000 0.000
#> SRR1663279 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663278 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663280 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663281 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663282 2 0.0424 0.992 0.008 0.992 0.000
#> SRR1663283 1 0.1289 0.865 0.968 0.000 0.032
#> SRR1663284 1 0.1289 0.865 0.968 0.000 0.032
#> SRR1663286 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663287 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663288 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663291 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663289 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663290 2 0.0000 0.999 0.000 1.000 0.000
#> SRR1663285 2 0.0000 0.999 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663210 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663213 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663211 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663212 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663214 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663216 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663217 1 0.0000 0.855 1.000 0.000 0.000 0.000
#> SRR1663218 1 0.0000 0.855 1.000 0.000 0.000 0.000
#> SRR1663219 1 0.0000 0.855 1.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.855 1.000 0.000 0.000 0.000
#> SRR1663221 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663222 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663224 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663225 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663226 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663223 3 0.0188 0.996 0.000 0.004 0.996 0.000
#> SRR1663229 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663231 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663232 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663227 1 0.4304 0.399 0.716 0.000 0.284 0.000
#> SRR1663228 1 0.4304 0.399 0.716 0.000 0.284 0.000
#> SRR1663230 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663235 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663233 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663236 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> SRR1663237 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663238 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663234 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663240 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663239 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663241 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> SRR1663242 3 0.0188 0.996 0.000 0.004 0.996 0.000
#> SRR1663243 3 0.0657 0.986 0.012 0.004 0.984 0.000
#> SRR1663244 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663246 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663245 3 0.0524 0.989 0.008 0.004 0.988 0.000
#> SRR1663247 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> SRR1663248 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663250 3 0.0336 0.992 0.008 0.000 0.992 0.000
#> SRR1663249 3 0.0336 0.992 0.008 0.000 0.992 0.000
#> SRR1663251 1 0.0188 0.853 0.996 0.000 0.000 0.004
#> SRR1663252 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663253 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663254 1 0.0000 0.855 1.000 0.000 0.000 0.000
#> SRR1663255 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663256 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663259 3 0.0188 0.996 0.000 0.004 0.996 0.000
#> SRR1663258 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663257 3 0.0188 0.996 0.000 0.004 0.996 0.000
#> SRR1663263 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663260 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663262 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663261 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663265 3 0.0336 0.992 0.008 0.000 0.992 0.000
#> SRR1663266 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663267 3 0.0336 0.992 0.008 0.000 0.992 0.000
#> SRR1663264 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663268 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663269 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663271 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663270 3 0.0336 0.992 0.008 0.000 0.992 0.000
#> SRR1663273 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663272 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663275 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663274 1 0.0188 0.853 0.996 0.000 0.000 0.004
#> SRR1663276 1 0.0000 0.855 1.000 0.000 0.000 0.000
#> SRR1663277 1 0.0000 0.855 1.000 0.000 0.000 0.000
#> SRR1663279 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663278 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663280 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663281 3 0.0336 0.992 0.008 0.000 0.992 0.000
#> SRR1663282 3 0.0336 0.992 0.008 0.000 0.992 0.000
#> SRR1663283 2 0.0188 1.000 0.004 0.996 0.000 0.000
#> SRR1663284 2 0.0188 1.000 0.004 0.996 0.000 0.000
#> SRR1663286 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663287 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663288 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663291 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663289 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663290 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR1663285 3 0.0000 0.998 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
#> SRR1663209 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663213 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663211 2 0.3003 0.808 0 0.812 0.000 0.188 0.000
#> SRR1663212 2 0.3003 0.808 0 0.812 0.000 0.188 0.000
#> SRR1663214 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663215 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663216 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663217 4 0.4278 0.749 0 0.000 0.452 0.548 0.000
#> SRR1663218 4 0.4278 0.749 0 0.000 0.452 0.548 0.000
#> SRR1663219 4 0.4278 0.749 0 0.000 0.452 0.548 0.000
#> SRR1663220 4 0.4278 0.749 0 0.000 0.452 0.548 0.000
#> SRR1663221 2 0.1908 0.893 0 0.908 0.000 0.092 0.000
#> SRR1663222 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663224 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663225 2 0.1908 0.893 0 0.908 0.000 0.092 0.000
#> SRR1663226 2 0.1908 0.893 0 0.908 0.000 0.092 0.000
#> SRR1663223 2 0.0290 0.938 0 0.992 0.000 0.008 0.000
#> SRR1663229 2 0.1908 0.893 0 0.908 0.000 0.092 0.000
#> SRR1663231 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663232 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663227 4 0.5605 0.333 0 0.192 0.168 0.640 0.000
#> SRR1663228 4 0.5605 0.333 0 0.192 0.168 0.640 0.000
#> SRR1663230 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663233 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663236 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR1663237 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663238 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663234 2 0.0290 0.937 0 0.992 0.000 0.008 0.000
#> SRR1663240 2 0.0510 0.935 0 0.984 0.000 0.016 0.000
#> SRR1663239 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663241 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR1663242 2 0.4227 0.512 0 0.580 0.000 0.420 0.000
#> SRR1663243 2 0.3756 0.738 0 0.744 0.008 0.248 0.000
#> SRR1663244 2 0.1341 0.913 0 0.944 0.000 0.056 0.000
#> SRR1663246 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663245 2 0.3550 0.757 0 0.760 0.004 0.236 0.000
#> SRR1663247 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR1663248 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663250 2 0.1571 0.917 0 0.936 0.004 0.060 0.000
#> SRR1663249 2 0.0771 0.932 0 0.976 0.004 0.020 0.000
#> SRR1663251 4 0.4425 0.745 0 0.000 0.452 0.544 0.004
#> SRR1663252 2 0.0290 0.937 0 0.992 0.000 0.008 0.000
#> SRR1663253 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663254 4 0.4278 0.749 0 0.000 0.452 0.548 0.000
#> SRR1663255 2 0.1121 0.921 0 0.956 0.000 0.044 0.000
#> SRR1663256 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663259 2 0.4171 0.553 0 0.604 0.000 0.396 0.000
#> SRR1663258 2 0.0609 0.933 0 0.980 0.000 0.020 0.000
#> SRR1663257 2 0.4235 0.506 0 0.576 0.000 0.424 0.000
#> SRR1663263 2 0.2690 0.837 0 0.844 0.000 0.156 0.000
#> SRR1663260 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663262 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663261 2 0.1732 0.902 0 0.920 0.000 0.080 0.000
#> SRR1663265 2 0.0771 0.932 0 0.976 0.004 0.020 0.000
#> SRR1663266 2 0.3684 0.716 0 0.720 0.000 0.280 0.000
#> SRR1663267 2 0.0771 0.932 0 0.976 0.004 0.020 0.000
#> SRR1663264 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663268 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663269 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663271 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663270 2 0.0865 0.932 0 0.972 0.004 0.024 0.000
#> SRR1663273 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663272 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663275 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663274 4 0.4425 0.745 0 0.000 0.452 0.544 0.004
#> SRR1663276 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR1663277 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR1663279 2 0.0162 0.938 0 0.996 0.000 0.004 0.000
#> SRR1663278 2 0.1851 0.893 0 0.912 0.000 0.088 0.000
#> SRR1663280 2 0.3561 0.741 0 0.740 0.000 0.260 0.000
#> SRR1663281 2 0.0771 0.932 0 0.976 0.004 0.020 0.000
#> SRR1663282 2 0.0771 0.932 0 0.976 0.004 0.020 0.000
#> SRR1663283 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR1663284 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR1663286 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663287 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663288 2 0.1908 0.893 0 0.908 0.000 0.092 0.000
#> SRR1663291 2 0.3730 0.709 0 0.712 0.000 0.288 0.000
#> SRR1663289 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.938 0 1.000 0.000 0.000 0.000
#> SRR1663285 2 0.2690 0.837 0 0.844 0.000 0.156 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663210 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663213 2 0.1700 0.8401 0.000 0.916 0 0.000 0.080 0.004
#> SRR1663211 5 0.4180 0.5823 0.000 0.348 0 0.000 0.628 0.024
#> SRR1663212 5 0.4180 0.5823 0.000 0.348 0 0.000 0.628 0.024
#> SRR1663214 2 0.1700 0.8401 0.000 0.916 0 0.000 0.080 0.004
#> SRR1663215 2 0.1700 0.8401 0.000 0.916 0 0.000 0.080 0.004
#> SRR1663216 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663217 1 0.0146 0.8516 0.996 0.000 0 0.000 0.000 0.004
#> SRR1663218 1 0.0146 0.8516 0.996 0.000 0 0.000 0.000 0.004
#> SRR1663219 1 0.0000 0.8519 1.000 0.000 0 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.8519 1.000 0.000 0 0.000 0.000 0.000
#> SRR1663221 2 0.3156 0.7066 0.000 0.800 0 0.000 0.020 0.180
#> SRR1663222 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663224 2 0.0909 0.8713 0.000 0.968 0 0.000 0.012 0.020
#> SRR1663225 2 0.3156 0.7066 0.000 0.800 0 0.000 0.020 0.180
#> SRR1663226 2 0.3156 0.7066 0.000 0.800 0 0.000 0.020 0.180
#> SRR1663223 2 0.1265 0.8626 0.000 0.948 0 0.000 0.008 0.044
#> SRR1663229 2 0.3156 0.7066 0.000 0.800 0 0.000 0.020 0.180
#> SRR1663231 2 0.0603 0.8729 0.000 0.980 0 0.000 0.016 0.004
#> SRR1663232 2 0.0603 0.8729 0.000 0.980 0 0.000 0.016 0.004
#> SRR1663227 1 0.4624 0.5238 0.712 0.096 0 0.000 0.012 0.180
#> SRR1663228 1 0.4624 0.5238 0.712 0.096 0 0.000 0.012 0.180
#> SRR1663230 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663235 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663233 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663236 4 0.0000 1.0000 0.000 0.000 0 1.000 0.000 0.000
#> SRR1663237 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663238 2 0.1838 0.8462 0.000 0.916 0 0.000 0.068 0.016
#> SRR1663234 2 0.0520 0.8720 0.000 0.984 0 0.000 0.008 0.008
#> SRR1663240 2 0.0937 0.8692 0.000 0.960 0 0.000 0.040 0.000
#> SRR1663239 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663241 4 0.0000 1.0000 0.000 0.000 0 1.000 0.000 0.000
#> SRR1663242 5 0.0790 0.3138 0.000 0.032 0 0.000 0.968 0.000
#> SRR1663243 2 0.5045 0.1191 0.000 0.552 0 0.000 0.364 0.084
#> SRR1663244 2 0.1779 0.8411 0.000 0.920 0 0.000 0.064 0.016
#> SRR1663246 2 0.1700 0.8401 0.000 0.916 0 0.000 0.080 0.004
#> SRR1663245 2 0.4654 0.4409 0.000 0.652 0 0.000 0.268 0.080
#> SRR1663247 4 0.0000 1.0000 0.000 0.000 0 1.000 0.000 0.000
#> SRR1663248 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663250 2 0.4328 0.5984 0.000 0.720 0 0.000 0.180 0.100
#> SRR1663249 2 0.2263 0.8213 0.000 0.884 0 0.000 0.016 0.100
#> SRR1663251 1 0.0405 0.8460 0.988 0.000 0 0.004 0.000 0.008
#> SRR1663252 2 0.1500 0.8479 0.000 0.936 0 0.000 0.012 0.052
#> SRR1663253 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663254 1 0.0146 0.8516 0.996 0.000 0 0.000 0.000 0.004
#> SRR1663255 2 0.1753 0.8411 0.000 0.912 0 0.000 0.084 0.004
#> SRR1663256 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663259 5 0.2631 0.4727 0.000 0.180 0 0.000 0.820 0.000
#> SRR1663258 2 0.1913 0.8256 0.000 0.908 0 0.000 0.012 0.080
#> SRR1663257 5 0.0632 0.2937 0.000 0.024 0 0.000 0.976 0.000
#> SRR1663263 2 0.4062 0.3898 0.000 0.660 0 0.000 0.316 0.024
#> SRR1663260 2 0.1408 0.8659 0.000 0.944 0 0.000 0.020 0.036
#> SRR1663262 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663261 2 0.3168 0.7198 0.000 0.804 0 0.000 0.024 0.172
#> SRR1663265 2 0.2163 0.8280 0.000 0.892 0 0.000 0.016 0.092
#> SRR1663266 2 0.4192 0.0849 0.000 0.572 0 0.000 0.412 0.016
#> SRR1663267 2 0.2163 0.8280 0.000 0.892 0 0.000 0.016 0.092
#> SRR1663264 2 0.0146 0.8727 0.000 0.996 0 0.000 0.004 0.000
#> SRR1663268 2 0.1408 0.8659 0.000 0.944 0 0.000 0.020 0.036
#> SRR1663269 2 0.1152 0.8608 0.000 0.952 0 0.000 0.044 0.004
#> SRR1663271 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663270 2 0.3045 0.7961 0.000 0.840 0 0.000 0.060 0.100
#> SRR1663273 2 0.1700 0.8401 0.000 0.916 0 0.000 0.080 0.004
#> SRR1663272 2 0.1700 0.8401 0.000 0.916 0 0.000 0.080 0.004
#> SRR1663275 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663274 1 0.0405 0.8460 0.988 0.000 0 0.004 0.000 0.008
#> SRR1663276 6 0.3371 1.0000 0.292 0.000 0 0.000 0.000 0.708
#> SRR1663277 6 0.3371 1.0000 0.292 0.000 0 0.000 0.000 0.708
#> SRR1663279 2 0.0508 0.8733 0.000 0.984 0 0.000 0.012 0.004
#> SRR1663278 2 0.2536 0.7943 0.000 0.864 0 0.000 0.116 0.020
#> SRR1663280 2 0.4131 0.1973 0.000 0.600 0 0.000 0.384 0.016
#> SRR1663281 2 0.2728 0.8094 0.000 0.860 0 0.000 0.040 0.100
#> SRR1663282 2 0.2728 0.8094 0.000 0.860 0 0.000 0.040 0.100
#> SRR1663283 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000 0.000
#> SRR1663284 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000 0.000
#> SRR1663286 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663287 2 0.0865 0.8627 0.000 0.964 0 0.000 0.000 0.036
#> SRR1663288 2 0.3156 0.7066 0.000 0.800 0 0.000 0.020 0.180
#> SRR1663291 5 0.4147 0.3766 0.000 0.436 0 0.000 0.552 0.012
#> SRR1663289 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.8725 0.000 1.000 0 0.000 0.000 0.000
#> SRR1663285 2 0.4078 0.3795 0.000 0.656 0 0.000 0.320 0.024
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 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.997 0.996 0.3142 0.685 0.685
#> 3 3 0.490 0.653 0.828 0.7376 0.732 0.609
#> 4 4 0.510 0.696 0.756 0.1949 0.833 0.646
#> 5 5 0.559 0.616 0.759 0.1079 0.913 0.762
#> 6 6 0.650 0.668 0.763 0.0677 0.877 0.600
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
#> SRR1663209 2 0.0000 0.998 0.000 1.000
#> SRR1663210 2 0.0000 0.998 0.000 1.000
#> SRR1663213 2 0.0000 0.998 0.000 1.000
#> SRR1663211 2 0.0672 0.994 0.008 0.992
#> SRR1663212 2 0.0672 0.994 0.008 0.992
#> SRR1663214 2 0.0000 0.998 0.000 1.000
#> SRR1663215 2 0.0000 0.998 0.000 1.000
#> SRR1663216 2 0.0000 0.998 0.000 1.000
#> SRR1663217 1 0.1184 0.996 0.984 0.016
#> SRR1663218 1 0.1184 0.996 0.984 0.016
#> SRR1663219 1 0.1184 0.996 0.984 0.016
#> SRR1663220 1 0.1184 0.996 0.984 0.016
#> SRR1663221 2 0.0000 0.998 0.000 1.000
#> SRR1663222 2 0.0000 0.998 0.000 1.000
#> SRR1663224 2 0.0000 0.998 0.000 1.000
#> SRR1663225 2 0.0000 0.998 0.000 1.000
#> SRR1663226 2 0.0000 0.998 0.000 1.000
#> SRR1663223 2 0.0000 0.998 0.000 1.000
#> SRR1663229 2 0.0000 0.998 0.000 1.000
#> SRR1663231 2 0.0000 0.998 0.000 1.000
#> SRR1663232 2 0.0000 0.998 0.000 1.000
#> SRR1663227 1 0.1184 0.996 0.984 0.016
#> SRR1663228 1 0.1184 0.996 0.984 0.016
#> SRR1663230 2 0.0000 0.998 0.000 1.000
#> SRR1663235 2 0.0000 0.998 0.000 1.000
#> SRR1663233 2 0.0000 0.998 0.000 1.000
#> SRR1663236 1 0.0672 0.995 0.992 0.008
#> SRR1663237 2 0.0000 0.998 0.000 1.000
#> SRR1663238 2 0.0000 0.998 0.000 1.000
#> SRR1663234 2 0.0000 0.998 0.000 1.000
#> SRR1663240 2 0.0000 0.998 0.000 1.000
#> SRR1663239 2 0.0000 0.998 0.000 1.000
#> SRR1663241 1 0.0672 0.995 0.992 0.008
#> SRR1663242 2 0.0672 0.994 0.008 0.992
#> SRR1663243 2 0.0000 0.998 0.000 1.000
#> SRR1663244 2 0.0672 0.994 0.008 0.992
#> SRR1663246 2 0.0000 0.998 0.000 1.000
#> SRR1663245 2 0.0000 0.998 0.000 1.000
#> SRR1663247 1 0.0672 0.995 0.992 0.008
#> SRR1663248 2 0.0000 0.998 0.000 1.000
#> SRR1663250 2 0.0376 0.996 0.004 0.996
#> SRR1663249 2 0.0000 0.998 0.000 1.000
#> SRR1663251 1 0.0672 0.995 0.992 0.008
#> SRR1663252 2 0.0000 0.998 0.000 1.000
#> SRR1663253 2 0.0000 0.998 0.000 1.000
#> SRR1663254 1 0.1184 0.996 0.984 0.016
#> SRR1663255 2 0.0672 0.994 0.008 0.992
#> SRR1663256 2 0.0000 0.998 0.000 1.000
#> SRR1663259 2 0.0672 0.994 0.008 0.992
#> SRR1663258 2 0.0000 0.998 0.000 1.000
#> SRR1663257 2 0.0672 0.994 0.008 0.992
#> SRR1663263 2 0.0672 0.994 0.008 0.992
#> SRR1663260 2 0.0000 0.998 0.000 1.000
#> SRR1663262 2 0.0000 0.998 0.000 1.000
#> SRR1663261 2 0.0000 0.998 0.000 1.000
#> SRR1663265 2 0.0000 0.998 0.000 1.000
#> SRR1663266 2 0.0672 0.994 0.008 0.992
#> SRR1663267 2 0.0000 0.998 0.000 1.000
#> SRR1663264 2 0.0000 0.998 0.000 1.000
#> SRR1663268 2 0.0000 0.998 0.000 1.000
#> SRR1663269 2 0.0000 0.998 0.000 1.000
#> SRR1663271 2 0.0000 0.998 0.000 1.000
#> SRR1663270 2 0.0376 0.996 0.004 0.996
#> SRR1663273 2 0.0000 0.998 0.000 1.000
#> SRR1663272 2 0.0000 0.998 0.000 1.000
#> SRR1663275 2 0.0000 0.998 0.000 1.000
#> SRR1663274 1 0.0672 0.995 0.992 0.008
#> SRR1663276 1 0.1184 0.996 0.984 0.016
#> SRR1663277 1 0.1184 0.996 0.984 0.016
#> SRR1663279 2 0.0000 0.998 0.000 1.000
#> SRR1663278 2 0.0672 0.994 0.008 0.992
#> SRR1663280 2 0.0672 0.994 0.008 0.992
#> SRR1663281 2 0.0000 0.998 0.000 1.000
#> SRR1663282 2 0.0000 0.998 0.000 1.000
#> SRR1663283 1 0.0672 0.995 0.992 0.008
#> SRR1663284 1 0.0672 0.995 0.992 0.008
#> SRR1663286 2 0.0000 0.998 0.000 1.000
#> SRR1663287 2 0.0000 0.998 0.000 1.000
#> SRR1663288 2 0.0000 0.998 0.000 1.000
#> SRR1663291 2 0.0672 0.994 0.008 0.992
#> SRR1663289 2 0.0000 0.998 0.000 1.000
#> SRR1663290 2 0.0000 0.998 0.000 1.000
#> SRR1663285 2 0.0672 0.994 0.008 0.992
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0237 0.775 0.000 0.996 0.004
#> SRR1663210 2 0.0237 0.775 0.000 0.996 0.004
#> SRR1663213 2 0.6204 -0.299 0.000 0.576 0.424
#> SRR1663211 3 0.5760 0.838 0.000 0.328 0.672
#> SRR1663212 3 0.5760 0.838 0.000 0.328 0.672
#> SRR1663214 2 0.6180 -0.290 0.000 0.584 0.416
#> SRR1663215 2 0.6180 -0.290 0.000 0.584 0.416
#> SRR1663216 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663217 1 0.1129 0.949 0.976 0.004 0.020
#> SRR1663218 1 0.1129 0.949 0.976 0.004 0.020
#> SRR1663219 1 0.1989 0.942 0.948 0.004 0.048
#> SRR1663220 1 0.1989 0.942 0.948 0.004 0.048
#> SRR1663221 2 0.3715 0.694 0.004 0.868 0.128
#> SRR1663222 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663224 2 0.4291 0.541 0.000 0.820 0.180
#> SRR1663225 2 0.3715 0.694 0.004 0.868 0.128
#> SRR1663226 2 0.3715 0.694 0.004 0.868 0.128
#> SRR1663223 2 0.1643 0.759 0.000 0.956 0.044
#> SRR1663229 2 0.3715 0.694 0.004 0.868 0.128
#> SRR1663231 2 0.4842 0.463 0.000 0.776 0.224
#> SRR1663232 2 0.4842 0.463 0.000 0.776 0.224
#> SRR1663227 1 0.2200 0.939 0.940 0.004 0.056
#> SRR1663228 1 0.2200 0.939 0.940 0.004 0.056
#> SRR1663230 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663235 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663233 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663236 1 0.4002 0.920 0.840 0.000 0.160
#> SRR1663237 2 0.0237 0.775 0.000 0.996 0.004
#> SRR1663238 3 0.6308 0.560 0.000 0.492 0.508
#> SRR1663234 2 0.1289 0.764 0.000 0.968 0.032
#> SRR1663240 3 0.6305 0.351 0.000 0.484 0.516
#> SRR1663239 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663241 1 0.4002 0.920 0.840 0.000 0.160
#> SRR1663242 3 0.5138 0.818 0.000 0.252 0.748
#> SRR1663243 3 0.5024 0.788 0.004 0.220 0.776
#> SRR1663244 2 0.1031 0.762 0.000 0.976 0.024
#> SRR1663246 2 0.6180 -0.290 0.000 0.584 0.416
#> SRR1663245 3 0.5058 0.801 0.000 0.244 0.756
#> SRR1663247 1 0.4002 0.920 0.840 0.000 0.160
#> SRR1663248 2 0.0237 0.775 0.000 0.996 0.004
#> SRR1663250 3 0.5327 0.827 0.000 0.272 0.728
#> SRR1663249 3 0.6192 0.692 0.000 0.420 0.580
#> SRR1663251 1 0.3482 0.929 0.872 0.000 0.128
#> SRR1663252 2 0.3644 0.695 0.004 0.872 0.124
#> SRR1663253 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663254 1 0.1765 0.945 0.956 0.004 0.040
#> SRR1663255 3 0.6267 0.694 0.000 0.452 0.548
#> SRR1663256 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663259 3 0.5560 0.790 0.000 0.300 0.700
#> SRR1663258 2 0.3644 0.695 0.004 0.872 0.124
#> SRR1663257 3 0.5138 0.818 0.000 0.252 0.748
#> SRR1663263 3 0.6274 0.686 0.000 0.456 0.544
#> SRR1663260 2 0.6235 -0.307 0.000 0.564 0.436
#> SRR1663262 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663261 2 0.4172 0.669 0.004 0.840 0.156
#> SRR1663265 2 0.1860 0.753 0.000 0.948 0.052
#> SRR1663266 3 0.5733 0.839 0.000 0.324 0.676
#> SRR1663267 2 0.2066 0.749 0.000 0.940 0.060
#> SRR1663264 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663268 2 0.5678 0.410 0.000 0.684 0.316
#> SRR1663269 2 0.5016 0.393 0.000 0.760 0.240
#> SRR1663271 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663270 3 0.6180 0.717 0.000 0.416 0.584
#> SRR1663273 2 0.6180 -0.290 0.000 0.584 0.416
#> SRR1663272 2 0.6180 -0.290 0.000 0.584 0.416
#> SRR1663275 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663274 1 0.0424 0.947 0.992 0.000 0.008
#> SRR1663276 1 0.0983 0.949 0.980 0.004 0.016
#> SRR1663277 1 0.0983 0.949 0.980 0.004 0.016
#> SRR1663279 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663278 3 0.5733 0.839 0.000 0.324 0.676
#> SRR1663280 3 0.5733 0.839 0.000 0.324 0.676
#> SRR1663281 2 0.6308 -0.487 0.000 0.508 0.492
#> SRR1663282 2 0.6308 -0.487 0.000 0.508 0.492
#> SRR1663283 1 0.3686 0.926 0.860 0.000 0.140
#> SRR1663284 1 0.3686 0.926 0.860 0.000 0.140
#> SRR1663286 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663287 2 0.0424 0.772 0.000 0.992 0.008
#> SRR1663288 2 0.3715 0.694 0.004 0.868 0.128
#> SRR1663291 3 0.5058 0.814 0.000 0.244 0.756
#> SRR1663289 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663290 2 0.0000 0.775 0.000 1.000 0.000
#> SRR1663285 3 0.5760 0.838 0.000 0.328 0.672
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663210 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663213 3 0.5339 0.5982 0.000 0.356 0.624 NA
#> SRR1663211 3 0.6181 0.6734 0.000 0.128 0.668 NA
#> SRR1663212 3 0.6181 0.6734 0.000 0.128 0.668 NA
#> SRR1663214 3 0.5355 0.5965 0.000 0.360 0.620 NA
#> SRR1663215 3 0.5355 0.5965 0.000 0.360 0.620 NA
#> SRR1663216 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663217 1 0.0804 0.8749 0.980 0.000 0.012 NA
#> SRR1663218 1 0.0804 0.8749 0.980 0.000 0.012 NA
#> SRR1663219 1 0.2944 0.8523 0.900 0.004 0.044 NA
#> SRR1663220 1 0.2944 0.8523 0.900 0.004 0.044 NA
#> SRR1663221 2 0.6216 0.5963 0.000 0.652 0.108 NA
#> SRR1663222 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663224 2 0.4730 0.1391 0.000 0.636 0.364 NA
#> SRR1663225 2 0.6323 0.5852 0.000 0.640 0.112 NA
#> SRR1663226 2 0.6323 0.5852 0.000 0.640 0.112 NA
#> SRR1663223 2 0.2908 0.7781 0.000 0.896 0.064 NA
#> SRR1663229 2 0.5940 0.6128 0.000 0.672 0.088 NA
#> SRR1663231 2 0.5746 0.1643 0.000 0.612 0.348 NA
#> SRR1663232 2 0.5746 0.1643 0.000 0.612 0.348 NA
#> SRR1663227 1 0.3219 0.8294 0.868 0.000 0.020 NA
#> SRR1663228 1 0.3219 0.8294 0.868 0.000 0.020 NA
#> SRR1663230 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663235 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663233 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663236 1 0.4776 0.7948 0.624 0.000 0.000 NA
#> SRR1663237 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663238 3 0.4855 0.6709 0.000 0.268 0.712 NA
#> SRR1663234 2 0.2197 0.7968 0.000 0.928 0.048 NA
#> SRR1663240 3 0.6723 0.5579 0.000 0.260 0.600 NA
#> SRR1663239 2 0.0188 0.8312 0.000 0.996 0.004 NA
#> SRR1663241 1 0.4776 0.7948 0.624 0.000 0.000 NA
#> SRR1663242 3 0.6581 0.5988 0.008 0.076 0.588 NA
#> SRR1663243 3 0.6623 0.5863 0.020 0.060 0.600 NA
#> SRR1663244 2 0.0895 0.8209 0.000 0.976 0.020 NA
#> SRR1663246 3 0.5355 0.5965 0.000 0.360 0.620 NA
#> SRR1663245 3 0.6360 0.6233 0.012 0.076 0.648 NA
#> SRR1663247 1 0.4776 0.7948 0.624 0.000 0.000 NA
#> SRR1663248 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663250 3 0.3980 0.6943 0.008 0.092 0.848 NA
#> SRR1663249 3 0.6280 0.6582 0.008 0.252 0.656 NA
#> SRR1663251 1 0.4331 0.8267 0.712 0.000 0.000 NA
#> SRR1663252 2 0.5910 0.6162 0.000 0.676 0.088 NA
#> SRR1663253 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663254 1 0.2032 0.8638 0.936 0.000 0.028 NA
#> SRR1663255 3 0.5297 0.6738 0.000 0.292 0.676 NA
#> SRR1663256 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663259 3 0.7148 0.5889 0.004 0.128 0.524 NA
#> SRR1663258 2 0.5940 0.6128 0.000 0.672 0.088 NA
#> SRR1663257 3 0.6521 0.5976 0.008 0.072 0.592 NA
#> SRR1663263 3 0.5520 0.6814 0.000 0.244 0.696 NA
#> SRR1663260 3 0.6083 0.5552 0.000 0.360 0.584 NA
#> SRR1663262 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663261 2 0.6945 0.5207 0.004 0.584 0.136 NA
#> SRR1663265 2 0.2946 0.7768 0.004 0.900 0.048 NA
#> SRR1663266 3 0.6634 0.6392 0.000 0.116 0.592 NA
#> SRR1663267 2 0.3717 0.7468 0.004 0.860 0.080 NA
#> SRR1663264 2 0.0336 0.8286 0.000 0.992 0.008 NA
#> SRR1663268 3 0.7506 0.2099 0.000 0.376 0.440 NA
#> SRR1663269 2 0.5398 -0.0766 0.000 0.580 0.404 NA
#> SRR1663271 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663270 3 0.5130 0.6868 0.004 0.212 0.740 NA
#> SRR1663273 3 0.5355 0.5965 0.000 0.360 0.620 NA
#> SRR1663272 3 0.5355 0.5965 0.000 0.360 0.620 NA
#> SRR1663275 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663274 1 0.0336 0.8746 0.992 0.000 0.008 NA
#> SRR1663276 1 0.0592 0.8751 0.984 0.000 0.016 NA
#> SRR1663277 1 0.0592 0.8751 0.984 0.000 0.016 NA
#> SRR1663279 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663278 3 0.6974 0.6299 0.000 0.152 0.564 NA
#> SRR1663280 3 0.6954 0.6364 0.000 0.152 0.568 NA
#> SRR1663281 3 0.6310 0.6315 0.004 0.288 0.628 NA
#> SRR1663282 3 0.6310 0.6315 0.004 0.288 0.628 NA
#> SRR1663283 1 0.4936 0.8253 0.700 0.000 0.020 NA
#> SRR1663284 1 0.4936 0.8253 0.700 0.000 0.020 NA
#> SRR1663286 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663287 2 0.0469 0.8272 0.000 0.988 0.012 NA
#> SRR1663288 2 0.6245 0.5921 0.000 0.648 0.108 NA
#> SRR1663291 3 0.6282 0.6091 0.008 0.064 0.624 NA
#> SRR1663289 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663290 2 0.0000 0.8336 0.000 1.000 0.000 NA
#> SRR1663285 3 0.6098 0.6715 0.000 0.124 0.676 NA
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0162 0.7806 0.000 0.996 0.000 0.004 0.000
#> SRR1663210 2 0.0162 0.7806 0.000 0.996 0.000 0.004 0.000
#> SRR1663213 3 0.3727 0.6692 0.000 0.216 0.768 0.000 0.016
#> SRR1663211 3 0.5834 -0.1405 0.000 0.036 0.500 0.032 0.432
#> SRR1663212 3 0.5834 -0.1405 0.000 0.036 0.500 0.032 0.432
#> SRR1663214 3 0.3727 0.6692 0.000 0.216 0.768 0.000 0.016
#> SRR1663215 3 0.3727 0.6692 0.000 0.216 0.768 0.000 0.016
#> SRR1663216 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663217 4 0.4706 0.8379 0.316 0.000 0.020 0.656 0.008
#> SRR1663218 4 0.4706 0.8379 0.316 0.000 0.020 0.656 0.008
#> SRR1663219 4 0.4196 0.7619 0.192 0.000 0.024 0.768 0.016
#> SRR1663220 4 0.4196 0.7619 0.192 0.000 0.024 0.768 0.016
#> SRR1663221 2 0.7937 0.4081 0.000 0.464 0.164 0.172 0.200
#> SRR1663222 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663224 2 0.4632 -0.2012 0.000 0.540 0.448 0.012 0.000
#> SRR1663225 2 0.7956 0.4039 0.000 0.460 0.160 0.176 0.204
#> SRR1663226 2 0.7956 0.4039 0.000 0.460 0.160 0.176 0.204
#> SRR1663223 2 0.4128 0.6731 0.000 0.816 0.096 0.036 0.052
#> SRR1663229 2 0.7735 0.4391 0.000 0.492 0.136 0.172 0.200
#> SRR1663231 2 0.6119 -0.2056 0.000 0.492 0.420 0.032 0.056
#> SRR1663232 2 0.6119 -0.2056 0.000 0.492 0.420 0.032 0.056
#> SRR1663227 4 0.5701 0.7341 0.268 0.000 0.060 0.640 0.032
#> SRR1663228 4 0.5701 0.7341 0.268 0.000 0.060 0.640 0.032
#> SRR1663230 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663235 2 0.0162 0.7806 0.000 0.996 0.000 0.004 0.000
#> SRR1663233 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663236 1 0.0880 0.8099 0.968 0.000 0.000 0.032 0.000
#> SRR1663237 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663238 3 0.3521 0.6488 0.000 0.140 0.820 0.000 0.040
#> SRR1663234 2 0.4253 0.6620 0.000 0.812 0.080 0.044 0.064
#> SRR1663240 3 0.5131 0.5526 0.000 0.128 0.744 0.040 0.088
#> SRR1663239 2 0.0162 0.7791 0.000 0.996 0.004 0.000 0.000
#> SRR1663241 1 0.0880 0.8099 0.968 0.000 0.000 0.032 0.000
#> SRR1663242 5 0.3256 0.8268 0.000 0.016 0.148 0.004 0.832
#> SRR1663243 5 0.6180 0.5434 0.000 0.016 0.304 0.112 0.568
#> SRR1663244 2 0.1095 0.7649 0.000 0.968 0.008 0.012 0.012
#> SRR1663246 3 0.3727 0.6692 0.000 0.216 0.768 0.000 0.016
#> SRR1663245 5 0.6208 0.4779 0.000 0.016 0.336 0.104 0.544
#> SRR1663247 1 0.0880 0.8099 0.968 0.000 0.000 0.032 0.000
#> SRR1663248 2 0.0162 0.7806 0.000 0.996 0.000 0.004 0.000
#> SRR1663250 3 0.5688 0.3695 0.000 0.028 0.660 0.080 0.232
#> SRR1663249 3 0.7220 0.4419 0.000 0.136 0.560 0.120 0.184
#> SRR1663251 1 0.3366 0.5773 0.768 0.000 0.000 0.232 0.000
#> SRR1663252 2 0.7689 0.4459 0.000 0.500 0.136 0.172 0.192
#> SRR1663253 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663254 4 0.4103 0.7987 0.228 0.000 0.012 0.748 0.012
#> SRR1663255 3 0.6655 0.5428 0.000 0.252 0.532 0.016 0.200
#> SRR1663256 2 0.0162 0.7797 0.000 0.996 0.000 0.004 0.000
#> SRR1663259 5 0.3276 0.8170 0.000 0.032 0.132 0.000 0.836
#> SRR1663258 2 0.7656 0.4494 0.000 0.504 0.132 0.172 0.192
#> SRR1663257 5 0.3256 0.8268 0.000 0.016 0.148 0.004 0.832
#> SRR1663263 3 0.5137 0.6067 0.000 0.152 0.724 0.016 0.108
#> SRR1663260 3 0.5522 0.6088 0.000 0.164 0.708 0.048 0.080
#> SRR1663262 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663261 2 0.8503 0.2209 0.000 0.332 0.224 0.236 0.208
#> SRR1663265 2 0.4507 0.6244 0.000 0.776 0.100 0.112 0.012
#> SRR1663266 5 0.4402 0.8129 0.000 0.056 0.172 0.008 0.764
#> SRR1663267 2 0.5880 0.5419 0.000 0.692 0.116 0.124 0.068
#> SRR1663264 2 0.0703 0.7648 0.000 0.976 0.024 0.000 0.000
#> SRR1663268 3 0.6934 0.3719 0.000 0.184 0.588 0.096 0.132
#> SRR1663269 3 0.4375 0.4529 0.000 0.420 0.576 0.000 0.004
#> SRR1663271 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663270 3 0.5970 0.5264 0.000 0.084 0.684 0.088 0.144
#> SRR1663273 3 0.3727 0.6692 0.000 0.216 0.768 0.000 0.016
#> SRR1663272 3 0.3727 0.6692 0.000 0.216 0.768 0.000 0.016
#> SRR1663275 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663274 4 0.4235 0.8211 0.336 0.000 0.008 0.656 0.000
#> SRR1663276 4 0.4422 0.8362 0.320 0.000 0.012 0.664 0.004
#> SRR1663277 4 0.4422 0.8362 0.320 0.000 0.012 0.664 0.004
#> SRR1663279 2 0.0162 0.7797 0.000 0.996 0.000 0.004 0.000
#> SRR1663278 5 0.4661 0.8051 0.000 0.076 0.156 0.012 0.756
#> SRR1663280 5 0.4738 0.8007 0.000 0.076 0.164 0.012 0.748
#> SRR1663281 3 0.6703 0.5235 0.000 0.120 0.620 0.112 0.148
#> SRR1663282 3 0.6703 0.5235 0.000 0.120 0.620 0.112 0.148
#> SRR1663283 1 0.4261 0.6957 0.764 0.000 0.012 0.192 0.032
#> SRR1663284 1 0.4261 0.6957 0.764 0.000 0.012 0.192 0.032
#> SRR1663286 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663287 2 0.0404 0.7767 0.000 0.988 0.012 0.000 0.000
#> SRR1663288 2 0.7935 0.4082 0.000 0.464 0.160 0.176 0.200
#> SRR1663291 5 0.3907 0.8196 0.000 0.016 0.180 0.016 0.788
#> SRR1663289 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.7810 0.000 1.000 0.000 0.000 0.000
#> SRR1663285 3 0.5439 -0.0975 0.000 0.036 0.520 0.012 0.432
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663213 3 0.3715 0.645 0.000 0.164 0.792 0.012 0.020 0.012
#> SRR1663211 5 0.5921 0.435 0.000 0.004 0.372 0.072 0.508 0.044
#> SRR1663212 5 0.5921 0.435 0.000 0.004 0.372 0.072 0.508 0.044
#> SRR1663214 3 0.3715 0.645 0.000 0.164 0.792 0.012 0.020 0.012
#> SRR1663215 3 0.3715 0.645 0.000 0.164 0.792 0.012 0.020 0.012
#> SRR1663216 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663217 1 0.1129 0.727 0.964 0.000 0.012 0.004 0.008 0.012
#> SRR1663218 1 0.1129 0.727 0.964 0.000 0.012 0.004 0.008 0.012
#> SRR1663219 1 0.4500 0.649 0.780 0.000 0.036 0.088 0.024 0.072
#> SRR1663220 1 0.4500 0.649 0.780 0.000 0.036 0.088 0.024 0.072
#> SRR1663221 6 0.4329 0.941 0.000 0.240 0.056 0.000 0.004 0.700
#> SRR1663222 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663224 2 0.5207 -0.269 0.000 0.508 0.428 0.044 0.004 0.016
#> SRR1663225 6 0.4418 0.937 0.000 0.232 0.056 0.004 0.004 0.704
#> SRR1663226 6 0.4418 0.937 0.000 0.232 0.056 0.004 0.004 0.704
#> SRR1663223 2 0.5792 0.465 0.000 0.680 0.128 0.092 0.032 0.068
#> SRR1663229 6 0.4139 0.934 0.000 0.260 0.036 0.000 0.004 0.700
#> SRR1663231 3 0.6869 0.534 0.000 0.336 0.480 0.060 0.052 0.072
#> SRR1663232 3 0.6869 0.534 0.000 0.336 0.480 0.060 0.052 0.072
#> SRR1663227 1 0.3410 0.588 0.768 0.000 0.008 0.008 0.000 0.216
#> SRR1663228 1 0.3410 0.588 0.768 0.000 0.008 0.008 0.000 0.216
#> SRR1663230 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663233 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663236 4 0.3547 0.849 0.332 0.000 0.000 0.668 0.000 0.000
#> SRR1663237 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663238 3 0.3078 0.631 0.000 0.112 0.844 0.000 0.032 0.012
#> SRR1663234 2 0.6138 0.449 0.000 0.656 0.104 0.088 0.040 0.112
#> SRR1663240 3 0.5626 0.578 0.000 0.068 0.668 0.040 0.032 0.192
#> SRR1663239 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663241 4 0.3547 0.849 0.332 0.000 0.000 0.668 0.000 0.000
#> SRR1663242 5 0.2212 0.734 0.000 0.004 0.048 0.016 0.912 0.020
#> SRR1663243 5 0.7570 0.270 0.020 0.000 0.204 0.144 0.444 0.188
#> SRR1663244 2 0.0935 0.851 0.000 0.964 0.000 0.004 0.032 0.000
#> SRR1663246 3 0.3715 0.645 0.000 0.164 0.792 0.012 0.020 0.012
#> SRR1663245 5 0.7786 0.148 0.016 0.004 0.260 0.140 0.392 0.188
#> SRR1663247 4 0.3547 0.849 0.332 0.000 0.000 0.668 0.000 0.000
#> SRR1663248 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663250 3 0.7056 0.359 0.012 0.008 0.540 0.124 0.176 0.140
#> SRR1663249 3 0.8124 0.384 0.016 0.060 0.460 0.152 0.136 0.176
#> SRR1663251 1 0.3854 -0.573 0.536 0.000 0.000 0.464 0.000 0.000
#> SRR1663252 6 0.4204 0.935 0.000 0.260 0.040 0.000 0.004 0.696
#> SRR1663253 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663254 1 0.3129 0.697 0.864 0.000 0.028 0.064 0.008 0.036
#> SRR1663255 3 0.7504 0.468 0.000 0.232 0.424 0.060 0.244 0.040
#> SRR1663256 2 0.0291 0.880 0.000 0.992 0.004 0.004 0.000 0.000
#> SRR1663259 5 0.2486 0.725 0.000 0.008 0.048 0.016 0.900 0.028
#> SRR1663258 6 0.4363 0.931 0.000 0.264 0.040 0.004 0.004 0.688
#> SRR1663257 5 0.2212 0.734 0.000 0.004 0.048 0.016 0.912 0.020
#> SRR1663263 3 0.4988 0.553 0.000 0.116 0.732 0.044 0.096 0.012
#> SRR1663260 3 0.6008 0.573 0.000 0.088 0.672 0.100 0.048 0.092
#> SRR1663262 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663261 6 0.4983 0.681 0.000 0.132 0.080 0.052 0.008 0.728
#> SRR1663265 2 0.6666 0.313 0.012 0.584 0.124 0.144 0.004 0.132
#> SRR1663266 5 0.1493 0.738 0.000 0.004 0.056 0.004 0.936 0.000
#> SRR1663267 2 0.7943 0.136 0.016 0.480 0.148 0.156 0.048 0.152
#> SRR1663264 2 0.1285 0.828 0.000 0.944 0.052 0.004 0.000 0.000
#> SRR1663268 3 0.6703 0.320 0.000 0.072 0.472 0.072 0.028 0.356
#> SRR1663269 3 0.3925 0.569 0.000 0.332 0.656 0.000 0.008 0.004
#> SRR1663271 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663270 3 0.7360 0.444 0.016 0.036 0.548 0.144 0.112 0.144
#> SRR1663273 3 0.3715 0.645 0.000 0.164 0.792 0.012 0.020 0.012
#> SRR1663272 3 0.3715 0.645 0.000 0.164 0.792 0.012 0.020 0.012
#> SRR1663275 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663274 1 0.0146 0.723 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1663276 1 0.1180 0.721 0.960 0.000 0.008 0.004 0.004 0.024
#> SRR1663277 1 0.1180 0.721 0.960 0.000 0.008 0.004 0.004 0.024
#> SRR1663279 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663278 5 0.1605 0.736 0.000 0.016 0.044 0.004 0.936 0.000
#> SRR1663280 5 0.1605 0.736 0.000 0.016 0.044 0.004 0.936 0.000
#> SRR1663281 3 0.7692 0.454 0.016 0.056 0.520 0.144 0.112 0.152
#> SRR1663282 3 0.7692 0.454 0.016 0.056 0.520 0.144 0.112 0.152
#> SRR1663283 4 0.5796 0.753 0.376 0.000 0.028 0.524 0.020 0.052
#> SRR1663284 4 0.5796 0.753 0.376 0.000 0.028 0.524 0.020 0.052
#> SRR1663286 2 0.0000 0.883 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663287 2 0.0146 0.879 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1663288 6 0.4329 0.941 0.000 0.240 0.056 0.000 0.004 0.700
#> SRR1663291 5 0.2867 0.721 0.000 0.004 0.076 0.032 0.872 0.016
#> SRR1663289 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663290 2 0.0146 0.883 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663285 5 0.5307 0.392 0.000 0.004 0.404 0.048 0.524 0.020
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 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 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.878 0.936 0.971 0.4054 0.606 0.606
#> 3 3 0.873 0.904 0.947 0.6075 0.669 0.484
#> 4 4 0.747 0.789 0.888 0.1243 0.901 0.725
#> 5 5 0.832 0.841 0.915 0.0717 0.922 0.724
#> 6 6 0.878 0.858 0.925 0.0483 0.929 0.691
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
#> SRR1663209 2 0.000 0.9681 0.000 1.000
#> SRR1663210 2 0.000 0.9681 0.000 1.000
#> SRR1663213 2 0.000 0.9681 0.000 1.000
#> SRR1663211 2 0.000 0.9681 0.000 1.000
#> SRR1663212 2 0.000 0.9681 0.000 1.000
#> SRR1663214 2 0.000 0.9681 0.000 1.000
#> SRR1663215 2 0.000 0.9681 0.000 1.000
#> SRR1663216 2 0.000 0.9681 0.000 1.000
#> SRR1663217 1 0.000 0.9730 1.000 0.000
#> SRR1663218 1 0.000 0.9730 1.000 0.000
#> SRR1663219 1 0.000 0.9730 1.000 0.000
#> SRR1663220 1 0.000 0.9730 1.000 0.000
#> SRR1663221 2 0.118 0.9576 0.016 0.984
#> SRR1663222 2 0.000 0.9681 0.000 1.000
#> SRR1663224 2 0.000 0.9681 0.000 1.000
#> SRR1663225 1 0.141 0.9560 0.980 0.020
#> SRR1663226 1 0.141 0.9560 0.980 0.020
#> SRR1663223 2 0.000 0.9681 0.000 1.000
#> SRR1663229 2 0.615 0.8342 0.152 0.848
#> SRR1663231 2 0.000 0.9681 0.000 1.000
#> SRR1663232 2 0.000 0.9681 0.000 1.000
#> SRR1663227 1 0.000 0.9730 1.000 0.000
#> SRR1663228 1 0.000 0.9730 1.000 0.000
#> SRR1663230 2 0.000 0.9681 0.000 1.000
#> SRR1663235 2 0.000 0.9681 0.000 1.000
#> SRR1663233 2 0.000 0.9681 0.000 1.000
#> SRR1663236 1 0.000 0.9730 1.000 0.000
#> SRR1663237 2 0.000 0.9681 0.000 1.000
#> SRR1663238 2 0.000 0.9681 0.000 1.000
#> SRR1663234 2 0.000 0.9681 0.000 1.000
#> SRR1663240 2 0.767 0.7461 0.224 0.776
#> SRR1663239 2 0.000 0.9681 0.000 1.000
#> SRR1663241 1 0.000 0.9730 1.000 0.000
#> SRR1663242 2 0.753 0.7589 0.216 0.784
#> SRR1663243 1 0.000 0.9730 1.000 0.000
#> SRR1663244 2 0.000 0.9681 0.000 1.000
#> SRR1663246 2 0.000 0.9681 0.000 1.000
#> SRR1663245 2 0.775 0.7415 0.228 0.772
#> SRR1663247 1 0.000 0.9730 1.000 0.000
#> SRR1663248 2 0.000 0.9681 0.000 1.000
#> SRR1663250 2 0.722 0.7806 0.200 0.800
#> SRR1663249 2 0.634 0.8295 0.160 0.840
#> SRR1663251 1 0.000 0.9730 1.000 0.000
#> SRR1663252 2 0.000 0.9681 0.000 1.000
#> SRR1663253 2 0.000 0.9681 0.000 1.000
#> SRR1663254 1 0.000 0.9730 1.000 0.000
#> SRR1663255 2 0.000 0.9681 0.000 1.000
#> SRR1663256 2 0.000 0.9681 0.000 1.000
#> SRR1663259 2 0.706 0.7901 0.192 0.808
#> SRR1663258 2 0.615 0.8346 0.152 0.848
#> SRR1663257 1 0.000 0.9730 1.000 0.000
#> SRR1663263 2 0.000 0.9681 0.000 1.000
#> SRR1663260 2 0.000 0.9681 0.000 1.000
#> SRR1663262 2 0.000 0.9681 0.000 1.000
#> SRR1663261 1 1.000 -0.0649 0.512 0.488
#> SRR1663265 2 0.000 0.9681 0.000 1.000
#> SRR1663266 2 0.000 0.9681 0.000 1.000
#> SRR1663267 2 0.224 0.9427 0.036 0.964
#> SRR1663264 2 0.000 0.9681 0.000 1.000
#> SRR1663268 2 0.000 0.9681 0.000 1.000
#> SRR1663269 2 0.000 0.9681 0.000 1.000
#> SRR1663271 2 0.000 0.9681 0.000 1.000
#> SRR1663270 2 0.118 0.9575 0.016 0.984
#> SRR1663273 2 0.000 0.9681 0.000 1.000
#> SRR1663272 2 0.000 0.9681 0.000 1.000
#> SRR1663275 2 0.000 0.9681 0.000 1.000
#> SRR1663274 1 0.000 0.9730 1.000 0.000
#> SRR1663276 1 0.000 0.9730 1.000 0.000
#> SRR1663277 1 0.000 0.9730 1.000 0.000
#> SRR1663279 2 0.000 0.9681 0.000 1.000
#> SRR1663278 2 0.000 0.9681 0.000 1.000
#> SRR1663280 2 0.000 0.9681 0.000 1.000
#> SRR1663281 2 0.278 0.9339 0.048 0.952
#> SRR1663282 2 0.278 0.9339 0.048 0.952
#> SRR1663283 1 0.000 0.9730 1.000 0.000
#> SRR1663284 1 0.000 0.9730 1.000 0.000
#> SRR1663286 2 0.000 0.9681 0.000 1.000
#> SRR1663287 2 0.000 0.9681 0.000 1.000
#> SRR1663288 2 0.615 0.8342 0.152 0.848
#> SRR1663291 1 0.000 0.9730 1.000 0.000
#> SRR1663289 2 0.000 0.9681 0.000 1.000
#> SRR1663290 2 0.000 0.9681 0.000 1.000
#> SRR1663285 2 0.000 0.9681 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663210 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663213 3 0.2165 0.884 0.000 0.064 0.936
#> SRR1663211 3 0.0424 0.892 0.000 0.008 0.992
#> SRR1663212 3 0.0424 0.892 0.000 0.008 0.992
#> SRR1663214 3 0.2165 0.884 0.000 0.064 0.936
#> SRR1663215 3 0.2165 0.884 0.000 0.064 0.936
#> SRR1663216 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663217 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663218 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663219 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663220 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663221 2 0.0848 0.963 0.008 0.984 0.008
#> SRR1663222 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663224 3 0.3412 0.848 0.000 0.124 0.876
#> SRR1663225 2 0.3755 0.866 0.120 0.872 0.008
#> SRR1663226 2 0.3755 0.866 0.120 0.872 0.008
#> SRR1663223 2 0.1529 0.946 0.000 0.960 0.040
#> SRR1663229 2 0.1315 0.956 0.020 0.972 0.008
#> SRR1663231 3 0.5363 0.690 0.000 0.276 0.724
#> SRR1663232 3 0.5363 0.690 0.000 0.276 0.724
#> SRR1663227 1 0.0661 0.967 0.988 0.004 0.008
#> SRR1663228 1 0.0661 0.967 0.988 0.004 0.008
#> SRR1663230 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663235 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663233 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663236 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663237 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663238 3 0.0424 0.892 0.000 0.008 0.992
#> SRR1663234 2 0.1163 0.959 0.000 0.972 0.028
#> SRR1663240 3 0.2550 0.875 0.040 0.024 0.936
#> SRR1663239 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663241 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663242 3 0.1031 0.883 0.024 0.000 0.976
#> SRR1663243 1 0.1163 0.950 0.972 0.000 0.028
#> SRR1663244 2 0.2066 0.942 0.000 0.940 0.060
#> SRR1663246 3 0.2165 0.884 0.000 0.064 0.936
#> SRR1663245 3 0.3129 0.843 0.088 0.008 0.904
#> SRR1663247 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663248 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663250 3 0.0892 0.884 0.020 0.000 0.980
#> SRR1663249 3 0.3528 0.839 0.092 0.016 0.892
#> SRR1663251 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663252 2 0.0424 0.966 0.000 0.992 0.008
#> SRR1663253 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663254 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663255 3 0.0424 0.892 0.000 0.008 0.992
#> SRR1663256 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663259 3 0.6483 0.380 0.008 0.392 0.600
#> SRR1663258 2 0.1315 0.956 0.020 0.972 0.008
#> SRR1663257 3 0.4887 0.671 0.228 0.000 0.772
#> SRR1663263 3 0.0424 0.892 0.000 0.008 0.992
#> SRR1663260 3 0.0592 0.886 0.000 0.012 0.988
#> SRR1663262 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663261 2 0.4808 0.775 0.188 0.804 0.008
#> SRR1663265 2 0.0237 0.971 0.000 0.996 0.004
#> SRR1663266 3 0.0424 0.892 0.000 0.008 0.992
#> SRR1663267 2 0.1877 0.950 0.012 0.956 0.032
#> SRR1663264 2 0.0747 0.972 0.000 0.984 0.016
#> SRR1663268 3 0.5882 0.537 0.000 0.348 0.652
#> SRR1663269 3 0.4605 0.782 0.000 0.204 0.796
#> SRR1663271 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663270 3 0.0848 0.888 0.008 0.008 0.984
#> SRR1663273 3 0.2165 0.884 0.000 0.064 0.936
#> SRR1663272 3 0.2165 0.884 0.000 0.064 0.936
#> SRR1663275 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663274 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663276 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663277 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663279 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663278 3 0.5497 0.611 0.000 0.292 0.708
#> SRR1663280 3 0.0424 0.892 0.000 0.008 0.992
#> SRR1663281 3 0.1015 0.886 0.012 0.008 0.980
#> SRR1663282 3 0.1015 0.886 0.012 0.008 0.980
#> SRR1663283 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663284 1 0.0000 0.975 1.000 0.000 0.000
#> SRR1663286 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663287 2 0.0000 0.970 0.000 1.000 0.000
#> SRR1663288 2 0.1585 0.951 0.028 0.964 0.008
#> SRR1663291 1 0.5926 0.440 0.644 0.000 0.356
#> SRR1663289 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663290 2 0.0592 0.974 0.000 0.988 0.012
#> SRR1663285 3 0.0424 0.892 0.000 0.008 0.992
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663210 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663213 3 0.3117 0.742 0.000 0.092 0.880 0.028
#> SRR1663211 3 0.2408 0.731 0.000 0.000 0.896 0.104
#> SRR1663212 3 0.2408 0.731 0.000 0.000 0.896 0.104
#> SRR1663214 3 0.3117 0.742 0.000 0.092 0.880 0.028
#> SRR1663215 3 0.3117 0.742 0.000 0.092 0.880 0.028
#> SRR1663216 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663217 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663218 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663219 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663221 4 0.2704 0.891 0.000 0.124 0.000 0.876
#> SRR1663222 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663224 3 0.5016 0.436 0.000 0.396 0.600 0.004
#> SRR1663225 4 0.3143 0.876 0.024 0.100 0.000 0.876
#> SRR1663226 4 0.2987 0.881 0.016 0.104 0.000 0.880
#> SRR1663223 2 0.3439 0.831 0.000 0.868 0.048 0.084
#> SRR1663229 4 0.2704 0.891 0.000 0.124 0.000 0.876
#> SRR1663231 3 0.7564 0.185 0.000 0.208 0.464 0.328
#> SRR1663232 3 0.7576 0.190 0.000 0.212 0.464 0.324
#> SRR1663227 1 0.2921 0.822 0.860 0.000 0.000 0.140
#> SRR1663228 1 0.2921 0.822 0.860 0.000 0.000 0.140
#> SRR1663230 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663235 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663233 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663236 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663237 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663238 3 0.1022 0.751 0.000 0.000 0.968 0.032
#> SRR1663234 2 0.1520 0.925 0.000 0.956 0.020 0.024
#> SRR1663240 3 0.4955 0.205 0.000 0.000 0.556 0.444
#> SRR1663239 2 0.0188 0.951 0.000 0.996 0.004 0.000
#> SRR1663241 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663242 3 0.5381 0.525 0.008 0.016 0.656 0.320
#> SRR1663243 1 0.1936 0.902 0.940 0.000 0.028 0.032
#> SRR1663244 2 0.2198 0.879 0.000 0.920 0.072 0.008
#> SRR1663246 3 0.3117 0.742 0.000 0.092 0.880 0.028
#> SRR1663245 3 0.6350 0.483 0.092 0.000 0.612 0.296
#> SRR1663247 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663248 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663250 3 0.1211 0.750 0.000 0.000 0.960 0.040
#> SRR1663249 3 0.7038 0.592 0.092 0.160 0.672 0.076
#> SRR1663251 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663252 4 0.2704 0.891 0.000 0.124 0.000 0.876
#> SRR1663253 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663254 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663255 3 0.3525 0.724 0.000 0.040 0.860 0.100
#> SRR1663256 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663259 4 0.5421 0.230 0.008 0.016 0.328 0.648
#> SRR1663258 4 0.2704 0.891 0.000 0.124 0.000 0.876
#> SRR1663257 3 0.6106 0.457 0.064 0.000 0.604 0.332
#> SRR1663263 3 0.0336 0.753 0.000 0.000 0.992 0.008
#> SRR1663260 3 0.2530 0.725 0.000 0.000 0.888 0.112
#> SRR1663262 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663261 4 0.2589 0.887 0.000 0.116 0.000 0.884
#> SRR1663265 2 0.1389 0.919 0.000 0.952 0.000 0.048
#> SRR1663266 3 0.5314 0.648 0.000 0.144 0.748 0.108
#> SRR1663267 2 0.2060 0.903 0.000 0.932 0.016 0.052
#> SRR1663264 2 0.1109 0.925 0.000 0.968 0.028 0.004
#> SRR1663268 4 0.4431 0.448 0.000 0.000 0.304 0.696
#> SRR1663269 3 0.5403 0.481 0.000 0.348 0.628 0.024
#> SRR1663271 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663270 3 0.1302 0.750 0.000 0.000 0.956 0.044
#> SRR1663273 3 0.3117 0.742 0.000 0.092 0.880 0.028
#> SRR1663272 3 0.3117 0.742 0.000 0.092 0.880 0.028
#> SRR1663275 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663274 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663276 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663277 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663279 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663278 2 0.6926 -0.125 0.000 0.460 0.432 0.108
#> SRR1663280 3 0.6352 0.513 0.000 0.260 0.632 0.108
#> SRR1663281 3 0.0921 0.752 0.000 0.000 0.972 0.028
#> SRR1663282 3 0.0921 0.752 0.000 0.000 0.972 0.028
#> SRR1663283 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663284 1 0.0000 0.948 1.000 0.000 0.000 0.000
#> SRR1663286 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663287 2 0.1302 0.921 0.000 0.956 0.000 0.044
#> SRR1663288 4 0.2704 0.891 0.000 0.124 0.000 0.876
#> SRR1663291 1 0.6797 0.237 0.536 0.000 0.356 0.108
#> SRR1663289 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663290 2 0.0000 0.954 0.000 1.000 0.000 0.000
#> SRR1663285 3 0.2408 0.731 0.000 0.000 0.896 0.104
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663213 3 0.1883 0.830 0.008 0.048 0.932 0.000 0.012
#> SRR1663211 5 0.3480 0.694 0.000 0.000 0.248 0.000 0.752
#> SRR1663212 5 0.3480 0.694 0.000 0.000 0.248 0.000 0.752
#> SRR1663214 3 0.1883 0.830 0.008 0.048 0.932 0.000 0.012
#> SRR1663215 3 0.1883 0.830 0.008 0.048 0.932 0.000 0.012
#> SRR1663216 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663217 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663218 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663219 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663220 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663221 1 0.0727 0.938 0.980 0.012 0.004 0.000 0.004
#> SRR1663222 2 0.0162 0.961 0.000 0.996 0.000 0.000 0.004
#> SRR1663224 3 0.4153 0.653 0.004 0.240 0.736 0.000 0.020
#> SRR1663225 1 0.0727 0.938 0.980 0.012 0.004 0.000 0.004
#> SRR1663226 1 0.0727 0.938 0.980 0.012 0.004 0.000 0.004
#> SRR1663223 2 0.4486 0.780 0.024 0.784 0.068 0.000 0.124
#> SRR1663229 1 0.0671 0.937 0.980 0.016 0.000 0.000 0.004
#> SRR1663231 3 0.4915 0.752 0.120 0.096 0.756 0.000 0.028
#> SRR1663232 3 0.4915 0.752 0.120 0.096 0.756 0.000 0.028
#> SRR1663227 4 0.2813 0.794 0.168 0.000 0.000 0.832 0.000
#> SRR1663228 4 0.2813 0.794 0.168 0.000 0.000 0.832 0.000
#> SRR1663230 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663233 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663236 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663237 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663238 3 0.0771 0.811 0.004 0.000 0.976 0.000 0.020
#> SRR1663234 2 0.3388 0.866 0.020 0.860 0.064 0.000 0.056
#> SRR1663240 3 0.3662 0.633 0.252 0.000 0.744 0.000 0.004
#> SRR1663239 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663241 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663242 5 0.0932 0.816 0.020 0.004 0.004 0.000 0.972
#> SRR1663243 4 0.5392 0.480 0.008 0.000 0.068 0.636 0.288
#> SRR1663244 2 0.2561 0.838 0.000 0.856 0.000 0.000 0.144
#> SRR1663246 3 0.1883 0.830 0.008 0.048 0.932 0.000 0.012
#> SRR1663245 5 0.5824 0.443 0.040 0.000 0.288 0.052 0.620
#> SRR1663247 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663248 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663250 3 0.4696 0.171 0.016 0.000 0.556 0.000 0.428
#> SRR1663249 5 0.6677 0.183 0.024 0.040 0.376 0.048 0.512
#> SRR1663251 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663252 1 0.0510 0.936 0.984 0.016 0.000 0.000 0.000
#> SRR1663253 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663254 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663255 5 0.3060 0.776 0.000 0.024 0.128 0.000 0.848
#> SRR1663256 2 0.0324 0.959 0.000 0.992 0.004 0.000 0.004
#> SRR1663259 5 0.1502 0.802 0.056 0.004 0.000 0.000 0.940
#> SRR1663258 1 0.0609 0.933 0.980 0.020 0.000 0.000 0.000
#> SRR1663257 5 0.1356 0.813 0.028 0.000 0.004 0.012 0.956
#> SRR1663263 3 0.2329 0.759 0.000 0.000 0.876 0.000 0.124
#> SRR1663260 3 0.1485 0.796 0.020 0.000 0.948 0.000 0.032
#> SRR1663262 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663261 1 0.0898 0.906 0.972 0.000 0.008 0.000 0.020
#> SRR1663265 2 0.3164 0.871 0.020 0.872 0.068 0.000 0.040
#> SRR1663266 5 0.1041 0.817 0.000 0.032 0.004 0.000 0.964
#> SRR1663267 2 0.3907 0.840 0.032 0.832 0.068 0.000 0.068
#> SRR1663264 2 0.1892 0.894 0.000 0.916 0.080 0.000 0.004
#> SRR1663268 1 0.4655 0.391 0.644 0.000 0.328 0.000 0.028
#> SRR1663269 3 0.2074 0.804 0.000 0.104 0.896 0.000 0.000
#> SRR1663271 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663270 3 0.4206 0.508 0.016 0.000 0.696 0.000 0.288
#> SRR1663273 3 0.1883 0.830 0.008 0.048 0.932 0.000 0.012
#> SRR1663272 3 0.1883 0.830 0.008 0.048 0.932 0.000 0.012
#> SRR1663275 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663274 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663276 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663277 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663279 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663278 5 0.1043 0.814 0.000 0.040 0.000 0.000 0.960
#> SRR1663280 5 0.1041 0.817 0.000 0.032 0.004 0.000 0.964
#> SRR1663281 3 0.3236 0.721 0.020 0.000 0.828 0.000 0.152
#> SRR1663282 3 0.3236 0.721 0.020 0.000 0.828 0.000 0.152
#> SRR1663283 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663284 4 0.0000 0.955 0.000 0.000 0.000 1.000 0.000
#> SRR1663286 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663287 2 0.0880 0.943 0.032 0.968 0.000 0.000 0.000
#> SRR1663288 1 0.0727 0.938 0.980 0.012 0.004 0.000 0.004
#> SRR1663291 5 0.1892 0.790 0.000 0.000 0.004 0.080 0.916
#> SRR1663289 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.963 0.000 1.000 0.000 0.000 0.000
#> SRR1663285 5 0.3534 0.686 0.000 0.000 0.256 0.000 0.744
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0363 0.9683 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1663210 2 0.0363 0.9683 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1663213 3 0.0260 0.8647 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR1663211 5 0.2581 0.8730 0.000 0.000 0.128 0.016 0.856 0.000
#> SRR1663212 5 0.2581 0.8730 0.000 0.000 0.128 0.016 0.856 0.000
#> SRR1663214 3 0.0000 0.8663 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663215 3 0.0000 0.8663 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663216 2 0.0146 0.9709 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663217 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663218 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663219 1 0.0146 0.9739 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1663220 1 0.0146 0.9739 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1663221 6 0.0000 0.9396 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663222 2 0.0260 0.9684 0.000 0.992 0.000 0.008 0.000 0.000
#> SRR1663224 3 0.5838 0.0829 0.000 0.368 0.440 0.192 0.000 0.000
#> SRR1663225 6 0.0000 0.9396 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663226 6 0.0000 0.9396 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663223 4 0.4464 0.3899 0.000 0.392 0.000 0.580 0.020 0.008
#> SRR1663229 6 0.0000 0.9396 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663231 3 0.4754 0.6909 0.000 0.028 0.728 0.184 0.024 0.036
#> SRR1663232 3 0.4798 0.6922 0.000 0.028 0.728 0.180 0.028 0.036
#> SRR1663227 1 0.2416 0.8221 0.844 0.000 0.000 0.000 0.000 0.156
#> SRR1663228 1 0.2416 0.8221 0.844 0.000 0.000 0.000 0.000 0.156
#> SRR1663230 2 0.0146 0.9709 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663235 2 0.0363 0.9683 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1663233 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663236 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663237 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663238 3 0.0458 0.8624 0.000 0.000 0.984 0.016 0.000 0.000
#> SRR1663234 4 0.3448 0.5912 0.000 0.280 0.000 0.716 0.004 0.000
#> SRR1663240 3 0.2730 0.7474 0.000 0.000 0.836 0.012 0.000 0.152
#> SRR1663239 2 0.0363 0.9648 0.000 0.988 0.012 0.000 0.000 0.000
#> SRR1663241 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663242 5 0.0363 0.9270 0.000 0.000 0.000 0.012 0.988 0.000
#> SRR1663243 4 0.5024 0.3752 0.340 0.000 0.000 0.572 0.088 0.000
#> SRR1663244 2 0.3245 0.6857 0.000 0.764 0.000 0.008 0.228 0.000
#> SRR1663246 3 0.0000 0.8663 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663245 4 0.2748 0.7128 0.000 0.000 0.024 0.848 0.128 0.000
#> SRR1663247 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663248 2 0.0363 0.9683 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1663250 4 0.5123 0.5401 0.000 0.000 0.188 0.628 0.184 0.000
#> SRR1663249 4 0.0922 0.7358 0.000 0.004 0.004 0.968 0.024 0.000
#> SRR1663251 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663252 6 0.0000 0.9396 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663253 2 0.0146 0.9709 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663254 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663255 5 0.2333 0.8960 0.000 0.004 0.040 0.060 0.896 0.000
#> SRR1663256 2 0.0405 0.9662 0.000 0.988 0.004 0.008 0.000 0.000
#> SRR1663259 5 0.1408 0.9086 0.000 0.000 0.000 0.020 0.944 0.036
#> SRR1663258 6 0.0000 0.9396 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663257 5 0.0260 0.9274 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1663263 3 0.2404 0.7688 0.000 0.000 0.872 0.016 0.112 0.000
#> SRR1663260 4 0.3747 0.3701 0.000 0.000 0.396 0.604 0.000 0.000
#> SRR1663262 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663261 6 0.1556 0.8843 0.000 0.000 0.000 0.080 0.000 0.920
#> SRR1663265 4 0.2491 0.6999 0.000 0.164 0.000 0.836 0.000 0.000
#> SRR1663266 5 0.0363 0.9294 0.000 0.000 0.000 0.012 0.988 0.000
#> SRR1663267 4 0.1429 0.7360 0.000 0.052 0.000 0.940 0.004 0.004
#> SRR1663264 2 0.2302 0.8385 0.000 0.872 0.120 0.008 0.000 0.000
#> SRR1663268 6 0.5364 0.4228 0.000 0.000 0.172 0.244 0.000 0.584
#> SRR1663269 3 0.0622 0.8597 0.000 0.012 0.980 0.008 0.000 0.000
#> SRR1663271 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663270 4 0.2667 0.7213 0.000 0.000 0.128 0.852 0.020 0.000
#> SRR1663273 3 0.0000 0.8663 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663272 3 0.0000 0.8663 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663275 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663274 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663276 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663277 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663279 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663278 5 0.0363 0.9294 0.000 0.000 0.000 0.012 0.988 0.000
#> SRR1663280 5 0.0363 0.9294 0.000 0.000 0.000 0.012 0.988 0.000
#> SRR1663281 4 0.2053 0.7316 0.000 0.000 0.108 0.888 0.004 0.000
#> SRR1663282 4 0.2053 0.7316 0.000 0.000 0.108 0.888 0.004 0.000
#> SRR1663283 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663284 1 0.0000 0.9768 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663286 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663287 2 0.1556 0.8974 0.000 0.920 0.000 0.000 0.000 0.080
#> SRR1663288 6 0.0000 0.9396 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663291 5 0.1421 0.9122 0.028 0.000 0.000 0.028 0.944 0.000
#> SRR1663289 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.9714 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663285 5 0.2664 0.8660 0.000 0.000 0.136 0.016 0.848 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "pam"]
# you can also extract it by
# res = res_list["CV:pam"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 17717 rows and 83 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 1.000 0.992 0.996 0.3008 0.700 0.700
#> 3 3 0.752 0.925 0.958 0.0666 0.992 0.989
#> 4 4 0.748 0.909 0.948 0.0827 0.967 0.953
#> 5 5 0.528 0.608 0.870 0.3231 0.926 0.889
#> 6 6 0.655 0.792 0.889 0.2038 0.888 0.812
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1663209 2 0.000 0.997 0.000 1.000
#> SRR1663210 2 0.000 0.997 0.000 1.000
#> SRR1663213 2 0.000 0.997 0.000 1.000
#> SRR1663211 2 0.000 0.997 0.000 1.000
#> SRR1663212 2 0.000 0.997 0.000 1.000
#> SRR1663214 2 0.000 0.997 0.000 1.000
#> SRR1663215 2 0.000 0.997 0.000 1.000
#> SRR1663216 2 0.000 0.997 0.000 1.000
#> SRR1663217 1 0.118 0.989 0.984 0.016
#> SRR1663218 1 0.118 0.989 0.984 0.016
#> SRR1663219 1 0.278 0.959 0.952 0.048
#> SRR1663220 2 0.714 0.752 0.196 0.804
#> SRR1663221 2 0.000 0.997 0.000 1.000
#> SRR1663222 2 0.000 0.997 0.000 1.000
#> SRR1663224 2 0.000 0.997 0.000 1.000
#> SRR1663225 2 0.000 0.997 0.000 1.000
#> SRR1663226 2 0.000 0.997 0.000 1.000
#> SRR1663223 2 0.000 0.997 0.000 1.000
#> SRR1663229 2 0.000 0.997 0.000 1.000
#> SRR1663231 2 0.000 0.997 0.000 1.000
#> SRR1663232 2 0.000 0.997 0.000 1.000
#> SRR1663227 1 0.118 0.989 0.984 0.016
#> SRR1663228 1 0.118 0.989 0.984 0.016
#> SRR1663230 2 0.000 0.997 0.000 1.000
#> SRR1663235 2 0.000 0.997 0.000 1.000
#> SRR1663233 2 0.000 0.997 0.000 1.000
#> SRR1663236 1 0.000 0.989 1.000 0.000
#> SRR1663237 2 0.000 0.997 0.000 1.000
#> SRR1663238 2 0.000 0.997 0.000 1.000
#> SRR1663234 2 0.000 0.997 0.000 1.000
#> SRR1663240 2 0.000 0.997 0.000 1.000
#> SRR1663239 2 0.000 0.997 0.000 1.000
#> SRR1663241 1 0.000 0.989 1.000 0.000
#> SRR1663242 2 0.000 0.997 0.000 1.000
#> SRR1663243 2 0.000 0.997 0.000 1.000
#> SRR1663244 2 0.000 0.997 0.000 1.000
#> SRR1663246 2 0.000 0.997 0.000 1.000
#> SRR1663245 2 0.000 0.997 0.000 1.000
#> SRR1663247 1 0.000 0.989 1.000 0.000
#> SRR1663248 2 0.000 0.997 0.000 1.000
#> SRR1663250 2 0.000 0.997 0.000 1.000
#> SRR1663249 2 0.000 0.997 0.000 1.000
#> SRR1663251 1 0.000 0.989 1.000 0.000
#> SRR1663252 2 0.000 0.997 0.000 1.000
#> SRR1663253 2 0.000 0.997 0.000 1.000
#> SRR1663254 1 0.118 0.989 0.984 0.016
#> SRR1663255 2 0.000 0.997 0.000 1.000
#> SRR1663256 2 0.000 0.997 0.000 1.000
#> SRR1663259 2 0.000 0.997 0.000 1.000
#> SRR1663258 2 0.000 0.997 0.000 1.000
#> SRR1663257 2 0.000 0.997 0.000 1.000
#> SRR1663263 2 0.000 0.997 0.000 1.000
#> SRR1663260 2 0.000 0.997 0.000 1.000
#> SRR1663262 2 0.000 0.997 0.000 1.000
#> SRR1663261 2 0.000 0.997 0.000 1.000
#> SRR1663265 2 0.000 0.997 0.000 1.000
#> SRR1663266 2 0.000 0.997 0.000 1.000
#> SRR1663267 2 0.000 0.997 0.000 1.000
#> SRR1663264 2 0.000 0.997 0.000 1.000
#> SRR1663268 2 0.000 0.997 0.000 1.000
#> SRR1663269 2 0.000 0.997 0.000 1.000
#> SRR1663271 2 0.000 0.997 0.000 1.000
#> SRR1663270 2 0.000 0.997 0.000 1.000
#> SRR1663273 2 0.000 0.997 0.000 1.000
#> SRR1663272 2 0.000 0.997 0.000 1.000
#> SRR1663275 2 0.000 0.997 0.000 1.000
#> SRR1663274 1 0.000 0.989 1.000 0.000
#> SRR1663276 1 0.118 0.989 0.984 0.016
#> SRR1663277 1 0.118 0.989 0.984 0.016
#> SRR1663279 2 0.000 0.997 0.000 1.000
#> SRR1663278 2 0.000 0.997 0.000 1.000
#> SRR1663280 2 0.000 0.997 0.000 1.000
#> SRR1663281 2 0.000 0.997 0.000 1.000
#> SRR1663282 2 0.000 0.997 0.000 1.000
#> SRR1663283 1 0.000 0.989 1.000 0.000
#> SRR1663284 1 0.000 0.989 1.000 0.000
#> SRR1663286 2 0.000 0.997 0.000 1.000
#> SRR1663287 2 0.000 0.997 0.000 1.000
#> SRR1663288 2 0.000 0.997 0.000 1.000
#> SRR1663291 2 0.000 0.997 0.000 1.000
#> SRR1663289 2 0.000 0.997 0.000 1.000
#> SRR1663290 2 0.000 0.997 0.000 1.000
#> SRR1663285 2 0.000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663213 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663211 2 0.1647 0.959 0.004 0.960 0.036
#> SRR1663212 2 0.1647 0.959 0.004 0.960 0.036
#> SRR1663214 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663215 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663216 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663217 1 0.3941 0.765 0.844 0.156 0.000
#> SRR1663218 1 0.3941 0.765 0.844 0.156 0.000
#> SRR1663219 1 0.4178 0.737 0.828 0.172 0.000
#> SRR1663220 2 0.4409 0.774 0.172 0.824 0.004
#> SRR1663221 2 0.4390 0.836 0.148 0.840 0.012
#> SRR1663222 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663224 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663225 2 0.4390 0.836 0.148 0.840 0.012
#> SRR1663226 2 0.4390 0.836 0.148 0.840 0.012
#> SRR1663223 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663229 2 0.4164 0.839 0.144 0.848 0.008
#> SRR1663231 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663232 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663227 1 0.0848 0.710 0.984 0.008 0.008
#> SRR1663228 1 0.0424 0.716 0.992 0.008 0.000
#> SRR1663230 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663235 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663233 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663236 1 0.4178 0.741 0.828 0.000 0.172
#> SRR1663237 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663238 2 0.0829 0.971 0.004 0.984 0.012
#> SRR1663234 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663240 2 0.1482 0.964 0.020 0.968 0.012
#> SRR1663239 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663241 1 0.4178 0.741 0.828 0.000 0.172
#> SRR1663242 2 0.1399 0.962 0.004 0.968 0.028
#> SRR1663243 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663244 2 0.1031 0.964 0.000 0.976 0.024
#> SRR1663246 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663245 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663247 1 0.4178 0.741 0.828 0.000 0.172
#> SRR1663248 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663250 2 0.0829 0.971 0.004 0.984 0.012
#> SRR1663249 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663251 1 0.4178 0.741 0.828 0.000 0.172
#> SRR1663252 2 0.1129 0.963 0.020 0.976 0.004
#> SRR1663253 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663254 1 0.3412 0.774 0.876 0.124 0.000
#> SRR1663255 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663256 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663259 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663258 2 0.1129 0.963 0.020 0.976 0.004
#> SRR1663257 2 0.2176 0.952 0.020 0.948 0.032
#> SRR1663263 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663260 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663262 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663261 2 0.1453 0.961 0.024 0.968 0.008
#> SRR1663265 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663266 2 0.1399 0.962 0.004 0.968 0.028
#> SRR1663267 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663264 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663268 2 0.3826 0.865 0.124 0.868 0.008
#> SRR1663269 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663271 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663270 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663273 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663272 2 0.0424 0.973 0.000 0.992 0.008
#> SRR1663275 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663274 1 0.3983 0.745 0.852 0.004 0.144
#> SRR1663276 1 0.3941 0.765 0.844 0.156 0.000
#> SRR1663277 1 0.3879 0.765 0.848 0.152 0.000
#> SRR1663279 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663278 2 0.1031 0.964 0.000 0.976 0.024
#> SRR1663280 2 0.1267 0.963 0.004 0.972 0.024
#> SRR1663281 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663282 2 0.0475 0.973 0.004 0.992 0.004
#> SRR1663283 3 0.2261 1.000 0.068 0.000 0.932
#> SRR1663284 3 0.2261 1.000 0.068 0.000 0.932
#> SRR1663286 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663287 2 0.0237 0.974 0.004 0.996 0.000
#> SRR1663288 2 0.4390 0.836 0.148 0.840 0.012
#> SRR1663291 2 0.1399 0.962 0.004 0.968 0.028
#> SRR1663289 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663290 2 0.0000 0.974 0.000 1.000 0.000
#> SRR1663285 2 0.1647 0.959 0.004 0.960 0.036
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663210 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663213 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663211 3 0.2727 0.906 0.004 0.084 0.900 0.012
#> SRR1663212 3 0.2727 0.906 0.004 0.084 0.900 0.012
#> SRR1663214 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663215 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663216 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663217 1 0.3444 0.772 0.816 0.000 0.184 0.000
#> SRR1663218 1 0.3528 0.766 0.808 0.000 0.192 0.000
#> SRR1663219 1 0.4072 0.688 0.748 0.000 0.252 0.000
#> SRR1663220 1 0.4804 0.483 0.616 0.000 0.384 0.000
#> SRR1663221 3 0.3626 0.793 0.184 0.004 0.812 0.000
#> SRR1663222 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663224 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663225 3 0.3626 0.793 0.184 0.004 0.812 0.000
#> SRR1663226 3 0.3626 0.793 0.184 0.004 0.812 0.000
#> SRR1663223 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663229 3 0.3583 0.796 0.180 0.004 0.816 0.000
#> SRR1663231 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663232 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663227 1 0.0188 0.536 0.996 0.004 0.000 0.000
#> SRR1663228 1 0.0188 0.536 0.996 0.004 0.000 0.000
#> SRR1663230 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663235 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663233 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663236 4 0.0469 0.993 0.012 0.000 0.000 0.988
#> SRR1663237 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663238 3 0.0967 0.955 0.004 0.016 0.976 0.004
#> SRR1663234 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663240 3 0.1593 0.946 0.024 0.016 0.956 0.004
#> SRR1663239 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663241 4 0.0469 0.993 0.012 0.000 0.000 0.988
#> SRR1663242 3 0.2310 0.917 0.004 0.068 0.920 0.008
#> SRR1663243 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663244 3 0.1970 0.924 0.000 0.060 0.932 0.008
#> SRR1663246 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663245 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663247 4 0.0524 0.984 0.004 0.008 0.000 0.988
#> SRR1663248 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663250 3 0.0967 0.955 0.004 0.016 0.976 0.004
#> SRR1663249 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663251 4 0.0592 0.989 0.016 0.000 0.000 0.984
#> SRR1663252 3 0.0817 0.952 0.024 0.000 0.976 0.000
#> SRR1663253 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663254 1 0.2868 0.741 0.864 0.000 0.136 0.000
#> SRR1663255 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663256 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663259 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663258 3 0.0817 0.952 0.024 0.000 0.976 0.000
#> SRR1663257 3 0.2673 0.908 0.008 0.080 0.904 0.008
#> SRR1663263 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663260 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663262 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663261 3 0.0921 0.951 0.028 0.000 0.972 0.000
#> SRR1663265 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663266 3 0.2310 0.917 0.004 0.068 0.920 0.008
#> SRR1663267 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663264 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663268 3 0.3257 0.833 0.152 0.004 0.844 0.000
#> SRR1663269 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663271 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663270 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663273 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663272 3 0.0779 0.956 0.000 0.016 0.980 0.004
#> SRR1663275 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663274 1 0.3764 0.510 0.816 0.000 0.012 0.172
#> SRR1663276 1 0.3444 0.772 0.816 0.000 0.184 0.000
#> SRR1663277 1 0.3400 0.771 0.820 0.000 0.180 0.000
#> SRR1663279 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663278 3 0.2124 0.918 0.000 0.068 0.924 0.008
#> SRR1663280 3 0.2310 0.917 0.004 0.068 0.920 0.008
#> SRR1663281 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663282 3 0.0188 0.962 0.004 0.000 0.996 0.000
#> SRR1663283 2 0.2149 0.993 0.000 0.912 0.000 0.088
#> SRR1663284 2 0.2266 0.993 0.004 0.912 0.000 0.084
#> SRR1663286 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663287 3 0.0188 0.961 0.004 0.000 0.996 0.000
#> SRR1663288 3 0.3626 0.793 0.184 0.004 0.812 0.000
#> SRR1663291 3 0.2234 0.920 0.004 0.064 0.924 0.008
#> SRR1663289 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663290 3 0.0000 0.962 0.000 0.000 1.000 0.000
#> SRR1663285 3 0.2515 0.916 0.004 0.072 0.912 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663213 2 0.4307 -0.8164 0 0.504 0.496 0.000 0.000
#> SRR1663211 3 0.4060 0.8005 0 0.360 0.640 0.000 0.000
#> SRR1663212 3 0.4088 0.8007 0 0.368 0.632 0.000 0.000
#> SRR1663214 2 0.4307 -0.8164 0 0.504 0.496 0.000 0.000
#> SRR1663215 2 0.4307 -0.8164 0 0.504 0.496 0.000 0.000
#> SRR1663216 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663217 4 0.2966 0.7399 0 0.184 0.000 0.816 0.000
#> SRR1663218 4 0.3039 0.7342 0 0.192 0.000 0.808 0.000
#> SRR1663219 4 0.6510 0.5398 0 0.232 0.284 0.484 0.000
#> SRR1663220 4 0.6801 0.3762 0 0.348 0.292 0.360 0.000
#> SRR1663221 2 0.4486 0.4849 0 0.748 0.080 0.172 0.000
#> SRR1663222 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663224 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663225 2 0.4486 0.4849 0 0.748 0.080 0.172 0.000
#> SRR1663226 2 0.4486 0.4849 0 0.748 0.080 0.172 0.000
#> SRR1663223 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663229 2 0.4313 0.4947 0 0.760 0.068 0.172 0.000
#> SRR1663231 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663232 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663227 4 0.0963 0.5250 0 0.000 0.036 0.964 0.000
#> SRR1663228 4 0.0963 0.5250 0 0.000 0.036 0.964 0.000
#> SRR1663230 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663233 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663236 5 0.0000 0.9925 0 0.000 0.000 0.000 1.000
#> SRR1663237 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663238 3 0.4306 0.7748 0 0.492 0.508 0.000 0.000
#> SRR1663234 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663240 2 0.4227 -0.0362 0 0.692 0.292 0.016 0.000
#> SRR1663239 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663241 5 0.0000 0.9925 0 0.000 0.000 0.000 1.000
#> SRR1663242 2 0.2690 0.6361 0 0.844 0.156 0.000 0.000
#> SRR1663243 2 0.0404 0.7974 0 0.988 0.012 0.000 0.000
#> SRR1663244 2 0.2424 0.6621 0 0.868 0.132 0.000 0.000
#> SRR1663246 2 0.4307 -0.8164 0 0.504 0.496 0.000 0.000
#> SRR1663245 2 0.0404 0.7974 0 0.988 0.012 0.000 0.000
#> SRR1663247 5 0.0000 0.9925 0 0.000 0.000 0.000 1.000
#> SRR1663248 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663250 2 0.1121 0.7682 0 0.956 0.044 0.000 0.000
#> SRR1663249 2 0.0404 0.7974 0 0.988 0.012 0.000 0.000
#> SRR1663251 5 0.0510 0.9772 0 0.000 0.000 0.016 0.984
#> SRR1663252 2 0.0898 0.7854 0 0.972 0.008 0.020 0.000
#> SRR1663253 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663254 4 0.3355 0.7228 0 0.132 0.036 0.832 0.000
#> SRR1663255 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663256 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663259 2 0.0162 0.8014 0 0.996 0.004 0.000 0.000
#> SRR1663258 2 0.0898 0.7854 0 0.972 0.008 0.020 0.000
#> SRR1663257 2 0.3086 0.6007 0 0.816 0.180 0.004 0.000
#> SRR1663263 2 0.4304 -0.7966 0 0.516 0.484 0.000 0.000
#> SRR1663260 2 0.0404 0.7974 0 0.988 0.012 0.000 0.000
#> SRR1663262 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663261 2 0.1117 0.7827 0 0.964 0.016 0.020 0.000
#> SRR1663265 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663266 2 0.2648 0.6394 0 0.848 0.152 0.000 0.000
#> SRR1663267 2 0.0290 0.7982 0 0.992 0.000 0.008 0.000
#> SRR1663264 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663268 2 0.3477 0.6114 0 0.824 0.040 0.136 0.000
#> SRR1663269 2 0.3661 0.0312 0 0.724 0.276 0.000 0.000
#> SRR1663271 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663270 2 0.0404 0.7974 0 0.988 0.012 0.000 0.000
#> SRR1663273 2 0.4307 -0.8164 0 0.504 0.496 0.000 0.000
#> SRR1663272 3 0.4307 0.7714 0 0.496 0.504 0.000 0.000
#> SRR1663275 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663274 4 0.3327 0.5660 0 0.028 0.000 0.828 0.144
#> SRR1663276 4 0.2852 0.7455 0 0.172 0.000 0.828 0.000
#> SRR1663277 4 0.2852 0.7455 0 0.172 0.000 0.828 0.000
#> SRR1663279 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663278 2 0.2516 0.6510 0 0.860 0.140 0.000 0.000
#> SRR1663280 2 0.2561 0.6447 0 0.856 0.144 0.000 0.000
#> SRR1663281 2 0.0404 0.7974 0 0.988 0.012 0.000 0.000
#> SRR1663282 2 0.0404 0.7974 0 0.988 0.012 0.000 0.000
#> SRR1663283 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR1663284 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR1663286 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663287 2 0.0162 0.8012 0 0.996 0.000 0.004 0.000
#> SRR1663288 2 0.4486 0.4849 0 0.748 0.080 0.172 0.000
#> SRR1663291 2 0.2605 0.6482 0 0.852 0.148 0.000 0.000
#> SRR1663289 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.8031 0 1.000 0.000 0.000 0.000
#> SRR1663285 2 0.4182 -0.2976 0 0.600 0.400 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663210 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663213 3 0.2597 0.911 0.000 0.176 0.824 0.000 0.000 0
#> SRR1663211 3 0.2196 0.648 0.016 0.056 0.908 0.000 0.020 0
#> SRR1663212 3 0.2224 0.653 0.012 0.064 0.904 0.000 0.020 0
#> SRR1663214 3 0.2597 0.911 0.000 0.176 0.824 0.000 0.000 0
#> SRR1663215 3 0.2597 0.911 0.000 0.176 0.824 0.000 0.000 0
#> SRR1663216 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663217 1 0.1663 0.692 0.912 0.088 0.000 0.000 0.000 0
#> SRR1663218 1 0.2135 0.596 0.872 0.128 0.000 0.000 0.000 0
#> SRR1663219 5 0.5407 0.586 0.364 0.080 0.016 0.000 0.540 0
#> SRR1663220 5 0.5927 0.666 0.256 0.188 0.016 0.000 0.540 0
#> SRR1663221 2 0.3817 0.397 0.000 0.568 0.000 0.000 0.432 0
#> SRR1663222 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663224 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663225 2 0.3817 0.397 0.000 0.568 0.000 0.000 0.432 0
#> SRR1663226 2 0.3817 0.397 0.000 0.568 0.000 0.000 0.432 0
#> SRR1663223 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663229 2 0.3817 0.397 0.000 0.568 0.000 0.000 0.432 0
#> SRR1663231 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663232 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663227 1 0.3050 0.641 0.764 0.000 0.000 0.000 0.236 0
#> SRR1663228 1 0.3050 0.641 0.764 0.000 0.000 0.000 0.236 0
#> SRR1663230 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663235 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663233 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663236 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 0
#> SRR1663237 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663238 3 0.2597 0.911 0.000 0.176 0.824 0.000 0.000 0
#> SRR1663234 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663240 2 0.4367 0.279 0.000 0.604 0.364 0.000 0.032 0
#> SRR1663239 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663241 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 0
#> SRR1663242 2 0.3743 0.724 0.024 0.788 0.160 0.000 0.028 0
#> SRR1663243 2 0.0881 0.875 0.012 0.972 0.008 0.000 0.008 0
#> SRR1663244 2 0.3192 0.762 0.016 0.828 0.136 0.000 0.020 0
#> SRR1663246 3 0.2597 0.911 0.000 0.176 0.824 0.000 0.000 0
#> SRR1663245 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663247 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 0
#> SRR1663248 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663250 2 0.1204 0.853 0.000 0.944 0.056 0.000 0.000 0
#> SRR1663249 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663251 4 0.1714 0.868 0.092 0.000 0.000 0.908 0.000 0
#> SRR1663252 2 0.1765 0.830 0.000 0.904 0.000 0.000 0.096 0
#> SRR1663253 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663254 1 0.2798 0.651 0.860 0.020 0.012 0.000 0.108 0
#> SRR1663255 2 0.0260 0.884 0.000 0.992 0.000 0.000 0.008 0
#> SRR1663256 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663259 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663258 2 0.1765 0.830 0.000 0.904 0.000 0.000 0.096 0
#> SRR1663257 2 0.4653 0.656 0.024 0.724 0.164 0.000 0.088 0
#> SRR1663263 3 0.2996 0.817 0.000 0.228 0.772 0.000 0.000 0
#> SRR1663260 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663262 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663261 2 0.1610 0.839 0.000 0.916 0.000 0.000 0.084 0
#> SRR1663265 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663266 2 0.3743 0.724 0.024 0.788 0.160 0.000 0.028 0
#> SRR1663267 2 0.1007 0.862 0.044 0.956 0.000 0.000 0.000 0
#> SRR1663264 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663268 2 0.3023 0.704 0.000 0.768 0.000 0.000 0.232 0
#> SRR1663269 2 0.3647 0.335 0.000 0.640 0.360 0.000 0.000 0
#> SRR1663271 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663270 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663273 3 0.2597 0.911 0.000 0.176 0.824 0.000 0.000 0
#> SRR1663272 3 0.2597 0.911 0.000 0.176 0.824 0.000 0.000 0
#> SRR1663275 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663274 1 0.0632 0.743 0.976 0.000 0.000 0.024 0.000 0
#> SRR1663276 1 0.0632 0.764 0.976 0.024 0.000 0.000 0.000 0
#> SRR1663277 1 0.0632 0.764 0.976 0.024 0.000 0.000 0.000 0
#> SRR1663279 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663278 2 0.3542 0.735 0.016 0.800 0.156 0.000 0.028 0
#> SRR1663280 2 0.3743 0.724 0.024 0.788 0.160 0.000 0.028 0
#> SRR1663281 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663282 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663283 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1663284 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1
#> SRR1663286 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663287 2 0.0146 0.886 0.000 0.996 0.000 0.000 0.004 0
#> SRR1663288 2 0.3817 0.397 0.000 0.568 0.000 0.000 0.432 0
#> SRR1663291 2 0.3163 0.760 0.024 0.824 0.144 0.000 0.008 0
#> SRR1663289 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663290 2 0.0000 0.888 0.000 1.000 0.000 0.000 0.000 0
#> SRR1663285 2 0.3860 0.163 0.000 0.528 0.472 0.000 0.000 0
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.486 0.806 0.900 0.3937 0.630 0.630
#> 3 3 0.372 0.715 0.789 0.5513 0.666 0.493
#> 4 4 0.475 0.464 0.725 0.1244 0.926 0.801
#> 5 5 0.472 0.431 0.669 0.0754 0.800 0.495
#> 6 6 0.521 0.610 0.679 0.0549 0.867 0.582
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
#> SRR1663209 2 0.0000 0.8766 0.000 1.000
#> SRR1663210 2 0.0000 0.8766 0.000 1.000
#> SRR1663213 2 0.0938 0.8767 0.012 0.988
#> SRR1663211 2 0.6531 0.8388 0.168 0.832
#> SRR1663212 2 0.6531 0.8388 0.168 0.832
#> SRR1663214 2 0.1414 0.8746 0.020 0.980
#> SRR1663215 2 0.1414 0.8746 0.020 0.980
#> SRR1663216 2 0.0376 0.8773 0.004 0.996
#> SRR1663217 1 0.0000 0.9079 1.000 0.000
#> SRR1663218 1 0.0000 0.9079 1.000 0.000
#> SRR1663219 1 0.0000 0.9079 1.000 0.000
#> SRR1663220 1 0.0000 0.9079 1.000 0.000
#> SRR1663221 2 0.8386 0.7391 0.268 0.732
#> SRR1663222 2 0.0000 0.8766 0.000 1.000
#> SRR1663224 2 0.0376 0.8773 0.004 0.996
#> SRR1663225 1 0.9954 -0.0647 0.540 0.460
#> SRR1663226 2 0.9933 0.3374 0.452 0.548
#> SRR1663223 2 0.6623 0.8358 0.172 0.828
#> SRR1663229 2 0.8499 0.7337 0.276 0.724
#> SRR1663231 2 0.2236 0.8765 0.036 0.964
#> SRR1663232 2 0.0672 0.8781 0.008 0.992
#> SRR1663227 1 0.0000 0.9079 1.000 0.000
#> SRR1663228 1 0.0000 0.9079 1.000 0.000
#> SRR1663230 2 0.0000 0.8766 0.000 1.000
#> SRR1663235 2 0.0376 0.8773 0.004 0.996
#> SRR1663233 2 0.0000 0.8766 0.000 1.000
#> SRR1663236 1 0.0000 0.9079 1.000 0.000
#> SRR1663237 2 0.0000 0.8766 0.000 1.000
#> SRR1663238 2 0.4431 0.8665 0.092 0.908
#> SRR1663234 2 0.0938 0.8780 0.012 0.988
#> SRR1663240 2 0.7745 0.7875 0.228 0.772
#> SRR1663239 2 0.0376 0.8773 0.004 0.996
#> SRR1663241 1 0.0000 0.9079 1.000 0.000
#> SRR1663242 2 0.9988 0.2807 0.480 0.520
#> SRR1663243 1 0.0938 0.8972 0.988 0.012
#> SRR1663244 2 0.6148 0.8473 0.152 0.848
#> SRR1663246 2 0.1414 0.8746 0.020 0.980
#> SRR1663245 2 0.8813 0.7095 0.300 0.700
#> SRR1663247 1 0.0000 0.9079 1.000 0.000
#> SRR1663248 2 0.0000 0.8766 0.000 1.000
#> SRR1663250 2 0.6712 0.8341 0.176 0.824
#> SRR1663249 2 0.6247 0.8460 0.156 0.844
#> SRR1663251 1 0.0000 0.9079 1.000 0.000
#> SRR1663252 2 0.7815 0.7810 0.232 0.768
#> SRR1663253 2 0.0376 0.8773 0.004 0.996
#> SRR1663254 1 0.0000 0.9079 1.000 0.000
#> SRR1663255 2 0.6148 0.8473 0.152 0.848
#> SRR1663256 2 0.0376 0.8773 0.004 0.996
#> SRR1663259 2 0.8661 0.7259 0.288 0.712
#> SRR1663258 2 0.8386 0.7391 0.268 0.732
#> SRR1663257 1 0.9983 -0.1711 0.524 0.476
#> SRR1663263 2 0.6247 0.8445 0.156 0.844
#> SRR1663260 2 0.5408 0.8569 0.124 0.876
#> SRR1663262 2 0.3114 0.8731 0.056 0.944
#> SRR1663261 2 0.8386 0.7391 0.268 0.732
#> SRR1663265 2 0.0000 0.8766 0.000 1.000
#> SRR1663266 2 0.9129 0.6444 0.328 0.672
#> SRR1663267 2 0.0000 0.8766 0.000 1.000
#> SRR1663264 2 0.0376 0.8773 0.004 0.996
#> SRR1663268 2 0.7602 0.7950 0.220 0.780
#> SRR1663269 2 0.0672 0.8772 0.008 0.992
#> SRR1663271 2 0.0000 0.8766 0.000 1.000
#> SRR1663270 2 0.6148 0.8473 0.152 0.848
#> SRR1663273 2 0.1414 0.8746 0.020 0.980
#> SRR1663272 2 0.1414 0.8746 0.020 0.980
#> SRR1663275 2 0.0000 0.8766 0.000 1.000
#> SRR1663274 1 0.0000 0.9079 1.000 0.000
#> SRR1663276 1 0.0000 0.9079 1.000 0.000
#> SRR1663277 1 0.0000 0.9079 1.000 0.000
#> SRR1663279 2 0.0376 0.8773 0.004 0.996
#> SRR1663278 2 0.6801 0.8329 0.180 0.820
#> SRR1663280 2 0.8499 0.7333 0.276 0.724
#> SRR1663281 2 0.5059 0.8606 0.112 0.888
#> SRR1663282 2 0.5519 0.8551 0.128 0.872
#> SRR1663283 1 0.0000 0.9079 1.000 0.000
#> SRR1663284 1 0.0000 0.9079 1.000 0.000
#> SRR1663286 2 0.0000 0.8766 0.000 1.000
#> SRR1663287 2 0.7602 0.7924 0.220 0.780
#> SRR1663288 2 0.8555 0.7234 0.280 0.720
#> SRR1663291 1 0.9977 -0.1561 0.528 0.472
#> SRR1663289 2 0.0000 0.8766 0.000 1.000
#> SRR1663290 2 0.0000 0.8766 0.000 1.000
#> SRR1663285 2 0.6531 0.8388 0.168 0.832
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.3879 0.754 0.000 0.848 0.152
#> SRR1663210 2 0.3816 0.755 0.000 0.852 0.148
#> SRR1663213 3 0.5291 0.648 0.000 0.268 0.732
#> SRR1663211 3 0.0592 0.760 0.000 0.012 0.988
#> SRR1663212 3 0.0424 0.761 0.000 0.008 0.992
#> SRR1663214 3 0.5465 0.651 0.000 0.288 0.712
#> SRR1663215 3 0.5465 0.651 0.000 0.288 0.712
#> SRR1663216 2 0.4291 0.732 0.000 0.820 0.180
#> SRR1663217 1 0.4782 0.958 0.820 0.016 0.164
#> SRR1663218 1 0.4782 0.958 0.820 0.016 0.164
#> SRR1663219 1 0.5178 0.959 0.808 0.028 0.164
#> SRR1663220 1 0.5178 0.959 0.808 0.028 0.164
#> SRR1663221 2 0.8901 0.579 0.196 0.572 0.232
#> SRR1663222 2 0.3412 0.750 0.000 0.876 0.124
#> SRR1663224 3 0.6295 0.203 0.000 0.472 0.528
#> SRR1663225 2 0.9284 0.490 0.296 0.512 0.192
#> SRR1663226 2 0.9355 0.513 0.252 0.516 0.232
#> SRR1663223 3 0.7181 0.054 0.028 0.408 0.564
#> SRR1663229 2 0.9221 0.557 0.192 0.524 0.284
#> SRR1663231 3 0.5325 0.666 0.004 0.248 0.748
#> SRR1663232 3 0.5810 0.537 0.000 0.336 0.664
#> SRR1663227 1 0.1163 0.802 0.972 0.028 0.000
#> SRR1663228 1 0.1163 0.802 0.972 0.028 0.000
#> SRR1663230 2 0.2959 0.754 0.000 0.900 0.100
#> SRR1663235 2 0.5529 0.645 0.000 0.704 0.296
#> SRR1663233 2 0.2711 0.752 0.000 0.912 0.088
#> SRR1663236 1 0.4473 0.959 0.828 0.008 0.164
#> SRR1663237 2 0.4654 0.727 0.000 0.792 0.208
#> SRR1663238 3 0.4293 0.725 0.004 0.164 0.832
#> SRR1663234 3 0.5553 0.637 0.004 0.272 0.724
#> SRR1663240 3 0.5000 0.708 0.124 0.044 0.832
#> SRR1663239 2 0.5529 0.603 0.000 0.704 0.296
#> SRR1663241 1 0.4293 0.960 0.832 0.004 0.164
#> SRR1663242 3 0.3846 0.665 0.108 0.016 0.876
#> SRR1663243 1 0.6108 0.881 0.732 0.028 0.240
#> SRR1663244 3 0.4834 0.624 0.004 0.204 0.792
#> SRR1663246 3 0.5254 0.652 0.000 0.264 0.736
#> SRR1663245 3 0.1170 0.755 0.008 0.016 0.976
#> SRR1663247 1 0.4293 0.960 0.832 0.004 0.164
#> SRR1663248 2 0.5591 0.636 0.000 0.696 0.304
#> SRR1663250 3 0.0000 0.758 0.000 0.000 1.000
#> SRR1663249 3 0.1643 0.768 0.000 0.044 0.956
#> SRR1663251 1 0.4293 0.960 0.832 0.004 0.164
#> SRR1663252 2 0.8845 0.588 0.184 0.576 0.240
#> SRR1663253 2 0.5465 0.651 0.000 0.712 0.288
#> SRR1663254 1 0.4062 0.960 0.836 0.000 0.164
#> SRR1663255 3 0.2711 0.766 0.000 0.088 0.912
#> SRR1663256 2 0.4504 0.722 0.000 0.804 0.196
#> SRR1663259 3 0.1337 0.753 0.012 0.016 0.972
#> SRR1663258 2 0.9099 0.561 0.192 0.544 0.264
#> SRR1663257 3 0.5092 0.557 0.176 0.020 0.804
#> SRR1663263 3 0.0892 0.763 0.000 0.020 0.980
#> SRR1663260 3 0.4921 0.723 0.020 0.164 0.816
#> SRR1663262 2 0.2945 0.753 0.004 0.908 0.088
#> SRR1663261 2 0.9269 0.540 0.184 0.508 0.308
#> SRR1663265 2 0.5859 0.556 0.000 0.656 0.344
#> SRR1663266 3 0.2269 0.733 0.040 0.016 0.944
#> SRR1663267 3 0.5678 0.574 0.000 0.316 0.684
#> SRR1663264 2 0.6095 0.425 0.000 0.608 0.392
#> SRR1663268 3 0.7393 0.596 0.140 0.156 0.704
#> SRR1663269 3 0.5529 0.619 0.000 0.296 0.704
#> SRR1663271 2 0.2878 0.754 0.000 0.904 0.096
#> SRR1663270 3 0.1860 0.769 0.000 0.052 0.948
#> SRR1663273 3 0.5431 0.651 0.000 0.284 0.716
#> SRR1663272 3 0.5465 0.651 0.000 0.288 0.712
#> SRR1663275 2 0.2711 0.752 0.000 0.912 0.088
#> SRR1663274 1 0.5178 0.959 0.808 0.028 0.164
#> SRR1663276 1 0.4782 0.959 0.820 0.016 0.164
#> SRR1663277 1 0.4782 0.959 0.820 0.016 0.164
#> SRR1663279 2 0.4842 0.706 0.000 0.776 0.224
#> SRR1663278 3 0.1267 0.763 0.004 0.024 0.972
#> SRR1663280 3 0.1751 0.745 0.028 0.012 0.960
#> SRR1663281 3 0.2448 0.768 0.000 0.076 0.924
#> SRR1663282 3 0.2356 0.769 0.000 0.072 0.928
#> SRR1663283 1 0.5524 0.951 0.796 0.040 0.164
#> SRR1663284 1 0.5524 0.951 0.796 0.040 0.164
#> SRR1663286 2 0.2537 0.750 0.000 0.920 0.080
#> SRR1663287 2 0.6023 0.711 0.092 0.788 0.120
#> SRR1663288 2 0.9491 0.474 0.220 0.488 0.292
#> SRR1663291 3 0.5413 0.579 0.164 0.036 0.800
#> SRR1663289 2 0.2878 0.754 0.000 0.904 0.096
#> SRR1663290 2 0.2878 0.754 0.000 0.904 0.096
#> SRR1663285 3 0.0424 0.761 0.000 0.008 0.992
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.5548 0.6292 0.000 0.628 0.032 0.340
#> SRR1663210 2 0.5548 0.6292 0.000 0.628 0.032 0.340
#> SRR1663213 3 0.5590 -0.5834 0.000 0.020 0.524 0.456
#> SRR1663211 3 0.3945 0.2553 0.000 0.004 0.780 0.216
#> SRR1663212 3 0.3945 0.2553 0.000 0.004 0.780 0.216
#> SRR1663214 4 0.5408 0.5450 0.000 0.012 0.488 0.500
#> SRR1663215 4 0.5408 0.5450 0.000 0.012 0.488 0.500
#> SRR1663216 2 0.7192 0.5261 0.000 0.488 0.144 0.368
#> SRR1663217 1 0.1675 0.8960 0.948 0.044 0.004 0.004
#> SRR1663218 1 0.1675 0.8960 0.948 0.044 0.004 0.004
#> SRR1663219 1 0.1296 0.8987 0.964 0.028 0.004 0.004
#> SRR1663220 1 0.1296 0.8987 0.964 0.028 0.004 0.004
#> SRR1663221 2 0.2310 0.5099 0.008 0.920 0.068 0.004
#> SRR1663222 2 0.6201 0.6128 0.000 0.564 0.060 0.376
#> SRR1663224 3 0.7827 -0.2101 0.000 0.288 0.412 0.300
#> SRR1663225 2 0.2750 0.4938 0.032 0.908 0.056 0.004
#> SRR1663226 2 0.2549 0.4994 0.024 0.916 0.056 0.004
#> SRR1663223 3 0.6334 0.0827 0.000 0.456 0.484 0.060
#> SRR1663229 2 0.2781 0.5020 0.016 0.904 0.072 0.008
#> SRR1663231 3 0.6422 0.2314 0.000 0.248 0.632 0.120
#> SRR1663232 3 0.7676 -0.1286 0.000 0.276 0.460 0.264
#> SRR1663227 1 0.3726 0.7996 0.788 0.212 0.000 0.000
#> SRR1663228 1 0.3726 0.7996 0.788 0.212 0.000 0.000
#> SRR1663230 2 0.5925 0.6099 0.000 0.512 0.036 0.452
#> SRR1663235 2 0.7393 0.4809 0.000 0.488 0.180 0.332
#> SRR1663233 2 0.5842 0.6108 0.000 0.520 0.032 0.448
#> SRR1663236 1 0.2704 0.8850 0.876 0.000 0.000 0.124
#> SRR1663237 2 0.5596 0.6335 0.000 0.632 0.036 0.332
#> SRR1663238 3 0.4516 0.2036 0.000 0.012 0.736 0.252
#> SRR1663234 2 0.7495 0.0781 0.000 0.428 0.392 0.180
#> SRR1663240 3 0.4094 0.5188 0.000 0.116 0.828 0.056
#> SRR1663239 2 0.7924 0.1364 0.000 0.336 0.328 0.336
#> SRR1663241 1 0.2704 0.8850 0.876 0.000 0.000 0.124
#> SRR1663242 3 0.5561 0.4614 0.024 0.108 0.764 0.104
#> SRR1663243 1 0.7988 0.2623 0.480 0.044 0.360 0.116
#> SRR1663244 3 0.6539 0.1101 0.004 0.428 0.504 0.064
#> SRR1663246 3 0.5586 -0.5783 0.000 0.020 0.528 0.452
#> SRR1663245 3 0.3877 0.5201 0.000 0.112 0.840 0.048
#> SRR1663247 1 0.2760 0.8842 0.872 0.000 0.000 0.128
#> SRR1663248 2 0.6933 0.5429 0.000 0.560 0.140 0.300
#> SRR1663250 3 0.4059 0.2864 0.000 0.012 0.788 0.200
#> SRR1663249 3 0.3760 0.5200 0.000 0.136 0.836 0.028
#> SRR1663251 1 0.2469 0.8884 0.892 0.000 0.000 0.108
#> SRR1663252 2 0.2992 0.5311 0.008 0.892 0.084 0.016
#> SRR1663253 2 0.7540 0.4568 0.000 0.444 0.192 0.364
#> SRR1663254 1 0.0188 0.8991 0.996 0.000 0.004 0.000
#> SRR1663255 3 0.3205 0.5244 0.000 0.104 0.872 0.024
#> SRR1663256 2 0.7706 0.3885 0.000 0.412 0.224 0.364
#> SRR1663259 3 0.4541 0.5127 0.000 0.144 0.796 0.060
#> SRR1663258 2 0.2483 0.5318 0.012 0.920 0.056 0.012
#> SRR1663257 3 0.6934 0.1968 0.080 0.024 0.596 0.300
#> SRR1663263 3 0.4122 0.2382 0.000 0.004 0.760 0.236
#> SRR1663260 3 0.4337 0.4736 0.000 0.140 0.808 0.052
#> SRR1663262 2 0.5326 0.5991 0.000 0.604 0.016 0.380
#> SRR1663261 2 0.2170 0.5107 0.012 0.936 0.036 0.016
#> SRR1663265 2 0.6652 0.5865 0.000 0.576 0.108 0.316
#> SRR1663266 3 0.3587 0.5265 0.004 0.104 0.860 0.032
#> SRR1663267 2 0.7800 0.2521 0.004 0.460 0.300 0.236
#> SRR1663264 4 0.7907 -0.3874 0.000 0.328 0.308 0.364
#> SRR1663268 3 0.6189 0.3095 0.000 0.268 0.640 0.092
#> SRR1663269 3 0.7180 -0.0599 0.000 0.188 0.548 0.264
#> SRR1663271 2 0.5846 0.6095 0.000 0.516 0.032 0.452
#> SRR1663270 3 0.2861 0.5236 0.000 0.096 0.888 0.016
#> SRR1663273 3 0.5508 -0.6268 0.000 0.016 0.508 0.476
#> SRR1663272 4 0.5408 0.5450 0.000 0.012 0.488 0.500
#> SRR1663275 2 0.5925 0.6099 0.000 0.512 0.036 0.452
#> SRR1663274 1 0.1191 0.8985 0.968 0.024 0.004 0.004
#> SRR1663276 1 0.0712 0.8994 0.984 0.008 0.004 0.004
#> SRR1663277 1 0.0712 0.8994 0.984 0.008 0.004 0.004
#> SRR1663279 2 0.7895 0.2144 0.000 0.376 0.308 0.316
#> SRR1663278 3 0.3335 0.5281 0.000 0.120 0.860 0.020
#> SRR1663280 3 0.3232 0.5305 0.004 0.108 0.872 0.016
#> SRR1663281 3 0.3778 0.5104 0.000 0.100 0.848 0.052
#> SRR1663282 3 0.3525 0.5174 0.000 0.100 0.860 0.040
#> SRR1663283 1 0.3908 0.8533 0.784 0.004 0.000 0.212
#> SRR1663284 1 0.3908 0.8533 0.784 0.004 0.000 0.212
#> SRR1663286 2 0.5673 0.6101 0.000 0.528 0.024 0.448
#> SRR1663287 2 0.5640 0.5531 0.004 0.688 0.052 0.256
#> SRR1663288 2 0.2610 0.4936 0.012 0.900 0.088 0.000
#> SRR1663291 3 0.5679 0.4311 0.056 0.068 0.768 0.108
#> SRR1663289 2 0.5925 0.6099 0.000 0.512 0.036 0.452
#> SRR1663290 2 0.5925 0.6099 0.000 0.512 0.036 0.452
#> SRR1663285 3 0.3945 0.2553 0.000 0.004 0.780 0.216
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.1956 0.383405 0.076 0.916 0.008 0.000 0.000
#> SRR1663210 2 0.1704 0.385098 0.068 0.928 0.004 0.000 0.000
#> SRR1663213 3 0.5547 0.670425 0.000 0.208 0.644 0.000 0.148
#> SRR1663211 3 0.4723 0.521702 0.000 0.016 0.536 0.000 0.448
#> SRR1663212 3 0.4727 0.523430 0.000 0.016 0.532 0.000 0.452
#> SRR1663214 3 0.5274 0.684225 0.000 0.192 0.676 0.000 0.132
#> SRR1663215 3 0.5274 0.684225 0.000 0.192 0.676 0.000 0.132
#> SRR1663216 2 0.2196 0.415053 0.056 0.916 0.024 0.000 0.004
#> SRR1663217 4 0.0992 0.907103 0.024 0.000 0.008 0.968 0.000
#> SRR1663218 4 0.0992 0.907103 0.024 0.000 0.008 0.968 0.000
#> SRR1663219 4 0.0290 0.907727 0.008 0.000 0.000 0.992 0.000
#> SRR1663220 4 0.0290 0.907727 0.008 0.000 0.000 0.992 0.000
#> SRR1663221 2 0.4227 -0.321064 0.420 0.580 0.000 0.000 0.000
#> SRR1663222 2 0.1117 0.394356 0.016 0.964 0.020 0.000 0.000
#> SRR1663224 2 0.6157 0.363370 0.056 0.644 0.092 0.000 0.208
#> SRR1663225 1 0.6330 0.551832 0.444 0.416 0.000 0.136 0.004
#> SRR1663226 1 0.6302 0.549663 0.444 0.420 0.000 0.132 0.004
#> SRR1663223 2 0.5369 0.306258 0.000 0.660 0.124 0.000 0.216
#> SRR1663229 2 0.5024 -0.336420 0.440 0.532 0.000 0.004 0.024
#> SRR1663231 2 0.6829 0.108931 0.048 0.540 0.128 0.000 0.284
#> SRR1663232 2 0.6427 0.304022 0.056 0.612 0.104 0.000 0.228
#> SRR1663227 4 0.2660 0.841746 0.128 0.000 0.008 0.864 0.000
#> SRR1663228 4 0.2660 0.841746 0.128 0.000 0.008 0.864 0.000
#> SRR1663230 2 0.4970 0.113549 0.340 0.624 0.028 0.000 0.008
#> SRR1663235 2 0.2536 0.433734 0.052 0.900 0.044 0.000 0.004
#> SRR1663233 2 0.4838 0.118449 0.336 0.632 0.028 0.000 0.004
#> SRR1663236 4 0.3281 0.882098 0.092 0.000 0.060 0.848 0.000
#> SRR1663237 2 0.2913 0.391926 0.080 0.876 0.040 0.000 0.004
#> SRR1663238 3 0.5224 0.565060 0.000 0.080 0.644 0.000 0.276
#> SRR1663234 2 0.4953 0.375306 0.008 0.732 0.124 0.000 0.136
#> SRR1663240 5 0.7293 0.465013 0.040 0.296 0.208 0.000 0.456
#> SRR1663239 2 0.5736 0.396636 0.056 0.688 0.076 0.000 0.180
#> SRR1663241 4 0.3281 0.882098 0.092 0.000 0.060 0.848 0.000
#> SRR1663242 5 0.4653 0.543286 0.000 0.112 0.132 0.004 0.752
#> SRR1663243 5 0.7109 0.036398 0.000 0.044 0.144 0.364 0.448
#> SRR1663244 2 0.5864 0.107068 0.000 0.560 0.120 0.000 0.320
#> SRR1663246 3 0.5452 0.672312 0.000 0.200 0.656 0.000 0.144
#> SRR1663245 5 0.3525 0.647350 0.000 0.156 0.024 0.004 0.816
#> SRR1663247 4 0.3336 0.882080 0.096 0.000 0.060 0.844 0.000
#> SRR1663248 2 0.1774 0.426796 0.000 0.932 0.052 0.000 0.016
#> SRR1663250 5 0.5362 -0.466434 0.000 0.036 0.456 0.008 0.500
#> SRR1663249 5 0.5628 0.618504 0.000 0.244 0.132 0.000 0.624
#> SRR1663251 4 0.2362 0.896301 0.076 0.000 0.024 0.900 0.000
#> SRR1663252 2 0.4770 -0.280078 0.384 0.596 0.008 0.000 0.012
#> SRR1663253 2 0.1809 0.421357 0.060 0.928 0.012 0.000 0.000
#> SRR1663254 4 0.0963 0.907360 0.036 0.000 0.000 0.964 0.000
#> SRR1663255 5 0.5642 0.609421 0.000 0.184 0.180 0.000 0.636
#> SRR1663256 2 0.2576 0.432644 0.056 0.900 0.036 0.000 0.008
#> SRR1663259 5 0.4258 0.618187 0.000 0.220 0.032 0.004 0.744
#> SRR1663258 2 0.4928 -0.321664 0.412 0.564 0.008 0.000 0.016
#> SRR1663257 3 0.5415 0.204673 0.000 0.020 0.508 0.024 0.448
#> SRR1663263 3 0.4800 0.562492 0.000 0.028 0.604 0.000 0.368
#> SRR1663260 5 0.6559 0.527943 0.020 0.296 0.148 0.000 0.536
#> SRR1663262 2 0.5422 0.046302 0.372 0.568 0.056 0.000 0.004
#> SRR1663261 2 0.4645 -0.338521 0.424 0.564 0.004 0.000 0.008
#> SRR1663265 2 0.2278 0.398253 0.044 0.916 0.032 0.000 0.008
#> SRR1663266 5 0.3169 0.632259 0.000 0.140 0.016 0.004 0.840
#> SRR1663267 2 0.4666 0.385649 0.036 0.780 0.104 0.000 0.080
#> SRR1663264 2 0.4391 0.409173 0.060 0.768 0.008 0.000 0.164
#> SRR1663268 2 0.7493 0.078126 0.132 0.476 0.096 0.000 0.296
#> SRR1663269 2 0.6730 0.000167 0.028 0.532 0.156 0.000 0.284
#> SRR1663271 2 0.4838 0.118449 0.336 0.632 0.028 0.000 0.004
#> SRR1663270 5 0.5670 0.609029 0.000 0.192 0.176 0.000 0.632
#> SRR1663273 3 0.5312 0.674183 0.000 0.208 0.668 0.000 0.124
#> SRR1663272 3 0.5264 0.683004 0.000 0.196 0.676 0.000 0.128
#> SRR1663275 2 0.4774 0.115239 0.340 0.632 0.024 0.000 0.004
#> SRR1663274 4 0.0000 0.908149 0.000 0.000 0.000 1.000 0.000
#> SRR1663276 4 0.0162 0.908088 0.004 0.000 0.000 0.996 0.000
#> SRR1663277 4 0.0162 0.908088 0.004 0.000 0.000 0.996 0.000
#> SRR1663279 2 0.3894 0.427854 0.056 0.832 0.080 0.000 0.032
#> SRR1663278 5 0.3531 0.643013 0.000 0.148 0.036 0.000 0.816
#> SRR1663280 5 0.3327 0.638424 0.000 0.144 0.028 0.000 0.828
#> SRR1663281 5 0.6184 0.579236 0.004 0.208 0.212 0.000 0.576
#> SRR1663282 5 0.6158 0.579549 0.004 0.204 0.212 0.000 0.580
#> SRR1663283 4 0.6909 0.697860 0.140 0.000 0.124 0.600 0.136
#> SRR1663284 4 0.6909 0.697860 0.140 0.000 0.124 0.600 0.136
#> SRR1663286 2 0.4890 0.115383 0.340 0.628 0.024 0.000 0.008
#> SRR1663287 1 0.6360 -0.119320 0.452 0.448 0.068 0.004 0.028
#> SRR1663288 2 0.5548 -0.542319 0.440 0.492 0.000 0.068 0.000
#> SRR1663291 5 0.5942 0.560942 0.000 0.148 0.128 0.048 0.676
#> SRR1663289 2 0.4869 0.109955 0.344 0.624 0.028 0.000 0.004
#> SRR1663290 2 0.4854 0.116624 0.340 0.628 0.028 0.000 0.004
#> SRR1663285 3 0.4731 0.524045 0.000 0.016 0.528 0.000 0.456
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.4299 0.222 0.000 0.620 0.012 0.012 0.000 0.356
#> SRR1663210 2 0.4345 0.175 0.000 0.604 0.012 0.012 0.000 0.372
#> SRR1663213 3 0.4960 0.670 0.000 0.216 0.696 0.036 0.036 0.016
#> SRR1663211 3 0.4014 0.588 0.000 0.016 0.704 0.012 0.268 0.000
#> SRR1663212 3 0.4014 0.588 0.000 0.016 0.704 0.012 0.268 0.000
#> SRR1663214 3 0.4854 0.699 0.000 0.152 0.712 0.116 0.008 0.012
#> SRR1663215 3 0.4854 0.699 0.000 0.152 0.712 0.116 0.008 0.012
#> SRR1663216 2 0.3874 0.462 0.000 0.752 0.028 0.012 0.000 0.208
#> SRR1663217 1 0.0717 0.875 0.976 0.000 0.000 0.008 0.000 0.016
#> SRR1663218 1 0.0717 0.875 0.976 0.000 0.000 0.008 0.000 0.016
#> SRR1663219 1 0.0291 0.877 0.992 0.000 0.000 0.004 0.000 0.004
#> SRR1663220 1 0.0291 0.877 0.992 0.000 0.000 0.004 0.000 0.004
#> SRR1663221 2 0.6351 0.456 0.000 0.464 0.016 0.220 0.004 0.296
#> SRR1663222 2 0.4245 0.313 0.000 0.644 0.024 0.004 0.000 0.328
#> SRR1663224 2 0.3914 0.533 0.000 0.808 0.088 0.012 0.076 0.016
#> SRR1663225 2 0.8463 0.307 0.052 0.324 0.020 0.232 0.096 0.276
#> SRR1663226 2 0.8421 0.310 0.048 0.328 0.020 0.232 0.096 0.276
#> SRR1663223 2 0.5604 0.540 0.000 0.660 0.052 0.004 0.148 0.136
#> SRR1663229 2 0.6670 0.465 0.000 0.456 0.020 0.224 0.016 0.284
#> SRR1663231 2 0.3373 0.564 0.000 0.840 0.048 0.000 0.080 0.032
#> SRR1663232 2 0.2699 0.573 0.000 0.884 0.040 0.000 0.048 0.028
#> SRR1663227 1 0.3219 0.695 0.840 0.000 0.016 0.040 0.000 0.104
#> SRR1663228 1 0.3219 0.695 0.840 0.000 0.016 0.040 0.000 0.104
#> SRR1663230 6 0.3849 0.907 0.000 0.208 0.032 0.000 0.008 0.752
#> SRR1663235 2 0.2527 0.561 0.000 0.880 0.032 0.000 0.004 0.084
#> SRR1663233 6 0.3686 0.911 0.000 0.220 0.032 0.000 0.000 0.748
#> SRR1663236 1 0.2750 0.772 0.844 0.000 0.000 0.136 0.000 0.020
#> SRR1663237 2 0.4710 0.325 0.004 0.632 0.008 0.024 0.008 0.324
#> SRR1663238 3 0.3880 0.624 0.000 0.096 0.780 0.000 0.120 0.004
#> SRR1663234 2 0.4595 0.553 0.000 0.748 0.036 0.008 0.056 0.152
#> SRR1663240 2 0.6177 0.246 0.000 0.592 0.132 0.004 0.204 0.068
#> SRR1663239 2 0.3706 0.539 0.000 0.824 0.092 0.012 0.052 0.020
#> SRR1663241 1 0.2750 0.772 0.844 0.000 0.000 0.136 0.000 0.020
#> SRR1663242 5 0.3895 0.652 0.000 0.096 0.060 0.040 0.804 0.000
#> SRR1663243 5 0.5818 0.447 0.172 0.092 0.028 0.048 0.660 0.000
#> SRR1663244 2 0.6541 0.198 0.000 0.488 0.112 0.004 0.324 0.072
#> SRR1663246 3 0.5287 0.689 0.000 0.184 0.684 0.092 0.020 0.020
#> SRR1663245 5 0.3316 0.716 0.000 0.152 0.028 0.008 0.812 0.000
#> SRR1663247 1 0.2750 0.772 0.844 0.000 0.000 0.136 0.000 0.020
#> SRR1663248 2 0.3947 0.530 0.000 0.788 0.024 0.004 0.040 0.144
#> SRR1663250 3 0.4452 0.469 0.000 0.048 0.636 0.000 0.316 0.000
#> SRR1663249 5 0.5164 0.661 0.000 0.260 0.120 0.000 0.616 0.004
#> SRR1663251 1 0.1858 0.835 0.912 0.000 0.000 0.076 0.000 0.012
#> SRR1663252 2 0.6585 0.461 0.000 0.464 0.028 0.176 0.012 0.320
#> SRR1663253 2 0.3546 0.520 0.000 0.812 0.036 0.012 0.004 0.136
#> SRR1663254 1 0.0363 0.878 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1663255 5 0.5519 0.618 0.000 0.172 0.280 0.000 0.548 0.000
#> SRR1663256 2 0.3743 0.526 0.000 0.808 0.068 0.012 0.004 0.108
#> SRR1663259 5 0.4347 0.566 0.000 0.304 0.024 0.012 0.660 0.000
#> SRR1663258 2 0.6632 0.466 0.000 0.460 0.032 0.172 0.012 0.324
#> SRR1663257 5 0.4704 -0.265 0.000 0.000 0.468 0.044 0.488 0.000
#> SRR1663263 3 0.3481 0.628 0.000 0.032 0.776 0.000 0.192 0.000
#> SRR1663260 2 0.5845 -0.132 0.000 0.536 0.104 0.004 0.332 0.024
#> SRR1663262 6 0.4436 0.803 0.000 0.308 0.028 0.012 0.000 0.652
#> SRR1663261 2 0.7373 0.417 0.000 0.404 0.036 0.180 0.056 0.324
#> SRR1663265 2 0.3916 0.489 0.000 0.748 0.020 0.012 0.004 0.216
#> SRR1663266 5 0.2622 0.699 0.000 0.104 0.024 0.004 0.868 0.000
#> SRR1663267 2 0.4302 0.543 0.000 0.752 0.036 0.008 0.024 0.180
#> SRR1663264 2 0.2890 0.541 0.000 0.860 0.000 0.012 0.032 0.096
#> SRR1663268 2 0.5149 0.531 0.004 0.716 0.048 0.004 0.100 0.128
#> SRR1663269 2 0.5226 0.509 0.000 0.716 0.140 0.028 0.080 0.036
#> SRR1663271 6 0.3641 0.911 0.000 0.224 0.028 0.000 0.000 0.748
#> SRR1663270 5 0.5417 0.625 0.000 0.164 0.268 0.000 0.568 0.000
#> SRR1663273 3 0.5041 0.696 0.000 0.168 0.696 0.112 0.012 0.012
#> SRR1663272 3 0.4848 0.699 0.000 0.156 0.712 0.112 0.008 0.012
#> SRR1663275 6 0.3904 0.908 0.000 0.232 0.032 0.004 0.000 0.732
#> SRR1663274 1 0.0405 0.877 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR1663276 1 0.0146 0.877 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1663277 1 0.0146 0.877 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1663279 2 0.3848 0.555 0.000 0.820 0.056 0.012 0.032 0.080
#> SRR1663278 5 0.3678 0.716 0.000 0.128 0.084 0.000 0.788 0.000
#> SRR1663280 5 0.2908 0.705 0.000 0.104 0.048 0.000 0.848 0.000
#> SRR1663281 5 0.5805 0.570 0.000 0.212 0.300 0.000 0.488 0.000
#> SRR1663282 5 0.5778 0.571 0.000 0.204 0.304 0.000 0.492 0.000
#> SRR1663283 4 0.4416 1.000 0.372 0.000 0.008 0.600 0.020 0.000
#> SRR1663284 4 0.4416 1.000 0.372 0.000 0.008 0.600 0.020 0.000
#> SRR1663286 6 0.3875 0.878 0.000 0.280 0.016 0.004 0.000 0.700
#> SRR1663287 6 0.4050 0.684 0.000 0.232 0.024 0.016 0.000 0.728
#> SRR1663288 2 0.7855 0.347 0.012 0.364 0.016 0.232 0.096 0.280
#> SRR1663291 5 0.4481 0.704 0.004 0.152 0.100 0.008 0.736 0.000
#> SRR1663289 6 0.3740 0.906 0.000 0.228 0.032 0.000 0.000 0.740
#> SRR1663290 6 0.3740 0.906 0.000 0.228 0.032 0.000 0.000 0.740
#> SRR1663285 3 0.4035 0.587 0.000 0.016 0.700 0.012 0.272 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "NMF"]
# you can also extract it by
# res = res_list["CV:NMF"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 17717 rows and 83 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.946 0.946 0.967 0.3617 0.656 0.656
#> 3 3 0.851 0.883 0.928 0.7812 0.678 0.517
#> 4 4 0.663 0.739 0.826 0.1392 0.873 0.653
#> 5 5 0.762 0.728 0.797 0.0753 0.921 0.699
#> 6 6 0.809 0.845 0.866 0.0438 0.927 0.662
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
#> SRR1663209 2 0.1414 0.961 0.020 0.980
#> SRR1663210 2 0.1414 0.961 0.020 0.980
#> SRR1663213 2 0.0000 0.963 0.000 1.000
#> SRR1663211 2 0.0000 0.963 0.000 1.000
#> SRR1663212 2 0.0000 0.963 0.000 1.000
#> SRR1663214 2 0.0000 0.963 0.000 1.000
#> SRR1663215 2 0.0000 0.963 0.000 1.000
#> SRR1663216 2 0.1414 0.961 0.020 0.980
#> SRR1663217 1 0.0000 0.980 1.000 0.000
#> SRR1663218 1 0.0000 0.980 1.000 0.000
#> SRR1663219 1 0.0000 0.980 1.000 0.000
#> SRR1663220 1 0.0000 0.980 1.000 0.000
#> SRR1663221 2 0.4562 0.919 0.096 0.904
#> SRR1663222 2 0.1414 0.961 0.020 0.980
#> SRR1663224 2 0.0000 0.963 0.000 1.000
#> SRR1663225 2 0.4562 0.919 0.096 0.904
#> SRR1663226 2 0.4562 0.919 0.096 0.904
#> SRR1663223 2 0.2778 0.945 0.048 0.952
#> SRR1663229 2 0.4562 0.919 0.096 0.904
#> SRR1663231 2 0.0000 0.963 0.000 1.000
#> SRR1663232 2 0.0000 0.963 0.000 1.000
#> SRR1663227 1 0.0000 0.980 1.000 0.000
#> SRR1663228 1 0.0000 0.980 1.000 0.000
#> SRR1663230 2 0.1414 0.961 0.020 0.980
#> SRR1663235 2 0.1414 0.961 0.020 0.980
#> SRR1663233 2 0.1414 0.961 0.020 0.980
#> SRR1663236 1 0.0000 0.980 1.000 0.000
#> SRR1663237 2 0.1414 0.961 0.020 0.980
#> SRR1663238 2 0.0000 0.963 0.000 1.000
#> SRR1663234 2 0.7219 0.811 0.200 0.800
#> SRR1663240 2 0.0938 0.962 0.012 0.988
#> SRR1663239 2 0.0000 0.963 0.000 1.000
#> SRR1663241 1 0.0000 0.980 1.000 0.000
#> SRR1663242 2 0.0376 0.963 0.004 0.996
#> SRR1663243 1 0.9044 0.503 0.680 0.320
#> SRR1663244 2 0.0376 0.963 0.004 0.996
#> SRR1663246 2 0.0000 0.963 0.000 1.000
#> SRR1663245 2 0.5842 0.870 0.140 0.860
#> SRR1663247 1 0.0000 0.980 1.000 0.000
#> SRR1663248 2 0.1414 0.961 0.020 0.980
#> SRR1663250 2 0.0376 0.963 0.004 0.996
#> SRR1663249 2 0.6623 0.832 0.172 0.828
#> SRR1663251 1 0.0000 0.980 1.000 0.000
#> SRR1663252 2 0.4562 0.919 0.096 0.904
#> SRR1663253 2 0.1184 0.962 0.016 0.984
#> SRR1663254 1 0.0000 0.980 1.000 0.000
#> SRR1663255 2 0.0000 0.963 0.000 1.000
#> SRR1663256 2 0.0000 0.963 0.000 1.000
#> SRR1663259 2 0.0000 0.963 0.000 1.000
#> SRR1663258 2 0.4562 0.919 0.096 0.904
#> SRR1663257 2 0.0376 0.963 0.004 0.996
#> SRR1663263 2 0.0000 0.963 0.000 1.000
#> SRR1663260 2 0.0000 0.963 0.000 1.000
#> SRR1663262 2 0.4022 0.930 0.080 0.920
#> SRR1663261 2 0.7139 0.817 0.196 0.804
#> SRR1663265 2 0.7139 0.817 0.196 0.804
#> SRR1663266 2 0.0376 0.963 0.004 0.996
#> SRR1663267 1 0.0000 0.980 1.000 0.000
#> SRR1663264 2 0.0000 0.963 0.000 1.000
#> SRR1663268 2 0.4161 0.925 0.084 0.916
#> SRR1663269 2 0.0000 0.963 0.000 1.000
#> SRR1663271 2 0.1414 0.961 0.020 0.980
#> SRR1663270 2 0.3431 0.928 0.064 0.936
#> SRR1663273 2 0.0000 0.963 0.000 1.000
#> SRR1663272 2 0.0000 0.963 0.000 1.000
#> SRR1663275 2 0.1414 0.961 0.020 0.980
#> SRR1663274 1 0.0000 0.980 1.000 0.000
#> SRR1663276 1 0.0000 0.980 1.000 0.000
#> SRR1663277 1 0.0000 0.980 1.000 0.000
#> SRR1663279 2 0.0000 0.963 0.000 1.000
#> SRR1663278 2 0.0376 0.963 0.004 0.996
#> SRR1663280 2 0.0376 0.963 0.004 0.996
#> SRR1663281 2 0.2778 0.940 0.048 0.952
#> SRR1663282 2 0.2043 0.950 0.032 0.968
#> SRR1663283 1 0.0000 0.980 1.000 0.000
#> SRR1663284 1 0.0000 0.980 1.000 0.000
#> SRR1663286 2 0.1414 0.961 0.020 0.980
#> SRR1663287 2 0.4562 0.919 0.096 0.904
#> SRR1663288 2 0.4562 0.919 0.096 0.904
#> SRR1663291 2 0.1184 0.959 0.016 0.984
#> SRR1663289 2 0.1414 0.961 0.020 0.980
#> SRR1663290 2 0.1414 0.961 0.020 0.980
#> SRR1663285 2 0.0000 0.963 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663210 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663213 3 0.3038 0.906 0.000 0.104 0.896
#> SRR1663211 3 0.2537 0.910 0.000 0.080 0.920
#> SRR1663212 3 0.2625 0.910 0.000 0.084 0.916
#> SRR1663214 3 0.2878 0.908 0.000 0.096 0.904
#> SRR1663215 3 0.2878 0.908 0.000 0.096 0.904
#> SRR1663216 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663217 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663218 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663219 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663220 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663221 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1663222 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663224 3 0.2878 0.908 0.000 0.096 0.904
#> SRR1663225 2 0.2400 0.918 0.004 0.932 0.064
#> SRR1663226 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1663223 2 0.6111 0.407 0.000 0.604 0.396
#> SRR1663229 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1663231 3 0.2796 0.909 0.000 0.092 0.908
#> SRR1663232 3 0.2959 0.907 0.000 0.100 0.900
#> SRR1663227 1 0.0983 0.981 0.980 0.016 0.004
#> SRR1663228 1 0.0661 0.987 0.988 0.008 0.004
#> SRR1663230 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663235 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663233 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663236 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663237 2 0.0000 0.932 0.000 1.000 0.000
#> SRR1663238 3 0.2878 0.908 0.000 0.096 0.904
#> SRR1663234 3 0.9758 0.104 0.356 0.232 0.412
#> SRR1663240 3 0.2261 0.888 0.000 0.068 0.932
#> SRR1663239 3 0.2959 0.907 0.000 0.100 0.900
#> SRR1663241 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663242 3 0.0000 0.889 0.000 0.000 1.000
#> SRR1663243 3 0.6062 0.315 0.384 0.000 0.616
#> SRR1663244 3 0.1031 0.899 0.000 0.024 0.976
#> SRR1663246 3 0.3038 0.906 0.000 0.104 0.896
#> SRR1663245 3 0.0424 0.886 0.008 0.000 0.992
#> SRR1663247 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663248 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663250 3 0.1860 0.907 0.000 0.052 0.948
#> SRR1663249 3 0.2066 0.858 0.060 0.000 0.940
#> SRR1663251 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663252 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1663253 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663254 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663255 3 0.2625 0.911 0.000 0.084 0.916
#> SRR1663256 3 0.4702 0.809 0.000 0.212 0.788
#> SRR1663259 3 0.6154 0.264 0.000 0.408 0.592
#> SRR1663258 2 0.2749 0.912 0.012 0.924 0.064
#> SRR1663257 3 0.1289 0.901 0.000 0.032 0.968
#> SRR1663263 3 0.2878 0.908 0.000 0.096 0.904
#> SRR1663260 3 0.1289 0.901 0.000 0.032 0.968
#> SRR1663262 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1663261 2 0.2400 0.918 0.004 0.932 0.064
#> SRR1663265 2 0.4339 0.867 0.084 0.868 0.048
#> SRR1663266 3 0.0892 0.898 0.000 0.020 0.980
#> SRR1663267 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663264 2 0.4931 0.634 0.000 0.768 0.232
#> SRR1663268 3 0.5988 0.414 0.000 0.368 0.632
#> SRR1663269 3 0.4346 0.841 0.000 0.184 0.816
#> SRR1663271 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663270 3 0.1453 0.901 0.008 0.024 0.968
#> SRR1663273 3 0.2878 0.908 0.000 0.096 0.904
#> SRR1663272 3 0.2878 0.908 0.000 0.096 0.904
#> SRR1663275 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663274 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663276 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663277 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1663279 2 0.5058 0.630 0.000 0.756 0.244
#> SRR1663278 3 0.1289 0.901 0.000 0.032 0.968
#> SRR1663280 3 0.1289 0.901 0.000 0.032 0.968
#> SRR1663281 3 0.1989 0.908 0.004 0.048 0.948
#> SRR1663282 3 0.2200 0.909 0.004 0.056 0.940
#> SRR1663283 1 0.1289 0.978 0.968 0.000 0.032
#> SRR1663284 1 0.1289 0.978 0.968 0.000 0.032
#> SRR1663286 2 0.0000 0.932 0.000 1.000 0.000
#> SRR1663287 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1663288 2 0.2165 0.919 0.000 0.936 0.064
#> SRR1663291 3 0.0237 0.891 0.000 0.004 0.996
#> SRR1663289 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663290 2 0.0237 0.933 0.000 0.996 0.004
#> SRR1663285 3 0.2537 0.910 0.000 0.080 0.920
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663210 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663213 3 0.3311 0.7452 0.000 0.172 0.828 0.000
#> SRR1663211 3 0.4804 0.0305 0.000 0.000 0.616 0.384
#> SRR1663212 3 0.4661 0.1779 0.000 0.000 0.652 0.348
#> SRR1663214 3 0.3402 0.7460 0.000 0.164 0.832 0.004
#> SRR1663215 3 0.3402 0.7460 0.000 0.164 0.832 0.004
#> SRR1663216 2 0.0707 0.8244 0.000 0.980 0.020 0.000
#> SRR1663217 1 0.0336 0.9582 0.992 0.008 0.000 0.000
#> SRR1663218 1 0.1792 0.9091 0.932 0.068 0.000 0.000
#> SRR1663219 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663221 2 0.6110 0.7654 0.000 0.680 0.176 0.144
#> SRR1663222 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663224 3 0.3958 0.6100 0.000 0.032 0.824 0.144
#> SRR1663225 2 0.6110 0.7654 0.000 0.680 0.176 0.144
#> SRR1663226 2 0.6110 0.7654 0.000 0.680 0.176 0.144
#> SRR1663223 4 0.4012 0.5017 0.000 0.184 0.016 0.800
#> SRR1663229 2 0.6110 0.7654 0.000 0.680 0.176 0.144
#> SRR1663231 3 0.3718 0.7437 0.000 0.168 0.820 0.012
#> SRR1663232 3 0.3266 0.7459 0.000 0.168 0.832 0.000
#> SRR1663227 1 0.3043 0.8817 0.876 0.008 0.112 0.004
#> SRR1663228 1 0.2715 0.8949 0.892 0.004 0.100 0.004
#> SRR1663230 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663235 2 0.0592 0.8272 0.000 0.984 0.016 0.000
#> SRR1663233 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663236 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663237 2 0.0376 0.8312 0.000 0.992 0.004 0.004
#> SRR1663238 3 0.3591 0.5665 0.000 0.008 0.824 0.168
#> SRR1663234 4 0.5730 0.5723 0.132 0.076 0.036 0.756
#> SRR1663240 3 0.1798 0.5807 0.000 0.016 0.944 0.040
#> SRR1663239 3 0.4500 0.6369 0.000 0.316 0.684 0.000
#> SRR1663241 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663242 4 0.4500 0.7947 0.000 0.000 0.316 0.684
#> SRR1663243 4 0.2660 0.6302 0.036 0.000 0.056 0.908
#> SRR1663244 4 0.4500 0.7947 0.000 0.000 0.316 0.684
#> SRR1663246 3 0.3356 0.7438 0.000 0.176 0.824 0.000
#> SRR1663245 4 0.3486 0.7289 0.000 0.000 0.188 0.812
#> SRR1663247 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663248 2 0.0712 0.8296 0.004 0.984 0.008 0.004
#> SRR1663250 4 0.4961 0.6202 0.000 0.000 0.448 0.552
#> SRR1663249 4 0.4122 0.7312 0.004 0.000 0.236 0.760
#> SRR1663251 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663252 2 0.6065 0.7666 0.000 0.684 0.176 0.140
#> SRR1663253 2 0.3219 0.6476 0.000 0.836 0.164 0.000
#> SRR1663254 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663255 4 0.4564 0.7839 0.000 0.000 0.328 0.672
#> SRR1663256 3 0.4677 0.6353 0.000 0.316 0.680 0.004
#> SRR1663259 4 0.4139 0.5581 0.000 0.144 0.040 0.816
#> SRR1663258 2 0.6065 0.7666 0.000 0.684 0.176 0.140
#> SRR1663257 4 0.4500 0.7947 0.000 0.000 0.316 0.684
#> SRR1663263 3 0.3999 0.6169 0.000 0.036 0.824 0.140
#> SRR1663260 3 0.4761 0.0777 0.000 0.000 0.628 0.372
#> SRR1663262 2 0.5582 0.7759 0.000 0.724 0.168 0.108
#> SRR1663261 2 0.6155 0.7631 0.000 0.676 0.176 0.148
#> SRR1663265 2 0.6440 0.4209 0.016 0.568 0.044 0.372
#> SRR1663266 4 0.4500 0.7947 0.000 0.000 0.316 0.684
#> SRR1663267 1 0.1022 0.9452 0.968 0.000 0.000 0.032
#> SRR1663264 3 0.4746 0.5870 0.000 0.368 0.632 0.000
#> SRR1663268 3 0.6504 0.2145 0.000 0.216 0.636 0.148
#> SRR1663269 3 0.3528 0.7345 0.000 0.192 0.808 0.000
#> SRR1663271 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663270 4 0.4713 0.7548 0.000 0.000 0.360 0.640
#> SRR1663273 3 0.3402 0.7460 0.000 0.164 0.832 0.004
#> SRR1663272 3 0.3402 0.7460 0.000 0.164 0.832 0.004
#> SRR1663275 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663274 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663276 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663277 1 0.0000 0.9622 1.000 0.000 0.000 0.000
#> SRR1663279 2 0.2443 0.7936 0.000 0.916 0.024 0.060
#> SRR1663278 4 0.4500 0.7947 0.000 0.000 0.316 0.684
#> SRR1663280 4 0.4500 0.7947 0.000 0.000 0.316 0.684
#> SRR1663281 4 0.4925 0.6588 0.000 0.000 0.428 0.572
#> SRR1663282 4 0.4977 0.5803 0.000 0.000 0.460 0.540
#> SRR1663283 1 0.3311 0.8658 0.828 0.000 0.000 0.172
#> SRR1663284 1 0.3311 0.8658 0.828 0.000 0.000 0.172
#> SRR1663286 2 0.1022 0.8272 0.000 0.968 0.032 0.000
#> SRR1663287 2 0.6110 0.7654 0.000 0.680 0.176 0.144
#> SRR1663288 2 0.6110 0.7654 0.000 0.680 0.176 0.144
#> SRR1663291 4 0.4500 0.7947 0.000 0.000 0.316 0.684
#> SRR1663289 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663290 2 0.0524 0.8311 0.000 0.988 0.008 0.004
#> SRR1663285 3 0.4730 0.1061 0.000 0.000 0.636 0.364
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663210 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663213 3 0.0579 0.7608 0.008 0.008 0.984 0.000 0.000
#> SRR1663211 3 0.6697 -0.1615 0.000 0.244 0.404 0.000 0.352
#> SRR1663212 3 0.6679 -0.1174 0.000 0.244 0.420 0.000 0.336
#> SRR1663214 3 0.0290 0.7623 0.008 0.000 0.992 0.000 0.000
#> SRR1663215 3 0.0290 0.7623 0.008 0.000 0.992 0.000 0.000
#> SRR1663216 2 0.5675 0.9298 0.352 0.556 0.092 0.000 0.000
#> SRR1663217 4 0.0162 0.9264 0.000 0.000 0.004 0.996 0.000
#> SRR1663218 4 0.1485 0.8913 0.000 0.020 0.032 0.948 0.000
#> SRR1663219 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663220 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663221 1 0.0324 0.9106 0.992 0.000 0.004 0.000 0.004
#> SRR1663222 2 0.5641 0.9332 0.356 0.556 0.088 0.000 0.000
#> SRR1663224 3 0.2516 0.6783 0.000 0.000 0.860 0.000 0.140
#> SRR1663225 1 0.0324 0.9106 0.992 0.000 0.004 0.000 0.004
#> SRR1663226 1 0.0324 0.9106 0.992 0.000 0.004 0.000 0.004
#> SRR1663223 5 0.3812 0.5658 0.196 0.004 0.020 0.000 0.780
#> SRR1663229 1 0.0324 0.9106 0.992 0.000 0.004 0.000 0.004
#> SRR1663231 3 0.1830 0.7380 0.008 0.000 0.924 0.000 0.068
#> SRR1663232 3 0.1628 0.7449 0.008 0.000 0.936 0.000 0.056
#> SRR1663227 4 0.2891 0.7875 0.176 0.000 0.000 0.824 0.000
#> SRR1663228 4 0.2516 0.8256 0.140 0.000 0.000 0.860 0.000
#> SRR1663230 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663235 2 0.5675 0.9298 0.352 0.556 0.092 0.000 0.000
#> SRR1663233 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663236 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663237 2 0.5530 0.9260 0.368 0.556 0.076 0.000 0.000
#> SRR1663238 3 0.1830 0.7289 0.008 0.000 0.924 0.000 0.068
#> SRR1663234 5 0.3207 0.6314 0.040 0.012 0.000 0.084 0.864
#> SRR1663240 3 0.3509 0.6338 0.196 0.008 0.792 0.000 0.004
#> SRR1663239 3 0.3796 0.4189 0.000 0.300 0.700 0.000 0.000
#> SRR1663241 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663242 5 0.5064 0.6926 0.000 0.248 0.080 0.000 0.672
#> SRR1663243 5 0.1116 0.6513 0.004 0.028 0.000 0.004 0.964
#> SRR1663244 5 0.5064 0.6926 0.000 0.248 0.080 0.000 0.672
#> SRR1663246 3 0.0579 0.7608 0.008 0.008 0.984 0.000 0.000
#> SRR1663245 5 0.3393 0.6329 0.044 0.024 0.072 0.000 0.860
#> SRR1663247 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663248 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663250 5 0.4276 0.3552 0.000 0.004 0.380 0.000 0.616
#> SRR1663249 5 0.4361 0.5929 0.020 0.052 0.144 0.000 0.784
#> SRR1663251 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663252 1 0.0324 0.9073 0.992 0.004 0.004 0.000 0.000
#> SRR1663253 2 0.6177 0.7270 0.212 0.556 0.232 0.000 0.000
#> SRR1663254 4 0.0162 0.9268 0.000 0.000 0.000 0.996 0.004
#> SRR1663255 5 0.5216 0.6833 0.000 0.248 0.092 0.000 0.660
#> SRR1663256 2 0.4283 0.2475 0.000 0.544 0.456 0.000 0.000
#> SRR1663259 5 0.5312 0.6691 0.064 0.248 0.016 0.000 0.672
#> SRR1663258 1 0.0324 0.9073 0.992 0.004 0.004 0.000 0.000
#> SRR1663257 5 0.5064 0.6926 0.000 0.248 0.080 0.000 0.672
#> SRR1663263 3 0.2130 0.7021 0.000 0.080 0.908 0.000 0.012
#> SRR1663260 3 0.4517 0.2969 0.012 0.000 0.600 0.000 0.388
#> SRR1663262 1 0.0880 0.8677 0.968 0.032 0.000 0.000 0.000
#> SRR1663261 1 0.3289 0.7249 0.816 0.000 0.004 0.008 0.172
#> SRR1663265 5 0.7178 -0.0981 0.144 0.376 0.048 0.000 0.432
#> SRR1663266 5 0.5064 0.6926 0.000 0.248 0.080 0.000 0.672
#> SRR1663267 4 0.3906 0.6246 0.000 0.004 0.000 0.704 0.292
#> SRR1663264 3 0.4147 0.3642 0.008 0.316 0.676 0.000 0.000
#> SRR1663268 1 0.5309 0.5115 0.676 0.000 0.160 0.000 0.164
#> SRR1663269 3 0.1408 0.7437 0.008 0.044 0.948 0.000 0.000
#> SRR1663271 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663270 5 0.3398 0.5633 0.000 0.004 0.216 0.000 0.780
#> SRR1663273 3 0.0290 0.7623 0.008 0.000 0.992 0.000 0.000
#> SRR1663272 3 0.0290 0.7623 0.008 0.000 0.992 0.000 0.000
#> SRR1663275 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663274 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663276 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663277 4 0.0000 0.9285 0.000 0.000 0.000 1.000 0.000
#> SRR1663279 2 0.5742 0.9215 0.356 0.556 0.084 0.000 0.004
#> SRR1663278 5 0.5064 0.6926 0.000 0.248 0.080 0.000 0.672
#> SRR1663280 5 0.5064 0.6926 0.000 0.248 0.080 0.000 0.672
#> SRR1663281 5 0.4253 0.4034 0.004 0.004 0.332 0.000 0.660
#> SRR1663282 5 0.4298 0.3603 0.000 0.008 0.352 0.000 0.640
#> SRR1663283 4 0.4769 0.7610 0.008 0.200 0.000 0.728 0.064
#> SRR1663284 4 0.4769 0.7610 0.008 0.200 0.000 0.728 0.064
#> SRR1663286 2 0.5490 0.9200 0.372 0.556 0.072 0.000 0.000
#> SRR1663287 1 0.0324 0.9106 0.992 0.000 0.004 0.000 0.004
#> SRR1663288 1 0.0324 0.9106 0.992 0.000 0.004 0.000 0.004
#> SRR1663291 5 0.5064 0.6926 0.000 0.248 0.080 0.000 0.672
#> SRR1663289 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663290 2 0.5606 0.9357 0.360 0.556 0.084 0.000 0.000
#> SRR1663285 3 0.6549 0.0366 0.000 0.244 0.476 0.000 0.280
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663213 3 0.0777 0.912 0.000 0.024 0.972 0.000 0.004 0.000
#> SRR1663211 5 0.1910 0.854 0.000 0.000 0.108 0.000 0.892 0.000
#> SRR1663212 5 0.2003 0.844 0.000 0.000 0.116 0.000 0.884 0.000
#> SRR1663214 3 0.0806 0.913 0.000 0.020 0.972 0.000 0.008 0.000
#> SRR1663215 3 0.0806 0.913 0.000 0.020 0.972 0.000 0.008 0.000
#> SRR1663216 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663217 1 0.0146 0.912 0.996 0.004 0.000 0.000 0.000 0.000
#> SRR1663218 1 0.0260 0.909 0.992 0.008 0.000 0.000 0.000 0.000
#> SRR1663219 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663221 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663222 2 0.0291 0.944 0.000 0.992 0.000 0.004 0.000 0.004
#> SRR1663224 3 0.2178 0.804 0.000 0.000 0.868 0.132 0.000 0.000
#> SRR1663225 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663226 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663223 4 0.4700 0.720 0.000 0.000 0.000 0.636 0.288 0.076
#> SRR1663229 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663231 3 0.3265 0.795 0.000 0.024 0.824 0.140 0.004 0.008
#> SRR1663232 3 0.3074 0.808 0.000 0.024 0.836 0.132 0.004 0.004
#> SRR1663227 1 0.2562 0.765 0.828 0.000 0.000 0.000 0.000 0.172
#> SRR1663228 1 0.2300 0.796 0.856 0.000 0.000 0.000 0.000 0.144
#> SRR1663230 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663233 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663236 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663237 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663238 3 0.0891 0.901 0.000 0.000 0.968 0.024 0.008 0.000
#> SRR1663234 4 0.4124 0.716 0.008 0.000 0.000 0.648 0.332 0.012
#> SRR1663240 3 0.1610 0.844 0.000 0.000 0.916 0.000 0.000 0.084
#> SRR1663239 2 0.3828 0.184 0.000 0.560 0.440 0.000 0.000 0.000
#> SRR1663241 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663242 5 0.0291 0.946 0.000 0.000 0.004 0.000 0.992 0.004
#> SRR1663243 4 0.3888 0.724 0.000 0.000 0.016 0.672 0.312 0.000
#> SRR1663244 5 0.0291 0.944 0.000 0.000 0.004 0.004 0.992 0.000
#> SRR1663246 3 0.0777 0.912 0.000 0.024 0.972 0.000 0.004 0.000
#> SRR1663245 4 0.4078 0.743 0.000 0.000 0.016 0.676 0.300 0.008
#> SRR1663247 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663248 2 0.0146 0.945 0.004 0.996 0.000 0.000 0.000 0.000
#> SRR1663250 4 0.6167 0.424 0.000 0.000 0.364 0.380 0.252 0.004
#> SRR1663249 4 0.4233 0.752 0.000 0.000 0.028 0.680 0.284 0.008
#> SRR1663251 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663252 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663253 2 0.1444 0.881 0.000 0.928 0.072 0.000 0.000 0.000
#> SRR1663254 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663255 5 0.0260 0.945 0.000 0.000 0.008 0.000 0.992 0.000
#> SRR1663256 2 0.2913 0.745 0.000 0.812 0.180 0.004 0.000 0.004
#> SRR1663259 5 0.0260 0.942 0.000 0.000 0.000 0.000 0.992 0.008
#> SRR1663258 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663257 5 0.0291 0.946 0.000 0.000 0.004 0.000 0.992 0.004
#> SRR1663263 3 0.0713 0.899 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR1663260 4 0.4300 0.275 0.000 0.000 0.432 0.548 0.020 0.000
#> SRR1663262 6 0.2340 0.947 0.000 0.148 0.000 0.000 0.000 0.852
#> SRR1663261 6 0.2320 0.802 0.000 0.004 0.000 0.132 0.000 0.864
#> SRR1663265 4 0.4408 0.509 0.000 0.292 0.004 0.668 0.028 0.008
#> SRR1663266 5 0.0291 0.946 0.000 0.000 0.004 0.000 0.992 0.004
#> SRR1663267 4 0.3592 0.401 0.344 0.000 0.000 0.656 0.000 0.000
#> SRR1663264 3 0.3805 0.504 0.000 0.328 0.664 0.004 0.000 0.004
#> SRR1663268 6 0.2340 0.786 0.000 0.000 0.000 0.148 0.000 0.852
#> SRR1663269 3 0.0790 0.908 0.000 0.032 0.968 0.000 0.000 0.000
#> SRR1663271 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663270 4 0.4566 0.754 0.000 0.000 0.068 0.652 0.280 0.000
#> SRR1663273 3 0.0806 0.913 0.000 0.020 0.972 0.000 0.008 0.000
#> SRR1663272 3 0.0806 0.913 0.000 0.020 0.972 0.000 0.008 0.000
#> SRR1663275 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663274 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663276 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663277 1 0.0000 0.914 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663279 2 0.0260 0.943 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR1663278 5 0.0291 0.946 0.000 0.000 0.004 0.000 0.992 0.004
#> SRR1663280 5 0.0291 0.946 0.000 0.000 0.004 0.000 0.992 0.004
#> SRR1663281 4 0.4941 0.747 0.000 0.000 0.124 0.640 0.236 0.000
#> SRR1663282 4 0.4989 0.742 0.000 0.000 0.140 0.640 0.220 0.000
#> SRR1663283 1 0.6290 0.457 0.476 0.000 0.028 0.356 0.008 0.132
#> SRR1663284 1 0.6290 0.457 0.476 0.000 0.028 0.356 0.008 0.132
#> SRR1663286 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663287 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663288 6 0.2219 0.959 0.000 0.136 0.000 0.000 0.000 0.864
#> SRR1663291 5 0.0291 0.944 0.000 0.000 0.004 0.004 0.992 0.000
#> SRR1663289 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.949 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663285 5 0.2219 0.814 0.000 0.000 0.136 0.000 0.864 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "hclust"]
# you can also extract it by
# res = res_list["MAD:hclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.373 0.876 0.849 0.1831 0.929 0.929
#> 3 3 0.314 0.622 0.809 1.8238 0.565 0.532
#> 4 4 0.367 0.565 0.767 0.1674 0.886 0.774
#> 5 5 0.526 0.537 0.737 0.2105 0.812 0.549
#> 6 6 0.561 0.479 0.702 0.0745 0.885 0.589
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
#> SRR1663209 2 0.327 0.890 0.060 0.940
#> SRR1663210 2 0.327 0.890 0.060 0.940
#> SRR1663213 2 0.552 0.865 0.128 0.872
#> SRR1663211 2 0.552 0.865 0.128 0.872
#> SRR1663212 2 0.552 0.865 0.128 0.872
#> SRR1663214 2 0.552 0.865 0.128 0.872
#> SRR1663215 2 0.552 0.865 0.128 0.872
#> SRR1663216 2 0.327 0.890 0.060 0.940
#> SRR1663217 2 0.541 0.867 0.124 0.876
#> SRR1663218 2 0.541 0.867 0.124 0.876
#> SRR1663219 1 0.552 1.000 0.872 0.128
#> SRR1663220 1 0.552 1.000 0.872 0.128
#> SRR1663221 2 0.430 0.876 0.088 0.912
#> SRR1663222 2 0.358 0.893 0.068 0.932
#> SRR1663224 2 0.402 0.885 0.080 0.920
#> SRR1663225 2 0.430 0.876 0.088 0.912
#> SRR1663226 2 0.430 0.876 0.088 0.912
#> SRR1663223 2 0.482 0.871 0.104 0.896
#> SRR1663229 2 0.443 0.875 0.092 0.908
#> SRR1663231 2 0.388 0.890 0.076 0.924
#> SRR1663232 2 0.388 0.890 0.076 0.924
#> SRR1663227 2 0.653 0.823 0.168 0.832
#> SRR1663228 2 0.653 0.823 0.168 0.832
#> SRR1663230 2 0.469 0.872 0.100 0.900
#> SRR1663235 2 0.327 0.890 0.060 0.940
#> SRR1663233 2 0.482 0.870 0.104 0.896
#> SRR1663236 2 0.563 0.863 0.132 0.868
#> SRR1663237 2 0.482 0.870 0.104 0.896
#> SRR1663238 2 0.552 0.865 0.128 0.872
#> SRR1663234 2 0.584 0.850 0.140 0.860
#> SRR1663240 2 0.443 0.880 0.092 0.908
#> SRR1663239 2 0.443 0.880 0.092 0.908
#> SRR1663241 2 0.373 0.893 0.072 0.928
#> SRR1663242 2 0.295 0.892 0.052 0.948
#> SRR1663243 2 0.482 0.871 0.104 0.896
#> SRR1663244 2 0.767 0.760 0.224 0.776
#> SRR1663246 2 0.552 0.865 0.128 0.872
#> SRR1663245 2 0.482 0.871 0.104 0.896
#> SRR1663247 2 0.644 0.825 0.164 0.836
#> SRR1663248 2 0.327 0.890 0.060 0.940
#> SRR1663250 2 0.430 0.883 0.088 0.912
#> SRR1663249 2 0.644 0.825 0.164 0.836
#> SRR1663251 2 0.644 0.825 0.164 0.836
#> SRR1663252 2 0.430 0.876 0.088 0.912
#> SRR1663253 2 0.443 0.880 0.092 0.908
#> SRR1663254 2 0.388 0.886 0.076 0.924
#> SRR1663255 2 0.430 0.883 0.088 0.912
#> SRR1663256 2 0.343 0.893 0.064 0.936
#> SRR1663259 2 0.327 0.890 0.060 0.940
#> SRR1663258 2 0.416 0.878 0.084 0.916
#> SRR1663257 2 0.343 0.888 0.064 0.936
#> SRR1663263 2 0.552 0.865 0.128 0.872
#> SRR1663260 2 0.443 0.880 0.092 0.908
#> SRR1663262 2 0.529 0.862 0.120 0.880
#> SRR1663261 2 0.644 0.825 0.164 0.836
#> SRR1663265 2 0.482 0.871 0.104 0.896
#> SRR1663266 2 0.295 0.892 0.052 0.948
#> SRR1663267 1 0.552 1.000 0.872 0.128
#> SRR1663264 2 0.358 0.893 0.068 0.932
#> SRR1663268 2 0.443 0.880 0.092 0.908
#> SRR1663269 2 0.443 0.880 0.092 0.908
#> SRR1663271 2 0.482 0.870 0.104 0.896
#> SRR1663270 2 0.552 0.865 0.128 0.872
#> SRR1663273 2 0.552 0.865 0.128 0.872
#> SRR1663272 2 0.552 0.865 0.128 0.872
#> SRR1663275 2 0.482 0.870 0.104 0.896
#> SRR1663274 2 0.482 0.870 0.104 0.896
#> SRR1663276 2 0.584 0.876 0.140 0.860
#> SRR1663277 2 0.584 0.876 0.140 0.860
#> SRR1663279 2 0.327 0.890 0.060 0.940
#> SRR1663278 2 0.343 0.888 0.064 0.936
#> SRR1663280 2 0.295 0.892 0.052 0.948
#> SRR1663281 2 0.402 0.885 0.080 0.920
#> SRR1663282 2 0.402 0.885 0.080 0.920
#> SRR1663283 2 0.443 0.881 0.092 0.908
#> SRR1663284 2 0.443 0.881 0.092 0.908
#> SRR1663286 2 0.482 0.870 0.104 0.896
#> SRR1663287 2 0.529 0.862 0.120 0.880
#> SRR1663288 2 0.430 0.876 0.088 0.912
#> SRR1663291 2 0.443 0.881 0.092 0.908
#> SRR1663289 2 0.482 0.870 0.104 0.896
#> SRR1663290 2 0.482 0.870 0.104 0.896
#> SRR1663285 2 0.552 0.865 0.128 0.872
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.7835 -0.0127 0.052 0.492 0.456
#> SRR1663210 2 0.7835 -0.0127 0.052 0.492 0.456
#> SRR1663213 3 0.0747 0.6819 0.016 0.000 0.984
#> SRR1663211 3 0.1964 0.6741 0.056 0.000 0.944
#> SRR1663212 3 0.1964 0.6741 0.056 0.000 0.944
#> SRR1663214 3 0.0747 0.6819 0.016 0.000 0.984
#> SRR1663215 3 0.0747 0.6819 0.016 0.000 0.984
#> SRR1663216 2 0.7835 -0.0127 0.052 0.492 0.456
#> SRR1663217 3 0.4994 0.6473 0.052 0.112 0.836
#> SRR1663218 3 0.4994 0.6473 0.052 0.112 0.836
#> SRR1663219 1 0.2796 1.0000 0.908 0.092 0.000
#> SRR1663220 1 0.2796 1.0000 0.908 0.092 0.000
#> SRR1663221 2 0.0829 0.7850 0.004 0.984 0.012
#> SRR1663222 2 0.7303 0.5569 0.076 0.680 0.244
#> SRR1663224 3 0.7517 0.4449 0.048 0.364 0.588
#> SRR1663225 2 0.0829 0.7850 0.004 0.984 0.012
#> SRR1663226 2 0.0829 0.7850 0.004 0.984 0.012
#> SRR1663223 2 0.2383 0.7818 0.016 0.940 0.044
#> SRR1663229 2 0.1015 0.7848 0.008 0.980 0.012
#> SRR1663231 2 0.5538 0.7359 0.060 0.808 0.132
#> SRR1663232 2 0.5538 0.7359 0.060 0.808 0.132
#> SRR1663227 2 0.4146 0.7683 0.080 0.876 0.044
#> SRR1663228 2 0.4146 0.7683 0.080 0.876 0.044
#> SRR1663230 2 0.2050 0.7821 0.028 0.952 0.020
#> SRR1663235 2 0.7835 -0.0127 0.052 0.492 0.456
#> SRR1663233 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663236 2 0.6460 0.7082 0.124 0.764 0.112
#> SRR1663237 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663238 3 0.0829 0.6844 0.012 0.004 0.984
#> SRR1663234 2 0.3587 0.7651 0.088 0.892 0.020
#> SRR1663240 3 0.6584 0.4364 0.012 0.380 0.608
#> SRR1663239 3 0.6566 0.4448 0.012 0.376 0.612
#> SRR1663241 2 0.7222 0.5596 0.072 0.684 0.244
#> SRR1663242 2 0.4609 0.7567 0.092 0.856 0.052
#> SRR1663243 2 0.2383 0.7818 0.016 0.940 0.044
#> SRR1663244 2 0.5526 0.7057 0.172 0.792 0.036
#> SRR1663246 3 0.0747 0.6819 0.016 0.000 0.984
#> SRR1663245 2 0.2383 0.7818 0.016 0.940 0.044
#> SRR1663247 2 0.4609 0.7606 0.092 0.856 0.052
#> SRR1663248 3 0.7189 0.5233 0.052 0.292 0.656
#> SRR1663250 2 0.7860 0.1349 0.056 0.528 0.416
#> SRR1663249 2 0.4609 0.7606 0.092 0.856 0.052
#> SRR1663251 2 0.4609 0.7606 0.092 0.856 0.052
#> SRR1663252 2 0.1129 0.7854 0.004 0.976 0.020
#> SRR1663253 3 0.6632 0.4050 0.012 0.392 0.596
#> SRR1663254 2 0.7169 -0.1007 0.024 0.520 0.456
#> SRR1663255 2 0.7860 0.1349 0.056 0.528 0.416
#> SRR1663256 2 0.7340 0.5517 0.076 0.676 0.248
#> SRR1663259 2 0.6929 0.5052 0.052 0.688 0.260
#> SRR1663258 2 0.1315 0.7854 0.008 0.972 0.020
#> SRR1663257 2 0.7411 0.4930 0.076 0.668 0.256
#> SRR1663263 3 0.0747 0.6819 0.016 0.000 0.984
#> SRR1663260 3 0.6264 0.4373 0.004 0.380 0.616
#> SRR1663262 2 0.2434 0.7812 0.024 0.940 0.036
#> SRR1663261 2 0.4709 0.7598 0.092 0.852 0.056
#> SRR1663265 2 0.2383 0.7818 0.016 0.940 0.044
#> SRR1663266 2 0.4609 0.7567 0.092 0.856 0.052
#> SRR1663267 1 0.2796 1.0000 0.908 0.092 0.000
#> SRR1663264 2 0.7303 0.5569 0.076 0.680 0.244
#> SRR1663268 3 0.6264 0.4373 0.004 0.380 0.616
#> SRR1663269 3 0.6584 0.4364 0.012 0.380 0.608
#> SRR1663271 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663270 3 0.0661 0.6839 0.008 0.004 0.988
#> SRR1663273 3 0.0747 0.6819 0.016 0.000 0.984
#> SRR1663272 3 0.0747 0.6819 0.016 0.000 0.984
#> SRR1663275 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663274 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663276 3 0.6843 0.5159 0.028 0.332 0.640
#> SRR1663277 3 0.6843 0.5159 0.028 0.332 0.640
#> SRR1663279 2 0.7552 0.3030 0.052 0.596 0.352
#> SRR1663278 2 0.7411 0.4930 0.076 0.668 0.256
#> SRR1663280 2 0.4609 0.7567 0.092 0.856 0.052
#> SRR1663281 3 0.7517 0.4449 0.048 0.364 0.588
#> SRR1663282 3 0.7517 0.4449 0.048 0.364 0.588
#> SRR1663283 3 0.7095 0.6111 0.048 0.292 0.660
#> SRR1663284 3 0.7095 0.6111 0.048 0.292 0.660
#> SRR1663286 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663287 2 0.2434 0.7812 0.024 0.940 0.036
#> SRR1663288 2 0.0829 0.7850 0.004 0.984 0.012
#> SRR1663291 3 0.7124 0.6061 0.048 0.296 0.656
#> SRR1663289 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663290 2 0.2176 0.7814 0.032 0.948 0.020
#> SRR1663285 3 0.0747 0.6819 0.016 0.000 0.984
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 1 0.6435 0.47803 0.500 0.448 0.036 0.016
#> SRR1663210 1 0.6435 0.47803 0.500 0.448 0.036 0.016
#> SRR1663213 3 0.0817 0.63446 0.024 0.000 0.976 0.000
#> SRR1663211 3 0.2443 0.60979 0.060 0.000 0.916 0.024
#> SRR1663212 3 0.2443 0.60979 0.060 0.000 0.916 0.024
#> SRR1663214 3 0.0817 0.63446 0.024 0.000 0.976 0.000
#> SRR1663215 3 0.0817 0.63446 0.024 0.000 0.976 0.000
#> SRR1663216 1 0.6435 0.47803 0.500 0.448 0.036 0.016
#> SRR1663217 1 0.4895 0.44252 0.796 0.072 0.120 0.012
#> SRR1663218 1 0.4895 0.44252 0.796 0.072 0.120 0.012
#> SRR1663219 4 0.1474 1.00000 0.000 0.052 0.000 0.948
#> SRR1663220 4 0.1474 1.00000 0.000 0.052 0.000 0.948
#> SRR1663221 2 0.0657 0.72564 0.012 0.984 0.000 0.004
#> SRR1663222 2 0.6973 0.39130 0.300 0.556 0.144 0.000
#> SRR1663224 3 0.8217 0.30507 0.248 0.312 0.424 0.016
#> SRR1663225 2 0.0657 0.72564 0.012 0.984 0.000 0.004
#> SRR1663226 2 0.0657 0.72564 0.012 0.984 0.000 0.004
#> SRR1663223 2 0.1792 0.73007 0.068 0.932 0.000 0.000
#> SRR1663229 2 0.0804 0.72497 0.012 0.980 0.000 0.008
#> SRR1663231 2 0.5654 0.60740 0.192 0.728 0.068 0.012
#> SRR1663232 2 0.5654 0.60740 0.192 0.728 0.068 0.012
#> SRR1663227 2 0.4546 0.68557 0.136 0.804 0.004 0.056
#> SRR1663228 2 0.4546 0.68557 0.136 0.804 0.004 0.056
#> SRR1663230 2 0.1520 0.72276 0.020 0.956 0.000 0.024
#> SRR1663235 1 0.6435 0.47803 0.500 0.448 0.036 0.016
#> SRR1663233 2 0.1733 0.72300 0.024 0.948 0.000 0.028
#> SRR1663236 2 0.6198 0.55602 0.312 0.628 0.016 0.044
#> SRR1663237 2 0.1733 0.72300 0.024 0.948 0.000 0.028
#> SRR1663238 3 0.1474 0.63058 0.052 0.000 0.948 0.000
#> SRR1663234 2 0.3948 0.69597 0.064 0.840 0.000 0.096
#> SRR1663240 3 0.7282 0.43800 0.172 0.316 0.512 0.000
#> SRR1663239 3 0.7268 0.44142 0.172 0.312 0.516 0.000
#> SRR1663241 2 0.6955 0.39541 0.296 0.560 0.144 0.000
#> SRR1663242 2 0.3616 0.69856 0.112 0.852 0.000 0.036
#> SRR1663243 2 0.1792 0.73007 0.068 0.932 0.000 0.000
#> SRR1663244 2 0.5792 0.61623 0.124 0.708 0.000 0.168
#> SRR1663246 3 0.1118 0.63121 0.036 0.000 0.964 0.000
#> SRR1663245 2 0.1792 0.73007 0.068 0.932 0.000 0.000
#> SRR1663247 2 0.5321 0.65272 0.192 0.740 0.004 0.064
#> SRR1663248 1 0.5636 0.52451 0.700 0.248 0.036 0.016
#> SRR1663250 2 0.8198 0.00592 0.248 0.432 0.304 0.016
#> SRR1663249 2 0.5321 0.65272 0.192 0.740 0.004 0.064
#> SRR1663251 2 0.5321 0.65272 0.192 0.740 0.004 0.064
#> SRR1663252 2 0.1082 0.72790 0.020 0.972 0.004 0.004
#> SRR1663253 3 0.7321 0.41825 0.172 0.328 0.500 0.000
#> SRR1663254 2 0.7009 -0.24411 0.440 0.468 0.080 0.012
#> SRR1663255 2 0.8198 0.00592 0.248 0.432 0.304 0.016
#> SRR1663256 2 0.6990 0.38566 0.304 0.552 0.144 0.000
#> SRR1663259 2 0.6472 0.19966 0.244 0.664 0.056 0.036
#> SRR1663258 2 0.1191 0.72731 0.024 0.968 0.004 0.004
#> SRR1663257 2 0.6472 0.23959 0.244 0.664 0.056 0.036
#> SRR1663263 3 0.0817 0.63446 0.024 0.000 0.976 0.000
#> SRR1663260 3 0.7344 0.43479 0.180 0.316 0.504 0.000
#> SRR1663262 2 0.1807 0.72935 0.052 0.940 0.000 0.008
#> SRR1663261 2 0.5360 0.65049 0.196 0.736 0.004 0.064
#> SRR1663265 2 0.1792 0.73007 0.068 0.932 0.000 0.000
#> SRR1663266 2 0.3616 0.69856 0.112 0.852 0.000 0.036
#> SRR1663267 4 0.1474 1.00000 0.000 0.052 0.000 0.948
#> SRR1663264 2 0.6973 0.39130 0.300 0.556 0.144 0.000
#> SRR1663268 3 0.7344 0.43479 0.180 0.316 0.504 0.000
#> SRR1663269 3 0.7282 0.43800 0.172 0.316 0.512 0.000
#> SRR1663271 2 0.1733 0.72300 0.024 0.948 0.000 0.028
#> SRR1663270 3 0.1209 0.63473 0.032 0.004 0.964 0.000
#> SRR1663273 3 0.1118 0.63121 0.036 0.000 0.964 0.000
#> SRR1663272 3 0.1118 0.63121 0.036 0.000 0.964 0.000
#> SRR1663275 2 0.1733 0.72300 0.024 0.948 0.000 0.028
#> SRR1663274 2 0.1837 0.72396 0.028 0.944 0.000 0.028
#> SRR1663276 1 0.6908 0.56071 0.584 0.320 0.072 0.024
#> SRR1663277 1 0.6908 0.56071 0.584 0.320 0.072 0.024
#> SRR1663279 2 0.6724 -0.20190 0.364 0.560 0.056 0.020
#> SRR1663278 2 0.6472 0.23959 0.244 0.664 0.056 0.036
#> SRR1663280 2 0.3616 0.69856 0.112 0.852 0.000 0.036
#> SRR1663281 3 0.8217 0.30507 0.248 0.312 0.424 0.016
#> SRR1663282 3 0.8217 0.30507 0.248 0.312 0.424 0.016
#> SRR1663283 1 0.7288 0.47312 0.584 0.252 0.148 0.016
#> SRR1663284 1 0.7288 0.47312 0.584 0.252 0.148 0.016
#> SRR1663286 2 0.1733 0.72300 0.024 0.948 0.000 0.028
#> SRR1663287 2 0.1807 0.72935 0.052 0.940 0.000 0.008
#> SRR1663288 2 0.0657 0.72564 0.012 0.984 0.000 0.004
#> SRR1663291 1 0.7312 0.47010 0.580 0.256 0.148 0.016
#> SRR1663289 2 0.1733 0.72300 0.024 0.948 0.000 0.028
#> SRR1663290 2 0.1733 0.72300 0.024 0.948 0.000 0.028
#> SRR1663285 3 0.0817 0.63446 0.024 0.000 0.976 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 5 0.5790 0.3624 0.036 0.368 0.036 0.000 0.560
#> SRR1663210 5 0.5790 0.3624 0.036 0.368 0.036 0.000 0.560
#> SRR1663213 3 0.0162 0.7374 0.000 0.000 0.996 0.000 0.004
#> SRR1663211 3 0.1854 0.7080 0.008 0.000 0.936 0.036 0.020
#> SRR1663212 3 0.1854 0.7080 0.008 0.000 0.936 0.036 0.020
#> SRR1663214 3 0.0162 0.7374 0.000 0.000 0.996 0.000 0.004
#> SRR1663215 3 0.0162 0.7374 0.000 0.000 0.996 0.000 0.004
#> SRR1663216 5 0.5790 0.3624 0.036 0.368 0.036 0.000 0.560
#> SRR1663217 5 0.2122 0.4325 0.000 0.008 0.032 0.036 0.924
#> SRR1663218 5 0.2122 0.4325 0.000 0.008 0.032 0.036 0.924
#> SRR1663219 1 0.1282 1.0000 0.952 0.004 0.000 0.044 0.000
#> SRR1663220 1 0.1282 1.0000 0.952 0.004 0.000 0.044 0.000
#> SRR1663221 2 0.0404 0.7730 0.000 0.988 0.000 0.000 0.012
#> SRR1663222 4 0.6635 0.5632 0.000 0.188 0.140 0.608 0.064
#> SRR1663224 4 0.6995 -0.0667 0.000 0.076 0.412 0.432 0.080
#> SRR1663225 2 0.0404 0.7730 0.000 0.988 0.000 0.000 0.012
#> SRR1663226 2 0.0404 0.7730 0.000 0.988 0.000 0.000 0.012
#> SRR1663223 2 0.3970 0.6379 0.000 0.752 0.000 0.224 0.024
#> SRR1663229 2 0.0566 0.7730 0.004 0.984 0.000 0.000 0.012
#> SRR1663231 4 0.6703 0.4026 0.012 0.424 0.064 0.460 0.040
#> SRR1663232 4 0.6703 0.4026 0.012 0.424 0.064 0.460 0.040
#> SRR1663227 4 0.4822 0.4465 0.012 0.340 0.000 0.632 0.016
#> SRR1663228 4 0.4822 0.4465 0.012 0.340 0.000 0.632 0.016
#> SRR1663230 2 0.1153 0.7739 0.024 0.964 0.000 0.004 0.008
#> SRR1663235 5 0.5790 0.3624 0.036 0.368 0.036 0.000 0.560
#> SRR1663233 2 0.1369 0.7736 0.028 0.956 0.000 0.008 0.008
#> SRR1663236 4 0.3598 0.5412 0.004 0.088 0.008 0.844 0.056
#> SRR1663237 2 0.1369 0.7736 0.028 0.956 0.000 0.008 0.008
#> SRR1663238 3 0.1965 0.7217 0.000 0.000 0.904 0.096 0.000
#> SRR1663234 2 0.4988 0.5142 0.084 0.716 0.000 0.192 0.008
#> SRR1663240 3 0.6083 0.2540 0.000 0.040 0.492 0.424 0.044
#> SRR1663239 3 0.6079 0.2611 0.000 0.040 0.496 0.420 0.044
#> SRR1663241 4 0.6579 0.5638 0.000 0.188 0.140 0.612 0.060
#> SRR1663242 2 0.5381 0.5706 0.012 0.640 0.000 0.288 0.060
#> SRR1663243 2 0.3970 0.6379 0.000 0.752 0.000 0.224 0.024
#> SRR1663244 4 0.6560 0.3165 0.164 0.312 0.000 0.512 0.012
#> SRR1663246 3 0.1732 0.7269 0.000 0.000 0.920 0.080 0.000
#> SRR1663245 2 0.3970 0.6379 0.000 0.752 0.000 0.224 0.024
#> SRR1663247 4 0.3845 0.5672 0.024 0.208 0.000 0.768 0.000
#> SRR1663248 5 0.4645 0.4557 0.036 0.168 0.036 0.000 0.760
#> SRR1663250 4 0.5477 0.3006 0.000 0.040 0.272 0.652 0.036
#> SRR1663249 4 0.3845 0.5672 0.024 0.208 0.000 0.768 0.000
#> SRR1663251 4 0.3845 0.5672 0.024 0.208 0.000 0.768 0.000
#> SRR1663252 2 0.1877 0.7431 0.000 0.924 0.000 0.064 0.012
#> SRR1663253 3 0.6092 0.2232 0.000 0.040 0.480 0.436 0.044
#> SRR1663254 5 0.6374 0.1282 0.012 0.116 0.000 0.416 0.456
#> SRR1663255 4 0.5477 0.3006 0.000 0.040 0.272 0.652 0.036
#> SRR1663256 4 0.6576 0.5579 0.000 0.180 0.140 0.616 0.064
#> SRR1663259 2 0.7201 0.2115 0.048 0.568 0.076 0.048 0.260
#> SRR1663258 2 0.2046 0.7387 0.000 0.916 0.000 0.068 0.016
#> SRR1663257 2 0.7517 0.2781 0.048 0.580 0.076 0.104 0.192
#> SRR1663263 3 0.0162 0.7374 0.000 0.000 0.996 0.000 0.004
#> SRR1663260 3 0.6089 0.2407 0.000 0.040 0.484 0.432 0.044
#> SRR1663262 2 0.3795 0.6643 0.004 0.788 0.000 0.184 0.024
#> SRR1663261 4 0.3812 0.5674 0.024 0.204 0.000 0.772 0.000
#> SRR1663265 2 0.3970 0.6379 0.000 0.752 0.000 0.224 0.024
#> SRR1663266 2 0.5381 0.5706 0.012 0.640 0.000 0.288 0.060
#> SRR1663267 1 0.1282 1.0000 0.952 0.004 0.000 0.044 0.000
#> SRR1663264 4 0.6635 0.5632 0.000 0.188 0.140 0.608 0.064
#> SRR1663268 3 0.6089 0.2407 0.000 0.040 0.484 0.432 0.044
#> SRR1663269 3 0.6083 0.2540 0.000 0.040 0.492 0.424 0.044
#> SRR1663271 2 0.1369 0.7736 0.028 0.956 0.000 0.008 0.008
#> SRR1663270 3 0.0566 0.7345 0.000 0.000 0.984 0.012 0.004
#> SRR1663273 3 0.1732 0.7269 0.000 0.000 0.920 0.080 0.000
#> SRR1663272 3 0.1732 0.7269 0.000 0.000 0.920 0.080 0.000
#> SRR1663275 2 0.1369 0.7736 0.028 0.956 0.000 0.008 0.008
#> SRR1663274 2 0.2673 0.7314 0.028 0.892 0.000 0.072 0.008
#> SRR1663276 5 0.5648 0.4563 0.024 0.196 0.000 0.104 0.676
#> SRR1663277 5 0.5648 0.4563 0.024 0.196 0.000 0.104 0.676
#> SRR1663279 2 0.6794 -0.1261 0.044 0.468 0.076 0.008 0.404
#> SRR1663278 2 0.7517 0.2781 0.048 0.580 0.076 0.104 0.192
#> SRR1663280 2 0.5381 0.5706 0.012 0.640 0.000 0.288 0.060
#> SRR1663281 4 0.6995 -0.0667 0.000 0.076 0.412 0.432 0.080
#> SRR1663282 4 0.6995 -0.0667 0.000 0.076 0.412 0.432 0.080
#> SRR1663283 5 0.5667 0.3565 0.000 0.024 0.048 0.336 0.592
#> SRR1663284 5 0.5667 0.3565 0.000 0.024 0.048 0.336 0.592
#> SRR1663286 2 0.1369 0.7736 0.028 0.956 0.000 0.008 0.008
#> SRR1663287 2 0.3795 0.6643 0.004 0.788 0.000 0.184 0.024
#> SRR1663288 2 0.0404 0.7730 0.000 0.988 0.000 0.000 0.012
#> SRR1663291 5 0.5681 0.3512 0.000 0.024 0.048 0.340 0.588
#> SRR1663289 2 0.1369 0.7736 0.028 0.956 0.000 0.008 0.008
#> SRR1663290 2 0.1369 0.7736 0.028 0.956 0.000 0.008 0.008
#> SRR1663285 3 0.0162 0.7374 0.000 0.000 0.996 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 1 0.6093 0.3425 0.524 0.304 0.036 0.000 0.136 0.000
#> SRR1663210 1 0.6093 0.3425 0.524 0.304 0.036 0.000 0.136 0.000
#> SRR1663213 3 0.0000 0.8281 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663211 3 0.1267 0.7905 0.000 0.000 0.940 0.000 0.060 0.000
#> SRR1663212 3 0.1267 0.7905 0.000 0.000 0.940 0.000 0.060 0.000
#> SRR1663214 3 0.0000 0.8281 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663215 3 0.0000 0.8281 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663216 1 0.6093 0.3425 0.524 0.304 0.036 0.000 0.136 0.000
#> SRR1663217 1 0.0891 0.4233 0.968 0.000 0.024 0.008 0.000 0.000
#> SRR1663218 1 0.0891 0.4233 0.968 0.000 0.024 0.008 0.000 0.000
#> SRR1663219 6 0.0146 1.0000 0.000 0.004 0.000 0.000 0.000 0.996
#> SRR1663220 6 0.0146 1.0000 0.000 0.004 0.000 0.000 0.000 0.996
#> SRR1663221 2 0.2594 0.7345 0.016 0.884 0.000 0.028 0.072 0.000
#> SRR1663222 4 0.5914 0.5256 0.040 0.132 0.012 0.640 0.172 0.004
#> SRR1663224 5 0.7529 -0.2093 0.080 0.016 0.284 0.280 0.340 0.000
#> SRR1663225 2 0.2594 0.7345 0.016 0.884 0.000 0.028 0.072 0.000
#> SRR1663226 2 0.2594 0.7345 0.016 0.884 0.000 0.028 0.072 0.000
#> SRR1663223 2 0.5824 0.3666 0.004 0.504 0.000 0.188 0.304 0.000
#> SRR1663229 2 0.2537 0.7350 0.016 0.888 0.000 0.028 0.068 0.000
#> SRR1663231 4 0.6281 0.3648 0.016 0.372 0.008 0.484 0.104 0.016
#> SRR1663232 4 0.6281 0.3648 0.016 0.372 0.008 0.484 0.104 0.016
#> SRR1663227 4 0.4207 0.4006 0.020 0.204 0.000 0.744 0.020 0.012
#> SRR1663228 4 0.4207 0.4006 0.020 0.204 0.000 0.744 0.020 0.012
#> SRR1663230 2 0.0692 0.7541 0.000 0.976 0.000 0.004 0.000 0.020
#> SRR1663235 1 0.6093 0.3425 0.524 0.304 0.036 0.000 0.136 0.000
#> SRR1663233 2 0.0891 0.7542 0.000 0.968 0.000 0.008 0.000 0.024
#> SRR1663236 4 0.1296 0.5022 0.032 0.000 0.004 0.952 0.012 0.000
#> SRR1663237 2 0.0891 0.7542 0.000 0.968 0.000 0.008 0.000 0.024
#> SRR1663238 3 0.3534 0.7227 0.000 0.000 0.740 0.016 0.244 0.000
#> SRR1663234 2 0.4467 0.5411 0.000 0.724 0.000 0.184 0.012 0.080
#> SRR1663240 4 0.6695 0.2087 0.040 0.000 0.364 0.372 0.224 0.000
#> SRR1663239 3 0.6695 -0.2947 0.040 0.000 0.368 0.368 0.224 0.000
#> SRR1663241 4 0.5649 0.5268 0.032 0.132 0.012 0.652 0.172 0.000
#> SRR1663242 5 0.5543 0.0873 0.008 0.256 0.000 0.156 0.580 0.000
#> SRR1663243 2 0.5824 0.3666 0.004 0.504 0.000 0.188 0.304 0.000
#> SRR1663244 4 0.5872 0.2802 0.000 0.212 0.000 0.592 0.036 0.160
#> SRR1663246 3 0.3023 0.7465 0.000 0.000 0.768 0.000 0.232 0.000
#> SRR1663245 2 0.5824 0.3666 0.004 0.504 0.000 0.188 0.304 0.000
#> SRR1663247 4 0.2581 0.5010 0.000 0.120 0.000 0.860 0.000 0.020
#> SRR1663248 1 0.4801 0.4170 0.724 0.104 0.036 0.000 0.136 0.000
#> SRR1663250 4 0.6039 0.4428 0.040 0.000 0.140 0.556 0.264 0.000
#> SRR1663249 4 0.2581 0.5010 0.000 0.120 0.000 0.860 0.000 0.020
#> SRR1663251 4 0.2581 0.5010 0.000 0.120 0.000 0.860 0.000 0.020
#> SRR1663252 2 0.3560 0.7004 0.016 0.820 0.000 0.092 0.072 0.000
#> SRR1663253 4 0.6691 0.2313 0.040 0.000 0.352 0.384 0.224 0.000
#> SRR1663254 1 0.6636 0.1357 0.468 0.100 0.000 0.352 0.068 0.012
#> SRR1663255 4 0.6039 0.4428 0.040 0.000 0.140 0.556 0.264 0.000
#> SRR1663256 4 0.5842 0.5239 0.040 0.124 0.012 0.648 0.172 0.004
#> SRR1663259 5 0.7041 -0.0940 0.216 0.304 0.080 0.000 0.400 0.000
#> SRR1663258 2 0.3731 0.6970 0.020 0.816 0.000 0.092 0.068 0.004
#> SRR1663257 5 0.6567 0.0122 0.132 0.292 0.080 0.000 0.496 0.000
#> SRR1663263 3 0.0000 0.8281 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663260 4 0.6705 0.2182 0.040 0.000 0.356 0.376 0.228 0.000
#> SRR1663262 2 0.5615 0.5034 0.016 0.600 0.000 0.184 0.200 0.000
#> SRR1663261 4 0.2536 0.5024 0.000 0.116 0.000 0.864 0.000 0.020
#> SRR1663265 2 0.5824 0.3666 0.004 0.504 0.000 0.188 0.304 0.000
#> SRR1663266 5 0.5506 0.1050 0.008 0.248 0.000 0.156 0.588 0.000
#> SRR1663267 6 0.0146 1.0000 0.000 0.004 0.000 0.000 0.000 0.996
#> SRR1663264 4 0.5914 0.5256 0.040 0.132 0.012 0.640 0.172 0.004
#> SRR1663268 4 0.6705 0.2182 0.040 0.000 0.356 0.376 0.228 0.000
#> SRR1663269 4 0.6695 0.2087 0.040 0.000 0.364 0.372 0.224 0.000
#> SRR1663271 2 0.0891 0.7542 0.000 0.968 0.000 0.008 0.000 0.024
#> SRR1663270 3 0.0405 0.8230 0.000 0.000 0.988 0.008 0.004 0.000
#> SRR1663273 3 0.3101 0.7399 0.000 0.000 0.756 0.000 0.244 0.000
#> SRR1663272 3 0.3101 0.7399 0.000 0.000 0.756 0.000 0.244 0.000
#> SRR1663275 2 0.0891 0.7542 0.000 0.968 0.000 0.008 0.000 0.024
#> SRR1663274 2 0.2209 0.7090 0.000 0.900 0.000 0.072 0.004 0.024
#> SRR1663276 1 0.5326 0.4082 0.676 0.192 0.000 0.092 0.012 0.028
#> SRR1663277 1 0.5326 0.4082 0.676 0.192 0.000 0.092 0.012 0.028
#> SRR1663279 1 0.7147 0.1441 0.360 0.304 0.080 0.000 0.256 0.000
#> SRR1663278 5 0.6578 0.0102 0.132 0.296 0.080 0.000 0.492 0.000
#> SRR1663280 5 0.5506 0.1050 0.008 0.248 0.000 0.156 0.588 0.000
#> SRR1663281 5 0.7529 -0.2093 0.080 0.016 0.284 0.280 0.340 0.000
#> SRR1663282 5 0.7529 -0.2093 0.080 0.016 0.284 0.280 0.340 0.000
#> SRR1663283 1 0.6080 0.3345 0.612 0.012 0.044 0.216 0.112 0.004
#> SRR1663284 1 0.6080 0.3345 0.612 0.012 0.044 0.216 0.112 0.004
#> SRR1663286 2 0.0891 0.7542 0.000 0.968 0.000 0.008 0.000 0.024
#> SRR1663287 2 0.5615 0.5034 0.016 0.600 0.000 0.184 0.200 0.000
#> SRR1663288 2 0.2594 0.7345 0.016 0.884 0.000 0.028 0.072 0.000
#> SRR1663291 1 0.6103 0.3291 0.608 0.012 0.044 0.220 0.112 0.004
#> SRR1663289 2 0.0891 0.7542 0.000 0.968 0.000 0.008 0.000 0.024
#> SRR1663290 2 0.0891 0.7542 0.000 0.968 0.000 0.008 0.000 0.024
#> SRR1663285 3 0.0000 0.8281 0.000 0.000 1.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "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 17717 rows and 83 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 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.191 0.336 0.681 0.4957 0.494 0.494
#> 3 3 0.420 0.793 0.836 0.3022 0.665 0.423
#> 4 4 0.522 0.627 0.754 0.1089 0.942 0.833
#> 5 5 0.563 0.550 0.709 0.0750 0.935 0.793
#> 6 6 0.639 0.599 0.718 0.0513 0.905 0.653
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
#> SRR1663209 2 0.9850 -0.14146 0.428 0.572
#> SRR1663210 2 0.9850 -0.14146 0.428 0.572
#> SRR1663213 2 0.6343 0.51008 0.160 0.840
#> SRR1663211 2 0.4690 0.51368 0.100 0.900
#> SRR1663212 2 0.4690 0.51368 0.100 0.900
#> SRR1663214 2 0.7299 0.49701 0.204 0.796
#> SRR1663215 2 0.7299 0.49701 0.204 0.796
#> SRR1663216 2 0.4690 0.43073 0.100 0.900
#> SRR1663217 2 0.4815 0.51004 0.104 0.896
#> SRR1663218 2 0.4815 0.51004 0.104 0.896
#> SRR1663219 1 0.0376 0.52513 0.996 0.004
#> SRR1663220 1 0.0376 0.52513 0.996 0.004
#> SRR1663221 1 0.9988 0.33560 0.520 0.480
#> SRR1663222 1 0.1414 0.53180 0.980 0.020
#> SRR1663224 2 0.4298 0.44404 0.088 0.912
#> SRR1663225 2 0.8909 0.15429 0.308 0.692
#> SRR1663226 2 0.8909 0.15429 0.308 0.692
#> SRR1663223 1 0.9988 0.33560 0.520 0.480
#> SRR1663229 1 0.9988 0.33560 0.520 0.480
#> SRR1663231 1 0.1414 0.53180 0.980 0.020
#> SRR1663232 1 0.1414 0.53180 0.980 0.020
#> SRR1663227 1 0.0938 0.52892 0.988 0.012
#> SRR1663228 1 0.0938 0.52892 0.988 0.012
#> SRR1663230 1 0.9983 0.33613 0.524 0.476
#> SRR1663235 2 0.5178 0.41816 0.116 0.884
#> SRR1663233 1 0.9983 0.33613 0.524 0.476
#> SRR1663236 1 0.9522 -0.03049 0.628 0.372
#> SRR1663237 1 0.9988 0.33094 0.520 0.480
#> SRR1663238 2 0.9970 0.29908 0.468 0.532
#> SRR1663234 1 0.6438 0.51734 0.836 0.164
#> SRR1663240 2 0.9970 0.29908 0.468 0.532
#> SRR1663239 2 0.2948 0.50200 0.052 0.948
#> SRR1663241 1 0.6887 0.31564 0.816 0.184
#> SRR1663242 2 0.9815 -0.12896 0.420 0.580
#> SRR1663243 2 0.9833 -0.13864 0.424 0.576
#> SRR1663244 1 0.2423 0.53303 0.960 0.040
#> SRR1663246 2 0.9970 0.29908 0.468 0.532
#> SRR1663245 2 0.8713 0.18553 0.292 0.708
#> SRR1663247 1 0.4161 0.52994 0.916 0.084
#> SRR1663248 2 0.8608 0.20435 0.284 0.716
#> SRR1663250 2 0.9970 0.29908 0.468 0.532
#> SRR1663249 1 0.1184 0.52638 0.984 0.016
#> SRR1663251 1 0.1184 0.52638 0.984 0.016
#> SRR1663252 1 0.7528 0.50013 0.784 0.216
#> SRR1663253 1 0.8813 0.09538 0.700 0.300
#> SRR1663254 1 0.5737 0.37788 0.864 0.136
#> SRR1663255 2 0.9977 0.29646 0.472 0.528
#> SRR1663256 1 0.9393 -0.00183 0.644 0.356
#> SRR1663259 2 0.8763 0.17815 0.296 0.704
#> SRR1663258 1 0.7219 0.50774 0.800 0.200
#> SRR1663257 2 0.1184 0.47510 0.016 0.984
#> SRR1663263 2 0.7299 0.49701 0.204 0.796
#> SRR1663260 2 0.9970 0.29908 0.468 0.532
#> SRR1663262 1 0.9983 0.33613 0.524 0.476
#> SRR1663261 1 0.0376 0.52841 0.996 0.004
#> SRR1663265 1 0.9988 0.33560 0.520 0.480
#> SRR1663266 2 0.4939 0.42416 0.108 0.892
#> SRR1663267 1 0.0376 0.52513 0.996 0.004
#> SRR1663264 1 0.9427 -0.01092 0.640 0.360
#> SRR1663268 2 0.9954 0.30499 0.460 0.540
#> SRR1663269 2 0.9970 0.29908 0.468 0.532
#> SRR1663271 1 0.9988 0.33094 0.520 0.480
#> SRR1663270 2 0.7299 0.49701 0.204 0.796
#> SRR1663273 2 0.9977 0.29678 0.472 0.528
#> SRR1663272 2 0.9970 0.29908 0.468 0.532
#> SRR1663275 1 0.9988 0.33094 0.520 0.480
#> SRR1663274 1 0.7056 0.50975 0.808 0.192
#> SRR1663276 1 0.8267 0.45127 0.740 0.260
#> SRR1663277 1 0.8267 0.45127 0.740 0.260
#> SRR1663279 2 0.7056 0.33388 0.192 0.808
#> SRR1663278 2 0.9833 -0.13864 0.424 0.576
#> SRR1663280 2 0.7528 0.30411 0.216 0.784
#> SRR1663281 2 0.6048 0.51337 0.148 0.852
#> SRR1663282 2 0.6048 0.51337 0.148 0.852
#> SRR1663283 1 0.9850 -0.16348 0.572 0.428
#> SRR1663284 1 0.9850 -0.16348 0.572 0.428
#> SRR1663286 1 0.9988 0.33094 0.520 0.480
#> SRR1663287 1 0.9988 0.33560 0.520 0.480
#> SRR1663288 2 0.8955 0.14516 0.312 0.688
#> SRR1663291 2 0.9988 0.29295 0.480 0.520
#> SRR1663289 1 0.9988 0.33560 0.520 0.480
#> SRR1663290 1 0.9988 0.33560 0.520 0.480
#> SRR1663285 2 0.7299 0.49701 0.204 0.796
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.219 0.892 0.028 0.948 0.024
#> SRR1663210 2 0.219 0.892 0.028 0.948 0.024
#> SRR1663213 3 0.271 0.859 0.000 0.088 0.912
#> SRR1663211 3 0.394 0.826 0.000 0.156 0.844
#> SRR1663212 3 0.394 0.826 0.000 0.156 0.844
#> SRR1663214 3 0.254 0.860 0.000 0.080 0.920
#> SRR1663215 3 0.254 0.860 0.000 0.080 0.920
#> SRR1663216 2 0.245 0.876 0.012 0.936 0.052
#> SRR1663217 3 0.649 0.737 0.052 0.216 0.732
#> SRR1663218 3 0.649 0.737 0.052 0.216 0.732
#> SRR1663219 1 0.399 0.779 0.884 0.052 0.064
#> SRR1663220 1 0.399 0.779 0.884 0.052 0.064
#> SRR1663221 2 0.364 0.886 0.084 0.892 0.024
#> SRR1663222 1 0.678 0.796 0.744 0.140 0.116
#> SRR1663224 2 0.574 0.642 0.012 0.732 0.256
#> SRR1663225 2 0.298 0.890 0.024 0.920 0.056
#> SRR1663226 2 0.298 0.890 0.024 0.920 0.056
#> SRR1663223 2 0.412 0.878 0.108 0.868 0.024
#> SRR1663229 2 0.338 0.879 0.092 0.896 0.012
#> SRR1663231 1 0.698 0.794 0.732 0.140 0.128
#> SRR1663232 1 0.698 0.794 0.732 0.140 0.128
#> SRR1663227 1 0.604 0.806 0.788 0.104 0.108
#> SRR1663228 1 0.604 0.806 0.788 0.104 0.108
#> SRR1663230 2 0.319 0.872 0.100 0.896 0.004
#> SRR1663235 2 0.406 0.845 0.044 0.880 0.076
#> SRR1663233 2 0.327 0.869 0.104 0.892 0.004
#> SRR1663236 1 0.638 0.695 0.712 0.032 0.256
#> SRR1663237 2 0.319 0.871 0.100 0.896 0.004
#> SRR1663238 3 0.304 0.817 0.084 0.008 0.908
#> SRR1663234 1 0.506 0.739 0.784 0.208 0.008
#> SRR1663240 3 0.354 0.812 0.100 0.012 0.888
#> SRR1663239 3 0.362 0.835 0.000 0.136 0.864
#> SRR1663241 1 0.585 0.771 0.776 0.044 0.180
#> SRR1663242 2 0.337 0.877 0.052 0.908 0.040
#> SRR1663243 2 0.315 0.880 0.048 0.916 0.036
#> SRR1663244 1 0.504 0.801 0.836 0.104 0.060
#> SRR1663246 3 0.258 0.834 0.064 0.008 0.928
#> SRR1663245 2 0.368 0.872 0.044 0.896 0.060
#> SRR1663247 1 0.500 0.793 0.832 0.124 0.044
#> SRR1663248 2 0.410 0.844 0.060 0.880 0.060
#> SRR1663250 3 0.598 0.633 0.228 0.028 0.744
#> SRR1663249 1 0.484 0.804 0.848 0.076 0.076
#> SRR1663251 1 0.447 0.804 0.864 0.060 0.076
#> SRR1663252 2 0.582 0.691 0.224 0.752 0.024
#> SRR1663253 1 0.788 0.427 0.520 0.056 0.424
#> SRR1663254 1 0.462 0.774 0.840 0.024 0.136
#> SRR1663255 3 0.654 0.637 0.220 0.052 0.728
#> SRR1663256 1 0.680 0.720 0.708 0.056 0.236
#> SRR1663259 2 0.210 0.883 0.004 0.944 0.052
#> SRR1663258 1 0.590 0.719 0.736 0.244 0.020
#> SRR1663257 2 0.643 0.411 0.012 0.640 0.348
#> SRR1663263 3 0.263 0.859 0.000 0.084 0.916
#> SRR1663260 3 0.294 0.833 0.072 0.012 0.916
#> SRR1663262 2 0.369 0.877 0.108 0.880 0.012
#> SRR1663261 1 0.409 0.803 0.880 0.052 0.068
#> SRR1663265 2 0.429 0.880 0.104 0.864 0.032
#> SRR1663266 2 0.369 0.844 0.012 0.880 0.108
#> SRR1663267 1 0.399 0.779 0.884 0.052 0.064
#> SRR1663264 1 0.756 0.389 0.520 0.040 0.440
#> SRR1663268 3 0.294 0.833 0.072 0.012 0.916
#> SRR1663269 3 0.287 0.823 0.076 0.008 0.916
#> SRR1663271 2 0.277 0.880 0.080 0.916 0.004
#> SRR1663270 3 0.343 0.853 0.004 0.112 0.884
#> SRR1663273 3 0.259 0.828 0.072 0.004 0.924
#> SRR1663272 3 0.296 0.820 0.080 0.008 0.912
#> SRR1663275 2 0.319 0.871 0.100 0.896 0.004
#> SRR1663274 1 0.573 0.698 0.720 0.272 0.008
#> SRR1663276 1 0.732 0.620 0.668 0.264 0.068
#> SRR1663277 1 0.732 0.620 0.668 0.264 0.068
#> SRR1663279 2 0.216 0.880 0.000 0.936 0.064
#> SRR1663278 2 0.195 0.887 0.008 0.952 0.040
#> SRR1663280 2 0.344 0.863 0.016 0.896 0.088
#> SRR1663281 3 0.506 0.807 0.016 0.184 0.800
#> SRR1663282 3 0.506 0.807 0.016 0.184 0.800
#> SRR1663283 1 0.677 0.636 0.692 0.044 0.264
#> SRR1663284 1 0.677 0.636 0.692 0.044 0.264
#> SRR1663286 2 0.259 0.882 0.072 0.924 0.004
#> SRR1663287 2 0.368 0.874 0.116 0.876 0.008
#> SRR1663288 2 0.288 0.889 0.024 0.924 0.052
#> SRR1663291 1 0.746 0.480 0.584 0.044 0.372
#> SRR1663289 2 0.335 0.869 0.108 0.888 0.004
#> SRR1663290 2 0.335 0.869 0.108 0.888 0.004
#> SRR1663285 3 0.263 0.859 0.000 0.084 0.916
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.328 0.7633 0.088 0.880 0.024 0.008
#> SRR1663210 2 0.328 0.7633 0.088 0.880 0.024 0.008
#> SRR1663213 3 0.164 0.8220 0.000 0.044 0.948 0.008
#> SRR1663211 3 0.340 0.7866 0.068 0.060 0.872 0.000
#> SRR1663212 3 0.340 0.7866 0.068 0.060 0.872 0.000
#> SRR1663214 3 0.104 0.8258 0.000 0.020 0.972 0.008
#> SRR1663215 3 0.104 0.8258 0.000 0.020 0.972 0.008
#> SRR1663216 2 0.406 0.7520 0.120 0.836 0.036 0.008
#> SRR1663217 3 0.754 0.3864 0.280 0.148 0.552 0.020
#> SRR1663218 3 0.754 0.3864 0.280 0.148 0.552 0.020
#> SRR1663219 1 0.636 0.5425 0.560 0.024 0.028 0.388
#> SRR1663220 1 0.636 0.5425 0.560 0.024 0.028 0.388
#> SRR1663221 2 0.332 0.7663 0.036 0.888 0.016 0.060
#> SRR1663222 4 0.364 0.6117 0.024 0.088 0.020 0.868
#> SRR1663224 2 0.710 0.6155 0.156 0.652 0.152 0.040
#> SRR1663225 2 0.194 0.7774 0.028 0.940 0.032 0.000
#> SRR1663226 2 0.194 0.7774 0.028 0.940 0.032 0.000
#> SRR1663223 2 0.370 0.7636 0.064 0.868 0.012 0.056
#> SRR1663229 2 0.294 0.7621 0.052 0.900 0.004 0.044
#> SRR1663231 4 0.350 0.6177 0.024 0.080 0.020 0.876
#> SRR1663232 4 0.350 0.6177 0.024 0.080 0.020 0.876
#> SRR1663227 4 0.371 0.6257 0.024 0.080 0.028 0.868
#> SRR1663228 4 0.371 0.6257 0.024 0.080 0.028 0.868
#> SRR1663230 2 0.470 0.7195 0.120 0.800 0.004 0.076
#> SRR1663235 2 0.610 0.5664 0.264 0.668 0.048 0.020
#> SRR1663233 2 0.476 0.7180 0.120 0.796 0.004 0.080
#> SRR1663236 4 0.331 0.6047 0.036 0.000 0.092 0.872
#> SRR1663237 2 0.464 0.7234 0.116 0.804 0.004 0.076
#> SRR1663238 3 0.259 0.8059 0.016 0.000 0.904 0.080
#> SRR1663234 4 0.585 0.3892 0.188 0.100 0.004 0.708
#> SRR1663240 3 0.458 0.6585 0.020 0.000 0.748 0.232
#> SRR1663239 3 0.193 0.8147 0.004 0.056 0.936 0.004
#> SRR1663241 4 0.251 0.6281 0.020 0.008 0.052 0.920
#> SRR1663242 2 0.599 0.6963 0.180 0.724 0.060 0.036
#> SRR1663243 2 0.565 0.7077 0.168 0.748 0.044 0.040
#> SRR1663244 4 0.508 0.4330 0.172 0.072 0.000 0.756
#> SRR1663246 3 0.245 0.8090 0.016 0.000 0.912 0.072
#> SRR1663245 2 0.580 0.7029 0.168 0.740 0.056 0.036
#> SRR1663247 4 0.410 0.5580 0.080 0.088 0.000 0.832
#> SRR1663248 2 0.609 0.5674 0.260 0.672 0.044 0.024
#> SRR1663250 4 0.655 0.3377 0.092 0.000 0.340 0.568
#> SRR1663249 4 0.325 0.6081 0.072 0.024 0.016 0.888
#> SRR1663251 4 0.420 0.5557 0.128 0.032 0.012 0.828
#> SRR1663252 2 0.576 -0.0682 0.028 0.520 0.000 0.452
#> SRR1663253 4 0.564 0.5474 0.032 0.044 0.184 0.740
#> SRR1663254 4 0.420 0.5349 0.156 0.000 0.036 0.808
#> SRR1663255 4 0.757 0.3306 0.164 0.016 0.276 0.544
#> SRR1663256 4 0.395 0.6289 0.048 0.024 0.068 0.860
#> SRR1663259 2 0.444 0.7426 0.128 0.812 0.056 0.004
#> SRR1663258 4 0.446 0.5151 0.044 0.164 0.000 0.792
#> SRR1663257 2 0.741 0.5382 0.172 0.596 0.208 0.024
#> SRR1663263 3 0.123 0.8256 0.004 0.020 0.968 0.008
#> SRR1663260 3 0.366 0.7744 0.012 0.004 0.836 0.148
#> SRR1663262 2 0.414 0.7506 0.092 0.836 0.004 0.068
#> SRR1663261 4 0.425 0.5592 0.116 0.036 0.016 0.832
#> SRR1663265 2 0.382 0.7676 0.076 0.864 0.020 0.040
#> SRR1663266 2 0.627 0.6793 0.180 0.708 0.076 0.036
#> SRR1663267 1 0.636 0.5425 0.560 0.024 0.028 0.388
#> SRR1663264 4 0.556 0.5184 0.032 0.024 0.224 0.720
#> SRR1663268 3 0.366 0.7744 0.012 0.004 0.836 0.148
#> SRR1663269 3 0.266 0.8046 0.016 0.000 0.900 0.084
#> SRR1663271 2 0.457 0.7274 0.116 0.808 0.004 0.072
#> SRR1663270 3 0.383 0.7802 0.100 0.024 0.856 0.020
#> SRR1663273 3 0.252 0.8070 0.016 0.000 0.908 0.076
#> SRR1663272 3 0.259 0.8059 0.016 0.000 0.904 0.080
#> SRR1663275 2 0.463 0.7247 0.120 0.804 0.004 0.072
#> SRR1663274 4 0.569 0.3848 0.116 0.152 0.004 0.728
#> SRR1663276 1 0.880 0.3807 0.400 0.224 0.052 0.324
#> SRR1663277 1 0.880 0.3807 0.400 0.224 0.052 0.324
#> SRR1663279 2 0.379 0.7592 0.080 0.856 0.060 0.004
#> SRR1663278 2 0.528 0.7168 0.152 0.772 0.048 0.028
#> SRR1663280 2 0.595 0.6959 0.176 0.728 0.060 0.036
#> SRR1663281 3 0.778 0.5550 0.156 0.164 0.608 0.072
#> SRR1663282 3 0.778 0.5550 0.156 0.164 0.608 0.072
#> SRR1663283 4 0.743 -0.0517 0.404 0.008 0.132 0.456
#> SRR1663284 4 0.743 -0.0517 0.404 0.008 0.132 0.456
#> SRR1663286 2 0.400 0.7409 0.108 0.840 0.004 0.048
#> SRR1663287 2 0.380 0.7527 0.076 0.856 0.004 0.064
#> SRR1663288 2 0.194 0.7770 0.028 0.940 0.032 0.000
#> SRR1663291 4 0.747 0.2281 0.288 0.008 0.172 0.532
#> SRR1663289 2 0.472 0.7228 0.112 0.800 0.004 0.084
#> SRR1663290 2 0.472 0.7228 0.112 0.800 0.004 0.084
#> SRR1663285 3 0.123 0.8256 0.004 0.020 0.968 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.399 0.415 0.000 0.688 0.000 0.004 0.308
#> SRR1663210 2 0.399 0.415 0.000 0.688 0.000 0.004 0.308
#> SRR1663213 3 0.136 0.797 0.000 0.012 0.952 0.000 0.036
#> SRR1663211 3 0.485 0.725 0.060 0.044 0.784 0.012 0.100
#> SRR1663212 3 0.485 0.725 0.060 0.044 0.784 0.012 0.100
#> SRR1663214 3 0.101 0.797 0.000 0.012 0.968 0.000 0.020
#> SRR1663215 3 0.101 0.797 0.000 0.012 0.968 0.000 0.020
#> SRR1663216 2 0.417 0.372 0.000 0.648 0.004 0.000 0.348
#> SRR1663217 5 0.554 0.495 0.004 0.084 0.300 0.000 0.612
#> SRR1663218 5 0.554 0.495 0.004 0.084 0.300 0.000 0.612
#> SRR1663219 1 0.283 0.668 0.852 0.004 0.000 0.140 0.004
#> SRR1663220 1 0.283 0.668 0.852 0.004 0.000 0.140 0.004
#> SRR1663221 2 0.467 0.557 0.036 0.780 0.000 0.084 0.100
#> SRR1663222 4 0.223 0.671 0.012 0.032 0.004 0.924 0.028
#> SRR1663224 2 0.706 0.410 0.076 0.600 0.080 0.028 0.216
#> SRR1663225 2 0.397 0.567 0.024 0.828 0.004 0.048 0.096
#> SRR1663226 2 0.397 0.567 0.024 0.828 0.004 0.048 0.096
#> SRR1663223 2 0.433 0.571 0.056 0.808 0.004 0.032 0.100
#> SRR1663229 2 0.513 0.543 0.052 0.748 0.000 0.076 0.124
#> SRR1663231 4 0.153 0.677 0.004 0.024 0.004 0.952 0.016
#> SRR1663232 4 0.153 0.677 0.004 0.024 0.004 0.952 0.016
#> SRR1663227 4 0.383 0.664 0.064 0.044 0.004 0.844 0.044
#> SRR1663228 4 0.383 0.664 0.064 0.044 0.004 0.844 0.044
#> SRR1663230 2 0.631 0.447 0.044 0.616 0.000 0.108 0.232
#> SRR1663235 5 0.440 0.429 0.000 0.352 0.012 0.000 0.636
#> SRR1663233 2 0.634 0.436 0.036 0.608 0.000 0.124 0.232
#> SRR1663236 4 0.451 0.608 0.064 0.016 0.056 0.812 0.052
#> SRR1663237 2 0.640 0.431 0.036 0.600 0.000 0.128 0.236
#> SRR1663238 3 0.249 0.789 0.008 0.000 0.900 0.072 0.020
#> SRR1663234 4 0.595 0.492 0.224 0.052 0.000 0.652 0.072
#> SRR1663240 3 0.497 0.549 0.016 0.000 0.672 0.280 0.032
#> SRR1663239 3 0.274 0.795 0.012 0.036 0.904 0.016 0.032
#> SRR1663241 4 0.215 0.665 0.040 0.000 0.016 0.924 0.020
#> SRR1663242 2 0.623 0.477 0.080 0.660 0.052 0.012 0.196
#> SRR1663243 2 0.577 0.496 0.072 0.684 0.024 0.016 0.204
#> SRR1663244 4 0.549 0.504 0.276 0.032 0.000 0.648 0.044
#> SRR1663246 3 0.201 0.793 0.004 0.000 0.924 0.056 0.016
#> SRR1663245 2 0.596 0.486 0.072 0.672 0.032 0.016 0.208
#> SRR1663247 4 0.543 0.581 0.176 0.056 0.004 0.716 0.048
#> SRR1663248 5 0.464 0.437 0.000 0.344 0.012 0.008 0.636
#> SRR1663250 4 0.646 0.417 0.048 0.016 0.184 0.648 0.104
#> SRR1663249 4 0.475 0.592 0.152 0.028 0.000 0.760 0.060
#> SRR1663251 4 0.493 0.541 0.248 0.016 0.000 0.696 0.040
#> SRR1663252 4 0.616 0.324 0.036 0.348 0.000 0.552 0.064
#> SRR1663253 4 0.340 0.646 0.012 0.016 0.080 0.864 0.028
#> SRR1663254 4 0.576 0.506 0.132 0.016 0.016 0.696 0.140
#> SRR1663255 4 0.663 0.421 0.048 0.028 0.148 0.652 0.124
#> SRR1663256 4 0.235 0.662 0.020 0.000 0.028 0.916 0.036
#> SRR1663259 2 0.494 0.512 0.060 0.728 0.020 0.000 0.192
#> SRR1663258 4 0.487 0.551 0.032 0.156 0.000 0.752 0.060
#> SRR1663257 2 0.694 0.360 0.068 0.580 0.128 0.004 0.220
#> SRR1663263 3 0.161 0.793 0.016 0.012 0.948 0.000 0.024
#> SRR1663260 3 0.476 0.743 0.020 0.020 0.776 0.140 0.044
#> SRR1663262 2 0.503 0.557 0.068 0.764 0.004 0.052 0.112
#> SRR1663261 4 0.484 0.554 0.256 0.008 0.000 0.692 0.044
#> SRR1663265 2 0.445 0.554 0.056 0.792 0.004 0.024 0.124
#> SRR1663266 2 0.655 0.450 0.084 0.636 0.068 0.012 0.200
#> SRR1663267 1 0.283 0.668 0.852 0.004 0.000 0.140 0.004
#> SRR1663264 4 0.374 0.628 0.012 0.008 0.108 0.836 0.036
#> SRR1663268 3 0.484 0.736 0.020 0.020 0.768 0.148 0.044
#> SRR1663269 3 0.304 0.783 0.016 0.000 0.872 0.088 0.024
#> SRR1663271 2 0.615 0.449 0.036 0.624 0.000 0.104 0.236
#> SRR1663270 3 0.429 0.738 0.036 0.032 0.808 0.008 0.116
#> SRR1663273 3 0.201 0.793 0.004 0.000 0.924 0.056 0.016
#> SRR1663272 3 0.224 0.789 0.004 0.000 0.912 0.064 0.020
#> SRR1663275 2 0.630 0.440 0.036 0.612 0.000 0.120 0.232
#> SRR1663274 4 0.581 0.468 0.060 0.120 0.000 0.696 0.124
#> SRR1663276 5 0.722 0.350 0.160 0.076 0.004 0.204 0.556
#> SRR1663277 5 0.722 0.350 0.160 0.076 0.004 0.204 0.556
#> SRR1663279 2 0.503 0.508 0.044 0.724 0.036 0.000 0.196
#> SRR1663278 2 0.519 0.507 0.064 0.716 0.020 0.004 0.196
#> SRR1663280 2 0.641 0.462 0.080 0.648 0.064 0.012 0.196
#> SRR1663281 3 0.888 0.243 0.072 0.196 0.428 0.104 0.200
#> SRR1663282 3 0.888 0.243 0.072 0.196 0.428 0.104 0.200
#> SRR1663283 1 0.845 0.435 0.376 0.020 0.092 0.284 0.228
#> SRR1663284 1 0.845 0.435 0.376 0.020 0.092 0.284 0.228
#> SRR1663286 2 0.574 0.462 0.028 0.652 0.000 0.080 0.240
#> SRR1663287 2 0.518 0.550 0.056 0.748 0.004 0.056 0.136
#> SRR1663288 2 0.369 0.566 0.024 0.840 0.004 0.028 0.104
#> SRR1663291 4 0.829 -0.203 0.132 0.024 0.112 0.404 0.328
#> SRR1663289 2 0.635 0.445 0.036 0.612 0.000 0.136 0.216
#> SRR1663290 2 0.635 0.445 0.036 0.612 0.000 0.136 0.216
#> SRR1663285 3 0.161 0.793 0.016 0.012 0.948 0.000 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.5527 0.410 0.232 0.560 0.000 0.000 0.208 0.000
#> SRR1663210 2 0.5527 0.410 0.232 0.560 0.000 0.000 0.208 0.000
#> SRR1663213 3 0.1716 0.832 0.028 0.000 0.932 0.000 0.036 0.004
#> SRR1663211 3 0.5486 0.619 0.104 0.000 0.632 0.008 0.236 0.020
#> SRR1663212 3 0.5486 0.619 0.104 0.000 0.632 0.008 0.236 0.020
#> SRR1663214 3 0.1251 0.832 0.012 0.000 0.956 0.000 0.024 0.008
#> SRR1663215 3 0.1251 0.832 0.012 0.000 0.956 0.000 0.024 0.008
#> SRR1663216 2 0.6204 0.292 0.296 0.468 0.004 0.008 0.224 0.000
#> SRR1663217 1 0.5519 0.434 0.636 0.072 0.244 0.008 0.040 0.000
#> SRR1663218 1 0.5519 0.434 0.636 0.072 0.244 0.008 0.040 0.000
#> SRR1663219 6 0.1930 1.000 0.000 0.048 0.000 0.036 0.000 0.916
#> SRR1663220 6 0.1930 1.000 0.000 0.048 0.000 0.036 0.000 0.916
#> SRR1663221 2 0.6253 0.445 0.144 0.540 0.000 0.012 0.276 0.028
#> SRR1663222 4 0.2952 0.702 0.004 0.156 0.000 0.828 0.008 0.004
#> SRR1663224 5 0.5164 0.679 0.080 0.084 0.064 0.016 0.744 0.012
#> SRR1663225 2 0.6626 0.393 0.204 0.476 0.000 0.012 0.280 0.028
#> SRR1663226 2 0.6626 0.393 0.204 0.476 0.000 0.012 0.280 0.028
#> SRR1663223 5 0.5421 0.298 0.072 0.344 0.000 0.008 0.564 0.012
#> SRR1663229 2 0.5597 0.532 0.112 0.636 0.000 0.008 0.216 0.028
#> SRR1663231 4 0.2729 0.715 0.004 0.120 0.004 0.860 0.008 0.004
#> SRR1663232 4 0.2729 0.715 0.004 0.120 0.004 0.860 0.008 0.004
#> SRR1663227 4 0.3790 0.707 0.072 0.036 0.004 0.832 0.016 0.040
#> SRR1663228 4 0.3790 0.707 0.072 0.036 0.004 0.832 0.016 0.040
#> SRR1663230 2 0.0665 0.665 0.004 0.980 0.000 0.008 0.008 0.000
#> SRR1663235 1 0.4932 0.377 0.656 0.224 0.000 0.004 0.116 0.000
#> SRR1663233 2 0.0622 0.661 0.000 0.980 0.000 0.012 0.008 0.000
#> SRR1663236 4 0.2582 0.695 0.052 0.000 0.016 0.896 0.020 0.016
#> SRR1663237 2 0.0665 0.654 0.008 0.980 0.000 0.008 0.004 0.000
#> SRR1663238 3 0.1838 0.828 0.020 0.000 0.928 0.040 0.000 0.012
#> SRR1663234 4 0.6959 0.340 0.024 0.292 0.000 0.432 0.028 0.224
#> SRR1663240 3 0.4915 0.566 0.052 0.000 0.664 0.260 0.008 0.016
#> SRR1663239 3 0.3181 0.815 0.040 0.012 0.868 0.024 0.052 0.004
#> SRR1663241 4 0.0891 0.717 0.000 0.024 0.008 0.968 0.000 0.000
#> SRR1663242 5 0.2146 0.723 0.004 0.116 0.000 0.000 0.880 0.000
#> SRR1663243 5 0.3702 0.707 0.056 0.120 0.000 0.004 0.808 0.012
#> SRR1663244 4 0.6348 0.524 0.032 0.096 0.000 0.584 0.048 0.240
#> SRR1663246 3 0.1679 0.829 0.028 0.000 0.936 0.028 0.000 0.008
#> SRR1663245 5 0.3743 0.712 0.068 0.108 0.004 0.000 0.808 0.012
#> SRR1663247 4 0.5778 0.622 0.084 0.012 0.000 0.664 0.092 0.148
#> SRR1663248 1 0.4793 0.361 0.628 0.288 0.000 0.000 0.084 0.000
#> SRR1663250 4 0.5300 0.552 0.104 0.000 0.072 0.716 0.092 0.016
#> SRR1663249 4 0.4543 0.660 0.072 0.000 0.000 0.760 0.080 0.088
#> SRR1663251 4 0.5224 0.582 0.056 0.004 0.000 0.660 0.044 0.236
#> SRR1663252 4 0.7051 0.257 0.132 0.328 0.000 0.452 0.056 0.032
#> SRR1663253 4 0.3156 0.711 0.012 0.084 0.048 0.852 0.000 0.004
#> SRR1663254 4 0.5362 0.488 0.220 0.004 0.004 0.664 0.040 0.068
#> SRR1663255 4 0.5535 0.526 0.120 0.000 0.064 0.692 0.108 0.016
#> SRR1663256 4 0.1793 0.715 0.008 0.040 0.016 0.932 0.000 0.004
#> SRR1663259 5 0.4125 0.676 0.036 0.204 0.012 0.004 0.744 0.000
#> SRR1663258 4 0.5147 0.616 0.080 0.208 0.000 0.680 0.012 0.020
#> SRR1663257 5 0.4782 0.655 0.084 0.116 0.044 0.004 0.748 0.004
#> SRR1663263 3 0.1906 0.827 0.032 0.000 0.924 0.000 0.036 0.008
#> SRR1663260 3 0.4829 0.737 0.068 0.000 0.740 0.132 0.052 0.008
#> SRR1663262 2 0.4552 0.471 0.032 0.664 0.000 0.012 0.288 0.004
#> SRR1663261 4 0.4934 0.619 0.040 0.008 0.000 0.692 0.040 0.220
#> SRR1663265 5 0.5225 0.410 0.068 0.300 0.000 0.008 0.612 0.012
#> SRR1663266 5 0.2890 0.726 0.016 0.108 0.020 0.000 0.856 0.000
#> SRR1663267 6 0.1930 1.000 0.000 0.048 0.000 0.036 0.000 0.916
#> SRR1663264 4 0.2996 0.711 0.004 0.088 0.048 0.856 0.000 0.004
#> SRR1663268 3 0.4873 0.734 0.076 0.000 0.736 0.132 0.048 0.008
#> SRR1663269 3 0.2414 0.821 0.036 0.000 0.896 0.056 0.000 0.012
#> SRR1663271 2 0.0653 0.666 0.004 0.980 0.000 0.004 0.012 0.000
#> SRR1663270 3 0.4392 0.710 0.072 0.000 0.736 0.000 0.176 0.016
#> SRR1663273 3 0.1599 0.829 0.024 0.000 0.940 0.028 0.000 0.008
#> SRR1663272 3 0.1749 0.827 0.024 0.000 0.932 0.036 0.000 0.008
#> SRR1663275 2 0.0520 0.663 0.000 0.984 0.000 0.008 0.008 0.000
#> SRR1663274 4 0.4728 0.334 0.008 0.484 0.000 0.484 0.012 0.012
#> SRR1663276 1 0.6272 0.432 0.528 0.316 0.000 0.064 0.008 0.084
#> SRR1663277 1 0.6272 0.432 0.528 0.316 0.000 0.064 0.008 0.084
#> SRR1663279 5 0.5329 0.586 0.124 0.208 0.016 0.004 0.648 0.000
#> SRR1663278 5 0.3166 0.703 0.008 0.184 0.008 0.000 0.800 0.000
#> SRR1663280 5 0.2890 0.726 0.016 0.108 0.020 0.000 0.856 0.000
#> SRR1663281 5 0.7570 0.252 0.148 0.028 0.260 0.088 0.464 0.012
#> SRR1663282 5 0.7570 0.252 0.148 0.028 0.260 0.088 0.464 0.012
#> SRR1663283 1 0.8087 0.160 0.308 0.000 0.060 0.276 0.084 0.272
#> SRR1663284 1 0.8087 0.160 0.308 0.000 0.060 0.276 0.084 0.272
#> SRR1663286 2 0.1341 0.669 0.028 0.948 0.000 0.000 0.024 0.000
#> SRR1663287 2 0.5938 0.430 0.104 0.560 0.000 0.012 0.300 0.024
#> SRR1663288 2 0.6697 0.334 0.204 0.448 0.000 0.012 0.308 0.028
#> SRR1663291 1 0.7299 0.139 0.408 0.004 0.068 0.380 0.084 0.056
#> SRR1663289 2 0.0717 0.660 0.000 0.976 0.000 0.016 0.008 0.000
#> SRR1663290 2 0.0717 0.660 0.000 0.976 0.000 0.016 0.008 0.000
#> SRR1663285 3 0.1906 0.827 0.032 0.000 0.924 0.000 0.036 0.008
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 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 0.316 0.653 0.771 0.5040 0.498 0.498
#> 3 3 0.912 0.916 0.965 0.3306 0.732 0.511
#> 4 4 0.676 0.565 0.765 0.1120 0.882 0.664
#> 5 5 0.677 0.515 0.720 0.0723 0.901 0.646
#> 6 6 0.687 0.556 0.743 0.0417 0.880 0.511
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
#> SRR1663209 2 0.9710 0.673 0.400 0.600
#> SRR1663210 2 0.9710 0.673 0.400 0.600
#> SRR1663213 2 0.5178 0.550 0.116 0.884
#> SRR1663211 2 0.3114 0.613 0.056 0.944
#> SRR1663212 2 0.3114 0.613 0.056 0.944
#> SRR1663214 2 0.5178 0.550 0.116 0.884
#> SRR1663215 2 0.5178 0.550 0.116 0.884
#> SRR1663216 2 0.1184 0.661 0.016 0.984
#> SRR1663217 2 0.0376 0.651 0.004 0.996
#> SRR1663218 2 0.0376 0.651 0.004 0.996
#> SRR1663219 1 0.0000 0.687 1.000 0.000
#> SRR1663220 1 0.0000 0.687 1.000 0.000
#> SRR1663221 2 0.9710 0.673 0.400 0.600
#> SRR1663222 1 0.0000 0.687 1.000 0.000
#> SRR1663224 2 0.0000 0.653 0.000 1.000
#> SRR1663225 2 0.8443 0.707 0.272 0.728
#> SRR1663226 2 0.8443 0.707 0.272 0.728
#> SRR1663223 2 0.9710 0.673 0.400 0.600
#> SRR1663229 2 0.9710 0.673 0.400 0.600
#> SRR1663231 1 0.1184 0.691 0.984 0.016
#> SRR1663232 1 0.1184 0.691 0.984 0.016
#> SRR1663227 1 0.0000 0.687 1.000 0.000
#> SRR1663228 1 0.0000 0.687 1.000 0.000
#> SRR1663230 2 0.9710 0.673 0.400 0.600
#> SRR1663235 2 0.1184 0.661 0.016 0.984
#> SRR1663233 2 0.9710 0.673 0.400 0.600
#> SRR1663236 1 0.8909 0.681 0.692 0.308
#> SRR1663237 2 0.9710 0.673 0.400 0.600
#> SRR1663238 1 0.9710 0.649 0.600 0.400
#> SRR1663234 1 0.5178 0.559 0.884 0.116
#> SRR1663240 1 0.9710 0.649 0.600 0.400
#> SRR1663239 2 0.0376 0.651 0.004 0.996
#> SRR1663241 1 0.7376 0.693 0.792 0.208
#> SRR1663242 2 0.8909 0.700 0.308 0.692
#> SRR1663243 2 0.9209 0.694 0.336 0.664
#> SRR1663244 1 0.0376 0.684 0.996 0.004
#> SRR1663246 1 0.9710 0.649 0.600 0.400
#> SRR1663245 2 0.5294 0.694 0.120 0.880
#> SRR1663247 1 0.0376 0.684 0.996 0.004
#> SRR1663248 2 0.8016 0.708 0.244 0.756
#> SRR1663250 1 0.9710 0.649 0.600 0.400
#> SRR1663249 1 0.0938 0.691 0.988 0.012
#> SRR1663251 1 0.0938 0.691 0.988 0.012
#> SRR1663252 1 0.5059 0.565 0.888 0.112
#> SRR1663253 1 0.8909 0.681 0.692 0.308
#> SRR1663254 1 0.7219 0.693 0.800 0.200
#> SRR1663255 1 0.9710 0.649 0.600 0.400
#> SRR1663256 1 0.8909 0.681 0.692 0.308
#> SRR1663259 2 0.7602 0.706 0.220 0.780
#> SRR1663258 1 0.5059 0.565 0.888 0.112
#> SRR1663257 2 0.0000 0.653 0.000 1.000
#> SRR1663263 2 0.5178 0.550 0.116 0.884
#> SRR1663260 1 0.9710 0.649 0.600 0.400
#> SRR1663262 2 0.9710 0.673 0.400 0.600
#> SRR1663261 1 0.0000 0.687 1.000 0.000
#> SRR1663265 2 0.9710 0.673 0.400 0.600
#> SRR1663266 2 0.0376 0.655 0.004 0.996
#> SRR1663267 1 0.0000 0.687 1.000 0.000
#> SRR1663264 1 0.8909 0.681 0.692 0.308
#> SRR1663268 1 0.9710 0.649 0.600 0.400
#> SRR1663269 1 0.9710 0.649 0.600 0.400
#> SRR1663271 2 0.9710 0.673 0.400 0.600
#> SRR1663270 2 0.5178 0.550 0.116 0.884
#> SRR1663273 1 0.9710 0.649 0.600 0.400
#> SRR1663272 1 0.9710 0.649 0.600 0.400
#> SRR1663275 2 0.9710 0.673 0.400 0.600
#> SRR1663274 1 0.5178 0.559 0.884 0.116
#> SRR1663276 1 0.5059 0.565 0.888 0.112
#> SRR1663277 1 0.5059 0.565 0.888 0.112
#> SRR1663279 2 0.4939 0.691 0.108 0.892
#> SRR1663278 2 0.9087 0.697 0.324 0.676
#> SRR1663280 2 0.4690 0.689 0.100 0.900
#> SRR1663281 2 0.5059 0.555 0.112 0.888
#> SRR1663282 2 0.5059 0.555 0.112 0.888
#> SRR1663283 1 0.9710 0.649 0.600 0.400
#> SRR1663284 1 0.9710 0.649 0.600 0.400
#> SRR1663286 2 0.9710 0.673 0.400 0.600
#> SRR1663287 2 0.9710 0.673 0.400 0.600
#> SRR1663288 2 0.8443 0.707 0.272 0.728
#> SRR1663291 1 0.9710 0.649 0.600 0.400
#> SRR1663289 2 0.9710 0.673 0.400 0.600
#> SRR1663290 2 0.9710 0.673 0.400 0.600
#> SRR1663285 2 0.5178 0.550 0.116 0.884
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663213 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663211 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663212 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663214 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663215 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663216 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663217 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663218 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663219 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663220 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663221 2 0.0237 0.9555 0.004 0.996 0.000
#> SRR1663222 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663224 3 0.1289 0.9467 0.000 0.032 0.968
#> SRR1663225 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663226 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663223 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663229 2 0.0237 0.9555 0.004 0.996 0.000
#> SRR1663231 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663232 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663227 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663228 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663230 2 0.0592 0.9520 0.012 0.988 0.000
#> SRR1663235 2 0.0237 0.9543 0.000 0.996 0.004
#> SRR1663233 2 0.0592 0.9520 0.012 0.988 0.000
#> SRR1663236 1 0.0592 0.9509 0.988 0.000 0.012
#> SRR1663237 2 0.0592 0.9520 0.012 0.988 0.000
#> SRR1663238 3 0.0237 0.9713 0.004 0.000 0.996
#> SRR1663234 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663240 3 0.0592 0.9664 0.012 0.000 0.988
#> SRR1663239 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663241 1 0.0237 0.9555 0.996 0.000 0.004
#> SRR1663242 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663243 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663244 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663246 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663245 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663247 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663248 2 0.0237 0.9543 0.000 0.996 0.004
#> SRR1663250 3 0.5098 0.6631 0.248 0.000 0.752
#> SRR1663249 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663251 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663252 2 0.6308 -0.0127 0.492 0.508 0.000
#> SRR1663253 1 0.5178 0.6800 0.744 0.000 0.256
#> SRR1663254 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663255 3 0.5098 0.6631 0.248 0.000 0.752
#> SRR1663256 1 0.0424 0.9535 0.992 0.000 0.008
#> SRR1663259 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663258 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663257 2 0.6126 0.3249 0.000 0.600 0.400
#> SRR1663263 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663260 3 0.0592 0.9664 0.012 0.000 0.988
#> SRR1663262 2 0.0237 0.9555 0.004 0.996 0.000
#> SRR1663261 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663265 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663266 2 0.5465 0.5802 0.000 0.712 0.288
#> SRR1663267 1 0.0000 0.9574 1.000 0.000 0.000
#> SRR1663264 1 0.4974 0.7114 0.764 0.000 0.236
#> SRR1663268 3 0.0592 0.9664 0.012 0.000 0.988
#> SRR1663269 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663271 2 0.0237 0.9555 0.004 0.996 0.000
#> SRR1663270 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663273 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663272 3 0.0237 0.9713 0.004 0.000 0.996
#> SRR1663275 2 0.0592 0.9520 0.012 0.988 0.000
#> SRR1663274 1 0.0237 0.9547 0.996 0.004 0.000
#> SRR1663276 1 0.0592 0.9512 0.988 0.000 0.012
#> SRR1663277 1 0.0592 0.9512 0.988 0.000 0.012
#> SRR1663279 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663278 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663280 2 0.0892 0.9409 0.000 0.980 0.020
#> SRR1663281 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663282 3 0.0000 0.9733 0.000 0.000 1.000
#> SRR1663283 1 0.3116 0.8747 0.892 0.000 0.108
#> SRR1663284 1 0.3116 0.8747 0.892 0.000 0.108
#> SRR1663286 2 0.0237 0.9555 0.004 0.996 0.000
#> SRR1663287 2 0.0237 0.9555 0.004 0.996 0.000
#> SRR1663288 2 0.0000 0.9560 0.000 1.000 0.000
#> SRR1663291 1 0.5560 0.6068 0.700 0.000 0.300
#> SRR1663289 2 0.0592 0.9520 0.012 0.988 0.000
#> SRR1663290 2 0.0592 0.9520 0.012 0.988 0.000
#> SRR1663285 3 0.0000 0.9733 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.2868 0.6591 0.136 0.864 0.000 0.000
#> SRR1663210 2 0.2868 0.6591 0.136 0.864 0.000 0.000
#> SRR1663213 3 0.0000 0.8605 0.000 0.000 1.000 0.000
#> SRR1663211 3 0.0707 0.8532 0.020 0.000 0.980 0.000
#> SRR1663212 3 0.0707 0.8532 0.020 0.000 0.980 0.000
#> SRR1663214 3 0.0000 0.8605 0.000 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.8605 0.000 0.000 1.000 0.000
#> SRR1663216 2 0.3249 0.6512 0.140 0.852 0.008 0.000
#> SRR1663217 3 0.7678 0.2557 0.332 0.228 0.440 0.000
#> SRR1663218 3 0.7678 0.2557 0.332 0.228 0.440 0.000
#> SRR1663219 4 0.4453 0.7466 0.244 0.012 0.000 0.744
#> SRR1663220 4 0.4453 0.7466 0.244 0.012 0.000 0.744
#> SRR1663221 2 0.4511 0.6321 0.268 0.724 0.000 0.008
#> SRR1663222 4 0.0657 0.8246 0.004 0.012 0.000 0.984
#> SRR1663224 1 0.6430 -0.0968 0.504 0.068 0.428 0.000
#> SRR1663225 2 0.4103 0.6549 0.256 0.744 0.000 0.000
#> SRR1663226 2 0.4103 0.6549 0.256 0.744 0.000 0.000
#> SRR1663223 2 0.4543 0.5732 0.324 0.676 0.000 0.000
#> SRR1663229 2 0.4155 0.6495 0.240 0.756 0.000 0.004
#> SRR1663231 4 0.0524 0.8260 0.004 0.008 0.000 0.988
#> SRR1663232 4 0.0524 0.8260 0.004 0.008 0.000 0.988
#> SRR1663227 4 0.0469 0.8264 0.000 0.012 0.000 0.988
#> SRR1663228 4 0.0469 0.8264 0.000 0.012 0.000 0.988
#> SRR1663230 2 0.1398 0.6768 0.004 0.956 0.000 0.040
#> SRR1663235 2 0.5016 0.3087 0.396 0.600 0.004 0.000
#> SRR1663233 2 0.1398 0.6768 0.004 0.956 0.000 0.040
#> SRR1663236 4 0.1452 0.8278 0.036 0.000 0.008 0.956
#> SRR1663237 2 0.1798 0.6724 0.016 0.944 0.000 0.040
#> SRR1663238 3 0.0469 0.8588 0.000 0.000 0.988 0.012
#> SRR1663234 4 0.3900 0.8040 0.164 0.020 0.000 0.816
#> SRR1663240 3 0.1022 0.8486 0.000 0.000 0.968 0.032
#> SRR1663239 3 0.0000 0.8605 0.000 0.000 1.000 0.000
#> SRR1663241 4 0.0188 0.8280 0.004 0.000 0.000 0.996
#> SRR1663242 1 0.4955 -0.1161 0.556 0.444 0.000 0.000
#> SRR1663243 1 0.4948 -0.1162 0.560 0.440 0.000 0.000
#> SRR1663244 4 0.3271 0.8176 0.132 0.012 0.000 0.856
#> SRR1663246 3 0.0188 0.8605 0.000 0.000 0.996 0.004
#> SRR1663245 1 0.5112 -0.1062 0.560 0.436 0.004 0.000
#> SRR1663247 4 0.3105 0.8181 0.140 0.004 0.000 0.856
#> SRR1663248 2 0.5050 0.2574 0.408 0.588 0.004 0.000
#> SRR1663250 3 0.6868 0.3771 0.120 0.000 0.544 0.336
#> SRR1663249 4 0.2704 0.8206 0.124 0.000 0.000 0.876
#> SRR1663251 4 0.2704 0.8206 0.124 0.000 0.000 0.876
#> SRR1663252 4 0.5453 0.4063 0.032 0.320 0.000 0.648
#> SRR1663253 4 0.4896 0.5321 0.004 0.012 0.280 0.704
#> SRR1663254 4 0.4916 0.5047 0.424 0.000 0.000 0.576
#> SRR1663255 3 0.7610 0.3618 0.320 0.000 0.460 0.220
#> SRR1663256 4 0.0992 0.8220 0.004 0.012 0.008 0.976
#> SRR1663259 2 0.4961 0.3581 0.448 0.552 0.000 0.000
#> SRR1663258 4 0.2530 0.7604 0.004 0.100 0.000 0.896
#> SRR1663257 1 0.6529 -0.0681 0.532 0.388 0.080 0.000
#> SRR1663263 3 0.0000 0.8605 0.000 0.000 1.000 0.000
#> SRR1663260 3 0.0592 0.8576 0.000 0.000 0.984 0.016
#> SRR1663262 2 0.4072 0.6380 0.252 0.748 0.000 0.000
#> SRR1663261 4 0.3157 0.8153 0.144 0.004 0.000 0.852
#> SRR1663265 2 0.4830 0.5000 0.392 0.608 0.000 0.000
#> SRR1663266 1 0.5691 -0.0573 0.564 0.408 0.028 0.000
#> SRR1663267 4 0.4453 0.7466 0.244 0.012 0.000 0.744
#> SRR1663264 4 0.4869 0.5379 0.004 0.012 0.276 0.708
#> SRR1663268 3 0.0592 0.8576 0.000 0.000 0.984 0.016
#> SRR1663269 3 0.0188 0.8605 0.000 0.000 0.996 0.004
#> SRR1663271 2 0.0524 0.6891 0.004 0.988 0.000 0.008
#> SRR1663270 3 0.3024 0.7558 0.148 0.000 0.852 0.000
#> SRR1663273 3 0.0188 0.8605 0.000 0.000 0.996 0.004
#> SRR1663272 3 0.0592 0.8576 0.000 0.000 0.984 0.016
#> SRR1663275 2 0.1488 0.6792 0.012 0.956 0.000 0.032
#> SRR1663274 4 0.3840 0.7734 0.052 0.104 0.000 0.844
#> SRR1663276 1 0.7714 -0.0944 0.448 0.260 0.000 0.292
#> SRR1663277 1 0.7714 -0.0944 0.448 0.260 0.000 0.292
#> SRR1663279 2 0.5016 0.4811 0.396 0.600 0.004 0.000
#> SRR1663278 1 0.4967 -0.1278 0.548 0.452 0.000 0.000
#> SRR1663280 1 0.5558 -0.0870 0.548 0.432 0.020 0.000
#> SRR1663281 3 0.4477 0.6144 0.312 0.000 0.688 0.000
#> SRR1663282 3 0.4477 0.6144 0.312 0.000 0.688 0.000
#> SRR1663283 1 0.6155 -0.2935 0.536 0.000 0.052 0.412
#> SRR1663284 1 0.6155 -0.2935 0.536 0.000 0.052 0.412
#> SRR1663286 2 0.0524 0.6881 0.008 0.988 0.000 0.004
#> SRR1663287 2 0.4193 0.6302 0.268 0.732 0.000 0.000
#> SRR1663288 2 0.4134 0.6521 0.260 0.740 0.000 0.000
#> SRR1663291 1 0.6907 -0.2026 0.532 0.000 0.120 0.348
#> SRR1663289 2 0.2002 0.6780 0.020 0.936 0.000 0.044
#> SRR1663290 2 0.2002 0.6780 0.020 0.936 0.000 0.044
#> SRR1663285 3 0.0000 0.8605 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
#> SRR1663209 2 0.5009 0.3978 0.060 0.652 0.000 0.000 0.288
#> SRR1663210 2 0.5009 0.3978 0.060 0.652 0.000 0.000 0.288
#> SRR1663213 3 0.0290 0.9113 0.000 0.000 0.992 0.000 0.008
#> SRR1663211 3 0.1043 0.8942 0.000 0.000 0.960 0.000 0.040
#> SRR1663212 3 0.1043 0.8942 0.000 0.000 0.960 0.000 0.040
#> SRR1663214 3 0.0290 0.9113 0.000 0.000 0.992 0.000 0.008
#> SRR1663215 3 0.0290 0.9113 0.000 0.000 0.992 0.000 0.008
#> SRR1663216 2 0.5619 0.3794 0.092 0.628 0.008 0.000 0.272
#> SRR1663217 1 0.7853 0.2630 0.372 0.240 0.316 0.000 0.072
#> SRR1663218 1 0.7853 0.2630 0.372 0.240 0.316 0.000 0.072
#> SRR1663219 4 0.5281 0.2061 0.240 0.032 0.000 0.684 0.044
#> SRR1663220 4 0.5281 0.2061 0.240 0.032 0.000 0.684 0.044
#> SRR1663221 2 0.6204 0.2692 0.124 0.488 0.000 0.004 0.384
#> SRR1663222 4 0.5935 0.4959 0.312 0.104 0.008 0.576 0.000
#> SRR1663224 5 0.3044 0.6694 0.008 0.004 0.148 0.000 0.840
#> SRR1663225 2 0.5990 0.3998 0.144 0.560 0.000 0.000 0.296
#> SRR1663226 2 0.5990 0.3998 0.144 0.560 0.000 0.000 0.296
#> SRR1663223 5 0.4470 0.3722 0.008 0.328 0.000 0.008 0.656
#> SRR1663229 2 0.5968 0.3854 0.120 0.568 0.000 0.004 0.308
#> SRR1663231 4 0.5388 0.5191 0.312 0.060 0.008 0.620 0.000
#> SRR1663232 4 0.5388 0.5191 0.312 0.060 0.008 0.620 0.000
#> SRR1663227 4 0.5028 0.4817 0.420 0.020 0.008 0.552 0.000
#> SRR1663228 4 0.5028 0.4817 0.420 0.020 0.008 0.552 0.000
#> SRR1663230 2 0.1117 0.6316 0.020 0.964 0.000 0.000 0.016
#> SRR1663235 2 0.6664 0.2351 0.304 0.488 0.008 0.000 0.200
#> SRR1663233 2 0.1012 0.6305 0.020 0.968 0.000 0.000 0.012
#> SRR1663236 4 0.3583 0.5142 0.192 0.000 0.012 0.792 0.004
#> SRR1663237 2 0.0290 0.6293 0.008 0.992 0.000 0.000 0.000
#> SRR1663238 3 0.0162 0.9094 0.000 0.000 0.996 0.004 0.000
#> SRR1663234 4 0.5344 0.2991 0.188 0.116 0.000 0.688 0.008
#> SRR1663240 3 0.1331 0.8676 0.008 0.000 0.952 0.040 0.000
#> SRR1663239 3 0.0290 0.9113 0.000 0.000 0.992 0.000 0.008
#> SRR1663241 4 0.4521 0.5232 0.316 0.012 0.008 0.664 0.000
#> SRR1663242 5 0.0771 0.8055 0.000 0.020 0.000 0.004 0.976
#> SRR1663243 5 0.1243 0.8076 0.004 0.028 0.000 0.008 0.960
#> SRR1663244 4 0.3082 0.4359 0.052 0.036 0.000 0.880 0.032
#> SRR1663246 3 0.0000 0.9107 0.000 0.000 1.000 0.000 0.000
#> SRR1663245 5 0.0798 0.8072 0.008 0.016 0.000 0.000 0.976
#> SRR1663247 4 0.2669 0.4397 0.020 0.000 0.000 0.876 0.104
#> SRR1663248 2 0.6296 0.2223 0.324 0.504 0.000 0.000 0.172
#> SRR1663250 4 0.7196 0.0471 0.088 0.000 0.400 0.424 0.088
#> SRR1663249 4 0.1493 0.4662 0.028 0.000 0.000 0.948 0.024
#> SRR1663251 4 0.0771 0.4719 0.004 0.000 0.000 0.976 0.020
#> SRR1663252 2 0.7292 -0.0284 0.304 0.396 0.000 0.276 0.024
#> SRR1663253 4 0.7756 0.3459 0.304 0.072 0.216 0.408 0.000
#> SRR1663254 4 0.4430 -0.2182 0.456 0.000 0.000 0.540 0.004
#> SRR1663255 1 0.8277 -0.0187 0.316 0.000 0.272 0.292 0.120
#> SRR1663256 4 0.5383 0.5059 0.348 0.044 0.012 0.596 0.000
#> SRR1663259 5 0.3909 0.6742 0.024 0.216 0.000 0.000 0.760
#> SRR1663258 1 0.6347 -0.4495 0.432 0.160 0.000 0.408 0.000
#> SRR1663257 5 0.3863 0.7097 0.020 0.156 0.020 0.000 0.804
#> SRR1663263 3 0.0290 0.9113 0.000 0.000 0.992 0.000 0.008
#> SRR1663260 3 0.0290 0.9070 0.000 0.000 0.992 0.008 0.000
#> SRR1663262 2 0.5156 0.1911 0.020 0.528 0.000 0.012 0.440
#> SRR1663261 4 0.3081 0.3867 0.156 0.000 0.000 0.832 0.012
#> SRR1663265 5 0.4330 0.6534 0.016 0.164 0.000 0.044 0.776
#> SRR1663266 5 0.1186 0.8060 0.008 0.020 0.008 0.000 0.964
#> SRR1663267 4 0.5281 0.2061 0.240 0.032 0.000 0.684 0.044
#> SRR1663264 4 0.7726 0.3567 0.312 0.076 0.196 0.416 0.000
#> SRR1663268 3 0.0162 0.9096 0.000 0.000 0.996 0.004 0.000
#> SRR1663269 3 0.0000 0.9107 0.000 0.000 1.000 0.000 0.000
#> SRR1663271 2 0.0609 0.6317 0.000 0.980 0.000 0.000 0.020
#> SRR1663270 3 0.2389 0.8067 0.004 0.000 0.880 0.000 0.116
#> SRR1663273 3 0.0000 0.9107 0.000 0.000 1.000 0.000 0.000
#> SRR1663272 3 0.0162 0.9094 0.000 0.000 0.996 0.004 0.000
#> SRR1663275 2 0.0771 0.6317 0.004 0.976 0.000 0.000 0.020
#> SRR1663274 4 0.6728 0.3368 0.308 0.276 0.000 0.416 0.000
#> SRR1663276 1 0.6644 0.3769 0.508 0.240 0.000 0.244 0.008
#> SRR1663277 1 0.6644 0.3769 0.508 0.240 0.000 0.244 0.008
#> SRR1663279 5 0.4451 0.6012 0.040 0.248 0.000 0.000 0.712
#> SRR1663278 5 0.2513 0.7811 0.008 0.116 0.000 0.000 0.876
#> SRR1663280 5 0.0955 0.8092 0.004 0.028 0.000 0.000 0.968
#> SRR1663281 3 0.6310 0.1766 0.120 0.000 0.460 0.008 0.412
#> SRR1663282 3 0.6310 0.1766 0.120 0.000 0.460 0.008 0.412
#> SRR1663283 1 0.6137 0.3035 0.492 0.000 0.012 0.404 0.092
#> SRR1663284 1 0.6137 0.3035 0.492 0.000 0.012 0.404 0.092
#> SRR1663286 2 0.0671 0.6310 0.004 0.980 0.000 0.000 0.016
#> SRR1663287 2 0.6142 0.1913 0.112 0.456 0.000 0.004 0.428
#> SRR1663288 2 0.6101 0.3548 0.144 0.528 0.000 0.000 0.328
#> SRR1663291 1 0.6488 0.3400 0.516 0.000 0.032 0.356 0.096
#> SRR1663289 2 0.1557 0.6200 0.052 0.940 0.000 0.000 0.008
#> SRR1663290 2 0.1557 0.6200 0.052 0.940 0.000 0.000 0.008
#> SRR1663285 3 0.0290 0.9113 0.000 0.000 0.992 0.000 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.6033 -0.0465 0.000 0.420 0.000 0.004 0.208 0.368
#> SRR1663210 2 0.6033 -0.0465 0.000 0.420 0.000 0.004 0.208 0.368
#> SRR1663213 3 0.0363 0.9471 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1663211 3 0.2756 0.8741 0.008 0.000 0.880 0.012 0.072 0.028
#> SRR1663212 3 0.2756 0.8741 0.008 0.000 0.880 0.012 0.072 0.028
#> SRR1663214 3 0.0363 0.9471 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1663215 3 0.0363 0.9471 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1663216 2 0.6071 -0.0750 0.000 0.412 0.004 0.004 0.184 0.396
#> SRR1663217 6 0.6336 0.3470 0.024 0.132 0.212 0.000 0.044 0.588
#> SRR1663218 6 0.6336 0.3470 0.024 0.132 0.212 0.000 0.044 0.588
#> SRR1663219 1 0.1565 0.7164 0.940 0.028 0.000 0.028 0.000 0.004
#> SRR1663220 1 0.1565 0.7164 0.940 0.028 0.000 0.028 0.000 0.004
#> SRR1663221 2 0.7295 0.0432 0.008 0.352 0.000 0.076 0.232 0.332
#> SRR1663222 4 0.3172 0.6903 0.076 0.092 0.000 0.832 0.000 0.000
#> SRR1663224 5 0.4386 0.6358 0.020 0.000 0.124 0.016 0.772 0.068
#> SRR1663225 6 0.7115 -0.0569 0.008 0.296 0.000 0.076 0.192 0.428
#> SRR1663226 6 0.7115 -0.0569 0.008 0.296 0.000 0.076 0.192 0.428
#> SRR1663223 5 0.5581 0.4685 0.080 0.208 0.000 0.008 0.652 0.052
#> SRR1663229 2 0.7113 0.0811 0.008 0.408 0.000 0.076 0.180 0.328
#> SRR1663231 4 0.3324 0.6910 0.084 0.076 0.000 0.832 0.000 0.008
#> SRR1663232 4 0.3324 0.6910 0.084 0.076 0.000 0.832 0.000 0.008
#> SRR1663227 4 0.3963 0.6473 0.080 0.000 0.000 0.756 0.000 0.164
#> SRR1663228 4 0.3963 0.6473 0.080 0.000 0.000 0.756 0.000 0.164
#> SRR1663230 2 0.0603 0.5529 0.000 0.980 0.000 0.016 0.000 0.004
#> SRR1663235 6 0.5052 0.2446 0.008 0.304 0.000 0.000 0.080 0.608
#> SRR1663233 2 0.0665 0.5542 0.000 0.980 0.000 0.008 0.004 0.008
#> SRR1663236 4 0.4154 0.3631 0.324 0.000 0.004 0.652 0.000 0.020
#> SRR1663237 2 0.0622 0.5528 0.000 0.980 0.000 0.008 0.000 0.012
#> SRR1663238 3 0.0806 0.9469 0.000 0.000 0.972 0.020 0.000 0.008
#> SRR1663234 1 0.4495 0.6236 0.736 0.164 0.000 0.084 0.004 0.012
#> SRR1663240 3 0.2692 0.8024 0.000 0.000 0.840 0.148 0.000 0.012
#> SRR1663239 3 0.0146 0.9479 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1663241 4 0.2558 0.6639 0.156 0.000 0.004 0.840 0.000 0.000
#> SRR1663242 5 0.1268 0.7348 0.036 0.004 0.000 0.000 0.952 0.008
#> SRR1663243 5 0.1923 0.7239 0.064 0.004 0.000 0.000 0.916 0.016
#> SRR1663244 1 0.3812 0.6387 0.776 0.036 0.000 0.176 0.004 0.008
#> SRR1663246 3 0.0717 0.9481 0.000 0.000 0.976 0.016 0.000 0.008
#> SRR1663245 5 0.1745 0.7274 0.012 0.000 0.000 0.000 0.920 0.068
#> SRR1663247 1 0.5234 0.5588 0.684 0.000 0.000 0.172 0.088 0.056
#> SRR1663248 6 0.4987 0.2353 0.008 0.340 0.000 0.000 0.064 0.588
#> SRR1663250 4 0.6512 0.4263 0.060 0.000 0.204 0.596 0.092 0.048
#> SRR1663249 1 0.3924 0.5767 0.720 0.000 0.000 0.252 0.012 0.016
#> SRR1663251 1 0.3759 0.6033 0.752 0.000 0.000 0.216 0.008 0.024
#> SRR1663252 4 0.6723 0.1996 0.020 0.204 0.000 0.444 0.020 0.312
#> SRR1663253 4 0.3632 0.6633 0.008 0.040 0.148 0.800 0.000 0.004
#> SRR1663254 1 0.5103 0.5574 0.636 0.000 0.000 0.132 0.004 0.228
#> SRR1663255 4 0.6785 0.4289 0.052 0.000 0.112 0.596 0.112 0.128
#> SRR1663256 4 0.2429 0.6884 0.064 0.028 0.004 0.896 0.000 0.008
#> SRR1663259 5 0.3605 0.6627 0.000 0.084 0.000 0.004 0.804 0.108
#> SRR1663258 4 0.4659 0.5916 0.020 0.068 0.000 0.704 0.000 0.208
#> SRR1663257 5 0.4274 0.6506 0.004 0.028 0.032 0.004 0.760 0.172
#> SRR1663263 3 0.0363 0.9471 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1663260 3 0.0820 0.9477 0.000 0.000 0.972 0.016 0.000 0.012
#> SRR1663262 2 0.5805 0.2777 0.096 0.580 0.000 0.004 0.284 0.036
#> SRR1663261 1 0.2196 0.7000 0.884 0.004 0.000 0.108 0.000 0.004
#> SRR1663265 5 0.5287 0.5441 0.220 0.068 0.000 0.004 0.664 0.044
#> SRR1663266 5 0.1874 0.7382 0.028 0.008 0.012 0.000 0.932 0.020
#> SRR1663267 1 0.1565 0.7164 0.940 0.028 0.000 0.028 0.000 0.004
#> SRR1663264 4 0.3141 0.6769 0.000 0.040 0.124 0.832 0.000 0.004
#> SRR1663268 3 0.0717 0.9481 0.000 0.000 0.976 0.016 0.000 0.008
#> SRR1663269 3 0.0806 0.9469 0.000 0.000 0.972 0.020 0.000 0.008
#> SRR1663271 2 0.0551 0.5535 0.000 0.984 0.000 0.004 0.004 0.008
#> SRR1663270 3 0.2989 0.8191 0.004 0.000 0.848 0.012 0.120 0.016
#> SRR1663273 3 0.0717 0.9481 0.000 0.000 0.976 0.016 0.000 0.008
#> SRR1663272 3 0.0806 0.9469 0.000 0.000 0.972 0.020 0.000 0.008
#> SRR1663275 2 0.0665 0.5542 0.000 0.980 0.000 0.008 0.004 0.008
#> SRR1663274 2 0.5713 -0.0158 0.156 0.504 0.000 0.336 0.000 0.004
#> SRR1663276 6 0.6244 0.0862 0.340 0.240 0.000 0.004 0.004 0.412
#> SRR1663277 6 0.6244 0.0862 0.340 0.240 0.000 0.004 0.004 0.412
#> SRR1663279 5 0.4687 0.5254 0.000 0.084 0.000 0.004 0.672 0.240
#> SRR1663278 5 0.2434 0.7281 0.012 0.040 0.000 0.004 0.900 0.044
#> SRR1663280 5 0.1312 0.7390 0.012 0.004 0.008 0.000 0.956 0.020
#> SRR1663281 5 0.7000 0.3947 0.032 0.000 0.268 0.068 0.504 0.128
#> SRR1663282 5 0.7000 0.3947 0.032 0.000 0.268 0.068 0.504 0.128
#> SRR1663283 1 0.6239 0.5039 0.596 0.000 0.008 0.100 0.088 0.208
#> SRR1663284 1 0.6239 0.5039 0.596 0.000 0.008 0.100 0.088 0.208
#> SRR1663286 2 0.0508 0.5505 0.000 0.984 0.000 0.000 0.004 0.012
#> SRR1663287 2 0.7390 0.0914 0.028 0.372 0.000 0.048 0.284 0.268
#> SRR1663288 6 0.7160 -0.0408 0.008 0.272 0.000 0.076 0.216 0.428
#> SRR1663291 1 0.6831 0.4198 0.508 0.000 0.012 0.120 0.092 0.268
#> SRR1663289 2 0.1265 0.5433 0.000 0.948 0.000 0.044 0.000 0.008
#> SRR1663290 2 0.1265 0.5433 0.000 0.948 0.000 0.044 0.000 0.008
#> SRR1663285 3 0.0260 0.9475 0.000 0.000 0.992 0.000 0.000 0.008
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 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.654 0.896 0.934 0.4614 0.540 0.540
#> 3 3 0.515 0.790 0.878 0.1185 0.977 0.958
#> 4 4 0.636 0.772 0.897 0.2060 0.818 0.665
#> 5 5 0.586 0.502 0.809 0.1301 0.934 0.835
#> 6 6 0.685 0.689 0.827 0.0643 0.896 0.712
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
#> SRR1663209 2 0.000 0.939 0.000 1.000
#> SRR1663210 2 0.000 0.939 0.000 1.000
#> SRR1663213 2 0.204 0.931 0.032 0.968
#> SRR1663211 2 0.494 0.885 0.108 0.892
#> SRR1663212 2 0.506 0.881 0.112 0.888
#> SRR1663214 2 0.278 0.926 0.048 0.952
#> SRR1663215 2 0.278 0.926 0.048 0.952
#> SRR1663216 2 0.000 0.939 0.000 1.000
#> SRR1663217 2 0.000 0.939 0.000 1.000
#> SRR1663218 2 0.000 0.939 0.000 1.000
#> SRR1663219 1 0.000 0.910 1.000 0.000
#> SRR1663220 1 0.000 0.910 1.000 0.000
#> SRR1663221 2 0.795 0.753 0.240 0.760
#> SRR1663222 1 0.000 0.910 1.000 0.000
#> SRR1663224 2 0.000 0.939 0.000 1.000
#> SRR1663225 2 0.278 0.926 0.048 0.952
#> SRR1663226 2 0.278 0.926 0.048 0.952
#> SRR1663223 2 0.456 0.895 0.096 0.904
#> SRR1663229 2 0.482 0.891 0.104 0.896
#> SRR1663231 1 0.000 0.910 1.000 0.000
#> SRR1663232 1 0.000 0.910 1.000 0.000
#> SRR1663227 1 0.000 0.910 1.000 0.000
#> SRR1663228 1 0.000 0.910 1.000 0.000
#> SRR1663230 2 0.456 0.895 0.096 0.904
#> SRR1663235 2 0.000 0.939 0.000 1.000
#> SRR1663233 2 0.456 0.895 0.096 0.904
#> SRR1663236 1 0.456 0.894 0.904 0.096
#> SRR1663237 2 0.469 0.893 0.100 0.900
#> SRR1663238 1 0.456 0.894 0.904 0.096
#> SRR1663234 1 0.909 0.522 0.676 0.324
#> SRR1663240 1 0.722 0.829 0.800 0.200
#> SRR1663239 2 0.000 0.939 0.000 1.000
#> SRR1663241 1 0.260 0.907 0.956 0.044
#> SRR1663242 2 0.000 0.939 0.000 1.000
#> SRR1663243 2 0.000 0.939 0.000 1.000
#> SRR1663244 1 0.000 0.910 1.000 0.000
#> SRR1663246 2 0.278 0.926 0.048 0.952
#> SRR1663245 2 0.000 0.939 0.000 1.000
#> SRR1663247 1 0.000 0.910 1.000 0.000
#> SRR1663248 2 0.000 0.939 0.000 1.000
#> SRR1663250 1 0.469 0.893 0.900 0.100
#> SRR1663249 1 0.722 0.829 0.800 0.200
#> SRR1663251 1 0.000 0.910 1.000 0.000
#> SRR1663252 2 0.278 0.926 0.048 0.952
#> SRR1663253 2 0.278 0.926 0.048 0.952
#> SRR1663254 1 0.456 0.894 0.904 0.096
#> SRR1663255 2 0.242 0.931 0.040 0.960
#> SRR1663256 1 0.595 0.884 0.856 0.144
#> SRR1663259 2 0.000 0.939 0.000 1.000
#> SRR1663258 1 0.278 0.886 0.952 0.048
#> SRR1663257 2 0.000 0.939 0.000 1.000
#> SRR1663263 2 0.278 0.926 0.048 0.952
#> SRR1663260 2 0.278 0.926 0.048 0.952
#> SRR1663262 2 0.456 0.895 0.096 0.904
#> SRR1663261 1 0.000 0.910 1.000 0.000
#> SRR1663265 2 0.000 0.939 0.000 1.000
#> SRR1663266 2 0.000 0.939 0.000 1.000
#> SRR1663267 1 0.000 0.910 1.000 0.000
#> SRR1663264 1 0.605 0.871 0.852 0.148
#> SRR1663268 2 0.278 0.926 0.048 0.952
#> SRR1663269 1 0.795 0.770 0.760 0.240
#> SRR1663271 2 0.456 0.895 0.096 0.904
#> SRR1663270 2 0.278 0.926 0.048 0.952
#> SRR1663273 2 0.881 0.546 0.300 0.700
#> SRR1663272 1 0.456 0.894 0.904 0.096
#> SRR1663275 2 0.456 0.895 0.096 0.904
#> SRR1663274 1 0.278 0.886 0.952 0.048
#> SRR1663276 2 0.574 0.869 0.136 0.864
#> SRR1663277 2 0.506 0.890 0.112 0.888
#> SRR1663279 2 0.000 0.939 0.000 1.000
#> SRR1663278 2 0.000 0.939 0.000 1.000
#> SRR1663280 2 0.000 0.939 0.000 1.000
#> SRR1663281 2 0.000 0.939 0.000 1.000
#> SRR1663282 2 0.000 0.939 0.000 1.000
#> SRR1663283 1 0.738 0.820 0.792 0.208
#> SRR1663284 1 0.714 0.833 0.804 0.196
#> SRR1663286 2 0.456 0.895 0.096 0.904
#> SRR1663287 2 0.456 0.895 0.096 0.904
#> SRR1663288 2 0.000 0.939 0.000 1.000
#> SRR1663291 1 0.745 0.834 0.788 0.212
#> SRR1663289 2 0.634 0.846 0.160 0.840
#> SRR1663290 2 0.625 0.850 0.156 0.844
#> SRR1663285 2 0.278 0.926 0.048 0.952
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663210 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663213 2 0.270 0.8678 0.056 0.928 0.016
#> SRR1663211 2 0.653 0.7806 0.092 0.756 0.152
#> SRR1663212 2 0.664 0.7753 0.092 0.748 0.160
#> SRR1663214 2 0.715 0.7456 0.092 0.708 0.200
#> SRR1663215 2 0.715 0.7456 0.092 0.708 0.200
#> SRR1663216 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663217 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663218 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663219 3 0.455 1.0000 0.200 0.000 0.800
#> SRR1663220 3 0.455 1.0000 0.200 0.000 0.800
#> SRR1663221 2 0.571 0.6553 0.320 0.680 0.000
#> SRR1663222 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663224 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663225 2 0.280 0.8505 0.092 0.908 0.000
#> SRR1663226 2 0.280 0.8505 0.092 0.908 0.000
#> SRR1663223 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663229 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663231 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663232 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663227 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663228 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663230 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663235 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663233 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663236 1 0.509 0.7396 0.836 0.076 0.088
#> SRR1663237 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663238 1 0.455 0.6714 0.800 0.000 0.200
#> SRR1663234 1 0.280 0.6814 0.908 0.092 0.000
#> SRR1663240 1 0.573 0.7282 0.804 0.108 0.088
#> SRR1663239 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663241 1 0.254 0.7640 0.920 0.080 0.000
#> SRR1663242 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663243 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663244 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663246 2 0.715 0.7456 0.092 0.708 0.200
#> SRR1663245 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663247 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663248 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663250 1 0.518 0.7390 0.832 0.080 0.088
#> SRR1663249 1 0.455 0.6914 0.800 0.200 0.000
#> SRR1663251 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663252 2 0.280 0.8505 0.092 0.908 0.000
#> SRR1663253 2 0.280 0.8505 0.092 0.908 0.000
#> SRR1663254 1 0.406 0.7144 0.836 0.164 0.000
#> SRR1663255 2 0.175 0.8729 0.048 0.952 0.000
#> SRR1663256 1 0.518 0.6548 0.744 0.256 0.000
#> SRR1663259 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663258 1 0.280 0.6814 0.908 0.092 0.000
#> SRR1663257 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663263 2 0.715 0.7456 0.092 0.708 0.200
#> SRR1663260 2 0.490 0.8306 0.092 0.844 0.064
#> SRR1663262 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663261 1 0.000 0.7625 1.000 0.000 0.000
#> SRR1663265 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663266 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663267 3 0.455 1.0000 0.200 0.000 0.800
#> SRR1663264 1 0.613 0.3887 0.600 0.400 0.000
#> SRR1663268 2 0.280 0.8505 0.092 0.908 0.000
#> SRR1663269 1 0.509 0.7396 0.836 0.076 0.088
#> SRR1663271 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663270 2 0.303 0.8502 0.092 0.904 0.004
#> SRR1663273 2 0.715 0.7456 0.092 0.708 0.200
#> SRR1663272 1 0.455 0.6714 0.800 0.000 0.200
#> SRR1663275 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663274 1 0.280 0.6814 0.908 0.092 0.000
#> SRR1663276 2 0.334 0.8488 0.120 0.880 0.000
#> SRR1663277 2 0.312 0.8541 0.108 0.892 0.000
#> SRR1663279 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663278 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663280 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663281 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663282 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663283 1 0.977 0.1276 0.412 0.236 0.352
#> SRR1663284 1 0.967 0.0822 0.404 0.212 0.384
#> SRR1663286 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663287 2 0.406 0.8183 0.164 0.836 0.000
#> SRR1663288 2 0.000 0.8837 0.000 1.000 0.000
#> SRR1663291 1 0.518 0.6548 0.744 0.256 0.000
#> SRR1663289 2 0.435 0.8032 0.184 0.816 0.000
#> SRR1663290 2 0.440 0.8001 0.188 0.812 0.000
#> SRR1663285 2 0.715 0.7456 0.092 0.708 0.200
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663210 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663213 2 0.0707 0.892 0.000 0.980 0.020 0.000
#> SRR1663211 2 0.3688 0.741 0.000 0.792 0.208 0.000
#> SRR1663212 2 0.4134 0.669 0.000 0.740 0.260 0.000
#> SRR1663214 3 0.0000 0.788 0.000 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.788 0.000 0.000 1.000 0.000
#> SRR1663216 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663217 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663218 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663219 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1663221 2 0.3907 0.740 0.000 0.768 0.000 0.232
#> SRR1663222 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663224 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663225 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663226 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663223 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663229 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663231 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663232 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663227 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663228 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663230 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663235 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663233 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663236 3 0.6454 0.180 0.000 0.076 0.544 0.380
#> SRR1663237 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663238 3 0.0469 0.782 0.000 0.000 0.988 0.012
#> SRR1663234 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663240 3 0.3542 0.729 0.000 0.076 0.864 0.060
#> SRR1663239 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663241 4 0.2281 0.753 0.000 0.096 0.000 0.904
#> SRR1663242 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663243 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663244 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663246 3 0.0000 0.788 0.000 0.000 1.000 0.000
#> SRR1663245 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663247 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663248 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663250 4 0.6546 0.126 0.000 0.076 0.432 0.492
#> SRR1663249 4 0.3610 0.682 0.000 0.200 0.000 0.800
#> SRR1663251 4 0.3569 0.660 0.196 0.000 0.000 0.804
#> SRR1663252 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663253 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663254 4 0.3569 0.684 0.000 0.196 0.000 0.804
#> SRR1663255 2 0.0188 0.899 0.000 0.996 0.000 0.004
#> SRR1663256 4 0.3610 0.682 0.000 0.200 0.000 0.800
#> SRR1663259 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663258 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663257 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663263 3 0.0000 0.788 0.000 0.000 1.000 0.000
#> SRR1663260 3 0.3172 0.683 0.000 0.160 0.840 0.000
#> SRR1663262 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663261 4 0.3400 0.676 0.180 0.000 0.000 0.820
#> SRR1663265 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663266 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663267 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR1663264 2 0.6011 -0.248 0.000 0.484 0.040 0.476
#> SRR1663268 3 0.4830 0.414 0.000 0.392 0.608 0.000
#> SRR1663269 3 0.3542 0.729 0.000 0.076 0.864 0.060
#> SRR1663271 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663270 3 0.4916 0.365 0.000 0.424 0.576 0.000
#> SRR1663273 3 0.0000 0.788 0.000 0.000 1.000 0.000
#> SRR1663272 3 0.0000 0.788 0.000 0.000 1.000 0.000
#> SRR1663275 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663274 4 0.0000 0.788 0.000 0.000 0.000 1.000
#> SRR1663276 2 0.2647 0.855 0.000 0.880 0.000 0.120
#> SRR1663277 2 0.2469 0.860 0.000 0.892 0.000 0.108
#> SRR1663279 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663278 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663280 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663281 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663282 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663283 4 0.9607 0.157 0.148 0.216 0.260 0.376
#> SRR1663284 4 0.9701 0.162 0.168 0.220 0.244 0.368
#> SRR1663286 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663287 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663288 2 0.0000 0.901 0.000 1.000 0.000 0.000
#> SRR1663291 4 0.3610 0.682 0.000 0.200 0.000 0.800
#> SRR1663289 2 0.3569 0.811 0.000 0.804 0.000 0.196
#> SRR1663290 2 0.3610 0.808 0.000 0.800 0.000 0.200
#> SRR1663285 3 0.0000 0.788 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
#> SRR1663209 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663213 2 0.0510 0.66511 0.000 0.984 0.016 0.000 0.000
#> SRR1663211 2 0.6679 -0.28261 0.000 0.420 0.244 0.000 0.336
#> SRR1663212 2 0.6758 -0.31461 0.000 0.392 0.272 0.000 0.336
#> SRR1663214 3 0.0000 0.80028 0.000 0.000 1.000 0.000 0.000
#> SRR1663215 3 0.0000 0.80028 0.000 0.000 1.000 0.000 0.000
#> SRR1663216 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663217 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663218 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663219 1 0.0000 1.00000 1.000 0.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 1.00000 1.000 0.000 0.000 0.000 0.000
#> SRR1663221 5 0.6156 0.56690 0.000 0.224 0.000 0.216 0.560
#> SRR1663222 4 0.3003 0.69074 0.000 0.000 0.000 0.812 0.188
#> SRR1663224 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663225 2 0.4101 0.13143 0.000 0.628 0.000 0.000 0.372
#> SRR1663226 2 0.4101 0.13143 0.000 0.628 0.000 0.000 0.372
#> SRR1663223 2 0.4304 -0.15945 0.000 0.516 0.000 0.000 0.484
#> SRR1663229 5 0.5399 0.60637 0.000 0.188 0.000 0.148 0.664
#> SRR1663231 4 0.2732 0.70078 0.000 0.000 0.000 0.840 0.160
#> SRR1663232 4 0.2891 0.69575 0.000 0.000 0.000 0.824 0.176
#> SRR1663227 4 0.0000 0.71183 0.000 0.000 0.000 1.000 0.000
#> SRR1663228 4 0.0000 0.71183 0.000 0.000 0.000 1.000 0.000
#> SRR1663230 2 0.4235 -0.00588 0.000 0.576 0.000 0.000 0.424
#> SRR1663235 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663233 2 0.4235 -0.00588 0.000 0.576 0.000 0.000 0.424
#> SRR1663236 4 0.4210 0.18751 0.000 0.000 0.412 0.588 0.000
#> SRR1663237 2 0.4235 -0.00588 0.000 0.576 0.000 0.000 0.424
#> SRR1663238 3 0.0404 0.79331 0.000 0.000 0.988 0.012 0.000
#> SRR1663234 4 0.3074 0.68778 0.000 0.000 0.000 0.804 0.196
#> SRR1663240 3 0.3888 0.69588 0.000 0.136 0.800 0.064 0.000
#> SRR1663239 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663241 4 0.0000 0.71183 0.000 0.000 0.000 1.000 0.000
#> SRR1663242 2 0.4210 0.06983 0.000 0.588 0.000 0.000 0.412
#> SRR1663243 2 0.1270 0.64093 0.000 0.948 0.000 0.000 0.052
#> SRR1663244 4 0.3074 0.68778 0.000 0.000 0.000 0.804 0.196
#> SRR1663246 3 0.0000 0.80028 0.000 0.000 1.000 0.000 0.000
#> SRR1663245 2 0.1270 0.64093 0.000 0.948 0.000 0.000 0.052
#> SRR1663247 4 0.1341 0.69222 0.000 0.000 0.000 0.944 0.056
#> SRR1663248 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663250 4 0.6074 0.24306 0.000 0.128 0.372 0.500 0.000
#> SRR1663249 4 0.4270 0.62160 0.000 0.204 0.000 0.748 0.048
#> SRR1663251 4 0.3003 0.65040 0.188 0.000 0.000 0.812 0.000
#> SRR1663252 2 0.6482 -0.36720 0.000 0.440 0.000 0.188 0.372
#> SRR1663253 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663254 4 0.0404 0.71447 0.000 0.012 0.000 0.988 0.000
#> SRR1663255 2 0.0290 0.66947 0.000 0.992 0.000 0.008 0.000
#> SRR1663256 4 0.3039 0.64535 0.000 0.192 0.000 0.808 0.000
#> SRR1663259 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663258 4 0.0290 0.71108 0.000 0.000 0.000 0.992 0.008
#> SRR1663257 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663263 3 0.0000 0.80028 0.000 0.000 1.000 0.000 0.000
#> SRR1663260 3 0.3143 0.66846 0.000 0.204 0.796 0.000 0.000
#> SRR1663262 5 0.4268 0.06762 0.000 0.444 0.000 0.000 0.556
#> SRR1663261 4 0.0000 0.71183 0.000 0.000 0.000 1.000 0.000
#> SRR1663265 2 0.1270 0.64093 0.000 0.948 0.000 0.000 0.052
#> SRR1663266 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663267 1 0.0000 1.00000 1.000 0.000 0.000 0.000 0.000
#> SRR1663264 4 0.5176 0.09350 0.000 0.468 0.040 0.492 0.000
#> SRR1663268 3 0.5843 0.34489 0.000 0.388 0.512 0.000 0.100
#> SRR1663269 3 0.3921 0.69350 0.000 0.128 0.800 0.072 0.000
#> SRR1663271 2 0.4235 -0.00588 0.000 0.576 0.000 0.000 0.424
#> SRR1663270 3 0.4235 0.37624 0.000 0.424 0.576 0.000 0.000
#> SRR1663273 3 0.0000 0.80028 0.000 0.000 1.000 0.000 0.000
#> SRR1663272 3 0.0000 0.80028 0.000 0.000 1.000 0.000 0.000
#> SRR1663275 2 0.4235 -0.00588 0.000 0.576 0.000 0.000 0.424
#> SRR1663274 4 0.3949 0.55990 0.000 0.000 0.000 0.668 0.332
#> SRR1663276 2 0.2909 0.53074 0.000 0.848 0.000 0.012 0.140
#> SRR1663277 2 0.2574 0.56743 0.000 0.876 0.000 0.012 0.112
#> SRR1663279 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663278 2 0.1197 0.64401 0.000 0.952 0.000 0.000 0.048
#> SRR1663280 2 0.1270 0.64093 0.000 0.948 0.000 0.000 0.052
#> SRR1663281 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663282 2 0.0000 0.67412 0.000 1.000 0.000 0.000 0.000
#> SRR1663283 4 0.9089 0.30976 0.056 0.208 0.160 0.388 0.188
#> SRR1663284 4 0.9151 0.29870 0.060 0.212 0.160 0.380 0.188
#> SRR1663286 2 0.4101 0.11499 0.000 0.628 0.000 0.000 0.372
#> SRR1663287 2 0.6248 -0.21481 0.000 0.524 0.000 0.176 0.300
#> SRR1663288 2 0.3966 0.18482 0.000 0.664 0.000 0.000 0.336
#> SRR1663291 4 0.5733 0.55786 0.000 0.188 0.000 0.624 0.188
#> SRR1663289 2 0.4235 -0.00588 0.000 0.576 0.000 0.000 0.424
#> SRR1663290 2 0.4383 -0.01838 0.000 0.572 0.000 0.004 0.424
#> SRR1663285 3 0.0000 0.80028 0.000 0.000 1.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663213 2 0.0260 0.7970 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR1663211 5 0.5327 0.6272 0.000 0.128 0.224 0.000 0.632 0.016
#> SRR1663212 5 0.5774 0.5870 0.000 0.164 0.256 0.000 0.564 0.016
#> SRR1663214 3 0.0000 0.8180 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663215 3 0.0000 0.8180 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663216 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663217 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663218 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663219 1 0.4798 1.0000 0.620 0.000 0.000 0.000 0.080 0.300
#> SRR1663220 1 0.4798 1.0000 0.620 0.000 0.000 0.000 0.080 0.300
#> SRR1663221 5 0.2213 0.6414 0.004 0.008 0.000 0.100 0.888 0.000
#> SRR1663222 4 0.2118 0.7181 0.104 0.000 0.000 0.888 0.008 0.000
#> SRR1663224 2 0.0363 0.7969 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1663225 5 0.2793 0.7405 0.000 0.200 0.000 0.000 0.800 0.000
#> SRR1663226 5 0.2793 0.7405 0.000 0.200 0.000 0.000 0.800 0.000
#> SRR1663223 2 0.5565 0.4902 0.368 0.488 0.000 0.000 0.144 0.000
#> SRR1663229 5 0.2376 0.6347 0.044 0.000 0.000 0.068 0.888 0.000
#> SRR1663231 4 0.1812 0.7284 0.080 0.000 0.000 0.912 0.008 0.000
#> SRR1663232 4 0.1970 0.7241 0.092 0.000 0.000 0.900 0.008 0.000
#> SRR1663227 4 0.0363 0.7287 0.000 0.000 0.000 0.988 0.012 0.000
#> SRR1663228 4 0.0363 0.7287 0.000 0.000 0.000 0.988 0.012 0.000
#> SRR1663230 2 0.4649 0.5629 0.380 0.572 0.000 0.000 0.048 0.000
#> SRR1663235 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663233 2 0.4649 0.5629 0.380 0.572 0.000 0.000 0.048 0.000
#> SRR1663236 4 0.4192 0.0444 0.000 0.000 0.412 0.572 0.000 0.016
#> SRR1663237 2 0.4649 0.5629 0.380 0.572 0.000 0.000 0.048 0.000
#> SRR1663238 3 0.0363 0.8111 0.000 0.000 0.988 0.012 0.000 0.000
#> SRR1663234 4 0.2165 0.7162 0.108 0.000 0.000 0.884 0.008 0.000
#> SRR1663240 3 0.3877 0.6735 0.000 0.152 0.780 0.056 0.012 0.000
#> SRR1663239 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663241 4 0.0000 0.7281 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663242 5 0.3647 0.4771 0.000 0.360 0.000 0.000 0.640 0.000
#> SRR1663243 2 0.1501 0.7592 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR1663244 4 0.2346 0.7050 0.124 0.000 0.000 0.868 0.008 0.000
#> SRR1663246 3 0.0000 0.8180 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663245 2 0.1501 0.7592 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR1663247 4 0.1908 0.6737 0.004 0.000 0.000 0.900 0.096 0.000
#> SRR1663248 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663250 4 0.5043 0.1853 0.000 0.008 0.360 0.568 0.000 0.064
#> SRR1663249 4 0.4366 0.4087 0.000 0.212 0.000 0.712 0.072 0.004
#> SRR1663251 4 0.2571 0.6820 0.000 0.000 0.000 0.876 0.064 0.060
#> SRR1663252 5 0.3558 0.6958 0.000 0.088 0.000 0.112 0.800 0.000
#> SRR1663253 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663254 4 0.1411 0.7111 0.000 0.004 0.000 0.936 0.000 0.060
#> SRR1663255 2 0.1707 0.7738 0.000 0.928 0.000 0.012 0.004 0.056
#> SRR1663256 4 0.2003 0.6425 0.000 0.116 0.000 0.884 0.000 0.000
#> SRR1663259 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663258 4 0.0363 0.7287 0.000 0.000 0.000 0.988 0.012 0.000
#> SRR1663257 2 0.0363 0.7964 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR1663263 3 0.0000 0.8180 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663260 3 0.2969 0.6392 0.000 0.224 0.776 0.000 0.000 0.000
#> SRR1663262 2 0.5898 0.3697 0.380 0.416 0.000 0.000 0.204 0.000
#> SRR1663261 4 0.0363 0.7287 0.000 0.000 0.000 0.988 0.012 0.000
#> SRR1663265 2 0.1501 0.7592 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR1663266 2 0.0725 0.7947 0.000 0.976 0.000 0.000 0.012 0.012
#> SRR1663267 1 0.4798 1.0000 0.620 0.000 0.000 0.000 0.080 0.300
#> SRR1663264 4 0.4561 0.0779 0.000 0.392 0.040 0.568 0.000 0.000
#> SRR1663268 3 0.5716 0.2509 0.000 0.188 0.500 0.000 0.312 0.000
#> SRR1663269 3 0.3681 0.6375 0.000 0.064 0.780 0.156 0.000 0.000
#> SRR1663271 2 0.4649 0.5629 0.380 0.572 0.000 0.000 0.048 0.000
#> SRR1663270 3 0.4249 0.3358 0.000 0.416 0.568 0.000 0.004 0.012
#> SRR1663273 3 0.0000 0.8180 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663272 3 0.0000 0.8180 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1663275 2 0.4649 0.5629 0.380 0.572 0.000 0.000 0.048 0.000
#> SRR1663274 4 0.3927 0.4098 0.344 0.000 0.000 0.644 0.012 0.000
#> SRR1663276 2 0.3726 0.7135 0.072 0.816 0.000 0.080 0.032 0.000
#> SRR1663277 2 0.3254 0.7370 0.072 0.848 0.000 0.052 0.028 0.000
#> SRR1663279 2 0.0000 0.7983 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663278 2 0.1556 0.7628 0.000 0.920 0.000 0.000 0.080 0.000
#> SRR1663280 2 0.1663 0.7564 0.000 0.912 0.000 0.000 0.088 0.000
#> SRR1663281 2 0.0363 0.7969 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1663282 2 0.0363 0.7969 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1663283 6 0.4593 0.9293 0.000 0.080 0.000 0.232 0.004 0.684
#> SRR1663284 6 0.4616 0.9250 0.000 0.084 0.000 0.228 0.004 0.684
#> SRR1663286 2 0.4344 0.6020 0.336 0.628 0.000 0.000 0.036 0.000
#> SRR1663287 2 0.6663 0.4694 0.276 0.496 0.000 0.092 0.136 0.000
#> SRR1663288 5 0.3050 0.7163 0.000 0.236 0.000 0.000 0.764 0.000
#> SRR1663291 6 0.4127 0.8657 0.000 0.028 0.000 0.284 0.004 0.684
#> SRR1663289 2 0.4649 0.5629 0.380 0.572 0.000 0.000 0.048 0.000
#> SRR1663290 2 0.4782 0.5586 0.380 0.568 0.000 0.004 0.048 0.000
#> SRR1663285 3 0.0000 0.8180 0.000 0.000 1.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "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 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.126 0.517 0.726 0.3589 0.844 0.844
#> 3 3 0.181 0.380 0.660 0.4700 0.664 0.616
#> 4 4 0.305 0.483 0.675 0.2495 0.503 0.285
#> 5 5 0.459 0.555 0.728 0.0996 0.850 0.604
#> 6 6 0.425 0.398 0.603 0.0691 0.839 0.493
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1663209 2 0.388 0.5996 0.076 0.924
#> SRR1663210 2 0.388 0.5996 0.076 0.924
#> SRR1663213 2 0.697 0.6074 0.188 0.812
#> SRR1663211 2 0.958 0.4607 0.380 0.620
#> SRR1663212 2 0.958 0.4607 0.380 0.620
#> SRR1663214 2 0.980 0.4151 0.416 0.584
#> SRR1663215 2 0.978 0.4212 0.412 0.588
#> SRR1663216 2 0.343 0.6080 0.064 0.936
#> SRR1663217 2 1.000 -0.3146 0.492 0.508
#> SRR1663218 2 1.000 -0.3146 0.492 0.508
#> SRR1663219 1 0.680 0.9544 0.820 0.180
#> SRR1663220 1 0.680 0.9544 0.820 0.180
#> SRR1663221 2 0.141 0.6259 0.020 0.980
#> SRR1663222 2 0.653 0.6030 0.168 0.832
#> SRR1663224 2 0.833 0.5282 0.264 0.736
#> SRR1663225 2 0.184 0.6170 0.028 0.972
#> SRR1663226 2 0.163 0.6159 0.024 0.976
#> SRR1663223 2 0.808 0.5313 0.248 0.752
#> SRR1663229 2 0.295 0.6057 0.052 0.948
#> SRR1663231 2 0.662 0.6016 0.172 0.828
#> SRR1663232 2 0.671 0.6000 0.176 0.824
#> SRR1663227 2 0.680 0.5987 0.180 0.820
#> SRR1663228 2 0.680 0.5987 0.180 0.820
#> SRR1663230 2 0.662 0.5296 0.172 0.828
#> SRR1663235 2 0.955 -0.0236 0.376 0.624
#> SRR1663233 2 0.671 0.5260 0.176 0.824
#> SRR1663236 2 0.985 0.4473 0.428 0.572
#> SRR1663237 2 0.662 0.5294 0.172 0.828
#> SRR1663238 2 0.983 0.4015 0.424 0.576
#> SRR1663234 2 0.904 0.5276 0.320 0.680
#> SRR1663240 2 0.697 0.6060 0.188 0.812
#> SRR1663239 2 0.469 0.6332 0.100 0.900
#> SRR1663241 2 0.671 0.6005 0.176 0.824
#> SRR1663242 2 0.827 0.5221 0.260 0.740
#> SRR1663243 2 0.814 0.5284 0.252 0.748
#> SRR1663244 2 0.973 0.4705 0.404 0.596
#> SRR1663246 2 0.775 0.5799 0.228 0.772
#> SRR1663245 2 0.814 0.5284 0.252 0.748
#> SRR1663247 2 0.886 0.5168 0.304 0.696
#> SRR1663248 2 0.999 -0.2791 0.480 0.520
#> SRR1663250 2 0.966 0.4494 0.392 0.608
#> SRR1663249 2 0.975 0.4674 0.408 0.592
#> SRR1663251 2 0.983 0.4503 0.424 0.576
#> SRR1663252 2 0.295 0.6117 0.052 0.948
#> SRR1663253 2 0.644 0.6040 0.164 0.836
#> SRR1663254 1 0.795 0.9187 0.760 0.240
#> SRR1663255 2 0.958 0.4828 0.380 0.620
#> SRR1663256 2 0.644 0.6040 0.164 0.836
#> SRR1663259 2 0.529 0.6148 0.120 0.880
#> SRR1663258 2 0.402 0.6071 0.080 0.920
#> SRR1663257 2 0.876 0.5132 0.296 0.704
#> SRR1663263 2 0.985 0.3950 0.428 0.572
#> SRR1663260 2 0.958 0.4612 0.380 0.620
#> SRR1663262 2 0.260 0.6294 0.044 0.956
#> SRR1663261 2 0.985 0.3177 0.428 0.572
#> SRR1663265 2 0.814 0.5284 0.252 0.748
#> SRR1663266 2 0.833 0.5282 0.264 0.736
#> SRR1663267 1 0.689 0.9550 0.816 0.184
#> SRR1663264 2 0.671 0.6012 0.176 0.824
#> SRR1663268 2 0.653 0.6151 0.168 0.832
#> SRR1663269 2 0.625 0.6048 0.156 0.844
#> SRR1663271 2 0.680 0.5218 0.180 0.820
#> SRR1663270 2 0.983 0.4009 0.424 0.576
#> SRR1663273 2 0.781 0.5768 0.232 0.768
#> SRR1663272 2 0.781 0.5768 0.232 0.768
#> SRR1663275 2 0.680 0.5218 0.180 0.820
#> SRR1663274 2 0.456 0.6041 0.096 0.904
#> SRR1663276 2 1.000 -0.2928 0.488 0.512
#> SRR1663277 2 1.000 -0.2928 0.488 0.512
#> SRR1663279 2 0.260 0.6294 0.044 0.956
#> SRR1663278 2 0.808 0.5313 0.248 0.752
#> SRR1663280 2 0.814 0.5284 0.252 0.748
#> SRR1663281 2 0.952 0.4685 0.372 0.628
#> SRR1663282 2 0.952 0.4685 0.372 0.628
#> SRR1663283 1 0.714 0.9567 0.804 0.196
#> SRR1663284 1 0.714 0.9567 0.804 0.196
#> SRR1663286 2 0.653 0.5331 0.168 0.832
#> SRR1663287 2 0.204 0.6286 0.032 0.968
#> SRR1663288 2 0.184 0.6170 0.028 0.972
#> SRR1663291 1 0.745 0.9459 0.788 0.212
#> SRR1663289 2 0.671 0.5260 0.176 0.824
#> SRR1663290 2 0.671 0.5260 0.176 0.824
#> SRR1663285 2 0.985 0.3950 0.428 0.572
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 3 0.994 0.52393 0.288 0.328 0.384
#> SRR1663210 3 0.994 0.52393 0.288 0.328 0.384
#> SRR1663213 2 0.668 0.56391 0.216 0.724 0.060
#> SRR1663211 2 0.618 0.55637 0.236 0.732 0.032
#> SRR1663212 2 0.618 0.55637 0.236 0.732 0.032
#> SRR1663214 2 0.663 0.53932 0.260 0.700 0.040
#> SRR1663215 2 0.663 0.53932 0.260 0.700 0.040
#> SRR1663216 2 0.645 0.23008 0.292 0.684 0.024
#> SRR1663217 1 0.703 0.50388 0.716 0.196 0.088
#> SRR1663218 1 0.703 0.50388 0.716 0.196 0.088
#> SRR1663219 3 0.993 -0.36869 0.316 0.292 0.392
#> SRR1663220 3 0.993 -0.36869 0.316 0.292 0.392
#> SRR1663221 2 0.650 0.36839 0.140 0.760 0.100
#> SRR1663222 2 0.604 0.38017 0.000 0.620 0.380
#> SRR1663224 2 0.442 0.57860 0.088 0.864 0.048
#> SRR1663225 2 0.645 0.23008 0.292 0.684 0.024
#> SRR1663226 2 0.645 0.23008 0.292 0.684 0.024
#> SRR1663223 2 0.367 0.52631 0.064 0.896 0.040
#> SRR1663229 2 0.709 0.18094 0.292 0.660 0.048
#> SRR1663231 2 0.610 0.36451 0.000 0.608 0.392
#> SRR1663232 2 0.610 0.36451 0.000 0.608 0.392
#> SRR1663227 2 0.668 0.33912 0.012 0.584 0.404
#> SRR1663228 2 0.668 0.33912 0.012 0.584 0.404
#> SRR1663230 3 0.996 0.50926 0.292 0.336 0.372
#> SRR1663235 1 0.642 0.02484 0.676 0.304 0.020
#> SRR1663233 3 0.986 0.54093 0.288 0.296 0.416
#> SRR1663236 2 0.625 0.51638 0.056 0.756 0.188
#> SRR1663237 3 0.986 0.54030 0.292 0.292 0.416
#> SRR1663238 2 0.638 0.53980 0.256 0.712 0.032
#> SRR1663234 3 0.645 -0.10772 0.004 0.436 0.560
#> SRR1663240 2 0.672 0.56462 0.212 0.724 0.064
#> SRR1663239 2 0.511 0.58841 0.144 0.820 0.036
#> SRR1663241 2 0.702 0.41990 0.032 0.624 0.344
#> SRR1663242 2 0.333 0.54501 0.020 0.904 0.076
#> SRR1663243 2 0.318 0.54235 0.016 0.908 0.076
#> SRR1663244 2 0.569 0.44344 0.004 0.708 0.288
#> SRR1663246 2 0.713 0.54018 0.252 0.684 0.064
#> SRR1663245 2 0.280 0.55145 0.016 0.924 0.060
#> SRR1663247 2 0.417 0.51454 0.004 0.840 0.156
#> SRR1663248 1 0.581 0.06058 0.692 0.304 0.004
#> SRR1663250 2 0.621 0.55636 0.228 0.736 0.036
#> SRR1663249 2 0.435 0.52121 0.004 0.828 0.168
#> SRR1663251 2 0.636 0.40985 0.020 0.684 0.296
#> SRR1663252 2 0.634 0.39232 0.180 0.756 0.064
#> SRR1663253 2 0.576 0.40452 0.000 0.672 0.328
#> SRR1663254 2 0.943 -0.56456 0.408 0.416 0.176
#> SRR1663255 2 0.541 0.57046 0.212 0.772 0.016
#> SRR1663256 2 0.685 0.38367 0.020 0.600 0.380
#> SRR1663259 2 0.404 0.52149 0.080 0.880 0.040
#> SRR1663258 2 0.785 0.32928 0.080 0.616 0.304
#> SRR1663257 2 0.483 0.56347 0.084 0.848 0.068
#> SRR1663263 2 0.638 0.53980 0.256 0.712 0.032
#> SRR1663260 2 0.585 0.56397 0.216 0.756 0.028
#> SRR1663262 2 0.862 -0.32909 0.112 0.536 0.352
#> SRR1663261 2 0.970 -0.41845 0.248 0.452 0.300
#> SRR1663265 2 0.626 0.24665 0.032 0.724 0.244
#> SRR1663266 2 0.388 0.56330 0.044 0.888 0.068
#> SRR1663267 3 0.993 -0.36869 0.316 0.292 0.392
#> SRR1663264 2 0.823 0.41093 0.096 0.584 0.320
#> SRR1663268 2 0.580 0.57716 0.212 0.760 0.028
#> SRR1663269 2 0.709 0.56302 0.208 0.708 0.084
#> SRR1663271 3 0.986 0.54030 0.292 0.292 0.416
#> SRR1663270 2 0.645 0.53439 0.264 0.704 0.032
#> SRR1663273 2 0.708 0.53980 0.256 0.684 0.060
#> SRR1663272 2 0.708 0.53980 0.256 0.684 0.060
#> SRR1663275 3 0.988 0.53986 0.296 0.292 0.412
#> SRR1663274 3 0.510 0.01419 0.000 0.248 0.752
#> SRR1663276 1 0.984 0.41303 0.420 0.272 0.308
#> SRR1663277 1 0.982 0.41286 0.428 0.276 0.296
#> SRR1663279 2 0.429 0.50777 0.104 0.864 0.032
#> SRR1663278 2 0.318 0.54235 0.016 0.908 0.076
#> SRR1663280 2 0.290 0.54958 0.016 0.920 0.064
#> SRR1663281 2 0.525 0.57285 0.224 0.768 0.008
#> SRR1663282 2 0.541 0.57133 0.224 0.764 0.012
#> SRR1663283 1 0.927 0.48147 0.456 0.384 0.160
#> SRR1663284 1 0.927 0.48147 0.456 0.384 0.160
#> SRR1663286 3 0.990 0.53949 0.292 0.304 0.404
#> SRR1663287 2 0.440 0.50030 0.116 0.856 0.028
#> SRR1663288 2 0.644 0.25396 0.276 0.696 0.028
#> SRR1663291 1 0.814 0.45562 0.544 0.380 0.076
#> SRR1663289 2 0.840 -0.00561 0.296 0.588 0.116
#> SRR1663290 2 0.821 0.03299 0.296 0.600 0.104
#> SRR1663285 2 0.638 0.53980 0.256 0.712 0.032
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.4560 0.53227 0.000 0.700 0.004 0.296
#> SRR1663210 2 0.4560 0.53227 0.000 0.700 0.004 0.296
#> SRR1663213 3 0.5613 0.81421 0.156 0.120 0.724 0.000
#> SRR1663211 3 0.4398 0.78927 0.072 0.104 0.820 0.004
#> SRR1663212 3 0.4467 0.79278 0.076 0.104 0.816 0.004
#> SRR1663214 3 0.5006 0.81980 0.124 0.104 0.772 0.000
#> SRR1663215 3 0.5006 0.81980 0.124 0.104 0.772 0.000
#> SRR1663216 2 0.1816 0.66025 0.004 0.948 0.024 0.024
#> SRR1663217 1 0.9414 -0.20780 0.428 0.212 0.208 0.152
#> SRR1663218 1 0.9414 -0.20780 0.428 0.212 0.208 0.152
#> SRR1663219 4 0.4981 0.74825 0.464 0.000 0.000 0.536
#> SRR1663220 4 0.4981 0.74825 0.464 0.000 0.000 0.536
#> SRR1663221 2 0.1629 0.65291 0.024 0.952 0.024 0.000
#> SRR1663222 1 0.5934 0.50962 0.592 0.372 0.020 0.016
#> SRR1663224 2 0.5051 0.55934 0.028 0.724 0.244 0.004
#> SRR1663225 2 0.1362 0.65731 0.012 0.964 0.020 0.004
#> SRR1663226 2 0.1082 0.65855 0.004 0.972 0.020 0.004
#> SRR1663223 2 0.4163 0.60484 0.020 0.792 0.188 0.000
#> SRR1663229 2 0.0592 0.65847 0.000 0.984 0.016 0.000
#> SRR1663231 1 0.5920 0.51024 0.596 0.368 0.020 0.016
#> SRR1663232 1 0.5906 0.51059 0.600 0.364 0.020 0.016
#> SRR1663227 1 0.7243 0.44351 0.600 0.268 0.096 0.036
#> SRR1663228 1 0.7212 0.44663 0.600 0.268 0.100 0.032
#> SRR1663230 2 0.4277 0.54270 0.000 0.720 0.000 0.280
#> SRR1663235 2 0.7130 0.05053 0.368 0.508 0.004 0.120
#> SRR1663233 2 0.5344 0.52402 0.032 0.668 0.000 0.300
#> SRR1663236 1 0.7920 0.11370 0.492 0.148 0.332 0.028
#> SRR1663237 2 0.4584 0.52634 0.004 0.696 0.000 0.300
#> SRR1663238 3 0.5827 0.80544 0.136 0.104 0.740 0.020
#> SRR1663234 1 0.8708 0.27100 0.468 0.164 0.076 0.292
#> SRR1663240 3 0.6220 0.76879 0.248 0.104 0.648 0.000
#> SRR1663239 2 0.6716 0.21738 0.128 0.616 0.252 0.004
#> SRR1663241 1 0.6136 0.49315 0.584 0.356 0.060 0.000
#> SRR1663242 2 0.4464 0.58776 0.012 0.760 0.224 0.004
#> SRR1663243 2 0.4089 0.59914 0.004 0.780 0.212 0.004
#> SRR1663244 2 0.9231 -0.36944 0.300 0.384 0.088 0.228
#> SRR1663246 3 0.5803 0.79392 0.196 0.104 0.700 0.000
#> SRR1663245 2 0.4754 0.58238 0.024 0.752 0.220 0.004
#> SRR1663247 2 0.7968 -0.31989 0.392 0.452 0.116 0.040
#> SRR1663248 2 0.7087 0.00241 0.388 0.496 0.004 0.112
#> SRR1663250 3 0.5996 0.80079 0.160 0.104 0.720 0.016
#> SRR1663249 1 0.9119 0.37672 0.444 0.272 0.168 0.116
#> SRR1663251 4 0.9336 -0.01172 0.220 0.260 0.112 0.408
#> SRR1663252 2 0.2998 0.61346 0.080 0.892 0.024 0.004
#> SRR1663253 1 0.5613 0.50887 0.592 0.380 0.028 0.000
#> SRR1663254 1 0.3586 0.09856 0.872 0.012 0.076 0.040
#> SRR1663255 3 0.7726 0.33333 0.200 0.348 0.448 0.004
#> SRR1663256 1 0.5901 0.51112 0.596 0.364 0.036 0.004
#> SRR1663259 2 0.3146 0.64985 0.036 0.892 0.064 0.008
#> SRR1663258 2 0.5669 -0.35217 0.464 0.516 0.016 0.004
#> SRR1663257 2 0.5846 0.30884 0.032 0.592 0.372 0.004
#> SRR1663263 3 0.4547 0.81514 0.092 0.104 0.804 0.000
#> SRR1663260 3 0.5522 0.79501 0.120 0.148 0.732 0.000
#> SRR1663262 2 0.5805 0.55330 0.024 0.680 0.028 0.268
#> SRR1663261 1 0.7428 0.28345 0.644 0.120 0.156 0.080
#> SRR1663265 2 0.6167 0.59962 0.012 0.696 0.188 0.104
#> SRR1663266 2 0.5331 0.56826 0.024 0.716 0.244 0.016
#> SRR1663267 4 0.4981 0.74825 0.464 0.000 0.000 0.536
#> SRR1663264 1 0.6000 0.50138 0.592 0.356 0.052 0.000
#> SRR1663268 3 0.7256 0.62539 0.204 0.256 0.540 0.000
#> SRR1663269 3 0.6245 0.74991 0.244 0.108 0.648 0.000
#> SRR1663271 2 0.4356 0.53075 0.000 0.708 0.000 0.292
#> SRR1663270 3 0.3526 0.75789 0.032 0.100 0.864 0.004
#> SRR1663273 3 0.5803 0.79392 0.196 0.104 0.700 0.000
#> SRR1663272 3 0.5766 0.79707 0.192 0.104 0.704 0.000
#> SRR1663275 2 0.4923 0.52112 0.008 0.684 0.004 0.304
#> SRR1663274 1 0.6950 0.27821 0.572 0.156 0.000 0.272
#> SRR1663276 1 0.4547 0.03608 0.816 0.056 0.012 0.116
#> SRR1663277 1 0.4570 0.02733 0.812 0.064 0.008 0.116
#> SRR1663279 2 0.2096 0.66090 0.016 0.940 0.016 0.028
#> SRR1663278 2 0.4089 0.60128 0.004 0.780 0.212 0.004
#> SRR1663280 2 0.4652 0.58475 0.020 0.756 0.220 0.004
#> SRR1663281 3 0.5982 0.50013 0.052 0.312 0.632 0.004
#> SRR1663282 3 0.6002 0.49207 0.052 0.316 0.628 0.004
#> SRR1663283 1 0.3790 0.10919 0.856 0.008 0.096 0.040
#> SRR1663284 1 0.3790 0.10919 0.856 0.008 0.096 0.040
#> SRR1663286 2 0.4382 0.52907 0.000 0.704 0.000 0.296
#> SRR1663287 2 0.2214 0.65008 0.028 0.928 0.044 0.000
#> SRR1663288 2 0.1004 0.65932 0.000 0.972 0.024 0.004
#> SRR1663291 1 0.5350 0.00865 0.700 0.004 0.260 0.036
#> SRR1663289 2 0.0967 0.65822 0.004 0.976 0.004 0.016
#> SRR1663290 2 0.0844 0.65814 0.004 0.980 0.004 0.012
#> SRR1663285 3 0.4547 0.81514 0.092 0.104 0.804 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.5483 0.5734 0.000 0.512 0.000 0.064 0.424
#> SRR1663210 2 0.5483 0.5734 0.000 0.512 0.000 0.064 0.424
#> SRR1663213 3 0.3100 0.6810 0.000 0.040 0.876 0.020 0.064
#> SRR1663211 3 0.4063 0.5538 0.000 0.280 0.708 0.012 0.000
#> SRR1663212 3 0.3967 0.5709 0.000 0.264 0.724 0.012 0.000
#> SRR1663214 3 0.1444 0.7032 0.000 0.040 0.948 0.012 0.000
#> SRR1663215 3 0.1444 0.7032 0.000 0.040 0.948 0.012 0.000
#> SRR1663216 2 0.4645 0.6152 0.000 0.564 0.004 0.008 0.424
#> SRR1663217 5 0.3455 0.6624 0.008 0.020 0.132 0.004 0.836
#> SRR1663218 5 0.3455 0.6624 0.008 0.020 0.132 0.004 0.836
#> SRR1663219 1 0.0290 1.0000 0.992 0.000 0.000 0.008 0.000
#> SRR1663220 1 0.0290 1.0000 0.992 0.000 0.000 0.008 0.000
#> SRR1663221 2 0.6393 0.5876 0.000 0.584 0.056 0.076 0.284
#> SRR1663222 4 0.2124 0.6476 0.000 0.096 0.004 0.900 0.000
#> SRR1663224 2 0.2795 0.5463 0.000 0.880 0.064 0.056 0.000
#> SRR1663225 2 0.5057 0.6232 0.000 0.556 0.004 0.028 0.412
#> SRR1663226 2 0.4722 0.6253 0.000 0.572 0.004 0.012 0.412
#> SRR1663223 2 0.2409 0.5808 0.000 0.912 0.028 0.044 0.016
#> SRR1663229 2 0.5019 0.6261 0.000 0.532 0.000 0.032 0.436
#> SRR1663231 4 0.2017 0.6510 0.000 0.080 0.008 0.912 0.000
#> SRR1663232 4 0.2077 0.6525 0.000 0.084 0.008 0.908 0.000
#> SRR1663227 4 0.1764 0.6404 0.000 0.064 0.008 0.928 0.000
#> SRR1663228 4 0.1764 0.6404 0.000 0.064 0.008 0.928 0.000
#> SRR1663230 2 0.4533 0.6174 0.000 0.544 0.000 0.008 0.448
#> SRR1663235 5 0.2228 0.6140 0.004 0.092 0.000 0.004 0.900
#> SRR1663233 2 0.4886 0.6071 0.000 0.528 0.000 0.024 0.448
#> SRR1663236 3 0.7240 -0.1538 0.132 0.060 0.440 0.368 0.000
#> SRR1663237 2 0.5452 0.5722 0.000 0.492 0.000 0.060 0.448
#> SRR1663238 3 0.1331 0.7025 0.008 0.000 0.952 0.040 0.000
#> SRR1663234 2 0.8494 -0.4385 0.136 0.304 0.284 0.272 0.004
#> SRR1663240 3 0.3452 0.6655 0.000 0.032 0.820 0.148 0.000
#> SRR1663239 2 0.7290 0.3290 0.000 0.476 0.296 0.052 0.176
#> SRR1663241 4 0.4350 0.6519 0.000 0.152 0.084 0.764 0.000
#> SRR1663242 2 0.2362 0.5343 0.000 0.900 0.024 0.076 0.000
#> SRR1663243 2 0.1750 0.5733 0.000 0.936 0.028 0.036 0.000
#> SRR1663244 4 0.7512 0.3745 0.156 0.088 0.272 0.484 0.000
#> SRR1663246 3 0.3236 0.6694 0.000 0.020 0.828 0.152 0.000
#> SRR1663245 2 0.2054 0.5594 0.000 0.920 0.028 0.052 0.000
#> SRR1663247 4 0.8302 0.3096 0.132 0.268 0.256 0.344 0.000
#> SRR1663248 5 0.2352 0.6170 0.008 0.092 0.000 0.004 0.896
#> SRR1663250 3 0.0798 0.6998 0.016 0.000 0.976 0.008 0.000
#> SRR1663249 4 0.7287 0.3859 0.136 0.080 0.276 0.508 0.000
#> SRR1663251 4 0.7496 0.3834 0.240 0.068 0.212 0.480 0.000
#> SRR1663252 2 0.7436 0.4929 0.000 0.492 0.108 0.116 0.284
#> SRR1663253 4 0.3366 0.6221 0.000 0.212 0.004 0.784 0.000
#> SRR1663254 3 0.8593 -0.0686 0.244 0.000 0.272 0.220 0.264
#> SRR1663255 3 0.4734 0.4741 0.000 0.108 0.732 0.160 0.000
#> SRR1663256 4 0.3491 0.6016 0.000 0.228 0.004 0.768 0.000
#> SRR1663259 2 0.2846 0.6273 0.000 0.864 0.008 0.008 0.120
#> SRR1663258 4 0.5175 0.3861 0.000 0.372 0.004 0.584 0.040
#> SRR1663257 2 0.1956 0.5631 0.000 0.916 0.076 0.000 0.008
#> SRR1663263 3 0.0771 0.7010 0.000 0.020 0.976 0.004 0.000
#> SRR1663260 3 0.2790 0.6695 0.000 0.068 0.880 0.052 0.000
#> SRR1663262 2 0.3538 0.6334 0.000 0.804 0.004 0.016 0.176
#> SRR1663261 4 0.8498 0.3800 0.208 0.204 0.264 0.324 0.000
#> SRR1663265 2 0.1211 0.5833 0.000 0.960 0.024 0.016 0.000
#> SRR1663266 2 0.1579 0.5741 0.000 0.944 0.024 0.032 0.000
#> SRR1663267 1 0.0290 1.0000 0.992 0.000 0.000 0.008 0.000
#> SRR1663264 4 0.4430 0.6240 0.000 0.172 0.076 0.752 0.000
#> SRR1663268 3 0.3392 0.6588 0.000 0.084 0.848 0.064 0.004
#> SRR1663269 3 0.4132 0.5672 0.000 0.020 0.720 0.260 0.000
#> SRR1663271 2 0.5452 0.5722 0.000 0.492 0.000 0.060 0.448
#> SRR1663270 3 0.3661 0.5799 0.000 0.276 0.724 0.000 0.000
#> SRR1663273 3 0.3236 0.6694 0.000 0.020 0.828 0.152 0.000
#> SRR1663272 3 0.3236 0.6694 0.000 0.020 0.828 0.152 0.000
#> SRR1663275 2 0.5454 0.5691 0.000 0.488 0.000 0.060 0.452
#> SRR1663274 4 0.4490 0.3682 0.000 0.404 0.004 0.588 0.004
#> SRR1663276 5 0.5199 0.4714 0.008 0.024 0.008 0.352 0.608
#> SRR1663277 5 0.5541 0.5012 0.008 0.024 0.028 0.324 0.616
#> SRR1663279 2 0.3391 0.6362 0.000 0.800 0.000 0.012 0.188
#> SRR1663278 2 0.1498 0.5868 0.000 0.952 0.024 0.016 0.008
#> SRR1663280 2 0.2036 0.5562 0.000 0.920 0.024 0.056 0.000
#> SRR1663281 3 0.4014 0.6144 0.000 0.256 0.728 0.016 0.000
#> SRR1663282 3 0.4206 0.5959 0.000 0.272 0.708 0.020 0.000
#> SRR1663283 3 0.8305 0.0731 0.184 0.000 0.376 0.176 0.264
#> SRR1663284 3 0.8322 0.0709 0.188 0.000 0.372 0.176 0.264
#> SRR1663286 2 0.5452 0.5722 0.000 0.492 0.000 0.060 0.448
#> SRR1663287 2 0.4271 0.6272 0.000 0.772 0.012 0.040 0.176
#> SRR1663288 2 0.4909 0.6248 0.000 0.560 0.000 0.028 0.412
#> SRR1663291 3 0.6638 0.2855 0.020 0.000 0.540 0.176 0.264
#> SRR1663289 2 0.4538 0.6165 0.000 0.540 0.000 0.008 0.452
#> SRR1663290 2 0.4538 0.6214 0.000 0.540 0.000 0.008 0.452
#> SRR1663285 3 0.0771 0.7010 0.000 0.020 0.976 0.004 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.3645 0.5462 0.236 0.740 0.000 0.000 0.024 0.000
#> SRR1663210 2 0.3592 0.5435 0.240 0.740 0.000 0.000 0.020 0.000
#> SRR1663213 3 0.4852 0.6119 0.008 0.004 0.664 0.072 0.252 0.000
#> SRR1663211 3 0.4333 0.3460 0.000 0.000 0.512 0.020 0.468 0.000
#> SRR1663212 3 0.4325 0.3649 0.000 0.000 0.524 0.020 0.456 0.000
#> SRR1663214 3 0.1592 0.6204 0.020 0.000 0.940 0.032 0.008 0.000
#> SRR1663215 3 0.1592 0.6204 0.020 0.000 0.940 0.032 0.008 0.000
#> SRR1663216 2 0.6230 0.3308 0.236 0.464 0.004 0.008 0.288 0.000
#> SRR1663217 1 0.5161 0.5127 0.680 0.188 0.092 0.040 0.000 0.000
#> SRR1663218 1 0.5161 0.5127 0.680 0.188 0.092 0.040 0.000 0.000
#> SRR1663219 6 0.0405 1.0000 0.004 0.000 0.000 0.008 0.000 0.988
#> SRR1663220 6 0.0405 1.0000 0.004 0.000 0.000 0.008 0.000 0.988
#> SRR1663221 5 0.7100 0.2413 0.004 0.324 0.056 0.284 0.332 0.000
#> SRR1663222 4 0.1588 0.5123 0.000 0.004 0.000 0.924 0.072 0.000
#> SRR1663224 5 0.4461 0.3042 0.000 0.012 0.204 0.068 0.716 0.000
#> SRR1663225 5 0.7526 0.1519 0.236 0.228 0.000 0.172 0.364 0.000
#> SRR1663226 5 0.7304 0.1324 0.236 0.240 0.000 0.124 0.400 0.000
#> SRR1663223 5 0.5272 0.4588 0.004 0.048 0.052 0.244 0.652 0.000
#> SRR1663229 2 0.7133 -0.1357 0.056 0.412 0.012 0.236 0.284 0.000
#> SRR1663231 4 0.1700 0.5078 0.000 0.000 0.000 0.916 0.080 0.004
#> SRR1663232 4 0.1644 0.5110 0.000 0.000 0.004 0.920 0.076 0.000
#> SRR1663227 4 0.0405 0.4804 0.000 0.000 0.000 0.988 0.004 0.008
#> SRR1663228 4 0.0405 0.4804 0.000 0.000 0.000 0.988 0.004 0.008
#> SRR1663230 2 0.2651 0.6158 0.004 0.872 0.000 0.036 0.088 0.000
#> SRR1663235 1 0.3271 0.3119 0.760 0.232 0.000 0.000 0.008 0.000
#> SRR1663233 2 0.2398 0.6260 0.004 0.888 0.000 0.028 0.080 0.000
#> SRR1663236 3 0.8341 0.3507 0.156 0.000 0.344 0.100 0.284 0.116
#> SRR1663237 2 0.0790 0.6360 0.032 0.968 0.000 0.000 0.000 0.000
#> SRR1663238 3 0.4767 0.5847 0.164 0.000 0.736 0.052 0.020 0.028
#> SRR1663234 2 0.9622 -0.2791 0.124 0.264 0.104 0.244 0.140 0.124
#> SRR1663240 3 0.7228 0.5506 0.160 0.004 0.456 0.148 0.232 0.000
#> SRR1663239 5 0.6857 0.1856 0.008 0.212 0.176 0.088 0.516 0.000
#> SRR1663241 4 0.6261 0.3538 0.124 0.004 0.048 0.532 0.292 0.000
#> SRR1663242 5 0.3929 0.4479 0.000 0.028 0.000 0.272 0.700 0.000
#> SRR1663243 5 0.4330 0.4688 0.000 0.044 0.012 0.236 0.708 0.000
#> SRR1663244 4 0.8502 0.1576 0.136 0.004 0.120 0.392 0.180 0.168
#> SRR1663246 3 0.4582 0.5776 0.184 0.004 0.704 0.108 0.000 0.000
#> SRR1663245 5 0.3603 0.4752 0.000 0.040 0.016 0.140 0.804 0.000
#> SRR1663247 4 0.8271 0.0744 0.136 0.000 0.104 0.372 0.268 0.120
#> SRR1663248 1 0.2980 0.3549 0.800 0.192 0.000 0.000 0.008 0.000
#> SRR1663250 3 0.6811 0.5885 0.156 0.000 0.532 0.032 0.232 0.048
#> SRR1663249 4 0.8089 0.2115 0.136 0.000 0.140 0.448 0.116 0.160
#> SRR1663251 4 0.8195 0.1714 0.128 0.000 0.088 0.388 0.140 0.256
#> SRR1663252 4 0.7178 -0.2409 0.004 0.312 0.068 0.356 0.260 0.000
#> SRR1663253 4 0.4270 0.4394 0.000 0.008 0.024 0.660 0.308 0.000
#> SRR1663254 1 0.6918 0.4315 0.500 0.000 0.136 0.236 0.004 0.124
#> SRR1663255 5 0.7453 -0.3143 0.128 0.000 0.272 0.264 0.336 0.000
#> SRR1663256 4 0.4330 0.4396 0.000 0.008 0.020 0.660 0.308 0.004
#> SRR1663259 5 0.7065 0.4091 0.064 0.184 0.040 0.164 0.544 0.004
#> SRR1663258 4 0.3857 0.4345 0.000 0.084 0.012 0.792 0.112 0.000
#> SRR1663257 5 0.1794 0.4223 0.000 0.040 0.036 0.000 0.924 0.000
#> SRR1663263 3 0.1265 0.6282 0.000 0.000 0.948 0.044 0.008 0.000
#> SRR1663260 3 0.5181 0.6112 0.052 0.000 0.640 0.044 0.264 0.000
#> SRR1663262 5 0.6306 0.1790 0.028 0.388 0.036 0.072 0.476 0.000
#> SRR1663261 4 0.9573 0.1882 0.128 0.180 0.104 0.304 0.108 0.176
#> SRR1663265 5 0.5210 0.4064 0.004 0.228 0.036 0.068 0.664 0.000
#> SRR1663266 5 0.2188 0.4333 0.000 0.032 0.020 0.036 0.912 0.000
#> SRR1663267 6 0.0405 1.0000 0.004 0.000 0.000 0.008 0.000 0.988
#> SRR1663264 4 0.4335 0.4291 0.000 0.008 0.024 0.644 0.324 0.000
#> SRR1663268 3 0.6859 0.4532 0.120 0.000 0.456 0.120 0.304 0.000
#> SRR1663269 4 0.6931 -0.2700 0.088 0.004 0.376 0.396 0.136 0.000
#> SRR1663271 2 0.1075 0.6409 0.048 0.952 0.000 0.000 0.000 0.000
#> SRR1663270 3 0.3819 0.5666 0.000 0.000 0.700 0.020 0.280 0.000
#> SRR1663273 3 0.4664 0.5750 0.184 0.004 0.696 0.116 0.000 0.000
#> SRR1663272 3 0.4664 0.5750 0.184 0.004 0.696 0.116 0.000 0.000
#> SRR1663275 2 0.0146 0.6327 0.004 0.996 0.000 0.000 0.000 0.000
#> SRR1663274 4 0.4854 0.3292 0.000 0.264 0.000 0.636 0.100 0.000
#> SRR1663276 1 0.6118 0.4815 0.560 0.108 0.052 0.276 0.000 0.004
#> SRR1663277 1 0.6208 0.4923 0.560 0.112 0.060 0.264 0.000 0.004
#> SRR1663279 5 0.6235 0.1792 0.148 0.288 0.028 0.008 0.528 0.000
#> SRR1663278 5 0.4478 0.4867 0.000 0.076 0.012 0.192 0.720 0.000
#> SRR1663280 5 0.4064 0.4683 0.000 0.040 0.004 0.236 0.720 0.000
#> SRR1663281 5 0.4389 -0.3043 0.000 0.000 0.448 0.024 0.528 0.000
#> SRR1663282 5 0.4389 -0.3041 0.000 0.000 0.448 0.024 0.528 0.000
#> SRR1663283 1 0.6698 0.4460 0.532 0.000 0.188 0.188 0.004 0.088
#> SRR1663284 1 0.6714 0.4477 0.532 0.000 0.184 0.188 0.004 0.092
#> SRR1663286 2 0.1265 0.6467 0.044 0.948 0.000 0.000 0.008 0.000
#> SRR1663287 5 0.7048 0.3898 0.016 0.204 0.056 0.268 0.456 0.000
#> SRR1663288 5 0.7642 0.1465 0.244 0.224 0.000 0.204 0.328 0.000
#> SRR1663291 1 0.6700 0.4364 0.512 0.000 0.216 0.208 0.008 0.056
#> SRR1663289 2 0.4774 0.4575 0.004 0.712 0.012 0.160 0.112 0.000
#> SRR1663290 2 0.5050 0.4110 0.004 0.680 0.012 0.180 0.124 0.000
#> SRR1663285 3 0.1265 0.6282 0.000 0.000 0.948 0.044 0.008 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
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 17717 rows and 83 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.703 0.840 0.935 0.5025 0.495 0.495
#> 3 3 0.885 0.918 0.953 0.3278 0.730 0.509
#> 4 4 0.614 0.592 0.770 0.1170 0.911 0.745
#> 5 5 0.678 0.664 0.808 0.0754 0.813 0.430
#> 6 6 0.662 0.534 0.719 0.0366 0.929 0.675
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
#> SRR1663209 2 0.0000 0.94587 0.000 1.000
#> SRR1663210 2 0.0000 0.94587 0.000 1.000
#> SRR1663213 1 0.0000 0.90262 1.000 0.000
#> SRR1663211 1 0.4815 0.82980 0.896 0.104
#> SRR1663212 1 0.4298 0.84344 0.912 0.088
#> SRR1663214 1 0.0000 0.90262 1.000 0.000
#> SRR1663215 1 0.0000 0.90262 1.000 0.000
#> SRR1663216 2 0.0000 0.94587 0.000 1.000
#> SRR1663217 1 0.0376 0.90070 0.996 0.004
#> SRR1663218 1 0.0376 0.90070 0.996 0.004
#> SRR1663219 1 0.7219 0.74573 0.800 0.200
#> SRR1663220 1 0.7219 0.74573 0.800 0.200
#> SRR1663221 2 0.0000 0.94587 0.000 1.000
#> SRR1663222 2 0.2948 0.90122 0.052 0.948
#> SRR1663224 2 0.8443 0.60764 0.272 0.728
#> SRR1663225 2 0.0000 0.94587 0.000 1.000
#> SRR1663226 2 0.0000 0.94587 0.000 1.000
#> SRR1663223 2 0.0000 0.94587 0.000 1.000
#> SRR1663229 2 0.0000 0.94587 0.000 1.000
#> SRR1663231 1 1.0000 0.03901 0.504 0.496
#> SRR1663232 1 0.9552 0.41126 0.624 0.376
#> SRR1663227 2 0.9970 -0.00294 0.468 0.532
#> SRR1663228 1 0.9881 0.29107 0.564 0.436
#> SRR1663230 2 0.0000 0.94587 0.000 1.000
#> SRR1663235 2 0.0000 0.94587 0.000 1.000
#> SRR1663233 2 0.0000 0.94587 0.000 1.000
#> SRR1663236 1 0.0000 0.90262 1.000 0.000
#> SRR1663237 2 0.0000 0.94587 0.000 1.000
#> SRR1663238 1 0.0000 0.90262 1.000 0.000
#> SRR1663234 2 0.0000 0.94587 0.000 1.000
#> SRR1663240 1 0.0000 0.90262 1.000 0.000
#> SRR1663239 1 1.0000 0.02715 0.504 0.496
#> SRR1663241 1 0.0000 0.90262 1.000 0.000
#> SRR1663242 2 0.0000 0.94587 0.000 1.000
#> SRR1663243 2 0.0000 0.94587 0.000 1.000
#> SRR1663244 2 0.0000 0.94587 0.000 1.000
#> SRR1663246 1 0.0000 0.90262 1.000 0.000
#> SRR1663245 2 0.0000 0.94587 0.000 1.000
#> SRR1663247 2 0.0000 0.94587 0.000 1.000
#> SRR1663248 2 0.0000 0.94587 0.000 1.000
#> SRR1663250 1 0.0000 0.90262 1.000 0.000
#> SRR1663249 1 0.7674 0.71697 0.776 0.224
#> SRR1663251 1 0.7219 0.74573 0.800 0.200
#> SRR1663252 2 0.0000 0.94587 0.000 1.000
#> SRR1663253 1 0.8081 0.65526 0.752 0.248
#> SRR1663254 1 0.6148 0.79345 0.848 0.152
#> SRR1663255 1 0.0000 0.90262 1.000 0.000
#> SRR1663256 1 0.0000 0.90262 1.000 0.000
#> SRR1663259 2 0.0000 0.94587 0.000 1.000
#> SRR1663258 2 0.0000 0.94587 0.000 1.000
#> SRR1663257 2 0.7528 0.70152 0.216 0.784
#> SRR1663263 1 0.0000 0.90262 1.000 0.000
#> SRR1663260 1 0.0000 0.90262 1.000 0.000
#> SRR1663262 2 0.0000 0.94587 0.000 1.000
#> SRR1663261 2 0.9833 0.17591 0.424 0.576
#> SRR1663265 2 0.0000 0.94587 0.000 1.000
#> SRR1663266 2 0.7602 0.69562 0.220 0.780
#> SRR1663267 1 0.7453 0.73197 0.788 0.212
#> SRR1663264 1 0.0000 0.90262 1.000 0.000
#> SRR1663268 1 0.0000 0.90262 1.000 0.000
#> SRR1663269 1 0.0000 0.90262 1.000 0.000
#> SRR1663271 2 0.0000 0.94587 0.000 1.000
#> SRR1663270 1 0.0000 0.90262 1.000 0.000
#> SRR1663273 1 0.0000 0.90262 1.000 0.000
#> SRR1663272 1 0.0000 0.90262 1.000 0.000
#> SRR1663275 2 0.0000 0.94587 0.000 1.000
#> SRR1663274 2 0.0000 0.94587 0.000 1.000
#> SRR1663276 2 0.6438 0.76643 0.164 0.836
#> SRR1663277 2 0.4161 0.86692 0.084 0.916
#> SRR1663279 2 0.0000 0.94587 0.000 1.000
#> SRR1663278 2 0.0000 0.94587 0.000 1.000
#> SRR1663280 2 0.3879 0.87743 0.076 0.924
#> SRR1663281 1 0.0000 0.90262 1.000 0.000
#> SRR1663282 1 0.0000 0.90262 1.000 0.000
#> SRR1663283 1 0.0000 0.90262 1.000 0.000
#> SRR1663284 1 0.0000 0.90262 1.000 0.000
#> SRR1663286 2 0.0000 0.94587 0.000 1.000
#> SRR1663287 2 0.0000 0.94587 0.000 1.000
#> SRR1663288 2 0.0000 0.94587 0.000 1.000
#> SRR1663291 1 0.0000 0.90262 1.000 0.000
#> SRR1663289 2 0.0000 0.94587 0.000 1.000
#> SRR1663290 2 0.0000 0.94587 0.000 1.000
#> SRR1663285 1 0.0000 0.90262 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663213 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663211 3 0.1529 0.952 0.000 0.040 0.960
#> SRR1663212 3 0.1529 0.952 0.000 0.040 0.960
#> SRR1663214 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663215 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663216 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663217 3 0.0424 0.977 0.008 0.000 0.992
#> SRR1663218 3 0.0424 0.977 0.008 0.000 0.992
#> SRR1663219 1 0.1529 0.931 0.960 0.000 0.040
#> SRR1663220 1 0.1529 0.931 0.960 0.000 0.040
#> SRR1663221 2 0.1031 0.939 0.024 0.976 0.000
#> SRR1663222 1 0.1411 0.929 0.964 0.036 0.000
#> SRR1663224 2 0.5926 0.482 0.000 0.644 0.356
#> SRR1663225 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663226 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663223 2 0.0237 0.946 0.004 0.996 0.000
#> SRR1663229 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663231 1 0.1289 0.934 0.968 0.000 0.032
#> SRR1663232 1 0.1289 0.934 0.968 0.000 0.032
#> SRR1663227 1 0.2496 0.913 0.928 0.068 0.004
#> SRR1663228 1 0.2400 0.915 0.932 0.064 0.004
#> SRR1663230 2 0.0592 0.944 0.012 0.988 0.000
#> SRR1663235 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663233 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663236 1 0.2066 0.930 0.940 0.000 0.060
#> SRR1663237 2 0.1031 0.939 0.024 0.976 0.000
#> SRR1663238 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663234 1 0.0592 0.936 0.988 0.012 0.000
#> SRR1663240 3 0.0237 0.978 0.004 0.000 0.996
#> SRR1663239 3 0.3038 0.884 0.000 0.104 0.896
#> SRR1663241 1 0.0747 0.936 0.984 0.000 0.016
#> SRR1663242 2 0.1289 0.933 0.032 0.968 0.000
#> SRR1663243 2 0.3412 0.859 0.124 0.876 0.000
#> SRR1663244 1 0.1289 0.930 0.968 0.032 0.000
#> SRR1663246 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663245 2 0.1031 0.937 0.024 0.976 0.000
#> SRR1663247 1 0.0424 0.936 0.992 0.008 0.000
#> SRR1663248 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663250 1 0.1860 0.930 0.948 0.000 0.052
#> SRR1663249 1 0.0237 0.935 0.996 0.000 0.004
#> SRR1663251 1 0.0237 0.935 0.996 0.000 0.004
#> SRR1663252 2 0.4605 0.736 0.204 0.796 0.000
#> SRR1663253 1 0.5327 0.673 0.728 0.000 0.272
#> SRR1663254 1 0.0592 0.936 0.988 0.000 0.012
#> SRR1663255 1 0.2796 0.904 0.908 0.000 0.092
#> SRR1663256 1 0.1964 0.926 0.944 0.000 0.056
#> SRR1663259 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663258 1 0.4346 0.799 0.816 0.184 0.000
#> SRR1663257 2 0.5659 0.673 0.012 0.740 0.248
#> SRR1663263 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663260 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663262 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663261 1 0.0000 0.935 1.000 0.000 0.000
#> SRR1663265 2 0.0747 0.941 0.016 0.984 0.000
#> SRR1663266 2 0.6597 0.547 0.024 0.664 0.312
#> SRR1663267 1 0.0892 0.935 0.980 0.000 0.020
#> SRR1663264 1 0.4702 0.772 0.788 0.000 0.212
#> SRR1663268 3 0.1529 0.953 0.040 0.000 0.960
#> SRR1663269 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663271 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663270 3 0.1031 0.966 0.024 0.000 0.976
#> SRR1663273 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663272 3 0.0000 0.980 0.000 0.000 1.000
#> SRR1663275 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663274 1 0.2356 0.911 0.928 0.072 0.000
#> SRR1663276 1 0.1905 0.936 0.956 0.028 0.016
#> SRR1663277 1 0.2031 0.935 0.952 0.032 0.016
#> SRR1663279 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663278 2 0.2261 0.910 0.068 0.932 0.000
#> SRR1663280 2 0.3276 0.888 0.024 0.908 0.068
#> SRR1663281 3 0.1753 0.948 0.048 0.000 0.952
#> SRR1663282 3 0.1964 0.940 0.056 0.000 0.944
#> SRR1663283 1 0.3412 0.876 0.876 0.000 0.124
#> SRR1663284 1 0.3412 0.876 0.876 0.000 0.124
#> SRR1663286 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663287 2 0.0237 0.947 0.004 0.996 0.000
#> SRR1663288 2 0.0000 0.947 0.000 1.000 0.000
#> SRR1663291 1 0.3116 0.896 0.892 0.000 0.108
#> SRR1663289 2 0.1163 0.936 0.028 0.972 0.000
#> SRR1663290 2 0.1163 0.936 0.028 0.972 0.000
#> SRR1663285 3 0.0000 0.980 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.3356 0.71843 0.176 0.824 0.000 0.000
#> SRR1663210 2 0.3444 0.71384 0.184 0.816 0.000 0.000
#> SRR1663213 3 0.0000 0.87004 0.000 0.000 1.000 0.000
#> SRR1663211 3 0.2469 0.81102 0.108 0.000 0.892 0.000
#> SRR1663212 3 0.1940 0.83350 0.076 0.000 0.924 0.000
#> SRR1663214 3 0.0000 0.87004 0.000 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.87004 0.000 0.000 1.000 0.000
#> SRR1663216 2 0.2868 0.70608 0.136 0.864 0.000 0.000
#> SRR1663217 3 0.6082 -0.00531 0.476 0.044 0.480 0.000
#> SRR1663218 1 0.5859 -0.09674 0.496 0.032 0.472 0.000
#> SRR1663219 1 0.4967 0.60327 0.548 0.000 0.000 0.452
#> SRR1663220 1 0.4955 0.61004 0.556 0.000 0.000 0.444
#> SRR1663221 2 0.4289 0.53203 0.032 0.796 0.000 0.172
#> SRR1663222 4 0.4800 0.55933 0.000 0.340 0.004 0.656
#> SRR1663224 2 0.5712 0.67890 0.384 0.584 0.032 0.000
#> SRR1663225 2 0.1637 0.72001 0.060 0.940 0.000 0.000
#> SRR1663226 2 0.1211 0.71407 0.040 0.960 0.000 0.000
#> SRR1663223 2 0.4978 0.69283 0.384 0.612 0.000 0.004
#> SRR1663229 2 0.1398 0.67240 0.004 0.956 0.000 0.040
#> SRR1663231 4 0.4595 0.59692 0.000 0.176 0.044 0.780
#> SRR1663232 4 0.4553 0.59693 0.000 0.180 0.040 0.780
#> SRR1663227 4 0.4564 0.56691 0.000 0.328 0.000 0.672
#> SRR1663228 4 0.4477 0.57327 0.000 0.312 0.000 0.688
#> SRR1663230 2 0.2915 0.62827 0.028 0.892 0.000 0.080
#> SRR1663235 1 0.4989 -0.42795 0.528 0.472 0.000 0.000
#> SRR1663233 2 0.3247 0.63499 0.060 0.880 0.000 0.060
#> SRR1663236 4 0.4775 0.28334 0.028 0.000 0.232 0.740
#> SRR1663237 2 0.4710 0.53825 0.088 0.792 0.000 0.120
#> SRR1663238 3 0.0336 0.86779 0.000 0.000 0.992 0.008
#> SRR1663234 4 0.2799 0.44587 0.108 0.008 0.000 0.884
#> SRR1663240 3 0.1389 0.84087 0.000 0.000 0.952 0.048
#> SRR1663239 3 0.1716 0.82534 0.000 0.064 0.936 0.000
#> SRR1663241 4 0.0469 0.52079 0.012 0.000 0.000 0.988
#> SRR1663242 2 0.4866 0.68394 0.404 0.596 0.000 0.000
#> SRR1663243 2 0.5193 0.67234 0.412 0.580 0.000 0.008
#> SRR1663244 4 0.3279 0.49761 0.096 0.032 0.000 0.872
#> SRR1663246 3 0.0000 0.87004 0.000 0.000 1.000 0.000
#> SRR1663245 2 0.5016 0.68636 0.396 0.600 0.004 0.000
#> SRR1663247 4 0.2593 0.45643 0.104 0.004 0.000 0.892
#> SRR1663248 2 0.4972 0.12034 0.456 0.544 0.000 0.000
#> SRR1663250 4 0.5272 0.28911 0.084 0.000 0.172 0.744
#> SRR1663249 4 0.3649 0.29143 0.204 0.000 0.000 0.796
#> SRR1663251 4 0.2973 0.39643 0.144 0.000 0.000 0.856
#> SRR1663252 4 0.4998 0.41331 0.000 0.488 0.000 0.512
#> SRR1663253 4 0.6630 0.54392 0.000 0.252 0.136 0.612
#> SRR1663254 1 0.4998 0.56283 0.512 0.000 0.000 0.488
#> SRR1663255 4 0.5280 0.39927 0.120 0.000 0.128 0.752
#> SRR1663256 4 0.5368 0.58446 0.004 0.148 0.096 0.752
#> SRR1663259 2 0.4817 0.69197 0.388 0.612 0.000 0.000
#> SRR1663258 4 0.4830 0.52613 0.000 0.392 0.000 0.608
#> SRR1663257 2 0.6168 0.66226 0.388 0.556 0.056 0.000
#> SRR1663263 3 0.0000 0.87004 0.000 0.000 1.000 0.000
#> SRR1663260 3 0.0376 0.86906 0.004 0.000 0.992 0.004
#> SRR1663262 2 0.3569 0.72469 0.196 0.804 0.000 0.000
#> SRR1663261 4 0.3219 0.36113 0.164 0.000 0.000 0.836
#> SRR1663265 2 0.4843 0.68789 0.396 0.604 0.000 0.000
#> SRR1663266 2 0.6384 0.64381 0.400 0.532 0.068 0.000
#> SRR1663267 1 0.4992 0.57392 0.524 0.000 0.000 0.476
#> SRR1663264 4 0.6781 0.48008 0.000 0.148 0.256 0.596
#> SRR1663268 3 0.2704 0.76306 0.000 0.000 0.876 0.124
#> SRR1663269 3 0.0188 0.86898 0.000 0.000 0.996 0.004
#> SRR1663271 2 0.1854 0.67583 0.048 0.940 0.000 0.012
#> SRR1663270 3 0.4103 0.66916 0.256 0.000 0.744 0.000
#> SRR1663273 3 0.0000 0.87004 0.000 0.000 1.000 0.000
#> SRR1663272 3 0.0336 0.86779 0.000 0.000 0.992 0.008
#> SRR1663275 2 0.2773 0.65479 0.072 0.900 0.000 0.028
#> SRR1663274 4 0.6357 0.47218 0.068 0.388 0.000 0.544
#> SRR1663276 1 0.7049 0.39192 0.572 0.236 0.000 0.192
#> SRR1663277 1 0.7042 0.38913 0.572 0.240 0.000 0.188
#> SRR1663279 2 0.5112 0.69126 0.384 0.608 0.008 0.000
#> SRR1663278 2 0.4855 0.68635 0.400 0.600 0.000 0.000
#> SRR1663280 2 0.5028 0.68431 0.400 0.596 0.004 0.000
#> SRR1663281 3 0.6632 0.40775 0.404 0.008 0.524 0.064
#> SRR1663282 3 0.6792 0.33659 0.440 0.008 0.480 0.072
#> SRR1663283 1 0.4991 0.63037 0.608 0.000 0.004 0.388
#> SRR1663284 1 0.4991 0.63037 0.608 0.000 0.004 0.388
#> SRR1663286 2 0.1151 0.68625 0.024 0.968 0.000 0.008
#> SRR1663287 2 0.3099 0.72537 0.104 0.876 0.000 0.020
#> SRR1663288 2 0.3610 0.72444 0.200 0.800 0.000 0.000
#> SRR1663291 1 0.5686 0.62398 0.592 0.000 0.032 0.376
#> SRR1663289 2 0.3975 0.38888 0.000 0.760 0.000 0.240
#> SRR1663290 2 0.4134 0.34275 0.000 0.740 0.000 0.260
#> SRR1663285 3 0.0000 0.87004 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
#> SRR1663209 5 0.5618 0.4160 0.000 0.280 0.000 0.112 0.608
#> SRR1663210 5 0.5295 0.5309 0.000 0.224 0.000 0.112 0.664
#> SRR1663213 3 0.0290 0.9452 0.000 0.008 0.992 0.000 0.000
#> SRR1663211 2 0.4390 0.2053 0.000 0.568 0.428 0.000 0.004
#> SRR1663212 2 0.4430 0.1229 0.000 0.540 0.456 0.000 0.004
#> SRR1663214 3 0.0290 0.9452 0.000 0.008 0.992 0.000 0.000
#> SRR1663215 3 0.0290 0.9452 0.000 0.008 0.992 0.000 0.000
#> SRR1663216 5 0.4411 0.6686 0.000 0.128 0.004 0.096 0.772
#> SRR1663217 5 0.4762 0.5983 0.048 0.004 0.212 0.008 0.728
#> SRR1663218 5 0.4762 0.5983 0.048 0.004 0.212 0.008 0.728
#> SRR1663219 1 0.0290 0.8089 0.992 0.000 0.000 0.000 0.008
#> SRR1663220 1 0.0290 0.8089 0.992 0.000 0.000 0.000 0.008
#> SRR1663221 2 0.5452 0.4860 0.000 0.492 0.000 0.448 0.060
#> SRR1663222 4 0.3790 0.6085 0.000 0.000 0.004 0.724 0.272
#> SRR1663224 2 0.1507 0.7514 0.000 0.952 0.024 0.012 0.012
#> SRR1663225 2 0.5878 0.5839 0.000 0.548 0.000 0.336 0.116
#> SRR1663226 2 0.6035 0.5619 0.000 0.528 0.000 0.340 0.132
#> SRR1663223 2 0.3724 0.7162 0.000 0.788 0.000 0.184 0.028
#> SRR1663229 2 0.6054 0.5301 0.000 0.496 0.000 0.380 0.124
#> SRR1663231 4 0.3693 0.6904 0.012 0.000 0.016 0.804 0.168
#> SRR1663232 4 0.3926 0.6914 0.020 0.000 0.016 0.792 0.172
#> SRR1663227 4 0.0566 0.6800 0.004 0.000 0.000 0.984 0.012
#> SRR1663228 4 0.1173 0.6850 0.020 0.004 0.000 0.964 0.012
#> SRR1663230 5 0.2966 0.6819 0.000 0.000 0.000 0.184 0.816
#> SRR1663235 5 0.4817 0.6563 0.008 0.096 0.004 0.140 0.752
#> SRR1663233 5 0.1502 0.7339 0.000 0.004 0.000 0.056 0.940
#> SRR1663236 1 0.5415 0.2362 0.556 0.020 0.028 0.396 0.000
#> SRR1663237 5 0.1197 0.7352 0.000 0.000 0.000 0.048 0.952
#> SRR1663238 3 0.0609 0.9411 0.000 0.000 0.980 0.020 0.000
#> SRR1663234 4 0.6462 0.3047 0.356 0.000 0.000 0.456 0.188
#> SRR1663240 3 0.1732 0.8907 0.000 0.000 0.920 0.080 0.000
#> SRR1663239 3 0.0566 0.9424 0.000 0.012 0.984 0.000 0.004
#> SRR1663241 4 0.4602 0.4097 0.340 0.000 0.004 0.640 0.016
#> SRR1663242 2 0.0510 0.7478 0.016 0.984 0.000 0.000 0.000
#> SRR1663243 2 0.1357 0.7377 0.048 0.948 0.000 0.004 0.000
#> SRR1663244 4 0.6026 0.4475 0.244 0.160 0.000 0.592 0.004
#> SRR1663246 3 0.0510 0.9428 0.000 0.000 0.984 0.016 0.000
#> SRR1663245 2 0.1956 0.7497 0.008 0.916 0.000 0.076 0.000
#> SRR1663247 1 0.3401 0.7463 0.840 0.096 0.000 0.064 0.000
#> SRR1663248 5 0.1651 0.7278 0.036 0.008 0.000 0.012 0.944
#> SRR1663250 1 0.4140 0.6621 0.764 0.028 0.008 0.200 0.000
#> SRR1663249 1 0.2036 0.7896 0.920 0.024 0.000 0.056 0.000
#> SRR1663251 1 0.2236 0.7842 0.908 0.024 0.000 0.068 0.000
#> SRR1663252 4 0.1310 0.6566 0.000 0.020 0.000 0.956 0.024
#> SRR1663253 4 0.4398 0.6232 0.000 0.000 0.240 0.720 0.040
#> SRR1663254 1 0.0290 0.8089 0.992 0.000 0.000 0.000 0.008
#> SRR1663255 4 0.7817 0.3207 0.248 0.164 0.108 0.476 0.004
#> SRR1663256 4 0.5225 0.5956 0.032 0.000 0.028 0.660 0.280
#> SRR1663259 2 0.1568 0.7481 0.000 0.944 0.020 0.000 0.036
#> SRR1663258 4 0.1124 0.6783 0.000 0.004 0.000 0.960 0.036
#> SRR1663257 2 0.1216 0.7496 0.000 0.960 0.020 0.000 0.020
#> SRR1663263 3 0.0404 0.9438 0.000 0.012 0.988 0.000 0.000
#> SRR1663260 3 0.0898 0.9415 0.000 0.020 0.972 0.008 0.000
#> SRR1663262 2 0.5379 0.6338 0.000 0.668 0.000 0.168 0.164
#> SRR1663261 1 0.4714 0.2371 0.576 0.012 0.000 0.408 0.004
#> SRR1663265 2 0.3784 0.7276 0.024 0.816 0.000 0.140 0.020
#> SRR1663266 2 0.0671 0.7473 0.004 0.980 0.016 0.000 0.000
#> SRR1663267 1 0.0290 0.8089 0.992 0.000 0.000 0.000 0.008
#> SRR1663264 4 0.5514 0.6245 0.000 0.000 0.176 0.652 0.172
#> SRR1663268 3 0.2886 0.8137 0.000 0.008 0.844 0.148 0.000
#> SRR1663269 3 0.0510 0.9428 0.000 0.000 0.984 0.016 0.000
#> SRR1663271 5 0.1818 0.7369 0.000 0.024 0.000 0.044 0.932
#> SRR1663270 3 0.3949 0.5695 0.004 0.300 0.696 0.000 0.000
#> SRR1663273 3 0.0404 0.9437 0.000 0.000 0.988 0.012 0.000
#> SRR1663272 3 0.0609 0.9411 0.000 0.000 0.980 0.020 0.000
#> SRR1663275 5 0.1430 0.7346 0.000 0.004 0.000 0.052 0.944
#> SRR1663274 5 0.3807 0.5504 0.012 0.000 0.000 0.240 0.748
#> SRR1663276 5 0.2723 0.6755 0.124 0.000 0.000 0.012 0.864
#> SRR1663277 5 0.2674 0.6777 0.120 0.000 0.000 0.012 0.868
#> SRR1663279 2 0.3278 0.7295 0.000 0.860 0.020 0.028 0.092
#> SRR1663278 2 0.1547 0.7501 0.016 0.948 0.004 0.000 0.032
#> SRR1663280 2 0.0833 0.7484 0.004 0.976 0.016 0.000 0.004
#> SRR1663281 2 0.4861 0.5293 0.220 0.712 0.060 0.008 0.000
#> SRR1663282 2 0.5087 0.4608 0.264 0.672 0.056 0.008 0.000
#> SRR1663283 1 0.1732 0.7801 0.920 0.000 0.000 0.000 0.080
#> SRR1663284 1 0.1792 0.7775 0.916 0.000 0.000 0.000 0.084
#> SRR1663286 5 0.3058 0.7246 0.000 0.044 0.000 0.096 0.860
#> SRR1663287 2 0.5569 0.6175 0.000 0.588 0.000 0.320 0.092
#> SRR1663288 2 0.5400 0.6465 0.000 0.632 0.000 0.272 0.096
#> SRR1663291 1 0.5431 0.4606 0.628 0.052 0.016 0.000 0.304
#> SRR1663289 5 0.4235 0.0931 0.000 0.000 0.000 0.424 0.576
#> SRR1663290 5 0.4278 -0.0149 0.000 0.000 0.000 0.452 0.548
#> SRR1663285 3 0.0404 0.9438 0.000 0.012 0.988 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.6016 0.1036 0.000 0.488 0.000 0.032 0.116 0.364
#> SRR1663210 2 0.5583 0.2476 0.000 0.564 0.000 0.032 0.080 0.324
#> SRR1663213 3 0.0820 0.8874 0.000 0.000 0.972 0.016 0.012 0.000
#> SRR1663211 5 0.4845 0.2848 0.000 0.004 0.336 0.024 0.612 0.024
#> SRR1663212 5 0.4723 0.2649 0.000 0.004 0.344 0.020 0.612 0.020
#> SRR1663214 3 0.0547 0.8843 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR1663215 3 0.0458 0.8851 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR1663216 2 0.4573 0.4408 0.000 0.672 0.008 0.008 0.036 0.276
#> SRR1663217 2 0.4093 0.5397 0.024 0.772 0.160 0.040 0.000 0.004
#> SRR1663218 2 0.4057 0.5431 0.024 0.776 0.156 0.040 0.000 0.004
#> SRR1663219 1 0.0146 0.7127 0.996 0.004 0.000 0.000 0.000 0.000
#> SRR1663220 1 0.0146 0.7127 0.996 0.004 0.000 0.000 0.000 0.000
#> SRR1663221 6 0.1713 0.7117 0.000 0.000 0.000 0.044 0.028 0.928
#> SRR1663222 4 0.3782 0.5594 0.000 0.152 0.000 0.788 0.016 0.044
#> SRR1663224 5 0.5627 0.5431 0.000 0.024 0.064 0.044 0.656 0.212
#> SRR1663225 6 0.1644 0.7490 0.000 0.004 0.000 0.000 0.076 0.920
#> SRR1663226 6 0.1531 0.7503 0.000 0.004 0.000 0.000 0.068 0.928
#> SRR1663223 6 0.3890 0.0863 0.000 0.004 0.000 0.000 0.400 0.596
#> SRR1663229 6 0.1370 0.7458 0.000 0.004 0.000 0.012 0.036 0.948
#> SRR1663231 4 0.2452 0.6162 0.012 0.040 0.008 0.908 0.012 0.020
#> SRR1663232 4 0.2092 0.6148 0.008 0.048 0.004 0.920 0.012 0.008
#> SRR1663227 4 0.4072 0.3413 0.000 0.000 0.008 0.544 0.000 0.448
#> SRR1663228 4 0.4062 0.3525 0.000 0.000 0.008 0.552 0.000 0.440
#> SRR1663230 2 0.5091 0.6170 0.000 0.652 0.000 0.112 0.012 0.224
#> SRR1663235 2 0.3940 0.5868 0.004 0.816 0.008 0.036 0.048 0.088
#> SRR1663233 2 0.4515 0.6493 0.000 0.736 0.000 0.116 0.016 0.132
#> SRR1663236 4 0.5055 0.3911 0.184 0.000 0.088 0.696 0.024 0.008
#> SRR1663237 2 0.4042 0.6542 0.000 0.784 0.000 0.100 0.020 0.096
#> SRR1663238 3 0.0713 0.8861 0.000 0.000 0.972 0.028 0.000 0.000
#> SRR1663234 4 0.8045 0.2091 0.116 0.152 0.000 0.432 0.212 0.088
#> SRR1663240 3 0.3534 0.6222 0.000 0.000 0.740 0.244 0.000 0.016
#> SRR1663239 3 0.1116 0.8787 0.000 0.008 0.960 0.000 0.028 0.004
#> SRR1663241 4 0.2393 0.5659 0.092 0.000 0.004 0.884 0.000 0.020
#> SRR1663242 5 0.3057 0.5949 0.008 0.000 0.024 0.004 0.844 0.120
#> SRR1663243 5 0.4425 0.5459 0.052 0.000 0.000 0.008 0.692 0.248
#> SRR1663244 5 0.5868 -0.1901 0.068 0.012 0.000 0.400 0.492 0.028
#> SRR1663246 3 0.1075 0.8788 0.000 0.000 0.952 0.048 0.000 0.000
#> SRR1663245 5 0.5509 0.2394 0.004 0.036 0.000 0.044 0.516 0.400
#> SRR1663247 1 0.5822 0.5743 0.624 0.000 0.000 0.200 0.096 0.080
#> SRR1663248 2 0.0984 0.6546 0.012 0.968 0.000 0.008 0.000 0.012
#> SRR1663250 4 0.5244 0.1084 0.312 0.000 0.020 0.596 0.072 0.000
#> SRR1663249 1 0.4467 0.5329 0.632 0.000 0.000 0.320 0.048 0.000
#> SRR1663251 1 0.4687 0.4480 0.604 0.000 0.000 0.336 0.060 0.000
#> SRR1663252 6 0.3547 0.0839 0.000 0.000 0.000 0.332 0.000 0.668
#> SRR1663253 4 0.6490 0.4777 0.000 0.100 0.200 0.552 0.000 0.148
#> SRR1663254 1 0.3247 0.6879 0.808 0.036 0.000 0.156 0.000 0.000
#> SRR1663255 4 0.5798 0.4139 0.064 0.004 0.080 0.636 0.212 0.004
#> SRR1663256 4 0.2306 0.6107 0.000 0.092 0.016 0.888 0.000 0.004
#> SRR1663259 5 0.4984 0.5418 0.000 0.040 0.044 0.000 0.656 0.260
#> SRR1663258 4 0.4128 0.2729 0.000 0.004 0.004 0.504 0.000 0.488
#> SRR1663257 5 0.3807 0.5978 0.000 0.008 0.056 0.004 0.792 0.140
#> SRR1663263 3 0.1082 0.8756 0.000 0.004 0.956 0.000 0.040 0.000
#> SRR1663260 3 0.1346 0.8774 0.000 0.000 0.952 0.024 0.016 0.008
#> SRR1663262 6 0.5504 0.2769 0.000 0.164 0.000 0.008 0.236 0.592
#> SRR1663261 1 0.6027 0.0173 0.408 0.000 0.000 0.340 0.000 0.252
#> SRR1663265 5 0.7082 0.1943 0.128 0.044 0.000 0.044 0.428 0.356
#> SRR1663266 5 0.4305 0.5771 0.000 0.008 0.048 0.004 0.724 0.216
#> SRR1663267 1 0.0146 0.7127 0.996 0.004 0.000 0.000 0.000 0.000
#> SRR1663264 4 0.3932 0.5891 0.000 0.064 0.120 0.792 0.000 0.024
#> SRR1663268 3 0.4926 0.4039 0.000 0.000 0.584 0.080 0.000 0.336
#> SRR1663269 3 0.1075 0.8788 0.000 0.000 0.952 0.048 0.000 0.000
#> SRR1663271 2 0.4590 0.6571 0.000 0.736 0.000 0.088 0.028 0.148
#> SRR1663270 3 0.3738 0.4804 0.000 0.004 0.680 0.004 0.312 0.000
#> SRR1663273 3 0.0790 0.8850 0.000 0.000 0.968 0.032 0.000 0.000
#> SRR1663272 3 0.1204 0.8739 0.000 0.000 0.944 0.056 0.000 0.000
#> SRR1663275 2 0.4778 0.6428 0.000 0.732 0.000 0.108 0.044 0.116
#> SRR1663274 2 0.6758 0.2959 0.000 0.452 0.000 0.324 0.132 0.092
#> SRR1663276 2 0.2058 0.6437 0.056 0.908 0.000 0.036 0.000 0.000
#> SRR1663277 2 0.2058 0.6437 0.056 0.908 0.000 0.036 0.000 0.000
#> SRR1663279 5 0.7509 0.2178 0.000 0.172 0.068 0.040 0.400 0.320
#> SRR1663278 5 0.4479 0.5798 0.032 0.012 0.012 0.016 0.752 0.176
#> SRR1663280 5 0.3585 0.5991 0.000 0.000 0.048 0.004 0.792 0.156
#> SRR1663281 5 0.6715 0.3664 0.244 0.012 0.104 0.044 0.564 0.032
#> SRR1663282 5 0.6459 0.2846 0.296 0.016 0.076 0.040 0.552 0.020
#> SRR1663283 1 0.4569 0.6537 0.728 0.180 0.000 0.032 0.060 0.000
#> SRR1663284 1 0.4473 0.6528 0.732 0.184 0.000 0.028 0.056 0.000
#> SRR1663286 2 0.4283 0.6267 0.000 0.704 0.000 0.044 0.008 0.244
#> SRR1663287 6 0.2013 0.7464 0.000 0.008 0.000 0.008 0.076 0.908
#> SRR1663288 6 0.1866 0.7421 0.000 0.008 0.000 0.000 0.084 0.908
#> SRR1663291 2 0.6751 -0.1742 0.372 0.452 0.028 0.060 0.088 0.000
#> SRR1663289 2 0.6471 0.4751 0.000 0.528 0.000 0.252 0.076 0.144
#> SRR1663290 2 0.6658 0.3966 0.000 0.476 0.000 0.296 0.072 0.156
#> SRR1663285 3 0.0937 0.8770 0.000 0.000 0.960 0.000 0.040 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 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.948 0.956 0.978 0.3233 0.670 0.670
#> 3 3 0.855 0.901 0.874 0.0868 0.982 0.974
#> 4 4 0.746 0.802 0.906 0.1615 0.948 0.920
#> 5 5 0.698 0.842 0.915 0.1150 0.955 0.926
#> 6 6 0.834 0.780 0.901 0.1109 0.978 0.961
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
#> SRR1663209 2 0.0000 0.988 0.000 1.000
#> SRR1663210 2 0.0000 0.988 0.000 1.000
#> SRR1663213 2 0.0000 0.988 0.000 1.000
#> SRR1663211 2 0.0000 0.988 0.000 1.000
#> SRR1663212 2 0.0000 0.988 0.000 1.000
#> SRR1663214 2 0.0000 0.988 0.000 1.000
#> SRR1663215 2 0.0000 0.988 0.000 1.000
#> SRR1663216 2 0.0000 0.988 0.000 1.000
#> SRR1663217 1 0.2236 0.935 0.964 0.036
#> SRR1663218 1 0.2236 0.935 0.964 0.036
#> SRR1663219 1 0.3733 0.919 0.928 0.072
#> SRR1663220 1 0.3733 0.919 0.928 0.072
#> SRR1663221 2 0.0000 0.988 0.000 1.000
#> SRR1663222 2 0.0000 0.988 0.000 1.000
#> SRR1663224 2 0.0000 0.988 0.000 1.000
#> SRR1663225 2 0.0000 0.988 0.000 1.000
#> SRR1663226 2 0.0000 0.988 0.000 1.000
#> SRR1663223 2 0.0000 0.988 0.000 1.000
#> SRR1663229 2 0.0000 0.988 0.000 1.000
#> SRR1663231 2 0.0000 0.988 0.000 1.000
#> SRR1663232 2 0.0000 0.988 0.000 1.000
#> SRR1663227 1 0.5294 0.884 0.880 0.120
#> SRR1663228 1 0.5294 0.884 0.880 0.120
#> SRR1663230 2 0.0000 0.988 0.000 1.000
#> SRR1663235 2 0.0000 0.988 0.000 1.000
#> SRR1663233 2 0.0000 0.988 0.000 1.000
#> SRR1663236 1 0.0000 0.930 1.000 0.000
#> SRR1663237 2 0.0000 0.988 0.000 1.000
#> SRR1663238 2 0.4298 0.894 0.088 0.912
#> SRR1663234 2 0.0000 0.988 0.000 1.000
#> SRR1663240 2 0.0000 0.988 0.000 1.000
#> SRR1663239 2 0.0000 0.988 0.000 1.000
#> SRR1663241 1 0.0000 0.930 1.000 0.000
#> SRR1663242 2 0.0000 0.988 0.000 1.000
#> SRR1663243 2 0.0000 0.988 0.000 1.000
#> SRR1663244 2 0.0000 0.988 0.000 1.000
#> SRR1663246 2 0.0000 0.988 0.000 1.000
#> SRR1663245 2 0.0000 0.988 0.000 1.000
#> SRR1663247 1 0.0000 0.930 1.000 0.000
#> SRR1663248 2 0.6343 0.801 0.160 0.840
#> SRR1663250 2 0.0000 0.988 0.000 1.000
#> SRR1663249 2 0.0000 0.988 0.000 1.000
#> SRR1663251 1 0.0000 0.930 1.000 0.000
#> SRR1663252 2 0.0000 0.988 0.000 1.000
#> SRR1663253 2 0.0000 0.988 0.000 1.000
#> SRR1663254 1 0.5737 0.867 0.864 0.136
#> SRR1663255 2 0.0000 0.988 0.000 1.000
#> SRR1663256 2 0.0000 0.988 0.000 1.000
#> SRR1663259 2 0.0000 0.988 0.000 1.000
#> SRR1663258 2 0.0000 0.988 0.000 1.000
#> SRR1663257 2 0.0000 0.988 0.000 1.000
#> SRR1663263 2 0.0000 0.988 0.000 1.000
#> SRR1663260 2 0.0000 0.988 0.000 1.000
#> SRR1663262 2 0.0000 0.988 0.000 1.000
#> SRR1663261 2 0.7299 0.732 0.204 0.796
#> SRR1663265 2 0.0000 0.988 0.000 1.000
#> SRR1663266 2 0.0000 0.988 0.000 1.000
#> SRR1663267 1 0.9815 0.317 0.580 0.420
#> SRR1663264 2 0.0000 0.988 0.000 1.000
#> SRR1663268 2 0.0000 0.988 0.000 1.000
#> SRR1663269 2 0.0000 0.988 0.000 1.000
#> SRR1663271 2 0.0000 0.988 0.000 1.000
#> SRR1663270 2 0.0000 0.988 0.000 1.000
#> SRR1663273 2 0.4298 0.894 0.088 0.912
#> SRR1663272 2 0.0000 0.988 0.000 1.000
#> SRR1663275 2 0.0000 0.988 0.000 1.000
#> SRR1663274 1 0.0000 0.930 1.000 0.000
#> SRR1663276 1 0.2236 0.935 0.964 0.036
#> SRR1663277 1 0.2236 0.935 0.964 0.036
#> SRR1663279 2 0.0000 0.988 0.000 1.000
#> SRR1663278 2 0.0000 0.988 0.000 1.000
#> SRR1663280 2 0.0000 0.988 0.000 1.000
#> SRR1663281 2 0.0000 0.988 0.000 1.000
#> SRR1663282 2 0.0000 0.988 0.000 1.000
#> SRR1663283 1 0.0672 0.932 0.992 0.008
#> SRR1663284 1 0.0672 0.932 0.992 0.008
#> SRR1663286 2 0.0000 0.988 0.000 1.000
#> SRR1663287 2 0.0000 0.988 0.000 1.000
#> SRR1663288 2 0.0000 0.988 0.000 1.000
#> SRR1663291 2 0.7299 0.732 0.204 0.796
#> SRR1663289 2 0.0000 0.988 0.000 1.000
#> SRR1663290 2 0.0000 0.988 0.000 1.000
#> SRR1663285 2 0.0000 0.988 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663210 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663213 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663211 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663212 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663214 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663215 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663216 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663217 1 0.327 0.699 0.892 0.004 0.104
#> SRR1663218 1 0.327 0.699 0.892 0.004 0.104
#> SRR1663219 3 0.533 0.571 0.272 0.000 0.728
#> SRR1663220 3 0.533 0.571 0.272 0.000 0.728
#> SRR1663221 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663222 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663224 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663225 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663226 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663223 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663229 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663231 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663232 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663227 1 0.271 0.667 0.912 0.088 0.000
#> SRR1663228 1 0.271 0.667 0.912 0.088 0.000
#> SRR1663230 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663235 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663233 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663236 1 0.533 0.709 0.728 0.000 0.272
#> SRR1663237 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663238 2 0.319 0.864 0.000 0.888 0.112
#> SRR1663234 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663240 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663239 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663241 1 0.533 0.709 0.728 0.000 0.272
#> SRR1663242 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663243 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663244 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663246 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663245 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663247 1 0.533 0.709 0.728 0.000 0.272
#> SRR1663248 2 0.494 0.790 0.056 0.840 0.104
#> SRR1663250 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663249 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663251 1 0.533 0.709 0.728 0.000 0.272
#> SRR1663252 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663253 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663254 1 0.504 0.595 0.836 0.104 0.060
#> SRR1663255 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663256 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663259 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663258 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663257 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663263 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663260 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663262 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663261 2 0.604 0.690 0.056 0.772 0.172
#> SRR1663265 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663266 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663267 3 0.830 0.245 0.092 0.348 0.560
#> SRR1663264 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663268 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663269 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663271 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663270 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663273 2 0.319 0.864 0.000 0.888 0.112
#> SRR1663272 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663275 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663274 1 0.533 0.709 0.728 0.000 0.272
#> SRR1663276 1 0.335 0.701 0.888 0.004 0.108
#> SRR1663277 1 0.335 0.701 0.888 0.004 0.108
#> SRR1663279 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663278 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663280 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663281 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663282 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663283 3 0.288 0.558 0.096 0.000 0.904
#> SRR1663284 3 0.288 0.558 0.096 0.000 0.904
#> SRR1663286 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663287 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663288 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663291 2 0.604 0.690 0.056 0.772 0.172
#> SRR1663289 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663290 2 0.000 0.986 0.000 1.000 0.000
#> SRR1663285 2 0.000 0.986 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663210 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663213 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663211 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663212 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663214 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663215 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663216 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663217 1 0.0000 0.80381 1.000 0.000 0.000 0.000
#> SRR1663218 1 0.0000 0.80381 1.000 0.000 0.000 0.000
#> SRR1663219 2 0.6513 0.74323 0.180 0.640 0.000 0.180
#> SRR1663220 2 0.6513 0.74323 0.180 0.640 0.000 0.180
#> SRR1663221 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663222 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663224 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663225 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663226 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663223 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663229 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663231 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663232 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663227 1 0.3652 0.76445 0.856 0.000 0.052 0.092
#> SRR1663228 1 0.3652 0.76445 0.856 0.000 0.052 0.092
#> SRR1663230 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663235 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663233 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663236 4 0.7693 -0.00977 0.340 0.228 0.000 0.432
#> SRR1663237 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663238 3 0.5000 0.01825 0.000 0.000 0.500 0.500
#> SRR1663234 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663240 3 0.2530 0.86291 0.000 0.000 0.888 0.112
#> SRR1663239 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663241 4 0.7693 -0.00977 0.340 0.228 0.000 0.432
#> SRR1663242 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663243 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663244 3 0.2408 0.87104 0.000 0.000 0.896 0.104
#> SRR1663246 3 0.2589 0.85866 0.000 0.000 0.884 0.116
#> SRR1663245 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663247 4 0.7693 -0.00977 0.340 0.228 0.000 0.432
#> SRR1663248 3 0.3219 0.77178 0.164 0.000 0.836 0.000
#> SRR1663250 3 0.2408 0.87104 0.000 0.000 0.896 0.104
#> SRR1663249 3 0.2408 0.87104 0.000 0.000 0.896 0.104
#> SRR1663251 4 0.7693 -0.00977 0.340 0.228 0.000 0.432
#> SRR1663252 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663253 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663254 1 0.4329 0.71049 0.844 0.036 0.064 0.056
#> SRR1663255 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663256 3 0.2469 0.86703 0.000 0.000 0.892 0.108
#> SRR1663259 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663258 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663257 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663263 3 0.0592 0.94984 0.000 0.000 0.984 0.016
#> SRR1663260 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663262 3 0.0592 0.94984 0.000 0.000 0.984 0.016
#> SRR1663261 4 0.7246 0.11400 0.064 0.036 0.384 0.516
#> SRR1663265 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663266 3 0.0592 0.94984 0.000 0.000 0.984 0.016
#> SRR1663267 4 0.4989 -0.58725 0.000 0.472 0.000 0.528
#> SRR1663264 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663268 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663269 3 0.2589 0.85866 0.000 0.000 0.884 0.116
#> SRR1663271 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663270 3 0.0592 0.94984 0.000 0.000 0.984 0.016
#> SRR1663273 3 0.5000 0.01825 0.000 0.000 0.500 0.500
#> SRR1663272 3 0.3266 0.79480 0.000 0.000 0.832 0.168
#> SRR1663275 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663274 1 0.7716 -0.07269 0.416 0.228 0.000 0.356
#> SRR1663276 1 0.0188 0.80382 0.996 0.004 0.000 0.000
#> SRR1663277 1 0.0188 0.80382 0.996 0.004 0.000 0.000
#> SRR1663279 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663278 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663280 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663281 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663282 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663283 2 0.0188 0.74904 0.004 0.996 0.000 0.000
#> SRR1663284 2 0.0188 0.74904 0.004 0.996 0.000 0.000
#> SRR1663286 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663287 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663288 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663291 4 0.7246 0.11400 0.064 0.036 0.384 0.516
#> SRR1663289 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663290 3 0.0000 0.96170 0.000 0.000 1.000 0.000
#> SRR1663285 3 0.0000 0.96170 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
#> SRR1663209 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663213 2 0.0290 0.931 0.000 0.992 0.008 0.000 0.000
#> SRR1663211 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663212 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663214 2 0.1478 0.893 0.000 0.936 0.064 0.000 0.000
#> SRR1663215 2 0.1478 0.893 0.000 0.936 0.064 0.000 0.000
#> SRR1663216 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663217 4 0.0000 0.847 0.000 0.000 0.000 1.000 0.000
#> SRR1663218 4 0.0000 0.847 0.000 0.000 0.000 1.000 0.000
#> SRR1663219 1 0.6431 0.637 0.436 0.000 0.388 0.176 0.000
#> SRR1663220 1 0.6431 0.637 0.436 0.000 0.388 0.176 0.000
#> SRR1663221 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663222 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663224 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663225 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663226 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663223 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663229 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663231 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663232 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663227 4 0.3159 0.827 0.000 0.000 0.088 0.856 0.056
#> SRR1663228 4 0.3159 0.827 0.000 0.000 0.088 0.856 0.056
#> SRR1663230 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663233 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663236 5 0.0000 0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1663237 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663238 3 0.3661 0.717 0.000 0.276 0.724 0.000 0.000
#> SRR1663234 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663240 2 0.3274 0.702 0.000 0.780 0.220 0.000 0.000
#> SRR1663239 2 0.0609 0.924 0.000 0.980 0.020 0.000 0.000
#> SRR1663241 5 0.0000 0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1663242 2 0.1341 0.898 0.000 0.944 0.056 0.000 0.000
#> SRR1663243 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663244 2 0.3109 0.734 0.000 0.800 0.200 0.000 0.000
#> SRR1663246 2 0.3305 0.695 0.000 0.776 0.224 0.000 0.000
#> SRR1663245 2 0.1341 0.898 0.000 0.944 0.056 0.000 0.000
#> SRR1663247 5 0.0000 0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1663248 2 0.2773 0.745 0.000 0.836 0.000 0.164 0.000
#> SRR1663250 2 0.3109 0.734 0.000 0.800 0.200 0.000 0.000
#> SRR1663249 2 0.3109 0.734 0.000 0.800 0.200 0.000 0.000
#> SRR1663251 5 0.0000 0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1663252 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663253 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663254 4 0.2690 0.797 0.000 0.000 0.156 0.844 0.000
#> SRR1663255 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663256 2 0.3210 0.715 0.000 0.788 0.212 0.000 0.000
#> SRR1663259 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663258 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663257 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663263 2 0.3143 0.728 0.000 0.796 0.204 0.000 0.000
#> SRR1663260 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663262 2 0.3143 0.728 0.000 0.796 0.204 0.000 0.000
#> SRR1663261 3 0.4678 0.719 0.000 0.224 0.712 0.064 0.000
#> SRR1663265 2 0.1341 0.898 0.000 0.944 0.056 0.000 0.000
#> SRR1663266 2 0.3143 0.728 0.000 0.796 0.204 0.000 0.000
#> SRR1663267 3 0.3586 -0.472 0.264 0.000 0.736 0.000 0.000
#> SRR1663264 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663268 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663269 2 0.3305 0.695 0.000 0.776 0.224 0.000 0.000
#> SRR1663271 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663270 2 0.3143 0.728 0.000 0.796 0.204 0.000 0.000
#> SRR1663273 3 0.3661 0.717 0.000 0.276 0.724 0.000 0.000
#> SRR1663272 2 0.3661 0.587 0.000 0.724 0.276 0.000 0.000
#> SRR1663275 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663274 5 0.3074 0.709 0.000 0.000 0.000 0.196 0.804
#> SRR1663276 4 0.2970 0.785 0.168 0.000 0.000 0.828 0.004
#> SRR1663277 4 0.2970 0.785 0.168 0.000 0.000 0.828 0.004
#> SRR1663279 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663278 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663280 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663281 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663282 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663283 1 0.2813 0.594 0.832 0.000 0.000 0.000 0.168
#> SRR1663284 1 0.2813 0.594 0.832 0.000 0.000 0.000 0.168
#> SRR1663286 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663287 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663288 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663291 3 0.4678 0.719 0.000 0.224 0.712 0.064 0.000
#> SRR1663289 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.936 0.000 1.000 0.000 0.000 0.000
#> SRR1663285 2 0.1478 0.893 0.000 0.936 0.064 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663213 2 0.0713 0.893 0.000 0.972 0.028 0.000 0.000 0.000
#> SRR1663211 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663212 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663214 2 0.1610 0.853 0.000 0.916 0.084 0.000 0.000 0.000
#> SRR1663215 2 0.1610 0.853 0.000 0.916 0.084 0.000 0.000 0.000
#> SRR1663216 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663217 1 0.2597 0.803 0.824 0.000 0.000 0.000 0.000 0.176
#> SRR1663218 1 0.2597 0.803 0.824 0.000 0.000 0.000 0.000 0.176
#> SRR1663219 6 0.0000 0.713 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663220 6 0.0000 0.713 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1663221 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663222 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663224 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663225 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663226 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663223 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663229 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663231 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663232 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663227 1 0.6206 0.771 0.620 0.000 0.024 0.056 0.124 0.176
#> SRR1663228 1 0.6206 0.771 0.620 0.000 0.024 0.056 0.124 0.176
#> SRR1663230 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663233 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663236 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663237 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663238 3 0.0260 0.486 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1663234 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663240 2 0.3817 0.239 0.000 0.568 0.432 0.000 0.000 0.000
#> SRR1663239 2 0.0790 0.892 0.000 0.968 0.032 0.000 0.000 0.000
#> SRR1663241 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663242 2 0.1556 0.855 0.000 0.920 0.080 0.000 0.000 0.000
#> SRR1663243 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663244 2 0.3737 0.356 0.000 0.608 0.392 0.000 0.000 0.000
#> SRR1663246 2 0.3823 0.226 0.000 0.564 0.436 0.000 0.000 0.000
#> SRR1663245 2 0.1501 0.858 0.000 0.924 0.076 0.000 0.000 0.000
#> SRR1663247 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663248 2 0.2491 0.751 0.164 0.836 0.000 0.000 0.000 0.000
#> SRR1663250 2 0.3756 0.335 0.000 0.600 0.400 0.000 0.000 0.000
#> SRR1663249 2 0.3756 0.335 0.000 0.600 0.400 0.000 0.000 0.000
#> SRR1663251 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1663252 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663253 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663254 1 0.5670 0.731 0.600 0.000 0.024 0.000 0.148 0.228
#> SRR1663255 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663256 2 0.3782 0.300 0.000 0.588 0.412 0.000 0.000 0.000
#> SRR1663259 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663258 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663257 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663263 2 0.3309 0.629 0.000 0.720 0.280 0.000 0.000 0.000
#> SRR1663260 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663262 2 0.3309 0.629 0.000 0.720 0.280 0.000 0.000 0.000
#> SRR1663261 3 0.3645 0.435 0.000 0.008 0.796 0.000 0.144 0.052
#> SRR1663265 2 0.1501 0.858 0.000 0.924 0.076 0.000 0.000 0.000
#> SRR1663266 2 0.3309 0.629 0.000 0.720 0.280 0.000 0.000 0.000
#> SRR1663267 6 0.3607 0.427 0.000 0.000 0.348 0.000 0.000 0.652
#> SRR1663264 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663268 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663269 2 0.3823 0.226 0.000 0.564 0.436 0.000 0.000 0.000
#> SRR1663271 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663270 2 0.3309 0.629 0.000 0.720 0.280 0.000 0.000 0.000
#> SRR1663273 3 0.0260 0.486 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1663272 3 0.3868 -0.153 0.000 0.492 0.508 0.000 0.000 0.000
#> SRR1663275 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663274 4 0.2762 0.723 0.196 0.000 0.000 0.804 0.000 0.000
#> SRR1663276 1 0.0260 0.739 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR1663277 1 0.0260 0.739 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR1663279 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663278 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663280 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663281 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663282 2 0.0146 0.907 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1663283 5 0.2340 1.000 0.000 0.000 0.000 0.000 0.852 0.148
#> SRR1663284 5 0.2340 1.000 0.000 0.000 0.000 0.000 0.852 0.148
#> SRR1663286 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663287 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663288 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663291 3 0.3645 0.435 0.000 0.008 0.796 0.000 0.144 0.052
#> SRR1663289 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.908 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1663285 2 0.1610 0.853 0.000 0.916 0.084 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "kmeans"]
# you can also extract it by
# res = res_list["ATC:kmeans"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 17717 rows and 83 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.994 0.997 0.3277 0.670 0.670
#> 3 3 0.647 0.907 0.925 0.6668 0.746 0.623
#> 4 4 0.579 0.633 0.773 0.2114 0.817 0.620
#> 5 5 0.548 0.452 0.711 0.1220 0.791 0.507
#> 6 6 0.643 0.594 0.699 0.0602 0.858 0.542
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
#> SRR1663209 2 0.000 1.000 0.000 1.000
#> SRR1663210 2 0.000 1.000 0.000 1.000
#> SRR1663213 2 0.000 1.000 0.000 1.000
#> SRR1663211 2 0.000 1.000 0.000 1.000
#> SRR1663212 2 0.000 1.000 0.000 1.000
#> SRR1663214 2 0.000 1.000 0.000 1.000
#> SRR1663215 2 0.000 1.000 0.000 1.000
#> SRR1663216 2 0.000 1.000 0.000 1.000
#> SRR1663217 1 0.000 0.987 1.000 0.000
#> SRR1663218 1 0.000 0.987 1.000 0.000
#> SRR1663219 1 0.000 0.987 1.000 0.000
#> SRR1663220 1 0.000 0.987 1.000 0.000
#> SRR1663221 2 0.000 1.000 0.000 1.000
#> SRR1663222 2 0.000 1.000 0.000 1.000
#> SRR1663224 2 0.000 1.000 0.000 1.000
#> SRR1663225 2 0.000 1.000 0.000 1.000
#> SRR1663226 2 0.000 1.000 0.000 1.000
#> SRR1663223 2 0.000 1.000 0.000 1.000
#> SRR1663229 2 0.000 1.000 0.000 1.000
#> SRR1663231 2 0.000 1.000 0.000 1.000
#> SRR1663232 2 0.000 1.000 0.000 1.000
#> SRR1663227 1 0.000 0.987 1.000 0.000
#> SRR1663228 1 0.000 0.987 1.000 0.000
#> SRR1663230 2 0.000 1.000 0.000 1.000
#> SRR1663235 2 0.000 1.000 0.000 1.000
#> SRR1663233 2 0.000 1.000 0.000 1.000
#> SRR1663236 1 0.000 0.987 1.000 0.000
#> SRR1663237 2 0.000 1.000 0.000 1.000
#> SRR1663238 2 0.000 1.000 0.000 1.000
#> SRR1663234 2 0.000 1.000 0.000 1.000
#> SRR1663240 2 0.000 1.000 0.000 1.000
#> SRR1663239 2 0.000 1.000 0.000 1.000
#> SRR1663241 1 0.000 0.987 1.000 0.000
#> SRR1663242 2 0.000 1.000 0.000 1.000
#> SRR1663243 2 0.000 1.000 0.000 1.000
#> SRR1663244 2 0.000 1.000 0.000 1.000
#> SRR1663246 2 0.000 1.000 0.000 1.000
#> SRR1663245 2 0.000 1.000 0.000 1.000
#> SRR1663247 1 0.000 0.987 1.000 0.000
#> SRR1663248 2 0.000 1.000 0.000 1.000
#> SRR1663250 2 0.000 1.000 0.000 1.000
#> SRR1663249 2 0.000 1.000 0.000 1.000
#> SRR1663251 1 0.000 0.987 1.000 0.000
#> SRR1663252 2 0.000 1.000 0.000 1.000
#> SRR1663253 2 0.000 1.000 0.000 1.000
#> SRR1663254 1 0.000 0.987 1.000 0.000
#> SRR1663255 2 0.000 1.000 0.000 1.000
#> SRR1663256 2 0.000 1.000 0.000 1.000
#> SRR1663259 2 0.000 1.000 0.000 1.000
#> SRR1663258 2 0.000 1.000 0.000 1.000
#> SRR1663257 2 0.000 1.000 0.000 1.000
#> SRR1663263 2 0.000 1.000 0.000 1.000
#> SRR1663260 2 0.000 1.000 0.000 1.000
#> SRR1663262 2 0.000 1.000 0.000 1.000
#> SRR1663261 2 0.000 1.000 0.000 1.000
#> SRR1663265 2 0.000 1.000 0.000 1.000
#> SRR1663266 2 0.000 1.000 0.000 1.000
#> SRR1663267 1 0.722 0.750 0.800 0.200
#> SRR1663264 2 0.000 1.000 0.000 1.000
#> SRR1663268 2 0.000 1.000 0.000 1.000
#> SRR1663269 2 0.000 1.000 0.000 1.000
#> SRR1663271 2 0.000 1.000 0.000 1.000
#> SRR1663270 2 0.000 1.000 0.000 1.000
#> SRR1663273 2 0.000 1.000 0.000 1.000
#> SRR1663272 2 0.000 1.000 0.000 1.000
#> SRR1663275 2 0.000 1.000 0.000 1.000
#> SRR1663274 1 0.000 0.987 1.000 0.000
#> SRR1663276 1 0.000 0.987 1.000 0.000
#> SRR1663277 1 0.000 0.987 1.000 0.000
#> SRR1663279 2 0.000 1.000 0.000 1.000
#> SRR1663278 2 0.000 1.000 0.000 1.000
#> SRR1663280 2 0.000 1.000 0.000 1.000
#> SRR1663281 2 0.000 1.000 0.000 1.000
#> SRR1663282 2 0.000 1.000 0.000 1.000
#> SRR1663283 1 0.000 0.987 1.000 0.000
#> SRR1663284 1 0.000 0.987 1.000 0.000
#> SRR1663286 2 0.000 1.000 0.000 1.000
#> SRR1663287 2 0.000 1.000 0.000 1.000
#> SRR1663288 2 0.000 1.000 0.000 1.000
#> SRR1663291 2 0.118 0.983 0.016 0.984
#> SRR1663289 2 0.000 1.000 0.000 1.000
#> SRR1663290 2 0.000 1.000 0.000 1.000
#> SRR1663285 2 0.000 1.000 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663213 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663211 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663212 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663214 2 0.4291 0.767 0.000 0.820 0.180
#> SRR1663215 2 0.4291 0.767 0.000 0.820 0.180
#> SRR1663216 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663217 1 0.2066 0.960 0.940 0.000 0.060
#> SRR1663218 1 0.2066 0.960 0.940 0.000 0.060
#> SRR1663219 1 0.4121 0.924 0.832 0.000 0.168
#> SRR1663220 1 0.4121 0.924 0.832 0.000 0.168
#> SRR1663221 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663222 2 0.4399 0.756 0.000 0.812 0.188
#> SRR1663224 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663225 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663226 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663223 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663229 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663231 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663232 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663227 1 0.2165 0.959 0.936 0.000 0.064
#> SRR1663228 1 0.2165 0.959 0.936 0.000 0.064
#> SRR1663230 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663235 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663233 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663236 1 0.0592 0.956 0.988 0.000 0.012
#> SRR1663237 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663238 3 0.4002 0.922 0.000 0.160 0.840
#> SRR1663234 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663240 3 0.4291 0.930 0.000 0.180 0.820
#> SRR1663239 2 0.4291 0.767 0.000 0.820 0.180
#> SRR1663241 1 0.0592 0.956 0.988 0.000 0.012
#> SRR1663242 2 0.4399 0.757 0.000 0.812 0.188
#> SRR1663243 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663244 3 0.4291 0.930 0.000 0.180 0.820
#> SRR1663246 3 0.4291 0.930 0.000 0.180 0.820
#> SRR1663245 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663247 1 0.0592 0.956 0.988 0.000 0.012
#> SRR1663248 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663250 3 0.4291 0.930 0.000 0.180 0.820
#> SRR1663249 3 0.4291 0.930 0.000 0.180 0.820
#> SRR1663251 1 0.0592 0.956 0.988 0.000 0.012
#> SRR1663252 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663253 2 0.4702 0.716 0.000 0.788 0.212
#> SRR1663254 1 0.2261 0.958 0.932 0.000 0.068
#> SRR1663255 2 0.4555 0.737 0.000 0.800 0.200
#> SRR1663256 3 0.4178 0.930 0.000 0.172 0.828
#> SRR1663259 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663258 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663257 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663263 3 0.4555 0.914 0.000 0.200 0.800
#> SRR1663260 2 0.4452 0.750 0.000 0.808 0.192
#> SRR1663262 3 0.4452 0.921 0.000 0.192 0.808
#> SRR1663261 3 0.3965 0.896 0.008 0.132 0.860
#> SRR1663265 2 0.3038 0.853 0.000 0.896 0.104
#> SRR1663266 3 0.5926 0.677 0.000 0.356 0.644
#> SRR1663267 3 0.0592 0.693 0.012 0.000 0.988
#> SRR1663264 3 0.6026 0.633 0.000 0.376 0.624
#> SRR1663268 2 0.4399 0.756 0.000 0.812 0.188
#> SRR1663269 3 0.4178 0.930 0.000 0.172 0.828
#> SRR1663271 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663270 3 0.4178 0.930 0.000 0.172 0.828
#> SRR1663273 3 0.3965 0.897 0.008 0.132 0.860
#> SRR1663272 3 0.4178 0.930 0.000 0.172 0.828
#> SRR1663275 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663274 1 0.0592 0.956 0.988 0.000 0.012
#> SRR1663276 1 0.1529 0.961 0.960 0.000 0.040
#> SRR1663277 1 0.1529 0.961 0.960 0.000 0.040
#> SRR1663279 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663278 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663280 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663281 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663282 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663283 1 0.2796 0.933 0.908 0.000 0.092
#> SRR1663284 1 0.2796 0.933 0.908 0.000 0.092
#> SRR1663286 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663287 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663288 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663291 3 0.3207 0.832 0.012 0.084 0.904
#> SRR1663289 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663290 2 0.0000 0.946 0.000 1.000 0.000
#> SRR1663285 2 0.4291 0.767 0.000 0.820 0.180
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663210 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663213 2 0.4605 0.634 0.000 0.664 0.336 0.000
#> SRR1663211 2 0.0895 0.821 0.000 0.976 0.004 0.020
#> SRR1663212 2 0.0895 0.821 0.000 0.976 0.004 0.020
#> SRR1663214 3 0.4883 0.500 0.000 0.288 0.696 0.016
#> SRR1663215 3 0.4748 0.534 0.000 0.268 0.716 0.016
#> SRR1663216 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663217 1 0.0524 0.800 0.988 0.000 0.004 0.008
#> SRR1663218 1 0.0524 0.800 0.988 0.000 0.004 0.008
#> SRR1663219 1 0.5007 0.513 0.636 0.000 0.008 0.356
#> SRR1663220 1 0.5007 0.513 0.636 0.000 0.008 0.356
#> SRR1663221 2 0.1211 0.826 0.000 0.960 0.040 0.000
#> SRR1663222 3 0.4040 0.552 0.000 0.248 0.752 0.000
#> SRR1663224 2 0.4679 0.622 0.000 0.648 0.352 0.000
#> SRR1663225 2 0.1624 0.821 0.000 0.952 0.028 0.020
#> SRR1663226 2 0.2174 0.816 0.000 0.928 0.052 0.020
#> SRR1663223 2 0.1118 0.826 0.000 0.964 0.036 0.000
#> SRR1663229 2 0.0188 0.825 0.000 0.996 0.000 0.004
#> SRR1663231 2 0.4936 0.602 0.000 0.624 0.372 0.004
#> SRR1663232 2 0.5016 0.562 0.000 0.600 0.396 0.004
#> SRR1663227 1 0.1211 0.799 0.960 0.000 0.000 0.040
#> SRR1663228 1 0.1211 0.799 0.960 0.000 0.000 0.040
#> SRR1663230 2 0.2814 0.793 0.000 0.868 0.132 0.000
#> SRR1663235 2 0.4606 0.679 0.000 0.724 0.264 0.012
#> SRR1663233 2 0.1211 0.826 0.000 0.960 0.040 0.000
#> SRR1663236 1 0.4248 0.758 0.768 0.000 0.012 0.220
#> SRR1663237 2 0.2142 0.816 0.000 0.928 0.056 0.016
#> SRR1663238 3 0.5523 0.215 0.000 0.024 0.596 0.380
#> SRR1663234 2 0.5487 0.547 0.000 0.580 0.400 0.020
#> SRR1663240 3 0.4678 0.472 0.000 0.024 0.744 0.232
#> SRR1663239 3 0.4606 0.532 0.000 0.264 0.724 0.012
#> SRR1663241 1 0.4248 0.758 0.768 0.000 0.012 0.220
#> SRR1663242 3 0.5403 0.319 0.000 0.348 0.628 0.024
#> SRR1663243 2 0.5460 0.624 0.000 0.632 0.340 0.028
#> SRR1663244 3 0.4574 0.486 0.000 0.024 0.756 0.220
#> SRR1663246 3 0.3813 0.553 0.000 0.024 0.828 0.148
#> SRR1663245 2 0.4819 0.626 0.000 0.652 0.344 0.004
#> SRR1663247 1 0.4248 0.758 0.768 0.000 0.012 0.220
#> SRR1663248 2 0.5038 0.642 0.000 0.684 0.296 0.020
#> SRR1663250 3 0.4139 0.526 0.000 0.024 0.800 0.176
#> SRR1663249 3 0.3266 0.569 0.000 0.024 0.868 0.108
#> SRR1663251 1 0.4019 0.766 0.792 0.000 0.012 0.196
#> SRR1663252 2 0.5298 0.599 0.000 0.612 0.372 0.016
#> SRR1663253 3 0.3583 0.601 0.000 0.180 0.816 0.004
#> SRR1663254 1 0.1109 0.793 0.968 0.000 0.004 0.028
#> SRR1663255 3 0.3626 0.601 0.000 0.184 0.812 0.004
#> SRR1663256 3 0.4807 0.456 0.000 0.024 0.728 0.248
#> SRR1663259 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663258 2 0.5476 0.555 0.000 0.584 0.396 0.020
#> SRR1663257 2 0.0592 0.820 0.000 0.984 0.000 0.016
#> SRR1663263 3 0.4332 0.567 0.000 0.040 0.800 0.160
#> SRR1663260 3 0.3975 0.561 0.000 0.240 0.760 0.000
#> SRR1663262 3 0.4332 0.566 0.000 0.040 0.800 0.160
#> SRR1663261 3 0.5562 0.146 0.008 0.012 0.588 0.392
#> SRR1663265 3 0.5244 0.182 0.000 0.388 0.600 0.012
#> SRR1663266 3 0.5280 0.587 0.000 0.096 0.748 0.156
#> SRR1663267 4 0.5767 0.000 0.136 0.000 0.152 0.712
#> SRR1663264 3 0.2530 0.599 0.000 0.100 0.896 0.004
#> SRR1663268 3 0.3975 0.561 0.000 0.240 0.760 0.000
#> SRR1663269 3 0.5137 0.404 0.000 0.024 0.680 0.296
#> SRR1663271 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663270 3 0.3958 0.553 0.000 0.024 0.816 0.160
#> SRR1663273 3 0.5453 0.200 0.000 0.020 0.592 0.388
#> SRR1663272 3 0.4983 0.422 0.000 0.024 0.704 0.272
#> SRR1663275 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663274 1 0.3529 0.775 0.836 0.000 0.012 0.152
#> SRR1663276 1 0.0376 0.801 0.992 0.000 0.004 0.004
#> SRR1663277 1 0.0376 0.801 0.992 0.000 0.004 0.004
#> SRR1663279 2 0.0188 0.824 0.000 0.996 0.000 0.004
#> SRR1663278 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663280 2 0.1211 0.826 0.000 0.960 0.040 0.000
#> SRR1663281 2 0.4790 0.580 0.000 0.620 0.380 0.000
#> SRR1663282 2 0.4790 0.580 0.000 0.620 0.380 0.000
#> SRR1663283 1 0.4992 0.507 0.524 0.000 0.000 0.476
#> SRR1663284 1 0.4992 0.507 0.524 0.000 0.000 0.476
#> SRR1663286 2 0.0000 0.826 0.000 1.000 0.000 0.000
#> SRR1663287 2 0.1211 0.826 0.000 0.960 0.040 0.000
#> SRR1663288 2 0.0188 0.825 0.000 0.996 0.000 0.004
#> SRR1663291 3 0.6270 -0.119 0.060 0.000 0.536 0.404
#> SRR1663289 2 0.1637 0.821 0.000 0.940 0.060 0.000
#> SRR1663290 2 0.1637 0.821 0.000 0.940 0.060 0.000
#> SRR1663285 3 0.4748 0.534 0.000 0.268 0.716 0.016
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0162 0.8351 0.004 0.996 0.000 0.000 0.000
#> SRR1663210 2 0.0162 0.8351 0.004 0.996 0.000 0.000 0.000
#> SRR1663213 3 0.5843 0.2818 0.124 0.304 0.572 0.000 0.000
#> SRR1663211 2 0.4455 0.7508 0.136 0.776 0.076 0.000 0.012
#> SRR1663212 2 0.4455 0.7508 0.136 0.776 0.076 0.000 0.012
#> SRR1663214 3 0.6689 0.3437 0.156 0.056 0.596 0.000 0.192
#> SRR1663215 3 0.6629 0.3392 0.156 0.052 0.600 0.000 0.192
#> SRR1663216 2 0.0000 0.8352 0.000 1.000 0.000 0.000 0.000
#> SRR1663217 4 0.1117 0.6436 0.020 0.000 0.000 0.964 0.016
#> SRR1663218 4 0.1117 0.6436 0.020 0.000 0.000 0.964 0.016
#> SRR1663219 4 0.5024 -0.6250 0.440 0.000 0.000 0.528 0.032
#> SRR1663220 4 0.5024 -0.6250 0.440 0.000 0.000 0.528 0.032
#> SRR1663221 2 0.2464 0.8044 0.016 0.888 0.096 0.000 0.000
#> SRR1663222 3 0.2719 0.4523 0.000 0.048 0.884 0.000 0.068
#> SRR1663224 3 0.5064 0.4458 0.088 0.232 0.680 0.000 0.000
#> SRR1663225 2 0.5086 0.6632 0.156 0.700 0.144 0.000 0.000
#> SRR1663226 2 0.5125 0.6579 0.156 0.696 0.148 0.000 0.000
#> SRR1663223 2 0.2519 0.8043 0.016 0.884 0.100 0.000 0.000
#> SRR1663229 2 0.0290 0.8344 0.008 0.992 0.000 0.000 0.000
#> SRR1663231 3 0.4679 0.4710 0.068 0.216 0.716 0.000 0.000
#> SRR1663232 3 0.4709 0.4914 0.068 0.200 0.728 0.000 0.004
#> SRR1663227 4 0.0798 0.6426 0.008 0.000 0.000 0.976 0.016
#> SRR1663228 4 0.0798 0.6426 0.008 0.000 0.000 0.976 0.016
#> SRR1663230 2 0.4770 0.5283 0.036 0.644 0.320 0.000 0.000
#> SRR1663235 2 0.6352 0.0742 0.164 0.456 0.380 0.000 0.000
#> SRR1663233 2 0.2189 0.8114 0.012 0.904 0.084 0.000 0.000
#> SRR1663236 4 0.5017 0.4784 0.196 0.000 0.012 0.716 0.076
#> SRR1663237 2 0.5271 0.6314 0.152 0.680 0.168 0.000 0.000
#> SRR1663238 5 0.3010 0.6522 0.004 0.000 0.172 0.000 0.824
#> SRR1663234 3 0.4634 0.5015 0.072 0.184 0.740 0.000 0.004
#> SRR1663240 3 0.4297 -0.3924 0.000 0.000 0.528 0.000 0.472
#> SRR1663239 3 0.6406 0.3707 0.152 0.056 0.632 0.000 0.160
#> SRR1663241 4 0.5017 0.4784 0.196 0.000 0.012 0.716 0.076
#> SRR1663242 3 0.6878 0.4000 0.176 0.084 0.592 0.000 0.148
#> SRR1663243 3 0.6590 0.2028 0.216 0.288 0.492 0.000 0.004
#> SRR1663244 3 0.4287 -0.3703 0.000 0.000 0.540 0.000 0.460
#> SRR1663246 3 0.4446 -0.3619 0.004 0.000 0.520 0.000 0.476
#> SRR1663245 3 0.5907 0.3335 0.124 0.284 0.588 0.000 0.004
#> SRR1663247 4 0.5017 0.4784 0.196 0.000 0.012 0.716 0.076
#> SRR1663248 2 0.6413 0.0230 0.172 0.432 0.396 0.000 0.000
#> SRR1663250 3 0.4278 -0.3533 0.000 0.000 0.548 0.000 0.452
#> SRR1663249 3 0.4088 -0.1698 0.000 0.000 0.632 0.000 0.368
#> SRR1663251 4 0.4776 0.5088 0.168 0.000 0.012 0.744 0.076
#> SRR1663252 3 0.4679 0.4710 0.068 0.216 0.716 0.000 0.000
#> SRR1663253 3 0.2429 0.4253 0.004 0.020 0.900 0.000 0.076
#> SRR1663254 4 0.1485 0.6360 0.020 0.000 0.000 0.948 0.032
#> SRR1663255 3 0.2300 0.4293 0.000 0.024 0.904 0.000 0.072
#> SRR1663256 3 0.4306 -0.4338 0.000 0.000 0.508 0.000 0.492
#> SRR1663259 2 0.0451 0.8343 0.004 0.988 0.008 0.000 0.000
#> SRR1663258 3 0.4677 0.4951 0.068 0.196 0.732 0.000 0.004
#> SRR1663257 2 0.2270 0.8078 0.076 0.904 0.020 0.000 0.000
#> SRR1663263 3 0.6332 -0.2017 0.136 0.004 0.436 0.000 0.424
#> SRR1663260 3 0.3027 0.4486 0.012 0.040 0.876 0.000 0.072
#> SRR1663262 3 0.6304 -0.2144 0.132 0.004 0.432 0.000 0.432
#> SRR1663261 5 0.3992 0.6224 0.012 0.000 0.268 0.000 0.720
#> SRR1663265 3 0.6712 0.4595 0.164 0.116 0.616 0.000 0.104
#> SRR1663266 3 0.6439 -0.1946 0.136 0.008 0.432 0.000 0.424
#> SRR1663267 5 0.5492 -0.1133 0.404 0.000 0.004 0.056 0.536
#> SRR1663264 3 0.3047 0.3096 0.004 0.004 0.832 0.000 0.160
#> SRR1663268 3 0.2792 0.4447 0.004 0.040 0.884 0.000 0.072
#> SRR1663269 5 0.4210 0.4873 0.000 0.000 0.412 0.000 0.588
#> SRR1663271 2 0.0404 0.8346 0.012 0.988 0.000 0.000 0.000
#> SRR1663270 5 0.6162 0.0947 0.132 0.000 0.428 0.000 0.440
#> SRR1663273 5 0.2929 0.6457 0.008 0.000 0.152 0.000 0.840
#> SRR1663272 5 0.4294 0.4221 0.000 0.000 0.468 0.000 0.532
#> SRR1663275 2 0.0000 0.8352 0.000 1.000 0.000 0.000 0.000
#> SRR1663274 4 0.3810 0.5708 0.084 0.000 0.012 0.828 0.076
#> SRR1663276 4 0.1117 0.6436 0.020 0.000 0.000 0.964 0.016
#> SRR1663277 4 0.1117 0.6436 0.020 0.000 0.000 0.964 0.016
#> SRR1663279 2 0.0807 0.8338 0.012 0.976 0.012 0.000 0.000
#> SRR1663278 2 0.0693 0.8344 0.012 0.980 0.008 0.000 0.000
#> SRR1663280 2 0.2669 0.8037 0.020 0.876 0.104 0.000 0.000
#> SRR1663281 3 0.5107 0.4721 0.108 0.204 0.688 0.000 0.000
#> SRR1663282 3 0.5107 0.4721 0.108 0.204 0.688 0.000 0.000
#> SRR1663283 1 0.4192 1.0000 0.596 0.000 0.000 0.404 0.000
#> SRR1663284 1 0.4192 1.0000 0.596 0.000 0.000 0.404 0.000
#> SRR1663286 2 0.0162 0.8351 0.004 0.996 0.000 0.000 0.000
#> SRR1663287 2 0.2464 0.8044 0.016 0.888 0.096 0.000 0.000
#> SRR1663288 2 0.0290 0.8344 0.008 0.992 0.000 0.000 0.000
#> SRR1663291 5 0.4605 0.6308 0.020 0.000 0.176 0.048 0.756
#> SRR1663289 2 0.3141 0.7663 0.016 0.832 0.152 0.000 0.000
#> SRR1663290 2 0.3141 0.7663 0.016 0.832 0.152 0.000 0.000
#> SRR1663285 3 0.6629 0.3392 0.156 0.052 0.600 0.000 0.192
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0436 0.808 0.000 0.988 0.000 0.004 0.004 0.004
#> SRR1663210 2 0.0436 0.808 0.000 0.988 0.000 0.004 0.004 0.004
#> SRR1663213 4 0.5597 0.457 0.000 0.188 0.016 0.648 0.128 0.020
#> SRR1663211 2 0.6972 0.519 0.000 0.552 0.040 0.100 0.200 0.108
#> SRR1663212 2 0.6972 0.519 0.000 0.552 0.040 0.100 0.200 0.108
#> SRR1663214 5 0.5185 0.726 0.000 0.028 0.072 0.264 0.636 0.000
#> SRR1663215 5 0.5185 0.726 0.000 0.028 0.072 0.264 0.636 0.000
#> SRR1663216 2 0.0146 0.808 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663217 1 0.1679 0.666 0.936 0.000 0.016 0.012 0.000 0.036
#> SRR1663218 1 0.1679 0.666 0.936 0.000 0.016 0.012 0.000 0.036
#> SRR1663219 6 0.5490 0.554 0.440 0.000 0.020 0.004 0.060 0.476
#> SRR1663220 6 0.5490 0.554 0.440 0.000 0.020 0.004 0.060 0.476
#> SRR1663221 2 0.2696 0.758 0.000 0.856 0.000 0.116 0.028 0.000
#> SRR1663222 4 0.4342 0.434 0.000 0.016 0.088 0.760 0.132 0.004
#> SRR1663224 4 0.3613 0.597 0.000 0.096 0.000 0.804 0.096 0.004
#> SRR1663225 2 0.6640 0.390 0.000 0.536 0.024 0.256 0.136 0.048
#> SRR1663226 2 0.6672 0.372 0.000 0.528 0.024 0.264 0.136 0.048
#> SRR1663223 2 0.2629 0.772 0.000 0.868 0.000 0.092 0.040 0.000
#> SRR1663229 2 0.0653 0.806 0.000 0.980 0.000 0.004 0.012 0.004
#> SRR1663231 4 0.1806 0.631 0.000 0.088 0.004 0.908 0.000 0.000
#> SRR1663232 4 0.1866 0.630 0.000 0.084 0.008 0.908 0.000 0.000
#> SRR1663227 1 0.2357 0.665 0.904 0.000 0.052 0.008 0.028 0.008
#> SRR1663228 1 0.2357 0.665 0.904 0.000 0.052 0.008 0.028 0.008
#> SRR1663230 2 0.4356 0.223 0.000 0.548 0.000 0.432 0.016 0.004
#> SRR1663235 4 0.6805 0.164 0.000 0.372 0.024 0.412 0.164 0.028
#> SRR1663233 2 0.2301 0.771 0.000 0.884 0.000 0.096 0.020 0.000
#> SRR1663236 1 0.5078 0.538 0.584 0.000 0.004 0.000 0.084 0.328
#> SRR1663237 2 0.6700 0.270 0.000 0.488 0.024 0.324 0.116 0.048
#> SRR1663238 3 0.3226 0.499 0.000 0.000 0.836 0.028 0.116 0.020
#> SRR1663234 4 0.2465 0.624 0.000 0.072 0.004 0.892 0.024 0.008
#> SRR1663240 3 0.5204 0.709 0.000 0.000 0.584 0.292 0.124 0.000
#> SRR1663239 5 0.5138 0.687 0.000 0.032 0.052 0.296 0.620 0.000
#> SRR1663241 1 0.5078 0.538 0.584 0.000 0.004 0.000 0.084 0.328
#> SRR1663242 5 0.5061 0.615 0.000 0.040 0.036 0.304 0.620 0.000
#> SRR1663243 4 0.7128 0.305 0.000 0.204 0.024 0.456 0.264 0.052
#> SRR1663244 3 0.5357 0.678 0.000 0.000 0.536 0.340 0.124 0.000
#> SRR1663246 3 0.5356 0.665 0.000 0.000 0.584 0.248 0.168 0.000
#> SRR1663245 4 0.5854 0.374 0.000 0.176 0.016 0.576 0.228 0.004
#> SRR1663247 1 0.5078 0.538 0.584 0.000 0.004 0.000 0.084 0.328
#> SRR1663248 4 0.6948 0.166 0.000 0.356 0.024 0.404 0.184 0.032
#> SRR1663250 3 0.5395 0.659 0.000 0.000 0.520 0.356 0.124 0.000
#> SRR1663249 3 0.5475 0.567 0.000 0.000 0.460 0.416 0.124 0.000
#> SRR1663251 1 0.4924 0.577 0.636 0.000 0.004 0.000 0.092 0.268
#> SRR1663252 4 0.2062 0.631 0.000 0.088 0.004 0.900 0.008 0.000
#> SRR1663253 4 0.4085 0.401 0.000 0.000 0.120 0.752 0.128 0.000
#> SRR1663254 1 0.2940 0.634 0.872 0.000 0.068 0.016 0.008 0.036
#> SRR1663255 4 0.4124 0.396 0.000 0.000 0.120 0.748 0.132 0.000
#> SRR1663256 3 0.5222 0.709 0.000 0.000 0.584 0.288 0.128 0.000
#> SRR1663259 2 0.0405 0.807 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR1663258 4 0.2395 0.626 0.000 0.072 0.012 0.896 0.016 0.004
#> SRR1663257 2 0.4478 0.694 0.000 0.776 0.024 0.040 0.116 0.044
#> SRR1663263 5 0.5275 0.572 0.000 0.000 0.304 0.112 0.580 0.004
#> SRR1663260 4 0.4050 0.450 0.000 0.012 0.108 0.776 0.104 0.000
#> SRR1663262 5 0.5289 0.566 0.000 0.000 0.308 0.112 0.576 0.004
#> SRR1663261 3 0.3024 0.556 0.000 0.000 0.844 0.116 0.008 0.032
#> SRR1663265 5 0.5195 0.278 0.000 0.048 0.012 0.448 0.488 0.004
#> SRR1663266 5 0.5474 0.599 0.000 0.004 0.284 0.128 0.580 0.004
#> SRR1663267 6 0.6207 0.429 0.072 0.000 0.408 0.004 0.064 0.452
#> SRR1663264 4 0.4736 0.265 0.000 0.000 0.156 0.680 0.164 0.000
#> SRR1663268 4 0.4303 0.420 0.000 0.012 0.108 0.752 0.128 0.000
#> SRR1663269 3 0.5083 0.666 0.000 0.000 0.632 0.204 0.164 0.000
#> SRR1663271 2 0.0547 0.807 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR1663270 5 0.5266 0.556 0.000 0.000 0.312 0.108 0.576 0.004
#> SRR1663273 3 0.3318 0.440 0.000 0.000 0.824 0.024 0.132 0.020
#> SRR1663272 3 0.5173 0.709 0.000 0.000 0.596 0.276 0.128 0.000
#> SRR1663275 2 0.0291 0.809 0.000 0.992 0.000 0.004 0.000 0.004
#> SRR1663274 1 0.4032 0.636 0.764 0.000 0.004 0.000 0.092 0.140
#> SRR1663276 1 0.1773 0.666 0.932 0.000 0.016 0.016 0.000 0.036
#> SRR1663277 1 0.1773 0.666 0.932 0.000 0.016 0.016 0.000 0.036
#> SRR1663279 2 0.0858 0.804 0.000 0.968 0.000 0.004 0.028 0.000
#> SRR1663278 2 0.0777 0.806 0.000 0.972 0.000 0.004 0.024 0.000
#> SRR1663280 2 0.2542 0.776 0.000 0.876 0.000 0.080 0.044 0.000
#> SRR1663281 4 0.3642 0.587 0.000 0.080 0.000 0.800 0.116 0.004
#> SRR1663282 4 0.3642 0.587 0.000 0.080 0.000 0.800 0.116 0.004
#> SRR1663283 6 0.3126 0.570 0.248 0.000 0.000 0.000 0.000 0.752
#> SRR1663284 6 0.3126 0.570 0.248 0.000 0.000 0.000 0.000 0.752
#> SRR1663286 2 0.0146 0.808 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1663287 2 0.2573 0.761 0.000 0.864 0.000 0.112 0.024 0.000
#> SRR1663288 2 0.0653 0.806 0.000 0.980 0.000 0.004 0.012 0.004
#> SRR1663291 3 0.3249 0.487 0.028 0.000 0.864 0.044 0.024 0.040
#> SRR1663289 2 0.3580 0.677 0.000 0.772 0.000 0.196 0.028 0.004
#> SRR1663290 2 0.3580 0.677 0.000 0.772 0.000 0.196 0.028 0.004
#> SRR1663285 5 0.5165 0.726 0.000 0.028 0.072 0.260 0.640 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 17717 rows and 83 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.961 0.984 0.4020 0.594 0.594
#> 3 3 0.879 0.921 0.964 0.5565 0.719 0.545
#> 4 4 0.735 0.716 0.860 0.1436 0.919 0.783
#> 5 5 0.823 0.830 0.898 0.0846 0.880 0.630
#> 6 6 0.762 0.719 0.819 0.0397 0.984 0.932
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
#> SRR1663209 2 0.000 0.991 0.000 1.000
#> SRR1663210 2 0.000 0.991 0.000 1.000
#> SRR1663213 2 0.000 0.991 0.000 1.000
#> SRR1663211 2 0.000 0.991 0.000 1.000
#> SRR1663212 2 0.000 0.991 0.000 1.000
#> SRR1663214 2 0.000 0.991 0.000 1.000
#> SRR1663215 2 0.000 0.991 0.000 1.000
#> SRR1663216 2 0.000 0.991 0.000 1.000
#> SRR1663217 1 0.000 0.962 1.000 0.000
#> SRR1663218 1 0.000 0.962 1.000 0.000
#> SRR1663219 1 0.000 0.962 1.000 0.000
#> SRR1663220 1 0.000 0.962 1.000 0.000
#> SRR1663221 2 0.000 0.991 0.000 1.000
#> SRR1663222 2 0.000 0.991 0.000 1.000
#> SRR1663224 2 0.000 0.991 0.000 1.000
#> SRR1663225 2 0.000 0.991 0.000 1.000
#> SRR1663226 2 0.000 0.991 0.000 1.000
#> SRR1663223 2 0.000 0.991 0.000 1.000
#> SRR1663229 2 0.000 0.991 0.000 1.000
#> SRR1663231 2 0.000 0.991 0.000 1.000
#> SRR1663232 2 0.000 0.991 0.000 1.000
#> SRR1663227 1 0.000 0.962 1.000 0.000
#> SRR1663228 1 0.000 0.962 1.000 0.000
#> SRR1663230 2 0.000 0.991 0.000 1.000
#> SRR1663235 2 0.000 0.991 0.000 1.000
#> SRR1663233 2 0.000 0.991 0.000 1.000
#> SRR1663236 1 0.000 0.962 1.000 0.000
#> SRR1663237 2 0.000 0.991 0.000 1.000
#> SRR1663238 1 0.714 0.759 0.804 0.196
#> SRR1663234 2 0.000 0.991 0.000 1.000
#> SRR1663240 1 0.904 0.556 0.680 0.320
#> SRR1663239 2 0.000 0.991 0.000 1.000
#> SRR1663241 1 0.000 0.962 1.000 0.000
#> SRR1663242 2 0.000 0.991 0.000 1.000
#> SRR1663243 2 0.000 0.991 0.000 1.000
#> SRR1663244 2 0.000 0.991 0.000 1.000
#> SRR1663246 2 0.506 0.862 0.112 0.888
#> SRR1663245 2 0.000 0.991 0.000 1.000
#> SRR1663247 1 0.000 0.962 1.000 0.000
#> SRR1663248 2 0.000 0.991 0.000 1.000
#> SRR1663250 2 0.000 0.991 0.000 1.000
#> SRR1663249 2 0.000 0.991 0.000 1.000
#> SRR1663251 1 0.000 0.962 1.000 0.000
#> SRR1663252 2 0.000 0.991 0.000 1.000
#> SRR1663253 2 0.000 0.991 0.000 1.000
#> SRR1663254 1 0.000 0.962 1.000 0.000
#> SRR1663255 2 0.000 0.991 0.000 1.000
#> SRR1663256 2 0.000 0.991 0.000 1.000
#> SRR1663259 2 0.000 0.991 0.000 1.000
#> SRR1663258 2 0.000 0.991 0.000 1.000
#> SRR1663257 2 0.000 0.991 0.000 1.000
#> SRR1663263 2 0.000 0.991 0.000 1.000
#> SRR1663260 2 0.000 0.991 0.000 1.000
#> SRR1663262 2 0.000 0.991 0.000 1.000
#> SRR1663261 1 0.000 0.962 1.000 0.000
#> SRR1663265 2 0.000 0.991 0.000 1.000
#> SRR1663266 2 0.000 0.991 0.000 1.000
#> SRR1663267 1 0.000 0.962 1.000 0.000
#> SRR1663264 2 0.000 0.991 0.000 1.000
#> SRR1663268 2 0.000 0.991 0.000 1.000
#> SRR1663269 1 0.881 0.596 0.700 0.300
#> SRR1663271 2 0.000 0.991 0.000 1.000
#> SRR1663270 2 0.000 0.991 0.000 1.000
#> SRR1663273 1 0.000 0.962 1.000 0.000
#> SRR1663272 2 0.971 0.286 0.400 0.600
#> SRR1663275 2 0.000 0.991 0.000 1.000
#> SRR1663274 1 0.000 0.962 1.000 0.000
#> SRR1663276 1 0.000 0.962 1.000 0.000
#> SRR1663277 1 0.000 0.962 1.000 0.000
#> SRR1663279 2 0.000 0.991 0.000 1.000
#> SRR1663278 2 0.000 0.991 0.000 1.000
#> SRR1663280 2 0.000 0.991 0.000 1.000
#> SRR1663281 2 0.000 0.991 0.000 1.000
#> SRR1663282 2 0.000 0.991 0.000 1.000
#> SRR1663283 1 0.000 0.962 1.000 0.000
#> SRR1663284 1 0.000 0.962 1.000 0.000
#> SRR1663286 2 0.000 0.991 0.000 1.000
#> SRR1663287 2 0.000 0.991 0.000 1.000
#> SRR1663288 2 0.000 0.991 0.000 1.000
#> SRR1663291 1 0.000 0.962 1.000 0.000
#> SRR1663289 2 0.000 0.991 0.000 1.000
#> SRR1663290 2 0.000 0.991 0.000 1.000
#> SRR1663285 2 0.000 0.991 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663213 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663211 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663212 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663214 3 0.5650 0.667 0.000 0.312 0.688
#> SRR1663215 3 0.5650 0.667 0.000 0.312 0.688
#> SRR1663216 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663217 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663218 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663219 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663220 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663221 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663222 3 0.5650 0.667 0.000 0.312 0.688
#> SRR1663224 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663225 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663226 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663223 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663229 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663231 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663232 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663227 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663228 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663230 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663235 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663233 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663236 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663237 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663238 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663234 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663240 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663239 3 0.5650 0.667 0.000 0.312 0.688
#> SRR1663241 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663242 2 0.6026 0.251 0.000 0.624 0.376
#> SRR1663243 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663244 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663246 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663245 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663247 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663248 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663250 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663249 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663251 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663252 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663253 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663254 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663255 3 0.2537 0.835 0.000 0.080 0.920
#> SRR1663256 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663259 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663258 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663257 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663263 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663260 3 0.5650 0.667 0.000 0.312 0.688
#> SRR1663262 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663261 1 0.5650 0.599 0.688 0.000 0.312
#> SRR1663265 2 0.0747 0.971 0.000 0.984 0.016
#> SRR1663266 3 0.1964 0.847 0.000 0.056 0.944
#> SRR1663267 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663264 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663268 3 0.5650 0.667 0.000 0.312 0.688
#> SRR1663269 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663271 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663270 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663273 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663272 3 0.0000 0.868 0.000 0.000 1.000
#> SRR1663275 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663274 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663276 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663277 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663279 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663278 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663280 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663281 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663282 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663283 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663284 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663286 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663287 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663288 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663291 1 0.0000 0.983 1.000 0.000 0.000
#> SRR1663289 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663290 2 0.0000 0.988 0.000 1.000 0.000
#> SRR1663285 3 0.5650 0.667 0.000 0.312 0.688
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663210 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663213 2 0.0921 0.871 0.000 0.972 0.028 0.000
#> SRR1663211 2 0.0188 0.879 0.000 0.996 0.004 0.000
#> SRR1663212 2 0.0188 0.879 0.000 0.996 0.004 0.000
#> SRR1663214 3 0.4356 0.614 0.000 0.148 0.804 0.048
#> SRR1663215 3 0.4356 0.614 0.000 0.148 0.804 0.048
#> SRR1663216 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663217 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663218 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663219 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663221 2 0.1557 0.862 0.000 0.944 0.056 0.000
#> SRR1663222 3 0.5151 0.193 0.000 0.004 0.532 0.464
#> SRR1663224 2 0.5917 0.329 0.000 0.520 0.444 0.036
#> SRR1663225 2 0.0188 0.879 0.000 0.996 0.004 0.000
#> SRR1663226 2 0.0188 0.879 0.000 0.996 0.004 0.000
#> SRR1663223 2 0.0817 0.874 0.000 0.976 0.024 0.000
#> SRR1663229 2 0.0188 0.879 0.000 0.996 0.004 0.000
#> SRR1663231 2 0.6941 0.507 0.000 0.588 0.220 0.192
#> SRR1663232 2 0.7074 0.478 0.000 0.568 0.240 0.192
#> SRR1663227 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663228 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663230 2 0.2973 0.805 0.000 0.856 0.144 0.000
#> SRR1663235 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663233 2 0.1637 0.860 0.000 0.940 0.060 0.000
#> SRR1663236 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663237 2 0.0336 0.878 0.000 0.992 0.008 0.000
#> SRR1663238 4 0.3528 0.674 0.000 0.000 0.192 0.808
#> SRR1663234 2 0.6500 0.486 0.000 0.580 0.328 0.092
#> SRR1663240 4 0.0336 0.753 0.000 0.000 0.008 0.992
#> SRR1663239 3 0.4046 0.613 0.000 0.124 0.828 0.048
#> SRR1663241 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663242 3 0.4417 0.606 0.000 0.160 0.796 0.044
#> SRR1663243 2 0.0707 0.872 0.000 0.980 0.020 0.000
#> SRR1663244 4 0.0817 0.740 0.000 0.000 0.024 0.976
#> SRR1663246 4 0.3528 0.674 0.000 0.000 0.192 0.808
#> SRR1663245 2 0.4500 0.494 0.000 0.684 0.316 0.000
#> SRR1663247 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663248 2 0.0188 0.878 0.000 0.996 0.004 0.000
#> SRR1663250 4 0.0592 0.743 0.000 0.000 0.016 0.984
#> SRR1663249 4 0.0817 0.739 0.000 0.000 0.024 0.976
#> SRR1663251 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663252 2 0.6816 0.527 0.000 0.604 0.212 0.184
#> SRR1663253 3 0.4985 0.187 0.000 0.000 0.532 0.468
#> SRR1663254 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663255 3 0.4985 0.187 0.000 0.000 0.532 0.468
#> SRR1663256 4 0.0469 0.754 0.000 0.000 0.012 0.988
#> SRR1663259 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663258 2 0.6788 0.528 0.000 0.608 0.204 0.188
#> SRR1663257 2 0.0188 0.879 0.000 0.996 0.004 0.000
#> SRR1663263 3 0.3764 0.511 0.000 0.000 0.784 0.216
#> SRR1663260 3 0.5147 0.199 0.000 0.004 0.536 0.460
#> SRR1663262 3 0.3764 0.511 0.000 0.000 0.784 0.216
#> SRR1663261 4 0.4250 0.517 0.276 0.000 0.000 0.724
#> SRR1663265 3 0.4507 0.555 0.000 0.224 0.756 0.020
#> SRR1663266 3 0.4267 0.539 0.000 0.024 0.788 0.188
#> SRR1663267 1 0.4981 0.171 0.536 0.000 0.000 0.464
#> SRR1663264 4 0.4994 -0.222 0.000 0.000 0.480 0.520
#> SRR1663268 3 0.5147 0.199 0.000 0.004 0.536 0.460
#> SRR1663269 4 0.3528 0.674 0.000 0.000 0.192 0.808
#> SRR1663271 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663270 3 0.3873 0.495 0.000 0.000 0.772 0.228
#> SRR1663273 4 0.4564 0.471 0.000 0.000 0.328 0.672
#> SRR1663272 4 0.0921 0.753 0.000 0.000 0.028 0.972
#> SRR1663275 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663274 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663276 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663277 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663279 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663278 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663280 2 0.0817 0.874 0.000 0.976 0.024 0.000
#> SRR1663281 2 0.4804 0.468 0.000 0.616 0.384 0.000
#> SRR1663282 2 0.4790 0.471 0.000 0.620 0.380 0.000
#> SRR1663283 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663284 1 0.0000 0.951 1.000 0.000 0.000 0.000
#> SRR1663286 2 0.0000 0.879 0.000 1.000 0.000 0.000
#> SRR1663287 2 0.1637 0.860 0.000 0.940 0.060 0.000
#> SRR1663288 2 0.0188 0.879 0.000 0.996 0.004 0.000
#> SRR1663291 1 0.4477 0.543 0.688 0.000 0.000 0.312
#> SRR1663289 2 0.2011 0.850 0.000 0.920 0.080 0.000
#> SRR1663290 2 0.2011 0.850 0.000 0.920 0.080 0.000
#> SRR1663285 3 0.4356 0.614 0.000 0.148 0.804 0.048
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0000 0.8855 0.000 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.8855 0.000 1.000 0.000 0.000 0.000
#> SRR1663213 2 0.1018 0.8819 0.016 0.968 0.000 0.000 0.016
#> SRR1663211 2 0.1043 0.8785 0.040 0.960 0.000 0.000 0.000
#> SRR1663212 2 0.1043 0.8785 0.040 0.960 0.000 0.000 0.000
#> SRR1663214 5 0.1267 0.9608 0.024 0.012 0.004 0.000 0.960
#> SRR1663215 5 0.1267 0.9608 0.024 0.012 0.004 0.000 0.960
#> SRR1663216 2 0.0290 0.8852 0.000 0.992 0.000 0.000 0.008
#> SRR1663217 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663218 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663219 4 0.2936 0.8955 0.008 0.000 0.096 0.872 0.024
#> SRR1663220 4 0.2936 0.8955 0.008 0.000 0.096 0.872 0.024
#> SRR1663221 2 0.3877 0.6964 0.212 0.764 0.000 0.000 0.024
#> SRR1663222 1 0.2378 0.7750 0.904 0.000 0.048 0.000 0.048
#> SRR1663224 1 0.3821 0.7563 0.800 0.148 0.000 0.000 0.052
#> SRR1663225 2 0.0880 0.8781 0.032 0.968 0.000 0.000 0.000
#> SRR1663226 2 0.0880 0.8781 0.032 0.968 0.000 0.000 0.000
#> SRR1663223 2 0.2171 0.8438 0.064 0.912 0.000 0.000 0.024
#> SRR1663229 2 0.0290 0.8848 0.008 0.992 0.000 0.000 0.000
#> SRR1663231 1 0.2286 0.8015 0.888 0.108 0.004 0.000 0.000
#> SRR1663232 1 0.2233 0.8018 0.892 0.104 0.004 0.000 0.000
#> SRR1663227 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663228 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663230 2 0.4528 0.1931 0.444 0.548 0.000 0.000 0.008
#> SRR1663235 2 0.0290 0.8851 0.008 0.992 0.000 0.000 0.000
#> SRR1663233 2 0.3757 0.7024 0.208 0.772 0.000 0.000 0.020
#> SRR1663236 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663237 2 0.1270 0.8729 0.052 0.948 0.000 0.000 0.000
#> SRR1663238 3 0.1444 0.8692 0.012 0.000 0.948 0.000 0.040
#> SRR1663234 1 0.2519 0.7980 0.884 0.100 0.000 0.000 0.016
#> SRR1663240 3 0.2505 0.8686 0.092 0.000 0.888 0.000 0.020
#> SRR1663239 5 0.1082 0.9580 0.028 0.008 0.000 0.000 0.964
#> SRR1663241 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663242 5 0.1173 0.9522 0.012 0.020 0.004 0.000 0.964
#> SRR1663243 2 0.1996 0.8521 0.032 0.928 0.004 0.000 0.036
#> SRR1663244 3 0.3381 0.8185 0.176 0.000 0.808 0.000 0.016
#> SRR1663246 3 0.2659 0.8686 0.052 0.000 0.888 0.000 0.060
#> SRR1663245 2 0.5190 0.0908 0.032 0.496 0.004 0.000 0.468
#> SRR1663247 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663248 2 0.0955 0.8797 0.028 0.968 0.000 0.000 0.004
#> SRR1663250 3 0.3183 0.8366 0.156 0.000 0.828 0.000 0.016
#> SRR1663249 3 0.3224 0.8336 0.160 0.000 0.824 0.000 0.016
#> SRR1663251 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663252 1 0.2329 0.7962 0.876 0.124 0.000 0.000 0.000
#> SRR1663253 1 0.2616 0.7398 0.880 0.000 0.100 0.000 0.020
#> SRR1663254 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663255 1 0.2853 0.7655 0.876 0.000 0.072 0.000 0.052
#> SRR1663256 3 0.2761 0.8643 0.104 0.000 0.872 0.000 0.024
#> SRR1663259 2 0.0000 0.8855 0.000 1.000 0.000 0.000 0.000
#> SRR1663258 1 0.2280 0.7972 0.880 0.120 0.000 0.000 0.000
#> SRR1663257 2 0.0794 0.8792 0.028 0.972 0.000 0.000 0.000
#> SRR1663263 5 0.1121 0.9524 0.000 0.000 0.044 0.000 0.956
#> SRR1663260 1 0.2853 0.7674 0.876 0.000 0.072 0.000 0.052
#> SRR1663262 5 0.1197 0.9508 0.000 0.000 0.048 0.000 0.952
#> SRR1663261 3 0.2060 0.8266 0.012 0.000 0.928 0.036 0.024
#> SRR1663265 5 0.1710 0.9268 0.016 0.040 0.004 0.000 0.940
#> SRR1663266 5 0.1197 0.9508 0.000 0.000 0.048 0.000 0.952
#> SRR1663267 3 0.3154 0.7728 0.012 0.000 0.860 0.104 0.024
#> SRR1663264 1 0.5277 0.4886 0.664 0.000 0.228 0.000 0.108
#> SRR1663268 1 0.2989 0.7656 0.868 0.000 0.072 0.000 0.060
#> SRR1663269 3 0.1522 0.8683 0.012 0.000 0.944 0.000 0.044
#> SRR1663271 2 0.0510 0.8836 0.000 0.984 0.000 0.000 0.016
#> SRR1663270 5 0.1197 0.9508 0.000 0.000 0.048 0.000 0.952
#> SRR1663273 3 0.1851 0.8345 0.000 0.000 0.912 0.000 0.088
#> SRR1663272 3 0.2344 0.8725 0.064 0.000 0.904 0.000 0.032
#> SRR1663275 2 0.0162 0.8855 0.000 0.996 0.000 0.000 0.004
#> SRR1663274 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663276 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663277 4 0.0000 0.9767 0.000 0.000 0.000 1.000 0.000
#> SRR1663279 2 0.0510 0.8836 0.000 0.984 0.000 0.000 0.016
#> SRR1663278 2 0.0404 0.8845 0.000 0.988 0.000 0.000 0.012
#> SRR1663280 2 0.2927 0.8219 0.060 0.872 0.000 0.000 0.068
#> SRR1663281 1 0.6738 0.3728 0.452 0.308 0.004 0.000 0.236
#> SRR1663282 1 0.6738 0.3728 0.452 0.308 0.004 0.000 0.236
#> SRR1663283 4 0.1697 0.9408 0.000 0.000 0.060 0.932 0.008
#> SRR1663284 4 0.1697 0.9408 0.000 0.000 0.060 0.932 0.008
#> SRR1663286 2 0.0162 0.8855 0.000 0.996 0.000 0.000 0.004
#> SRR1663287 2 0.3909 0.6890 0.216 0.760 0.000 0.000 0.024
#> SRR1663288 2 0.0404 0.8844 0.012 0.988 0.000 0.000 0.000
#> SRR1663291 3 0.4962 0.3911 0.012 0.000 0.632 0.332 0.024
#> SRR1663289 2 0.4419 0.5408 0.312 0.668 0.000 0.000 0.020
#> SRR1663290 2 0.4419 0.5408 0.312 0.668 0.000 0.000 0.020
#> SRR1663285 5 0.1173 0.9610 0.020 0.012 0.004 0.000 0.964
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0622 0.8302 0.000 0.980 0.000 0.008 0.000 0.012
#> SRR1663210 2 0.0622 0.8302 0.000 0.980 0.000 0.008 0.000 0.012
#> SRR1663213 2 0.2188 0.8219 0.000 0.912 0.000 0.036 0.032 0.020
#> SRR1663211 2 0.3980 0.7545 0.000 0.760 0.004 0.068 0.000 0.168
#> SRR1663212 2 0.3980 0.7545 0.000 0.760 0.004 0.068 0.000 0.168
#> SRR1663214 5 0.1053 0.9504 0.000 0.000 0.004 0.012 0.964 0.020
#> SRR1663215 5 0.1053 0.9504 0.000 0.000 0.004 0.012 0.964 0.020
#> SRR1663216 2 0.0363 0.8301 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR1663217 1 0.0790 0.8922 0.968 0.000 0.000 0.000 0.000 0.032
#> SRR1663218 1 0.0790 0.8922 0.968 0.000 0.000 0.000 0.000 0.032
#> SRR1663219 1 0.3907 0.4843 0.588 0.000 0.004 0.000 0.000 0.408
#> SRR1663220 1 0.3907 0.4843 0.588 0.000 0.004 0.000 0.000 0.408
#> SRR1663221 2 0.3183 0.7530 0.000 0.812 0.000 0.164 0.008 0.016
#> SRR1663222 4 0.3863 0.6419 0.000 0.000 0.228 0.740 0.016 0.016
#> SRR1663224 4 0.3674 0.6615 0.000 0.132 0.000 0.804 0.020 0.044
#> SRR1663225 2 0.4199 0.7075 0.000 0.704 0.004 0.044 0.000 0.248
#> SRR1663226 2 0.4199 0.7075 0.000 0.704 0.004 0.044 0.000 0.248
#> SRR1663223 2 0.3136 0.7868 0.000 0.844 0.000 0.108 0.020 0.028
#> SRR1663229 2 0.1844 0.8221 0.000 0.924 0.004 0.024 0.000 0.048
#> SRR1663231 4 0.2353 0.7120 0.000 0.032 0.032 0.904 0.000 0.032
#> SRR1663232 4 0.2277 0.7117 0.000 0.028 0.032 0.908 0.000 0.032
#> SRR1663227 1 0.0000 0.8939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663228 1 0.0000 0.8939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663230 2 0.4042 0.5507 0.000 0.664 0.000 0.316 0.004 0.016
#> SRR1663235 2 0.1564 0.8267 0.000 0.936 0.000 0.024 0.000 0.040
#> SRR1663233 2 0.3035 0.7594 0.000 0.828 0.000 0.148 0.008 0.016
#> SRR1663236 1 0.0000 0.8939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663237 2 0.4008 0.7648 0.000 0.768 0.004 0.100 0.000 0.128
#> SRR1663238 3 0.4167 0.2697 0.000 0.000 0.708 0.000 0.056 0.236
#> SRR1663234 4 0.3214 0.6817 0.000 0.068 0.008 0.840 0.000 0.084
#> SRR1663240 3 0.1493 0.6225 0.000 0.000 0.936 0.004 0.004 0.056
#> SRR1663239 5 0.1198 0.9487 0.000 0.004 0.004 0.012 0.960 0.020
#> SRR1663241 1 0.0000 0.8939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663242 5 0.1929 0.9088 0.000 0.008 0.004 0.016 0.924 0.048
#> SRR1663243 2 0.5817 0.6272 0.004 0.604 0.008 0.056 0.056 0.272
#> SRR1663244 3 0.1584 0.6184 0.000 0.000 0.928 0.064 0.000 0.008
#> SRR1663246 3 0.3068 0.5515 0.000 0.000 0.840 0.000 0.072 0.088
#> SRR1663245 2 0.6118 0.3405 0.000 0.524 0.004 0.056 0.332 0.084
#> SRR1663247 1 0.0000 0.8939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663248 2 0.4154 0.7280 0.000 0.740 0.004 0.036 0.012 0.208
#> SRR1663250 3 0.1007 0.6304 0.000 0.000 0.956 0.044 0.000 0.000
#> SRR1663249 3 0.1643 0.6110 0.000 0.000 0.924 0.068 0.000 0.008
#> SRR1663251 1 0.0000 0.8939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663252 4 0.2724 0.7126 0.000 0.064 0.032 0.880 0.000 0.024
#> SRR1663253 4 0.4570 0.5032 0.000 0.000 0.364 0.600 0.016 0.020
#> SRR1663254 1 0.1075 0.8856 0.952 0.000 0.000 0.000 0.000 0.048
#> SRR1663255 4 0.4495 0.5409 0.000 0.000 0.340 0.624 0.016 0.020
#> SRR1663256 3 0.0717 0.6354 0.000 0.000 0.976 0.016 0.000 0.008
#> SRR1663259 2 0.0603 0.8310 0.000 0.980 0.000 0.016 0.000 0.004
#> SRR1663258 4 0.2510 0.7125 0.000 0.060 0.024 0.892 0.000 0.024
#> SRR1663257 2 0.3621 0.7645 0.000 0.788 0.004 0.048 0.000 0.160
#> SRR1663263 5 0.0820 0.9485 0.000 0.000 0.012 0.000 0.972 0.016
#> SRR1663260 4 0.4649 0.5790 0.000 0.004 0.304 0.648 0.020 0.024
#> SRR1663262 5 0.0914 0.9477 0.000 0.000 0.016 0.000 0.968 0.016
#> SRR1663261 6 0.3847 0.7169 0.000 0.000 0.456 0.000 0.000 0.544
#> SRR1663265 5 0.2854 0.8562 0.000 0.056 0.004 0.016 0.876 0.048
#> SRR1663266 5 0.0914 0.9477 0.000 0.000 0.016 0.000 0.968 0.016
#> SRR1663267 6 0.4453 0.7992 0.032 0.000 0.400 0.000 0.000 0.568
#> SRR1663264 3 0.5672 -0.2641 0.000 0.000 0.472 0.420 0.084 0.024
#> SRR1663268 4 0.4666 0.5772 0.000 0.004 0.308 0.644 0.020 0.024
#> SRR1663269 3 0.4065 0.3273 0.000 0.000 0.724 0.000 0.056 0.220
#> SRR1663271 2 0.0748 0.8288 0.000 0.976 0.000 0.016 0.004 0.004
#> SRR1663270 5 0.0914 0.9477 0.000 0.000 0.016 0.000 0.968 0.016
#> SRR1663273 3 0.4585 0.0262 0.000 0.000 0.648 0.000 0.068 0.284
#> SRR1663272 3 0.2009 0.6064 0.000 0.000 0.908 0.000 0.024 0.068
#> SRR1663275 2 0.0260 0.8312 0.000 0.992 0.000 0.008 0.000 0.000
#> SRR1663274 1 0.0000 0.8939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1663276 1 0.0713 0.8927 0.972 0.000 0.000 0.000 0.000 0.028
#> SRR1663277 1 0.0790 0.8922 0.968 0.000 0.000 0.000 0.000 0.032
#> SRR1663279 2 0.0951 0.8292 0.000 0.968 0.000 0.020 0.008 0.004
#> SRR1663278 2 0.0951 0.8297 0.000 0.968 0.000 0.020 0.004 0.008
#> SRR1663280 2 0.3451 0.7832 0.000 0.832 0.000 0.092 0.048 0.028
#> SRR1663281 4 0.6773 0.4323 0.000 0.236 0.004 0.516 0.100 0.144
#> SRR1663282 4 0.6839 0.4009 0.000 0.252 0.004 0.500 0.100 0.144
#> SRR1663283 1 0.3244 0.7044 0.732 0.000 0.000 0.000 0.000 0.268
#> SRR1663284 1 0.3244 0.7044 0.732 0.000 0.000 0.000 0.000 0.268
#> SRR1663286 2 0.0508 0.8311 0.000 0.984 0.000 0.012 0.000 0.004
#> SRR1663287 2 0.3219 0.7424 0.000 0.808 0.000 0.168 0.008 0.016
#> SRR1663288 2 0.1693 0.8230 0.000 0.932 0.004 0.020 0.000 0.044
#> SRR1663291 6 0.5366 0.7151 0.132 0.000 0.320 0.000 0.000 0.548
#> SRR1663289 2 0.4136 0.6113 0.000 0.692 0.000 0.272 0.004 0.032
#> SRR1663290 2 0.4136 0.6113 0.000 0.692 0.000 0.272 0.004 0.032
#> SRR1663285 5 0.1053 0.9504 0.000 0.000 0.004 0.012 0.964 0.020
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.954 0.983 0.33763 0.643 0.643
#> 3 3 0.649 0.811 0.915 0.78911 0.669 0.510
#> 4 4 0.666 0.716 0.881 0.04797 0.929 0.827
#> 5 5 0.756 0.812 0.922 0.03617 0.971 0.922
#> 6 6 0.761 0.817 0.927 0.00365 0.998 0.995
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
#> SRR1663209 2 0.000 1.000 0.000 1.000
#> SRR1663210 2 0.000 1.000 0.000 1.000
#> SRR1663213 2 0.000 1.000 0.000 1.000
#> SRR1663211 2 0.000 1.000 0.000 1.000
#> SRR1663212 2 0.000 1.000 0.000 1.000
#> SRR1663214 2 0.000 1.000 0.000 1.000
#> SRR1663215 2 0.000 1.000 0.000 1.000
#> SRR1663216 2 0.000 1.000 0.000 1.000
#> SRR1663217 1 0.000 0.918 1.000 0.000
#> SRR1663218 1 0.000 0.918 1.000 0.000
#> SRR1663219 1 0.000 0.918 1.000 0.000
#> SRR1663220 1 0.000 0.918 1.000 0.000
#> SRR1663221 2 0.000 1.000 0.000 1.000
#> SRR1663222 2 0.000 1.000 0.000 1.000
#> SRR1663224 2 0.000 1.000 0.000 1.000
#> SRR1663225 2 0.000 1.000 0.000 1.000
#> SRR1663226 2 0.000 1.000 0.000 1.000
#> SRR1663223 2 0.000 1.000 0.000 1.000
#> SRR1663229 2 0.000 1.000 0.000 1.000
#> SRR1663231 2 0.000 1.000 0.000 1.000
#> SRR1663232 2 0.000 1.000 0.000 1.000
#> SRR1663227 1 0.000 0.918 1.000 0.000
#> SRR1663228 1 0.000 0.918 1.000 0.000
#> SRR1663230 2 0.000 1.000 0.000 1.000
#> SRR1663235 2 0.000 1.000 0.000 1.000
#> SRR1663233 2 0.000 1.000 0.000 1.000
#> SRR1663236 1 0.000 0.918 1.000 0.000
#> SRR1663237 2 0.000 1.000 0.000 1.000
#> SRR1663238 2 0.000 1.000 0.000 1.000
#> SRR1663234 2 0.000 1.000 0.000 1.000
#> SRR1663240 2 0.000 1.000 0.000 1.000
#> SRR1663239 2 0.000 1.000 0.000 1.000
#> SRR1663241 1 0.000 0.918 1.000 0.000
#> SRR1663242 2 0.000 1.000 0.000 1.000
#> SRR1663243 2 0.000 1.000 0.000 1.000
#> SRR1663244 2 0.000 1.000 0.000 1.000
#> SRR1663246 2 0.000 1.000 0.000 1.000
#> SRR1663245 2 0.000 1.000 0.000 1.000
#> SRR1663247 1 0.000 0.918 1.000 0.000
#> SRR1663248 2 0.000 1.000 0.000 1.000
#> SRR1663250 2 0.000 1.000 0.000 1.000
#> SRR1663249 2 0.000 1.000 0.000 1.000
#> SRR1663251 1 0.000 0.918 1.000 0.000
#> SRR1663252 2 0.000 1.000 0.000 1.000
#> SRR1663253 2 0.000 1.000 0.000 1.000
#> SRR1663254 1 0.000 0.918 1.000 0.000
#> SRR1663255 2 0.000 1.000 0.000 1.000
#> SRR1663256 2 0.000 1.000 0.000 1.000
#> SRR1663259 2 0.000 1.000 0.000 1.000
#> SRR1663258 2 0.000 1.000 0.000 1.000
#> SRR1663257 2 0.000 1.000 0.000 1.000
#> SRR1663263 2 0.000 1.000 0.000 1.000
#> SRR1663260 2 0.000 1.000 0.000 1.000
#> SRR1663262 2 0.000 1.000 0.000 1.000
#> SRR1663261 1 0.999 0.166 0.516 0.484
#> SRR1663265 2 0.000 1.000 0.000 1.000
#> SRR1663266 2 0.000 1.000 0.000 1.000
#> SRR1663267 1 0.999 0.179 0.520 0.480
#> SRR1663264 2 0.000 1.000 0.000 1.000
#> SRR1663268 2 0.000 1.000 0.000 1.000
#> SRR1663269 2 0.000 1.000 0.000 1.000
#> SRR1663271 2 0.000 1.000 0.000 1.000
#> SRR1663270 2 0.000 1.000 0.000 1.000
#> SRR1663273 2 0.000 1.000 0.000 1.000
#> SRR1663272 2 0.000 1.000 0.000 1.000
#> SRR1663275 2 0.000 1.000 0.000 1.000
#> SRR1663274 1 0.000 0.918 1.000 0.000
#> SRR1663276 1 0.000 0.918 1.000 0.000
#> SRR1663277 1 0.000 0.918 1.000 0.000
#> SRR1663279 2 0.000 1.000 0.000 1.000
#> SRR1663278 2 0.000 1.000 0.000 1.000
#> SRR1663280 2 0.000 1.000 0.000 1.000
#> SRR1663281 2 0.000 1.000 0.000 1.000
#> SRR1663282 2 0.000 1.000 0.000 1.000
#> SRR1663283 1 0.000 0.918 1.000 0.000
#> SRR1663284 1 0.000 0.918 1.000 0.000
#> SRR1663286 2 0.000 1.000 0.000 1.000
#> SRR1663287 2 0.000 1.000 0.000 1.000
#> SRR1663288 2 0.000 1.000 0.000 1.000
#> SRR1663291 1 0.999 0.179 0.520 0.480
#> SRR1663289 2 0.000 1.000 0.000 1.000
#> SRR1663290 2 0.000 1.000 0.000 1.000
#> SRR1663285 2 0.000 1.000 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663213 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663211 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663212 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663214 3 0.6299 0.3241 0.000 0.476 0.524
#> SRR1663215 3 0.6204 0.4498 0.000 0.424 0.576
#> SRR1663216 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663217 1 0.4605 0.7996 0.796 0.000 0.204
#> SRR1663218 1 0.4605 0.7996 0.796 0.000 0.204
#> SRR1663219 1 0.4605 0.7996 0.796 0.000 0.204
#> SRR1663220 1 0.4605 0.7996 0.796 0.000 0.204
#> SRR1663221 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663222 2 0.6140 0.2957 0.000 0.596 0.404
#> SRR1663224 2 0.3267 0.8519 0.000 0.884 0.116
#> SRR1663225 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663226 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663223 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663229 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663231 2 0.4504 0.7744 0.000 0.804 0.196
#> SRR1663232 2 0.4555 0.7698 0.000 0.800 0.200
#> SRR1663227 3 0.6095 0.2084 0.392 0.000 0.608
#> SRR1663228 3 0.5016 0.4911 0.240 0.000 0.760
#> SRR1663230 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663235 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663233 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663236 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663237 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663238 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663234 2 0.4555 0.7698 0.000 0.800 0.200
#> SRR1663240 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663239 2 0.0592 0.9243 0.000 0.988 0.012
#> SRR1663241 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663242 3 0.6126 0.3901 0.000 0.400 0.600
#> SRR1663243 2 0.2261 0.8887 0.000 0.932 0.068
#> SRR1663244 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663246 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663245 2 0.3412 0.8454 0.000 0.876 0.124
#> SRR1663247 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663248 2 0.4399 0.7832 0.000 0.812 0.188
#> SRR1663250 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663249 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663251 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663252 2 0.4555 0.7698 0.000 0.800 0.200
#> SRR1663253 3 0.4452 0.7255 0.000 0.192 0.808
#> SRR1663254 1 0.4605 0.7996 0.796 0.000 0.204
#> SRR1663255 3 0.4974 0.6987 0.000 0.236 0.764
#> SRR1663256 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663259 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663258 2 0.4555 0.7698 0.000 0.800 0.200
#> SRR1663257 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663263 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663260 3 0.5138 0.6804 0.000 0.252 0.748
#> SRR1663262 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663261 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663265 2 0.0592 0.9241 0.000 0.988 0.012
#> SRR1663266 3 0.4605 0.7193 0.000 0.204 0.796
#> SRR1663267 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663264 3 0.4887 0.7044 0.000 0.228 0.772
#> SRR1663268 3 0.4887 0.7044 0.000 0.228 0.772
#> SRR1663269 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663271 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663270 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663273 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663272 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663275 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663274 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663276 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663277 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663279 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663278 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663280 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663281 2 0.4504 0.7744 0.000 0.804 0.196
#> SRR1663282 2 0.4504 0.7744 0.000 0.804 0.196
#> SRR1663283 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663284 1 0.0000 0.9079 1.000 0.000 0.000
#> SRR1663286 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663287 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663288 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663291 3 0.0000 0.8060 0.000 0.000 1.000
#> SRR1663289 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663290 2 0.0000 0.9301 0.000 1.000 0.000
#> SRR1663285 3 0.6307 0.0978 0.000 0.488 0.512
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663210 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663213 2 0.0188 0.909 0.000 0.996 0.004 0.000
#> SRR1663211 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663212 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663214 3 0.4998 0.236 0.000 0.488 0.512 0.000
#> SRR1663215 3 0.4776 0.447 0.000 0.376 0.624 0.000
#> SRR1663216 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663217 3 0.4981 0.264 0.464 0.000 0.536 0.000
#> SRR1663218 3 0.4981 0.264 0.464 0.000 0.536 0.000
#> SRR1663219 1 0.0000 0.586 1.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.586 1.000 0.000 0.000 0.000
#> SRR1663221 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663222 3 0.4925 0.161 0.000 0.428 0.572 0.000
#> SRR1663224 2 0.2868 0.819 0.000 0.864 0.136 0.000
#> SRR1663225 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663226 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663223 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663229 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663231 2 0.4222 0.659 0.000 0.728 0.272 0.000
#> SRR1663232 2 0.4697 0.520 0.000 0.644 0.356 0.000
#> SRR1663227 3 0.4981 0.264 0.464 0.000 0.536 0.000
#> SRR1663228 3 0.4981 0.264 0.464 0.000 0.536 0.000
#> SRR1663230 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663235 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663233 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663236 4 0.0000 0.736 0.000 0.000 0.000 1.000
#> SRR1663237 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663238 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663234 2 0.4713 0.514 0.000 0.640 0.360 0.000
#> SRR1663240 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663239 2 0.2408 0.837 0.000 0.896 0.104 0.000
#> SRR1663241 4 0.0000 0.736 0.000 0.000 0.000 1.000
#> SRR1663242 3 0.4730 0.440 0.000 0.364 0.636 0.000
#> SRR1663243 2 0.1867 0.869 0.000 0.928 0.072 0.000
#> SRR1663244 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663246 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663245 2 0.2760 0.826 0.000 0.872 0.128 0.000
#> SRR1663247 4 0.0000 0.736 0.000 0.000 0.000 1.000
#> SRR1663248 2 0.3528 0.760 0.000 0.808 0.192 0.000
#> SRR1663250 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663249 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663251 4 0.0000 0.736 0.000 0.000 0.000 1.000
#> SRR1663252 2 0.4624 0.550 0.000 0.660 0.340 0.000
#> SRR1663253 3 0.1940 0.752 0.000 0.076 0.924 0.000
#> SRR1663254 3 0.4985 0.256 0.468 0.000 0.532 0.000
#> SRR1663255 3 0.2408 0.735 0.000 0.104 0.896 0.000
#> SRR1663256 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663259 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663258 2 0.4730 0.504 0.000 0.636 0.364 0.000
#> SRR1663257 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663263 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663260 3 0.2647 0.721 0.000 0.120 0.880 0.000
#> SRR1663262 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663261 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663265 2 0.0592 0.903 0.000 0.984 0.016 0.000
#> SRR1663266 3 0.1716 0.757 0.000 0.064 0.936 0.000
#> SRR1663267 1 0.3801 0.484 0.780 0.000 0.220 0.000
#> SRR1663264 3 0.2281 0.741 0.000 0.096 0.904 0.000
#> SRR1663268 3 0.2281 0.741 0.000 0.096 0.904 0.000
#> SRR1663269 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663271 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663270 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663273 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663272 3 0.0000 0.776 0.000 0.000 1.000 0.000
#> SRR1663275 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663274 4 0.2814 0.674 0.132 0.000 0.000 0.868
#> SRR1663276 4 0.4981 0.323 0.464 0.000 0.000 0.536
#> SRR1663277 4 0.4981 0.323 0.464 0.000 0.000 0.536
#> SRR1663279 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663278 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663280 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663281 2 0.4250 0.654 0.000 0.724 0.276 0.000
#> SRR1663282 2 0.3907 0.713 0.000 0.768 0.232 0.000
#> SRR1663283 1 0.4855 0.406 0.600 0.000 0.000 0.400
#> SRR1663284 1 0.4746 0.452 0.632 0.000 0.000 0.368
#> SRR1663286 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663287 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663288 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663291 3 0.1637 0.740 0.060 0.000 0.940 0.000
#> SRR1663289 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663290 2 0.0000 0.911 0.000 1.000 0.000 0.000
#> SRR1663285 3 0.4877 0.306 0.000 0.408 0.592 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663210 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663213 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663211 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663212 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663214 3 0.4287 0.248 0.000 0.460 0.540 0.000 0.000
#> SRR1663215 3 0.3752 0.519 0.000 0.292 0.708 0.000 0.000
#> SRR1663216 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663217 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> SRR1663218 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> SRR1663219 1 0.1270 0.897 0.948 0.000 0.000 0.052 0.000
#> SRR1663220 1 0.1270 0.897 0.948 0.000 0.000 0.052 0.000
#> SRR1663221 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663222 3 0.4161 0.249 0.000 0.392 0.608 0.000 0.000
#> SRR1663224 2 0.2516 0.811 0.000 0.860 0.140 0.000 0.000
#> SRR1663225 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663226 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663223 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663229 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663231 2 0.3707 0.642 0.000 0.716 0.284 0.000 0.000
#> SRR1663232 2 0.4138 0.466 0.000 0.616 0.384 0.000 0.000
#> SRR1663227 3 0.4227 0.226 0.000 0.000 0.580 0.420 0.000
#> SRR1663228 3 0.4219 0.236 0.000 0.000 0.584 0.416 0.000
#> SRR1663230 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663235 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663233 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663236 5 0.0000 0.943 0.000 0.000 0.000 0.000 1.000
#> SRR1663237 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663238 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663234 2 0.4182 0.431 0.000 0.600 0.400 0.000 0.000
#> SRR1663240 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663239 2 0.2377 0.805 0.000 0.872 0.128 0.000 0.000
#> SRR1663241 5 0.0000 0.943 0.000 0.000 0.000 0.000 1.000
#> SRR1663242 3 0.4101 0.392 0.000 0.372 0.628 0.000 0.000
#> SRR1663243 2 0.1544 0.865 0.000 0.932 0.068 0.000 0.000
#> SRR1663244 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663246 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663245 2 0.2329 0.824 0.000 0.876 0.124 0.000 0.000
#> SRR1663247 5 0.0000 0.943 0.000 0.000 0.000 0.000 1.000
#> SRR1663248 2 0.3039 0.758 0.000 0.808 0.192 0.000 0.000
#> SRR1663250 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663249 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663251 5 0.0000 0.943 0.000 0.000 0.000 0.000 1.000
#> SRR1663252 2 0.4060 0.515 0.000 0.640 0.360 0.000 0.000
#> SRR1663253 3 0.0162 0.860 0.000 0.004 0.996 0.000 0.000
#> SRR1663254 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> SRR1663255 3 0.0404 0.854 0.000 0.012 0.988 0.000 0.000
#> SRR1663256 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663259 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663258 2 0.4192 0.421 0.000 0.596 0.404 0.000 0.000
#> SRR1663257 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663263 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663260 3 0.1043 0.828 0.000 0.040 0.960 0.000 0.000
#> SRR1663262 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663261 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663265 2 0.0404 0.899 0.000 0.988 0.012 0.000 0.000
#> SRR1663266 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663267 1 0.1357 0.896 0.948 0.000 0.004 0.048 0.000
#> SRR1663264 3 0.0162 0.860 0.000 0.004 0.996 0.000 0.000
#> SRR1663268 3 0.0162 0.860 0.000 0.004 0.996 0.000 0.000
#> SRR1663269 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663271 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663270 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663273 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663272 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663275 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663274 5 0.2852 0.759 0.000 0.000 0.000 0.172 0.828
#> SRR1663276 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> SRR1663277 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> SRR1663279 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663278 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663280 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663281 2 0.3707 0.642 0.000 0.716 0.284 0.000 0.000
#> SRR1663282 2 0.3452 0.697 0.000 0.756 0.244 0.000 0.000
#> SRR1663283 1 0.2732 0.832 0.840 0.000 0.000 0.000 0.160
#> SRR1663284 1 0.2732 0.832 0.840 0.000 0.000 0.000 0.160
#> SRR1663286 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663287 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663288 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663291 3 0.0000 0.861 0.000 0.000 1.000 0.000 0.000
#> SRR1663289 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663290 2 0.0000 0.906 0.000 1.000 0.000 0.000 0.000
#> SRR1663285 3 0.4138 0.342 0.000 0.384 0.616 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663210 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663213 2 0.0146 0.901 0.000 0.996 0.004 0.000 0 0.000
#> SRR1663211 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663212 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663214 3 0.3847 0.254 0.000 0.456 0.544 0.000 0 0.000
#> SRR1663215 3 0.3330 0.501 0.000 0.284 0.716 0.000 0 0.000
#> SRR1663216 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663217 1 0.0000 1.000 1.000 0.000 0.000 0.000 0 0.000
#> SRR1663218 1 0.0000 1.000 1.000 0.000 0.000 0.000 0 0.000
#> SRR1663219 6 0.0146 0.996 0.004 0.000 0.000 0.000 0 0.996
#> SRR1663220 6 0.0146 0.996 0.004 0.000 0.000 0.000 0 0.996
#> SRR1663221 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663222 3 0.3737 0.243 0.000 0.392 0.608 0.000 0 0.000
#> SRR1663224 2 0.2300 0.804 0.000 0.856 0.144 0.000 0 0.000
#> SRR1663225 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663226 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663223 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663229 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663231 2 0.3309 0.650 0.000 0.720 0.280 0.000 0 0.000
#> SRR1663232 2 0.3706 0.476 0.000 0.620 0.380 0.000 0 0.000
#> SRR1663227 3 0.3774 0.257 0.408 0.000 0.592 0.000 0 0.000
#> SRR1663228 3 0.3765 0.266 0.404 0.000 0.596 0.000 0 0.000
#> SRR1663230 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663235 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663233 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663236 4 0.0000 0.929 0.000 0.000 0.000 1.000 0 0.000
#> SRR1663237 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663238 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663234 2 0.3756 0.436 0.000 0.600 0.400 0.000 0 0.000
#> SRR1663240 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663239 2 0.2178 0.798 0.000 0.868 0.132 0.000 0 0.000
#> SRR1663241 4 0.0000 0.929 0.000 0.000 0.000 1.000 0 0.000
#> SRR1663242 3 0.3672 0.397 0.000 0.368 0.632 0.000 0 0.000
#> SRR1663243 2 0.1444 0.859 0.000 0.928 0.072 0.000 0 0.000
#> SRR1663244 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663246 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663245 2 0.2135 0.817 0.000 0.872 0.128 0.000 0 0.000
#> SRR1663247 4 0.0000 0.929 0.000 0.000 0.000 1.000 0 0.000
#> SRR1663248 2 0.2762 0.754 0.000 0.804 0.196 0.000 0 0.000
#> SRR1663250 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663249 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663251 4 0.0000 0.929 0.000 0.000 0.000 1.000 0 0.000
#> SRR1663252 2 0.3634 0.524 0.000 0.644 0.356 0.000 0 0.000
#> SRR1663253 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663254 1 0.0000 1.000 1.000 0.000 0.000 0.000 0 0.000
#> SRR1663255 3 0.0260 0.851 0.000 0.008 0.992 0.000 0 0.000
#> SRR1663256 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663259 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663258 2 0.3756 0.432 0.000 0.600 0.400 0.000 0 0.000
#> SRR1663257 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663263 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663260 3 0.0865 0.824 0.000 0.036 0.964 0.000 0 0.000
#> SRR1663262 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663261 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663265 2 0.0458 0.895 0.000 0.984 0.016 0.000 0 0.000
#> SRR1663266 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663267 6 0.0000 0.992 0.000 0.000 0.000 0.000 0 1.000
#> SRR1663264 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663268 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663269 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663271 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663270 3 0.0000 0.857 0.000 0.000 1.000 0.000 0 0.000
#> SRR1663273 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663272 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663275 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663274 4 0.2883 0.695 0.212 0.000 0.000 0.788 0 0.000
#> SRR1663276 1 0.0000 1.000 1.000 0.000 0.000 0.000 0 0.000
#> SRR1663277 1 0.0000 1.000 1.000 0.000 0.000 0.000 0 0.000
#> SRR1663279 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663278 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663280 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663281 2 0.3330 0.646 0.000 0.716 0.284 0.000 0 0.000
#> SRR1663282 2 0.3101 0.701 0.000 0.756 0.244 0.000 0 0.000
#> SRR1663283 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 0.000
#> SRR1663284 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 0.000
#> SRR1663286 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663287 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663288 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663291 3 0.0146 0.857 0.000 0.000 0.996 0.000 0 0.004
#> SRR1663289 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663290 2 0.0000 0.903 0.000 1.000 0.000 0.000 0 0.000
#> SRR1663285 3 0.3706 0.347 0.000 0.380 0.620 0.000 0 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 17717 rows and 83 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.985 0.993 0.3517 0.656 0.656
#> 3 3 0.551 0.705 0.855 0.7394 0.689 0.530
#> 4 4 0.795 0.781 0.895 0.1942 0.776 0.465
#> 5 5 0.663 0.685 0.827 0.0305 0.971 0.890
#> 6 6 0.683 0.640 0.794 0.0338 0.952 0.817
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1663209 2 0.0000 0.991 0.000 1.000
#> SRR1663210 2 0.0000 0.991 0.000 1.000
#> SRR1663213 2 0.0000 0.991 0.000 1.000
#> SRR1663211 2 0.0000 0.991 0.000 1.000
#> SRR1663212 2 0.0000 0.991 0.000 1.000
#> SRR1663214 2 0.0000 0.991 0.000 1.000
#> SRR1663215 2 0.0000 0.991 0.000 1.000
#> SRR1663216 2 0.0000 0.991 0.000 1.000
#> SRR1663217 1 0.0000 1.000 1.000 0.000
#> SRR1663218 1 0.0000 1.000 1.000 0.000
#> SRR1663219 1 0.0000 1.000 1.000 0.000
#> SRR1663220 1 0.0000 1.000 1.000 0.000
#> SRR1663221 2 0.0000 0.991 0.000 1.000
#> SRR1663222 2 0.0000 0.991 0.000 1.000
#> SRR1663224 2 0.0000 0.991 0.000 1.000
#> SRR1663225 2 0.0000 0.991 0.000 1.000
#> SRR1663226 2 0.0000 0.991 0.000 1.000
#> SRR1663223 2 0.0000 0.991 0.000 1.000
#> SRR1663229 2 0.0000 0.991 0.000 1.000
#> SRR1663231 2 0.0000 0.991 0.000 1.000
#> SRR1663232 2 0.0000 0.991 0.000 1.000
#> SRR1663227 1 0.0000 1.000 1.000 0.000
#> SRR1663228 1 0.0000 1.000 1.000 0.000
#> SRR1663230 2 0.0000 0.991 0.000 1.000
#> SRR1663235 2 0.0000 0.991 0.000 1.000
#> SRR1663233 2 0.0000 0.991 0.000 1.000
#> SRR1663236 1 0.0000 1.000 1.000 0.000
#> SRR1663237 2 0.0000 0.991 0.000 1.000
#> SRR1663238 2 0.0000 0.991 0.000 1.000
#> SRR1663234 2 0.0000 0.991 0.000 1.000
#> SRR1663240 2 0.0000 0.991 0.000 1.000
#> SRR1663239 2 0.0000 0.991 0.000 1.000
#> SRR1663241 1 0.0000 1.000 1.000 0.000
#> SRR1663242 2 0.0000 0.991 0.000 1.000
#> SRR1663243 2 0.0672 0.984 0.008 0.992
#> SRR1663244 2 0.0000 0.991 0.000 1.000
#> SRR1663246 2 0.0000 0.991 0.000 1.000
#> SRR1663245 2 0.0000 0.991 0.000 1.000
#> SRR1663247 1 0.0000 1.000 1.000 0.000
#> SRR1663248 2 0.8713 0.592 0.292 0.708
#> SRR1663250 2 0.0000 0.991 0.000 1.000
#> SRR1663249 2 0.0000 0.991 0.000 1.000
#> SRR1663251 1 0.0000 1.000 1.000 0.000
#> SRR1663252 2 0.0000 0.991 0.000 1.000
#> SRR1663253 2 0.0000 0.991 0.000 1.000
#> SRR1663254 1 0.0000 1.000 1.000 0.000
#> SRR1663255 2 0.0000 0.991 0.000 1.000
#> SRR1663256 2 0.0000 0.991 0.000 1.000
#> SRR1663259 2 0.0000 0.991 0.000 1.000
#> SRR1663258 2 0.0000 0.991 0.000 1.000
#> SRR1663257 2 0.0000 0.991 0.000 1.000
#> SRR1663263 2 0.0000 0.991 0.000 1.000
#> SRR1663260 2 0.0000 0.991 0.000 1.000
#> SRR1663262 2 0.0000 0.991 0.000 1.000
#> SRR1663261 2 0.2603 0.949 0.044 0.956
#> SRR1663265 2 0.0000 0.991 0.000 1.000
#> SRR1663266 2 0.0000 0.991 0.000 1.000
#> SRR1663267 1 0.0000 1.000 1.000 0.000
#> SRR1663264 2 0.0000 0.991 0.000 1.000
#> SRR1663268 2 0.0000 0.991 0.000 1.000
#> SRR1663269 2 0.0000 0.991 0.000 1.000
#> SRR1663271 2 0.0000 0.991 0.000 1.000
#> SRR1663270 2 0.0000 0.991 0.000 1.000
#> SRR1663273 2 0.7219 0.752 0.200 0.800
#> SRR1663272 2 0.0000 0.991 0.000 1.000
#> SRR1663275 2 0.0000 0.991 0.000 1.000
#> SRR1663274 1 0.0000 1.000 1.000 0.000
#> SRR1663276 1 0.0000 1.000 1.000 0.000
#> SRR1663277 1 0.0000 1.000 1.000 0.000
#> SRR1663279 2 0.0000 0.991 0.000 1.000
#> SRR1663278 2 0.0000 0.991 0.000 1.000
#> SRR1663280 2 0.0000 0.991 0.000 1.000
#> SRR1663281 2 0.0000 0.991 0.000 1.000
#> SRR1663282 2 0.0000 0.991 0.000 1.000
#> SRR1663283 1 0.0000 1.000 1.000 0.000
#> SRR1663284 1 0.0000 1.000 1.000 0.000
#> SRR1663286 2 0.0000 0.991 0.000 1.000
#> SRR1663287 2 0.0000 0.991 0.000 1.000
#> SRR1663288 2 0.0000 0.991 0.000 1.000
#> SRR1663291 1 0.0000 1.000 1.000 0.000
#> SRR1663289 2 0.0000 0.991 0.000 1.000
#> SRR1663290 2 0.0000 0.991 0.000 1.000
#> SRR1663285 2 0.0000 0.991 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0424 0.7358 0.000 0.992 0.008
#> SRR1663210 2 0.0237 0.7338 0.000 0.996 0.004
#> SRR1663213 2 0.5859 0.6216 0.000 0.656 0.344
#> SRR1663211 2 0.0747 0.7417 0.000 0.984 0.016
#> SRR1663212 2 0.0747 0.7417 0.000 0.984 0.016
#> SRR1663214 2 0.5882 0.6214 0.000 0.652 0.348
#> SRR1663215 2 0.6215 0.4634 0.000 0.572 0.428
#> SRR1663216 2 0.0747 0.7417 0.000 0.984 0.016
#> SRR1663217 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663218 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663219 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663220 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663221 2 0.4750 0.7196 0.000 0.784 0.216
#> SRR1663222 3 0.3340 0.7216 0.000 0.120 0.880
#> SRR1663224 2 0.5859 0.6216 0.000 0.656 0.344
#> SRR1663225 2 0.3412 0.7177 0.000 0.876 0.124
#> SRR1663226 2 0.3412 0.7177 0.000 0.876 0.124
#> SRR1663223 2 0.4750 0.7196 0.000 0.784 0.216
#> SRR1663229 2 0.0747 0.7416 0.000 0.984 0.016
#> SRR1663231 3 0.5591 0.4597 0.000 0.304 0.696
#> SRR1663232 3 0.5621 0.4588 0.000 0.308 0.692
#> SRR1663227 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663228 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663230 2 0.5733 0.6427 0.000 0.676 0.324
#> SRR1663235 2 0.3752 0.7154 0.000 0.856 0.144
#> SRR1663233 2 0.4702 0.7202 0.000 0.788 0.212
#> SRR1663236 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663237 2 0.2165 0.7373 0.000 0.936 0.064
#> SRR1663238 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663234 2 0.6126 0.5158 0.000 0.600 0.400
#> SRR1663240 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663239 2 0.6267 0.3836 0.000 0.548 0.452
#> SRR1663241 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663242 3 0.6291 -0.1600 0.000 0.468 0.532
#> SRR1663243 2 0.5882 0.6259 0.000 0.652 0.348
#> SRR1663244 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663246 3 0.1289 0.7683 0.000 0.032 0.968
#> SRR1663245 2 0.5859 0.6216 0.000 0.656 0.344
#> SRR1663247 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663248 2 0.8435 0.4802 0.268 0.600 0.132
#> SRR1663250 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663249 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663251 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663252 3 0.5621 0.4588 0.000 0.308 0.692
#> SRR1663253 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663254 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663255 3 0.1529 0.7663 0.000 0.040 0.960
#> SRR1663256 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663259 2 0.0747 0.7417 0.000 0.984 0.016
#> SRR1663258 3 0.5650 0.4520 0.000 0.312 0.688
#> SRR1663257 2 0.0892 0.7256 0.000 0.980 0.020
#> SRR1663263 3 0.6008 0.2251 0.000 0.372 0.628
#> SRR1663260 3 0.2796 0.7412 0.000 0.092 0.908
#> SRR1663262 3 0.6008 0.2251 0.000 0.372 0.628
#> SRR1663261 3 0.6701 0.0797 0.412 0.012 0.576
#> SRR1663265 2 0.6225 0.4453 0.000 0.568 0.432
#> SRR1663266 3 0.6008 0.2251 0.000 0.372 0.628
#> SRR1663267 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663264 3 0.1529 0.7659 0.000 0.040 0.960
#> SRR1663268 3 0.3340 0.7216 0.000 0.120 0.880
#> SRR1663269 3 0.1289 0.7683 0.000 0.032 0.968
#> SRR1663271 2 0.0592 0.7397 0.000 0.988 0.012
#> SRR1663270 3 0.6026 0.2238 0.000 0.376 0.624
#> SRR1663273 1 0.5945 0.6391 0.740 0.024 0.236
#> SRR1663272 3 0.1163 0.7685 0.000 0.028 0.972
#> SRR1663275 2 0.0747 0.7417 0.000 0.984 0.016
#> SRR1663274 1 0.0424 0.9819 0.992 0.000 0.008
#> SRR1663276 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663277 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663279 2 0.0747 0.7417 0.000 0.984 0.016
#> SRR1663278 2 0.0747 0.7417 0.000 0.984 0.016
#> SRR1663280 2 0.4750 0.7196 0.000 0.784 0.216
#> SRR1663281 2 0.5859 0.6216 0.000 0.656 0.344
#> SRR1663282 2 0.5859 0.6216 0.000 0.656 0.344
#> SRR1663283 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663284 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663286 2 0.0592 0.7397 0.000 0.988 0.012
#> SRR1663287 2 0.4702 0.7202 0.000 0.788 0.212
#> SRR1663288 2 0.0747 0.7416 0.000 0.984 0.016
#> SRR1663291 1 0.0000 0.9825 1.000 0.000 0.000
#> SRR1663289 2 0.4750 0.7196 0.000 0.784 0.216
#> SRR1663290 2 0.4750 0.7196 0.000 0.784 0.216
#> SRR1663285 2 0.5882 0.6214 0.000 0.652 0.348
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.0592 0.8088 0.000 0.984 0.016 0.000
#> SRR1663210 2 0.0592 0.8088 0.000 0.984 0.016 0.000
#> SRR1663213 3 0.1059 0.8651 0.000 0.016 0.972 0.012
#> SRR1663211 2 0.1389 0.8012 0.000 0.952 0.048 0.000
#> SRR1663212 2 0.1557 0.7973 0.000 0.944 0.056 0.000
#> SRR1663214 3 0.0927 0.8599 0.000 0.016 0.976 0.008
#> SRR1663215 3 0.0804 0.8599 0.000 0.008 0.980 0.012
#> SRR1663216 2 0.0592 0.8088 0.000 0.984 0.016 0.000
#> SRR1663217 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663218 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663219 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663221 2 0.4888 0.3135 0.000 0.588 0.412 0.000
#> SRR1663222 3 0.1978 0.8613 0.000 0.004 0.928 0.068
#> SRR1663224 3 0.0707 0.8621 0.000 0.020 0.980 0.000
#> SRR1663225 2 0.5698 0.3781 0.000 0.608 0.356 0.036
#> SRR1663226 2 0.6108 0.1938 0.000 0.528 0.424 0.048
#> SRR1663223 2 0.4877 0.3228 0.000 0.592 0.408 0.000
#> SRR1663229 2 0.0592 0.8088 0.000 0.984 0.016 0.000
#> SRR1663231 3 0.2053 0.8600 0.000 0.004 0.924 0.072
#> SRR1663232 3 0.2053 0.8600 0.000 0.004 0.924 0.072
#> SRR1663227 1 0.0336 0.9896 0.992 0.000 0.000 0.008
#> SRR1663228 1 0.0336 0.9896 0.992 0.000 0.000 0.008
#> SRR1663230 3 0.1940 0.8362 0.000 0.076 0.924 0.000
#> SRR1663235 3 0.4900 0.5855 0.000 0.236 0.732 0.032
#> SRR1663233 2 0.4948 0.2363 0.000 0.560 0.440 0.000
#> SRR1663236 1 0.0657 0.9864 0.984 0.004 0.000 0.012
#> SRR1663237 2 0.5099 0.3709 0.000 0.612 0.380 0.008
#> SRR1663238 4 0.0817 0.8745 0.000 0.000 0.024 0.976
#> SRR1663234 3 0.2125 0.8584 0.000 0.004 0.920 0.076
#> SRR1663240 4 0.0817 0.8745 0.000 0.000 0.024 0.976
#> SRR1663239 3 0.0779 0.8615 0.000 0.016 0.980 0.004
#> SRR1663241 1 0.0657 0.9864 0.984 0.004 0.000 0.012
#> SRR1663242 3 0.0779 0.8615 0.000 0.004 0.980 0.016
#> SRR1663243 3 0.3001 0.8455 0.004 0.036 0.896 0.064
#> SRR1663244 4 0.1022 0.8742 0.000 0.000 0.032 0.968
#> SRR1663246 4 0.2149 0.8531 0.000 0.000 0.088 0.912
#> SRR1663245 3 0.0592 0.8626 0.000 0.016 0.984 0.000
#> SRR1663247 1 0.0657 0.9864 0.984 0.004 0.000 0.012
#> SRR1663248 3 0.6672 0.1559 0.432 0.008 0.496 0.064
#> SRR1663250 4 0.0817 0.8745 0.000 0.000 0.024 0.976
#> SRR1663249 4 0.1474 0.8690 0.000 0.000 0.052 0.948
#> SRR1663251 1 0.0336 0.9896 0.992 0.000 0.000 0.008
#> SRR1663252 3 0.2053 0.8600 0.000 0.004 0.924 0.072
#> SRR1663253 3 0.2149 0.8517 0.000 0.000 0.912 0.088
#> SRR1663254 1 0.0336 0.9896 0.992 0.000 0.000 0.008
#> SRR1663255 3 0.1867 0.8590 0.000 0.000 0.928 0.072
#> SRR1663256 4 0.0817 0.8745 0.000 0.000 0.024 0.976
#> SRR1663259 2 0.0921 0.8080 0.000 0.972 0.028 0.000
#> SRR1663258 3 0.2530 0.8443 0.000 0.004 0.896 0.100
#> SRR1663257 2 0.1209 0.8030 0.000 0.964 0.032 0.004
#> SRR1663263 4 0.4973 0.5605 0.000 0.008 0.348 0.644
#> SRR1663260 3 0.1978 0.8613 0.000 0.004 0.928 0.068
#> SRR1663262 4 0.4792 0.6235 0.000 0.008 0.312 0.680
#> SRR1663261 4 0.2124 0.8341 0.068 0.000 0.008 0.924
#> SRR1663265 3 0.0672 0.8655 0.000 0.008 0.984 0.008
#> SRR1663266 4 0.5193 0.4386 0.000 0.008 0.412 0.580
#> SRR1663267 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663264 3 0.3444 0.7406 0.000 0.000 0.816 0.184
#> SRR1663268 3 0.2053 0.8607 0.000 0.004 0.924 0.072
#> SRR1663269 4 0.0817 0.8745 0.000 0.000 0.024 0.976
#> SRR1663271 2 0.0592 0.8088 0.000 0.984 0.016 0.000
#> SRR1663270 4 0.4049 0.7575 0.000 0.008 0.212 0.780
#> SRR1663273 4 0.2799 0.7988 0.108 0.000 0.008 0.884
#> SRR1663272 4 0.0817 0.8745 0.000 0.000 0.024 0.976
#> SRR1663275 2 0.1022 0.8073 0.000 0.968 0.032 0.000
#> SRR1663274 1 0.0336 0.9896 0.992 0.000 0.000 0.008
#> SRR1663276 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663277 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663279 2 0.1022 0.8073 0.000 0.968 0.032 0.000
#> SRR1663278 2 0.0592 0.8088 0.000 0.984 0.016 0.000
#> SRR1663280 2 0.4866 0.3318 0.000 0.596 0.404 0.000
#> SRR1663281 3 0.0672 0.8660 0.000 0.008 0.984 0.008
#> SRR1663282 3 0.0804 0.8658 0.000 0.012 0.980 0.008
#> SRR1663283 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663284 1 0.0000 0.9903 1.000 0.000 0.000 0.000
#> SRR1663286 2 0.0469 0.8062 0.000 0.988 0.012 0.000
#> SRR1663287 3 0.4961 0.0993 0.000 0.448 0.552 0.000
#> SRR1663288 2 0.0592 0.8088 0.000 0.984 0.016 0.000
#> SRR1663291 1 0.2345 0.8909 0.900 0.000 0.000 0.100
#> SRR1663289 3 0.4730 0.3517 0.000 0.364 0.636 0.000
#> SRR1663290 3 0.4948 0.1266 0.000 0.440 0.560 0.000
#> SRR1663285 3 0.0804 0.8601 0.000 0.012 0.980 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.0290 0.80220 0.000 0.992 0.000 0.000 0.008
#> SRR1663210 2 0.0290 0.80220 0.000 0.992 0.000 0.000 0.008
#> SRR1663213 5 0.1907 0.80303 0.000 0.044 0.028 0.000 0.928
#> SRR1663211 2 0.1410 0.78740 0.000 0.940 0.000 0.000 0.060
#> SRR1663212 2 0.1270 0.79160 0.000 0.948 0.000 0.000 0.052
#> SRR1663214 5 0.3907 0.75653 0.000 0.032 0.096 0.044 0.828
#> SRR1663215 5 0.3538 0.75211 0.000 0.020 0.088 0.044 0.848
#> SRR1663216 2 0.0290 0.80220 0.000 0.992 0.000 0.000 0.008
#> SRR1663217 1 0.0162 0.83234 0.996 0.000 0.000 0.004 0.000
#> SRR1663218 1 0.0162 0.83234 0.996 0.000 0.000 0.004 0.000
#> SRR1663219 1 0.0000 0.83187 1.000 0.000 0.000 0.000 0.000
#> SRR1663220 1 0.0000 0.83187 1.000 0.000 0.000 0.000 0.000
#> SRR1663221 2 0.6413 0.30672 0.000 0.548 0.084 0.040 0.328
#> SRR1663222 5 0.4583 0.74871 0.000 0.004 0.192 0.064 0.740
#> SRR1663224 5 0.1582 0.80063 0.000 0.028 0.000 0.028 0.944
#> SRR1663225 2 0.5090 0.42990 0.000 0.636 0.040 0.008 0.316
#> SRR1663226 2 0.5394 0.25192 0.000 0.560 0.044 0.008 0.388
#> SRR1663223 2 0.4977 0.36044 0.000 0.604 0.000 0.040 0.356
#> SRR1663229 2 0.0963 0.79540 0.000 0.964 0.000 0.000 0.036
#> SRR1663231 5 0.3722 0.77858 0.000 0.008 0.104 0.060 0.828
#> SRR1663232 5 0.3664 0.77774 0.000 0.004 0.104 0.064 0.828
#> SRR1663227 1 0.2074 0.75510 0.896 0.000 0.000 0.104 0.000
#> SRR1663228 1 0.2074 0.75510 0.896 0.000 0.000 0.104 0.000
#> SRR1663230 5 0.2938 0.79101 0.000 0.084 0.008 0.032 0.876
#> SRR1663235 5 0.5139 0.35336 0.000 0.360 0.040 0.004 0.596
#> SRR1663233 2 0.6287 0.26491 0.000 0.540 0.068 0.040 0.352
#> SRR1663236 4 0.3636 0.88879 0.272 0.000 0.000 0.728 0.000
#> SRR1663237 2 0.4440 0.44084 0.000 0.660 0.012 0.004 0.324
#> SRR1663238 3 0.2520 0.78054 0.000 0.004 0.888 0.012 0.096
#> SRR1663234 5 0.3248 0.79141 0.000 0.020 0.084 0.032 0.864
#> SRR1663240 3 0.2124 0.78097 0.000 0.004 0.900 0.000 0.096
#> SRR1663239 5 0.3853 0.75497 0.000 0.032 0.092 0.044 0.832
#> SRR1663241 4 0.3636 0.88879 0.272 0.000 0.000 0.728 0.000
#> SRR1663242 5 0.1885 0.79254 0.000 0.020 0.004 0.044 0.932
#> SRR1663243 5 0.4658 0.70054 0.004 0.176 0.060 0.008 0.752
#> SRR1663244 3 0.0566 0.72891 0.000 0.004 0.984 0.000 0.012
#> SRR1663246 3 0.2536 0.77446 0.000 0.004 0.868 0.000 0.128
#> SRR1663245 5 0.1753 0.79932 0.000 0.032 0.000 0.032 0.936
#> SRR1663247 4 0.3636 0.88879 0.272 0.000 0.000 0.728 0.000
#> SRR1663248 1 0.5742 0.01747 0.496 0.012 0.056 0.000 0.436
#> SRR1663250 3 0.2179 0.78155 0.000 0.004 0.896 0.000 0.100
#> SRR1663249 3 0.2286 0.78043 0.000 0.004 0.888 0.000 0.108
#> SRR1663251 4 0.4449 0.53703 0.484 0.000 0.004 0.512 0.000
#> SRR1663252 5 0.3664 0.77774 0.000 0.004 0.104 0.064 0.828
#> SRR1663253 5 0.3664 0.77694 0.000 0.004 0.104 0.064 0.828
#> SRR1663254 1 0.2020 0.75975 0.900 0.000 0.000 0.100 0.000
#> SRR1663255 5 0.3612 0.77805 0.000 0.004 0.100 0.064 0.832
#> SRR1663256 3 0.0324 0.72511 0.000 0.004 0.992 0.000 0.004
#> SRR1663259 2 0.0404 0.80231 0.000 0.988 0.000 0.000 0.012
#> SRR1663258 5 0.3090 0.78032 0.000 0.004 0.104 0.032 0.860
#> SRR1663257 2 0.1331 0.78651 0.000 0.952 0.008 0.000 0.040
#> SRR1663263 3 0.6240 0.44466 0.000 0.020 0.564 0.108 0.308
#> SRR1663260 5 0.4583 0.74713 0.000 0.004 0.192 0.064 0.740
#> SRR1663262 3 0.6290 0.49031 0.004 0.020 0.584 0.108 0.284
#> SRR1663261 3 0.4083 0.74276 0.048 0.004 0.816 0.020 0.112
#> SRR1663265 5 0.1564 0.80033 0.000 0.024 0.004 0.024 0.948
#> SRR1663266 3 0.6444 0.33220 0.000 0.020 0.484 0.108 0.388
#> SRR1663267 1 0.1074 0.81461 0.968 0.000 0.004 0.012 0.016
#> SRR1663264 5 0.4589 0.45136 0.000 0.020 0.316 0.004 0.660
#> SRR1663268 5 0.3612 0.77805 0.000 0.004 0.100 0.064 0.832
#> SRR1663269 3 0.2445 0.77968 0.000 0.004 0.884 0.004 0.108
#> SRR1663271 2 0.0290 0.80220 0.000 0.992 0.000 0.000 0.008
#> SRR1663270 3 0.6017 0.61701 0.000 0.020 0.592 0.092 0.296
#> SRR1663273 3 0.5267 -0.00993 0.472 0.000 0.492 0.020 0.016
#> SRR1663272 3 0.2124 0.78097 0.000 0.004 0.900 0.000 0.096
#> SRR1663275 2 0.0510 0.80188 0.000 0.984 0.000 0.000 0.016
#> SRR1663274 1 0.2561 0.72176 0.856 0.000 0.000 0.144 0.000
#> SRR1663276 1 0.0794 0.82833 0.972 0.000 0.000 0.028 0.000
#> SRR1663277 1 0.0703 0.82977 0.976 0.000 0.000 0.024 0.000
#> SRR1663279 2 0.1549 0.79333 0.000 0.944 0.016 0.000 0.040
#> SRR1663278 2 0.0290 0.80220 0.000 0.992 0.000 0.000 0.008
#> SRR1663280 2 0.4770 0.42783 0.000 0.644 0.000 0.036 0.320
#> SRR1663281 5 0.1885 0.80252 0.000 0.032 0.012 0.020 0.936
#> SRR1663282 5 0.1885 0.80252 0.000 0.032 0.012 0.020 0.936
#> SRR1663283 1 0.1341 0.80922 0.944 0.000 0.000 0.056 0.000
#> SRR1663284 1 0.1341 0.80922 0.944 0.000 0.000 0.056 0.000
#> SRR1663286 2 0.1300 0.79380 0.000 0.956 0.000 0.028 0.016
#> SRR1663287 5 0.5157 0.12140 0.000 0.440 0.000 0.040 0.520
#> SRR1663288 2 0.0290 0.80220 0.000 0.992 0.000 0.000 0.008
#> SRR1663291 1 0.2347 0.74330 0.912 0.000 0.056 0.016 0.016
#> SRR1663289 5 0.4824 0.33975 0.000 0.376 0.000 0.028 0.596
#> SRR1663290 5 0.5071 0.18099 0.000 0.424 0.000 0.036 0.540
#> SRR1663285 5 0.1818 0.79437 0.000 0.024 0.000 0.044 0.932
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 5 0.0000 0.8210 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1663210 5 0.0000 0.8210 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1663213 2 0.2313 0.7589 0.000 0.904 0.016 0.000 0.044 NA
#> SRR1663211 5 0.1141 0.7993 0.000 0.052 0.000 0.000 0.948 NA
#> SRR1663212 5 0.1204 0.7964 0.000 0.056 0.000 0.000 0.944 NA
#> SRR1663214 2 0.1151 0.7499 0.000 0.956 0.000 0.000 0.012 NA
#> SRR1663215 2 0.0935 0.7480 0.000 0.964 0.000 0.000 0.004 NA
#> SRR1663216 5 0.0458 0.8194 0.000 0.016 0.000 0.000 0.984 NA
#> SRR1663217 1 0.3823 0.4774 0.564 0.000 0.000 0.000 0.000 NA
#> SRR1663218 1 0.3823 0.4774 0.564 0.000 0.000 0.000 0.000 NA
#> SRR1663219 1 0.0146 0.6874 0.996 0.000 0.000 0.000 0.000 NA
#> SRR1663220 1 0.0146 0.6874 0.996 0.000 0.000 0.000 0.000 NA
#> SRR1663221 2 0.5986 0.1141 0.000 0.412 0.008 0.000 0.408 NA
#> SRR1663222 2 0.4569 0.7114 0.000 0.700 0.156 0.000 0.000 NA
#> SRR1663224 2 0.0767 0.7574 0.000 0.976 0.004 0.000 0.008 NA
#> SRR1663225 5 0.4646 0.5473 0.000 0.260 0.036 0.004 0.680 NA
#> SRR1663226 5 0.4946 0.4123 0.000 0.328 0.036 0.004 0.612 NA
#> SRR1663223 5 0.5723 -0.1460 0.000 0.408 0.000 0.000 0.428 NA
#> SRR1663229 5 0.0260 0.8229 0.000 0.008 0.000 0.000 0.992 NA
#> SRR1663231 2 0.4662 0.7053 0.000 0.688 0.172 0.000 0.000 NA
#> SRR1663232 2 0.4599 0.7090 0.000 0.696 0.164 0.000 0.000 NA
#> SRR1663227 1 0.0891 0.6840 0.968 0.000 0.000 0.024 0.000 NA
#> SRR1663228 1 0.0891 0.6840 0.968 0.000 0.000 0.024 0.000 NA
#> SRR1663230 2 0.3548 0.7534 0.000 0.816 0.016 0.000 0.052 NA
#> SRR1663235 2 0.4616 0.3206 0.000 0.592 0.032 0.000 0.368 NA
#> SRR1663233 2 0.5981 0.1662 0.000 0.428 0.008 0.000 0.392 NA
#> SRR1663236 4 0.0937 0.8758 0.040 0.000 0.000 0.960 0.000 NA
#> SRR1663237 5 0.3808 0.5483 0.000 0.284 0.012 0.000 0.700 NA
#> SRR1663238 3 0.1226 0.7783 0.000 0.004 0.952 0.004 0.000 NA
#> SRR1663234 2 0.3843 0.7327 0.000 0.792 0.132 0.004 0.008 NA
#> SRR1663240 3 0.0260 0.8012 0.000 0.008 0.992 0.000 0.000 NA
#> SRR1663239 2 0.1194 0.7507 0.000 0.956 0.004 0.000 0.008 NA
#> SRR1663241 4 0.0937 0.8758 0.040 0.000 0.000 0.960 0.000 NA
#> SRR1663242 2 0.1194 0.7439 0.000 0.956 0.008 0.000 0.004 NA
#> SRR1663243 2 0.4542 0.7050 0.004 0.756 0.068 0.004 0.140 NA
#> SRR1663244 3 0.0363 0.8015 0.000 0.012 0.988 0.000 0.000 NA
#> SRR1663246 3 0.0692 0.7996 0.000 0.020 0.976 0.000 0.004 NA
#> SRR1663245 2 0.0820 0.7549 0.000 0.972 0.000 0.000 0.012 NA
#> SRR1663247 4 0.0937 0.8758 0.040 0.000 0.000 0.960 0.000 NA
#> SRR1663248 1 0.6395 0.1977 0.504 0.352 0.060 0.004 0.064 NA
#> SRR1663250 3 0.0363 0.8015 0.000 0.012 0.988 0.000 0.000 NA
#> SRR1663249 3 0.0363 0.8015 0.000 0.012 0.988 0.000 0.000 NA
#> SRR1663251 4 0.3499 0.4874 0.320 0.000 0.000 0.680 0.000 NA
#> SRR1663252 2 0.4566 0.7107 0.000 0.700 0.160 0.000 0.000 NA
#> SRR1663253 2 0.4697 0.7014 0.000 0.684 0.172 0.000 0.000 NA
#> SRR1663254 1 0.0291 0.6869 0.992 0.000 0.000 0.004 0.000 NA
#> SRR1663255 2 0.4602 0.7076 0.000 0.696 0.160 0.000 0.000 NA
#> SRR1663256 3 0.0260 0.8012 0.000 0.008 0.992 0.000 0.000 NA
#> SRR1663259 5 0.0000 0.8210 0.000 0.000 0.000 0.000 1.000 NA
#> SRR1663258 2 0.4491 0.7072 0.000 0.724 0.188 0.004 0.008 NA
#> SRR1663257 5 0.0806 0.8132 0.000 0.020 0.008 0.000 0.972 NA
#> SRR1663263 3 0.5160 0.5833 0.000 0.320 0.572 0.000 0.000 NA
#> SRR1663260 2 0.4602 0.7076 0.000 0.696 0.160 0.000 0.000 NA
#> SRR1663262 3 0.5223 0.5939 0.000 0.300 0.588 0.000 0.004 NA
#> SRR1663261 3 0.2975 0.7232 0.040 0.008 0.860 0.004 0.000 NA
#> SRR1663265 2 0.1167 0.7524 0.000 0.960 0.008 0.000 0.012 NA
#> SRR1663266 3 0.5307 0.5084 0.000 0.380 0.512 0.000 0.000 NA
#> SRR1663267 1 0.2113 0.6568 0.896 0.004 0.008 0.000 0.000 NA
#> SRR1663264 3 0.3975 0.1633 0.000 0.452 0.544 0.000 0.000 NA
#> SRR1663268 2 0.4569 0.7095 0.000 0.700 0.156 0.000 0.000 NA
#> SRR1663269 3 0.0692 0.7983 0.000 0.020 0.976 0.000 0.004 NA
#> SRR1663271 5 0.0260 0.8229 0.000 0.008 0.000 0.000 0.992 NA
#> SRR1663270 3 0.4880 0.6337 0.000 0.256 0.652 0.000 0.008 NA
#> SRR1663273 1 0.5697 0.1023 0.472 0.016 0.420 0.004 0.000 NA
#> SRR1663272 3 0.0260 0.8012 0.000 0.008 0.992 0.000 0.000 NA
#> SRR1663275 5 0.0260 0.8229 0.000 0.008 0.000 0.000 0.992 NA
#> SRR1663274 1 0.3857 -0.0328 0.532 0.000 0.000 0.468 0.000 NA
#> SRR1663276 1 0.4305 0.4614 0.544 0.000 0.000 0.020 0.000 NA
#> SRR1663277 1 0.4147 0.4679 0.552 0.000 0.000 0.012 0.000 NA
#> SRR1663279 5 0.0146 0.8214 0.000 0.004 0.000 0.000 0.996 NA
#> SRR1663278 5 0.0260 0.8229 0.000 0.008 0.000 0.000 0.992 NA
#> SRR1663280 5 0.5783 -0.1385 0.000 0.408 0.004 0.000 0.436 NA
#> SRR1663281 2 0.0508 0.7571 0.000 0.984 0.004 0.000 0.012 NA
#> SRR1663282 2 0.0717 0.7567 0.000 0.976 0.008 0.000 0.016 NA
#> SRR1663283 1 0.2450 0.6532 0.868 0.000 0.000 0.116 0.000 NA
#> SRR1663284 1 0.2450 0.6532 0.868 0.000 0.000 0.116 0.000 NA
#> SRR1663286 5 0.2636 0.7370 0.000 0.016 0.004 0.000 0.860 NA
#> SRR1663287 2 0.5907 0.4054 0.000 0.516 0.012 0.000 0.300 NA
#> SRR1663288 5 0.0146 0.8223 0.000 0.004 0.000 0.000 0.996 NA
#> SRR1663291 1 0.2646 0.6454 0.876 0.004 0.028 0.004 0.000 NA
#> SRR1663289 2 0.5042 0.5128 0.000 0.604 0.000 0.000 0.288 NA
#> SRR1663290 2 0.5543 0.4451 0.000 0.552 0.004 0.000 0.296 NA
#> SRR1663285 2 0.0935 0.7480 0.000 0.964 0.000 0.000 0.004 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "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 17717 rows and 83 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 1.000 0.996 0.998 0.3467 0.656 0.656
#> 3 3 0.782 0.887 0.939 0.7492 0.728 0.586
#> 4 4 0.577 0.676 0.852 0.0917 0.917 0.799
#> 5 5 0.576 0.705 0.834 0.1018 0.879 0.666
#> 6 6 0.608 0.621 0.800 0.0593 0.980 0.922
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
#> SRR1663209 2 0.000 0.997 0.000 1.000
#> SRR1663210 2 0.000 0.997 0.000 1.000
#> SRR1663213 2 0.000 0.997 0.000 1.000
#> SRR1663211 2 0.000 0.997 0.000 1.000
#> SRR1663212 2 0.000 0.997 0.000 1.000
#> SRR1663214 2 0.000 0.997 0.000 1.000
#> SRR1663215 2 0.000 0.997 0.000 1.000
#> SRR1663216 2 0.000 0.997 0.000 1.000
#> SRR1663217 1 0.000 1.000 1.000 0.000
#> SRR1663218 1 0.000 1.000 1.000 0.000
#> SRR1663219 1 0.000 1.000 1.000 0.000
#> SRR1663220 1 0.000 1.000 1.000 0.000
#> SRR1663221 2 0.000 0.997 0.000 1.000
#> SRR1663222 2 0.000 0.997 0.000 1.000
#> SRR1663224 2 0.000 0.997 0.000 1.000
#> SRR1663225 2 0.000 0.997 0.000 1.000
#> SRR1663226 2 0.000 0.997 0.000 1.000
#> SRR1663223 2 0.000 0.997 0.000 1.000
#> SRR1663229 2 0.000 0.997 0.000 1.000
#> SRR1663231 2 0.000 0.997 0.000 1.000
#> SRR1663232 2 0.000 0.997 0.000 1.000
#> SRR1663227 1 0.000 1.000 1.000 0.000
#> SRR1663228 1 0.000 1.000 1.000 0.000
#> SRR1663230 2 0.000 0.997 0.000 1.000
#> SRR1663235 2 0.000 0.997 0.000 1.000
#> SRR1663233 2 0.000 0.997 0.000 1.000
#> SRR1663236 1 0.000 1.000 1.000 0.000
#> SRR1663237 2 0.000 0.997 0.000 1.000
#> SRR1663238 2 0.000 0.997 0.000 1.000
#> SRR1663234 2 0.000 0.997 0.000 1.000
#> SRR1663240 2 0.000 0.997 0.000 1.000
#> SRR1663239 2 0.000 0.997 0.000 1.000
#> SRR1663241 1 0.000 1.000 1.000 0.000
#> SRR1663242 2 0.000 0.997 0.000 1.000
#> SRR1663243 2 0.000 0.997 0.000 1.000
#> SRR1663244 2 0.000 0.997 0.000 1.000
#> SRR1663246 2 0.000 0.997 0.000 1.000
#> SRR1663245 2 0.000 0.997 0.000 1.000
#> SRR1663247 1 0.000 1.000 1.000 0.000
#> SRR1663248 2 0.000 0.997 0.000 1.000
#> SRR1663250 2 0.000 0.997 0.000 1.000
#> SRR1663249 2 0.000 0.997 0.000 1.000
#> SRR1663251 1 0.000 1.000 1.000 0.000
#> SRR1663252 2 0.000 0.997 0.000 1.000
#> SRR1663253 2 0.000 0.997 0.000 1.000
#> SRR1663254 1 0.000 1.000 1.000 0.000
#> SRR1663255 2 0.000 0.997 0.000 1.000
#> SRR1663256 2 0.000 0.997 0.000 1.000
#> SRR1663259 2 0.000 0.997 0.000 1.000
#> SRR1663258 2 0.000 0.997 0.000 1.000
#> SRR1663257 2 0.000 0.997 0.000 1.000
#> SRR1663263 2 0.000 0.997 0.000 1.000
#> SRR1663260 2 0.000 0.997 0.000 1.000
#> SRR1663262 2 0.000 0.997 0.000 1.000
#> SRR1663261 2 0.653 0.798 0.168 0.832
#> SRR1663265 2 0.000 0.997 0.000 1.000
#> SRR1663266 2 0.000 0.997 0.000 1.000
#> SRR1663267 1 0.000 1.000 1.000 0.000
#> SRR1663264 2 0.000 0.997 0.000 1.000
#> SRR1663268 2 0.000 0.997 0.000 1.000
#> SRR1663269 2 0.000 0.997 0.000 1.000
#> SRR1663271 2 0.000 0.997 0.000 1.000
#> SRR1663270 2 0.000 0.997 0.000 1.000
#> SRR1663273 2 0.000 0.997 0.000 1.000
#> SRR1663272 2 0.000 0.997 0.000 1.000
#> SRR1663275 2 0.000 0.997 0.000 1.000
#> SRR1663274 1 0.000 1.000 1.000 0.000
#> SRR1663276 1 0.000 1.000 1.000 0.000
#> SRR1663277 1 0.000 1.000 1.000 0.000
#> SRR1663279 2 0.000 0.997 0.000 1.000
#> SRR1663278 2 0.000 0.997 0.000 1.000
#> SRR1663280 2 0.000 0.997 0.000 1.000
#> SRR1663281 2 0.000 0.997 0.000 1.000
#> SRR1663282 2 0.000 0.997 0.000 1.000
#> SRR1663283 1 0.000 1.000 1.000 0.000
#> SRR1663284 1 0.000 1.000 1.000 0.000
#> SRR1663286 2 0.000 0.997 0.000 1.000
#> SRR1663287 2 0.000 0.997 0.000 1.000
#> SRR1663288 2 0.000 0.997 0.000 1.000
#> SRR1663291 1 0.000 1.000 1.000 0.000
#> SRR1663289 2 0.000 0.997 0.000 1.000
#> SRR1663290 2 0.000 0.997 0.000 1.000
#> SRR1663285 2 0.000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1663209 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663210 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663213 2 0.2066 0.893 0.000 0.940 0.060
#> SRR1663211 2 0.0237 0.927 0.000 0.996 0.004
#> SRR1663212 2 0.0237 0.927 0.000 0.996 0.004
#> SRR1663214 2 0.0424 0.928 0.000 0.992 0.008
#> SRR1663215 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663216 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663217 1 0.0592 0.989 0.988 0.000 0.012
#> SRR1663218 1 0.0592 0.989 0.988 0.000 0.012
#> SRR1663219 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663220 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663221 2 0.5760 0.504 0.000 0.672 0.328
#> SRR1663222 3 0.5058 0.773 0.000 0.244 0.756
#> SRR1663224 2 0.6008 0.386 0.000 0.628 0.372
#> SRR1663225 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663226 2 0.0237 0.927 0.000 0.996 0.004
#> SRR1663223 2 0.1753 0.902 0.000 0.952 0.048
#> SRR1663229 2 0.0424 0.928 0.000 0.992 0.008
#> SRR1663231 3 0.1163 0.889 0.000 0.028 0.972
#> SRR1663232 3 0.1163 0.889 0.000 0.028 0.972
#> SRR1663227 1 0.1289 0.968 0.968 0.000 0.032
#> SRR1663228 1 0.1860 0.952 0.948 0.000 0.052
#> SRR1663230 2 0.5058 0.676 0.000 0.756 0.244
#> SRR1663235 2 0.0237 0.927 0.000 0.996 0.004
#> SRR1663233 2 0.4291 0.770 0.000 0.820 0.180
#> SRR1663236 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663237 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663238 3 0.1031 0.886 0.000 0.024 0.976
#> SRR1663234 3 0.4504 0.805 0.000 0.196 0.804
#> SRR1663240 3 0.1163 0.889 0.000 0.028 0.972
#> SRR1663239 2 0.0747 0.924 0.000 0.984 0.016
#> SRR1663241 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663242 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663243 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663244 3 0.3340 0.872 0.000 0.120 0.880
#> SRR1663246 3 0.4605 0.820 0.000 0.204 0.796
#> SRR1663245 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663247 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663248 2 0.0237 0.927 0.000 0.996 0.004
#> SRR1663250 3 0.0892 0.883 0.000 0.020 0.980
#> SRR1663249 3 0.1163 0.889 0.000 0.028 0.972
#> SRR1663251 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663252 3 0.1163 0.889 0.000 0.028 0.972
#> SRR1663253 3 0.1163 0.889 0.000 0.028 0.972
#> SRR1663254 1 0.0237 0.991 0.996 0.000 0.004
#> SRR1663255 3 0.4062 0.850 0.000 0.164 0.836
#> SRR1663256 3 0.1163 0.889 0.000 0.028 0.972
#> SRR1663259 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663258 3 0.1753 0.888 0.000 0.048 0.952
#> SRR1663257 2 0.0237 0.927 0.000 0.996 0.004
#> SRR1663263 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663260 3 0.4796 0.805 0.000 0.220 0.780
#> SRR1663262 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663261 3 0.0848 0.869 0.008 0.008 0.984
#> SRR1663265 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663266 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663267 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663264 3 0.4796 0.805 0.000 0.220 0.780
#> SRR1663268 3 0.4796 0.805 0.000 0.220 0.780
#> SRR1663269 3 0.5706 0.632 0.000 0.320 0.680
#> SRR1663271 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663270 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663273 2 0.7124 0.590 0.088 0.708 0.204
#> SRR1663272 3 0.0892 0.883 0.000 0.020 0.980
#> SRR1663275 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663274 1 0.0000 0.992 1.000 0.000 0.000
#> SRR1663276 1 0.0237 0.991 0.996 0.000 0.004
#> SRR1663277 1 0.0237 0.991 0.996 0.000 0.004
#> SRR1663279 2 0.0000 0.929 0.000 1.000 0.000
#> SRR1663278 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663280 2 0.0592 0.926 0.000 0.988 0.012
#> SRR1663281 2 0.4346 0.764 0.000 0.816 0.184
#> SRR1663282 2 0.2066 0.893 0.000 0.940 0.060
#> SRR1663283 1 0.0747 0.988 0.984 0.000 0.016
#> SRR1663284 1 0.0747 0.988 0.984 0.000 0.016
#> SRR1663286 2 0.0592 0.926 0.000 0.988 0.012
#> SRR1663287 2 0.5560 0.568 0.000 0.700 0.300
#> SRR1663288 2 0.0237 0.929 0.000 0.996 0.004
#> SRR1663291 1 0.0747 0.988 0.984 0.000 0.016
#> SRR1663289 2 0.4654 0.731 0.000 0.792 0.208
#> SRR1663290 2 0.4974 0.688 0.000 0.764 0.236
#> SRR1663285 2 0.0237 0.929 0.000 0.996 0.004
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1663209 2 0.3400 0.665 0.000 0.820 0.000 0.180
#> SRR1663210 2 0.4134 0.519 0.000 0.740 0.000 0.260
#> SRR1663213 2 0.3606 0.746 0.000 0.840 0.020 0.140
#> SRR1663211 2 0.4331 0.458 0.000 0.712 0.000 0.288
#> SRR1663212 2 0.5168 -0.256 0.000 0.504 0.004 0.492
#> SRR1663214 2 0.3074 0.742 0.000 0.848 0.000 0.152
#> SRR1663215 2 0.3123 0.739 0.000 0.844 0.000 0.156
#> SRR1663216 2 0.0657 0.809 0.000 0.984 0.004 0.012
#> SRR1663217 1 0.4804 0.481 0.616 0.000 0.000 0.384
#> SRR1663218 4 0.4790 -0.143 0.380 0.000 0.000 0.620
#> SRR1663219 1 0.0188 0.866 0.996 0.000 0.000 0.004
#> SRR1663220 1 0.0188 0.866 0.996 0.000 0.000 0.004
#> SRR1663221 2 0.2255 0.799 0.000 0.920 0.068 0.012
#> SRR1663222 3 0.4699 0.531 0.000 0.320 0.676 0.004
#> SRR1663224 2 0.4250 0.553 0.000 0.724 0.276 0.000
#> SRR1663225 2 0.2081 0.771 0.000 0.916 0.000 0.084
#> SRR1663226 2 0.4679 0.260 0.000 0.648 0.000 0.352
#> SRR1663223 2 0.1059 0.813 0.000 0.972 0.012 0.016
#> SRR1663229 2 0.2843 0.766 0.000 0.892 0.020 0.088
#> SRR1663231 3 0.0188 0.802 0.000 0.004 0.996 0.000
#> SRR1663232 3 0.0188 0.798 0.000 0.000 0.996 0.004
#> SRR1663227 1 0.4164 0.613 0.736 0.000 0.264 0.000
#> SRR1663228 1 0.4790 0.439 0.620 0.000 0.380 0.000
#> SRR1663230 2 0.4955 0.419 0.000 0.648 0.344 0.008
#> SRR1663235 4 0.5000 0.188 0.000 0.500 0.000 0.500
#> SRR1663233 2 0.1867 0.799 0.000 0.928 0.072 0.000
#> SRR1663236 1 0.0336 0.866 0.992 0.000 0.000 0.008
#> SRR1663237 4 0.5161 0.259 0.000 0.476 0.004 0.520
#> SRR1663238 3 0.5670 0.637 0.000 0.128 0.720 0.152
#> SRR1663234 3 0.6245 0.617 0.000 0.168 0.668 0.164
#> SRR1663240 3 0.1209 0.800 0.000 0.004 0.964 0.032
#> SRR1663239 2 0.1677 0.809 0.000 0.948 0.012 0.040
#> SRR1663241 1 0.0469 0.865 0.988 0.000 0.000 0.012
#> SRR1663242 2 0.0921 0.811 0.000 0.972 0.000 0.028
#> SRR1663243 2 0.0779 0.812 0.004 0.980 0.000 0.016
#> SRR1663244 3 0.2197 0.792 0.000 0.080 0.916 0.004
#> SRR1663246 2 0.6416 0.499 0.000 0.648 0.200 0.152
#> SRR1663245 2 0.0817 0.811 0.000 0.976 0.000 0.024
#> SRR1663247 1 0.0469 0.865 0.988 0.000 0.000 0.012
#> SRR1663248 4 0.4382 0.515 0.000 0.296 0.000 0.704
#> SRR1663250 3 0.1118 0.796 0.000 0.000 0.964 0.036
#> SRR1663249 3 0.0376 0.803 0.000 0.004 0.992 0.004
#> SRR1663251 1 0.0000 0.866 1.000 0.000 0.000 0.000
#> SRR1663252 3 0.1209 0.805 0.000 0.032 0.964 0.004
#> SRR1663253 3 0.0469 0.805 0.000 0.012 0.988 0.000
#> SRR1663254 1 0.1576 0.851 0.948 0.000 0.004 0.048
#> SRR1663255 3 0.3539 0.722 0.000 0.176 0.820 0.004
#> SRR1663256 3 0.0336 0.804 0.000 0.008 0.992 0.000
#> SRR1663259 2 0.0592 0.807 0.000 0.984 0.000 0.016
#> SRR1663258 3 0.3108 0.773 0.000 0.112 0.872 0.016
#> SRR1663257 2 0.3801 0.607 0.000 0.780 0.000 0.220
#> SRR1663263 2 0.2469 0.777 0.000 0.892 0.000 0.108
#> SRR1663260 3 0.4453 0.651 0.000 0.244 0.744 0.012
#> SRR1663262 2 0.0336 0.810 0.000 0.992 0.000 0.008
#> SRR1663261 3 0.1022 0.787 0.000 0.000 0.968 0.032
#> SRR1663265 2 0.0188 0.811 0.000 0.996 0.000 0.004
#> SRR1663266 2 0.2149 0.787 0.000 0.912 0.000 0.088
#> SRR1663267 1 0.0188 0.866 0.996 0.000 0.000 0.004
#> SRR1663264 3 0.4746 0.555 0.000 0.304 0.688 0.008
#> SRR1663268 3 0.6700 0.154 0.000 0.432 0.480 0.088
#> SRR1663269 2 0.7261 0.109 0.000 0.480 0.368 0.152
#> SRR1663271 2 0.0524 0.810 0.000 0.988 0.004 0.008
#> SRR1663270 2 0.3074 0.742 0.000 0.848 0.000 0.152
#> SRR1663273 2 0.6565 0.543 0.032 0.692 0.124 0.152
#> SRR1663272 3 0.2704 0.758 0.000 0.000 0.876 0.124
#> SRR1663275 2 0.2149 0.766 0.000 0.912 0.000 0.088
#> SRR1663274 1 0.0000 0.866 1.000 0.000 0.000 0.000
#> SRR1663276 1 0.2760 0.803 0.872 0.000 0.000 0.128
#> SRR1663277 1 0.4967 0.384 0.548 0.000 0.000 0.452
#> SRR1663279 2 0.0188 0.809 0.000 0.996 0.000 0.004
#> SRR1663278 2 0.0000 0.810 0.000 1.000 0.000 0.000
#> SRR1663280 2 0.1042 0.813 0.000 0.972 0.008 0.020
#> SRR1663281 2 0.1637 0.803 0.000 0.940 0.060 0.000
#> SRR1663282 2 0.1022 0.811 0.000 0.968 0.032 0.000
#> SRR1663283 1 0.1637 0.847 0.940 0.000 0.000 0.060
#> SRR1663284 1 0.1637 0.847 0.940 0.000 0.000 0.060
#> SRR1663286 2 0.4542 0.696 0.000 0.804 0.088 0.108
#> SRR1663287 2 0.1867 0.799 0.000 0.928 0.072 0.000
#> SRR1663288 2 0.2799 0.749 0.000 0.884 0.008 0.108
#> SRR1663291 4 0.4122 0.160 0.236 0.000 0.004 0.760
#> SRR1663289 2 0.1474 0.805 0.000 0.948 0.052 0.000
#> SRR1663290 2 0.1890 0.805 0.000 0.936 0.056 0.008
#> SRR1663285 2 0.3123 0.739 0.000 0.844 0.000 0.156
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1663209 2 0.1124 0.8646 0.000 0.960 0.000 0.004 0.036
#> SRR1663210 2 0.1357 0.8569 0.000 0.948 0.000 0.004 0.048
#> SRR1663213 3 0.4326 0.7523 0.000 0.264 0.708 0.028 0.000
#> SRR1663211 2 0.5063 0.2753 0.000 0.632 0.056 0.000 0.312
#> SRR1663212 5 0.6439 0.4312 0.000 0.324 0.156 0.008 0.512
#> SRR1663214 3 0.2852 0.8360 0.000 0.172 0.828 0.000 0.000
#> SRR1663215 3 0.2852 0.8360 0.000 0.172 0.828 0.000 0.000
#> SRR1663216 2 0.0451 0.8748 0.000 0.988 0.000 0.004 0.008
#> SRR1663217 5 0.3895 0.3236 0.320 0.000 0.000 0.000 0.680
#> SRR1663218 5 0.3333 0.4706 0.208 0.004 0.000 0.000 0.788
#> SRR1663219 1 0.0290 0.8621 0.992 0.000 0.008 0.000 0.000
#> SRR1663220 1 0.0290 0.8621 0.992 0.000 0.008 0.000 0.000
#> SRR1663221 2 0.2505 0.8576 0.000 0.888 0.020 0.092 0.000
#> SRR1663222 4 0.4302 0.1553 0.000 0.480 0.000 0.520 0.000
#> SRR1663224 2 0.2806 0.8071 0.000 0.844 0.000 0.152 0.004
#> SRR1663225 2 0.0609 0.8711 0.000 0.980 0.000 0.000 0.020
#> SRR1663226 2 0.2773 0.7248 0.000 0.836 0.000 0.000 0.164
#> SRR1663223 2 0.2036 0.8736 0.000 0.920 0.024 0.056 0.000
#> SRR1663229 2 0.2196 0.8665 0.000 0.916 0.004 0.056 0.024
#> SRR1663231 4 0.1478 0.7342 0.000 0.064 0.000 0.936 0.000
#> SRR1663232 4 0.1329 0.7320 0.000 0.032 0.004 0.956 0.008
#> SRR1663227 1 0.3607 0.6399 0.752 0.000 0.000 0.244 0.004
#> SRR1663228 1 0.4276 0.4208 0.616 0.000 0.000 0.380 0.004
#> SRR1663230 2 0.2605 0.8126 0.000 0.852 0.000 0.148 0.000
#> SRR1663235 5 0.4557 0.4012 0.000 0.404 0.012 0.000 0.584
#> SRR1663233 2 0.2361 0.8583 0.000 0.892 0.012 0.096 0.000
#> SRR1663236 1 0.0510 0.8616 0.984 0.000 0.016 0.000 0.000
#> SRR1663237 5 0.4557 0.1899 0.000 0.476 0.000 0.008 0.516
#> SRR1663238 3 0.4540 0.4490 0.000 0.020 0.640 0.340 0.000
#> SRR1663234 4 0.6406 0.4185 0.000 0.212 0.004 0.536 0.248
#> SRR1663240 4 0.2377 0.6540 0.000 0.000 0.128 0.872 0.000
#> SRR1663239 2 0.3061 0.8093 0.000 0.844 0.136 0.020 0.000
#> SRR1663241 1 0.1012 0.8597 0.968 0.000 0.020 0.000 0.012
#> SRR1663242 2 0.2020 0.8351 0.000 0.900 0.100 0.000 0.000
#> SRR1663243 2 0.1408 0.8731 0.000 0.948 0.044 0.008 0.000
#> SRR1663244 4 0.2773 0.7100 0.000 0.164 0.000 0.836 0.000
#> SRR1663246 3 0.4686 0.7516 0.000 0.104 0.736 0.160 0.000
#> SRR1663245 2 0.1597 0.8702 0.000 0.940 0.048 0.012 0.000
#> SRR1663247 1 0.1012 0.8597 0.968 0.000 0.020 0.000 0.012
#> SRR1663248 5 0.3109 0.5802 0.000 0.200 0.000 0.000 0.800
#> SRR1663250 4 0.2230 0.6626 0.000 0.000 0.116 0.884 0.000
#> SRR1663249 4 0.0404 0.7207 0.000 0.000 0.012 0.988 0.000
#> SRR1663251 1 0.0404 0.8604 0.988 0.000 0.012 0.000 0.000
#> SRR1663252 4 0.2813 0.7000 0.000 0.168 0.000 0.832 0.000
#> SRR1663253 4 0.0794 0.7329 0.000 0.028 0.000 0.972 0.000
#> SRR1663254 1 0.2907 0.7930 0.864 0.000 0.008 0.012 0.116
#> SRR1663255 4 0.2488 0.7243 0.000 0.124 0.004 0.872 0.000
#> SRR1663256 4 0.1281 0.7202 0.000 0.012 0.032 0.956 0.000
#> SRR1663259 2 0.0404 0.8747 0.000 0.988 0.012 0.000 0.000
#> SRR1663258 4 0.3720 0.6432 0.000 0.228 0.000 0.760 0.012
#> SRR1663257 2 0.5022 0.2768 0.000 0.620 0.048 0.000 0.332
#> SRR1663263 3 0.3561 0.7561 0.000 0.260 0.740 0.000 0.000
#> SRR1663260 4 0.3958 0.6637 0.000 0.184 0.040 0.776 0.000
#> SRR1663262 2 0.2471 0.7939 0.000 0.864 0.136 0.000 0.000
#> SRR1663261 4 0.2068 0.6859 0.000 0.000 0.004 0.904 0.092
#> SRR1663265 2 0.1124 0.8718 0.000 0.960 0.036 0.004 0.000
#> SRR1663266 2 0.4192 0.2086 0.000 0.596 0.404 0.000 0.000
#> SRR1663267 1 0.0404 0.8622 0.988 0.000 0.012 0.000 0.000
#> SRR1663264 4 0.6115 0.4212 0.000 0.280 0.168 0.552 0.000
#> SRR1663268 4 0.5690 0.4705 0.000 0.224 0.152 0.624 0.000
#> SRR1663269 3 0.5045 0.7144 0.000 0.108 0.696 0.196 0.000
#> SRR1663271 2 0.0404 0.8752 0.000 0.988 0.012 0.000 0.000
#> SRR1663270 3 0.3177 0.8184 0.000 0.208 0.792 0.000 0.000
#> SRR1663273 3 0.3460 0.8131 0.000 0.128 0.828 0.044 0.000
#> SRR1663272 4 0.4307 -0.0927 0.000 0.000 0.496 0.504 0.000
#> SRR1663275 2 0.0609 0.8699 0.000 0.980 0.000 0.000 0.020
#> SRR1663274 1 0.0324 0.8614 0.992 0.000 0.004 0.000 0.004
#> SRR1663276 1 0.4854 0.5042 0.648 0.000 0.044 0.000 0.308
#> SRR1663277 5 0.4665 0.3726 0.260 0.000 0.048 0.000 0.692
#> SRR1663279 2 0.1851 0.8396 0.000 0.912 0.088 0.000 0.000
#> SRR1663278 2 0.0510 0.8753 0.000 0.984 0.016 0.000 0.000
#> SRR1663280 2 0.1661 0.8758 0.000 0.940 0.036 0.024 0.000
#> SRR1663281 2 0.1924 0.8723 0.000 0.924 0.008 0.064 0.004
#> SRR1663282 2 0.1331 0.8781 0.000 0.952 0.008 0.040 0.000
#> SRR1663283 1 0.3670 0.7795 0.820 0.000 0.112 0.000 0.068
#> SRR1663284 1 0.3670 0.7795 0.820 0.000 0.112 0.000 0.068
#> SRR1663286 2 0.2362 0.8602 0.000 0.900 0.000 0.076 0.024
#> SRR1663287 2 0.2358 0.8523 0.000 0.888 0.008 0.104 0.000
#> SRR1663288 2 0.1582 0.8703 0.000 0.944 0.000 0.028 0.028
#> SRR1663291 5 0.2521 0.5374 0.084 0.008 0.004 0.008 0.896
#> SRR1663289 2 0.1792 0.8639 0.000 0.916 0.000 0.084 0.000
#> SRR1663290 2 0.2179 0.8562 0.000 0.896 0.004 0.100 0.000
#> SRR1663285 3 0.2852 0.8360 0.000 0.172 0.828 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1663209 2 0.1887 0.751 0.000 0.924 0.000 0.016 0.012 0.048
#> SRR1663210 2 0.2015 0.749 0.000 0.916 0.000 0.012 0.016 0.056
#> SRR1663213 3 0.2255 0.817 0.000 0.080 0.892 0.028 0.000 0.000
#> SRR1663211 5 0.6710 0.593 0.000 0.316 0.036 0.008 0.444 0.196
#> SRR1663212 5 0.6945 0.522 0.000 0.156 0.104 0.000 0.448 0.292
#> SRR1663214 3 0.0790 0.842 0.000 0.032 0.968 0.000 0.000 0.000
#> SRR1663215 3 0.0858 0.842 0.000 0.028 0.968 0.000 0.004 0.000
#> SRR1663216 2 0.1629 0.760 0.000 0.944 0.012 0.012 0.012 0.020
#> SRR1663217 6 0.3429 0.478 0.252 0.000 0.004 0.000 0.004 0.740
#> SRR1663218 6 0.2442 0.521 0.144 0.000 0.004 0.000 0.000 0.852
#> SRR1663219 1 0.0632 0.832 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR1663220 1 0.0632 0.832 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR1663221 2 0.1908 0.748 0.000 0.900 0.000 0.096 0.004 0.000
#> SRR1663222 4 0.4185 0.119 0.000 0.492 0.000 0.496 0.012 0.000
#> SRR1663224 2 0.5181 0.359 0.000 0.604 0.004 0.112 0.280 0.000
#> SRR1663225 2 0.3832 0.621 0.000 0.772 0.004 0.012 0.184 0.028
#> SRR1663226 2 0.5806 0.102 0.000 0.576 0.004 0.012 0.220 0.188
#> SRR1663223 2 0.1480 0.764 0.000 0.940 0.000 0.040 0.020 0.000
#> SRR1663229 2 0.2702 0.740 0.000 0.868 0.000 0.092 0.036 0.004
#> SRR1663231 4 0.2750 0.695 0.000 0.048 0.004 0.868 0.080 0.000
#> SRR1663232 4 0.2884 0.690 0.000 0.036 0.004 0.872 0.072 0.016
#> SRR1663227 1 0.3163 0.676 0.780 0.000 0.004 0.212 0.004 0.000
#> SRR1663228 1 0.3703 0.556 0.688 0.000 0.004 0.304 0.004 0.000
#> SRR1663230 2 0.2703 0.689 0.000 0.824 0.000 0.172 0.004 0.000
#> SRR1663235 6 0.4245 -0.128 0.000 0.376 0.004 0.000 0.016 0.604
#> SRR1663233 2 0.2302 0.735 0.000 0.872 0.008 0.120 0.000 0.000
#> SRR1663236 1 0.1141 0.831 0.948 0.000 0.000 0.000 0.052 0.000
#> SRR1663237 6 0.5695 -0.246 0.000 0.360 0.000 0.028 0.088 0.524
#> SRR1663238 3 0.2882 0.763 0.000 0.000 0.812 0.180 0.008 0.000
#> SRR1663234 4 0.6852 0.351 0.000 0.112 0.000 0.496 0.168 0.224
#> SRR1663240 4 0.3491 0.591 0.000 0.004 0.168 0.796 0.028 0.004
#> SRR1663239 2 0.2784 0.722 0.000 0.848 0.124 0.028 0.000 0.000
#> SRR1663241 1 0.1327 0.829 0.936 0.000 0.000 0.000 0.064 0.000
#> SRR1663242 2 0.4683 0.352 0.000 0.628 0.056 0.004 0.312 0.000
#> SRR1663243 2 0.4200 0.564 0.004 0.716 0.032 0.008 0.240 0.000
#> SRR1663244 4 0.4548 0.647 0.000 0.116 0.008 0.720 0.156 0.000
#> SRR1663246 3 0.2383 0.824 0.000 0.024 0.880 0.096 0.000 0.000
#> SRR1663245 2 0.3941 0.596 0.000 0.744 0.044 0.004 0.208 0.000
#> SRR1663247 1 0.1444 0.828 0.928 0.000 0.000 0.000 0.072 0.000
#> SRR1663248 6 0.2262 0.436 0.000 0.080 0.000 0.008 0.016 0.896
#> SRR1663250 4 0.4190 0.588 0.000 0.000 0.140 0.760 0.088 0.012
#> SRR1663249 4 0.2767 0.681 0.000 0.016 0.024 0.876 0.080 0.004
#> SRR1663251 1 0.1528 0.822 0.936 0.000 0.016 0.000 0.048 0.000
#> SRR1663252 4 0.2915 0.668 0.000 0.184 0.000 0.808 0.008 0.000
#> SRR1663253 4 0.2234 0.703 0.000 0.124 0.004 0.872 0.000 0.000
#> SRR1663254 1 0.3448 0.749 0.832 0.000 0.000 0.056 0.024 0.088
#> SRR1663255 4 0.3110 0.667 0.000 0.196 0.012 0.792 0.000 0.000
#> SRR1663256 4 0.1572 0.705 0.000 0.036 0.028 0.936 0.000 0.000
#> SRR1663259 2 0.2320 0.734 0.000 0.892 0.024 0.000 0.080 0.004
#> SRR1663258 4 0.3716 0.614 0.000 0.248 0.000 0.732 0.008 0.012
#> SRR1663257 2 0.6204 -0.586 0.000 0.372 0.004 0.000 0.352 0.272
#> SRR1663263 3 0.3103 0.587 0.000 0.208 0.784 0.000 0.008 0.000
#> SRR1663260 4 0.3586 0.639 0.000 0.216 0.028 0.756 0.000 0.000
#> SRR1663262 2 0.3029 0.691 0.000 0.840 0.120 0.000 0.036 0.004
#> SRR1663261 4 0.2911 0.642 0.000 0.000 0.008 0.856 0.036 0.100
#> SRR1663265 2 0.1921 0.743 0.000 0.916 0.032 0.000 0.052 0.000
#> SRR1663266 2 0.4047 0.414 0.000 0.676 0.296 0.000 0.028 0.000
#> SRR1663267 1 0.0547 0.832 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR1663264 4 0.5492 0.349 0.000 0.376 0.132 0.492 0.000 0.000
#> SRR1663268 4 0.5275 0.520 0.000 0.232 0.168 0.600 0.000 0.000
#> SRR1663269 3 0.3404 0.802 0.000 0.024 0.832 0.112 0.028 0.004
#> SRR1663271 2 0.0622 0.762 0.000 0.980 0.012 0.000 0.008 0.000
#> SRR1663270 3 0.2006 0.787 0.000 0.104 0.892 0.000 0.004 0.000
#> SRR1663273 3 0.0725 0.839 0.000 0.012 0.976 0.012 0.000 0.000
#> SRR1663272 3 0.3894 0.544 0.000 0.000 0.664 0.324 0.004 0.008
#> SRR1663275 2 0.1138 0.760 0.000 0.960 0.000 0.004 0.012 0.024
#> SRR1663274 1 0.0820 0.827 0.972 0.000 0.012 0.000 0.016 0.000
#> SRR1663276 1 0.5531 0.343 0.560 0.000 0.012 0.000 0.116 0.312
#> SRR1663277 6 0.5311 0.422 0.224 0.000 0.012 0.000 0.136 0.628
#> SRR1663279 2 0.2504 0.724 0.000 0.880 0.088 0.000 0.028 0.004
#> SRR1663278 2 0.1938 0.744 0.000 0.920 0.036 0.000 0.040 0.004
#> SRR1663280 2 0.2633 0.753 0.000 0.888 0.044 0.028 0.040 0.000
#> SRR1663281 2 0.4347 0.504 0.000 0.668 0.004 0.040 0.288 0.000
#> SRR1663282 2 0.3969 0.539 0.000 0.700 0.012 0.012 0.276 0.000
#> SRR1663283 1 0.3652 0.680 0.672 0.000 0.000 0.004 0.324 0.000
#> SRR1663284 1 0.3652 0.680 0.672 0.000 0.000 0.004 0.324 0.000
#> SRR1663286 2 0.2791 0.724 0.000 0.852 0.000 0.124 0.008 0.016
#> SRR1663287 2 0.1765 0.749 0.000 0.904 0.000 0.096 0.000 0.000
#> SRR1663288 2 0.2195 0.754 0.000 0.904 0.000 0.068 0.016 0.012
#> SRR1663291 6 0.1490 0.482 0.008 0.000 0.004 0.016 0.024 0.948
#> SRR1663289 2 0.2266 0.739 0.000 0.880 0.000 0.108 0.012 0.000
#> SRR1663290 2 0.2170 0.744 0.000 0.888 0.000 0.100 0.012 0.000
#> SRR1663285 3 0.0865 0.841 0.000 0.036 0.964 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