Date: 2019-12-26 00:23:22 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 15546 rows and 81 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] 15546 81
The density distribution for each sample is visualized as in one column in the following heatmap. The clustering is based on the distance which is the Kolmogorov-Smirnov statistic between two distributions.
library(ComplexHeatmap)
densityHeatmap(mat, ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
mc.cores = 4)
Folowing table shows the best k
(number of partitions) for each combination
of top-value methods and partition methods. Clicking on the method name in
the table goes to the section for a single combination of methods.
The cola vignette explains the definition of the metrics used for determining the best number of partitions.
suggest_best_k(res_list)
The best k | 1-PAC | Mean silhouette | Concordance | Optional k | ||
---|---|---|---|---|---|---|
MAD:kmeans | 2 | 1.000 | 0.989 | 0.994 | ** | |
ATC:pam | 2 | 1.000 | 0.974 | 0.990 | ** | |
MAD:skmeans | 3 | 0.989 | 0.967 | 0.983 | ** | |
SD:skmeans | 3 | 0.983 | 0.960 | 0.983 | ** | 2 |
SD:NMF | 2 | 0.976 | 0.952 | 0.975 | ** | |
ATC:kmeans | 3 | 0.936 | 0.946 | 0.967 | * | 2 |
ATC:skmeans | 4 | 0.915 | 0.879 | 0.950 | * | 2 |
SD:pam | 5 | 0.908 | 0.865 | 0.944 | * | |
SD:kmeans | 2 | 0.876 | 0.952 | 0.974 | ||
MAD:NMF | 3 | 0.844 | 0.888 | 0.939 | ||
MAD:pam | 5 | 0.803 | 0.820 | 0.917 | ||
CV:skmeans | 2 | 0.778 | 0.857 | 0.940 | ||
ATC:mclust | 2 | 0.699 | 0.904 | 0.946 | ||
CV:pam | 4 | 0.650 | 0.807 | 0.904 | ||
SD:mclust | 2 | 0.601 | 0.879 | 0.935 | ||
MAD:mclust | 2 | 0.599 | 0.827 | 0.906 | ||
SD:hclust | 2 | 0.590 | 0.877 | 0.938 | ||
ATC:hclust | 2 | 0.563 | 0.775 | 0.907 | ||
CV:kmeans | 2 | 0.529 | 0.702 | 0.873 | ||
CV:mclust | 4 | 0.522 | 0.748 | 0.836 | ||
MAD:hclust | 5 | 0.508 | 0.641 | 0.761 | ||
ATC:NMF | 3 | 0.492 | 0.767 | 0.865 | ||
CV:NMF | 3 | 0.416 | 0.697 | 0.821 | ||
CV:hclust | 4 | 0.374 | 0.635 | 0.794 |
**: 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.976 0.952 0.975 0.351 0.664 0.664
#> CV:NMF 2 0.344 0.705 0.828 0.433 0.611 0.611
#> MAD:NMF 2 0.871 0.951 0.974 0.369 0.650 0.650
#> ATC:NMF 2 0.897 0.923 0.966 0.311 0.694 0.694
#> SD:skmeans 2 1.000 0.960 0.984 0.490 0.511 0.511
#> CV:skmeans 2 0.778 0.857 0.940 0.501 0.494 0.494
#> MAD:skmeans 2 0.877 0.955 0.980 0.491 0.511 0.511
#> ATC:skmeans 2 1.000 1.000 1.000 0.497 0.503 0.503
#> SD:mclust 2 0.601 0.879 0.935 0.469 0.516 0.516
#> CV:mclust 2 0.568 0.788 0.902 0.295 0.762 0.762
#> MAD:mclust 2 0.599 0.827 0.906 0.435 0.516 0.516
#> ATC:mclust 2 0.699 0.904 0.946 0.471 0.535 0.535
#> SD:kmeans 2 0.876 0.952 0.974 0.449 0.535 0.535
#> CV:kmeans 2 0.529 0.702 0.873 0.454 0.528 0.528
#> MAD:kmeans 2 1.000 0.989 0.994 0.471 0.528 0.528
#> ATC:kmeans 2 1.000 0.985 0.993 0.462 0.535 0.535
#> SD:pam 2 0.879 0.934 0.973 0.378 0.623 0.623
#> CV:pam 2 0.510 0.863 0.916 0.407 0.599 0.599
#> MAD:pam 2 0.848 0.912 0.962 0.416 0.588 0.588
#> ATC:pam 2 1.000 0.974 0.990 0.457 0.550 0.550
#> SD:hclust 2 0.590 0.877 0.938 0.424 0.568 0.568
#> CV:hclust 2 0.434 0.747 0.845 0.344 0.568 0.568
#> MAD:hclust 2 0.721 0.872 0.939 0.409 0.568 0.568
#> ATC:hclust 2 0.563 0.775 0.907 0.433 0.559 0.559
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.830 0.907 0.955 0.74302 0.699 0.554
#> CV:NMF 3 0.416 0.697 0.821 0.47801 0.680 0.506
#> MAD:NMF 3 0.844 0.888 0.939 0.69893 0.698 0.543
#> ATC:NMF 3 0.492 0.767 0.865 0.88773 0.610 0.469
#> SD:skmeans 3 0.983 0.960 0.983 0.33157 0.799 0.621
#> CV:skmeans 3 0.704 0.833 0.917 0.33765 0.762 0.553
#> MAD:skmeans 3 0.989 0.967 0.983 0.32527 0.813 0.644
#> ATC:skmeans 3 0.834 0.919 0.945 0.20970 0.881 0.765
#> SD:mclust 3 0.865 0.898 0.951 -0.00233 0.711 0.566
#> CV:mclust 3 0.306 0.665 0.822 0.83705 0.589 0.497
#> MAD:mclust 3 0.779 0.880 0.939 0.12818 0.695 0.544
#> ATC:mclust 3 0.571 0.716 0.838 0.08844 0.749 0.596
#> SD:kmeans 3 0.498 0.756 0.832 0.38494 0.809 0.650
#> CV:kmeans 3 0.427 0.645 0.797 0.33546 0.612 0.400
#> MAD:kmeans 3 0.530 0.719 0.788 0.34718 0.840 0.697
#> ATC:kmeans 3 0.936 0.946 0.967 0.39016 0.710 0.509
#> SD:pam 3 0.485 0.492 0.799 0.67621 0.709 0.541
#> CV:pam 3 0.490 0.741 0.866 0.41702 0.806 0.676
#> MAD:pam 3 0.424 0.461 0.733 0.54750 0.667 0.474
#> ATC:pam 3 0.814 0.905 0.957 0.43667 0.678 0.470
#> SD:hclust 3 0.513 0.784 0.871 0.31461 0.921 0.861
#> CV:hclust 3 0.292 0.594 0.721 0.54555 0.799 0.674
#> MAD:hclust 3 0.434 0.587 0.808 0.45934 0.858 0.750
#> ATC:hclust 3 0.564 0.727 0.861 0.42580 0.737 0.559
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.769 0.775 0.904 0.1713 0.804 0.549
#> CV:NMF 4 0.547 0.661 0.809 0.1375 0.816 0.553
#> MAD:NMF 4 0.754 0.779 0.902 0.1553 0.840 0.603
#> ATC:NMF 4 0.520 0.708 0.832 0.2060 0.801 0.540
#> SD:skmeans 4 0.705 0.637 0.767 0.1378 0.861 0.626
#> CV:skmeans 4 0.610 0.570 0.757 0.1068 0.920 0.767
#> MAD:skmeans 4 0.684 0.813 0.804 0.1427 0.845 0.592
#> ATC:skmeans 4 0.915 0.879 0.950 0.1301 0.921 0.800
#> SD:mclust 4 0.418 0.519 0.762 0.3722 0.746 0.555
#> CV:mclust 4 0.522 0.748 0.836 0.2723 0.672 0.407
#> MAD:mclust 4 0.420 0.364 0.685 0.3003 0.679 0.463
#> ATC:mclust 4 0.457 0.725 0.782 0.2619 0.657 0.391
#> SD:kmeans 4 0.601 0.743 0.840 0.1644 0.820 0.556
#> CV:kmeans 4 0.458 0.652 0.754 0.1561 0.783 0.510
#> MAD:kmeans 4 0.557 0.637 0.801 0.1431 0.820 0.559
#> ATC:kmeans 4 0.642 0.605 0.808 0.1337 0.782 0.472
#> SD:pam 4 0.603 0.737 0.843 0.1553 0.704 0.359
#> CV:pam 4 0.650 0.807 0.904 0.1432 0.831 0.628
#> MAD:pam 4 0.618 0.517 0.787 0.1468 0.685 0.328
#> ATC:pam 4 0.773 0.731 0.892 0.1091 0.803 0.520
#> SD:hclust 4 0.555 0.743 0.849 0.0986 0.937 0.871
#> CV:hclust 4 0.374 0.635 0.794 0.2011 0.726 0.500
#> MAD:hclust 4 0.435 0.566 0.764 0.0968 0.905 0.781
#> ATC:hclust 4 0.569 0.529 0.749 0.1421 0.796 0.525
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.698 0.773 0.861 0.0874 0.884 0.628
#> CV:NMF 5 0.517 0.451 0.709 0.0722 0.793 0.398
#> MAD:NMF 5 0.692 0.730 0.847 0.0763 0.855 0.547
#> ATC:NMF 5 0.511 0.544 0.737 0.0745 0.836 0.533
#> SD:skmeans 5 0.706 0.736 0.845 0.0758 0.870 0.552
#> CV:skmeans 5 0.635 0.484 0.734 0.0634 0.909 0.695
#> MAD:skmeans 5 0.658 0.650 0.821 0.0711 0.890 0.610
#> ATC:skmeans 5 0.830 0.772 0.895 0.0634 0.972 0.911
#> SD:mclust 5 0.433 0.531 0.710 0.0882 0.917 0.784
#> CV:mclust 5 0.618 0.720 0.799 0.0634 0.967 0.896
#> MAD:mclust 5 0.503 0.596 0.733 0.1226 0.711 0.368
#> ATC:mclust 5 0.542 0.671 0.784 0.1468 0.844 0.556
#> SD:kmeans 5 0.628 0.685 0.776 0.0821 0.845 0.500
#> CV:kmeans 5 0.549 0.581 0.717 0.0876 0.884 0.631
#> MAD:kmeans 5 0.617 0.679 0.792 0.0800 0.861 0.542
#> ATC:kmeans 5 0.726 0.696 0.828 0.0829 0.911 0.673
#> SD:pam 5 0.908 0.865 0.944 0.0641 0.931 0.752
#> CV:pam 5 0.636 0.690 0.845 0.0891 0.947 0.843
#> MAD:pam 5 0.803 0.820 0.917 0.0684 0.876 0.595
#> ATC:pam 5 0.803 0.752 0.895 0.0525 0.905 0.691
#> SD:hclust 5 0.509 0.597 0.777 0.1774 0.813 0.578
#> CV:hclust 5 0.430 0.631 0.773 0.0574 0.935 0.821
#> MAD:hclust 5 0.508 0.641 0.761 0.1322 0.845 0.591
#> ATC:hclust 5 0.626 0.508 0.727 0.1034 0.772 0.361
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.675 0.616 0.788 0.0317 0.917 0.673
#> CV:NMF 6 0.592 0.469 0.716 0.0443 0.904 0.618
#> MAD:NMF 6 0.670 0.609 0.788 0.0334 0.919 0.673
#> ATC:NMF 6 0.542 0.472 0.661 0.0494 0.952 0.821
#> SD:skmeans 6 0.743 0.728 0.822 0.0397 0.954 0.776
#> CV:skmeans 6 0.643 0.510 0.692 0.0399 0.894 0.578
#> MAD:skmeans 6 0.691 0.654 0.797 0.0410 0.910 0.612
#> ATC:skmeans 6 0.789 0.562 0.792 0.0378 0.941 0.805
#> SD:mclust 6 0.521 0.486 0.657 0.0714 0.790 0.438
#> CV:mclust 6 0.626 0.547 0.795 0.0497 0.903 0.690
#> MAD:mclust 6 0.500 0.358 0.656 0.0571 0.846 0.512
#> ATC:mclust 6 0.695 0.732 0.836 0.0639 0.964 0.841
#> SD:kmeans 6 0.649 0.559 0.725 0.0484 0.985 0.927
#> CV:kmeans 6 0.597 0.528 0.699 0.0533 0.925 0.689
#> MAD:kmeans 6 0.653 0.615 0.733 0.0471 0.965 0.840
#> ATC:kmeans 6 0.739 0.662 0.717 0.0413 0.890 0.542
#> SD:pam 6 0.754 0.529 0.788 0.0515 0.898 0.594
#> CV:pam 6 0.695 0.733 0.867 0.0527 0.919 0.734
#> MAD:pam 6 0.704 0.696 0.814 0.0472 0.882 0.524
#> ATC:pam 6 0.821 0.765 0.863 0.0524 0.906 0.648
#> SD:hclust 6 0.589 0.570 0.750 0.0991 0.910 0.669
#> CV:hclust 6 0.517 0.659 0.776 0.0799 0.986 0.955
#> MAD:hclust 6 0.582 0.598 0.751 0.0775 0.931 0.732
#> ATC:hclust 6 0.664 0.575 0.745 0.0379 0.902 0.591
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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.590 0.877 0.938 0.4237 0.568 0.568
#> 3 3 0.513 0.784 0.871 0.3146 0.921 0.861
#> 4 4 0.555 0.743 0.849 0.0986 0.937 0.871
#> 5 5 0.509 0.597 0.777 0.1774 0.813 0.578
#> 6 6 0.589 0.570 0.750 0.0991 0.910 0.669
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1560164 1 0.0000 0.890 1.000 0.000
#> SRR1560165 1 0.0000 0.890 1.000 0.000
#> SRR1560166 2 0.0000 0.946 0.000 1.000
#> SRR1560167 1 0.0000 0.890 1.000 0.000
#> SRR1560168 2 0.0000 0.946 0.000 1.000
#> SRR1560169 1 0.0000 0.890 1.000 0.000
#> SRR1560170 2 0.0000 0.946 0.000 1.000
#> SRR1560171 2 0.0000 0.946 0.000 1.000
#> SRR1560172 2 0.0000 0.946 0.000 1.000
#> SRR1560173 1 0.0000 0.890 1.000 0.000
#> SRR1560174 2 0.0000 0.946 0.000 1.000
#> SRR1560175 2 0.0000 0.946 0.000 1.000
#> SRR1560176 1 0.0000 0.890 1.000 0.000
#> SRR1560177 2 0.0000 0.946 0.000 1.000
#> SRR1560178 2 0.0000 0.946 0.000 1.000
#> SRR1560179 2 0.0000 0.946 0.000 1.000
#> SRR1560180 1 0.5178 0.866 0.884 0.116
#> SRR1560181 2 0.0000 0.946 0.000 1.000
#> SRR1560182 2 0.0000 0.946 0.000 1.000
#> SRR1560183 2 0.0000 0.946 0.000 1.000
#> SRR1560184 2 0.0000 0.946 0.000 1.000
#> SRR1560185 2 0.0000 0.946 0.000 1.000
#> SRR1560186 1 0.8207 0.735 0.744 0.256
#> SRR1560187 2 0.8713 0.600 0.292 0.708
#> SRR1560188 2 0.0938 0.939 0.012 0.988
#> SRR1560189 2 0.0938 0.939 0.012 0.988
#> SRR1560190 2 0.0000 0.946 0.000 1.000
#> SRR1560191 2 0.0000 0.946 0.000 1.000
#> SRR1560192 1 0.0000 0.890 1.000 0.000
#> SRR1560193 2 0.0000 0.946 0.000 1.000
#> SRR1560194 2 0.0000 0.946 0.000 1.000
#> SRR1560195 2 0.0000 0.946 0.000 1.000
#> SRR1560196 2 0.0000 0.946 0.000 1.000
#> SRR1560197 2 0.0000 0.946 0.000 1.000
#> SRR1560198 1 0.7219 0.803 0.800 0.200
#> SRR1560200 2 0.8443 0.635 0.272 0.728
#> SRR1560199 2 0.0000 0.946 0.000 1.000
#> SRR1560201 1 0.8909 0.633 0.692 0.308
#> SRR1560202 2 0.1414 0.934 0.020 0.980
#> SRR1560203 1 0.6148 0.844 0.848 0.152
#> SRR1560204 1 0.6148 0.844 0.848 0.152
#> SRR1560205 2 0.0000 0.946 0.000 1.000
#> SRR1560206 2 0.0376 0.944 0.004 0.996
#> SRR1560207 1 0.0000 0.890 1.000 0.000
#> SRR1560208 2 0.0000 0.946 0.000 1.000
#> SRR1560209 2 0.0000 0.946 0.000 1.000
#> SRR1560210 2 0.8081 0.677 0.248 0.752
#> SRR1560211 2 0.0000 0.946 0.000 1.000
#> SRR1560212 2 0.0000 0.946 0.000 1.000
#> SRR1560213 2 0.0000 0.946 0.000 1.000
#> SRR1560214 2 0.9000 0.557 0.316 0.684
#> SRR1560215 2 0.9000 0.557 0.316 0.684
#> SRR1560216 1 0.5178 0.865 0.884 0.116
#> SRR1560217 1 0.5178 0.865 0.884 0.116
#> SRR1560218 2 0.0000 0.946 0.000 1.000
#> SRR1560219 2 0.0000 0.946 0.000 1.000
#> SRR1560220 2 0.2043 0.924 0.032 0.968
#> SRR1560221 2 0.2043 0.924 0.032 0.968
#> SRR1560222 1 0.9358 0.556 0.648 0.352
#> SRR1560223 1 0.9358 0.556 0.648 0.352
#> SRR1560224 1 0.5408 0.854 0.876 0.124
#> SRR1560225 1 0.4431 0.864 0.908 0.092
#> SRR1560226 1 0.0000 0.890 1.000 0.000
#> SRR1560227 1 0.0000 0.890 1.000 0.000
#> SRR1560228 1 0.0000 0.890 1.000 0.000
#> SRR1560229 2 0.0376 0.944 0.004 0.996
#> SRR1560230 1 0.0000 0.890 1.000 0.000
#> SRR1560231 2 0.8144 0.671 0.252 0.748
#> SRR1560232 1 0.5178 0.866 0.884 0.116
#> SRR1560233 2 0.0000 0.946 0.000 1.000
#> SRR1560234 2 0.0000 0.946 0.000 1.000
#> SRR1560235 2 0.0000 0.946 0.000 1.000
#> SRR1560236 2 0.0000 0.946 0.000 1.000
#> SRR1560237 2 0.0000 0.946 0.000 1.000
#> SRR1560238 2 0.1184 0.936 0.016 0.984
#> SRR1560239 2 0.0000 0.946 0.000 1.000
#> SRR1560240 2 0.7056 0.756 0.192 0.808
#> SRR1560241 2 0.7056 0.756 0.192 0.808
#> SRR1560242 2 0.7056 0.756 0.192 0.808
#> SRR1560243 2 0.7056 0.756 0.192 0.808
#> SRR1560244 2 0.0000 0.946 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560166 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560167 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560168 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560169 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560170 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560171 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1560172 2 0.2625 0.834 0.000 0.916 0.084
#> SRR1560173 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560174 2 0.0237 0.845 0.000 0.996 0.004
#> SRR1560175 2 0.2625 0.834 0.000 0.916 0.084
#> SRR1560176 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560177 2 0.1753 0.837 0.000 0.952 0.048
#> SRR1560178 2 0.6307 0.178 0.000 0.512 0.488
#> SRR1560179 2 0.0592 0.844 0.000 0.988 0.012
#> SRR1560180 1 0.3532 0.812 0.884 0.008 0.108
#> SRR1560181 2 0.0424 0.845 0.000 0.992 0.008
#> SRR1560182 2 0.0424 0.845 0.000 0.992 0.008
#> SRR1560183 2 0.0424 0.845 0.000 0.992 0.008
#> SRR1560184 3 0.1753 1.000 0.000 0.048 0.952
#> SRR1560185 3 0.1753 1.000 0.000 0.048 0.952
#> SRR1560186 1 0.7059 0.673 0.716 0.192 0.092
#> SRR1560187 2 0.8513 0.535 0.264 0.596 0.140
#> SRR1560188 2 0.3043 0.831 0.008 0.908 0.084
#> SRR1560189 2 0.3043 0.831 0.008 0.908 0.084
#> SRR1560190 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560191 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560192 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560193 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560194 2 0.4654 0.764 0.000 0.792 0.208
#> SRR1560195 3 0.1753 1.000 0.000 0.048 0.952
#> SRR1560196 3 0.1753 1.000 0.000 0.048 0.952
#> SRR1560197 2 0.4654 0.764 0.000 0.792 0.208
#> SRR1560198 1 0.6299 0.752 0.772 0.132 0.096
#> SRR1560200 2 0.9271 0.449 0.244 0.528 0.228
#> SRR1560199 2 0.4654 0.764 0.000 0.792 0.208
#> SRR1560201 1 0.7640 0.594 0.664 0.240 0.096
#> SRR1560202 2 0.3771 0.822 0.012 0.876 0.112
#> SRR1560203 1 0.5407 0.799 0.820 0.076 0.104
#> SRR1560204 1 0.5407 0.799 0.820 0.076 0.104
#> SRR1560205 3 0.1753 1.000 0.000 0.048 0.952
#> SRR1560206 2 0.1129 0.847 0.004 0.976 0.020
#> SRR1560207 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560208 2 0.1753 0.837 0.000 0.952 0.048
#> SRR1560209 2 0.3482 0.817 0.000 0.872 0.128
#> SRR1560210 2 0.9431 0.409 0.220 0.500 0.280
#> SRR1560211 2 0.1753 0.837 0.000 0.952 0.048
#> SRR1560212 2 0.3482 0.817 0.000 0.872 0.128
#> SRR1560213 2 0.3879 0.805 0.000 0.848 0.152
#> SRR1560214 2 0.8677 0.501 0.288 0.572 0.140
#> SRR1560215 2 0.8677 0.501 0.288 0.572 0.140
#> SRR1560216 1 0.4526 0.817 0.856 0.040 0.104
#> SRR1560217 1 0.4526 0.817 0.856 0.040 0.104
#> SRR1560218 2 0.3879 0.805 0.000 0.848 0.152
#> SRR1560219 2 0.3879 0.805 0.000 0.848 0.152
#> SRR1560220 2 0.5553 0.720 0.004 0.724 0.272
#> SRR1560221 2 0.5553 0.720 0.004 0.724 0.272
#> SRR1560222 1 0.8075 0.539 0.620 0.276 0.104
#> SRR1560223 1 0.8075 0.539 0.620 0.276 0.104
#> SRR1560224 1 0.3910 0.794 0.876 0.104 0.020
#> SRR1560225 1 0.3030 0.811 0.904 0.092 0.004
#> SRR1560226 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560229 2 0.2066 0.841 0.000 0.940 0.060
#> SRR1560230 1 0.0000 0.857 1.000 0.000 0.000
#> SRR1560231 2 0.9461 0.401 0.224 0.496 0.280
#> SRR1560232 1 0.3532 0.812 0.884 0.008 0.108
#> SRR1560233 2 0.1964 0.838 0.000 0.944 0.056
#> SRR1560234 2 0.1964 0.838 0.000 0.944 0.056
#> SRR1560235 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560236 2 0.0892 0.844 0.000 0.980 0.020
#> SRR1560237 2 0.1964 0.838 0.000 0.944 0.056
#> SRR1560238 2 0.1636 0.841 0.016 0.964 0.020
#> SRR1560239 2 0.1753 0.837 0.000 0.952 0.048
#> SRR1560240 2 0.7319 0.676 0.164 0.708 0.128
#> SRR1560241 2 0.7319 0.676 0.164 0.708 0.128
#> SRR1560242 2 0.7441 0.675 0.164 0.700 0.136
#> SRR1560243 2 0.7441 0.675 0.164 0.700 0.136
#> SRR1560244 2 0.0424 0.845 0.000 0.992 0.008
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.2149 0.855 0.912 0.000 0.000 0.088
#> SRR1560165 1 0.2149 0.855 0.912 0.000 0.000 0.088
#> SRR1560166 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560167 1 0.0336 0.888 0.992 0.000 0.000 0.008
#> SRR1560168 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560169 1 0.0336 0.888 0.992 0.000 0.000 0.008
#> SRR1560170 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560171 2 0.0657 0.845 0.000 0.984 0.004 0.012
#> SRR1560172 2 0.3004 0.831 0.000 0.892 0.048 0.060
#> SRR1560173 1 0.0000 0.887 1.000 0.000 0.000 0.000
#> SRR1560174 2 0.0657 0.845 0.000 0.984 0.004 0.012
#> SRR1560175 2 0.3004 0.831 0.000 0.892 0.048 0.060
#> SRR1560176 4 0.3873 0.612 0.228 0.000 0.000 0.772
#> SRR1560177 2 0.1118 0.837 0.000 0.964 0.036 0.000
#> SRR1560178 3 0.4985 -0.106 0.000 0.468 0.532 0.000
#> SRR1560179 2 0.0000 0.844 0.000 1.000 0.000 0.000
#> SRR1560180 1 0.5363 0.650 0.720 0.000 0.064 0.216
#> SRR1560181 2 0.0707 0.848 0.000 0.980 0.000 0.020
#> SRR1560182 2 0.0707 0.848 0.000 0.980 0.000 0.020
#> SRR1560183 2 0.0707 0.848 0.000 0.980 0.000 0.020
#> SRR1560184 3 0.0188 0.828 0.000 0.004 0.996 0.000
#> SRR1560185 3 0.0188 0.828 0.000 0.004 0.996 0.000
#> SRR1560186 4 0.3852 0.683 0.012 0.180 0.000 0.808
#> SRR1560187 2 0.6581 0.468 0.028 0.560 0.036 0.376
#> SRR1560188 2 0.2908 0.832 0.000 0.896 0.040 0.064
#> SRR1560189 2 0.2908 0.832 0.000 0.896 0.040 0.064
#> SRR1560190 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560191 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560192 1 0.0336 0.888 0.992 0.000 0.000 0.008
#> SRR1560193 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560194 2 0.4745 0.727 0.000 0.756 0.208 0.036
#> SRR1560195 3 0.0188 0.828 0.000 0.004 0.996 0.000
#> SRR1560196 3 0.0188 0.828 0.000 0.004 0.996 0.000
#> SRR1560197 2 0.4745 0.727 0.000 0.756 0.208 0.036
#> SRR1560198 4 0.3366 0.728 0.028 0.096 0.004 0.872
#> SRR1560200 2 0.7868 0.398 0.036 0.512 0.128 0.324
#> SRR1560199 2 0.4745 0.727 0.000 0.756 0.208 0.036
#> SRR1560201 4 0.5564 0.620 0.076 0.216 0.000 0.708
#> SRR1560202 2 0.3414 0.822 0.004 0.876 0.072 0.048
#> SRR1560203 4 0.2319 0.731 0.036 0.040 0.000 0.924
#> SRR1560204 4 0.2319 0.731 0.036 0.040 0.000 0.924
#> SRR1560205 3 0.0188 0.828 0.000 0.004 0.996 0.000
#> SRR1560206 2 0.0779 0.848 0.004 0.980 0.000 0.016
#> SRR1560207 1 0.0000 0.887 1.000 0.000 0.000 0.000
#> SRR1560208 2 0.1118 0.837 0.000 0.964 0.036 0.000
#> SRR1560209 2 0.3286 0.818 0.000 0.876 0.080 0.044
#> SRR1560210 2 0.8229 0.372 0.036 0.484 0.180 0.300
#> SRR1560211 2 0.1118 0.837 0.000 0.964 0.036 0.000
#> SRR1560212 2 0.3286 0.818 0.000 0.876 0.080 0.044
#> SRR1560213 2 0.3024 0.794 0.000 0.852 0.148 0.000
#> SRR1560214 2 0.7372 0.437 0.068 0.536 0.044 0.352
#> SRR1560215 2 0.7372 0.437 0.068 0.536 0.044 0.352
#> SRR1560216 4 0.1978 0.712 0.068 0.004 0.000 0.928
#> SRR1560217 4 0.1978 0.712 0.068 0.004 0.000 0.928
#> SRR1560218 2 0.3024 0.794 0.000 0.852 0.148 0.000
#> SRR1560219 2 0.3024 0.794 0.000 0.852 0.148 0.000
#> SRR1560220 2 0.5548 0.699 0.000 0.716 0.200 0.084
#> SRR1560221 2 0.5548 0.699 0.000 0.716 0.200 0.084
#> SRR1560222 4 0.5234 0.597 0.032 0.256 0.004 0.708
#> SRR1560223 4 0.5234 0.597 0.032 0.256 0.004 0.708
#> SRR1560224 4 0.4900 0.677 0.116 0.092 0.004 0.788
#> SRR1560225 4 0.5875 0.625 0.224 0.092 0.000 0.684
#> SRR1560226 4 0.3873 0.612 0.228 0.000 0.000 0.772
#> SRR1560227 4 0.3873 0.612 0.228 0.000 0.000 0.772
#> SRR1560228 1 0.2149 0.855 0.912 0.000 0.000 0.088
#> SRR1560229 2 0.1798 0.842 0.000 0.944 0.040 0.016
#> SRR1560230 4 0.3873 0.612 0.228 0.000 0.000 0.772
#> SRR1560231 2 0.8242 0.363 0.036 0.480 0.180 0.304
#> SRR1560232 1 0.5363 0.650 0.720 0.000 0.064 0.216
#> SRR1560233 2 0.1584 0.839 0.000 0.952 0.036 0.012
#> SRR1560234 2 0.1584 0.839 0.000 0.952 0.036 0.012
#> SRR1560235 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560236 2 0.1109 0.846 0.000 0.968 0.004 0.028
#> SRR1560237 2 0.1584 0.839 0.000 0.952 0.036 0.012
#> SRR1560238 2 0.1489 0.843 0.000 0.952 0.004 0.044
#> SRR1560239 2 0.1118 0.837 0.000 0.964 0.036 0.000
#> SRR1560240 2 0.5461 0.666 0.012 0.712 0.036 0.240
#> SRR1560241 2 0.5461 0.666 0.012 0.712 0.036 0.240
#> SRR1560242 2 0.5514 0.666 0.012 0.712 0.040 0.236
#> SRR1560243 2 0.5514 0.666 0.012 0.712 0.040 0.236
#> SRR1560244 2 0.0188 0.845 0.000 0.996 0.000 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.2248 0.8441 0.900 0.000 0.000 0.088 0.012
#> SRR1560165 1 0.2248 0.8441 0.900 0.000 0.000 0.088 0.012
#> SRR1560166 2 0.4535 0.7090 0.000 0.748 0.000 0.092 0.160
#> SRR1560167 1 0.0451 0.8718 0.988 0.000 0.000 0.008 0.004
#> SRR1560168 2 0.4535 0.7090 0.000 0.748 0.000 0.092 0.160
#> SRR1560169 1 0.0451 0.8718 0.988 0.000 0.000 0.008 0.004
#> SRR1560170 2 0.4535 0.7090 0.000 0.748 0.000 0.092 0.160
#> SRR1560171 2 0.2563 0.7246 0.000 0.872 0.000 0.008 0.120
#> SRR1560172 2 0.4184 0.6415 0.000 0.764 0.040 0.004 0.192
#> SRR1560173 1 0.0404 0.8725 0.988 0.000 0.000 0.000 0.012
#> SRR1560174 2 0.2563 0.7246 0.000 0.872 0.000 0.008 0.120
#> SRR1560175 2 0.4184 0.6415 0.000 0.764 0.040 0.004 0.192
#> SRR1560176 4 0.2127 0.6503 0.108 0.000 0.000 0.892 0.000
#> SRR1560177 2 0.0880 0.7256 0.000 0.968 0.000 0.000 0.032
#> SRR1560178 3 0.4829 0.0464 0.000 0.484 0.496 0.000 0.020
#> SRR1560179 2 0.2605 0.7313 0.000 0.852 0.000 0.000 0.148
#> SRR1560180 1 0.4936 0.6168 0.684 0.000 0.048 0.008 0.260
#> SRR1560181 2 0.2852 0.7318 0.000 0.828 0.000 0.000 0.172
#> SRR1560182 2 0.2852 0.7318 0.000 0.828 0.000 0.000 0.172
#> SRR1560183 2 0.2852 0.7318 0.000 0.828 0.000 0.000 0.172
#> SRR1560184 3 0.0000 0.8523 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 0.8523 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 4 0.6188 0.4451 0.000 0.176 0.000 0.540 0.284
#> SRR1560187 5 0.2761 0.6064 0.000 0.104 0.000 0.024 0.872
#> SRR1560188 5 0.5794 0.1045 0.000 0.384 0.000 0.096 0.520
#> SRR1560189 5 0.5794 0.1045 0.000 0.384 0.000 0.096 0.520
#> SRR1560190 2 0.4587 0.7069 0.000 0.744 0.000 0.096 0.160
#> SRR1560191 2 0.4587 0.7069 0.000 0.744 0.000 0.096 0.160
#> SRR1560192 1 0.0451 0.8718 0.988 0.000 0.000 0.008 0.004
#> SRR1560193 2 0.4587 0.7069 0.000 0.744 0.000 0.096 0.160
#> SRR1560194 2 0.4335 0.5700 0.000 0.760 0.168 0.000 0.072
#> SRR1560195 3 0.0000 0.8523 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.8523 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 2 0.4335 0.5700 0.000 0.760 0.168 0.000 0.072
#> SRR1560198 4 0.5810 0.5596 0.000 0.088 0.004 0.544 0.364
#> SRR1560200 5 0.3823 0.5604 0.000 0.064 0.072 0.028 0.836
#> SRR1560199 2 0.4335 0.5700 0.000 0.760 0.168 0.000 0.072
#> SRR1560201 5 0.5886 -0.2861 0.040 0.036 0.000 0.380 0.544
#> SRR1560202 5 0.5071 0.1806 0.000 0.424 0.036 0.000 0.540
#> SRR1560203 4 0.5052 0.5998 0.000 0.036 0.000 0.552 0.412
#> SRR1560204 4 0.5052 0.5998 0.000 0.036 0.000 0.552 0.412
#> SRR1560205 3 0.0000 0.8523 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 2 0.2929 0.7258 0.000 0.820 0.000 0.000 0.180
#> SRR1560207 1 0.0404 0.8725 0.988 0.000 0.000 0.000 0.012
#> SRR1560208 2 0.0865 0.7236 0.000 0.972 0.000 0.004 0.024
#> SRR1560209 2 0.3634 0.6348 0.000 0.820 0.040 0.004 0.136
#> SRR1560210 5 0.3909 0.5331 0.000 0.064 0.124 0.004 0.808
#> SRR1560211 2 0.0865 0.7236 0.000 0.972 0.000 0.004 0.024
#> SRR1560212 2 0.3634 0.6348 0.000 0.820 0.040 0.004 0.136
#> SRR1560213 2 0.5884 0.1436 0.000 0.536 0.112 0.000 0.352
#> SRR1560214 5 0.2482 0.5759 0.016 0.064 0.000 0.016 0.904
#> SRR1560215 5 0.2482 0.5759 0.016 0.064 0.000 0.016 0.904
#> SRR1560216 4 0.4702 0.6127 0.016 0.000 0.000 0.552 0.432
#> SRR1560217 4 0.4702 0.6127 0.016 0.000 0.000 0.552 0.432
#> SRR1560218 2 0.5884 0.1436 0.000 0.536 0.112 0.000 0.352
#> SRR1560219 2 0.5884 0.1436 0.000 0.536 0.112 0.000 0.352
#> SRR1560220 5 0.5740 0.4652 0.000 0.244 0.144 0.000 0.612
#> SRR1560221 5 0.5740 0.4652 0.000 0.244 0.144 0.000 0.612
#> SRR1560222 5 0.5559 -0.1940 0.000 0.076 0.000 0.380 0.544
#> SRR1560223 5 0.5559 -0.1940 0.000 0.076 0.000 0.380 0.544
#> SRR1560224 4 0.0912 0.6372 0.000 0.016 0.000 0.972 0.012
#> SRR1560225 4 0.4123 0.6156 0.108 0.000 0.000 0.788 0.104
#> SRR1560226 4 0.2127 0.6503 0.108 0.000 0.000 0.892 0.000
#> SRR1560227 4 0.2127 0.6503 0.108 0.000 0.000 0.892 0.000
#> SRR1560228 1 0.2248 0.8441 0.900 0.000 0.000 0.088 0.012
#> SRR1560229 2 0.4958 0.2697 0.000 0.568 0.000 0.032 0.400
#> SRR1560230 4 0.2127 0.6503 0.108 0.000 0.000 0.892 0.000
#> SRR1560231 5 0.4031 0.5303 0.000 0.064 0.124 0.008 0.804
#> SRR1560232 1 0.4936 0.6168 0.684 0.000 0.048 0.008 0.260
#> SRR1560233 2 0.1952 0.7077 0.000 0.912 0.000 0.004 0.084
#> SRR1560234 2 0.1952 0.7077 0.000 0.912 0.000 0.004 0.084
#> SRR1560235 2 0.4624 0.7041 0.000 0.740 0.000 0.096 0.164
#> SRR1560236 2 0.4624 0.7041 0.000 0.740 0.000 0.096 0.164
#> SRR1560237 2 0.1952 0.7077 0.000 0.912 0.000 0.004 0.084
#> SRR1560238 2 0.4781 0.6961 0.000 0.728 0.000 0.112 0.160
#> SRR1560239 2 0.0794 0.7243 0.000 0.972 0.000 0.000 0.028
#> SRR1560240 5 0.3700 0.6136 0.000 0.240 0.000 0.008 0.752
#> SRR1560241 5 0.3700 0.6136 0.000 0.240 0.000 0.008 0.752
#> SRR1560242 5 0.3728 0.6110 0.000 0.244 0.000 0.008 0.748
#> SRR1560243 5 0.3728 0.6110 0.000 0.244 0.000 0.008 0.748
#> SRR1560244 2 0.2813 0.7285 0.000 0.832 0.000 0.000 0.168
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.1866 0.8539 0.908 0.000 0.000 0.008 0.000 0.084
#> SRR1560165 1 0.1866 0.8539 0.908 0.000 0.000 0.008 0.000 0.084
#> SRR1560166 5 0.0260 0.6622 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR1560167 1 0.0717 0.8744 0.976 0.016 0.000 0.000 0.000 0.008
#> SRR1560168 5 0.0260 0.6622 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR1560169 1 0.0717 0.8744 0.976 0.016 0.000 0.000 0.000 0.008
#> SRR1560170 5 0.0260 0.6622 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR1560171 2 0.3940 0.5950 0.000 0.640 0.000 0.012 0.348 0.000
#> SRR1560172 2 0.3175 0.7180 0.000 0.808 0.000 0.028 0.164 0.000
#> SRR1560173 1 0.0146 0.8753 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1560174 2 0.3940 0.5950 0.000 0.640 0.000 0.012 0.348 0.000
#> SRR1560175 2 0.3175 0.7180 0.000 0.808 0.000 0.028 0.164 0.000
#> SRR1560176 6 0.0291 0.6759 0.004 0.000 0.000 0.004 0.000 0.992
#> SRR1560177 5 0.3979 0.3758 0.000 0.360 0.000 0.012 0.628 0.000
#> SRR1560178 2 0.4646 0.1065 0.000 0.500 0.460 0.000 0.040 0.000
#> SRR1560179 5 0.3520 0.6124 0.000 0.188 0.000 0.036 0.776 0.000
#> SRR1560180 1 0.4657 0.6618 0.684 0.092 0.000 0.220 0.000 0.004
#> SRR1560181 5 0.3829 0.6116 0.000 0.180 0.000 0.060 0.760 0.000
#> SRR1560182 5 0.3829 0.6116 0.000 0.180 0.000 0.060 0.760 0.000
#> SRR1560183 5 0.3829 0.6116 0.000 0.180 0.000 0.060 0.760 0.000
#> SRR1560184 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 6 0.6366 0.4657 0.000 0.144 0.000 0.272 0.060 0.524
#> SRR1560187 4 0.2542 0.5834 0.000 0.044 0.000 0.876 0.080 0.000
#> SRR1560188 4 0.3998 0.1463 0.000 0.004 0.000 0.504 0.492 0.000
#> SRR1560189 4 0.3998 0.1463 0.000 0.004 0.000 0.504 0.492 0.000
#> SRR1560190 5 0.0146 0.6617 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR1560191 5 0.0146 0.6617 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR1560192 1 0.0717 0.8744 0.976 0.016 0.000 0.000 0.000 0.008
#> SRR1560193 5 0.0146 0.6617 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR1560194 2 0.5448 0.6380 0.000 0.644 0.128 0.032 0.196 0.000
#> SRR1560195 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 2 0.5448 0.6380 0.000 0.644 0.128 0.032 0.196 0.000
#> SRR1560198 6 0.5753 0.5424 0.000 0.104 0.000 0.348 0.024 0.524
#> SRR1560200 4 0.3787 0.5449 0.000 0.164 0.024 0.788 0.016 0.008
#> SRR1560199 2 0.5448 0.6380 0.000 0.644 0.128 0.032 0.196 0.000
#> SRR1560201 4 0.6298 -0.3019 0.040 0.032 0.000 0.520 0.068 0.340
#> SRR1560202 4 0.6115 0.2967 0.000 0.152 0.036 0.536 0.276 0.000
#> SRR1560203 6 0.5156 0.5740 0.000 0.036 0.000 0.412 0.028 0.524
#> SRR1560204 6 0.5156 0.5740 0.000 0.036 0.000 0.412 0.028 0.524
#> SRR1560205 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 5 0.4479 0.5558 0.000 0.236 0.000 0.080 0.684 0.000
#> SRR1560207 1 0.0146 0.8753 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1560208 5 0.4129 0.2136 0.000 0.424 0.000 0.012 0.564 0.000
#> SRR1560209 2 0.2019 0.7145 0.000 0.900 0.000 0.012 0.088 0.000
#> SRR1560210 4 0.4051 0.5388 0.000 0.164 0.076 0.756 0.000 0.004
#> SRR1560211 5 0.4129 0.2136 0.000 0.424 0.000 0.012 0.564 0.000
#> SRR1560212 2 0.2019 0.7145 0.000 0.900 0.000 0.012 0.088 0.000
#> SRR1560213 5 0.7203 0.0888 0.000 0.184 0.112 0.332 0.372 0.000
#> SRR1560214 4 0.3448 0.5734 0.024 0.088 0.000 0.832 0.056 0.000
#> SRR1560215 4 0.3448 0.5734 0.024 0.088 0.000 0.832 0.056 0.000
#> SRR1560216 6 0.4979 0.5815 0.024 0.028 0.000 0.424 0.000 0.524
#> SRR1560217 6 0.4979 0.5815 0.024 0.028 0.000 0.424 0.000 0.524
#> SRR1560218 5 0.7203 0.0888 0.000 0.184 0.112 0.332 0.372 0.000
#> SRR1560219 5 0.7203 0.0888 0.000 0.184 0.112 0.332 0.372 0.000
#> SRR1560220 4 0.6186 0.4669 0.000 0.284 0.100 0.544 0.072 0.000
#> SRR1560221 4 0.6186 0.4669 0.000 0.284 0.100 0.544 0.072 0.000
#> SRR1560222 4 0.6062 -0.2530 0.000 0.064 0.000 0.516 0.080 0.340
#> SRR1560223 4 0.6062 -0.2530 0.000 0.064 0.000 0.516 0.080 0.340
#> SRR1560224 6 0.2092 0.6405 0.000 0.000 0.000 0.000 0.124 0.876
#> SRR1560225 6 0.2824 0.6259 0.004 0.020 0.000 0.020 0.084 0.872
#> SRR1560226 6 0.0146 0.6744 0.004 0.000 0.000 0.000 0.000 0.996
#> SRR1560227 6 0.0146 0.6744 0.004 0.000 0.000 0.000 0.000 0.996
#> SRR1560228 1 0.1866 0.8539 0.908 0.000 0.000 0.008 0.000 0.084
#> SRR1560229 5 0.5852 0.1409 0.000 0.196 0.000 0.364 0.440 0.000
#> SRR1560230 6 0.0291 0.6759 0.004 0.000 0.000 0.004 0.000 0.992
#> SRR1560231 4 0.4017 0.5362 0.000 0.160 0.076 0.760 0.000 0.004
#> SRR1560232 1 0.4657 0.6618 0.684 0.092 0.000 0.220 0.000 0.004
#> SRR1560233 2 0.3266 0.6642 0.000 0.728 0.000 0.000 0.272 0.000
#> SRR1560234 2 0.3266 0.6642 0.000 0.728 0.000 0.000 0.272 0.000
#> SRR1560235 5 0.0405 0.6585 0.000 0.008 0.000 0.004 0.988 0.000
#> SRR1560236 5 0.0405 0.6585 0.000 0.008 0.000 0.004 0.988 0.000
#> SRR1560237 2 0.3266 0.6642 0.000 0.728 0.000 0.000 0.272 0.000
#> SRR1560238 5 0.0603 0.6539 0.000 0.004 0.000 0.000 0.980 0.016
#> SRR1560239 5 0.4101 0.2805 0.000 0.408 0.000 0.012 0.580 0.000
#> SRR1560240 4 0.4079 0.6238 0.000 0.136 0.000 0.752 0.112 0.000
#> SRR1560241 4 0.4079 0.6238 0.000 0.136 0.000 0.752 0.112 0.000
#> SRR1560242 4 0.4162 0.6217 0.000 0.136 0.000 0.744 0.120 0.000
#> SRR1560243 4 0.4162 0.6217 0.000 0.136 0.000 0.744 0.120 0.000
#> SRR1560244 5 0.4357 0.5639 0.000 0.232 0.000 0.072 0.696 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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.876 0.952 0.974 0.4485 0.535 0.535
#> 3 3 0.498 0.756 0.832 0.3849 0.809 0.650
#> 4 4 0.601 0.743 0.840 0.1644 0.820 0.556
#> 5 5 0.628 0.685 0.776 0.0821 0.845 0.500
#> 6 6 0.649 0.559 0.725 0.0484 0.985 0.927
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1560164 1 0.0000 0.928 1.000 0.000
#> SRR1560165 1 0.0000 0.928 1.000 0.000
#> SRR1560166 2 0.0000 0.997 0.000 1.000
#> SRR1560167 1 0.0000 0.928 1.000 0.000
#> SRR1560168 2 0.0000 0.997 0.000 1.000
#> SRR1560169 1 0.0000 0.928 1.000 0.000
#> SRR1560170 2 0.0000 0.997 0.000 1.000
#> SRR1560171 2 0.0000 0.997 0.000 1.000
#> SRR1560172 2 0.0000 0.997 0.000 1.000
#> SRR1560173 1 0.0000 0.928 1.000 0.000
#> SRR1560174 2 0.0000 0.997 0.000 1.000
#> SRR1560175 2 0.0000 0.997 0.000 1.000
#> SRR1560176 1 0.0000 0.928 1.000 0.000
#> SRR1560177 2 0.0000 0.997 0.000 1.000
#> SRR1560178 2 0.0000 0.997 0.000 1.000
#> SRR1560179 2 0.0000 0.997 0.000 1.000
#> SRR1560180 1 0.0000 0.928 1.000 0.000
#> SRR1560181 2 0.0000 0.997 0.000 1.000
#> SRR1560182 2 0.0000 0.997 0.000 1.000
#> SRR1560183 2 0.0000 0.997 0.000 1.000
#> SRR1560184 2 0.0000 0.997 0.000 1.000
#> SRR1560185 2 0.0000 0.997 0.000 1.000
#> SRR1560186 1 0.8386 0.719 0.732 0.268
#> SRR1560187 2 0.5842 0.817 0.140 0.860
#> SRR1560188 2 0.0000 0.997 0.000 1.000
#> SRR1560189 2 0.0000 0.997 0.000 1.000
#> SRR1560190 2 0.0376 0.993 0.004 0.996
#> SRR1560191 2 0.0000 0.997 0.000 1.000
#> SRR1560192 1 0.0000 0.928 1.000 0.000
#> SRR1560193 2 0.0000 0.997 0.000 1.000
#> SRR1560194 2 0.0000 0.997 0.000 1.000
#> SRR1560195 2 0.0000 0.997 0.000 1.000
#> SRR1560196 2 0.0000 0.997 0.000 1.000
#> SRR1560197 2 0.0000 0.997 0.000 1.000
#> SRR1560198 1 0.0938 0.924 0.988 0.012
#> SRR1560200 1 0.6623 0.819 0.828 0.172
#> SRR1560199 2 0.0000 0.997 0.000 1.000
#> SRR1560201 1 0.0000 0.928 1.000 0.000
#> SRR1560202 2 0.0000 0.997 0.000 1.000
#> SRR1560203 1 0.0938 0.924 0.988 0.012
#> SRR1560204 1 0.0938 0.924 0.988 0.012
#> SRR1560205 2 0.0000 0.997 0.000 1.000
#> SRR1560206 2 0.0000 0.997 0.000 1.000
#> SRR1560207 1 0.0000 0.928 1.000 0.000
#> SRR1560208 2 0.0000 0.997 0.000 1.000
#> SRR1560209 2 0.0000 0.997 0.000 1.000
#> SRR1560210 2 0.0000 0.997 0.000 1.000
#> SRR1560211 2 0.0000 0.997 0.000 1.000
#> SRR1560212 2 0.0000 0.997 0.000 1.000
#> SRR1560213 2 0.0000 0.997 0.000 1.000
#> SRR1560214 1 0.8144 0.741 0.748 0.252
#> SRR1560215 2 0.0000 0.997 0.000 1.000
#> SRR1560216 1 0.0000 0.928 1.000 0.000
#> SRR1560217 1 0.0000 0.928 1.000 0.000
#> SRR1560218 2 0.0000 0.997 0.000 1.000
#> SRR1560219 2 0.0000 0.997 0.000 1.000
#> SRR1560220 2 0.0000 0.997 0.000 1.000
#> SRR1560221 2 0.0000 0.997 0.000 1.000
#> SRR1560222 1 0.7883 0.759 0.764 0.236
#> SRR1560223 1 0.8207 0.736 0.744 0.256
#> SRR1560224 1 0.7219 0.795 0.800 0.200
#> SRR1560225 1 0.0000 0.928 1.000 0.000
#> SRR1560226 1 0.0000 0.928 1.000 0.000
#> SRR1560227 1 0.0000 0.928 1.000 0.000
#> SRR1560228 1 0.0000 0.928 1.000 0.000
#> SRR1560229 2 0.0000 0.997 0.000 1.000
#> SRR1560230 1 0.0000 0.928 1.000 0.000
#> SRR1560231 2 0.0000 0.997 0.000 1.000
#> SRR1560232 1 0.0000 0.928 1.000 0.000
#> SRR1560233 2 0.0000 0.997 0.000 1.000
#> SRR1560234 2 0.0000 0.997 0.000 1.000
#> SRR1560235 2 0.0000 0.997 0.000 1.000
#> SRR1560236 2 0.0000 0.997 0.000 1.000
#> SRR1560237 2 0.0000 0.997 0.000 1.000
#> SRR1560238 2 0.0000 0.997 0.000 1.000
#> SRR1560239 2 0.0000 0.997 0.000 1.000
#> SRR1560240 1 0.8386 0.719 0.732 0.268
#> SRR1560241 2 0.0000 0.997 0.000 1.000
#> SRR1560242 1 0.8386 0.719 0.732 0.268
#> SRR1560243 2 0.0000 0.997 0.000 1.000
#> SRR1560244 2 0.0000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.1289 0.781 0.968 0.000 0.032
#> SRR1560165 1 0.1289 0.781 0.968 0.000 0.032
#> SRR1560166 2 0.3686 0.849 0.000 0.860 0.140
#> SRR1560167 1 0.1289 0.781 0.968 0.000 0.032
#> SRR1560168 2 0.2959 0.836 0.000 0.900 0.100
#> SRR1560169 1 0.1289 0.781 0.968 0.000 0.032
#> SRR1560170 2 0.4002 0.850 0.000 0.840 0.160
#> SRR1560171 2 0.4062 0.849 0.000 0.836 0.164
#> SRR1560172 2 0.4062 0.849 0.000 0.836 0.164
#> SRR1560173 1 0.1289 0.781 0.968 0.000 0.032
#> SRR1560174 2 0.4062 0.849 0.000 0.836 0.164
#> SRR1560175 2 0.4291 0.845 0.000 0.820 0.180
#> SRR1560176 1 0.0237 0.786 0.996 0.000 0.004
#> SRR1560177 2 0.4235 0.842 0.000 0.824 0.176
#> SRR1560178 3 0.4002 0.844 0.000 0.160 0.840
#> SRR1560179 2 0.4062 0.849 0.000 0.836 0.164
#> SRR1560180 1 0.7333 0.717 0.708 0.136 0.156
#> SRR1560181 2 0.4346 0.795 0.000 0.816 0.184
#> SRR1560182 2 0.4178 0.847 0.000 0.828 0.172
#> SRR1560183 2 0.4346 0.795 0.000 0.816 0.184
#> SRR1560184 3 0.2537 0.912 0.000 0.080 0.920
#> SRR1560185 3 0.2537 0.912 0.000 0.080 0.920
#> SRR1560186 1 0.9666 0.524 0.448 0.324 0.228
#> SRR1560187 2 0.7493 0.395 0.136 0.696 0.168
#> SRR1560188 2 0.1411 0.753 0.000 0.964 0.036
#> SRR1560189 2 0.1411 0.753 0.000 0.964 0.036
#> SRR1560190 2 0.0000 0.772 0.000 1.000 0.000
#> SRR1560191 2 0.3551 0.848 0.000 0.868 0.132
#> SRR1560192 1 0.1289 0.781 0.968 0.000 0.032
#> SRR1560193 2 0.4002 0.850 0.000 0.840 0.160
#> SRR1560194 3 0.5882 0.527 0.000 0.348 0.652
#> SRR1560195 3 0.2261 0.913 0.000 0.068 0.932
#> SRR1560196 3 0.2261 0.913 0.000 0.068 0.932
#> SRR1560197 3 0.3267 0.891 0.000 0.116 0.884
#> SRR1560198 1 0.7564 0.711 0.692 0.152 0.156
#> SRR1560200 1 0.9048 0.621 0.540 0.288 0.172
#> SRR1560199 3 0.5760 0.576 0.000 0.328 0.672
#> SRR1560201 1 0.2711 0.784 0.912 0.088 0.000
#> SRR1560202 2 0.5327 0.548 0.000 0.728 0.272
#> SRR1560203 1 0.7742 0.681 0.632 0.288 0.080
#> SRR1560204 1 0.7798 0.675 0.624 0.296 0.080
#> SRR1560205 3 0.2537 0.912 0.000 0.080 0.920
#> SRR1560206 2 0.4346 0.845 0.000 0.816 0.184
#> SRR1560207 1 0.1529 0.782 0.960 0.000 0.040
#> SRR1560208 2 0.4178 0.843 0.000 0.828 0.172
#> SRR1560209 2 0.4062 0.849 0.000 0.836 0.164
#> SRR1560210 3 0.2537 0.912 0.000 0.080 0.920
#> SRR1560211 2 0.4178 0.843 0.000 0.828 0.172
#> SRR1560212 2 0.6126 0.382 0.000 0.600 0.400
#> SRR1560213 2 0.3879 0.850 0.000 0.848 0.152
#> SRR1560214 1 0.9089 0.605 0.524 0.312 0.164
#> SRR1560215 2 0.5521 0.591 0.032 0.788 0.180
#> SRR1560216 1 0.4371 0.777 0.860 0.108 0.032
#> SRR1560217 1 0.4995 0.769 0.824 0.144 0.032
#> SRR1560218 3 0.2796 0.908 0.000 0.092 0.908
#> SRR1560219 3 0.4002 0.863 0.000 0.160 0.840
#> SRR1560220 3 0.1643 0.892 0.000 0.044 0.956
#> SRR1560221 3 0.2796 0.901 0.000 0.092 0.908
#> SRR1560222 1 0.9105 0.490 0.448 0.412 0.140
#> SRR1560223 1 0.9108 0.483 0.444 0.416 0.140
#> SRR1560224 1 0.7940 0.548 0.524 0.416 0.060
#> SRR1560225 1 0.4047 0.775 0.848 0.148 0.004
#> SRR1560226 1 0.0237 0.786 0.996 0.000 0.004
#> SRR1560227 1 0.0237 0.786 0.996 0.000 0.004
#> SRR1560228 1 0.1289 0.781 0.968 0.000 0.032
#> SRR1560229 2 0.1860 0.756 0.000 0.948 0.052
#> SRR1560230 1 0.0237 0.786 0.996 0.000 0.004
#> SRR1560231 3 0.2261 0.913 0.000 0.068 0.932
#> SRR1560232 1 0.1753 0.781 0.952 0.000 0.048
#> SRR1560233 2 0.4062 0.845 0.000 0.836 0.164
#> SRR1560234 2 0.4399 0.830 0.000 0.812 0.188
#> SRR1560235 2 0.2448 0.828 0.000 0.924 0.076
#> SRR1560236 2 0.2448 0.828 0.000 0.924 0.076
#> SRR1560237 2 0.4235 0.842 0.000 0.824 0.176
#> SRR1560238 2 0.3038 0.840 0.000 0.896 0.104
#> SRR1560239 2 0.4235 0.842 0.000 0.824 0.176
#> SRR1560240 1 0.9364 0.481 0.432 0.400 0.168
#> SRR1560241 2 0.2537 0.736 0.000 0.920 0.080
#> SRR1560242 2 0.9191 -0.479 0.420 0.432 0.148
#> SRR1560243 2 0.1643 0.745 0.000 0.956 0.044
#> SRR1560244 2 0.4062 0.849 0.000 0.836 0.164
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.9300 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9300 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.3074 0.8067 0.000 0.848 0.000 0.152
#> SRR1560167 1 0.0188 0.9298 0.996 0.000 0.004 0.000
#> SRR1560168 2 0.3494 0.7902 0.000 0.824 0.004 0.172
#> SRR1560169 1 0.0188 0.9298 0.996 0.000 0.004 0.000
#> SRR1560170 2 0.1406 0.8591 0.000 0.960 0.024 0.016
#> SRR1560171 2 0.1406 0.8591 0.000 0.960 0.024 0.016
#> SRR1560172 2 0.2282 0.8450 0.000 0.924 0.024 0.052
#> SRR1560173 1 0.0188 0.9298 0.996 0.000 0.004 0.000
#> SRR1560174 2 0.1406 0.8591 0.000 0.960 0.024 0.016
#> SRR1560175 2 0.4238 0.7263 0.000 0.796 0.028 0.176
#> SRR1560176 1 0.1975 0.9106 0.936 0.000 0.016 0.048
#> SRR1560177 2 0.2313 0.8537 0.000 0.924 0.044 0.032
#> SRR1560178 3 0.2949 0.8362 0.000 0.088 0.888 0.024
#> SRR1560179 2 0.2036 0.8575 0.000 0.936 0.032 0.032
#> SRR1560180 4 0.4950 0.6846 0.148 0.020 0.044 0.788
#> SRR1560181 2 0.5453 0.4583 0.000 0.592 0.020 0.388
#> SRR1560182 2 0.2871 0.8413 0.000 0.896 0.032 0.072
#> SRR1560183 2 0.5453 0.4583 0.000 0.592 0.020 0.388
#> SRR1560184 3 0.1706 0.8400 0.000 0.016 0.948 0.036
#> SRR1560185 3 0.1706 0.8400 0.000 0.016 0.948 0.036
#> SRR1560186 4 0.4356 0.7125 0.072 0.008 0.092 0.828
#> SRR1560187 4 0.1398 0.7312 0.000 0.040 0.004 0.956
#> SRR1560188 4 0.5158 0.0378 0.000 0.472 0.004 0.524
#> SRR1560189 4 0.5158 0.0378 0.000 0.472 0.004 0.524
#> SRR1560190 2 0.3356 0.7906 0.000 0.824 0.000 0.176
#> SRR1560191 2 0.3123 0.8043 0.000 0.844 0.000 0.156
#> SRR1560192 1 0.0188 0.9298 0.996 0.000 0.004 0.000
#> SRR1560193 2 0.1406 0.8591 0.000 0.960 0.024 0.016
#> SRR1560194 3 0.6101 0.4753 0.000 0.388 0.560 0.052
#> SRR1560195 3 0.1406 0.8408 0.000 0.016 0.960 0.024
#> SRR1560196 3 0.1406 0.8408 0.000 0.016 0.960 0.024
#> SRR1560197 3 0.4590 0.8092 0.000 0.148 0.792 0.060
#> SRR1560198 4 0.4644 0.6816 0.164 0.004 0.044 0.788
#> SRR1560200 4 0.4277 0.7201 0.092 0.024 0.044 0.840
#> SRR1560199 3 0.6090 0.4829 0.000 0.384 0.564 0.052
#> SRR1560201 1 0.5193 0.1202 0.580 0.000 0.008 0.412
#> SRR1560202 4 0.4468 0.6049 0.000 0.232 0.016 0.752
#> SRR1560203 4 0.4255 0.6778 0.200 0.008 0.008 0.784
#> SRR1560204 4 0.4216 0.6810 0.196 0.008 0.008 0.788
#> SRR1560205 3 0.1706 0.8400 0.000 0.016 0.948 0.036
#> SRR1560206 2 0.4692 0.6987 0.000 0.756 0.032 0.212
#> SRR1560207 1 0.1151 0.9177 0.968 0.000 0.008 0.024
#> SRR1560208 2 0.2214 0.8525 0.000 0.928 0.044 0.028
#> SRR1560209 2 0.2751 0.8217 0.000 0.904 0.040 0.056
#> SRR1560210 3 0.3051 0.8375 0.000 0.028 0.884 0.088
#> SRR1560211 2 0.2313 0.8519 0.000 0.924 0.044 0.032
#> SRR1560212 2 0.4514 0.6924 0.000 0.796 0.148 0.056
#> SRR1560213 2 0.3806 0.8144 0.000 0.824 0.020 0.156
#> SRR1560214 4 0.4823 0.7138 0.092 0.048 0.044 0.816
#> SRR1560215 4 0.4088 0.6952 0.000 0.140 0.040 0.820
#> SRR1560216 4 0.4339 0.6474 0.224 0.004 0.008 0.764
#> SRR1560217 4 0.4339 0.6474 0.224 0.004 0.008 0.764
#> SRR1560218 3 0.4898 0.7777 0.000 0.104 0.780 0.116
#> SRR1560219 3 0.6049 0.6690 0.000 0.200 0.680 0.120
#> SRR1560220 3 0.3587 0.8217 0.000 0.040 0.856 0.104
#> SRR1560221 3 0.4568 0.8170 0.000 0.124 0.800 0.076
#> SRR1560222 4 0.4272 0.7052 0.048 0.108 0.012 0.832
#> SRR1560223 4 0.4218 0.7053 0.040 0.116 0.012 0.832
#> SRR1560224 4 0.5797 0.6583 0.068 0.184 0.020 0.728
#> SRR1560225 4 0.6239 0.1686 0.420 0.028 0.016 0.536
#> SRR1560226 1 0.2060 0.9086 0.932 0.000 0.016 0.052
#> SRR1560227 1 0.2060 0.9086 0.932 0.000 0.016 0.052
#> SRR1560228 1 0.0000 0.9300 1.000 0.000 0.000 0.000
#> SRR1560229 4 0.5105 0.3043 0.000 0.432 0.004 0.564
#> SRR1560230 1 0.2060 0.9086 0.932 0.000 0.016 0.052
#> SRR1560231 3 0.3601 0.8387 0.000 0.056 0.860 0.084
#> SRR1560232 1 0.2032 0.8948 0.936 0.000 0.028 0.036
#> SRR1560233 2 0.2830 0.8519 0.000 0.900 0.040 0.060
#> SRR1560234 2 0.2759 0.8208 0.000 0.904 0.052 0.044
#> SRR1560235 2 0.3356 0.7906 0.000 0.824 0.000 0.176
#> SRR1560236 2 0.3356 0.7906 0.000 0.824 0.000 0.176
#> SRR1560237 2 0.1767 0.8456 0.000 0.944 0.044 0.012
#> SRR1560238 2 0.3448 0.7913 0.000 0.828 0.004 0.168
#> SRR1560239 2 0.2214 0.8535 0.000 0.928 0.044 0.028
#> SRR1560240 4 0.4873 0.7160 0.072 0.068 0.044 0.816
#> SRR1560241 4 0.4018 0.6602 0.000 0.224 0.004 0.772
#> SRR1560242 4 0.3547 0.7126 0.020 0.112 0.008 0.860
#> SRR1560243 4 0.3945 0.6279 0.000 0.216 0.004 0.780
#> SRR1560244 2 0.2644 0.8459 0.000 0.908 0.032 0.060
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.1018 0.900 0.968 0.000 0.000 0.016 0.016
#> SRR1560165 1 0.1018 0.900 0.968 0.000 0.000 0.016 0.016
#> SRR1560166 5 0.4446 0.407 0.000 0.400 0.000 0.008 0.592
#> SRR1560167 1 0.0162 0.898 0.996 0.000 0.004 0.000 0.000
#> SRR1560168 5 0.3607 0.628 0.000 0.244 0.000 0.004 0.752
#> SRR1560169 1 0.0162 0.898 0.996 0.000 0.004 0.000 0.000
#> SRR1560170 2 0.3427 0.718 0.000 0.796 0.000 0.012 0.192
#> SRR1560171 2 0.3318 0.726 0.000 0.808 0.000 0.012 0.180
#> SRR1560172 2 0.2540 0.746 0.000 0.888 0.000 0.024 0.088
#> SRR1560173 1 0.0162 0.898 0.996 0.000 0.004 0.000 0.000
#> SRR1560174 2 0.3355 0.723 0.000 0.804 0.000 0.012 0.184
#> SRR1560175 2 0.4645 0.600 0.000 0.724 0.000 0.204 0.072
#> SRR1560176 1 0.3622 0.857 0.820 0.000 0.000 0.056 0.124
#> SRR1560177 2 0.3239 0.743 0.000 0.828 0.004 0.012 0.156
#> SRR1560178 3 0.3318 0.739 0.000 0.180 0.808 0.000 0.012
#> SRR1560179 2 0.3880 0.742 0.000 0.784 0.004 0.028 0.184
#> SRR1560180 4 0.3724 0.853 0.088 0.032 0.004 0.844 0.032
#> SRR1560181 5 0.5082 0.592 0.000 0.244 0.004 0.072 0.680
#> SRR1560182 2 0.4039 0.729 0.000 0.776 0.004 0.036 0.184
#> SRR1560183 5 0.5082 0.592 0.000 0.244 0.004 0.072 0.680
#> SRR1560184 3 0.0727 0.799 0.000 0.004 0.980 0.004 0.012
#> SRR1560185 3 0.0727 0.799 0.000 0.004 0.980 0.004 0.012
#> SRR1560186 4 0.2462 0.874 0.004 0.008 0.008 0.900 0.080
#> SRR1560187 4 0.2516 0.833 0.000 0.000 0.000 0.860 0.140
#> SRR1560188 5 0.4630 0.661 0.000 0.176 0.000 0.088 0.736
#> SRR1560189 5 0.4630 0.661 0.000 0.176 0.000 0.088 0.736
#> SRR1560190 5 0.4152 0.593 0.000 0.296 0.000 0.012 0.692
#> SRR1560191 5 0.4310 0.428 0.000 0.392 0.000 0.004 0.604
#> SRR1560192 1 0.0162 0.898 0.996 0.000 0.004 0.000 0.000
#> SRR1560193 2 0.3618 0.715 0.000 0.788 0.004 0.012 0.196
#> SRR1560194 2 0.5216 0.281 0.000 0.644 0.300 0.016 0.040
#> SRR1560195 3 0.0324 0.800 0.000 0.004 0.992 0.004 0.000
#> SRR1560196 3 0.0324 0.800 0.000 0.004 0.992 0.004 0.000
#> SRR1560197 3 0.5460 0.523 0.000 0.364 0.580 0.016 0.040
#> SRR1560198 4 0.1630 0.882 0.036 0.000 0.004 0.944 0.016
#> SRR1560200 4 0.2388 0.881 0.004 0.012 0.004 0.904 0.076
#> SRR1560199 2 0.5216 0.281 0.000 0.644 0.300 0.016 0.040
#> SRR1560201 1 0.5312 0.572 0.648 0.000 0.000 0.256 0.096
#> SRR1560202 5 0.5560 0.622 0.000 0.136 0.012 0.176 0.676
#> SRR1560203 4 0.2921 0.842 0.020 0.000 0.000 0.856 0.124
#> SRR1560204 4 0.2921 0.842 0.020 0.000 0.000 0.856 0.124
#> SRR1560205 3 0.0727 0.799 0.000 0.004 0.980 0.004 0.012
#> SRR1560206 2 0.3771 0.688 0.000 0.804 0.004 0.156 0.036
#> SRR1560207 1 0.1864 0.871 0.924 0.000 0.004 0.068 0.004
#> SRR1560208 2 0.2416 0.764 0.000 0.888 0.000 0.012 0.100
#> SRR1560209 2 0.1403 0.764 0.000 0.952 0.000 0.024 0.024
#> SRR1560210 3 0.4192 0.777 0.000 0.132 0.800 0.040 0.028
#> SRR1560211 2 0.2470 0.765 0.000 0.884 0.000 0.012 0.104
#> SRR1560212 2 0.2745 0.720 0.000 0.896 0.052 0.028 0.024
#> SRR1560213 5 0.4884 0.366 0.000 0.404 0.004 0.020 0.572
#> SRR1560214 4 0.2095 0.881 0.004 0.052 0.004 0.924 0.016
#> SRR1560215 4 0.2264 0.877 0.000 0.060 0.004 0.912 0.024
#> SRR1560216 4 0.1800 0.877 0.048 0.000 0.000 0.932 0.020
#> SRR1560217 4 0.1725 0.878 0.044 0.000 0.000 0.936 0.020
#> SRR1560218 3 0.6405 0.259 0.000 0.112 0.480 0.016 0.392
#> SRR1560219 5 0.6915 -0.182 0.000 0.188 0.380 0.016 0.416
#> SRR1560220 3 0.5864 0.668 0.000 0.132 0.652 0.196 0.020
#> SRR1560221 3 0.5812 0.616 0.000 0.312 0.600 0.064 0.024
#> SRR1560222 5 0.4127 0.435 0.000 0.008 0.000 0.312 0.680
#> SRR1560223 5 0.4127 0.435 0.000 0.008 0.000 0.312 0.680
#> SRR1560224 5 0.4237 0.529 0.000 0.048 0.000 0.200 0.752
#> SRR1560225 5 0.5887 0.222 0.252 0.000 0.000 0.156 0.592
#> SRR1560226 1 0.4104 0.842 0.788 0.000 0.000 0.088 0.124
#> SRR1560227 1 0.4104 0.842 0.788 0.000 0.000 0.088 0.124
#> SRR1560228 1 0.0510 0.899 0.984 0.000 0.000 0.000 0.016
#> SRR1560229 4 0.4741 0.659 0.000 0.204 0.004 0.724 0.068
#> SRR1560230 1 0.4158 0.839 0.784 0.000 0.000 0.092 0.124
#> SRR1560231 3 0.5270 0.738 0.000 0.208 0.704 0.040 0.048
#> SRR1560232 1 0.2362 0.853 0.900 0.000 0.008 0.084 0.008
#> SRR1560233 2 0.4702 -0.169 0.000 0.552 0.000 0.016 0.432
#> SRR1560234 2 0.0854 0.766 0.000 0.976 0.004 0.012 0.008
#> SRR1560235 5 0.4152 0.593 0.000 0.296 0.000 0.012 0.692
#> SRR1560236 5 0.4152 0.593 0.000 0.296 0.000 0.012 0.692
#> SRR1560237 2 0.1877 0.777 0.000 0.924 0.000 0.012 0.064
#> SRR1560238 5 0.3838 0.604 0.000 0.280 0.000 0.004 0.716
#> SRR1560239 2 0.2864 0.760 0.000 0.852 0.000 0.012 0.136
#> SRR1560240 4 0.2757 0.874 0.004 0.060 0.004 0.892 0.040
#> SRR1560241 4 0.3216 0.842 0.000 0.096 0.004 0.856 0.044
#> SRR1560242 5 0.4283 0.403 0.000 0.008 0.000 0.348 0.644
#> SRR1560243 5 0.4983 0.545 0.000 0.064 0.000 0.272 0.664
#> SRR1560244 2 0.2983 0.772 0.000 0.868 0.004 0.032 0.096
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.1788 0.7651 0.916 0.000 0.000 0.004 0.004 0.076
#> SRR1560165 1 0.1788 0.7651 0.916 0.000 0.000 0.004 0.004 0.076
#> SRR1560166 5 0.3888 0.4115 0.000 0.252 0.000 0.000 0.716 0.032
#> SRR1560167 1 0.0363 0.7649 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1560168 5 0.2234 0.4577 0.000 0.124 0.000 0.000 0.872 0.004
#> SRR1560169 1 0.0363 0.7649 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1560170 2 0.3109 0.6413 0.000 0.772 0.000 0.000 0.224 0.004
#> SRR1560171 2 0.2902 0.6579 0.000 0.800 0.000 0.000 0.196 0.004
#> SRR1560172 2 0.2566 0.6865 0.000 0.868 0.000 0.012 0.112 0.008
#> SRR1560173 1 0.0291 0.7643 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR1560174 2 0.2933 0.6560 0.000 0.796 0.000 0.000 0.200 0.004
#> SRR1560175 2 0.4401 0.5744 0.000 0.740 0.000 0.180 0.036 0.044
#> SRR1560176 1 0.3634 0.5648 0.644 0.000 0.000 0.000 0.000 0.356
#> SRR1560177 2 0.4880 0.5873 0.000 0.620 0.000 0.000 0.092 0.288
#> SRR1560178 3 0.3752 0.6401 0.000 0.164 0.772 0.000 0.000 0.064
#> SRR1560179 2 0.5143 0.6402 0.000 0.680 0.000 0.032 0.108 0.180
#> SRR1560180 4 0.3873 0.7734 0.056 0.024 0.000 0.820 0.020 0.080
#> SRR1560181 5 0.6386 0.3972 0.000 0.104 0.000 0.072 0.480 0.344
#> SRR1560182 2 0.6188 0.5109 0.000 0.528 0.000 0.040 0.152 0.280
#> SRR1560183 5 0.6386 0.3972 0.000 0.104 0.000 0.072 0.480 0.344
#> SRR1560184 3 0.1194 0.7010 0.000 0.000 0.956 0.004 0.008 0.032
#> SRR1560185 3 0.1194 0.7010 0.000 0.000 0.956 0.004 0.008 0.032
#> SRR1560186 4 0.3283 0.8088 0.000 0.000 0.000 0.804 0.036 0.160
#> SRR1560187 4 0.3327 0.7766 0.000 0.000 0.000 0.820 0.088 0.092
#> SRR1560188 5 0.3368 0.4249 0.000 0.060 0.000 0.048 0.844 0.048
#> SRR1560189 5 0.3368 0.4249 0.000 0.060 0.000 0.048 0.844 0.048
#> SRR1560190 5 0.2845 0.4517 0.000 0.172 0.000 0.004 0.820 0.004
#> SRR1560191 5 0.3405 0.4040 0.000 0.272 0.000 0.000 0.724 0.004
#> SRR1560192 1 0.0363 0.7649 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1560193 2 0.3259 0.6451 0.000 0.772 0.000 0.000 0.216 0.012
#> SRR1560194 2 0.6615 0.2676 0.000 0.492 0.232 0.008 0.036 0.232
#> SRR1560195 3 0.0000 0.7054 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.7054 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 3 0.6948 0.1788 0.000 0.320 0.396 0.012 0.036 0.236
#> SRR1560198 4 0.2982 0.8200 0.008 0.000 0.000 0.828 0.012 0.152
#> SRR1560200 4 0.3455 0.7955 0.000 0.016 0.000 0.816 0.036 0.132
#> SRR1560199 2 0.6666 0.2761 0.000 0.488 0.216 0.008 0.040 0.248
#> SRR1560201 1 0.5585 0.4093 0.636 0.000 0.000 0.132 0.040 0.192
#> SRR1560202 5 0.5648 0.3712 0.000 0.056 0.000 0.068 0.592 0.284
#> SRR1560203 4 0.3863 0.7295 0.008 0.000 0.000 0.728 0.020 0.244
#> SRR1560204 4 0.3834 0.7291 0.004 0.000 0.000 0.728 0.024 0.244
#> SRR1560205 3 0.1116 0.7007 0.000 0.000 0.960 0.004 0.008 0.028
#> SRR1560206 2 0.4347 0.6398 0.000 0.756 0.000 0.152 0.036 0.056
#> SRR1560207 1 0.2367 0.7028 0.888 0.000 0.000 0.088 0.008 0.016
#> SRR1560208 2 0.3307 0.6907 0.000 0.820 0.000 0.000 0.072 0.108
#> SRR1560209 2 0.1498 0.6987 0.000 0.940 0.000 0.032 0.000 0.028
#> SRR1560210 3 0.6012 0.6292 0.000 0.128 0.640 0.064 0.016 0.152
#> SRR1560211 2 0.4046 0.6575 0.000 0.748 0.000 0.000 0.084 0.168
#> SRR1560212 2 0.3034 0.6546 0.000 0.868 0.032 0.036 0.004 0.060
#> SRR1560213 5 0.5977 0.3824 0.000 0.180 0.000 0.008 0.464 0.348
#> SRR1560214 4 0.0767 0.8312 0.000 0.012 0.000 0.976 0.004 0.008
#> SRR1560215 4 0.0862 0.8307 0.000 0.016 0.000 0.972 0.004 0.008
#> SRR1560216 4 0.2611 0.8176 0.008 0.000 0.000 0.864 0.012 0.116
#> SRR1560217 4 0.2611 0.8176 0.008 0.000 0.000 0.864 0.012 0.116
#> SRR1560218 5 0.7137 0.2720 0.000 0.080 0.140 0.016 0.384 0.380
#> SRR1560219 5 0.6989 0.3039 0.000 0.104 0.100 0.012 0.408 0.376
#> SRR1560220 3 0.6617 0.4529 0.000 0.072 0.484 0.316 0.004 0.124
#> SRR1560221 3 0.7179 0.4981 0.000 0.212 0.468 0.136 0.004 0.180
#> SRR1560222 5 0.5703 0.1364 0.004 0.004 0.000 0.172 0.560 0.260
#> SRR1560223 5 0.5703 0.1364 0.004 0.004 0.000 0.172 0.560 0.260
#> SRR1560224 5 0.4963 -0.5543 0.004 0.012 0.000 0.032 0.512 0.440
#> SRR1560225 6 0.6503 0.0000 0.184 0.000 0.000 0.036 0.376 0.404
#> SRR1560226 1 0.3992 0.5434 0.624 0.000 0.000 0.012 0.000 0.364
#> SRR1560227 1 0.3992 0.5434 0.624 0.000 0.000 0.012 0.000 0.364
#> SRR1560228 1 0.1471 0.7659 0.932 0.000 0.000 0.000 0.004 0.064
#> SRR1560229 4 0.4099 0.6756 0.000 0.148 0.000 0.768 0.068 0.016
#> SRR1560230 1 0.4047 0.5175 0.604 0.000 0.000 0.012 0.000 0.384
#> SRR1560231 3 0.7082 0.5676 0.000 0.180 0.492 0.084 0.016 0.228
#> SRR1560232 1 0.3548 0.6330 0.816 0.000 0.000 0.116 0.016 0.052
#> SRR1560233 2 0.6176 -0.0198 0.000 0.464 0.000 0.024 0.352 0.160
#> SRR1560234 2 0.0862 0.7129 0.000 0.972 0.000 0.004 0.008 0.016
#> SRR1560235 5 0.2814 0.4537 0.000 0.172 0.000 0.000 0.820 0.008
#> SRR1560236 5 0.2668 0.4559 0.000 0.168 0.000 0.000 0.828 0.004
#> SRR1560237 2 0.0777 0.7186 0.000 0.972 0.000 0.000 0.024 0.004
#> SRR1560238 5 0.2595 0.4579 0.000 0.160 0.000 0.000 0.836 0.004
#> SRR1560239 2 0.4403 0.6609 0.000 0.708 0.000 0.000 0.096 0.196
#> SRR1560240 4 0.2589 0.8163 0.000 0.028 0.000 0.888 0.024 0.060
#> SRR1560241 4 0.2724 0.8130 0.000 0.032 0.000 0.880 0.024 0.064
#> SRR1560242 5 0.5757 0.1673 0.004 0.004 0.000 0.192 0.556 0.244
#> SRR1560243 5 0.5582 0.2793 0.000 0.020 0.000 0.152 0.608 0.220
#> SRR1560244 2 0.3671 0.7009 0.000 0.816 0.000 0.028 0.056 0.100
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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.960 0.984 0.4897 0.511 0.511
#> 3 3 0.983 0.960 0.983 0.3316 0.799 0.621
#> 4 4 0.705 0.637 0.767 0.1378 0.861 0.626
#> 5 5 0.706 0.736 0.845 0.0758 0.870 0.552
#> 6 6 0.743 0.728 0.822 0.0397 0.954 0.776
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
#> SRR1560164 1 0.0000 0.9816 1.000 0.000
#> SRR1560165 1 0.0000 0.9816 1.000 0.000
#> SRR1560166 2 0.0000 0.9842 0.000 1.000
#> SRR1560167 1 0.0000 0.9816 1.000 0.000
#> SRR1560168 2 0.0000 0.9842 0.000 1.000
#> SRR1560169 1 0.0000 0.9816 1.000 0.000
#> SRR1560170 2 0.0000 0.9842 0.000 1.000
#> SRR1560171 2 0.0000 0.9842 0.000 1.000
#> SRR1560172 2 0.0000 0.9842 0.000 1.000
#> SRR1560173 1 0.0000 0.9816 1.000 0.000
#> SRR1560174 2 0.0000 0.9842 0.000 1.000
#> SRR1560175 2 0.7139 0.7554 0.196 0.804
#> SRR1560176 1 0.0000 0.9816 1.000 0.000
#> SRR1560177 2 0.0000 0.9842 0.000 1.000
#> SRR1560178 2 0.0000 0.9842 0.000 1.000
#> SRR1560179 2 0.0000 0.9842 0.000 1.000
#> SRR1560180 1 0.0000 0.9816 1.000 0.000
#> SRR1560181 2 0.0000 0.9842 0.000 1.000
#> SRR1560182 2 0.0000 0.9842 0.000 1.000
#> SRR1560183 2 0.0000 0.9842 0.000 1.000
#> SRR1560184 2 0.0000 0.9842 0.000 1.000
#> SRR1560185 2 0.0000 0.9842 0.000 1.000
#> SRR1560186 1 0.0000 0.9816 1.000 0.000
#> SRR1560187 1 0.0000 0.9816 1.000 0.000
#> SRR1560188 2 0.0672 0.9777 0.008 0.992
#> SRR1560189 2 0.0672 0.9777 0.008 0.992
#> SRR1560190 2 0.7528 0.7249 0.216 0.784
#> SRR1560191 2 0.0000 0.9842 0.000 1.000
#> SRR1560192 1 0.0000 0.9816 1.000 0.000
#> SRR1560193 2 0.0000 0.9842 0.000 1.000
#> SRR1560194 2 0.0000 0.9842 0.000 1.000
#> SRR1560195 2 0.0000 0.9842 0.000 1.000
#> SRR1560196 2 0.0000 0.9842 0.000 1.000
#> SRR1560197 2 0.0000 0.9842 0.000 1.000
#> SRR1560198 1 0.0000 0.9816 1.000 0.000
#> SRR1560200 1 0.0000 0.9816 1.000 0.000
#> SRR1560199 2 0.0000 0.9842 0.000 1.000
#> SRR1560201 1 0.0000 0.9816 1.000 0.000
#> SRR1560202 2 0.0000 0.9842 0.000 1.000
#> SRR1560203 1 0.0000 0.9816 1.000 0.000
#> SRR1560204 1 0.0000 0.9816 1.000 0.000
#> SRR1560205 2 0.0000 0.9842 0.000 1.000
#> SRR1560206 2 0.0000 0.9842 0.000 1.000
#> SRR1560207 1 0.0000 0.9816 1.000 0.000
#> SRR1560208 2 0.0000 0.9842 0.000 1.000
#> SRR1560209 2 0.0000 0.9842 0.000 1.000
#> SRR1560210 2 0.8443 0.6233 0.272 0.728
#> SRR1560211 2 0.0000 0.9842 0.000 1.000
#> SRR1560212 2 0.0000 0.9842 0.000 1.000
#> SRR1560213 2 0.0000 0.9842 0.000 1.000
#> SRR1560214 1 0.0000 0.9816 1.000 0.000
#> SRR1560215 1 0.0000 0.9816 1.000 0.000
#> SRR1560216 1 0.0000 0.9816 1.000 0.000
#> SRR1560217 1 0.0000 0.9816 1.000 0.000
#> SRR1560218 2 0.0000 0.9842 0.000 1.000
#> SRR1560219 2 0.0000 0.9842 0.000 1.000
#> SRR1560220 2 0.0000 0.9842 0.000 1.000
#> SRR1560221 2 0.0000 0.9842 0.000 1.000
#> SRR1560222 1 0.0000 0.9816 1.000 0.000
#> SRR1560223 1 0.0000 0.9816 1.000 0.000
#> SRR1560224 1 0.0000 0.9816 1.000 0.000
#> SRR1560225 1 0.0000 0.9816 1.000 0.000
#> SRR1560226 1 0.0000 0.9816 1.000 0.000
#> SRR1560227 1 0.0000 0.9816 1.000 0.000
#> SRR1560228 1 0.0000 0.9816 1.000 0.000
#> SRR1560229 2 0.1184 0.9703 0.016 0.984
#> SRR1560230 1 0.0000 0.9816 1.000 0.000
#> SRR1560231 2 0.0000 0.9842 0.000 1.000
#> SRR1560232 1 0.0000 0.9816 1.000 0.000
#> SRR1560233 2 0.0000 0.9842 0.000 1.000
#> SRR1560234 2 0.0000 0.9842 0.000 1.000
#> SRR1560235 2 0.0000 0.9842 0.000 1.000
#> SRR1560236 2 0.0000 0.9842 0.000 1.000
#> SRR1560237 2 0.0000 0.9842 0.000 1.000
#> SRR1560238 2 0.0000 0.9842 0.000 1.000
#> SRR1560239 2 0.0000 0.9842 0.000 1.000
#> SRR1560240 1 0.0000 0.9816 1.000 0.000
#> SRR1560241 1 0.4298 0.8891 0.912 0.088
#> SRR1560242 1 0.0000 0.9816 1.000 0.000
#> SRR1560243 1 0.9993 0.0376 0.516 0.484
#> SRR1560244 2 0.0000 0.9842 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560166 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560167 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560168 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560169 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560170 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560171 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560172 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560173 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560174 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560175 2 0.2796 0.884 0.092 0.908 0.000
#> SRR1560176 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560177 2 0.0237 0.976 0.000 0.996 0.004
#> SRR1560178 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560179 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560180 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560181 2 0.0892 0.966 0.000 0.980 0.020
#> SRR1560182 2 0.0892 0.966 0.000 0.980 0.020
#> SRR1560183 2 0.0892 0.966 0.000 0.980 0.020
#> SRR1560184 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560185 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560186 1 0.2448 0.915 0.924 0.000 0.076
#> SRR1560187 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560188 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560189 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560190 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560191 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560192 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560193 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560194 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560195 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560196 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560197 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560198 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560200 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560199 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560201 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560202 3 0.1529 0.932 0.000 0.040 0.960
#> SRR1560203 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560204 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560205 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560206 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560207 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560208 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560209 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560210 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560211 2 0.3551 0.852 0.000 0.868 0.132
#> SRR1560212 3 0.6225 0.196 0.000 0.432 0.568
#> SRR1560213 2 0.1411 0.954 0.000 0.964 0.036
#> SRR1560214 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560215 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560216 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560217 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560218 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560219 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560220 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560221 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560222 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560223 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560224 1 0.4062 0.797 0.836 0.164 0.000
#> SRR1560225 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560226 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560229 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560230 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560231 3 0.0000 0.969 0.000 0.000 1.000
#> SRR1560232 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560233 2 0.4062 0.812 0.000 0.836 0.164
#> SRR1560234 2 0.4062 0.814 0.000 0.836 0.164
#> SRR1560235 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560236 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560237 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560238 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560239 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560240 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560241 2 0.0424 0.972 0.008 0.992 0.000
#> SRR1560242 1 0.0000 0.991 1.000 0.000 0.000
#> SRR1560243 2 0.0000 0.978 0.000 1.000 0.000
#> SRR1560244 2 0.0000 0.978 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.4855 -0.240 0.000 0.600 0.000 0.400
#> SRR1560167 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560168 4 0.4955 0.552 0.000 0.444 0.000 0.556
#> SRR1560169 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.0000 0.738 0.000 1.000 0.000 0.000
#> SRR1560171 2 0.0000 0.738 0.000 1.000 0.000 0.000
#> SRR1560172 2 0.0469 0.738 0.000 0.988 0.000 0.012
#> SRR1560173 1 0.2011 0.802 0.920 0.000 0.000 0.080
#> SRR1560174 2 0.0000 0.738 0.000 1.000 0.000 0.000
#> SRR1560175 2 0.4699 0.498 0.004 0.676 0.000 0.320
#> SRR1560176 1 0.0188 0.817 0.996 0.000 0.000 0.004
#> SRR1560177 2 0.2563 0.710 0.000 0.908 0.020 0.072
#> SRR1560178 3 0.1118 0.906 0.000 0.036 0.964 0.000
#> SRR1560179 2 0.1211 0.732 0.000 0.960 0.000 0.040
#> SRR1560180 1 0.2345 0.797 0.900 0.000 0.000 0.100
#> SRR1560181 4 0.6209 0.407 0.000 0.456 0.052 0.492
#> SRR1560182 2 0.1635 0.731 0.000 0.948 0.008 0.044
#> SRR1560183 4 0.6209 0.407 0.000 0.456 0.052 0.492
#> SRR1560184 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560186 1 0.6160 0.661 0.612 0.000 0.072 0.316
#> SRR1560187 4 0.4994 -0.551 0.480 0.000 0.000 0.520
#> SRR1560188 4 0.4941 0.557 0.000 0.436 0.000 0.564
#> SRR1560189 4 0.4941 0.557 0.000 0.436 0.000 0.564
#> SRR1560190 4 0.4992 0.513 0.000 0.476 0.000 0.524
#> SRR1560191 2 0.4830 -0.210 0.000 0.608 0.000 0.392
#> SRR1560192 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.0000 0.738 0.000 1.000 0.000 0.000
#> SRR1560194 3 0.4072 0.653 0.000 0.252 0.748 0.000
#> SRR1560195 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560197 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560198 1 0.4304 0.725 0.716 0.000 0.000 0.284
#> SRR1560200 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560199 3 0.2973 0.805 0.000 0.144 0.856 0.000
#> SRR1560201 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560202 3 0.6134 0.233 0.004 0.040 0.532 0.424
#> SRR1560203 1 0.4500 0.709 0.684 0.000 0.000 0.316
#> SRR1560204 1 0.4500 0.709 0.684 0.000 0.000 0.316
#> SRR1560205 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560206 2 0.4331 0.546 0.000 0.712 0.000 0.288
#> SRR1560207 1 0.2281 0.798 0.904 0.000 0.000 0.096
#> SRR1560208 2 0.1474 0.706 0.000 0.948 0.000 0.052
#> SRR1560209 2 0.0469 0.738 0.000 0.988 0.000 0.012
#> SRR1560210 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560211 2 0.2483 0.710 0.000 0.916 0.032 0.052
#> SRR1560212 2 0.5093 0.368 0.000 0.640 0.348 0.012
#> SRR1560213 2 0.5750 -0.308 0.000 0.532 0.028 0.440
#> SRR1560214 1 0.4888 0.667 0.588 0.000 0.000 0.412
#> SRR1560215 1 0.6094 0.618 0.536 0.048 0.000 0.416
#> SRR1560216 1 0.4855 0.676 0.600 0.000 0.000 0.400
#> SRR1560217 1 0.4855 0.676 0.600 0.000 0.000 0.400
#> SRR1560218 3 0.1557 0.893 0.000 0.000 0.944 0.056
#> SRR1560219 3 0.2081 0.873 0.000 0.000 0.916 0.084
#> SRR1560220 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560221 3 0.1211 0.904 0.000 0.040 0.960 0.000
#> SRR1560222 4 0.4967 0.267 0.452 0.000 0.000 0.548
#> SRR1560223 4 0.4967 0.267 0.452 0.000 0.000 0.548
#> SRR1560224 4 0.6919 0.434 0.352 0.120 0.000 0.528
#> SRR1560225 1 0.4730 0.191 0.636 0.000 0.000 0.364
#> SRR1560226 1 0.0188 0.817 0.996 0.000 0.000 0.004
#> SRR1560227 1 0.0188 0.817 0.996 0.000 0.000 0.004
#> SRR1560228 1 0.0000 0.819 1.000 0.000 0.000 0.000
#> SRR1560229 2 0.4877 0.421 0.000 0.592 0.000 0.408
#> SRR1560230 1 0.0188 0.817 0.996 0.000 0.000 0.004
#> SRR1560231 3 0.0000 0.923 0.000 0.000 1.000 0.000
#> SRR1560232 1 0.2011 0.802 0.920 0.000 0.000 0.080
#> SRR1560233 2 0.3621 0.670 0.000 0.860 0.072 0.068
#> SRR1560234 2 0.3577 0.634 0.000 0.832 0.156 0.012
#> SRR1560235 4 0.5000 0.473 0.000 0.496 0.000 0.504
#> SRR1560236 4 0.4985 0.524 0.000 0.468 0.000 0.532
#> SRR1560237 2 0.0000 0.738 0.000 1.000 0.000 0.000
#> SRR1560238 4 0.4955 0.552 0.000 0.444 0.000 0.556
#> SRR1560239 2 0.2053 0.709 0.000 0.924 0.004 0.072
#> SRR1560240 1 0.5236 0.646 0.560 0.008 0.000 0.432
#> SRR1560241 2 0.5105 0.406 0.004 0.564 0.000 0.432
#> SRR1560242 4 0.4961 0.261 0.448 0.000 0.000 0.552
#> SRR1560243 4 0.5039 0.550 0.004 0.404 0.000 0.592
#> SRR1560244 2 0.1557 0.729 0.000 0.944 0.000 0.056
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.8598 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.8598 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 5 0.4309 0.6086 0.000 0.308 0.000 0.016 0.676
#> SRR1560167 1 0.0000 0.8598 1.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.2719 0.7403 0.000 0.144 0.000 0.004 0.852
#> SRR1560169 1 0.0000 0.8598 1.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.1341 0.8554 0.000 0.944 0.000 0.000 0.056
#> SRR1560171 2 0.0794 0.8649 0.000 0.972 0.000 0.000 0.028
#> SRR1560172 2 0.0609 0.8662 0.000 0.980 0.000 0.000 0.020
#> SRR1560173 1 0.2179 0.7811 0.888 0.000 0.000 0.112 0.000
#> SRR1560174 2 0.0794 0.8649 0.000 0.972 0.000 0.000 0.028
#> SRR1560175 2 0.2792 0.8349 0.016 0.884 0.000 0.084 0.016
#> SRR1560176 1 0.0963 0.8470 0.964 0.000 0.000 0.036 0.000
#> SRR1560177 2 0.3835 0.8056 0.000 0.796 0.000 0.048 0.156
#> SRR1560178 3 0.1792 0.8351 0.000 0.084 0.916 0.000 0.000
#> SRR1560179 2 0.3409 0.8257 0.000 0.824 0.000 0.032 0.144
#> SRR1560180 1 0.3274 0.6530 0.780 0.000 0.000 0.220 0.000
#> SRR1560181 5 0.5079 0.6380 0.000 0.068 0.068 0.108 0.756
#> SRR1560182 2 0.4677 0.7594 0.000 0.740 0.004 0.080 0.176
#> SRR1560183 5 0.5300 0.6279 0.000 0.088 0.064 0.108 0.740
#> SRR1560184 3 0.0000 0.8744 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 0.8744 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 4 0.5425 0.7286 0.196 0.000 0.100 0.688 0.016
#> SRR1560187 4 0.2719 0.7741 0.068 0.000 0.000 0.884 0.048
#> SRR1560188 5 0.2338 0.7399 0.000 0.112 0.000 0.004 0.884
#> SRR1560189 5 0.2338 0.7399 0.000 0.112 0.000 0.004 0.884
#> SRR1560190 5 0.3333 0.7191 0.000 0.208 0.000 0.004 0.788
#> SRR1560191 5 0.4009 0.6193 0.000 0.312 0.000 0.004 0.684
#> SRR1560192 1 0.0000 0.8598 1.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.1502 0.8554 0.000 0.940 0.000 0.004 0.056
#> SRR1560194 3 0.4722 0.3778 0.000 0.368 0.608 0.024 0.000
#> SRR1560195 3 0.0000 0.8744 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.8744 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 3 0.0955 0.8668 0.000 0.028 0.968 0.004 0.000
#> SRR1560198 4 0.4114 0.5903 0.376 0.000 0.000 0.624 0.000
#> SRR1560200 1 0.0963 0.8487 0.964 0.000 0.000 0.036 0.000
#> SRR1560199 3 0.4360 0.5697 0.000 0.284 0.692 0.024 0.000
#> SRR1560201 1 0.0000 0.8598 1.000 0.000 0.000 0.000 0.000
#> SRR1560202 5 0.6131 0.1883 0.000 0.012 0.356 0.100 0.532
#> SRR1560203 4 0.4206 0.7054 0.288 0.000 0.000 0.696 0.016
#> SRR1560204 4 0.4206 0.7054 0.288 0.000 0.000 0.696 0.016
#> SRR1560205 3 0.0000 0.8744 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 2 0.3355 0.8001 0.000 0.832 0.000 0.132 0.036
#> SRR1560207 1 0.2690 0.7327 0.844 0.000 0.000 0.156 0.000
#> SRR1560208 2 0.2491 0.8354 0.000 0.896 0.000 0.036 0.068
#> SRR1560209 2 0.0404 0.8689 0.000 0.988 0.000 0.000 0.012
#> SRR1560210 3 0.0000 0.8744 0.000 0.000 1.000 0.000 0.000
#> SRR1560211 2 0.2899 0.8318 0.000 0.880 0.008 0.036 0.076
#> SRR1560212 2 0.2561 0.7981 0.000 0.856 0.144 0.000 0.000
#> SRR1560213 5 0.5417 0.5902 0.000 0.164 0.036 0.088 0.712
#> SRR1560214 4 0.2471 0.8126 0.136 0.000 0.000 0.864 0.000
#> SRR1560215 4 0.3019 0.8025 0.088 0.048 0.000 0.864 0.000
#> SRR1560216 4 0.2648 0.8105 0.152 0.000 0.000 0.848 0.000
#> SRR1560217 4 0.2561 0.8123 0.144 0.000 0.000 0.856 0.000
#> SRR1560218 3 0.4867 0.6418 0.000 0.008 0.728 0.080 0.184
#> SRR1560219 3 0.5458 0.5661 0.000 0.016 0.668 0.080 0.236
#> SRR1560220 3 0.1121 0.8564 0.000 0.000 0.956 0.044 0.000
#> SRR1560221 3 0.2012 0.8459 0.000 0.060 0.920 0.020 0.000
#> SRR1560222 1 0.5761 0.1786 0.492 0.000 0.000 0.088 0.420
#> SRR1560223 1 0.5778 0.0960 0.464 0.000 0.000 0.088 0.448
#> SRR1560224 5 0.6365 0.2819 0.344 0.076 0.000 0.040 0.540
#> SRR1560225 1 0.3655 0.7150 0.804 0.000 0.000 0.036 0.160
#> SRR1560226 1 0.1043 0.8452 0.960 0.000 0.000 0.040 0.000
#> SRR1560227 1 0.1043 0.8452 0.960 0.000 0.000 0.040 0.000
#> SRR1560228 1 0.0000 0.8598 1.000 0.000 0.000 0.000 0.000
#> SRR1560229 4 0.4382 0.5275 0.000 0.288 0.000 0.688 0.024
#> SRR1560230 1 0.0963 0.8470 0.964 0.000 0.000 0.036 0.000
#> SRR1560231 3 0.0000 0.8744 0.000 0.000 1.000 0.000 0.000
#> SRR1560232 1 0.2230 0.7782 0.884 0.000 0.000 0.116 0.000
#> SRR1560233 2 0.4530 0.6824 0.000 0.768 0.036 0.032 0.164
#> SRR1560234 2 0.1851 0.8419 0.000 0.912 0.088 0.000 0.000
#> SRR1560235 5 0.3398 0.7139 0.000 0.216 0.000 0.004 0.780
#> SRR1560236 5 0.3231 0.7240 0.000 0.196 0.000 0.004 0.800
#> SRR1560237 2 0.0290 0.8695 0.000 0.992 0.000 0.000 0.008
#> SRR1560238 5 0.2891 0.7334 0.000 0.176 0.000 0.000 0.824
#> SRR1560239 2 0.3565 0.8146 0.000 0.816 0.000 0.040 0.144
#> SRR1560240 4 0.2818 0.8128 0.132 0.012 0.000 0.856 0.000
#> SRR1560241 4 0.3123 0.7134 0.000 0.160 0.000 0.828 0.012
#> SRR1560242 5 0.6133 -0.0855 0.416 0.008 0.000 0.100 0.476
#> SRR1560243 5 0.2396 0.6730 0.004 0.024 0.000 0.068 0.904
#> SRR1560244 2 0.2561 0.8415 0.000 0.884 0.000 0.020 0.096
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0291 0.902 0.992 0.000 0.000 0.004 0.004 0.000
#> SRR1560165 1 0.0291 0.902 0.992 0.000 0.000 0.004 0.004 0.000
#> SRR1560166 6 0.2651 0.823 0.000 0.112 0.000 0.000 0.028 0.860
#> SRR1560167 1 0.0000 0.902 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560168 6 0.1713 0.869 0.000 0.044 0.000 0.000 0.028 0.928
#> SRR1560169 1 0.0000 0.902 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.2841 0.766 0.000 0.824 0.000 0.000 0.012 0.164
#> SRR1560171 2 0.1753 0.802 0.000 0.912 0.000 0.000 0.004 0.084
#> SRR1560172 2 0.1493 0.803 0.000 0.936 0.000 0.004 0.004 0.056
#> SRR1560173 1 0.1411 0.871 0.936 0.004 0.000 0.060 0.000 0.000
#> SRR1560174 2 0.1753 0.802 0.000 0.912 0.000 0.000 0.004 0.084
#> SRR1560175 2 0.2438 0.768 0.004 0.892 0.000 0.076 0.020 0.008
#> SRR1560176 1 0.2537 0.850 0.880 0.000 0.000 0.024 0.088 0.008
#> SRR1560177 2 0.4591 0.511 0.000 0.552 0.000 0.000 0.408 0.040
#> SRR1560178 3 0.1867 0.828 0.000 0.064 0.916 0.000 0.020 0.000
#> SRR1560179 2 0.4710 0.622 0.000 0.632 0.000 0.012 0.312 0.044
#> SRR1560180 1 0.3090 0.774 0.828 0.004 0.000 0.140 0.028 0.000
#> SRR1560181 5 0.4880 0.530 0.000 0.024 0.036 0.012 0.676 0.252
#> SRR1560182 2 0.5275 0.377 0.000 0.480 0.004 0.016 0.452 0.048
#> SRR1560183 5 0.4880 0.530 0.000 0.024 0.036 0.012 0.676 0.252
#> SRR1560184 3 0.0260 0.858 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1560185 3 0.0260 0.858 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1560186 4 0.6149 0.641 0.124 0.004 0.064 0.628 0.168 0.012
#> SRR1560187 4 0.3334 0.716 0.024 0.004 0.000 0.832 0.120 0.020
#> SRR1560188 6 0.1151 0.841 0.000 0.012 0.000 0.000 0.032 0.956
#> SRR1560189 6 0.1151 0.841 0.000 0.012 0.000 0.000 0.032 0.956
#> SRR1560190 6 0.1471 0.882 0.000 0.064 0.000 0.000 0.004 0.932
#> SRR1560191 6 0.2312 0.836 0.000 0.112 0.000 0.000 0.012 0.876
#> SRR1560192 1 0.0000 0.902 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.3102 0.771 0.000 0.816 0.000 0.000 0.028 0.156
#> SRR1560194 3 0.5448 0.245 0.000 0.352 0.516 0.000 0.132 0.000
#> SRR1560195 3 0.0000 0.858 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.858 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 3 0.2257 0.784 0.000 0.008 0.876 0.000 0.116 0.000
#> SRR1560198 4 0.5144 0.576 0.284 0.000 0.000 0.612 0.096 0.008
#> SRR1560200 1 0.1321 0.888 0.952 0.004 0.000 0.024 0.020 0.000
#> SRR1560199 3 0.5331 0.424 0.000 0.268 0.580 0.000 0.152 0.000
#> SRR1560201 1 0.0291 0.902 0.992 0.000 0.000 0.004 0.004 0.000
#> SRR1560202 5 0.5512 0.593 0.000 0.008 0.196 0.024 0.648 0.124
#> SRR1560203 4 0.5045 0.672 0.156 0.000 0.000 0.688 0.132 0.024
#> SRR1560204 4 0.5011 0.674 0.152 0.000 0.000 0.692 0.132 0.024
#> SRR1560205 3 0.0260 0.858 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1560206 2 0.3780 0.733 0.000 0.800 0.000 0.116 0.068 0.016
#> SRR1560207 1 0.1897 0.851 0.908 0.004 0.000 0.084 0.004 0.000
#> SRR1560208 2 0.3784 0.749 0.000 0.776 0.000 0.000 0.144 0.080
#> SRR1560209 2 0.1363 0.802 0.000 0.952 0.004 0.004 0.012 0.028
#> SRR1560210 3 0.1498 0.840 0.000 0.032 0.940 0.000 0.028 0.000
#> SRR1560211 2 0.3982 0.738 0.000 0.764 0.004 0.000 0.156 0.076
#> SRR1560212 2 0.2398 0.769 0.000 0.888 0.088 0.004 0.016 0.004
#> SRR1560213 5 0.5013 0.522 0.000 0.076 0.028 0.000 0.672 0.224
#> SRR1560214 4 0.2017 0.758 0.048 0.008 0.000 0.920 0.020 0.004
#> SRR1560215 4 0.2102 0.755 0.032 0.024 0.000 0.920 0.020 0.004
#> SRR1560216 4 0.1714 0.764 0.092 0.000 0.000 0.908 0.000 0.000
#> SRR1560217 4 0.1556 0.766 0.080 0.000 0.000 0.920 0.000 0.000
#> SRR1560218 5 0.4193 0.338 0.000 0.008 0.384 0.000 0.600 0.008
#> SRR1560219 5 0.4276 0.434 0.000 0.016 0.304 0.000 0.664 0.016
#> SRR1560220 3 0.1225 0.843 0.000 0.000 0.952 0.036 0.012 0.000
#> SRR1560221 3 0.2342 0.833 0.000 0.040 0.904 0.024 0.032 0.000
#> SRR1560222 5 0.6134 0.440 0.228 0.000 0.000 0.048 0.564 0.160
#> SRR1560223 5 0.6113 0.443 0.224 0.000 0.000 0.048 0.568 0.160
#> SRR1560224 6 0.6096 0.247 0.148 0.000 0.000 0.060 0.208 0.584
#> SRR1560225 1 0.5081 0.651 0.688 0.000 0.000 0.028 0.128 0.156
#> SRR1560226 1 0.3275 0.812 0.828 0.000 0.000 0.044 0.120 0.008
#> SRR1560227 1 0.3275 0.812 0.828 0.000 0.000 0.044 0.120 0.008
#> SRR1560228 1 0.0146 0.902 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1560229 4 0.5251 0.466 0.000 0.280 0.000 0.624 0.040 0.056
#> SRR1560230 1 0.2911 0.832 0.856 0.000 0.000 0.036 0.100 0.008
#> SRR1560231 3 0.1092 0.849 0.000 0.020 0.960 0.000 0.020 0.000
#> SRR1560232 1 0.1982 0.859 0.912 0.004 0.000 0.068 0.016 0.000
#> SRR1560233 2 0.4809 0.573 0.000 0.664 0.012 0.000 0.072 0.252
#> SRR1560234 2 0.1251 0.801 0.000 0.956 0.024 0.000 0.012 0.008
#> SRR1560235 6 0.1531 0.880 0.000 0.068 0.000 0.000 0.004 0.928
#> SRR1560236 6 0.1471 0.882 0.000 0.064 0.000 0.000 0.004 0.932
#> SRR1560237 2 0.1088 0.805 0.000 0.960 0.000 0.000 0.016 0.024
#> SRR1560238 6 0.1411 0.880 0.000 0.060 0.000 0.000 0.004 0.936
#> SRR1560239 2 0.4219 0.659 0.000 0.660 0.000 0.000 0.304 0.036
#> SRR1560240 4 0.3741 0.727 0.056 0.032 0.000 0.828 0.072 0.012
#> SRR1560241 4 0.4073 0.660 0.000 0.128 0.000 0.772 0.088 0.012
#> SRR1560242 5 0.6169 0.476 0.148 0.016 0.000 0.056 0.616 0.164
#> SRR1560243 5 0.4718 0.448 0.000 0.016 0.000 0.036 0.624 0.324
#> SRR1560244 2 0.3386 0.760 0.000 0.824 0.000 0.032 0.124 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["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 15546 rows and 81 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 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.879 0.934 0.973 0.3782 0.623 0.623
#> 3 3 0.485 0.492 0.799 0.6762 0.709 0.541
#> 4 4 0.603 0.737 0.843 0.1553 0.704 0.359
#> 5 5 0.908 0.865 0.944 0.0641 0.931 0.752
#> 6 6 0.754 0.529 0.788 0.0515 0.898 0.594
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
#> SRR1560164 1 0.000 0.944 1.000 0.000
#> SRR1560165 1 0.000 0.944 1.000 0.000
#> SRR1560166 2 0.000 0.979 0.000 1.000
#> SRR1560167 1 0.000 0.944 1.000 0.000
#> SRR1560168 2 0.000 0.979 0.000 1.000
#> SRR1560169 1 0.000 0.944 1.000 0.000
#> SRR1560170 2 0.000 0.979 0.000 1.000
#> SRR1560171 2 0.000 0.979 0.000 1.000
#> SRR1560172 2 0.000 0.979 0.000 1.000
#> SRR1560173 1 0.000 0.944 1.000 0.000
#> SRR1560174 2 0.000 0.979 0.000 1.000
#> SRR1560175 2 0.000 0.979 0.000 1.000
#> SRR1560176 1 0.000 0.944 1.000 0.000
#> SRR1560177 2 0.000 0.979 0.000 1.000
#> SRR1560178 2 0.000 0.979 0.000 1.000
#> SRR1560179 2 0.000 0.979 0.000 1.000
#> SRR1560180 2 0.955 0.362 0.376 0.624
#> SRR1560181 2 0.000 0.979 0.000 1.000
#> SRR1560182 2 0.000 0.979 0.000 1.000
#> SRR1560183 2 0.000 0.979 0.000 1.000
#> SRR1560184 2 0.000 0.979 0.000 1.000
#> SRR1560185 2 0.000 0.979 0.000 1.000
#> SRR1560186 2 0.000 0.979 0.000 1.000
#> SRR1560187 2 0.000 0.979 0.000 1.000
#> SRR1560188 2 0.000 0.979 0.000 1.000
#> SRR1560189 2 0.000 0.979 0.000 1.000
#> SRR1560190 2 0.730 0.733 0.204 0.796
#> SRR1560191 2 0.000 0.979 0.000 1.000
#> SRR1560192 1 0.000 0.944 1.000 0.000
#> SRR1560193 2 0.000 0.979 0.000 1.000
#> SRR1560194 2 0.000 0.979 0.000 1.000
#> SRR1560195 2 0.000 0.979 0.000 1.000
#> SRR1560196 2 0.000 0.979 0.000 1.000
#> SRR1560197 2 0.000 0.979 0.000 1.000
#> SRR1560198 1 0.697 0.759 0.812 0.188
#> SRR1560200 2 0.000 0.979 0.000 1.000
#> SRR1560199 2 0.000 0.979 0.000 1.000
#> SRR1560201 1 0.000 0.944 1.000 0.000
#> SRR1560202 2 0.000 0.979 0.000 1.000
#> SRR1560203 1 0.988 0.247 0.564 0.436
#> SRR1560204 2 0.584 0.834 0.140 0.860
#> SRR1560205 2 0.000 0.979 0.000 1.000
#> SRR1560206 2 0.000 0.979 0.000 1.000
#> SRR1560207 1 0.000 0.944 1.000 0.000
#> SRR1560208 2 0.000 0.979 0.000 1.000
#> SRR1560209 2 0.000 0.979 0.000 1.000
#> SRR1560210 2 0.000 0.979 0.000 1.000
#> SRR1560211 2 0.000 0.979 0.000 1.000
#> SRR1560212 2 0.000 0.979 0.000 1.000
#> SRR1560213 2 0.000 0.979 0.000 1.000
#> SRR1560214 2 0.000 0.979 0.000 1.000
#> SRR1560215 2 0.000 0.979 0.000 1.000
#> SRR1560216 1 0.000 0.944 1.000 0.000
#> SRR1560217 1 0.000 0.944 1.000 0.000
#> SRR1560218 2 0.000 0.979 0.000 1.000
#> SRR1560219 2 0.000 0.979 0.000 1.000
#> SRR1560220 2 0.000 0.979 0.000 1.000
#> SRR1560221 2 0.000 0.979 0.000 1.000
#> SRR1560222 2 0.552 0.849 0.128 0.872
#> SRR1560223 2 0.552 0.849 0.128 0.872
#> SRR1560224 1 0.973 0.340 0.596 0.404
#> SRR1560225 1 0.000 0.944 1.000 0.000
#> SRR1560226 1 0.000 0.944 1.000 0.000
#> SRR1560227 1 0.000 0.944 1.000 0.000
#> SRR1560228 1 0.000 0.944 1.000 0.000
#> SRR1560229 2 0.000 0.979 0.000 1.000
#> SRR1560230 1 0.000 0.944 1.000 0.000
#> SRR1560231 2 0.000 0.979 0.000 1.000
#> SRR1560232 1 0.000 0.944 1.000 0.000
#> SRR1560233 2 0.000 0.979 0.000 1.000
#> SRR1560234 2 0.000 0.979 0.000 1.000
#> SRR1560235 2 0.000 0.979 0.000 1.000
#> SRR1560236 2 0.000 0.979 0.000 1.000
#> SRR1560237 2 0.000 0.979 0.000 1.000
#> SRR1560238 2 0.000 0.979 0.000 1.000
#> SRR1560239 2 0.000 0.979 0.000 1.000
#> SRR1560240 2 0.443 0.889 0.092 0.908
#> SRR1560241 2 0.000 0.979 0.000 1.000
#> SRR1560242 2 0.482 0.876 0.104 0.896
#> SRR1560243 2 0.000 0.979 0.000 1.000
#> SRR1560244 2 0.000 0.979 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560166 2 0.6204 0.2458 0.000 0.576 0.424
#> SRR1560167 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560168 2 0.5138 0.4883 0.000 0.748 0.252
#> SRR1560169 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560170 2 0.6302 0.1747 0.000 0.520 0.480
#> SRR1560171 3 0.6252 -0.1188 0.000 0.444 0.556
#> SRR1560172 3 0.1529 0.4864 0.000 0.040 0.960
#> SRR1560173 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560174 3 0.6305 -0.1735 0.000 0.484 0.516
#> SRR1560175 3 0.0237 0.4980 0.000 0.004 0.996
#> SRR1560176 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560177 2 0.3816 0.5904 0.000 0.852 0.148
#> SRR1560178 3 0.0892 0.5055 0.000 0.020 0.980
#> SRR1560179 2 0.6008 0.3817 0.000 0.628 0.372
#> SRR1560180 3 0.7013 0.3398 0.020 0.432 0.548
#> SRR1560181 2 0.2537 0.6371 0.000 0.920 0.080
#> SRR1560182 2 0.3551 0.6030 0.000 0.868 0.132
#> SRR1560183 2 0.0000 0.6619 0.000 1.000 0.000
#> SRR1560184 2 0.4974 0.4436 0.000 0.764 0.236
#> SRR1560185 2 0.4121 0.5636 0.000 0.832 0.168
#> SRR1560186 2 0.2356 0.6410 0.000 0.928 0.072
#> SRR1560187 2 0.0237 0.6607 0.000 0.996 0.004
#> SRR1560188 2 0.0892 0.6632 0.000 0.980 0.020
#> SRR1560189 2 0.0892 0.6632 0.000 0.980 0.020
#> SRR1560190 3 0.9488 -0.0576 0.184 0.392 0.424
#> SRR1560191 2 0.6204 0.2458 0.000 0.576 0.424
#> SRR1560192 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560193 2 0.6305 0.1693 0.000 0.516 0.484
#> SRR1560194 3 0.0892 0.5055 0.000 0.020 0.980
#> SRR1560195 3 0.6204 0.3596 0.000 0.424 0.576
#> SRR1560196 3 0.6204 0.3596 0.000 0.424 0.576
#> SRR1560197 3 0.6215 0.3551 0.000 0.428 0.572
#> SRR1560198 1 0.7278 0.2299 0.516 0.028 0.456
#> SRR1560200 2 0.1411 0.6449 0.000 0.964 0.036
#> SRR1560199 3 0.6204 0.3596 0.000 0.424 0.576
#> SRR1560201 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560202 2 0.0000 0.6619 0.000 1.000 0.000
#> SRR1560203 1 0.6295 0.0121 0.528 0.472 0.000
#> SRR1560204 2 0.3267 0.6047 0.116 0.884 0.000
#> SRR1560205 3 0.6215 0.3551 0.000 0.428 0.572
#> SRR1560206 2 0.6299 0.2351 0.000 0.524 0.476
#> SRR1560207 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560208 3 0.6307 -0.1789 0.000 0.488 0.512
#> SRR1560209 3 0.2711 0.4570 0.000 0.088 0.912
#> SRR1560210 2 0.6302 -0.2872 0.000 0.520 0.480
#> SRR1560211 2 0.2625 0.6403 0.000 0.916 0.084
#> SRR1560212 3 0.0892 0.5055 0.000 0.020 0.980
#> SRR1560213 2 0.3686 0.5976 0.000 0.860 0.140
#> SRR1560214 2 0.6299 -0.2435 0.000 0.524 0.476
#> SRR1560215 3 0.4605 0.4459 0.000 0.204 0.796
#> SRR1560216 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560217 1 0.5678 0.5684 0.684 0.000 0.316
#> SRR1560218 2 0.3192 0.6202 0.000 0.888 0.112
#> SRR1560219 2 0.3816 0.5908 0.000 0.852 0.148
#> SRR1560220 3 0.6204 0.3596 0.000 0.424 0.576
#> SRR1560221 3 0.4605 0.4564 0.000 0.204 0.796
#> SRR1560222 2 0.1031 0.6582 0.024 0.976 0.000
#> SRR1560223 2 0.1031 0.6582 0.024 0.976 0.000
#> SRR1560224 2 0.6299 0.0409 0.476 0.524 0.000
#> SRR1560225 1 0.1860 0.8734 0.948 0.052 0.000
#> SRR1560226 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560229 2 0.5431 0.4782 0.000 0.716 0.284
#> SRR1560230 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560231 3 0.6204 0.3596 0.000 0.424 0.576
#> SRR1560232 1 0.0000 0.9184 1.000 0.000 0.000
#> SRR1560233 2 0.4702 0.5665 0.000 0.788 0.212
#> SRR1560234 3 0.1031 0.5048 0.000 0.024 0.976
#> SRR1560235 2 0.5560 0.4301 0.000 0.700 0.300
#> SRR1560236 2 0.3340 0.6074 0.000 0.880 0.120
#> SRR1560237 3 0.6215 -0.1002 0.000 0.428 0.572
#> SRR1560238 2 0.6204 0.2458 0.000 0.576 0.424
#> SRR1560239 3 0.6252 -0.1019 0.000 0.444 0.556
#> SRR1560240 2 0.0892 0.6632 0.000 0.980 0.020
#> SRR1560241 2 0.5216 0.4859 0.000 0.740 0.260
#> SRR1560242 2 0.0892 0.6632 0.000 0.980 0.020
#> SRR1560243 2 0.0892 0.6632 0.000 0.980 0.020
#> SRR1560244 3 0.6252 -0.1266 0.000 0.444 0.556
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.000 0.7920 0.000 1.000 0.000 0.000
#> SRR1560167 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560168 3 0.460 0.6610 0.000 0.336 0.664 0.000
#> SRR1560169 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.000 0.7920 0.000 1.000 0.000 0.000
#> SRR1560171 2 0.312 0.8052 0.000 0.844 0.156 0.000
#> SRR1560172 2 0.312 0.8052 0.000 0.844 0.156 0.000
#> SRR1560173 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560174 2 0.281 0.8100 0.000 0.868 0.132 0.000
#> SRR1560175 2 0.340 0.6932 0.000 0.820 0.000 0.180
#> SRR1560176 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560177 3 0.130 0.7639 0.000 0.044 0.956 0.000
#> SRR1560178 2 0.725 0.5717 0.000 0.544 0.224 0.232
#> SRR1560179 3 0.281 0.7057 0.000 0.132 0.868 0.000
#> SRR1560180 4 0.000 0.8086 0.000 0.000 0.000 1.000
#> SRR1560181 3 0.121 0.7645 0.000 0.040 0.960 0.000
#> SRR1560182 3 0.130 0.7639 0.000 0.044 0.956 0.000
#> SRR1560183 3 0.384 0.7476 0.000 0.224 0.776 0.000
#> SRR1560184 3 0.234 0.7337 0.000 0.000 0.900 0.100
#> SRR1560185 3 0.102 0.7594 0.000 0.000 0.968 0.032
#> SRR1560186 3 0.340 0.6616 0.000 0.000 0.820 0.180
#> SRR1560187 3 0.384 0.6295 0.000 0.000 0.776 0.224
#> SRR1560188 3 0.384 0.7476 0.000 0.224 0.776 0.000
#> SRR1560189 3 0.384 0.7476 0.000 0.224 0.776 0.000
#> SRR1560190 2 0.000 0.7920 0.000 1.000 0.000 0.000
#> SRR1560191 2 0.000 0.7920 0.000 1.000 0.000 0.000
#> SRR1560192 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.112 0.8034 0.000 0.964 0.036 0.000
#> SRR1560194 2 0.692 0.6169 0.000 0.588 0.180 0.232
#> SRR1560195 3 0.391 0.6404 0.000 0.000 0.768 0.232
#> SRR1560196 3 0.394 0.6371 0.000 0.000 0.764 0.236
#> SRR1560197 3 0.512 0.6439 0.000 0.044 0.724 0.232
#> SRR1560198 4 0.173 0.8091 0.024 0.000 0.028 0.948
#> SRR1560200 3 0.480 0.7402 0.000 0.180 0.768 0.052
#> SRR1560199 3 0.512 0.6439 0.000 0.044 0.724 0.232
#> SRR1560201 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560202 3 0.373 0.7500 0.000 0.212 0.788 0.000
#> SRR1560203 4 0.391 0.7362 0.000 0.000 0.232 0.768
#> SRR1560204 4 0.391 0.7362 0.000 0.000 0.232 0.768
#> SRR1560205 3 0.391 0.6404 0.000 0.000 0.768 0.232
#> SRR1560206 3 0.514 0.5577 0.000 0.216 0.732 0.052
#> SRR1560207 4 0.394 0.6802 0.236 0.000 0.000 0.764
#> SRR1560208 2 0.187 0.8107 0.000 0.928 0.072 0.000
#> SRR1560209 2 0.426 0.7617 0.000 0.820 0.068 0.112
#> SRR1560210 3 0.692 0.6312 0.000 0.180 0.588 0.232
#> SRR1560211 3 0.247 0.7682 0.000 0.108 0.892 0.000
#> SRR1560212 2 0.692 0.6169 0.000 0.588 0.180 0.232
#> SRR1560213 3 0.130 0.7639 0.000 0.044 0.956 0.000
#> SRR1560214 4 0.000 0.8086 0.000 0.000 0.000 1.000
#> SRR1560215 4 0.000 0.8086 0.000 0.000 0.000 1.000
#> SRR1560216 4 0.391 0.6846 0.232 0.000 0.000 0.768
#> SRR1560217 4 0.253 0.7826 0.112 0.000 0.000 0.888
#> SRR1560218 3 0.201 0.7722 0.000 0.080 0.920 0.000
#> SRR1560219 3 0.000 0.7630 0.000 0.000 1.000 0.000
#> SRR1560220 4 0.000 0.8086 0.000 0.000 0.000 1.000
#> SRR1560221 4 0.179 0.7564 0.000 0.000 0.068 0.932
#> SRR1560222 3 0.464 0.7409 0.044 0.180 0.776 0.000
#> SRR1560223 3 0.460 0.7424 0.040 0.184 0.776 0.000
#> SRR1560224 1 0.763 -0.0888 0.428 0.208 0.364 0.000
#> SRR1560225 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560226 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560229 4 0.650 0.5922 0.000 0.216 0.148 0.636
#> SRR1560230 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560231 3 0.409 0.6420 0.000 0.004 0.764 0.232
#> SRR1560232 1 0.000 0.9509 1.000 0.000 0.000 0.000
#> SRR1560233 3 0.490 0.3601 0.000 0.416 0.584 0.000
#> SRR1560234 2 0.385 0.7902 0.000 0.808 0.180 0.012
#> SRR1560235 2 0.404 0.4223 0.000 0.752 0.248 0.000
#> SRR1560236 2 0.410 0.4201 0.000 0.744 0.256 0.000
#> SRR1560237 2 0.340 0.7938 0.000 0.820 0.180 0.000
#> SRR1560238 2 0.000 0.7920 0.000 1.000 0.000 0.000
#> SRR1560239 2 0.340 0.7938 0.000 0.820 0.180 0.000
#> SRR1560240 4 0.391 0.7362 0.000 0.000 0.232 0.768
#> SRR1560241 4 0.468 0.7206 0.000 0.024 0.232 0.744
#> SRR1560242 3 0.455 0.7440 0.000 0.188 0.776 0.036
#> SRR1560243 3 0.384 0.7476 0.000 0.224 0.776 0.000
#> SRR1560244 3 0.495 -0.0688 0.000 0.440 0.560 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560167 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.3636 0.617 0.000 0.272 0.000 0.000 0.728
#> SRR1560169 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560171 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560172 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560173 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560174 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560175 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560176 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560177 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560178 3 0.2648 0.812 0.000 0.152 0.848 0.000 0.000
#> SRR1560179 5 0.3242 0.703 0.000 0.216 0.000 0.000 0.784
#> SRR1560180 4 0.0000 0.913 0.000 0.000 0.000 1.000 0.000
#> SRR1560181 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560182 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560183 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560184 3 0.0609 0.945 0.000 0.000 0.980 0.000 0.020
#> SRR1560185 3 0.1121 0.922 0.000 0.000 0.956 0.000 0.044
#> SRR1560186 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560187 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560188 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560189 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560190 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560191 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560192 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.0162 0.910 0.000 0.996 0.000 0.000 0.004
#> SRR1560194 2 0.1270 0.874 0.000 0.948 0.052 0.000 0.000
#> SRR1560195 3 0.0000 0.951 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.951 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 5 0.1270 0.890 0.000 0.000 0.052 0.000 0.948
#> SRR1560198 4 0.0000 0.913 0.000 0.000 0.000 1.000 0.000
#> SRR1560200 5 0.0510 0.914 0.000 0.000 0.000 0.016 0.984
#> SRR1560199 5 0.1270 0.890 0.000 0.000 0.052 0.000 0.948
#> SRR1560201 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560202 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560203 4 0.1410 0.888 0.000 0.000 0.000 0.940 0.060
#> SRR1560204 4 0.2424 0.813 0.000 0.000 0.000 0.868 0.132
#> SRR1560205 3 0.0000 0.951 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 5 0.6030 0.358 0.000 0.316 0.000 0.140 0.544
#> SRR1560207 4 0.1341 0.894 0.056 0.000 0.000 0.944 0.000
#> SRR1560208 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560209 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560210 3 0.0510 0.946 0.000 0.000 0.984 0.000 0.016
#> SRR1560211 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560212 2 0.1270 0.874 0.000 0.948 0.052 0.000 0.000
#> SRR1560213 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560214 4 0.1270 0.907 0.000 0.000 0.052 0.948 0.000
#> SRR1560215 4 0.1270 0.907 0.000 0.000 0.052 0.948 0.000
#> SRR1560216 4 0.1270 0.897 0.052 0.000 0.000 0.948 0.000
#> SRR1560217 4 0.0000 0.913 0.000 0.000 0.000 1.000 0.000
#> SRR1560218 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560219 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560220 4 0.1270 0.907 0.000 0.000 0.052 0.948 0.000
#> SRR1560221 4 0.1270 0.907 0.000 0.000 0.052 0.948 0.000
#> SRR1560222 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560223 5 0.0000 0.921 0.000 0.000 0.000 0.000 1.000
#> SRR1560224 1 0.4846 0.321 0.588 0.028 0.000 0.000 0.384
#> SRR1560225 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560226 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560229 4 0.5182 0.461 0.000 0.300 0.000 0.632 0.068
#> SRR1560230 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560231 5 0.2233 0.850 0.000 0.004 0.104 0.000 0.892
#> SRR1560232 1 0.0000 0.962 1.000 0.000 0.000 0.000 0.000
#> SRR1560233 5 0.4150 0.372 0.000 0.388 0.000 0.000 0.612
#> SRR1560234 2 0.0162 0.910 0.000 0.996 0.004 0.000 0.000
#> SRR1560235 2 0.3774 0.538 0.000 0.704 0.000 0.000 0.296
#> SRR1560236 2 0.4262 0.201 0.000 0.560 0.000 0.000 0.440
#> SRR1560237 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560238 2 0.0000 0.912 0.000 1.000 0.000 0.000 0.000
#> SRR1560239 2 0.1270 0.875 0.000 0.948 0.000 0.052 0.000
#> SRR1560240 4 0.0000 0.913 0.000 0.000 0.000 1.000 0.000
#> SRR1560241 4 0.1205 0.888 0.000 0.040 0.000 0.956 0.004
#> SRR1560242 5 0.1270 0.893 0.000 0.000 0.000 0.052 0.948
#> SRR1560243 5 0.1270 0.893 0.000 0.000 0.000 0.052 0.948
#> SRR1560244 2 0.5128 0.363 0.000 0.604 0.000 0.052 0.344
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.1908 0.7478 0.000 0.900 0.000 0.000 0.096 0.004
#> SRR1560167 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.3383 0.2779 0.000 0.268 0.000 0.000 0.728 0.004
#> SRR1560169 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.1908 0.7478 0.000 0.900 0.000 0.000 0.096 0.004
#> SRR1560171 2 0.0000 0.7842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560172 2 0.0000 0.7842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560173 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560174 2 0.0000 0.7842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560175 2 0.0000 0.7842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560176 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560177 6 0.3999 0.3609 0.000 0.004 0.000 0.000 0.496 0.500
#> SRR1560178 6 0.3999 -0.0451 0.000 0.004 0.496 0.000 0.000 0.500
#> SRR1560179 6 0.4097 0.3641 0.000 0.008 0.000 0.000 0.492 0.500
#> SRR1560180 4 0.3175 0.7226 0.000 0.000 0.000 0.744 0.000 0.256
#> SRR1560181 5 0.1765 0.4374 0.000 0.000 0.000 0.000 0.904 0.096
#> SRR1560182 5 0.3869 -0.4693 0.000 0.000 0.000 0.000 0.500 0.500
#> SRR1560183 5 0.0000 0.5126 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560184 3 0.0000 0.8840 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 0.8840 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 3 0.3869 -0.0865 0.000 0.000 0.500 0.000 0.500 0.000
#> SRR1560187 5 0.2003 0.4437 0.000 0.000 0.000 0.116 0.884 0.000
#> SRR1560188 5 0.0000 0.5126 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560189 5 0.0000 0.5126 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560190 2 0.3961 0.2842 0.000 0.556 0.000 0.000 0.440 0.004
#> SRR1560191 2 0.1588 0.7603 0.000 0.924 0.000 0.000 0.072 0.004
#> SRR1560192 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.0291 0.7826 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1560194 2 0.3869 0.0222 0.000 0.500 0.000 0.000 0.000 0.500
#> SRR1560195 3 0.0000 0.8840 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.8840 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 5 0.3869 -0.4693 0.000 0.000 0.000 0.000 0.500 0.500
#> SRR1560198 4 0.0363 0.8272 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR1560200 5 0.1556 0.4885 0.000 0.000 0.000 0.000 0.920 0.080
#> SRR1560199 6 0.3999 0.3609 0.000 0.004 0.000 0.000 0.496 0.500
#> SRR1560201 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560202 5 0.0000 0.5126 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560203 4 0.0260 0.8294 0.000 0.000 0.000 0.992 0.008 0.000
#> SRR1560204 4 0.3868 0.1379 0.000 0.000 0.000 0.504 0.496 0.000
#> SRR1560205 3 0.0000 0.8840 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 2 0.6199 0.2048 0.000 0.504 0.000 0.032 0.160 0.304
#> SRR1560207 4 0.0260 0.8293 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR1560208 2 0.0000 0.7842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560209 2 0.0000 0.7842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560210 3 0.0146 0.8805 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR1560211 5 0.4025 -0.3451 0.000 0.008 0.000 0.000 0.576 0.416
#> SRR1560212 2 0.2912 0.6011 0.000 0.784 0.000 0.000 0.000 0.216
#> SRR1560213 5 0.3869 -0.4693 0.000 0.000 0.000 0.000 0.500 0.500
#> SRR1560214 4 0.0000 0.8316 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1560215 4 0.0000 0.8316 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1560216 4 0.0000 0.8316 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1560217 4 0.0000 0.8316 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1560218 5 0.4179 -0.4411 0.000 0.000 0.012 0.000 0.516 0.472
#> SRR1560219 5 0.3869 -0.4693 0.000 0.000 0.000 0.000 0.500 0.500
#> SRR1560220 4 0.0000 0.8316 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1560221 4 0.2416 0.7126 0.000 0.000 0.000 0.844 0.000 0.156
#> SRR1560222 5 0.0146 0.5126 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1560223 5 0.0146 0.5126 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1560224 5 0.3770 0.3745 0.000 0.028 0.000 0.000 0.728 0.244
#> SRR1560225 5 0.6007 -0.1150 0.356 0.000 0.000 0.000 0.404 0.240
#> SRR1560226 1 0.3076 0.7921 0.760 0.000 0.000 0.000 0.000 0.240
#> SRR1560227 1 0.3076 0.7921 0.760 0.000 0.000 0.000 0.000 0.240
#> SRR1560228 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560229 4 0.6964 0.3707 0.000 0.248 0.000 0.424 0.072 0.256
#> SRR1560230 1 0.1141 0.9320 0.948 0.000 0.000 0.000 0.000 0.052
#> SRR1560231 6 0.3468 0.3889 0.000 0.004 0.000 0.000 0.284 0.712
#> SRR1560232 1 0.0000 0.9612 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560233 6 0.6108 0.2714 0.000 0.304 0.000 0.000 0.320 0.376
#> SRR1560234 2 0.2912 0.6011 0.000 0.784 0.000 0.000 0.000 0.216
#> SRR1560235 5 0.3971 -0.1351 0.000 0.448 0.000 0.000 0.548 0.004
#> SRR1560236 5 0.3989 -0.1889 0.000 0.468 0.000 0.000 0.528 0.004
#> SRR1560237 2 0.0000 0.7842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560238 2 0.3930 0.3520 0.000 0.576 0.000 0.000 0.420 0.004
#> SRR1560239 6 0.3515 0.1465 0.000 0.324 0.000 0.000 0.000 0.676
#> SRR1560240 4 0.3175 0.7226 0.000 0.000 0.000 0.744 0.000 0.256
#> SRR1560241 4 0.3979 0.7014 0.000 0.036 0.000 0.708 0.000 0.256
#> SRR1560242 5 0.3198 0.3774 0.000 0.000 0.000 0.000 0.740 0.260
#> SRR1560243 5 0.3198 0.3774 0.000 0.000 0.000 0.000 0.740 0.260
#> SRR1560244 2 0.5378 0.2866 0.000 0.556 0.000 0.000 0.140 0.304
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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.601 0.879 0.935 0.46898 0.516 0.516
#> 3 3 0.865 0.898 0.951 -0.00233 0.711 0.566
#> 4 4 0.418 0.519 0.762 0.37221 0.746 0.555
#> 5 5 0.433 0.531 0.710 0.08816 0.917 0.784
#> 6 6 0.521 0.486 0.657 0.07135 0.790 0.438
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
#> SRR1560164 1 0.0000 0.915 1.000 0.000
#> SRR1560165 1 0.0000 0.915 1.000 0.000
#> SRR1560166 2 0.1184 0.930 0.016 0.984
#> SRR1560167 1 0.0000 0.915 1.000 0.000
#> SRR1560168 2 0.8661 0.607 0.288 0.712
#> SRR1560169 1 0.0000 0.915 1.000 0.000
#> SRR1560170 2 0.2778 0.920 0.048 0.952
#> SRR1560171 2 0.2948 0.918 0.052 0.948
#> SRR1560172 2 0.2948 0.918 0.052 0.948
#> SRR1560173 1 0.0000 0.915 1.000 0.000
#> SRR1560174 2 0.1414 0.929 0.020 0.980
#> SRR1560175 1 0.7528 0.795 0.784 0.216
#> SRR1560176 1 0.0000 0.915 1.000 0.000
#> SRR1560177 2 0.0376 0.930 0.004 0.996
#> SRR1560178 2 0.0000 0.931 0.000 1.000
#> SRR1560179 2 0.3274 0.913 0.060 0.940
#> SRR1560180 1 0.5519 0.903 0.872 0.128
#> SRR1560181 2 0.0376 0.931 0.004 0.996
#> SRR1560182 2 0.0000 0.931 0.000 1.000
#> SRR1560183 2 0.1633 0.928 0.024 0.976
#> SRR1560184 2 0.0000 0.931 0.000 1.000
#> SRR1560185 2 0.0000 0.931 0.000 1.000
#> SRR1560186 2 0.9580 0.360 0.380 0.620
#> SRR1560187 1 0.5519 0.903 0.872 0.128
#> SRR1560188 2 0.9922 0.177 0.448 0.552
#> SRR1560189 2 0.9710 0.337 0.400 0.600
#> SRR1560190 2 0.2948 0.918 0.052 0.948
#> SRR1560191 2 0.2423 0.923 0.040 0.960
#> SRR1560192 1 0.0000 0.915 1.000 0.000
#> SRR1560193 2 0.2948 0.918 0.052 0.948
#> SRR1560194 2 0.0000 0.931 0.000 1.000
#> SRR1560195 2 0.0000 0.931 0.000 1.000
#> SRR1560196 2 0.0000 0.931 0.000 1.000
#> SRR1560197 2 0.0000 0.931 0.000 1.000
#> SRR1560198 1 0.5519 0.903 0.872 0.128
#> SRR1560200 1 0.5519 0.903 0.872 0.128
#> SRR1560199 2 0.0000 0.931 0.000 1.000
#> SRR1560201 1 0.0000 0.915 1.000 0.000
#> SRR1560202 2 0.5408 0.831 0.124 0.876
#> SRR1560203 1 0.5408 0.904 0.876 0.124
#> SRR1560204 1 0.5519 0.903 0.872 0.128
#> SRR1560205 2 0.0000 0.931 0.000 1.000
#> SRR1560206 2 0.3879 0.902 0.076 0.924
#> SRR1560207 1 0.0000 0.915 1.000 0.000
#> SRR1560208 2 0.1414 0.926 0.020 0.980
#> SRR1560209 2 0.2603 0.922 0.044 0.956
#> SRR1560210 2 0.0000 0.931 0.000 1.000
#> SRR1560211 2 0.0000 0.931 0.000 1.000
#> SRR1560212 2 0.0000 0.931 0.000 1.000
#> SRR1560213 2 0.0000 0.931 0.000 1.000
#> SRR1560214 1 0.5519 0.903 0.872 0.128
#> SRR1560215 1 0.5519 0.903 0.872 0.128
#> SRR1560216 1 0.0000 0.915 1.000 0.000
#> SRR1560217 1 0.5408 0.904 0.876 0.124
#> SRR1560218 2 0.0000 0.931 0.000 1.000
#> SRR1560219 2 0.0000 0.931 0.000 1.000
#> SRR1560220 2 0.0000 0.931 0.000 1.000
#> SRR1560221 2 0.0000 0.931 0.000 1.000
#> SRR1560222 1 0.5519 0.903 0.872 0.128
#> SRR1560223 1 0.5737 0.896 0.864 0.136
#> SRR1560224 1 0.5946 0.888 0.856 0.144
#> SRR1560225 1 0.0000 0.915 1.000 0.000
#> SRR1560226 1 0.0000 0.915 1.000 0.000
#> SRR1560227 1 0.0000 0.915 1.000 0.000
#> SRR1560228 1 0.0000 0.915 1.000 0.000
#> SRR1560229 2 0.4161 0.895 0.084 0.916
#> SRR1560230 1 0.0000 0.915 1.000 0.000
#> SRR1560231 2 0.0000 0.931 0.000 1.000
#> SRR1560232 1 0.0000 0.915 1.000 0.000
#> SRR1560233 2 0.1633 0.928 0.024 0.976
#> SRR1560234 2 0.0000 0.931 0.000 1.000
#> SRR1560235 2 0.2948 0.918 0.052 0.948
#> SRR1560236 2 0.2948 0.918 0.052 0.948
#> SRR1560237 2 0.0000 0.931 0.000 1.000
#> SRR1560238 2 0.6148 0.820 0.152 0.848
#> SRR1560239 2 0.1414 0.926 0.020 0.980
#> SRR1560240 1 0.5519 0.903 0.872 0.128
#> SRR1560241 1 0.8386 0.704 0.732 0.268
#> SRR1560242 1 0.5629 0.899 0.868 0.132
#> SRR1560243 2 0.9393 0.457 0.356 0.644
#> SRR1560244 2 0.3274 0.913 0.060 0.940
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560165 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560166 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560167 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560168 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560169 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560170 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560171 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560172 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560173 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560174 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560175 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560176 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560177 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560178 2 0.4555 0.739 0.000 0.800 0.200
#> SRR1560179 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560180 2 0.4504 0.743 0.196 0.804 0.000
#> SRR1560181 2 0.1620 0.951 0.024 0.964 0.012
#> SRR1560182 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560183 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560184 3 0.0592 1.000 0.000 0.012 0.988
#> SRR1560185 3 0.0592 1.000 0.000 0.012 0.988
#> SRR1560186 2 0.5785 0.425 0.332 0.668 0.000
#> SRR1560187 2 0.0592 0.959 0.012 0.988 0.000
#> SRR1560188 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560189 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560190 2 0.1453 0.952 0.024 0.968 0.008
#> SRR1560191 2 0.0237 0.963 0.004 0.996 0.000
#> SRR1560192 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560193 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560194 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560195 3 0.0592 1.000 0.000 0.012 0.988
#> SRR1560196 3 0.0592 1.000 0.000 0.012 0.988
#> SRR1560197 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560198 1 0.6111 0.446 0.604 0.396 0.000
#> SRR1560200 2 0.0892 0.954 0.020 0.980 0.000
#> SRR1560199 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560201 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560202 2 0.1482 0.953 0.020 0.968 0.012
#> SRR1560203 1 0.4887 0.652 0.772 0.228 0.000
#> SRR1560204 1 0.6180 0.397 0.584 0.416 0.000
#> SRR1560205 3 0.0592 1.000 0.000 0.012 0.988
#> SRR1560206 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560207 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560208 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560209 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560210 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560211 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560212 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560213 2 0.1315 0.954 0.020 0.972 0.008
#> SRR1560214 2 0.3879 0.807 0.152 0.848 0.000
#> SRR1560215 2 0.0592 0.959 0.012 0.988 0.000
#> SRR1560216 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560217 1 0.3619 0.760 0.864 0.136 0.000
#> SRR1560218 2 0.1129 0.955 0.020 0.976 0.004
#> SRR1560219 2 0.0237 0.963 0.004 0.996 0.000
#> SRR1560220 2 0.1411 0.942 0.000 0.964 0.036
#> SRR1560221 2 0.0237 0.963 0.000 0.996 0.004
#> SRR1560222 2 0.4452 0.747 0.192 0.808 0.000
#> SRR1560223 2 0.2165 0.915 0.064 0.936 0.000
#> SRR1560224 1 0.6225 0.352 0.568 0.432 0.000
#> SRR1560225 1 0.3120 0.797 0.908 0.080 0.012
#> SRR1560226 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560227 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560228 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560229 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560230 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560231 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560232 1 0.1163 0.866 0.972 0.028 0.000
#> SRR1560233 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560234 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560235 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560236 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560237 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560238 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560239 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560240 2 0.1289 0.945 0.032 0.968 0.000
#> SRR1560241 2 0.0000 0.964 0.000 1.000 0.000
#> SRR1560242 2 0.1289 0.945 0.032 0.968 0.000
#> SRR1560243 2 0.1751 0.948 0.028 0.960 0.012
#> SRR1560244 2 0.0000 0.964 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.7273 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.7273 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.4776 -0.0520 0.000 0.624 0.000 0.376
#> SRR1560167 1 0.0707 0.7259 0.980 0.000 0.000 0.020
#> SRR1560168 4 0.4697 0.7315 0.000 0.356 0.000 0.644
#> SRR1560169 1 0.0707 0.7259 0.980 0.000 0.000 0.020
#> SRR1560170 2 0.1489 0.6306 0.000 0.952 0.004 0.044
#> SRR1560171 2 0.1489 0.6306 0.000 0.952 0.004 0.044
#> SRR1560172 2 0.0188 0.6431 0.000 0.996 0.000 0.004
#> SRR1560173 1 0.0336 0.7274 0.992 0.000 0.000 0.008
#> SRR1560174 2 0.1489 0.6306 0.000 0.952 0.004 0.044
#> SRR1560175 2 0.6845 0.2789 0.168 0.596 0.000 0.236
#> SRR1560176 1 0.0707 0.7259 0.980 0.000 0.000 0.020
#> SRR1560177 2 0.3494 0.5293 0.004 0.824 0.000 0.172
#> SRR1560178 2 0.5494 0.4297 0.000 0.716 0.208 0.076
#> SRR1560179 2 0.1489 0.6306 0.000 0.952 0.004 0.044
#> SRR1560180 1 0.7054 0.5873 0.536 0.144 0.000 0.320
#> SRR1560181 2 0.4998 -0.4006 0.000 0.512 0.000 0.488
#> SRR1560182 2 0.0921 0.6408 0.000 0.972 0.000 0.028
#> SRR1560183 2 0.4804 0.3734 0.016 0.708 0.000 0.276
#> SRR1560184 3 0.0188 1.0000 0.000 0.004 0.996 0.000
#> SRR1560185 3 0.0188 1.0000 0.000 0.004 0.996 0.000
#> SRR1560186 1 0.7812 -0.0380 0.376 0.252 0.000 0.372
#> SRR1560187 2 0.7684 -0.1577 0.388 0.396 0.000 0.216
#> SRR1560188 4 0.4500 0.7421 0.000 0.316 0.000 0.684
#> SRR1560189 4 0.4543 0.7471 0.000 0.324 0.000 0.676
#> SRR1560190 2 0.4972 -0.3266 0.000 0.544 0.000 0.456
#> SRR1560191 2 0.3873 0.4552 0.000 0.772 0.000 0.228
#> SRR1560192 1 0.0707 0.7259 0.980 0.000 0.000 0.020
#> SRR1560193 2 0.1489 0.6306 0.000 0.952 0.004 0.044
#> SRR1560194 2 0.1635 0.6361 0.000 0.948 0.008 0.044
#> SRR1560195 3 0.0188 1.0000 0.000 0.004 0.996 0.000
#> SRR1560196 3 0.0188 1.0000 0.000 0.004 0.996 0.000
#> SRR1560197 2 0.2345 0.6253 0.000 0.900 0.000 0.100
#> SRR1560198 1 0.6140 0.6461 0.596 0.064 0.000 0.340
#> SRR1560200 1 0.7594 0.3964 0.480 0.260 0.000 0.260
#> SRR1560199 2 0.1637 0.6376 0.000 0.940 0.000 0.060
#> SRR1560201 1 0.3764 0.7204 0.816 0.012 0.000 0.172
#> SRR1560202 4 0.5792 0.5237 0.032 0.416 0.000 0.552
#> SRR1560203 1 0.5090 0.6884 0.660 0.016 0.000 0.324
#> SRR1560204 1 0.6055 0.6305 0.576 0.052 0.000 0.372
#> SRR1560205 3 0.0188 1.0000 0.000 0.004 0.996 0.000
#> SRR1560206 2 0.0188 0.6431 0.000 0.996 0.000 0.004
#> SRR1560207 1 0.2973 0.7171 0.856 0.000 0.000 0.144
#> SRR1560208 2 0.3311 0.5247 0.000 0.828 0.000 0.172
#> SRR1560209 2 0.0188 0.6431 0.000 0.996 0.000 0.004
#> SRR1560210 2 0.8497 0.1971 0.080 0.504 0.140 0.276
#> SRR1560211 2 0.3444 0.5337 0.000 0.816 0.000 0.184
#> SRR1560212 2 0.1576 0.6368 0.000 0.948 0.004 0.048
#> SRR1560213 2 0.4713 0.0383 0.000 0.640 0.000 0.360
#> SRR1560214 1 0.7373 0.5336 0.500 0.184 0.000 0.316
#> SRR1560215 2 0.7732 0.0133 0.288 0.444 0.000 0.268
#> SRR1560216 1 0.4459 0.7044 0.780 0.032 0.000 0.188
#> SRR1560217 1 0.4728 0.7022 0.752 0.032 0.000 0.216
#> SRR1560218 2 0.6140 -0.3338 0.048 0.500 0.000 0.452
#> SRR1560219 2 0.5924 -0.1364 0.040 0.556 0.000 0.404
#> SRR1560220 2 0.6538 0.4538 0.040 0.700 0.148 0.112
#> SRR1560221 2 0.5018 0.5068 0.000 0.768 0.144 0.088
#> SRR1560222 1 0.7380 0.2810 0.512 0.288 0.000 0.200
#> SRR1560223 1 0.7588 0.1533 0.468 0.312 0.000 0.220
#> SRR1560224 1 0.7205 0.3650 0.548 0.252 0.000 0.200
#> SRR1560225 4 0.6228 0.2030 0.364 0.064 0.000 0.572
#> SRR1560226 1 0.0707 0.7259 0.980 0.000 0.000 0.020
#> SRR1560227 1 0.0707 0.7259 0.980 0.000 0.000 0.020
#> SRR1560228 1 0.0000 0.7273 1.000 0.000 0.000 0.000
#> SRR1560229 2 0.3090 0.5975 0.056 0.888 0.000 0.056
#> SRR1560230 1 0.0592 0.7302 0.984 0.000 0.000 0.016
#> SRR1560231 2 0.5221 0.5442 0.088 0.780 0.016 0.116
#> SRR1560232 1 0.4050 0.7255 0.820 0.036 0.000 0.144
#> SRR1560233 2 0.5291 0.4719 0.080 0.740 0.000 0.180
#> SRR1560234 2 0.0469 0.6444 0.000 0.988 0.000 0.012
#> SRR1560235 2 0.4985 -0.3886 0.000 0.532 0.000 0.468
#> SRR1560236 4 0.4999 0.4541 0.000 0.492 0.000 0.508
#> SRR1560237 2 0.1004 0.6379 0.000 0.972 0.004 0.024
#> SRR1560238 4 0.4746 0.7167 0.000 0.368 0.000 0.632
#> SRR1560239 2 0.3495 0.5558 0.016 0.844 0.000 0.140
#> SRR1560240 1 0.7747 0.4118 0.432 0.252 0.000 0.316
#> SRR1560241 2 0.4756 0.4922 0.144 0.784 0.000 0.072
#> SRR1560242 4 0.6865 0.5740 0.112 0.364 0.000 0.524
#> SRR1560243 4 0.4564 0.7470 0.000 0.328 0.000 0.672
#> SRR1560244 2 0.1489 0.6306 0.000 0.952 0.004 0.044
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.4067 0.8834 0.692 0.008 0.000 0.300 0.000
#> SRR1560165 1 0.4067 0.8834 0.692 0.008 0.000 0.300 0.000
#> SRR1560166 2 0.4350 0.4400 0.028 0.704 0.000 0.000 0.268
#> SRR1560167 1 0.3980 0.8820 0.708 0.008 0.000 0.284 0.000
#> SRR1560168 5 0.3039 0.7475 0.000 0.192 0.000 0.000 0.808
#> SRR1560169 1 0.3885 0.8850 0.724 0.008 0.000 0.268 0.000
#> SRR1560170 2 0.5457 0.4831 0.172 0.672 0.000 0.004 0.152
#> SRR1560171 2 0.5178 0.5166 0.172 0.700 0.000 0.004 0.124
#> SRR1560172 2 0.1455 0.6838 0.008 0.952 0.000 0.008 0.032
#> SRR1560173 1 0.4313 0.8380 0.636 0.008 0.000 0.356 0.000
#> SRR1560174 2 0.5150 0.5161 0.164 0.704 0.000 0.004 0.128
#> SRR1560175 2 0.4470 0.2955 0.000 0.616 0.000 0.372 0.012
#> SRR1560176 1 0.4425 0.8298 0.600 0.008 0.000 0.392 0.000
#> SRR1560177 2 0.2922 0.6935 0.080 0.880 0.000 0.024 0.016
#> SRR1560178 2 0.7086 0.4776 0.092 0.576 0.252 0.032 0.048
#> SRR1560179 2 0.4468 0.5603 0.172 0.756 0.000 0.004 0.068
#> SRR1560180 4 0.4165 0.4394 0.008 0.320 0.000 0.672 0.000
#> SRR1560181 2 0.3916 0.6659 0.072 0.820 0.000 0.012 0.096
#> SRR1560182 2 0.2423 0.6955 0.080 0.896 0.000 0.024 0.000
#> SRR1560183 2 0.3120 0.6869 0.064 0.872 0.000 0.012 0.052
#> SRR1560184 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 4 0.7127 0.3007 0.100 0.312 0.000 0.504 0.084
#> SRR1560187 2 0.6557 -0.2021 0.000 0.428 0.000 0.368 0.204
#> SRR1560188 5 0.3675 0.7314 0.000 0.188 0.000 0.024 0.788
#> SRR1560189 5 0.3039 0.7475 0.000 0.192 0.000 0.000 0.808
#> SRR1560190 2 0.5359 -0.3197 0.008 0.504 0.000 0.036 0.452
#> SRR1560191 2 0.4114 0.4827 0.024 0.732 0.000 0.000 0.244
#> SRR1560192 1 0.3885 0.8850 0.724 0.008 0.000 0.268 0.000
#> SRR1560193 2 0.4641 0.5551 0.172 0.744 0.000 0.004 0.080
#> SRR1560194 2 0.4769 0.6545 0.092 0.776 0.000 0.044 0.088
#> SRR1560195 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 2 0.4892 0.6521 0.096 0.768 0.000 0.048 0.088
#> SRR1560198 4 0.4562 0.4813 0.028 0.168 0.000 0.764 0.040
#> SRR1560200 4 0.5106 0.2803 0.004 0.400 0.000 0.564 0.032
#> SRR1560199 2 0.4840 0.6533 0.092 0.772 0.000 0.048 0.088
#> SRR1560201 4 0.5567 0.1740 0.184 0.092 0.000 0.692 0.032
#> SRR1560202 2 0.7003 0.2765 0.092 0.540 0.000 0.092 0.276
#> SRR1560203 4 0.4592 0.3212 0.024 0.028 0.000 0.740 0.208
#> SRR1560204 4 0.5017 0.3504 0.012 0.048 0.000 0.684 0.256
#> SRR1560205 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 2 0.0865 0.6869 0.000 0.972 0.000 0.004 0.024
#> SRR1560207 4 0.4327 -0.2915 0.360 0.008 0.000 0.632 0.000
#> SRR1560208 2 0.2588 0.6792 0.048 0.892 0.000 0.000 0.060
#> SRR1560209 2 0.0955 0.6862 0.000 0.968 0.000 0.004 0.028
#> SRR1560210 2 0.8232 0.2700 0.096 0.444 0.312 0.100 0.048
#> SRR1560211 2 0.3326 0.6908 0.080 0.860 0.000 0.016 0.044
#> SRR1560212 2 0.4407 0.6560 0.092 0.796 0.000 0.028 0.084
#> SRR1560213 2 0.2144 0.6745 0.020 0.912 0.000 0.000 0.068
#> SRR1560214 4 0.4440 0.4382 0.004 0.324 0.000 0.660 0.012
#> SRR1560215 2 0.4658 -0.0702 0.000 0.504 0.000 0.484 0.012
#> SRR1560216 4 0.4086 -0.0626 0.284 0.012 0.000 0.704 0.000
#> SRR1560217 4 0.3914 0.1059 0.220 0.016 0.000 0.760 0.004
#> SRR1560218 2 0.5697 0.6349 0.096 0.728 0.020 0.044 0.112
#> SRR1560219 2 0.4875 0.6596 0.092 0.768 0.000 0.044 0.096
#> SRR1560220 2 0.8049 0.4497 0.096 0.556 0.124 0.136 0.088
#> SRR1560221 2 0.5726 0.6309 0.096 0.736 0.044 0.036 0.088
#> SRR1560222 4 0.6662 -0.1518 0.012 0.156 0.000 0.428 0.404
#> SRR1560223 5 0.6987 0.1617 0.012 0.232 0.000 0.344 0.412
#> SRR1560224 4 0.6337 -0.1031 0.012 0.112 0.000 0.464 0.412
#> SRR1560225 4 0.8323 0.1057 0.196 0.160 0.000 0.352 0.292
#> SRR1560226 1 0.4219 0.8002 0.584 0.000 0.000 0.416 0.000
#> SRR1560227 1 0.4219 0.8002 0.584 0.000 0.000 0.416 0.000
#> SRR1560228 1 0.4046 0.8846 0.696 0.008 0.000 0.296 0.000
#> SRR1560229 2 0.2162 0.6771 0.008 0.916 0.000 0.064 0.012
#> SRR1560230 1 0.4637 0.7917 0.536 0.012 0.000 0.452 0.000
#> SRR1560231 2 0.4666 0.6584 0.096 0.784 0.000 0.072 0.048
#> SRR1560232 4 0.4622 0.0427 0.264 0.044 0.000 0.692 0.000
#> SRR1560233 2 0.4316 0.6717 0.068 0.808 0.000 0.044 0.080
#> SRR1560234 2 0.1074 0.6951 0.016 0.968 0.000 0.012 0.004
#> SRR1560235 2 0.4585 0.0393 0.008 0.592 0.000 0.004 0.396
#> SRR1560236 5 0.4706 0.2480 0.008 0.492 0.000 0.004 0.496
#> SRR1560237 2 0.2899 0.6544 0.096 0.872 0.000 0.004 0.028
#> SRR1560238 5 0.3074 0.7472 0.000 0.196 0.000 0.000 0.804
#> SRR1560239 2 0.1799 0.6865 0.028 0.940 0.000 0.020 0.012
#> SRR1560240 4 0.4675 0.3361 0.000 0.380 0.000 0.600 0.020
#> SRR1560241 2 0.3209 0.5963 0.000 0.812 0.000 0.180 0.008
#> SRR1560242 5 0.6759 0.3514 0.004 0.292 0.000 0.252 0.452
#> SRR1560243 5 0.3039 0.7475 0.000 0.192 0.000 0.000 0.808
#> SRR1560244 2 0.4173 0.5729 0.148 0.784 0.000 0.004 0.064
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0951 0.8058 0.968 0.000 0.000 0.004 0.008 0.020
#> SRR1560165 1 0.0951 0.8058 0.968 0.000 0.000 0.004 0.008 0.020
#> SRR1560166 2 0.5462 0.6338 0.000 0.600 0.000 0.264 0.016 0.120
#> SRR1560167 1 0.2333 0.7995 0.896 0.000 0.000 0.004 0.040 0.060
#> SRR1560168 5 0.5398 0.5901 0.000 0.080 0.000 0.016 0.544 0.360
#> SRR1560169 1 0.1391 0.8037 0.944 0.000 0.000 0.000 0.016 0.040
#> SRR1560170 2 0.0891 0.5640 0.000 0.968 0.000 0.000 0.008 0.024
#> SRR1560171 2 0.0891 0.5640 0.000 0.968 0.000 0.000 0.008 0.024
#> SRR1560172 2 0.3728 0.6661 0.000 0.652 0.000 0.344 0.000 0.004
#> SRR1560173 1 0.2009 0.7861 0.916 0.000 0.000 0.004 0.040 0.040
#> SRR1560174 2 0.0632 0.5684 0.000 0.976 0.000 0.000 0.000 0.024
#> SRR1560175 4 0.2969 0.3003 0.000 0.224 0.000 0.776 0.000 0.000
#> SRR1560176 1 0.3617 0.7338 0.736 0.000 0.000 0.000 0.020 0.244
#> SRR1560177 2 0.4448 0.6991 0.000 0.680 0.000 0.268 0.012 0.040
#> SRR1560178 4 0.7493 0.1510 0.000 0.204 0.200 0.384 0.212 0.000
#> SRR1560179 2 0.0622 0.5585 0.000 0.980 0.000 0.000 0.008 0.012
#> SRR1560180 4 0.1219 0.3957 0.048 0.004 0.000 0.948 0.000 0.000
#> SRR1560181 2 0.5703 0.5503 0.000 0.512 0.000 0.360 0.112 0.016
#> SRR1560182 2 0.3565 0.7001 0.000 0.692 0.000 0.304 0.004 0.000
#> SRR1560183 2 0.5444 0.5713 0.000 0.524 0.000 0.368 0.100 0.008
#> SRR1560184 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 4 0.3833 0.3506 0.000 0.024 0.000 0.804 0.088 0.084
#> SRR1560187 4 0.5615 -0.0498 0.000 0.052 0.000 0.628 0.096 0.224
#> SRR1560188 5 0.5328 0.5930 0.000 0.072 0.000 0.016 0.544 0.368
#> SRR1560189 5 0.5328 0.5930 0.000 0.072 0.000 0.016 0.544 0.368
#> SRR1560190 4 0.6862 -0.3154 0.004 0.104 0.000 0.424 0.108 0.360
#> SRR1560191 2 0.5882 0.6046 0.000 0.568 0.000 0.272 0.036 0.124
#> SRR1560192 1 0.1464 0.8048 0.944 0.000 0.000 0.004 0.016 0.036
#> SRR1560193 2 0.0405 0.5676 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR1560194 5 0.6015 -0.5078 0.000 0.240 0.000 0.376 0.384 0.000
#> SRR1560195 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 4 0.5994 0.1597 0.000 0.232 0.000 0.384 0.384 0.000
#> SRR1560198 4 0.2848 0.2641 0.124 0.004 0.000 0.848 0.000 0.024
#> SRR1560200 4 0.1074 0.4065 0.012 0.028 0.000 0.960 0.000 0.000
#> SRR1560199 4 0.6005 0.1498 0.000 0.236 0.000 0.384 0.380 0.000
#> SRR1560201 4 0.5112 -0.1598 0.392 0.000 0.000 0.536 0.008 0.064
#> SRR1560202 4 0.7081 -0.0661 0.000 0.188 0.000 0.464 0.132 0.216
#> SRR1560203 6 0.4957 0.3731 0.068 0.000 0.000 0.348 0.004 0.580
#> SRR1560204 6 0.4139 0.4161 0.012 0.008 0.000 0.336 0.000 0.644
#> SRR1560205 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 2 0.3634 0.6582 0.000 0.644 0.000 0.356 0.000 0.000
#> SRR1560207 1 0.5021 0.5670 0.640 0.000 0.000 0.280 0.040 0.040
#> SRR1560208 2 0.4484 0.7034 0.000 0.688 0.000 0.252 0.012 0.048
#> SRR1560209 2 0.3578 0.6686 0.000 0.660 0.000 0.340 0.000 0.000
#> SRR1560210 4 0.5057 0.4053 0.000 0.028 0.040 0.592 0.340 0.000
#> SRR1560211 2 0.4044 0.6940 0.000 0.668 0.000 0.312 0.012 0.008
#> SRR1560212 4 0.6005 0.1520 0.000 0.236 0.000 0.384 0.380 0.000
#> SRR1560213 2 0.3855 0.7046 0.000 0.704 0.000 0.276 0.016 0.004
#> SRR1560214 4 0.1124 0.3942 0.036 0.008 0.000 0.956 0.000 0.000
#> SRR1560215 4 0.1007 0.3959 0.000 0.044 0.000 0.956 0.000 0.000
#> SRR1560216 1 0.4951 0.4814 0.572 0.000 0.000 0.372 0.032 0.024
#> SRR1560217 4 0.4546 -0.3115 0.444 0.000 0.000 0.528 0.008 0.020
#> SRR1560218 4 0.5609 0.3243 0.000 0.112 0.000 0.464 0.416 0.008
#> SRR1560219 2 0.5336 0.5231 0.000 0.516 0.000 0.384 0.096 0.004
#> SRR1560220 4 0.4263 0.4014 0.000 0.000 0.024 0.600 0.376 0.000
#> SRR1560221 4 0.6360 0.1935 0.000 0.208 0.020 0.392 0.380 0.000
#> SRR1560222 6 0.5575 0.4347 0.000 0.064 0.000 0.192 0.096 0.648
#> SRR1560223 6 0.5679 0.4389 0.000 0.064 0.000 0.208 0.096 0.632
#> SRR1560224 6 0.3672 0.3884 0.004 0.064 0.000 0.140 0.000 0.792
#> SRR1560225 6 0.7783 0.3942 0.208 0.032 0.000 0.260 0.108 0.392
#> SRR1560226 1 0.4118 0.6695 0.628 0.000 0.000 0.000 0.020 0.352
#> SRR1560227 1 0.4118 0.6695 0.628 0.000 0.000 0.000 0.020 0.352
#> SRR1560228 1 0.0551 0.8076 0.984 0.000 0.000 0.004 0.008 0.004
#> SRR1560229 2 0.4685 0.6045 0.000 0.568 0.000 0.388 0.040 0.004
#> SRR1560230 1 0.3354 0.7288 0.752 0.000 0.000 0.004 0.004 0.240
#> SRR1560231 4 0.4631 0.4138 0.000 0.052 0.000 0.596 0.352 0.000
#> SRR1560232 4 0.5216 -0.1577 0.376 0.004 0.000 0.556 0.024 0.040
#> SRR1560233 2 0.5119 0.6177 0.000 0.552 0.000 0.372 0.008 0.068
#> SRR1560234 2 0.4538 0.6431 0.000 0.612 0.000 0.340 0.048 0.000
#> SRR1560235 2 0.7047 0.4095 0.000 0.444 0.000 0.272 0.112 0.172
#> SRR1560236 6 0.7528 0.1273 0.000 0.208 0.000 0.276 0.168 0.348
#> SRR1560237 2 0.2062 0.6277 0.000 0.900 0.000 0.088 0.008 0.004
#> SRR1560238 5 0.5431 0.5843 0.000 0.084 0.000 0.016 0.544 0.356
#> SRR1560239 2 0.4196 0.7034 0.000 0.712 0.000 0.240 0.008 0.040
#> SRR1560240 4 0.1074 0.3973 0.028 0.012 0.000 0.960 0.000 0.000
#> SRR1560241 4 0.3592 -0.0023 0.000 0.344 0.000 0.656 0.000 0.000
#> SRR1560242 6 0.6387 0.3621 0.000 0.072 0.000 0.328 0.108 0.492
#> SRR1560243 5 0.5328 0.5930 0.000 0.072 0.000 0.016 0.544 0.368
#> SRR1560244 2 0.0622 0.5585 0.000 0.980 0.000 0.000 0.008 0.012
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 15546 rows and 81 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.976 0.952 0.975 0.3511 0.664 0.664
#> 3 3 0.830 0.907 0.955 0.7430 0.699 0.554
#> 4 4 0.769 0.775 0.904 0.1713 0.804 0.549
#> 5 5 0.698 0.773 0.861 0.0874 0.884 0.628
#> 6 6 0.675 0.616 0.788 0.0317 0.917 0.673
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
#> SRR1560164 1 0.1184 0.976 0.984 0.016
#> SRR1560165 1 0.1184 0.976 0.984 0.016
#> SRR1560166 2 0.0000 0.975 0.000 1.000
#> SRR1560167 1 0.0000 0.971 1.000 0.000
#> SRR1560168 2 0.0000 0.975 0.000 1.000
#> SRR1560169 1 0.1414 0.975 0.980 0.020
#> SRR1560170 2 0.0000 0.975 0.000 1.000
#> SRR1560171 2 0.0000 0.975 0.000 1.000
#> SRR1560172 2 0.0000 0.975 0.000 1.000
#> SRR1560173 1 0.1184 0.976 0.984 0.016
#> SRR1560174 2 0.0000 0.975 0.000 1.000
#> SRR1560175 2 0.2236 0.955 0.036 0.964
#> SRR1560176 1 0.1414 0.975 0.980 0.020
#> SRR1560177 2 0.0000 0.975 0.000 1.000
#> SRR1560178 2 0.1633 0.966 0.024 0.976
#> SRR1560179 2 0.0000 0.975 0.000 1.000
#> SRR1560180 1 0.0376 0.971 0.996 0.004
#> SRR1560181 2 0.0000 0.975 0.000 1.000
#> SRR1560182 2 0.0000 0.975 0.000 1.000
#> SRR1560183 2 0.0000 0.975 0.000 1.000
#> SRR1560184 2 0.1843 0.964 0.028 0.972
#> SRR1560185 2 0.1414 0.967 0.020 0.980
#> SRR1560186 2 0.1414 0.967 0.020 0.980
#> SRR1560187 2 0.0000 0.975 0.000 1.000
#> SRR1560188 2 0.0000 0.975 0.000 1.000
#> SRR1560189 2 0.0000 0.975 0.000 1.000
#> SRR1560190 2 0.0938 0.969 0.012 0.988
#> SRR1560191 2 0.0000 0.975 0.000 1.000
#> SRR1560192 1 0.0000 0.971 1.000 0.000
#> SRR1560193 2 0.0000 0.975 0.000 1.000
#> SRR1560194 2 0.1414 0.967 0.020 0.980
#> SRR1560195 2 0.2778 0.950 0.048 0.952
#> SRR1560196 2 0.4161 0.918 0.084 0.916
#> SRR1560197 2 0.1414 0.967 0.020 0.980
#> SRR1560198 2 0.3431 0.937 0.064 0.936
#> SRR1560200 2 0.9170 0.534 0.332 0.668
#> SRR1560199 2 0.1414 0.967 0.020 0.980
#> SRR1560201 1 0.1184 0.976 0.984 0.016
#> SRR1560202 2 0.0000 0.975 0.000 1.000
#> SRR1560203 2 0.0000 0.975 0.000 1.000
#> SRR1560204 2 0.0000 0.975 0.000 1.000
#> SRR1560205 2 0.2603 0.953 0.044 0.956
#> SRR1560206 2 0.0376 0.974 0.004 0.996
#> SRR1560207 1 0.0000 0.971 1.000 0.000
#> SRR1560208 2 0.0000 0.975 0.000 1.000
#> SRR1560209 2 0.0000 0.975 0.000 1.000
#> SRR1560210 2 0.4431 0.910 0.092 0.908
#> SRR1560211 2 0.0000 0.975 0.000 1.000
#> SRR1560212 2 0.1414 0.967 0.020 0.980
#> SRR1560213 2 0.0000 0.975 0.000 1.000
#> SRR1560214 2 0.8763 0.579 0.296 0.704
#> SRR1560215 2 0.0376 0.974 0.004 0.996
#> SRR1560216 1 0.2043 0.965 0.968 0.032
#> SRR1560217 1 0.8327 0.663 0.736 0.264
#> SRR1560218 2 0.1414 0.967 0.020 0.980
#> SRR1560219 2 0.0672 0.972 0.008 0.992
#> SRR1560220 2 0.5519 0.870 0.128 0.872
#> SRR1560221 2 0.1414 0.967 0.020 0.980
#> SRR1560222 2 0.0000 0.975 0.000 1.000
#> SRR1560223 2 0.0000 0.975 0.000 1.000
#> SRR1560224 2 0.0000 0.975 0.000 1.000
#> SRR1560225 2 0.6973 0.768 0.188 0.812
#> SRR1560226 1 0.0376 0.973 0.996 0.004
#> SRR1560227 1 0.1414 0.975 0.980 0.020
#> SRR1560228 1 0.1414 0.975 0.980 0.020
#> SRR1560229 2 0.0000 0.975 0.000 1.000
#> SRR1560230 1 0.1184 0.976 0.984 0.016
#> SRR1560231 2 0.2236 0.959 0.036 0.964
#> SRR1560232 1 0.0000 0.971 1.000 0.000
#> SRR1560233 2 0.0000 0.975 0.000 1.000
#> SRR1560234 2 0.0376 0.974 0.004 0.996
#> SRR1560235 2 0.0000 0.975 0.000 1.000
#> SRR1560236 2 0.0000 0.975 0.000 1.000
#> SRR1560237 2 0.0000 0.975 0.000 1.000
#> SRR1560238 2 0.0000 0.975 0.000 1.000
#> SRR1560239 2 0.0000 0.975 0.000 1.000
#> SRR1560240 2 0.0672 0.972 0.008 0.992
#> SRR1560241 2 0.0000 0.975 0.000 1.000
#> SRR1560242 2 0.0000 0.975 0.000 1.000
#> SRR1560243 2 0.0000 0.975 0.000 1.000
#> SRR1560244 2 0.0000 0.975 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0424 0.937 0.992 0.000 0.008
#> SRR1560165 1 0.0424 0.937 0.992 0.000 0.008
#> SRR1560166 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560167 1 0.0237 0.937 0.996 0.000 0.004
#> SRR1560168 2 0.0424 0.963 0.008 0.992 0.000
#> SRR1560169 1 0.0000 0.937 1.000 0.000 0.000
#> SRR1560170 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560171 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560172 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560173 1 0.0000 0.937 1.000 0.000 0.000
#> SRR1560174 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560175 2 0.4504 0.760 0.196 0.804 0.000
#> SRR1560176 1 0.0000 0.937 1.000 0.000 0.000
#> SRR1560177 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560178 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560179 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560180 1 0.2796 0.891 0.908 0.000 0.092
#> SRR1560181 2 0.0237 0.964 0.000 0.996 0.004
#> SRR1560182 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560183 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560184 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560185 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560186 3 0.1964 0.898 0.000 0.056 0.944
#> SRR1560187 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560188 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560189 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560190 2 0.2165 0.914 0.064 0.936 0.000
#> SRR1560191 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560192 1 0.1031 0.932 0.976 0.000 0.024
#> SRR1560193 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560194 3 0.3192 0.872 0.000 0.112 0.888
#> SRR1560195 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560196 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560197 3 0.2878 0.882 0.000 0.096 0.904
#> SRR1560198 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560200 1 0.7230 0.432 0.616 0.040 0.344
#> SRR1560199 3 0.3116 0.875 0.000 0.108 0.892
#> SRR1560201 1 0.0747 0.935 0.984 0.000 0.016
#> SRR1560202 3 0.5785 0.582 0.000 0.332 0.668
#> SRR1560203 2 0.8649 0.408 0.196 0.600 0.204
#> SRR1560204 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560205 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560206 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560207 1 0.1031 0.932 0.976 0.000 0.024
#> SRR1560208 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560209 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560210 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560211 2 0.4452 0.735 0.000 0.808 0.192
#> SRR1560212 3 0.3879 0.833 0.000 0.152 0.848
#> SRR1560213 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560214 1 0.6087 0.745 0.780 0.144 0.076
#> SRR1560215 2 0.0592 0.960 0.000 0.988 0.012
#> SRR1560216 1 0.0592 0.936 0.988 0.000 0.012
#> SRR1560217 1 0.5012 0.710 0.788 0.204 0.008
#> SRR1560218 3 0.2796 0.884 0.000 0.092 0.908
#> SRR1560219 3 0.5058 0.726 0.000 0.244 0.756
#> SRR1560220 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560221 3 0.1163 0.906 0.000 0.028 0.972
#> SRR1560222 2 0.0237 0.965 0.004 0.996 0.000
#> SRR1560223 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560224 2 0.0424 0.962 0.008 0.992 0.000
#> SRR1560225 2 0.4504 0.763 0.196 0.804 0.000
#> SRR1560226 1 0.0592 0.936 0.988 0.000 0.012
#> SRR1560227 1 0.0237 0.937 0.996 0.000 0.004
#> SRR1560228 1 0.0000 0.937 1.000 0.000 0.000
#> SRR1560229 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560230 1 0.0000 0.937 1.000 0.000 0.000
#> SRR1560231 3 0.0000 0.910 0.000 0.000 1.000
#> SRR1560232 1 0.2625 0.897 0.916 0.000 0.084
#> SRR1560233 2 0.0424 0.961 0.000 0.992 0.008
#> SRR1560234 2 0.2625 0.889 0.000 0.916 0.084
#> SRR1560235 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560236 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560237 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560238 2 0.0424 0.962 0.008 0.992 0.000
#> SRR1560239 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560240 2 0.3532 0.864 0.108 0.884 0.008
#> SRR1560241 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560242 2 0.0592 0.959 0.012 0.988 0.000
#> SRR1560243 2 0.0000 0.967 0.000 1.000 0.000
#> SRR1560244 2 0.0000 0.967 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 4 0.4992 0.0147 0.476 0.000 0.000 0.524
#> SRR1560165 4 0.4955 0.1204 0.444 0.000 0.000 0.556
#> SRR1560166 2 0.0000 0.8977 0.000 1.000 0.000 0.000
#> SRR1560167 1 0.1211 0.8522 0.960 0.000 0.000 0.040
#> SRR1560168 2 0.1637 0.8706 0.060 0.940 0.000 0.000
#> SRR1560169 1 0.0000 0.8643 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.0592 0.8958 0.000 0.984 0.000 0.016
#> SRR1560171 2 0.0592 0.8958 0.000 0.984 0.000 0.016
#> SRR1560172 2 0.3024 0.7872 0.000 0.852 0.000 0.148
#> SRR1560173 4 0.4877 0.2200 0.408 0.000 0.000 0.592
#> SRR1560174 2 0.0469 0.8968 0.000 0.988 0.000 0.012
#> SRR1560175 4 0.0188 0.7861 0.000 0.004 0.000 0.996
#> SRR1560176 1 0.0000 0.8643 1.000 0.000 0.000 0.000
#> SRR1560177 2 0.0188 0.8979 0.000 0.996 0.004 0.000
#> SRR1560178 3 0.0000 0.9433 0.000 0.000 1.000 0.000
#> SRR1560179 2 0.1305 0.8861 0.000 0.960 0.004 0.036
#> SRR1560180 4 0.1256 0.7746 0.008 0.000 0.028 0.964
#> SRR1560181 2 0.0188 0.8979 0.000 0.996 0.004 0.000
#> SRR1560182 2 0.0927 0.8946 0.000 0.976 0.008 0.016
#> SRR1560183 2 0.0188 0.8979 0.000 0.996 0.004 0.000
#> SRR1560184 3 0.0000 0.9433 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.9433 0.000 0.000 1.000 0.000
#> SRR1560186 3 0.1211 0.9320 0.000 0.040 0.960 0.000
#> SRR1560187 4 0.4194 0.6272 0.000 0.228 0.008 0.764
#> SRR1560188 2 0.0188 0.8972 0.004 0.996 0.000 0.000
#> SRR1560189 2 0.0000 0.8977 0.000 1.000 0.000 0.000
#> SRR1560190 2 0.1557 0.8715 0.056 0.944 0.000 0.000
#> SRR1560191 2 0.0188 0.8972 0.004 0.996 0.000 0.000
#> SRR1560192 1 0.0188 0.8640 0.996 0.000 0.000 0.004
#> SRR1560193 2 0.0817 0.8928 0.000 0.976 0.000 0.024
#> SRR1560194 3 0.1940 0.9093 0.000 0.076 0.924 0.000
#> SRR1560195 3 0.0000 0.9433 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.9433 0.000 0.000 1.000 0.000
#> SRR1560197 3 0.1637 0.9215 0.000 0.060 0.940 0.000
#> SRR1560198 3 0.0376 0.9431 0.000 0.004 0.992 0.004
#> SRR1560200 3 0.6311 0.6867 0.176 0.040 0.708 0.076
#> SRR1560199 3 0.1716 0.9190 0.000 0.064 0.936 0.000
#> SRR1560201 1 0.3123 0.7398 0.844 0.000 0.000 0.156
#> SRR1560202 2 0.5000 0.0119 0.000 0.504 0.496 0.000
#> SRR1560203 4 0.3367 0.7335 0.020 0.012 0.092 0.876
#> SRR1560204 4 0.3266 0.7033 0.000 0.168 0.000 0.832
#> SRR1560205 3 0.0188 0.9421 0.004 0.000 0.996 0.000
#> SRR1560206 4 0.2859 0.7405 0.000 0.112 0.008 0.880
#> SRR1560207 4 0.1118 0.7674 0.036 0.000 0.000 0.964
#> SRR1560208 2 0.0000 0.8977 0.000 1.000 0.000 0.000
#> SRR1560209 2 0.4898 0.2565 0.000 0.584 0.000 0.416
#> SRR1560210 3 0.0336 0.9404 0.008 0.000 0.992 0.000
#> SRR1560211 2 0.0469 0.8952 0.000 0.988 0.012 0.000
#> SRR1560212 3 0.3828 0.8559 0.000 0.084 0.848 0.068
#> SRR1560213 2 0.0188 0.8979 0.000 0.996 0.004 0.000
#> SRR1560214 4 0.0000 0.7863 0.000 0.000 0.000 1.000
#> SRR1560215 4 0.0000 0.7863 0.000 0.000 0.000 1.000
#> SRR1560216 4 0.0000 0.7863 0.000 0.000 0.000 1.000
#> SRR1560217 4 0.0000 0.7863 0.000 0.000 0.000 1.000
#> SRR1560218 3 0.1867 0.9134 0.000 0.072 0.928 0.000
#> SRR1560219 2 0.4933 0.2398 0.000 0.568 0.432 0.000
#> SRR1560220 3 0.0707 0.9367 0.000 0.000 0.980 0.020
#> SRR1560221 3 0.2197 0.8948 0.000 0.004 0.916 0.080
#> SRR1560222 2 0.4955 0.2082 0.444 0.556 0.000 0.000
#> SRR1560223 2 0.2345 0.8394 0.100 0.900 0.000 0.000
#> SRR1560224 2 0.3837 0.7031 0.224 0.776 0.000 0.000
#> SRR1560225 1 0.4877 0.2072 0.592 0.408 0.000 0.000
#> SRR1560226 1 0.0000 0.8643 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.8643 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.1792 0.8361 0.932 0.000 0.000 0.068
#> SRR1560229 4 0.5137 0.1424 0.000 0.452 0.004 0.544
#> SRR1560230 1 0.1339 0.8528 0.964 0.004 0.024 0.008
#> SRR1560231 3 0.0188 0.9421 0.004 0.000 0.996 0.000
#> SRR1560232 1 0.6217 0.4531 0.624 0.000 0.084 0.292
#> SRR1560233 2 0.1940 0.8603 0.076 0.924 0.000 0.000
#> SRR1560234 2 0.3970 0.7991 0.000 0.840 0.084 0.076
#> SRR1560235 2 0.0000 0.8977 0.000 1.000 0.000 0.000
#> SRR1560236 2 0.0469 0.8951 0.012 0.988 0.000 0.000
#> SRR1560237 2 0.0592 0.8958 0.000 0.984 0.000 0.016
#> SRR1560238 2 0.3172 0.7818 0.160 0.840 0.000 0.000
#> SRR1560239 2 0.0000 0.8977 0.000 1.000 0.000 0.000
#> SRR1560240 4 0.0000 0.7863 0.000 0.000 0.000 1.000
#> SRR1560241 4 0.2799 0.7430 0.000 0.108 0.008 0.884
#> SRR1560242 2 0.2216 0.8482 0.092 0.908 0.000 0.000
#> SRR1560243 2 0.0000 0.8977 0.000 1.000 0.000 0.000
#> SRR1560244 2 0.2401 0.8439 0.000 0.904 0.004 0.092
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 4 0.5953 0.257 0.384 0.000 0.000 0.504 0.112
#> SRR1560165 4 0.5888 0.410 0.316 0.000 0.000 0.560 0.124
#> SRR1560166 2 0.1549 0.878 0.016 0.944 0.000 0.000 0.040
#> SRR1560167 1 0.2429 0.822 0.900 0.000 0.004 0.076 0.020
#> SRR1560168 2 0.3215 0.842 0.056 0.852 0.000 0.000 0.092
#> SRR1560169 1 0.0798 0.847 0.976 0.000 0.000 0.016 0.008
#> SRR1560170 2 0.0162 0.877 0.000 0.996 0.000 0.004 0.000
#> SRR1560171 2 0.0703 0.873 0.000 0.976 0.000 0.024 0.000
#> SRR1560172 2 0.2068 0.844 0.004 0.904 0.000 0.092 0.000
#> SRR1560173 4 0.2179 0.728 0.112 0.000 0.000 0.888 0.000
#> SRR1560174 2 0.0609 0.873 0.000 0.980 0.000 0.020 0.000
#> SRR1560175 4 0.3635 0.602 0.004 0.248 0.000 0.748 0.000
#> SRR1560176 1 0.0290 0.845 0.992 0.000 0.000 0.000 0.008
#> SRR1560177 2 0.1732 0.869 0.000 0.920 0.000 0.000 0.080
#> SRR1560178 3 0.0000 0.900 0.000 0.000 1.000 0.000 0.000
#> SRR1560179 2 0.2286 0.853 0.000 0.888 0.000 0.004 0.108
#> SRR1560180 4 0.1800 0.758 0.048 0.000 0.020 0.932 0.000
#> SRR1560181 5 0.2629 0.770 0.000 0.136 0.004 0.000 0.860
#> SRR1560182 2 0.4182 0.433 0.000 0.600 0.000 0.000 0.400
#> SRR1560183 5 0.1851 0.786 0.000 0.088 0.000 0.000 0.912
#> SRR1560184 3 0.2020 0.900 0.000 0.000 0.900 0.000 0.100
#> SRR1560185 3 0.1908 0.905 0.000 0.000 0.908 0.000 0.092
#> SRR1560186 5 0.3333 0.671 0.000 0.004 0.208 0.000 0.788
#> SRR1560187 5 0.2193 0.738 0.000 0.008 0.000 0.092 0.900
#> SRR1560188 2 0.4793 0.645 0.056 0.684 0.000 0.000 0.260
#> SRR1560189 2 0.3812 0.756 0.024 0.772 0.000 0.000 0.204
#> SRR1560190 2 0.1410 0.871 0.060 0.940 0.000 0.000 0.000
#> SRR1560191 2 0.1725 0.877 0.020 0.936 0.000 0.000 0.044
#> SRR1560192 1 0.0955 0.845 0.968 0.000 0.000 0.028 0.004
#> SRR1560193 2 0.0510 0.875 0.000 0.984 0.000 0.016 0.000
#> SRR1560194 3 0.2835 0.842 0.000 0.112 0.868 0.004 0.016
#> SRR1560195 3 0.0880 0.912 0.000 0.000 0.968 0.000 0.032
#> SRR1560196 3 0.0963 0.913 0.000 0.000 0.964 0.000 0.036
#> SRR1560197 3 0.2450 0.903 0.000 0.028 0.896 0.000 0.076
#> SRR1560198 3 0.1952 0.910 0.000 0.004 0.912 0.000 0.084
#> SRR1560200 3 0.4874 0.630 0.180 0.008 0.736 0.072 0.004
#> SRR1560199 3 0.2491 0.883 0.000 0.068 0.896 0.000 0.036
#> SRR1560201 1 0.4072 0.699 0.772 0.008 0.000 0.192 0.028
#> SRR1560202 5 0.2661 0.793 0.000 0.056 0.056 0.000 0.888
#> SRR1560203 5 0.1792 0.736 0.000 0.000 0.000 0.084 0.916
#> SRR1560204 5 0.1732 0.742 0.000 0.000 0.000 0.080 0.920
#> SRR1560205 3 0.1792 0.909 0.000 0.000 0.916 0.000 0.084
#> SRR1560206 4 0.4258 0.699 0.000 0.160 0.000 0.768 0.072
#> SRR1560207 4 0.1205 0.769 0.040 0.000 0.000 0.956 0.004
#> SRR1560208 2 0.0609 0.879 0.000 0.980 0.000 0.000 0.020
#> SRR1560209 2 0.2074 0.831 0.000 0.896 0.000 0.104 0.000
#> SRR1560210 3 0.0703 0.910 0.000 0.000 0.976 0.000 0.024
#> SRR1560211 2 0.2012 0.872 0.000 0.920 0.020 0.000 0.060
#> SRR1560212 3 0.4951 0.667 0.000 0.196 0.704 0.100 0.000
#> SRR1560213 2 0.3837 0.624 0.000 0.692 0.000 0.000 0.308
#> SRR1560214 4 0.2127 0.785 0.000 0.000 0.000 0.892 0.108
#> SRR1560215 4 0.2470 0.788 0.000 0.012 0.000 0.884 0.104
#> SRR1560216 4 0.2516 0.779 0.000 0.000 0.000 0.860 0.140
#> SRR1560217 4 0.2471 0.781 0.000 0.000 0.000 0.864 0.136
#> SRR1560218 5 0.2753 0.759 0.000 0.008 0.136 0.000 0.856
#> SRR1560219 5 0.3759 0.778 0.000 0.092 0.092 0.000 0.816
#> SRR1560220 3 0.2017 0.910 0.000 0.000 0.912 0.008 0.080
#> SRR1560221 3 0.1408 0.914 0.000 0.000 0.948 0.008 0.044
#> SRR1560222 5 0.4597 0.625 0.260 0.044 0.000 0.000 0.696
#> SRR1560223 5 0.6180 0.525 0.220 0.224 0.000 0.000 0.556
#> SRR1560224 5 0.6402 0.346 0.348 0.180 0.000 0.000 0.472
#> SRR1560225 1 0.3988 0.527 0.732 0.252 0.000 0.000 0.016
#> SRR1560226 1 0.0609 0.843 0.980 0.000 0.000 0.000 0.020
#> SRR1560227 1 0.0609 0.843 0.980 0.000 0.000 0.000 0.020
#> SRR1560228 1 0.2409 0.820 0.900 0.000 0.000 0.068 0.032
#> SRR1560229 2 0.2929 0.748 0.000 0.820 0.000 0.180 0.000
#> SRR1560230 1 0.1430 0.835 0.944 0.000 0.000 0.004 0.052
#> SRR1560231 3 0.0000 0.900 0.000 0.000 1.000 0.000 0.000
#> SRR1560232 1 0.7098 0.149 0.412 0.000 0.248 0.324 0.016
#> SRR1560233 2 0.2521 0.858 0.084 0.896 0.008 0.004 0.008
#> SRR1560234 2 0.2863 0.821 0.000 0.876 0.060 0.064 0.000
#> SRR1560235 2 0.0510 0.880 0.000 0.984 0.000 0.000 0.016
#> SRR1560236 2 0.1981 0.875 0.028 0.924 0.000 0.000 0.048
#> SRR1560237 2 0.0609 0.873 0.000 0.980 0.000 0.020 0.000
#> SRR1560238 2 0.3752 0.800 0.148 0.804 0.000 0.000 0.048
#> SRR1560239 2 0.1197 0.879 0.000 0.952 0.000 0.000 0.048
#> SRR1560240 4 0.2377 0.784 0.000 0.000 0.000 0.872 0.128
#> SRR1560241 4 0.4573 0.585 0.000 0.256 0.000 0.700 0.044
#> SRR1560242 5 0.3569 0.760 0.104 0.068 0.000 0.000 0.828
#> SRR1560243 2 0.3607 0.730 0.004 0.752 0.000 0.000 0.244
#> SRR1560244 2 0.1741 0.873 0.000 0.936 0.000 0.024 0.040
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.5517 0.4953 0.580 0.000 0.000 0.232 0.184 0.004
#> SRR1560165 1 0.5620 0.4843 0.564 0.000 0.000 0.220 0.212 0.004
#> SRR1560166 2 0.1196 0.8130 0.000 0.952 0.000 0.000 0.040 0.008
#> SRR1560167 1 0.0653 0.5752 0.980 0.000 0.000 0.004 0.004 0.012
#> SRR1560168 2 0.4530 0.6165 0.040 0.688 0.000 0.000 0.252 0.020
#> SRR1560169 1 0.2531 0.4398 0.856 0.000 0.000 0.000 0.012 0.132
#> SRR1560170 2 0.0767 0.8163 0.008 0.976 0.000 0.000 0.004 0.012
#> SRR1560171 2 0.0405 0.8146 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR1560172 2 0.2160 0.8009 0.020 0.920 0.000 0.024 0.012 0.024
#> SRR1560173 4 0.4242 0.1940 0.412 0.000 0.000 0.572 0.004 0.012
#> SRR1560174 2 0.0291 0.8151 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR1560175 2 0.6541 -0.0532 0.100 0.448 0.000 0.384 0.012 0.056
#> SRR1560176 6 0.3868 0.6479 0.492 0.000 0.000 0.000 0.000 0.508
#> SRR1560177 2 0.3729 0.5970 0.000 0.692 0.000 0.000 0.296 0.012
#> SRR1560178 3 0.2815 0.7836 0.032 0.000 0.848 0.000 0.000 0.120
#> SRR1560179 2 0.2527 0.7741 0.000 0.868 0.000 0.024 0.108 0.000
#> SRR1560180 4 0.5884 0.1348 0.420 0.000 0.008 0.468 0.028 0.076
#> SRR1560181 5 0.2265 0.7006 0.000 0.084 0.004 0.008 0.896 0.008
#> SRR1560182 2 0.5991 0.0679 0.000 0.468 0.060 0.048 0.416 0.008
#> SRR1560183 5 0.2051 0.6873 0.000 0.024 0.008 0.028 0.924 0.016
#> SRR1560184 3 0.1261 0.8403 0.000 0.000 0.952 0.000 0.024 0.024
#> SRR1560185 3 0.1261 0.8403 0.000 0.000 0.952 0.000 0.024 0.024
#> SRR1560186 3 0.6083 0.1838 0.000 0.000 0.480 0.012 0.308 0.200
#> SRR1560187 5 0.6434 0.0298 0.000 0.000 0.056 0.372 0.444 0.128
#> SRR1560188 2 0.4741 0.6369 0.012 0.712 0.004 0.016 0.212 0.044
#> SRR1560189 2 0.3708 0.6975 0.000 0.776 0.004 0.012 0.188 0.020
#> SRR1560190 2 0.2325 0.7968 0.044 0.900 0.000 0.000 0.008 0.048
#> SRR1560191 2 0.1116 0.8163 0.004 0.960 0.000 0.000 0.008 0.028
#> SRR1560192 1 0.2662 0.3971 0.840 0.000 0.004 0.000 0.004 0.152
#> SRR1560193 2 0.0000 0.8153 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560194 3 0.2402 0.7507 0.000 0.140 0.856 0.000 0.000 0.004
#> SRR1560195 3 0.0291 0.8453 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR1560196 3 0.0508 0.8457 0.000 0.000 0.984 0.000 0.004 0.012
#> SRR1560197 3 0.0603 0.8452 0.000 0.000 0.980 0.000 0.016 0.004
#> SRR1560198 3 0.1262 0.8434 0.000 0.000 0.956 0.008 0.016 0.020
#> SRR1560200 3 0.6003 0.1051 0.404 0.012 0.452 0.008 0.000 0.124
#> SRR1560199 3 0.2162 0.7974 0.000 0.088 0.896 0.000 0.012 0.004
#> SRR1560201 1 0.3897 0.6084 0.772 0.000 0.000 0.048 0.168 0.012
#> SRR1560202 5 0.2244 0.6920 0.024 0.012 0.024 0.000 0.916 0.024
#> SRR1560203 4 0.7528 -0.0725 0.000 0.000 0.148 0.312 0.304 0.236
#> SRR1560204 5 0.7511 -0.0869 0.000 0.000 0.144 0.304 0.316 0.236
#> SRR1560205 3 0.0914 0.8433 0.000 0.000 0.968 0.000 0.016 0.016
#> SRR1560206 4 0.5075 0.4351 0.020 0.244 0.000 0.672 0.028 0.036
#> SRR1560207 4 0.3839 0.4943 0.212 0.000 0.000 0.748 0.004 0.036
#> SRR1560208 2 0.0717 0.8162 0.000 0.976 0.000 0.000 0.016 0.008
#> SRR1560209 2 0.2883 0.7459 0.000 0.844 0.000 0.132 0.012 0.012
#> SRR1560210 3 0.1745 0.8336 0.012 0.000 0.920 0.000 0.000 0.068
#> SRR1560211 2 0.2001 0.8099 0.000 0.920 0.020 0.000 0.044 0.016
#> SRR1560212 3 0.5471 0.5053 0.040 0.272 0.636 0.020 0.012 0.020
#> SRR1560213 5 0.4114 0.3342 0.000 0.356 0.008 0.000 0.628 0.008
#> SRR1560214 4 0.0547 0.6333 0.000 0.000 0.000 0.980 0.020 0.000
#> SRR1560215 4 0.0146 0.6317 0.000 0.004 0.000 0.996 0.000 0.000
#> SRR1560216 4 0.1334 0.6277 0.000 0.000 0.000 0.948 0.032 0.020
#> SRR1560217 4 0.0858 0.6327 0.000 0.000 0.000 0.968 0.028 0.004
#> SRR1560218 5 0.2662 0.6511 0.000 0.000 0.120 0.000 0.856 0.024
#> SRR1560219 5 0.2822 0.7006 0.000 0.076 0.056 0.000 0.864 0.004
#> SRR1560220 3 0.2434 0.8118 0.000 0.000 0.896 0.056 0.016 0.032
#> SRR1560221 3 0.0924 0.8455 0.004 0.000 0.972 0.008 0.008 0.008
#> SRR1560222 5 0.3051 0.6568 0.112 0.036 0.000 0.000 0.844 0.008
#> SRR1560223 5 0.3466 0.6586 0.096 0.084 0.000 0.000 0.816 0.004
#> SRR1560224 6 0.5631 0.6334 0.196 0.096 0.004 0.000 0.056 0.648
#> SRR1560225 6 0.5515 0.6225 0.260 0.184 0.000 0.000 0.000 0.556
#> SRR1560226 6 0.3797 0.7360 0.420 0.000 0.000 0.000 0.000 0.580
#> SRR1560227 6 0.3765 0.7425 0.404 0.000 0.000 0.000 0.000 0.596
#> SRR1560228 1 0.2992 0.5985 0.864 0.000 0.000 0.072 0.032 0.032
#> SRR1560229 2 0.3005 0.7671 0.000 0.848 0.000 0.108 0.008 0.036
#> SRR1560230 6 0.6078 0.6462 0.316 0.000 0.060 0.036 0.032 0.556
#> SRR1560231 3 0.3014 0.7750 0.036 0.000 0.832 0.000 0.000 0.132
#> SRR1560232 1 0.5667 0.4254 0.640 0.000 0.148 0.052 0.000 0.160
#> SRR1560233 2 0.1806 0.8134 0.044 0.928 0.000 0.000 0.008 0.020
#> SRR1560234 2 0.2729 0.7801 0.004 0.888 0.064 0.016 0.012 0.016
#> SRR1560235 2 0.0436 0.8157 0.000 0.988 0.004 0.000 0.004 0.004
#> SRR1560236 2 0.2658 0.7847 0.036 0.876 0.000 0.000 0.008 0.080
#> SRR1560237 2 0.0717 0.8132 0.000 0.976 0.000 0.000 0.008 0.016
#> SRR1560238 2 0.4754 0.6032 0.080 0.700 0.000 0.000 0.020 0.200
#> SRR1560239 2 0.3738 0.6255 0.000 0.704 0.000 0.000 0.280 0.016
#> SRR1560240 4 0.6898 0.3215 0.224 0.012 0.000 0.484 0.224 0.056
#> SRR1560241 2 0.6962 0.4193 0.092 0.544 0.000 0.088 0.228 0.048
#> SRR1560242 5 0.3093 0.5981 0.164 0.012 0.000 0.000 0.816 0.008
#> SRR1560243 5 0.4108 0.5221 0.028 0.260 0.000 0.000 0.704 0.008
#> SRR1560244 2 0.3669 0.7139 0.004 0.784 0.000 0.004 0.172 0.036
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 15546 rows and 81 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 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.434 0.747 0.845 0.3440 0.568 0.568
#> 3 3 0.292 0.594 0.721 0.5456 0.799 0.674
#> 4 4 0.374 0.635 0.794 0.2011 0.726 0.500
#> 5 5 0.430 0.631 0.773 0.0574 0.935 0.821
#> 6 6 0.517 0.659 0.776 0.0799 0.986 0.955
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1560164 1 0.0376 0.850 0.996 0.004
#> SRR1560165 1 0.0376 0.850 0.996 0.004
#> SRR1560166 1 0.3879 0.858 0.924 0.076
#> SRR1560167 1 0.0376 0.850 0.996 0.004
#> SRR1560168 1 0.3879 0.858 0.924 0.076
#> SRR1560169 1 0.0376 0.850 0.996 0.004
#> SRR1560170 1 0.3879 0.858 0.924 0.076
#> SRR1560171 1 0.9393 0.260 0.644 0.356
#> SRR1560172 1 0.9393 0.260 0.644 0.356
#> SRR1560173 1 0.0376 0.850 0.996 0.004
#> SRR1560174 1 0.9393 0.260 0.644 0.356
#> SRR1560175 1 0.9393 0.260 0.644 0.356
#> SRR1560176 1 0.0376 0.850 0.996 0.004
#> SRR1560177 2 0.9608 0.754 0.384 0.616
#> SRR1560178 2 0.2043 0.615 0.032 0.968
#> SRR1560179 1 0.5842 0.805 0.860 0.140
#> SRR1560180 2 0.9522 0.765 0.372 0.628
#> SRR1560181 1 0.5842 0.805 0.860 0.140
#> SRR1560182 1 0.5842 0.805 0.860 0.140
#> SRR1560183 1 0.5842 0.805 0.860 0.140
#> SRR1560184 2 0.0376 0.603 0.004 0.996
#> SRR1560185 2 0.0376 0.603 0.004 0.996
#> SRR1560186 1 0.5737 0.801 0.864 0.136
#> SRR1560187 1 0.2423 0.858 0.960 0.040
#> SRR1560188 1 0.3879 0.858 0.924 0.076
#> SRR1560189 1 0.3879 0.858 0.924 0.076
#> SRR1560190 1 0.3879 0.858 0.924 0.076
#> SRR1560191 1 0.3879 0.858 0.924 0.076
#> SRR1560192 1 0.0376 0.850 0.996 0.004
#> SRR1560193 1 0.4562 0.846 0.904 0.096
#> SRR1560194 2 0.9686 0.740 0.396 0.604
#> SRR1560195 2 0.0376 0.603 0.004 0.996
#> SRR1560196 2 0.0376 0.603 0.004 0.996
#> SRR1560197 2 0.9686 0.740 0.396 0.604
#> SRR1560198 1 0.0000 0.852 1.000 0.000
#> SRR1560200 2 0.9963 0.573 0.464 0.536
#> SRR1560199 2 0.9686 0.740 0.396 0.604
#> SRR1560201 1 0.0376 0.850 0.996 0.004
#> SRR1560202 1 0.5294 0.827 0.880 0.120
#> SRR1560203 1 0.0376 0.850 0.996 0.004
#> SRR1560204 1 0.0000 0.852 1.000 0.000
#> SRR1560205 2 0.0376 0.603 0.004 0.996
#> SRR1560206 1 0.5294 0.827 0.880 0.120
#> SRR1560207 1 0.0376 0.850 0.996 0.004
#> SRR1560208 2 0.9248 0.780 0.340 0.660
#> SRR1560209 2 0.9248 0.780 0.340 0.660
#> SRR1560210 2 0.9248 0.780 0.340 0.660
#> SRR1560211 2 0.9248 0.780 0.340 0.660
#> SRR1560212 2 0.9248 0.780 0.340 0.660
#> SRR1560213 1 0.9393 0.253 0.644 0.356
#> SRR1560214 1 0.3879 0.858 0.924 0.076
#> SRR1560215 1 0.3879 0.858 0.924 0.076
#> SRR1560216 1 0.0000 0.852 1.000 0.000
#> SRR1560217 1 0.0000 0.852 1.000 0.000
#> SRR1560218 1 0.9427 0.239 0.640 0.360
#> SRR1560219 1 0.9427 0.239 0.640 0.360
#> SRR1560220 2 0.9170 0.772 0.332 0.668
#> SRR1560221 2 0.9170 0.772 0.332 0.668
#> SRR1560222 1 0.0672 0.852 0.992 0.008
#> SRR1560223 1 0.0672 0.852 0.992 0.008
#> SRR1560224 1 0.1414 0.856 0.980 0.020
#> SRR1560225 1 0.0376 0.850 0.996 0.004
#> SRR1560226 1 0.0376 0.850 0.996 0.004
#> SRR1560227 1 0.0376 0.850 0.996 0.004
#> SRR1560228 1 0.0376 0.850 0.996 0.004
#> SRR1560229 1 0.5842 0.805 0.860 0.140
#> SRR1560230 1 0.0000 0.852 1.000 0.000
#> SRR1560231 2 0.9393 0.775 0.356 0.644
#> SRR1560232 2 0.9393 0.775 0.356 0.644
#> SRR1560233 2 0.9732 0.724 0.404 0.596
#> SRR1560234 2 0.9686 0.740 0.396 0.604
#> SRR1560235 1 0.3879 0.858 0.924 0.076
#> SRR1560236 1 0.3879 0.858 0.924 0.076
#> SRR1560237 2 0.9686 0.740 0.396 0.604
#> SRR1560238 1 0.3879 0.858 0.924 0.076
#> SRR1560239 2 0.9608 0.754 0.384 0.616
#> SRR1560240 1 0.5294 0.826 0.880 0.120
#> SRR1560241 1 0.5294 0.826 0.880 0.120
#> SRR1560242 1 0.3584 0.859 0.932 0.068
#> SRR1560243 1 0.3584 0.859 0.932 0.068
#> SRR1560244 1 0.9427 0.240 0.640 0.360
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.489 0.574 0.772 0.000 0.228
#> SRR1560165 1 0.489 0.574 0.772 0.000 0.228
#> SRR1560166 1 0.572 0.596 0.704 0.292 0.004
#> SRR1560167 1 0.610 0.589 0.740 0.032 0.228
#> SRR1560168 1 0.572 0.596 0.704 0.292 0.004
#> SRR1560169 1 0.598 0.589 0.744 0.028 0.228
#> SRR1560170 1 0.572 0.596 0.704 0.292 0.004
#> SRR1560171 2 0.645 0.091 0.436 0.560 0.004
#> SRR1560172 2 0.645 0.091 0.436 0.560 0.004
#> SRR1560173 1 0.598 0.589 0.744 0.028 0.228
#> SRR1560174 2 0.645 0.091 0.436 0.560 0.004
#> SRR1560175 2 0.645 0.091 0.436 0.560 0.004
#> SRR1560176 1 0.598 0.588 0.744 0.028 0.228
#> SRR1560177 2 0.164 0.721 0.044 0.956 0.000
#> SRR1560178 3 0.583 0.799 0.000 0.340 0.660
#> SRR1560179 1 0.637 0.420 0.588 0.408 0.004
#> SRR1560180 2 0.389 0.726 0.096 0.880 0.024
#> SRR1560181 1 0.634 0.437 0.596 0.400 0.004
#> SRR1560182 1 0.634 0.437 0.596 0.400 0.004
#> SRR1560183 1 0.634 0.437 0.596 0.400 0.004
#> SRR1560184 3 0.493 0.966 0.000 0.232 0.768
#> SRR1560185 3 0.493 0.966 0.000 0.232 0.768
#> SRR1560186 1 0.603 0.438 0.624 0.376 0.000
#> SRR1560187 1 0.649 0.642 0.744 0.192 0.064
#> SRR1560188 1 0.524 0.624 0.756 0.240 0.004
#> SRR1560189 1 0.524 0.624 0.756 0.240 0.004
#> SRR1560190 1 0.572 0.596 0.704 0.292 0.004
#> SRR1560191 1 0.572 0.596 0.704 0.292 0.004
#> SRR1560192 1 0.598 0.589 0.744 0.028 0.228
#> SRR1560193 1 0.587 0.574 0.684 0.312 0.004
#> SRR1560194 2 0.295 0.734 0.088 0.908 0.004
#> SRR1560195 3 0.493 0.966 0.000 0.232 0.768
#> SRR1560196 3 0.493 0.966 0.000 0.232 0.768
#> SRR1560197 2 0.295 0.734 0.088 0.908 0.004
#> SRR1560198 1 0.624 0.646 0.776 0.100 0.124
#> SRR1560200 2 0.369 0.700 0.140 0.860 0.000
#> SRR1560199 2 0.295 0.734 0.088 0.908 0.004
#> SRR1560201 1 0.624 0.646 0.776 0.100 0.124
#> SRR1560202 1 0.621 0.497 0.628 0.368 0.004
#> SRR1560203 1 0.489 0.574 0.772 0.000 0.228
#> SRR1560204 1 0.636 0.643 0.768 0.096 0.136
#> SRR1560205 3 0.493 0.966 0.000 0.232 0.768
#> SRR1560206 1 0.621 0.497 0.628 0.368 0.004
#> SRR1560207 1 0.573 0.586 0.752 0.020 0.228
#> SRR1560208 2 0.153 0.665 0.000 0.960 0.040
#> SRR1560209 2 0.153 0.665 0.000 0.960 0.040
#> SRR1560210 2 0.153 0.665 0.000 0.960 0.040
#> SRR1560211 2 0.153 0.665 0.000 0.960 0.040
#> SRR1560212 2 0.153 0.665 0.000 0.960 0.040
#> SRR1560213 2 0.631 0.320 0.392 0.604 0.004
#> SRR1560214 1 0.497 0.627 0.764 0.236 0.000
#> SRR1560215 1 0.497 0.627 0.764 0.236 0.000
#> SRR1560216 1 0.685 0.645 0.740 0.124 0.136
#> SRR1560217 1 0.685 0.645 0.740 0.124 0.136
#> SRR1560218 2 0.540 0.533 0.256 0.740 0.004
#> SRR1560219 2 0.540 0.533 0.256 0.740 0.004
#> SRR1560220 2 0.441 0.487 0.008 0.832 0.160
#> SRR1560221 2 0.441 0.487 0.008 0.832 0.160
#> SRR1560222 1 0.277 0.627 0.920 0.008 0.072
#> SRR1560223 1 0.337 0.647 0.908 0.052 0.040
#> SRR1560224 1 0.639 0.636 0.764 0.088 0.148
#> SRR1560225 1 0.529 0.579 0.764 0.008 0.228
#> SRR1560226 1 0.489 0.574 0.772 0.000 0.228
#> SRR1560227 1 0.511 0.577 0.768 0.004 0.228
#> SRR1560228 1 0.642 0.590 0.728 0.044 0.228
#> SRR1560229 1 0.619 0.496 0.632 0.364 0.004
#> SRR1560230 1 0.703 0.647 0.728 0.148 0.124
#> SRR1560231 2 0.103 0.676 0.000 0.976 0.024
#> SRR1560232 2 0.103 0.676 0.000 0.976 0.024
#> SRR1560233 2 0.319 0.727 0.112 0.888 0.000
#> SRR1560234 2 0.304 0.731 0.104 0.896 0.000
#> SRR1560235 1 0.610 0.535 0.648 0.348 0.004
#> SRR1560236 1 0.610 0.535 0.648 0.348 0.004
#> SRR1560237 2 0.304 0.731 0.104 0.896 0.000
#> SRR1560238 1 0.562 0.603 0.716 0.280 0.004
#> SRR1560239 2 0.175 0.723 0.048 0.952 0.000
#> SRR1560240 1 0.583 0.528 0.660 0.340 0.000
#> SRR1560241 1 0.583 0.528 0.660 0.340 0.000
#> SRR1560242 1 0.536 0.604 0.724 0.276 0.000
#> SRR1560243 1 0.536 0.604 0.724 0.276 0.000
#> SRR1560244 2 0.604 0.196 0.380 0.620 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.4222 0.84153 0.728 0.000 0.000 0.272
#> SRR1560165 1 0.4222 0.84153 0.728 0.000 0.000 0.272
#> SRR1560166 4 0.0376 0.69970 0.004 0.004 0.000 0.992
#> SRR1560167 1 0.4605 0.83130 0.664 0.000 0.000 0.336
#> SRR1560168 4 0.0376 0.69970 0.004 0.004 0.000 0.992
#> SRR1560169 1 0.4564 0.83783 0.672 0.000 0.000 0.328
#> SRR1560170 4 0.0376 0.69970 0.004 0.004 0.000 0.992
#> SRR1560171 4 0.5495 0.36930 0.028 0.348 0.000 0.624
#> SRR1560172 4 0.5495 0.36930 0.028 0.348 0.000 0.624
#> SRR1560173 1 0.4585 0.83488 0.668 0.000 0.000 0.332
#> SRR1560174 4 0.5495 0.36930 0.028 0.348 0.000 0.624
#> SRR1560175 4 0.5495 0.36930 0.028 0.348 0.000 0.624
#> SRR1560176 1 0.4608 0.83092 0.692 0.004 0.000 0.304
#> SRR1560177 2 0.3402 0.84773 0.004 0.832 0.000 0.164
#> SRR1560178 3 0.4008 0.63816 0.000 0.244 0.756 0.000
#> SRR1560179 4 0.2976 0.68110 0.008 0.120 0.000 0.872
#> SRR1560180 2 0.3428 0.83850 0.012 0.844 0.000 0.144
#> SRR1560181 4 0.2859 0.68485 0.008 0.112 0.000 0.880
#> SRR1560182 4 0.2859 0.68485 0.008 0.112 0.000 0.880
#> SRR1560183 4 0.2859 0.68485 0.008 0.112 0.000 0.880
#> SRR1560184 3 0.0000 0.94515 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.94515 0.000 0.000 1.000 0.000
#> SRR1560186 4 0.4663 0.63908 0.064 0.148 0.000 0.788
#> SRR1560187 4 0.4290 0.53075 0.212 0.016 0.000 0.772
#> SRR1560188 4 0.1978 0.67110 0.068 0.004 0.000 0.928
#> SRR1560189 4 0.1978 0.67110 0.068 0.004 0.000 0.928
#> SRR1560190 4 0.0336 0.69850 0.008 0.000 0.000 0.992
#> SRR1560191 4 0.0188 0.69871 0.004 0.000 0.000 0.996
#> SRR1560192 1 0.4585 0.83488 0.668 0.000 0.000 0.332
#> SRR1560193 4 0.0895 0.70236 0.004 0.020 0.000 0.976
#> SRR1560194 2 0.4434 0.83170 0.004 0.772 0.016 0.208
#> SRR1560195 3 0.0000 0.94515 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.94515 0.000 0.000 1.000 0.000
#> SRR1560197 2 0.4434 0.83170 0.004 0.772 0.016 0.208
#> SRR1560198 4 0.4950 0.14828 0.376 0.004 0.000 0.620
#> SRR1560200 2 0.4244 0.79495 0.036 0.804 0.000 0.160
#> SRR1560199 2 0.4434 0.83170 0.004 0.772 0.016 0.208
#> SRR1560201 4 0.5004 0.04587 0.392 0.004 0.000 0.604
#> SRR1560202 4 0.2949 0.69831 0.024 0.088 0.000 0.888
#> SRR1560203 1 0.2973 0.75254 0.856 0.000 0.000 0.144
#> SRR1560204 4 0.4817 0.12321 0.388 0.000 0.000 0.612
#> SRR1560205 3 0.0000 0.94515 0.000 0.000 1.000 0.000
#> SRR1560206 4 0.2949 0.69831 0.024 0.088 0.000 0.888
#> SRR1560207 1 0.4522 0.84053 0.680 0.000 0.000 0.320
#> SRR1560208 2 0.2990 0.83414 0.008 0.900 0.036 0.056
#> SRR1560209 2 0.2990 0.83414 0.008 0.900 0.036 0.056
#> SRR1560210 2 0.2990 0.83414 0.008 0.900 0.036 0.056
#> SRR1560211 2 0.2990 0.83414 0.008 0.900 0.036 0.056
#> SRR1560212 2 0.2990 0.83414 0.008 0.900 0.036 0.056
#> SRR1560213 4 0.6222 0.33934 0.080 0.304 0.000 0.616
#> SRR1560214 4 0.2334 0.66105 0.088 0.004 0.000 0.908
#> SRR1560215 4 0.2334 0.66105 0.088 0.004 0.000 0.908
#> SRR1560216 4 0.4605 0.26270 0.336 0.000 0.000 0.664
#> SRR1560217 4 0.4605 0.26270 0.336 0.000 0.000 0.664
#> SRR1560218 4 0.6655 0.00283 0.084 0.440 0.000 0.476
#> SRR1560219 4 0.6653 0.00433 0.084 0.436 0.000 0.480
#> SRR1560220 2 0.5807 0.49990 0.044 0.728 0.192 0.036
#> SRR1560221 2 0.5807 0.49990 0.044 0.728 0.192 0.036
#> SRR1560222 4 0.4999 -0.39518 0.492 0.000 0.000 0.508
#> SRR1560223 4 0.4804 0.07215 0.384 0.000 0.000 0.616
#> SRR1560224 4 0.4972 -0.30477 0.456 0.000 0.000 0.544
#> SRR1560225 1 0.3486 0.79719 0.812 0.000 0.000 0.188
#> SRR1560226 1 0.2704 0.74367 0.876 0.000 0.000 0.124
#> SRR1560227 1 0.2868 0.76568 0.864 0.000 0.000 0.136
#> SRR1560228 1 0.4837 0.80582 0.648 0.004 0.000 0.348
#> SRR1560229 4 0.2775 0.69521 0.020 0.084 0.000 0.896
#> SRR1560230 4 0.4431 0.32959 0.304 0.000 0.000 0.696
#> SRR1560231 2 0.2021 0.83109 0.012 0.932 0.000 0.056
#> SRR1560232 2 0.2021 0.83109 0.012 0.932 0.000 0.056
#> SRR1560233 2 0.4088 0.80927 0.004 0.764 0.000 0.232
#> SRR1560234 2 0.4018 0.81985 0.004 0.772 0.000 0.224
#> SRR1560235 4 0.1938 0.70108 0.012 0.052 0.000 0.936
#> SRR1560236 4 0.1938 0.70108 0.012 0.052 0.000 0.936
#> SRR1560237 2 0.4018 0.81985 0.004 0.772 0.000 0.224
#> SRR1560238 4 0.1004 0.69481 0.024 0.004 0.000 0.972
#> SRR1560239 2 0.3448 0.84729 0.004 0.828 0.000 0.168
#> SRR1560240 4 0.3587 0.69383 0.052 0.088 0.000 0.860
#> SRR1560241 4 0.3587 0.69383 0.052 0.088 0.000 0.860
#> SRR1560242 4 0.2816 0.68447 0.064 0.036 0.000 0.900
#> SRR1560243 4 0.2816 0.68447 0.064 0.036 0.000 0.900
#> SRR1560244 4 0.4950 0.32088 0.004 0.376 0.000 0.620
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.3635 0.7080 0.748 0.000 0.000 0.004 0.248
#> SRR1560165 1 0.3635 0.7080 0.748 0.000 0.000 0.004 0.248
#> SRR1560166 5 0.0693 0.7411 0.012 0.008 0.000 0.000 0.980
#> SRR1560167 1 0.4142 0.6937 0.684 0.004 0.000 0.004 0.308
#> SRR1560168 5 0.0693 0.7411 0.012 0.008 0.000 0.000 0.980
#> SRR1560169 1 0.3990 0.6995 0.688 0.000 0.000 0.004 0.308
#> SRR1560170 5 0.0693 0.7411 0.012 0.008 0.000 0.000 0.980
#> SRR1560171 5 0.4866 0.4052 0.036 0.344 0.000 0.000 0.620
#> SRR1560172 5 0.4866 0.4052 0.036 0.344 0.000 0.000 0.620
#> SRR1560173 1 0.4009 0.6968 0.684 0.000 0.000 0.004 0.312
#> SRR1560174 5 0.4866 0.4052 0.036 0.344 0.000 0.000 0.620
#> SRR1560175 5 0.4866 0.4052 0.036 0.344 0.000 0.000 0.620
#> SRR1560176 1 0.6751 0.5793 0.456 0.004 0.000 0.284 0.256
#> SRR1560177 2 0.3775 0.7819 0.024 0.812 0.000 0.016 0.148
#> SRR1560178 3 0.3452 0.5391 0.000 0.244 0.756 0.000 0.000
#> SRR1560179 5 0.2992 0.7126 0.024 0.092 0.000 0.012 0.872
#> SRR1560180 2 0.3685 0.7639 0.028 0.824 0.000 0.016 0.132
#> SRR1560181 5 0.2804 0.7171 0.016 0.092 0.000 0.012 0.880
#> SRR1560182 5 0.2804 0.7171 0.016 0.092 0.000 0.012 0.880
#> SRR1560183 5 0.2804 0.7171 0.016 0.092 0.000 0.012 0.880
#> SRR1560184 3 0.0000 0.9214 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 0.9214 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 5 0.4194 0.6548 0.080 0.128 0.000 0.004 0.788
#> SRR1560187 5 0.4275 0.6014 0.152 0.004 0.000 0.068 0.776
#> SRR1560188 5 0.1768 0.7186 0.072 0.004 0.000 0.000 0.924
#> SRR1560189 5 0.1768 0.7186 0.072 0.004 0.000 0.000 0.924
#> SRR1560190 5 0.0671 0.7399 0.016 0.004 0.000 0.000 0.980
#> SRR1560191 5 0.0566 0.7401 0.012 0.004 0.000 0.000 0.984
#> SRR1560192 1 0.4009 0.6968 0.684 0.000 0.000 0.004 0.312
#> SRR1560193 5 0.1106 0.7426 0.012 0.024 0.000 0.000 0.964
#> SRR1560194 2 0.4829 0.7551 0.028 0.740 0.016 0.016 0.200
#> SRR1560195 3 0.0000 0.9214 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.9214 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 2 0.4829 0.7551 0.028 0.740 0.016 0.016 0.200
#> SRR1560198 5 0.5752 0.3001 0.240 0.000 0.000 0.148 0.612
#> SRR1560200 2 0.3543 0.6936 0.036 0.832 0.000 0.008 0.124
#> SRR1560199 2 0.4829 0.7551 0.028 0.740 0.016 0.016 0.200
#> SRR1560201 5 0.5827 0.2194 0.260 0.000 0.000 0.144 0.596
#> SRR1560202 5 0.2805 0.7320 0.032 0.068 0.000 0.012 0.888
#> SRR1560203 1 0.5452 0.4575 0.616 0.000 0.000 0.292 0.092
#> SRR1560204 5 0.5810 0.2826 0.244 0.000 0.000 0.152 0.604
#> SRR1560205 3 0.0000 0.9214 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 5 0.2805 0.7320 0.032 0.068 0.000 0.012 0.888
#> SRR1560207 1 0.3928 0.7029 0.700 0.000 0.000 0.004 0.296
#> SRR1560208 2 0.1124 0.7556 0.004 0.960 0.036 0.000 0.000
#> SRR1560209 2 0.1124 0.7556 0.004 0.960 0.036 0.000 0.000
#> SRR1560210 2 0.1124 0.7556 0.004 0.960 0.036 0.000 0.000
#> SRR1560211 2 0.1124 0.7556 0.004 0.960 0.036 0.000 0.000
#> SRR1560212 2 0.1124 0.7556 0.004 0.960 0.036 0.000 0.000
#> SRR1560213 4 0.5315 0.3698 0.024 0.016 0.000 0.528 0.432
#> SRR1560214 5 0.2124 0.7088 0.096 0.004 0.000 0.000 0.900
#> SRR1560215 5 0.2124 0.7088 0.096 0.004 0.000 0.000 0.900
#> SRR1560216 5 0.5466 0.3969 0.192 0.000 0.000 0.152 0.656
#> SRR1560217 5 0.5466 0.3969 0.192 0.000 0.000 0.152 0.656
#> SRR1560218 4 0.4339 0.5673 0.000 0.020 0.000 0.684 0.296
#> SRR1560219 4 0.4360 0.5681 0.000 0.020 0.000 0.680 0.300
#> SRR1560220 4 0.6830 0.2737 0.000 0.380 0.188 0.420 0.012
#> SRR1560221 4 0.6830 0.2737 0.000 0.380 0.188 0.420 0.012
#> SRR1560222 1 0.4452 0.2569 0.500 0.000 0.000 0.004 0.496
#> SRR1560223 5 0.4171 0.1391 0.396 0.000 0.000 0.000 0.604
#> SRR1560224 5 0.6268 -0.0832 0.228 0.000 0.000 0.232 0.540
#> SRR1560225 1 0.5834 0.5284 0.584 0.000 0.000 0.284 0.132
#> SRR1560226 1 0.5067 0.4596 0.648 0.000 0.000 0.288 0.064
#> SRR1560227 1 0.5265 0.4870 0.636 0.000 0.000 0.284 0.080
#> SRR1560228 1 0.4253 0.6707 0.660 0.004 0.000 0.004 0.332
#> SRR1560229 5 0.2610 0.7303 0.028 0.076 0.000 0.004 0.892
#> SRR1560230 5 0.5159 0.4509 0.164 0.000 0.000 0.144 0.692
#> SRR1560231 2 0.0566 0.7424 0.004 0.984 0.000 0.012 0.000
#> SRR1560232 2 0.0566 0.7424 0.004 0.984 0.000 0.012 0.000
#> SRR1560233 2 0.4364 0.7346 0.020 0.740 0.000 0.016 0.224
#> SRR1560234 2 0.4303 0.7470 0.020 0.748 0.000 0.016 0.216
#> SRR1560235 5 0.1893 0.7367 0.024 0.028 0.000 0.012 0.936
#> SRR1560236 5 0.1893 0.7367 0.024 0.028 0.000 0.012 0.936
#> SRR1560237 2 0.4303 0.7470 0.020 0.748 0.000 0.016 0.216
#> SRR1560238 5 0.0955 0.7375 0.028 0.004 0.000 0.000 0.968
#> SRR1560239 2 0.3817 0.7815 0.024 0.808 0.000 0.016 0.152
#> SRR1560240 5 0.3119 0.7239 0.072 0.068 0.000 0.000 0.860
#> SRR1560241 5 0.3119 0.7239 0.072 0.068 0.000 0.000 0.860
#> SRR1560242 5 0.2293 0.7239 0.084 0.016 0.000 0.000 0.900
#> SRR1560243 5 0.2293 0.7239 0.084 0.016 0.000 0.000 0.900
#> SRR1560244 5 0.4747 0.3791 0.028 0.352 0.000 0.000 0.620
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.3947 0.76890 0.764 0.000 0.000 0.100 0.136 0.000
#> SRR1560165 1 0.3901 0.77131 0.768 0.000 0.000 0.096 0.136 0.000
#> SRR1560166 5 0.1471 0.72048 0.064 0.004 0.000 0.000 0.932 0.000
#> SRR1560167 1 0.2595 0.84042 0.836 0.004 0.000 0.000 0.160 0.000
#> SRR1560168 5 0.1471 0.72048 0.064 0.004 0.000 0.000 0.932 0.000
#> SRR1560169 1 0.2558 0.83946 0.840 0.000 0.000 0.004 0.156 0.000
#> SRR1560170 5 0.1471 0.72048 0.064 0.004 0.000 0.000 0.932 0.000
#> SRR1560171 5 0.5700 0.39602 0.136 0.300 0.000 0.008 0.552 0.004
#> SRR1560172 5 0.5700 0.39602 0.136 0.300 0.000 0.008 0.552 0.004
#> SRR1560173 1 0.2491 0.83499 0.836 0.000 0.000 0.000 0.164 0.000
#> SRR1560174 5 0.5700 0.39602 0.136 0.300 0.000 0.008 0.552 0.004
#> SRR1560175 5 0.5700 0.39602 0.136 0.300 0.000 0.008 0.552 0.004
#> SRR1560176 4 0.4858 0.60404 0.180 0.000 0.000 0.664 0.156 0.000
#> SRR1560177 2 0.4729 0.74998 0.100 0.744 0.000 0.012 0.120 0.024
#> SRR1560178 3 0.3298 0.50000 0.000 0.236 0.756 0.008 0.000 0.000
#> SRR1560179 5 0.3059 0.70181 0.068 0.032 0.000 0.016 0.868 0.016
#> SRR1560180 2 0.4302 0.72022 0.068 0.780 0.000 0.016 0.116 0.020
#> SRR1560181 5 0.2943 0.70623 0.060 0.032 0.000 0.016 0.876 0.016
#> SRR1560182 5 0.2943 0.70623 0.060 0.032 0.000 0.016 0.876 0.016
#> SRR1560183 5 0.2943 0.70623 0.060 0.032 0.000 0.016 0.876 0.016
#> SRR1560184 3 0.0000 0.91421 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 0.91421 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 5 0.4092 0.64420 0.104 0.108 0.000 0.008 0.776 0.004
#> SRR1560187 5 0.3874 0.63751 0.068 0.000 0.000 0.172 0.760 0.000
#> SRR1560188 5 0.2588 0.69326 0.124 0.004 0.000 0.012 0.860 0.000
#> SRR1560189 5 0.2588 0.69326 0.124 0.004 0.000 0.012 0.860 0.000
#> SRR1560190 5 0.1444 0.71898 0.072 0.000 0.000 0.000 0.928 0.000
#> SRR1560191 5 0.1327 0.72002 0.064 0.000 0.000 0.000 0.936 0.000
#> SRR1560192 1 0.2491 0.83499 0.836 0.000 0.000 0.000 0.164 0.000
#> SRR1560193 5 0.1802 0.72268 0.072 0.012 0.000 0.000 0.916 0.000
#> SRR1560194 2 0.5785 0.72719 0.100 0.668 0.016 0.020 0.172 0.024
#> SRR1560195 3 0.0000 0.91421 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.91421 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 2 0.5785 0.72719 0.100 0.668 0.016 0.020 0.172 0.024
#> SRR1560198 5 0.5144 0.41076 0.100 0.000 0.000 0.340 0.560 0.000
#> SRR1560200 2 0.3791 0.64112 0.048 0.812 0.000 0.012 0.112 0.016
#> SRR1560199 2 0.5785 0.72719 0.100 0.668 0.016 0.020 0.172 0.024
#> SRR1560201 5 0.5717 0.28274 0.212 0.000 0.000 0.272 0.516 0.000
#> SRR1560202 5 0.2741 0.71564 0.064 0.028 0.000 0.012 0.884 0.012
#> SRR1560203 4 0.1010 0.79848 0.004 0.000 0.000 0.960 0.036 0.000
#> SRR1560204 5 0.4993 0.40751 0.080 0.000 0.000 0.360 0.560 0.000
#> SRR1560205 3 0.0000 0.91421 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 5 0.2741 0.71564 0.064 0.028 0.000 0.012 0.884 0.012
#> SRR1560207 1 0.2945 0.82535 0.824 0.000 0.000 0.020 0.156 0.000
#> SRR1560208 2 0.0865 0.73404 0.000 0.964 0.036 0.000 0.000 0.000
#> SRR1560209 2 0.0865 0.73404 0.000 0.964 0.036 0.000 0.000 0.000
#> SRR1560210 2 0.0865 0.73404 0.000 0.964 0.036 0.000 0.000 0.000
#> SRR1560211 2 0.0865 0.73404 0.000 0.964 0.036 0.000 0.000 0.000
#> SRR1560212 2 0.0865 0.73404 0.000 0.964 0.036 0.000 0.000 0.000
#> SRR1560213 6 0.3526 0.46346 0.040 0.000 0.000 0.020 0.124 0.816
#> SRR1560214 5 0.2917 0.68985 0.104 0.004 0.000 0.040 0.852 0.000
#> SRR1560215 5 0.2917 0.68985 0.104 0.004 0.000 0.040 0.852 0.000
#> SRR1560216 5 0.4918 0.48002 0.088 0.000 0.000 0.308 0.604 0.000
#> SRR1560217 5 0.4918 0.48002 0.088 0.000 0.000 0.308 0.604 0.000
#> SRR1560218 6 0.0777 0.59580 0.004 0.000 0.000 0.000 0.024 0.972
#> SRR1560219 6 0.0858 0.59699 0.004 0.000 0.000 0.000 0.028 0.968
#> SRR1560220 6 0.7113 0.39674 0.040 0.332 0.188 0.028 0.000 0.412
#> SRR1560221 6 0.7113 0.39674 0.040 0.332 0.188 0.028 0.000 0.412
#> SRR1560222 1 0.5325 0.43414 0.500 0.000 0.000 0.108 0.392 0.000
#> SRR1560223 5 0.5198 -0.00561 0.380 0.000 0.000 0.096 0.524 0.000
#> SRR1560224 5 0.5290 0.05679 0.100 0.000 0.000 0.428 0.472 0.000
#> SRR1560225 4 0.3297 0.83271 0.112 0.000 0.000 0.820 0.068 0.000
#> SRR1560226 4 0.2039 0.83010 0.076 0.000 0.000 0.904 0.020 0.000
#> SRR1560227 4 0.2510 0.84532 0.100 0.000 0.000 0.872 0.028 0.000
#> SRR1560228 1 0.4002 0.73861 0.704 0.000 0.000 0.036 0.260 0.000
#> SRR1560229 5 0.3120 0.71392 0.092 0.024 0.000 0.020 0.856 0.008
#> SRR1560230 5 0.5089 0.49843 0.136 0.000 0.000 0.244 0.620 0.000
#> SRR1560231 2 0.1078 0.70142 0.008 0.964 0.000 0.012 0.000 0.016
#> SRR1560232 2 0.1078 0.70142 0.008 0.964 0.000 0.012 0.000 0.016
#> SRR1560233 2 0.5146 0.70989 0.088 0.676 0.000 0.008 0.208 0.020
#> SRR1560234 2 0.5092 0.71940 0.088 0.684 0.000 0.008 0.200 0.020
#> SRR1560235 5 0.1901 0.72397 0.052 0.008 0.000 0.004 0.924 0.012
#> SRR1560236 5 0.1901 0.72397 0.052 0.008 0.000 0.004 0.924 0.012
#> SRR1560237 2 0.5092 0.71940 0.088 0.684 0.000 0.008 0.200 0.020
#> SRR1560238 5 0.1806 0.71389 0.088 0.004 0.000 0.000 0.908 0.000
#> SRR1560239 2 0.4769 0.74871 0.100 0.740 0.000 0.012 0.124 0.024
#> SRR1560240 5 0.3279 0.69245 0.148 0.028 0.000 0.008 0.816 0.000
#> SRR1560241 5 0.3279 0.69245 0.148 0.028 0.000 0.008 0.816 0.000
#> SRR1560242 5 0.2402 0.69345 0.140 0.000 0.000 0.004 0.856 0.000
#> SRR1560243 5 0.2402 0.69345 0.140 0.000 0.000 0.004 0.856 0.000
#> SRR1560244 5 0.5594 0.33943 0.116 0.292 0.000 0.012 0.576 0.004
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "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 15546 rows and 81 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 0.529 0.702 0.873 0.4543 0.528 0.528
#> 3 3 0.427 0.645 0.797 0.3355 0.612 0.400
#> 4 4 0.458 0.652 0.754 0.1561 0.783 0.510
#> 5 5 0.549 0.581 0.717 0.0876 0.884 0.631
#> 6 6 0.597 0.528 0.699 0.0533 0.925 0.689
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
#> SRR1560164 1 0.0000 0.8143 1.000 0.000
#> SRR1560165 1 0.0000 0.8143 1.000 0.000
#> SRR1560166 1 0.9881 0.3565 0.564 0.436
#> SRR1560167 1 0.0000 0.8143 1.000 0.000
#> SRR1560168 1 0.8713 0.6027 0.708 0.292
#> SRR1560169 1 0.0000 0.8143 1.000 0.000
#> SRR1560170 1 0.9896 0.3457 0.560 0.440
#> SRR1560171 2 0.9933 0.0333 0.452 0.548
#> SRR1560172 2 0.9933 0.0333 0.452 0.548
#> SRR1560173 1 0.0000 0.8143 1.000 0.000
#> SRR1560174 1 0.9896 0.3457 0.560 0.440
#> SRR1560175 2 0.9933 0.0333 0.452 0.548
#> SRR1560176 1 0.0000 0.8143 1.000 0.000
#> SRR1560177 2 0.1843 0.8792 0.028 0.972
#> SRR1560178 2 0.0000 0.8668 0.000 1.000
#> SRR1560179 1 0.9866 0.3665 0.568 0.432
#> SRR1560180 2 0.8499 0.5535 0.276 0.724
#> SRR1560181 1 0.9833 0.3844 0.576 0.424
#> SRR1560182 1 0.9866 0.3665 0.568 0.432
#> SRR1560183 1 0.8909 0.5850 0.692 0.308
#> SRR1560184 2 0.0000 0.8668 0.000 1.000
#> SRR1560185 2 0.0000 0.8668 0.000 1.000
#> SRR1560186 1 0.9983 0.2309 0.524 0.476
#> SRR1560187 1 0.0000 0.8143 1.000 0.000
#> SRR1560188 1 0.4161 0.7707 0.916 0.084
#> SRR1560189 1 0.0000 0.8143 1.000 0.000
#> SRR1560190 1 0.0000 0.8143 1.000 0.000
#> SRR1560191 1 0.9044 0.5697 0.680 0.320
#> SRR1560192 1 0.0000 0.8143 1.000 0.000
#> SRR1560193 1 0.9866 0.3665 0.568 0.432
#> SRR1560194 2 0.1843 0.8792 0.028 0.972
#> SRR1560195 2 0.0000 0.8668 0.000 1.000
#> SRR1560196 2 0.0000 0.8668 0.000 1.000
#> SRR1560197 2 0.1843 0.8792 0.028 0.972
#> SRR1560198 1 0.0000 0.8143 1.000 0.000
#> SRR1560200 1 0.8955 0.5799 0.688 0.312
#> SRR1560199 2 0.1843 0.8792 0.028 0.972
#> SRR1560201 1 0.0000 0.8143 1.000 0.000
#> SRR1560202 1 0.9608 0.4694 0.616 0.384
#> SRR1560203 1 0.0000 0.8143 1.000 0.000
#> SRR1560204 1 0.0000 0.8143 1.000 0.000
#> SRR1560205 2 0.0000 0.8668 0.000 1.000
#> SRR1560206 1 0.9881 0.3565 0.564 0.436
#> SRR1560207 1 0.0000 0.8143 1.000 0.000
#> SRR1560208 2 0.1843 0.8792 0.028 0.972
#> SRR1560209 2 0.9129 0.4443 0.328 0.672
#> SRR1560210 2 0.1633 0.8777 0.024 0.976
#> SRR1560211 2 0.1843 0.8792 0.028 0.972
#> SRR1560212 2 0.1843 0.8792 0.028 0.972
#> SRR1560213 1 0.9909 0.3340 0.556 0.444
#> SRR1560214 1 0.0938 0.8094 0.988 0.012
#> SRR1560215 1 0.1184 0.8076 0.984 0.016
#> SRR1560216 1 0.0000 0.8143 1.000 0.000
#> SRR1560217 1 0.0000 0.8143 1.000 0.000
#> SRR1560218 2 0.1843 0.8792 0.028 0.972
#> SRR1560219 2 0.2043 0.8767 0.032 0.968
#> SRR1560220 2 0.0000 0.8668 0.000 1.000
#> SRR1560221 2 0.0000 0.8668 0.000 1.000
#> SRR1560222 1 0.0000 0.8143 1.000 0.000
#> SRR1560223 1 0.0000 0.8143 1.000 0.000
#> SRR1560224 1 0.0000 0.8143 1.000 0.000
#> SRR1560225 1 0.0000 0.8143 1.000 0.000
#> SRR1560226 1 0.0000 0.8143 1.000 0.000
#> SRR1560227 1 0.0000 0.8143 1.000 0.000
#> SRR1560228 1 0.0000 0.8143 1.000 0.000
#> SRR1560229 1 0.7674 0.6685 0.776 0.224
#> SRR1560230 1 0.0000 0.8143 1.000 0.000
#> SRR1560231 2 0.1843 0.8792 0.028 0.972
#> SRR1560232 2 0.1843 0.8792 0.028 0.972
#> SRR1560233 2 0.2948 0.8609 0.052 0.948
#> SRR1560234 2 0.1843 0.8792 0.028 0.972
#> SRR1560235 1 0.0000 0.8143 1.000 0.000
#> SRR1560236 1 0.0000 0.8143 1.000 0.000
#> SRR1560237 2 0.7219 0.6884 0.200 0.800
#> SRR1560238 1 0.9608 0.4649 0.616 0.384
#> SRR1560239 2 0.1843 0.8792 0.028 0.972
#> SRR1560240 1 0.9000 0.5748 0.684 0.316
#> SRR1560241 1 0.9000 0.5748 0.684 0.316
#> SRR1560242 1 0.0000 0.8143 1.000 0.000
#> SRR1560243 1 0.0000 0.8143 1.000 0.000
#> SRR1560244 2 0.9209 0.4239 0.336 0.664
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.2356 0.8601 0.928 0.072 0.000
#> SRR1560165 1 0.2356 0.8601 0.928 0.072 0.000
#> SRR1560166 2 0.4399 0.7456 0.188 0.812 0.000
#> SRR1560167 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560168 2 0.4399 0.7456 0.188 0.812 0.000
#> SRR1560169 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560170 2 0.4291 0.7476 0.180 0.820 0.000
#> SRR1560171 2 0.3918 0.7469 0.140 0.856 0.004
#> SRR1560172 2 0.3918 0.7469 0.140 0.856 0.004
#> SRR1560173 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560174 2 0.3816 0.7483 0.148 0.852 0.000
#> SRR1560175 2 0.4261 0.7469 0.140 0.848 0.012
#> SRR1560176 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560177 2 0.6111 -0.0442 0.000 0.604 0.396
#> SRR1560178 3 0.0592 0.7363 0.000 0.012 0.988
#> SRR1560179 2 0.3038 0.7453 0.104 0.896 0.000
#> SRR1560180 2 0.3539 0.6538 0.012 0.888 0.100
#> SRR1560181 2 0.3038 0.7453 0.104 0.896 0.000
#> SRR1560182 2 0.3038 0.7453 0.104 0.896 0.000
#> SRR1560183 2 0.3038 0.7453 0.104 0.896 0.000
#> SRR1560184 3 0.0592 0.7363 0.000 0.012 0.988
#> SRR1560185 3 0.0592 0.7363 0.000 0.012 0.988
#> SRR1560186 2 0.1999 0.7280 0.036 0.952 0.012
#> SRR1560187 1 0.5016 0.7744 0.760 0.240 0.000
#> SRR1560188 2 0.4887 0.7197 0.228 0.772 0.000
#> SRR1560189 1 0.6308 -0.0502 0.508 0.492 0.000
#> SRR1560190 1 0.5327 0.6023 0.728 0.272 0.000
#> SRR1560191 2 0.4452 0.7437 0.192 0.808 0.000
#> SRR1560192 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560193 2 0.4399 0.7456 0.188 0.812 0.000
#> SRR1560194 2 0.6126 -0.0547 0.000 0.600 0.400
#> SRR1560195 3 0.0592 0.7363 0.000 0.012 0.988
#> SRR1560196 3 0.0592 0.7363 0.000 0.012 0.988
#> SRR1560197 2 0.6126 -0.0547 0.000 0.600 0.400
#> SRR1560198 1 0.5016 0.7744 0.760 0.240 0.000
#> SRR1560200 2 0.3539 0.7314 0.100 0.888 0.012
#> SRR1560199 2 0.6126 -0.0547 0.000 0.600 0.400
#> SRR1560201 1 0.2165 0.8622 0.936 0.064 0.000
#> SRR1560202 2 0.2096 0.7387 0.052 0.944 0.004
#> SRR1560203 1 0.2796 0.8601 0.908 0.092 0.000
#> SRR1560204 1 0.2796 0.8601 0.908 0.092 0.000
#> SRR1560205 3 0.0592 0.7363 0.000 0.012 0.988
#> SRR1560206 2 0.2261 0.7456 0.068 0.932 0.000
#> SRR1560207 1 0.2448 0.8584 0.924 0.076 0.000
#> SRR1560208 3 0.7262 0.4690 0.028 0.444 0.528
#> SRR1560209 2 0.3377 0.7229 0.092 0.896 0.012
#> SRR1560210 3 0.6867 0.6501 0.028 0.336 0.636
#> SRR1560211 3 0.7262 0.4690 0.028 0.444 0.528
#> SRR1560212 3 0.7067 0.6126 0.028 0.376 0.596
#> SRR1560213 2 0.2165 0.7452 0.064 0.936 0.000
#> SRR1560214 2 0.5502 0.5526 0.248 0.744 0.008
#> SRR1560215 2 0.5202 0.6091 0.220 0.772 0.008
#> SRR1560216 1 0.2796 0.8601 0.908 0.092 0.000
#> SRR1560217 1 0.2796 0.8601 0.908 0.092 0.000
#> SRR1560218 2 0.5254 0.3476 0.000 0.736 0.264
#> SRR1560219 2 0.5216 0.3508 0.000 0.740 0.260
#> SRR1560220 3 0.4235 0.7261 0.000 0.176 0.824
#> SRR1560221 3 0.5497 0.6908 0.000 0.292 0.708
#> SRR1560222 1 0.4842 0.7849 0.776 0.224 0.000
#> SRR1560223 1 0.4931 0.7772 0.768 0.232 0.000
#> SRR1560224 1 0.2448 0.8402 0.924 0.076 0.000
#> SRR1560225 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560226 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560229 2 0.4346 0.7470 0.184 0.816 0.000
#> SRR1560230 1 0.0000 0.8661 1.000 0.000 0.000
#> SRR1560231 3 0.6994 0.6229 0.028 0.360 0.612
#> SRR1560232 3 0.6994 0.6229 0.028 0.360 0.612
#> SRR1560233 2 0.7442 0.0453 0.044 0.588 0.368
#> SRR1560234 2 0.7274 -0.2804 0.028 0.520 0.452
#> SRR1560235 2 0.6154 0.3670 0.408 0.592 0.000
#> SRR1560236 2 0.6154 0.3670 0.408 0.592 0.000
#> SRR1560237 2 0.6283 0.5140 0.064 0.760 0.176
#> SRR1560238 2 0.3879 0.7487 0.152 0.848 0.000
#> SRR1560239 2 0.6079 -0.0168 0.000 0.612 0.388
#> SRR1560240 2 0.3618 0.7393 0.104 0.884 0.012
#> SRR1560241 2 0.2845 0.7437 0.068 0.920 0.012
#> SRR1560242 1 0.5404 0.7598 0.740 0.256 0.004
#> SRR1560243 1 0.6516 0.3062 0.516 0.480 0.004
#> SRR1560244 2 0.0747 0.7071 0.000 0.984 0.016
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.2124 0.788 0.924 0.068 0.008 0.000
#> SRR1560165 1 0.2124 0.788 0.924 0.068 0.008 0.000
#> SRR1560166 2 0.6204 0.698 0.116 0.688 0.008 0.188
#> SRR1560167 1 0.1796 0.789 0.948 0.032 0.016 0.004
#> SRR1560168 2 0.5602 0.717 0.116 0.736 0.004 0.144
#> SRR1560169 1 0.1796 0.789 0.948 0.032 0.016 0.004
#> SRR1560170 2 0.6189 0.697 0.112 0.688 0.008 0.192
#> SRR1560171 2 0.6859 0.371 0.080 0.508 0.008 0.404
#> SRR1560172 2 0.6773 0.333 0.072 0.500 0.008 0.420
#> SRR1560173 1 0.1796 0.789 0.948 0.032 0.016 0.004
#> SRR1560174 2 0.6134 0.669 0.084 0.676 0.008 0.232
#> SRR1560175 2 0.6797 0.257 0.072 0.468 0.008 0.452
#> SRR1560176 1 0.1209 0.792 0.964 0.032 0.004 0.000
#> SRR1560177 4 0.2480 0.767 0.000 0.088 0.008 0.904
#> SRR1560178 3 0.3528 1.000 0.000 0.000 0.808 0.192
#> SRR1560179 2 0.4471 0.710 0.036 0.796 0.004 0.164
#> SRR1560180 4 0.6317 0.619 0.016 0.192 0.104 0.688
#> SRR1560181 2 0.4693 0.713 0.044 0.792 0.008 0.156
#> SRR1560182 2 0.4739 0.712 0.044 0.788 0.008 0.160
#> SRR1560183 2 0.4587 0.711 0.044 0.812 0.016 0.128
#> SRR1560184 3 0.3528 1.000 0.000 0.000 0.808 0.192
#> SRR1560185 3 0.3528 1.000 0.000 0.000 0.808 0.192
#> SRR1560186 2 0.7250 0.220 0.016 0.500 0.096 0.388
#> SRR1560187 1 0.6953 0.412 0.476 0.412 0.112 0.000
#> SRR1560188 2 0.5756 0.703 0.176 0.728 0.012 0.084
#> SRR1560189 2 0.4803 0.595 0.248 0.732 0.012 0.008
#> SRR1560190 2 0.4990 0.433 0.352 0.640 0.008 0.000
#> SRR1560191 2 0.5902 0.717 0.140 0.712 0.004 0.144
#> SRR1560192 1 0.1892 0.786 0.944 0.036 0.016 0.004
#> SRR1560193 2 0.6067 0.713 0.124 0.704 0.008 0.164
#> SRR1560194 4 0.2737 0.766 0.000 0.104 0.008 0.888
#> SRR1560195 3 0.3528 1.000 0.000 0.000 0.808 0.192
#> SRR1560196 3 0.3528 1.000 0.000 0.000 0.808 0.192
#> SRR1560197 4 0.2859 0.764 0.000 0.112 0.008 0.880
#> SRR1560198 1 0.6961 0.462 0.496 0.388 0.116 0.000
#> SRR1560200 4 0.7422 0.121 0.032 0.336 0.092 0.540
#> SRR1560199 4 0.2530 0.767 0.000 0.100 0.004 0.896
#> SRR1560201 1 0.2198 0.797 0.920 0.072 0.008 0.000
#> SRR1560202 2 0.5797 0.646 0.016 0.724 0.072 0.188
#> SRR1560203 1 0.5661 0.720 0.700 0.220 0.080 0.000
#> SRR1560204 1 0.5661 0.720 0.700 0.220 0.080 0.000
#> SRR1560205 3 0.3528 1.000 0.000 0.000 0.808 0.192
#> SRR1560206 2 0.4830 0.702 0.036 0.772 0.008 0.184
#> SRR1560207 1 0.2915 0.779 0.892 0.088 0.016 0.004
#> SRR1560208 4 0.2124 0.744 0.000 0.028 0.040 0.932
#> SRR1560209 4 0.6557 -0.185 0.056 0.440 0.008 0.496
#> SRR1560210 4 0.3324 0.661 0.000 0.012 0.136 0.852
#> SRR1560211 4 0.2021 0.744 0.000 0.024 0.040 0.936
#> SRR1560212 4 0.3219 0.687 0.000 0.020 0.112 0.868
#> SRR1560213 2 0.5153 0.681 0.016 0.768 0.048 0.168
#> SRR1560214 2 0.5697 0.565 0.064 0.764 0.120 0.052
#> SRR1560215 2 0.5643 0.570 0.064 0.768 0.116 0.052
#> SRR1560216 1 0.5750 0.722 0.696 0.216 0.088 0.000
#> SRR1560217 1 0.5783 0.720 0.692 0.220 0.088 0.000
#> SRR1560218 4 0.4990 0.695 0.000 0.184 0.060 0.756
#> SRR1560219 4 0.4820 0.705 0.000 0.168 0.060 0.772
#> SRR1560220 4 0.5325 0.522 0.000 0.068 0.204 0.728
#> SRR1560221 4 0.5077 0.605 0.000 0.080 0.160 0.760
#> SRR1560222 1 0.6698 0.506 0.556 0.340 0.104 0.000
#> SRR1560223 1 0.6932 0.477 0.532 0.360 0.104 0.004
#> SRR1560224 1 0.6203 0.480 0.592 0.340 0.068 0.000
#> SRR1560225 1 0.1635 0.794 0.948 0.044 0.008 0.000
#> SRR1560226 1 0.0804 0.799 0.980 0.012 0.008 0.000
#> SRR1560227 1 0.0927 0.799 0.976 0.016 0.008 0.000
#> SRR1560228 1 0.1356 0.792 0.960 0.032 0.008 0.000
#> SRR1560229 2 0.5649 0.724 0.120 0.740 0.008 0.132
#> SRR1560230 1 0.3312 0.787 0.876 0.072 0.052 0.000
#> SRR1560231 4 0.2760 0.676 0.000 0.000 0.128 0.872
#> SRR1560232 4 0.4000 0.683 0.016 0.012 0.144 0.828
#> SRR1560233 4 0.2311 0.758 0.004 0.076 0.004 0.916
#> SRR1560234 4 0.1970 0.755 0.000 0.060 0.008 0.932
#> SRR1560235 2 0.5064 0.661 0.208 0.748 0.008 0.036
#> SRR1560236 2 0.5064 0.661 0.208 0.748 0.008 0.036
#> SRR1560237 4 0.4475 0.566 0.004 0.240 0.008 0.748
#> SRR1560238 2 0.5751 0.696 0.088 0.712 0.004 0.196
#> SRR1560239 4 0.3377 0.756 0.000 0.140 0.012 0.848
#> SRR1560240 2 0.5898 0.636 0.036 0.748 0.108 0.108
#> SRR1560241 2 0.5951 0.641 0.036 0.744 0.104 0.116
#> SRR1560242 2 0.7539 -0.357 0.416 0.448 0.120 0.016
#> SRR1560243 2 0.6858 0.275 0.240 0.628 0.116 0.016
#> SRR1560244 2 0.5387 0.281 0.000 0.584 0.016 0.400
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.121 0.7905 0.960 0.000 0.000 0.024 0.016
#> SRR1560165 1 0.131 0.7926 0.956 0.000 0.000 0.024 0.020
#> SRR1560166 5 0.367 0.6317 0.068 0.064 0.000 0.024 0.844
#> SRR1560167 1 0.188 0.8092 0.932 0.000 0.008 0.012 0.048
#> SRR1560168 5 0.331 0.6430 0.068 0.020 0.000 0.048 0.864
#> SRR1560169 1 0.160 0.8111 0.940 0.000 0.000 0.012 0.048
#> SRR1560170 5 0.407 0.6077 0.060 0.100 0.000 0.024 0.816
#> SRR1560171 5 0.490 0.3802 0.012 0.300 0.000 0.028 0.660
#> SRR1560172 5 0.492 0.3717 0.012 0.304 0.000 0.028 0.656
#> SRR1560173 1 0.167 0.8105 0.936 0.000 0.000 0.012 0.052
#> SRR1560174 5 0.418 0.5441 0.012 0.192 0.000 0.028 0.768
#> SRR1560175 5 0.531 0.1396 0.012 0.396 0.000 0.032 0.560
#> SRR1560176 1 0.137 0.8156 0.952 0.000 0.004 0.004 0.040
#> SRR1560177 2 0.408 0.7332 0.000 0.812 0.016 0.076 0.096
#> SRR1560178 3 0.170 0.9969 0.000 0.060 0.932 0.008 0.000
#> SRR1560179 5 0.433 0.5320 0.032 0.048 0.000 0.124 0.796
#> SRR1560180 2 0.516 0.6836 0.000 0.672 0.008 0.256 0.064
#> SRR1560181 5 0.463 0.5252 0.044 0.040 0.000 0.144 0.772
#> SRR1560182 5 0.441 0.5360 0.044 0.040 0.000 0.124 0.792
#> SRR1560183 5 0.511 0.4507 0.044 0.040 0.000 0.196 0.720
#> SRR1560184 3 0.141 0.9969 0.000 0.060 0.940 0.000 0.000
#> SRR1560185 3 0.141 0.9969 0.000 0.060 0.940 0.000 0.000
#> SRR1560186 4 0.695 0.0707 0.016 0.292 0.000 0.464 0.228
#> SRR1560187 4 0.692 0.6021 0.256 0.000 0.016 0.480 0.248
#> SRR1560188 5 0.440 0.5829 0.112 0.008 0.000 0.100 0.780
#> SRR1560189 5 0.491 0.4735 0.164 0.000 0.000 0.120 0.716
#> SRR1560190 5 0.448 0.5249 0.160 0.000 0.000 0.088 0.752
#> SRR1560191 5 0.272 0.6452 0.068 0.012 0.000 0.028 0.892
#> SRR1560192 1 0.174 0.8061 0.932 0.000 0.000 0.012 0.056
#> SRR1560193 5 0.181 0.6501 0.060 0.012 0.000 0.000 0.928
#> SRR1560194 2 0.464 0.7255 0.000 0.772 0.020 0.092 0.116
#> SRR1560195 3 0.170 0.9969 0.000 0.060 0.932 0.008 0.000
#> SRR1560196 3 0.170 0.9969 0.000 0.060 0.932 0.008 0.000
#> SRR1560197 2 0.503 0.7198 0.000 0.740 0.020 0.112 0.128
#> SRR1560198 4 0.695 0.5356 0.288 0.000 0.020 0.480 0.212
#> SRR1560200 2 0.615 0.4972 0.004 0.580 0.008 0.288 0.120
#> SRR1560199 2 0.433 0.7314 0.000 0.780 0.004 0.108 0.108
#> SRR1560201 1 0.139 0.8124 0.952 0.000 0.000 0.016 0.032
#> SRR1560202 5 0.590 0.1883 0.012 0.104 0.000 0.280 0.604
#> SRR1560203 1 0.662 -0.1965 0.448 0.000 0.028 0.416 0.108
#> SRR1560204 1 0.662 -0.1965 0.448 0.000 0.028 0.416 0.108
#> SRR1560205 3 0.141 0.9969 0.000 0.060 0.940 0.000 0.000
#> SRR1560206 5 0.492 0.4419 0.020 0.068 0.000 0.176 0.736
#> SRR1560207 1 0.189 0.7773 0.928 0.000 0.000 0.048 0.024
#> SRR1560208 2 0.380 0.6987 0.000 0.836 0.040 0.036 0.088
#> SRR1560209 2 0.518 0.1021 0.000 0.484 0.000 0.040 0.476
#> SRR1560210 2 0.421 0.6923 0.000 0.800 0.048 0.128 0.024
#> SRR1560211 2 0.310 0.7043 0.000 0.880 0.040 0.036 0.044
#> SRR1560212 2 0.325 0.7002 0.000 0.872 0.048 0.036 0.044
#> SRR1560213 5 0.624 0.2940 0.008 0.072 0.024 0.328 0.568
#> SRR1560214 4 0.625 0.4753 0.048 0.016 0.032 0.576 0.328
#> SRR1560215 4 0.625 0.4753 0.048 0.016 0.032 0.576 0.328
#> SRR1560216 1 0.635 -0.0644 0.464 0.000 0.028 0.428 0.080
#> SRR1560217 4 0.662 0.0722 0.428 0.000 0.028 0.436 0.108
#> SRR1560218 2 0.628 0.5961 0.000 0.536 0.024 0.348 0.092
#> SRR1560219 2 0.649 0.6047 0.000 0.524 0.024 0.336 0.116
#> SRR1560220 2 0.587 0.6110 0.000 0.600 0.096 0.292 0.012
#> SRR1560221 2 0.574 0.6234 0.000 0.608 0.084 0.296 0.012
#> SRR1560222 4 0.663 0.4925 0.376 0.000 0.000 0.404 0.220
#> SRR1560223 4 0.671 0.5114 0.348 0.000 0.000 0.404 0.248
#> SRR1560224 5 0.710 -0.1861 0.272 0.000 0.028 0.224 0.476
#> SRR1560225 1 0.205 0.8117 0.928 0.000 0.012 0.020 0.040
#> SRR1560226 1 0.162 0.8122 0.948 0.000 0.012 0.020 0.020
#> SRR1560227 1 0.171 0.8129 0.944 0.000 0.012 0.020 0.024
#> SRR1560228 1 0.120 0.8146 0.956 0.000 0.000 0.004 0.040
#> SRR1560229 5 0.221 0.6439 0.052 0.004 0.000 0.028 0.916
#> SRR1560230 1 0.387 0.7238 0.816 0.000 0.012 0.124 0.048
#> SRR1560231 2 0.356 0.7021 0.000 0.836 0.036 0.116 0.012
#> SRR1560232 2 0.458 0.6865 0.008 0.756 0.036 0.188 0.012
#> SRR1560233 2 0.255 0.7350 0.000 0.892 0.000 0.072 0.036
#> SRR1560234 2 0.261 0.7216 0.000 0.888 0.020 0.004 0.088
#> SRR1560235 5 0.432 0.5642 0.120 0.000 0.000 0.108 0.772
#> SRR1560236 5 0.432 0.5642 0.120 0.000 0.000 0.108 0.772
#> SRR1560237 2 0.346 0.6591 0.000 0.772 0.000 0.004 0.224
#> SRR1560238 5 0.309 0.6440 0.044 0.032 0.000 0.044 0.880
#> SRR1560239 2 0.445 0.7097 0.000 0.764 0.004 0.152 0.080
#> SRR1560240 4 0.611 0.3810 0.024 0.072 0.000 0.528 0.376
#> SRR1560241 4 0.601 0.2983 0.016 0.072 0.000 0.500 0.412
#> SRR1560242 4 0.670 0.5956 0.164 0.032 0.000 0.556 0.248
#> SRR1560243 4 0.655 0.5664 0.124 0.032 0.000 0.556 0.288
#> SRR1560244 2 0.670 0.2698 0.004 0.456 0.000 0.220 0.320
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.1411 0.8462 0.936 0.000 0.000 0.060 0.000 0.004
#> SRR1560165 1 0.1555 0.8494 0.932 0.000 0.000 0.060 0.004 0.004
#> SRR1560166 5 0.2145 0.6726 0.040 0.028 0.004 0.000 0.916 0.012
#> SRR1560167 1 0.2457 0.8798 0.896 0.004 0.012 0.008 0.072 0.008
#> SRR1560168 5 0.2126 0.6847 0.040 0.004 0.004 0.020 0.920 0.012
#> SRR1560169 1 0.2257 0.8822 0.900 0.000 0.012 0.008 0.076 0.004
#> SRR1560170 5 0.2244 0.6637 0.032 0.036 0.004 0.000 0.912 0.016
#> SRR1560171 5 0.5442 0.2776 0.008 0.324 0.004 0.040 0.592 0.032
#> SRR1560172 5 0.5493 0.2422 0.008 0.340 0.004 0.040 0.576 0.032
#> SRR1560173 1 0.2153 0.8808 0.900 0.000 0.004 0.008 0.084 0.004
#> SRR1560174 5 0.4582 0.5056 0.008 0.180 0.004 0.040 0.740 0.028
#> SRR1560175 5 0.6299 -0.1058 0.008 0.416 0.004 0.040 0.444 0.088
#> SRR1560176 1 0.2451 0.8825 0.892 0.004 0.012 0.000 0.076 0.016
#> SRR1560177 2 0.5272 0.4412 0.000 0.632 0.020 0.016 0.052 0.280
#> SRR1560178 3 0.1699 0.9900 0.008 0.040 0.936 0.012 0.000 0.004
#> SRR1560179 5 0.4847 0.5067 0.004 0.008 0.004 0.080 0.692 0.212
#> SRR1560180 6 0.5754 -0.1691 0.008 0.396 0.000 0.072 0.024 0.500
#> SRR1560181 5 0.4968 0.5037 0.004 0.004 0.004 0.100 0.676 0.212
#> SRR1560182 5 0.4835 0.5050 0.004 0.004 0.004 0.088 0.688 0.212
#> SRR1560183 5 0.5314 0.4754 0.004 0.004 0.004 0.136 0.640 0.212
#> SRR1560184 3 0.0937 0.9900 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1560185 3 0.0937 0.9900 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1560186 6 0.6544 0.3213 0.004 0.132 0.000 0.208 0.100 0.556
#> SRR1560187 4 0.6269 0.6127 0.136 0.000 0.000 0.592 0.124 0.148
#> SRR1560188 5 0.4042 0.6271 0.080 0.004 0.004 0.100 0.796 0.016
#> SRR1560189 5 0.4657 0.5679 0.096 0.000 0.008 0.144 0.736 0.016
#> SRR1560190 5 0.3885 0.6173 0.116 0.000 0.004 0.072 0.796 0.012
#> SRR1560191 5 0.1552 0.6850 0.036 0.000 0.000 0.020 0.940 0.004
#> SRR1560192 1 0.2529 0.8746 0.884 0.000 0.012 0.008 0.088 0.008
#> SRR1560193 5 0.1390 0.6811 0.032 0.000 0.004 0.000 0.948 0.016
#> SRR1560194 2 0.5464 0.3771 0.000 0.572 0.020 0.012 0.056 0.340
#> SRR1560195 3 0.1699 0.9900 0.008 0.040 0.936 0.012 0.000 0.004
#> SRR1560196 3 0.1699 0.9900 0.008 0.040 0.936 0.012 0.000 0.004
#> SRR1560197 2 0.5602 0.3270 0.000 0.532 0.020 0.012 0.060 0.376
#> SRR1560198 4 0.4741 0.6683 0.156 0.000 0.000 0.728 0.068 0.048
#> SRR1560200 2 0.6629 0.0305 0.008 0.416 0.000 0.104 0.068 0.404
#> SRR1560199 2 0.5268 0.3629 0.000 0.564 0.012 0.008 0.056 0.360
#> SRR1560201 1 0.1708 0.8783 0.932 0.000 0.000 0.024 0.040 0.004
#> SRR1560202 5 0.6301 0.1712 0.000 0.024 0.004 0.164 0.472 0.336
#> SRR1560203 4 0.3860 0.6376 0.236 0.000 0.000 0.728 0.036 0.000
#> SRR1560204 4 0.3860 0.6376 0.236 0.000 0.000 0.728 0.036 0.000
#> SRR1560205 3 0.0937 0.9900 0.000 0.040 0.960 0.000 0.000 0.000
#> SRR1560206 5 0.5978 0.2807 0.008 0.012 0.004 0.132 0.548 0.296
#> SRR1560207 1 0.2213 0.8138 0.888 0.000 0.004 0.100 0.000 0.008
#> SRR1560208 2 0.2595 0.5686 0.004 0.900 0.028 0.016 0.040 0.012
#> SRR1560209 2 0.4523 0.2987 0.004 0.616 0.004 0.020 0.352 0.004
#> SRR1560210 2 0.4686 0.4747 0.008 0.732 0.016 0.028 0.024 0.192
#> SRR1560211 2 0.2511 0.5729 0.004 0.904 0.028 0.020 0.036 0.008
#> SRR1560212 2 0.2511 0.5729 0.004 0.904 0.028 0.020 0.036 0.008
#> SRR1560213 6 0.5808 0.0097 0.004 0.012 0.004 0.100 0.376 0.504
#> SRR1560214 4 0.5000 0.5006 0.024 0.000 0.000 0.688 0.108 0.180
#> SRR1560215 4 0.5041 0.4965 0.024 0.000 0.000 0.684 0.112 0.180
#> SRR1560216 4 0.3803 0.6065 0.252 0.000 0.000 0.724 0.020 0.004
#> SRR1560217 4 0.3780 0.6127 0.248 0.000 0.000 0.728 0.020 0.004
#> SRR1560218 6 0.5576 0.2261 0.004 0.244 0.004 0.056 0.056 0.636
#> SRR1560219 6 0.5657 0.2119 0.004 0.260 0.004 0.056 0.056 0.620
#> SRR1560220 6 0.5629 0.0275 0.004 0.328 0.048 0.052 0.000 0.568
#> SRR1560221 6 0.5526 0.0346 0.004 0.332 0.040 0.052 0.000 0.572
#> SRR1560222 4 0.7692 0.5486 0.280 0.004 0.012 0.392 0.160 0.152
#> SRR1560223 4 0.7761 0.5344 0.268 0.004 0.012 0.384 0.180 0.152
#> SRR1560224 5 0.6479 0.0903 0.116 0.008 0.012 0.324 0.508 0.032
#> SRR1560225 1 0.4290 0.8435 0.800 0.008 0.016 0.072 0.076 0.028
#> SRR1560226 1 0.4062 0.8308 0.812 0.008 0.016 0.096 0.040 0.028
#> SRR1560227 1 0.4062 0.8308 0.812 0.008 0.016 0.096 0.040 0.028
#> SRR1560228 1 0.1501 0.8848 0.924 0.000 0.000 0.000 0.076 0.000
#> SRR1560229 5 0.1994 0.6838 0.016 0.000 0.004 0.052 0.920 0.008
#> SRR1560230 1 0.5153 0.7200 0.712 0.004 0.008 0.156 0.080 0.040
#> SRR1560231 2 0.4945 0.4376 0.004 0.672 0.012 0.040 0.016 0.256
#> SRR1560232 2 0.5714 0.3279 0.020 0.572 0.012 0.052 0.012 0.332
#> SRR1560233 2 0.4101 0.5367 0.004 0.768 0.000 0.028 0.032 0.168
#> SRR1560234 2 0.3584 0.5703 0.000 0.832 0.020 0.008 0.068 0.072
#> SRR1560235 5 0.3956 0.6357 0.056 0.008 0.004 0.112 0.804 0.016
#> SRR1560236 5 0.3956 0.6357 0.056 0.008 0.004 0.112 0.804 0.016
#> SRR1560237 2 0.4332 0.5150 0.000 0.744 0.004 0.008 0.168 0.076
#> SRR1560238 5 0.1873 0.6820 0.036 0.012 0.004 0.012 0.932 0.004
#> SRR1560239 2 0.6135 0.3038 0.000 0.528 0.008 0.076 0.056 0.332
#> SRR1560240 6 0.6478 -0.1281 0.008 0.016 0.000 0.372 0.200 0.404
#> SRR1560241 6 0.6539 -0.0891 0.008 0.016 0.000 0.352 0.220 0.404
#> SRR1560242 4 0.6940 0.3302 0.060 0.016 0.004 0.460 0.128 0.332
#> SRR1560243 4 0.6935 0.3031 0.052 0.016 0.004 0.452 0.140 0.336
#> SRR1560244 6 0.7425 -0.0102 0.004 0.352 0.004 0.120 0.164 0.356
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.778 0.857 0.940 0.5013 0.494 0.494
#> 3 3 0.704 0.833 0.917 0.3376 0.762 0.553
#> 4 4 0.610 0.570 0.757 0.1068 0.920 0.767
#> 5 5 0.635 0.484 0.734 0.0634 0.909 0.695
#> 6 6 0.643 0.510 0.692 0.0399 0.894 0.578
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
#> SRR1560164 1 0.0000 0.9592 1.000 0.000
#> SRR1560165 1 0.0000 0.9592 1.000 0.000
#> SRR1560166 2 0.9608 0.4599 0.384 0.616
#> SRR1560167 1 0.0000 0.9592 1.000 0.000
#> SRR1560168 1 0.0672 0.9531 0.992 0.008
#> SRR1560169 1 0.0000 0.9592 1.000 0.000
#> SRR1560170 2 0.8763 0.6203 0.296 0.704
#> SRR1560171 2 0.6973 0.7615 0.188 0.812
#> SRR1560172 2 0.5737 0.8127 0.136 0.864
#> SRR1560173 1 0.0000 0.9592 1.000 0.000
#> SRR1560174 2 0.8144 0.6844 0.252 0.748
#> SRR1560175 2 0.5737 0.8127 0.136 0.864
#> SRR1560176 1 0.0000 0.9592 1.000 0.000
#> SRR1560177 2 0.0000 0.9069 0.000 1.000
#> SRR1560178 2 0.0000 0.9069 0.000 1.000
#> SRR1560179 2 0.9922 0.3102 0.448 0.552
#> SRR1560180 2 0.0000 0.9069 0.000 1.000
#> SRR1560181 2 1.0000 0.1466 0.500 0.500
#> SRR1560182 2 0.9954 0.2773 0.460 0.540
#> SRR1560183 1 0.0000 0.9592 1.000 0.000
#> SRR1560184 2 0.0000 0.9069 0.000 1.000
#> SRR1560185 2 0.0000 0.9069 0.000 1.000
#> SRR1560186 2 0.2948 0.8709 0.052 0.948
#> SRR1560187 1 0.0000 0.9592 1.000 0.000
#> SRR1560188 1 0.0000 0.9592 1.000 0.000
#> SRR1560189 1 0.0000 0.9592 1.000 0.000
#> SRR1560190 1 0.0000 0.9592 1.000 0.000
#> SRR1560191 1 0.4431 0.8640 0.908 0.092
#> SRR1560192 1 0.0000 0.9592 1.000 0.000
#> SRR1560193 2 0.9944 0.2888 0.456 0.544
#> SRR1560194 2 0.0000 0.9069 0.000 1.000
#> SRR1560195 2 0.0000 0.9069 0.000 1.000
#> SRR1560196 2 0.0000 0.9069 0.000 1.000
#> SRR1560197 2 0.0000 0.9069 0.000 1.000
#> SRR1560198 1 0.0000 0.9592 1.000 0.000
#> SRR1560200 1 0.8909 0.5333 0.692 0.308
#> SRR1560199 2 0.0000 0.9069 0.000 1.000
#> SRR1560201 1 0.0000 0.9592 1.000 0.000
#> SRR1560202 1 0.9710 0.3213 0.600 0.400
#> SRR1560203 1 0.0000 0.9592 1.000 0.000
#> SRR1560204 1 0.0000 0.9592 1.000 0.000
#> SRR1560205 2 0.0000 0.9069 0.000 1.000
#> SRR1560206 2 0.1633 0.8955 0.024 0.976
#> SRR1560207 1 0.0000 0.9592 1.000 0.000
#> SRR1560208 2 0.0000 0.9069 0.000 1.000
#> SRR1560209 2 0.1843 0.8931 0.028 0.972
#> SRR1560210 2 0.0000 0.9069 0.000 1.000
#> SRR1560211 2 0.0000 0.9069 0.000 1.000
#> SRR1560212 2 0.0000 0.9069 0.000 1.000
#> SRR1560213 2 0.2043 0.8906 0.032 0.968
#> SRR1560214 1 0.3431 0.9011 0.936 0.064
#> SRR1560215 1 0.1184 0.9469 0.984 0.016
#> SRR1560216 1 0.0000 0.9592 1.000 0.000
#> SRR1560217 1 0.0000 0.9592 1.000 0.000
#> SRR1560218 2 0.0000 0.9069 0.000 1.000
#> SRR1560219 2 0.0000 0.9069 0.000 1.000
#> SRR1560220 2 0.0000 0.9069 0.000 1.000
#> SRR1560221 2 0.0000 0.9069 0.000 1.000
#> SRR1560222 1 0.0000 0.9592 1.000 0.000
#> SRR1560223 1 0.0000 0.9592 1.000 0.000
#> SRR1560224 1 0.0000 0.9592 1.000 0.000
#> SRR1560225 1 0.0000 0.9592 1.000 0.000
#> SRR1560226 1 0.0000 0.9592 1.000 0.000
#> SRR1560227 1 0.0000 0.9592 1.000 0.000
#> SRR1560228 1 0.0000 0.9592 1.000 0.000
#> SRR1560229 1 0.0376 0.9563 0.996 0.004
#> SRR1560230 1 0.0000 0.9592 1.000 0.000
#> SRR1560231 2 0.0000 0.9069 0.000 1.000
#> SRR1560232 2 0.0000 0.9069 0.000 1.000
#> SRR1560233 2 0.0000 0.9069 0.000 1.000
#> SRR1560234 2 0.0000 0.9069 0.000 1.000
#> SRR1560235 1 0.0000 0.9592 1.000 0.000
#> SRR1560236 1 0.0000 0.9592 1.000 0.000
#> SRR1560237 2 0.0000 0.9069 0.000 1.000
#> SRR1560238 1 0.9881 0.0708 0.564 0.436
#> SRR1560239 2 0.0000 0.9069 0.000 1.000
#> SRR1560240 1 0.2423 0.9275 0.960 0.040
#> SRR1560241 1 0.3879 0.8932 0.924 0.076
#> SRR1560242 1 0.0000 0.9592 1.000 0.000
#> SRR1560243 1 0.0000 0.9592 1.000 0.000
#> SRR1560244 2 0.0000 0.9069 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560166 2 0.0000 0.8752 0.000 1.000 0.000
#> SRR1560167 1 0.4178 0.8412 0.828 0.172 0.000
#> SRR1560168 2 0.0000 0.8752 0.000 1.000 0.000
#> SRR1560169 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560170 2 0.0000 0.8752 0.000 1.000 0.000
#> SRR1560171 2 0.2711 0.8273 0.000 0.912 0.088
#> SRR1560172 2 0.4346 0.7164 0.000 0.816 0.184
#> SRR1560173 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560174 2 0.0000 0.8752 0.000 1.000 0.000
#> SRR1560175 3 0.6140 0.3461 0.000 0.404 0.596
#> SRR1560176 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560177 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560178 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560179 2 0.4178 0.7976 0.172 0.828 0.000
#> SRR1560180 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560181 2 0.4178 0.7976 0.172 0.828 0.000
#> SRR1560182 2 0.4178 0.7976 0.172 0.828 0.000
#> SRR1560183 2 0.4178 0.7976 0.172 0.828 0.000
#> SRR1560184 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560185 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560186 3 0.3267 0.8263 0.116 0.000 0.884
#> SRR1560187 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560188 2 0.1529 0.8604 0.040 0.960 0.000
#> SRR1560189 2 0.4002 0.7430 0.160 0.840 0.000
#> SRR1560190 2 0.3116 0.8046 0.108 0.892 0.000
#> SRR1560191 2 0.0000 0.8752 0.000 1.000 0.000
#> SRR1560192 1 0.4178 0.8412 0.828 0.172 0.000
#> SRR1560193 2 0.0000 0.8752 0.000 1.000 0.000
#> SRR1560194 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560195 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560196 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560197 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560198 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560200 1 0.7360 0.6718 0.692 0.096 0.212
#> SRR1560199 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560201 1 0.1031 0.8873 0.976 0.024 0.000
#> SRR1560202 2 0.7610 0.2602 0.044 0.536 0.420
#> SRR1560203 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560204 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560205 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560206 2 0.5402 0.7804 0.180 0.792 0.028
#> SRR1560207 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560208 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560209 3 0.6309 0.0727 0.000 0.496 0.504
#> SRR1560210 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560211 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560212 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560213 2 0.7821 0.6755 0.152 0.672 0.176
#> SRR1560214 1 0.0829 0.8828 0.984 0.012 0.004
#> SRR1560215 1 0.1647 0.8685 0.960 0.036 0.004
#> SRR1560216 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560217 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560218 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560219 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560220 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560221 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560222 1 0.0237 0.8899 0.996 0.004 0.000
#> SRR1560223 1 0.0237 0.8899 0.996 0.004 0.000
#> SRR1560224 1 0.4750 0.7980 0.784 0.216 0.000
#> SRR1560225 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560226 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560227 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560228 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560229 2 0.0424 0.8746 0.008 0.992 0.000
#> SRR1560230 1 0.4121 0.8435 0.832 0.168 0.000
#> SRR1560231 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560232 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560233 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560234 3 0.0237 0.9352 0.000 0.004 0.996
#> SRR1560235 2 0.0424 0.8738 0.008 0.992 0.000
#> SRR1560236 2 0.1411 0.8627 0.036 0.964 0.000
#> SRR1560237 3 0.3752 0.7997 0.000 0.144 0.856
#> SRR1560238 2 0.0000 0.8752 0.000 1.000 0.000
#> SRR1560239 3 0.0000 0.9363 0.000 0.000 1.000
#> SRR1560240 1 0.1453 0.8746 0.968 0.024 0.008
#> SRR1560241 1 0.6228 0.2598 0.624 0.372 0.004
#> SRR1560242 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560243 1 0.0000 0.8898 1.000 0.000 0.000
#> SRR1560244 3 0.9183 0.1439 0.168 0.324 0.508
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0592 0.82165 0.984 0.000 0.000 0.016
#> SRR1560165 1 0.0336 0.82332 0.992 0.000 0.000 0.008
#> SRR1560166 2 0.2412 0.59777 0.008 0.908 0.000 0.084
#> SRR1560167 1 0.2334 0.82428 0.908 0.088 0.000 0.004
#> SRR1560168 2 0.2048 0.60482 0.008 0.928 0.000 0.064
#> SRR1560169 1 0.2334 0.82428 0.908 0.088 0.000 0.004
#> SRR1560170 2 0.3942 0.44710 0.000 0.764 0.000 0.236
#> SRR1560171 2 0.5678 0.02373 0.000 0.524 0.024 0.452
#> SRR1560172 2 0.5696 -0.05328 0.000 0.492 0.024 0.484
#> SRR1560173 1 0.2334 0.82428 0.908 0.088 0.000 0.004
#> SRR1560174 2 0.4679 0.28566 0.000 0.648 0.000 0.352
#> SRR1560175 4 0.7473 0.17249 0.012 0.360 0.132 0.496
#> SRR1560176 1 0.2334 0.82428 0.908 0.088 0.000 0.004
#> SRR1560177 3 0.4679 0.57849 0.000 0.000 0.648 0.352
#> SRR1560178 3 0.0336 0.75223 0.000 0.000 0.992 0.008
#> SRR1560179 2 0.6407 0.30439 0.084 0.584 0.000 0.332
#> SRR1560180 3 0.4610 0.66430 0.020 0.000 0.744 0.236
#> SRR1560181 2 0.6454 0.28968 0.084 0.572 0.000 0.344
#> SRR1560182 2 0.6468 0.28695 0.084 0.568 0.000 0.348
#> SRR1560183 2 0.6495 0.27479 0.084 0.560 0.000 0.356
#> SRR1560184 3 0.0000 0.75189 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.75189 0.000 0.000 1.000 0.000
#> SRR1560186 3 0.5466 0.41868 0.040 0.000 0.668 0.292
#> SRR1560187 1 0.3610 0.73495 0.800 0.000 0.000 0.200
#> SRR1560188 2 0.3862 0.58358 0.152 0.824 0.000 0.024
#> SRR1560189 2 0.5036 0.45652 0.280 0.696 0.000 0.024
#> SRR1560190 2 0.3873 0.52575 0.228 0.772 0.000 0.000
#> SRR1560191 2 0.0524 0.61516 0.008 0.988 0.000 0.004
#> SRR1560192 1 0.2520 0.82274 0.904 0.088 0.004 0.004
#> SRR1560193 2 0.1042 0.61573 0.008 0.972 0.000 0.020
#> SRR1560194 3 0.2868 0.71132 0.000 0.000 0.864 0.136
#> SRR1560195 3 0.0000 0.75189 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.75189 0.000 0.000 1.000 0.000
#> SRR1560197 3 0.0817 0.75074 0.000 0.000 0.976 0.024
#> SRR1560198 1 0.2469 0.79275 0.892 0.000 0.000 0.108
#> SRR1560200 1 0.8660 0.02651 0.456 0.052 0.228 0.264
#> SRR1560199 3 0.1389 0.74910 0.000 0.000 0.952 0.048
#> SRR1560201 1 0.1978 0.82728 0.928 0.068 0.000 0.004
#> SRR1560202 4 0.8180 -0.00378 0.012 0.340 0.252 0.396
#> SRR1560203 1 0.3157 0.77385 0.852 0.004 0.000 0.144
#> SRR1560204 1 0.3208 0.77177 0.848 0.004 0.000 0.148
#> SRR1560205 3 0.0000 0.75189 0.000 0.000 1.000 0.000
#> SRR1560206 4 0.5756 0.30632 0.084 0.176 0.012 0.728
#> SRR1560207 1 0.1211 0.81786 0.960 0.000 0.000 0.040
#> SRR1560208 3 0.6775 0.32765 0.000 0.096 0.492 0.412
#> SRR1560209 4 0.6926 0.14004 0.000 0.392 0.112 0.496
#> SRR1560210 3 0.3718 0.70354 0.000 0.012 0.820 0.168
#> SRR1560211 3 0.5984 0.49405 0.000 0.048 0.580 0.372
#> SRR1560212 3 0.5984 0.49405 0.000 0.048 0.580 0.372
#> SRR1560213 3 0.8074 -0.29101 0.004 0.316 0.352 0.328
#> SRR1560214 1 0.5786 0.54153 0.648 0.008 0.036 0.308
#> SRR1560215 1 0.7231 0.33711 0.540 0.080 0.028 0.352
#> SRR1560216 1 0.3257 0.76987 0.844 0.004 0.000 0.152
#> SRR1560217 1 0.3257 0.76987 0.844 0.004 0.000 0.152
#> SRR1560218 3 0.2216 0.70374 0.000 0.000 0.908 0.092
#> SRR1560219 3 0.3052 0.68270 0.000 0.004 0.860 0.136
#> SRR1560220 3 0.0188 0.75086 0.000 0.000 0.996 0.004
#> SRR1560221 3 0.0188 0.75086 0.000 0.000 0.996 0.004
#> SRR1560222 1 0.1624 0.82794 0.952 0.028 0.000 0.020
#> SRR1560223 1 0.1624 0.82799 0.952 0.028 0.000 0.020
#> SRR1560224 1 0.4420 0.68141 0.748 0.240 0.000 0.012
#> SRR1560225 1 0.2149 0.82488 0.912 0.088 0.000 0.000
#> SRR1560226 1 0.2081 0.82556 0.916 0.084 0.000 0.000
#> SRR1560227 1 0.2149 0.82488 0.912 0.088 0.000 0.000
#> SRR1560228 1 0.2334 0.82428 0.908 0.088 0.000 0.004
#> SRR1560229 2 0.3399 0.58992 0.040 0.868 0.000 0.092
#> SRR1560230 1 0.2401 0.82293 0.904 0.092 0.000 0.004
#> SRR1560231 3 0.3718 0.70426 0.000 0.012 0.820 0.168
#> SRR1560232 3 0.5282 0.65054 0.028 0.012 0.720 0.240
#> SRR1560233 3 0.5050 0.63008 0.000 0.028 0.704 0.268
#> SRR1560234 3 0.5837 0.46867 0.000 0.036 0.564 0.400
#> SRR1560235 2 0.3205 0.60214 0.104 0.872 0.000 0.024
#> SRR1560236 2 0.3529 0.57973 0.152 0.836 0.000 0.012
#> SRR1560237 4 0.7492 -0.17763 0.000 0.180 0.388 0.432
#> SRR1560238 2 0.2760 0.56366 0.000 0.872 0.000 0.128
#> SRR1560239 3 0.4961 0.46307 0.000 0.000 0.552 0.448
#> SRR1560240 4 0.5594 0.10477 0.352 0.024 0.004 0.620
#> SRR1560241 4 0.4220 0.39097 0.112 0.056 0.004 0.828
#> SRR1560242 1 0.4103 0.66588 0.744 0.000 0.000 0.256
#> SRR1560243 1 0.4428 0.63101 0.720 0.004 0.000 0.276
#> SRR1560244 4 0.5525 0.42206 0.072 0.060 0.088 0.780
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.1670 0.6928 0.936 0.000 0.000 0.052 0.012
#> SRR1560165 1 0.1522 0.6980 0.944 0.000 0.000 0.044 0.012
#> SRR1560166 5 0.5036 0.5910 0.040 0.304 0.000 0.008 0.648
#> SRR1560167 1 0.1549 0.7102 0.944 0.000 0.000 0.016 0.040
#> SRR1560168 5 0.4905 0.6288 0.040 0.260 0.000 0.012 0.688
#> SRR1560169 1 0.1282 0.7121 0.952 0.000 0.000 0.004 0.044
#> SRR1560170 5 0.5295 0.3507 0.032 0.456 0.000 0.008 0.504
#> SRR1560171 2 0.3461 0.4715 0.004 0.812 0.000 0.016 0.168
#> SRR1560172 2 0.3142 0.5201 0.004 0.852 0.004 0.016 0.124
#> SRR1560173 1 0.1739 0.7115 0.940 0.024 0.000 0.004 0.032
#> SRR1560174 2 0.3883 0.3883 0.004 0.764 0.000 0.016 0.216
#> SRR1560175 2 0.3253 0.5550 0.004 0.864 0.024 0.016 0.092
#> SRR1560176 1 0.1121 0.7140 0.956 0.000 0.000 0.000 0.044
#> SRR1560177 3 0.6460 0.1655 0.000 0.352 0.524 0.088 0.036
#> SRR1560178 3 0.0290 0.7108 0.000 0.008 0.992 0.000 0.000
#> SRR1560179 5 0.3767 0.5604 0.008 0.024 0.000 0.168 0.800
#> SRR1560180 3 0.8170 0.2671 0.112 0.188 0.464 0.220 0.016
#> SRR1560181 5 0.3982 0.5334 0.012 0.016 0.000 0.200 0.772
#> SRR1560182 5 0.3899 0.5414 0.008 0.020 0.000 0.192 0.780
#> SRR1560183 5 0.3916 0.5276 0.012 0.012 0.000 0.204 0.772
#> SRR1560184 3 0.0000 0.7118 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 0.7118 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 3 0.7504 0.2502 0.008 0.072 0.456 0.344 0.120
#> SRR1560187 1 0.5119 0.1414 0.504 0.004 0.000 0.464 0.028
#> SRR1560188 5 0.5388 0.6497 0.156 0.104 0.000 0.028 0.712
#> SRR1560189 5 0.5125 0.5759 0.212 0.016 0.000 0.068 0.704
#> SRR1560190 5 0.4658 0.6117 0.228 0.044 0.000 0.008 0.720
#> SRR1560191 5 0.3366 0.6896 0.032 0.140 0.000 0.000 0.828
#> SRR1560192 1 0.1591 0.7100 0.940 0.000 0.004 0.004 0.052
#> SRR1560193 5 0.4110 0.6794 0.028 0.184 0.000 0.012 0.776
#> SRR1560194 3 0.3111 0.6200 0.000 0.144 0.840 0.012 0.004
#> SRR1560195 3 0.0000 0.7118 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.7118 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 3 0.0854 0.7086 0.000 0.008 0.976 0.012 0.004
#> SRR1560198 1 0.4517 0.3347 0.600 0.000 0.000 0.388 0.012
#> SRR1560200 1 0.8384 -0.0665 0.412 0.288 0.088 0.184 0.028
#> SRR1560199 3 0.2395 0.6846 0.000 0.072 0.904 0.016 0.008
#> SRR1560201 1 0.1018 0.7128 0.968 0.000 0.000 0.016 0.016
#> SRR1560202 5 0.7256 -0.0641 0.004 0.016 0.244 0.356 0.380
#> SRR1560203 1 0.4961 0.1950 0.524 0.000 0.000 0.448 0.028
#> SRR1560204 1 0.4961 0.1950 0.524 0.000 0.000 0.448 0.028
#> SRR1560205 3 0.0000 0.7118 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 4 0.7077 0.2493 0.004 0.284 0.020 0.480 0.212
#> SRR1560207 1 0.2681 0.6607 0.876 0.004 0.000 0.108 0.012
#> SRR1560208 2 0.4869 0.4525 0.000 0.656 0.308 0.020 0.016
#> SRR1560209 2 0.3372 0.5800 0.000 0.852 0.052 0.008 0.088
#> SRR1560210 3 0.4506 0.4934 0.000 0.244 0.716 0.036 0.004
#> SRR1560211 2 0.4736 0.2699 0.000 0.576 0.404 0.020 0.000
#> SRR1560212 2 0.4726 0.2805 0.000 0.580 0.400 0.020 0.000
#> SRR1560213 3 0.7787 0.0919 0.012 0.044 0.424 0.240 0.280
#> SRR1560214 4 0.5968 0.2628 0.324 0.020 0.012 0.592 0.052
#> SRR1560215 4 0.5891 0.4252 0.232 0.028 0.004 0.652 0.084
#> SRR1560216 1 0.5042 0.1682 0.512 0.004 0.000 0.460 0.024
#> SRR1560217 1 0.5042 0.1682 0.512 0.004 0.000 0.460 0.024
#> SRR1560218 3 0.3836 0.6433 0.000 0.036 0.832 0.096 0.036
#> SRR1560219 3 0.4619 0.6136 0.000 0.052 0.784 0.112 0.052
#> SRR1560220 3 0.1106 0.7047 0.000 0.012 0.964 0.024 0.000
#> SRR1560221 3 0.1211 0.7047 0.000 0.016 0.960 0.024 0.000
#> SRR1560222 1 0.2248 0.6861 0.900 0.000 0.000 0.088 0.012
#> SRR1560223 1 0.2573 0.6747 0.880 0.000 0.000 0.104 0.016
#> SRR1560224 1 0.5597 0.3988 0.640 0.020 0.000 0.068 0.272
#> SRR1560225 1 0.1357 0.7134 0.948 0.000 0.000 0.004 0.048
#> SRR1560226 1 0.1469 0.7163 0.948 0.000 0.000 0.016 0.036
#> SRR1560227 1 0.1444 0.7156 0.948 0.000 0.000 0.012 0.040
#> SRR1560228 1 0.1197 0.7131 0.952 0.000 0.000 0.000 0.048
#> SRR1560229 5 0.4733 0.6749 0.020 0.144 0.000 0.076 0.760
#> SRR1560230 1 0.1646 0.7095 0.944 0.032 0.000 0.004 0.020
#> SRR1560231 3 0.4832 0.5051 0.000 0.224 0.708 0.064 0.004
#> SRR1560232 3 0.7795 0.2443 0.116 0.260 0.476 0.144 0.004
#> SRR1560233 3 0.5726 0.0556 0.000 0.420 0.512 0.056 0.012
#> SRR1560234 2 0.5186 0.2527 0.000 0.556 0.408 0.024 0.012
#> SRR1560235 5 0.4207 0.6836 0.092 0.060 0.000 0.036 0.812
#> SRR1560236 5 0.4572 0.6575 0.156 0.052 0.000 0.024 0.768
#> SRR1560237 2 0.5287 0.4918 0.000 0.668 0.264 0.032 0.036
#> SRR1560238 5 0.5194 0.4351 0.024 0.412 0.000 0.012 0.552
#> SRR1560239 3 0.7421 -0.0445 0.000 0.384 0.388 0.176 0.052
#> SRR1560240 4 0.4900 0.5572 0.060 0.064 0.004 0.776 0.096
#> SRR1560241 4 0.5343 0.5109 0.024 0.144 0.004 0.724 0.104
#> SRR1560242 1 0.6014 -0.1329 0.472 0.028 0.000 0.448 0.052
#> SRR1560243 4 0.6168 0.0542 0.440 0.028 0.000 0.468 0.064
#> SRR1560244 2 0.7137 -0.0874 0.000 0.428 0.060 0.396 0.116
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.2118 0.7848 0.888 0.000 0.000 0.104 0.008 0.000
#> SRR1560165 1 0.1918 0.7985 0.904 0.000 0.000 0.088 0.008 0.000
#> SRR1560166 5 0.5614 0.3344 0.064 0.412 0.000 0.020 0.496 0.008
#> SRR1560167 1 0.1464 0.8291 0.944 0.000 0.000 0.004 0.016 0.036
#> SRR1560168 5 0.5794 0.3785 0.064 0.372 0.000 0.024 0.524 0.016
#> SRR1560169 1 0.1036 0.8370 0.964 0.000 0.000 0.004 0.024 0.008
#> SRR1560170 2 0.5505 -0.1467 0.044 0.560 0.000 0.020 0.356 0.020
#> SRR1560171 2 0.1625 0.4683 0.012 0.928 0.000 0.000 0.060 0.000
#> SRR1560172 2 0.1296 0.4886 0.012 0.952 0.000 0.000 0.032 0.004
#> SRR1560173 1 0.1812 0.8223 0.924 0.060 0.000 0.004 0.008 0.004
#> SRR1560174 2 0.2856 0.3699 0.012 0.844 0.000 0.004 0.136 0.004
#> SRR1560175 2 0.2323 0.4970 0.012 0.912 0.024 0.000 0.024 0.028
#> SRR1560176 1 0.0862 0.8438 0.972 0.000 0.000 0.008 0.016 0.004
#> SRR1560177 3 0.7252 0.2004 0.000 0.192 0.464 0.032 0.060 0.252
#> SRR1560178 3 0.0436 0.7524 0.000 0.004 0.988 0.004 0.000 0.004
#> SRR1560179 5 0.5087 0.4587 0.000 0.032 0.000 0.140 0.692 0.136
#> SRR1560180 6 0.6994 0.1989 0.076 0.068 0.284 0.020 0.028 0.524
#> SRR1560181 5 0.4638 0.4516 0.000 0.000 0.000 0.152 0.692 0.156
#> SRR1560182 5 0.4774 0.4530 0.000 0.004 0.000 0.160 0.688 0.148
#> SRR1560183 5 0.4734 0.4401 0.000 0.000 0.000 0.168 0.680 0.152
#> SRR1560184 3 0.0000 0.7541 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 0.7541 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 6 0.7701 0.1694 0.000 0.012 0.324 0.176 0.156 0.332
#> SRR1560187 4 0.6036 0.6541 0.332 0.000 0.000 0.524 0.060 0.084
#> SRR1560188 5 0.7017 0.5010 0.176 0.148 0.000 0.092 0.548 0.036
#> SRR1560189 5 0.6028 0.5385 0.196 0.040 0.000 0.132 0.616 0.016
#> SRR1560190 5 0.5434 0.4742 0.328 0.056 0.000 0.040 0.576 0.000
#> SRR1560191 5 0.4577 0.5408 0.068 0.208 0.000 0.016 0.708 0.000
#> SRR1560192 1 0.1282 0.8336 0.956 0.004 0.000 0.004 0.024 0.012
#> SRR1560193 5 0.5281 0.5243 0.052 0.252 0.000 0.028 0.652 0.016
#> SRR1560194 3 0.4195 0.6674 0.000 0.096 0.796 0.016 0.032 0.060
#> SRR1560195 3 0.0000 0.7541 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.7541 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 3 0.1946 0.7414 0.000 0.004 0.928 0.024 0.024 0.020
#> SRR1560198 4 0.4510 0.6869 0.408 0.000 0.000 0.564 0.012 0.016
#> SRR1560200 6 0.7304 0.2634 0.288 0.112 0.048 0.032 0.028 0.492
#> SRR1560199 3 0.3593 0.7035 0.000 0.036 0.836 0.016 0.028 0.084
#> SRR1560201 1 0.0865 0.8376 0.964 0.000 0.000 0.036 0.000 0.000
#> SRR1560202 5 0.7931 -0.1769 0.012 0.000 0.188 0.232 0.292 0.276
#> SRR1560203 4 0.4246 0.7933 0.340 0.000 0.000 0.636 0.012 0.012
#> SRR1560204 4 0.4304 0.7949 0.336 0.000 0.000 0.636 0.020 0.008
#> SRR1560205 3 0.0000 0.7541 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 6 0.7878 0.2117 0.000 0.180 0.012 0.272 0.216 0.320
#> SRR1560207 1 0.3295 0.6472 0.800 0.000 0.000 0.176 0.012 0.012
#> SRR1560208 2 0.6000 0.3584 0.000 0.524 0.292 0.008 0.008 0.168
#> SRR1560209 2 0.3726 0.4949 0.000 0.812 0.072 0.000 0.024 0.092
#> SRR1560210 3 0.5434 0.4049 0.000 0.128 0.608 0.004 0.008 0.252
#> SRR1560211 2 0.6358 0.1851 0.000 0.412 0.360 0.008 0.008 0.212
#> SRR1560212 2 0.6361 0.1732 0.000 0.408 0.364 0.008 0.008 0.212
#> SRR1560213 3 0.7571 0.1487 0.000 0.044 0.432 0.260 0.192 0.072
#> SRR1560214 4 0.3670 0.6140 0.128 0.004 0.024 0.816 0.008 0.020
#> SRR1560215 4 0.3921 0.5024 0.068 0.020 0.028 0.832 0.020 0.032
#> SRR1560216 4 0.3883 0.7987 0.332 0.000 0.000 0.656 0.012 0.000
#> SRR1560217 4 0.3867 0.7985 0.328 0.000 0.000 0.660 0.012 0.000
#> SRR1560218 3 0.4815 0.6204 0.000 0.000 0.728 0.124 0.044 0.104
#> SRR1560219 3 0.5282 0.5963 0.000 0.012 0.704 0.148 0.056 0.080
#> SRR1560220 3 0.1700 0.7315 0.000 0.000 0.928 0.048 0.000 0.024
#> SRR1560221 3 0.1890 0.7291 0.000 0.000 0.916 0.060 0.000 0.024
#> SRR1560222 1 0.3969 0.6827 0.780 0.000 0.000 0.140 0.016 0.064
#> SRR1560223 1 0.4502 0.6505 0.748 0.000 0.000 0.136 0.032 0.084
#> SRR1560224 1 0.6116 0.2286 0.552 0.032 0.000 0.112 0.292 0.012
#> SRR1560225 1 0.1204 0.8416 0.960 0.004 0.000 0.016 0.016 0.004
#> SRR1560226 1 0.1606 0.8259 0.932 0.000 0.000 0.056 0.008 0.004
#> SRR1560227 1 0.1536 0.8362 0.940 0.000 0.000 0.040 0.016 0.004
#> SRR1560228 1 0.0551 0.8445 0.984 0.004 0.000 0.004 0.008 0.000
#> SRR1560229 5 0.6052 0.5450 0.020 0.216 0.000 0.068 0.620 0.076
#> SRR1560230 1 0.1699 0.8313 0.936 0.040 0.000 0.008 0.004 0.012
#> SRR1560231 3 0.5645 0.3468 0.000 0.120 0.544 0.004 0.008 0.324
#> SRR1560232 6 0.7251 0.0831 0.092 0.136 0.300 0.004 0.016 0.452
#> SRR1560233 3 0.6668 0.0504 0.000 0.260 0.416 0.012 0.016 0.296
#> SRR1560234 2 0.6212 0.2273 0.000 0.472 0.352 0.016 0.008 0.152
#> SRR1560235 5 0.5482 0.5867 0.132 0.084 0.000 0.096 0.684 0.004
#> SRR1560236 5 0.5885 0.5727 0.180 0.092 0.000 0.080 0.640 0.008
#> SRR1560237 2 0.6056 0.4251 0.000 0.600 0.216 0.016 0.032 0.136
#> SRR1560238 2 0.6213 -0.2383 0.068 0.476 0.000 0.032 0.396 0.028
#> SRR1560239 6 0.7604 0.0934 0.000 0.180 0.260 0.048 0.076 0.436
#> SRR1560240 6 0.5900 0.3555 0.028 0.008 0.000 0.332 0.092 0.540
#> SRR1560241 6 0.6124 0.4047 0.004 0.052 0.000 0.260 0.116 0.568
#> SRR1560242 6 0.7037 0.0229 0.340 0.000 0.000 0.204 0.080 0.376
#> SRR1560243 6 0.7290 0.1615 0.272 0.004 0.000 0.204 0.108 0.412
#> SRR1560244 6 0.7506 0.3374 0.000 0.192 0.036 0.132 0.156 0.484
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 15546 rows and 81 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 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.510 0.863 0.916 0.4074 0.599 0.599
#> 3 3 0.490 0.741 0.866 0.4170 0.806 0.676
#> 4 4 0.650 0.807 0.904 0.1432 0.831 0.628
#> 5 5 0.636 0.690 0.845 0.0891 0.947 0.843
#> 6 6 0.695 0.733 0.867 0.0527 0.919 0.734
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1560164 1 0.0000 0.931 1.000 0.000
#> SRR1560165 1 0.0000 0.931 1.000 0.000
#> SRR1560166 2 0.6801 0.864 0.180 0.820
#> SRR1560167 1 0.0000 0.931 1.000 0.000
#> SRR1560168 2 0.5294 0.898 0.120 0.880
#> SRR1560169 1 0.0000 0.931 1.000 0.000
#> SRR1560170 2 0.5842 0.889 0.140 0.860
#> SRR1560171 2 0.7219 0.846 0.200 0.800
#> SRR1560172 2 0.7219 0.846 0.200 0.800
#> SRR1560173 1 0.0000 0.931 1.000 0.000
#> SRR1560174 2 0.7219 0.846 0.200 0.800
#> SRR1560175 2 0.9522 0.565 0.372 0.628
#> SRR1560176 1 0.0000 0.931 1.000 0.000
#> SRR1560177 2 0.0000 0.897 0.000 1.000
#> SRR1560178 2 0.0000 0.897 0.000 1.000
#> SRR1560179 2 0.4298 0.903 0.088 0.912
#> SRR1560180 2 0.1414 0.902 0.020 0.980
#> SRR1560181 2 0.5059 0.900 0.112 0.888
#> SRR1560182 2 0.5059 0.900 0.112 0.888
#> SRR1560183 2 0.5059 0.900 0.112 0.888
#> SRR1560184 2 0.0000 0.897 0.000 1.000
#> SRR1560185 2 0.0000 0.897 0.000 1.000
#> SRR1560186 2 0.1414 0.902 0.020 0.980
#> SRR1560187 2 0.5059 0.900 0.112 0.888
#> SRR1560188 2 0.5059 0.900 0.112 0.888
#> SRR1560189 2 0.7219 0.846 0.200 0.800
#> SRR1560190 1 0.0000 0.931 1.000 0.000
#> SRR1560191 2 0.5178 0.899 0.116 0.884
#> SRR1560192 1 0.0000 0.931 1.000 0.000
#> SRR1560193 2 0.5059 0.900 0.112 0.888
#> SRR1560194 2 0.0000 0.897 0.000 1.000
#> SRR1560195 2 0.0000 0.897 0.000 1.000
#> SRR1560196 2 0.0000 0.897 0.000 1.000
#> SRR1560197 2 0.0000 0.897 0.000 1.000
#> SRR1560198 2 0.8386 0.753 0.268 0.732
#> SRR1560200 2 0.6531 0.872 0.168 0.832
#> SRR1560199 2 0.0000 0.897 0.000 1.000
#> SRR1560201 1 0.0000 0.931 1.000 0.000
#> SRR1560202 2 0.2043 0.903 0.032 0.968
#> SRR1560203 2 0.9996 0.176 0.488 0.512
#> SRR1560204 1 0.8499 0.579 0.724 0.276
#> SRR1560205 2 0.0000 0.897 0.000 1.000
#> SRR1560206 2 0.5059 0.900 0.112 0.888
#> SRR1560207 1 0.0000 0.931 1.000 0.000
#> SRR1560208 2 0.0672 0.900 0.008 0.992
#> SRR1560209 2 0.5519 0.895 0.128 0.872
#> SRR1560210 2 0.0000 0.897 0.000 1.000
#> SRR1560211 2 0.0672 0.900 0.008 0.992
#> SRR1560212 2 0.0000 0.897 0.000 1.000
#> SRR1560213 2 0.4022 0.904 0.080 0.920
#> SRR1560214 2 0.6048 0.884 0.148 0.852
#> SRR1560215 2 0.6801 0.863 0.180 0.820
#> SRR1560216 1 0.0000 0.931 1.000 0.000
#> SRR1560217 1 0.0000 0.931 1.000 0.000
#> SRR1560218 2 0.0000 0.897 0.000 1.000
#> SRR1560219 2 0.0000 0.897 0.000 1.000
#> SRR1560220 2 0.0000 0.897 0.000 1.000
#> SRR1560221 2 0.0000 0.897 0.000 1.000
#> SRR1560222 1 0.9358 0.359 0.648 0.352
#> SRR1560223 2 0.6343 0.878 0.160 0.840
#> SRR1560224 1 0.7453 0.681 0.788 0.212
#> SRR1560225 1 0.0000 0.931 1.000 0.000
#> SRR1560226 1 0.0000 0.931 1.000 0.000
#> SRR1560227 1 0.0000 0.931 1.000 0.000
#> SRR1560228 1 0.0000 0.931 1.000 0.000
#> SRR1560229 1 0.9635 0.239 0.612 0.388
#> SRR1560230 1 0.0000 0.931 1.000 0.000
#> SRR1560231 2 0.3431 0.895 0.064 0.936
#> SRR1560232 1 0.0000 0.931 1.000 0.000
#> SRR1560233 2 0.0938 0.900 0.012 0.988
#> SRR1560234 2 0.0000 0.897 0.000 1.000
#> SRR1560235 2 0.7528 0.829 0.216 0.784
#> SRR1560236 2 0.7299 0.843 0.204 0.796
#> SRR1560237 2 0.1633 0.902 0.024 0.976
#> SRR1560238 2 0.6712 0.867 0.176 0.824
#> SRR1560239 2 0.0000 0.897 0.000 1.000
#> SRR1560240 2 0.5294 0.897 0.120 0.880
#> SRR1560241 2 0.4690 0.902 0.100 0.900
#> SRR1560242 2 0.5059 0.900 0.112 0.888
#> SRR1560243 2 0.7056 0.853 0.192 0.808
#> SRR1560244 2 0.0672 0.900 0.008 0.992
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560166 2 0.5791 0.749 0.168 0.784 0.048
#> SRR1560167 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560168 2 0.1860 0.813 0.052 0.948 0.000
#> SRR1560169 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560170 2 0.4665 0.785 0.100 0.852 0.048
#> SRR1560171 2 0.7001 0.702 0.200 0.716 0.084
#> SRR1560172 2 0.6208 0.722 0.200 0.752 0.048
#> SRR1560173 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560174 2 0.6208 0.722 0.200 0.752 0.048
#> SRR1560175 2 0.8043 0.427 0.372 0.556 0.072
#> SRR1560176 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560177 3 0.6140 0.706 0.000 0.404 0.596
#> SRR1560178 3 0.0000 0.637 0.000 0.000 1.000
#> SRR1560179 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560180 2 0.1860 0.781 0.000 0.948 0.052
#> SRR1560181 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560182 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560183 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560184 3 0.2356 0.640 0.000 0.072 0.928
#> SRR1560185 2 0.5497 0.550 0.000 0.708 0.292
#> SRR1560186 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560187 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560188 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560189 2 0.4555 0.744 0.200 0.800 0.000
#> SRR1560190 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560191 2 0.0892 0.816 0.020 0.980 0.000
#> SRR1560192 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560193 2 0.1031 0.817 0.024 0.976 0.000
#> SRR1560194 2 0.2959 0.747 0.000 0.900 0.100
#> SRR1560195 3 0.0000 0.637 0.000 0.000 1.000
#> SRR1560196 3 0.0000 0.637 0.000 0.000 1.000
#> SRR1560197 2 0.1860 0.781 0.000 0.948 0.052
#> SRR1560198 2 0.5363 0.654 0.276 0.724 0.000
#> SRR1560200 2 0.4062 0.772 0.164 0.836 0.000
#> SRR1560199 2 0.2165 0.775 0.000 0.936 0.064
#> SRR1560201 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560202 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560203 2 0.6274 0.249 0.456 0.544 0.000
#> SRR1560204 1 0.5497 0.502 0.708 0.292 0.000
#> SRR1560205 3 0.1753 0.641 0.000 0.048 0.952
#> SRR1560206 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560207 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560208 3 0.6140 0.706 0.000 0.404 0.596
#> SRR1560209 3 0.8071 0.630 0.072 0.380 0.548
#> SRR1560210 3 0.6291 0.631 0.000 0.468 0.532
#> SRR1560211 3 0.6260 0.656 0.000 0.448 0.552
#> SRR1560212 3 0.6126 0.708 0.000 0.400 0.600
#> SRR1560213 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560214 2 0.3551 0.788 0.132 0.868 0.000
#> SRR1560215 2 0.4178 0.766 0.172 0.828 0.000
#> SRR1560216 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560217 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560218 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560219 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560220 2 0.5216 0.632 0.000 0.740 0.260
#> SRR1560221 2 0.1964 0.780 0.000 0.944 0.056
#> SRR1560222 1 0.5905 0.387 0.648 0.352 0.000
#> SRR1560223 2 0.3482 0.791 0.128 0.872 0.000
#> SRR1560224 1 0.4702 0.669 0.788 0.212 0.000
#> SRR1560225 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560226 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560229 1 0.6079 0.289 0.612 0.388 0.000
#> SRR1560230 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560231 3 0.8435 0.633 0.132 0.268 0.600
#> SRR1560232 1 0.0000 0.918 1.000 0.000 0.000
#> SRR1560233 2 0.6302 -0.532 0.000 0.520 0.480
#> SRR1560234 3 0.6126 0.708 0.000 0.400 0.600
#> SRR1560235 2 0.4750 0.730 0.216 0.784 0.000
#> SRR1560236 2 0.4605 0.742 0.204 0.796 0.000
#> SRR1560237 2 0.6096 0.577 0.040 0.752 0.208
#> SRR1560238 2 0.5688 0.752 0.168 0.788 0.044
#> SRR1560239 3 0.6154 0.702 0.000 0.408 0.592
#> SRR1560240 2 0.1753 0.814 0.048 0.952 0.000
#> SRR1560241 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560242 2 0.0000 0.814 0.000 1.000 0.000
#> SRR1560243 2 0.4346 0.758 0.184 0.816 0.000
#> SRR1560244 2 0.0592 0.808 0.000 0.988 0.012
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.5412 0.698 0.168 0.736 0.000 0.096
#> SRR1560167 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560168 4 0.1557 0.875 0.056 0.000 0.000 0.944
#> SRR1560169 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.4205 0.787 0.056 0.820 0.000 0.124
#> SRR1560171 2 0.2271 0.803 0.076 0.916 0.000 0.008
#> SRR1560172 2 0.2271 0.803 0.076 0.916 0.000 0.008
#> SRR1560173 1 0.0188 0.901 0.996 0.004 0.000 0.000
#> SRR1560174 2 0.2271 0.803 0.076 0.916 0.000 0.008
#> SRR1560175 2 0.2197 0.799 0.080 0.916 0.000 0.004
#> SRR1560176 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560177 4 0.4220 0.604 0.000 0.248 0.004 0.748
#> SRR1560178 3 0.3444 0.747 0.000 0.184 0.816 0.000
#> SRR1560179 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560180 4 0.0188 0.883 0.000 0.000 0.004 0.996
#> SRR1560181 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560182 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560183 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560184 3 0.0188 0.943 0.000 0.000 0.996 0.004
#> SRR1560185 4 0.4356 0.652 0.000 0.000 0.292 0.708
#> SRR1560186 4 0.0000 0.884 0.000 0.000 0.000 1.000
#> SRR1560187 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560188 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560189 4 0.3610 0.784 0.200 0.000 0.000 0.800
#> SRR1560190 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560191 4 0.0817 0.884 0.024 0.000 0.000 0.976
#> SRR1560192 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560193 4 0.0921 0.884 0.028 0.000 0.000 0.972
#> SRR1560194 2 0.5151 0.349 0.000 0.532 0.004 0.464
#> SRR1560195 3 0.0000 0.946 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.946 0.000 0.000 1.000 0.000
#> SRR1560197 4 0.0188 0.883 0.000 0.000 0.004 0.996
#> SRR1560198 4 0.4222 0.684 0.272 0.000 0.000 0.728
#> SRR1560200 4 0.3219 0.814 0.164 0.000 0.000 0.836
#> SRR1560199 4 0.1305 0.864 0.000 0.036 0.004 0.960
#> SRR1560201 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560202 4 0.0000 0.884 0.000 0.000 0.000 1.000
#> SRR1560203 4 0.4977 0.197 0.460 0.000 0.000 0.540
#> SRR1560204 1 0.4356 0.548 0.708 0.000 0.000 0.292
#> SRR1560205 3 0.0000 0.946 0.000 0.000 1.000 0.000
#> SRR1560206 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560207 1 0.0188 0.901 0.996 0.004 0.000 0.000
#> SRR1560208 2 0.1302 0.800 0.000 0.956 0.000 0.044
#> SRR1560209 2 0.1398 0.801 0.004 0.956 0.000 0.040
#> SRR1560210 4 0.3402 0.801 0.000 0.164 0.004 0.832
#> SRR1560211 2 0.3528 0.727 0.000 0.808 0.000 0.192
#> SRR1560212 2 0.0469 0.784 0.000 0.988 0.000 0.012
#> SRR1560213 4 0.1302 0.874 0.000 0.044 0.000 0.956
#> SRR1560214 4 0.3907 0.829 0.120 0.044 0.000 0.836
#> SRR1560215 4 0.4234 0.817 0.132 0.052 0.000 0.816
#> SRR1560216 1 0.1302 0.869 0.956 0.044 0.000 0.000
#> SRR1560217 1 0.1302 0.869 0.956 0.044 0.000 0.000
#> SRR1560218 4 0.0336 0.884 0.000 0.008 0.000 0.992
#> SRR1560219 4 0.0336 0.884 0.000 0.008 0.000 0.992
#> SRR1560220 4 0.4562 0.784 0.000 0.056 0.152 0.792
#> SRR1560221 4 0.1824 0.871 0.000 0.060 0.004 0.936
#> SRR1560222 1 0.4679 0.403 0.648 0.000 0.000 0.352
#> SRR1560223 4 0.2760 0.839 0.128 0.000 0.000 0.872
#> SRR1560224 1 0.3726 0.664 0.788 0.000 0.000 0.212
#> SRR1560225 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560226 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560229 1 0.4817 0.299 0.612 0.000 0.000 0.388
#> SRR1560230 1 0.0000 0.904 1.000 0.000 0.000 0.000
#> SRR1560231 2 0.6552 0.557 0.108 0.624 0.004 0.264
#> SRR1560232 1 0.1118 0.872 0.964 0.036 0.000 0.000
#> SRR1560233 4 0.3105 0.818 0.000 0.140 0.004 0.856
#> SRR1560234 2 0.2197 0.804 0.000 0.916 0.004 0.080
#> SRR1560235 4 0.3764 0.769 0.216 0.000 0.000 0.784
#> SRR1560236 4 0.3649 0.781 0.204 0.000 0.000 0.796
#> SRR1560237 2 0.2665 0.809 0.008 0.900 0.004 0.088
#> SRR1560238 2 0.4188 0.776 0.064 0.824 0.000 0.112
#> SRR1560239 4 0.4560 0.453 0.000 0.296 0.004 0.700
#> SRR1560240 4 0.1474 0.877 0.052 0.000 0.000 0.948
#> SRR1560241 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560242 4 0.0188 0.885 0.004 0.000 0.000 0.996
#> SRR1560243 4 0.3444 0.798 0.184 0.000 0.000 0.816
#> SRR1560244 4 0.0000 0.884 0.000 0.000 0.000 1.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.7988 0.4368 0.168 0.436 0.000 0.256 0.140
#> SRR1560167 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.1270 0.8171 0.052 0.000 0.000 0.000 0.948
#> SRR1560169 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.6622 0.6128 0.044 0.500 0.000 0.368 0.088
#> SRR1560171 2 0.5137 0.6448 0.040 0.536 0.000 0.424 0.000
#> SRR1560172 2 0.5137 0.6448 0.040 0.536 0.000 0.424 0.000
#> SRR1560173 1 0.0162 0.8829 0.996 0.000 0.000 0.004 0.000
#> SRR1560174 2 0.5137 0.6448 0.040 0.536 0.000 0.424 0.000
#> SRR1560175 2 0.5137 0.6448 0.040 0.536 0.000 0.424 0.000
#> SRR1560176 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560177 4 0.6093 0.5221 0.000 0.240 0.000 0.568 0.192
#> SRR1560178 3 0.3949 0.5406 0.000 0.332 0.668 0.000 0.000
#> SRR1560179 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560180 5 0.3452 0.6120 0.000 0.244 0.000 0.000 0.756
#> SRR1560181 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560182 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560183 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560184 3 0.0000 0.9038 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 5 0.3752 0.6209 0.000 0.000 0.292 0.000 0.708
#> SRR1560186 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560187 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560188 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560189 5 0.3109 0.7327 0.200 0.000 0.000 0.000 0.800
#> SRR1560190 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560191 5 0.0609 0.8243 0.020 0.000 0.000 0.000 0.980
#> SRR1560192 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560193 5 0.0703 0.8241 0.024 0.000 0.000 0.000 0.976
#> SRR1560194 2 0.4219 0.0125 0.000 0.584 0.000 0.000 0.416
#> SRR1560195 3 0.0162 0.9020 0.000 0.004 0.996 0.000 0.000
#> SRR1560196 3 0.0000 0.9038 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 5 0.3534 0.5959 0.000 0.256 0.000 0.000 0.744
#> SRR1560198 5 0.3661 0.6461 0.276 0.000 0.000 0.000 0.724
#> SRR1560200 5 0.2773 0.7591 0.164 0.000 0.000 0.000 0.836
#> SRR1560199 5 0.3661 0.5702 0.000 0.276 0.000 0.000 0.724
#> SRR1560201 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560202 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560203 5 0.4283 0.1995 0.456 0.000 0.000 0.000 0.544
#> SRR1560204 1 0.3752 0.5404 0.708 0.000 0.000 0.000 0.292
#> SRR1560205 3 0.0000 0.9038 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560207 1 0.0404 0.8784 0.988 0.012 0.000 0.000 0.000
#> SRR1560208 4 0.0000 0.5332 0.000 0.000 0.000 1.000 0.000
#> SRR1560209 4 0.2074 0.3715 0.000 0.104 0.000 0.896 0.000
#> SRR1560210 4 0.4764 0.5785 0.000 0.140 0.000 0.732 0.128
#> SRR1560211 4 0.2127 0.5651 0.000 0.000 0.000 0.892 0.108
#> SRR1560212 4 0.0000 0.5332 0.000 0.000 0.000 1.000 0.000
#> SRR1560213 5 0.3109 0.7450 0.000 0.200 0.000 0.000 0.800
#> SRR1560214 5 0.3177 0.7389 0.000 0.208 0.000 0.000 0.792
#> SRR1560215 5 0.3177 0.7389 0.000 0.208 0.000 0.000 0.792
#> SRR1560216 1 0.3177 0.6883 0.792 0.208 0.000 0.000 0.000
#> SRR1560217 1 0.3177 0.6883 0.792 0.208 0.000 0.000 0.000
#> SRR1560218 5 0.0794 0.8222 0.000 0.028 0.000 0.000 0.972
#> SRR1560219 5 0.1197 0.8181 0.000 0.048 0.000 0.000 0.952
#> SRR1560220 5 0.4440 0.4468 0.000 0.468 0.004 0.000 0.528
#> SRR1560221 5 0.4291 0.4592 0.000 0.464 0.000 0.000 0.536
#> SRR1560222 1 0.4030 0.3985 0.648 0.000 0.000 0.000 0.352
#> SRR1560223 5 0.2377 0.7825 0.128 0.000 0.000 0.000 0.872
#> SRR1560224 1 0.3210 0.6626 0.788 0.000 0.000 0.000 0.212
#> SRR1560225 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560226 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560229 1 0.4150 0.2969 0.612 0.000 0.000 0.000 0.388
#> SRR1560230 1 0.0000 0.8854 1.000 0.000 0.000 0.000 0.000
#> SRR1560231 4 0.6482 0.5302 0.100 0.256 0.000 0.592 0.052
#> SRR1560232 1 0.2304 0.8117 0.908 0.048 0.000 0.044 0.000
#> SRR1560233 4 0.6278 0.4318 0.000 0.252 0.000 0.536 0.212
#> SRR1560234 2 0.3810 0.4358 0.000 0.792 0.000 0.168 0.040
#> SRR1560235 5 0.3242 0.7185 0.216 0.000 0.000 0.000 0.784
#> SRR1560236 5 0.3143 0.7298 0.204 0.000 0.000 0.000 0.796
#> SRR1560237 2 0.4082 0.4432 0.012 0.788 0.000 0.164 0.036
#> SRR1560238 2 0.6942 0.5783 0.048 0.452 0.000 0.388 0.112
#> SRR1560239 5 0.6738 -0.3939 0.000 0.256 0.000 0.364 0.380
#> SRR1560240 5 0.1197 0.8185 0.048 0.000 0.000 0.000 0.952
#> SRR1560241 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560242 5 0.0000 0.8244 0.000 0.000 0.000 0.000 1.000
#> SRR1560243 5 0.2966 0.7457 0.184 0.000 0.000 0.000 0.816
#> SRR1560244 5 0.0880 0.8119 0.000 0.032 0.000 0.000 0.968
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.4520 0.582 0.168 0.704 0.000 0.000 0.128 0.000
#> SRR1560167 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.1141 0.835 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1560169 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.2433 0.806 0.044 0.884 0.000 0.000 0.072 0.000
#> SRR1560171 2 0.0000 0.860 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560172 2 0.0000 0.860 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560173 1 0.0547 0.853 0.980 0.020 0.000 0.000 0.000 0.000
#> SRR1560174 2 0.0000 0.860 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560175 2 0.0000 0.860 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560176 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560177 6 0.2706 0.755 0.000 0.000 0.000 0.036 0.104 0.860
#> SRR1560178 4 0.0146 0.249 0.000 0.004 0.000 0.996 0.000 0.000
#> SRR1560179 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560180 4 0.3838 0.551 0.000 0.000 0.000 0.552 0.448 0.000
#> SRR1560181 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560182 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560183 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560184 3 0.3774 0.996 0.000 0.000 0.592 0.408 0.000 0.000
#> SRR1560185 5 0.3575 0.618 0.000 0.000 0.008 0.284 0.708 0.000
#> SRR1560186 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560187 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560188 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560189 5 0.2793 0.749 0.200 0.000 0.000 0.000 0.800 0.000
#> SRR1560190 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560191 5 0.0547 0.843 0.020 0.000 0.000 0.000 0.980 0.000
#> SRR1560192 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560193 5 0.0632 0.843 0.024 0.000 0.000 0.000 0.976 0.000
#> SRR1560194 4 0.4453 0.634 0.000 0.036 0.000 0.592 0.372 0.000
#> SRR1560195 3 0.3789 0.989 0.000 0.000 0.584 0.416 0.000 0.000
#> SRR1560196 3 0.3774 0.996 0.000 0.000 0.592 0.408 0.000 0.000
#> SRR1560197 4 0.3774 0.622 0.000 0.000 0.000 0.592 0.408 0.000
#> SRR1560198 5 0.3288 0.665 0.276 0.000 0.000 0.000 0.724 0.000
#> SRR1560200 5 0.2491 0.776 0.164 0.000 0.000 0.000 0.836 0.000
#> SRR1560199 4 0.3774 0.622 0.000 0.000 0.000 0.592 0.408 0.000
#> SRR1560201 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560202 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560203 5 0.3847 0.177 0.456 0.000 0.000 0.000 0.544 0.000
#> SRR1560204 1 0.3371 0.546 0.708 0.000 0.000 0.000 0.292 0.000
#> SRR1560205 3 0.3774 0.996 0.000 0.000 0.592 0.408 0.000 0.000
#> SRR1560206 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560207 1 0.0363 0.860 0.988 0.000 0.012 0.000 0.000 0.000
#> SRR1560208 6 0.0000 0.885 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1560209 6 0.3547 0.507 0.000 0.332 0.000 0.000 0.000 0.668
#> SRR1560210 6 0.0000 0.885 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1560211 6 0.0000 0.885 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1560212 6 0.0000 0.885 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1560213 5 0.3288 0.650 0.000 0.000 0.276 0.000 0.724 0.000
#> SRR1560214 5 0.3774 0.466 0.000 0.000 0.408 0.000 0.592 0.000
#> SRR1560215 5 0.3774 0.466 0.000 0.000 0.408 0.000 0.592 0.000
#> SRR1560216 1 0.3774 0.435 0.592 0.000 0.408 0.000 0.000 0.000
#> SRR1560217 1 0.3774 0.435 0.592 0.000 0.408 0.000 0.000 0.000
#> SRR1560218 5 0.0713 0.838 0.000 0.000 0.028 0.000 0.972 0.000
#> SRR1560219 5 0.1075 0.832 0.000 0.000 0.048 0.000 0.952 0.000
#> SRR1560220 4 0.3774 0.468 0.000 0.000 0.408 0.592 0.000 0.000
#> SRR1560221 4 0.3774 0.468 0.000 0.000 0.408 0.592 0.000 0.000
#> SRR1560222 1 0.3620 0.368 0.648 0.000 0.000 0.000 0.352 0.000
#> SRR1560223 5 0.2135 0.798 0.128 0.000 0.000 0.000 0.872 0.000
#> SRR1560224 1 0.2883 0.658 0.788 0.000 0.000 0.000 0.212 0.000
#> SRR1560225 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560226 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560229 1 0.3727 0.259 0.612 0.000 0.000 0.000 0.388 0.000
#> SRR1560230 1 0.0000 0.867 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560231 4 0.4200 0.291 0.012 0.000 0.000 0.592 0.004 0.392
#> SRR1560232 1 0.1663 0.797 0.912 0.088 0.000 0.000 0.000 0.000
#> SRR1560233 4 0.6346 0.558 0.000 0.112 0.000 0.580 0.148 0.160
#> SRR1560234 4 0.3774 0.347 0.000 0.408 0.000 0.592 0.000 0.000
#> SRR1560235 5 0.2912 0.735 0.216 0.000 0.000 0.000 0.784 0.000
#> SRR1560236 5 0.2823 0.746 0.204 0.000 0.000 0.000 0.796 0.000
#> SRR1560237 4 0.3993 0.361 0.000 0.400 0.000 0.592 0.008 0.000
#> SRR1560238 2 0.2311 0.784 0.016 0.880 0.000 0.000 0.104 0.000
#> SRR1560239 4 0.4598 0.629 0.000 0.000 0.000 0.592 0.360 0.048
#> SRR1560240 5 0.1075 0.837 0.048 0.000 0.000 0.000 0.952 0.000
#> SRR1560241 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560242 5 0.0000 0.842 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560243 5 0.2664 0.762 0.184 0.000 0.000 0.000 0.816 0.000
#> SRR1560244 5 0.1075 0.802 0.000 0.000 0.000 0.048 0.952 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "mclust"]
# you can also extract it by
# res = res_list["CV:mclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 15546 rows and 81 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 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.568 0.788 0.902 0.2954 0.762 0.762
#> 3 3 0.306 0.665 0.822 0.8370 0.589 0.497
#> 4 4 0.522 0.748 0.836 0.2723 0.672 0.407
#> 5 5 0.618 0.720 0.799 0.0634 0.967 0.896
#> 6 6 0.626 0.547 0.795 0.0497 0.903 0.690
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1560164 2 0.2778 0.8847 0.048 0.952
#> SRR1560165 2 0.2778 0.8847 0.048 0.952
#> SRR1560166 2 0.0000 0.8826 0.000 1.000
#> SRR1560167 2 0.2778 0.8847 0.048 0.952
#> SRR1560168 2 0.0000 0.8826 0.000 1.000
#> SRR1560169 2 0.2778 0.8847 0.048 0.952
#> SRR1560170 2 0.1633 0.8752 0.024 0.976
#> SRR1560171 2 0.7056 0.7125 0.192 0.808
#> SRR1560172 2 0.6531 0.7437 0.168 0.832
#> SRR1560173 2 0.2778 0.8847 0.048 0.952
#> SRR1560174 2 0.6438 0.7485 0.164 0.836
#> SRR1560175 2 0.2778 0.8847 0.048 0.952
#> SRR1560176 2 0.2778 0.8847 0.048 0.952
#> SRR1560177 2 0.8327 0.6207 0.264 0.736
#> SRR1560178 1 0.6048 0.7927 0.852 0.148
#> SRR1560179 2 0.0938 0.8821 0.012 0.988
#> SRR1560180 2 0.3114 0.8823 0.056 0.944
#> SRR1560181 2 0.0672 0.8825 0.008 0.992
#> SRR1560182 2 0.0672 0.8825 0.008 0.992
#> SRR1560183 2 0.0672 0.8832 0.008 0.992
#> SRR1560184 1 0.0000 0.8247 1.000 0.000
#> SRR1560185 1 0.0000 0.8247 1.000 0.000
#> SRR1560186 2 0.3274 0.8825 0.060 0.940
#> SRR1560187 2 0.2043 0.8865 0.032 0.968
#> SRR1560188 2 0.0000 0.8826 0.000 1.000
#> SRR1560189 2 0.0000 0.8826 0.000 1.000
#> SRR1560190 2 0.0000 0.8826 0.000 1.000
#> SRR1560191 2 0.0000 0.8826 0.000 1.000
#> SRR1560192 2 0.2778 0.8847 0.048 0.952
#> SRR1560193 2 0.0000 0.8826 0.000 1.000
#> SRR1560194 2 0.9460 0.3906 0.364 0.636
#> SRR1560195 1 0.0000 0.8247 1.000 0.000
#> SRR1560196 1 0.0000 0.8247 1.000 0.000
#> SRR1560197 2 0.9795 0.2847 0.416 0.584
#> SRR1560198 2 0.3274 0.8825 0.060 0.940
#> SRR1560200 2 0.2778 0.8847 0.048 0.952
#> SRR1560199 2 0.9580 0.3483 0.380 0.620
#> SRR1560201 2 0.2778 0.8847 0.048 0.952
#> SRR1560202 2 0.3431 0.8805 0.064 0.936
#> SRR1560203 2 0.3274 0.8825 0.060 0.940
#> SRR1560204 2 0.3274 0.8825 0.060 0.940
#> SRR1560205 1 0.0000 0.8247 1.000 0.000
#> SRR1560206 2 0.0672 0.8825 0.008 0.992
#> SRR1560207 2 0.2778 0.8847 0.048 0.952
#> SRR1560208 2 0.9044 0.4811 0.320 0.680
#> SRR1560209 2 0.5178 0.8017 0.116 0.884
#> SRR1560210 1 0.8267 0.6868 0.740 0.260
#> SRR1560211 2 0.9170 0.4772 0.332 0.668
#> SRR1560212 1 1.0000 -0.0699 0.500 0.500
#> SRR1560213 2 0.0938 0.8823 0.012 0.988
#> SRR1560214 2 0.3274 0.8825 0.060 0.940
#> SRR1560215 2 0.1414 0.8846 0.020 0.980
#> SRR1560216 2 0.3274 0.8825 0.060 0.940
#> SRR1560217 2 0.3274 0.8825 0.060 0.940
#> SRR1560218 2 0.9881 0.3012 0.436 0.564
#> SRR1560219 2 0.7815 0.6717 0.232 0.768
#> SRR1560220 1 0.4431 0.8158 0.908 0.092
#> SRR1560221 1 0.6887 0.7645 0.816 0.184
#> SRR1560222 2 0.2778 0.8847 0.048 0.952
#> SRR1560223 2 0.2043 0.8863 0.032 0.968
#> SRR1560224 2 0.0672 0.8846 0.008 0.992
#> SRR1560225 2 0.2423 0.8859 0.040 0.960
#> SRR1560226 2 0.2778 0.8847 0.048 0.952
#> SRR1560227 2 0.2778 0.8847 0.048 0.952
#> SRR1560228 2 0.2778 0.8847 0.048 0.952
#> SRR1560229 2 0.0000 0.8826 0.000 1.000
#> SRR1560230 2 0.2778 0.8847 0.048 0.952
#> SRR1560231 1 0.8327 0.6825 0.736 0.264
#> SRR1560232 2 0.9775 0.1569 0.412 0.588
#> SRR1560233 2 0.7299 0.6962 0.204 0.796
#> SRR1560234 2 0.8955 0.5000 0.312 0.688
#> SRR1560235 2 0.0000 0.8826 0.000 1.000
#> SRR1560236 2 0.0000 0.8826 0.000 1.000
#> SRR1560237 2 0.7219 0.7016 0.200 0.800
#> SRR1560238 2 0.0000 0.8826 0.000 1.000
#> SRR1560239 2 0.8327 0.6207 0.264 0.736
#> SRR1560240 2 0.1633 0.8862 0.024 0.976
#> SRR1560241 2 0.2043 0.8738 0.032 0.968
#> SRR1560242 2 0.3114 0.8835 0.056 0.944
#> SRR1560243 2 0.0672 0.8825 0.008 0.992
#> SRR1560244 2 0.4939 0.8202 0.108 0.892
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0237 0.6724 0.996 0.004 0.000
#> SRR1560165 1 0.0424 0.6753 0.992 0.008 0.000
#> SRR1560166 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560167 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560168 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560169 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560170 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560171 2 0.0237 0.7633 0.004 0.996 0.000
#> SRR1560172 2 0.0237 0.7633 0.004 0.996 0.000
#> SRR1560173 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560174 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560175 2 0.4137 0.6915 0.096 0.872 0.032
#> SRR1560176 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560177 2 0.4629 0.7262 0.188 0.808 0.004
#> SRR1560178 3 0.7923 0.4775 0.180 0.156 0.664
#> SRR1560179 2 0.4682 0.7267 0.192 0.804 0.004
#> SRR1560180 1 0.6298 -0.0493 0.608 0.388 0.004
#> SRR1560181 2 0.4682 0.7267 0.192 0.804 0.004
#> SRR1560182 2 0.4504 0.7270 0.196 0.804 0.000
#> SRR1560183 2 0.5431 0.6797 0.284 0.716 0.000
#> SRR1560184 3 0.0000 0.8824 0.000 0.000 1.000
#> SRR1560185 3 0.0000 0.8824 0.000 0.000 1.000
#> SRR1560186 2 0.6495 0.3972 0.460 0.536 0.004
#> SRR1560187 1 0.4346 0.6729 0.816 0.184 0.000
#> SRR1560188 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560189 2 0.1529 0.7450 0.040 0.960 0.000
#> SRR1560190 2 0.5058 0.4049 0.244 0.756 0.000
#> SRR1560191 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560192 1 0.4504 0.7226 0.804 0.196 0.000
#> SRR1560193 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560194 2 0.4808 0.7259 0.188 0.804 0.008
#> SRR1560195 3 0.0000 0.8824 0.000 0.000 1.000
#> SRR1560196 3 0.0000 0.8824 0.000 0.000 1.000
#> SRR1560197 2 0.6717 0.5882 0.352 0.628 0.020
#> SRR1560198 1 0.4346 0.6729 0.816 0.184 0.000
#> SRR1560200 2 0.5678 0.3859 0.316 0.684 0.000
#> SRR1560199 2 0.4733 0.7244 0.196 0.800 0.004
#> SRR1560201 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560202 2 0.6264 0.5668 0.380 0.616 0.004
#> SRR1560203 1 0.4178 0.6862 0.828 0.172 0.000
#> SRR1560204 1 0.4178 0.6862 0.828 0.172 0.000
#> SRR1560205 3 0.0000 0.8824 0.000 0.000 1.000
#> SRR1560206 2 0.4504 0.7270 0.196 0.804 0.000
#> SRR1560207 1 0.2796 0.7138 0.908 0.092 0.000
#> SRR1560208 2 0.0237 0.7615 0.004 0.996 0.000
#> SRR1560209 2 0.0237 0.7633 0.004 0.996 0.000
#> SRR1560210 2 0.9073 0.2470 0.184 0.544 0.272
#> SRR1560211 2 0.0237 0.7615 0.004 0.996 0.000
#> SRR1560212 2 0.3965 0.6593 0.008 0.860 0.132
#> SRR1560213 2 0.5845 0.6544 0.308 0.688 0.004
#> SRR1560214 2 0.6309 0.3161 0.496 0.504 0.000
#> SRR1560215 2 0.6291 0.3934 0.468 0.532 0.000
#> SRR1560216 1 0.4178 0.6862 0.828 0.172 0.000
#> SRR1560217 1 0.4178 0.6862 0.828 0.172 0.000
#> SRR1560218 2 0.6189 0.5842 0.364 0.632 0.004
#> SRR1560219 2 0.5754 0.6620 0.296 0.700 0.004
#> SRR1560220 3 0.6264 0.6597 0.168 0.068 0.764
#> SRR1560221 2 0.9698 0.3368 0.288 0.456 0.256
#> SRR1560222 1 0.4235 0.6823 0.824 0.176 0.000
#> SRR1560223 1 0.4399 0.6749 0.812 0.188 0.000
#> SRR1560224 1 0.6079 0.6060 0.612 0.388 0.000
#> SRR1560225 1 0.5431 0.7127 0.716 0.284 0.000
#> SRR1560226 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560227 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560228 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560229 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560230 1 0.4452 0.7260 0.808 0.192 0.000
#> SRR1560231 2 0.8392 0.4259 0.200 0.624 0.176
#> SRR1560232 2 0.7049 -0.0704 0.452 0.528 0.020
#> SRR1560233 2 0.0237 0.7615 0.004 0.996 0.000
#> SRR1560234 2 0.0237 0.7615 0.004 0.996 0.000
#> SRR1560235 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560236 2 0.0424 0.7637 0.008 0.992 0.000
#> SRR1560237 2 0.0000 0.7627 0.000 1.000 0.000
#> SRR1560238 2 0.0237 0.7633 0.004 0.996 0.000
#> SRR1560239 2 0.4629 0.7262 0.188 0.808 0.004
#> SRR1560240 2 0.6247 0.5715 0.376 0.620 0.004
#> SRR1560241 2 0.4682 0.7267 0.192 0.804 0.004
#> SRR1560242 1 0.4346 0.6729 0.816 0.184 0.000
#> SRR1560243 2 0.6126 0.6074 0.352 0.644 0.004
#> SRR1560244 2 0.4629 0.7262 0.188 0.808 0.004
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.2281 0.839 0.904 0.000 0.000 0.096
#> SRR1560165 1 0.1867 0.865 0.928 0.000 0.000 0.072
#> SRR1560166 4 0.6971 0.567 0.156 0.276 0.000 0.568
#> SRR1560167 1 0.0921 0.912 0.972 0.028 0.000 0.000
#> SRR1560168 4 0.5540 0.757 0.164 0.108 0.000 0.728
#> SRR1560169 1 0.0469 0.915 0.988 0.012 0.000 0.000
#> SRR1560170 2 0.5820 0.628 0.108 0.700 0.000 0.192
#> SRR1560171 2 0.1610 0.785 0.032 0.952 0.000 0.016
#> SRR1560172 2 0.1059 0.784 0.016 0.972 0.000 0.012
#> SRR1560173 1 0.1302 0.903 0.956 0.044 0.000 0.000
#> SRR1560174 2 0.4638 0.682 0.044 0.776 0.000 0.180
#> SRR1560175 2 0.2565 0.773 0.056 0.912 0.000 0.032
#> SRR1560176 1 0.0336 0.914 0.992 0.008 0.000 0.000
#> SRR1560177 2 0.3726 0.760 0.000 0.788 0.000 0.212
#> SRR1560178 2 0.6851 0.573 0.048 0.604 0.304 0.044
#> SRR1560179 4 0.2011 0.775 0.000 0.080 0.000 0.920
#> SRR1560180 2 0.6002 0.751 0.064 0.716 0.028 0.192
#> SRR1560181 4 0.1867 0.778 0.000 0.072 0.000 0.928
#> SRR1560182 4 0.1940 0.776 0.000 0.076 0.000 0.924
#> SRR1560183 4 0.0524 0.787 0.008 0.004 0.000 0.988
#> SRR1560184 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1560186 4 0.5374 0.412 0.052 0.244 0.000 0.704
#> SRR1560187 4 0.2589 0.775 0.116 0.000 0.000 0.884
#> SRR1560188 4 0.4746 0.765 0.168 0.056 0.000 0.776
#> SRR1560189 4 0.4920 0.761 0.192 0.052 0.000 0.756
#> SRR1560190 4 0.5609 0.749 0.200 0.088 0.000 0.712
#> SRR1560191 4 0.5604 0.757 0.160 0.116 0.000 0.724
#> SRR1560192 1 0.2216 0.851 0.908 0.092 0.000 0.000
#> SRR1560193 4 0.6163 0.732 0.164 0.160 0.000 0.676
#> SRR1560194 2 0.4996 0.760 0.000 0.752 0.056 0.192
#> SRR1560195 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1560197 2 0.6457 0.713 0.020 0.640 0.064 0.276
#> SRR1560198 4 0.3569 0.722 0.196 0.000 0.000 0.804
#> SRR1560200 2 0.6651 0.612 0.148 0.616 0.000 0.236
#> SRR1560199 2 0.5055 0.745 0.000 0.712 0.032 0.256
#> SRR1560201 1 0.0336 0.914 0.992 0.008 0.000 0.000
#> SRR1560202 4 0.0707 0.782 0.020 0.000 0.000 0.980
#> SRR1560203 4 0.4933 0.313 0.432 0.000 0.000 0.568
#> SRR1560204 4 0.4843 0.411 0.396 0.000 0.000 0.604
#> SRR1560205 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR1560206 4 0.1940 0.766 0.000 0.076 0.000 0.924
#> SRR1560207 1 0.1022 0.900 0.968 0.000 0.000 0.032
#> SRR1560208 2 0.0376 0.779 0.004 0.992 0.000 0.004
#> SRR1560209 2 0.1182 0.785 0.016 0.968 0.000 0.016
#> SRR1560210 2 0.3325 0.764 0.064 0.884 0.008 0.044
#> SRR1560211 2 0.0376 0.779 0.004 0.992 0.000 0.004
#> SRR1560212 2 0.0376 0.779 0.004 0.992 0.000 0.004
#> SRR1560213 4 0.0921 0.781 0.000 0.028 0.000 0.972
#> SRR1560214 4 0.1792 0.782 0.068 0.000 0.000 0.932
#> SRR1560215 4 0.1022 0.785 0.032 0.000 0.000 0.968
#> SRR1560216 1 0.4877 0.230 0.592 0.000 0.000 0.408
#> SRR1560217 4 0.4992 0.164 0.476 0.000 0.000 0.524
#> SRR1560218 2 0.6720 0.415 0.016 0.468 0.052 0.464
#> SRR1560219 2 0.4905 0.660 0.000 0.632 0.004 0.364
#> SRR1560220 2 0.7250 0.391 0.048 0.496 0.408 0.048
#> SRR1560221 2 0.7411 0.683 0.048 0.628 0.156 0.168
#> SRR1560222 4 0.4761 0.520 0.372 0.000 0.000 0.628
#> SRR1560223 4 0.3356 0.762 0.176 0.000 0.000 0.824
#> SRR1560224 4 0.4313 0.722 0.260 0.004 0.000 0.736
#> SRR1560225 1 0.2021 0.879 0.932 0.012 0.000 0.056
#> SRR1560226 1 0.0000 0.914 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.914 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.0336 0.914 0.992 0.008 0.000 0.000
#> SRR1560229 4 0.5512 0.758 0.172 0.100 0.000 0.728
#> SRR1560230 1 0.1489 0.900 0.952 0.044 0.000 0.004
#> SRR1560231 2 0.3383 0.769 0.076 0.872 0.000 0.052
#> SRR1560232 2 0.2408 0.753 0.104 0.896 0.000 0.000
#> SRR1560233 2 0.2586 0.786 0.048 0.912 0.000 0.040
#> SRR1560234 2 0.1109 0.782 0.028 0.968 0.000 0.004
#> SRR1560235 4 0.5512 0.758 0.172 0.100 0.000 0.728
#> SRR1560236 4 0.5512 0.758 0.172 0.100 0.000 0.728
#> SRR1560237 2 0.2563 0.779 0.072 0.908 0.000 0.020
#> SRR1560238 4 0.5578 0.601 0.040 0.312 0.000 0.648
#> SRR1560239 2 0.3801 0.758 0.000 0.780 0.000 0.220
#> SRR1560240 4 0.0779 0.783 0.016 0.004 0.000 0.980
#> SRR1560241 4 0.1557 0.780 0.000 0.056 0.000 0.944
#> SRR1560242 4 0.1902 0.777 0.064 0.004 0.000 0.932
#> SRR1560243 4 0.0804 0.786 0.012 0.008 0.000 0.980
#> SRR1560244 2 0.4477 0.687 0.000 0.688 0.000 0.312
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.3074 0.7177 0.804 0.000 0.000 0.196 0.000
#> SRR1560165 1 0.3074 0.7177 0.804 0.000 0.000 0.196 0.000
#> SRR1560166 5 0.4039 0.7121 0.184 0.036 0.000 0.004 0.776
#> SRR1560167 1 0.1544 0.8680 0.932 0.000 0.000 0.068 0.000
#> SRR1560168 5 0.3391 0.7194 0.188 0.012 0.000 0.000 0.800
#> SRR1560169 1 0.1410 0.8774 0.940 0.000 0.000 0.060 0.000
#> SRR1560170 2 0.6154 0.2885 0.144 0.508 0.000 0.000 0.348
#> SRR1560171 2 0.2729 0.7950 0.028 0.884 0.000 0.004 0.084
#> SRR1560172 2 0.2582 0.7971 0.024 0.892 0.000 0.004 0.080
#> SRR1560173 1 0.1341 0.8787 0.944 0.000 0.000 0.056 0.000
#> SRR1560174 2 0.4549 0.6912 0.048 0.728 0.000 0.004 0.220
#> SRR1560175 2 0.1822 0.7872 0.036 0.936 0.000 0.004 0.024
#> SRR1560176 1 0.0510 0.8913 0.984 0.000 0.000 0.016 0.000
#> SRR1560177 2 0.3395 0.7753 0.000 0.764 0.000 0.000 0.236
#> SRR1560178 2 0.3790 0.6538 0.000 0.724 0.272 0.000 0.004
#> SRR1560179 5 0.0162 0.7330 0.000 0.004 0.000 0.000 0.996
#> SRR1560180 2 0.5729 0.7245 0.004 0.616 0.000 0.116 0.264
#> SRR1560181 5 0.0162 0.7330 0.000 0.004 0.000 0.000 0.996
#> SRR1560182 5 0.0162 0.7330 0.000 0.004 0.000 0.000 0.996
#> SRR1560183 5 0.0324 0.7339 0.000 0.004 0.000 0.004 0.992
#> SRR1560184 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 5 0.4546 -0.3677 0.000 0.460 0.000 0.008 0.532
#> SRR1560187 5 0.5048 0.2942 0.040 0.000 0.000 0.380 0.580
#> SRR1560188 5 0.3318 0.7189 0.192 0.008 0.000 0.000 0.800
#> SRR1560189 5 0.4037 0.7119 0.188 0.008 0.000 0.028 0.776
#> SRR1560190 5 0.4555 0.6874 0.196 0.004 0.000 0.060 0.740
#> SRR1560191 5 0.3492 0.7194 0.188 0.016 0.000 0.000 0.796
#> SRR1560192 1 0.1410 0.8751 0.940 0.000 0.000 0.060 0.000
#> SRR1560193 5 0.3706 0.7192 0.184 0.020 0.000 0.004 0.792
#> SRR1560194 2 0.3561 0.7716 0.000 0.740 0.000 0.000 0.260
#> SRR1560195 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 2 0.4110 0.7720 0.000 0.736 0.012 0.008 0.244
#> SRR1560198 5 0.5280 0.1431 0.048 0.000 0.000 0.440 0.512
#> SRR1560200 2 0.5883 0.5760 0.136 0.604 0.000 0.004 0.256
#> SRR1560199 2 0.3561 0.7716 0.000 0.740 0.000 0.000 0.260
#> SRR1560201 1 0.0771 0.8902 0.976 0.004 0.000 0.020 0.000
#> SRR1560202 5 0.0703 0.7275 0.000 0.000 0.000 0.024 0.976
#> SRR1560203 4 0.4057 0.9059 0.088 0.000 0.000 0.792 0.120
#> SRR1560204 4 0.4025 0.8902 0.076 0.000 0.000 0.792 0.132
#> SRR1560205 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 5 0.0290 0.7314 0.000 0.008 0.000 0.000 0.992
#> SRR1560207 1 0.1851 0.8577 0.912 0.000 0.000 0.088 0.000
#> SRR1560208 2 0.0290 0.7834 0.000 0.992 0.000 0.000 0.008
#> SRR1560209 2 0.1608 0.7990 0.000 0.928 0.000 0.000 0.072
#> SRR1560210 2 0.2084 0.7582 0.004 0.920 0.008 0.064 0.004
#> SRR1560211 2 0.0290 0.7834 0.000 0.992 0.000 0.000 0.008
#> SRR1560212 2 0.0451 0.7826 0.000 0.988 0.000 0.004 0.008
#> SRR1560213 5 0.0162 0.7330 0.000 0.004 0.000 0.000 0.996
#> SRR1560214 5 0.3752 0.5000 0.000 0.000 0.000 0.292 0.708
#> SRR1560215 5 0.1121 0.7205 0.000 0.000 0.000 0.044 0.956
#> SRR1560216 4 0.3687 0.8086 0.180 0.000 0.000 0.792 0.028
#> SRR1560217 4 0.4057 0.9045 0.120 0.000 0.000 0.792 0.088
#> SRR1560218 2 0.4718 0.5938 0.000 0.580 0.008 0.008 0.404
#> SRR1560219 2 0.3928 0.7526 0.000 0.700 0.004 0.000 0.296
#> SRR1560220 2 0.4582 0.4466 0.000 0.572 0.416 0.000 0.012
#> SRR1560221 2 0.4609 0.7553 0.000 0.744 0.104 0.000 0.152
#> SRR1560222 5 0.5777 0.0337 0.088 0.000 0.000 0.444 0.468
#> SRR1560223 5 0.6209 0.4737 0.168 0.004 0.000 0.268 0.560
#> SRR1560224 5 0.6493 0.3726 0.248 0.000 0.000 0.260 0.492
#> SRR1560225 1 0.2233 0.8274 0.892 0.000 0.000 0.104 0.004
#> SRR1560226 1 0.2471 0.8146 0.864 0.000 0.000 0.136 0.000
#> SRR1560227 1 0.1043 0.8924 0.960 0.000 0.000 0.040 0.000
#> SRR1560228 1 0.0703 0.8916 0.976 0.000 0.000 0.024 0.000
#> SRR1560229 5 0.3511 0.7213 0.184 0.012 0.000 0.004 0.800
#> SRR1560230 1 0.0963 0.8819 0.964 0.000 0.000 0.036 0.000
#> SRR1560231 2 0.1525 0.7753 0.004 0.948 0.000 0.036 0.012
#> SRR1560232 2 0.3727 0.7143 0.016 0.812 0.000 0.152 0.020
#> SRR1560233 2 0.1732 0.8031 0.000 0.920 0.000 0.000 0.080
#> SRR1560234 2 0.0290 0.7834 0.000 0.992 0.000 0.000 0.008
#> SRR1560235 5 0.4061 0.7144 0.188 0.012 0.000 0.024 0.776
#> SRR1560236 5 0.4061 0.7144 0.188 0.012 0.000 0.024 0.776
#> SRR1560237 2 0.1768 0.8001 0.004 0.924 0.000 0.000 0.072
#> SRR1560238 5 0.4372 0.6837 0.100 0.120 0.000 0.004 0.776
#> SRR1560239 2 0.3508 0.7734 0.000 0.748 0.000 0.000 0.252
#> SRR1560240 5 0.0579 0.7292 0.000 0.008 0.000 0.008 0.984
#> SRR1560241 5 0.0000 0.7330 0.000 0.000 0.000 0.000 1.000
#> SRR1560242 5 0.4576 0.4415 0.040 0.000 0.000 0.268 0.692
#> SRR1560243 5 0.1478 0.7153 0.000 0.000 0.000 0.064 0.936
#> SRR1560244 2 0.4015 0.7147 0.000 0.652 0.000 0.000 0.348
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.2913 0.8083 0.812 0.000 0.000 0.180 0.004 0.004
#> SRR1560165 1 0.2879 0.8120 0.816 0.000 0.000 0.176 0.004 0.004
#> SRR1560166 5 0.4252 0.6914 0.032 0.116 0.000 0.000 0.772 0.080
#> SRR1560167 1 0.2632 0.8327 0.832 0.000 0.000 0.004 0.000 0.164
#> SRR1560168 5 0.4035 0.6997 0.044 0.084 0.000 0.000 0.796 0.076
#> SRR1560169 1 0.1349 0.8872 0.940 0.000 0.000 0.004 0.000 0.056
#> SRR1560170 5 0.5074 0.1894 0.008 0.440 0.000 0.000 0.496 0.056
#> SRR1560171 2 0.2566 0.4133 0.008 0.868 0.000 0.000 0.112 0.012
#> SRR1560172 2 0.2285 0.4630 0.008 0.900 0.000 0.000 0.064 0.028
#> SRR1560173 1 0.1285 0.8882 0.944 0.000 0.000 0.004 0.000 0.052
#> SRR1560174 2 0.4296 -0.0759 0.008 0.544 0.000 0.000 0.440 0.008
#> SRR1560175 2 0.4323 -0.0527 0.012 0.612 0.000 0.000 0.012 0.364
#> SRR1560176 1 0.0632 0.8956 0.976 0.000 0.000 0.024 0.000 0.000
#> SRR1560177 2 0.3686 0.4542 0.000 0.748 0.000 0.000 0.220 0.032
#> SRR1560178 2 0.5821 0.1088 0.000 0.524 0.320 0.008 0.004 0.144
#> SRR1560179 5 0.0146 0.7276 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR1560180 6 0.5679 0.3812 0.004 0.236 0.000 0.000 0.208 0.552
#> SRR1560181 5 0.0000 0.7277 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560182 5 0.0146 0.7276 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR1560183 5 0.0000 0.7277 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560184 3 0.0000 0.8915 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 0.8915 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 5 0.3767 0.5634 0.000 0.128 0.000 0.080 0.788 0.004
#> SRR1560187 5 0.4601 -0.1451 0.004 0.000 0.000 0.472 0.496 0.028
#> SRR1560188 5 0.4015 0.6993 0.040 0.092 0.000 0.000 0.796 0.072
#> SRR1560189 5 0.4111 0.6709 0.148 0.012 0.000 0.020 0.780 0.040
#> SRR1560190 5 0.3701 0.6579 0.184 0.008 0.000 0.016 0.780 0.012
#> SRR1560191 5 0.4047 0.7002 0.052 0.088 0.000 0.000 0.796 0.064
#> SRR1560192 1 0.2053 0.8765 0.888 0.000 0.000 0.004 0.000 0.108
#> SRR1560193 5 0.4133 0.6993 0.044 0.092 0.000 0.000 0.788 0.076
#> SRR1560194 2 0.4326 0.3955 0.000 0.656 0.000 0.000 0.300 0.044
#> SRR1560195 3 0.0000 0.8915 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.8915 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 2 0.5688 0.2774 0.000 0.544 0.000 0.008 0.292 0.156
#> SRR1560198 4 0.5077 0.2157 0.036 0.000 0.000 0.536 0.404 0.024
#> SRR1560200 6 0.6511 0.3375 0.032 0.348 0.000 0.000 0.204 0.416
#> SRR1560199 2 0.4201 0.3928 0.000 0.664 0.000 0.000 0.300 0.036
#> SRR1560201 1 0.1708 0.8856 0.932 0.004 0.000 0.024 0.000 0.040
#> SRR1560202 5 0.1333 0.7096 0.000 0.000 0.000 0.048 0.944 0.008
#> SRR1560203 4 0.0291 0.7070 0.004 0.000 0.000 0.992 0.004 0.000
#> SRR1560204 4 0.0291 0.7070 0.004 0.000 0.000 0.992 0.004 0.000
#> SRR1560205 3 0.0000 0.8915 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 5 0.0260 0.7268 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR1560207 1 0.2039 0.8793 0.908 0.000 0.000 0.072 0.004 0.016
#> SRR1560208 2 0.1958 0.4950 0.000 0.896 0.000 0.000 0.004 0.100
#> SRR1560209 2 0.1781 0.4704 0.008 0.924 0.000 0.000 0.060 0.008
#> SRR1560210 2 0.4126 -0.1666 0.004 0.512 0.000 0.004 0.000 0.480
#> SRR1560211 2 0.2278 0.4793 0.000 0.868 0.000 0.004 0.000 0.128
#> SRR1560212 2 0.3109 0.3862 0.000 0.772 0.000 0.004 0.000 0.224
#> SRR1560213 5 0.0291 0.7271 0.000 0.004 0.000 0.004 0.992 0.000
#> SRR1560214 5 0.4105 0.2901 0.000 0.000 0.000 0.348 0.632 0.020
#> SRR1560215 5 0.2432 0.6651 0.000 0.000 0.000 0.100 0.876 0.024
#> SRR1560216 4 0.0291 0.7070 0.004 0.000 0.000 0.992 0.004 0.000
#> SRR1560217 4 0.0603 0.7028 0.016 0.000 0.000 0.980 0.004 0.000
#> SRR1560218 5 0.5158 0.1015 0.000 0.232 0.000 0.008 0.636 0.124
#> SRR1560219 5 0.5116 -0.1194 0.000 0.344 0.000 0.000 0.560 0.096
#> SRR1560220 3 0.5486 0.1379 0.000 0.232 0.604 0.000 0.012 0.152
#> SRR1560221 2 0.6957 0.2246 0.000 0.532 0.136 0.012 0.160 0.160
#> SRR1560222 4 0.5514 0.2743 0.068 0.000 0.000 0.528 0.376 0.028
#> SRR1560223 5 0.5896 0.2092 0.072 0.008 0.000 0.340 0.540 0.040
#> SRR1560224 5 0.6513 0.0107 0.200 0.004 0.000 0.316 0.452 0.028
#> SRR1560225 1 0.2823 0.7393 0.796 0.000 0.000 0.204 0.000 0.000
#> SRR1560226 1 0.1845 0.8878 0.920 0.000 0.000 0.052 0.000 0.028
#> SRR1560227 1 0.1341 0.8948 0.948 0.000 0.000 0.024 0.000 0.028
#> SRR1560228 1 0.0632 0.8956 0.976 0.000 0.000 0.024 0.000 0.000
#> SRR1560229 5 0.3901 0.7047 0.064 0.072 0.000 0.000 0.808 0.056
#> SRR1560230 1 0.2847 0.8452 0.872 0.076 0.000 0.036 0.004 0.012
#> SRR1560231 2 0.4027 0.2034 0.004 0.636 0.000 0.004 0.004 0.352
#> SRR1560232 6 0.3373 0.3927 0.008 0.248 0.000 0.000 0.000 0.744
#> SRR1560233 2 0.2672 0.5120 0.000 0.868 0.000 0.000 0.052 0.080
#> SRR1560234 2 0.2006 0.4955 0.000 0.892 0.000 0.000 0.004 0.104
#> SRR1560235 5 0.4433 0.6871 0.104 0.056 0.000 0.016 0.780 0.044
#> SRR1560236 5 0.4476 0.6899 0.092 0.060 0.000 0.016 0.780 0.052
#> SRR1560237 2 0.1418 0.4905 0.000 0.944 0.000 0.000 0.024 0.032
#> SRR1560238 5 0.3481 0.6402 0.012 0.228 0.000 0.000 0.756 0.004
#> SRR1560239 2 0.3929 0.4279 0.000 0.700 0.000 0.000 0.272 0.028
#> SRR1560240 5 0.0508 0.7251 0.000 0.000 0.000 0.012 0.984 0.004
#> SRR1560241 5 0.0146 0.7284 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR1560242 5 0.4252 0.1490 0.000 0.000 0.000 0.372 0.604 0.024
#> SRR1560243 5 0.1405 0.7173 0.000 0.004 0.000 0.024 0.948 0.024
#> SRR1560244 2 0.4177 0.1957 0.000 0.520 0.000 0.000 0.468 0.012
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "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 15546 rows and 81 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 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.344 0.705 0.828 0.4334 0.611 0.611
#> 3 3 0.416 0.697 0.821 0.4780 0.680 0.506
#> 4 4 0.547 0.661 0.809 0.1375 0.816 0.553
#> 5 5 0.517 0.451 0.709 0.0722 0.793 0.398
#> 6 6 0.592 0.469 0.716 0.0443 0.904 0.618
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
#> SRR1560164 1 0.8386 0.699 0.732 0.268
#> SRR1560165 1 0.0938 0.783 0.988 0.012
#> SRR1560166 2 0.8555 0.749 0.280 0.720
#> SRR1560167 1 0.0000 0.783 1.000 0.000
#> SRR1560168 2 0.9393 0.678 0.356 0.644
#> SRR1560169 1 0.0000 0.783 1.000 0.000
#> SRR1560170 2 0.8661 0.744 0.288 0.712
#> SRR1560171 2 0.9580 0.648 0.380 0.620
#> SRR1560172 2 0.9552 0.653 0.376 0.624
#> SRR1560173 1 0.0000 0.783 1.000 0.000
#> SRR1560174 2 0.9522 0.658 0.372 0.628
#> SRR1560175 2 0.9996 0.479 0.488 0.512
#> SRR1560176 1 0.0000 0.783 1.000 0.000
#> SRR1560177 2 0.0938 0.758 0.012 0.988
#> SRR1560178 2 0.0000 0.754 0.000 1.000
#> SRR1560179 2 0.6887 0.768 0.184 0.816
#> SRR1560180 1 0.8763 0.685 0.704 0.296
#> SRR1560181 2 0.7376 0.766 0.208 0.792
#> SRR1560182 2 0.7674 0.763 0.224 0.776
#> SRR1560183 2 0.7674 0.764 0.224 0.776
#> SRR1560184 2 0.5842 0.611 0.140 0.860
#> SRR1560185 2 0.0938 0.749 0.012 0.988
#> SRR1560186 2 0.2043 0.736 0.032 0.968
#> SRR1560187 2 0.0376 0.756 0.004 0.996
#> SRR1560188 2 0.9170 0.705 0.332 0.668
#> SRR1560189 2 0.8555 0.749 0.280 0.720
#> SRR1560190 2 0.9608 0.642 0.384 0.616
#> SRR1560191 2 0.9044 0.717 0.320 0.680
#> SRR1560192 1 0.0000 0.783 1.000 0.000
#> SRR1560193 2 0.8555 0.749 0.280 0.720
#> SRR1560194 2 0.0000 0.754 0.000 1.000
#> SRR1560195 2 0.1633 0.742 0.024 0.976
#> SRR1560196 2 0.7745 0.445 0.228 0.772
#> SRR1560197 2 0.0000 0.754 0.000 1.000
#> SRR1560198 2 0.7883 0.426 0.236 0.764
#> SRR1560200 1 0.7453 0.477 0.788 0.212
#> SRR1560199 2 0.0000 0.754 0.000 1.000
#> SRR1560201 1 0.0000 0.783 1.000 0.000
#> SRR1560202 2 0.0000 0.754 0.000 1.000
#> SRR1560203 1 0.9775 0.579 0.588 0.412
#> SRR1560204 2 0.4022 0.691 0.080 0.920
#> SRR1560205 2 0.4939 0.657 0.108 0.892
#> SRR1560206 2 0.3879 0.769 0.076 0.924
#> SRR1560207 1 0.7056 0.738 0.808 0.192
#> SRR1560208 2 0.8555 0.749 0.280 0.720
#> SRR1560209 2 0.8555 0.749 0.280 0.720
#> SRR1560210 1 0.9661 0.604 0.608 0.392
#> SRR1560211 2 0.8555 0.749 0.280 0.720
#> SRR1560212 2 0.8555 0.749 0.280 0.720
#> SRR1560213 2 0.0000 0.754 0.000 1.000
#> SRR1560214 2 0.1633 0.742 0.024 0.976
#> SRR1560215 2 0.0000 0.754 0.000 1.000
#> SRR1560216 1 0.9552 0.619 0.624 0.376
#> SRR1560217 1 0.9775 0.579 0.588 0.412
#> SRR1560218 2 0.0000 0.754 0.000 1.000
#> SRR1560219 2 0.0000 0.754 0.000 1.000
#> SRR1560220 2 0.8081 0.395 0.248 0.752
#> SRR1560221 2 0.0000 0.754 0.000 1.000
#> SRR1560222 2 0.9427 0.326 0.360 0.640
#> SRR1560223 2 0.8499 0.750 0.276 0.724
#> SRR1560224 2 0.8661 0.745 0.288 0.712
#> SRR1560225 1 0.8327 0.337 0.736 0.264
#> SRR1560226 1 0.8555 0.690 0.720 0.280
#> SRR1560227 1 0.1184 0.783 0.984 0.016
#> SRR1560228 1 0.0000 0.783 1.000 0.000
#> SRR1560229 2 0.8555 0.749 0.280 0.720
#> SRR1560230 1 0.0000 0.783 1.000 0.000
#> SRR1560231 2 0.1633 0.748 0.024 0.976
#> SRR1560232 1 0.5737 0.760 0.864 0.136
#> SRR1560233 2 0.8555 0.749 0.280 0.720
#> SRR1560234 2 0.8555 0.749 0.280 0.720
#> SRR1560235 2 0.8555 0.749 0.280 0.720
#> SRR1560236 2 0.8861 0.731 0.304 0.696
#> SRR1560237 2 0.8555 0.749 0.280 0.720
#> SRR1560238 2 0.9552 0.653 0.376 0.624
#> SRR1560239 2 0.1633 0.761 0.024 0.976
#> SRR1560240 2 0.0672 0.757 0.008 0.992
#> SRR1560241 2 0.4939 0.771 0.108 0.892
#> SRR1560242 2 0.1184 0.747 0.016 0.984
#> SRR1560243 2 0.3114 0.767 0.056 0.944
#> SRR1560244 2 0.4815 0.771 0.104 0.896
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.4873 0.724 0.824 0.152 0.024
#> SRR1560165 1 0.4514 0.729 0.832 0.156 0.012
#> SRR1560166 2 0.4121 0.763 0.168 0.832 0.000
#> SRR1560167 1 0.1289 0.858 0.968 0.032 0.000
#> SRR1560168 2 0.5497 0.652 0.292 0.708 0.000
#> SRR1560169 1 0.1289 0.858 0.968 0.032 0.000
#> SRR1560170 2 0.4121 0.763 0.168 0.832 0.000
#> SRR1560171 2 0.6154 0.454 0.408 0.592 0.000
#> SRR1560172 2 0.6280 0.321 0.460 0.540 0.000
#> SRR1560173 1 0.1411 0.857 0.964 0.036 0.000
#> SRR1560174 2 0.5465 0.654 0.288 0.712 0.000
#> SRR1560175 1 0.4968 0.697 0.800 0.188 0.012
#> SRR1560176 1 0.1289 0.858 0.968 0.032 0.000
#> SRR1560177 2 0.4121 0.681 0.000 0.832 0.168
#> SRR1560178 3 0.2796 0.775 0.000 0.092 0.908
#> SRR1560179 2 0.0747 0.772 0.000 0.984 0.016
#> SRR1560180 1 0.8898 0.164 0.500 0.128 0.372
#> SRR1560181 2 0.0892 0.771 0.000 0.980 0.020
#> SRR1560182 2 0.0592 0.773 0.000 0.988 0.012
#> SRR1560183 2 0.0592 0.773 0.000 0.988 0.012
#> SRR1560184 3 0.0829 0.798 0.004 0.012 0.984
#> SRR1560185 3 0.0592 0.798 0.000 0.012 0.988
#> SRR1560186 3 0.4473 0.767 0.008 0.164 0.828
#> SRR1560187 2 0.5058 0.633 0.032 0.820 0.148
#> SRR1560188 2 0.5678 0.619 0.316 0.684 0.000
#> SRR1560189 2 0.3816 0.773 0.148 0.852 0.000
#> SRR1560190 2 0.6168 0.444 0.412 0.588 0.000
#> SRR1560191 2 0.4178 0.761 0.172 0.828 0.000
#> SRR1560192 1 0.1399 0.858 0.968 0.028 0.004
#> SRR1560193 2 0.3340 0.781 0.120 0.880 0.000
#> SRR1560194 2 0.5098 0.603 0.000 0.752 0.248
#> SRR1560195 3 0.0592 0.798 0.000 0.012 0.988
#> SRR1560196 3 0.0829 0.798 0.004 0.012 0.984
#> SRR1560197 3 0.6192 0.184 0.000 0.420 0.580
#> SRR1560198 3 0.3213 0.774 0.060 0.028 0.912
#> SRR1560200 1 0.3253 0.837 0.912 0.036 0.052
#> SRR1560199 2 0.5988 0.359 0.000 0.632 0.368
#> SRR1560201 1 0.2448 0.847 0.924 0.076 0.000
#> SRR1560202 3 0.5678 0.569 0.000 0.316 0.684
#> SRR1560203 3 0.4960 0.726 0.128 0.040 0.832
#> SRR1560204 3 0.5875 0.734 0.056 0.160 0.784
#> SRR1560205 3 0.0592 0.798 0.000 0.012 0.988
#> SRR1560206 2 0.1529 0.762 0.000 0.960 0.040
#> SRR1560207 1 0.4209 0.755 0.856 0.128 0.016
#> SRR1560208 2 0.5454 0.774 0.152 0.804 0.044
#> SRR1560209 2 0.3879 0.771 0.152 0.848 0.000
#> SRR1560210 3 0.1015 0.797 0.008 0.012 0.980
#> SRR1560211 2 0.6823 0.756 0.152 0.740 0.108
#> SRR1560212 2 0.6834 0.757 0.148 0.740 0.112
#> SRR1560213 2 0.2537 0.744 0.000 0.920 0.080
#> SRR1560214 3 0.6679 0.730 0.100 0.152 0.748
#> SRR1560215 3 0.7392 0.346 0.032 0.468 0.500
#> SRR1560216 3 0.6572 0.681 0.172 0.080 0.748
#> SRR1560217 3 0.7666 0.678 0.148 0.168 0.684
#> SRR1560218 3 0.4555 0.732 0.000 0.200 0.800
#> SRR1560219 2 0.5733 0.433 0.000 0.676 0.324
#> SRR1560220 3 0.0829 0.798 0.004 0.012 0.984
#> SRR1560221 3 0.0747 0.798 0.000 0.016 0.984
#> SRR1560222 1 0.7208 0.499 0.620 0.340 0.040
#> SRR1560223 2 0.4228 0.694 0.148 0.844 0.008
#> SRR1560224 2 0.4645 0.759 0.176 0.816 0.008
#> SRR1560225 1 0.4121 0.735 0.832 0.168 0.000
#> SRR1560226 3 0.6033 0.458 0.336 0.004 0.660
#> SRR1560227 1 0.2269 0.840 0.944 0.016 0.040
#> SRR1560228 1 0.1411 0.857 0.964 0.036 0.000
#> SRR1560229 2 0.1411 0.784 0.036 0.964 0.000
#> SRR1560230 1 0.1289 0.858 0.968 0.032 0.000
#> SRR1560231 3 0.5728 0.681 0.032 0.196 0.772
#> SRR1560232 1 0.3207 0.804 0.904 0.012 0.084
#> SRR1560233 2 0.6452 0.735 0.088 0.760 0.152
#> SRR1560234 2 0.5863 0.760 0.084 0.796 0.120
#> SRR1560235 2 0.3551 0.778 0.132 0.868 0.000
#> SRR1560236 2 0.4178 0.762 0.172 0.828 0.000
#> SRR1560237 2 0.3193 0.786 0.100 0.896 0.004
#> SRR1560238 2 0.6225 0.396 0.432 0.568 0.000
#> SRR1560239 2 0.4178 0.683 0.000 0.828 0.172
#> SRR1560240 2 0.5864 0.461 0.008 0.704 0.288
#> SRR1560241 2 0.2796 0.740 0.000 0.908 0.092
#> SRR1560242 3 0.8025 0.423 0.064 0.420 0.516
#> SRR1560243 2 0.2261 0.751 0.000 0.932 0.068
#> SRR1560244 2 0.1643 0.761 0.000 0.956 0.044
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 4 0.6667 0.0222 0.436 0.056 0.012 0.496
#> SRR1560165 1 0.6571 0.4154 0.620 0.092 0.008 0.280
#> SRR1560166 2 0.3569 0.7510 0.196 0.804 0.000 0.000
#> SRR1560167 1 0.0376 0.8304 0.992 0.000 0.004 0.004
#> SRR1560168 2 0.4522 0.6621 0.320 0.680 0.000 0.000
#> SRR1560169 1 0.0000 0.8305 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.2216 0.7781 0.092 0.908 0.000 0.000
#> SRR1560171 2 0.5088 0.5279 0.424 0.572 0.004 0.000
#> SRR1560172 2 0.5147 0.4655 0.460 0.536 0.004 0.000
#> SRR1560173 1 0.0000 0.8305 1.000 0.000 0.000 0.000
#> SRR1560174 2 0.4331 0.6909 0.288 0.712 0.000 0.000
#> SRR1560175 1 0.3464 0.7434 0.860 0.032 0.108 0.000
#> SRR1560176 1 0.0000 0.8305 1.000 0.000 0.000 0.000
#> SRR1560177 3 0.5366 0.4396 0.000 0.440 0.548 0.012
#> SRR1560178 3 0.1209 0.7428 0.000 0.004 0.964 0.032
#> SRR1560179 2 0.0469 0.7586 0.000 0.988 0.000 0.012
#> SRR1560180 3 0.2828 0.7336 0.020 0.036 0.912 0.032
#> SRR1560181 2 0.0336 0.7594 0.000 0.992 0.000 0.008
#> SRR1560182 2 0.0707 0.7593 0.000 0.980 0.000 0.020
#> SRR1560183 2 0.1109 0.7550 0.000 0.968 0.004 0.028
#> SRR1560184 3 0.1940 0.7330 0.000 0.000 0.924 0.076
#> SRR1560185 3 0.2345 0.7237 0.000 0.000 0.900 0.100
#> SRR1560186 4 0.6350 0.5125 0.000 0.112 0.252 0.636
#> SRR1560187 4 0.3718 0.7589 0.000 0.168 0.012 0.820
#> SRR1560188 2 0.4830 0.5748 0.392 0.608 0.000 0.000
#> SRR1560189 2 0.3280 0.7777 0.124 0.860 0.000 0.016
#> SRR1560190 2 0.4916 0.5265 0.424 0.576 0.000 0.000
#> SRR1560191 2 0.3764 0.7424 0.216 0.784 0.000 0.000
#> SRR1560192 1 0.0779 0.8279 0.980 0.000 0.016 0.004
#> SRR1560193 2 0.1118 0.7717 0.036 0.964 0.000 0.000
#> SRR1560194 3 0.4454 0.6614 0.000 0.308 0.692 0.000
#> SRR1560195 3 0.1867 0.7337 0.000 0.000 0.928 0.072
#> SRR1560196 3 0.1867 0.7337 0.000 0.000 0.928 0.072
#> SRR1560197 3 0.4466 0.7399 0.000 0.180 0.784 0.036
#> SRR1560198 4 0.1211 0.8111 0.000 0.000 0.040 0.960
#> SRR1560200 1 0.4877 0.6933 0.768 0.020 0.192 0.020
#> SRR1560199 3 0.3978 0.7323 0.000 0.192 0.796 0.012
#> SRR1560201 1 0.2644 0.7937 0.916 0.032 0.008 0.044
#> SRR1560202 3 0.5457 0.7086 0.000 0.184 0.728 0.088
#> SRR1560203 4 0.0895 0.8206 0.000 0.004 0.020 0.976
#> SRR1560204 4 0.1284 0.8279 0.000 0.024 0.012 0.964
#> SRR1560205 3 0.1940 0.7330 0.000 0.000 0.924 0.076
#> SRR1560206 2 0.1398 0.7550 0.000 0.956 0.004 0.040
#> SRR1560207 1 0.6202 0.4732 0.652 0.072 0.008 0.268
#> SRR1560208 2 0.5121 0.6901 0.120 0.764 0.116 0.000
#> SRR1560209 2 0.2831 0.7757 0.120 0.876 0.004 0.000
#> SRR1560210 3 0.0895 0.7434 0.000 0.004 0.976 0.020
#> SRR1560211 3 0.7437 0.2222 0.120 0.412 0.456 0.012
#> SRR1560212 3 0.7271 0.4512 0.192 0.276 0.532 0.000
#> SRR1560213 2 0.1398 0.7538 0.000 0.956 0.004 0.040
#> SRR1560214 4 0.1970 0.8290 0.000 0.060 0.008 0.932
#> SRR1560215 4 0.2466 0.8171 0.000 0.096 0.004 0.900
#> SRR1560216 4 0.1545 0.8296 0.000 0.040 0.008 0.952
#> SRR1560217 4 0.1824 0.8269 0.000 0.060 0.004 0.936
#> SRR1560218 3 0.3399 0.7504 0.000 0.092 0.868 0.040
#> SRR1560219 3 0.5057 0.6194 0.000 0.340 0.648 0.012
#> SRR1560220 3 0.4643 0.4205 0.000 0.000 0.656 0.344
#> SRR1560221 3 0.1302 0.7407 0.000 0.000 0.956 0.044
#> SRR1560222 1 0.6653 0.2931 0.556 0.072 0.008 0.364
#> SRR1560223 2 0.6823 0.2812 0.332 0.576 0.016 0.076
#> SRR1560224 2 0.7698 0.3252 0.236 0.440 0.000 0.324
#> SRR1560225 1 0.1302 0.8017 0.956 0.044 0.000 0.000
#> SRR1560226 4 0.4227 0.7273 0.120 0.000 0.060 0.820
#> SRR1560227 1 0.1576 0.8131 0.948 0.000 0.004 0.048
#> SRR1560228 1 0.0000 0.8305 1.000 0.000 0.000 0.000
#> SRR1560229 2 0.0524 0.7638 0.008 0.988 0.000 0.004
#> SRR1560230 1 0.0336 0.8308 0.992 0.000 0.000 0.008
#> SRR1560231 3 0.1297 0.7416 0.000 0.016 0.964 0.020
#> SRR1560232 1 0.5781 0.4241 0.576 0.008 0.396 0.020
#> SRR1560233 3 0.6041 0.5280 0.032 0.356 0.600 0.012
#> SRR1560234 2 0.5693 -0.2042 0.024 0.504 0.472 0.000
#> SRR1560235 2 0.1716 0.7764 0.064 0.936 0.000 0.000
#> SRR1560236 2 0.3649 0.7497 0.204 0.796 0.000 0.000
#> SRR1560237 2 0.2742 0.7701 0.076 0.900 0.024 0.000
#> SRR1560238 2 0.4961 0.4928 0.448 0.552 0.000 0.000
#> SRR1560239 2 0.4957 0.3435 0.000 0.684 0.300 0.016
#> SRR1560240 3 0.6698 0.4984 0.000 0.340 0.556 0.104
#> SRR1560241 2 0.3667 0.7035 0.000 0.856 0.088 0.056
#> SRR1560242 4 0.6215 0.6281 0.004 0.156 0.156 0.684
#> SRR1560243 2 0.3320 0.7260 0.000 0.876 0.068 0.056
#> SRR1560244 2 0.2174 0.7428 0.000 0.928 0.052 0.020
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 5 0.5490 0.37085 0.228 0.000 0.000 0.128 0.644
#> SRR1560165 5 0.5150 0.39738 0.272 0.000 0.000 0.076 0.652
#> SRR1560166 2 0.2773 0.62920 0.164 0.836 0.000 0.000 0.000
#> SRR1560167 1 0.3340 0.54289 0.824 0.000 0.004 0.016 0.156
#> SRR1560168 2 0.4610 0.16446 0.432 0.556 0.000 0.000 0.012
#> SRR1560169 1 0.1197 0.66393 0.952 0.000 0.000 0.000 0.048
#> SRR1560170 2 0.1557 0.68069 0.052 0.940 0.000 0.000 0.008
#> SRR1560171 2 0.5259 0.00371 0.476 0.484 0.004 0.000 0.036
#> SRR1560172 1 0.5856 -0.07469 0.460 0.460 0.008 0.000 0.072
#> SRR1560173 1 0.1341 0.66443 0.944 0.000 0.000 0.000 0.056
#> SRR1560174 2 0.5049 0.21535 0.408 0.560 0.004 0.000 0.028
#> SRR1560175 1 0.6764 0.46150 0.588 0.084 0.080 0.004 0.244
#> SRR1560176 1 0.0000 0.66734 1.000 0.000 0.000 0.000 0.000
#> SRR1560177 2 0.6510 0.11561 0.000 0.480 0.296 0.000 0.224
#> SRR1560178 3 0.0613 0.74915 0.000 0.004 0.984 0.004 0.008
#> SRR1560179 2 0.1732 0.64773 0.000 0.920 0.000 0.000 0.080
#> SRR1560180 5 0.6209 0.17535 0.076 0.000 0.404 0.024 0.496
#> SRR1560181 2 0.2648 0.59969 0.000 0.848 0.000 0.000 0.152
#> SRR1560182 2 0.2439 0.61751 0.000 0.876 0.000 0.004 0.120
#> SRR1560183 2 0.4538 0.24450 0.000 0.620 0.000 0.016 0.364
#> SRR1560184 3 0.2248 0.75125 0.000 0.000 0.900 0.088 0.012
#> SRR1560185 3 0.3039 0.72499 0.000 0.000 0.836 0.152 0.012
#> SRR1560186 5 0.6644 0.22604 0.000 0.008 0.176 0.356 0.460
#> SRR1560187 5 0.3655 0.43387 0.000 0.036 0.000 0.160 0.804
#> SRR1560188 1 0.5042 0.06547 0.508 0.460 0.000 0.000 0.032
#> SRR1560189 2 0.3443 0.62681 0.164 0.816 0.000 0.008 0.012
#> SRR1560190 1 0.4287 0.07194 0.540 0.460 0.000 0.000 0.000
#> SRR1560191 2 0.3395 0.55387 0.236 0.764 0.000 0.000 0.000
#> SRR1560192 1 0.0963 0.66702 0.964 0.000 0.000 0.000 0.036
#> SRR1560193 2 0.0566 0.67937 0.012 0.984 0.000 0.000 0.004
#> SRR1560194 3 0.4805 0.50117 0.000 0.312 0.648 0.000 0.040
#> SRR1560195 3 0.1851 0.75087 0.000 0.000 0.912 0.088 0.000
#> SRR1560196 3 0.1544 0.75372 0.000 0.000 0.932 0.068 0.000
#> SRR1560197 3 0.3558 0.72522 0.000 0.128 0.832 0.020 0.020
#> SRR1560198 4 0.4400 0.62455 0.000 0.000 0.052 0.736 0.212
#> SRR1560200 5 0.7173 0.30493 0.320 0.000 0.228 0.024 0.428
#> SRR1560199 3 0.3693 0.70420 0.000 0.156 0.808 0.004 0.032
#> SRR1560201 1 0.4964 -0.19044 0.516 0.000 0.004 0.020 0.460
#> SRR1560202 3 0.6955 0.49620 0.000 0.188 0.572 0.068 0.172
#> SRR1560203 4 0.1628 0.63736 0.000 0.000 0.008 0.936 0.056
#> SRR1560204 4 0.2230 0.64654 0.000 0.000 0.000 0.884 0.116
#> SRR1560205 3 0.2358 0.74650 0.000 0.000 0.888 0.104 0.008
#> SRR1560206 5 0.4553 0.22599 0.000 0.384 0.004 0.008 0.604
#> SRR1560207 5 0.7190 0.17842 0.332 0.056 0.000 0.140 0.472
#> SRR1560208 2 0.4429 0.64379 0.112 0.792 0.068 0.000 0.028
#> SRR1560209 2 0.2304 0.67604 0.068 0.908 0.004 0.000 0.020
#> SRR1560210 3 0.1774 0.74537 0.000 0.000 0.932 0.052 0.016
#> SRR1560211 2 0.7321 0.37387 0.128 0.512 0.268 0.000 0.092
#> SRR1560212 3 0.6575 0.36013 0.204 0.216 0.560 0.000 0.020
#> SRR1560213 2 0.3562 0.52046 0.000 0.788 0.000 0.016 0.196
#> SRR1560214 4 0.5524 0.42494 0.000 0.068 0.000 0.516 0.416
#> SRR1560215 5 0.6211 -0.27549 0.000 0.132 0.004 0.352 0.512
#> SRR1560216 4 0.3388 0.63448 0.000 0.008 0.000 0.792 0.200
#> SRR1560217 4 0.5215 0.50367 0.000 0.056 0.000 0.592 0.352
#> SRR1560218 3 0.5153 0.67053 0.000 0.092 0.740 0.036 0.132
#> SRR1560219 3 0.6556 0.17598 0.000 0.400 0.424 0.004 0.172
#> SRR1560220 3 0.2773 0.71455 0.000 0.000 0.836 0.164 0.000
#> SRR1560221 3 0.1300 0.75407 0.000 0.000 0.956 0.028 0.016
#> SRR1560222 5 0.5767 0.45861 0.272 0.016 0.004 0.076 0.632
#> SRR1560223 5 0.5781 0.49374 0.228 0.096 0.000 0.024 0.652
#> SRR1560224 4 0.6693 -0.20475 0.392 0.200 0.004 0.404 0.000
#> SRR1560225 1 0.2488 0.63019 0.872 0.124 0.000 0.004 0.000
#> SRR1560226 4 0.3710 0.53154 0.144 0.000 0.048 0.808 0.000
#> SRR1560227 1 0.3519 0.52331 0.776 0.000 0.008 0.216 0.000
#> SRR1560228 1 0.1410 0.65916 0.940 0.000 0.000 0.000 0.060
#> SRR1560229 2 0.1282 0.67179 0.000 0.952 0.004 0.000 0.044
#> SRR1560230 1 0.1653 0.65816 0.944 0.000 0.004 0.024 0.028
#> SRR1560231 3 0.3710 0.59470 0.000 0.000 0.784 0.024 0.192
#> SRR1560232 3 0.7232 -0.09059 0.300 0.000 0.420 0.024 0.256
#> SRR1560233 2 0.7266 0.22252 0.080 0.480 0.324 0.000 0.116
#> SRR1560234 2 0.5175 0.13005 0.000 0.548 0.408 0.000 0.044
#> SRR1560235 2 0.0609 0.67924 0.020 0.980 0.000 0.000 0.000
#> SRR1560236 2 0.4138 0.32853 0.384 0.616 0.000 0.000 0.000
#> SRR1560237 2 0.2732 0.67235 0.088 0.884 0.008 0.000 0.020
#> SRR1560238 1 0.4242 0.13727 0.572 0.428 0.000 0.000 0.000
#> SRR1560239 5 0.6653 0.08158 0.000 0.388 0.156 0.012 0.444
#> SRR1560240 5 0.0727 0.48567 0.000 0.004 0.004 0.012 0.980
#> SRR1560241 5 0.1697 0.48607 0.000 0.060 0.008 0.000 0.932
#> SRR1560242 5 0.4142 0.47387 0.004 0.024 0.036 0.128 0.808
#> SRR1560243 5 0.3807 0.47787 0.000 0.204 0.012 0.008 0.776
#> SRR1560244 5 0.4924 0.08386 0.000 0.420 0.028 0.000 0.552
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 6 0.6732 0.25741 0.116 0.012 0.000 0.068 0.332 0.472
#> SRR1560165 6 0.6956 0.25430 0.156 0.016 0.000 0.060 0.312 0.456
#> SRR1560166 2 0.2838 0.56893 0.188 0.808 0.000 0.000 0.004 0.000
#> SRR1560167 1 0.5663 0.32125 0.592 0.000 0.004 0.016 0.256 0.132
#> SRR1560168 2 0.5110 0.25799 0.396 0.528 0.000 0.000 0.072 0.004
#> SRR1560169 1 0.2046 0.67451 0.908 0.000 0.000 0.000 0.032 0.060
#> SRR1560170 2 0.2042 0.62096 0.048 0.920 0.008 0.000 0.008 0.016
#> SRR1560171 2 0.6224 0.14007 0.376 0.456 0.016 0.004 0.004 0.144
#> SRR1560172 2 0.6834 0.15211 0.276 0.416 0.024 0.004 0.008 0.272
#> SRR1560173 1 0.3802 0.47197 0.676 0.000 0.000 0.000 0.012 0.312
#> SRR1560174 2 0.5636 0.36310 0.292 0.576 0.008 0.004 0.004 0.116
#> SRR1560175 6 0.5071 0.37386 0.124 0.032 0.092 0.012 0.008 0.732
#> SRR1560176 1 0.0582 0.68402 0.984 0.004 0.000 0.004 0.004 0.004
#> SRR1560177 2 0.5571 0.05558 0.000 0.476 0.108 0.000 0.408 0.008
#> SRR1560178 3 0.0993 0.76252 0.000 0.000 0.964 0.012 0.000 0.024
#> SRR1560179 2 0.2030 0.60981 0.000 0.908 0.000 0.000 0.064 0.028
#> SRR1560180 5 0.6328 0.38184 0.040 0.000 0.220 0.016 0.572 0.152
#> SRR1560181 2 0.3555 0.42967 0.000 0.712 0.000 0.000 0.280 0.008
#> SRR1560182 2 0.2412 0.60240 0.000 0.880 0.000 0.000 0.092 0.028
#> SRR1560183 2 0.4762 -0.04917 0.000 0.488 0.000 0.008 0.472 0.032
#> SRR1560184 3 0.1615 0.75824 0.000 0.000 0.928 0.064 0.004 0.004
#> SRR1560185 3 0.2196 0.73828 0.000 0.000 0.884 0.108 0.004 0.004
#> SRR1560186 5 0.4307 0.62712 0.004 0.024 0.040 0.136 0.780 0.016
#> SRR1560187 5 0.4478 0.55204 0.000 0.044 0.000 0.056 0.748 0.152
#> SRR1560188 2 0.5798 0.07503 0.420 0.464 0.000 0.000 0.084 0.032
#> SRR1560189 2 0.3108 0.59556 0.128 0.828 0.000 0.000 0.044 0.000
#> SRR1560190 1 0.3899 0.15060 0.592 0.404 0.000 0.000 0.004 0.000
#> SRR1560191 2 0.3710 0.47546 0.292 0.696 0.000 0.000 0.012 0.000
#> SRR1560192 1 0.2239 0.67874 0.912 0.004 0.016 0.004 0.012 0.052
#> SRR1560193 2 0.2151 0.61498 0.072 0.904 0.000 0.000 0.008 0.016
#> SRR1560194 3 0.5189 0.51548 0.000 0.232 0.636 0.004 0.004 0.124
#> SRR1560195 3 0.1082 0.76285 0.000 0.000 0.956 0.040 0.000 0.004
#> SRR1560196 3 0.0865 0.76362 0.000 0.000 0.964 0.036 0.000 0.000
#> SRR1560197 3 0.2990 0.72402 0.000 0.104 0.852 0.004 0.004 0.036
#> SRR1560198 4 0.4120 0.59577 0.000 0.000 0.068 0.728 0.000 0.204
#> SRR1560200 5 0.4623 0.56469 0.128 0.000 0.052 0.008 0.756 0.056
#> SRR1560199 3 0.3641 0.70340 0.000 0.120 0.812 0.004 0.012 0.052
#> SRR1560201 5 0.6805 -0.04591 0.320 0.012 0.004 0.012 0.364 0.288
#> SRR1560202 3 0.6590 -0.06765 0.000 0.208 0.392 0.016 0.372 0.012
#> SRR1560203 4 0.1528 0.70239 0.000 0.000 0.012 0.944 0.016 0.028
#> SRR1560204 4 0.2250 0.69450 0.000 0.000 0.000 0.896 0.040 0.064
#> SRR1560205 3 0.1327 0.75911 0.000 0.000 0.936 0.064 0.000 0.000
#> SRR1560206 6 0.4797 0.36422 0.000 0.196 0.012 0.012 0.072 0.708
#> SRR1560207 6 0.3430 0.49355 0.076 0.000 0.000 0.028 0.060 0.836
#> SRR1560208 2 0.4208 0.60358 0.056 0.796 0.072 0.000 0.068 0.008
#> SRR1560209 2 0.4342 0.57700 0.112 0.764 0.012 0.000 0.008 0.104
#> SRR1560210 3 0.4446 0.61630 0.000 0.004 0.740 0.148 0.100 0.008
#> SRR1560211 2 0.6695 0.44216 0.068 0.540 0.196 0.000 0.184 0.012
#> SRR1560212 3 0.7697 0.35689 0.128 0.156 0.488 0.008 0.040 0.180
#> SRR1560213 2 0.5519 0.43746 0.000 0.624 0.016 0.004 0.216 0.140
#> SRR1560214 6 0.3968 0.39776 0.000 0.016 0.008 0.196 0.020 0.760
#> SRR1560215 6 0.3752 0.46395 0.000 0.048 0.008 0.096 0.028 0.820
#> SRR1560216 4 0.4161 0.39723 0.000 0.000 0.004 0.632 0.016 0.348
#> SRR1560217 6 0.4844 0.16857 0.000 0.012 0.004 0.328 0.040 0.616
#> SRR1560218 5 0.5697 0.02996 0.000 0.112 0.420 0.012 0.456 0.000
#> SRR1560219 2 0.5731 -0.02901 0.000 0.436 0.128 0.000 0.428 0.008
#> SRR1560220 3 0.1866 0.74562 0.000 0.000 0.908 0.084 0.000 0.008
#> SRR1560221 3 0.1409 0.76339 0.000 0.000 0.948 0.012 0.008 0.032
#> SRR1560222 5 0.2951 0.65334 0.024 0.020 0.000 0.040 0.880 0.036
#> SRR1560223 5 0.2351 0.66509 0.016 0.040 0.000 0.008 0.908 0.028
#> SRR1560224 1 0.5981 0.25544 0.492 0.128 0.008 0.360 0.012 0.000
#> SRR1560225 1 0.2053 0.64498 0.888 0.108 0.000 0.004 0.000 0.000
#> SRR1560226 4 0.3668 0.52495 0.228 0.000 0.028 0.744 0.000 0.000
#> SRR1560227 1 0.3011 0.58509 0.800 0.004 0.004 0.192 0.000 0.000
#> SRR1560228 1 0.3317 0.61676 0.808 0.000 0.000 0.004 0.032 0.156
#> SRR1560229 2 0.3124 0.58796 0.000 0.816 0.012 0.004 0.004 0.164
#> SRR1560230 1 0.3786 0.63684 0.820 0.004 0.000 0.048 0.080 0.048
#> SRR1560231 3 0.4556 0.20918 0.008 0.000 0.572 0.008 0.400 0.012
#> SRR1560232 5 0.7692 0.10580 0.212 0.000 0.300 0.016 0.352 0.120
#> SRR1560233 2 0.6344 0.43409 0.048 0.552 0.208 0.004 0.188 0.000
#> SRR1560234 2 0.6034 0.00851 0.008 0.440 0.408 0.004 0.004 0.136
#> SRR1560235 2 0.1577 0.61929 0.036 0.940 0.000 0.000 0.008 0.016
#> SRR1560236 2 0.4101 0.28859 0.408 0.580 0.000 0.000 0.012 0.000
#> SRR1560237 2 0.3527 0.60674 0.076 0.832 0.020 0.000 0.004 0.068
#> SRR1560238 1 0.3847 0.25078 0.644 0.348 0.000 0.000 0.008 0.000
#> SRR1560239 5 0.3476 0.61545 0.000 0.128 0.036 0.008 0.820 0.008
#> SRR1560240 5 0.1700 0.65931 0.000 0.000 0.000 0.004 0.916 0.080
#> SRR1560241 5 0.2454 0.65386 0.000 0.016 0.004 0.000 0.876 0.104
#> SRR1560242 5 0.0982 0.67231 0.004 0.004 0.000 0.004 0.968 0.020
#> SRR1560243 5 0.0993 0.67280 0.000 0.024 0.000 0.000 0.964 0.012
#> SRR1560244 5 0.4901 0.35204 0.000 0.304 0.012 0.000 0.624 0.060
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 15546 rows and 81 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 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.721 0.872 0.939 0.4088 0.568 0.568
#> 3 3 0.434 0.587 0.808 0.4593 0.858 0.750
#> 4 4 0.435 0.566 0.764 0.0968 0.905 0.781
#> 5 5 0.508 0.641 0.761 0.1322 0.845 0.591
#> 6 6 0.582 0.598 0.751 0.0775 0.931 0.732
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
#> SRR1560164 1 0.0000 0.854 1.000 0.000
#> SRR1560165 1 0.0000 0.854 1.000 0.000
#> SRR1560166 2 0.0000 0.966 0.000 1.000
#> SRR1560167 1 0.0000 0.854 1.000 0.000
#> SRR1560168 2 0.0000 0.966 0.000 1.000
#> SRR1560169 1 0.0000 0.854 1.000 0.000
#> SRR1560170 2 0.0000 0.966 0.000 1.000
#> SRR1560171 2 0.0000 0.966 0.000 1.000
#> SRR1560172 2 0.0376 0.964 0.004 0.996
#> SRR1560173 1 0.0000 0.854 1.000 0.000
#> SRR1560174 2 0.0000 0.966 0.000 1.000
#> SRR1560175 2 0.0376 0.964 0.004 0.996
#> SRR1560176 1 0.0672 0.856 0.992 0.008
#> SRR1560177 2 0.0000 0.966 0.000 1.000
#> SRR1560178 2 0.0000 0.966 0.000 1.000
#> SRR1560179 2 0.0000 0.966 0.000 1.000
#> SRR1560180 1 0.6712 0.791 0.824 0.176
#> SRR1560181 2 0.0000 0.966 0.000 1.000
#> SRR1560182 2 0.0000 0.966 0.000 1.000
#> SRR1560183 2 0.0000 0.966 0.000 1.000
#> SRR1560184 2 0.0376 0.964 0.004 0.996
#> SRR1560185 2 0.0376 0.964 0.004 0.996
#> SRR1560186 1 0.7602 0.753 0.780 0.220
#> SRR1560187 2 0.8661 0.581 0.288 0.712
#> SRR1560188 2 0.0938 0.960 0.012 0.988
#> SRR1560189 2 0.0938 0.960 0.012 0.988
#> SRR1560190 2 0.0000 0.966 0.000 1.000
#> SRR1560191 2 0.0000 0.966 0.000 1.000
#> SRR1560192 1 0.0000 0.854 1.000 0.000
#> SRR1560193 2 0.0000 0.966 0.000 1.000
#> SRR1560194 2 0.0000 0.966 0.000 1.000
#> SRR1560195 2 0.0376 0.964 0.004 0.996
#> SRR1560196 2 0.0376 0.964 0.004 0.996
#> SRR1560197 2 0.0000 0.966 0.000 1.000
#> SRR1560198 1 0.7602 0.753 0.780 0.220
#> SRR1560200 2 0.7219 0.734 0.200 0.800
#> SRR1560199 2 0.0000 0.966 0.000 1.000
#> SRR1560201 1 0.9993 0.187 0.516 0.484
#> SRR1560202 2 0.1184 0.956 0.016 0.984
#> SRR1560203 1 0.4298 0.843 0.912 0.088
#> SRR1560204 1 0.4298 0.843 0.912 0.088
#> SRR1560205 2 0.0376 0.964 0.004 0.996
#> SRR1560206 2 0.0000 0.966 0.000 1.000
#> SRR1560207 1 0.0000 0.854 1.000 0.000
#> SRR1560208 2 0.0000 0.966 0.000 1.000
#> SRR1560209 2 0.0376 0.964 0.004 0.996
#> SRR1560210 2 0.5842 0.828 0.140 0.860
#> SRR1560211 2 0.0000 0.966 0.000 1.000
#> SRR1560212 2 0.0376 0.964 0.004 0.996
#> SRR1560213 2 0.0000 0.966 0.000 1.000
#> SRR1560214 2 0.7453 0.724 0.212 0.788
#> SRR1560215 2 0.7453 0.724 0.212 0.788
#> SRR1560216 1 0.4298 0.843 0.912 0.088
#> SRR1560217 1 0.4298 0.843 0.912 0.088
#> SRR1560218 2 0.0000 0.966 0.000 1.000
#> SRR1560219 2 0.0000 0.966 0.000 1.000
#> SRR1560220 2 0.0000 0.966 0.000 1.000
#> SRR1560221 2 0.0000 0.966 0.000 1.000
#> SRR1560222 1 0.9993 0.187 0.516 0.484
#> SRR1560223 1 0.9993 0.187 0.516 0.484
#> SRR1560224 1 0.6973 0.781 0.812 0.188
#> SRR1560225 1 0.9993 0.186 0.516 0.484
#> SRR1560226 1 0.0672 0.856 0.992 0.008
#> SRR1560227 1 0.0672 0.856 0.992 0.008
#> SRR1560228 1 0.0000 0.854 1.000 0.000
#> SRR1560229 2 0.0000 0.966 0.000 1.000
#> SRR1560230 1 0.0672 0.856 0.992 0.008
#> SRR1560231 2 0.5842 0.828 0.140 0.860
#> SRR1560232 1 0.6712 0.791 0.824 0.176
#> SRR1560233 2 0.0000 0.966 0.000 1.000
#> SRR1560234 2 0.0000 0.966 0.000 1.000
#> SRR1560235 2 0.1184 0.957 0.016 0.984
#> SRR1560236 2 0.1184 0.957 0.016 0.984
#> SRR1560237 2 0.0000 0.966 0.000 1.000
#> SRR1560238 2 0.3114 0.923 0.056 0.944
#> SRR1560239 2 0.0000 0.966 0.000 1.000
#> SRR1560240 2 0.3733 0.908 0.072 0.928
#> SRR1560241 2 0.3733 0.908 0.072 0.928
#> SRR1560242 2 0.3733 0.908 0.072 0.928
#> SRR1560243 2 0.3733 0.908 0.072 0.928
#> SRR1560244 2 0.0000 0.966 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0747 0.8239 0.984 0.000 0.016
#> SRR1560165 1 0.0747 0.8239 0.984 0.000 0.016
#> SRR1560166 2 0.1643 0.7086 0.000 0.956 0.044
#> SRR1560167 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560168 2 0.1643 0.7086 0.000 0.956 0.044
#> SRR1560169 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560170 2 0.1643 0.7086 0.000 0.956 0.044
#> SRR1560171 2 0.0892 0.7255 0.000 0.980 0.020
#> SRR1560172 2 0.3784 0.6991 0.004 0.864 0.132
#> SRR1560173 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560174 2 0.0892 0.7255 0.000 0.980 0.020
#> SRR1560175 2 0.3784 0.6991 0.004 0.864 0.132
#> SRR1560176 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560177 2 0.2261 0.7145 0.000 0.932 0.068
#> SRR1560178 2 0.5810 0.4433 0.000 0.664 0.336
#> SRR1560179 2 0.1860 0.7229 0.000 0.948 0.052
#> SRR1560180 1 0.5343 0.7305 0.816 0.052 0.132
#> SRR1560181 2 0.2796 0.7198 0.000 0.908 0.092
#> SRR1560182 2 0.2796 0.7198 0.000 0.908 0.092
#> SRR1560183 2 0.2796 0.7198 0.000 0.908 0.092
#> SRR1560184 3 0.2959 0.7424 0.000 0.100 0.900
#> SRR1560185 3 0.2959 0.7424 0.000 0.100 0.900
#> SRR1560186 1 0.6222 0.6963 0.776 0.132 0.092
#> SRR1560187 2 0.9944 -0.1908 0.284 0.372 0.344
#> SRR1560188 2 0.6126 0.3581 0.004 0.644 0.352
#> SRR1560189 2 0.6126 0.3581 0.004 0.644 0.352
#> SRR1560190 2 0.1753 0.7038 0.000 0.952 0.048
#> SRR1560191 2 0.1753 0.7038 0.000 0.952 0.048
#> SRR1560192 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560193 2 0.1031 0.7254 0.000 0.976 0.024
#> SRR1560194 2 0.3816 0.6966 0.000 0.852 0.148
#> SRR1560195 3 0.2959 0.7424 0.000 0.100 0.900
#> SRR1560196 3 0.2959 0.7424 0.000 0.100 0.900
#> SRR1560197 2 0.3816 0.6966 0.000 0.852 0.148
#> SRR1560198 1 0.6222 0.6963 0.776 0.132 0.092
#> SRR1560200 2 0.9601 -0.2276 0.200 0.408 0.392
#> SRR1560199 2 0.3816 0.6966 0.000 0.852 0.148
#> SRR1560201 1 0.9015 0.1698 0.508 0.348 0.144
#> SRR1560202 2 0.6275 0.3045 0.008 0.644 0.348
#> SRR1560203 1 0.3183 0.8070 0.908 0.016 0.076
#> SRR1560204 1 0.3183 0.8070 0.908 0.016 0.076
#> SRR1560205 3 0.2959 0.7424 0.000 0.100 0.900
#> SRR1560206 2 0.2448 0.7213 0.000 0.924 0.076
#> SRR1560207 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560208 2 0.2537 0.7098 0.000 0.920 0.080
#> SRR1560209 2 0.4465 0.6680 0.004 0.820 0.176
#> SRR1560210 3 0.8771 0.4685 0.140 0.304 0.556
#> SRR1560211 2 0.2537 0.7098 0.000 0.920 0.080
#> SRR1560212 2 0.4465 0.6680 0.004 0.820 0.176
#> SRR1560213 3 0.6126 0.4719 0.000 0.400 0.600
#> SRR1560214 2 0.9642 -0.1203 0.208 0.416 0.376
#> SRR1560215 2 0.9642 -0.1203 0.208 0.416 0.376
#> SRR1560216 1 0.3183 0.8070 0.908 0.016 0.076
#> SRR1560217 1 0.3183 0.8070 0.908 0.016 0.076
#> SRR1560218 3 0.6111 0.4822 0.000 0.396 0.604
#> SRR1560219 3 0.6111 0.4822 0.000 0.396 0.604
#> SRR1560220 2 0.6295 0.0418 0.000 0.528 0.472
#> SRR1560221 2 0.6295 0.0418 0.000 0.528 0.472
#> SRR1560222 1 0.9015 0.1698 0.508 0.348 0.144
#> SRR1560223 1 0.9015 0.1698 0.508 0.348 0.144
#> SRR1560224 1 0.5811 0.7210 0.800 0.108 0.092
#> SRR1560225 1 0.7661 0.1233 0.504 0.452 0.044
#> SRR1560226 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560227 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560228 1 0.0747 0.8239 0.984 0.000 0.016
#> SRR1560229 2 0.5058 0.5382 0.000 0.756 0.244
#> SRR1560230 1 0.0892 0.8235 0.980 0.000 0.020
#> SRR1560231 3 0.8771 0.4685 0.140 0.304 0.556
#> SRR1560232 1 0.5343 0.7305 0.816 0.052 0.132
#> SRR1560233 2 0.2261 0.7177 0.000 0.932 0.068
#> SRR1560234 2 0.2261 0.7177 0.000 0.932 0.068
#> SRR1560235 2 0.3207 0.6819 0.012 0.904 0.084
#> SRR1560236 2 0.3207 0.6819 0.012 0.904 0.084
#> SRR1560237 2 0.2261 0.7177 0.000 0.932 0.068
#> SRR1560238 2 0.4269 0.6666 0.052 0.872 0.076
#> SRR1560239 2 0.2356 0.7103 0.000 0.928 0.072
#> SRR1560240 2 0.7968 0.1831 0.068 0.560 0.372
#> SRR1560241 2 0.7968 0.1831 0.068 0.560 0.372
#> SRR1560242 2 0.7828 0.2243 0.068 0.592 0.340
#> SRR1560243 2 0.7828 0.2243 0.068 0.592 0.340
#> SRR1560244 2 0.2448 0.7213 0.000 0.924 0.076
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.1474 0.9006 0.948 0.000 0.000 0.052
#> SRR1560165 1 0.1474 0.9006 0.948 0.000 0.000 0.052
#> SRR1560166 2 0.2216 0.7136 0.000 0.908 0.000 0.092
#> SRR1560167 1 0.0000 0.9240 1.000 0.000 0.000 0.000
#> SRR1560168 2 0.2216 0.7136 0.000 0.908 0.000 0.092
#> SRR1560169 1 0.0000 0.9240 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.2216 0.7136 0.000 0.908 0.000 0.092
#> SRR1560171 2 0.0188 0.7329 0.000 0.996 0.000 0.004
#> SRR1560172 2 0.3105 0.7004 0.000 0.868 0.120 0.012
#> SRR1560173 1 0.0000 0.9240 1.000 0.000 0.000 0.000
#> SRR1560174 2 0.0188 0.7329 0.000 0.996 0.000 0.004
#> SRR1560175 2 0.3105 0.7004 0.000 0.868 0.120 0.012
#> SRR1560176 4 0.3444 0.6023 0.184 0.000 0.000 0.816
#> SRR1560177 2 0.2965 0.7224 0.000 0.892 0.036 0.072
#> SRR1560178 2 0.4888 0.3179 0.000 0.588 0.412 0.000
#> SRR1560179 2 0.1520 0.7294 0.000 0.956 0.024 0.020
#> SRR1560180 1 0.3870 0.7747 0.820 0.008 0.164 0.008
#> SRR1560181 2 0.2413 0.7267 0.000 0.916 0.064 0.020
#> SRR1560182 2 0.2413 0.7267 0.000 0.916 0.064 0.020
#> SRR1560183 2 0.2413 0.7267 0.000 0.916 0.064 0.020
#> SRR1560184 3 0.0000 0.5835 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.5835 0.000 0.000 1.000 0.000
#> SRR1560186 4 0.6231 0.5992 0.116 0.132 0.032 0.720
#> SRR1560187 2 0.9518 -0.2444 0.228 0.356 0.296 0.120
#> SRR1560188 2 0.7058 0.2387 0.000 0.560 0.272 0.168
#> SRR1560189 2 0.7058 0.2387 0.000 0.560 0.272 0.168
#> SRR1560190 2 0.2469 0.7085 0.000 0.892 0.000 0.108
#> SRR1560191 2 0.2469 0.7085 0.000 0.892 0.000 0.108
#> SRR1560192 1 0.0000 0.9240 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.1022 0.7322 0.000 0.968 0.000 0.032
#> SRR1560194 2 0.3547 0.6915 0.000 0.840 0.144 0.016
#> SRR1560195 3 0.0000 0.5835 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.5835 0.000 0.000 1.000 0.000
#> SRR1560197 2 0.3547 0.6915 0.000 0.840 0.144 0.016
#> SRR1560198 4 0.6231 0.5992 0.116 0.132 0.032 0.720
#> SRR1560200 3 0.8936 0.3205 0.132 0.340 0.420 0.108
#> SRR1560199 2 0.3547 0.6915 0.000 0.840 0.144 0.016
#> SRR1560201 4 0.9210 0.2433 0.184 0.312 0.104 0.400
#> SRR1560202 2 0.6468 0.2205 0.008 0.604 0.316 0.072
#> SRR1560203 4 0.5186 0.6161 0.240 0.012 0.024 0.724
#> SRR1560204 4 0.5186 0.6161 0.240 0.012 0.024 0.724
#> SRR1560205 3 0.0000 0.5835 0.000 0.000 1.000 0.000
#> SRR1560206 2 0.2089 0.7281 0.000 0.932 0.048 0.020
#> SRR1560207 1 0.0000 0.9240 1.000 0.000 0.000 0.000
#> SRR1560208 2 0.3216 0.7176 0.000 0.880 0.044 0.076
#> SRR1560209 2 0.3718 0.6708 0.000 0.820 0.168 0.012
#> SRR1560210 3 0.7677 0.5269 0.132 0.232 0.588 0.048
#> SRR1560211 2 0.3216 0.7176 0.000 0.880 0.044 0.076
#> SRR1560212 2 0.3718 0.6708 0.000 0.820 0.168 0.012
#> SRR1560213 3 0.6500 0.4483 0.000 0.328 0.580 0.092
#> SRR1560214 2 0.9009 -0.1972 0.188 0.400 0.332 0.080
#> SRR1560215 2 0.9009 -0.1972 0.188 0.400 0.332 0.080
#> SRR1560216 4 0.5217 0.6135 0.244 0.012 0.024 0.720
#> SRR1560217 4 0.5217 0.6135 0.244 0.012 0.024 0.720
#> SRR1560218 3 0.6483 0.4558 0.000 0.324 0.584 0.092
#> SRR1560219 3 0.6483 0.4558 0.000 0.324 0.584 0.092
#> SRR1560220 3 0.5663 0.2162 0.000 0.440 0.536 0.024
#> SRR1560221 3 0.5663 0.2162 0.000 0.440 0.536 0.024
#> SRR1560222 4 0.9210 0.2433 0.184 0.312 0.104 0.400
#> SRR1560223 4 0.9210 0.2433 0.184 0.312 0.104 0.400
#> SRR1560224 4 0.1151 0.5673 0.008 0.024 0.000 0.968
#> SRR1560225 4 0.7119 0.1905 0.128 0.428 0.000 0.444
#> SRR1560226 4 0.3444 0.6023 0.184 0.000 0.000 0.816
#> SRR1560227 4 0.3444 0.6023 0.184 0.000 0.000 0.816
#> SRR1560228 1 0.1474 0.9006 0.948 0.000 0.000 0.052
#> SRR1560229 2 0.4472 0.5291 0.000 0.760 0.220 0.020
#> SRR1560230 4 0.3444 0.6023 0.184 0.000 0.000 0.816
#> SRR1560231 3 0.7677 0.5269 0.132 0.232 0.588 0.048
#> SRR1560232 1 0.3870 0.7747 0.820 0.008 0.164 0.008
#> SRR1560233 2 0.2101 0.7294 0.000 0.928 0.060 0.012
#> SRR1560234 2 0.2021 0.7285 0.000 0.932 0.056 0.012
#> SRR1560235 2 0.3356 0.6776 0.000 0.824 0.000 0.176
#> SRR1560236 2 0.3356 0.6776 0.000 0.824 0.000 0.176
#> SRR1560237 2 0.2021 0.7285 0.000 0.932 0.056 0.012
#> SRR1560238 2 0.3831 0.6533 0.004 0.792 0.000 0.204
#> SRR1560239 2 0.3037 0.7184 0.000 0.888 0.036 0.076
#> SRR1560240 2 0.7849 0.0786 0.060 0.532 0.316 0.092
#> SRR1560241 2 0.7849 0.0786 0.060 0.532 0.316 0.092
#> SRR1560242 2 0.7879 0.1199 0.060 0.548 0.288 0.104
#> SRR1560243 2 0.7879 0.1199 0.060 0.548 0.288 0.104
#> SRR1560244 2 0.2089 0.7281 0.000 0.932 0.048 0.020
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.3085 0.8633 0.852 0.000 0.000 0.116 0.032
#> SRR1560165 1 0.3085 0.8633 0.852 0.000 0.000 0.116 0.032
#> SRR1560166 2 0.3848 0.7262 0.000 0.788 0.040 0.000 0.172
#> SRR1560167 1 0.0162 0.8703 0.996 0.000 0.000 0.004 0.000
#> SRR1560168 2 0.3848 0.7262 0.000 0.788 0.040 0.000 0.172
#> SRR1560169 1 0.0162 0.8703 0.996 0.000 0.000 0.004 0.000
#> SRR1560170 2 0.3848 0.7262 0.000 0.788 0.040 0.000 0.172
#> SRR1560171 2 0.2983 0.7611 0.000 0.864 0.040 0.000 0.096
#> SRR1560172 2 0.4166 0.6838 0.004 0.780 0.032 0.008 0.176
#> SRR1560173 1 0.2344 0.8808 0.904 0.000 0.000 0.064 0.032
#> SRR1560174 2 0.2983 0.7611 0.000 0.864 0.040 0.000 0.096
#> SRR1560175 2 0.4166 0.6838 0.004 0.780 0.032 0.008 0.176
#> SRR1560176 4 0.1410 0.7523 0.060 0.000 0.000 0.940 0.000
#> SRR1560177 2 0.2006 0.7797 0.000 0.916 0.012 0.000 0.072
#> SRR1560178 2 0.5803 0.3120 0.000 0.532 0.368 0.000 0.100
#> SRR1560179 2 0.0963 0.7826 0.000 0.964 0.000 0.000 0.036
#> SRR1560180 1 0.5412 0.7247 0.732 0.000 0.108 0.068 0.092
#> SRR1560181 2 0.2077 0.7729 0.000 0.908 0.008 0.000 0.084
#> SRR1560182 2 0.2077 0.7729 0.000 0.908 0.008 0.000 0.084
#> SRR1560183 2 0.2077 0.7729 0.000 0.908 0.008 0.000 0.084
#> SRR1560184 3 0.1410 0.7102 0.000 0.000 0.940 0.000 0.060
#> SRR1560185 3 0.1410 0.7102 0.000 0.000 0.940 0.000 0.060
#> SRR1560186 4 0.5354 0.6594 0.000 0.128 0.004 0.680 0.188
#> SRR1560187 5 0.4122 0.5919 0.004 0.040 0.004 0.168 0.784
#> SRR1560188 5 0.3989 0.5167 0.000 0.260 0.004 0.008 0.728
#> SRR1560189 5 0.3989 0.5167 0.000 0.260 0.004 0.008 0.728
#> SRR1560190 2 0.3994 0.7176 0.000 0.772 0.040 0.000 0.188
#> SRR1560191 2 0.3994 0.7176 0.000 0.772 0.040 0.000 0.188
#> SRR1560192 1 0.0162 0.8703 0.996 0.000 0.000 0.004 0.000
#> SRR1560193 2 0.3242 0.7554 0.000 0.844 0.040 0.000 0.116
#> SRR1560194 2 0.3967 0.7152 0.000 0.800 0.092 0.000 0.108
#> SRR1560195 3 0.1410 0.7102 0.000 0.000 0.940 0.000 0.060
#> SRR1560196 3 0.1410 0.7102 0.000 0.000 0.940 0.000 0.060
#> SRR1560197 2 0.3967 0.7152 0.000 0.800 0.092 0.000 0.108
#> SRR1560198 4 0.5354 0.6594 0.000 0.128 0.004 0.680 0.188
#> SRR1560200 5 0.5895 0.5249 0.016 0.024 0.140 0.128 0.692
#> SRR1560199 2 0.3967 0.7152 0.000 0.800 0.092 0.000 0.108
#> SRR1560201 5 0.6194 0.1632 0.032 0.064 0.000 0.396 0.508
#> SRR1560202 5 0.4622 0.5451 0.000 0.276 0.040 0.000 0.684
#> SRR1560203 4 0.3333 0.7615 0.004 0.000 0.000 0.788 0.208
#> SRR1560204 4 0.3333 0.7615 0.004 0.000 0.000 0.788 0.208
#> SRR1560205 3 0.1410 0.7102 0.000 0.000 0.940 0.000 0.060
#> SRR1560206 2 0.1571 0.7792 0.000 0.936 0.004 0.000 0.060
#> SRR1560207 1 0.2344 0.8808 0.904 0.000 0.000 0.064 0.032
#> SRR1560208 2 0.2448 0.7740 0.000 0.892 0.020 0.000 0.088
#> SRR1560209 2 0.4823 0.6584 0.004 0.744 0.076 0.008 0.168
#> SRR1560210 5 0.6210 0.3124 0.016 0.020 0.304 0.068 0.592
#> SRR1560211 2 0.2448 0.7740 0.000 0.892 0.020 0.000 0.088
#> SRR1560212 2 0.4823 0.6584 0.004 0.744 0.076 0.008 0.168
#> SRR1560213 3 0.6686 0.2974 0.000 0.256 0.428 0.000 0.316
#> SRR1560214 5 0.4369 0.6128 0.004 0.076 0.008 0.124 0.788
#> SRR1560215 5 0.4369 0.6128 0.004 0.076 0.008 0.124 0.788
#> SRR1560216 4 0.3366 0.7607 0.004 0.000 0.000 0.784 0.212
#> SRR1560217 4 0.3366 0.7607 0.004 0.000 0.000 0.784 0.212
#> SRR1560218 3 0.6673 0.3029 0.000 0.252 0.432 0.000 0.316
#> SRR1560219 3 0.6673 0.3029 0.000 0.252 0.432 0.000 0.316
#> SRR1560220 5 0.5589 0.4927 0.000 0.128 0.220 0.004 0.648
#> SRR1560221 5 0.5589 0.4927 0.000 0.128 0.220 0.004 0.648
#> SRR1560222 5 0.6194 0.1632 0.032 0.064 0.000 0.396 0.508
#> SRR1560223 5 0.6194 0.1632 0.032 0.064 0.000 0.396 0.508
#> SRR1560224 4 0.3359 0.6825 0.000 0.020 0.000 0.816 0.164
#> SRR1560225 4 0.7929 -0.0237 0.044 0.156 0.040 0.456 0.304
#> SRR1560226 4 0.1410 0.7523 0.060 0.000 0.000 0.940 0.000
#> SRR1560227 4 0.1410 0.7523 0.060 0.000 0.000 0.940 0.000
#> SRR1560228 1 0.3085 0.8633 0.852 0.000 0.000 0.116 0.032
#> SRR1560229 2 0.4437 0.0285 0.000 0.532 0.004 0.000 0.464
#> SRR1560230 4 0.1410 0.7523 0.060 0.000 0.000 0.940 0.000
#> SRR1560231 5 0.6210 0.3124 0.016 0.020 0.304 0.068 0.592
#> SRR1560232 1 0.5412 0.7247 0.732 0.000 0.108 0.068 0.092
#> SRR1560233 2 0.1653 0.7841 0.000 0.944 0.028 0.004 0.024
#> SRR1560234 2 0.1560 0.7834 0.000 0.948 0.028 0.004 0.020
#> SRR1560235 2 0.5242 0.3569 0.000 0.556 0.040 0.004 0.400
#> SRR1560236 2 0.5242 0.3569 0.000 0.556 0.040 0.004 0.400
#> SRR1560237 2 0.1560 0.7834 0.000 0.948 0.028 0.004 0.020
#> SRR1560238 2 0.5558 0.6286 0.000 0.668 0.040 0.052 0.240
#> SRR1560239 2 0.2305 0.7758 0.000 0.896 0.012 0.000 0.092
#> SRR1560240 5 0.3455 0.6246 0.000 0.208 0.008 0.000 0.784
#> SRR1560241 5 0.3455 0.6246 0.000 0.208 0.008 0.000 0.784
#> SRR1560242 5 0.3366 0.6238 0.000 0.212 0.004 0.000 0.784
#> SRR1560243 5 0.3366 0.6238 0.000 0.212 0.004 0.000 0.784
#> SRR1560244 2 0.1638 0.7791 0.000 0.932 0.004 0.000 0.064
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.2786 0.871 0.860 0.000 0.000 0.084 0.056 0.000
#> SRR1560165 1 0.2786 0.871 0.860 0.000 0.000 0.084 0.056 0.000
#> SRR1560166 2 0.2980 0.648 0.000 0.800 0.000 0.000 0.008 0.192
#> SRR1560167 1 0.0363 0.869 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1560168 2 0.2980 0.648 0.000 0.800 0.000 0.000 0.008 0.192
#> SRR1560169 1 0.0363 0.869 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1560170 2 0.2980 0.648 0.000 0.800 0.000 0.000 0.008 0.192
#> SRR1560171 2 0.3404 0.628 0.000 0.760 0.000 0.000 0.016 0.224
#> SRR1560172 6 0.4319 0.776 0.000 0.400 0.000 0.000 0.024 0.576
#> SRR1560173 1 0.1984 0.886 0.912 0.000 0.000 0.032 0.056 0.000
#> SRR1560174 2 0.3404 0.628 0.000 0.760 0.000 0.000 0.016 0.224
#> SRR1560175 6 0.4319 0.776 0.000 0.400 0.000 0.000 0.024 0.576
#> SRR1560176 4 0.0806 0.750 0.020 0.000 0.000 0.972 0.000 0.008
#> SRR1560177 2 0.2489 0.629 0.000 0.860 0.000 0.000 0.012 0.128
#> SRR1560178 6 0.6144 0.483 0.000 0.228 0.320 0.000 0.008 0.444
#> SRR1560179 2 0.2579 0.580 0.000 0.872 0.000 0.000 0.040 0.088
#> SRR1560180 1 0.5066 0.739 0.728 0.000 0.060 0.012 0.124 0.076
#> SRR1560181 2 0.3655 0.508 0.000 0.800 0.004 0.000 0.088 0.108
#> SRR1560182 2 0.3655 0.508 0.000 0.800 0.004 0.000 0.088 0.108
#> SRR1560183 2 0.3655 0.508 0.000 0.800 0.004 0.000 0.088 0.108
#> SRR1560184 3 0.0000 0.749 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 0.749 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 4 0.5298 0.657 0.000 0.072 0.000 0.664 0.208 0.056
#> SRR1560187 5 0.2317 0.577 0.008 0.008 0.000 0.088 0.892 0.004
#> SRR1560188 5 0.5012 0.506 0.000 0.256 0.000 0.008 0.640 0.096
#> SRR1560189 5 0.5012 0.506 0.000 0.256 0.000 0.008 0.640 0.096
#> SRR1560190 2 0.3043 0.644 0.000 0.792 0.000 0.000 0.008 0.200
#> SRR1560191 2 0.3043 0.644 0.000 0.792 0.000 0.000 0.008 0.200
#> SRR1560192 1 0.0363 0.869 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1560193 2 0.3102 0.644 0.000 0.816 0.000 0.000 0.028 0.156
#> SRR1560194 6 0.5531 0.648 0.000 0.456 0.044 0.000 0.044 0.456
#> SRR1560195 3 0.0000 0.749 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.749 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 2 0.5531 -0.710 0.000 0.456 0.044 0.000 0.044 0.456
#> SRR1560198 4 0.5298 0.657 0.000 0.072 0.000 0.664 0.208 0.056
#> SRR1560200 5 0.5187 0.553 0.012 0.000 0.076 0.072 0.720 0.120
#> SRR1560199 6 0.5531 0.648 0.000 0.456 0.044 0.000 0.044 0.456
#> SRR1560201 5 0.5105 0.107 0.000 0.028 0.000 0.420 0.520 0.032
#> SRR1560202 5 0.4785 0.575 0.000 0.208 0.036 0.000 0.700 0.056
#> SRR1560203 4 0.3693 0.735 0.008 0.000 0.000 0.708 0.280 0.004
#> SRR1560204 4 0.3693 0.735 0.008 0.000 0.000 0.708 0.280 0.004
#> SRR1560205 3 0.0000 0.749 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 2 0.3123 0.537 0.000 0.832 0.000 0.000 0.056 0.112
#> SRR1560207 1 0.1984 0.886 0.912 0.000 0.000 0.032 0.056 0.000
#> SRR1560208 2 0.2482 0.613 0.000 0.848 0.000 0.000 0.004 0.148
#> SRR1560209 6 0.4115 0.782 0.000 0.360 0.004 0.000 0.012 0.624
#> SRR1560210 5 0.5395 0.409 0.012 0.000 0.240 0.012 0.636 0.100
#> SRR1560211 2 0.2482 0.613 0.000 0.848 0.000 0.000 0.004 0.148
#> SRR1560212 6 0.4115 0.782 0.000 0.360 0.004 0.000 0.012 0.624
#> SRR1560213 3 0.6945 0.424 0.000 0.212 0.468 0.000 0.224 0.096
#> SRR1560214 5 0.3953 0.616 0.012 0.032 0.000 0.044 0.808 0.104
#> SRR1560215 5 0.3953 0.616 0.012 0.032 0.000 0.044 0.808 0.104
#> SRR1560216 4 0.3788 0.734 0.012 0.000 0.000 0.704 0.280 0.004
#> SRR1560217 4 0.3788 0.734 0.012 0.000 0.000 0.704 0.280 0.004
#> SRR1560218 3 0.6927 0.428 0.000 0.208 0.472 0.000 0.224 0.096
#> SRR1560219 3 0.6927 0.428 0.000 0.208 0.472 0.000 0.224 0.096
#> SRR1560220 5 0.6030 0.515 0.000 0.060 0.192 0.000 0.596 0.152
#> SRR1560221 5 0.6030 0.515 0.000 0.060 0.192 0.000 0.596 0.152
#> SRR1560222 5 0.5105 0.107 0.000 0.028 0.000 0.420 0.520 0.032
#> SRR1560223 5 0.5105 0.107 0.000 0.028 0.000 0.420 0.520 0.032
#> SRR1560224 4 0.3833 0.675 0.000 0.040 0.000 0.804 0.044 0.112
#> SRR1560225 4 0.7016 0.212 0.004 0.124 0.000 0.496 0.184 0.192
#> SRR1560226 4 0.0909 0.749 0.020 0.000 0.000 0.968 0.000 0.012
#> SRR1560227 4 0.0909 0.749 0.020 0.000 0.000 0.968 0.000 0.012
#> SRR1560228 1 0.2786 0.871 0.860 0.000 0.000 0.084 0.056 0.000
#> SRR1560229 5 0.5447 0.113 0.000 0.420 0.000 0.000 0.460 0.120
#> SRR1560230 4 0.0806 0.750 0.020 0.000 0.000 0.972 0.000 0.008
#> SRR1560231 5 0.5395 0.409 0.012 0.000 0.240 0.012 0.636 0.100
#> SRR1560232 1 0.5066 0.739 0.728 0.000 0.060 0.012 0.124 0.076
#> SRR1560233 2 0.2544 0.550 0.000 0.852 0.004 0.000 0.004 0.140
#> SRR1560234 2 0.2402 0.550 0.000 0.856 0.004 0.000 0.000 0.140
#> SRR1560235 2 0.5680 0.412 0.000 0.544 0.000 0.004 0.184 0.268
#> SRR1560236 2 0.5680 0.412 0.000 0.544 0.000 0.004 0.184 0.268
#> SRR1560237 2 0.2402 0.550 0.000 0.856 0.004 0.000 0.000 0.140
#> SRR1560238 2 0.4946 0.571 0.000 0.676 0.000 0.052 0.040 0.232
#> SRR1560239 2 0.2446 0.628 0.000 0.864 0.000 0.000 0.012 0.124
#> SRR1560240 5 0.3439 0.634 0.000 0.120 0.000 0.000 0.808 0.072
#> SRR1560241 5 0.3439 0.634 0.000 0.120 0.000 0.000 0.808 0.072
#> SRR1560242 5 0.3025 0.638 0.000 0.156 0.000 0.000 0.820 0.024
#> SRR1560243 5 0.3025 0.638 0.000 0.156 0.000 0.000 0.820 0.024
#> SRR1560244 2 0.3183 0.537 0.000 0.828 0.000 0.000 0.060 0.112
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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.989 0.994 0.4712 0.528 0.528
#> 3 3 0.530 0.719 0.788 0.3472 0.840 0.697
#> 4 4 0.557 0.637 0.801 0.1431 0.820 0.559
#> 5 5 0.617 0.679 0.792 0.0800 0.861 0.542
#> 6 6 0.653 0.615 0.733 0.0471 0.965 0.840
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
#> SRR1560164 1 0.0000 0.989 1.000 0.000
#> SRR1560165 1 0.0000 0.989 1.000 0.000
#> SRR1560166 2 0.0000 0.997 0.000 1.000
#> SRR1560167 1 0.0000 0.989 1.000 0.000
#> SRR1560168 2 0.0000 0.997 0.000 1.000
#> SRR1560169 1 0.0000 0.989 1.000 0.000
#> SRR1560170 2 0.0000 0.997 0.000 1.000
#> SRR1560171 2 0.0000 0.997 0.000 1.000
#> SRR1560172 2 0.0000 0.997 0.000 1.000
#> SRR1560173 1 0.0000 0.989 1.000 0.000
#> SRR1560174 2 0.0000 0.997 0.000 1.000
#> SRR1560175 2 0.0000 0.997 0.000 1.000
#> SRR1560176 1 0.0000 0.989 1.000 0.000
#> SRR1560177 2 0.0000 0.997 0.000 1.000
#> SRR1560178 2 0.0000 0.997 0.000 1.000
#> SRR1560179 2 0.0000 0.997 0.000 1.000
#> SRR1560180 1 0.1184 0.982 0.984 0.016
#> SRR1560181 2 0.0000 0.997 0.000 1.000
#> SRR1560182 2 0.0000 0.997 0.000 1.000
#> SRR1560183 2 0.0000 0.997 0.000 1.000
#> SRR1560184 2 0.0000 0.997 0.000 1.000
#> SRR1560185 2 0.0000 0.997 0.000 1.000
#> SRR1560186 1 0.1843 0.973 0.972 0.028
#> SRR1560187 1 0.3733 0.932 0.928 0.072
#> SRR1560188 2 0.0000 0.997 0.000 1.000
#> SRR1560189 2 0.0000 0.997 0.000 1.000
#> SRR1560190 2 0.0000 0.997 0.000 1.000
#> SRR1560191 2 0.0000 0.997 0.000 1.000
#> SRR1560192 1 0.0000 0.989 1.000 0.000
#> SRR1560193 2 0.0000 0.997 0.000 1.000
#> SRR1560194 2 0.0000 0.997 0.000 1.000
#> SRR1560195 2 0.0000 0.997 0.000 1.000
#> SRR1560196 2 0.0000 0.997 0.000 1.000
#> SRR1560197 2 0.0000 0.997 0.000 1.000
#> SRR1560198 1 0.0000 0.989 1.000 0.000
#> SRR1560200 1 0.0938 0.984 0.988 0.012
#> SRR1560199 2 0.0000 0.997 0.000 1.000
#> SRR1560201 1 0.0000 0.989 1.000 0.000
#> SRR1560202 2 0.0000 0.997 0.000 1.000
#> SRR1560203 1 0.0000 0.989 1.000 0.000
#> SRR1560204 1 0.0000 0.989 1.000 0.000
#> SRR1560205 2 0.0000 0.997 0.000 1.000
#> SRR1560206 2 0.0000 0.997 0.000 1.000
#> SRR1560207 1 0.0000 0.989 1.000 0.000
#> SRR1560208 2 0.0000 0.997 0.000 1.000
#> SRR1560209 2 0.0000 0.997 0.000 1.000
#> SRR1560210 2 0.0000 0.997 0.000 1.000
#> SRR1560211 2 0.0000 0.997 0.000 1.000
#> SRR1560212 2 0.0000 0.997 0.000 1.000
#> SRR1560213 2 0.0000 0.997 0.000 1.000
#> SRR1560214 1 0.0938 0.984 0.988 0.012
#> SRR1560215 2 0.6343 0.807 0.160 0.840
#> SRR1560216 1 0.0000 0.989 1.000 0.000
#> SRR1560217 1 0.0000 0.989 1.000 0.000
#> SRR1560218 2 0.0000 0.997 0.000 1.000
#> SRR1560219 2 0.0000 0.997 0.000 1.000
#> SRR1560220 2 0.0000 0.997 0.000 1.000
#> SRR1560221 2 0.0000 0.997 0.000 1.000
#> SRR1560222 1 0.1414 0.979 0.980 0.020
#> SRR1560223 1 0.1414 0.979 0.980 0.020
#> SRR1560224 1 0.0672 0.986 0.992 0.008
#> SRR1560225 1 0.0000 0.989 1.000 0.000
#> SRR1560226 1 0.0000 0.989 1.000 0.000
#> SRR1560227 1 0.0000 0.989 1.000 0.000
#> SRR1560228 1 0.0000 0.989 1.000 0.000
#> SRR1560229 2 0.0000 0.997 0.000 1.000
#> SRR1560230 1 0.0000 0.989 1.000 0.000
#> SRR1560231 2 0.0000 0.997 0.000 1.000
#> SRR1560232 1 0.0000 0.989 1.000 0.000
#> SRR1560233 2 0.0000 0.997 0.000 1.000
#> SRR1560234 2 0.0000 0.997 0.000 1.000
#> SRR1560235 2 0.0000 0.997 0.000 1.000
#> SRR1560236 2 0.0000 0.997 0.000 1.000
#> SRR1560237 2 0.0000 0.997 0.000 1.000
#> SRR1560238 2 0.0000 0.997 0.000 1.000
#> SRR1560239 2 0.0000 0.997 0.000 1.000
#> SRR1560240 1 0.3584 0.938 0.932 0.068
#> SRR1560241 2 0.0000 0.997 0.000 1.000
#> SRR1560242 1 0.3584 0.938 0.932 0.068
#> SRR1560243 2 0.0000 0.997 0.000 1.000
#> SRR1560244 2 0.0000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.1753 0.803 0.952 0.000 0.048
#> SRR1560165 1 0.1753 0.803 0.952 0.000 0.048
#> SRR1560166 2 0.1529 0.831 0.000 0.960 0.040
#> SRR1560167 1 0.1643 0.800 0.956 0.000 0.044
#> SRR1560168 2 0.2625 0.812 0.000 0.916 0.084
#> SRR1560169 1 0.1643 0.800 0.956 0.000 0.044
#> SRR1560170 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560171 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560172 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560173 1 0.1753 0.801 0.952 0.000 0.048
#> SRR1560174 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560175 2 0.2448 0.791 0.000 0.924 0.076
#> SRR1560176 1 0.0424 0.810 0.992 0.000 0.008
#> SRR1560177 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560178 3 0.6252 0.543 0.000 0.444 0.556
#> SRR1560179 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560180 1 0.6330 0.663 0.600 0.004 0.396
#> SRR1560181 2 0.5016 0.619 0.000 0.760 0.240
#> SRR1560182 2 0.0237 0.840 0.000 0.996 0.004
#> SRR1560183 2 0.5016 0.619 0.000 0.760 0.240
#> SRR1560184 3 0.4399 0.859 0.000 0.188 0.812
#> SRR1560185 3 0.4399 0.859 0.000 0.188 0.812
#> SRR1560186 1 0.6302 0.564 0.520 0.000 0.480
#> SRR1560187 1 0.8100 0.568 0.512 0.068 0.420
#> SRR1560188 2 0.4796 0.679 0.000 0.780 0.220
#> SRR1560189 2 0.4796 0.679 0.000 0.780 0.220
#> SRR1560190 2 0.2448 0.815 0.000 0.924 0.076
#> SRR1560191 2 0.1529 0.831 0.000 0.960 0.040
#> SRR1560192 1 0.1643 0.800 0.956 0.000 0.044
#> SRR1560193 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560194 2 0.6309 -0.443 0.000 0.504 0.496
#> SRR1560195 3 0.4654 0.859 0.000 0.208 0.792
#> SRR1560196 3 0.4654 0.859 0.000 0.208 0.792
#> SRR1560197 3 0.5785 0.763 0.000 0.332 0.668
#> SRR1560198 1 0.6008 0.682 0.628 0.000 0.372
#> SRR1560200 1 0.6432 0.624 0.568 0.004 0.428
#> SRR1560199 2 0.6309 -0.443 0.000 0.504 0.496
#> SRR1560201 1 0.1964 0.812 0.944 0.000 0.056
#> SRR1560202 3 0.6280 0.227 0.000 0.460 0.540
#> SRR1560203 1 0.4346 0.791 0.816 0.000 0.184
#> SRR1560204 1 0.4346 0.791 0.816 0.000 0.184
#> SRR1560205 3 0.4399 0.859 0.000 0.188 0.812
#> SRR1560206 2 0.1643 0.818 0.000 0.956 0.044
#> SRR1560207 1 0.3116 0.802 0.892 0.000 0.108
#> SRR1560208 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560209 2 0.1031 0.825 0.000 0.976 0.024
#> SRR1560210 3 0.3941 0.837 0.000 0.156 0.844
#> SRR1560211 2 0.0237 0.841 0.000 0.996 0.004
#> SRR1560212 2 0.4504 0.574 0.000 0.804 0.196
#> SRR1560213 2 0.1411 0.832 0.000 0.964 0.036
#> SRR1560214 1 0.5988 0.683 0.632 0.000 0.368
#> SRR1560215 2 0.9825 -0.134 0.244 0.388 0.368
#> SRR1560216 1 0.3116 0.807 0.892 0.000 0.108
#> SRR1560217 1 0.3340 0.806 0.880 0.000 0.120
#> SRR1560218 3 0.4750 0.820 0.000 0.216 0.784
#> SRR1560219 3 0.5733 0.730 0.000 0.324 0.676
#> SRR1560220 3 0.3752 0.804 0.000 0.144 0.856
#> SRR1560221 3 0.5733 0.760 0.000 0.324 0.676
#> SRR1560222 1 0.8194 0.583 0.572 0.088 0.340
#> SRR1560223 1 0.8452 0.560 0.556 0.104 0.340
#> SRR1560224 1 0.7348 0.686 0.704 0.120 0.176
#> SRR1560225 1 0.2448 0.806 0.924 0.000 0.076
#> SRR1560226 1 0.0424 0.810 0.992 0.000 0.008
#> SRR1560227 1 0.0424 0.810 0.992 0.000 0.008
#> SRR1560228 1 0.1643 0.800 0.956 0.000 0.044
#> SRR1560229 2 0.4346 0.702 0.000 0.816 0.184
#> SRR1560230 1 0.0424 0.810 0.992 0.000 0.008
#> SRR1560231 3 0.4654 0.859 0.000 0.208 0.792
#> SRR1560232 1 0.4178 0.789 0.828 0.000 0.172
#> SRR1560233 2 0.1031 0.837 0.000 0.976 0.024
#> SRR1560234 2 0.1411 0.815 0.000 0.964 0.036
#> SRR1560235 2 0.2261 0.820 0.000 0.932 0.068
#> SRR1560236 2 0.2261 0.820 0.000 0.932 0.068
#> SRR1560237 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560238 2 0.2066 0.825 0.000 0.940 0.060
#> SRR1560239 2 0.0000 0.841 0.000 1.000 0.000
#> SRR1560240 1 0.7222 0.641 0.580 0.032 0.388
#> SRR1560241 2 0.5254 0.596 0.000 0.736 0.264
#> SRR1560242 1 0.9383 0.416 0.444 0.172 0.384
#> SRR1560243 2 0.4974 0.657 0.000 0.764 0.236
#> SRR1560244 2 0.0000 0.841 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.1792 0.8684 0.932 0.000 0.000 0.068
#> SRR1560165 1 0.1792 0.8684 0.932 0.000 0.000 0.068
#> SRR1560166 2 0.4139 0.7431 0.000 0.800 0.024 0.176
#> SRR1560167 1 0.0188 0.8704 0.996 0.000 0.004 0.000
#> SRR1560168 2 0.5431 0.6631 0.000 0.712 0.064 0.224
#> SRR1560169 1 0.0188 0.8704 0.996 0.000 0.004 0.000
#> SRR1560170 2 0.0188 0.8079 0.000 0.996 0.000 0.004
#> SRR1560171 2 0.0188 0.8079 0.000 0.996 0.000 0.004
#> SRR1560172 2 0.1211 0.7954 0.000 0.960 0.000 0.040
#> SRR1560173 1 0.1398 0.8704 0.956 0.000 0.004 0.040
#> SRR1560174 2 0.0188 0.8079 0.000 0.996 0.000 0.004
#> SRR1560175 2 0.3842 0.6947 0.000 0.836 0.036 0.128
#> SRR1560176 1 0.2401 0.8550 0.904 0.000 0.004 0.092
#> SRR1560177 2 0.1356 0.8106 0.000 0.960 0.008 0.032
#> SRR1560178 3 0.5069 0.6287 0.000 0.320 0.664 0.016
#> SRR1560179 2 0.1489 0.8002 0.000 0.952 0.004 0.044
#> SRR1560180 4 0.5977 0.5472 0.180 0.012 0.096 0.712
#> SRR1560181 2 0.6503 0.2017 0.000 0.480 0.072 0.448
#> SRR1560182 2 0.2266 0.7832 0.000 0.912 0.004 0.084
#> SRR1560183 2 0.6500 0.2148 0.000 0.484 0.072 0.444
#> SRR1560184 3 0.2131 0.7962 0.000 0.036 0.932 0.032
#> SRR1560185 3 0.2131 0.7962 0.000 0.036 0.932 0.032
#> SRR1560186 4 0.5102 0.5535 0.048 0.000 0.220 0.732
#> SRR1560187 4 0.2066 0.6107 0.028 0.008 0.024 0.940
#> SRR1560188 4 0.6407 0.0317 0.000 0.412 0.068 0.520
#> SRR1560189 4 0.6407 0.0317 0.000 0.412 0.068 0.520
#> SRR1560190 2 0.4538 0.7145 0.000 0.760 0.024 0.216
#> SRR1560191 2 0.4139 0.7431 0.000 0.800 0.024 0.176
#> SRR1560192 1 0.0188 0.8704 0.996 0.000 0.004 0.000
#> SRR1560193 2 0.0188 0.8079 0.000 0.996 0.000 0.004
#> SRR1560194 2 0.5512 -0.3325 0.000 0.492 0.492 0.016
#> SRR1560195 3 0.1545 0.8013 0.000 0.040 0.952 0.008
#> SRR1560196 3 0.1545 0.8013 0.000 0.040 0.952 0.008
#> SRR1560197 3 0.5047 0.6366 0.000 0.316 0.668 0.016
#> SRR1560198 4 0.5486 0.5128 0.200 0.000 0.080 0.720
#> SRR1560200 4 0.5396 0.5590 0.156 0.000 0.104 0.740
#> SRR1560199 3 0.5511 0.2785 0.000 0.484 0.500 0.016
#> SRR1560201 1 0.4972 0.0142 0.544 0.000 0.000 0.456
#> SRR1560202 4 0.6330 0.4700 0.000 0.200 0.144 0.656
#> SRR1560203 4 0.4356 0.4387 0.292 0.000 0.000 0.708
#> SRR1560204 4 0.4356 0.4387 0.292 0.000 0.000 0.708
#> SRR1560205 3 0.2131 0.7962 0.000 0.036 0.932 0.032
#> SRR1560206 2 0.3806 0.7048 0.000 0.824 0.020 0.156
#> SRR1560207 1 0.3494 0.7623 0.824 0.000 0.004 0.172
#> SRR1560208 2 0.1022 0.8096 0.000 0.968 0.000 0.032
#> SRR1560209 2 0.2021 0.7813 0.000 0.932 0.012 0.056
#> SRR1560210 3 0.1356 0.7985 0.000 0.032 0.960 0.008
#> SRR1560211 2 0.1209 0.8096 0.000 0.964 0.004 0.032
#> SRR1560212 2 0.4370 0.6126 0.000 0.800 0.156 0.044
#> SRR1560213 2 0.4387 0.7379 0.000 0.776 0.024 0.200
#> SRR1560214 4 0.5909 0.5579 0.144 0.024 0.096 0.736
#> SRR1560215 4 0.5807 0.5739 0.020 0.144 0.096 0.740
#> SRR1560216 4 0.5112 0.2556 0.384 0.000 0.008 0.608
#> SRR1560217 4 0.4792 0.4176 0.312 0.000 0.008 0.680
#> SRR1560218 3 0.4234 0.6995 0.000 0.052 0.816 0.132
#> SRR1560219 3 0.6548 0.5741 0.000 0.188 0.636 0.176
#> SRR1560220 3 0.3554 0.7090 0.000 0.020 0.844 0.136
#> SRR1560221 3 0.5864 0.6614 0.000 0.264 0.664 0.072
#> SRR1560222 4 0.6450 0.5536 0.116 0.068 0.096 0.720
#> SRR1560223 4 0.6450 0.5536 0.116 0.068 0.096 0.720
#> SRR1560224 4 0.6990 0.5053 0.172 0.104 0.056 0.668
#> SRR1560225 4 0.5931 0.2527 0.384 0.008 0.028 0.580
#> SRR1560226 1 0.2530 0.8554 0.896 0.000 0.004 0.100
#> SRR1560227 1 0.2530 0.8554 0.896 0.000 0.004 0.100
#> SRR1560228 1 0.0336 0.8720 0.992 0.000 0.000 0.008
#> SRR1560229 4 0.5784 0.2829 0.000 0.412 0.032 0.556
#> SRR1560230 1 0.2466 0.8564 0.900 0.000 0.004 0.096
#> SRR1560231 3 0.1677 0.8008 0.000 0.040 0.948 0.012
#> SRR1560232 1 0.4624 0.7123 0.784 0.000 0.052 0.164
#> SRR1560233 2 0.3080 0.7938 0.000 0.880 0.024 0.096
#> SRR1560234 2 0.2021 0.7761 0.000 0.936 0.040 0.024
#> SRR1560235 2 0.4426 0.7252 0.000 0.772 0.024 0.204
#> SRR1560236 2 0.4538 0.7145 0.000 0.760 0.024 0.216
#> SRR1560237 2 0.0336 0.8049 0.000 0.992 0.000 0.008
#> SRR1560238 2 0.5102 0.6862 0.000 0.732 0.048 0.220
#> SRR1560239 2 0.1256 0.8106 0.000 0.964 0.008 0.028
#> SRR1560240 4 0.5870 0.5799 0.108 0.040 0.100 0.752
#> SRR1560241 4 0.5524 0.5221 0.000 0.276 0.048 0.676
#> SRR1560242 4 0.5134 0.5882 0.020 0.116 0.076 0.788
#> SRR1560243 4 0.6075 0.3489 0.000 0.288 0.076 0.636
#> SRR1560244 2 0.1902 0.7914 0.000 0.932 0.004 0.064
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.2685 0.838 0.880 0.000 0.000 0.092 0.028
#> SRR1560165 1 0.2685 0.838 0.880 0.000 0.000 0.092 0.028
#> SRR1560166 5 0.4830 0.284 0.000 0.488 0.000 0.020 0.492
#> SRR1560167 1 0.0451 0.840 0.988 0.000 0.000 0.008 0.004
#> SRR1560168 5 0.3790 0.675 0.000 0.272 0.000 0.004 0.724
#> SRR1560169 1 0.0451 0.840 0.988 0.000 0.000 0.008 0.004
#> SRR1560170 2 0.2519 0.784 0.000 0.884 0.000 0.016 0.100
#> SRR1560171 2 0.2361 0.787 0.000 0.892 0.000 0.012 0.096
#> SRR1560172 2 0.1893 0.793 0.000 0.928 0.000 0.024 0.048
#> SRR1560173 1 0.0798 0.839 0.976 0.000 0.000 0.016 0.008
#> SRR1560174 2 0.2464 0.786 0.000 0.888 0.000 0.016 0.096
#> SRR1560175 2 0.3895 0.717 0.000 0.812 0.012 0.132 0.044
#> SRR1560176 1 0.4612 0.792 0.756 0.000 0.004 0.116 0.124
#> SRR1560177 2 0.2982 0.777 0.000 0.860 0.004 0.020 0.116
#> SRR1560178 3 0.5163 0.499 0.000 0.320 0.632 0.016 0.032
#> SRR1560179 2 0.3075 0.788 0.000 0.860 0.000 0.048 0.092
#> SRR1560180 4 0.4502 0.832 0.080 0.032 0.024 0.812 0.052
#> SRR1560181 5 0.4883 0.688 0.000 0.180 0.012 0.076 0.732
#> SRR1560182 2 0.4106 0.739 0.000 0.792 0.004 0.068 0.136
#> SRR1560183 5 0.4883 0.688 0.000 0.180 0.012 0.076 0.732
#> SRR1560184 3 0.1202 0.759 0.000 0.004 0.960 0.004 0.032
#> SRR1560185 3 0.1202 0.759 0.000 0.004 0.960 0.004 0.032
#> SRR1560186 4 0.3446 0.818 0.004 0.000 0.048 0.840 0.108
#> SRR1560187 4 0.3123 0.793 0.000 0.000 0.004 0.812 0.184
#> SRR1560188 5 0.4926 0.721 0.000 0.164 0.004 0.108 0.724
#> SRR1560189 5 0.4926 0.721 0.000 0.164 0.004 0.108 0.724
#> SRR1560190 5 0.4101 0.630 0.000 0.332 0.000 0.004 0.664
#> SRR1560191 5 0.4617 0.435 0.000 0.436 0.000 0.012 0.552
#> SRR1560192 1 0.0451 0.840 0.988 0.000 0.000 0.008 0.004
#> SRR1560193 2 0.2573 0.782 0.000 0.880 0.000 0.016 0.104
#> SRR1560194 2 0.6015 0.174 0.000 0.560 0.348 0.028 0.064
#> SRR1560195 3 0.0566 0.760 0.000 0.004 0.984 0.012 0.000
#> SRR1560196 3 0.0566 0.760 0.000 0.004 0.984 0.012 0.000
#> SRR1560197 3 0.6110 0.404 0.000 0.356 0.548 0.032 0.064
#> SRR1560198 4 0.2483 0.835 0.048 0.000 0.016 0.908 0.028
#> SRR1560200 4 0.3928 0.844 0.020 0.008 0.024 0.820 0.128
#> SRR1560199 2 0.6059 0.121 0.000 0.544 0.364 0.028 0.064
#> SRR1560201 1 0.6229 0.325 0.516 0.000 0.000 0.320 0.164
#> SRR1560202 5 0.4978 0.659 0.000 0.068 0.040 0.140 0.752
#> SRR1560203 4 0.3715 0.799 0.064 0.000 0.004 0.824 0.108
#> SRR1560204 4 0.3715 0.799 0.064 0.000 0.004 0.824 0.108
#> SRR1560205 3 0.1202 0.759 0.000 0.004 0.960 0.004 0.032
#> SRR1560206 2 0.3152 0.741 0.000 0.840 0.000 0.136 0.024
#> SRR1560207 1 0.3388 0.709 0.792 0.000 0.000 0.200 0.008
#> SRR1560208 2 0.1701 0.797 0.000 0.936 0.000 0.016 0.048
#> SRR1560209 2 0.0963 0.803 0.000 0.964 0.000 0.036 0.000
#> SRR1560210 3 0.1716 0.760 0.000 0.016 0.944 0.016 0.024
#> SRR1560211 2 0.2074 0.794 0.000 0.920 0.004 0.016 0.060
#> SRR1560212 2 0.2912 0.743 0.000 0.876 0.088 0.028 0.008
#> SRR1560213 5 0.4924 0.504 0.000 0.360 0.004 0.028 0.608
#> SRR1560214 4 0.3337 0.854 0.036 0.024 0.016 0.876 0.048
#> SRR1560215 4 0.3401 0.840 0.000 0.072 0.008 0.852 0.068
#> SRR1560216 4 0.2179 0.809 0.100 0.000 0.000 0.896 0.004
#> SRR1560217 4 0.2017 0.826 0.080 0.000 0.000 0.912 0.008
#> SRR1560218 3 0.5715 0.356 0.000 0.032 0.540 0.032 0.396
#> SRR1560219 3 0.6719 0.242 0.000 0.112 0.440 0.032 0.416
#> SRR1560220 3 0.5340 0.499 0.000 0.036 0.648 0.288 0.028
#> SRR1560221 3 0.6441 0.469 0.000 0.316 0.552 0.096 0.036
#> SRR1560222 5 0.4257 0.549 0.008 0.012 0.012 0.212 0.756
#> SRR1560223 5 0.4257 0.549 0.008 0.012 0.012 0.212 0.756
#> SRR1560224 5 0.5022 0.489 0.040 0.012 0.008 0.236 0.704
#> SRR1560225 5 0.5510 0.394 0.164 0.000 0.000 0.184 0.652
#> SRR1560226 1 0.4747 0.787 0.744 0.000 0.004 0.128 0.124
#> SRR1560227 1 0.4747 0.787 0.744 0.000 0.004 0.128 0.124
#> SRR1560228 1 0.1195 0.842 0.960 0.000 0.000 0.012 0.028
#> SRR1560229 4 0.4691 0.711 0.000 0.184 0.004 0.736 0.076
#> SRR1560230 1 0.4747 0.787 0.744 0.000 0.004 0.128 0.124
#> SRR1560231 3 0.2249 0.755 0.000 0.040 0.920 0.020 0.020
#> SRR1560232 1 0.3810 0.726 0.804 0.004 0.016 0.164 0.012
#> SRR1560233 2 0.4656 -0.415 0.000 0.508 0.000 0.012 0.480
#> SRR1560234 2 0.1012 0.805 0.000 0.968 0.020 0.012 0.000
#> SRR1560235 5 0.4101 0.630 0.000 0.332 0.000 0.004 0.664
#> SRR1560236 5 0.3932 0.637 0.000 0.328 0.000 0.000 0.672
#> SRR1560237 2 0.1124 0.805 0.000 0.960 0.000 0.004 0.036
#> SRR1560238 5 0.4009 0.647 0.000 0.312 0.000 0.004 0.684
#> SRR1560239 2 0.2293 0.793 0.000 0.900 0.000 0.016 0.084
#> SRR1560240 4 0.3974 0.848 0.028 0.044 0.016 0.840 0.072
#> SRR1560241 4 0.3997 0.802 0.000 0.116 0.004 0.804 0.076
#> SRR1560242 5 0.4702 0.542 0.004 0.028 0.008 0.256 0.704
#> SRR1560243 5 0.5199 0.672 0.000 0.112 0.008 0.176 0.704
#> SRR1560244 2 0.2304 0.799 0.000 0.908 0.000 0.044 0.048
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.3930 0.74602 0.772 0.000 0.000 0.064 0.008 NA
#> SRR1560165 1 0.3930 0.74602 0.772 0.000 0.000 0.064 0.008 NA
#> SRR1560166 5 0.5011 0.33875 0.000 0.368 0.000 0.000 0.552 NA
#> SRR1560167 1 0.0146 0.75129 0.996 0.000 0.000 0.000 0.000 NA
#> SRR1560168 5 0.3129 0.65984 0.000 0.152 0.000 0.004 0.820 NA
#> SRR1560169 1 0.0000 0.75208 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1560170 2 0.2697 0.70062 0.000 0.864 0.000 0.000 0.092 NA
#> SRR1560171 2 0.2527 0.70417 0.000 0.876 0.000 0.000 0.084 NA
#> SRR1560172 2 0.3108 0.72089 0.000 0.860 0.000 0.036 0.052 NA
#> SRR1560173 1 0.1370 0.74463 0.948 0.000 0.004 0.012 0.000 NA
#> SRR1560174 2 0.2527 0.70417 0.000 0.876 0.000 0.000 0.084 NA
#> SRR1560175 2 0.4756 0.58556 0.000 0.696 0.004 0.212 0.012 NA
#> SRR1560176 1 0.4377 0.65792 0.540 0.000 0.000 0.024 0.000 NA
#> SRR1560177 2 0.4343 0.67242 0.000 0.724 0.000 0.004 0.084 NA
#> SRR1560178 3 0.5439 0.23760 0.000 0.356 0.548 0.012 0.004 NA
#> SRR1560179 2 0.4179 0.69777 0.000 0.776 0.000 0.028 0.080 NA
#> SRR1560180 4 0.3303 0.73861 0.024 0.020 0.004 0.860 0.024 NA
#> SRR1560181 5 0.5290 0.59158 0.000 0.092 0.000 0.028 0.640 NA
#> SRR1560182 2 0.5368 0.61898 0.000 0.652 0.000 0.028 0.136 NA
#> SRR1560183 5 0.5290 0.59158 0.000 0.092 0.000 0.028 0.640 NA
#> SRR1560184 3 0.1346 0.80915 0.000 0.008 0.952 0.000 0.016 NA
#> SRR1560185 3 0.1346 0.80915 0.000 0.008 0.952 0.000 0.016 NA
#> SRR1560186 4 0.4715 0.71319 0.000 0.000 0.012 0.692 0.084 NA
#> SRR1560187 4 0.4593 0.68617 0.000 0.000 0.004 0.704 0.180 NA
#> SRR1560188 5 0.2566 0.68773 0.000 0.064 0.000 0.020 0.888 NA
#> SRR1560189 5 0.2566 0.68773 0.000 0.064 0.000 0.020 0.888 NA
#> SRR1560190 5 0.3877 0.61685 0.000 0.208 0.000 0.004 0.748 NA
#> SRR1560191 5 0.4575 0.42145 0.000 0.352 0.000 0.000 0.600 NA
#> SRR1560192 1 0.0000 0.75208 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1560193 2 0.3079 0.70152 0.000 0.848 0.000 0.008 0.092 NA
#> SRR1560194 2 0.6509 0.38200 0.000 0.528 0.252 0.024 0.024 NA
#> SRR1560195 3 0.0405 0.81014 0.000 0.008 0.988 0.000 0.000 NA
#> SRR1560196 3 0.0405 0.81014 0.000 0.008 0.988 0.000 0.000 NA
#> SRR1560197 2 0.6865 0.00163 0.000 0.396 0.376 0.028 0.024 NA
#> SRR1560198 4 0.3792 0.73445 0.004 0.000 0.004 0.764 0.032 NA
#> SRR1560200 4 0.4343 0.74162 0.004 0.008 0.004 0.760 0.092 NA
#> SRR1560199 2 0.6593 0.37157 0.000 0.520 0.256 0.024 0.028 NA
#> SRR1560201 1 0.7179 0.43274 0.464 0.000 0.004 0.156 0.144 NA
#> SRR1560202 5 0.3990 0.66097 0.000 0.036 0.004 0.032 0.788 NA
#> SRR1560203 4 0.5304 0.60746 0.012 0.000 0.004 0.584 0.076 NA
#> SRR1560204 4 0.5304 0.60746 0.012 0.000 0.004 0.584 0.076 NA
#> SRR1560205 3 0.1167 0.80998 0.000 0.008 0.960 0.000 0.012 NA
#> SRR1560206 2 0.4164 0.67128 0.000 0.756 0.000 0.168 0.016 NA
#> SRR1560207 1 0.4080 0.58327 0.740 0.000 0.004 0.208 0.004 NA
#> SRR1560208 2 0.3023 0.71827 0.000 0.836 0.000 0.000 0.044 NA
#> SRR1560209 2 0.2998 0.71593 0.000 0.852 0.000 0.076 0.004 NA
#> SRR1560210 3 0.3169 0.78059 0.000 0.020 0.856 0.024 0.012 NA
#> SRR1560211 2 0.3660 0.69564 0.000 0.780 0.000 0.000 0.060 NA
#> SRR1560212 2 0.4325 0.67693 0.000 0.780 0.044 0.080 0.004 NA
#> SRR1560213 5 0.5980 0.41787 0.000 0.252 0.000 0.012 0.520 NA
#> SRR1560214 4 0.1396 0.76536 0.008 0.012 0.000 0.952 0.004 NA
#> SRR1560215 4 0.1663 0.76476 0.004 0.024 0.000 0.940 0.008 NA
#> SRR1560216 4 0.3027 0.74466 0.016 0.000 0.004 0.832 0.004 NA
#> SRR1560217 4 0.3027 0.74466 0.016 0.000 0.004 0.832 0.004 NA
#> SRR1560218 5 0.6705 0.27005 0.000 0.040 0.280 0.004 0.452 NA
#> SRR1560219 5 0.7302 0.33782 0.000 0.128 0.180 0.008 0.452 NA
#> SRR1560220 4 0.5551 -0.09713 0.000 0.024 0.420 0.484 0.000 NA
#> SRR1560221 3 0.7415 0.32152 0.000 0.220 0.404 0.244 0.004 NA
#> SRR1560222 5 0.4320 0.60503 0.008 0.000 0.000 0.048 0.704 NA
#> SRR1560223 5 0.4320 0.60503 0.008 0.000 0.000 0.048 0.704 NA
#> SRR1560224 5 0.5099 0.31788 0.020 0.008 0.000 0.024 0.488 NA
#> SRR1560225 5 0.5975 0.28624 0.128 0.000 0.000 0.024 0.488 NA
#> SRR1560226 1 0.4444 0.65579 0.536 0.000 0.000 0.028 0.000 NA
#> SRR1560227 1 0.4444 0.65579 0.536 0.000 0.000 0.028 0.000 NA
#> SRR1560228 1 0.2101 0.76069 0.892 0.000 0.000 0.004 0.004 NA
#> SRR1560229 4 0.3917 0.68640 0.000 0.140 0.000 0.788 0.032 NA
#> SRR1560230 1 0.4453 0.65054 0.528 0.000 0.000 0.028 0.000 NA
#> SRR1560231 3 0.5008 0.70733 0.000 0.052 0.724 0.076 0.008 NA
#> SRR1560232 1 0.4418 0.56107 0.732 0.004 0.004 0.188 0.004 NA
#> SRR1560233 2 0.5853 -0.17850 0.000 0.440 0.000 0.008 0.404 NA
#> SRR1560234 2 0.1950 0.73816 0.000 0.912 0.000 0.024 0.000 NA
#> SRR1560235 5 0.3572 0.62252 0.000 0.204 0.000 0.000 0.764 NA
#> SRR1560236 5 0.3301 0.63725 0.000 0.188 0.000 0.000 0.788 NA
#> SRR1560237 2 0.1151 0.74262 0.000 0.956 0.000 0.000 0.012 NA
#> SRR1560238 5 0.3525 0.64205 0.000 0.180 0.000 0.004 0.784 NA
#> SRR1560239 2 0.3395 0.71843 0.000 0.808 0.000 0.000 0.060 NA
#> SRR1560240 4 0.2403 0.76152 0.000 0.020 0.000 0.900 0.040 NA
#> SRR1560241 4 0.3406 0.73291 0.000 0.068 0.000 0.840 0.036 NA
#> SRR1560242 5 0.4387 0.61527 0.000 0.012 0.000 0.076 0.732 NA
#> SRR1560243 5 0.4330 0.65264 0.000 0.040 0.000 0.048 0.756 NA
#> SRR1560244 2 0.2775 0.73743 0.000 0.880 0.000 0.040 0.032 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "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 15546 rows and 81 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.877 0.955 0.980 0.4907 0.511 0.511
#> 3 3 0.989 0.967 0.983 0.3253 0.813 0.644
#> 4 4 0.684 0.813 0.804 0.1427 0.845 0.592
#> 5 5 0.658 0.650 0.821 0.0711 0.890 0.610
#> 6 6 0.691 0.654 0.797 0.0410 0.910 0.612
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
#> SRR1560164 1 0.0000 0.981 1.000 0.000
#> SRR1560165 1 0.0000 0.981 1.000 0.000
#> SRR1560166 2 0.0000 0.977 0.000 1.000
#> SRR1560167 1 0.0000 0.981 1.000 0.000
#> SRR1560168 2 0.0000 0.977 0.000 1.000
#> SRR1560169 1 0.0000 0.981 1.000 0.000
#> SRR1560170 2 0.0000 0.977 0.000 1.000
#> SRR1560171 2 0.0000 0.977 0.000 1.000
#> SRR1560172 2 0.0000 0.977 0.000 1.000
#> SRR1560173 1 0.0000 0.981 1.000 0.000
#> SRR1560174 2 0.0000 0.977 0.000 1.000
#> SRR1560175 2 0.0672 0.970 0.008 0.992
#> SRR1560176 1 0.0000 0.981 1.000 0.000
#> SRR1560177 2 0.0000 0.977 0.000 1.000
#> SRR1560178 2 0.0000 0.977 0.000 1.000
#> SRR1560179 2 0.0000 0.977 0.000 1.000
#> SRR1560180 1 0.0000 0.981 1.000 0.000
#> SRR1560181 2 0.0000 0.977 0.000 1.000
#> SRR1560182 2 0.0000 0.977 0.000 1.000
#> SRR1560183 2 0.0000 0.977 0.000 1.000
#> SRR1560184 2 0.0000 0.977 0.000 1.000
#> SRR1560185 2 0.0000 0.977 0.000 1.000
#> SRR1560186 1 0.0000 0.981 1.000 0.000
#> SRR1560187 1 0.0000 0.981 1.000 0.000
#> SRR1560188 2 0.6623 0.803 0.172 0.828
#> SRR1560189 2 0.6623 0.803 0.172 0.828
#> SRR1560190 2 0.6438 0.813 0.164 0.836
#> SRR1560191 2 0.0000 0.977 0.000 1.000
#> SRR1560192 1 0.0000 0.981 1.000 0.000
#> SRR1560193 2 0.0000 0.977 0.000 1.000
#> SRR1560194 2 0.0000 0.977 0.000 1.000
#> SRR1560195 2 0.0000 0.977 0.000 1.000
#> SRR1560196 2 0.0000 0.977 0.000 1.000
#> SRR1560197 2 0.0000 0.977 0.000 1.000
#> SRR1560198 1 0.0000 0.981 1.000 0.000
#> SRR1560200 1 0.0000 0.981 1.000 0.000
#> SRR1560199 2 0.0000 0.977 0.000 1.000
#> SRR1560201 1 0.0000 0.981 1.000 0.000
#> SRR1560202 2 0.4815 0.877 0.104 0.896
#> SRR1560203 1 0.0000 0.981 1.000 0.000
#> SRR1560204 1 0.0000 0.981 1.000 0.000
#> SRR1560205 2 0.0000 0.977 0.000 1.000
#> SRR1560206 2 0.0000 0.977 0.000 1.000
#> SRR1560207 1 0.0000 0.981 1.000 0.000
#> SRR1560208 2 0.0000 0.977 0.000 1.000
#> SRR1560209 2 0.0000 0.977 0.000 1.000
#> SRR1560210 1 0.8861 0.568 0.696 0.304
#> SRR1560211 2 0.0000 0.977 0.000 1.000
#> SRR1560212 2 0.0000 0.977 0.000 1.000
#> SRR1560213 2 0.0000 0.977 0.000 1.000
#> SRR1560214 1 0.0000 0.981 1.000 0.000
#> SRR1560215 1 0.0000 0.981 1.000 0.000
#> SRR1560216 1 0.0000 0.981 1.000 0.000
#> SRR1560217 1 0.0000 0.981 1.000 0.000
#> SRR1560218 2 0.0000 0.977 0.000 1.000
#> SRR1560219 2 0.0000 0.977 0.000 1.000
#> SRR1560220 2 0.0000 0.977 0.000 1.000
#> SRR1560221 2 0.0000 0.977 0.000 1.000
#> SRR1560222 1 0.0000 0.981 1.000 0.000
#> SRR1560223 1 0.0000 0.981 1.000 0.000
#> SRR1560224 1 0.0000 0.981 1.000 0.000
#> SRR1560225 1 0.0000 0.981 1.000 0.000
#> SRR1560226 1 0.0000 0.981 1.000 0.000
#> SRR1560227 1 0.0000 0.981 1.000 0.000
#> SRR1560228 1 0.0000 0.981 1.000 0.000
#> SRR1560229 2 0.6148 0.828 0.152 0.848
#> SRR1560230 1 0.0000 0.981 1.000 0.000
#> SRR1560231 2 0.0000 0.977 0.000 1.000
#> SRR1560232 1 0.0000 0.981 1.000 0.000
#> SRR1560233 2 0.0000 0.977 0.000 1.000
#> SRR1560234 2 0.0000 0.977 0.000 1.000
#> SRR1560235 2 0.0000 0.977 0.000 1.000
#> SRR1560236 2 0.0000 0.977 0.000 1.000
#> SRR1560237 2 0.0000 0.977 0.000 1.000
#> SRR1560238 2 0.0000 0.977 0.000 1.000
#> SRR1560239 2 0.0000 0.977 0.000 1.000
#> SRR1560240 1 0.0000 0.981 1.000 0.000
#> SRR1560241 1 0.8608 0.587 0.716 0.284
#> SRR1560242 1 0.0000 0.981 1.000 0.000
#> SRR1560243 2 0.8555 0.629 0.280 0.720
#> SRR1560244 2 0.0000 0.977 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560166 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560167 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560168 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560169 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560170 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560171 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560172 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560173 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560174 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560175 2 0.1163 0.960 0.000 0.972 0.028
#> SRR1560176 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560177 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560178 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560179 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560180 1 0.0747 0.986 0.984 0.000 0.016
#> SRR1560181 2 0.1031 0.958 0.000 0.976 0.024
#> SRR1560182 2 0.1031 0.964 0.000 0.976 0.024
#> SRR1560183 2 0.0747 0.963 0.000 0.984 0.016
#> SRR1560184 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560185 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560186 1 0.1860 0.950 0.948 0.000 0.052
#> SRR1560187 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560188 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560189 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560190 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560191 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560192 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560193 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560194 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560195 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560196 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560197 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560198 1 0.0424 0.991 0.992 0.000 0.008
#> SRR1560200 1 0.0237 0.993 0.996 0.000 0.004
#> SRR1560199 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560201 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560202 3 0.4062 0.815 0.000 0.164 0.836
#> SRR1560203 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560204 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560205 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560206 2 0.0892 0.965 0.000 0.980 0.020
#> SRR1560207 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560208 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560209 2 0.0892 0.965 0.000 0.980 0.020
#> SRR1560210 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560211 2 0.2959 0.894 0.000 0.900 0.100
#> SRR1560212 2 0.6235 0.279 0.000 0.564 0.436
#> SRR1560213 2 0.0592 0.965 0.000 0.988 0.012
#> SRR1560214 1 0.0592 0.988 0.988 0.000 0.012
#> SRR1560215 1 0.0592 0.988 0.988 0.000 0.012
#> SRR1560216 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560217 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560218 3 0.0892 0.973 0.000 0.020 0.980
#> SRR1560219 3 0.1031 0.971 0.000 0.024 0.976
#> SRR1560220 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560221 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560222 1 0.0424 0.990 0.992 0.008 0.000
#> SRR1560223 1 0.0424 0.990 0.992 0.008 0.000
#> SRR1560224 1 0.0424 0.990 0.992 0.008 0.000
#> SRR1560225 1 0.0237 0.993 0.996 0.004 0.000
#> SRR1560226 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560229 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560230 1 0.0000 0.995 1.000 0.000 0.000
#> SRR1560231 3 0.0000 0.987 0.000 0.000 1.000
#> SRR1560232 1 0.0747 0.986 0.984 0.000 0.016
#> SRR1560233 2 0.3340 0.873 0.000 0.880 0.120
#> SRR1560234 2 0.3192 0.885 0.000 0.888 0.112
#> SRR1560235 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560236 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560237 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560238 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560239 2 0.0424 0.971 0.000 0.992 0.008
#> SRR1560240 1 0.0592 0.988 0.988 0.000 0.012
#> SRR1560241 2 0.0892 0.965 0.000 0.980 0.020
#> SRR1560242 1 0.0237 0.993 0.996 0.004 0.000
#> SRR1560243 2 0.0000 0.969 0.000 1.000 0.000
#> SRR1560244 2 0.0424 0.971 0.000 0.992 0.008
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560166 4 0.3528 0.578 0.000 0.192 0.000 0.808
#> SRR1560167 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560168 4 0.0188 0.770 0.000 0.004 0.000 0.996
#> SRR1560169 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.4072 0.890 0.000 0.748 0.000 0.252
#> SRR1560171 2 0.4072 0.890 0.000 0.748 0.000 0.252
#> SRR1560172 2 0.3801 0.888 0.000 0.780 0.000 0.220
#> SRR1560173 1 0.2081 0.888 0.916 0.084 0.000 0.000
#> SRR1560174 2 0.4072 0.890 0.000 0.748 0.000 0.252
#> SRR1560175 2 0.1118 0.748 0.000 0.964 0.000 0.036
#> SRR1560176 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560177 2 0.4331 0.868 0.000 0.712 0.000 0.288
#> SRR1560178 3 0.2921 0.831 0.000 0.140 0.860 0.000
#> SRR1560179 2 0.3942 0.890 0.000 0.764 0.000 0.236
#> SRR1560180 1 0.4086 0.855 0.776 0.216 0.008 0.000
#> SRR1560181 4 0.3099 0.730 0.000 0.020 0.104 0.876
#> SRR1560182 2 0.4434 0.888 0.000 0.756 0.016 0.228
#> SRR1560183 4 0.3037 0.732 0.000 0.020 0.100 0.880
#> SRR1560184 3 0.0000 0.909 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.909 0.000 0.000 1.000 0.000
#> SRR1560186 1 0.5613 0.794 0.736 0.128 0.132 0.004
#> SRR1560187 1 0.4711 0.851 0.784 0.152 0.000 0.064
#> SRR1560188 4 0.0188 0.771 0.000 0.004 0.000 0.996
#> SRR1560189 4 0.0188 0.771 0.000 0.004 0.000 0.996
#> SRR1560190 4 0.2281 0.715 0.000 0.096 0.000 0.904
#> SRR1560191 4 0.3688 0.544 0.000 0.208 0.000 0.792
#> SRR1560192 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.4072 0.890 0.000 0.748 0.000 0.252
#> SRR1560194 3 0.4661 0.500 0.000 0.348 0.652 0.000
#> SRR1560195 3 0.0000 0.909 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.909 0.000 0.000 1.000 0.000
#> SRR1560197 3 0.1211 0.896 0.000 0.040 0.960 0.000
#> SRR1560198 1 0.2760 0.887 0.872 0.128 0.000 0.000
#> SRR1560200 1 0.0592 0.899 0.984 0.016 0.000 0.000
#> SRR1560199 3 0.3726 0.747 0.000 0.212 0.788 0.000
#> SRR1560201 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560202 4 0.4699 0.472 0.004 0.000 0.320 0.676
#> SRR1560203 1 0.2944 0.885 0.868 0.128 0.000 0.004
#> SRR1560204 1 0.2944 0.885 0.868 0.128 0.000 0.004
#> SRR1560205 3 0.0000 0.909 0.000 0.000 1.000 0.000
#> SRR1560206 2 0.2281 0.806 0.000 0.904 0.000 0.096
#> SRR1560207 1 0.3486 0.871 0.812 0.188 0.000 0.000
#> SRR1560208 2 0.4382 0.861 0.000 0.704 0.000 0.296
#> SRR1560209 2 0.3801 0.888 0.000 0.780 0.000 0.220
#> SRR1560210 3 0.0000 0.909 0.000 0.000 1.000 0.000
#> SRR1560211 2 0.4933 0.854 0.000 0.688 0.016 0.296
#> SRR1560212 2 0.4989 0.753 0.000 0.764 0.164 0.072
#> SRR1560213 4 0.2675 0.706 0.000 0.100 0.008 0.892
#> SRR1560214 1 0.4040 0.841 0.752 0.248 0.000 0.000
#> SRR1560215 1 0.4331 0.809 0.712 0.288 0.000 0.000
#> SRR1560216 1 0.3801 0.858 0.780 0.220 0.000 0.000
#> SRR1560217 1 0.3801 0.858 0.780 0.220 0.000 0.000
#> SRR1560218 3 0.2589 0.827 0.000 0.000 0.884 0.116
#> SRR1560219 3 0.2921 0.807 0.000 0.000 0.860 0.140
#> SRR1560220 3 0.0336 0.906 0.000 0.008 0.992 0.000
#> SRR1560221 3 0.2530 0.856 0.000 0.112 0.888 0.000
#> SRR1560222 4 0.4277 0.637 0.280 0.000 0.000 0.720
#> SRR1560223 4 0.4250 0.641 0.276 0.000 0.000 0.724
#> SRR1560224 4 0.4304 0.634 0.284 0.000 0.000 0.716
#> SRR1560225 4 0.4977 0.312 0.460 0.000 0.000 0.540
#> SRR1560226 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560229 2 0.0000 0.714 0.000 1.000 0.000 0.000
#> SRR1560230 1 0.0000 0.899 1.000 0.000 0.000 0.000
#> SRR1560231 3 0.0000 0.909 0.000 0.000 1.000 0.000
#> SRR1560232 1 0.2546 0.886 0.900 0.092 0.008 0.000
#> SRR1560233 2 0.5898 0.784 0.000 0.628 0.056 0.316
#> SRR1560234 2 0.4804 0.852 0.000 0.776 0.064 0.160
#> SRR1560235 4 0.2530 0.699 0.000 0.112 0.000 0.888
#> SRR1560236 4 0.2011 0.729 0.000 0.080 0.000 0.920
#> SRR1560237 2 0.4040 0.890 0.000 0.752 0.000 0.248
#> SRR1560238 4 0.0188 0.770 0.000 0.004 0.000 0.996
#> SRR1560239 2 0.4331 0.868 0.000 0.712 0.000 0.288
#> SRR1560240 1 0.4164 0.831 0.736 0.264 0.000 0.000
#> SRR1560241 2 0.0000 0.714 0.000 1.000 0.000 0.000
#> SRR1560242 4 0.4304 0.633 0.284 0.000 0.000 0.716
#> SRR1560243 4 0.0188 0.771 0.000 0.004 0.000 0.996
#> SRR1560244 2 0.3726 0.886 0.000 0.788 0.000 0.212
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0404 0.7155 0.988 0.000 0.000 0.012 0.000
#> SRR1560165 1 0.0404 0.7155 0.988 0.000 0.000 0.012 0.000
#> SRR1560166 5 0.4060 0.6060 0.000 0.360 0.000 0.000 0.640
#> SRR1560167 1 0.0290 0.7165 0.992 0.000 0.000 0.008 0.000
#> SRR1560168 5 0.2329 0.7837 0.000 0.124 0.000 0.000 0.876
#> SRR1560169 1 0.0290 0.7165 0.992 0.000 0.000 0.008 0.000
#> SRR1560170 2 0.0794 0.8843 0.000 0.972 0.000 0.000 0.028
#> SRR1560171 2 0.0510 0.8863 0.000 0.984 0.000 0.000 0.016
#> SRR1560172 2 0.0566 0.8866 0.000 0.984 0.000 0.004 0.012
#> SRR1560173 1 0.3636 0.4209 0.728 0.000 0.000 0.272 0.000
#> SRR1560174 2 0.0609 0.8858 0.000 0.980 0.000 0.000 0.020
#> SRR1560175 2 0.3006 0.7942 0.000 0.836 0.004 0.156 0.004
#> SRR1560176 1 0.0000 0.7156 1.000 0.000 0.000 0.000 0.000
#> SRR1560177 2 0.3342 0.8362 0.000 0.836 0.008 0.020 0.136
#> SRR1560178 3 0.3796 0.5862 0.000 0.300 0.700 0.000 0.000
#> SRR1560179 2 0.2608 0.8629 0.000 0.888 0.004 0.020 0.088
#> SRR1560180 4 0.4713 0.3030 0.388 0.004 0.004 0.596 0.008
#> SRR1560181 5 0.4649 0.6453 0.000 0.024 0.128 0.076 0.772
#> SRR1560182 2 0.3516 0.8304 0.000 0.836 0.004 0.052 0.108
#> SRR1560183 5 0.4643 0.6521 0.000 0.028 0.120 0.076 0.776
#> SRR1560184 3 0.0000 0.7911 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 0.7911 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 4 0.7048 0.3070 0.312 0.000 0.204 0.460 0.024
#> SRR1560187 4 0.4203 0.6686 0.188 0.000 0.000 0.760 0.052
#> SRR1560188 5 0.1732 0.7742 0.000 0.080 0.000 0.000 0.920
#> SRR1560189 5 0.1732 0.7742 0.000 0.080 0.000 0.000 0.920
#> SRR1560190 5 0.3534 0.7330 0.000 0.256 0.000 0.000 0.744
#> SRR1560191 5 0.4030 0.6181 0.000 0.352 0.000 0.000 0.648
#> SRR1560192 1 0.0290 0.7165 0.992 0.000 0.000 0.008 0.000
#> SRR1560193 2 0.0955 0.8847 0.000 0.968 0.000 0.004 0.028
#> SRR1560194 3 0.4451 0.1106 0.000 0.492 0.504 0.004 0.000
#> SRR1560195 3 0.0000 0.7911 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.7911 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 3 0.2719 0.7452 0.000 0.144 0.852 0.004 0.000
#> SRR1560198 1 0.4278 -0.0016 0.548 0.000 0.000 0.452 0.000
#> SRR1560200 1 0.2052 0.6647 0.912 0.004 0.004 0.080 0.000
#> SRR1560199 3 0.4367 0.4446 0.000 0.372 0.620 0.008 0.000
#> SRR1560201 1 0.0290 0.7165 0.992 0.000 0.000 0.008 0.000
#> SRR1560202 5 0.5788 0.3572 0.004 0.008 0.320 0.076 0.592
#> SRR1560203 1 0.4905 -0.0844 0.500 0.000 0.000 0.476 0.024
#> SRR1560204 1 0.4905 -0.0844 0.500 0.000 0.000 0.476 0.024
#> SRR1560205 3 0.0000 0.7911 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 2 0.2953 0.8052 0.000 0.844 0.000 0.144 0.012
#> SRR1560207 1 0.4287 -0.0417 0.540 0.000 0.000 0.460 0.000
#> SRR1560208 2 0.2522 0.8248 0.000 0.880 0.000 0.012 0.108
#> SRR1560209 2 0.0486 0.8867 0.000 0.988 0.004 0.004 0.004
#> SRR1560210 3 0.0162 0.7901 0.000 0.004 0.996 0.000 0.000
#> SRR1560211 2 0.2881 0.8106 0.000 0.860 0.004 0.012 0.124
#> SRR1560212 2 0.2763 0.7772 0.000 0.848 0.148 0.004 0.000
#> SRR1560213 5 0.4499 0.7043 0.000 0.164 0.012 0.060 0.764
#> SRR1560214 4 0.1732 0.7789 0.080 0.000 0.000 0.920 0.000
#> SRR1560215 4 0.1914 0.7793 0.060 0.016 0.000 0.924 0.000
#> SRR1560216 4 0.2516 0.7613 0.140 0.000 0.000 0.860 0.000
#> SRR1560217 4 0.2516 0.7613 0.140 0.000 0.000 0.860 0.000
#> SRR1560218 3 0.4771 0.5289 0.000 0.004 0.712 0.060 0.224
#> SRR1560219 3 0.5437 0.3709 0.000 0.008 0.608 0.060 0.324
#> SRR1560220 3 0.3132 0.6770 0.000 0.008 0.820 0.172 0.000
#> SRR1560221 3 0.4497 0.6779 0.000 0.208 0.732 0.060 0.000
#> SRR1560222 1 0.5484 0.3332 0.540 0.000 0.000 0.068 0.392
#> SRR1560223 1 0.5499 0.3185 0.532 0.000 0.000 0.068 0.400
#> SRR1560224 1 0.5629 0.3230 0.548 0.036 0.000 0.024 0.392
#> SRR1560225 1 0.3003 0.6122 0.812 0.000 0.000 0.000 0.188
#> SRR1560226 1 0.0162 0.7153 0.996 0.000 0.000 0.004 0.000
#> SRR1560227 1 0.0162 0.7153 0.996 0.000 0.000 0.004 0.000
#> SRR1560228 1 0.0290 0.7165 0.992 0.000 0.000 0.008 0.000
#> SRR1560229 4 0.3783 0.5906 0.000 0.252 0.000 0.740 0.008
#> SRR1560230 1 0.0162 0.7153 0.996 0.000 0.000 0.004 0.000
#> SRR1560231 3 0.0162 0.7901 0.000 0.004 0.996 0.000 0.000
#> SRR1560232 1 0.4270 0.2988 0.656 0.004 0.004 0.336 0.000
#> SRR1560233 2 0.3806 0.7185 0.000 0.796 0.024 0.008 0.172
#> SRR1560234 2 0.1571 0.8667 0.000 0.936 0.060 0.004 0.000
#> SRR1560235 5 0.3636 0.7183 0.000 0.272 0.000 0.000 0.728
#> SRR1560236 5 0.3424 0.7444 0.000 0.240 0.000 0.000 0.760
#> SRR1560237 2 0.0290 0.8879 0.000 0.992 0.000 0.000 0.008
#> SRR1560238 5 0.2732 0.7799 0.000 0.160 0.000 0.000 0.840
#> SRR1560239 2 0.3061 0.8458 0.000 0.844 0.000 0.020 0.136
#> SRR1560240 4 0.2291 0.7796 0.072 0.012 0.000 0.908 0.008
#> SRR1560241 4 0.2462 0.7244 0.000 0.112 0.000 0.880 0.008
#> SRR1560242 1 0.5556 0.2246 0.476 0.000 0.000 0.068 0.456
#> SRR1560243 5 0.2102 0.7230 0.004 0.012 0.000 0.068 0.916
#> SRR1560244 2 0.2473 0.8659 0.000 0.896 0.000 0.032 0.072
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0603 0.8269 0.980 0.000 0.000 0.016 0.004 0.000
#> SRR1560165 1 0.0603 0.8269 0.980 0.000 0.000 0.016 0.004 0.000
#> SRR1560166 6 0.3139 0.7340 0.000 0.160 0.000 0.000 0.028 0.812
#> SRR1560167 1 0.0405 0.8270 0.988 0.000 0.000 0.004 0.008 0.000
#> SRR1560168 6 0.1794 0.7956 0.000 0.040 0.000 0.000 0.036 0.924
#> SRR1560169 1 0.0146 0.8281 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1560170 2 0.2020 0.8184 0.000 0.896 0.000 0.000 0.008 0.096
#> SRR1560171 2 0.1411 0.8298 0.000 0.936 0.000 0.000 0.004 0.060
#> SRR1560172 2 0.1138 0.8310 0.000 0.960 0.000 0.004 0.012 0.024
#> SRR1560173 1 0.2489 0.7371 0.860 0.000 0.000 0.128 0.012 0.000
#> SRR1560174 2 0.1588 0.8268 0.000 0.924 0.000 0.000 0.004 0.072
#> SRR1560175 2 0.2094 0.8020 0.000 0.908 0.000 0.068 0.016 0.008
#> SRR1560176 1 0.2249 0.7850 0.900 0.000 0.000 0.032 0.064 0.004
#> SRR1560177 2 0.4660 0.6092 0.000 0.612 0.000 0.000 0.328 0.060
#> SRR1560178 3 0.4313 0.5631 0.000 0.284 0.668 0.000 0.048 0.000
#> SRR1560179 2 0.3986 0.7220 0.000 0.732 0.000 0.008 0.228 0.032
#> SRR1560180 1 0.5024 0.1158 0.512 0.016 0.000 0.432 0.040 0.000
#> SRR1560181 5 0.4746 0.5395 0.000 0.012 0.060 0.004 0.680 0.244
#> SRR1560182 2 0.5118 0.5013 0.000 0.556 0.008 0.008 0.380 0.048
#> SRR1560183 5 0.4778 0.5379 0.000 0.016 0.056 0.004 0.680 0.244
#> SRR1560184 3 0.0547 0.7624 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR1560185 3 0.0547 0.7624 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR1560186 4 0.7167 0.4645 0.128 0.000 0.224 0.488 0.148 0.012
#> SRR1560187 4 0.4744 0.5949 0.064 0.000 0.000 0.708 0.196 0.032
#> SRR1560188 6 0.1204 0.7539 0.000 0.000 0.000 0.000 0.056 0.944
#> SRR1560189 6 0.1204 0.7539 0.000 0.000 0.000 0.000 0.056 0.944
#> SRR1560190 6 0.1610 0.8123 0.000 0.084 0.000 0.000 0.000 0.916
#> SRR1560191 6 0.2703 0.7398 0.000 0.172 0.000 0.000 0.004 0.824
#> SRR1560192 1 0.0146 0.8281 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1560193 2 0.2405 0.8187 0.000 0.880 0.000 0.004 0.016 0.100
#> SRR1560194 3 0.5703 0.0842 0.000 0.416 0.424 0.000 0.160 0.000
#> SRR1560195 3 0.0000 0.7646 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.7646 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 3 0.4012 0.6386 0.000 0.084 0.752 0.000 0.164 0.000
#> SRR1560198 4 0.5474 0.2546 0.416 0.000 0.000 0.480 0.096 0.008
#> SRR1560200 1 0.1823 0.8098 0.932 0.008 0.004 0.028 0.028 0.000
#> SRR1560199 3 0.5714 0.2954 0.000 0.340 0.484 0.000 0.176 0.000
#> SRR1560201 1 0.0405 0.8264 0.988 0.000 0.000 0.008 0.004 0.000
#> SRR1560202 5 0.5327 0.5753 0.000 0.004 0.160 0.016 0.656 0.164
#> SRR1560203 4 0.5785 0.4487 0.312 0.000 0.000 0.528 0.148 0.012
#> SRR1560204 4 0.5785 0.4487 0.312 0.000 0.000 0.528 0.148 0.012
#> SRR1560205 3 0.0547 0.7624 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR1560206 2 0.2978 0.7872 0.000 0.856 0.000 0.084 0.052 0.008
#> SRR1560207 1 0.3652 0.5556 0.720 0.000 0.000 0.264 0.016 0.000
#> SRR1560208 2 0.3977 0.7526 0.000 0.760 0.000 0.000 0.144 0.096
#> SRR1560209 2 0.0767 0.8322 0.000 0.976 0.000 0.004 0.008 0.012
#> SRR1560210 3 0.0993 0.7578 0.000 0.012 0.964 0.000 0.024 0.000
#> SRR1560211 2 0.4490 0.7217 0.000 0.716 0.004 0.000 0.172 0.108
#> SRR1560212 2 0.1946 0.8003 0.000 0.912 0.072 0.000 0.012 0.004
#> SRR1560213 5 0.4948 0.4426 0.000 0.096 0.004 0.000 0.636 0.264
#> SRR1560214 4 0.1285 0.6816 0.052 0.004 0.000 0.944 0.000 0.000
#> SRR1560215 4 0.1334 0.6770 0.032 0.020 0.000 0.948 0.000 0.000
#> SRR1560216 4 0.2949 0.6943 0.116 0.000 0.000 0.848 0.028 0.008
#> SRR1560217 4 0.2949 0.6943 0.116 0.000 0.000 0.848 0.028 0.008
#> SRR1560218 5 0.4607 0.3244 0.000 0.008 0.392 0.000 0.572 0.028
#> SRR1560219 5 0.4867 0.4424 0.000 0.012 0.284 0.000 0.640 0.064
#> SRR1560220 3 0.2805 0.6673 0.000 0.000 0.812 0.184 0.004 0.000
#> SRR1560221 3 0.4630 0.6640 0.000 0.136 0.732 0.108 0.024 0.000
#> SRR1560222 5 0.6370 0.4027 0.272 0.000 0.000 0.044 0.508 0.176
#> SRR1560223 5 0.6356 0.4050 0.268 0.000 0.000 0.044 0.512 0.176
#> SRR1560224 6 0.6708 -0.0138 0.284 0.000 0.000 0.052 0.216 0.448
#> SRR1560225 1 0.5727 0.3570 0.552 0.000 0.000 0.024 0.112 0.312
#> SRR1560226 1 0.3307 0.7365 0.828 0.000 0.000 0.040 0.120 0.012
#> SRR1560227 1 0.3307 0.7365 0.828 0.000 0.000 0.040 0.120 0.012
#> SRR1560228 1 0.0000 0.8278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560229 4 0.4724 0.4293 0.000 0.288 0.000 0.648 0.052 0.012
#> SRR1560230 1 0.3174 0.7455 0.840 0.000 0.000 0.040 0.108 0.012
#> SRR1560231 3 0.0508 0.7632 0.000 0.012 0.984 0.000 0.004 0.000
#> SRR1560232 1 0.3043 0.7130 0.832 0.008 0.000 0.140 0.020 0.000
#> SRR1560233 2 0.5052 0.5633 0.000 0.644 0.028 0.000 0.060 0.268
#> SRR1560234 2 0.0551 0.8327 0.000 0.984 0.008 0.000 0.004 0.004
#> SRR1560235 6 0.1863 0.8021 0.000 0.104 0.000 0.000 0.000 0.896
#> SRR1560236 6 0.1267 0.8137 0.000 0.060 0.000 0.000 0.000 0.940
#> SRR1560237 2 0.1010 0.8338 0.000 0.960 0.000 0.000 0.004 0.036
#> SRR1560238 6 0.1765 0.8070 0.000 0.052 0.000 0.000 0.024 0.924
#> SRR1560239 2 0.4075 0.7195 0.000 0.712 0.000 0.000 0.240 0.048
#> SRR1560240 4 0.2711 0.6605 0.048 0.016 0.000 0.880 0.056 0.000
#> SRR1560241 4 0.3384 0.5961 0.000 0.120 0.000 0.812 0.068 0.000
#> SRR1560242 5 0.5946 0.4772 0.164 0.008 0.000 0.044 0.620 0.164
#> SRR1560243 5 0.4365 0.4414 0.000 0.008 0.000 0.024 0.636 0.332
#> SRR1560244 2 0.2813 0.8007 0.000 0.864 0.000 0.036 0.092 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 15546 rows and 81 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 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.848 0.912 0.962 0.4164 0.588 0.588
#> 3 3 0.424 0.461 0.733 0.5475 0.667 0.474
#> 4 4 0.618 0.517 0.787 0.1468 0.685 0.328
#> 5 5 0.803 0.820 0.917 0.0684 0.876 0.595
#> 6 6 0.704 0.696 0.814 0.0472 0.882 0.524
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
#> SRR1560164 1 0.0000 0.938 1.000 0.000
#> SRR1560165 1 0.0000 0.938 1.000 0.000
#> SRR1560166 2 0.0000 0.966 0.000 1.000
#> SRR1560167 1 0.0000 0.938 1.000 0.000
#> SRR1560168 2 0.0000 0.966 0.000 1.000
#> SRR1560169 1 0.0000 0.938 1.000 0.000
#> SRR1560170 2 0.0000 0.966 0.000 1.000
#> SRR1560171 2 0.0000 0.966 0.000 1.000
#> SRR1560172 2 0.0000 0.966 0.000 1.000
#> SRR1560173 1 0.0000 0.938 1.000 0.000
#> SRR1560174 2 0.0000 0.966 0.000 1.000
#> SRR1560175 2 0.1843 0.945 0.028 0.972
#> SRR1560176 1 0.0000 0.938 1.000 0.000
#> SRR1560177 2 0.0000 0.966 0.000 1.000
#> SRR1560178 2 0.0000 0.966 0.000 1.000
#> SRR1560179 2 0.0000 0.966 0.000 1.000
#> SRR1560180 2 0.3431 0.915 0.064 0.936
#> SRR1560181 2 0.0000 0.966 0.000 1.000
#> SRR1560182 2 0.0000 0.966 0.000 1.000
#> SRR1560183 2 0.0000 0.966 0.000 1.000
#> SRR1560184 2 0.0000 0.966 0.000 1.000
#> SRR1560185 2 0.0000 0.966 0.000 1.000
#> SRR1560186 2 0.0000 0.966 0.000 1.000
#> SRR1560187 2 0.0938 0.958 0.012 0.988
#> SRR1560188 2 0.3274 0.916 0.060 0.940
#> SRR1560189 2 0.3274 0.916 0.060 0.940
#> SRR1560190 2 0.9248 0.491 0.340 0.660
#> SRR1560191 2 0.0000 0.966 0.000 1.000
#> SRR1560192 1 0.0000 0.938 1.000 0.000
#> SRR1560193 2 0.0000 0.966 0.000 1.000
#> SRR1560194 2 0.0000 0.966 0.000 1.000
#> SRR1560195 2 0.0000 0.966 0.000 1.000
#> SRR1560196 2 0.0000 0.966 0.000 1.000
#> SRR1560197 2 0.0000 0.966 0.000 1.000
#> SRR1560198 2 0.9248 0.491 0.340 0.660
#> SRR1560200 2 0.3274 0.916 0.060 0.940
#> SRR1560199 2 0.0000 0.966 0.000 1.000
#> SRR1560201 1 0.0000 0.938 1.000 0.000
#> SRR1560202 2 0.0000 0.966 0.000 1.000
#> SRR1560203 1 0.5946 0.828 0.856 0.144
#> SRR1560204 1 0.8207 0.701 0.744 0.256
#> SRR1560205 2 0.0000 0.966 0.000 1.000
#> SRR1560206 2 0.0000 0.966 0.000 1.000
#> SRR1560207 1 0.0000 0.938 1.000 0.000
#> SRR1560208 2 0.0000 0.966 0.000 1.000
#> SRR1560209 2 0.0000 0.966 0.000 1.000
#> SRR1560210 2 0.0000 0.966 0.000 1.000
#> SRR1560211 2 0.0000 0.966 0.000 1.000
#> SRR1560212 2 0.0000 0.966 0.000 1.000
#> SRR1560213 2 0.0000 0.966 0.000 1.000
#> SRR1560214 2 0.2043 0.941 0.032 0.968
#> SRR1560215 2 0.0000 0.966 0.000 1.000
#> SRR1560216 1 0.0000 0.938 1.000 0.000
#> SRR1560217 1 0.0000 0.938 1.000 0.000
#> SRR1560218 2 0.0000 0.966 0.000 1.000
#> SRR1560219 2 0.0000 0.966 0.000 1.000
#> SRR1560220 2 0.0000 0.966 0.000 1.000
#> SRR1560221 2 0.0000 0.966 0.000 1.000
#> SRR1560222 1 0.8386 0.683 0.732 0.268
#> SRR1560223 1 0.8386 0.683 0.732 0.268
#> SRR1560224 1 0.2778 0.908 0.952 0.048
#> SRR1560225 1 0.0000 0.938 1.000 0.000
#> SRR1560226 1 0.0000 0.938 1.000 0.000
#> SRR1560227 1 0.0000 0.938 1.000 0.000
#> SRR1560228 1 0.0000 0.938 1.000 0.000
#> SRR1560229 2 0.6887 0.774 0.184 0.816
#> SRR1560230 1 0.0000 0.938 1.000 0.000
#> SRR1560231 2 0.4690 0.871 0.100 0.900
#> SRR1560232 1 0.0000 0.938 1.000 0.000
#> SRR1560233 2 0.0000 0.966 0.000 1.000
#> SRR1560234 2 0.0000 0.966 0.000 1.000
#> SRR1560235 2 0.0000 0.966 0.000 1.000
#> SRR1560236 2 0.2423 0.935 0.040 0.960
#> SRR1560237 2 0.0000 0.966 0.000 1.000
#> SRR1560238 2 0.0000 0.966 0.000 1.000
#> SRR1560239 2 0.0000 0.966 0.000 1.000
#> SRR1560240 2 0.9977 -0.021 0.472 0.528
#> SRR1560241 2 0.0000 0.966 0.000 1.000
#> SRR1560242 1 0.8909 0.614 0.692 0.308
#> SRR1560243 2 0.0000 0.966 0.000 1.000
#> SRR1560244 2 0.0000 0.966 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560166 2 0.6180 0.2715 0.000 0.584 0.416
#> SRR1560167 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560168 2 0.4452 0.4994 0.000 0.808 0.192
#> SRR1560169 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560170 2 0.6280 0.2153 0.000 0.540 0.460
#> SRR1560171 3 0.6192 -0.0757 0.000 0.420 0.580
#> SRR1560172 3 0.3116 0.4205 0.000 0.108 0.892
#> SRR1560173 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560174 3 0.6204 -0.0817 0.000 0.424 0.576
#> SRR1560175 3 0.0237 0.4334 0.000 0.004 0.996
#> SRR1560176 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560177 2 0.4796 0.3977 0.000 0.780 0.220
#> SRR1560178 3 0.4121 0.4899 0.000 0.168 0.832
#> SRR1560179 2 0.5706 0.3034 0.000 0.680 0.320
#> SRR1560180 3 0.7030 0.3527 0.024 0.396 0.580
#> SRR1560181 2 0.3116 0.5015 0.000 0.892 0.108
#> SRR1560182 2 0.4605 0.4143 0.000 0.796 0.204
#> SRR1560183 2 0.0000 0.5413 0.000 1.000 0.000
#> SRR1560184 2 0.4605 0.4143 0.000 0.796 0.204
#> SRR1560185 2 0.4605 0.4143 0.000 0.796 0.204
#> SRR1560186 2 0.3752 0.4885 0.000 0.856 0.144
#> SRR1560187 2 0.2945 0.5141 0.004 0.908 0.088
#> SRR1560188 2 0.3038 0.5435 0.000 0.896 0.104
#> SRR1560189 2 0.3038 0.5435 0.000 0.896 0.104
#> SRR1560190 2 0.9030 0.1815 0.136 0.476 0.388
#> SRR1560191 2 0.6079 0.3013 0.000 0.612 0.388
#> SRR1560192 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560193 3 0.6299 -0.1649 0.000 0.476 0.524
#> SRR1560194 3 0.4121 0.4899 0.000 0.168 0.832
#> SRR1560195 3 0.6267 0.3991 0.000 0.452 0.548
#> SRR1560196 3 0.6267 0.3991 0.000 0.452 0.548
#> SRR1560197 3 0.6267 0.3991 0.000 0.452 0.548
#> SRR1560198 1 0.8350 0.2839 0.532 0.088 0.380
#> SRR1560200 2 0.5859 -0.0238 0.000 0.656 0.344
#> SRR1560199 3 0.6267 0.3991 0.000 0.452 0.548
#> SRR1560201 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560202 2 0.0000 0.5413 0.000 1.000 0.000
#> SRR1560203 1 0.6229 0.6947 0.764 0.172 0.064
#> SRR1560204 2 0.7890 0.2889 0.372 0.564 0.064
#> SRR1560205 3 0.6267 0.3991 0.000 0.452 0.548
#> SRR1560206 3 0.4504 0.3650 0.000 0.196 0.804
#> SRR1560207 1 0.2165 0.8839 0.936 0.000 0.064
#> SRR1560208 3 0.6295 -0.1586 0.000 0.472 0.528
#> SRR1560209 3 0.2165 0.4456 0.000 0.064 0.936
#> SRR1560210 2 0.6154 -0.2513 0.000 0.592 0.408
#> SRR1560211 2 0.4178 0.4486 0.000 0.828 0.172
#> SRR1560212 3 0.4121 0.4899 0.000 0.168 0.832
#> SRR1560213 2 0.4605 0.4156 0.000 0.796 0.204
#> SRR1560214 3 0.6252 0.1231 0.000 0.444 0.556
#> SRR1560215 3 0.5254 0.3325 0.000 0.264 0.736
#> SRR1560216 1 0.2261 0.8821 0.932 0.000 0.068
#> SRR1560217 1 0.6079 0.5020 0.612 0.000 0.388
#> SRR1560218 2 0.3686 0.4792 0.000 0.860 0.140
#> SRR1560219 2 0.4504 0.4229 0.000 0.804 0.196
#> SRR1560220 3 0.6079 0.3731 0.000 0.388 0.612
#> SRR1560221 3 0.5650 0.4291 0.000 0.312 0.688
#> SRR1560222 2 0.4178 0.4912 0.172 0.828 0.000
#> SRR1560223 2 0.4178 0.4912 0.172 0.828 0.000
#> SRR1560224 1 0.5058 0.6768 0.756 0.244 0.000
#> SRR1560225 1 0.1860 0.8852 0.948 0.052 0.000
#> SRR1560226 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560229 2 0.9400 0.2648 0.180 0.464 0.356
#> SRR1560230 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560231 3 0.6267 0.3991 0.000 0.452 0.548
#> SRR1560232 1 0.0000 0.9190 1.000 0.000 0.000
#> SRR1560233 2 0.4796 0.4280 0.000 0.780 0.220
#> SRR1560234 3 0.4178 0.4885 0.000 0.172 0.828
#> SRR1560235 2 0.6079 0.3013 0.000 0.612 0.388
#> SRR1560236 2 0.5529 0.3890 0.000 0.704 0.296
#> SRR1560237 3 0.6192 -0.0757 0.000 0.420 0.580
#> SRR1560238 2 0.6079 0.3013 0.000 0.612 0.388
#> SRR1560239 2 0.6309 0.0380 0.000 0.504 0.496
#> SRR1560240 2 0.5138 0.4800 0.000 0.748 0.252
#> SRR1560241 2 0.5760 0.4586 0.000 0.672 0.328
#> SRR1560242 2 0.5253 0.5151 0.076 0.828 0.096
#> SRR1560243 2 0.3038 0.5435 0.000 0.896 0.104
#> SRR1560244 3 0.6062 -0.0369 0.000 0.384 0.616
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.0000 0.52810 0.000 1.000 0.000 0.000
#> SRR1560167 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560168 3 0.4989 0.31660 0.000 0.472 0.528 0.000
#> SRR1560169 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.0000 0.52810 0.000 1.000 0.000 0.000
#> SRR1560171 2 0.4967 0.41667 0.000 0.548 0.452 0.000
#> SRR1560172 2 0.4961 0.41989 0.000 0.552 0.448 0.000
#> SRR1560173 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560174 2 0.4941 0.42671 0.000 0.564 0.436 0.000
#> SRR1560175 2 0.4967 -0.00676 0.000 0.548 0.000 0.452
#> SRR1560176 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560177 3 0.0469 0.53185 0.000 0.012 0.988 0.000
#> SRR1560178 3 0.7588 -0.15469 0.000 0.320 0.464 0.216
#> SRR1560179 3 0.0336 0.53362 0.000 0.008 0.992 0.000
#> SRR1560180 4 0.0000 0.83898 0.000 0.000 0.000 1.000
#> SRR1560181 3 0.0000 0.53535 0.000 0.000 1.000 0.000
#> SRR1560182 3 0.0336 0.53362 0.000 0.008 0.992 0.000
#> SRR1560183 3 0.4977 0.32655 0.000 0.460 0.540 0.000
#> SRR1560184 3 0.0000 0.53535 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.53535 0.000 0.000 1.000 0.000
#> SRR1560186 3 0.4961 -0.09096 0.000 0.000 0.552 0.448
#> SRR1560187 3 0.4981 -0.12160 0.000 0.000 0.536 0.464
#> SRR1560188 3 0.4981 0.32370 0.000 0.464 0.536 0.000
#> SRR1560189 3 0.4981 0.32370 0.000 0.464 0.536 0.000
#> SRR1560190 2 0.0000 0.52810 0.000 1.000 0.000 0.000
#> SRR1560191 2 0.0000 0.52810 0.000 1.000 0.000 0.000
#> SRR1560192 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.4543 0.48062 0.000 0.676 0.324 0.000
#> SRR1560194 3 0.7608 -0.16212 0.000 0.328 0.456 0.216
#> SRR1560195 3 0.3801 0.45032 0.000 0.000 0.780 0.220
#> SRR1560196 3 0.3801 0.45032 0.000 0.000 0.780 0.220
#> SRR1560197 3 0.4086 0.45088 0.000 0.008 0.776 0.216
#> SRR1560198 4 0.2443 0.83578 0.060 0.000 0.024 0.916
#> SRR1560200 2 0.7379 -0.27611 0.000 0.452 0.384 0.164
#> SRR1560199 3 0.4086 0.45088 0.000 0.008 0.776 0.216
#> SRR1560201 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560202 3 0.4967 0.32799 0.000 0.452 0.548 0.000
#> SRR1560203 4 0.4485 0.76516 0.028 0.000 0.200 0.772
#> SRR1560204 4 0.3942 0.73308 0.000 0.000 0.236 0.764
#> SRR1560205 3 0.3764 0.45239 0.000 0.000 0.784 0.216
#> SRR1560206 3 0.6750 -0.18548 0.000 0.356 0.540 0.104
#> SRR1560207 4 0.3764 0.73580 0.216 0.000 0.000 0.784
#> SRR1560208 2 0.4331 0.49110 0.000 0.712 0.288 0.000
#> SRR1560209 2 0.6985 0.42418 0.000 0.548 0.312 0.140
#> SRR1560210 2 0.7617 -0.23672 0.000 0.452 0.332 0.216
#> SRR1560211 3 0.2530 0.49764 0.000 0.112 0.888 0.000
#> SRR1560212 3 0.7608 -0.16212 0.000 0.328 0.456 0.216
#> SRR1560213 3 0.0524 0.53373 0.000 0.008 0.988 0.004
#> SRR1560214 4 0.0000 0.83898 0.000 0.000 0.000 1.000
#> SRR1560215 4 0.0000 0.83898 0.000 0.000 0.000 1.000
#> SRR1560216 4 0.3726 0.74039 0.212 0.000 0.000 0.788
#> SRR1560217 4 0.0592 0.84155 0.016 0.000 0.000 0.984
#> SRR1560218 3 0.2345 0.50778 0.000 0.100 0.900 0.000
#> SRR1560219 3 0.0000 0.53535 0.000 0.000 1.000 0.000
#> SRR1560220 4 0.0000 0.83898 0.000 0.000 0.000 1.000
#> SRR1560221 4 0.2345 0.74084 0.000 0.000 0.100 0.900
#> SRR1560222 3 0.5383 0.32361 0.012 0.452 0.536 0.000
#> SRR1560223 3 0.5383 0.32361 0.012 0.452 0.536 0.000
#> SRR1560224 1 0.6271 0.22948 0.492 0.452 0.056 0.000
#> SRR1560225 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560226 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560229 4 0.5042 0.76397 0.176 0.012 0.044 0.768
#> SRR1560230 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560231 3 0.3764 0.45239 0.000 0.000 0.784 0.216
#> SRR1560232 1 0.0000 0.95748 1.000 0.000 0.000 0.000
#> SRR1560233 3 0.3764 0.37310 0.000 0.216 0.784 0.000
#> SRR1560234 2 0.4972 0.41118 0.000 0.544 0.456 0.000
#> SRR1560235 2 0.0469 0.51935 0.000 0.988 0.012 0.000
#> SRR1560236 2 0.0707 0.51167 0.000 0.980 0.020 0.000
#> SRR1560237 2 0.4967 0.41667 0.000 0.548 0.452 0.000
#> SRR1560238 2 0.0000 0.52810 0.000 1.000 0.000 0.000
#> SRR1560239 2 0.4967 0.41667 0.000 0.548 0.452 0.000
#> SRR1560240 4 0.3311 0.78986 0.000 0.000 0.172 0.828
#> SRR1560241 4 0.3831 0.76357 0.000 0.004 0.204 0.792
#> SRR1560242 3 0.5383 0.32416 0.000 0.452 0.536 0.012
#> SRR1560243 3 0.4981 0.32370 0.000 0.464 0.536 0.000
#> SRR1560244 3 0.4888 -0.23754 0.000 0.412 0.588 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560167 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.2966 0.7176 0.000 0.184 0.000 0.000 0.816
#> SRR1560169 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560171 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560172 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560173 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560174 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560175 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560176 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560177 5 0.0162 0.8768 0.000 0.004 0.000 0.000 0.996
#> SRR1560178 3 0.4126 0.2866 0.000 0.380 0.620 0.000 0.000
#> SRR1560179 5 0.3336 0.6579 0.000 0.228 0.000 0.000 0.772
#> SRR1560180 4 0.0000 0.8036 0.000 0.000 0.000 1.000 0.000
#> SRR1560181 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560182 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560183 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560184 3 0.3109 0.6962 0.000 0.000 0.800 0.000 0.200
#> SRR1560185 3 0.3109 0.6962 0.000 0.000 0.800 0.000 0.200
#> SRR1560186 5 0.4302 -0.0111 0.000 0.000 0.480 0.000 0.520
#> SRR1560187 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560188 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560189 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560190 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560191 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560192 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560194 2 0.3109 0.7041 0.000 0.800 0.200 0.000 0.000
#> SRR1560195 3 0.0000 0.8358 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.8358 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 5 0.3109 0.7170 0.000 0.000 0.200 0.000 0.800
#> SRR1560198 4 0.0000 0.8036 0.000 0.000 0.000 1.000 0.000
#> SRR1560200 5 0.3134 0.7836 0.000 0.000 0.120 0.032 0.848
#> SRR1560199 5 0.3109 0.7170 0.000 0.000 0.200 0.000 0.800
#> SRR1560201 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560202 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560203 4 0.3109 0.7106 0.000 0.000 0.000 0.800 0.200
#> SRR1560204 4 0.3305 0.6870 0.000 0.000 0.000 0.776 0.224
#> SRR1560205 3 0.0000 0.8358 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 2 0.5774 0.5444 0.000 0.612 0.000 0.232 0.156
#> SRR1560207 4 0.3109 0.7337 0.200 0.000 0.000 0.800 0.000
#> SRR1560208 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560209 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560210 3 0.0000 0.8358 0.000 0.000 1.000 0.000 0.000
#> SRR1560211 5 0.1197 0.8543 0.000 0.048 0.000 0.000 0.952
#> SRR1560212 2 0.3109 0.7041 0.000 0.800 0.200 0.000 0.000
#> SRR1560213 5 0.0162 0.8771 0.000 0.000 0.004 0.000 0.996
#> SRR1560214 4 0.3109 0.7888 0.000 0.000 0.200 0.800 0.000
#> SRR1560215 4 0.3109 0.7888 0.000 0.000 0.200 0.800 0.000
#> SRR1560216 4 0.3231 0.7368 0.196 0.000 0.004 0.800 0.000
#> SRR1560217 4 0.3209 0.7961 0.008 0.000 0.180 0.812 0.000
#> SRR1560218 5 0.0162 0.8767 0.000 0.000 0.004 0.000 0.996
#> SRR1560219 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560220 4 0.3109 0.7888 0.000 0.000 0.200 0.800 0.000
#> SRR1560221 4 0.3109 0.7888 0.000 0.000 0.200 0.800 0.000
#> SRR1560222 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560223 5 0.0000 0.8782 0.000 0.000 0.000 0.000 1.000
#> SRR1560224 1 0.1341 0.9260 0.944 0.000 0.000 0.000 0.056
#> SRR1560225 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560226 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560229 4 0.3048 0.6275 0.000 0.176 0.000 0.820 0.004
#> SRR1560230 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560231 3 0.0162 0.8340 0.000 0.000 0.996 0.000 0.004
#> SRR1560232 1 0.0000 0.9949 1.000 0.000 0.000 0.000 0.000
#> SRR1560233 5 0.3837 0.5871 0.000 0.308 0.000 0.000 0.692
#> SRR1560234 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560235 2 0.2891 0.7237 0.000 0.824 0.000 0.000 0.176
#> SRR1560236 2 0.4235 0.2308 0.000 0.576 0.000 0.000 0.424
#> SRR1560237 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560238 2 0.0000 0.9027 0.000 1.000 0.000 0.000 0.000
#> SRR1560239 2 0.1043 0.8788 0.000 0.960 0.000 0.040 0.000
#> SRR1560240 4 0.0000 0.8036 0.000 0.000 0.000 1.000 0.000
#> SRR1560241 4 0.0404 0.7993 0.000 0.012 0.000 0.988 0.000
#> SRR1560242 5 0.3109 0.7466 0.000 0.000 0.000 0.200 0.800
#> SRR1560243 5 0.3109 0.7466 0.000 0.000 0.000 0.200 0.800
#> SRR1560244 2 0.3496 0.7330 0.000 0.788 0.000 0.200 0.012
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.297 0.6660 0.000 0.776 0.000 0.000 0.224 0.000
#> SRR1560167 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.260 0.5563 0.000 0.176 0.000 0.000 0.824 0.000
#> SRR1560169 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.297 0.6660 0.000 0.776 0.000 0.000 0.224 0.000
#> SRR1560171 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560172 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560173 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560174 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560175 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560176 1 0.314 0.8655 0.832 0.000 0.108 0.000 0.000 0.060
#> SRR1560177 6 0.361 0.7219 0.000 0.000 0.000 0.000 0.348 0.652
#> SRR1560178 6 0.305 0.4751 0.000 0.000 0.236 0.000 0.000 0.764
#> SRR1560179 6 0.361 0.7219 0.000 0.000 0.000 0.000 0.348 0.652
#> SRR1560180 4 0.210 0.8126 0.000 0.000 0.004 0.884 0.000 0.112
#> SRR1560181 5 0.297 0.3761 0.000 0.000 0.000 0.000 0.776 0.224
#> SRR1560182 6 0.361 0.7219 0.000 0.000 0.000 0.000 0.348 0.652
#> SRR1560183 5 0.000 0.6881 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560184 3 0.205 0.8023 0.000 0.000 0.880 0.000 0.120 0.000
#> SRR1560185 3 0.205 0.8023 0.000 0.000 0.880 0.000 0.120 0.000
#> SRR1560186 3 0.361 0.4534 0.000 0.000 0.652 0.000 0.348 0.000
#> SRR1560187 5 0.327 0.4669 0.000 0.000 0.000 0.272 0.728 0.000
#> SRR1560188 5 0.000 0.6881 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560189 5 0.000 0.6881 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560190 2 0.385 0.0792 0.000 0.544 0.000 0.000 0.456 0.000
#> SRR1560191 2 0.171 0.7793 0.000 0.908 0.000 0.000 0.092 0.000
#> SRR1560192 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560194 6 0.324 0.5313 0.000 0.228 0.008 0.000 0.000 0.764
#> SRR1560195 3 0.196 0.8533 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR1560196 3 0.196 0.8533 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR1560197 6 0.324 0.7118 0.000 0.000 0.008 0.000 0.228 0.764
#> SRR1560198 4 0.107 0.8389 0.000 0.000 0.000 0.952 0.000 0.048
#> SRR1560200 5 0.241 0.6543 0.000 0.000 0.004 0.012 0.876 0.108
#> SRR1560199 6 0.324 0.7118 0.000 0.000 0.008 0.000 0.228 0.764
#> SRR1560201 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560202 5 0.000 0.6881 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560203 4 0.205 0.7863 0.000 0.000 0.000 0.880 0.120 0.000
#> SRR1560204 5 0.379 0.2143 0.000 0.000 0.000 0.416 0.584 0.000
#> SRR1560205 3 0.196 0.8533 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR1560206 2 0.502 0.5789 0.000 0.668 0.004 0.136 0.004 0.188
#> SRR1560207 4 0.191 0.8231 0.108 0.000 0.000 0.892 0.000 0.000
#> SRR1560208 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560209 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560210 3 0.196 0.8533 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR1560211 6 0.471 0.6130 0.000 0.048 0.000 0.000 0.412 0.540
#> SRR1560212 2 0.358 0.5374 0.000 0.708 0.008 0.000 0.000 0.284
#> SRR1560213 6 0.361 0.7219 0.000 0.000 0.000 0.000 0.348 0.652
#> SRR1560214 4 0.191 0.8434 0.000 0.000 0.000 0.892 0.000 0.108
#> SRR1560215 4 0.196 0.8423 0.000 0.000 0.000 0.888 0.000 0.112
#> SRR1560216 4 0.201 0.8254 0.104 0.000 0.000 0.892 0.000 0.004
#> SRR1560217 4 0.196 0.8459 0.004 0.000 0.000 0.896 0.000 0.100
#> SRR1560218 6 0.605 0.4150 0.000 0.000 0.304 0.000 0.280 0.416
#> SRR1560219 6 0.361 0.7219 0.000 0.000 0.000 0.000 0.348 0.652
#> SRR1560220 4 0.221 0.8389 0.000 0.000 0.008 0.880 0.000 0.112
#> SRR1560221 4 0.313 0.7633 0.000 0.000 0.008 0.780 0.000 0.212
#> SRR1560222 5 0.000 0.6881 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560223 5 0.000 0.6881 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560224 5 0.566 0.5373 0.108 0.000 0.108 0.000 0.660 0.124
#> SRR1560225 5 0.686 0.0973 0.340 0.000 0.108 0.000 0.428 0.124
#> SRR1560226 1 0.392 0.8233 0.768 0.000 0.108 0.000 0.000 0.124
#> SRR1560227 1 0.392 0.8233 0.768 0.000 0.108 0.000 0.000 0.124
#> SRR1560228 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560229 4 0.542 0.6187 0.000 0.168 0.004 0.672 0.044 0.112
#> SRR1560230 1 0.238 0.8974 0.888 0.000 0.068 0.000 0.000 0.044
#> SRR1560231 6 0.256 0.5177 0.000 0.000 0.156 0.000 0.004 0.840
#> SRR1560232 1 0.000 0.9453 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560233 6 0.566 0.5038 0.000 0.168 0.000 0.000 0.336 0.496
#> SRR1560234 2 0.253 0.6712 0.000 0.832 0.000 0.000 0.000 0.168
#> SRR1560235 5 0.379 0.1728 0.000 0.416 0.000 0.000 0.584 0.000
#> SRR1560236 5 0.362 0.2984 0.000 0.352 0.000 0.000 0.648 0.000
#> SRR1560237 2 0.000 0.8198 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560238 2 0.380 0.2856 0.000 0.576 0.000 0.000 0.424 0.000
#> SRR1560239 6 0.433 0.2147 0.000 0.408 0.000 0.024 0.000 0.568
#> SRR1560240 4 0.210 0.8126 0.000 0.000 0.004 0.884 0.000 0.112
#> SRR1560241 4 0.255 0.8050 0.000 0.016 0.004 0.868 0.000 0.112
#> SRR1560242 5 0.393 0.6237 0.000 0.000 0.004 0.108 0.776 0.112
#> SRR1560243 5 0.393 0.6237 0.000 0.000 0.004 0.108 0.776 0.112
#> SRR1560244 2 0.446 0.6404 0.000 0.732 0.004 0.108 0.004 0.152
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "mclust"]
# you can also extract it by
# res = res_list["MAD:mclust"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.599 0.827 0.906 0.4352 0.516 0.516
#> 3 3 0.779 0.880 0.939 0.1282 0.695 0.544
#> 4 4 0.420 0.364 0.685 0.3003 0.679 0.463
#> 5 5 0.503 0.596 0.733 0.1226 0.711 0.368
#> 6 6 0.500 0.358 0.656 0.0571 0.846 0.512
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
#> SRR1560164 1 0.1633 0.810 0.976 0.024
#> SRR1560165 1 0.1633 0.810 0.976 0.024
#> SRR1560166 2 0.0376 0.950 0.004 0.996
#> SRR1560167 1 0.1633 0.810 0.976 0.024
#> SRR1560168 2 0.7815 0.642 0.232 0.768
#> SRR1560169 1 0.1633 0.810 0.976 0.024
#> SRR1560170 2 0.0000 0.953 0.000 1.000
#> SRR1560171 2 0.0000 0.953 0.000 1.000
#> SRR1560172 2 0.0000 0.953 0.000 1.000
#> SRR1560173 1 0.1633 0.810 0.976 0.024
#> SRR1560174 2 0.0000 0.953 0.000 1.000
#> SRR1560175 1 0.9922 0.472 0.552 0.448
#> SRR1560176 1 0.1633 0.810 0.976 0.024
#> SRR1560177 2 0.0000 0.953 0.000 1.000
#> SRR1560178 2 0.0000 0.953 0.000 1.000
#> SRR1560179 2 0.0000 0.953 0.000 1.000
#> SRR1560180 1 0.9686 0.588 0.604 0.396
#> SRR1560181 2 0.0000 0.953 0.000 1.000
#> SRR1560182 2 0.0000 0.953 0.000 1.000
#> SRR1560183 2 0.0000 0.953 0.000 1.000
#> SRR1560184 2 0.0672 0.946 0.008 0.992
#> SRR1560185 2 0.0672 0.946 0.008 0.992
#> SRR1560186 2 0.5842 0.772 0.140 0.860
#> SRR1560187 1 0.9661 0.594 0.608 0.392
#> SRR1560188 2 0.9460 0.273 0.364 0.636
#> SRR1560189 2 0.8861 0.468 0.304 0.696
#> SRR1560190 2 0.0000 0.953 0.000 1.000
#> SRR1560191 2 0.0000 0.953 0.000 1.000
#> SRR1560192 1 0.1633 0.810 0.976 0.024
#> SRR1560193 2 0.0000 0.953 0.000 1.000
#> SRR1560194 2 0.0000 0.953 0.000 1.000
#> SRR1560195 2 0.0672 0.946 0.008 0.992
#> SRR1560196 2 0.0672 0.946 0.008 0.992
#> SRR1560197 2 0.0000 0.953 0.000 1.000
#> SRR1560198 1 0.7745 0.738 0.772 0.228
#> SRR1560200 1 0.9661 0.594 0.608 0.392
#> SRR1560199 2 0.0000 0.953 0.000 1.000
#> SRR1560201 1 0.1633 0.810 0.976 0.024
#> SRR1560202 2 0.2423 0.916 0.040 0.960
#> SRR1560203 1 0.3879 0.798 0.924 0.076
#> SRR1560204 1 0.7453 0.747 0.788 0.212
#> SRR1560205 2 0.0672 0.946 0.008 0.992
#> SRR1560206 2 0.0000 0.953 0.000 1.000
#> SRR1560207 1 0.1633 0.810 0.976 0.024
#> SRR1560208 2 0.2043 0.924 0.032 0.968
#> SRR1560209 2 0.0000 0.953 0.000 1.000
#> SRR1560210 2 0.0000 0.953 0.000 1.000
#> SRR1560211 2 0.0000 0.953 0.000 1.000
#> SRR1560212 2 0.0376 0.950 0.004 0.996
#> SRR1560213 2 0.0000 0.953 0.000 1.000
#> SRR1560214 1 0.9661 0.594 0.608 0.392
#> SRR1560215 1 0.9661 0.594 0.608 0.392
#> SRR1560216 1 0.1633 0.810 0.976 0.024
#> SRR1560217 1 0.1633 0.810 0.976 0.024
#> SRR1560218 2 0.0000 0.953 0.000 1.000
#> SRR1560219 2 0.0000 0.953 0.000 1.000
#> SRR1560220 2 0.0000 0.953 0.000 1.000
#> SRR1560221 2 0.0000 0.953 0.000 1.000
#> SRR1560222 1 0.9661 0.594 0.608 0.392
#> SRR1560223 1 0.9686 0.588 0.604 0.396
#> SRR1560224 1 0.7815 0.736 0.768 0.232
#> SRR1560225 1 0.7376 0.739 0.792 0.208
#> SRR1560226 1 0.1633 0.810 0.976 0.024
#> SRR1560227 1 0.1633 0.810 0.976 0.024
#> SRR1560228 1 0.1633 0.810 0.976 0.024
#> SRR1560229 2 0.6712 0.726 0.176 0.824
#> SRR1560230 1 0.1633 0.810 0.976 0.024
#> SRR1560231 2 0.0000 0.953 0.000 1.000
#> SRR1560232 1 0.1633 0.810 0.976 0.024
#> SRR1560233 2 0.0000 0.953 0.000 1.000
#> SRR1560234 2 0.0376 0.950 0.004 0.996
#> SRR1560235 2 0.0000 0.953 0.000 1.000
#> SRR1560236 2 0.0376 0.950 0.004 0.996
#> SRR1560237 2 0.0000 0.953 0.000 1.000
#> SRR1560238 2 0.6438 0.767 0.164 0.836
#> SRR1560239 2 0.0672 0.947 0.008 0.992
#> SRR1560240 1 0.9686 0.588 0.604 0.396
#> SRR1560241 1 0.9983 0.393 0.524 0.476
#> SRR1560242 1 0.9710 0.580 0.600 0.400
#> SRR1560243 2 0.8267 0.580 0.260 0.740
#> SRR1560244 2 0.0000 0.953 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560165 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560166 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560167 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560168 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560169 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560170 2 0.0237 0.9397 0.004 0.996 0.000
#> SRR1560171 2 0.0237 0.9397 0.004 0.996 0.000
#> SRR1560172 2 0.0237 0.9397 0.004 0.996 0.000
#> SRR1560173 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560174 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560175 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560176 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560177 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560178 2 0.3551 0.8346 0.000 0.868 0.132
#> SRR1560179 2 0.0237 0.9397 0.004 0.996 0.000
#> SRR1560180 2 0.4062 0.7905 0.164 0.836 0.000
#> SRR1560181 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560182 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560183 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560184 3 0.0424 1.0000 0.000 0.008 0.992
#> SRR1560185 3 0.0424 1.0000 0.000 0.008 0.992
#> SRR1560186 1 0.6280 0.2597 0.540 0.460 0.000
#> SRR1560187 2 0.2537 0.8873 0.080 0.920 0.000
#> SRR1560188 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560189 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560190 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560191 2 0.0237 0.9398 0.000 0.996 0.004
#> SRR1560192 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560193 2 0.0237 0.9397 0.004 0.996 0.000
#> SRR1560194 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560195 3 0.0424 1.0000 0.000 0.008 0.992
#> SRR1560196 3 0.0424 1.0000 0.000 0.008 0.992
#> SRR1560197 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560198 1 0.2711 0.8696 0.912 0.088 0.000
#> SRR1560200 2 0.3038 0.8642 0.104 0.896 0.000
#> SRR1560199 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560201 1 0.2165 0.8934 0.936 0.064 0.000
#> SRR1560202 2 0.2173 0.9246 0.048 0.944 0.008
#> SRR1560203 1 0.2165 0.8934 0.936 0.064 0.000
#> SRR1560204 1 0.3038 0.8515 0.896 0.104 0.000
#> SRR1560205 3 0.0424 1.0000 0.000 0.008 0.992
#> SRR1560206 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560207 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560208 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560209 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560210 2 0.5706 0.5404 0.000 0.680 0.320
#> SRR1560211 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560212 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560213 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560214 2 0.6267 0.0813 0.452 0.548 0.000
#> SRR1560215 2 0.2356 0.8942 0.072 0.928 0.000
#> SRR1560216 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560217 1 0.1860 0.9001 0.948 0.052 0.000
#> SRR1560218 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560219 2 0.1411 0.9277 0.036 0.964 0.000
#> SRR1560220 2 0.3500 0.8503 0.004 0.880 0.116
#> SRR1560221 2 0.2165 0.9020 0.000 0.936 0.064
#> SRR1560222 2 0.5968 0.3823 0.364 0.636 0.000
#> SRR1560223 2 0.2959 0.8684 0.100 0.900 0.000
#> SRR1560224 1 0.5591 0.5727 0.696 0.304 0.000
#> SRR1560225 1 0.6205 0.4224 0.656 0.336 0.008
#> SRR1560226 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560227 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560228 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560229 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560230 1 0.1529 0.9049 0.960 0.040 0.000
#> SRR1560231 2 0.0424 0.9381 0.000 0.992 0.008
#> SRR1560232 1 0.2165 0.8934 0.936 0.064 0.000
#> SRR1560233 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560234 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560235 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560236 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560237 2 0.0237 0.9397 0.004 0.996 0.000
#> SRR1560238 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560239 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560240 2 0.3482 0.8371 0.128 0.872 0.000
#> SRR1560241 2 0.0000 0.9403 0.000 1.000 0.000
#> SRR1560242 2 0.2959 0.8684 0.100 0.900 0.000
#> SRR1560243 2 0.1832 0.9263 0.036 0.956 0.008
#> SRR1560244 2 0.0237 0.9397 0.004 0.996 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 4 0.3356 0.6626 0.176 0.000 0.000 0.824
#> SRR1560165 4 0.3266 0.6646 0.168 0.000 0.000 0.832
#> SRR1560166 2 0.0817 0.3900 0.024 0.976 0.000 0.000
#> SRR1560167 4 0.4040 0.6539 0.248 0.000 0.000 0.752
#> SRR1560168 2 0.2412 0.3719 0.084 0.908 0.008 0.000
#> SRR1560169 4 0.4304 0.6354 0.284 0.000 0.000 0.716
#> SRR1560170 2 0.4972 -0.1230 0.456 0.544 0.000 0.000
#> SRR1560171 2 0.4972 -0.1230 0.456 0.544 0.000 0.000
#> SRR1560172 2 0.4967 -0.1330 0.452 0.548 0.000 0.000
#> SRR1560173 4 0.2081 0.6956 0.084 0.000 0.000 0.916
#> SRR1560174 2 0.4972 -0.1230 0.456 0.544 0.000 0.000
#> SRR1560175 2 0.7810 -0.2230 0.252 0.384 0.000 0.364
#> SRR1560176 4 0.4222 0.6386 0.272 0.000 0.000 0.728
#> SRR1560177 2 0.5244 -0.1514 0.436 0.556 0.000 0.008
#> SRR1560178 1 0.7329 0.6721 0.564 0.296 0.120 0.020
#> SRR1560179 2 0.4977 -0.1361 0.460 0.540 0.000 0.000
#> SRR1560180 4 0.5266 0.6437 0.140 0.108 0.000 0.752
#> SRR1560181 2 0.1975 0.3668 0.048 0.936 0.000 0.016
#> SRR1560182 2 0.5508 -0.2809 0.476 0.508 0.000 0.016
#> SRR1560183 2 0.7137 -0.0741 0.188 0.556 0.000 0.256
#> SRR1560184 3 0.0336 1.0000 0.000 0.008 0.992 0.000
#> SRR1560185 3 0.0336 1.0000 0.000 0.008 0.992 0.000
#> SRR1560186 4 0.6957 0.5119 0.200 0.152 0.016 0.632
#> SRR1560187 4 0.6041 0.3950 0.060 0.332 0.000 0.608
#> SRR1560188 2 0.3344 0.3646 0.092 0.876 0.008 0.024
#> SRR1560189 2 0.2742 0.3695 0.084 0.900 0.008 0.008
#> SRR1560190 2 0.0000 0.3947 0.000 1.000 0.000 0.000
#> SRR1560191 2 0.4477 0.0931 0.312 0.688 0.000 0.000
#> SRR1560192 4 0.4222 0.6386 0.272 0.000 0.000 0.728
#> SRR1560193 2 0.4972 -0.1230 0.456 0.544 0.000 0.000
#> SRR1560194 1 0.6948 0.7094 0.576 0.324 0.080 0.020
#> SRR1560195 3 0.0336 1.0000 0.000 0.008 0.992 0.000
#> SRR1560196 3 0.0336 1.0000 0.000 0.008 0.992 0.000
#> SRR1560197 1 0.6166 0.6328 0.572 0.384 0.020 0.024
#> SRR1560198 4 0.4123 0.6836 0.136 0.044 0.000 0.820
#> SRR1560200 4 0.5823 0.5861 0.120 0.176 0.000 0.704
#> SRR1560199 1 0.6560 0.6915 0.576 0.356 0.048 0.020
#> SRR1560201 4 0.1209 0.7063 0.004 0.032 0.000 0.964
#> SRR1560202 2 0.3611 0.3134 0.080 0.860 0.000 0.060
#> SRR1560203 4 0.0469 0.7011 0.000 0.012 0.000 0.988
#> SRR1560204 4 0.1677 0.7081 0.012 0.040 0.000 0.948
#> SRR1560205 3 0.0336 1.0000 0.000 0.008 0.992 0.000
#> SRR1560206 2 0.4992 -0.2140 0.476 0.524 0.000 0.000
#> SRR1560207 4 0.1557 0.6913 0.056 0.000 0.000 0.944
#> SRR1560208 2 0.4888 -0.0673 0.412 0.588 0.000 0.000
#> SRR1560209 2 0.4989 -0.2007 0.472 0.528 0.000 0.000
#> SRR1560210 4 0.9676 -0.2027 0.288 0.228 0.144 0.340
#> SRR1560211 2 0.5396 -0.2627 0.464 0.524 0.000 0.012
#> SRR1560212 1 0.6756 0.7099 0.580 0.336 0.064 0.020
#> SRR1560213 2 0.1211 0.3841 0.040 0.960 0.000 0.000
#> SRR1560214 4 0.4552 0.6754 0.128 0.072 0.000 0.800
#> SRR1560215 4 0.7118 0.2527 0.168 0.284 0.000 0.548
#> SRR1560216 4 0.1637 0.6901 0.060 0.000 0.000 0.940
#> SRR1560217 4 0.1389 0.6918 0.048 0.000 0.000 0.952
#> SRR1560218 2 0.4726 0.2536 0.128 0.808 0.036 0.028
#> SRR1560219 2 0.3707 0.2865 0.132 0.840 0.000 0.028
#> SRR1560220 4 0.9383 -0.2955 0.324 0.244 0.096 0.336
#> SRR1560221 1 0.8065 0.6424 0.528 0.300 0.100 0.072
#> SRR1560222 4 0.5557 0.5158 0.040 0.308 0.000 0.652
#> SRR1560223 4 0.5821 0.4115 0.040 0.368 0.000 0.592
#> SRR1560224 4 0.5475 0.5188 0.036 0.308 0.000 0.656
#> SRR1560225 2 0.6049 0.1932 0.120 0.680 0.000 0.200
#> SRR1560226 4 0.4304 0.6354 0.284 0.000 0.000 0.716
#> SRR1560227 4 0.4304 0.6354 0.284 0.000 0.000 0.716
#> SRR1560228 4 0.3569 0.6569 0.196 0.000 0.000 0.804
#> SRR1560229 2 0.7239 -0.1098 0.208 0.544 0.000 0.248
#> SRR1560230 4 0.3569 0.6569 0.196 0.000 0.000 0.804
#> SRR1560231 1 0.9462 0.2508 0.320 0.308 0.100 0.272
#> SRR1560232 4 0.3300 0.6810 0.144 0.008 0.000 0.848
#> SRR1560233 2 0.7407 -0.1313 0.224 0.516 0.000 0.260
#> SRR1560234 1 0.5288 0.3325 0.520 0.472 0.000 0.008
#> SRR1560235 2 0.0188 0.3944 0.004 0.996 0.000 0.000
#> SRR1560236 2 0.0469 0.3950 0.012 0.988 0.000 0.000
#> SRR1560237 2 0.4972 -0.1230 0.456 0.544 0.000 0.000
#> SRR1560238 2 0.1576 0.3876 0.048 0.948 0.004 0.000
#> SRR1560239 2 0.5220 -0.1041 0.424 0.568 0.000 0.008
#> SRR1560240 4 0.6084 0.5567 0.120 0.204 0.000 0.676
#> SRR1560241 2 0.7563 -0.1505 0.220 0.476 0.000 0.304
#> SRR1560242 4 0.6009 0.2121 0.040 0.468 0.000 0.492
#> SRR1560243 2 0.2665 0.3718 0.088 0.900 0.008 0.004
#> SRR1560244 2 0.4981 -0.1507 0.464 0.536 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.1831 0.7664 0.920 0.000 0.000 0.076 0.004
#> SRR1560165 1 0.1952 0.7615 0.912 0.000 0.000 0.084 0.004
#> SRR1560166 2 0.4304 0.0240 0.000 0.516 0.000 0.000 0.484
#> SRR1560167 1 0.1668 0.7660 0.940 0.032 0.000 0.028 0.000
#> SRR1560168 5 0.1478 0.7079 0.000 0.064 0.000 0.000 0.936
#> SRR1560169 1 0.0290 0.7819 0.992 0.000 0.000 0.008 0.000
#> SRR1560170 2 0.3323 0.7403 0.000 0.844 0.000 0.100 0.056
#> SRR1560171 2 0.3255 0.7414 0.000 0.848 0.000 0.100 0.052
#> SRR1560172 2 0.0324 0.7590 0.004 0.992 0.000 0.004 0.000
#> SRR1560173 1 0.5632 0.3700 0.620 0.088 0.000 0.284 0.008
#> SRR1560174 2 0.3454 0.7381 0.000 0.836 0.000 0.100 0.064
#> SRR1560175 2 0.3883 0.3701 0.008 0.744 0.000 0.244 0.004
#> SRR1560176 1 0.1430 0.7827 0.944 0.000 0.000 0.052 0.004
#> SRR1560177 2 0.2867 0.7632 0.004 0.880 0.000 0.044 0.072
#> SRR1560178 2 0.4337 0.6069 0.000 0.748 0.196 0.056 0.000
#> SRR1560179 2 0.2179 0.7427 0.000 0.896 0.000 0.100 0.004
#> SRR1560180 4 0.5916 0.7145 0.056 0.352 0.000 0.564 0.028
#> SRR1560181 2 0.5348 0.0364 0.000 0.492 0.000 0.052 0.456
#> SRR1560182 2 0.1282 0.7551 0.004 0.952 0.000 0.044 0.000
#> SRR1560183 2 0.4305 0.6952 0.008 0.760 0.000 0.040 0.192
#> SRR1560184 3 0.0000 0.8481 0.000 0.000 1.000 0.000 0.000
#> SRR1560185 3 0.0000 0.8481 0.000 0.000 1.000 0.000 0.000
#> SRR1560186 4 0.7947 0.5653 0.036 0.344 0.148 0.424 0.048
#> SRR1560187 2 0.7874 -0.3914 0.080 0.388 0.000 0.224 0.308
#> SRR1560188 5 0.1124 0.7043 0.000 0.036 0.000 0.004 0.960
#> SRR1560189 5 0.1205 0.7070 0.000 0.040 0.000 0.004 0.956
#> SRR1560190 5 0.3461 0.6779 0.004 0.224 0.000 0.000 0.772
#> SRR1560191 2 0.3983 0.4817 0.000 0.660 0.000 0.000 0.340
#> SRR1560192 1 0.0510 0.7803 0.984 0.016 0.000 0.000 0.000
#> SRR1560193 2 0.2416 0.7434 0.000 0.888 0.000 0.100 0.012
#> SRR1560194 2 0.1341 0.7527 0.000 0.944 0.000 0.056 0.000
#> SRR1560195 3 0.0000 0.8481 0.000 0.000 1.000 0.000 0.000
#> SRR1560196 3 0.0000 0.8481 0.000 0.000 1.000 0.000 0.000
#> SRR1560197 2 0.1341 0.7527 0.000 0.944 0.000 0.056 0.000
#> SRR1560198 4 0.6592 0.7144 0.104 0.316 0.000 0.540 0.040
#> SRR1560200 4 0.6374 0.6998 0.088 0.376 0.000 0.508 0.028
#> SRR1560199 2 0.1341 0.7527 0.000 0.944 0.000 0.056 0.000
#> SRR1560201 4 0.7308 0.5739 0.224 0.192 0.000 0.516 0.068
#> SRR1560202 5 0.5211 0.5665 0.004 0.256 0.000 0.076 0.664
#> SRR1560203 1 0.5438 0.4245 0.488 0.004 0.000 0.460 0.048
#> SRR1560204 4 0.6941 -0.0908 0.216 0.016 0.000 0.460 0.308
#> SRR1560205 3 0.0000 0.8481 0.000 0.000 1.000 0.000 0.000
#> SRR1560206 2 0.0324 0.7590 0.004 0.992 0.000 0.004 0.000
#> SRR1560207 4 0.5335 0.0879 0.416 0.044 0.000 0.536 0.004
#> SRR1560208 2 0.3031 0.7464 0.004 0.852 0.000 0.016 0.128
#> SRR1560209 2 0.0324 0.7590 0.004 0.992 0.000 0.004 0.000
#> SRR1560210 3 0.6819 -0.0886 0.004 0.388 0.472 0.096 0.040
#> SRR1560211 2 0.3712 0.7438 0.004 0.820 0.000 0.052 0.124
#> SRR1560212 2 0.1410 0.7518 0.000 0.940 0.000 0.060 0.000
#> SRR1560213 2 0.3690 0.6478 0.000 0.764 0.000 0.012 0.224
#> SRR1560214 4 0.5948 0.7197 0.060 0.344 0.000 0.568 0.028
#> SRR1560215 4 0.6003 0.6720 0.056 0.388 0.000 0.528 0.028
#> SRR1560216 1 0.5106 0.2326 0.564 0.032 0.000 0.400 0.004
#> SRR1560217 4 0.6016 0.2468 0.368 0.072 0.000 0.540 0.020
#> SRR1560218 5 0.7788 0.1869 0.000 0.268 0.316 0.060 0.356
#> SRR1560219 2 0.5234 0.4096 0.004 0.612 0.000 0.052 0.332
#> SRR1560220 2 0.7215 -0.3119 0.004 0.432 0.180 0.356 0.028
#> SRR1560221 2 0.3757 0.6800 0.004 0.828 0.104 0.060 0.004
#> SRR1560222 5 0.6932 0.4056 0.184 0.036 0.000 0.252 0.528
#> SRR1560223 5 0.7089 0.4292 0.176 0.052 0.000 0.244 0.528
#> SRR1560224 5 0.6797 0.3772 0.188 0.024 0.000 0.264 0.524
#> SRR1560225 5 0.4964 0.6374 0.132 0.044 0.000 0.068 0.756
#> SRR1560226 1 0.4014 0.6843 0.728 0.000 0.000 0.256 0.016
#> SRR1560227 1 0.4014 0.6843 0.728 0.000 0.000 0.256 0.016
#> SRR1560228 1 0.0404 0.7853 0.988 0.000 0.000 0.012 0.000
#> SRR1560229 2 0.0613 0.7576 0.008 0.984 0.000 0.004 0.004
#> SRR1560230 1 0.2806 0.7483 0.844 0.000 0.000 0.152 0.004
#> SRR1560231 2 0.6410 0.0782 0.004 0.484 0.412 0.068 0.032
#> SRR1560232 4 0.6593 0.6500 0.172 0.244 0.000 0.560 0.024
#> SRR1560233 2 0.3446 0.7420 0.008 0.844 0.000 0.044 0.104
#> SRR1560234 2 0.0451 0.7594 0.004 0.988 0.000 0.008 0.000
#> SRR1560235 5 0.3966 0.4934 0.000 0.336 0.000 0.000 0.664
#> SRR1560236 5 0.3305 0.6775 0.000 0.224 0.000 0.000 0.776
#> SRR1560237 2 0.2351 0.7527 0.000 0.896 0.000 0.088 0.016
#> SRR1560238 5 0.2179 0.7145 0.000 0.112 0.000 0.000 0.888
#> SRR1560239 2 0.2295 0.7618 0.004 0.900 0.000 0.008 0.088
#> SRR1560240 4 0.5978 0.6927 0.056 0.376 0.000 0.540 0.028
#> SRR1560241 2 0.1299 0.7473 0.008 0.960 0.000 0.012 0.020
#> SRR1560242 5 0.4740 0.6807 0.052 0.092 0.000 0.076 0.780
#> SRR1560243 5 0.1197 0.7097 0.000 0.048 0.000 0.000 0.952
#> SRR1560244 2 0.1571 0.7553 0.000 0.936 0.000 0.060 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.2006 0.4917 0.904 0.000 0.000 0.080 0.000 0.016
#> SRR1560165 1 0.2060 0.4871 0.900 0.000 0.000 0.084 0.000 0.016
#> SRR1560166 2 0.6212 0.3360 0.000 0.452 0.000 0.200 0.332 0.016
#> SRR1560167 1 0.2450 0.4867 0.868 0.000 0.000 0.016 0.000 0.116
#> SRR1560168 5 0.0405 0.5883 0.000 0.008 0.000 0.004 0.988 0.000
#> SRR1560169 1 0.0146 0.5220 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1560170 2 0.1838 0.5413 0.000 0.916 0.000 0.000 0.068 0.016
#> SRR1560171 2 0.1480 0.5381 0.000 0.940 0.000 0.000 0.040 0.020
#> SRR1560172 2 0.4306 0.5338 0.000 0.656 0.000 0.308 0.004 0.032
#> SRR1560173 1 0.5704 0.0914 0.508 0.000 0.000 0.300 0.000 0.192
#> SRR1560174 2 0.1552 0.5404 0.000 0.940 0.000 0.004 0.036 0.020
#> SRR1560175 4 0.4066 0.2744 0.000 0.272 0.000 0.692 0.000 0.036
#> SRR1560176 1 0.3110 0.3293 0.792 0.000 0.000 0.012 0.000 0.196
#> SRR1560177 2 0.6491 0.5674 0.000 0.532 0.000 0.240 0.080 0.148
#> SRR1560178 4 0.6982 -0.1214 0.000 0.316 0.060 0.364 0.000 0.260
#> SRR1560179 2 0.0547 0.5227 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1560180 4 0.1405 0.4301 0.024 0.004 0.000 0.948 0.000 0.024
#> SRR1560181 5 0.6486 0.1541 0.000 0.280 0.000 0.268 0.428 0.024
#> SRR1560182 2 0.4620 0.5368 0.004 0.620 0.000 0.340 0.012 0.024
#> SRR1560183 4 0.6481 -0.2830 0.000 0.312 0.000 0.356 0.316 0.016
#> SRR1560184 3 0.0000 0.7207 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 0.7207 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 4 0.3841 0.4035 0.016 0.004 0.100 0.820 0.020 0.040
#> SRR1560187 4 0.4854 -0.0428 0.020 0.028 0.000 0.608 0.340 0.004
#> SRR1560188 5 0.0291 0.5876 0.000 0.004 0.000 0.004 0.992 0.000
#> SRR1560189 5 0.0291 0.5876 0.000 0.004 0.000 0.004 0.992 0.000
#> SRR1560190 5 0.4592 0.6374 0.004 0.064 0.000 0.268 0.664 0.000
#> SRR1560191 2 0.6014 0.4167 0.000 0.432 0.000 0.280 0.288 0.000
#> SRR1560192 1 0.0363 0.5265 0.988 0.000 0.000 0.012 0.000 0.000
#> SRR1560193 2 0.0547 0.5227 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1560194 4 0.6100 -0.1656 0.000 0.356 0.000 0.360 0.000 0.284
#> SRR1560195 3 0.0000 0.7207 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.7207 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 4 0.6097 -0.1382 0.000 0.344 0.000 0.372 0.000 0.284
#> SRR1560198 4 0.1391 0.4205 0.016 0.000 0.000 0.944 0.000 0.040
#> SRR1560200 4 0.0837 0.4465 0.020 0.004 0.000 0.972 0.000 0.004
#> SRR1560199 4 0.6100 -0.1656 0.000 0.356 0.000 0.360 0.000 0.284
#> SRR1560201 4 0.3452 0.0786 0.176 0.000 0.000 0.792 0.008 0.024
#> SRR1560202 5 0.5228 0.5648 0.000 0.080 0.000 0.328 0.580 0.012
#> SRR1560203 6 0.6834 0.0000 0.340 0.000 0.000 0.268 0.044 0.348
#> SRR1560204 4 0.7295 -0.6503 0.156 0.000 0.000 0.356 0.148 0.340
#> SRR1560205 3 0.0000 0.7207 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 2 0.4408 0.4920 0.000 0.608 0.000 0.356 0.000 0.036
#> SRR1560207 1 0.5768 0.0506 0.488 0.000 0.000 0.316 0.000 0.196
#> SRR1560208 2 0.6624 0.5662 0.000 0.524 0.000 0.232 0.100 0.144
#> SRR1560209 2 0.4384 0.5013 0.000 0.616 0.000 0.348 0.000 0.036
#> SRR1560210 3 0.4746 -0.0119 0.000 0.004 0.532 0.424 0.000 0.040
#> SRR1560211 2 0.6101 0.5284 0.000 0.512 0.000 0.336 0.100 0.052
#> SRR1560212 4 0.6079 -0.1520 0.000 0.348 0.000 0.380 0.000 0.272
#> SRR1560213 2 0.6323 0.5483 0.000 0.520 0.000 0.280 0.148 0.052
#> SRR1560214 4 0.1636 0.4117 0.024 0.004 0.000 0.936 0.000 0.036
#> SRR1560215 4 0.1408 0.4499 0.000 0.036 0.000 0.944 0.000 0.020
#> SRR1560216 1 0.5738 0.0784 0.496 0.000 0.000 0.312 0.000 0.192
#> SRR1560217 4 0.5458 -0.4511 0.396 0.000 0.000 0.480 0.000 0.124
#> SRR1560218 3 0.8359 -0.1887 0.000 0.104 0.316 0.292 0.196 0.092
#> SRR1560219 2 0.6820 0.4841 0.000 0.464 0.000 0.252 0.212 0.072
#> SRR1560220 4 0.4120 0.4144 0.000 0.008 0.024 0.692 0.000 0.276
#> SRR1560221 4 0.6481 -0.0495 0.000 0.296 0.020 0.404 0.000 0.280
#> SRR1560222 5 0.6161 0.5935 0.032 0.004 0.000 0.256 0.548 0.160
#> SRR1560223 5 0.5994 0.6006 0.020 0.004 0.000 0.272 0.548 0.156
#> SRR1560224 5 0.6826 0.2982 0.040 0.004 0.000 0.232 0.392 0.332
#> SRR1560225 5 0.5826 0.6031 0.092 0.024 0.000 0.280 0.588 0.016
#> SRR1560226 1 0.3668 0.0626 0.668 0.000 0.000 0.000 0.004 0.328
#> SRR1560227 1 0.3668 0.0626 0.668 0.000 0.000 0.000 0.004 0.328
#> SRR1560228 1 0.1088 0.5261 0.960 0.000 0.000 0.024 0.000 0.016
#> SRR1560229 2 0.5405 0.4049 0.000 0.528 0.000 0.388 0.052 0.032
#> SRR1560230 1 0.3420 0.2570 0.748 0.000 0.000 0.012 0.000 0.240
#> SRR1560231 4 0.6456 0.2888 0.000 0.036 0.220 0.480 0.000 0.264
#> SRR1560232 4 0.3710 0.0760 0.144 0.004 0.000 0.788 0.000 0.064
#> SRR1560233 2 0.6216 0.4657 0.004 0.456 0.000 0.356 0.168 0.016
#> SRR1560234 2 0.5166 0.4720 0.000 0.552 0.000 0.348 0.000 0.100
#> SRR1560235 5 0.5351 0.4976 0.000 0.208 0.000 0.200 0.592 0.000
#> SRR1560236 5 0.4693 0.6459 0.000 0.116 0.000 0.188 0.692 0.004
#> SRR1560237 2 0.2342 0.5513 0.000 0.904 0.000 0.024 0.040 0.032
#> SRR1560238 5 0.2179 0.6475 0.000 0.036 0.000 0.064 0.900 0.000
#> SRR1560239 2 0.6449 0.5786 0.000 0.552 0.000 0.212 0.092 0.144
#> SRR1560240 4 0.1448 0.4361 0.024 0.012 0.000 0.948 0.000 0.016
#> SRR1560241 4 0.3979 0.2974 0.000 0.256 0.000 0.708 0.000 0.036
#> SRR1560242 5 0.4350 0.6253 0.004 0.004 0.000 0.320 0.648 0.024
#> SRR1560243 5 0.0508 0.5960 0.000 0.004 0.000 0.012 0.984 0.000
#> SRR1560244 2 0.1088 0.5203 0.000 0.960 0.000 0.016 0.000 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["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 15546 rows and 81 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.871 0.951 0.974 0.3694 0.650 0.650
#> 3 3 0.844 0.888 0.939 0.6989 0.698 0.543
#> 4 4 0.754 0.779 0.902 0.1553 0.840 0.603
#> 5 5 0.692 0.730 0.847 0.0763 0.855 0.547
#> 6 6 0.670 0.609 0.788 0.0334 0.919 0.673
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
#> SRR1560164 1 0.0376 0.989 0.996 0.004
#> SRR1560165 1 0.0376 0.989 0.996 0.004
#> SRR1560166 2 0.0000 0.971 0.000 1.000
#> SRR1560167 1 0.0000 0.987 1.000 0.000
#> SRR1560168 2 0.0000 0.971 0.000 1.000
#> SRR1560169 1 0.0376 0.989 0.996 0.004
#> SRR1560170 2 0.0000 0.971 0.000 1.000
#> SRR1560171 2 0.0000 0.971 0.000 1.000
#> SRR1560172 2 0.0000 0.971 0.000 1.000
#> SRR1560173 1 0.0376 0.989 0.996 0.004
#> SRR1560174 2 0.0000 0.971 0.000 1.000
#> SRR1560175 2 0.5294 0.878 0.120 0.880
#> SRR1560176 1 0.0376 0.989 0.996 0.004
#> SRR1560177 2 0.0000 0.971 0.000 1.000
#> SRR1560178 2 0.0672 0.968 0.008 0.992
#> SRR1560179 2 0.0000 0.971 0.000 1.000
#> SRR1560180 1 0.0376 0.985 0.996 0.004
#> SRR1560181 2 0.0000 0.971 0.000 1.000
#> SRR1560182 2 0.0000 0.971 0.000 1.000
#> SRR1560183 2 0.0000 0.971 0.000 1.000
#> SRR1560184 2 0.0938 0.966 0.012 0.988
#> SRR1560185 2 0.0672 0.968 0.008 0.992
#> SRR1560186 2 0.1184 0.964 0.016 0.984
#> SRR1560187 2 0.0000 0.971 0.000 1.000
#> SRR1560188 2 0.0000 0.971 0.000 1.000
#> SRR1560189 2 0.0000 0.971 0.000 1.000
#> SRR1560190 2 0.0000 0.971 0.000 1.000
#> SRR1560191 2 0.0000 0.971 0.000 1.000
#> SRR1560192 1 0.0000 0.987 1.000 0.000
#> SRR1560193 2 0.0000 0.971 0.000 1.000
#> SRR1560194 2 0.0376 0.969 0.004 0.996
#> SRR1560195 2 0.2948 0.940 0.052 0.948
#> SRR1560196 2 0.4022 0.917 0.080 0.920
#> SRR1560197 2 0.0376 0.969 0.004 0.996
#> SRR1560198 2 0.6438 0.831 0.164 0.836
#> SRR1560200 2 0.9833 0.328 0.424 0.576
#> SRR1560199 2 0.0376 0.969 0.004 0.996
#> SRR1560201 1 0.0376 0.989 0.996 0.004
#> SRR1560202 2 0.0000 0.971 0.000 1.000
#> SRR1560203 2 0.4562 0.900 0.096 0.904
#> SRR1560204 2 0.0000 0.971 0.000 1.000
#> SRR1560205 2 0.1633 0.959 0.024 0.976
#> SRR1560206 2 0.0000 0.971 0.000 1.000
#> SRR1560207 1 0.0376 0.989 0.996 0.004
#> SRR1560208 2 0.0000 0.971 0.000 1.000
#> SRR1560209 2 0.0000 0.971 0.000 1.000
#> SRR1560210 2 0.6343 0.836 0.160 0.840
#> SRR1560211 2 0.0000 0.971 0.000 1.000
#> SRR1560212 2 0.0938 0.966 0.012 0.988
#> SRR1560213 2 0.0000 0.971 0.000 1.000
#> SRR1560214 1 0.6343 0.803 0.840 0.160
#> SRR1560215 2 0.1843 0.956 0.028 0.972
#> SRR1560216 1 0.0376 0.989 0.996 0.004
#> SRR1560217 1 0.0376 0.989 0.996 0.004
#> SRR1560218 2 0.0376 0.969 0.004 0.996
#> SRR1560219 2 0.0376 0.969 0.004 0.996
#> SRR1560220 2 0.7056 0.795 0.192 0.808
#> SRR1560221 2 0.2236 0.951 0.036 0.964
#> SRR1560222 2 0.0672 0.967 0.008 0.992
#> SRR1560223 2 0.0000 0.971 0.000 1.000
#> SRR1560224 2 0.0000 0.971 0.000 1.000
#> SRR1560225 2 0.5059 0.882 0.112 0.888
#> SRR1560226 1 0.0376 0.989 0.996 0.004
#> SRR1560227 1 0.0376 0.989 0.996 0.004
#> SRR1560228 1 0.0376 0.989 0.996 0.004
#> SRR1560229 2 0.0000 0.971 0.000 1.000
#> SRR1560230 1 0.0376 0.989 0.996 0.004
#> SRR1560231 2 0.4939 0.892 0.108 0.892
#> SRR1560232 1 0.0000 0.987 1.000 0.000
#> SRR1560233 2 0.0000 0.971 0.000 1.000
#> SRR1560234 2 0.0376 0.969 0.004 0.996
#> SRR1560235 2 0.0000 0.971 0.000 1.000
#> SRR1560236 2 0.0000 0.971 0.000 1.000
#> SRR1560237 2 0.0000 0.971 0.000 1.000
#> SRR1560238 2 0.0000 0.971 0.000 1.000
#> SRR1560239 2 0.0000 0.971 0.000 1.000
#> SRR1560240 2 0.6623 0.817 0.172 0.828
#> SRR1560241 2 0.0000 0.971 0.000 1.000
#> SRR1560242 2 0.0376 0.969 0.004 0.996
#> SRR1560243 2 0.0000 0.971 0.000 1.000
#> SRR1560244 2 0.0000 0.971 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.1289 0.917 0.968 0.000 0.032
#> SRR1560165 1 0.1289 0.917 0.968 0.000 0.032
#> SRR1560166 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560167 1 0.1289 0.918 0.968 0.000 0.032
#> SRR1560168 2 0.1289 0.950 0.032 0.968 0.000
#> SRR1560169 1 0.0592 0.915 0.988 0.000 0.012
#> SRR1560170 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560171 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560172 2 0.0475 0.956 0.004 0.992 0.004
#> SRR1560173 1 0.0747 0.917 0.984 0.000 0.016
#> SRR1560174 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560175 2 0.6034 0.769 0.152 0.780 0.068
#> SRR1560176 1 0.0592 0.915 0.988 0.000 0.012
#> SRR1560177 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560178 3 0.1753 0.902 0.000 0.048 0.952
#> SRR1560179 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560180 1 0.4235 0.799 0.824 0.000 0.176
#> SRR1560181 2 0.2711 0.890 0.000 0.912 0.088
#> SRR1560182 2 0.1411 0.942 0.000 0.964 0.036
#> SRR1560183 2 0.0424 0.956 0.000 0.992 0.008
#> SRR1560184 3 0.0237 0.905 0.000 0.004 0.996
#> SRR1560185 3 0.0237 0.905 0.000 0.004 0.996
#> SRR1560186 3 0.0592 0.906 0.000 0.012 0.988
#> SRR1560187 2 0.1482 0.948 0.012 0.968 0.020
#> SRR1560188 2 0.1163 0.952 0.028 0.972 0.000
#> SRR1560189 2 0.1031 0.953 0.024 0.976 0.000
#> SRR1560190 2 0.1411 0.948 0.036 0.964 0.000
#> SRR1560191 2 0.0592 0.956 0.012 0.988 0.000
#> SRR1560192 1 0.0892 0.915 0.980 0.000 0.020
#> SRR1560193 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560194 3 0.3116 0.871 0.000 0.108 0.892
#> SRR1560195 3 0.0237 0.905 0.000 0.004 0.996
#> SRR1560196 3 0.0237 0.905 0.000 0.004 0.996
#> SRR1560197 3 0.2625 0.888 0.000 0.084 0.916
#> SRR1560198 3 0.0661 0.903 0.008 0.004 0.988
#> SRR1560200 3 0.7156 0.202 0.400 0.028 0.572
#> SRR1560199 3 0.2796 0.883 0.000 0.092 0.908
#> SRR1560201 1 0.1529 0.917 0.960 0.000 0.040
#> SRR1560202 3 0.5810 0.573 0.000 0.336 0.664
#> SRR1560203 1 0.9162 0.191 0.500 0.160 0.340
#> SRR1560204 2 0.1482 0.950 0.012 0.968 0.020
#> SRR1560205 3 0.0237 0.905 0.000 0.004 0.996
#> SRR1560206 2 0.2651 0.921 0.012 0.928 0.060
#> SRR1560207 1 0.1529 0.915 0.960 0.000 0.040
#> SRR1560208 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560209 2 0.0424 0.957 0.000 0.992 0.008
#> SRR1560210 3 0.0237 0.901 0.004 0.000 0.996
#> SRR1560211 2 0.5216 0.621 0.000 0.740 0.260
#> SRR1560212 3 0.2796 0.878 0.000 0.092 0.908
#> SRR1560213 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560214 1 0.3267 0.860 0.884 0.000 0.116
#> SRR1560215 2 0.5285 0.808 0.040 0.812 0.148
#> SRR1560216 1 0.1529 0.915 0.960 0.000 0.040
#> SRR1560217 1 0.1860 0.910 0.948 0.000 0.052
#> SRR1560218 3 0.2448 0.891 0.000 0.076 0.924
#> SRR1560219 3 0.4399 0.787 0.000 0.188 0.812
#> SRR1560220 3 0.0424 0.906 0.000 0.008 0.992
#> SRR1560221 3 0.1878 0.901 0.004 0.044 0.952
#> SRR1560222 2 0.2550 0.937 0.040 0.936 0.024
#> SRR1560223 2 0.1031 0.953 0.024 0.976 0.000
#> SRR1560224 2 0.1529 0.946 0.040 0.960 0.000
#> SRR1560225 2 0.2959 0.901 0.100 0.900 0.000
#> SRR1560226 1 0.1411 0.911 0.964 0.000 0.036
#> SRR1560227 1 0.0892 0.915 0.980 0.000 0.020
#> SRR1560228 1 0.0237 0.914 0.996 0.000 0.004
#> SRR1560229 2 0.0829 0.953 0.012 0.984 0.004
#> SRR1560230 1 0.1031 0.916 0.976 0.000 0.024
#> SRR1560231 3 0.0237 0.905 0.000 0.004 0.996
#> SRR1560232 1 0.2356 0.908 0.928 0.000 0.072
#> SRR1560233 2 0.1765 0.938 0.004 0.956 0.040
#> SRR1560234 2 0.3752 0.833 0.000 0.856 0.144
#> SRR1560235 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560236 2 0.1031 0.953 0.024 0.976 0.000
#> SRR1560237 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560238 2 0.1289 0.950 0.032 0.968 0.000
#> SRR1560239 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560240 1 0.8460 0.500 0.600 0.264 0.136
#> SRR1560241 2 0.2845 0.916 0.012 0.920 0.068
#> SRR1560242 2 0.0892 0.955 0.020 0.980 0.000
#> SRR1560243 2 0.0000 0.958 0.000 1.000 0.000
#> SRR1560244 2 0.0000 0.958 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.4941 0.4026 0.564 0.000 0.000 0.436
#> SRR1560165 1 0.4967 0.3668 0.548 0.000 0.000 0.452
#> SRR1560166 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560167 1 0.1867 0.8213 0.928 0.000 0.000 0.072
#> SRR1560168 2 0.0921 0.8845 0.028 0.972 0.000 0.000
#> SRR1560169 1 0.0336 0.8335 0.992 0.000 0.000 0.008
#> SRR1560170 2 0.0336 0.8929 0.000 0.992 0.000 0.008
#> SRR1560171 2 0.0469 0.8914 0.000 0.988 0.000 0.012
#> SRR1560172 2 0.4382 0.4986 0.000 0.704 0.000 0.296
#> SRR1560173 4 0.4679 0.1640 0.352 0.000 0.000 0.648
#> SRR1560174 2 0.0336 0.8929 0.000 0.992 0.000 0.008
#> SRR1560175 4 0.0469 0.7853 0.000 0.012 0.000 0.988
#> SRR1560176 1 0.0188 0.8327 0.996 0.000 0.000 0.004
#> SRR1560177 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560178 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560179 2 0.1118 0.8772 0.000 0.964 0.000 0.036
#> SRR1560180 4 0.1635 0.7593 0.008 0.000 0.044 0.948
#> SRR1560181 2 0.0188 0.8938 0.000 0.996 0.004 0.000
#> SRR1560182 2 0.0592 0.8899 0.000 0.984 0.000 0.016
#> SRR1560183 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560184 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560185 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560186 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560187 4 0.3975 0.6813 0.000 0.240 0.000 0.760
#> SRR1560188 2 0.0188 0.8939 0.004 0.996 0.000 0.000
#> SRR1560189 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560190 2 0.0336 0.8929 0.008 0.992 0.000 0.000
#> SRR1560191 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560192 1 0.0336 0.8335 0.992 0.000 0.000 0.008
#> SRR1560193 2 0.1022 0.8798 0.000 0.968 0.000 0.032
#> SRR1560194 3 0.0336 0.9398 0.000 0.008 0.992 0.000
#> SRR1560195 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560196 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560197 3 0.0188 0.9424 0.000 0.004 0.996 0.000
#> SRR1560198 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560200 3 0.3754 0.8254 0.064 0.000 0.852 0.084
#> SRR1560199 3 0.0336 0.9404 0.000 0.008 0.992 0.000
#> SRR1560201 1 0.2081 0.8129 0.916 0.000 0.000 0.084
#> SRR1560202 2 0.5158 0.0844 0.004 0.524 0.472 0.000
#> SRR1560203 4 0.4961 0.6091 0.036 0.004 0.212 0.748
#> SRR1560204 4 0.4464 0.6955 0.004 0.224 0.012 0.760
#> SRR1560205 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560206 4 0.2973 0.7507 0.000 0.144 0.000 0.856
#> SRR1560207 4 0.0921 0.7625 0.028 0.000 0.000 0.972
#> SRR1560208 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560209 4 0.4925 0.3527 0.000 0.428 0.000 0.572
#> SRR1560210 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560211 2 0.1022 0.8779 0.000 0.968 0.032 0.000
#> SRR1560212 3 0.3015 0.8546 0.000 0.024 0.884 0.092
#> SRR1560213 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560214 4 0.0000 0.7819 0.000 0.000 0.000 1.000
#> SRR1560215 4 0.0469 0.7853 0.000 0.012 0.000 0.988
#> SRR1560216 4 0.0188 0.7797 0.004 0.000 0.000 0.996
#> SRR1560217 4 0.0000 0.7819 0.000 0.000 0.000 1.000
#> SRR1560218 3 0.0336 0.9404 0.000 0.008 0.992 0.000
#> SRR1560219 3 0.4877 0.2694 0.000 0.408 0.592 0.000
#> SRR1560220 3 0.1022 0.9247 0.000 0.000 0.968 0.032
#> SRR1560221 3 0.2760 0.8334 0.000 0.000 0.872 0.128
#> SRR1560222 1 0.4040 0.5484 0.752 0.248 0.000 0.000
#> SRR1560223 2 0.4661 0.5248 0.348 0.652 0.000 0.000
#> SRR1560224 2 0.4431 0.6008 0.304 0.696 0.000 0.000
#> SRR1560225 2 0.4679 0.5215 0.352 0.648 0.000 0.000
#> SRR1560226 1 0.0000 0.8314 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.8314 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.1474 0.8284 0.948 0.000 0.000 0.052
#> SRR1560229 4 0.4697 0.5225 0.000 0.356 0.000 0.644
#> SRR1560230 1 0.1722 0.8146 0.944 0.000 0.048 0.008
#> SRR1560231 3 0.0000 0.9440 0.000 0.000 1.000 0.000
#> SRR1560232 1 0.5957 0.4882 0.588 0.000 0.048 0.364
#> SRR1560233 2 0.2859 0.8240 0.112 0.880 0.008 0.000
#> SRR1560234 2 0.5457 0.6410 0.000 0.728 0.184 0.088
#> SRR1560235 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560236 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560237 2 0.0469 0.8914 0.000 0.988 0.000 0.012
#> SRR1560238 2 0.2589 0.8270 0.116 0.884 0.000 0.000
#> SRR1560239 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560240 4 0.0000 0.7819 0.000 0.000 0.000 1.000
#> SRR1560241 4 0.2868 0.7546 0.000 0.136 0.000 0.864
#> SRR1560242 2 0.4898 0.3413 0.416 0.584 0.000 0.000
#> SRR1560243 2 0.0000 0.8949 0.000 1.000 0.000 0.000
#> SRR1560244 2 0.2216 0.8267 0.000 0.908 0.000 0.092
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 4 0.5346 0.1825 0.452 0.000 0.000 0.496 0.052
#> SRR1560165 4 0.5591 0.3228 0.396 0.000 0.000 0.528 0.076
#> SRR1560166 2 0.1732 0.8651 0.000 0.920 0.000 0.000 0.080
#> SRR1560167 1 0.1731 0.7891 0.932 0.000 0.004 0.060 0.004
#> SRR1560168 2 0.3921 0.8107 0.072 0.800 0.000 0.000 0.128
#> SRR1560169 1 0.0162 0.8156 0.996 0.000 0.000 0.004 0.000
#> SRR1560170 2 0.0162 0.8652 0.000 0.996 0.000 0.004 0.000
#> SRR1560171 2 0.0703 0.8583 0.000 0.976 0.000 0.024 0.000
#> SRR1560172 2 0.2052 0.8265 0.004 0.912 0.000 0.080 0.004
#> SRR1560173 4 0.3266 0.6544 0.200 0.000 0.000 0.796 0.004
#> SRR1560174 2 0.0404 0.8630 0.000 0.988 0.000 0.012 0.000
#> SRR1560175 4 0.4337 0.5669 0.016 0.284 0.000 0.696 0.004
#> SRR1560176 1 0.0510 0.8133 0.984 0.000 0.000 0.000 0.016
#> SRR1560177 2 0.1892 0.8665 0.000 0.916 0.004 0.000 0.080
#> SRR1560178 3 0.0162 0.8886 0.000 0.004 0.996 0.000 0.000
#> SRR1560179 2 0.1430 0.8717 0.000 0.944 0.000 0.004 0.052
#> SRR1560180 4 0.3473 0.7096 0.084 0.008 0.052 0.852 0.004
#> SRR1560181 5 0.2361 0.7110 0.000 0.096 0.012 0.000 0.892
#> SRR1560182 2 0.4283 0.3030 0.000 0.544 0.000 0.000 0.456
#> SRR1560183 5 0.1492 0.7244 0.000 0.040 0.004 0.008 0.948
#> SRR1560184 3 0.2280 0.9000 0.000 0.000 0.880 0.000 0.120
#> SRR1560185 3 0.2329 0.8982 0.000 0.000 0.876 0.000 0.124
#> SRR1560186 5 0.3508 0.5446 0.000 0.000 0.252 0.000 0.748
#> SRR1560187 5 0.2891 0.6248 0.000 0.000 0.000 0.176 0.824
#> SRR1560188 2 0.4983 0.6405 0.064 0.664 0.000 0.000 0.272
#> SRR1560189 2 0.4042 0.7574 0.032 0.756 0.000 0.000 0.212
#> SRR1560190 2 0.1018 0.8711 0.016 0.968 0.000 0.000 0.016
#> SRR1560191 2 0.2077 0.8628 0.008 0.908 0.000 0.000 0.084
#> SRR1560192 1 0.0486 0.8149 0.988 0.000 0.004 0.004 0.004
#> SRR1560193 2 0.0404 0.8630 0.000 0.988 0.000 0.012 0.000
#> SRR1560194 3 0.2408 0.8419 0.000 0.096 0.892 0.004 0.008
#> SRR1560195 3 0.1197 0.9060 0.000 0.000 0.952 0.000 0.048
#> SRR1560196 3 0.1043 0.9042 0.000 0.000 0.960 0.000 0.040
#> SRR1560197 3 0.2377 0.8959 0.000 0.000 0.872 0.000 0.128
#> SRR1560198 3 0.2179 0.9069 0.000 0.000 0.896 0.004 0.100
#> SRR1560200 3 0.2670 0.8032 0.080 0.000 0.888 0.028 0.004
#> SRR1560199 3 0.2685 0.8990 0.000 0.028 0.880 0.000 0.092
#> SRR1560201 1 0.2756 0.7302 0.868 0.004 0.004 0.120 0.004
#> SRR1560202 5 0.2054 0.7333 0.000 0.028 0.052 0.000 0.920
#> SRR1560203 5 0.2516 0.6548 0.000 0.000 0.000 0.140 0.860
#> SRR1560204 5 0.2471 0.6590 0.000 0.000 0.000 0.136 0.864
#> SRR1560205 3 0.2230 0.9013 0.000 0.000 0.884 0.000 0.116
#> SRR1560206 4 0.3734 0.6708 0.000 0.168 0.000 0.796 0.036
#> SRR1560207 4 0.2124 0.7238 0.096 0.000 0.000 0.900 0.004
#> SRR1560208 2 0.1341 0.8697 0.000 0.944 0.000 0.000 0.056
#> SRR1560209 2 0.2848 0.7528 0.000 0.840 0.000 0.156 0.004
#> SRR1560210 3 0.0162 0.8904 0.000 0.000 0.996 0.000 0.004
#> SRR1560211 2 0.2984 0.8452 0.000 0.860 0.032 0.000 0.108
#> SRR1560212 3 0.4700 0.6825 0.004 0.156 0.752 0.084 0.004
#> SRR1560213 2 0.3796 0.6654 0.000 0.700 0.000 0.000 0.300
#> SRR1560214 4 0.2020 0.7472 0.000 0.000 0.000 0.900 0.100
#> SRR1560215 4 0.1894 0.7540 0.000 0.008 0.000 0.920 0.072
#> SRR1560216 4 0.2230 0.7409 0.000 0.000 0.000 0.884 0.116
#> SRR1560217 4 0.2230 0.7409 0.000 0.000 0.000 0.884 0.116
#> SRR1560218 5 0.2930 0.6787 0.000 0.004 0.164 0.000 0.832
#> SRR1560219 5 0.3861 0.6985 0.000 0.068 0.128 0.000 0.804
#> SRR1560220 3 0.3317 0.8792 0.000 0.000 0.840 0.044 0.116
#> SRR1560221 3 0.2249 0.9082 0.000 0.000 0.896 0.008 0.096
#> SRR1560222 5 0.5118 0.3401 0.412 0.040 0.000 0.000 0.548
#> SRR1560223 5 0.6383 0.3419 0.328 0.184 0.000 0.000 0.488
#> SRR1560224 5 0.5847 0.2358 0.424 0.096 0.000 0.000 0.480
#> SRR1560225 1 0.5048 -0.1251 0.492 0.476 0.000 0.000 0.032
#> SRR1560226 1 0.1121 0.8005 0.956 0.000 0.000 0.000 0.044
#> SRR1560227 1 0.1270 0.7936 0.948 0.000 0.000 0.000 0.052
#> SRR1560228 1 0.1270 0.7968 0.948 0.000 0.000 0.052 0.000
#> SRR1560229 2 0.3274 0.6662 0.000 0.780 0.000 0.220 0.000
#> SRR1560230 1 0.1082 0.8123 0.964 0.000 0.000 0.008 0.028
#> SRR1560231 3 0.0000 0.8880 0.000 0.000 1.000 0.000 0.000
#> SRR1560232 1 0.6789 0.0542 0.440 0.000 0.252 0.304 0.004
#> SRR1560233 2 0.2833 0.8490 0.084 0.884 0.008 0.004 0.020
#> SRR1560234 2 0.3839 0.7473 0.000 0.816 0.108 0.072 0.004
#> SRR1560235 2 0.1043 0.8711 0.000 0.960 0.000 0.000 0.040
#> SRR1560236 2 0.2464 0.8558 0.016 0.888 0.000 0.000 0.096
#> SRR1560237 2 0.0609 0.8601 0.000 0.980 0.000 0.020 0.000
#> SRR1560238 2 0.4307 0.7858 0.128 0.772 0.000 0.000 0.100
#> SRR1560239 2 0.1197 0.8707 0.000 0.952 0.000 0.000 0.048
#> SRR1560240 4 0.1478 0.7544 0.000 0.000 0.000 0.936 0.064
#> SRR1560241 4 0.4135 0.4904 0.000 0.340 0.000 0.656 0.004
#> SRR1560242 5 0.4250 0.5803 0.252 0.028 0.000 0.000 0.720
#> SRR1560243 2 0.2970 0.8206 0.004 0.828 0.000 0.000 0.168
#> SRR1560244 2 0.0703 0.8596 0.000 0.976 0.000 0.024 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.5354 0.41400 0.604 0.000 0.000 0.256 0.132 0.008
#> SRR1560165 1 0.5644 0.40540 0.580 0.000 0.000 0.240 0.168 0.012
#> SRR1560166 2 0.1444 0.83120 0.000 0.928 0.000 0.000 0.072 0.000
#> SRR1560167 1 0.0964 0.45716 0.968 0.000 0.004 0.016 0.000 0.012
#> SRR1560168 2 0.4053 0.70890 0.048 0.744 0.000 0.000 0.200 0.008
#> SRR1560169 1 0.1814 0.31086 0.900 0.000 0.000 0.000 0.000 0.100
#> SRR1560170 2 0.0692 0.84066 0.000 0.976 0.000 0.000 0.020 0.004
#> SRR1560171 2 0.0508 0.83450 0.000 0.984 0.000 0.012 0.000 0.004
#> SRR1560172 2 0.1863 0.81159 0.000 0.920 0.000 0.044 0.000 0.036
#> SRR1560173 4 0.4011 0.39722 0.304 0.000 0.000 0.672 0.000 0.024
#> SRR1560174 2 0.0146 0.83695 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1560175 4 0.6080 0.24723 0.068 0.408 0.000 0.456 0.000 0.068
#> SRR1560176 1 0.3860 -0.73554 0.528 0.000 0.000 0.000 0.000 0.472
#> SRR1560177 2 0.2912 0.73214 0.000 0.784 0.000 0.000 0.216 0.000
#> SRR1560178 3 0.2402 0.81579 0.004 0.000 0.856 0.000 0.000 0.140
#> SRR1560179 2 0.2006 0.83267 0.000 0.904 0.000 0.016 0.080 0.000
#> SRR1560180 1 0.6755 -0.05905 0.412 0.008 0.068 0.404 0.004 0.104
#> SRR1560181 5 0.1577 0.65647 0.000 0.036 0.008 0.000 0.940 0.016
#> SRR1560182 5 0.6414 0.00447 0.000 0.428 0.064 0.044 0.432 0.032
#> SRR1560183 5 0.1503 0.64852 0.000 0.016 0.008 0.000 0.944 0.032
#> SRR1560184 3 0.1341 0.84681 0.000 0.000 0.948 0.000 0.024 0.028
#> SRR1560185 3 0.1418 0.84602 0.000 0.000 0.944 0.000 0.024 0.032
#> SRR1560186 3 0.5927 0.00680 0.000 0.000 0.428 0.000 0.356 0.216
#> SRR1560187 5 0.6315 0.11172 0.008 0.000 0.016 0.380 0.432 0.164
#> SRR1560188 2 0.4551 0.56772 0.008 0.668 0.000 0.004 0.280 0.040
#> SRR1560189 2 0.3645 0.67285 0.000 0.740 0.000 0.000 0.236 0.024
#> SRR1560190 2 0.1176 0.84174 0.020 0.956 0.000 0.000 0.024 0.000
#> SRR1560191 2 0.1844 0.83832 0.016 0.928 0.000 0.000 0.040 0.016
#> SRR1560192 1 0.2100 0.28592 0.884 0.000 0.004 0.000 0.000 0.112
#> SRR1560193 2 0.0146 0.83853 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1560194 3 0.2726 0.78946 0.000 0.112 0.856 0.000 0.000 0.032
#> SRR1560195 3 0.0713 0.85618 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR1560196 3 0.0713 0.85618 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR1560197 3 0.0653 0.85604 0.000 0.004 0.980 0.000 0.004 0.012
#> SRR1560198 3 0.1049 0.85694 0.000 0.000 0.960 0.008 0.000 0.032
#> SRR1560200 3 0.5354 0.54445 0.204 0.000 0.624 0.004 0.004 0.164
#> SRR1560199 3 0.2006 0.82000 0.000 0.080 0.904 0.000 0.000 0.016
#> SRR1560201 1 0.3416 0.49116 0.816 0.004 0.004 0.012 0.148 0.016
#> SRR1560202 5 0.1854 0.64583 0.020 0.016 0.004 0.000 0.932 0.028
#> SRR1560203 5 0.7543 0.18336 0.004 0.000 0.132 0.260 0.360 0.244
#> SRR1560204 5 0.7510 0.20854 0.004 0.000 0.132 0.244 0.376 0.244
#> SRR1560205 3 0.0806 0.85400 0.000 0.000 0.972 0.000 0.008 0.020
#> SRR1560206 4 0.3937 0.56005 0.004 0.216 0.000 0.744 0.004 0.032
#> SRR1560207 4 0.3555 0.57421 0.184 0.000 0.000 0.776 0.000 0.040
#> SRR1560208 2 0.0937 0.83816 0.000 0.960 0.000 0.000 0.040 0.000
#> SRR1560209 2 0.3851 0.50537 0.000 0.700 0.004 0.284 0.004 0.008
#> SRR1560210 3 0.2113 0.84617 0.004 0.000 0.896 0.000 0.008 0.092
#> SRR1560211 2 0.2512 0.81771 0.000 0.880 0.060 0.000 0.060 0.000
#> SRR1560212 3 0.4721 0.68789 0.008 0.176 0.724 0.020 0.000 0.072
#> SRR1560213 5 0.4204 0.03623 0.000 0.448 0.008 0.000 0.540 0.004
#> SRR1560214 4 0.0508 0.70040 0.000 0.000 0.000 0.984 0.012 0.004
#> SRR1560215 4 0.0146 0.70003 0.000 0.004 0.000 0.996 0.000 0.000
#> SRR1560216 4 0.1230 0.69324 0.008 0.000 0.000 0.956 0.028 0.008
#> SRR1560217 4 0.1149 0.69562 0.008 0.000 0.000 0.960 0.024 0.008
#> SRR1560218 5 0.2221 0.62515 0.000 0.000 0.072 0.000 0.896 0.032
#> SRR1560219 5 0.2265 0.65505 0.000 0.068 0.024 0.000 0.900 0.008
#> SRR1560220 3 0.3649 0.74949 0.000 0.000 0.796 0.132 0.004 0.068
#> SRR1560221 3 0.1937 0.85337 0.000 0.004 0.924 0.032 0.004 0.036
#> SRR1560222 5 0.2617 0.62481 0.080 0.040 0.000 0.000 0.876 0.004
#> SRR1560223 5 0.3241 0.61714 0.064 0.112 0.000 0.000 0.824 0.000
#> SRR1560224 6 0.5132 0.68661 0.268 0.056 0.000 0.000 0.036 0.640
#> SRR1560225 6 0.5595 0.64899 0.320 0.164 0.000 0.000 0.000 0.516
#> SRR1560226 6 0.3866 0.72423 0.484 0.000 0.000 0.000 0.000 0.516
#> SRR1560227 6 0.3862 0.73315 0.476 0.000 0.000 0.000 0.000 0.524
#> SRR1560228 1 0.2045 0.48617 0.916 0.000 0.000 0.052 0.016 0.016
#> SRR1560229 2 0.3588 0.67976 0.000 0.776 0.000 0.180 0.000 0.044
#> SRR1560230 6 0.5171 0.70347 0.372 0.000 0.016 0.048 0.004 0.560
#> SRR1560231 3 0.2442 0.81447 0.004 0.000 0.852 0.000 0.000 0.144
#> SRR1560232 1 0.6523 0.37187 0.540 0.000 0.184 0.064 0.004 0.208
#> SRR1560233 2 0.2489 0.82943 0.052 0.900 0.012 0.000 0.020 0.016
#> SRR1560234 2 0.3012 0.75679 0.000 0.852 0.104 0.020 0.000 0.024
#> SRR1560235 2 0.0891 0.84169 0.000 0.968 0.000 0.000 0.024 0.008
#> SRR1560236 2 0.3170 0.81194 0.056 0.856 0.000 0.000 0.052 0.036
#> SRR1560237 2 0.0520 0.83442 0.000 0.984 0.000 0.008 0.000 0.008
#> SRR1560238 2 0.5508 0.54318 0.140 0.644 0.000 0.000 0.036 0.180
#> SRR1560239 2 0.2902 0.75419 0.000 0.800 0.000 0.000 0.196 0.004
#> SRR1560240 4 0.6366 0.44656 0.180 0.008 0.000 0.584 0.156 0.072
#> SRR1560241 2 0.7270 0.31764 0.096 0.536 0.000 0.180 0.124 0.064
#> SRR1560242 5 0.3250 0.50602 0.196 0.004 0.000 0.000 0.788 0.012
#> SRR1560243 5 0.4483 0.44407 0.032 0.284 0.000 0.000 0.668 0.016
#> SRR1560244 2 0.2822 0.79994 0.000 0.868 0.000 0.008 0.068 0.056
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 15546 rows and 81 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.563 0.775 0.907 0.4332 0.559 0.559
#> 3 3 0.564 0.727 0.861 0.4258 0.737 0.559
#> 4 4 0.569 0.529 0.749 0.1421 0.796 0.525
#> 5 5 0.626 0.508 0.727 0.1034 0.772 0.361
#> 6 6 0.664 0.575 0.745 0.0379 0.902 0.591
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1560164 1 0.000 0.8574 1.000 0.000
#> SRR1560165 1 0.000 0.8574 1.000 0.000
#> SRR1560166 2 0.000 0.8957 0.000 1.000
#> SRR1560167 1 0.000 0.8574 1.000 0.000
#> SRR1560168 2 0.278 0.8617 0.048 0.952
#> SRR1560169 1 0.000 0.8574 1.000 0.000
#> SRR1560170 2 0.000 0.8957 0.000 1.000
#> SRR1560171 2 0.000 0.8957 0.000 1.000
#> SRR1560172 2 0.000 0.8957 0.000 1.000
#> SRR1560173 1 0.000 0.8574 1.000 0.000
#> SRR1560174 2 0.000 0.8957 0.000 1.000
#> SRR1560175 2 0.000 0.8957 0.000 1.000
#> SRR1560176 1 0.000 0.8574 1.000 0.000
#> SRR1560177 2 0.000 0.8957 0.000 1.000
#> SRR1560178 2 0.000 0.8957 0.000 1.000
#> SRR1560179 2 0.000 0.8957 0.000 1.000
#> SRR1560180 1 0.866 0.6295 0.712 0.288
#> SRR1560181 2 0.000 0.8957 0.000 1.000
#> SRR1560182 2 0.000 0.8957 0.000 1.000
#> SRR1560183 2 0.000 0.8957 0.000 1.000
#> SRR1560184 2 0.000 0.8957 0.000 1.000
#> SRR1560185 2 0.000 0.8957 0.000 1.000
#> SRR1560186 1 0.876 0.6170 0.704 0.296
#> SRR1560187 2 0.985 0.2355 0.428 0.572
#> SRR1560188 2 0.814 0.6389 0.252 0.748
#> SRR1560189 2 0.814 0.6389 0.252 0.748
#> SRR1560190 2 0.775 0.6745 0.228 0.772
#> SRR1560191 2 0.000 0.8957 0.000 1.000
#> SRR1560192 1 0.000 0.8574 1.000 0.000
#> SRR1560193 2 0.000 0.8957 0.000 1.000
#> SRR1560194 2 0.000 0.8957 0.000 1.000
#> SRR1560195 2 0.000 0.8957 0.000 1.000
#> SRR1560196 2 0.000 0.8957 0.000 1.000
#> SRR1560197 2 0.000 0.8957 0.000 1.000
#> SRR1560198 1 0.876 0.6170 0.704 0.296
#> SRR1560200 2 0.987 0.2227 0.432 0.568
#> SRR1560199 2 0.000 0.8957 0.000 1.000
#> SRR1560201 1 0.844 0.6501 0.728 0.272
#> SRR1560202 2 0.814 0.6389 0.252 0.748
#> SRR1560203 1 0.000 0.8574 1.000 0.000
#> SRR1560204 1 0.000 0.8574 1.000 0.000
#> SRR1560205 2 0.000 0.8957 0.000 1.000
#> SRR1560206 2 0.000 0.8957 0.000 1.000
#> SRR1560207 1 0.000 0.8574 1.000 0.000
#> SRR1560208 2 0.000 0.8957 0.000 1.000
#> SRR1560209 2 0.000 0.8957 0.000 1.000
#> SRR1560210 2 0.738 0.7020 0.208 0.792
#> SRR1560211 2 0.000 0.8957 0.000 1.000
#> SRR1560212 2 0.000 0.8957 0.000 1.000
#> SRR1560213 2 0.000 0.8957 0.000 1.000
#> SRR1560214 2 0.981 0.2615 0.420 0.580
#> SRR1560215 2 0.981 0.2615 0.420 0.580
#> SRR1560216 1 0.000 0.8574 1.000 0.000
#> SRR1560217 1 0.000 0.8574 1.000 0.000
#> SRR1560218 2 0.000 0.8957 0.000 1.000
#> SRR1560219 2 0.000 0.8957 0.000 1.000
#> SRR1560220 2 0.662 0.7448 0.172 0.828
#> SRR1560221 2 0.000 0.8957 0.000 1.000
#> SRR1560222 1 0.955 0.4537 0.624 0.376
#> SRR1560223 1 0.955 0.4537 0.624 0.376
#> SRR1560224 1 0.000 0.8574 1.000 0.000
#> SRR1560225 1 0.900 0.5828 0.684 0.316
#> SRR1560226 1 0.000 0.8574 1.000 0.000
#> SRR1560227 1 0.000 0.8574 1.000 0.000
#> SRR1560228 1 0.000 0.8574 1.000 0.000
#> SRR1560229 2 0.881 0.5563 0.300 0.700
#> SRR1560230 1 0.000 0.8574 1.000 0.000
#> SRR1560231 2 0.000 0.8957 0.000 1.000
#> SRR1560232 1 0.855 0.6405 0.720 0.280
#> SRR1560233 2 0.000 0.8957 0.000 1.000
#> SRR1560234 2 0.000 0.8957 0.000 1.000
#> SRR1560235 2 0.000 0.8957 0.000 1.000
#> SRR1560236 2 0.000 0.8957 0.000 1.000
#> SRR1560237 2 0.000 0.8957 0.000 1.000
#> SRR1560238 2 0.204 0.8737 0.032 0.968
#> SRR1560239 2 0.000 0.8957 0.000 1.000
#> SRR1560240 1 0.987 0.2864 0.568 0.432
#> SRR1560241 2 0.881 0.5563 0.300 0.700
#> SRR1560242 2 0.996 0.0991 0.464 0.536
#> SRR1560243 2 0.961 0.3653 0.384 0.616
#> SRR1560244 2 0.000 0.8957 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560166 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560167 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560168 2 0.6180 0.443 0.000 0.584 0.416
#> SRR1560169 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560170 2 0.0592 0.892 0.000 0.988 0.012
#> SRR1560171 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560172 2 0.4974 0.736 0.000 0.764 0.236
#> SRR1560173 1 0.3752 0.784 0.856 0.000 0.144
#> SRR1560174 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560175 2 0.5016 0.731 0.000 0.760 0.240
#> SRR1560176 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560177 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560178 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560179 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560180 3 0.5465 0.426 0.288 0.000 0.712
#> SRR1560181 2 0.5706 0.637 0.000 0.680 0.320
#> SRR1560182 2 0.0747 0.890 0.000 0.984 0.016
#> SRR1560183 2 0.5760 0.624 0.000 0.672 0.328
#> SRR1560184 2 0.1163 0.890 0.000 0.972 0.028
#> SRR1560185 2 0.1163 0.890 0.000 0.972 0.028
#> SRR1560186 3 0.5397 0.456 0.280 0.000 0.720
#> SRR1560187 3 0.0237 0.668 0.004 0.000 0.996
#> SRR1560188 3 0.5560 0.482 0.000 0.300 0.700
#> SRR1560189 3 0.5560 0.482 0.000 0.300 0.700
#> SRR1560190 3 0.5621 0.491 0.000 0.308 0.692
#> SRR1560191 2 0.5016 0.730 0.000 0.760 0.240
#> SRR1560192 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560193 2 0.3412 0.829 0.000 0.876 0.124
#> SRR1560194 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560195 2 0.1163 0.890 0.000 0.972 0.028
#> SRR1560196 2 0.1163 0.890 0.000 0.972 0.028
#> SRR1560197 2 0.2796 0.859 0.000 0.908 0.092
#> SRR1560198 3 0.5397 0.456 0.280 0.000 0.720
#> SRR1560200 3 0.0424 0.668 0.008 0.000 0.992
#> SRR1560199 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560201 3 0.5678 0.367 0.316 0.000 0.684
#> SRR1560202 3 0.5560 0.482 0.000 0.300 0.700
#> SRR1560203 1 0.5760 0.641 0.672 0.000 0.328
#> SRR1560204 1 0.5760 0.641 0.672 0.000 0.328
#> SRR1560205 2 0.1163 0.890 0.000 0.972 0.028
#> SRR1560206 2 0.0747 0.891 0.000 0.984 0.016
#> SRR1560207 1 0.3941 0.780 0.844 0.000 0.156
#> SRR1560208 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560209 2 0.0892 0.891 0.000 0.980 0.020
#> SRR1560210 3 0.5621 0.441 0.000 0.308 0.692
#> SRR1560211 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560212 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560213 2 0.1860 0.882 0.000 0.948 0.052
#> SRR1560214 3 0.0237 0.669 0.000 0.004 0.996
#> SRR1560215 3 0.0237 0.669 0.000 0.004 0.996
#> SRR1560216 1 0.5760 0.641 0.672 0.000 0.328
#> SRR1560217 1 0.5760 0.641 0.672 0.000 0.328
#> SRR1560218 2 0.1163 0.890 0.000 0.972 0.028
#> SRR1560219 2 0.0892 0.890 0.000 0.980 0.020
#> SRR1560220 3 0.5905 0.326 0.000 0.352 0.648
#> SRR1560221 2 0.3267 0.843 0.000 0.884 0.116
#> SRR1560222 3 0.4555 0.555 0.200 0.000 0.800
#> SRR1560223 3 0.4555 0.555 0.200 0.000 0.800
#> SRR1560224 1 0.5760 0.641 0.672 0.000 0.328
#> SRR1560225 3 0.5327 0.456 0.272 0.000 0.728
#> SRR1560226 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.829 1.000 0.000 0.000
#> SRR1560229 3 0.4452 0.632 0.000 0.192 0.808
#> SRR1560230 1 0.5016 0.719 0.760 0.000 0.240
#> SRR1560231 2 0.4654 0.768 0.000 0.792 0.208
#> SRR1560232 3 0.5529 0.407 0.296 0.000 0.704
#> SRR1560233 2 0.4654 0.768 0.000 0.792 0.208
#> SRR1560234 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560235 2 0.5810 0.600 0.000 0.664 0.336
#> SRR1560236 2 0.5810 0.600 0.000 0.664 0.336
#> SRR1560237 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560238 2 0.6111 0.492 0.000 0.604 0.396
#> SRR1560239 2 0.0000 0.891 0.000 1.000 0.000
#> SRR1560240 3 0.4047 0.601 0.148 0.004 0.848
#> SRR1560241 3 0.4452 0.632 0.000 0.192 0.808
#> SRR1560242 3 0.1529 0.658 0.040 0.000 0.960
#> SRR1560243 3 0.1878 0.669 0.004 0.044 0.952
#> SRR1560244 2 0.0000 0.891 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560165 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560166 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560167 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560168 3 0.497 0.3748 0.008 0.348 0.644 0.000
#> SRR1560169 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560170 2 0.187 0.8168 0.000 0.928 0.072 0.000
#> SRR1560171 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560172 2 0.498 0.0944 0.000 0.536 0.464 0.000
#> SRR1560173 4 0.473 -0.1945 0.364 0.000 0.000 0.636
#> SRR1560174 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560175 2 0.499 0.0786 0.000 0.532 0.468 0.000
#> SRR1560176 1 0.495 0.6603 0.560 0.000 0.000 0.440
#> SRR1560177 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560178 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560179 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560180 4 0.577 0.5414 0.376 0.000 0.036 0.588
#> SRR1560181 3 0.484 0.2229 0.004 0.348 0.648 0.000
#> SRR1560182 2 0.321 0.7855 0.004 0.848 0.148 0.000
#> SRR1560183 3 0.474 0.2681 0.004 0.328 0.668 0.000
#> SRR1560184 2 0.453 0.7422 0.016 0.744 0.240 0.000
#> SRR1560185 2 0.453 0.7422 0.016 0.744 0.240 0.000
#> SRR1560186 4 0.720 0.5150 0.332 0.000 0.156 0.512
#> SRR1560187 3 0.652 0.3400 0.280 0.000 0.608 0.112
#> SRR1560188 3 0.452 0.5807 0.052 0.060 0.836 0.052
#> SRR1560189 3 0.452 0.5807 0.052 0.060 0.836 0.052
#> SRR1560190 3 0.613 0.5614 0.112 0.144 0.720 0.024
#> SRR1560191 2 0.485 0.3092 0.000 0.600 0.400 0.000
#> SRR1560192 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560193 2 0.349 0.7066 0.000 0.812 0.188 0.000
#> SRR1560194 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560195 2 0.453 0.7422 0.016 0.744 0.240 0.000
#> SRR1560196 2 0.453 0.7422 0.016 0.744 0.240 0.000
#> SRR1560197 2 0.402 0.7111 0.004 0.772 0.224 0.000
#> SRR1560198 4 0.720 0.5150 0.332 0.000 0.156 0.512
#> SRR1560200 3 0.666 0.3261 0.280 0.000 0.596 0.124
#> SRR1560199 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560201 4 0.528 0.5444 0.368 0.000 0.016 0.616
#> SRR1560202 3 0.452 0.5807 0.052 0.060 0.836 0.052
#> SRR1560203 4 0.000 0.4632 0.000 0.000 0.000 1.000
#> SRR1560204 4 0.000 0.4632 0.000 0.000 0.000 1.000
#> SRR1560205 2 0.453 0.7422 0.016 0.744 0.240 0.000
#> SRR1560206 2 0.187 0.8168 0.000 0.928 0.072 0.000
#> SRR1560207 4 0.462 -0.1273 0.340 0.000 0.000 0.660
#> SRR1560208 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560209 2 0.194 0.8152 0.000 0.924 0.076 0.000
#> SRR1560210 3 0.617 0.5350 0.152 0.124 0.708 0.016
#> SRR1560211 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560212 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560213 2 0.463 0.7303 0.016 0.732 0.252 0.000
#> SRR1560214 3 0.630 0.3707 0.260 0.000 0.636 0.104
#> SRR1560215 3 0.630 0.3707 0.260 0.000 0.636 0.104
#> SRR1560216 4 0.000 0.4632 0.000 0.000 0.000 1.000
#> SRR1560217 4 0.000 0.4632 0.000 0.000 0.000 1.000
#> SRR1560218 2 0.460 0.7364 0.016 0.736 0.248 0.000
#> SRR1560219 2 0.410 0.7634 0.016 0.792 0.192 0.000
#> SRR1560220 3 0.595 0.5509 0.140 0.148 0.708 0.004
#> SRR1560221 2 0.490 0.5686 0.004 0.632 0.364 0.000
#> SRR1560222 4 0.786 0.3273 0.364 0.000 0.272 0.364
#> SRR1560223 4 0.786 0.3273 0.364 0.000 0.272 0.364
#> SRR1560224 4 0.000 0.4632 0.000 0.000 0.000 1.000
#> SRR1560225 1 0.780 -0.5040 0.376 0.000 0.248 0.376
#> SRR1560226 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560227 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560228 1 0.483 0.7185 0.608 0.000 0.000 0.392
#> SRR1560229 3 0.486 0.5371 0.128 0.020 0.800 0.052
#> SRR1560230 4 0.302 0.2186 0.148 0.000 0.000 0.852
#> SRR1560231 3 0.516 -0.1525 0.004 0.472 0.524 0.000
#> SRR1560232 4 0.574 0.5437 0.368 0.000 0.036 0.596
#> SRR1560233 3 0.516 -0.1525 0.004 0.472 0.524 0.000
#> SRR1560234 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560235 3 0.492 0.2208 0.000 0.428 0.572 0.000
#> SRR1560236 3 0.492 0.2208 0.000 0.428 0.572 0.000
#> SRR1560237 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560238 3 0.506 0.3358 0.008 0.368 0.624 0.000
#> SRR1560239 2 0.000 0.8336 0.000 1.000 0.000 0.000
#> SRR1560240 1 0.789 -0.4525 0.372 0.000 0.332 0.296
#> SRR1560241 3 0.486 0.5371 0.128 0.020 0.800 0.052
#> SRR1560242 3 0.727 0.1436 0.332 0.000 0.504 0.164
#> SRR1560243 3 0.644 0.3529 0.324 0.008 0.600 0.068
#> SRR1560244 2 0.000 0.8336 0.000 1.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.8715 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.8715 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.0290 0.8556 0.000 0.992 0.000 0.000 0.008
#> SRR1560167 1 0.0000 0.8715 1.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.7676 -0.3469 0.000 0.152 0.372 0.088 0.388
#> SRR1560169 1 0.0000 0.8715 1.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.2886 0.7195 0.000 0.844 0.148 0.000 0.008
#> SRR1560171 2 0.0290 0.8556 0.000 0.992 0.000 0.000 0.008
#> SRR1560172 3 0.6874 0.4177 0.000 0.324 0.404 0.004 0.268
#> SRR1560173 1 0.5273 0.6048 0.680 0.000 0.000 0.156 0.164
#> SRR1560174 2 0.0290 0.8556 0.000 0.992 0.000 0.000 0.008
#> SRR1560175 3 0.6868 0.4207 0.000 0.320 0.408 0.004 0.268
#> SRR1560176 1 0.1469 0.8425 0.948 0.000 0.000 0.036 0.016
#> SRR1560177 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560178 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560179 2 0.0693 0.8527 0.000 0.980 0.008 0.000 0.012
#> SRR1560180 4 0.3661 0.3714 0.000 0.000 0.000 0.724 0.276
#> SRR1560181 3 0.5190 0.4613 0.000 0.028 0.656 0.028 0.288
#> SRR1560182 2 0.4151 0.4026 0.000 0.652 0.344 0.000 0.004
#> SRR1560183 3 0.4734 0.4396 0.000 0.008 0.676 0.028 0.288
#> SRR1560184 3 0.2732 0.5673 0.000 0.160 0.840 0.000 0.000
#> SRR1560185 3 0.2732 0.5673 0.000 0.160 0.840 0.000 0.000
#> SRR1560186 4 0.2966 0.4495 0.000 0.000 0.000 0.816 0.184
#> SRR1560187 4 0.4084 0.5022 0.000 0.000 0.004 0.668 0.328
#> SRR1560188 5 0.6728 0.0144 0.000 0.000 0.276 0.308 0.416
#> SRR1560189 5 0.6728 0.0144 0.000 0.000 0.276 0.308 0.416
#> SRR1560190 5 0.7437 -0.0526 0.000 0.048 0.208 0.308 0.436
#> SRR1560191 3 0.7168 0.4364 0.000 0.304 0.460 0.032 0.204
#> SRR1560192 1 0.0000 0.8715 1.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.6269 0.3314 0.000 0.612 0.220 0.028 0.140
#> SRR1560194 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560195 3 0.2732 0.5673 0.000 0.160 0.840 0.000 0.000
#> SRR1560196 3 0.2732 0.5673 0.000 0.160 0.840 0.000 0.000
#> SRR1560197 2 0.5351 -0.1237 0.000 0.484 0.464 0.000 0.052
#> SRR1560198 4 0.2966 0.4495 0.000 0.000 0.000 0.816 0.184
#> SRR1560200 4 0.4066 0.5083 0.000 0.000 0.004 0.672 0.324
#> SRR1560199 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560201 4 0.3774 0.3464 0.000 0.000 0.000 0.704 0.296
#> SRR1560202 5 0.6728 0.0144 0.000 0.000 0.276 0.308 0.416
#> SRR1560203 5 0.6510 0.0935 0.232 0.000 0.000 0.284 0.484
#> SRR1560204 5 0.6510 0.0935 0.232 0.000 0.000 0.284 0.484
#> SRR1560205 3 0.2732 0.5673 0.000 0.160 0.840 0.000 0.000
#> SRR1560206 2 0.3696 0.6384 0.000 0.772 0.212 0.000 0.016
#> SRR1560207 1 0.5507 0.5728 0.652 0.000 0.000 0.160 0.188
#> SRR1560208 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560209 2 0.3759 0.6363 0.000 0.764 0.220 0.000 0.016
#> SRR1560210 5 0.6823 -0.1969 0.000 0.000 0.320 0.336 0.344
#> SRR1560211 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560212 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560213 3 0.3424 0.5085 0.000 0.240 0.760 0.000 0.000
#> SRR1560214 4 0.4298 0.4793 0.000 0.000 0.008 0.640 0.352
#> SRR1560215 4 0.4298 0.4793 0.000 0.000 0.008 0.640 0.352
#> SRR1560216 5 0.6510 0.0935 0.232 0.000 0.000 0.284 0.484
#> SRR1560217 5 0.6510 0.0935 0.232 0.000 0.000 0.284 0.484
#> SRR1560218 3 0.2648 0.5713 0.000 0.152 0.848 0.000 0.000
#> SRR1560219 3 0.3932 0.3760 0.000 0.328 0.672 0.000 0.000
#> SRR1560220 3 0.6746 -0.0607 0.000 0.000 0.392 0.264 0.344
#> SRR1560221 3 0.4756 0.5368 0.000 0.240 0.704 0.004 0.052
#> SRR1560222 4 0.0703 0.5548 0.000 0.000 0.000 0.976 0.024
#> SRR1560223 4 0.0703 0.5548 0.000 0.000 0.000 0.976 0.024
#> SRR1560224 5 0.6510 0.0935 0.232 0.000 0.000 0.284 0.484
#> SRR1560225 4 0.2890 0.5270 0.000 0.000 0.004 0.836 0.160
#> SRR1560226 1 0.0000 0.8715 1.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.8715 1.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0162 0.8700 0.996 0.000 0.000 0.000 0.004
#> SRR1560229 4 0.6450 0.1287 0.000 0.000 0.180 0.436 0.384
#> SRR1560230 1 0.6657 0.1503 0.424 0.000 0.000 0.236 0.340
#> SRR1560231 3 0.5752 0.5407 0.000 0.164 0.636 0.004 0.196
#> SRR1560232 4 0.3707 0.3637 0.000 0.000 0.000 0.716 0.284
#> SRR1560233 3 0.5752 0.5407 0.000 0.164 0.636 0.004 0.196
#> SRR1560234 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560235 3 0.7262 0.3615 0.000 0.204 0.400 0.032 0.364
#> SRR1560236 3 0.7262 0.3615 0.000 0.204 0.400 0.032 0.364
#> SRR1560237 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560238 3 0.7286 0.3098 0.000 0.152 0.416 0.052 0.380
#> SRR1560239 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
#> SRR1560240 4 0.1478 0.5612 0.000 0.000 0.000 0.936 0.064
#> SRR1560241 4 0.6408 0.1407 0.000 0.000 0.172 0.440 0.388
#> SRR1560242 4 0.3366 0.5400 0.000 0.000 0.000 0.768 0.232
#> SRR1560243 4 0.5018 0.4835 0.000 0.000 0.068 0.664 0.268
#> SRR1560244 2 0.0703 0.8699 0.000 0.976 0.024 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0000 0.91447 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.91447 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.1075 0.83380 0.000 0.952 0.000 0.000 0.048 0.000
#> SRR1560167 1 0.0000 0.91447 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.5126 0.55909 0.000 0.100 0.036 0.180 0.684 0.000
#> SRR1560169 1 0.0000 0.91447 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.4039 0.65625 0.000 0.752 0.092 0.000 0.156 0.000
#> SRR1560171 2 0.1075 0.83380 0.000 0.952 0.000 0.000 0.048 0.000
#> SRR1560172 5 0.3606 0.55310 0.000 0.264 0.008 0.004 0.724 0.000
#> SRR1560173 1 0.4817 0.60494 0.680 0.000 0.132 0.004 0.000 0.184
#> SRR1560174 2 0.1075 0.83380 0.000 0.952 0.000 0.000 0.048 0.000
#> SRR1560175 5 0.3476 0.55787 0.000 0.260 0.004 0.004 0.732 0.000
#> SRR1560176 1 0.2003 0.81315 0.884 0.000 0.000 0.000 0.000 0.116
#> SRR1560177 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560178 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560179 2 0.1349 0.82938 0.000 0.940 0.004 0.000 0.056 0.000
#> SRR1560180 6 0.5945 0.18922 0.000 0.000 0.216 0.392 0.000 0.392
#> SRR1560181 5 0.5074 0.24871 0.000 0.012 0.192 0.132 0.664 0.000
#> SRR1560182 2 0.5253 0.27893 0.000 0.608 0.192 0.000 0.200 0.000
#> SRR1560183 5 0.4788 0.28403 0.000 0.004 0.180 0.132 0.684 0.000
#> SRR1560184 3 0.4700 0.90615 0.000 0.060 0.600 0.000 0.340 0.000
#> SRR1560185 3 0.4700 0.90615 0.000 0.060 0.600 0.000 0.340 0.000
#> SRR1560186 4 0.4587 -0.08252 0.000 0.000 0.036 0.508 0.000 0.456
#> SRR1560187 4 0.2593 0.59866 0.000 0.000 0.012 0.884 0.068 0.036
#> SRR1560188 4 0.3975 0.18116 0.000 0.000 0.004 0.544 0.452 0.000
#> SRR1560189 4 0.3975 0.18116 0.000 0.000 0.004 0.544 0.452 0.000
#> SRR1560190 5 0.5191 0.16380 0.000 0.000 0.172 0.212 0.616 0.000
#> SRR1560191 5 0.5457 0.41547 0.000 0.192 0.140 0.028 0.640 0.000
#> SRR1560192 1 0.0000 0.91447 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.6202 0.17488 0.000 0.476 0.172 0.024 0.328 0.000
#> SRR1560194 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560195 3 0.4700 0.90615 0.000 0.060 0.600 0.000 0.340 0.000
#> SRR1560196 3 0.4700 0.90615 0.000 0.060 0.600 0.000 0.340 0.000
#> SRR1560197 2 0.6147 -0.22193 0.000 0.420 0.264 0.004 0.312 0.000
#> SRR1560198 4 0.4587 -0.08252 0.000 0.000 0.036 0.508 0.000 0.456
#> SRR1560200 4 0.2782 0.59665 0.000 0.000 0.024 0.876 0.068 0.032
#> SRR1560199 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560201 6 0.5907 0.21757 0.000 0.000 0.212 0.352 0.000 0.436
#> SRR1560202 4 0.3975 0.18116 0.000 0.000 0.004 0.544 0.452 0.000
#> SRR1560203 6 0.2618 0.69542 0.116 0.000 0.000 0.024 0.000 0.860
#> SRR1560204 6 0.2618 0.69542 0.116 0.000 0.000 0.024 0.000 0.860
#> SRR1560205 3 0.4700 0.90615 0.000 0.060 0.600 0.000 0.340 0.000
#> SRR1560206 2 0.4800 0.56180 0.000 0.672 0.168 0.000 0.160 0.000
#> SRR1560207 1 0.5026 0.56087 0.652 0.000 0.140 0.004 0.000 0.204
#> SRR1560208 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560209 2 0.4666 0.56827 0.000 0.688 0.168 0.000 0.144 0.000
#> SRR1560210 4 0.5272 0.31880 0.000 0.000 0.140 0.584 0.276 0.000
#> SRR1560211 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560212 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560213 3 0.5697 0.71519 0.000 0.168 0.476 0.000 0.356 0.000
#> SRR1560214 4 0.2006 0.60085 0.000 0.000 0.016 0.904 0.080 0.000
#> SRR1560215 4 0.2006 0.60085 0.000 0.000 0.016 0.904 0.080 0.000
#> SRR1560216 6 0.2618 0.69542 0.116 0.000 0.000 0.024 0.000 0.860
#> SRR1560217 6 0.2618 0.69542 0.116 0.000 0.000 0.024 0.000 0.860
#> SRR1560218 3 0.4724 0.89647 0.000 0.060 0.592 0.000 0.348 0.000
#> SRR1560219 3 0.5962 0.64259 0.000 0.252 0.448 0.000 0.300 0.000
#> SRR1560220 4 0.5499 0.18262 0.000 0.000 0.140 0.512 0.348 0.000
#> SRR1560221 5 0.5841 -0.29532 0.000 0.200 0.288 0.004 0.508 0.000
#> SRR1560222 4 0.4274 0.30659 0.000 0.000 0.048 0.676 0.000 0.276
#> SRR1560223 4 0.4274 0.30659 0.000 0.000 0.048 0.676 0.000 0.276
#> SRR1560224 6 0.2618 0.69542 0.116 0.000 0.000 0.024 0.000 0.860
#> SRR1560225 4 0.6053 0.00438 0.000 0.000 0.224 0.440 0.004 0.332
#> SRR1560226 1 0.0000 0.91447 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.91447 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0146 0.91222 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1560229 4 0.3619 0.43299 0.000 0.000 0.004 0.680 0.316 0.000
#> SRR1560230 6 0.3883 0.41007 0.332 0.000 0.000 0.012 0.000 0.656
#> SRR1560231 5 0.4634 0.36573 0.000 0.156 0.136 0.004 0.704 0.000
#> SRR1560232 6 0.5944 0.20249 0.000 0.000 0.216 0.384 0.000 0.400
#> SRR1560233 5 0.4634 0.36573 0.000 0.156 0.136 0.004 0.704 0.000
#> SRR1560234 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560235 5 0.3263 0.59972 0.000 0.112 0.024 0.028 0.836 0.000
#> SRR1560236 5 0.3263 0.59972 0.000 0.112 0.024 0.028 0.836 0.000
#> SRR1560237 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560238 5 0.4823 0.58239 0.000 0.100 0.040 0.136 0.724 0.000
#> SRR1560239 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560240 4 0.4109 0.38527 0.000 0.000 0.040 0.736 0.012 0.212
#> SRR1560241 4 0.3584 0.44149 0.000 0.000 0.004 0.688 0.308 0.000
#> SRR1560242 4 0.2682 0.54853 0.000 0.000 0.020 0.876 0.020 0.084
#> SRR1560243 4 0.3090 0.59336 0.000 0.000 0.008 0.848 0.088 0.056
#> SRR1560244 2 0.0000 0.84993 0.000 1.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.985 0.993 0.4624 0.535 0.535
#> 3 3 0.936 0.946 0.967 0.3902 0.710 0.509
#> 4 4 0.642 0.605 0.808 0.1337 0.782 0.472
#> 5 5 0.726 0.696 0.828 0.0829 0.911 0.673
#> 6 6 0.739 0.662 0.717 0.0413 0.890 0.542
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
#> SRR1560164 1 0.000 0.982 1.000 0.000
#> SRR1560165 1 0.000 0.982 1.000 0.000
#> SRR1560166 2 0.000 0.999 0.000 1.000
#> SRR1560167 1 0.000 0.982 1.000 0.000
#> SRR1560168 2 0.000 0.999 0.000 1.000
#> SRR1560169 1 0.000 0.982 1.000 0.000
#> SRR1560170 2 0.000 0.999 0.000 1.000
#> SRR1560171 2 0.000 0.999 0.000 1.000
#> SRR1560172 2 0.000 0.999 0.000 1.000
#> SRR1560173 1 0.000 0.982 1.000 0.000
#> SRR1560174 2 0.000 0.999 0.000 1.000
#> SRR1560175 2 0.000 0.999 0.000 1.000
#> SRR1560176 1 0.000 0.982 1.000 0.000
#> SRR1560177 2 0.000 0.999 0.000 1.000
#> SRR1560178 2 0.000 0.999 0.000 1.000
#> SRR1560179 2 0.000 0.999 0.000 1.000
#> SRR1560180 1 0.814 0.674 0.748 0.252
#> SRR1560181 2 0.000 0.999 0.000 1.000
#> SRR1560182 2 0.000 0.999 0.000 1.000
#> SRR1560183 2 0.000 0.999 0.000 1.000
#> SRR1560184 2 0.000 0.999 0.000 1.000
#> SRR1560185 2 0.000 0.999 0.000 1.000
#> SRR1560186 1 0.000 0.982 1.000 0.000
#> SRR1560187 2 0.278 0.948 0.048 0.952
#> SRR1560188 2 0.000 0.999 0.000 1.000
#> SRR1560189 2 0.000 0.999 0.000 1.000
#> SRR1560190 2 0.000 0.999 0.000 1.000
#> SRR1560191 2 0.000 0.999 0.000 1.000
#> SRR1560192 1 0.000 0.982 1.000 0.000
#> SRR1560193 2 0.000 0.999 0.000 1.000
#> SRR1560194 2 0.000 0.999 0.000 1.000
#> SRR1560195 2 0.000 0.999 0.000 1.000
#> SRR1560196 2 0.000 0.999 0.000 1.000
#> SRR1560197 2 0.000 0.999 0.000 1.000
#> SRR1560198 1 0.000 0.982 1.000 0.000
#> SRR1560200 1 0.814 0.674 0.748 0.252
#> SRR1560199 2 0.000 0.999 0.000 1.000
#> SRR1560201 1 0.000 0.982 1.000 0.000
#> SRR1560202 2 0.000 0.999 0.000 1.000
#> SRR1560203 1 0.000 0.982 1.000 0.000
#> SRR1560204 1 0.000 0.982 1.000 0.000
#> SRR1560205 2 0.000 0.999 0.000 1.000
#> SRR1560206 2 0.000 0.999 0.000 1.000
#> SRR1560207 1 0.000 0.982 1.000 0.000
#> SRR1560208 2 0.000 0.999 0.000 1.000
#> SRR1560209 2 0.000 0.999 0.000 1.000
#> SRR1560210 2 0.000 0.999 0.000 1.000
#> SRR1560211 2 0.000 0.999 0.000 1.000
#> SRR1560212 2 0.000 0.999 0.000 1.000
#> SRR1560213 2 0.000 0.999 0.000 1.000
#> SRR1560214 1 0.000 0.982 1.000 0.000
#> SRR1560215 2 0.000 0.999 0.000 1.000
#> SRR1560216 1 0.000 0.982 1.000 0.000
#> SRR1560217 1 0.000 0.982 1.000 0.000
#> SRR1560218 2 0.000 0.999 0.000 1.000
#> SRR1560219 2 0.000 0.999 0.000 1.000
#> SRR1560220 2 0.000 0.999 0.000 1.000
#> SRR1560221 2 0.000 0.999 0.000 1.000
#> SRR1560222 1 0.000 0.982 1.000 0.000
#> SRR1560223 1 0.000 0.982 1.000 0.000
#> SRR1560224 1 0.000 0.982 1.000 0.000
#> SRR1560225 1 0.000 0.982 1.000 0.000
#> SRR1560226 1 0.000 0.982 1.000 0.000
#> SRR1560227 1 0.000 0.982 1.000 0.000
#> SRR1560228 1 0.000 0.982 1.000 0.000
#> SRR1560229 2 0.000 0.999 0.000 1.000
#> SRR1560230 1 0.000 0.982 1.000 0.000
#> SRR1560231 2 0.000 0.999 0.000 1.000
#> SRR1560232 1 0.000 0.982 1.000 0.000
#> SRR1560233 2 0.000 0.999 0.000 1.000
#> SRR1560234 2 0.000 0.999 0.000 1.000
#> SRR1560235 2 0.000 0.999 0.000 1.000
#> SRR1560236 2 0.000 0.999 0.000 1.000
#> SRR1560237 2 0.000 0.999 0.000 1.000
#> SRR1560238 2 0.000 0.999 0.000 1.000
#> SRR1560239 2 0.000 0.999 0.000 1.000
#> SRR1560240 1 0.000 0.982 1.000 0.000
#> SRR1560241 2 0.000 0.999 0.000 1.000
#> SRR1560242 1 0.000 0.982 1.000 0.000
#> SRR1560243 2 0.000 0.999 0.000 1.000
#> SRR1560244 2 0.000 0.999 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560166 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560167 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560168 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560169 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560170 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560171 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560172 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560173 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560174 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560175 3 0.4291 0.804 0.000 0.180 0.820
#> SRR1560176 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560177 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560178 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560179 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560180 2 0.1529 0.947 0.040 0.960 0.000
#> SRR1560181 3 0.4605 0.766 0.000 0.204 0.796
#> SRR1560182 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560183 2 0.4291 0.773 0.000 0.820 0.180
#> SRR1560184 3 0.1860 0.959 0.000 0.052 0.948
#> SRR1560185 3 0.1860 0.959 0.000 0.052 0.948
#> SRR1560186 2 0.1529 0.947 0.040 0.960 0.000
#> SRR1560187 2 0.1031 0.951 0.024 0.976 0.000
#> SRR1560188 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560189 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560190 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560191 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560192 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560193 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560194 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560195 3 0.1643 0.963 0.000 0.044 0.956
#> SRR1560196 3 0.1643 0.963 0.000 0.044 0.956
#> SRR1560197 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560198 2 0.1860 0.939 0.052 0.948 0.000
#> SRR1560200 2 0.1031 0.951 0.024 0.976 0.000
#> SRR1560199 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560201 2 0.3686 0.855 0.140 0.860 0.000
#> SRR1560202 2 0.0000 0.945 0.000 1.000 0.000
#> SRR1560203 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560204 1 0.1529 0.946 0.960 0.040 0.000
#> SRR1560205 3 0.1643 0.963 0.000 0.044 0.956
#> SRR1560206 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560207 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560208 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560209 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560210 2 0.0000 0.945 0.000 1.000 0.000
#> SRR1560211 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560212 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560213 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560214 2 0.1529 0.947 0.040 0.960 0.000
#> SRR1560215 2 0.1170 0.951 0.016 0.976 0.008
#> SRR1560216 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560217 1 0.1529 0.946 0.960 0.040 0.000
#> SRR1560218 3 0.1860 0.959 0.000 0.052 0.948
#> SRR1560219 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560220 2 0.0000 0.945 0.000 1.000 0.000
#> SRR1560221 3 0.0747 0.973 0.000 0.016 0.984
#> SRR1560222 2 0.1529 0.947 0.040 0.960 0.000
#> SRR1560223 2 0.1411 0.949 0.036 0.964 0.000
#> SRR1560224 1 0.5363 0.610 0.724 0.276 0.000
#> SRR1560225 2 0.1529 0.947 0.040 0.960 0.000
#> SRR1560226 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560229 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560230 1 0.0000 0.977 1.000 0.000 0.000
#> SRR1560231 3 0.1643 0.963 0.000 0.044 0.956
#> SRR1560232 2 0.3619 0.860 0.136 0.864 0.000
#> SRR1560233 3 0.1163 0.967 0.000 0.028 0.972
#> SRR1560234 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560235 3 0.3482 0.867 0.000 0.128 0.872
#> SRR1560236 2 0.4842 0.713 0.000 0.776 0.224
#> SRR1560237 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560238 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560239 3 0.0000 0.974 0.000 0.000 1.000
#> SRR1560240 2 0.1529 0.947 0.040 0.960 0.000
#> SRR1560241 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560242 2 0.1529 0.947 0.040 0.960 0.000
#> SRR1560243 2 0.1031 0.948 0.000 0.976 0.024
#> SRR1560244 3 0.0000 0.974 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.0817 0.8681 0.000 0.976 0.024 0.000
#> SRR1560167 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560168 3 0.5212 0.3770 0.000 0.008 0.572 0.420
#> SRR1560169 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.3688 0.7134 0.000 0.792 0.208 0.000
#> SRR1560171 2 0.0817 0.8681 0.000 0.976 0.024 0.000
#> SRR1560172 2 0.3569 0.7245 0.000 0.804 0.196 0.000
#> SRR1560173 1 0.0188 0.9308 0.996 0.000 0.004 0.000
#> SRR1560174 2 0.0817 0.8681 0.000 0.976 0.024 0.000
#> SRR1560175 3 0.7180 0.5085 0.000 0.264 0.548 0.188
#> SRR1560176 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560177 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560178 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560179 2 0.0817 0.8681 0.000 0.976 0.024 0.000
#> SRR1560180 4 0.1716 0.7126 0.000 0.000 0.064 0.936
#> SRR1560181 3 0.6597 0.5105 0.000 0.108 0.588 0.304
#> SRR1560182 2 0.1118 0.8652 0.000 0.964 0.036 0.000
#> SRR1560183 3 0.5070 0.4262 0.000 0.008 0.620 0.372
#> SRR1560184 3 0.4059 0.5598 0.000 0.200 0.788 0.012
#> SRR1560185 3 0.4059 0.5598 0.000 0.200 0.788 0.012
#> SRR1560186 4 0.2081 0.6951 0.000 0.000 0.084 0.916
#> SRR1560187 4 0.2216 0.6955 0.000 0.000 0.092 0.908
#> SRR1560188 3 0.4994 0.2670 0.000 0.000 0.520 0.480
#> SRR1560189 3 0.4994 0.2670 0.000 0.000 0.520 0.480
#> SRR1560190 3 0.5294 0.2494 0.000 0.008 0.508 0.484
#> SRR1560191 2 0.4994 -0.0118 0.000 0.520 0.480 0.000
#> SRR1560192 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.3764 0.7049 0.000 0.784 0.216 0.000
#> SRR1560194 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560195 3 0.4511 0.4775 0.000 0.268 0.724 0.008
#> SRR1560196 3 0.4511 0.4775 0.000 0.268 0.724 0.008
#> SRR1560197 3 0.4992 0.1198 0.000 0.476 0.524 0.000
#> SRR1560198 4 0.2401 0.6898 0.004 0.000 0.092 0.904
#> SRR1560200 4 0.1637 0.7112 0.000 0.000 0.060 0.940
#> SRR1560199 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560201 4 0.1722 0.7132 0.008 0.000 0.048 0.944
#> SRR1560202 4 0.4977 -0.1817 0.000 0.000 0.460 0.540
#> SRR1560203 1 0.6696 0.1910 0.484 0.000 0.088 0.428
#> SRR1560204 4 0.6709 -0.1981 0.452 0.000 0.088 0.460
#> SRR1560205 3 0.3972 0.5572 0.000 0.204 0.788 0.008
#> SRR1560206 2 0.4679 0.4231 0.000 0.648 0.352 0.000
#> SRR1560207 1 0.2759 0.8840 0.904 0.000 0.044 0.052
#> SRR1560208 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560209 2 0.3801 0.6984 0.000 0.780 0.220 0.000
#> SRR1560210 3 0.3873 0.4780 0.000 0.000 0.772 0.228
#> SRR1560211 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560212 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560213 2 0.4624 0.4587 0.000 0.660 0.340 0.000
#> SRR1560214 4 0.1716 0.7051 0.000 0.000 0.064 0.936
#> SRR1560215 4 0.2704 0.6507 0.000 0.000 0.124 0.876
#> SRR1560216 1 0.3587 0.8561 0.860 0.000 0.088 0.052
#> SRR1560217 4 0.6709 -0.1981 0.452 0.000 0.088 0.460
#> SRR1560218 3 0.3768 0.5688 0.000 0.184 0.808 0.008
#> SRR1560219 2 0.0707 0.8698 0.000 0.980 0.020 0.000
#> SRR1560220 3 0.3266 0.5322 0.000 0.000 0.832 0.168
#> SRR1560221 3 0.4830 0.3317 0.000 0.392 0.608 0.000
#> SRR1560222 4 0.1389 0.7212 0.000 0.000 0.048 0.952
#> SRR1560223 4 0.1474 0.7199 0.000 0.000 0.052 0.948
#> SRR1560224 4 0.6678 -0.0896 0.412 0.000 0.088 0.500
#> SRR1560225 4 0.1716 0.7186 0.000 0.000 0.064 0.936
#> SRR1560226 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9330 1.000 0.000 0.000 0.000
#> SRR1560229 3 0.4998 0.2786 0.000 0.000 0.512 0.488
#> SRR1560230 1 0.3587 0.8561 0.860 0.000 0.088 0.052
#> SRR1560231 3 0.4011 0.5533 0.000 0.208 0.784 0.008
#> SRR1560232 4 0.1302 0.7137 0.000 0.000 0.044 0.956
#> SRR1560233 3 0.4697 0.3764 0.000 0.356 0.644 0.000
#> SRR1560234 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560235 3 0.5921 0.1660 0.000 0.448 0.516 0.036
#> SRR1560236 3 0.5212 0.3770 0.000 0.008 0.572 0.420
#> SRR1560237 2 0.0000 0.8726 0.000 1.000 0.000 0.000
#> SRR1560238 3 0.5212 0.3770 0.000 0.008 0.572 0.420
#> SRR1560239 2 0.0336 0.8728 0.000 0.992 0.008 0.000
#> SRR1560240 4 0.0000 0.7212 0.000 0.000 0.000 1.000
#> SRR1560241 4 0.4925 -0.1235 0.000 0.000 0.428 0.572
#> SRR1560242 4 0.1389 0.7212 0.000 0.000 0.048 0.952
#> SRR1560243 4 0.4967 -0.1481 0.000 0.000 0.452 0.548
#> SRR1560244 2 0.0707 0.8691 0.000 0.980 0.020 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.0404 0.833 0.000 0.988 0.000 0.000 0.012
#> SRR1560167 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.0671 0.753 0.000 0.000 0.016 0.004 0.980
#> SRR1560169 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.5891 0.434 0.000 0.552 0.120 0.000 0.328
#> SRR1560171 2 0.0290 0.834 0.000 0.992 0.000 0.000 0.008
#> SRR1560172 2 0.5878 0.438 0.000 0.556 0.120 0.000 0.324
#> SRR1560173 1 0.0290 0.936 0.992 0.000 0.000 0.008 0.000
#> SRR1560174 2 0.0290 0.834 0.000 0.992 0.000 0.000 0.008
#> SRR1560175 5 0.3579 0.668 0.000 0.080 0.080 0.004 0.836
#> SRR1560176 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000
#> SRR1560177 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560178 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560179 2 0.0404 0.833 0.000 0.988 0.000 0.000 0.012
#> SRR1560180 4 0.3236 0.726 0.000 0.000 0.020 0.828 0.152
#> SRR1560181 5 0.2873 0.665 0.000 0.016 0.128 0.000 0.856
#> SRR1560182 2 0.2536 0.755 0.000 0.868 0.004 0.000 0.128
#> SRR1560183 5 0.1282 0.746 0.000 0.004 0.044 0.000 0.952
#> SRR1560184 3 0.3386 0.836 0.000 0.040 0.832 0.000 0.128
#> SRR1560185 3 0.3386 0.836 0.000 0.040 0.832 0.000 0.128
#> SRR1560186 4 0.2653 0.712 0.000 0.000 0.096 0.880 0.024
#> SRR1560187 4 0.4138 0.406 0.000 0.000 0.000 0.616 0.384
#> SRR1560188 5 0.1469 0.750 0.000 0.000 0.016 0.036 0.948
#> SRR1560189 5 0.1469 0.750 0.000 0.000 0.016 0.036 0.948
#> SRR1560190 5 0.1851 0.724 0.000 0.000 0.000 0.088 0.912
#> SRR1560191 5 0.4872 0.473 0.000 0.160 0.120 0.000 0.720
#> SRR1560192 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.5916 0.420 0.000 0.544 0.120 0.000 0.336
#> SRR1560194 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560195 3 0.3477 0.828 0.000 0.056 0.832 0.000 0.112
#> SRR1560196 3 0.3477 0.828 0.000 0.056 0.832 0.000 0.112
#> SRR1560197 3 0.6146 0.572 0.000 0.240 0.560 0.000 0.200
#> SRR1560198 4 0.1965 0.705 0.000 0.000 0.096 0.904 0.000
#> SRR1560200 4 0.3053 0.723 0.000 0.000 0.008 0.828 0.164
#> SRR1560199 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560201 4 0.2046 0.745 0.000 0.000 0.016 0.916 0.068
#> SRR1560202 5 0.4269 0.406 0.000 0.000 0.016 0.300 0.684
#> SRR1560203 4 0.6039 0.278 0.300 0.000 0.148 0.552 0.000
#> SRR1560204 4 0.5957 0.328 0.280 0.000 0.148 0.572 0.000
#> SRR1560205 3 0.3386 0.836 0.000 0.040 0.832 0.000 0.128
#> SRR1560206 2 0.6070 0.167 0.000 0.444 0.120 0.000 0.436
#> SRR1560207 1 0.2519 0.868 0.884 0.000 0.016 0.100 0.000
#> SRR1560208 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560209 2 0.5878 0.441 0.000 0.556 0.120 0.000 0.324
#> SRR1560210 3 0.5330 0.435 0.000 0.000 0.548 0.056 0.396
#> SRR1560211 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560212 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560213 2 0.6085 0.260 0.000 0.472 0.124 0.000 0.404
#> SRR1560214 4 0.2344 0.726 0.000 0.000 0.064 0.904 0.032
#> SRR1560215 4 0.4538 0.196 0.000 0.000 0.008 0.540 0.452
#> SRR1560216 1 0.5125 0.691 0.696 0.000 0.148 0.156 0.000
#> SRR1560217 4 0.5957 0.328 0.280 0.000 0.148 0.572 0.000
#> SRR1560218 3 0.3327 0.825 0.000 0.028 0.828 0.000 0.144
#> SRR1560219 2 0.0579 0.831 0.000 0.984 0.008 0.000 0.008
#> SRR1560220 3 0.4674 0.478 0.000 0.000 0.568 0.016 0.416
#> SRR1560221 3 0.6071 0.557 0.000 0.160 0.556 0.000 0.284
#> SRR1560222 4 0.2561 0.738 0.000 0.000 0.000 0.856 0.144
#> SRR1560223 4 0.2732 0.729 0.000 0.000 0.000 0.840 0.160
#> SRR1560224 4 0.5841 0.374 0.256 0.000 0.148 0.596 0.000
#> SRR1560225 4 0.3224 0.726 0.000 0.000 0.016 0.824 0.160
#> SRR1560226 1 0.0290 0.938 0.992 0.000 0.008 0.000 0.000
#> SRR1560227 1 0.0290 0.938 0.992 0.000 0.008 0.000 0.000
#> SRR1560228 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000
#> SRR1560229 5 0.1648 0.748 0.000 0.000 0.020 0.040 0.940
#> SRR1560230 1 0.5125 0.691 0.696 0.000 0.148 0.156 0.000
#> SRR1560231 3 0.3432 0.835 0.000 0.040 0.828 0.000 0.132
#> SRR1560232 4 0.2144 0.745 0.000 0.000 0.020 0.912 0.068
#> SRR1560233 5 0.4421 0.536 0.000 0.068 0.184 0.000 0.748
#> SRR1560234 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560235 5 0.3767 0.629 0.000 0.068 0.120 0.000 0.812
#> SRR1560236 5 0.0955 0.748 0.000 0.004 0.028 0.000 0.968
#> SRR1560237 2 0.0290 0.834 0.000 0.992 0.000 0.000 0.008
#> SRR1560238 5 0.0963 0.750 0.000 0.000 0.036 0.000 0.964
#> SRR1560239 2 0.0162 0.834 0.000 0.996 0.004 0.000 0.000
#> SRR1560240 4 0.2286 0.745 0.000 0.000 0.004 0.888 0.108
#> SRR1560241 5 0.4752 0.179 0.000 0.000 0.020 0.412 0.568
#> SRR1560242 4 0.2561 0.738 0.000 0.000 0.000 0.856 0.144
#> SRR1560243 5 0.4366 0.390 0.000 0.000 0.016 0.320 0.664
#> SRR1560244 2 0.0290 0.834 0.000 0.992 0.000 0.000 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.1908 0.8564 0.000 0.900 0.000 0.000 0.004 0.096
#> SRR1560167 1 0.0363 0.9688 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1560168 5 0.2941 0.6214 0.000 0.000 0.000 0.000 0.780 0.220
#> SRR1560169 1 0.0363 0.9688 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1560170 6 0.4407 0.5793 0.000 0.380 0.004 0.000 0.024 0.592
#> SRR1560171 2 0.0146 0.9367 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1560172 6 0.4794 0.5745 0.000 0.376 0.004 0.012 0.028 0.580
#> SRR1560173 1 0.0935 0.9538 0.964 0.000 0.004 0.000 0.000 0.032
#> SRR1560174 2 0.0363 0.9333 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1560175 6 0.5420 0.4038 0.000 0.068 0.004 0.020 0.340 0.568
#> SRR1560176 1 0.0260 0.9690 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR1560177 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560178 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560179 2 0.1556 0.8781 0.000 0.920 0.000 0.000 0.000 0.080
#> SRR1560180 4 0.6503 0.5693 0.000 0.000 0.052 0.504 0.200 0.244
#> SRR1560181 6 0.4224 0.1460 0.000 0.004 0.008 0.000 0.476 0.512
#> SRR1560182 2 0.3899 0.0603 0.000 0.592 0.000 0.000 0.004 0.404
#> SRR1560183 5 0.3383 0.5557 0.000 0.000 0.004 0.000 0.728 0.268
#> SRR1560184 3 0.2261 0.8676 0.000 0.008 0.884 0.000 0.004 0.104
#> SRR1560185 3 0.2261 0.8676 0.000 0.008 0.884 0.000 0.004 0.104
#> SRR1560186 4 0.1444 0.5750 0.000 0.000 0.000 0.928 0.072 0.000
#> SRR1560187 5 0.3252 0.6038 0.000 0.000 0.000 0.108 0.824 0.068
#> SRR1560188 5 0.2006 0.7214 0.000 0.000 0.000 0.004 0.892 0.104
#> SRR1560189 5 0.2006 0.7214 0.000 0.000 0.000 0.004 0.892 0.104
#> SRR1560190 5 0.2968 0.6828 0.000 0.000 0.000 0.016 0.816 0.168
#> SRR1560191 6 0.4777 0.4897 0.000 0.052 0.008 0.000 0.324 0.616
#> SRR1560192 1 0.0363 0.9688 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1560193 6 0.4446 0.5967 0.000 0.368 0.004 0.000 0.028 0.600
#> SRR1560194 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560195 3 0.2261 0.8676 0.000 0.008 0.884 0.000 0.004 0.104
#> SRR1560196 3 0.2261 0.8676 0.000 0.008 0.884 0.000 0.004 0.104
#> SRR1560197 6 0.5553 0.3711 0.000 0.148 0.272 0.000 0.008 0.572
#> SRR1560198 4 0.1387 0.5752 0.000 0.000 0.000 0.932 0.068 0.000
#> SRR1560200 4 0.5897 0.5496 0.000 0.000 0.004 0.504 0.260 0.232
#> SRR1560199 2 0.0790 0.9186 0.000 0.968 0.000 0.000 0.000 0.032
#> SRR1560201 4 0.6543 0.5793 0.000 0.000 0.056 0.496 0.184 0.264
#> SRR1560202 5 0.1204 0.7080 0.000 0.000 0.000 0.056 0.944 0.000
#> SRR1560203 4 0.4570 0.4423 0.156 0.000 0.060 0.740 0.000 0.044
#> SRR1560204 4 0.4570 0.4423 0.156 0.000 0.060 0.740 0.000 0.044
#> SRR1560205 3 0.2261 0.8676 0.000 0.008 0.884 0.000 0.004 0.104
#> SRR1560206 6 0.4791 0.6363 0.000 0.328 0.008 0.000 0.052 0.612
#> SRR1560207 1 0.4225 0.7487 0.768 0.000 0.068 0.028 0.000 0.136
#> SRR1560208 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560209 6 0.4255 0.5767 0.000 0.380 0.004 0.000 0.016 0.600
#> SRR1560210 5 0.5134 -0.1971 0.000 0.000 0.468 0.028 0.472 0.032
#> SRR1560211 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560212 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560213 6 0.4457 0.6283 0.000 0.332 0.012 0.000 0.024 0.632
#> SRR1560214 4 0.3248 0.5716 0.000 0.000 0.000 0.804 0.164 0.032
#> SRR1560215 5 0.3842 0.5644 0.000 0.000 0.000 0.156 0.768 0.076
#> SRR1560216 4 0.5723 -0.1571 0.436 0.000 0.060 0.460 0.000 0.044
#> SRR1560217 4 0.4570 0.4423 0.156 0.000 0.060 0.740 0.000 0.044
#> SRR1560218 3 0.3708 0.7854 0.000 0.008 0.752 0.000 0.020 0.220
#> SRR1560219 2 0.2178 0.8207 0.000 0.868 0.000 0.000 0.000 0.132
#> SRR1560220 3 0.5449 0.0790 0.000 0.000 0.476 0.020 0.436 0.068
#> SRR1560221 6 0.5589 0.3372 0.000 0.088 0.284 0.000 0.036 0.592
#> SRR1560222 4 0.5931 0.5582 0.000 0.000 0.004 0.492 0.280 0.224
#> SRR1560223 4 0.5931 0.5582 0.000 0.000 0.004 0.492 0.280 0.224
#> SRR1560224 4 0.4638 0.4509 0.148 0.000 0.060 0.744 0.004 0.044
#> SRR1560225 4 0.6783 0.5454 0.000 0.000 0.052 0.432 0.252 0.264
#> SRR1560226 1 0.0405 0.9662 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR1560227 1 0.0405 0.9662 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR1560228 1 0.0146 0.9694 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1560229 5 0.3032 0.7210 0.000 0.000 0.000 0.056 0.840 0.104
#> SRR1560230 4 0.5774 -0.1611 0.436 0.000 0.060 0.456 0.000 0.048
#> SRR1560231 3 0.4049 0.7458 0.000 0.008 0.716 0.004 0.020 0.252
#> SRR1560232 4 0.6382 0.5809 0.000 0.000 0.056 0.524 0.160 0.260
#> SRR1560233 6 0.4838 0.4469 0.000 0.028 0.028 0.000 0.332 0.612
#> SRR1560234 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560235 6 0.4234 0.3231 0.000 0.012 0.004 0.000 0.408 0.576
#> SRR1560236 5 0.3428 0.5066 0.000 0.000 0.000 0.000 0.696 0.304
#> SRR1560237 2 0.0146 0.9367 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1560238 5 0.3175 0.5739 0.000 0.000 0.000 0.000 0.744 0.256
#> SRR1560239 2 0.0000 0.9376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560240 4 0.5849 0.5596 0.000 0.000 0.004 0.516 0.252 0.228
#> SRR1560241 5 0.3595 0.6108 0.000 0.000 0.000 0.120 0.796 0.084
#> SRR1560242 4 0.5913 0.5583 0.000 0.000 0.004 0.496 0.280 0.220
#> SRR1560243 5 0.1845 0.6923 0.000 0.000 0.000 0.028 0.920 0.052
#> SRR1560244 2 0.0146 0.9367 0.000 0.996 0.000 0.000 0.000 0.004
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 15546 rows and 81 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 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.4974 0.503 0.503
#> 3 3 0.834 0.919 0.945 0.2097 0.881 0.765
#> 4 4 0.915 0.879 0.950 0.1301 0.921 0.800
#> 5 5 0.830 0.772 0.895 0.0634 0.972 0.911
#> 6 6 0.789 0.562 0.792 0.0378 0.941 0.805
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR1560164 1 0.0000 1.000 1.000 0.000
#> SRR1560165 1 0.0000 1.000 1.000 0.000
#> SRR1560166 2 0.0000 1.000 0.000 1.000
#> SRR1560167 1 0.0000 1.000 1.000 0.000
#> SRR1560168 2 0.0000 1.000 0.000 1.000
#> SRR1560169 1 0.0000 1.000 1.000 0.000
#> SRR1560170 2 0.0000 1.000 0.000 1.000
#> SRR1560171 2 0.0000 1.000 0.000 1.000
#> SRR1560172 2 0.0000 1.000 0.000 1.000
#> SRR1560173 1 0.0000 1.000 1.000 0.000
#> SRR1560174 2 0.0000 1.000 0.000 1.000
#> SRR1560175 2 0.0000 1.000 0.000 1.000
#> SRR1560176 1 0.0000 1.000 1.000 0.000
#> SRR1560177 2 0.0000 1.000 0.000 1.000
#> SRR1560178 2 0.0000 1.000 0.000 1.000
#> SRR1560179 2 0.0000 1.000 0.000 1.000
#> SRR1560180 1 0.0000 1.000 1.000 0.000
#> SRR1560181 2 0.0000 1.000 0.000 1.000
#> SRR1560182 2 0.0000 1.000 0.000 1.000
#> SRR1560183 2 0.0000 1.000 0.000 1.000
#> SRR1560184 2 0.0000 1.000 0.000 1.000
#> SRR1560185 2 0.0000 1.000 0.000 1.000
#> SRR1560186 1 0.0000 1.000 1.000 0.000
#> SRR1560187 1 0.0000 1.000 1.000 0.000
#> SRR1560188 2 0.0000 1.000 0.000 1.000
#> SRR1560189 2 0.0000 1.000 0.000 1.000
#> SRR1560190 2 0.0000 1.000 0.000 1.000
#> SRR1560191 2 0.0000 1.000 0.000 1.000
#> SRR1560192 1 0.0000 1.000 1.000 0.000
#> SRR1560193 2 0.0000 1.000 0.000 1.000
#> SRR1560194 2 0.0000 1.000 0.000 1.000
#> SRR1560195 2 0.0000 1.000 0.000 1.000
#> SRR1560196 2 0.0000 1.000 0.000 1.000
#> SRR1560197 2 0.0000 1.000 0.000 1.000
#> SRR1560198 1 0.0000 1.000 1.000 0.000
#> SRR1560200 1 0.0000 1.000 1.000 0.000
#> SRR1560199 2 0.0000 1.000 0.000 1.000
#> SRR1560201 1 0.0000 1.000 1.000 0.000
#> SRR1560202 1 0.0000 1.000 1.000 0.000
#> SRR1560203 1 0.0000 1.000 1.000 0.000
#> SRR1560204 1 0.0000 1.000 1.000 0.000
#> SRR1560205 2 0.0000 1.000 0.000 1.000
#> SRR1560206 2 0.0000 1.000 0.000 1.000
#> SRR1560207 1 0.0000 1.000 1.000 0.000
#> SRR1560208 2 0.0000 1.000 0.000 1.000
#> SRR1560209 2 0.0000 1.000 0.000 1.000
#> SRR1560210 1 0.0000 1.000 1.000 0.000
#> SRR1560211 2 0.0000 1.000 0.000 1.000
#> SRR1560212 2 0.0000 1.000 0.000 1.000
#> SRR1560213 2 0.0000 1.000 0.000 1.000
#> SRR1560214 1 0.0000 1.000 1.000 0.000
#> SRR1560215 1 0.0000 1.000 1.000 0.000
#> SRR1560216 1 0.0000 1.000 1.000 0.000
#> SRR1560217 1 0.0000 1.000 1.000 0.000
#> SRR1560218 2 0.0000 1.000 0.000 1.000
#> SRR1560219 2 0.0000 1.000 0.000 1.000
#> SRR1560220 2 0.0000 1.000 0.000 1.000
#> SRR1560221 2 0.0000 1.000 0.000 1.000
#> SRR1560222 1 0.0000 1.000 1.000 0.000
#> SRR1560223 1 0.0000 1.000 1.000 0.000
#> SRR1560224 1 0.0000 1.000 1.000 0.000
#> SRR1560225 1 0.0000 1.000 1.000 0.000
#> SRR1560226 1 0.0000 1.000 1.000 0.000
#> SRR1560227 1 0.0000 1.000 1.000 0.000
#> SRR1560228 1 0.0000 1.000 1.000 0.000
#> SRR1560229 2 0.0000 1.000 0.000 1.000
#> SRR1560230 1 0.0000 1.000 1.000 0.000
#> SRR1560231 2 0.0000 1.000 0.000 1.000
#> SRR1560232 1 0.0000 1.000 1.000 0.000
#> SRR1560233 2 0.0000 1.000 0.000 1.000
#> SRR1560234 2 0.0000 1.000 0.000 1.000
#> SRR1560235 2 0.0000 1.000 0.000 1.000
#> SRR1560236 2 0.0000 1.000 0.000 1.000
#> SRR1560237 2 0.0000 1.000 0.000 1.000
#> SRR1560238 2 0.0000 1.000 0.000 1.000
#> SRR1560239 2 0.0000 1.000 0.000 1.000
#> SRR1560240 1 0.0000 1.000 1.000 0.000
#> SRR1560241 1 0.0376 0.996 0.996 0.004
#> SRR1560242 1 0.0000 1.000 1.000 0.000
#> SRR1560243 1 0.0376 0.996 0.996 0.004
#> SRR1560244 2 0.0000 1.000 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560166 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560167 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560168 2 0.4887 0.7426 0.000 0.772 0.228
#> SRR1560169 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560170 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560171 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560172 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560173 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560174 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560175 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560176 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560177 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560178 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560179 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560180 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560181 2 0.0424 0.9441 0.000 0.992 0.008
#> SRR1560182 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560183 2 0.1529 0.9235 0.000 0.960 0.040
#> SRR1560184 3 0.4931 0.9150 0.000 0.232 0.768
#> SRR1560185 3 0.4931 0.9150 0.000 0.232 0.768
#> SRR1560186 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560187 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560188 2 0.4931 0.7384 0.000 0.768 0.232
#> SRR1560189 2 0.4931 0.7384 0.000 0.768 0.232
#> SRR1560190 2 0.4931 0.7384 0.000 0.768 0.232
#> SRR1560191 2 0.1753 0.9179 0.000 0.952 0.048
#> SRR1560192 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560193 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560194 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560195 3 0.4931 0.9150 0.000 0.232 0.768
#> SRR1560196 3 0.4931 0.9150 0.000 0.232 0.768
#> SRR1560197 2 0.0237 0.9454 0.000 0.996 0.004
#> SRR1560198 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560200 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560199 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560201 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560202 3 0.2448 0.7087 0.076 0.000 0.924
#> SRR1560203 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560204 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560205 3 0.4931 0.9150 0.000 0.232 0.768
#> SRR1560206 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560207 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560208 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560209 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560210 3 0.5247 0.6333 0.224 0.008 0.768
#> SRR1560211 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560212 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560213 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560214 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560215 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560216 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560217 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560218 3 0.4931 0.9150 0.000 0.232 0.768
#> SRR1560219 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560220 3 0.4931 0.9150 0.000 0.232 0.768
#> SRR1560221 2 0.2066 0.8878 0.000 0.940 0.060
#> SRR1560222 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560223 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560224 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560225 1 0.0237 0.9725 0.996 0.000 0.004
#> SRR1560226 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560229 2 0.3340 0.8496 0.000 0.880 0.120
#> SRR1560230 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560231 3 0.5497 0.8410 0.000 0.292 0.708
#> SRR1560232 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560233 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560234 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560235 2 0.1964 0.9126 0.000 0.944 0.056
#> SRR1560236 2 0.4931 0.7384 0.000 0.768 0.232
#> SRR1560237 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560238 2 0.2261 0.9031 0.000 0.932 0.068
#> SRR1560239 2 0.0000 0.9486 0.000 1.000 0.000
#> SRR1560240 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560241 1 0.3112 0.8763 0.900 0.004 0.096
#> SRR1560242 1 0.0000 0.9760 1.000 0.000 0.000
#> SRR1560243 1 0.8979 -0.0112 0.452 0.420 0.128
#> SRR1560244 2 0.0000 0.9486 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560167 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560168 4 0.3402 0.7317 0.000 0.164 0.004 0.832
#> SRR1560169 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560171 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560172 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560173 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560174 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560175 2 0.0188 0.9413 0.000 0.996 0.000 0.004
#> SRR1560176 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560177 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560178 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560179 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560180 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560181 2 0.3649 0.6862 0.000 0.796 0.000 0.204
#> SRR1560182 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560183 2 0.4543 0.4189 0.000 0.676 0.000 0.324
#> SRR1560184 3 0.0817 0.8814 0.000 0.024 0.976 0.000
#> SRR1560185 3 0.0817 0.8814 0.000 0.024 0.976 0.000
#> SRR1560186 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560187 1 0.1356 0.9612 0.960 0.000 0.008 0.032
#> SRR1560188 4 0.0469 0.7421 0.000 0.012 0.000 0.988
#> SRR1560189 4 0.0469 0.7421 0.000 0.012 0.000 0.988
#> SRR1560190 4 0.1474 0.7622 0.000 0.052 0.000 0.948
#> SRR1560191 2 0.4972 -0.0734 0.000 0.544 0.000 0.456
#> SRR1560192 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560194 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560195 3 0.0817 0.8814 0.000 0.024 0.976 0.000
#> SRR1560196 3 0.0817 0.8814 0.000 0.024 0.976 0.000
#> SRR1560197 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560198 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560200 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560199 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560201 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560202 3 0.5331 0.5165 0.024 0.000 0.644 0.332
#> SRR1560203 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560204 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560205 3 0.0817 0.8814 0.000 0.024 0.976 0.000
#> SRR1560206 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560207 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560208 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560209 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560210 3 0.0000 0.8617 0.000 0.000 1.000 0.000
#> SRR1560211 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560212 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560213 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560214 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560215 1 0.1059 0.9722 0.972 0.000 0.012 0.016
#> SRR1560216 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560217 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560218 3 0.1792 0.8377 0.000 0.068 0.932 0.000
#> SRR1560219 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560220 3 0.0188 0.8658 0.000 0.004 0.996 0.000
#> SRR1560221 2 0.1389 0.8937 0.000 0.952 0.048 0.000
#> SRR1560222 1 0.0336 0.9805 0.992 0.000 0.000 0.008
#> SRR1560223 1 0.0336 0.9805 0.992 0.000 0.000 0.008
#> SRR1560224 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560225 1 0.0469 0.9780 0.988 0.000 0.000 0.012
#> SRR1560226 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560229 2 0.5090 0.4174 0.000 0.660 0.016 0.324
#> SRR1560230 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560231 3 0.4843 0.3235 0.000 0.396 0.604 0.000
#> SRR1560232 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560233 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560234 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560235 4 0.4713 0.5344 0.000 0.360 0.000 0.640
#> SRR1560236 4 0.2408 0.7649 0.000 0.104 0.000 0.896
#> SRR1560237 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560238 4 0.4889 0.5410 0.000 0.360 0.004 0.636
#> SRR1560239 2 0.0000 0.9450 0.000 1.000 0.000 0.000
#> SRR1560240 1 0.0524 0.9820 0.988 0.000 0.004 0.008
#> SRR1560241 1 0.5622 0.6040 0.696 0.028 0.020 0.256
#> SRR1560242 1 0.0000 0.9843 1.000 0.000 0.000 0.000
#> SRR1560243 4 0.3443 0.6389 0.136 0.000 0.016 0.848
#> SRR1560244 2 0.0000 0.9450 0.000 1.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.8510 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.8510 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.0451 0.9451 0.000 0.988 0.000 0.004 0.008
#> SRR1560167 1 0.0162 0.8508 0.996 0.000 0.000 0.004 0.000
#> SRR1560168 5 0.3802 0.6874 0.000 0.096 0.004 0.080 0.820
#> SRR1560169 1 0.0162 0.8508 0.996 0.000 0.000 0.004 0.000
#> SRR1560170 2 0.0162 0.9478 0.000 0.996 0.000 0.004 0.000
#> SRR1560171 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560172 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560173 1 0.0162 0.8508 0.996 0.000 0.000 0.004 0.000
#> SRR1560174 2 0.0451 0.9451 0.000 0.988 0.000 0.004 0.008
#> SRR1560175 2 0.1792 0.8719 0.000 0.916 0.000 0.084 0.000
#> SRR1560176 1 0.0000 0.8510 1.000 0.000 0.000 0.000 0.000
#> SRR1560177 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560178 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560179 2 0.0451 0.9451 0.000 0.988 0.000 0.004 0.008
#> SRR1560180 1 0.2280 0.7728 0.880 0.000 0.000 0.120 0.000
#> SRR1560181 2 0.3462 0.7028 0.000 0.792 0.000 0.012 0.196
#> SRR1560182 2 0.0451 0.9451 0.000 0.988 0.000 0.004 0.008
#> SRR1560183 2 0.4752 0.3952 0.000 0.648 0.000 0.036 0.316
#> SRR1560184 3 0.0290 0.8351 0.000 0.008 0.992 0.000 0.000
#> SRR1560185 3 0.0290 0.8351 0.000 0.008 0.992 0.000 0.000
#> SRR1560186 1 0.3424 0.7421 0.760 0.000 0.000 0.240 0.000
#> SRR1560187 1 0.4846 0.5046 0.588 0.000 0.000 0.384 0.028
#> SRR1560188 5 0.0510 0.6921 0.000 0.000 0.000 0.016 0.984
#> SRR1560189 5 0.0510 0.6921 0.000 0.000 0.000 0.016 0.984
#> SRR1560190 5 0.2189 0.6838 0.000 0.012 0.000 0.084 0.904
#> SRR1560191 2 0.4653 -0.0985 0.000 0.516 0.000 0.012 0.472
#> SRR1560192 1 0.0162 0.8508 0.996 0.000 0.000 0.004 0.000
#> SRR1560193 2 0.0451 0.9451 0.000 0.988 0.000 0.004 0.008
#> SRR1560194 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560195 3 0.0290 0.8351 0.000 0.008 0.992 0.000 0.000
#> SRR1560196 3 0.0290 0.8351 0.000 0.008 0.992 0.000 0.000
#> SRR1560197 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560198 1 0.3177 0.7637 0.792 0.000 0.000 0.208 0.000
#> SRR1560200 1 0.1341 0.8290 0.944 0.000 0.000 0.056 0.000
#> SRR1560199 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560201 1 0.0510 0.8465 0.984 0.000 0.000 0.016 0.000
#> SRR1560202 3 0.7534 -0.0918 0.036 0.000 0.344 0.320 0.300
#> SRR1560203 1 0.3424 0.7421 0.760 0.000 0.000 0.240 0.000
#> SRR1560204 1 0.3424 0.7421 0.760 0.000 0.000 0.240 0.000
#> SRR1560205 3 0.0290 0.8351 0.000 0.008 0.992 0.000 0.000
#> SRR1560206 2 0.0451 0.9451 0.000 0.988 0.000 0.004 0.008
#> SRR1560207 1 0.0162 0.8508 0.996 0.000 0.000 0.004 0.000
#> SRR1560208 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560209 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560210 3 0.0290 0.8265 0.000 0.000 0.992 0.008 0.000
#> SRR1560211 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560212 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560213 2 0.0693 0.9399 0.000 0.980 0.000 0.008 0.012
#> SRR1560214 1 0.4182 0.5033 0.600 0.000 0.000 0.400 0.000
#> SRR1560215 4 0.3684 0.3448 0.280 0.000 0.000 0.720 0.000
#> SRR1560216 1 0.3424 0.7421 0.760 0.000 0.000 0.240 0.000
#> SRR1560217 1 0.3424 0.7421 0.760 0.000 0.000 0.240 0.000
#> SRR1560218 3 0.1991 0.7585 0.000 0.076 0.916 0.004 0.004
#> SRR1560219 2 0.0324 0.9466 0.000 0.992 0.000 0.004 0.004
#> SRR1560220 3 0.0404 0.8251 0.000 0.000 0.988 0.012 0.000
#> SRR1560221 2 0.1410 0.8919 0.000 0.940 0.060 0.000 0.000
#> SRR1560222 1 0.1410 0.8247 0.940 0.000 0.000 0.060 0.000
#> SRR1560223 1 0.1410 0.8247 0.940 0.000 0.000 0.060 0.000
#> SRR1560224 1 0.3424 0.7421 0.760 0.000 0.000 0.240 0.000
#> SRR1560225 1 0.1251 0.8366 0.956 0.000 0.000 0.036 0.008
#> SRR1560226 1 0.0609 0.8499 0.980 0.000 0.000 0.020 0.000
#> SRR1560227 1 0.0609 0.8499 0.980 0.000 0.000 0.020 0.000
#> SRR1560228 1 0.0162 0.8508 0.996 0.000 0.000 0.004 0.000
#> SRR1560229 4 0.6164 0.1657 0.000 0.236 0.004 0.576 0.184
#> SRR1560230 1 0.3074 0.7718 0.804 0.000 0.000 0.196 0.000
#> SRR1560231 3 0.4171 0.2619 0.000 0.396 0.604 0.000 0.000
#> SRR1560232 1 0.1544 0.8199 0.932 0.000 0.000 0.068 0.000
#> SRR1560233 2 0.0162 0.9466 0.000 0.996 0.004 0.000 0.000
#> SRR1560234 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560235 5 0.3837 0.5029 0.000 0.308 0.000 0.000 0.692
#> SRR1560236 5 0.1908 0.7062 0.000 0.092 0.000 0.000 0.908
#> SRR1560237 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560238 5 0.5140 0.5234 0.000 0.284 0.004 0.060 0.652
#> SRR1560239 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
#> SRR1560240 1 0.4101 0.5489 0.628 0.000 0.000 0.372 0.000
#> SRR1560241 4 0.4300 0.4453 0.100 0.008 0.004 0.796 0.092
#> SRR1560242 1 0.1792 0.8278 0.916 0.000 0.000 0.084 0.000
#> SRR1560243 5 0.5228 0.4007 0.056 0.000 0.000 0.356 0.588
#> SRR1560244 2 0.0000 0.9488 0.000 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.3647 0.2065 0.640 0.000 0.000 0.000 0.000 0.360
#> SRR1560165 1 0.3647 0.2065 0.640 0.000 0.000 0.000 0.000 0.360
#> SRR1560166 2 0.0881 0.9289 0.000 0.972 0.000 0.008 0.008 0.012
#> SRR1560167 1 0.3695 0.1824 0.624 0.000 0.000 0.000 0.000 0.376
#> SRR1560168 5 0.5626 0.6075 0.000 0.068 0.000 0.096 0.644 0.192
#> SRR1560169 1 0.3695 0.1824 0.624 0.000 0.000 0.000 0.000 0.376
#> SRR1560170 2 0.0405 0.9347 0.000 0.988 0.000 0.008 0.000 0.004
#> SRR1560171 2 0.0146 0.9359 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR1560172 2 0.1036 0.9176 0.000 0.964 0.000 0.024 0.008 0.004
#> SRR1560173 1 0.3774 0.0796 0.592 0.000 0.000 0.000 0.000 0.408
#> SRR1560174 2 0.0551 0.9341 0.000 0.984 0.000 0.008 0.004 0.004
#> SRR1560175 2 0.3311 0.7100 0.000 0.780 0.000 0.204 0.012 0.004
#> SRR1560176 1 0.3672 0.1952 0.632 0.000 0.000 0.000 0.000 0.368
#> SRR1560177 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560178 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560179 2 0.0405 0.9347 0.000 0.988 0.000 0.008 0.000 0.004
#> SRR1560180 6 0.5322 0.3296 0.424 0.000 0.000 0.104 0.000 0.472
#> SRR1560181 2 0.4211 0.7122 0.000 0.776 0.000 0.044 0.124 0.056
#> SRR1560182 2 0.0665 0.9316 0.000 0.980 0.000 0.008 0.004 0.008
#> SRR1560183 2 0.6075 0.2786 0.000 0.572 0.000 0.060 0.248 0.120
#> SRR1560184 3 0.0000 0.8666 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 0.8666 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 1 0.0000 0.4498 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560187 1 0.4435 0.1276 0.672 0.000 0.000 0.064 0.000 0.264
#> SRR1560188 5 0.1563 0.7029 0.000 0.000 0.000 0.012 0.932 0.056
#> SRR1560189 5 0.1563 0.7029 0.000 0.000 0.000 0.012 0.932 0.056
#> SRR1560190 5 0.2013 0.6924 0.000 0.008 0.000 0.076 0.908 0.008
#> SRR1560191 2 0.5540 -0.0248 0.000 0.504 0.000 0.036 0.404 0.056
#> SRR1560192 1 0.3695 0.1824 0.624 0.000 0.000 0.000 0.000 0.376
#> SRR1560193 2 0.0779 0.9309 0.000 0.976 0.000 0.008 0.008 0.008
#> SRR1560194 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560195 3 0.0000 0.8666 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 0.8666 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 2 0.0260 0.9336 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR1560198 1 0.1610 0.4343 0.916 0.000 0.000 0.000 0.000 0.084
#> SRR1560200 6 0.4991 0.3097 0.456 0.000 0.000 0.068 0.000 0.476
#> SRR1560199 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560201 1 0.4179 -0.2339 0.516 0.000 0.000 0.012 0.000 0.472
#> SRR1560202 1 0.8299 -0.4620 0.340 0.000 0.148 0.064 0.180 0.268
#> SRR1560203 1 0.0000 0.4498 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560204 1 0.0000 0.4498 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560205 3 0.0000 0.8666 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 2 0.0405 0.9347 0.000 0.988 0.000 0.008 0.000 0.004
#> SRR1560207 1 0.3789 0.0530 0.584 0.000 0.000 0.000 0.000 0.416
#> SRR1560208 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560209 2 0.0146 0.9364 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1560210 3 0.1572 0.8390 0.000 0.000 0.936 0.036 0.000 0.028
#> SRR1560211 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560212 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560213 2 0.1503 0.9081 0.000 0.944 0.000 0.016 0.008 0.032
#> SRR1560214 1 0.2163 0.3522 0.892 0.000 0.000 0.092 0.000 0.016
#> SRR1560215 4 0.4675 0.4806 0.392 0.000 0.000 0.560 0.000 0.048
#> SRR1560216 1 0.0000 0.4498 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560217 1 0.0000 0.4498 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560218 3 0.2767 0.7485 0.000 0.080 0.876 0.016 0.004 0.024
#> SRR1560219 2 0.1053 0.9224 0.000 0.964 0.000 0.012 0.004 0.020
#> SRR1560220 3 0.1461 0.8403 0.000 0.000 0.940 0.044 0.000 0.016
#> SRR1560221 2 0.1501 0.8739 0.000 0.924 0.076 0.000 0.000 0.000
#> SRR1560222 6 0.4258 0.1912 0.468 0.000 0.000 0.016 0.000 0.516
#> SRR1560223 6 0.4250 0.2150 0.456 0.000 0.000 0.016 0.000 0.528
#> SRR1560224 1 0.0000 0.4498 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560225 6 0.4699 0.2415 0.468 0.000 0.000 0.008 0.028 0.496
#> SRR1560226 1 0.3351 0.2847 0.712 0.000 0.000 0.000 0.000 0.288
#> SRR1560227 1 0.3371 0.2809 0.708 0.000 0.000 0.000 0.000 0.292
#> SRR1560228 1 0.3695 0.1824 0.624 0.000 0.000 0.000 0.000 0.376
#> SRR1560229 4 0.4468 0.4604 0.012 0.124 0.000 0.760 0.088 0.016
#> SRR1560230 1 0.1714 0.4310 0.908 0.000 0.000 0.000 0.000 0.092
#> SRR1560231 3 0.3804 0.2213 0.000 0.424 0.576 0.000 0.000 0.000
#> SRR1560232 6 0.5149 0.3259 0.440 0.000 0.000 0.084 0.000 0.476
#> SRR1560233 2 0.0146 0.9355 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1560234 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560235 5 0.3126 0.5362 0.000 0.248 0.000 0.000 0.752 0.000
#> SRR1560236 5 0.1007 0.7235 0.000 0.044 0.000 0.000 0.956 0.000
#> SRR1560237 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560238 5 0.6250 0.5360 0.000 0.192 0.000 0.084 0.580 0.144
#> SRR1560239 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560240 1 0.4628 0.2110 0.684 0.000 0.000 0.204 0.000 0.112
#> SRR1560241 4 0.2532 0.5686 0.032 0.000 0.000 0.884 0.008 0.076
#> SRR1560242 1 0.4150 0.0295 0.592 0.000 0.000 0.016 0.000 0.392
#> SRR1560243 6 0.6253 -0.5850 0.008 0.000 0.000 0.256 0.336 0.400
#> SRR1560244 2 0.0000 0.9368 0.000 1.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 15546 rows and 81 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.974 0.990 0.4567 0.550 0.550
#> 3 3 0.814 0.905 0.957 0.4367 0.678 0.470
#> 4 4 0.773 0.731 0.892 0.1091 0.803 0.520
#> 5 5 0.803 0.752 0.895 0.0525 0.905 0.691
#> 6 6 0.821 0.765 0.863 0.0524 0.906 0.648
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
#> SRR1560164 1 0.0000 1.000 1.000 0.000
#> SRR1560165 1 0.0000 1.000 1.000 0.000
#> SRR1560166 2 0.0000 0.985 0.000 1.000
#> SRR1560167 1 0.0000 1.000 1.000 0.000
#> SRR1560168 2 0.0000 0.985 0.000 1.000
#> SRR1560169 1 0.0000 1.000 1.000 0.000
#> SRR1560170 2 0.0000 0.985 0.000 1.000
#> SRR1560171 2 0.0000 0.985 0.000 1.000
#> SRR1560172 2 0.0000 0.985 0.000 1.000
#> SRR1560173 1 0.0000 1.000 1.000 0.000
#> SRR1560174 2 0.0000 0.985 0.000 1.000
#> SRR1560175 2 0.0000 0.985 0.000 1.000
#> SRR1560176 1 0.0000 1.000 1.000 0.000
#> SRR1560177 2 0.0000 0.985 0.000 1.000
#> SRR1560178 2 0.0000 0.985 0.000 1.000
#> SRR1560179 2 0.0000 0.985 0.000 1.000
#> SRR1560180 2 0.9732 0.335 0.404 0.596
#> SRR1560181 2 0.0000 0.985 0.000 1.000
#> SRR1560182 2 0.0000 0.985 0.000 1.000
#> SRR1560183 2 0.0000 0.985 0.000 1.000
#> SRR1560184 2 0.0000 0.985 0.000 1.000
#> SRR1560185 2 0.0000 0.985 0.000 1.000
#> SRR1560186 1 0.0000 1.000 1.000 0.000
#> SRR1560187 2 0.0376 0.981 0.004 0.996
#> SRR1560188 2 0.0000 0.985 0.000 1.000
#> SRR1560189 2 0.0000 0.985 0.000 1.000
#> SRR1560190 2 0.0000 0.985 0.000 1.000
#> SRR1560191 2 0.0000 0.985 0.000 1.000
#> SRR1560192 1 0.0000 1.000 1.000 0.000
#> SRR1560193 2 0.0000 0.985 0.000 1.000
#> SRR1560194 2 0.0000 0.985 0.000 1.000
#> SRR1560195 2 0.0000 0.985 0.000 1.000
#> SRR1560196 2 0.0000 0.985 0.000 1.000
#> SRR1560197 2 0.0000 0.985 0.000 1.000
#> SRR1560198 1 0.0000 1.000 1.000 0.000
#> SRR1560200 2 0.9608 0.388 0.384 0.616
#> SRR1560199 2 0.0000 0.985 0.000 1.000
#> SRR1560201 1 0.0000 1.000 1.000 0.000
#> SRR1560202 2 0.0000 0.985 0.000 1.000
#> SRR1560203 1 0.0000 1.000 1.000 0.000
#> SRR1560204 1 0.0000 1.000 1.000 0.000
#> SRR1560205 2 0.0000 0.985 0.000 1.000
#> SRR1560206 2 0.0000 0.985 0.000 1.000
#> SRR1560207 1 0.0000 1.000 1.000 0.000
#> SRR1560208 2 0.0000 0.985 0.000 1.000
#> SRR1560209 2 0.0000 0.985 0.000 1.000
#> SRR1560210 2 0.0000 0.985 0.000 1.000
#> SRR1560211 2 0.0000 0.985 0.000 1.000
#> SRR1560212 2 0.0000 0.985 0.000 1.000
#> SRR1560213 2 0.0000 0.985 0.000 1.000
#> SRR1560214 1 0.0000 1.000 1.000 0.000
#> SRR1560215 2 0.0000 0.985 0.000 1.000
#> SRR1560216 1 0.0000 1.000 1.000 0.000
#> SRR1560217 1 0.0000 1.000 1.000 0.000
#> SRR1560218 2 0.0000 0.985 0.000 1.000
#> SRR1560219 2 0.0000 0.985 0.000 1.000
#> SRR1560220 2 0.0000 0.985 0.000 1.000
#> SRR1560221 2 0.0000 0.985 0.000 1.000
#> SRR1560222 1 0.0000 1.000 1.000 0.000
#> SRR1560223 1 0.0376 0.996 0.996 0.004
#> SRR1560224 1 0.0000 1.000 1.000 0.000
#> SRR1560225 1 0.0000 1.000 1.000 0.000
#> SRR1560226 1 0.0000 1.000 1.000 0.000
#> SRR1560227 1 0.0000 1.000 1.000 0.000
#> SRR1560228 1 0.0000 1.000 1.000 0.000
#> SRR1560229 2 0.0000 0.985 0.000 1.000
#> SRR1560230 1 0.0000 1.000 1.000 0.000
#> SRR1560231 2 0.0000 0.985 0.000 1.000
#> SRR1560232 1 0.0000 1.000 1.000 0.000
#> SRR1560233 2 0.0000 0.985 0.000 1.000
#> SRR1560234 2 0.0000 0.985 0.000 1.000
#> SRR1560235 2 0.0000 0.985 0.000 1.000
#> SRR1560236 2 0.0000 0.985 0.000 1.000
#> SRR1560237 2 0.0000 0.985 0.000 1.000
#> SRR1560238 2 0.0000 0.985 0.000 1.000
#> SRR1560239 2 0.0000 0.985 0.000 1.000
#> SRR1560240 1 0.0000 1.000 1.000 0.000
#> SRR1560241 2 0.0000 0.985 0.000 1.000
#> SRR1560242 1 0.0000 1.000 1.000 0.000
#> SRR1560243 2 0.0000 0.985 0.000 1.000
#> SRR1560244 2 0.0000 0.985 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560165 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560166 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560167 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560168 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560169 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560170 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560171 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560172 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560173 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560174 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560175 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560176 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560177 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560178 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560179 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560180 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560181 2 0.6225 0.307 0.000 0.568 0.432
#> SRR1560182 2 0.2165 0.911 0.000 0.936 0.064
#> SRR1560183 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560184 3 0.4842 0.717 0.000 0.224 0.776
#> SRR1560185 3 0.4062 0.790 0.000 0.164 0.836
#> SRR1560186 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560187 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560188 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560189 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560190 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560191 2 0.4555 0.781 0.000 0.800 0.200
#> SRR1560192 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560193 2 0.3038 0.880 0.000 0.896 0.104
#> SRR1560194 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560195 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560196 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560197 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560198 3 0.4796 0.705 0.220 0.000 0.780
#> SRR1560200 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560199 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560201 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560202 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560203 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560204 1 0.5859 0.425 0.656 0.000 0.344
#> SRR1560205 3 0.5058 0.703 0.000 0.244 0.756
#> SRR1560206 2 0.4452 0.790 0.000 0.808 0.192
#> SRR1560207 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560208 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560209 2 0.4002 0.826 0.000 0.840 0.160
#> SRR1560210 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560211 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560212 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560213 2 0.3116 0.877 0.000 0.892 0.108
#> SRR1560214 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560215 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560216 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560217 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560218 3 0.4605 0.734 0.000 0.204 0.796
#> SRR1560219 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560220 3 0.0892 0.923 0.000 0.020 0.980
#> SRR1560221 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560222 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560223 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560224 3 0.4796 0.705 0.220 0.000 0.780
#> SRR1560225 3 0.5733 0.523 0.324 0.000 0.676
#> SRR1560226 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560227 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560228 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560229 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560230 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560231 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560232 1 0.0000 0.978 1.000 0.000 0.000
#> SRR1560233 2 0.1289 0.928 0.000 0.968 0.032
#> SRR1560234 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560235 2 0.4750 0.762 0.000 0.784 0.216
#> SRR1560236 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560237 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560238 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560239 2 0.0000 0.950 0.000 1.000 0.000
#> SRR1560240 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560241 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560242 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560243 3 0.0000 0.938 0.000 0.000 1.000
#> SRR1560244 2 0.0000 0.950 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560166 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560167 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560168 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560169 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560170 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560171 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560172 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560173 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560174 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560175 2 0.4072 0.6384 0.000 0.748 0.252 0.000
#> SRR1560176 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560177 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560178 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560179 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560180 4 0.0707 0.7611 0.000 0.000 0.020 0.980
#> SRR1560181 3 0.2281 0.7547 0.000 0.096 0.904 0.000
#> SRR1560182 2 0.0336 0.8962 0.000 0.992 0.008 0.000
#> SRR1560183 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560184 2 0.4989 0.1536 0.000 0.528 0.472 0.000
#> SRR1560185 2 0.4989 0.1536 0.000 0.528 0.472 0.000
#> SRR1560186 4 0.0000 0.7646 0.000 0.000 0.000 1.000
#> SRR1560187 3 0.4933 0.2182 0.000 0.000 0.568 0.432
#> SRR1560188 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560189 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560190 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560191 3 0.4331 0.5084 0.000 0.288 0.712 0.000
#> SRR1560192 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560193 2 0.0336 0.8962 0.000 0.992 0.008 0.000
#> SRR1560194 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560195 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560196 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560197 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560198 4 0.0000 0.7646 0.000 0.000 0.000 1.000
#> SRR1560200 4 0.4948 0.3793 0.000 0.000 0.440 0.560
#> SRR1560199 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560201 4 0.4999 0.0454 0.492 0.000 0.000 0.508
#> SRR1560202 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560203 4 0.0336 0.7627 0.008 0.000 0.000 0.992
#> SRR1560204 4 0.0000 0.7646 0.000 0.000 0.000 1.000
#> SRR1560205 2 0.4776 0.4014 0.000 0.624 0.376 0.000
#> SRR1560206 2 0.4977 0.1914 0.000 0.540 0.460 0.000
#> SRR1560207 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560208 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560209 2 0.0336 0.8962 0.000 0.992 0.008 0.000
#> SRR1560210 4 0.4008 0.5684 0.000 0.000 0.244 0.756
#> SRR1560211 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560212 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560213 2 0.1118 0.8762 0.000 0.964 0.036 0.000
#> SRR1560214 4 0.0000 0.7646 0.000 0.000 0.000 1.000
#> SRR1560215 4 0.3726 0.6029 0.000 0.000 0.212 0.788
#> SRR1560216 4 0.4382 0.4533 0.296 0.000 0.000 0.704
#> SRR1560217 4 0.0000 0.7646 0.000 0.000 0.000 1.000
#> SRR1560218 3 0.4967 0.0239 0.000 0.452 0.548 0.000
#> SRR1560219 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560220 3 0.4972 0.1596 0.000 0.000 0.544 0.456
#> SRR1560221 2 0.4304 0.5817 0.000 0.716 0.284 0.000
#> SRR1560222 4 0.4941 0.3848 0.000 0.000 0.436 0.564
#> SRR1560223 4 0.5000 0.2543 0.000 0.000 0.500 0.500
#> SRR1560224 4 0.0000 0.7646 0.000 0.000 0.000 1.000
#> SRR1560225 4 0.5263 0.3612 0.008 0.000 0.448 0.544
#> SRR1560226 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9784 1.000 0.000 0.000 0.000
#> SRR1560229 3 0.0469 0.8158 0.000 0.000 0.988 0.012
#> SRR1560230 1 0.3688 0.7068 0.792 0.000 0.000 0.208
#> SRR1560231 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560232 4 0.4999 0.0454 0.492 0.000 0.000 0.508
#> SRR1560233 2 0.4877 0.3439 0.000 0.592 0.408 0.000
#> SRR1560234 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560235 3 0.2647 0.7333 0.000 0.120 0.880 0.000
#> SRR1560236 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560237 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560238 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560239 2 0.0000 0.9010 0.000 1.000 0.000 0.000
#> SRR1560240 4 0.0707 0.7611 0.000 0.000 0.020 0.980
#> SRR1560241 4 0.4222 0.5436 0.000 0.000 0.272 0.728
#> SRR1560242 4 0.0707 0.7611 0.000 0.000 0.020 0.980
#> SRR1560243 3 0.0000 0.8250 0.000 0.000 1.000 0.000
#> SRR1560244 2 0.0000 0.9010 0.000 1.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560167 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560169 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560171 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560172 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560173 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560174 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560175 2 0.3636 0.6132 0.000 0.728 0.000 0.000 0.272
#> SRR1560176 1 0.0290 0.9611 0.992 0.000 0.008 0.000 0.000
#> SRR1560177 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560178 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560179 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560180 4 0.0000 0.7361 0.000 0.000 0.000 1.000 0.000
#> SRR1560181 5 0.1197 0.8067 0.000 0.048 0.000 0.000 0.952
#> SRR1560182 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560183 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560184 3 0.3151 0.8173 0.000 0.020 0.836 0.000 0.144
#> SRR1560185 3 0.3151 0.8173 0.000 0.020 0.836 0.000 0.144
#> SRR1560186 4 0.0000 0.7361 0.000 0.000 0.000 1.000 0.000
#> SRR1560187 4 0.3816 0.4796 0.000 0.000 0.000 0.696 0.304
#> SRR1560188 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560189 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560190 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560191 5 0.4138 0.2289 0.000 0.384 0.000 0.000 0.616
#> SRR1560192 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560194 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560195 3 0.2773 0.8614 0.000 0.164 0.836 0.000 0.000
#> SRR1560196 3 0.2773 0.8614 0.000 0.164 0.836 0.000 0.000
#> SRR1560197 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560198 4 0.0000 0.7361 0.000 0.000 0.000 1.000 0.000
#> SRR1560200 4 0.4273 0.1191 0.000 0.000 0.000 0.552 0.448
#> SRR1560199 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560201 4 0.4302 0.0545 0.480 0.000 0.000 0.520 0.000
#> SRR1560202 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560203 4 0.3053 0.6921 0.008 0.000 0.164 0.828 0.000
#> SRR1560204 4 0.2773 0.6959 0.000 0.000 0.164 0.836 0.000
#> SRR1560205 3 0.3339 0.8756 0.000 0.124 0.836 0.000 0.040
#> SRR1560206 2 0.4171 0.4036 0.000 0.604 0.000 0.000 0.396
#> SRR1560207 1 0.2773 0.8354 0.836 0.000 0.164 0.000 0.000
#> SRR1560208 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560209 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560210 4 0.1851 0.7154 0.000 0.000 0.000 0.912 0.088
#> SRR1560211 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560212 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560213 2 0.0609 0.8981 0.000 0.980 0.000 0.000 0.020
#> SRR1560214 4 0.0000 0.7361 0.000 0.000 0.000 1.000 0.000
#> SRR1560215 4 0.1544 0.7237 0.000 0.000 0.000 0.932 0.068
#> SRR1560216 4 0.6177 0.3384 0.304 0.000 0.164 0.532 0.000
#> SRR1560217 4 0.2773 0.6959 0.000 0.000 0.164 0.836 0.000
#> SRR1560218 2 0.4256 0.3167 0.000 0.564 0.000 0.000 0.436
#> SRR1560219 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560220 4 0.4273 0.2018 0.000 0.000 0.000 0.552 0.448
#> SRR1560221 2 0.3857 0.5516 0.000 0.688 0.000 0.000 0.312
#> SRR1560222 4 0.4283 0.0970 0.000 0.000 0.000 0.544 0.456
#> SRR1560223 5 0.4256 0.1328 0.000 0.000 0.000 0.436 0.564
#> SRR1560224 4 0.2773 0.6959 0.000 0.000 0.164 0.836 0.000
#> SRR1560225 5 0.4283 0.0738 0.000 0.000 0.000 0.456 0.544
#> SRR1560226 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9658 1.000 0.000 0.000 0.000 0.000
#> SRR1560229 5 0.0162 0.8498 0.000 0.000 0.000 0.004 0.996
#> SRR1560230 1 0.3771 0.7939 0.796 0.000 0.164 0.040 0.000
#> SRR1560231 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560232 4 0.4302 0.0545 0.480 0.000 0.000 0.520 0.000
#> SRR1560233 2 0.4192 0.3983 0.000 0.596 0.000 0.000 0.404
#> SRR1560234 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560235 5 0.1544 0.7825 0.000 0.068 0.000 0.000 0.932
#> SRR1560236 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560237 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560238 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560239 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
#> SRR1560240 4 0.0000 0.7361 0.000 0.000 0.000 1.000 0.000
#> SRR1560241 4 0.3039 0.6603 0.000 0.000 0.000 0.808 0.192
#> SRR1560242 4 0.0000 0.7361 0.000 0.000 0.000 1.000 0.000
#> SRR1560243 5 0.0000 0.8527 0.000 0.000 0.000 0.000 1.000
#> SRR1560244 2 0.0000 0.9157 0.000 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560166 2 0.3360 0.7747 0.000 0.732 0.004 0.000 0.000 0.264
#> SRR1560167 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560168 5 0.3101 0.7086 0.000 0.000 0.000 0.000 0.756 0.244
#> SRR1560169 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560170 2 0.3360 0.7747 0.000 0.732 0.004 0.000 0.000 0.264
#> SRR1560171 2 0.2883 0.7971 0.000 0.788 0.000 0.000 0.000 0.212
#> SRR1560172 2 0.3360 0.7747 0.000 0.732 0.004 0.000 0.000 0.264
#> SRR1560173 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560174 2 0.3101 0.7780 0.000 0.756 0.000 0.000 0.000 0.244
#> SRR1560175 2 0.7331 0.2696 0.000 0.408 0.004 0.112 0.212 0.264
#> SRR1560176 1 0.0363 0.9862 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR1560177 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560178 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560179 2 0.0291 0.8714 0.000 0.992 0.004 0.000 0.000 0.004
#> SRR1560180 4 0.0865 0.6893 0.000 0.000 0.000 0.964 0.000 0.036
#> SRR1560181 5 0.1552 0.7888 0.000 0.036 0.004 0.000 0.940 0.020
#> SRR1560182 2 0.0692 0.8687 0.000 0.976 0.004 0.000 0.000 0.020
#> SRR1560183 5 0.0000 0.8040 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560184 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 4 0.2454 0.5711 0.000 0.000 0.000 0.840 0.000 0.160
#> SRR1560187 4 0.3868 -0.0593 0.000 0.000 0.000 0.504 0.496 0.000
#> SRR1560188 5 0.0000 0.8040 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560189 5 0.0000 0.8040 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560190 5 0.0725 0.7940 0.000 0.000 0.000 0.012 0.976 0.012
#> SRR1560191 5 0.4161 0.6800 0.000 0.036 0.004 0.000 0.696 0.264
#> SRR1560192 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560193 2 0.3360 0.7747 0.000 0.732 0.004 0.000 0.000 0.264
#> SRR1560194 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560195 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 2 0.0951 0.8670 0.000 0.968 0.008 0.000 0.004 0.020
#> SRR1560198 4 0.2454 0.5711 0.000 0.000 0.000 0.840 0.000 0.160
#> SRR1560200 4 0.3445 0.6438 0.000 0.000 0.000 0.744 0.244 0.012
#> SRR1560199 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560201 4 0.3909 0.5437 0.244 0.000 0.000 0.720 0.000 0.036
#> SRR1560202 5 0.0000 0.8040 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560203 6 0.3409 0.7969 0.000 0.000 0.000 0.300 0.000 0.700
#> SRR1560204 6 0.3409 0.7969 0.000 0.000 0.000 0.300 0.000 0.700
#> SRR1560205 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 5 0.4861 0.6418 0.000 0.088 0.004 0.000 0.644 0.264
#> SRR1560207 6 0.3954 0.3891 0.352 0.000 0.000 0.012 0.000 0.636
#> SRR1560208 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560209 2 0.3360 0.7747 0.000 0.732 0.004 0.000 0.000 0.264
#> SRR1560210 4 0.1714 0.6802 0.000 0.000 0.000 0.908 0.092 0.000
#> SRR1560211 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560212 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560213 2 0.1826 0.8408 0.000 0.924 0.004 0.000 0.052 0.020
#> SRR1560214 4 0.2491 0.5653 0.000 0.000 0.000 0.836 0.000 0.164
#> SRR1560215 4 0.2019 0.6740 0.000 0.000 0.000 0.900 0.088 0.012
#> SRR1560216 6 0.4284 0.7806 0.056 0.000 0.000 0.256 0.000 0.688
#> SRR1560217 6 0.3409 0.7969 0.000 0.000 0.000 0.300 0.000 0.700
#> SRR1560218 5 0.3684 0.5858 0.000 0.300 0.004 0.000 0.692 0.004
#> SRR1560219 2 0.0603 0.8696 0.000 0.980 0.004 0.000 0.000 0.016
#> SRR1560220 5 0.3650 0.5316 0.000 0.000 0.000 0.280 0.708 0.012
#> SRR1560221 2 0.4035 0.4547 0.000 0.680 0.004 0.000 0.296 0.020
#> SRR1560222 4 0.3909 0.6381 0.000 0.000 0.000 0.720 0.244 0.036
#> SRR1560223 4 0.3909 0.6381 0.000 0.000 0.000 0.720 0.244 0.036
#> SRR1560224 6 0.3409 0.7969 0.000 0.000 0.000 0.300 0.000 0.700
#> SRR1560225 4 0.4024 0.6252 0.000 0.000 0.000 0.700 0.264 0.036
#> SRR1560226 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560227 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560228 1 0.0000 0.9985 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560229 5 0.0820 0.7917 0.000 0.000 0.000 0.016 0.972 0.012
#> SRR1560230 6 0.3748 0.5310 0.300 0.000 0.000 0.012 0.000 0.688
#> SRR1560231 2 0.1092 0.8640 0.000 0.960 0.020 0.000 0.000 0.020
#> SRR1560232 4 0.3909 0.5437 0.244 0.000 0.000 0.720 0.000 0.036
#> SRR1560233 5 0.6180 0.0041 0.000 0.352 0.004 0.000 0.384 0.260
#> SRR1560234 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560235 5 0.2126 0.7672 0.000 0.072 0.004 0.000 0.904 0.020
#> SRR1560236 5 0.0000 0.8040 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560237 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560238 5 0.3101 0.7086 0.000 0.000 0.000 0.000 0.756 0.244
#> SRR1560239 2 0.0000 0.8722 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1560240 4 0.0363 0.6858 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR1560241 4 0.2121 0.6703 0.000 0.000 0.000 0.892 0.096 0.012
#> SRR1560242 4 0.0363 0.6858 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR1560243 5 0.0363 0.7993 0.000 0.000 0.000 0.012 0.988 0.000
#> SRR1560244 2 0.2664 0.8105 0.000 0.816 0.000 0.000 0.000 0.184
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.699 0.904 0.946 0.4709 0.535 0.535
#> 3 3 0.571 0.716 0.838 0.0884 0.749 0.596
#> 4 4 0.457 0.725 0.782 0.2619 0.657 0.391
#> 5 5 0.542 0.671 0.784 0.1468 0.844 0.556
#> 6 6 0.695 0.732 0.836 0.0639 0.964 0.841
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
#> SRR1560164 1 0.0000 0.971 1.000 0.000
#> SRR1560165 1 0.0000 0.971 1.000 0.000
#> SRR1560166 2 0.0000 0.924 0.000 1.000
#> SRR1560167 1 0.0000 0.971 1.000 0.000
#> SRR1560168 2 0.8499 0.704 0.276 0.724
#> SRR1560169 1 0.0000 0.971 1.000 0.000
#> SRR1560170 2 0.0000 0.924 0.000 1.000
#> SRR1560171 2 0.0000 0.924 0.000 1.000
#> SRR1560172 2 0.0000 0.924 0.000 1.000
#> SRR1560173 1 0.0000 0.971 1.000 0.000
#> SRR1560174 2 0.0000 0.924 0.000 1.000
#> SRR1560175 1 0.3274 0.931 0.940 0.060
#> SRR1560176 1 0.0000 0.971 1.000 0.000
#> SRR1560177 2 0.2043 0.911 0.032 0.968
#> SRR1560178 2 0.8499 0.704 0.276 0.724
#> SRR1560179 2 0.0000 0.924 0.000 1.000
#> SRR1560180 1 0.0000 0.971 1.000 0.000
#> SRR1560181 2 0.6247 0.834 0.156 0.844
#> SRR1560182 2 0.0376 0.923 0.004 0.996
#> SRR1560183 2 0.5946 0.844 0.144 0.856
#> SRR1560184 2 0.0000 0.924 0.000 1.000
#> SRR1560185 2 0.0000 0.924 0.000 1.000
#> SRR1560186 2 0.0000 0.924 0.000 1.000
#> SRR1560187 2 0.8861 0.661 0.304 0.696
#> SRR1560188 2 0.8555 0.699 0.280 0.720
#> SRR1560189 2 0.8016 0.745 0.244 0.756
#> SRR1560190 2 0.0000 0.924 0.000 1.000
#> SRR1560191 2 0.0376 0.923 0.004 0.996
#> SRR1560192 1 0.0000 0.971 1.000 0.000
#> SRR1560193 2 0.0000 0.924 0.000 1.000
#> SRR1560194 2 0.0000 0.924 0.000 1.000
#> SRR1560195 2 0.0000 0.924 0.000 1.000
#> SRR1560196 2 0.0000 0.924 0.000 1.000
#> SRR1560197 2 0.0000 0.924 0.000 1.000
#> SRR1560198 1 0.2236 0.970 0.964 0.036
#> SRR1560200 1 0.2236 0.970 0.964 0.036
#> SRR1560199 2 0.0000 0.924 0.000 1.000
#> SRR1560201 1 0.0000 0.971 1.000 0.000
#> SRR1560202 2 0.8555 0.699 0.280 0.720
#> SRR1560203 1 0.2236 0.970 0.964 0.036
#> SRR1560204 1 0.2236 0.970 0.964 0.036
#> SRR1560205 2 0.0000 0.924 0.000 1.000
#> SRR1560206 2 0.0000 0.924 0.000 1.000
#> SRR1560207 1 0.0000 0.971 1.000 0.000
#> SRR1560208 2 0.5737 0.849 0.136 0.864
#> SRR1560209 2 0.0672 0.921 0.008 0.992
#> SRR1560210 2 0.0000 0.924 0.000 1.000
#> SRR1560211 2 0.0000 0.924 0.000 1.000
#> SRR1560212 2 0.6343 0.831 0.160 0.840
#> SRR1560213 2 0.0672 0.921 0.008 0.992
#> SRR1560214 1 0.2236 0.970 0.964 0.036
#> SRR1560215 2 0.8861 0.661 0.304 0.696
#> SRR1560216 1 0.2236 0.970 0.964 0.036
#> SRR1560217 1 0.2236 0.970 0.964 0.036
#> SRR1560218 2 0.0000 0.924 0.000 1.000
#> SRR1560219 2 0.0000 0.924 0.000 1.000
#> SRR1560220 2 0.0000 0.924 0.000 1.000
#> SRR1560221 2 0.0000 0.924 0.000 1.000
#> SRR1560222 1 0.2236 0.970 0.964 0.036
#> SRR1560223 1 0.2423 0.966 0.960 0.040
#> SRR1560224 1 0.2236 0.970 0.964 0.036
#> SRR1560225 2 0.6148 0.802 0.152 0.848
#> SRR1560226 1 0.0000 0.971 1.000 0.000
#> SRR1560227 1 0.0000 0.971 1.000 0.000
#> SRR1560228 1 0.0000 0.971 1.000 0.000
#> SRR1560229 2 0.8499 0.704 0.276 0.724
#> SRR1560230 1 0.1843 0.971 0.972 0.028
#> SRR1560231 2 0.0000 0.924 0.000 1.000
#> SRR1560232 1 0.0000 0.971 1.000 0.000
#> SRR1560233 2 0.0376 0.923 0.004 0.996
#> SRR1560234 2 0.6148 0.837 0.152 0.848
#> SRR1560235 2 0.0000 0.924 0.000 1.000
#> SRR1560236 2 0.0000 0.924 0.000 1.000
#> SRR1560237 2 0.0672 0.921 0.008 0.992
#> SRR1560238 2 0.8327 0.720 0.264 0.736
#> SRR1560239 2 0.2603 0.905 0.044 0.956
#> SRR1560240 1 0.2236 0.970 0.964 0.036
#> SRR1560241 1 0.6887 0.771 0.816 0.184
#> SRR1560242 1 0.2236 0.970 0.964 0.036
#> SRR1560243 2 0.6048 0.841 0.148 0.852
#> SRR1560244 2 0.0000 0.924 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560165 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560166 2 0.0237 0.9043 0.000 0.996 0.004
#> SRR1560167 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560168 2 0.0592 0.9040 0.000 0.988 0.012
#> SRR1560169 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560170 2 0.0237 0.9052 0.000 0.996 0.004
#> SRR1560171 2 0.3921 0.8552 0.016 0.872 0.112
#> SRR1560172 2 0.3896 0.8491 0.008 0.864 0.128
#> SRR1560173 1 0.0747 0.6128 0.984 0.000 0.016
#> SRR1560174 2 0.0661 0.9055 0.008 0.988 0.004
#> SRR1560175 2 0.9088 0.0145 0.396 0.464 0.140
#> SRR1560176 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560177 2 0.0848 0.9049 0.008 0.984 0.008
#> SRR1560178 2 0.3695 0.8526 0.012 0.880 0.108
#> SRR1560179 2 0.0237 0.9043 0.000 0.996 0.004
#> SRR1560180 1 0.8503 0.1748 0.544 0.352 0.104
#> SRR1560181 2 0.0000 0.9050 0.000 1.000 0.000
#> SRR1560182 2 0.0000 0.9050 0.000 1.000 0.000
#> SRR1560183 2 0.0424 0.9041 0.000 0.992 0.008
#> SRR1560184 3 0.3207 0.7800 0.012 0.084 0.904
#> SRR1560185 3 0.3207 0.7800 0.012 0.084 0.904
#> SRR1560186 3 0.7824 0.3441 0.052 0.444 0.504
#> SRR1560187 2 0.2096 0.8844 0.004 0.944 0.052
#> SRR1560188 2 0.1643 0.8888 0.000 0.956 0.044
#> SRR1560189 2 0.1411 0.8936 0.000 0.964 0.036
#> SRR1560190 2 0.8671 0.0228 0.416 0.480 0.104
#> SRR1560191 2 0.0747 0.9027 0.000 0.984 0.016
#> SRR1560192 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560193 2 0.0237 0.9043 0.000 0.996 0.004
#> SRR1560194 2 0.1315 0.9009 0.008 0.972 0.020
#> SRR1560195 3 0.3207 0.7800 0.012 0.084 0.904
#> SRR1560196 3 0.3207 0.7800 0.012 0.084 0.904
#> SRR1560197 2 0.1453 0.9010 0.008 0.968 0.024
#> SRR1560198 1 0.8393 0.4299 0.516 0.396 0.088
#> SRR1560200 2 0.5263 0.7940 0.088 0.828 0.084
#> SRR1560199 2 0.1170 0.9027 0.008 0.976 0.016
#> SRR1560201 1 0.1860 0.5963 0.948 0.000 0.052
#> SRR1560202 2 0.2152 0.8940 0.016 0.948 0.036
#> SRR1560203 1 0.7878 0.4513 0.548 0.392 0.060
#> SRR1560204 1 0.7809 0.4517 0.548 0.396 0.056
#> SRR1560205 3 0.3207 0.7800 0.012 0.084 0.904
#> SRR1560206 2 0.0000 0.9050 0.000 1.000 0.000
#> SRR1560207 1 0.1163 0.6081 0.972 0.000 0.028
#> SRR1560208 2 0.0848 0.9049 0.008 0.984 0.008
#> SRR1560209 2 0.0661 0.9055 0.008 0.988 0.004
#> SRR1560210 3 0.7425 0.5660 0.052 0.328 0.620
#> SRR1560211 2 0.1170 0.9027 0.008 0.976 0.016
#> SRR1560212 2 0.2063 0.8895 0.008 0.948 0.044
#> SRR1560213 2 0.0237 0.9043 0.000 0.996 0.004
#> SRR1560214 1 0.8370 0.3936 0.500 0.416 0.084
#> SRR1560215 2 0.3856 0.8469 0.040 0.888 0.072
#> SRR1560216 1 0.7636 0.4530 0.556 0.396 0.048
#> SRR1560217 1 0.7636 0.4530 0.556 0.396 0.048
#> SRR1560218 3 0.6434 0.5416 0.008 0.380 0.612
#> SRR1560219 2 0.3607 0.8307 0.008 0.880 0.112
#> SRR1560220 2 0.2680 0.8784 0.008 0.924 0.068
#> SRR1560221 2 0.1170 0.9037 0.008 0.976 0.016
#> SRR1560222 2 0.8310 -0.1807 0.420 0.500 0.080
#> SRR1560223 2 0.5260 0.7853 0.092 0.828 0.080
#> SRR1560224 1 0.7809 0.4517 0.548 0.396 0.056
#> SRR1560225 1 0.8501 0.0640 0.488 0.420 0.092
#> SRR1560226 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560227 1 0.0747 0.6194 0.984 0.000 0.016
#> SRR1560228 1 0.1031 0.6171 0.976 0.000 0.024
#> SRR1560229 2 0.1860 0.8914 0.000 0.948 0.052
#> SRR1560230 1 0.8046 0.4421 0.536 0.396 0.068
#> SRR1560231 2 0.3043 0.8705 0.008 0.908 0.084
#> SRR1560232 1 0.3193 0.5802 0.896 0.004 0.100
#> SRR1560233 2 0.1950 0.8943 0.008 0.952 0.040
#> SRR1560234 2 0.1453 0.8990 0.008 0.968 0.024
#> SRR1560235 2 0.0000 0.9050 0.000 1.000 0.000
#> SRR1560236 2 0.0592 0.9057 0.000 0.988 0.012
#> SRR1560237 2 0.0848 0.9053 0.008 0.984 0.008
#> SRR1560238 2 0.0892 0.9013 0.000 0.980 0.020
#> SRR1560239 2 0.0661 0.9055 0.008 0.988 0.004
#> SRR1560240 1 0.8376 0.3878 0.496 0.420 0.084
#> SRR1560241 2 0.4479 0.8358 0.044 0.860 0.096
#> SRR1560242 2 0.5639 0.7591 0.112 0.808 0.080
#> SRR1560243 2 0.4056 0.8419 0.032 0.876 0.092
#> SRR1560244 2 0.0661 0.9055 0.008 0.988 0.004
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.0000 0.82006 1.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.82006 1.000 0.000 0.000 0.000
#> SRR1560166 4 0.4955 0.64306 0.000 0.444 0.000 0.556
#> SRR1560167 1 0.0000 0.82006 1.000 0.000 0.000 0.000
#> SRR1560168 4 0.4697 0.70026 0.000 0.356 0.000 0.644
#> SRR1560169 1 0.0000 0.82006 1.000 0.000 0.000 0.000
#> SRR1560170 4 0.4992 0.62848 0.000 0.476 0.000 0.524
#> SRR1560171 4 0.4907 0.65493 0.000 0.420 0.000 0.580
#> SRR1560172 4 0.5256 0.69386 0.000 0.272 0.036 0.692
#> SRR1560173 1 0.2170 0.81137 0.936 0.016 0.012 0.036
#> SRR1560174 4 0.4925 0.63563 0.000 0.428 0.000 0.572
#> SRR1560175 1 0.6738 0.46058 0.476 0.060 0.012 0.452
#> SRR1560176 1 0.0000 0.82006 1.000 0.000 0.000 0.000
#> SRR1560177 2 0.0188 0.82061 0.000 0.996 0.004 0.000
#> SRR1560178 2 0.3547 0.79932 0.000 0.864 0.064 0.072
#> SRR1560179 4 0.4961 0.63787 0.000 0.448 0.000 0.552
#> SRR1560180 1 0.6635 0.51165 0.520 0.056 0.012 0.412
#> SRR1560181 4 0.4972 0.59300 0.000 0.456 0.000 0.544
#> SRR1560182 2 0.2868 0.68025 0.000 0.864 0.000 0.136
#> SRR1560183 4 0.4713 0.69862 0.000 0.360 0.000 0.640
#> SRR1560184 3 0.0524 1.00000 0.000 0.004 0.988 0.008
#> SRR1560185 3 0.0524 1.00000 0.000 0.004 0.988 0.008
#> SRR1560186 2 0.6734 0.60930 0.016 0.636 0.104 0.244
#> SRR1560187 4 0.3356 0.73874 0.000 0.176 0.000 0.824
#> SRR1560188 4 0.4250 0.73031 0.000 0.276 0.000 0.724
#> SRR1560189 4 0.4543 0.71654 0.000 0.324 0.000 0.676
#> SRR1560190 1 0.7403 0.58870 0.592 0.084 0.052 0.272
#> SRR1560191 4 0.4948 0.64598 0.000 0.440 0.000 0.560
#> SRR1560192 1 0.0000 0.82006 1.000 0.000 0.000 0.000
#> SRR1560193 4 0.4948 0.64598 0.000 0.440 0.000 0.560
#> SRR1560194 2 0.0000 0.82023 0.000 1.000 0.000 0.000
#> SRR1560195 3 0.0524 1.00000 0.000 0.004 0.988 0.008
#> SRR1560196 3 0.0524 1.00000 0.000 0.004 0.988 0.008
#> SRR1560197 2 0.1767 0.81806 0.000 0.944 0.012 0.044
#> SRR1560198 4 0.3659 0.72536 0.024 0.136 0.000 0.840
#> SRR1560200 4 0.3597 0.73161 0.016 0.148 0.000 0.836
#> SRR1560199 2 0.0000 0.82023 0.000 1.000 0.000 0.000
#> SRR1560201 1 0.4685 0.73797 0.804 0.052 0.012 0.132
#> SRR1560202 4 0.6353 0.52968 0.016 0.396 0.036 0.552
#> SRR1560203 4 0.4570 0.64825 0.116 0.064 0.008 0.812
#> SRR1560204 4 0.4570 0.64825 0.116 0.064 0.008 0.812
#> SRR1560205 3 0.0524 1.00000 0.000 0.004 0.988 0.008
#> SRR1560206 4 0.4941 0.64996 0.000 0.436 0.000 0.564
#> SRR1560207 1 0.2221 0.80965 0.932 0.016 0.008 0.044
#> SRR1560208 2 0.0000 0.82023 0.000 1.000 0.000 0.000
#> SRR1560209 2 0.4522 0.00687 0.000 0.680 0.000 0.320
#> SRR1560210 2 0.6758 0.61056 0.016 0.636 0.108 0.240
#> SRR1560211 2 0.0469 0.81939 0.000 0.988 0.012 0.000
#> SRR1560212 2 0.2644 0.81388 0.000 0.908 0.060 0.032
#> SRR1560213 4 0.4948 0.64598 0.000 0.440 0.000 0.560
#> SRR1560214 4 0.3597 0.73137 0.016 0.148 0.000 0.836
#> SRR1560215 4 0.3074 0.73503 0.000 0.152 0.000 0.848
#> SRR1560216 4 0.4500 0.65118 0.116 0.068 0.004 0.812
#> SRR1560217 4 0.4458 0.65743 0.116 0.076 0.000 0.808
#> SRR1560218 2 0.4657 0.76401 0.012 0.808 0.056 0.124
#> SRR1560219 2 0.2586 0.81414 0.000 0.912 0.048 0.040
#> SRR1560220 2 0.6543 0.62002 0.012 0.648 0.100 0.240
#> SRR1560221 2 0.3164 0.81058 0.000 0.884 0.064 0.052
#> SRR1560222 4 0.3479 0.73200 0.012 0.148 0.000 0.840
#> SRR1560223 4 0.3529 0.73278 0.012 0.152 0.000 0.836
#> SRR1560224 4 0.4570 0.64825 0.116 0.064 0.008 0.812
#> SRR1560225 1 0.6768 0.63074 0.636 0.056 0.044 0.264
#> SRR1560226 1 0.0817 0.81479 0.976 0.000 0.000 0.024
#> SRR1560227 1 0.0817 0.81479 0.976 0.000 0.000 0.024
#> SRR1560228 1 0.0592 0.81862 0.984 0.000 0.000 0.016
#> SRR1560229 4 0.3726 0.74000 0.000 0.212 0.000 0.788
#> SRR1560230 4 0.4894 0.67529 0.120 0.100 0.000 0.780
#> SRR1560231 2 0.5805 0.63559 0.008 0.692 0.060 0.240
#> SRR1560232 1 0.5871 0.67153 0.684 0.052 0.012 0.252
#> SRR1560233 2 0.3803 0.76790 0.000 0.836 0.032 0.132
#> SRR1560234 2 0.0376 0.82093 0.000 0.992 0.004 0.004
#> SRR1560235 4 0.4713 0.69859 0.000 0.360 0.000 0.640
#> SRR1560236 4 0.4730 0.70636 0.000 0.364 0.000 0.636
#> SRR1560237 2 0.2081 0.73942 0.000 0.916 0.000 0.084
#> SRR1560238 4 0.4697 0.70026 0.000 0.356 0.000 0.644
#> SRR1560239 2 0.0188 0.82061 0.000 0.996 0.004 0.000
#> SRR1560240 4 0.3597 0.73137 0.016 0.148 0.000 0.836
#> SRR1560241 4 0.3529 0.73276 0.012 0.152 0.000 0.836
#> SRR1560242 4 0.3479 0.73200 0.012 0.148 0.000 0.840
#> SRR1560243 4 0.3123 0.73571 0.000 0.156 0.000 0.844
#> SRR1560244 4 0.4996 0.61637 0.000 0.484 0.000 0.516
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.0703 0.8304 0.976 0.000 0.000 0.024 0.000
#> SRR1560165 1 0.0703 0.8304 0.976 0.000 0.000 0.024 0.000
#> SRR1560166 5 0.3282 0.6320 0.000 0.188 0.000 0.008 0.804
#> SRR1560167 1 0.0162 0.8295 0.996 0.000 0.000 0.004 0.000
#> SRR1560168 5 0.0703 0.6432 0.000 0.000 0.000 0.024 0.976
#> SRR1560169 1 0.0162 0.8295 0.996 0.000 0.000 0.004 0.000
#> SRR1560170 5 0.3203 0.6433 0.000 0.168 0.000 0.012 0.820
#> SRR1560171 5 0.6840 0.3707 0.004 0.252 0.000 0.332 0.412
#> SRR1560172 4 0.6282 0.2765 0.000 0.248 0.004 0.556 0.192
#> SRR1560173 1 0.4032 0.7679 0.800 0.124 0.000 0.072 0.004
#> SRR1560174 5 0.5792 0.5616 0.000 0.224 0.000 0.164 0.612
#> SRR1560175 4 0.7130 0.5937 0.112 0.232 0.000 0.552 0.104
#> SRR1560176 1 0.0703 0.8304 0.976 0.000 0.000 0.024 0.000
#> SRR1560177 2 0.2690 0.7715 0.000 0.844 0.000 0.000 0.156
#> SRR1560178 2 0.4216 0.7744 0.000 0.780 0.000 0.100 0.120
#> SRR1560179 5 0.3048 0.6380 0.000 0.176 0.000 0.004 0.820
#> SRR1560180 4 0.7668 0.2791 0.304 0.172 0.000 0.440 0.084
#> SRR1560181 5 0.3080 0.5919 0.000 0.124 0.004 0.020 0.852
#> SRR1560182 5 0.4300 -0.0365 0.000 0.476 0.000 0.000 0.524
#> SRR1560183 5 0.1493 0.6507 0.000 0.028 0.000 0.024 0.948
#> SRR1560184 3 0.0162 1.0000 0.000 0.000 0.996 0.000 0.004
#> SRR1560185 3 0.0162 1.0000 0.000 0.000 0.996 0.000 0.004
#> SRR1560186 2 0.6178 0.5823 0.000 0.588 0.036 0.296 0.080
#> SRR1560187 4 0.4541 0.6323 0.000 0.032 0.000 0.680 0.288
#> SRR1560188 5 0.4150 0.1951 0.000 0.000 0.000 0.388 0.612
#> SRR1560189 5 0.4192 0.1511 0.000 0.000 0.000 0.404 0.596
#> SRR1560190 1 0.7984 0.4040 0.480 0.208 0.008 0.180 0.124
#> SRR1560191 5 0.2208 0.6600 0.000 0.072 0.000 0.020 0.908
#> SRR1560192 1 0.0162 0.8295 0.996 0.000 0.000 0.004 0.000
#> SRR1560193 5 0.2997 0.6498 0.000 0.148 0.000 0.012 0.840
#> SRR1560194 2 0.2690 0.7715 0.000 0.844 0.000 0.000 0.156
#> SRR1560195 3 0.0162 1.0000 0.000 0.000 0.996 0.000 0.004
#> SRR1560196 3 0.0162 1.0000 0.000 0.000 0.996 0.000 0.004
#> SRR1560197 2 0.4237 0.7817 0.000 0.772 0.000 0.076 0.152
#> SRR1560198 4 0.2673 0.8159 0.000 0.060 0.004 0.892 0.044
#> SRR1560200 4 0.4123 0.7854 0.000 0.072 0.004 0.792 0.132
#> SRR1560199 2 0.2806 0.7733 0.000 0.844 0.000 0.004 0.152
#> SRR1560201 1 0.5350 0.7196 0.716 0.152 0.000 0.104 0.028
#> SRR1560202 5 0.5815 0.2460 0.000 0.220 0.004 0.152 0.624
#> SRR1560203 4 0.1334 0.7749 0.012 0.004 0.004 0.960 0.020
#> SRR1560204 4 0.1334 0.7749 0.012 0.004 0.004 0.960 0.020
#> SRR1560205 3 0.0162 1.0000 0.000 0.000 0.996 0.000 0.004
#> SRR1560206 5 0.2997 0.6481 0.000 0.148 0.000 0.012 0.840
#> SRR1560207 1 0.4022 0.7710 0.804 0.100 0.000 0.092 0.004
#> SRR1560208 2 0.2690 0.7715 0.000 0.844 0.000 0.000 0.156
#> SRR1560209 5 0.4196 0.4204 0.000 0.356 0.000 0.004 0.640
#> SRR1560210 2 0.6928 0.6398 0.000 0.592 0.096 0.156 0.156
#> SRR1560211 2 0.2732 0.7712 0.000 0.840 0.000 0.000 0.160
#> SRR1560212 2 0.4393 0.7804 0.000 0.772 0.004 0.088 0.136
#> SRR1560213 5 0.2763 0.6483 0.000 0.148 0.000 0.004 0.848
#> SRR1560214 4 0.2928 0.8173 0.000 0.064 0.000 0.872 0.064
#> SRR1560215 4 0.3527 0.7650 0.000 0.016 0.000 0.792 0.192
#> SRR1560216 4 0.1443 0.7676 0.044 0.004 0.004 0.948 0.000
#> SRR1560217 4 0.1243 0.7743 0.028 0.004 0.008 0.960 0.000
#> SRR1560218 2 0.6468 0.6825 0.000 0.628 0.072 0.112 0.188
#> SRR1560219 2 0.5122 0.7672 0.000 0.736 0.028 0.092 0.144
#> SRR1560220 2 0.6223 0.6579 0.000 0.612 0.020 0.188 0.180
#> SRR1560221 2 0.5156 0.7444 0.000 0.688 0.004 0.092 0.216
#> SRR1560222 4 0.2989 0.8182 0.000 0.060 0.000 0.868 0.072
#> SRR1560223 4 0.3442 0.8104 0.000 0.060 0.000 0.836 0.104
#> SRR1560224 4 0.1428 0.7768 0.012 0.004 0.004 0.956 0.024
#> SRR1560225 1 0.7048 0.5563 0.540 0.216 0.000 0.192 0.052
#> SRR1560226 1 0.0880 0.8283 0.968 0.000 0.000 0.032 0.000
#> SRR1560227 1 0.0880 0.8283 0.968 0.000 0.000 0.032 0.000
#> SRR1560228 1 0.0693 0.8285 0.980 0.012 0.000 0.008 0.000
#> SRR1560229 5 0.4451 0.3379 0.000 0.016 0.000 0.340 0.644
#> SRR1560230 4 0.3248 0.8010 0.048 0.064 0.000 0.868 0.020
#> SRR1560231 2 0.5730 0.6765 0.000 0.640 0.004 0.176 0.180
#> SRR1560232 1 0.6498 0.5731 0.584 0.164 0.000 0.224 0.028
#> SRR1560233 2 0.6265 0.4676 0.000 0.476 0.008 0.116 0.400
#> SRR1560234 2 0.2690 0.7715 0.000 0.844 0.000 0.000 0.156
#> SRR1560235 5 0.5396 0.2603 0.000 0.064 0.000 0.376 0.560
#> SRR1560236 5 0.5118 0.1596 0.000 0.040 0.000 0.412 0.548
#> SRR1560237 2 0.3966 0.4835 0.000 0.664 0.000 0.000 0.336
#> SRR1560238 5 0.1043 0.6445 0.000 0.000 0.000 0.040 0.960
#> SRR1560239 2 0.2690 0.7715 0.000 0.844 0.000 0.000 0.156
#> SRR1560240 4 0.3213 0.8156 0.000 0.072 0.004 0.860 0.064
#> SRR1560241 4 0.3966 0.7854 0.000 0.072 0.000 0.796 0.132
#> SRR1560242 4 0.2989 0.8182 0.000 0.060 0.000 0.868 0.072
#> SRR1560243 4 0.3720 0.7375 0.000 0.012 0.000 0.760 0.228
#> SRR1560244 5 0.4025 0.5335 0.000 0.292 0.000 0.008 0.700
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.0000 0.8656 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560165 1 0.0000 0.8656 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1560166 5 0.2664 0.7579 0.000 0.184 0.000 0.000 0.816 0.000
#> SRR1560167 1 0.0146 0.8665 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1560168 5 0.0000 0.7180 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1560169 1 0.0146 0.8665 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1560170 5 0.2805 0.7581 0.000 0.184 0.000 0.004 0.812 0.000
#> SRR1560171 5 0.5117 0.7116 0.000 0.204 0.000 0.060 0.680 0.056
#> SRR1560172 5 0.7141 0.4260 0.000 0.196 0.000 0.264 0.428 0.112
#> SRR1560173 1 0.3547 0.4563 0.696 0.004 0.000 0.000 0.000 0.300
#> SRR1560174 5 0.3720 0.7489 0.000 0.196 0.000 0.016 0.768 0.020
#> SRR1560175 6 0.5505 0.6002 0.028 0.036 0.000 0.156 0.092 0.688
#> SRR1560176 1 0.0146 0.8656 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1560177 2 0.0692 0.8708 0.000 0.976 0.000 0.000 0.020 0.004
#> SRR1560178 2 0.1465 0.8668 0.000 0.948 0.004 0.020 0.004 0.024
#> SRR1560179 5 0.2664 0.7575 0.000 0.184 0.000 0.000 0.816 0.000
#> SRR1560180 6 0.3492 0.7133 0.112 0.012 0.000 0.048 0.004 0.824
#> SRR1560181 5 0.1610 0.7251 0.000 0.084 0.000 0.000 0.916 0.000
#> SRR1560182 5 0.3868 0.1452 0.000 0.496 0.000 0.000 0.504 0.000
#> SRR1560183 5 0.0146 0.7187 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR1560184 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560185 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560186 2 0.5046 0.7031 0.016 0.748 0.032 0.092 0.016 0.096
#> SRR1560187 4 0.4986 0.3261 0.000 0.000 0.000 0.488 0.444 0.068
#> SRR1560188 5 0.3653 0.3552 0.000 0.000 0.000 0.300 0.692 0.008
#> SRR1560189 5 0.3672 0.3456 0.000 0.000 0.000 0.304 0.688 0.008
#> SRR1560190 6 0.5552 0.5579 0.284 0.020 0.000 0.008 0.088 0.600
#> SRR1560191 5 0.1644 0.7501 0.000 0.076 0.000 0.004 0.920 0.000
#> SRR1560192 1 0.0146 0.8665 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1560193 5 0.2491 0.7613 0.000 0.164 0.000 0.000 0.836 0.000
#> SRR1560194 2 0.0692 0.8714 0.000 0.976 0.000 0.000 0.020 0.004
#> SRR1560195 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560196 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560197 2 0.1564 0.8672 0.000 0.936 0.000 0.024 0.040 0.000
#> SRR1560198 4 0.4328 0.8168 0.016 0.012 0.000 0.772 0.080 0.120
#> SRR1560200 4 0.5214 0.7692 0.012 0.020 0.000 0.676 0.088 0.204
#> SRR1560199 2 0.0777 0.8724 0.000 0.972 0.000 0.000 0.024 0.004
#> SRR1560201 1 0.4051 0.0198 0.560 0.008 0.000 0.000 0.000 0.432
#> SRR1560202 5 0.4615 0.5999 0.008 0.160 0.000 0.024 0.740 0.068
#> SRR1560203 4 0.0405 0.7508 0.004 0.000 0.000 0.988 0.000 0.008
#> SRR1560204 4 0.0405 0.7508 0.004 0.000 0.000 0.988 0.000 0.008
#> SRR1560205 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1560206 5 0.2668 0.7621 0.000 0.168 0.000 0.004 0.828 0.000
#> SRR1560207 1 0.3489 0.4590 0.708 0.004 0.000 0.000 0.000 0.288
#> SRR1560208 2 0.0777 0.8707 0.000 0.972 0.000 0.000 0.024 0.004
#> SRR1560209 5 0.3769 0.5439 0.000 0.356 0.000 0.004 0.640 0.000
#> SRR1560210 2 0.4749 0.7318 0.008 0.764 0.096 0.024 0.020 0.088
#> SRR1560211 2 0.0935 0.8712 0.000 0.964 0.000 0.000 0.032 0.004
#> SRR1560212 2 0.1167 0.8703 0.000 0.960 0.000 0.020 0.008 0.012
#> SRR1560213 5 0.2416 0.7620 0.000 0.156 0.000 0.000 0.844 0.000
#> SRR1560214 4 0.4559 0.8159 0.008 0.012 0.000 0.740 0.092 0.148
#> SRR1560215 4 0.4400 0.8024 0.000 0.008 0.000 0.732 0.164 0.096
#> SRR1560216 4 0.0777 0.7559 0.024 0.000 0.000 0.972 0.000 0.004
#> SRR1560217 4 0.0717 0.7585 0.016 0.000 0.000 0.976 0.000 0.008
#> SRR1560218 2 0.4592 0.7565 0.000 0.776 0.088 0.024 0.052 0.060
#> SRR1560219 2 0.1708 0.8668 0.000 0.932 0.004 0.024 0.040 0.000
#> SRR1560220 2 0.4608 0.7546 0.000 0.776 0.080 0.024 0.056 0.064
#> SRR1560221 2 0.1826 0.8641 0.000 0.924 0.000 0.020 0.052 0.004
#> SRR1560222 4 0.4376 0.8159 0.000 0.004 0.000 0.724 0.092 0.180
#> SRR1560223 4 0.4376 0.8159 0.000 0.004 0.000 0.724 0.092 0.180
#> SRR1560224 4 0.0653 0.7596 0.004 0.000 0.000 0.980 0.012 0.004
#> SRR1560225 6 0.4110 0.5615 0.296 0.012 0.000 0.004 0.008 0.680
#> SRR1560226 1 0.0405 0.8626 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR1560227 1 0.0405 0.8626 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR1560228 1 0.0458 0.8605 0.984 0.000 0.000 0.000 0.000 0.016
#> SRR1560229 5 0.1471 0.7064 0.000 0.004 0.000 0.064 0.932 0.000
#> SRR1560230 4 0.3660 0.7774 0.080 0.012 0.000 0.832 0.044 0.032
#> SRR1560231 2 0.3295 0.8266 0.000 0.856 0.072 0.020 0.024 0.028
#> SRR1560232 6 0.2805 0.6978 0.160 0.012 0.000 0.000 0.000 0.828
#> SRR1560233 2 0.4313 0.4399 0.000 0.604 0.000 0.020 0.372 0.004
#> SRR1560234 2 0.0692 0.8714 0.000 0.976 0.000 0.000 0.020 0.004
#> SRR1560235 5 0.4722 0.4259 0.000 0.056 0.000 0.296 0.640 0.008
#> SRR1560236 5 0.4319 0.3464 0.000 0.024 0.000 0.320 0.648 0.008
#> SRR1560237 2 0.3023 0.6422 0.000 0.784 0.000 0.000 0.212 0.004
#> SRR1560238 5 0.0547 0.7143 0.000 0.000 0.000 0.020 0.980 0.000
#> SRR1560239 2 0.0777 0.8707 0.000 0.972 0.000 0.000 0.024 0.004
#> SRR1560240 4 0.4785 0.8079 0.016 0.016 0.000 0.732 0.088 0.148
#> SRR1560241 4 0.4702 0.7836 0.000 0.040 0.000 0.728 0.160 0.072
#> SRR1560242 4 0.4376 0.8159 0.000 0.004 0.000 0.724 0.092 0.180
#> SRR1560243 4 0.3650 0.7372 0.000 0.008 0.000 0.716 0.272 0.004
#> SRR1560244 5 0.3109 0.7404 0.000 0.224 0.000 0.004 0.772 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "NMF"]
# you can also extract it by
# res = res_list["ATC:NMF"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 15546 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.897 0.923 0.966 0.3105 0.694 0.694
#> 3 3 0.492 0.767 0.865 0.8877 0.610 0.469
#> 4 4 0.520 0.708 0.832 0.2060 0.801 0.540
#> 5 5 0.511 0.544 0.737 0.0745 0.836 0.533
#> 6 6 0.542 0.472 0.661 0.0494 0.952 0.821
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
#> SRR1560164 1 0.0938 0.913 0.988 0.012
#> SRR1560165 1 0.0000 0.917 1.000 0.000
#> SRR1560166 2 0.0672 0.971 0.008 0.992
#> SRR1560167 1 0.0000 0.917 1.000 0.000
#> SRR1560168 2 0.0376 0.973 0.004 0.996
#> SRR1560169 1 0.0000 0.917 1.000 0.000
#> SRR1560170 2 0.0672 0.971 0.008 0.992
#> SRR1560171 2 0.9909 0.108 0.444 0.556
#> SRR1560172 2 0.7056 0.745 0.192 0.808
#> SRR1560173 1 0.0000 0.917 1.000 0.000
#> SRR1560174 2 0.2236 0.948 0.036 0.964
#> SRR1560175 1 0.8327 0.701 0.736 0.264
#> SRR1560176 1 0.0376 0.916 0.996 0.004
#> SRR1560177 2 0.0376 0.973 0.004 0.996
#> SRR1560178 2 0.9850 0.170 0.428 0.572
#> SRR1560179 2 0.0376 0.973 0.004 0.996
#> SRR1560180 1 0.7376 0.776 0.792 0.208
#> SRR1560181 2 0.0000 0.973 0.000 1.000
#> SRR1560182 2 0.0376 0.973 0.004 0.996
#> SRR1560183 2 0.0376 0.973 0.004 0.996
#> SRR1560184 2 0.0000 0.973 0.000 1.000
#> SRR1560185 2 0.0000 0.973 0.000 1.000
#> SRR1560186 2 0.0000 0.973 0.000 1.000
#> SRR1560187 2 0.0376 0.973 0.004 0.996
#> SRR1560188 2 0.0376 0.973 0.004 0.996
#> SRR1560189 2 0.0376 0.973 0.004 0.996
#> SRR1560190 1 0.8909 0.624 0.692 0.308
#> SRR1560191 2 0.0376 0.973 0.004 0.996
#> SRR1560192 1 0.0000 0.917 1.000 0.000
#> SRR1560193 2 0.0376 0.973 0.004 0.996
#> SRR1560194 2 0.0000 0.973 0.000 1.000
#> SRR1560195 2 0.0000 0.973 0.000 1.000
#> SRR1560196 2 0.0000 0.973 0.000 1.000
#> SRR1560197 2 0.0000 0.973 0.000 1.000
#> SRR1560198 2 0.0000 0.973 0.000 1.000
#> SRR1560200 2 0.3274 0.923 0.060 0.940
#> SRR1560199 2 0.0000 0.973 0.000 1.000
#> SRR1560201 1 0.4161 0.877 0.916 0.084
#> SRR1560202 2 0.0000 0.973 0.000 1.000
#> SRR1560203 2 0.0000 0.973 0.000 1.000
#> SRR1560204 2 0.0000 0.973 0.000 1.000
#> SRR1560205 2 0.0000 0.973 0.000 1.000
#> SRR1560206 2 0.0376 0.973 0.004 0.996
#> SRR1560207 1 0.0000 0.917 1.000 0.000
#> SRR1560208 2 0.1414 0.963 0.020 0.980
#> SRR1560209 2 0.0376 0.973 0.004 0.996
#> SRR1560210 2 0.0000 0.973 0.000 1.000
#> SRR1560211 2 0.0000 0.973 0.000 1.000
#> SRR1560212 2 0.1843 0.956 0.028 0.972
#> SRR1560213 2 0.0376 0.973 0.004 0.996
#> SRR1560214 2 0.0000 0.973 0.000 1.000
#> SRR1560215 2 0.0376 0.973 0.004 0.996
#> SRR1560216 2 0.0000 0.973 0.000 1.000
#> SRR1560217 2 0.0000 0.973 0.000 1.000
#> SRR1560218 2 0.0000 0.973 0.000 1.000
#> SRR1560219 2 0.0000 0.973 0.000 1.000
#> SRR1560220 2 0.0000 0.973 0.000 1.000
#> SRR1560221 2 0.0000 0.973 0.000 1.000
#> SRR1560222 2 0.0672 0.971 0.008 0.992
#> SRR1560223 2 0.0672 0.971 0.008 0.992
#> SRR1560224 2 0.0000 0.973 0.000 1.000
#> SRR1560225 1 0.7528 0.767 0.784 0.216
#> SRR1560226 2 0.7299 0.716 0.204 0.796
#> SRR1560227 2 0.1414 0.957 0.020 0.980
#> SRR1560228 1 0.0000 0.917 1.000 0.000
#> SRR1560229 2 0.0376 0.973 0.004 0.996
#> SRR1560230 2 0.0000 0.973 0.000 1.000
#> SRR1560231 2 0.0672 0.969 0.008 0.992
#> SRR1560232 1 0.0000 0.917 1.000 0.000
#> SRR1560233 2 0.0376 0.973 0.004 0.996
#> SRR1560234 2 0.1843 0.956 0.028 0.972
#> SRR1560235 2 0.0376 0.973 0.004 0.996
#> SRR1560236 2 0.0938 0.969 0.012 0.988
#> SRR1560237 2 0.0672 0.971 0.008 0.992
#> SRR1560238 2 0.0376 0.973 0.004 0.996
#> SRR1560239 2 0.0672 0.971 0.008 0.992
#> SRR1560240 2 0.0000 0.973 0.000 1.000
#> SRR1560241 2 0.1633 0.959 0.024 0.976
#> SRR1560242 2 0.0376 0.973 0.004 0.996
#> SRR1560243 2 0.0672 0.971 0.008 0.992
#> SRR1560244 2 0.0672 0.971 0.008 0.992
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR1560164 1 0.1877 0.870 0.956 0.012 0.032
#> SRR1560165 1 0.1860 0.871 0.948 0.052 0.000
#> SRR1560166 2 0.1411 0.810 0.000 0.964 0.036
#> SRR1560167 1 0.0592 0.873 0.988 0.000 0.012
#> SRR1560168 2 0.6140 0.450 0.000 0.596 0.404
#> SRR1560169 1 0.0000 0.873 1.000 0.000 0.000
#> SRR1560170 2 0.3038 0.830 0.000 0.896 0.104
#> SRR1560171 2 0.1163 0.754 0.028 0.972 0.000
#> SRR1560172 2 0.1482 0.793 0.012 0.968 0.020
#> SRR1560173 1 0.3551 0.848 0.868 0.132 0.000
#> SRR1560174 2 0.0237 0.785 0.000 0.996 0.004
#> SRR1560175 2 0.3412 0.645 0.124 0.876 0.000
#> SRR1560176 1 0.6126 0.574 0.600 0.400 0.000
#> SRR1560177 2 0.6008 0.540 0.000 0.628 0.372
#> SRR1560178 3 0.9651 -0.162 0.208 0.396 0.396
#> SRR1560179 2 0.2261 0.828 0.000 0.932 0.068
#> SRR1560180 1 0.2384 0.861 0.936 0.056 0.008
#> SRR1560181 3 0.5465 0.597 0.000 0.288 0.712
#> SRR1560182 2 0.5254 0.701 0.000 0.736 0.264
#> SRR1560183 2 0.6180 0.411 0.000 0.584 0.416
#> SRR1560184 3 0.0237 0.876 0.004 0.000 0.996
#> SRR1560185 3 0.0237 0.876 0.004 0.000 0.996
#> SRR1560186 3 0.0237 0.880 0.000 0.004 0.996
#> SRR1560187 2 0.6225 0.356 0.000 0.568 0.432
#> SRR1560188 2 0.2796 0.832 0.000 0.908 0.092
#> SRR1560189 2 0.2356 0.830 0.000 0.928 0.072
#> SRR1560190 2 0.1163 0.753 0.028 0.972 0.000
#> SRR1560191 2 0.2625 0.832 0.000 0.916 0.084
#> SRR1560192 1 0.0424 0.873 0.992 0.000 0.008
#> SRR1560193 2 0.2448 0.831 0.000 0.924 0.076
#> SRR1560194 3 0.4291 0.775 0.000 0.180 0.820
#> SRR1560195 3 0.0424 0.874 0.008 0.000 0.992
#> SRR1560196 3 0.1163 0.857 0.028 0.000 0.972
#> SRR1560197 3 0.1529 0.887 0.000 0.040 0.960
#> SRR1560198 3 0.1643 0.887 0.000 0.044 0.956
#> SRR1560200 3 0.7416 0.505 0.068 0.276 0.656
#> SRR1560199 3 0.3482 0.842 0.000 0.128 0.872
#> SRR1560201 2 0.3038 0.666 0.104 0.896 0.000
#> SRR1560202 3 0.2959 0.869 0.000 0.100 0.900
#> SRR1560203 3 0.2796 0.874 0.000 0.092 0.908
#> SRR1560204 3 0.3267 0.858 0.000 0.116 0.884
#> SRR1560205 3 0.0237 0.876 0.004 0.000 0.996
#> SRR1560206 2 0.2711 0.832 0.000 0.912 0.088
#> SRR1560207 1 0.5905 0.655 0.648 0.352 0.000
#> SRR1560208 2 0.4413 0.819 0.024 0.852 0.124
#> SRR1560209 2 0.5859 0.589 0.000 0.656 0.344
#> SRR1560210 3 0.0000 0.878 0.000 0.000 1.000
#> SRR1560211 3 0.3192 0.861 0.000 0.112 0.888
#> SRR1560212 3 0.3276 0.859 0.068 0.024 0.908
#> SRR1560213 2 0.2625 0.832 0.000 0.916 0.084
#> SRR1560214 3 0.3038 0.868 0.000 0.104 0.896
#> SRR1560215 2 0.6168 0.432 0.000 0.588 0.412
#> SRR1560216 3 0.2537 0.879 0.000 0.080 0.920
#> SRR1560217 3 0.5178 0.663 0.000 0.256 0.744
#> SRR1560218 3 0.1411 0.887 0.000 0.036 0.964
#> SRR1560219 3 0.1964 0.885 0.000 0.056 0.944
#> SRR1560220 3 0.0424 0.882 0.000 0.008 0.992
#> SRR1560221 3 0.1647 0.888 0.004 0.036 0.960
#> SRR1560222 2 0.3482 0.822 0.000 0.872 0.128
#> SRR1560223 2 0.2356 0.830 0.000 0.928 0.072
#> SRR1560224 3 0.3038 0.867 0.000 0.104 0.896
#> SRR1560225 2 0.1643 0.735 0.044 0.956 0.000
#> SRR1560226 3 0.6276 0.694 0.224 0.040 0.736
#> SRR1560227 3 0.6410 0.779 0.144 0.092 0.764
#> SRR1560228 1 0.5760 0.692 0.672 0.328 0.000
#> SRR1560229 2 0.6168 0.436 0.000 0.588 0.412
#> SRR1560230 3 0.1163 0.886 0.000 0.028 0.972
#> SRR1560231 3 0.0892 0.870 0.020 0.000 0.980
#> SRR1560232 1 0.1163 0.867 0.972 0.000 0.028
#> SRR1560233 3 0.2165 0.884 0.000 0.064 0.936
#> SRR1560234 2 0.5891 0.781 0.052 0.780 0.168
#> SRR1560235 2 0.0237 0.785 0.000 0.996 0.004
#> SRR1560236 2 0.0000 0.781 0.000 1.000 0.000
#> SRR1560237 2 0.3267 0.827 0.000 0.884 0.116
#> SRR1560238 2 0.4974 0.732 0.000 0.764 0.236
#> SRR1560239 2 0.3752 0.818 0.000 0.856 0.144
#> SRR1560240 3 0.1031 0.887 0.000 0.024 0.976
#> SRR1560241 2 0.3112 0.831 0.004 0.900 0.096
#> SRR1560242 2 0.6045 0.512 0.000 0.620 0.380
#> SRR1560243 2 0.1860 0.820 0.000 0.948 0.052
#> SRR1560244 2 0.2261 0.828 0.000 0.932 0.068
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR1560164 1 0.4959 0.7439 0.744 0.016 0.224 0.016
#> SRR1560165 1 0.4113 0.8491 0.828 0.040 0.128 0.004
#> SRR1560166 2 0.1004 0.8712 0.000 0.972 0.024 0.004
#> SRR1560167 1 0.1637 0.8854 0.940 0.000 0.060 0.000
#> SRR1560168 4 0.3569 0.6628 0.000 0.196 0.000 0.804
#> SRR1560169 1 0.1637 0.8854 0.940 0.000 0.060 0.000
#> SRR1560170 2 0.2032 0.8749 0.000 0.936 0.028 0.036
#> SRR1560171 2 0.1297 0.8699 0.020 0.964 0.016 0.000
#> SRR1560172 2 0.1909 0.8659 0.008 0.940 0.048 0.004
#> SRR1560173 1 0.1739 0.8849 0.952 0.024 0.016 0.008
#> SRR1560174 2 0.0524 0.8701 0.008 0.988 0.000 0.004
#> SRR1560175 2 0.3182 0.8511 0.032 0.892 0.064 0.012
#> SRR1560176 1 0.2198 0.8728 0.920 0.072 0.008 0.000
#> SRR1560177 2 0.4158 0.7230 0.000 0.768 0.224 0.008
#> SRR1560178 3 0.2989 0.7418 0.012 0.100 0.884 0.004
#> SRR1560179 2 0.1109 0.8748 0.000 0.968 0.004 0.028
#> SRR1560180 3 0.5378 0.5064 0.264 0.036 0.696 0.004
#> SRR1560181 2 0.5587 0.4342 0.000 0.600 0.028 0.372
#> SRR1560182 2 0.3099 0.8542 0.000 0.876 0.020 0.104
#> SRR1560183 4 0.4008 0.6154 0.000 0.244 0.000 0.756
#> SRR1560184 3 0.2814 0.7625 0.000 0.000 0.868 0.132
#> SRR1560185 3 0.2868 0.7613 0.000 0.000 0.864 0.136
#> SRR1560186 4 0.4761 0.3075 0.000 0.000 0.372 0.628
#> SRR1560187 4 0.2380 0.7228 0.008 0.064 0.008 0.920
#> SRR1560188 2 0.2973 0.8545 0.000 0.884 0.020 0.096
#> SRR1560189 2 0.2402 0.8638 0.000 0.912 0.012 0.076
#> SRR1560190 2 0.0992 0.8705 0.012 0.976 0.008 0.004
#> SRR1560191 2 0.4741 0.5564 0.000 0.668 0.004 0.328
#> SRR1560192 1 0.2149 0.8796 0.912 0.000 0.088 0.000
#> SRR1560193 2 0.1867 0.8695 0.000 0.928 0.000 0.072
#> SRR1560194 3 0.3324 0.7322 0.000 0.136 0.852 0.012
#> SRR1560195 3 0.1978 0.7728 0.004 0.000 0.928 0.068
#> SRR1560196 3 0.1743 0.7717 0.004 0.000 0.940 0.056
#> SRR1560197 3 0.3626 0.7318 0.000 0.004 0.812 0.184
#> SRR1560198 3 0.4283 0.6457 0.000 0.004 0.740 0.256
#> SRR1560200 3 0.7493 0.6479 0.072 0.108 0.628 0.192
#> SRR1560199 3 0.4624 0.6992 0.000 0.164 0.784 0.052
#> SRR1560201 2 0.3280 0.8099 0.124 0.860 0.016 0.000
#> SRR1560202 4 0.1798 0.7296 0.000 0.016 0.040 0.944
#> SRR1560203 4 0.0779 0.7322 0.000 0.004 0.016 0.980
#> SRR1560204 4 0.0804 0.7336 0.000 0.012 0.008 0.980
#> SRR1560205 3 0.3088 0.7581 0.008 0.000 0.864 0.128
#> SRR1560206 2 0.4406 0.7671 0.028 0.780 0.000 0.192
#> SRR1560207 1 0.2245 0.8836 0.932 0.040 0.020 0.008
#> SRR1560208 2 0.3450 0.8033 0.000 0.836 0.156 0.008
#> SRR1560209 2 0.5036 0.6393 0.000 0.696 0.024 0.280
#> SRR1560210 4 0.4996 -0.0509 0.000 0.000 0.484 0.516
#> SRR1560211 3 0.7193 0.3299 0.000 0.340 0.508 0.152
#> SRR1560212 3 0.2782 0.7773 0.004 0.024 0.904 0.068
#> SRR1560213 2 0.2480 0.8622 0.000 0.904 0.008 0.088
#> SRR1560214 4 0.0804 0.7333 0.000 0.012 0.008 0.980
#> SRR1560215 4 0.4533 0.6116 0.012 0.232 0.004 0.752
#> SRR1560216 4 0.0524 0.7319 0.000 0.004 0.008 0.988
#> SRR1560217 4 0.0779 0.7321 0.004 0.016 0.000 0.980
#> SRR1560218 4 0.4509 0.4922 0.000 0.004 0.288 0.708
#> SRR1560219 4 0.5673 0.0872 0.000 0.024 0.448 0.528
#> SRR1560220 4 0.4250 0.4719 0.000 0.000 0.276 0.724
#> SRR1560221 3 0.5112 0.4573 0.008 0.000 0.608 0.384
#> SRR1560222 2 0.3335 0.8392 0.000 0.856 0.016 0.128
#> SRR1560223 2 0.2602 0.8687 0.008 0.908 0.008 0.076
#> SRR1560224 4 0.0895 0.7321 0.000 0.004 0.020 0.976
#> SRR1560225 2 0.1396 0.8660 0.032 0.960 0.004 0.004
#> SRR1560226 4 0.7904 0.3462 0.284 0.040 0.140 0.536
#> SRR1560227 4 0.6237 0.6183 0.056 0.096 0.116 0.732
#> SRR1560228 1 0.4054 0.7579 0.796 0.188 0.016 0.000
#> SRR1560229 2 0.5623 0.6128 0.000 0.660 0.048 0.292
#> SRR1560230 4 0.2011 0.7051 0.000 0.000 0.080 0.920
#> SRR1560231 3 0.1843 0.7688 0.016 0.008 0.948 0.028
#> SRR1560232 3 0.4898 0.0780 0.416 0.000 0.584 0.000
#> SRR1560233 3 0.4591 0.7340 0.000 0.116 0.800 0.084
#> SRR1560234 2 0.5889 0.5273 0.008 0.640 0.312 0.040
#> SRR1560235 2 0.1256 0.8702 0.008 0.964 0.000 0.028
#> SRR1560236 2 0.1082 0.8712 0.004 0.972 0.004 0.020
#> SRR1560237 2 0.2596 0.8628 0.000 0.908 0.068 0.024
#> SRR1560238 4 0.5231 0.2967 0.000 0.384 0.012 0.604
#> SRR1560239 2 0.2412 0.8593 0.000 0.908 0.084 0.008
#> SRR1560240 3 0.4072 0.6770 0.000 0.000 0.748 0.252
#> SRR1560241 2 0.3944 0.8446 0.004 0.848 0.068 0.080
#> SRR1560242 4 0.4193 0.5757 0.000 0.268 0.000 0.732
#> SRR1560243 2 0.2489 0.8691 0.020 0.912 0.000 0.068
#> SRR1560244 2 0.2189 0.8718 0.004 0.932 0.044 0.020
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR1560164 1 0.5999 0.56265 0.660 0.088 0.208 0.004 0.040
#> SRR1560165 1 0.6117 0.59396 0.672 0.124 0.148 0.004 0.052
#> SRR1560166 5 0.0912 0.77015 0.000 0.012 0.016 0.000 0.972
#> SRR1560167 1 0.0771 0.71122 0.976 0.004 0.020 0.000 0.000
#> SRR1560168 5 0.5566 0.43837 0.000 0.064 0.008 0.344 0.584
#> SRR1560169 1 0.0510 0.71083 0.984 0.000 0.016 0.000 0.000
#> SRR1560170 5 0.3064 0.75711 0.000 0.052 0.024 0.044 0.880
#> SRR1560171 5 0.2629 0.74394 0.004 0.104 0.012 0.000 0.880
#> SRR1560172 5 0.5668 -0.00301 0.000 0.416 0.080 0.000 0.504
#> SRR1560173 1 0.4640 0.29663 0.584 0.400 0.000 0.000 0.016
#> SRR1560174 5 0.1990 0.76001 0.008 0.068 0.004 0.000 0.920
#> SRR1560175 2 0.5919 0.48891 0.004 0.600 0.140 0.000 0.256
#> SRR1560176 1 0.2632 0.69091 0.888 0.072 0.000 0.000 0.040
#> SRR1560177 5 0.4073 0.61026 0.000 0.032 0.216 0.000 0.752
#> SRR1560178 3 0.2959 0.62561 0.000 0.100 0.864 0.000 0.036
#> SRR1560179 5 0.1710 0.76838 0.000 0.040 0.004 0.016 0.940
#> SRR1560180 3 0.6490 0.33599 0.168 0.284 0.536 0.000 0.012
#> SRR1560181 5 0.4583 0.70595 0.000 0.084 0.020 0.120 0.776
#> SRR1560182 5 0.3394 0.74341 0.000 0.028 0.012 0.116 0.844
#> SRR1560183 4 0.5684 -0.18308 0.008 0.040 0.008 0.472 0.472
#> SRR1560184 3 0.3766 0.64576 0.012 0.104 0.828 0.056 0.000
#> SRR1560185 3 0.4140 0.63785 0.012 0.124 0.800 0.064 0.000
#> SRR1560186 3 0.5556 0.19276 0.000 0.068 0.476 0.456 0.000
#> SRR1560187 4 0.2228 0.69488 0.012 0.076 0.000 0.908 0.004
#> SRR1560188 5 0.1588 0.77133 0.000 0.028 0.008 0.016 0.948
#> SRR1560189 5 0.1377 0.77098 0.000 0.020 0.004 0.020 0.956
#> SRR1560190 5 0.1205 0.76691 0.000 0.040 0.004 0.000 0.956
#> SRR1560191 5 0.3968 0.70897 0.004 0.036 0.004 0.160 0.796
#> SRR1560192 1 0.0963 0.71088 0.964 0.000 0.036 0.000 0.000
#> SRR1560193 5 0.3983 0.72625 0.000 0.088 0.008 0.092 0.812
#> SRR1560194 3 0.3857 0.60762 0.000 0.084 0.808 0.000 0.108
#> SRR1560195 3 0.1949 0.65417 0.012 0.040 0.932 0.016 0.000
#> SRR1560196 3 0.1836 0.65215 0.016 0.040 0.936 0.008 0.000
#> SRR1560197 3 0.3872 0.65046 0.008 0.060 0.816 0.116 0.000
#> SRR1560198 3 0.4271 0.62794 0.000 0.068 0.784 0.140 0.008
#> SRR1560200 3 0.6563 0.54767 0.056 0.160 0.636 0.140 0.008
#> SRR1560199 3 0.3942 0.63243 0.000 0.064 0.828 0.028 0.080
#> SRR1560201 5 0.5557 0.44347 0.116 0.260 0.000 0.000 0.624
#> SRR1560202 4 0.6309 0.44404 0.000 0.168 0.112 0.648 0.072
#> SRR1560203 4 0.0162 0.70191 0.000 0.004 0.000 0.996 0.000
#> SRR1560204 4 0.0000 0.70248 0.000 0.000 0.000 1.000 0.000
#> SRR1560205 3 0.4756 0.61629 0.040 0.164 0.756 0.040 0.000
#> SRR1560206 2 0.6384 0.24445 0.000 0.444 0.000 0.388 0.168
#> SRR1560207 2 0.4717 -0.07998 0.396 0.584 0.000 0.000 0.020
#> SRR1560208 5 0.3639 0.66137 0.000 0.024 0.184 0.000 0.792
#> SRR1560209 2 0.6692 0.26442 0.000 0.448 0.012 0.376 0.164
#> SRR1560210 3 0.5233 0.50590 0.000 0.076 0.636 0.288 0.000
#> SRR1560211 3 0.7007 0.22583 0.000 0.116 0.464 0.052 0.368
#> SRR1560212 3 0.3642 0.61466 0.008 0.128 0.832 0.012 0.020
#> SRR1560213 5 0.2369 0.76247 0.000 0.032 0.004 0.056 0.908
#> SRR1560214 4 0.2424 0.67143 0.000 0.132 0.000 0.868 0.000
#> SRR1560215 4 0.3949 0.45561 0.000 0.300 0.000 0.696 0.004
#> SRR1560216 4 0.1544 0.70144 0.000 0.068 0.000 0.932 0.000
#> SRR1560217 4 0.2329 0.67730 0.000 0.124 0.000 0.876 0.000
#> SRR1560218 3 0.7234 0.10125 0.000 0.212 0.380 0.380 0.028
#> SRR1560219 3 0.8132 0.17572 0.000 0.192 0.380 0.128 0.300
#> SRR1560220 4 0.4709 0.50935 0.004 0.068 0.200 0.728 0.000
#> SRR1560221 3 0.6788 0.28483 0.008 0.208 0.444 0.340 0.000
#> SRR1560222 5 0.4920 0.66291 0.012 0.168 0.012 0.060 0.748
#> SRR1560223 5 0.4289 0.71300 0.012 0.108 0.008 0.068 0.804
#> SRR1560224 4 0.3667 0.60192 0.000 0.156 0.020 0.812 0.012
#> SRR1560225 5 0.1251 0.76786 0.008 0.036 0.000 0.000 0.956
#> SRR1560226 1 0.9464 0.13904 0.296 0.204 0.200 0.236 0.064
#> SRR1560227 5 0.9823 -0.25738 0.180 0.248 0.168 0.140 0.264
#> SRR1560228 1 0.4124 0.62016 0.796 0.052 0.012 0.000 0.140
#> SRR1560229 4 0.5575 0.21685 0.000 0.344 0.028 0.592 0.036
#> SRR1560230 4 0.1992 0.67873 0.000 0.032 0.044 0.924 0.000
#> SRR1560231 3 0.2589 0.63945 0.020 0.076 0.896 0.004 0.004
#> SRR1560232 3 0.6262 0.26085 0.304 0.176 0.520 0.000 0.000
#> SRR1560233 3 0.4337 0.61162 0.000 0.040 0.796 0.040 0.124
#> SRR1560234 3 0.6028 0.37248 0.008 0.192 0.612 0.000 0.188
#> SRR1560235 5 0.0771 0.76956 0.004 0.020 0.000 0.000 0.976
#> SRR1560236 5 0.0671 0.76965 0.004 0.016 0.000 0.000 0.980
#> SRR1560237 5 0.5359 0.56214 0.000 0.188 0.108 0.012 0.692
#> SRR1560238 5 0.5073 0.63074 0.000 0.088 0.008 0.196 0.708
#> SRR1560239 5 0.2325 0.75605 0.000 0.028 0.068 0.000 0.904
#> SRR1560240 3 0.6633 0.32267 0.000 0.268 0.488 0.240 0.004
#> SRR1560241 2 0.6983 0.50396 0.004 0.572 0.164 0.056 0.204
#> SRR1560242 5 0.5815 0.55001 0.008 0.108 0.008 0.228 0.648
#> SRR1560243 5 0.3084 0.75765 0.016 0.036 0.004 0.064 0.880
#> SRR1560244 5 0.4646 0.60865 0.004 0.204 0.052 0.004 0.736
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR1560164 1 0.7465 0.18266 0.404 0.088 0.136 0.000 0.036 0.336
#> SRR1560165 6 0.7865 -0.37092 0.336 0.108 0.124 0.004 0.052 0.376
#> SRR1560166 5 0.1334 0.71389 0.000 0.020 0.000 0.000 0.948 0.032
#> SRR1560167 1 0.0146 0.74962 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR1560168 5 0.5969 0.29580 0.000 0.012 0.004 0.360 0.484 0.140
#> SRR1560169 1 0.0146 0.74962 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR1560170 5 0.3342 0.67512 0.000 0.084 0.036 0.012 0.848 0.020
#> SRR1560171 5 0.3368 0.58010 0.000 0.232 0.000 0.000 0.756 0.012
#> SRR1560172 2 0.5779 0.18652 0.000 0.488 0.060 0.004 0.408 0.040
#> SRR1560173 2 0.3923 -0.01974 0.416 0.580 0.000 0.000 0.004 0.000
#> SRR1560174 5 0.2553 0.65767 0.000 0.144 0.000 0.000 0.848 0.008
#> SRR1560175 2 0.5925 0.48222 0.000 0.612 0.136 0.004 0.200 0.048
#> SRR1560176 1 0.5146 0.58019 0.680 0.128 0.000 0.000 0.028 0.164
#> SRR1560177 5 0.4964 0.59798 0.000 0.028 0.156 0.000 0.700 0.116
#> SRR1560178 3 0.3000 0.58242 0.000 0.064 0.864 0.000 0.048 0.024
#> SRR1560179 5 0.2488 0.71632 0.000 0.036 0.004 0.024 0.900 0.036
#> SRR1560180 3 0.6477 0.06040 0.120 0.400 0.424 0.000 0.004 0.052
#> SRR1560181 5 0.5161 0.55873 0.000 0.008 0.012 0.076 0.640 0.264
#> SRR1560182 5 0.4297 0.70086 0.000 0.024 0.020 0.072 0.788 0.096
#> SRR1560183 4 0.6211 0.20849 0.000 0.012 0.008 0.512 0.216 0.252
#> SRR1560184 3 0.3184 0.50965 0.004 0.012 0.824 0.012 0.000 0.148
#> SRR1560185 3 0.3746 0.46133 0.004 0.012 0.764 0.016 0.000 0.204
#> SRR1560186 3 0.5529 0.25321 0.000 0.020 0.544 0.348 0.000 0.088
#> SRR1560187 4 0.2271 0.70830 0.004 0.056 0.000 0.904 0.004 0.032
#> SRR1560188 5 0.2662 0.70180 0.000 0.012 0.004 0.008 0.868 0.108
#> SRR1560189 5 0.2611 0.70642 0.000 0.016 0.004 0.008 0.876 0.096
#> SRR1560190 5 0.1152 0.70594 0.000 0.044 0.000 0.000 0.952 0.004
#> SRR1560191 5 0.5270 0.58643 0.000 0.048 0.004 0.216 0.668 0.064
#> SRR1560192 1 0.0603 0.74684 0.980 0.004 0.016 0.000 0.000 0.000
#> SRR1560193 5 0.4618 0.58171 0.000 0.084 0.004 0.192 0.712 0.008
#> SRR1560194 3 0.3821 0.55885 0.000 0.032 0.808 0.000 0.092 0.068
#> SRR1560195 3 0.3047 0.51504 0.008 0.012 0.832 0.004 0.000 0.144
#> SRR1560196 3 0.2531 0.52566 0.008 0.004 0.860 0.000 0.000 0.128
#> SRR1560197 3 0.4626 0.48242 0.000 0.020 0.712 0.072 0.000 0.196
#> SRR1560198 3 0.5906 0.49830 0.000 0.064 0.648 0.104 0.016 0.168
#> SRR1560200 3 0.6953 0.46234 0.036 0.148 0.576 0.108 0.004 0.128
#> SRR1560199 3 0.4232 0.55993 0.000 0.040 0.776 0.000 0.068 0.116
#> SRR1560201 5 0.6702 0.29938 0.136 0.256 0.000 0.000 0.504 0.104
#> SRR1560202 4 0.6912 0.05417 0.000 0.016 0.040 0.444 0.200 0.300
#> SRR1560203 4 0.1261 0.70433 0.000 0.004 0.004 0.956 0.008 0.028
#> SRR1560204 4 0.1036 0.70598 0.000 0.004 0.000 0.964 0.008 0.024
#> SRR1560205 3 0.4973 0.34092 0.028 0.024 0.652 0.016 0.000 0.280
#> SRR1560206 4 0.4976 0.44436 0.000 0.324 0.000 0.596 0.076 0.004
#> SRR1560207 2 0.4085 0.25875 0.256 0.712 0.000 0.016 0.012 0.004
#> SRR1560208 5 0.4348 0.55366 0.000 0.028 0.200 0.000 0.732 0.040
#> SRR1560209 2 0.5886 0.29605 0.000 0.572 0.028 0.272 0.124 0.004
#> SRR1560210 3 0.5048 0.43487 0.000 0.016 0.672 0.120 0.000 0.192
#> SRR1560211 3 0.6313 -0.00659 0.000 0.016 0.476 0.004 0.288 0.216
#> SRR1560212 3 0.3787 0.57524 0.004 0.132 0.808 0.008 0.020 0.028
#> SRR1560213 5 0.3861 0.65856 0.000 0.016 0.004 0.032 0.780 0.168
#> SRR1560214 4 0.2101 0.70941 0.000 0.100 0.000 0.892 0.004 0.004
#> SRR1560215 4 0.3441 0.63601 0.000 0.216 0.004 0.768 0.008 0.004
#> SRR1560216 4 0.1405 0.71311 0.000 0.024 0.000 0.948 0.004 0.024
#> SRR1560217 4 0.1787 0.71490 0.000 0.068 0.000 0.920 0.004 0.008
#> SRR1560218 6 0.7093 0.15433 0.000 0.024 0.332 0.212 0.036 0.396
#> SRR1560219 6 0.7638 0.15992 0.000 0.028 0.240 0.076 0.308 0.348
#> SRR1560220 4 0.5178 0.40277 0.000 0.064 0.244 0.652 0.000 0.040
#> SRR1560221 3 0.6658 0.20706 0.012 0.288 0.412 0.276 0.004 0.008
#> SRR1560222 5 0.5106 0.44427 0.000 0.036 0.012 0.012 0.568 0.372
#> SRR1560223 5 0.5089 0.45694 0.004 0.040 0.008 0.008 0.580 0.360
#> SRR1560224 4 0.4593 0.54908 0.000 0.052 0.008 0.708 0.012 0.220
#> SRR1560225 5 0.2867 0.68248 0.000 0.112 0.000 0.000 0.848 0.040
#> SRR1560226 6 0.8270 0.31779 0.080 0.092 0.220 0.132 0.028 0.448
#> SRR1560227 6 0.8446 0.34269 0.040 0.100 0.188 0.088 0.132 0.452
#> SRR1560228 1 0.4557 0.62812 0.756 0.060 0.000 0.000 0.108 0.076
#> SRR1560229 4 0.5279 0.57056 0.000 0.172 0.020 0.700 0.052 0.056
#> SRR1560230 4 0.5210 0.51897 0.000 0.048 0.084 0.692 0.004 0.172
#> SRR1560231 3 0.3275 0.56269 0.008 0.044 0.828 0.000 0.000 0.120
#> SRR1560232 3 0.6649 0.19042 0.332 0.136 0.456 0.000 0.000 0.076
#> SRR1560233 3 0.3623 0.55478 0.000 0.012 0.812 0.000 0.096 0.080
#> SRR1560234 3 0.6194 0.27838 0.004 0.284 0.540 0.004 0.140 0.028
#> SRR1560235 5 0.1882 0.70392 0.000 0.060 0.000 0.008 0.920 0.012
#> SRR1560236 5 0.1464 0.71394 0.000 0.016 0.000 0.004 0.944 0.036
#> SRR1560237 5 0.5349 0.28198 0.000 0.308 0.076 0.000 0.592 0.024
#> SRR1560238 5 0.5700 0.51337 0.000 0.032 0.000 0.204 0.612 0.152
#> SRR1560239 5 0.2782 0.68513 0.000 0.024 0.068 0.000 0.876 0.032
#> SRR1560240 3 0.7742 0.10625 0.000 0.148 0.340 0.296 0.012 0.204
#> SRR1560241 2 0.8148 0.22501 0.000 0.388 0.240 0.064 0.136 0.172
#> SRR1560242 5 0.6661 0.26281 0.008 0.012 0.012 0.200 0.440 0.328
#> SRR1560243 5 0.4173 0.65674 0.000 0.032 0.004 0.032 0.764 0.168
#> SRR1560244 5 0.5131 0.51287 0.000 0.212 0.044 0.004 0.680 0.060
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