Date: 2019-12-25 20:37:37 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 3925 rows and 101 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, anno = anno)
Dimension of the input matrix:
mat = get_matrix(res_list)
dim(mat)
#> [1] 3925 101
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, top_annotation = HeatmapAnnotation(df = get_anno(res_list),
col = get_anno_col(res_list)), ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
mc.cores = 4)
Folowing table shows the best k
(number of partitions) for each combination
of top-value methods and partition methods. Clicking on the method name in
the table goes to the section for a single combination of methods.
The cola vignette explains the definition of the metrics used for determining the best number of partitions.
suggest_best_k(res_list)
The best k | 1-PAC | Mean silhouette | Concordance | Optional k | ||
---|---|---|---|---|---|---|
SD:kmeans | 2 | 1.000 | 0.985 | 0.987 | ** | |
SD:NMF | 3 | 1.000 | 0.997 | 0.998 | ** | 2 |
MAD:kmeans | 2 | 1.000 | 0.986 | 0.988 | ** | |
MAD:NMF | 3 | 1.000 | 0.996 | 0.998 | ** | 2 |
ATC:kmeans | 2 | 1.000 | 0.998 | 0.998 | ** | |
ATC:NMF | 3 | 1.000 | 0.973 | 0.989 | ** | 2 |
CV:pam | 5 | 0.964 | 0.914 | 0.965 | ** | 3,4 |
ATC:pam | 6 | 0.963 | 0.915 | 0.962 | ** | 4,5 |
MAD:hclust | 3 | 0.961 | 0.934 | 0.965 | ** | 2 |
CV:hclust | 3 | 0.952 | 0.910 | 0.960 | ** | 2 |
MAD:pam | 5 | 0.951 | 0.928 | 0.969 | ** | 3,4 |
CV:mclust | 5 | 0.943 | 0.909 | 0.955 | * | 2,3 |
MAD:mclust | 6 | 0.941 | 0.860 | 0.938 | * | 2,5 |
SD:skmeans | 5 | 0.939 | 0.932 | 0.952 | * | 2,3,4 |
SD:pam | 5 | 0.939 | 0.933 | 0.970 | * | 3,4 |
ATC:mclust | 6 | 0.936 | 0.910 | 0.922 | * | 4 |
ATC:skmeans | 6 | 0.929 | 0.902 | 0.909 | * | 2,3,4,5 |
MAD:skmeans | 6 | 0.923 | 0.833 | 0.889 | * | 2,3,4,5 |
CV:skmeans | 6 | 0.916 | 0.810 | 0.890 | * | 2,3,4,5 |
SD:hclust | 3 | 0.914 | 0.918 | 0.961 | * | 2 |
SD:mclust | 6 | 0.912 | 0.813 | 0.907 | * | 2,3,5 |
CV:NMF | 4 | 0.905 | 0.909 | 0.946 | * | 2,3 |
ATC:hclust | 2 | 0.853 | 0.978 | 0.987 | ||
CV:kmeans | 4 | 0.846 | 0.960 | 0.904 |
**: 1-PAC > 0.95, *: 1-PAC > 0.9
Cumulative distribution function curves of consensus matrix for all methods.
collect_plots(res_list, fun = plot_ecdf)
Consensus heatmaps for all methods. (What is a consensus heatmap?)
collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)
Membership heatmaps for all methods. (What is a membership heatmap?)
collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)
Signature heatmaps for all methods. (What is a signature heatmap?)
Note in following heatmaps, rows are scaled.
collect_plots(res_list, k = 2, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)
The statistics used for measuring the stability of consensus partitioning. (How are they defined?)
get_stats(res_list, k = 2)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 2 1.000 0.999 0.999 0.505 0.495 0.495
#> CV:NMF 2 1.000 1.000 1.000 0.505 0.495 0.495
#> MAD:NMF 2 1.000 1.000 1.000 0.505 0.495 0.495
#> ATC:NMF 2 1.000 0.989 0.996 0.505 0.495 0.495
#> SD:skmeans 2 1.000 1.000 1.000 0.505 0.495 0.495
#> CV:skmeans 2 1.000 1.000 1.000 0.505 0.495 0.495
#> MAD:skmeans 2 1.000 1.000 1.000 0.505 0.495 0.495
#> ATC:skmeans 2 1.000 1.000 1.000 0.505 0.495 0.495
#> SD:mclust 2 1.000 0.989 0.987 0.500 0.495 0.495
#> CV:mclust 2 1.000 0.990 0.988 0.499 0.495 0.495
#> MAD:mclust 2 1.000 0.988 0.985 0.497 0.495 0.495
#> ATC:mclust 2 0.558 0.842 0.874 0.447 0.495 0.495
#> SD:kmeans 2 1.000 0.985 0.987 0.505 0.495 0.495
#> CV:kmeans 2 0.778 0.955 0.957 0.498 0.495 0.495
#> MAD:kmeans 2 1.000 0.986 0.988 0.505 0.495 0.495
#> ATC:kmeans 2 1.000 0.998 0.998 0.505 0.495 0.495
#> SD:pam 2 0.671 0.879 0.941 0.448 0.563 0.563
#> CV:pam 2 0.661 0.890 0.946 0.428 0.578 0.578
#> MAD:pam 2 0.626 0.825 0.903 0.471 0.495 0.495
#> ATC:pam 2 0.681 0.797 0.921 0.476 0.526 0.526
#> SD:hclust 2 1.000 0.991 0.994 0.503 0.495 0.495
#> CV:hclust 2 1.000 0.993 0.994 0.503 0.495 0.495
#> MAD:hclust 2 1.000 0.994 0.996 0.504 0.495 0.495
#> ATC:hclust 2 0.853 0.978 0.987 0.502 0.495 0.495
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 1.000 0.997 0.998 0.252 0.873 0.744
#> CV:NMF 3 1.000 0.996 0.998 0.252 0.873 0.744
#> MAD:NMF 3 1.000 0.996 0.998 0.252 0.873 0.744
#> ATC:NMF 3 1.000 0.973 0.989 0.251 0.871 0.740
#> SD:skmeans 3 1.000 0.999 0.998 0.251 0.873 0.744
#> CV:skmeans 3 1.000 0.999 0.998 0.251 0.873 0.744
#> MAD:skmeans 3 1.000 1.000 1.000 0.251 0.873 0.744
#> ATC:skmeans 3 1.000 0.978 0.985 0.255 0.871 0.740
#> SD:mclust 3 1.000 0.981 0.987 0.264 0.873 0.744
#> CV:mclust 3 1.000 0.989 0.993 0.266 0.873 0.744
#> MAD:mclust 3 0.818 0.957 0.968 0.267 0.873 0.744
#> ATC:mclust 3 0.715 0.857 0.900 0.365 0.598 0.381
#> SD:kmeans 3 0.750 0.913 0.837 0.246 0.873 0.744
#> CV:kmeans 3 0.750 0.935 0.876 0.263 0.873 0.744
#> MAD:kmeans 3 0.746 0.929 0.863 0.245 0.873 0.744
#> ATC:kmeans 3 0.744 0.871 0.772 0.243 0.873 0.744
#> SD:pam 3 1.000 0.986 0.994 0.412 0.711 0.526
#> CV:pam 3 1.000 0.983 0.993 0.478 0.703 0.523
#> MAD:pam 3 1.000 0.982 0.993 0.344 0.873 0.744
#> ATC:pam 3 0.761 0.953 0.939 0.324 0.743 0.554
#> SD:hclust 3 0.914 0.918 0.961 0.263 0.869 0.736
#> CV:hclust 3 0.952 0.910 0.960 0.263 0.869 0.736
#> MAD:hclust 3 0.961 0.934 0.965 0.260 0.873 0.744
#> ATC:hclust 3 0.741 0.502 0.769 0.266 0.886 0.770
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.880 0.904 0.941 0.1084 0.909 0.759
#> CV:NMF 4 0.905 0.909 0.946 0.1074 0.909 0.759
#> MAD:NMF 4 0.886 0.910 0.947 0.1086 0.909 0.759
#> ATC:NMF 4 0.809 0.831 0.907 0.1032 0.939 0.835
#> SD:skmeans 4 1.000 0.983 0.988 0.1858 0.881 0.678
#> CV:skmeans 4 1.000 0.996 0.996 0.1871 0.881 0.678
#> MAD:skmeans 4 1.000 0.986 0.986 0.1848 0.881 0.678
#> ATC:skmeans 4 0.990 0.969 0.971 0.1787 0.881 0.676
#> SD:mclust 4 0.807 0.844 0.874 0.0843 0.974 0.931
#> CV:mclust 4 0.831 0.853 0.901 0.0799 0.983 0.954
#> MAD:mclust 4 0.809 0.825 0.887 0.0917 0.983 0.954
#> ATC:mclust 4 0.970 0.933 0.954 0.2225 0.846 0.616
#> SD:kmeans 4 0.843 0.945 0.880 0.1407 0.882 0.679
#> CV:kmeans 4 0.846 0.960 0.904 0.1503 0.882 0.679
#> MAD:kmeans 4 0.770 0.935 0.878 0.1393 0.882 0.679
#> ATC:kmeans 4 0.664 0.885 0.816 0.1288 0.870 0.653
#> SD:pam 4 0.949 0.928 0.968 0.1875 0.881 0.678
#> CV:pam 4 0.987 0.938 0.975 0.1885 0.859 0.629
#> MAD:pam 4 0.974 0.943 0.974 0.1869 0.870 0.652
#> ATC:pam 4 0.978 0.951 0.975 0.1928 0.870 0.652
#> SD:hclust 4 0.964 0.936 0.962 0.0391 0.992 0.978
#> CV:hclust 4 0.826 0.862 0.921 0.0673 0.986 0.961
#> MAD:hclust 4 0.828 0.865 0.922 0.0694 0.983 0.953
#> ATC:hclust 4 0.867 0.886 0.932 0.0497 0.877 0.711
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.812 0.711 0.834 0.0672 0.891 0.651
#> CV:NMF 5 0.816 0.744 0.826 0.0710 0.887 0.638
#> MAD:NMF 5 0.814 0.487 0.799 0.0646 0.960 0.866
#> ATC:NMF 5 0.783 0.425 0.775 0.0646 0.966 0.894
#> SD:skmeans 5 0.939 0.932 0.952 0.0594 0.954 0.817
#> CV:skmeans 5 0.945 0.960 0.960 0.0584 0.952 0.810
#> MAD:skmeans 5 0.934 0.931 0.947 0.0606 0.943 0.776
#> ATC:skmeans 5 0.947 0.923 0.956 0.0423 0.979 0.915
#> SD:mclust 5 0.978 0.963 0.975 0.1653 0.811 0.486
#> CV:mclust 5 0.943 0.909 0.955 0.1651 0.827 0.529
#> MAD:mclust 5 0.988 0.955 0.973 0.1614 0.821 0.510
#> ATC:mclust 5 0.931 0.861 0.937 0.0426 0.990 0.962
#> SD:kmeans 5 0.803 0.866 0.855 0.0735 1.000 1.000
#> CV:kmeans 5 0.786 0.869 0.859 0.0577 1.000 1.000
#> MAD:kmeans 5 0.773 0.864 0.852 0.0661 1.000 1.000
#> ATC:kmeans 5 0.771 0.802 0.832 0.0735 0.970 0.886
#> SD:pam 5 0.939 0.933 0.970 0.0516 0.962 0.848
#> CV:pam 5 0.964 0.914 0.965 0.0487 0.946 0.791
#> MAD:pam 5 0.951 0.928 0.969 0.0536 0.954 0.819
#> ATC:pam 5 0.976 0.935 0.972 0.0512 0.961 0.842
#> SD:hclust 5 0.756 0.688 0.841 0.1328 0.892 0.698
#> CV:hclust 5 0.768 0.714 0.800 0.1066 0.881 0.662
#> MAD:hclust 5 0.786 0.723 0.865 0.1139 0.882 0.665
#> ATC:hclust 5 0.767 0.668 0.768 0.1009 0.954 0.871
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.736 0.724 0.812 0.0428 0.924 0.695
#> CV:NMF 6 0.756 0.811 0.825 0.0404 0.928 0.700
#> MAD:NMF 6 0.738 0.782 0.814 0.0399 0.872 0.580
#> ATC:NMF 6 0.744 0.498 0.759 0.0283 0.916 0.725
#> SD:skmeans 6 0.907 0.824 0.910 0.0287 0.992 0.962
#> CV:skmeans 6 0.916 0.810 0.890 0.0288 0.985 0.926
#> MAD:skmeans 6 0.923 0.833 0.889 0.0303 0.983 0.918
#> ATC:skmeans 6 0.929 0.902 0.909 0.0320 0.968 0.861
#> SD:mclust 6 0.912 0.813 0.907 0.0101 0.967 0.849
#> CV:mclust 6 0.911 0.870 0.930 0.0118 0.992 0.960
#> MAD:mclust 6 0.941 0.860 0.938 0.0109 0.987 0.937
#> ATC:mclust 6 0.936 0.910 0.922 0.0327 0.954 0.808
#> SD:kmeans 6 0.760 0.829 0.841 0.0386 0.936 0.744
#> CV:kmeans 6 0.845 0.810 0.819 0.0467 0.957 0.830
#> MAD:kmeans 6 0.737 0.779 0.818 0.0430 0.943 0.773
#> ATC:kmeans 6 0.853 0.787 0.818 0.0485 0.960 0.832
#> SD:pam 6 0.864 0.758 0.880 0.0347 0.995 0.979
#> CV:pam 6 0.856 0.811 0.890 0.0364 0.978 0.899
#> MAD:pam 6 0.873 0.776 0.883 0.0335 0.985 0.928
#> ATC:pam 6 0.963 0.915 0.962 0.0264 0.980 0.905
#> SD:hclust 6 0.750 0.659 0.794 0.0515 0.856 0.514
#> CV:hclust 6 0.747 0.738 0.853 0.0487 0.957 0.820
#> MAD:hclust 6 0.766 0.711 0.854 0.0386 0.967 0.858
#> ATC:hclust 6 0.803 0.817 0.872 0.0715 0.840 0.531
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 = 392, method = "euler")
top_rows_overlap(res_list, top_n = 784, method = "euler")
top_rows_overlap(res_list, top_n = 1177, method = "euler")
top_rows_overlap(res_list, top_n = 1570, method = "euler")
top_rows_overlap(res_list, top_n = 1962, method = "euler")
Also visualize the correspondance of rankings between different top-row methods:
top_rows_overlap(res_list, top_n = 392, method = "correspondance")
top_rows_overlap(res_list, top_n = 784, method = "correspondance")
top_rows_overlap(res_list, top_n = 1177, method = "correspondance")
top_rows_overlap(res_list, top_n = 1570, method = "correspondance")
top_rows_overlap(res_list, top_n = 1962, method = "correspondance")
Heatmaps of the top rows:
top_rows_heatmap(res_list, top_n = 392)
top_rows_heatmap(res_list, top_n = 784)
top_rows_heatmap(res_list, top_n = 1177)
top_rows_heatmap(res_list, top_n = 1570)
top_rows_heatmap(res_list, top_n = 1962)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res_list, k = 2)
#> n disease.state(p) k
#> SD:NMF 101 3.32e-01 2
#> CV:NMF 101 3.32e-01 2
#> MAD:NMF 101 3.32e-01 2
#> ATC:NMF 100 3.91e-01 2
#> SD:skmeans 101 3.32e-01 2
#> CV:skmeans 101 3.32e-01 2
#> MAD:skmeans 101 3.32e-01 2
#> ATC:skmeans 101 3.32e-01 2
#> SD:mclust 101 3.32e-01 2
#> CV:mclust 101 3.32e-01 2
#> MAD:mclust 101 3.32e-01 2
#> ATC:mclust 99 4.58e-01 2
#> SD:kmeans 101 3.32e-01 2
#> CV:kmeans 101 3.32e-01 2
#> MAD:kmeans 101 3.32e-01 2
#> ATC:kmeans 101 3.32e-01 2
#> SD:pam 98 1.46e-04 2
#> CV:pam 97 2.91e-06 2
#> MAD:pam 85 3.14e-01 2
#> ATC:pam 85 3.14e-01 2
#> SD:hclust 101 3.32e-01 2
#> CV:hclust 101 3.32e-01 2
#> MAD:hclust 101 3.32e-01 2
#> ATC:hclust 101 3.32e-01 2
test_to_known_factors(res_list, k = 3)
#> n disease.state(p) k
#> SD:NMF 101 2.94e-07 3
#> CV:NMF 101 2.94e-07 3
#> MAD:NMF 101 2.94e-07 3
#> ATC:NMF 100 5.02e-07 3
#> SD:skmeans 101 2.94e-07 3
#> CV:skmeans 101 2.94e-07 3
#> MAD:skmeans 101 2.94e-07 3
#> ATC:skmeans 101 1.85e-06 3
#> SD:mclust 101 2.94e-07 3
#> CV:mclust 101 2.94e-07 3
#> MAD:mclust 101 2.94e-07 3
#> ATC:mclust 101 8.56e-05 3
#> SD:kmeans 101 2.94e-07 3
#> CV:kmeans 101 2.94e-07 3
#> MAD:kmeans 101 2.94e-07 3
#> ATC:kmeans 100 5.02e-07 3
#> SD:pam 101 2.94e-07 3
#> CV:pam 100 2.32e-07 3
#> MAD:pam 100 2.32e-07 3
#> ATC:pam 101 2.94e-07 3
#> SD:hclust 98 1.49e-06 3
#> CV:hclust 96 4.53e-06 3
#> MAD:hclust 99 8.62e-07 3
#> ATC:hclust 49 NA 3
test_to_known_factors(res_list, k = 4)
#> n disease.state(p) k
#> SD:NMF 98 1.73e-07 4
#> CV:NMF 98 1.73e-07 4
#> MAD:NMF 99 2.97e-07 4
#> ATC:NMF 93 2.63e-07 4
#> SD:skmeans 100 5.38e-07 4
#> CV:skmeans 101 8.38e-07 4
#> MAD:skmeans 100 5.38e-07 4
#> ATC:skmeans 101 4.97e-06 4
#> SD:mclust 92 6.09e-06 4
#> CV:mclust 98 2.58e-06 4
#> MAD:mclust 94 2.16e-05 4
#> ATC:mclust 97 4.86e-06 4
#> SD:kmeans 100 4.21e-07 4
#> CV:kmeans 101 6.77e-07 4
#> MAD:kmeans 100 4.21e-07 4
#> ATC:kmeans 98 9.13e-07 4
#> SD:pam 98 1.21e-06 4
#> CV:pam 97 5.49e-06 4
#> MAD:pam 98 5.17e-07 4
#> ATC:pam 100 1.13e-06 4
#> SD:hclust 99 2.76e-06 4
#> CV:hclust 96 1.26e-05 4
#> MAD:hclust 97 7.59e-06 4
#> ATC:hclust 98 4.58e-06 4
test_to_known_factors(res_list, k = 5)
#> n disease.state(p) k
#> SD:NMF 91 2.50e-07 5
#> CV:NMF 91 4.47e-07 5
#> MAD:NMF 77 8.86e-07 5
#> ATC:NMF 69 7.61e-07 5
#> SD:skmeans 99 1.86e-09 5
#> CV:skmeans 100 2.98e-09 5
#> MAD:skmeans 99 4.93e-09 5
#> ATC:skmeans 99 4.30e-07 5
#> SD:mclust 101 5.97e-08 5
#> CV:mclust 94 1.01e-08 5
#> MAD:mclust 99 2.07e-07 5
#> ATC:mclust 97 3.79e-06 5
#> SD:kmeans 101 6.77e-07 5
#> CV:kmeans 100 8.52e-07 5
#> MAD:kmeans 100 4.21e-07 5
#> ATC:kmeans 96 7.76e-06 5
#> SD:pam 100 1.39e-11 5
#> CV:pam 95 2.12e-10 5
#> MAD:pam 98 1.36e-11 5
#> ATC:pam 98 1.01e-10 5
#> SD:hclust 82 1.39e-07 5
#> CV:hclust 87 1.44e-08 5
#> MAD:hclust 83 1.23e-07 5
#> ATC:hclust 77 1.96e-03 5
test_to_known_factors(res_list, k = 6)
#> n disease.state(p) k
#> SD:NMF 86 7.64e-10 6
#> CV:NMF 89 2.34e-09 6
#> MAD:NMF 94 1.92e-08 6
#> ATC:NMF 80 1.32e-10 6
#> SD:skmeans 95 2.72e-10 6
#> CV:skmeans 97 2.06e-08 6
#> MAD:skmeans 96 1.70e-08 6
#> ATC:skmeans 99 1.38e-10 6
#> SD:mclust 89 2.44e-07 6
#> CV:mclust 97 9.11e-10 6
#> MAD:mclust 94 1.46e-06 6
#> ATC:mclust 99 1.92e-10 6
#> SD:kmeans 93 1.35e-10 6
#> CV:kmeans 97 1.30e-10 6
#> MAD:kmeans 91 1.26e-10 6
#> ATC:kmeans 93 6.78e-10 6
#> SD:pam 93 2.92e-10 6
#> CV:pam 95 4.10e-10 6
#> MAD:pam 90 2.53e-10 6
#> ATC:pam 98 1.78e-10 6
#> SD:hclust 82 3.88e-11 6
#> CV:hclust 91 8.21e-13 6
#> MAD:hclust 84 4.22e-12 6
#> ATC:hclust 97 2.43e-11 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.991 0.994 0.5030 0.495 0.495
#> 3 3 0.914 0.918 0.961 0.2627 0.869 0.736
#> 4 4 0.964 0.936 0.962 0.0391 0.992 0.978
#> 5 5 0.756 0.688 0.841 0.1328 0.892 0.698
#> 6 6 0.750 0.659 0.794 0.0515 0.856 0.514
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
#> GSM217644 2 0.0672 0.992 0.008 0.992
#> GSM217645 2 0.0672 0.992 0.008 0.992
#> GSM217646 2 0.0000 0.992 0.000 1.000
#> GSM217647 2 0.0000 0.992 0.000 1.000
#> GSM217648 2 0.0000 0.992 0.000 1.000
#> GSM217649 2 0.0000 0.992 0.000 1.000
#> GSM217650 2 0.0000 0.992 0.000 1.000
#> GSM217651 2 0.0000 0.992 0.000 1.000
#> GSM217652 2 0.0000 0.992 0.000 1.000
#> GSM217653 2 0.0000 0.992 0.000 1.000
#> GSM217654 2 0.0672 0.992 0.008 0.992
#> GSM217655 2 0.0672 0.992 0.008 0.992
#> GSM217656 2 0.1414 0.988 0.020 0.980
#> GSM217657 2 0.1414 0.988 0.020 0.980
#> GSM217658 2 0.0000 0.992 0.000 1.000
#> GSM217659 2 0.0000 0.992 0.000 1.000
#> GSM217660 2 0.0000 0.992 0.000 1.000
#> GSM217661 2 0.0672 0.992 0.008 0.992
#> GSM217662 2 0.0000 0.992 0.000 1.000
#> GSM217663 2 0.0000 0.992 0.000 1.000
#> GSM217664 2 0.0000 0.992 0.000 1.000
#> GSM217665 2 0.0000 0.992 0.000 1.000
#> GSM217666 2 0.0000 0.992 0.000 1.000
#> GSM217667 2 0.0000 0.992 0.000 1.000
#> GSM217668 1 0.0000 0.995 1.000 0.000
#> GSM217669 1 0.0000 0.995 1.000 0.000
#> GSM217670 1 0.0000 0.995 1.000 0.000
#> GSM217671 1 0.0000 0.995 1.000 0.000
#> GSM217672 1 0.0000 0.995 1.000 0.000
#> GSM217673 1 0.0000 0.995 1.000 0.000
#> GSM217674 1 0.0000 0.995 1.000 0.000
#> GSM217675 1 0.0000 0.995 1.000 0.000
#> GSM217676 1 0.1184 0.985 0.984 0.016
#> GSM217677 1 0.0000 0.995 1.000 0.000
#> GSM217678 1 0.0000 0.995 1.000 0.000
#> GSM217679 1 0.0000 0.995 1.000 0.000
#> GSM217680 1 0.0000 0.995 1.000 0.000
#> GSM217681 1 0.0000 0.995 1.000 0.000
#> GSM217682 1 0.0000 0.995 1.000 0.000
#> GSM217683 1 0.0000 0.995 1.000 0.000
#> GSM217684 1 0.0000 0.995 1.000 0.000
#> GSM217685 2 0.1184 0.991 0.016 0.984
#> GSM217686 2 0.1184 0.991 0.016 0.984
#> GSM217687 2 0.1184 0.991 0.016 0.984
#> GSM217688 2 0.1184 0.991 0.016 0.984
#> GSM217689 2 0.1184 0.991 0.016 0.984
#> GSM217690 2 0.1184 0.991 0.016 0.984
#> GSM217691 2 0.1184 0.991 0.016 0.984
#> GSM217692 2 0.1184 0.991 0.016 0.984
#> GSM217693 2 0.1184 0.991 0.016 0.984
#> GSM217694 2 0.1184 0.991 0.016 0.984
#> GSM217695 2 0.1184 0.991 0.016 0.984
#> GSM217696 2 0.1184 0.991 0.016 0.984
#> GSM217697 2 0.1184 0.991 0.016 0.984
#> GSM217698 2 0.1184 0.991 0.016 0.984
#> GSM217699 2 0.1184 0.991 0.016 0.984
#> GSM217700 2 0.1184 0.991 0.016 0.984
#> GSM217701 2 0.1184 0.991 0.016 0.984
#> GSM217702 2 0.1184 0.991 0.016 0.984
#> GSM217703 2 0.1184 0.991 0.016 0.984
#> GSM217704 2 0.1184 0.991 0.016 0.984
#> GSM217705 1 0.0000 0.995 1.000 0.000
#> GSM217706 1 0.0000 0.995 1.000 0.000
#> GSM217707 1 0.0000 0.995 1.000 0.000
#> GSM217708 1 0.1633 0.979 0.976 0.024
#> GSM217709 1 0.1843 0.976 0.972 0.028
#> GSM217710 1 0.1843 0.976 0.972 0.028
#> GSM217711 1 0.1843 0.976 0.972 0.028
#> GSM217712 1 0.0000 0.995 1.000 0.000
#> GSM217713 1 0.0000 0.995 1.000 0.000
#> GSM217714 1 0.0000 0.995 1.000 0.000
#> GSM217715 1 0.0000 0.995 1.000 0.000
#> GSM217716 1 0.0376 0.993 0.996 0.004
#> GSM217717 1 0.0376 0.993 0.996 0.004
#> GSM217718 1 0.0376 0.993 0.996 0.004
#> GSM217719 1 0.0376 0.993 0.996 0.004
#> GSM217720 1 0.0000 0.995 1.000 0.000
#> GSM217721 1 0.0376 0.993 0.996 0.004
#> GSM217722 1 0.0000 0.995 1.000 0.000
#> GSM217723 1 0.1843 0.976 0.972 0.028
#> GSM217724 1 0.1633 0.979 0.976 0.024
#> GSM217725 1 0.1843 0.976 0.972 0.028
#> GSM217726 1 0.0000 0.995 1.000 0.000
#> GSM217727 1 0.0000 0.995 1.000 0.000
#> GSM217728 1 0.1843 0.976 0.972 0.028
#> GSM217729 1 0.0000 0.995 1.000 0.000
#> GSM217730 1 0.0000 0.995 1.000 0.000
#> GSM217731 1 0.0000 0.995 1.000 0.000
#> GSM217732 1 0.0000 0.995 1.000 0.000
#> GSM217733 1 0.0000 0.995 1.000 0.000
#> GSM217734 1 0.0000 0.995 1.000 0.000
#> GSM217735 1 0.0000 0.995 1.000 0.000
#> GSM217736 1 0.0000 0.995 1.000 0.000
#> GSM217737 2 0.0000 0.992 0.000 1.000
#> GSM217738 2 0.0000 0.992 0.000 1.000
#> GSM217739 2 0.0000 0.992 0.000 1.000
#> GSM217740 2 0.0000 0.992 0.000 1.000
#> GSM217741 2 0.0000 0.992 0.000 1.000
#> GSM217742 2 0.0000 0.992 0.000 1.000
#> GSM217743 2 0.0000 0.992 0.000 1.000
#> GSM217744 2 0.0000 0.992 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.5690 0.6767 0.004 0.708 0.288
#> GSM217645 2 0.5158 0.7524 0.004 0.764 0.232
#> GSM217646 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217649 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217650 2 0.3482 0.8541 0.000 0.872 0.128
#> GSM217651 2 0.3482 0.8541 0.000 0.872 0.128
#> GSM217652 2 0.1289 0.8940 0.000 0.968 0.032
#> GSM217653 2 0.3116 0.8669 0.000 0.892 0.108
#> GSM217654 2 0.6330 0.4780 0.004 0.600 0.396
#> GSM217655 2 0.6282 0.5060 0.004 0.612 0.384
#> GSM217656 3 0.6410 0.0897 0.004 0.420 0.576
#> GSM217657 3 0.6410 0.0897 0.004 0.420 0.576
#> GSM217658 2 0.1289 0.8940 0.000 0.968 0.032
#> GSM217659 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217660 2 0.5397 0.6872 0.000 0.720 0.280
#> GSM217661 2 0.4883 0.7816 0.004 0.788 0.208
#> GSM217662 2 0.3551 0.8517 0.000 0.868 0.132
#> GSM217663 2 0.3116 0.8669 0.000 0.892 0.108
#> GSM217664 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217668 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217669 1 0.0237 0.9901 0.996 0.000 0.004
#> GSM217670 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217676 1 0.1031 0.9771 0.976 0.000 0.024
#> GSM217677 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217685 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217686 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217687 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217688 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217689 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217690 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217691 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217692 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217693 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217694 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217695 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217696 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217697 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217698 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217699 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217700 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217701 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217702 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217703 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217704 3 0.0000 0.9516 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217708 1 0.1411 0.9684 0.964 0.000 0.036
#> GSM217709 1 0.1643 0.9621 0.956 0.000 0.044
#> GSM217710 1 0.1643 0.9621 0.956 0.000 0.044
#> GSM217711 1 0.1643 0.9621 0.956 0.000 0.044
#> GSM217712 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217716 1 0.0237 0.9903 0.996 0.000 0.004
#> GSM217717 1 0.0237 0.9903 0.996 0.000 0.004
#> GSM217718 1 0.0237 0.9903 0.996 0.000 0.004
#> GSM217719 1 0.0237 0.9903 0.996 0.000 0.004
#> GSM217720 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217721 1 0.0237 0.9903 0.996 0.000 0.004
#> GSM217722 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217723 1 0.1643 0.9621 0.956 0.000 0.044
#> GSM217724 1 0.1411 0.9684 0.964 0.000 0.036
#> GSM217725 1 0.1643 0.9621 0.956 0.000 0.044
#> GSM217726 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217728 1 0.1643 0.9621 0.956 0.000 0.044
#> GSM217729 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.9921 1.000 0.000 0.000
#> GSM217737 2 0.3412 0.8357 0.000 0.876 0.124
#> GSM217738 2 0.3412 0.8357 0.000 0.876 0.124
#> GSM217739 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.8995 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.8995 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.4605 0.633 0.000 0.664 0 0.336
#> GSM217645 2 0.4250 0.711 0.000 0.724 0 0.276
#> GSM217646 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217647 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217648 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217649 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217650 2 0.2973 0.833 0.000 0.856 0 0.144
#> GSM217651 2 0.2973 0.833 0.000 0.856 0 0.144
#> GSM217652 2 0.1557 0.873 0.000 0.944 0 0.056
#> GSM217653 2 0.2814 0.842 0.000 0.868 0 0.132
#> GSM217654 2 0.4996 0.351 0.000 0.516 0 0.484
#> GSM217655 2 0.4961 0.442 0.000 0.552 0 0.448
#> GSM217656 4 0.0336 1.000 0.000 0.008 0 0.992
#> GSM217657 4 0.0336 1.000 0.000 0.008 0 0.992
#> GSM217658 2 0.1118 0.878 0.000 0.964 0 0.036
#> GSM217659 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217660 2 0.4543 0.644 0.000 0.676 0 0.324
#> GSM217661 2 0.3942 0.759 0.000 0.764 0 0.236
#> GSM217662 2 0.3123 0.826 0.000 0.844 0 0.156
#> GSM217663 2 0.2814 0.842 0.000 0.868 0 0.132
#> GSM217664 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217665 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217666 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217667 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217668 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217669 1 0.0188 0.987 0.996 0.000 0 0.004
#> GSM217670 1 0.0188 0.987 0.996 0.000 0 0.004
#> GSM217671 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217672 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217673 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217674 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217675 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217676 1 0.1118 0.975 0.964 0.000 0 0.036
#> GSM217677 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217678 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217679 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217680 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217681 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217682 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217683 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217684 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217705 1 0.0188 0.987 0.996 0.000 0 0.004
#> GSM217706 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217707 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217708 1 0.1211 0.966 0.960 0.000 0 0.040
#> GSM217709 1 0.1389 0.960 0.952 0.000 0 0.048
#> GSM217710 1 0.1389 0.960 0.952 0.000 0 0.048
#> GSM217711 1 0.1389 0.960 0.952 0.000 0 0.048
#> GSM217712 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217713 1 0.0188 0.987 0.996 0.000 0 0.004
#> GSM217714 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217715 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217716 1 0.0336 0.986 0.992 0.000 0 0.008
#> GSM217717 1 0.0336 0.986 0.992 0.000 0 0.008
#> GSM217718 1 0.0336 0.986 0.992 0.000 0 0.008
#> GSM217719 1 0.0336 0.986 0.992 0.000 0 0.008
#> GSM217720 1 0.0188 0.987 0.996 0.000 0 0.004
#> GSM217721 1 0.0336 0.986 0.992 0.000 0 0.008
#> GSM217722 1 0.0000 0.988 1.000 0.000 0 0.000
#> GSM217723 1 0.1474 0.960 0.948 0.000 0 0.052
#> GSM217724 1 0.1302 0.966 0.956 0.000 0 0.044
#> GSM217725 1 0.1474 0.960 0.948 0.000 0 0.052
#> GSM217726 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217727 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217728 1 0.1474 0.960 0.948 0.000 0 0.052
#> GSM217729 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217730 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217731 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217732 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217733 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217734 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217735 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217736 1 0.0336 0.988 0.992 0.000 0 0.008
#> GSM217737 2 0.2921 0.797 0.000 0.860 0 0.140
#> GSM217738 2 0.2921 0.797 0.000 0.860 0 0.140
#> GSM217739 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217740 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217741 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217742 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217743 2 0.0000 0.886 0.000 1.000 0 0.000
#> GSM217744 2 0.0000 0.886 0.000 1.000 0 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.4118 0.6356 0.000 0.660 0 0.004 0.336
#> GSM217645 2 0.3814 0.7015 0.000 0.720 0 0.004 0.276
#> GSM217646 2 0.0579 0.8306 0.000 0.984 0 0.008 0.008
#> GSM217647 2 0.0693 0.8287 0.000 0.980 0 0.012 0.008
#> GSM217648 2 0.0579 0.8306 0.000 0.984 0 0.008 0.008
#> GSM217649 2 0.0579 0.8306 0.000 0.984 0 0.008 0.008
#> GSM217650 2 0.2886 0.7978 0.000 0.844 0 0.008 0.148
#> GSM217651 2 0.2886 0.7978 0.000 0.844 0 0.008 0.148
#> GSM217652 2 0.1809 0.8247 0.000 0.928 0 0.012 0.060
#> GSM217653 2 0.2707 0.8052 0.000 0.860 0 0.008 0.132
#> GSM217654 2 0.4560 0.3662 0.000 0.508 0 0.008 0.484
#> GSM217655 2 0.4533 0.4550 0.000 0.544 0 0.008 0.448
#> GSM217656 5 0.0880 1.0000 0.000 0.000 0 0.032 0.968
#> GSM217657 5 0.0880 1.0000 0.000 0.000 0 0.032 0.968
#> GSM217658 2 0.1444 0.8282 0.000 0.948 0 0.012 0.040
#> GSM217659 2 0.0579 0.8306 0.000 0.984 0 0.008 0.008
#> GSM217660 2 0.5329 0.5900 0.000 0.596 0 0.068 0.336
#> GSM217661 2 0.3395 0.7402 0.000 0.764 0 0.000 0.236
#> GSM217662 2 0.3013 0.7911 0.000 0.832 0 0.008 0.160
#> GSM217663 2 0.2707 0.8052 0.000 0.860 0 0.008 0.132
#> GSM217664 2 0.0693 0.8287 0.000 0.980 0 0.012 0.008
#> GSM217665 2 0.0693 0.8287 0.000 0.980 0 0.012 0.008
#> GSM217666 2 0.0693 0.8287 0.000 0.980 0 0.012 0.008
#> GSM217667 2 0.0693 0.8287 0.000 0.980 0 0.012 0.008
#> GSM217668 1 0.3966 0.2735 0.664 0.000 0 0.336 0.000
#> GSM217669 1 0.4126 0.1472 0.620 0.000 0 0.380 0.000
#> GSM217670 1 0.4302 -0.2937 0.520 0.000 0 0.480 0.000
#> GSM217671 1 0.4015 0.2479 0.652 0.000 0 0.348 0.000
#> GSM217672 1 0.4015 0.2479 0.652 0.000 0 0.348 0.000
#> GSM217673 1 0.4015 0.2479 0.652 0.000 0 0.348 0.000
#> GSM217674 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217675 1 0.0290 0.7065 0.992 0.000 0 0.008 0.000
#> GSM217676 1 0.3895 0.0868 0.680 0.000 0 0.320 0.000
#> GSM217677 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217678 1 0.0609 0.7005 0.980 0.000 0 0.020 0.000
#> GSM217679 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217680 1 0.0703 0.6970 0.976 0.000 0 0.024 0.000
#> GSM217681 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217682 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217683 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217684 1 0.3424 0.4550 0.760 0.000 0 0.240 0.000
#> GSM217685 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217686 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217687 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217688 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217689 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217690 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217691 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217692 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217693 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217694 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217695 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217696 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217697 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217698 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217699 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217700 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217701 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217702 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217703 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217704 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217705 4 0.4302 0.4671 0.480 0.000 0 0.520 0.000
#> GSM217706 1 0.4227 -0.0380 0.580 0.000 0 0.420 0.000
#> GSM217707 1 0.4235 -0.0524 0.576 0.000 0 0.424 0.000
#> GSM217708 4 0.3177 0.7067 0.208 0.000 0 0.792 0.000
#> GSM217709 4 0.3003 0.6969 0.188 0.000 0 0.812 0.000
#> GSM217710 4 0.3003 0.6969 0.188 0.000 0 0.812 0.000
#> GSM217711 4 0.3003 0.6969 0.188 0.000 0 0.812 0.000
#> GSM217712 1 0.4294 -0.2182 0.532 0.000 0 0.468 0.000
#> GSM217713 4 0.4287 0.4494 0.460 0.000 0 0.540 0.000
#> GSM217714 1 0.4249 -0.0508 0.568 0.000 0 0.432 0.000
#> GSM217715 1 0.4249 -0.0508 0.568 0.000 0 0.432 0.000
#> GSM217716 4 0.3932 0.7155 0.328 0.000 0 0.672 0.000
#> GSM217717 4 0.3932 0.7155 0.328 0.000 0 0.672 0.000
#> GSM217718 4 0.3857 0.7208 0.312 0.000 0 0.688 0.000
#> GSM217719 4 0.3857 0.7208 0.312 0.000 0 0.688 0.000
#> GSM217720 4 0.4302 0.4671 0.480 0.000 0 0.520 0.000
#> GSM217721 4 0.3949 0.7129 0.332 0.000 0 0.668 0.000
#> GSM217722 4 0.4294 0.3601 0.468 0.000 0 0.532 0.000
#> GSM217723 4 0.4201 0.5668 0.408 0.000 0 0.592 0.000
#> GSM217724 4 0.4242 0.5594 0.428 0.000 0 0.572 0.000
#> GSM217725 4 0.4219 0.5564 0.416 0.000 0 0.584 0.000
#> GSM217726 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217727 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217728 4 0.4219 0.5564 0.416 0.000 0 0.584 0.000
#> GSM217729 1 0.0703 0.6970 0.976 0.000 0 0.024 0.000
#> GSM217730 1 0.0703 0.6970 0.976 0.000 0 0.024 0.000
#> GSM217731 1 0.0510 0.7010 0.984 0.000 0 0.016 0.000
#> GSM217732 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217733 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217734 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217735 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217736 1 0.0000 0.7126 1.000 0.000 0 0.000 0.000
#> GSM217737 2 0.5236 0.6743 0.000 0.684 0 0.152 0.164
#> GSM217738 2 0.5236 0.6743 0.000 0.684 0 0.152 0.164
#> GSM217739 2 0.3368 0.7847 0.000 0.820 0 0.156 0.024
#> GSM217740 2 0.3368 0.7847 0.000 0.820 0 0.156 0.024
#> GSM217741 2 0.3368 0.7847 0.000 0.820 0 0.156 0.024
#> GSM217742 2 0.3368 0.7847 0.000 0.820 0 0.156 0.024
#> GSM217743 2 0.3368 0.7847 0.000 0.820 0 0.156 0.024
#> GSM217744 2 0.3368 0.7847 0.000 0.820 0 0.156 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.4344 0.4990 0.000 0.628 0.00 0.000 0.036 0.336
#> GSM217645 2 0.3876 0.6254 0.000 0.700 0.00 0.000 0.024 0.276
#> GSM217646 2 0.0547 0.8122 0.000 0.980 0.00 0.000 0.020 0.000
#> GSM217647 2 0.0146 0.8135 0.000 0.996 0.00 0.000 0.004 0.000
#> GSM217648 2 0.0632 0.8101 0.000 0.976 0.00 0.000 0.024 0.000
#> GSM217649 2 0.0547 0.8122 0.000 0.980 0.00 0.000 0.020 0.000
#> GSM217650 2 0.2653 0.7791 0.000 0.844 0.00 0.000 0.012 0.144
#> GSM217651 2 0.2653 0.7791 0.000 0.844 0.00 0.000 0.012 0.144
#> GSM217652 2 0.1349 0.8127 0.000 0.940 0.00 0.000 0.004 0.056
#> GSM217653 2 0.2790 0.7824 0.000 0.844 0.00 0.000 0.024 0.132
#> GSM217654 6 0.4651 -0.3493 0.000 0.476 0.00 0.000 0.040 0.484
#> GSM217655 2 0.4639 0.1436 0.000 0.512 0.00 0.000 0.040 0.448
#> GSM217656 6 0.0000 0.5920 0.000 0.000 0.00 0.000 0.000 1.000
#> GSM217657 6 0.0000 0.5920 0.000 0.000 0.00 0.000 0.000 1.000
#> GSM217658 2 0.1010 0.8150 0.000 0.960 0.00 0.000 0.004 0.036
#> GSM217659 2 0.0547 0.8122 0.000 0.980 0.00 0.000 0.020 0.000
#> GSM217660 2 0.6058 -0.0657 0.000 0.404 0.00 0.000 0.272 0.324
#> GSM217661 2 0.3791 0.6809 0.000 0.732 0.00 0.000 0.032 0.236
#> GSM217662 2 0.2945 0.7674 0.000 0.824 0.00 0.000 0.020 0.156
#> GSM217663 2 0.2790 0.7824 0.000 0.844 0.00 0.000 0.024 0.132
#> GSM217664 2 0.0000 0.8120 0.000 1.000 0.00 0.000 0.000 0.000
#> GSM217665 2 0.0146 0.8135 0.000 0.996 0.00 0.000 0.004 0.000
#> GSM217666 2 0.0000 0.8120 0.000 1.000 0.00 0.000 0.000 0.000
#> GSM217667 2 0.0000 0.8120 0.000 1.000 0.00 0.000 0.000 0.000
#> GSM217668 4 0.2854 0.2655 0.208 0.000 0.00 0.792 0.000 0.000
#> GSM217669 4 0.2340 0.4393 0.148 0.000 0.00 0.852 0.000 0.000
#> GSM217670 4 0.1814 0.5673 0.100 0.000 0.00 0.900 0.000 0.000
#> GSM217671 4 0.2730 0.3091 0.192 0.000 0.00 0.808 0.000 0.000
#> GSM217672 4 0.2730 0.3091 0.192 0.000 0.00 0.808 0.000 0.000
#> GSM217673 4 0.2730 0.3091 0.192 0.000 0.00 0.808 0.000 0.000
#> GSM217674 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217675 1 0.3833 0.7444 0.556 0.000 0.00 0.444 0.000 0.000
#> GSM217676 1 0.3198 0.0536 0.740 0.000 0.00 0.260 0.000 0.000
#> GSM217677 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217678 1 0.3817 0.7424 0.568 0.000 0.00 0.432 0.000 0.000
#> GSM217679 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217680 1 0.3810 0.7390 0.572 0.000 0.00 0.428 0.000 0.000
#> GSM217681 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217682 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217683 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217684 4 0.3499 -0.1869 0.320 0.000 0.00 0.680 0.000 0.000
#> GSM217685 3 0.1814 0.9294 0.000 0.000 0.90 0.000 0.100 0.000
#> GSM217686 3 0.1814 0.9294 0.000 0.000 0.90 0.000 0.100 0.000
#> GSM217687 3 0.1814 0.9294 0.000 0.000 0.90 0.000 0.100 0.000
#> GSM217688 3 0.1814 0.9294 0.000 0.000 0.90 0.000 0.100 0.000
#> GSM217689 3 0.2260 0.9072 0.000 0.000 0.86 0.000 0.140 0.000
#> GSM217690 3 0.2260 0.9072 0.000 0.000 0.86 0.000 0.140 0.000
#> GSM217691 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217692 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217693 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217694 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217695 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217699 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217700 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217701 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217703 3 0.2260 0.9072 0.000 0.000 0.86 0.000 0.140 0.000
#> GSM217704 3 0.0000 0.9620 0.000 0.000 1.00 0.000 0.000 0.000
#> GSM217705 4 0.2941 0.5789 0.220 0.000 0.00 0.780 0.000 0.000
#> GSM217706 4 0.1663 0.5086 0.088 0.000 0.00 0.912 0.000 0.000
#> GSM217707 4 0.1610 0.5137 0.084 0.000 0.00 0.916 0.000 0.000
#> GSM217708 4 0.3833 0.4840 0.444 0.000 0.00 0.556 0.000 0.000
#> GSM217709 4 0.3982 0.4733 0.460 0.000 0.00 0.536 0.000 0.004
#> GSM217710 4 0.3982 0.4733 0.460 0.000 0.00 0.536 0.000 0.004
#> GSM217711 4 0.3982 0.4733 0.460 0.000 0.00 0.536 0.000 0.004
#> GSM217712 4 0.0713 0.5642 0.028 0.000 0.00 0.972 0.000 0.000
#> GSM217713 4 0.2300 0.5944 0.144 0.000 0.00 0.856 0.000 0.000
#> GSM217714 4 0.1387 0.5240 0.068 0.000 0.00 0.932 0.000 0.000
#> GSM217715 4 0.1387 0.5240 0.068 0.000 0.00 0.932 0.000 0.000
#> GSM217716 4 0.3330 0.5788 0.284 0.000 0.00 0.716 0.000 0.000
#> GSM217717 4 0.3330 0.5788 0.284 0.000 0.00 0.716 0.000 0.000
#> GSM217718 4 0.3428 0.5717 0.304 0.000 0.00 0.696 0.000 0.000
#> GSM217719 4 0.3428 0.5717 0.304 0.000 0.00 0.696 0.000 0.000
#> GSM217720 4 0.2941 0.5789 0.220 0.000 0.00 0.780 0.000 0.000
#> GSM217721 4 0.3351 0.5792 0.288 0.000 0.00 0.712 0.000 0.000
#> GSM217722 4 0.1765 0.5736 0.096 0.000 0.00 0.904 0.000 0.000
#> GSM217723 1 0.3899 -0.3470 0.592 0.000 0.00 0.404 0.000 0.004
#> GSM217724 1 0.3804 -0.3573 0.576 0.000 0.00 0.424 0.000 0.000
#> GSM217725 1 0.3872 -0.3341 0.604 0.000 0.00 0.392 0.000 0.004
#> GSM217726 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217727 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217728 1 0.3872 -0.3341 0.604 0.000 0.00 0.392 0.000 0.004
#> GSM217729 1 0.3810 0.7390 0.572 0.000 0.00 0.428 0.000 0.000
#> GSM217730 1 0.3810 0.7390 0.572 0.000 0.00 0.428 0.000 0.000
#> GSM217731 1 0.3797 0.7447 0.580 0.000 0.00 0.420 0.000 0.000
#> GSM217732 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217733 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217734 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217735 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217736 1 0.3823 0.7554 0.564 0.000 0.00 0.436 0.000 0.000
#> GSM217737 5 0.4429 0.8442 0.000 0.144 0.00 0.000 0.716 0.140
#> GSM217738 5 0.4429 0.8442 0.000 0.144 0.00 0.000 0.716 0.140
#> GSM217739 5 0.2260 0.9530 0.000 0.140 0.00 0.000 0.860 0.000
#> GSM217740 5 0.2260 0.9530 0.000 0.140 0.00 0.000 0.860 0.000
#> GSM217741 5 0.2260 0.9530 0.000 0.140 0.00 0.000 0.860 0.000
#> GSM217742 5 0.2260 0.9530 0.000 0.140 0.00 0.000 0.860 0.000
#> GSM217743 5 0.2260 0.9530 0.000 0.140 0.00 0.000 0.860 0.000
#> GSM217744 5 0.2260 0.9530 0.000 0.140 0.00 0.000 0.860 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:hclust 101 3.32e-01 2
#> SD:hclust 98 1.49e-06 3
#> SD:hclust 99 2.76e-06 4
#> SD:hclust 82 1.39e-07 5
#> SD:hclust 82 3.88e-11 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 1.000 0.985 0.987 0.5047 0.495 0.495
#> 3 3 0.750 0.913 0.837 0.2456 0.873 0.744
#> 4 4 0.843 0.945 0.880 0.1407 0.882 0.679
#> 5 5 0.803 0.866 0.855 0.0735 1.000 1.000
#> 6 6 0.760 0.829 0.841 0.0386 0.936 0.744
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
#> GSM217644 2 0.0000 0.988 0.000 1.000
#> GSM217645 2 0.0000 0.988 0.000 1.000
#> GSM217646 2 0.0000 0.988 0.000 1.000
#> GSM217647 2 0.0000 0.988 0.000 1.000
#> GSM217648 2 0.0000 0.988 0.000 1.000
#> GSM217649 2 0.0000 0.988 0.000 1.000
#> GSM217650 2 0.0000 0.988 0.000 1.000
#> GSM217651 2 0.0000 0.988 0.000 1.000
#> GSM217652 2 0.0000 0.988 0.000 1.000
#> GSM217653 2 0.0000 0.988 0.000 1.000
#> GSM217654 2 0.0000 0.988 0.000 1.000
#> GSM217655 2 0.0000 0.988 0.000 1.000
#> GSM217656 2 0.0376 0.986 0.004 0.996
#> GSM217657 2 0.0000 0.988 0.000 1.000
#> GSM217658 2 0.0000 0.988 0.000 1.000
#> GSM217659 2 0.0000 0.988 0.000 1.000
#> GSM217660 2 0.0000 0.988 0.000 1.000
#> GSM217661 2 0.0000 0.988 0.000 1.000
#> GSM217662 2 0.0000 0.988 0.000 1.000
#> GSM217663 2 0.0000 0.988 0.000 1.000
#> GSM217664 2 0.0000 0.988 0.000 1.000
#> GSM217665 2 0.0000 0.988 0.000 1.000
#> GSM217666 2 0.0000 0.988 0.000 1.000
#> GSM217667 2 0.0000 0.988 0.000 1.000
#> GSM217668 1 0.1843 0.985 0.972 0.028
#> GSM217669 1 0.1843 0.985 0.972 0.028
#> GSM217670 1 0.1843 0.985 0.972 0.028
#> GSM217671 1 0.1843 0.985 0.972 0.028
#> GSM217672 1 0.1843 0.985 0.972 0.028
#> GSM217673 1 0.1843 0.985 0.972 0.028
#> GSM217674 1 0.0000 0.985 1.000 0.000
#> GSM217675 1 0.0000 0.985 1.000 0.000
#> GSM217676 1 0.0000 0.985 1.000 0.000
#> GSM217677 1 0.0000 0.985 1.000 0.000
#> GSM217678 1 0.0000 0.985 1.000 0.000
#> GSM217679 1 0.0000 0.985 1.000 0.000
#> GSM217680 1 0.0000 0.985 1.000 0.000
#> GSM217681 1 0.0000 0.985 1.000 0.000
#> GSM217682 1 0.0000 0.985 1.000 0.000
#> GSM217683 1 0.0000 0.985 1.000 0.000
#> GSM217684 1 0.1843 0.985 0.972 0.028
#> GSM217685 2 0.2043 0.981 0.032 0.968
#> GSM217686 2 0.2043 0.981 0.032 0.968
#> GSM217687 2 0.2043 0.981 0.032 0.968
#> GSM217688 2 0.2043 0.981 0.032 0.968
#> GSM217689 2 0.2043 0.981 0.032 0.968
#> GSM217690 2 0.2043 0.981 0.032 0.968
#> GSM217691 2 0.2043 0.981 0.032 0.968
#> GSM217692 2 0.2043 0.981 0.032 0.968
#> GSM217693 2 0.2043 0.981 0.032 0.968
#> GSM217694 2 0.2043 0.981 0.032 0.968
#> GSM217695 2 0.2043 0.981 0.032 0.968
#> GSM217696 2 0.2043 0.981 0.032 0.968
#> GSM217697 2 0.2043 0.981 0.032 0.968
#> GSM217698 2 0.2043 0.981 0.032 0.968
#> GSM217699 2 0.2043 0.981 0.032 0.968
#> GSM217700 2 0.2043 0.981 0.032 0.968
#> GSM217701 2 0.2043 0.981 0.032 0.968
#> GSM217702 2 0.2043 0.981 0.032 0.968
#> GSM217703 2 0.2043 0.981 0.032 0.968
#> GSM217704 2 0.2043 0.981 0.032 0.968
#> GSM217705 1 0.1843 0.985 0.972 0.028
#> GSM217706 1 0.1843 0.985 0.972 0.028
#> GSM217707 1 0.1843 0.985 0.972 0.028
#> GSM217708 1 0.1414 0.986 0.980 0.020
#> GSM217709 1 0.1843 0.985 0.972 0.028
#> GSM217710 1 0.1843 0.985 0.972 0.028
#> GSM217711 1 0.1843 0.985 0.972 0.028
#> GSM217712 1 0.1843 0.985 0.972 0.028
#> GSM217713 1 0.1843 0.985 0.972 0.028
#> GSM217714 1 0.1843 0.985 0.972 0.028
#> GSM217715 1 0.1843 0.985 0.972 0.028
#> GSM217716 1 0.1843 0.985 0.972 0.028
#> GSM217717 1 0.1843 0.985 0.972 0.028
#> GSM217718 1 0.1843 0.985 0.972 0.028
#> GSM217719 1 0.1843 0.985 0.972 0.028
#> GSM217720 1 0.1843 0.985 0.972 0.028
#> GSM217721 1 0.1843 0.985 0.972 0.028
#> GSM217722 1 0.1633 0.986 0.976 0.024
#> GSM217723 1 0.0000 0.985 1.000 0.000
#> GSM217724 1 0.0000 0.985 1.000 0.000
#> GSM217725 1 0.0000 0.985 1.000 0.000
#> GSM217726 1 0.0000 0.985 1.000 0.000
#> GSM217727 1 0.0000 0.985 1.000 0.000
#> GSM217728 1 0.0000 0.985 1.000 0.000
#> GSM217729 1 0.0000 0.985 1.000 0.000
#> GSM217730 1 0.0000 0.985 1.000 0.000
#> GSM217731 1 0.0000 0.985 1.000 0.000
#> GSM217732 1 0.0000 0.985 1.000 0.000
#> GSM217733 1 0.0000 0.985 1.000 0.000
#> GSM217734 1 0.0000 0.985 1.000 0.000
#> GSM217735 1 0.0000 0.985 1.000 0.000
#> GSM217736 1 0.0000 0.985 1.000 0.000
#> GSM217737 2 0.0000 0.988 0.000 1.000
#> GSM217738 2 0.0000 0.988 0.000 1.000
#> GSM217739 2 0.0000 0.988 0.000 1.000
#> GSM217740 2 0.0000 0.988 0.000 1.000
#> GSM217741 2 0.0000 0.988 0.000 1.000
#> GSM217742 2 0.0000 0.988 0.000 1.000
#> GSM217743 2 0.0000 0.988 0.000 1.000
#> GSM217744 2 0.0000 0.988 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217645 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217646 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217647 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217648 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217649 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217650 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217651 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217652 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217653 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217654 2 0.5988 0.981 0.000 0.632 0.368
#> GSM217655 2 0.6008 0.986 0.000 0.628 0.372
#> GSM217656 2 0.5988 0.981 0.000 0.632 0.368
#> GSM217657 2 0.5988 0.981 0.000 0.632 0.368
#> GSM217658 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217659 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217660 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217661 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217662 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217663 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217664 2 0.6026 0.990 0.000 0.624 0.376
#> GSM217665 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217666 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217667 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217668 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217669 1 0.0237 0.837 0.996 0.004 0.000
#> GSM217670 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217671 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217672 1 0.0237 0.837 0.996 0.004 0.000
#> GSM217673 1 0.0237 0.837 0.996 0.004 0.000
#> GSM217674 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217675 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217676 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217677 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217678 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217679 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217680 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217681 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217682 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217683 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217684 1 0.3686 0.832 0.860 0.140 0.000
#> GSM217685 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217686 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217687 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217688 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217689 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217690 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217691 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217692 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217693 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217694 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217695 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217696 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217697 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217698 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217699 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217700 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217701 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217702 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217703 3 0.0424 0.986 0.000 0.008 0.992
#> GSM217704 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.837 1.000 0.000 0.000
#> GSM217706 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217707 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217708 1 0.0592 0.835 0.988 0.012 0.000
#> GSM217709 1 0.0747 0.833 0.984 0.016 0.000
#> GSM217710 1 0.0747 0.833 0.984 0.016 0.000
#> GSM217711 1 0.0747 0.833 0.984 0.016 0.000
#> GSM217712 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217713 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217714 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217715 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217716 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217717 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217718 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217719 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217720 1 0.0000 0.837 1.000 0.000 0.000
#> GSM217721 1 0.0424 0.836 0.992 0.008 0.000
#> GSM217722 1 0.0000 0.837 1.000 0.000 0.000
#> GSM217723 1 0.1163 0.837 0.972 0.028 0.000
#> GSM217724 1 0.5560 0.824 0.700 0.300 0.000
#> GSM217725 1 0.6026 0.815 0.624 0.376 0.000
#> GSM217726 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217727 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217728 1 0.6008 0.817 0.628 0.372 0.000
#> GSM217729 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217730 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217731 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217732 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217733 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217734 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217735 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217736 1 0.5988 0.819 0.632 0.368 0.000
#> GSM217737 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217738 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217739 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217740 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217741 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217742 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217743 2 0.6062 0.992 0.000 0.616 0.384
#> GSM217744 2 0.6062 0.992 0.000 0.616 0.384
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217645 2 0.0188 0.950 0.004 0.996 0.000 0.000
#> GSM217646 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0188 0.951 0.004 0.996 0.000 0.000
#> GSM217648 2 0.0188 0.951 0.004 0.996 0.000 0.000
#> GSM217649 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0188 0.951 0.004 0.996 0.000 0.000
#> GSM217654 2 0.0779 0.944 0.016 0.980 0.004 0.000
#> GSM217655 2 0.0524 0.948 0.008 0.988 0.004 0.000
#> GSM217656 2 0.3777 0.861 0.052 0.868 0.020 0.060
#> GSM217657 2 0.1722 0.925 0.048 0.944 0.008 0.000
#> GSM217658 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217660 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217661 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0188 0.951 0.004 0.996 0.000 0.000
#> GSM217663 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0000 0.952 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0188 0.951 0.004 0.996 0.000 0.000
#> GSM217666 2 0.0188 0.951 0.004 0.996 0.000 0.000
#> GSM217667 2 0.0188 0.951 0.004 0.996 0.000 0.000
#> GSM217668 4 0.0469 0.965 0.000 0.000 0.012 0.988
#> GSM217669 4 0.0188 0.966 0.000 0.000 0.004 0.996
#> GSM217670 4 0.0469 0.965 0.000 0.000 0.012 0.988
#> GSM217671 4 0.0469 0.965 0.000 0.000 0.012 0.988
#> GSM217672 4 0.0469 0.965 0.000 0.000 0.012 0.988
#> GSM217673 4 0.0469 0.965 0.000 0.000 0.012 0.988
#> GSM217674 1 0.4814 0.978 0.676 0.000 0.008 0.316
#> GSM217675 1 0.4814 0.978 0.676 0.000 0.008 0.316
#> GSM217676 1 0.4655 0.979 0.684 0.000 0.004 0.312
#> GSM217677 1 0.4792 0.979 0.680 0.000 0.008 0.312
#> GSM217678 1 0.5130 0.973 0.668 0.000 0.020 0.312
#> GSM217679 1 0.4792 0.979 0.680 0.000 0.008 0.312
#> GSM217680 1 0.5130 0.973 0.668 0.000 0.020 0.312
#> GSM217681 1 0.4792 0.979 0.680 0.000 0.008 0.312
#> GSM217682 1 0.4814 0.978 0.676 0.000 0.008 0.316
#> GSM217683 1 0.4814 0.978 0.676 0.000 0.008 0.316
#> GSM217684 4 0.4988 0.221 0.288 0.000 0.020 0.692
#> GSM217685 3 0.2983 0.963 0.040 0.068 0.892 0.000
#> GSM217686 3 0.2983 0.963 0.040 0.068 0.892 0.000
#> GSM217687 3 0.2983 0.963 0.040 0.068 0.892 0.000
#> GSM217688 3 0.2983 0.963 0.040 0.068 0.892 0.000
#> GSM217689 3 0.3474 0.951 0.068 0.064 0.868 0.000
#> GSM217690 3 0.3474 0.951 0.068 0.064 0.868 0.000
#> GSM217691 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217692 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217693 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217694 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217695 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217696 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217697 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217698 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217699 3 0.1792 0.970 0.000 0.068 0.932 0.000
#> GSM217700 3 0.2489 0.971 0.020 0.068 0.912 0.000
#> GSM217701 3 0.1792 0.970 0.000 0.068 0.932 0.000
#> GSM217702 3 0.1792 0.970 0.000 0.068 0.932 0.000
#> GSM217703 3 0.3547 0.949 0.072 0.064 0.864 0.000
#> GSM217704 3 0.3156 0.971 0.048 0.068 0.884 0.000
#> GSM217705 4 0.0336 0.966 0.000 0.000 0.008 0.992
#> GSM217706 4 0.0000 0.966 0.000 0.000 0.000 1.000
#> GSM217707 4 0.0000 0.966 0.000 0.000 0.000 1.000
#> GSM217708 4 0.0927 0.954 0.008 0.000 0.016 0.976
#> GSM217709 4 0.1059 0.952 0.012 0.000 0.016 0.972
#> GSM217710 4 0.1406 0.940 0.024 0.000 0.016 0.960
#> GSM217711 4 0.1406 0.940 0.024 0.000 0.016 0.960
#> GSM217712 4 0.0336 0.964 0.008 0.000 0.000 0.992
#> GSM217713 4 0.0188 0.965 0.004 0.000 0.000 0.996
#> GSM217714 4 0.0336 0.966 0.000 0.000 0.008 0.992
#> GSM217715 4 0.0336 0.966 0.000 0.000 0.008 0.992
#> GSM217716 4 0.0376 0.966 0.004 0.000 0.004 0.992
#> GSM217717 4 0.0188 0.965 0.004 0.000 0.000 0.996
#> GSM217718 4 0.0524 0.965 0.008 0.000 0.004 0.988
#> GSM217719 4 0.0376 0.966 0.004 0.000 0.004 0.992
#> GSM217720 4 0.0469 0.965 0.000 0.000 0.012 0.988
#> GSM217721 4 0.0188 0.965 0.004 0.000 0.000 0.996
#> GSM217722 4 0.0000 0.966 0.000 0.000 0.000 1.000
#> GSM217723 4 0.2565 0.880 0.056 0.000 0.032 0.912
#> GSM217724 1 0.5756 0.826 0.568 0.000 0.032 0.400
#> GSM217725 1 0.5496 0.956 0.652 0.000 0.036 0.312
#> GSM217726 1 0.4677 0.978 0.680 0.000 0.004 0.316
#> GSM217727 1 0.4677 0.978 0.680 0.000 0.004 0.316
#> GSM217728 1 0.5496 0.956 0.652 0.000 0.036 0.312
#> GSM217729 1 0.5130 0.973 0.668 0.000 0.020 0.312
#> GSM217730 1 0.5130 0.973 0.668 0.000 0.020 0.312
#> GSM217731 1 0.5130 0.973 0.668 0.000 0.020 0.312
#> GSM217732 1 0.4914 0.978 0.676 0.000 0.012 0.312
#> GSM217733 1 0.4792 0.978 0.680 0.000 0.008 0.312
#> GSM217734 1 0.4655 0.979 0.684 0.000 0.004 0.312
#> GSM217735 1 0.4914 0.978 0.676 0.000 0.012 0.312
#> GSM217736 1 0.4814 0.978 0.676 0.000 0.008 0.316
#> GSM217737 2 0.3725 0.868 0.180 0.812 0.008 0.000
#> GSM217738 2 0.3725 0.868 0.180 0.812 0.008 0.000
#> GSM217739 2 0.3681 0.869 0.176 0.816 0.008 0.000
#> GSM217740 2 0.3681 0.869 0.176 0.816 0.008 0.000
#> GSM217741 2 0.3539 0.871 0.176 0.820 0.004 0.000
#> GSM217742 2 0.3539 0.871 0.176 0.820 0.004 0.000
#> GSM217743 2 0.3539 0.871 0.176 0.820 0.004 0.000
#> GSM217744 2 0.3539 0.871 0.176 0.820 0.004 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0865 0.865 0.000 0.972 0.000 0.004 NA
#> GSM217645 2 0.0865 0.865 0.000 0.972 0.000 0.004 NA
#> GSM217646 2 0.0000 0.874 0.000 1.000 0.000 0.000 NA
#> GSM217647 2 0.0290 0.874 0.000 0.992 0.000 0.000 NA
#> GSM217648 2 0.0290 0.874 0.000 0.992 0.000 0.000 NA
#> GSM217649 2 0.0000 0.874 0.000 1.000 0.000 0.000 NA
#> GSM217650 2 0.0162 0.873 0.000 0.996 0.000 0.004 NA
#> GSM217651 2 0.0162 0.873 0.000 0.996 0.000 0.004 NA
#> GSM217652 2 0.0000 0.874 0.000 1.000 0.000 0.000 NA
#> GSM217653 2 0.0290 0.874 0.000 0.992 0.000 0.000 NA
#> GSM217654 2 0.2450 0.836 0.000 0.900 0.000 0.048 NA
#> GSM217655 2 0.1893 0.847 0.000 0.928 0.000 0.024 NA
#> GSM217656 2 0.5820 0.538 0.000 0.572 0.000 0.120 NA
#> GSM217657 2 0.4605 0.710 0.000 0.732 0.000 0.076 NA
#> GSM217658 2 0.0000 0.874 0.000 1.000 0.000 0.000 NA
#> GSM217659 2 0.0000 0.874 0.000 1.000 0.000 0.000 NA
#> GSM217660 2 0.0324 0.874 0.000 0.992 0.000 0.004 NA
#> GSM217661 2 0.0162 0.873 0.000 0.996 0.000 0.004 NA
#> GSM217662 2 0.0451 0.874 0.000 0.988 0.000 0.004 NA
#> GSM217663 2 0.0000 0.874 0.000 1.000 0.000 0.000 NA
#> GSM217664 2 0.0000 0.874 0.000 1.000 0.000 0.000 NA
#> GSM217665 2 0.0290 0.874 0.000 0.992 0.000 0.000 NA
#> GSM217666 2 0.0290 0.874 0.000 0.992 0.000 0.000 NA
#> GSM217667 2 0.0290 0.874 0.000 0.992 0.000 0.000 NA
#> GSM217668 4 0.3740 0.908 0.128 0.000 0.008 0.820 NA
#> GSM217669 4 0.3826 0.908 0.128 0.000 0.004 0.812 NA
#> GSM217670 4 0.3590 0.910 0.128 0.000 0.008 0.828 NA
#> GSM217671 4 0.3666 0.909 0.128 0.000 0.008 0.824 NA
#> GSM217672 4 0.3666 0.909 0.128 0.000 0.008 0.824 NA
#> GSM217673 4 0.3666 0.909 0.128 0.000 0.008 0.824 NA
#> GSM217674 1 0.0451 0.932 0.988 0.000 0.004 0.000 NA
#> GSM217675 1 0.0566 0.932 0.984 0.000 0.004 0.000 NA
#> GSM217676 1 0.1357 0.929 0.948 0.000 0.004 0.000 NA
#> GSM217677 1 0.0162 0.933 0.996 0.000 0.004 0.000 NA
#> GSM217678 1 0.1768 0.918 0.924 0.000 0.004 0.000 NA
#> GSM217679 1 0.0324 0.933 0.992 0.000 0.004 0.000 NA
#> GSM217680 1 0.1768 0.918 0.924 0.000 0.004 0.000 NA
#> GSM217681 1 0.0609 0.932 0.980 0.000 0.000 0.000 NA
#> GSM217682 1 0.0566 0.932 0.984 0.000 0.004 0.000 NA
#> GSM217683 1 0.0451 0.932 0.988 0.000 0.004 0.000 NA
#> GSM217684 4 0.5880 0.517 0.364 0.000 0.012 0.548 NA
#> GSM217685 3 0.2400 0.939 0.000 0.020 0.912 0.020 NA
#> GSM217686 3 0.2400 0.939 0.000 0.020 0.912 0.020 NA
#> GSM217687 3 0.2400 0.939 0.000 0.020 0.912 0.020 NA
#> GSM217688 3 0.2400 0.939 0.000 0.020 0.912 0.020 NA
#> GSM217689 3 0.2857 0.930 0.000 0.020 0.888 0.028 NA
#> GSM217690 3 0.2857 0.930 0.000 0.020 0.888 0.028 NA
#> GSM217691 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217692 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217693 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217694 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217695 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217696 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217697 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217698 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217699 3 0.0898 0.950 0.000 0.020 0.972 0.008 NA
#> GSM217700 3 0.1710 0.951 0.000 0.020 0.944 0.024 NA
#> GSM217701 3 0.0898 0.950 0.000 0.020 0.972 0.008 NA
#> GSM217702 3 0.0898 0.950 0.000 0.020 0.972 0.008 NA
#> GSM217703 3 0.3022 0.927 0.000 0.020 0.880 0.036 NA
#> GSM217704 3 0.2673 0.950 0.000 0.020 0.900 0.036 NA
#> GSM217705 4 0.3666 0.909 0.128 0.000 0.008 0.824 NA
#> GSM217706 4 0.2377 0.913 0.128 0.000 0.000 0.872 NA
#> GSM217707 4 0.2660 0.913 0.128 0.000 0.000 0.864 NA
#> GSM217708 4 0.5434 0.764 0.120 0.000 0.000 0.648 NA
#> GSM217709 4 0.5284 0.753 0.104 0.000 0.000 0.660 NA
#> GSM217710 4 0.5240 0.732 0.092 0.000 0.000 0.656 NA
#> GSM217711 4 0.5240 0.732 0.092 0.000 0.000 0.656 NA
#> GSM217712 4 0.2439 0.911 0.120 0.000 0.000 0.876 NA
#> GSM217713 4 0.2536 0.913 0.128 0.000 0.000 0.868 NA
#> GSM217714 4 0.3146 0.911 0.128 0.000 0.000 0.844 NA
#> GSM217715 4 0.3229 0.911 0.128 0.000 0.000 0.840 NA
#> GSM217716 4 0.2536 0.913 0.128 0.000 0.000 0.868 NA
#> GSM217717 4 0.2536 0.913 0.128 0.000 0.000 0.868 NA
#> GSM217718 4 0.2563 0.910 0.120 0.000 0.000 0.872 NA
#> GSM217719 4 0.2660 0.913 0.128 0.000 0.000 0.864 NA
#> GSM217720 4 0.3666 0.909 0.128 0.000 0.008 0.824 NA
#> GSM217721 4 0.2536 0.913 0.128 0.000 0.000 0.868 NA
#> GSM217722 4 0.2660 0.913 0.128 0.000 0.000 0.864 NA
#> GSM217723 4 0.6424 0.591 0.168 0.000 0.004 0.500 NA
#> GSM217724 1 0.5509 0.604 0.612 0.000 0.004 0.080 NA
#> GSM217725 1 0.4536 0.688 0.656 0.000 0.004 0.016 NA
#> GSM217726 1 0.0671 0.933 0.980 0.000 0.004 0.000 NA
#> GSM217727 1 0.0671 0.933 0.980 0.000 0.004 0.000 NA
#> GSM217728 1 0.4607 0.687 0.656 0.000 0.004 0.020 NA
#> GSM217729 1 0.1952 0.913 0.912 0.000 0.004 0.000 NA
#> GSM217730 1 0.1952 0.913 0.912 0.000 0.004 0.000 NA
#> GSM217731 1 0.1768 0.918 0.924 0.000 0.004 0.000 NA
#> GSM217732 1 0.1041 0.928 0.964 0.000 0.004 0.000 NA
#> GSM217733 1 0.0880 0.932 0.968 0.000 0.000 0.000 NA
#> GSM217734 1 0.0404 0.932 0.988 0.000 0.000 0.000 NA
#> GSM217735 1 0.1041 0.928 0.964 0.000 0.004 0.000 NA
#> GSM217736 1 0.0324 0.933 0.992 0.000 0.004 0.000 NA
#> GSM217737 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
#> GSM217738 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
#> GSM217739 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
#> GSM217740 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
#> GSM217741 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
#> GSM217742 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
#> GSM217743 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
#> GSM217744 2 0.4262 0.663 0.000 0.560 0.000 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.1625 0.8957 0.000 0.928 0.000 0.012 0.000 0.060
#> GSM217645 2 0.1225 0.9060 0.000 0.952 0.000 0.012 0.000 0.036
#> GSM217646 2 0.1196 0.9084 0.000 0.952 0.000 0.008 0.000 0.040
#> GSM217647 2 0.0820 0.9068 0.000 0.972 0.000 0.000 0.016 0.012
#> GSM217648 2 0.1442 0.9097 0.000 0.944 0.000 0.004 0.012 0.040
#> GSM217649 2 0.1196 0.9084 0.000 0.952 0.000 0.008 0.000 0.040
#> GSM217650 2 0.0665 0.9130 0.000 0.980 0.000 0.008 0.004 0.008
#> GSM217651 2 0.1196 0.9080 0.000 0.952 0.000 0.008 0.000 0.040
#> GSM217652 2 0.0291 0.9134 0.000 0.992 0.000 0.004 0.004 0.000
#> GSM217653 2 0.0862 0.9079 0.000 0.972 0.000 0.004 0.016 0.008
#> GSM217654 2 0.3349 0.6816 0.000 0.748 0.000 0.000 0.008 0.244
#> GSM217655 2 0.3323 0.7311 0.000 0.780 0.000 0.008 0.008 0.204
#> GSM217656 6 0.3788 0.0409 0.000 0.280 0.000 0.004 0.012 0.704
#> GSM217657 2 0.4095 0.2720 0.000 0.512 0.000 0.000 0.008 0.480
#> GSM217658 2 0.0291 0.9131 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM217659 2 0.1196 0.9084 0.000 0.952 0.000 0.008 0.000 0.040
#> GSM217660 2 0.1453 0.9091 0.000 0.944 0.000 0.008 0.008 0.040
#> GSM217661 2 0.1367 0.9046 0.000 0.944 0.000 0.012 0.000 0.044
#> GSM217662 2 0.1059 0.9088 0.000 0.964 0.000 0.004 0.016 0.016
#> GSM217663 2 0.0551 0.9121 0.000 0.984 0.000 0.004 0.004 0.008
#> GSM217664 2 0.0508 0.9112 0.000 0.984 0.000 0.000 0.004 0.012
#> GSM217665 2 0.0820 0.9068 0.000 0.972 0.000 0.000 0.016 0.012
#> GSM217666 2 0.0820 0.9068 0.000 0.972 0.000 0.000 0.016 0.012
#> GSM217667 2 0.0820 0.9068 0.000 0.972 0.000 0.000 0.016 0.012
#> GSM217668 4 0.2432 0.8136 0.100 0.000 0.000 0.876 0.024 0.000
#> GSM217669 4 0.2959 0.8086 0.104 0.000 0.000 0.852 0.008 0.036
#> GSM217670 4 0.2454 0.8274 0.104 0.000 0.000 0.876 0.016 0.004
#> GSM217671 4 0.2118 0.8231 0.104 0.000 0.000 0.888 0.008 0.000
#> GSM217672 4 0.2118 0.8231 0.104 0.000 0.000 0.888 0.008 0.000
#> GSM217673 4 0.2118 0.8231 0.104 0.000 0.000 0.888 0.008 0.000
#> GSM217674 1 0.0935 0.8929 0.964 0.000 0.000 0.000 0.032 0.004
#> GSM217675 1 0.1219 0.8884 0.948 0.000 0.000 0.000 0.048 0.004
#> GSM217676 1 0.1845 0.8897 0.920 0.000 0.000 0.000 0.052 0.028
#> GSM217677 1 0.0458 0.8962 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM217678 1 0.1934 0.8786 0.916 0.000 0.000 0.000 0.044 0.040
#> GSM217679 1 0.0603 0.8952 0.980 0.000 0.000 0.000 0.016 0.004
#> GSM217680 1 0.2190 0.8768 0.900 0.000 0.000 0.000 0.060 0.040
#> GSM217681 1 0.1074 0.8941 0.960 0.000 0.000 0.000 0.028 0.012
#> GSM217682 1 0.1010 0.8926 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM217683 1 0.1010 0.8926 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM217684 4 0.4750 0.3924 0.264 0.000 0.000 0.664 0.056 0.016
#> GSM217685 3 0.4466 0.8646 0.000 0.000 0.736 0.028 0.060 0.176
#> GSM217686 3 0.4466 0.8646 0.000 0.000 0.736 0.028 0.060 0.176
#> GSM217687 3 0.4466 0.8646 0.000 0.000 0.736 0.028 0.060 0.176
#> GSM217688 3 0.4466 0.8646 0.000 0.000 0.736 0.028 0.060 0.176
#> GSM217689 3 0.4848 0.8486 0.000 0.000 0.704 0.040 0.064 0.192
#> GSM217690 3 0.4848 0.8486 0.000 0.000 0.704 0.040 0.064 0.192
#> GSM217691 3 0.0405 0.8981 0.000 0.000 0.988 0.008 0.004 0.000
#> GSM217692 3 0.0405 0.8981 0.000 0.000 0.988 0.008 0.004 0.000
#> GSM217693 3 0.0405 0.8981 0.000 0.000 0.988 0.008 0.004 0.000
#> GSM217694 3 0.0405 0.8981 0.000 0.000 0.988 0.008 0.004 0.000
#> GSM217695 3 0.0000 0.8986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.8986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.8986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.8986 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.2785 0.8980 0.000 0.000 0.876 0.028 0.028 0.068
#> GSM217700 3 0.2186 0.8999 0.000 0.000 0.908 0.024 0.012 0.056
#> GSM217701 3 0.2785 0.8980 0.000 0.000 0.876 0.028 0.028 0.068
#> GSM217702 3 0.2785 0.8980 0.000 0.000 0.876 0.028 0.028 0.068
#> GSM217703 3 0.4959 0.8390 0.000 0.000 0.688 0.040 0.064 0.208
#> GSM217704 3 0.0146 0.8985 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217705 4 0.3164 0.8188 0.104 0.000 0.000 0.844 0.032 0.020
#> GSM217706 4 0.4361 0.8179 0.104 0.000 0.000 0.764 0.032 0.100
#> GSM217707 4 0.4650 0.8082 0.104 0.000 0.000 0.744 0.044 0.108
#> GSM217708 6 0.5710 0.4917 0.104 0.000 0.000 0.420 0.016 0.460
#> GSM217709 6 0.5335 0.5503 0.092 0.000 0.000 0.412 0.004 0.492
#> GSM217710 6 0.5093 0.5973 0.084 0.000 0.000 0.388 0.000 0.528
#> GSM217711 6 0.5093 0.5973 0.084 0.000 0.000 0.388 0.000 0.528
#> GSM217712 4 0.4645 0.8073 0.104 0.000 0.000 0.740 0.036 0.120
#> GSM217713 4 0.4752 0.7992 0.104 0.000 0.000 0.732 0.040 0.124
#> GSM217714 4 0.2540 0.8301 0.104 0.000 0.000 0.872 0.020 0.004
#> GSM217715 4 0.2149 0.8275 0.104 0.000 0.000 0.888 0.004 0.004
#> GSM217716 4 0.4542 0.8142 0.104 0.000 0.000 0.752 0.040 0.104
#> GSM217717 4 0.4671 0.8062 0.104 0.000 0.000 0.740 0.040 0.116
#> GSM217718 4 0.4838 0.7796 0.104 0.000 0.000 0.720 0.036 0.140
#> GSM217719 4 0.4838 0.7796 0.104 0.000 0.000 0.720 0.036 0.140
#> GSM217720 4 0.2887 0.8126 0.104 0.000 0.000 0.856 0.032 0.008
#> GSM217721 4 0.4791 0.7959 0.104 0.000 0.000 0.728 0.040 0.128
#> GSM217722 4 0.4623 0.7918 0.104 0.000 0.000 0.736 0.028 0.132
#> GSM217723 6 0.6636 0.4997 0.156 0.000 0.000 0.304 0.068 0.472
#> GSM217724 1 0.5784 0.3565 0.532 0.000 0.000 0.044 0.076 0.348
#> GSM217725 1 0.4851 0.3867 0.536 0.000 0.000 0.000 0.060 0.404
#> GSM217726 1 0.0891 0.8946 0.968 0.000 0.000 0.000 0.024 0.008
#> GSM217727 1 0.0891 0.8946 0.968 0.000 0.000 0.000 0.024 0.008
#> GSM217728 1 0.4823 0.4172 0.552 0.000 0.000 0.000 0.060 0.388
#> GSM217729 1 0.2197 0.8741 0.900 0.000 0.000 0.000 0.056 0.044
#> GSM217730 1 0.2384 0.8716 0.888 0.000 0.000 0.000 0.064 0.048
#> GSM217731 1 0.2258 0.8754 0.896 0.000 0.000 0.000 0.060 0.044
#> GSM217732 1 0.1434 0.8892 0.940 0.000 0.000 0.000 0.048 0.012
#> GSM217733 1 0.1225 0.8934 0.952 0.000 0.000 0.000 0.036 0.012
#> GSM217734 1 0.0858 0.8945 0.968 0.000 0.000 0.000 0.028 0.004
#> GSM217735 1 0.1434 0.8892 0.940 0.000 0.000 0.000 0.048 0.012
#> GSM217736 1 0.0458 0.8965 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM217737 5 0.3710 0.9830 0.000 0.292 0.000 0.012 0.696 0.000
#> GSM217738 5 0.3710 0.9830 0.000 0.292 0.000 0.012 0.696 0.000
#> GSM217739 5 0.3489 0.9877 0.000 0.288 0.000 0.000 0.708 0.004
#> GSM217740 5 0.3489 0.9877 0.000 0.288 0.000 0.000 0.708 0.004
#> GSM217741 5 0.3778 0.9894 0.000 0.288 0.000 0.016 0.696 0.000
#> GSM217742 5 0.3778 0.9894 0.000 0.288 0.000 0.016 0.696 0.000
#> GSM217743 5 0.3778 0.9894 0.000 0.288 0.000 0.016 0.696 0.000
#> GSM217744 5 0.3778 0.9894 0.000 0.288 0.000 0.016 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:kmeans 101 3.32e-01 2
#> SD:kmeans 101 2.94e-07 3
#> SD:kmeans 100 4.21e-07 4
#> SD:kmeans 101 6.77e-07 5
#> SD:kmeans 93 1.35e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.5051 0.495 0.495
#> 3 3 1.000 0.999 0.998 0.2506 0.873 0.744
#> 4 4 1.000 0.983 0.988 0.1858 0.881 0.678
#> 5 5 0.939 0.932 0.952 0.0594 0.954 0.817
#> 6 6 0.907 0.824 0.910 0.0287 0.992 0.962
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3 4
There is also optional best \(k\) = 2 3 4 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM217644 2 0 1 0 1
#> GSM217645 2 0 1 0 1
#> GSM217646 2 0 1 0 1
#> GSM217647 2 0 1 0 1
#> GSM217648 2 0 1 0 1
#> GSM217649 2 0 1 0 1
#> GSM217650 2 0 1 0 1
#> GSM217651 2 0 1 0 1
#> GSM217652 2 0 1 0 1
#> GSM217653 2 0 1 0 1
#> GSM217654 2 0 1 0 1
#> GSM217655 2 0 1 0 1
#> GSM217656 2 0 1 0 1
#> GSM217657 2 0 1 0 1
#> GSM217658 2 0 1 0 1
#> GSM217659 2 0 1 0 1
#> GSM217660 2 0 1 0 1
#> GSM217661 2 0 1 0 1
#> GSM217662 2 0 1 0 1
#> GSM217663 2 0 1 0 1
#> GSM217664 2 0 1 0 1
#> GSM217665 2 0 1 0 1
#> GSM217666 2 0 1 0 1
#> GSM217667 2 0 1 0 1
#> GSM217668 1 0 1 1 0
#> GSM217669 1 0 1 1 0
#> GSM217670 1 0 1 1 0
#> GSM217671 1 0 1 1 0
#> GSM217672 1 0 1 1 0
#> GSM217673 1 0 1 1 0
#> GSM217674 1 0 1 1 0
#> GSM217675 1 0 1 1 0
#> GSM217676 1 0 1 1 0
#> GSM217677 1 0 1 1 0
#> GSM217678 1 0 1 1 0
#> GSM217679 1 0 1 1 0
#> GSM217680 1 0 1 1 0
#> GSM217681 1 0 1 1 0
#> GSM217682 1 0 1 1 0
#> GSM217683 1 0 1 1 0
#> GSM217684 1 0 1 1 0
#> GSM217685 2 0 1 0 1
#> GSM217686 2 0 1 0 1
#> GSM217687 2 0 1 0 1
#> GSM217688 2 0 1 0 1
#> GSM217689 2 0 1 0 1
#> GSM217690 2 0 1 0 1
#> GSM217691 2 0 1 0 1
#> GSM217692 2 0 1 0 1
#> GSM217693 2 0 1 0 1
#> GSM217694 2 0 1 0 1
#> GSM217695 2 0 1 0 1
#> GSM217696 2 0 1 0 1
#> GSM217697 2 0 1 0 1
#> GSM217698 2 0 1 0 1
#> GSM217699 2 0 1 0 1
#> GSM217700 2 0 1 0 1
#> GSM217701 2 0 1 0 1
#> GSM217702 2 0 1 0 1
#> GSM217703 2 0 1 0 1
#> GSM217704 2 0 1 0 1
#> GSM217705 1 0 1 1 0
#> GSM217706 1 0 1 1 0
#> GSM217707 1 0 1 1 0
#> GSM217708 1 0 1 1 0
#> GSM217709 1 0 1 1 0
#> GSM217710 1 0 1 1 0
#> GSM217711 1 0 1 1 0
#> GSM217712 1 0 1 1 0
#> GSM217713 1 0 1 1 0
#> GSM217714 1 0 1 1 0
#> GSM217715 1 0 1 1 0
#> GSM217716 1 0 1 1 0
#> GSM217717 1 0 1 1 0
#> GSM217718 1 0 1 1 0
#> GSM217719 1 0 1 1 0
#> GSM217720 1 0 1 1 0
#> GSM217721 1 0 1 1 0
#> GSM217722 1 0 1 1 0
#> GSM217723 1 0 1 1 0
#> GSM217724 1 0 1 1 0
#> GSM217725 1 0 1 1 0
#> GSM217726 1 0 1 1 0
#> GSM217727 1 0 1 1 0
#> GSM217728 1 0 1 1 0
#> GSM217729 1 0 1 1 0
#> GSM217730 1 0 1 1 0
#> GSM217731 1 0 1 1 0
#> GSM217732 1 0 1 1 0
#> GSM217733 1 0 1 1 0
#> GSM217734 1 0 1 1 0
#> GSM217735 1 0 1 1 0
#> GSM217736 1 0 1 1 0
#> GSM217737 2 0 1 0 1
#> GSM217738 2 0 1 0 1
#> GSM217739 2 0 1 0 1
#> GSM217740 2 0 1 0 1
#> GSM217741 2 0 1 0 1
#> GSM217742 2 0 1 0 1
#> GSM217743 2 0 1 0 1
#> GSM217744 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217645 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217646 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217647 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217648 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217649 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217650 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217651 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217652 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217653 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217654 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217655 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217656 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217657 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217658 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217659 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217660 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217661 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217662 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217663 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217664 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217665 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217666 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217667 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217668 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217669 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217670 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217671 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217672 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217673 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217674 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217685 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217686 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217687 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217688 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217689 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217690 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217691 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217692 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217693 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217694 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217695 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217696 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217697 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217698 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217699 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217700 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217701 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217702 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217703 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217704 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217705 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217706 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217707 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217708 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217709 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217710 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217711 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217712 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217713 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217714 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217715 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217716 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217717 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217718 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217719 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217720 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217721 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217722 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217723 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217724 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217725 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217726 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217728 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217729 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217737 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217738 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217739 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217740 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217741 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217742 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217743 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217744 2 0.0000 1.000 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217645 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217646 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217647 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217648 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217649 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217650 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217651 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217652 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217653 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217654 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217655 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217656 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217657 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217658 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217659 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217660 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217661 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217662 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217663 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217664 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217665 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217666 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217667 2 0.0000 0.994 0.00 1.00 0 0.00
#> GSM217668 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217669 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217670 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217671 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217672 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217673 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217674 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217675 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217676 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217677 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217678 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217679 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217680 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217681 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217682 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217683 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217684 4 0.5000 0.040 0.50 0.00 0 0.50
#> GSM217685 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217686 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217687 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217688 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217689 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217690 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217691 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217692 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217693 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217694 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217695 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217696 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217697 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217698 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217699 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217700 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217701 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217702 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217703 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217704 3 0.0000 1.000 0.00 0.00 1 0.00
#> GSM217705 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217706 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217707 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217708 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217709 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217710 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217711 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217712 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217713 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217714 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217715 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217716 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217717 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217718 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217719 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217720 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217721 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217722 4 0.0707 0.979 0.02 0.00 0 0.98
#> GSM217723 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217724 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217725 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217726 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217727 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217728 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217729 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217730 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217731 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217732 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217733 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217734 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217735 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217736 1 0.0000 1.000 1.00 0.00 0 0.00
#> GSM217737 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217738 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217739 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217740 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217741 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217742 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217743 2 0.0707 0.990 0.00 0.98 0 0.02
#> GSM217744 2 0.0707 0.990 0.00 0.98 0 0.02
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0404 0.942 0.000 0.988 0.000 0.000 0.012
#> GSM217645 2 0.0510 0.938 0.000 0.984 0.000 0.000 0.016
#> GSM217646 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217648 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217649 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217651 2 0.0510 0.941 0.000 0.984 0.000 0.000 0.016
#> GSM217652 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217653 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217654 5 0.2813 0.885 0.000 0.168 0.000 0.000 0.832
#> GSM217655 2 0.2891 0.740 0.000 0.824 0.000 0.000 0.176
#> GSM217656 5 0.1430 0.790 0.000 0.052 0.004 0.000 0.944
#> GSM217657 5 0.1965 0.840 0.000 0.096 0.000 0.000 0.904
#> GSM217658 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217660 2 0.4302 -0.377 0.000 0.520 0.000 0.000 0.480
#> GSM217661 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217662 2 0.0880 0.924 0.000 0.968 0.000 0.000 0.032
#> GSM217663 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217664 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.952 0.000 1.000 0.000 0.000 0.000
#> GSM217666 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217667 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217668 4 0.0880 0.942 0.000 0.000 0.000 0.968 0.032
#> GSM217669 4 0.1608 0.932 0.000 0.000 0.000 0.928 0.072
#> GSM217670 4 0.0880 0.942 0.000 0.000 0.000 0.968 0.032
#> GSM217671 4 0.0880 0.942 0.000 0.000 0.000 0.968 0.032
#> GSM217672 4 0.0880 0.942 0.000 0.000 0.000 0.968 0.032
#> GSM217673 4 0.0880 0.942 0.000 0.000 0.000 0.968 0.032
#> GSM217674 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.5009 0.219 0.428 0.000 0.000 0.540 0.032
#> GSM217685 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217690 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217691 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217692 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217693 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217694 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217695 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217696 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217697 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217698 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217699 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217704 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217705 4 0.0404 0.945 0.000 0.000 0.000 0.988 0.012
#> GSM217706 4 0.0290 0.946 0.000 0.000 0.000 0.992 0.008
#> GSM217707 4 0.0290 0.946 0.000 0.000 0.000 0.992 0.008
#> GSM217708 4 0.2230 0.892 0.000 0.000 0.000 0.884 0.116
#> GSM217709 4 0.2230 0.892 0.000 0.000 0.000 0.884 0.116
#> GSM217710 4 0.2561 0.873 0.000 0.000 0.000 0.856 0.144
#> GSM217711 4 0.2561 0.873 0.000 0.000 0.000 0.856 0.144
#> GSM217712 4 0.0404 0.945 0.000 0.000 0.000 0.988 0.012
#> GSM217713 4 0.0510 0.944 0.000 0.000 0.000 0.984 0.016
#> GSM217714 4 0.0794 0.943 0.000 0.000 0.000 0.972 0.028
#> GSM217715 4 0.0880 0.942 0.000 0.000 0.000 0.968 0.032
#> GSM217716 4 0.0510 0.945 0.000 0.000 0.000 0.984 0.016
#> GSM217717 4 0.0404 0.945 0.000 0.000 0.000 0.988 0.012
#> GSM217718 4 0.0703 0.942 0.000 0.000 0.000 0.976 0.024
#> GSM217719 4 0.0510 0.944 0.000 0.000 0.000 0.984 0.016
#> GSM217720 4 0.0794 0.943 0.000 0.000 0.000 0.972 0.028
#> GSM217721 4 0.0510 0.944 0.000 0.000 0.000 0.984 0.016
#> GSM217722 4 0.0510 0.945 0.000 0.000 0.000 0.984 0.016
#> GSM217723 1 0.2074 0.911 0.896 0.000 0.000 0.000 0.104
#> GSM217724 1 0.1478 0.943 0.936 0.000 0.000 0.000 0.064
#> GSM217725 1 0.1965 0.918 0.904 0.000 0.000 0.000 0.096
#> GSM217726 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.1792 0.928 0.916 0.000 0.000 0.000 0.084
#> GSM217729 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.986 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.3143 0.912 0.000 0.204 0.000 0.000 0.796
#> GSM217738 5 0.3143 0.912 0.000 0.204 0.000 0.000 0.796
#> GSM217739 5 0.3305 0.914 0.000 0.224 0.000 0.000 0.776
#> GSM217740 5 0.3305 0.914 0.000 0.224 0.000 0.000 0.776
#> GSM217741 5 0.3684 0.883 0.000 0.280 0.000 0.000 0.720
#> GSM217742 5 0.3534 0.901 0.000 0.256 0.000 0.000 0.744
#> GSM217743 5 0.3707 0.879 0.000 0.284 0.000 0.000 0.716
#> GSM217744 5 0.3730 0.874 0.000 0.288 0.000 0.000 0.712
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0260 0.968 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM217645 2 0.0260 0.968 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM217646 2 0.0146 0.970 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217647 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217648 2 0.0508 0.962 0.000 0.984 0.000 0.000 0.012 0.004
#> GSM217649 2 0.0146 0.970 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217650 2 0.0146 0.970 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217651 2 0.0458 0.960 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217652 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.0146 0.969 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217654 5 0.5270 -0.613 0.000 0.100 0.000 0.000 0.496 0.404
#> GSM217655 2 0.5121 0.285 0.000 0.568 0.000 0.000 0.100 0.332
#> GSM217656 6 0.4089 0.000 0.000 0.000 0.008 0.000 0.468 0.524
#> GSM217657 5 0.4165 -0.790 0.000 0.012 0.000 0.000 0.536 0.452
#> GSM217658 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.0146 0.970 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217660 5 0.3737 0.177 0.000 0.392 0.000 0.000 0.608 0.000
#> GSM217661 2 0.0146 0.970 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217662 2 0.1152 0.929 0.000 0.952 0.000 0.000 0.044 0.004
#> GSM217663 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217667 2 0.0000 0.971 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217668 4 0.1082 0.829 0.000 0.000 0.000 0.956 0.004 0.040
#> GSM217669 4 0.1753 0.825 0.000 0.000 0.000 0.912 0.004 0.084
#> GSM217670 4 0.1010 0.835 0.000 0.000 0.000 0.960 0.004 0.036
#> GSM217671 4 0.0935 0.830 0.000 0.000 0.000 0.964 0.004 0.032
#> GSM217672 4 0.0935 0.832 0.000 0.000 0.000 0.964 0.004 0.032
#> GSM217673 4 0.0777 0.835 0.000 0.000 0.000 0.972 0.004 0.024
#> GSM217674 1 0.0291 0.952 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217675 1 0.0508 0.947 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM217676 1 0.0291 0.952 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217677 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0146 0.953 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217680 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0291 0.952 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217683 1 0.0291 0.952 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217684 4 0.4609 0.348 0.344 0.000 0.000 0.612 0.008 0.036
#> GSM217685 3 0.0865 0.935 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217686 3 0.0865 0.935 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217687 3 0.0865 0.935 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217688 3 0.0865 0.935 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217689 3 0.0937 0.933 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM217690 3 0.0937 0.933 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM217691 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217692 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217693 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217694 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217695 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217696 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217697 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217698 3 0.1967 0.938 0.000 0.000 0.904 0.000 0.012 0.084
#> GSM217699 3 0.0000 0.942 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0622 0.943 0.000 0.000 0.980 0.000 0.008 0.012
#> GSM217701 3 0.0000 0.942 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.942 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.0937 0.933 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM217704 3 0.2019 0.937 0.000 0.000 0.900 0.000 0.012 0.088
#> GSM217705 4 0.1644 0.851 0.000 0.000 0.000 0.920 0.004 0.076
#> GSM217706 4 0.2135 0.852 0.000 0.000 0.000 0.872 0.000 0.128
#> GSM217707 4 0.2454 0.850 0.000 0.000 0.000 0.840 0.000 0.160
#> GSM217708 4 0.3774 0.666 0.000 0.000 0.000 0.592 0.000 0.408
#> GSM217709 4 0.3817 0.654 0.000 0.000 0.000 0.568 0.000 0.432
#> GSM217710 4 0.3999 0.569 0.000 0.000 0.000 0.500 0.004 0.496
#> GSM217711 4 0.3999 0.569 0.000 0.000 0.000 0.500 0.004 0.496
#> GSM217712 4 0.2491 0.847 0.000 0.000 0.000 0.836 0.000 0.164
#> GSM217713 4 0.2178 0.850 0.000 0.000 0.000 0.868 0.000 0.132
#> GSM217714 4 0.0547 0.845 0.000 0.000 0.000 0.980 0.000 0.020
#> GSM217715 4 0.0603 0.836 0.000 0.000 0.000 0.980 0.004 0.016
#> GSM217716 4 0.2003 0.852 0.000 0.000 0.000 0.884 0.000 0.116
#> GSM217717 4 0.2340 0.847 0.000 0.000 0.000 0.852 0.000 0.148
#> GSM217718 4 0.2793 0.835 0.000 0.000 0.000 0.800 0.000 0.200
#> GSM217719 4 0.2793 0.835 0.000 0.000 0.000 0.800 0.000 0.200
#> GSM217720 4 0.1285 0.841 0.000 0.000 0.000 0.944 0.004 0.052
#> GSM217721 4 0.2597 0.842 0.000 0.000 0.000 0.824 0.000 0.176
#> GSM217722 4 0.2527 0.845 0.000 0.000 0.000 0.832 0.000 0.168
#> GSM217723 1 0.3595 0.668 0.704 0.000 0.000 0.008 0.000 0.288
#> GSM217724 1 0.2854 0.777 0.792 0.000 0.000 0.000 0.000 0.208
#> GSM217725 1 0.3076 0.741 0.760 0.000 0.000 0.000 0.000 0.240
#> GSM217726 1 0.0291 0.952 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217727 1 0.0291 0.952 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217728 1 0.2996 0.754 0.772 0.000 0.000 0.000 0.000 0.228
#> GSM217729 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.954 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0790 0.667 0.000 0.032 0.000 0.000 0.968 0.000
#> GSM217738 5 0.0790 0.667 0.000 0.032 0.000 0.000 0.968 0.000
#> GSM217739 5 0.1007 0.686 0.000 0.044 0.000 0.000 0.956 0.000
#> GSM217740 5 0.1007 0.686 0.000 0.044 0.000 0.000 0.956 0.000
#> GSM217741 5 0.1387 0.690 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM217742 5 0.1267 0.691 0.000 0.060 0.000 0.000 0.940 0.000
#> GSM217743 5 0.1387 0.690 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM217744 5 0.1444 0.684 0.000 0.072 0.000 0.000 0.928 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:skmeans 101 3.32e-01 2
#> SD:skmeans 101 2.94e-07 3
#> SD:skmeans 100 5.38e-07 4
#> SD:skmeans 99 1.86e-09 5
#> SD:skmeans 95 2.72e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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.671 0.879 0.941 0.4476 0.563 0.563
#> 3 3 1.000 0.986 0.994 0.4123 0.711 0.526
#> 4 4 0.949 0.928 0.968 0.1875 0.881 0.678
#> 5 5 0.939 0.933 0.970 0.0516 0.962 0.848
#> 6 6 0.864 0.758 0.880 0.0347 0.995 0.979
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 3 4
There is also optional best \(k\) = 3 4 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM217644 1 0.7453 0.780 0.788 0.212
#> GSM217645 1 0.7299 0.787 0.796 0.204
#> GSM217646 1 0.7453 0.780 0.788 0.212
#> GSM217647 1 0.9393 0.543 0.644 0.356
#> GSM217648 2 0.8763 0.539 0.296 0.704
#> GSM217649 1 0.7453 0.780 0.788 0.212
#> GSM217650 1 0.7453 0.780 0.788 0.212
#> GSM217651 2 0.8327 0.607 0.264 0.736
#> GSM217652 1 0.7453 0.780 0.788 0.212
#> GSM217653 2 0.9393 0.384 0.356 0.644
#> GSM217654 1 0.7219 0.791 0.800 0.200
#> GSM217655 1 0.7219 0.791 0.800 0.200
#> GSM217656 1 0.6712 0.809 0.824 0.176
#> GSM217657 1 0.7219 0.791 0.800 0.200
#> GSM217658 1 0.7453 0.780 0.788 0.212
#> GSM217659 1 0.7453 0.780 0.788 0.212
#> GSM217660 1 0.7883 0.750 0.764 0.236
#> GSM217661 1 0.7453 0.780 0.788 0.212
#> GSM217662 2 0.2043 0.931 0.032 0.968
#> GSM217663 1 0.7453 0.780 0.788 0.212
#> GSM217664 1 0.7453 0.780 0.788 0.212
#> GSM217665 1 0.7453 0.780 0.788 0.212
#> GSM217666 1 0.9710 0.442 0.600 0.400
#> GSM217667 1 0.9983 0.212 0.524 0.476
#> GSM217668 1 0.0672 0.918 0.992 0.008
#> GSM217669 1 0.0000 0.923 1.000 0.000
#> GSM217670 1 0.0000 0.923 1.000 0.000
#> GSM217671 1 0.0000 0.923 1.000 0.000
#> GSM217672 1 0.0000 0.923 1.000 0.000
#> GSM217673 1 0.0000 0.923 1.000 0.000
#> GSM217674 1 0.0000 0.923 1.000 0.000
#> GSM217675 1 0.0000 0.923 1.000 0.000
#> GSM217676 1 0.0000 0.923 1.000 0.000
#> GSM217677 1 0.0000 0.923 1.000 0.000
#> GSM217678 1 0.0000 0.923 1.000 0.000
#> GSM217679 1 0.0000 0.923 1.000 0.000
#> GSM217680 1 0.0000 0.923 1.000 0.000
#> GSM217681 1 0.0000 0.923 1.000 0.000
#> GSM217682 1 0.0000 0.923 1.000 0.000
#> GSM217683 1 0.0000 0.923 1.000 0.000
#> GSM217684 1 0.0000 0.923 1.000 0.000
#> GSM217685 2 0.0000 0.957 0.000 1.000
#> GSM217686 2 0.0000 0.957 0.000 1.000
#> GSM217687 2 0.0000 0.957 0.000 1.000
#> GSM217688 2 0.0000 0.957 0.000 1.000
#> GSM217689 2 0.1843 0.934 0.028 0.972
#> GSM217690 2 0.2603 0.919 0.044 0.956
#> GSM217691 2 0.0000 0.957 0.000 1.000
#> GSM217692 2 0.0000 0.957 0.000 1.000
#> GSM217693 2 0.0000 0.957 0.000 1.000
#> GSM217694 2 0.0000 0.957 0.000 1.000
#> GSM217695 2 0.0000 0.957 0.000 1.000
#> GSM217696 2 0.0000 0.957 0.000 1.000
#> GSM217697 2 0.0000 0.957 0.000 1.000
#> GSM217698 2 0.0000 0.957 0.000 1.000
#> GSM217699 2 0.0000 0.957 0.000 1.000
#> GSM217700 2 0.0000 0.957 0.000 1.000
#> GSM217701 2 0.0376 0.954 0.004 0.996
#> GSM217702 2 0.0000 0.957 0.000 1.000
#> GSM217703 2 0.0376 0.954 0.004 0.996
#> GSM217704 2 0.0000 0.957 0.000 1.000
#> GSM217705 1 0.0000 0.923 1.000 0.000
#> GSM217706 1 0.0000 0.923 1.000 0.000
#> GSM217707 1 0.0000 0.923 1.000 0.000
#> GSM217708 1 0.0000 0.923 1.000 0.000
#> GSM217709 1 0.0000 0.923 1.000 0.000
#> GSM217710 1 0.0000 0.923 1.000 0.000
#> GSM217711 1 0.0000 0.923 1.000 0.000
#> GSM217712 1 0.0000 0.923 1.000 0.000
#> GSM217713 1 0.0000 0.923 1.000 0.000
#> GSM217714 1 0.0000 0.923 1.000 0.000
#> GSM217715 1 0.0000 0.923 1.000 0.000
#> GSM217716 1 0.0000 0.923 1.000 0.000
#> GSM217717 1 0.0000 0.923 1.000 0.000
#> GSM217718 1 0.0000 0.923 1.000 0.000
#> GSM217719 1 0.0000 0.923 1.000 0.000
#> GSM217720 1 0.0000 0.923 1.000 0.000
#> GSM217721 1 0.0000 0.923 1.000 0.000
#> GSM217722 1 0.0000 0.923 1.000 0.000
#> GSM217723 1 0.0000 0.923 1.000 0.000
#> GSM217724 1 0.0000 0.923 1.000 0.000
#> GSM217725 1 0.0000 0.923 1.000 0.000
#> GSM217726 1 0.0000 0.923 1.000 0.000
#> GSM217727 1 0.0000 0.923 1.000 0.000
#> GSM217728 1 0.0000 0.923 1.000 0.000
#> GSM217729 1 0.0000 0.923 1.000 0.000
#> GSM217730 1 0.0000 0.923 1.000 0.000
#> GSM217731 1 0.0000 0.923 1.000 0.000
#> GSM217732 1 0.0000 0.923 1.000 0.000
#> GSM217733 1 0.0000 0.923 1.000 0.000
#> GSM217734 1 0.0000 0.923 1.000 0.000
#> GSM217735 1 0.0000 0.923 1.000 0.000
#> GSM217736 1 0.0000 0.923 1.000 0.000
#> GSM217737 2 0.5842 0.809 0.140 0.860
#> GSM217738 2 0.0000 0.957 0.000 1.000
#> GSM217739 2 0.0000 0.957 0.000 1.000
#> GSM217740 2 0.0000 0.957 0.000 1.000
#> GSM217741 2 0.0000 0.957 0.000 1.000
#> GSM217742 2 0.0000 0.957 0.000 1.000
#> GSM217743 2 0.0000 0.957 0.000 1.000
#> GSM217744 2 0.0000 0.957 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217645 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217646 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217649 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217650 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217651 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217652 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217653 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217654 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217655 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217656 2 0.7828 0.584 0.168 0.672 0.160
#> GSM217657 2 0.1267 0.959 0.024 0.972 0.004
#> GSM217658 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217659 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217660 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217661 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217662 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217663 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217664 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217668 1 0.5216 0.643 0.740 0.260 0.000
#> GSM217669 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217723 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217724 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217725 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217726 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217728 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217729 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217737 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217738 2 0.0237 0.985 0.000 0.996 0.004
#> GSM217739 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.988 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217645 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217646 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0188 0.9548 0.000 0.996 0.000 0.004
#> GSM217649 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217654 2 0.3074 0.8046 0.000 0.848 0.000 0.152
#> GSM217655 2 0.2973 0.8145 0.000 0.856 0.000 0.144
#> GSM217656 2 0.6503 0.0466 0.004 0.472 0.060 0.464
#> GSM217657 2 0.4972 0.2062 0.000 0.544 0.000 0.456
#> GSM217658 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217660 2 0.0188 0.9548 0.000 0.996 0.000 0.004
#> GSM217661 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217663 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.9556 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0188 0.9548 0.000 0.996 0.000 0.004
#> GSM217668 4 0.0657 0.9480 0.012 0.004 0.000 0.984
#> GSM217669 4 0.2469 0.8772 0.108 0.000 0.000 0.892
#> GSM217670 4 0.4522 0.5488 0.320 0.000 0.000 0.680
#> GSM217671 4 0.3764 0.7409 0.216 0.000 0.000 0.784
#> GSM217672 4 0.1867 0.9071 0.072 0.000 0.000 0.928
#> GSM217673 4 0.1022 0.9407 0.032 0.000 0.000 0.968
#> GSM217674 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217684 1 0.4522 0.4900 0.680 0.000 0.000 0.320
#> GSM217685 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217686 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217687 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217688 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217689 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217690 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217691 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217703 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217704 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217705 4 0.0469 0.9506 0.012 0.000 0.000 0.988
#> GSM217706 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217707 4 0.1022 0.9401 0.032 0.000 0.000 0.968
#> GSM217708 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217709 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217710 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217711 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217712 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217713 4 0.0469 0.9507 0.012 0.000 0.000 0.988
#> GSM217714 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217715 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217716 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217717 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217718 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217719 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217720 4 0.0592 0.9492 0.016 0.000 0.000 0.984
#> GSM217721 4 0.0336 0.9516 0.008 0.000 0.000 0.992
#> GSM217722 4 0.0707 0.9472 0.020 0.000 0.000 0.980
#> GSM217723 4 0.4624 0.5121 0.340 0.000 0.000 0.660
#> GSM217724 1 0.3528 0.7491 0.808 0.000 0.000 0.192
#> GSM217725 1 0.0336 0.9669 0.992 0.000 0.000 0.008
#> GSM217726 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217728 1 0.0921 0.9501 0.972 0.000 0.000 0.028
#> GSM217729 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217731 1 0.1022 0.9466 0.968 0.000 0.000 0.032
#> GSM217732 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> GSM217737 2 0.0336 0.9537 0.000 0.992 0.000 0.008
#> GSM217738 2 0.0895 0.9446 0.000 0.976 0.004 0.020
#> GSM217739 2 0.0336 0.9537 0.000 0.992 0.000 0.008
#> GSM217740 2 0.0336 0.9537 0.000 0.992 0.000 0.008
#> GSM217741 2 0.0336 0.9537 0.000 0.992 0.000 0.008
#> GSM217742 2 0.0336 0.9537 0.000 0.992 0.000 0.008
#> GSM217743 2 0.0336 0.9537 0.000 0.992 0.000 0.008
#> GSM217744 2 0.0336 0.9537 0.000 0.992 0.000 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217645 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217646 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217648 2 0.0963 0.911 0.000 0.964 0.000 0.000 0.036
#> GSM217649 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217651 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217652 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217653 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217654 2 0.2516 0.819 0.000 0.860 0.000 0.140 0.000
#> GSM217655 2 0.2516 0.819 0.000 0.860 0.000 0.140 0.000
#> GSM217656 2 0.3266 0.748 0.000 0.796 0.004 0.200 0.000
#> GSM217657 2 0.4049 0.754 0.000 0.780 0.000 0.164 0.056
#> GSM217658 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217660 2 0.3752 0.631 0.000 0.708 0.000 0.000 0.292
#> GSM217661 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217662 2 0.3210 0.725 0.000 0.788 0.000 0.000 0.212
#> GSM217663 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.933 0.000 1.000 0.000 0.000 0.000
#> GSM217667 2 0.2329 0.839 0.000 0.876 0.000 0.000 0.124
#> GSM217668 4 0.1168 0.920 0.008 0.032 0.000 0.960 0.000
#> GSM217669 4 0.1410 0.907 0.060 0.000 0.000 0.940 0.000
#> GSM217670 4 0.3796 0.573 0.300 0.000 0.000 0.700 0.000
#> GSM217671 4 0.2605 0.808 0.148 0.000 0.000 0.852 0.000
#> GSM217672 4 0.1043 0.921 0.040 0.000 0.000 0.960 0.000
#> GSM217673 4 0.0794 0.932 0.028 0.000 0.000 0.972 0.000
#> GSM217674 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.3796 0.541 0.700 0.000 0.000 0.300 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0162 0.943 0.004 0.000 0.000 0.996 0.000
#> GSM217706 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.1121 0.919 0.044 0.000 0.000 0.956 0.000
#> GSM217708 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217709 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217710 4 0.0290 0.942 0.008 0.000 0.000 0.992 0.000
#> GSM217711 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217712 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217713 4 0.0290 0.942 0.008 0.000 0.000 0.992 0.000
#> GSM217714 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217718 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217719 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217720 4 0.0404 0.941 0.012 0.000 0.000 0.988 0.000
#> GSM217721 4 0.0000 0.944 0.000 0.000 0.000 1.000 0.000
#> GSM217722 4 0.0404 0.941 0.012 0.000 0.000 0.988 0.000
#> GSM217723 4 0.4210 0.310 0.412 0.000 0.000 0.588 0.000
#> GSM217724 1 0.2471 0.824 0.864 0.000 0.000 0.136 0.000
#> GSM217725 1 0.0290 0.967 0.992 0.000 0.000 0.008 0.000
#> GSM217726 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0794 0.949 0.972 0.000 0.000 0.028 0.000
#> GSM217729 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0880 0.945 0.968 0.000 0.000 0.032 0.000
#> GSM217732 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.973 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM217738 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM217739 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM217740 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM217741 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM217742 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM217743 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM217744 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.2969 0.503 0.000 0.776 0.000 0.000 0.000 0.224
#> GSM217645 2 0.2562 0.599 0.000 0.828 0.000 0.000 0.000 0.172
#> GSM217646 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217648 2 0.0713 0.777 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM217649 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217651 2 0.1387 0.744 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM217652 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217654 2 0.5166 -0.614 0.000 0.524 0.000 0.092 0.000 0.384
#> GSM217655 2 0.4727 0.111 0.000 0.676 0.000 0.096 0.004 0.224
#> GSM217656 6 0.6184 0.000 0.000 0.380 0.040 0.120 0.000 0.460
#> GSM217657 2 0.5782 -0.797 0.000 0.456 0.000 0.104 0.020 0.420
#> GSM217658 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 2 0.5758 -0.160 0.000 0.496 0.000 0.000 0.304 0.200
#> GSM217661 2 0.0363 0.794 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM217662 2 0.3043 0.498 0.000 0.792 0.000 0.000 0.200 0.008
#> GSM217663 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217667 2 0.1556 0.715 0.000 0.920 0.000 0.000 0.080 0.000
#> GSM217668 4 0.1710 0.804 0.016 0.020 0.000 0.936 0.000 0.028
#> GSM217669 4 0.2679 0.793 0.040 0.000 0.000 0.864 0.000 0.096
#> GSM217670 4 0.3405 0.491 0.272 0.000 0.000 0.724 0.000 0.004
#> GSM217671 4 0.1757 0.770 0.076 0.000 0.000 0.916 0.000 0.008
#> GSM217672 4 0.0891 0.805 0.024 0.000 0.000 0.968 0.000 0.008
#> GSM217673 4 0.0993 0.809 0.024 0.000 0.000 0.964 0.000 0.012
#> GSM217674 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.2260 0.845 0.860 0.000 0.000 0.000 0.000 0.140
#> GSM217677 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.1556 0.891 0.920 0.000 0.000 0.000 0.000 0.080
#> GSM217679 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.3405 0.627 0.724 0.000 0.000 0.272 0.000 0.004
#> GSM217685 3 0.0000 0.817 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217686 3 0.0000 0.817 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217687 3 0.0000 0.817 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217688 3 0.0000 0.817 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217689 3 0.0000 0.817 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217690 3 0.0000 0.817 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217691 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217692 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217693 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217694 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217695 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217696 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217697 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217698 3 0.3244 0.816 0.000 0.000 0.732 0.000 0.000 0.268
#> GSM217699 3 0.1007 0.823 0.000 0.000 0.956 0.000 0.000 0.044
#> GSM217700 3 0.3050 0.818 0.000 0.000 0.764 0.000 0.000 0.236
#> GSM217701 3 0.0458 0.820 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM217702 3 0.1007 0.823 0.000 0.000 0.956 0.000 0.000 0.044
#> GSM217703 3 0.0000 0.817 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217704 3 0.3747 0.797 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM217705 4 0.2595 0.776 0.004 0.000 0.000 0.836 0.000 0.160
#> GSM217706 4 0.0260 0.810 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217707 4 0.2384 0.804 0.032 0.000 0.000 0.884 0.000 0.084
#> GSM217708 4 0.3695 0.634 0.000 0.000 0.000 0.624 0.000 0.376
#> GSM217709 4 0.3684 0.630 0.000 0.000 0.000 0.628 0.000 0.372
#> GSM217710 4 0.3961 0.534 0.004 0.000 0.000 0.556 0.000 0.440
#> GSM217711 4 0.3659 0.637 0.000 0.000 0.000 0.636 0.000 0.364
#> GSM217712 4 0.0146 0.811 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217713 4 0.2805 0.745 0.004 0.000 0.000 0.812 0.000 0.184
#> GSM217714 4 0.0000 0.810 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217715 4 0.0260 0.809 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217716 4 0.0000 0.810 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217717 4 0.0146 0.810 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217718 4 0.2912 0.722 0.000 0.000 0.000 0.784 0.000 0.216
#> GSM217719 4 0.2762 0.737 0.000 0.000 0.000 0.804 0.000 0.196
#> GSM217720 4 0.2669 0.776 0.008 0.000 0.000 0.836 0.000 0.156
#> GSM217721 4 0.0000 0.810 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217722 4 0.2946 0.767 0.012 0.000 0.000 0.812 0.000 0.176
#> GSM217723 4 0.5954 0.296 0.220 0.000 0.000 0.408 0.000 0.372
#> GSM217724 1 0.3739 0.754 0.768 0.000 0.000 0.056 0.000 0.176
#> GSM217725 1 0.3620 0.585 0.648 0.000 0.000 0.000 0.000 0.352
#> GSM217726 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.2854 0.785 0.792 0.000 0.000 0.000 0.000 0.208
#> GSM217729 1 0.0146 0.939 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217730 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0790 0.916 0.968 0.000 0.000 0.032 0.000 0.000
#> GSM217732 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217738 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217739 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217740 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217741 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217742 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217743 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217744 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:pam 98 1.46e-04 2
#> SD:pam 101 2.94e-07 3
#> SD:pam 98 1.21e-06 4
#> SD:pam 100 1.39e-11 5
#> SD:pam 93 2.92e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.989 0.987 0.5000 0.495 0.495
#> 3 3 1.000 0.981 0.987 0.2637 0.873 0.744
#> 4 4 0.807 0.844 0.874 0.0843 0.974 0.931
#> 5 5 0.978 0.963 0.975 0.1653 0.811 0.486
#> 6 6 0.912 0.813 0.907 0.0101 0.967 0.849
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 5
There is also optional best \(k\) = 2 3 5 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
#> GSM217644 2 0.1843 0.986 0.028 0.972
#> GSM217645 2 0.1843 0.986 0.028 0.972
#> GSM217646 2 0.1843 0.986 0.028 0.972
#> GSM217647 2 0.1843 0.986 0.028 0.972
#> GSM217648 2 0.1843 0.986 0.028 0.972
#> GSM217649 2 0.1843 0.986 0.028 0.972
#> GSM217650 2 0.1843 0.986 0.028 0.972
#> GSM217651 2 0.1843 0.986 0.028 0.972
#> GSM217652 2 0.1843 0.986 0.028 0.972
#> GSM217653 2 0.1843 0.986 0.028 0.972
#> GSM217654 2 0.1843 0.986 0.028 0.972
#> GSM217655 2 0.1843 0.986 0.028 0.972
#> GSM217656 2 0.3733 0.944 0.072 0.928
#> GSM217657 2 0.1843 0.986 0.028 0.972
#> GSM217658 2 0.1843 0.986 0.028 0.972
#> GSM217659 2 0.1843 0.986 0.028 0.972
#> GSM217660 2 0.1843 0.986 0.028 0.972
#> GSM217661 2 0.1843 0.986 0.028 0.972
#> GSM217662 2 0.1843 0.986 0.028 0.972
#> GSM217663 2 0.1843 0.986 0.028 0.972
#> GSM217664 2 0.1843 0.986 0.028 0.972
#> GSM217665 2 0.1843 0.986 0.028 0.972
#> GSM217666 2 0.1843 0.986 0.028 0.972
#> GSM217667 2 0.1843 0.986 0.028 0.972
#> GSM217668 1 0.0672 0.996 0.992 0.008
#> GSM217669 1 0.0672 0.996 0.992 0.008
#> GSM217670 1 0.0672 0.996 0.992 0.008
#> GSM217671 1 0.0672 0.996 0.992 0.008
#> GSM217672 1 0.0672 0.996 0.992 0.008
#> GSM217673 1 0.0672 0.996 0.992 0.008
#> GSM217674 1 0.0000 0.996 1.000 0.000
#> GSM217675 1 0.0000 0.996 1.000 0.000
#> GSM217676 1 0.0000 0.996 1.000 0.000
#> GSM217677 1 0.0000 0.996 1.000 0.000
#> GSM217678 1 0.0000 0.996 1.000 0.000
#> GSM217679 1 0.0000 0.996 1.000 0.000
#> GSM217680 1 0.0000 0.996 1.000 0.000
#> GSM217681 1 0.0000 0.996 1.000 0.000
#> GSM217682 1 0.0000 0.996 1.000 0.000
#> GSM217683 1 0.0000 0.996 1.000 0.000
#> GSM217684 1 0.0672 0.996 0.992 0.008
#> GSM217685 2 0.0672 0.978 0.008 0.992
#> GSM217686 2 0.0672 0.978 0.008 0.992
#> GSM217687 2 0.0672 0.978 0.008 0.992
#> GSM217688 2 0.0672 0.978 0.008 0.992
#> GSM217689 2 0.0672 0.978 0.008 0.992
#> GSM217690 2 0.0672 0.978 0.008 0.992
#> GSM217691 2 0.0672 0.978 0.008 0.992
#> GSM217692 2 0.0672 0.978 0.008 0.992
#> GSM217693 2 0.0672 0.978 0.008 0.992
#> GSM217694 2 0.0672 0.978 0.008 0.992
#> GSM217695 2 0.0672 0.978 0.008 0.992
#> GSM217696 2 0.0672 0.978 0.008 0.992
#> GSM217697 2 0.0672 0.978 0.008 0.992
#> GSM217698 2 0.0672 0.978 0.008 0.992
#> GSM217699 2 0.0672 0.978 0.008 0.992
#> GSM217700 2 0.0672 0.978 0.008 0.992
#> GSM217701 2 0.0672 0.978 0.008 0.992
#> GSM217702 2 0.0672 0.978 0.008 0.992
#> GSM217703 2 0.0672 0.978 0.008 0.992
#> GSM217704 2 0.0672 0.978 0.008 0.992
#> GSM217705 1 0.0672 0.996 0.992 0.008
#> GSM217706 1 0.0672 0.996 0.992 0.008
#> GSM217707 1 0.0672 0.996 0.992 0.008
#> GSM217708 1 0.0672 0.996 0.992 0.008
#> GSM217709 1 0.0672 0.996 0.992 0.008
#> GSM217710 1 0.0672 0.996 0.992 0.008
#> GSM217711 1 0.0672 0.996 0.992 0.008
#> GSM217712 1 0.0672 0.996 0.992 0.008
#> GSM217713 1 0.0672 0.996 0.992 0.008
#> GSM217714 1 0.0672 0.996 0.992 0.008
#> GSM217715 1 0.0672 0.996 0.992 0.008
#> GSM217716 1 0.0672 0.996 0.992 0.008
#> GSM217717 1 0.0672 0.996 0.992 0.008
#> GSM217718 1 0.0672 0.996 0.992 0.008
#> GSM217719 1 0.0672 0.996 0.992 0.008
#> GSM217720 1 0.0672 0.996 0.992 0.008
#> GSM217721 1 0.0672 0.996 0.992 0.008
#> GSM217722 1 0.0672 0.996 0.992 0.008
#> GSM217723 1 0.0000 0.996 1.000 0.000
#> GSM217724 1 0.0000 0.996 1.000 0.000
#> GSM217725 1 0.0000 0.996 1.000 0.000
#> GSM217726 1 0.0000 0.996 1.000 0.000
#> GSM217727 1 0.0000 0.996 1.000 0.000
#> GSM217728 1 0.0000 0.996 1.000 0.000
#> GSM217729 1 0.0000 0.996 1.000 0.000
#> GSM217730 1 0.0000 0.996 1.000 0.000
#> GSM217731 1 0.0000 0.996 1.000 0.000
#> GSM217732 1 0.0000 0.996 1.000 0.000
#> GSM217733 1 0.0000 0.996 1.000 0.000
#> GSM217734 1 0.0000 0.996 1.000 0.000
#> GSM217735 1 0.0000 0.996 1.000 0.000
#> GSM217736 1 0.0000 0.996 1.000 0.000
#> GSM217737 2 0.1843 0.986 0.028 0.972
#> GSM217738 2 0.1843 0.986 0.028 0.972
#> GSM217739 2 0.1843 0.986 0.028 0.972
#> GSM217740 2 0.1843 0.986 0.028 0.972
#> GSM217741 2 0.1843 0.986 0.028 0.972
#> GSM217742 2 0.1843 0.986 0.028 0.972
#> GSM217743 2 0.1843 0.986 0.028 0.972
#> GSM217744 2 0.1843 0.986 0.028 0.972
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217645 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217646 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217647 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217648 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217649 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217650 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217651 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217652 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217653 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217654 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217655 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217656 2 0.0892 0.980 0.000 0.980 0.02
#> GSM217657 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217658 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217659 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217660 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217661 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217662 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217663 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217664 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217665 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217666 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217667 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217668 1 0.4178 0.836 0.828 0.172 0.00
#> GSM217669 1 0.0892 0.968 0.980 0.020 0.00
#> GSM217670 1 0.2356 0.945 0.928 0.072 0.00
#> GSM217671 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217672 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217673 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217674 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217675 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217676 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217677 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217678 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217679 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217680 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217681 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217682 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217683 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217684 1 0.2625 0.936 0.916 0.084 0.00
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.00
#> GSM217705 1 0.2537 0.939 0.920 0.080 0.00
#> GSM217706 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217707 1 0.0424 0.971 0.992 0.008 0.00
#> GSM217708 1 0.1411 0.963 0.964 0.036 0.00
#> GSM217709 1 0.0424 0.971 0.992 0.008 0.00
#> GSM217710 1 0.0424 0.971 0.992 0.008 0.00
#> GSM217711 1 0.0424 0.971 0.992 0.008 0.00
#> GSM217712 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217713 1 0.2537 0.939 0.920 0.080 0.00
#> GSM217714 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217715 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217716 1 0.2066 0.953 0.940 0.060 0.00
#> GSM217717 1 0.2165 0.951 0.936 0.064 0.00
#> GSM217718 1 0.0747 0.969 0.984 0.016 0.00
#> GSM217719 1 0.0424 0.971 0.992 0.008 0.00
#> GSM217720 1 0.2625 0.936 0.916 0.084 0.00
#> GSM217721 1 0.2356 0.945 0.928 0.072 0.00
#> GSM217722 1 0.1163 0.966 0.972 0.028 0.00
#> GSM217723 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217724 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217725 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217726 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217727 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217728 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217729 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217730 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217731 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217732 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217733 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217734 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217735 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217736 1 0.0000 0.971 1.000 0.000 0.00
#> GSM217737 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217738 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217739 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217740 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217741 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217742 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217743 2 0.0000 0.999 0.000 1.000 0.00
#> GSM217744 2 0.0000 0.999 0.000 1.000 0.00
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217645 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217646 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217647 2 0.0188 0.958 0.000 0.996 0.000 0.004
#> GSM217648 2 0.0188 0.958 0.000 0.996 0.000 0.004
#> GSM217649 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217650 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217651 2 0.0000 0.958 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217653 2 0.0188 0.958 0.000 0.996 0.000 0.004
#> GSM217654 2 0.0592 0.956 0.000 0.984 0.000 0.016
#> GSM217655 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217656 4 0.5200 0.275 0.000 0.036 0.264 0.700
#> GSM217657 2 0.4978 0.665 0.000 0.664 0.012 0.324
#> GSM217658 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217659 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217660 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217661 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217662 2 0.0336 0.957 0.000 0.992 0.000 0.008
#> GSM217663 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217664 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217665 2 0.0188 0.958 0.000 0.996 0.000 0.004
#> GSM217666 2 0.0188 0.958 0.000 0.996 0.000 0.004
#> GSM217667 2 0.0188 0.958 0.000 0.996 0.000 0.004
#> GSM217668 1 0.7688 0.494 0.456 0.260 0.284 0.000
#> GSM217669 1 0.4277 0.838 0.720 0.000 0.280 0.000
#> GSM217670 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217671 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217672 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217673 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217674 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217675 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217676 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217677 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217678 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217680 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217681 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217682 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217683 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217684 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217685 4 0.4877 0.293 0.000 0.000 0.408 0.592
#> GSM217686 4 0.4877 0.293 0.000 0.000 0.408 0.592
#> GSM217687 4 0.4877 0.293 0.000 0.000 0.408 0.592
#> GSM217688 4 0.4877 0.293 0.000 0.000 0.408 0.592
#> GSM217689 4 0.3907 0.487 0.000 0.000 0.232 0.768
#> GSM217690 4 0.3907 0.487 0.000 0.000 0.232 0.768
#> GSM217691 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217692 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217693 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217694 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217695 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217696 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217697 3 0.4382 0.962 0.000 0.000 0.704 0.296
#> GSM217698 3 0.4713 0.806 0.000 0.000 0.640 0.360
#> GSM217699 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217700 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217701 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217702 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217703 4 0.0707 0.416 0.000 0.000 0.020 0.980
#> GSM217704 3 0.4304 0.984 0.000 0.000 0.716 0.284
#> GSM217705 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217706 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217707 1 0.3024 0.849 0.852 0.000 0.148 0.000
#> GSM217708 1 0.4072 0.841 0.748 0.000 0.252 0.000
#> GSM217709 1 0.4250 0.839 0.724 0.000 0.276 0.000
#> GSM217710 1 0.4277 0.838 0.720 0.000 0.280 0.000
#> GSM217711 1 0.4277 0.838 0.720 0.000 0.280 0.000
#> GSM217712 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217713 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217714 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217715 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217716 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217717 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217718 1 0.4277 0.838 0.720 0.000 0.280 0.000
#> GSM217719 1 0.4250 0.839 0.724 0.000 0.276 0.000
#> GSM217720 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217721 1 0.4304 0.837 0.716 0.000 0.284 0.000
#> GSM217722 1 0.2921 0.849 0.860 0.000 0.140 0.000
#> GSM217723 1 0.0188 0.851 0.996 0.000 0.004 0.000
#> GSM217724 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> GSM217725 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> GSM217726 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217727 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217728 1 0.0000 0.851 1.000 0.000 0.000 0.000
#> GSM217729 1 0.0336 0.851 0.992 0.000 0.008 0.000
#> GSM217730 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217731 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217732 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217733 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217734 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217735 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217736 1 0.0188 0.851 0.996 0.000 0.000 0.004
#> GSM217737 2 0.3726 0.810 0.000 0.788 0.000 0.212
#> GSM217738 2 0.3873 0.794 0.000 0.772 0.000 0.228
#> GSM217739 2 0.3486 0.831 0.000 0.812 0.000 0.188
#> GSM217740 2 0.3569 0.824 0.000 0.804 0.000 0.196
#> GSM217741 2 0.0921 0.949 0.000 0.972 0.000 0.028
#> GSM217742 2 0.0921 0.949 0.000 0.972 0.000 0.028
#> GSM217743 2 0.0921 0.949 0.000 0.972 0.000 0.028
#> GSM217744 2 0.0921 0.949 0.000 0.972 0.000 0.028
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217645 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217646 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217647 5 0.2424 0.919 0.000 0.132 0.000 0.000 0.868
#> GSM217648 5 0.2424 0.919 0.000 0.132 0.000 0.000 0.868
#> GSM217649 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217650 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217651 5 0.3857 0.668 0.000 0.312 0.000 0.000 0.688
#> GSM217652 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217653 5 0.2424 0.919 0.000 0.132 0.000 0.000 0.868
#> GSM217654 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217655 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217656 2 0.3612 0.733 0.000 0.800 0.000 0.172 0.028
#> GSM217657 2 0.0703 0.929 0.000 0.976 0.000 0.000 0.024
#> GSM217658 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217659 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217660 2 0.3561 0.589 0.000 0.740 0.000 0.000 0.260
#> GSM217661 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217662 5 0.1341 0.935 0.000 0.056 0.000 0.000 0.944
#> GSM217663 2 0.2424 0.817 0.000 0.868 0.000 0.000 0.132
#> GSM217664 2 0.0162 0.951 0.000 0.996 0.000 0.000 0.004
#> GSM217665 5 0.2424 0.919 0.000 0.132 0.000 0.000 0.868
#> GSM217666 5 0.2424 0.919 0.000 0.132 0.000 0.000 0.868
#> GSM217667 5 0.2424 0.919 0.000 0.132 0.000 0.000 0.868
#> GSM217668 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217669 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217670 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217671 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217672 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217673 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217674 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0162 0.996 0.996 0.000 0.000 0.000 0.004
#> GSM217677 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0324 0.995 0.992 0.000 0.000 0.004 0.004
#> GSM217679 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0324 0.995 0.992 0.000 0.000 0.004 0.004
#> GSM217681 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217685 3 0.0290 0.994 0.000 0.000 0.992 0.000 0.008
#> GSM217686 3 0.0290 0.994 0.000 0.000 0.992 0.000 0.008
#> GSM217687 3 0.0290 0.994 0.000 0.000 0.992 0.000 0.008
#> GSM217688 3 0.0290 0.994 0.000 0.000 0.992 0.000 0.008
#> GSM217689 3 0.0771 0.986 0.000 0.004 0.976 0.000 0.020
#> GSM217690 3 0.0771 0.986 0.000 0.004 0.976 0.000 0.020
#> GSM217691 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0162 0.995 0.000 0.000 0.996 0.000 0.004
#> GSM217700 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0162 0.995 0.000 0.000 0.996 0.000 0.004
#> GSM217702 3 0.0162 0.995 0.000 0.000 0.996 0.000 0.004
#> GSM217703 3 0.0865 0.984 0.000 0.004 0.972 0.000 0.024
#> GSM217704 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217706 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.0510 0.974 0.016 0.000 0.000 0.984 0.000
#> GSM217708 4 0.2813 0.795 0.168 0.000 0.000 0.832 0.000
#> GSM217709 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217710 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217711 4 0.0290 0.982 0.000 0.000 0.000 0.992 0.008
#> GSM217712 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217713 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217714 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217718 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217719 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217720 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217721 4 0.0000 0.988 0.000 0.000 0.000 1.000 0.000
#> GSM217722 4 0.1478 0.924 0.064 0.000 0.000 0.936 0.000
#> GSM217723 1 0.0451 0.992 0.988 0.000 0.000 0.008 0.004
#> GSM217724 1 0.0324 0.995 0.992 0.000 0.000 0.004 0.004
#> GSM217725 1 0.0324 0.995 0.992 0.000 0.000 0.004 0.004
#> GSM217726 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0324 0.995 0.992 0.000 0.000 0.004 0.004
#> GSM217729 1 0.0451 0.992 0.988 0.000 0.000 0.008 0.004
#> GSM217730 1 0.0324 0.995 0.992 0.000 0.000 0.004 0.004
#> GSM217731 1 0.0162 0.996 0.996 0.000 0.000 0.000 0.004
#> GSM217732 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.997 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0703 0.925 0.000 0.024 0.000 0.000 0.976
#> GSM217738 5 0.0703 0.925 0.000 0.024 0.000 0.000 0.976
#> GSM217739 5 0.0703 0.925 0.000 0.024 0.000 0.000 0.976
#> GSM217740 5 0.0703 0.925 0.000 0.024 0.000 0.000 0.976
#> GSM217741 5 0.1197 0.935 0.000 0.048 0.000 0.000 0.952
#> GSM217742 5 0.1197 0.935 0.000 0.048 0.000 0.000 0.952
#> GSM217743 5 0.1197 0.935 0.000 0.048 0.000 0.000 0.952
#> GSM217744 5 0.1197 0.935 0.000 0.048 0.000 0.000 0.952
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0748 0.625 0.000 0.976 0.000 0.004 0.016 0.004
#> GSM217645 2 0.0508 0.597 0.000 0.984 0.000 0.004 0.000 0.012
#> GSM217646 2 0.0458 0.631 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217647 2 0.4406 0.194 0.000 0.500 0.000 0.000 0.476 0.024
#> GSM217648 2 0.4406 0.194 0.000 0.500 0.000 0.000 0.476 0.024
#> GSM217649 2 0.0458 0.631 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217650 2 0.0458 0.631 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217651 2 0.4361 0.303 0.000 0.552 0.000 0.000 0.424 0.024
#> GSM217652 2 0.0458 0.631 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217653 5 0.4401 -0.200 0.000 0.464 0.000 0.000 0.512 0.024
#> GSM217654 2 0.2673 0.380 0.000 0.852 0.000 0.004 0.012 0.132
#> GSM217655 2 0.2573 0.390 0.000 0.856 0.000 0.004 0.008 0.132
#> GSM217656 6 0.5620 0.000 0.000 0.404 0.000 0.068 0.032 0.496
#> GSM217657 2 0.3083 0.315 0.000 0.828 0.000 0.000 0.040 0.132
#> GSM217658 2 0.0458 0.631 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217659 2 0.0458 0.631 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217660 2 0.3593 0.526 0.000 0.748 0.000 0.000 0.228 0.024
#> GSM217661 2 0.0146 0.610 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217662 5 0.2060 0.835 0.000 0.084 0.000 0.000 0.900 0.016
#> GSM217663 2 0.2122 0.605 0.000 0.900 0.000 0.000 0.076 0.024
#> GSM217664 2 0.1003 0.628 0.000 0.964 0.000 0.000 0.020 0.016
#> GSM217665 2 0.4406 0.194 0.000 0.500 0.000 0.000 0.476 0.024
#> GSM217666 2 0.4406 0.194 0.000 0.500 0.000 0.000 0.476 0.024
#> GSM217667 2 0.4406 0.194 0.000 0.500 0.000 0.000 0.476 0.024
#> GSM217668 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217669 4 0.0146 0.943 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM217670 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217671 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217672 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217673 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217685 3 0.1007 0.932 0.000 0.000 0.956 0.000 0.000 0.044
#> GSM217686 3 0.0865 0.935 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217687 3 0.0865 0.935 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217688 3 0.0865 0.935 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217689 3 0.3309 0.731 0.000 0.000 0.720 0.000 0.000 0.280
#> GSM217690 3 0.3244 0.741 0.000 0.000 0.732 0.000 0.000 0.268
#> GSM217691 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217692 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217693 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217694 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217695 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.0632 0.939 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM217700 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0458 0.941 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM217702 3 0.0458 0.941 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM217703 3 0.3862 0.450 0.000 0.000 0.524 0.000 0.000 0.476
#> GSM217704 3 0.0000 0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217705 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217706 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217707 4 0.0914 0.933 0.016 0.000 0.000 0.968 0.000 0.016
#> GSM217708 4 0.4643 0.627 0.128 0.000 0.000 0.688 0.000 0.184
#> GSM217709 4 0.2442 0.863 0.004 0.000 0.000 0.852 0.000 0.144
#> GSM217710 4 0.2624 0.857 0.004 0.000 0.000 0.844 0.004 0.148
#> GSM217711 4 0.2662 0.854 0.004 0.000 0.000 0.840 0.004 0.152
#> GSM217712 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217713 4 0.0692 0.937 0.004 0.000 0.000 0.976 0.000 0.020
#> GSM217714 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217715 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217716 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217717 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217718 4 0.1588 0.913 0.004 0.000 0.000 0.924 0.000 0.072
#> GSM217719 4 0.2278 0.876 0.004 0.000 0.000 0.868 0.000 0.128
#> GSM217720 4 0.0000 0.945 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217721 4 0.2006 0.893 0.004 0.000 0.000 0.892 0.000 0.104
#> GSM217722 4 0.2121 0.846 0.096 0.000 0.000 0.892 0.000 0.012
#> GSM217723 1 0.0363 0.984 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM217724 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217725 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217726 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217729 1 0.0146 0.994 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217730 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0146 0.885 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM217738 5 0.0146 0.885 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM217739 5 0.0000 0.886 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217740 5 0.0000 0.886 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217741 5 0.0937 0.889 0.000 0.040 0.000 0.000 0.960 0.000
#> GSM217742 5 0.0790 0.894 0.000 0.032 0.000 0.000 0.968 0.000
#> GSM217743 5 0.0790 0.894 0.000 0.032 0.000 0.000 0.968 0.000
#> GSM217744 5 0.0790 0.894 0.000 0.032 0.000 0.000 0.968 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:mclust 101 3.32e-01 2
#> SD:mclust 101 2.94e-07 3
#> SD:mclust 92 6.09e-06 4
#> SD:mclust 101 5.97e-08 5
#> SD:mclust 89 2.44e-07 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.999 0.999 0.5051 0.495 0.495
#> 3 3 1.000 0.997 0.998 0.2515 0.873 0.744
#> 4 4 0.880 0.904 0.941 0.1084 0.909 0.759
#> 5 5 0.812 0.711 0.834 0.0672 0.891 0.651
#> 6 6 0.736 0.724 0.812 0.0428 0.924 0.695
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
#> GSM217644 2 0.000 0.999 0.000 1.000
#> GSM217645 2 0.000 0.999 0.000 1.000
#> GSM217646 2 0.000 0.999 0.000 1.000
#> GSM217647 2 0.000 0.999 0.000 1.000
#> GSM217648 2 0.000 0.999 0.000 1.000
#> GSM217649 2 0.000 0.999 0.000 1.000
#> GSM217650 2 0.000 0.999 0.000 1.000
#> GSM217651 2 0.000 0.999 0.000 1.000
#> GSM217652 2 0.000 0.999 0.000 1.000
#> GSM217653 2 0.000 0.999 0.000 1.000
#> GSM217654 2 0.000 0.999 0.000 1.000
#> GSM217655 2 0.000 0.999 0.000 1.000
#> GSM217656 2 0.343 0.932 0.064 0.936
#> GSM217657 2 0.000 0.999 0.000 1.000
#> GSM217658 2 0.000 0.999 0.000 1.000
#> GSM217659 2 0.000 0.999 0.000 1.000
#> GSM217660 2 0.000 0.999 0.000 1.000
#> GSM217661 2 0.000 0.999 0.000 1.000
#> GSM217662 2 0.000 0.999 0.000 1.000
#> GSM217663 2 0.000 0.999 0.000 1.000
#> GSM217664 2 0.000 0.999 0.000 1.000
#> GSM217665 2 0.000 0.999 0.000 1.000
#> GSM217666 2 0.000 0.999 0.000 1.000
#> GSM217667 2 0.000 0.999 0.000 1.000
#> GSM217668 1 0.000 1.000 1.000 0.000
#> GSM217669 1 0.000 1.000 1.000 0.000
#> GSM217670 1 0.000 1.000 1.000 0.000
#> GSM217671 1 0.000 1.000 1.000 0.000
#> GSM217672 1 0.000 1.000 1.000 0.000
#> GSM217673 1 0.000 1.000 1.000 0.000
#> GSM217674 1 0.000 1.000 1.000 0.000
#> GSM217675 1 0.000 1.000 1.000 0.000
#> GSM217676 1 0.000 1.000 1.000 0.000
#> GSM217677 1 0.000 1.000 1.000 0.000
#> GSM217678 1 0.000 1.000 1.000 0.000
#> GSM217679 1 0.000 1.000 1.000 0.000
#> GSM217680 1 0.000 1.000 1.000 0.000
#> GSM217681 1 0.000 1.000 1.000 0.000
#> GSM217682 1 0.000 1.000 1.000 0.000
#> GSM217683 1 0.000 1.000 1.000 0.000
#> GSM217684 1 0.000 1.000 1.000 0.000
#> GSM217685 2 0.000 0.999 0.000 1.000
#> GSM217686 2 0.000 0.999 0.000 1.000
#> GSM217687 2 0.000 0.999 0.000 1.000
#> GSM217688 2 0.000 0.999 0.000 1.000
#> GSM217689 2 0.000 0.999 0.000 1.000
#> GSM217690 2 0.000 0.999 0.000 1.000
#> GSM217691 2 0.000 0.999 0.000 1.000
#> GSM217692 2 0.000 0.999 0.000 1.000
#> GSM217693 2 0.000 0.999 0.000 1.000
#> GSM217694 2 0.000 0.999 0.000 1.000
#> GSM217695 2 0.000 0.999 0.000 1.000
#> GSM217696 2 0.000 0.999 0.000 1.000
#> GSM217697 2 0.000 0.999 0.000 1.000
#> GSM217698 2 0.000 0.999 0.000 1.000
#> GSM217699 2 0.000 0.999 0.000 1.000
#> GSM217700 2 0.000 0.999 0.000 1.000
#> GSM217701 2 0.000 0.999 0.000 1.000
#> GSM217702 2 0.000 0.999 0.000 1.000
#> GSM217703 2 0.000 0.999 0.000 1.000
#> GSM217704 2 0.000 0.999 0.000 1.000
#> GSM217705 1 0.000 1.000 1.000 0.000
#> GSM217706 1 0.000 1.000 1.000 0.000
#> GSM217707 1 0.000 1.000 1.000 0.000
#> GSM217708 1 0.000 1.000 1.000 0.000
#> GSM217709 1 0.000 1.000 1.000 0.000
#> GSM217710 1 0.000 1.000 1.000 0.000
#> GSM217711 1 0.000 1.000 1.000 0.000
#> GSM217712 1 0.000 1.000 1.000 0.000
#> GSM217713 1 0.000 1.000 1.000 0.000
#> GSM217714 1 0.000 1.000 1.000 0.000
#> GSM217715 1 0.000 1.000 1.000 0.000
#> GSM217716 1 0.000 1.000 1.000 0.000
#> GSM217717 1 0.000 1.000 1.000 0.000
#> GSM217718 1 0.000 1.000 1.000 0.000
#> GSM217719 1 0.000 1.000 1.000 0.000
#> GSM217720 1 0.000 1.000 1.000 0.000
#> GSM217721 1 0.000 1.000 1.000 0.000
#> GSM217722 1 0.000 1.000 1.000 0.000
#> GSM217723 1 0.000 1.000 1.000 0.000
#> GSM217724 1 0.000 1.000 1.000 0.000
#> GSM217725 1 0.000 1.000 1.000 0.000
#> GSM217726 1 0.000 1.000 1.000 0.000
#> GSM217727 1 0.000 1.000 1.000 0.000
#> GSM217728 1 0.000 1.000 1.000 0.000
#> GSM217729 1 0.000 1.000 1.000 0.000
#> GSM217730 1 0.000 1.000 1.000 0.000
#> GSM217731 1 0.000 1.000 1.000 0.000
#> GSM217732 1 0.000 1.000 1.000 0.000
#> GSM217733 1 0.000 1.000 1.000 0.000
#> GSM217734 1 0.000 1.000 1.000 0.000
#> GSM217735 1 0.000 1.000 1.000 0.000
#> GSM217736 1 0.000 1.000 1.000 0.000
#> GSM217737 2 0.000 0.999 0.000 1.000
#> GSM217738 2 0.000 0.999 0.000 1.000
#> GSM217739 2 0.000 0.999 0.000 1.000
#> GSM217740 2 0.000 0.999 0.000 1.000
#> GSM217741 2 0.000 0.999 0.000 1.000
#> GSM217742 2 0.000 0.999 0.000 1.000
#> GSM217743 2 0.000 0.999 0.000 1.000
#> GSM217744 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
#> GSM217644 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217645 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217646 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217647 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217648 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217649 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217650 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217651 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217652 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217653 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217654 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217655 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217656 2 0.0661 0.989 0.004 0.988 0.008
#> GSM217657 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217658 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217659 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217660 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217661 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217662 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217663 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217664 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217665 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217666 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217667 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217668 1 0.3686 0.833 0.860 0.140 0.000
#> GSM217669 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217723 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217724 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217725 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217726 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217728 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217729 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.997 1.000 0.000 0.000
#> GSM217737 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217738 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217739 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217740 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217741 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217742 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217743 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217744 2 0.0000 1.000 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0707 0.9680 0.000 0.980 0.000 0.020
#> GSM217645 2 0.0188 0.9703 0.000 0.996 0.000 0.004
#> GSM217646 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0707 0.9680 0.000 0.980 0.000 0.020
#> GSM217649 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0707 0.9680 0.000 0.980 0.000 0.020
#> GSM217652 2 0.0188 0.9703 0.000 0.996 0.000 0.004
#> GSM217653 2 0.0707 0.9680 0.000 0.980 0.000 0.020
#> GSM217654 4 0.4697 0.4522 0.000 0.356 0.000 0.644
#> GSM217655 2 0.2814 0.8583 0.000 0.868 0.000 0.132
#> GSM217656 4 0.2189 0.7324 0.044 0.004 0.020 0.932
#> GSM217657 4 0.3074 0.7216 0.000 0.152 0.000 0.848
#> GSM217658 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217660 2 0.1557 0.9446 0.000 0.944 0.000 0.056
#> GSM217661 2 0.0592 0.9689 0.000 0.984 0.000 0.016
#> GSM217662 2 0.0707 0.9680 0.000 0.980 0.000 0.020
#> GSM217663 2 0.0336 0.9701 0.000 0.992 0.000 0.008
#> GSM217664 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.9701 0.000 1.000 0.000 0.000
#> GSM217668 1 0.3948 0.7885 0.828 0.136 0.000 0.036
#> GSM217669 1 0.1940 0.9400 0.924 0.000 0.000 0.076
#> GSM217670 1 0.1022 0.9471 0.968 0.000 0.000 0.032
#> GSM217671 1 0.0817 0.9475 0.976 0.000 0.000 0.024
#> GSM217672 1 0.0592 0.9474 0.984 0.000 0.000 0.016
#> GSM217673 1 0.1302 0.9460 0.956 0.000 0.000 0.044
#> GSM217674 1 0.1211 0.9271 0.960 0.000 0.000 0.040
#> GSM217675 1 0.1302 0.9242 0.956 0.000 0.000 0.044
#> GSM217676 1 0.0000 0.9463 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0336 0.9442 0.992 0.000 0.000 0.008
#> GSM217678 1 0.0000 0.9463 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0817 0.9371 0.976 0.000 0.000 0.024
#> GSM217680 1 0.0000 0.9463 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0188 0.9455 0.996 0.000 0.000 0.004
#> GSM217682 1 0.0921 0.9349 0.972 0.000 0.000 0.028
#> GSM217683 1 0.0921 0.9349 0.972 0.000 0.000 0.028
#> GSM217684 1 0.1474 0.9450 0.948 0.000 0.000 0.052
#> GSM217685 3 0.0817 0.9770 0.000 0.000 0.976 0.024
#> GSM217686 3 0.0921 0.9744 0.000 0.000 0.972 0.028
#> GSM217687 3 0.0592 0.9811 0.000 0.000 0.984 0.016
#> GSM217688 3 0.0592 0.9811 0.000 0.000 0.984 0.016
#> GSM217689 3 0.3074 0.8488 0.000 0.000 0.848 0.152
#> GSM217690 3 0.0817 0.9770 0.000 0.000 0.976 0.024
#> GSM217691 3 0.0188 0.9852 0.000 0.000 0.996 0.004
#> GSM217692 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0188 0.9852 0.000 0.000 0.996 0.004
#> GSM217701 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.9866 0.000 0.000 1.000 0.000
#> GSM217703 4 0.3444 0.5852 0.000 0.000 0.184 0.816
#> GSM217704 3 0.0188 0.9852 0.000 0.000 0.996 0.004
#> GSM217705 1 0.1940 0.9400 0.924 0.000 0.000 0.076
#> GSM217706 1 0.1940 0.9400 0.924 0.000 0.000 0.076
#> GSM217707 1 0.1867 0.9411 0.928 0.000 0.000 0.072
#> GSM217708 4 0.4643 0.4610 0.344 0.000 0.000 0.656
#> GSM217709 4 0.3942 0.6471 0.236 0.000 0.000 0.764
#> GSM217710 4 0.2921 0.7223 0.140 0.000 0.000 0.860
#> GSM217711 4 0.2281 0.7353 0.096 0.000 0.000 0.904
#> GSM217712 1 0.2216 0.9310 0.908 0.000 0.000 0.092
#> GSM217713 1 0.2011 0.9383 0.920 0.000 0.000 0.080
#> GSM217714 1 0.1940 0.9400 0.924 0.000 0.000 0.076
#> GSM217715 1 0.1867 0.9411 0.928 0.000 0.000 0.072
#> GSM217716 1 0.2011 0.9383 0.920 0.000 0.000 0.080
#> GSM217717 1 0.2081 0.9360 0.916 0.000 0.000 0.084
#> GSM217718 4 0.4996 0.0291 0.484 0.000 0.000 0.516
#> GSM217719 1 0.2921 0.8871 0.860 0.000 0.000 0.140
#> GSM217720 1 0.1940 0.9400 0.924 0.000 0.000 0.076
#> GSM217721 1 0.2814 0.8964 0.868 0.000 0.000 0.132
#> GSM217722 1 0.2011 0.9383 0.920 0.000 0.000 0.080
#> GSM217723 1 0.2011 0.9383 0.920 0.000 0.000 0.080
#> GSM217724 1 0.1940 0.9400 0.924 0.000 0.000 0.076
#> GSM217725 1 0.2921 0.8874 0.860 0.000 0.000 0.140
#> GSM217726 1 0.0707 0.9392 0.980 0.000 0.000 0.020
#> GSM217727 1 0.0817 0.9377 0.976 0.000 0.000 0.024
#> GSM217728 1 0.2011 0.9383 0.920 0.000 0.000 0.080
#> GSM217729 1 0.0188 0.9455 0.996 0.000 0.000 0.004
#> GSM217730 1 0.0188 0.9455 0.996 0.000 0.000 0.004
#> GSM217731 1 0.0188 0.9455 0.996 0.000 0.000 0.004
#> GSM217732 1 0.0336 0.9442 0.992 0.000 0.000 0.008
#> GSM217733 1 0.0000 0.9463 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0921 0.9349 0.972 0.000 0.000 0.028
#> GSM217735 1 0.0336 0.9442 0.992 0.000 0.000 0.008
#> GSM217736 1 0.0188 0.9455 0.996 0.000 0.000 0.004
#> GSM217737 4 0.3837 0.6548 0.000 0.224 0.000 0.776
#> GSM217738 4 0.3257 0.7154 0.000 0.152 0.004 0.844
#> GSM217739 4 0.3219 0.7100 0.000 0.164 0.000 0.836
#> GSM217740 4 0.3123 0.7143 0.000 0.156 0.000 0.844
#> GSM217741 2 0.1302 0.9545 0.000 0.956 0.000 0.044
#> GSM217742 2 0.3764 0.7408 0.000 0.784 0.000 0.216
#> GSM217743 2 0.2149 0.9167 0.000 0.912 0.000 0.088
#> GSM217744 2 0.1211 0.9581 0.000 0.960 0.000 0.040
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0898 0.919 0.008 0.972 0.000 0.000 0.020
#> GSM217645 2 0.0703 0.919 0.024 0.976 0.000 0.000 0.000
#> GSM217646 2 0.0162 0.922 0.004 0.996 0.000 0.000 0.000
#> GSM217647 2 0.0671 0.920 0.016 0.980 0.000 0.000 0.004
#> GSM217648 2 0.0898 0.921 0.008 0.972 0.000 0.000 0.020
#> GSM217649 2 0.0566 0.922 0.012 0.984 0.000 0.000 0.004
#> GSM217650 2 0.1282 0.912 0.044 0.952 0.000 0.000 0.004
#> GSM217651 2 0.1741 0.909 0.040 0.936 0.000 0.000 0.024
#> GSM217652 2 0.0566 0.922 0.012 0.984 0.000 0.000 0.004
#> GSM217653 2 0.0404 0.921 0.012 0.988 0.000 0.000 0.000
#> GSM217654 5 0.3689 0.616 0.004 0.256 0.000 0.000 0.740
#> GSM217655 2 0.3039 0.804 0.012 0.836 0.000 0.000 0.152
#> GSM217656 5 0.0807 0.778 0.000 0.012 0.000 0.012 0.976
#> GSM217657 5 0.0963 0.782 0.000 0.036 0.000 0.000 0.964
#> GSM217658 2 0.1205 0.914 0.040 0.956 0.000 0.000 0.004
#> GSM217659 2 0.1124 0.916 0.036 0.960 0.000 0.000 0.004
#> GSM217660 2 0.2411 0.860 0.008 0.884 0.000 0.000 0.108
#> GSM217661 2 0.1074 0.920 0.016 0.968 0.000 0.004 0.012
#> GSM217662 2 0.0807 0.921 0.012 0.976 0.000 0.000 0.012
#> GSM217663 2 0.0771 0.920 0.020 0.976 0.000 0.000 0.004
#> GSM217664 2 0.0992 0.918 0.024 0.968 0.000 0.000 0.008
#> GSM217665 2 0.0566 0.921 0.004 0.984 0.000 0.000 0.012
#> GSM217666 2 0.0771 0.920 0.020 0.976 0.000 0.000 0.004
#> GSM217667 2 0.0798 0.919 0.016 0.976 0.000 0.000 0.008
#> GSM217668 4 0.1059 0.718 0.008 0.020 0.000 0.968 0.004
#> GSM217669 4 0.0451 0.736 0.004 0.000 0.000 0.988 0.008
#> GSM217670 4 0.0609 0.727 0.020 0.000 0.000 0.980 0.000
#> GSM217671 4 0.0404 0.735 0.012 0.000 0.000 0.988 0.000
#> GSM217672 4 0.0404 0.735 0.012 0.000 0.000 0.988 0.000
#> GSM217673 4 0.0290 0.736 0.008 0.000 0.000 0.992 0.000
#> GSM217674 1 0.4582 0.837 0.572 0.012 0.000 0.416 0.000
#> GSM217675 1 0.4278 0.890 0.548 0.000 0.000 0.452 0.000
#> GSM217676 1 0.4300 0.909 0.524 0.000 0.000 0.476 0.000
#> GSM217677 1 0.4278 0.902 0.548 0.000 0.000 0.452 0.000
#> GSM217678 1 0.4305 0.907 0.512 0.000 0.000 0.488 0.000
#> GSM217679 1 0.4297 0.913 0.528 0.000 0.000 0.472 0.000
#> GSM217680 1 0.4307 0.884 0.500 0.000 0.000 0.500 0.000
#> GSM217681 4 0.4306 -0.878 0.492 0.000 0.000 0.508 0.000
#> GSM217682 1 0.4287 0.908 0.540 0.000 0.000 0.460 0.000
#> GSM217683 1 0.4283 0.898 0.544 0.000 0.000 0.456 0.000
#> GSM217684 4 0.2561 0.499 0.144 0.000 0.000 0.856 0.000
#> GSM217685 3 0.0290 0.984 0.000 0.000 0.992 0.000 0.008
#> GSM217686 3 0.1168 0.971 0.032 0.000 0.960 0.000 0.008
#> GSM217687 3 0.0162 0.985 0.000 0.000 0.996 0.000 0.004
#> GSM217688 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.2136 0.910 0.008 0.000 0.904 0.000 0.088
#> GSM217690 3 0.0693 0.980 0.008 0.000 0.980 0.000 0.012
#> GSM217691 3 0.0404 0.984 0.012 0.000 0.988 0.000 0.000
#> GSM217692 3 0.0162 0.985 0.004 0.000 0.996 0.000 0.000
#> GSM217693 3 0.0880 0.974 0.032 0.000 0.968 0.000 0.000
#> GSM217694 3 0.0162 0.985 0.004 0.000 0.996 0.000 0.000
#> GSM217695 3 0.0162 0.985 0.004 0.000 0.996 0.000 0.000
#> GSM217696 3 0.0404 0.984 0.012 0.000 0.988 0.000 0.000
#> GSM217697 3 0.1270 0.962 0.052 0.000 0.948 0.000 0.000
#> GSM217698 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0162 0.985 0.004 0.000 0.996 0.000 0.000
#> GSM217700 3 0.0290 0.985 0.008 0.000 0.992 0.000 0.000
#> GSM217701 3 0.0290 0.985 0.008 0.000 0.992 0.000 0.000
#> GSM217702 3 0.0162 0.985 0.004 0.000 0.996 0.000 0.000
#> GSM217703 5 0.3662 0.553 0.004 0.000 0.252 0.000 0.744
#> GSM217704 3 0.0290 0.985 0.008 0.000 0.992 0.000 0.000
#> GSM217705 4 0.0451 0.737 0.008 0.000 0.000 0.988 0.004
#> GSM217706 4 0.0451 0.736 0.004 0.000 0.000 0.988 0.008
#> GSM217707 4 0.0162 0.737 0.000 0.000 0.000 0.996 0.004
#> GSM217708 4 0.0451 0.736 0.004 0.000 0.000 0.988 0.008
#> GSM217709 4 0.3766 0.375 0.004 0.000 0.000 0.728 0.268
#> GSM217710 5 0.4443 0.331 0.004 0.000 0.000 0.472 0.524
#> GSM217711 5 0.4211 0.527 0.004 0.000 0.000 0.360 0.636
#> GSM217712 4 0.0451 0.736 0.004 0.000 0.000 0.988 0.008
#> GSM217713 4 0.0162 0.737 0.000 0.000 0.000 0.996 0.004
#> GSM217714 4 0.0324 0.737 0.004 0.000 0.000 0.992 0.004
#> GSM217715 4 0.0290 0.738 0.008 0.000 0.000 0.992 0.000
#> GSM217716 4 0.0609 0.735 0.020 0.000 0.000 0.980 0.000
#> GSM217717 4 0.0794 0.725 0.028 0.000 0.000 0.972 0.000
#> GSM217718 4 0.0898 0.733 0.020 0.000 0.000 0.972 0.008
#> GSM217719 4 0.0794 0.728 0.028 0.000 0.000 0.972 0.000
#> GSM217720 4 0.0404 0.735 0.012 0.000 0.000 0.988 0.000
#> GSM217721 4 0.1124 0.711 0.036 0.000 0.000 0.960 0.004
#> GSM217722 4 0.0290 0.736 0.000 0.000 0.000 0.992 0.008
#> GSM217723 4 0.2110 0.640 0.072 0.000 0.000 0.912 0.016
#> GSM217724 4 0.1430 0.682 0.052 0.000 0.000 0.944 0.004
#> GSM217725 1 0.6491 0.551 0.464 0.000 0.000 0.336 0.200
#> GSM217726 1 0.4307 0.902 0.504 0.000 0.000 0.496 0.000
#> GSM217727 1 0.4305 0.906 0.512 0.000 0.000 0.488 0.000
#> GSM217728 4 0.4897 -0.836 0.460 0.000 0.000 0.516 0.024
#> GSM217729 4 0.4302 -0.859 0.480 0.000 0.000 0.520 0.000
#> GSM217730 4 0.4302 -0.852 0.480 0.000 0.000 0.520 0.000
#> GSM217731 4 0.4291 -0.815 0.464 0.000 0.000 0.536 0.000
#> GSM217732 4 0.4306 -0.872 0.492 0.000 0.000 0.508 0.000
#> GSM217733 4 0.4262 -0.753 0.440 0.000 0.000 0.560 0.000
#> GSM217734 1 0.4306 0.897 0.508 0.000 0.000 0.492 0.000
#> GSM217735 1 0.4307 0.882 0.500 0.000 0.000 0.500 0.000
#> GSM217736 1 0.4300 0.911 0.524 0.000 0.000 0.476 0.000
#> GSM217737 5 0.3123 0.736 0.012 0.160 0.000 0.000 0.828
#> GSM217738 5 0.2740 0.781 0.028 0.096 0.000 0.000 0.876
#> GSM217739 5 0.3479 0.775 0.080 0.084 0.000 0.000 0.836
#> GSM217740 5 0.2962 0.783 0.048 0.084 0.000 0.000 0.868
#> GSM217741 2 0.3970 0.755 0.224 0.752 0.000 0.000 0.024
#> GSM217742 2 0.5414 0.632 0.200 0.660 0.000 0.000 0.140
#> GSM217743 2 0.4570 0.613 0.348 0.632 0.000 0.000 0.020
#> GSM217744 2 0.4232 0.667 0.312 0.676 0.000 0.000 0.012
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.1461 0.82875 0.000 0.940 0.000 0.000 0.016 0.044
#> GSM217645 2 0.2563 0.80479 0.000 0.892 0.000 0.036 0.044 0.028
#> GSM217646 2 0.1152 0.83065 0.000 0.952 0.000 0.000 0.044 0.004
#> GSM217647 2 0.0713 0.83000 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM217648 2 0.1575 0.82063 0.000 0.936 0.000 0.000 0.032 0.032
#> GSM217649 2 0.1349 0.82760 0.000 0.940 0.000 0.000 0.056 0.004
#> GSM217650 2 0.2674 0.79222 0.004 0.880 0.000 0.008 0.076 0.032
#> GSM217651 2 0.2585 0.80577 0.000 0.880 0.000 0.004 0.048 0.068
#> GSM217652 2 0.2421 0.80537 0.000 0.900 0.000 0.040 0.032 0.028
#> GSM217653 2 0.0291 0.83201 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM217654 6 0.4138 -0.00846 0.000 0.320 0.000 0.004 0.020 0.656
#> GSM217655 2 0.4857 0.58937 0.000 0.712 0.000 0.032 0.096 0.160
#> GSM217656 6 0.2351 0.31743 0.000 0.036 0.000 0.052 0.012 0.900
#> GSM217657 6 0.1850 0.29893 0.000 0.052 0.000 0.016 0.008 0.924
#> GSM217658 2 0.2113 0.81233 0.000 0.908 0.000 0.004 0.060 0.028
#> GSM217659 2 0.1088 0.83304 0.000 0.960 0.000 0.000 0.024 0.016
#> GSM217660 2 0.3658 0.67573 0.000 0.792 0.000 0.000 0.104 0.104
#> GSM217661 2 0.2703 0.77281 0.000 0.860 0.000 0.016 0.116 0.008
#> GSM217662 2 0.1382 0.82922 0.000 0.948 0.000 0.008 0.008 0.036
#> GSM217663 2 0.0935 0.83281 0.000 0.964 0.000 0.000 0.032 0.004
#> GSM217664 2 0.2295 0.81348 0.000 0.904 0.000 0.016 0.052 0.028
#> GSM217665 2 0.0972 0.83087 0.000 0.964 0.000 0.008 0.028 0.000
#> GSM217666 2 0.1296 0.82366 0.000 0.948 0.000 0.004 0.044 0.004
#> GSM217667 2 0.1152 0.82635 0.000 0.952 0.000 0.004 0.044 0.000
#> GSM217668 4 0.3731 0.78989 0.212 0.024 0.000 0.756 0.008 0.000
#> GSM217669 4 0.3693 0.84197 0.280 0.000 0.000 0.708 0.004 0.008
#> GSM217670 4 0.3727 0.82448 0.388 0.000 0.000 0.612 0.000 0.000
#> GSM217671 4 0.4205 0.73505 0.420 0.000 0.000 0.564 0.016 0.000
#> GSM217672 4 0.3706 0.83296 0.380 0.000 0.000 0.620 0.000 0.000
#> GSM217673 4 0.3647 0.84891 0.360 0.000 0.000 0.640 0.000 0.000
#> GSM217674 1 0.3053 0.83311 0.852 0.004 0.000 0.036 0.100 0.008
#> GSM217675 1 0.3626 0.80509 0.808 0.000 0.000 0.088 0.096 0.008
#> GSM217676 1 0.3314 0.81688 0.828 0.000 0.000 0.092 0.076 0.004
#> GSM217677 1 0.1219 0.87108 0.948 0.000 0.000 0.004 0.048 0.000
#> GSM217678 1 0.1168 0.87538 0.956 0.000 0.000 0.028 0.016 0.000
#> GSM217679 1 0.0603 0.87837 0.980 0.000 0.000 0.004 0.016 0.000
#> GSM217680 1 0.0993 0.87311 0.964 0.000 0.000 0.024 0.012 0.000
#> GSM217681 1 0.0713 0.87379 0.972 0.000 0.000 0.028 0.000 0.000
#> GSM217682 1 0.1945 0.86511 0.920 0.000 0.004 0.016 0.056 0.004
#> GSM217683 1 0.2600 0.84632 0.876 0.000 0.000 0.036 0.084 0.004
#> GSM217684 1 0.4089 -0.51111 0.524 0.000 0.000 0.468 0.008 0.000
#> GSM217685 3 0.0405 0.97548 0.000 0.000 0.988 0.004 0.000 0.008
#> GSM217686 3 0.0405 0.97665 0.000 0.000 0.988 0.000 0.004 0.008
#> GSM217687 3 0.0146 0.97605 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217688 3 0.0146 0.97605 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217689 3 0.2939 0.86311 0.000 0.000 0.856 0.032 0.012 0.100
#> GSM217690 3 0.1518 0.94976 0.000 0.000 0.944 0.024 0.008 0.024
#> GSM217691 3 0.1390 0.95494 0.016 0.000 0.948 0.004 0.032 0.000
#> GSM217692 3 0.0508 0.97451 0.000 0.000 0.984 0.004 0.012 0.000
#> GSM217693 3 0.1147 0.96454 0.004 0.000 0.960 0.004 0.028 0.004
#> GSM217694 3 0.0551 0.97436 0.004 0.000 0.984 0.004 0.008 0.000
#> GSM217695 3 0.0405 0.97629 0.000 0.000 0.988 0.008 0.004 0.000
#> GSM217696 3 0.0260 0.97644 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM217697 3 0.1370 0.96001 0.000 0.000 0.948 0.012 0.036 0.004
#> GSM217698 3 0.0146 0.97621 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM217699 3 0.0291 0.97616 0.000 0.000 0.992 0.004 0.000 0.004
#> GSM217700 3 0.0260 0.97652 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM217701 3 0.0717 0.97278 0.000 0.000 0.976 0.016 0.000 0.008
#> GSM217702 3 0.0405 0.97572 0.000 0.000 0.988 0.008 0.000 0.004
#> GSM217703 6 0.4328 0.19375 0.000 0.000 0.352 0.024 0.004 0.620
#> GSM217704 3 0.0837 0.96990 0.000 0.000 0.972 0.020 0.004 0.004
#> GSM217705 4 0.3547 0.85799 0.332 0.000 0.000 0.668 0.000 0.000
#> GSM217706 4 0.3595 0.85138 0.288 0.000 0.000 0.704 0.008 0.000
#> GSM217707 4 0.3175 0.83589 0.256 0.000 0.000 0.744 0.000 0.000
#> GSM217708 4 0.3731 0.80670 0.212 0.000 0.000 0.756 0.008 0.024
#> GSM217709 4 0.4624 0.60401 0.096 0.000 0.000 0.712 0.012 0.180
#> GSM217710 4 0.4416 0.15948 0.020 0.000 0.000 0.600 0.008 0.372
#> GSM217711 6 0.4310 0.08928 0.004 0.000 0.000 0.472 0.012 0.512
#> GSM217712 4 0.3653 0.85568 0.300 0.000 0.000 0.692 0.008 0.000
#> GSM217713 4 0.3756 0.85067 0.352 0.000 0.000 0.644 0.004 0.000
#> GSM217714 4 0.3515 0.85621 0.324 0.000 0.000 0.676 0.000 0.000
#> GSM217715 4 0.3531 0.85555 0.328 0.000 0.000 0.672 0.000 0.000
#> GSM217716 4 0.4475 0.77856 0.412 0.000 0.000 0.556 0.032 0.000
#> GSM217717 4 0.4493 0.84614 0.344 0.000 0.000 0.612 0.044 0.000
#> GSM217718 4 0.4321 0.82384 0.296 0.000 0.000 0.668 0.016 0.020
#> GSM217719 4 0.4109 0.77659 0.328 0.000 0.000 0.648 0.024 0.000
#> GSM217720 4 0.3911 0.82550 0.368 0.000 0.000 0.624 0.008 0.000
#> GSM217721 4 0.4045 0.86004 0.312 0.000 0.000 0.664 0.024 0.000
#> GSM217722 4 0.3508 0.85678 0.292 0.000 0.000 0.704 0.004 0.000
#> GSM217723 4 0.4879 0.75301 0.356 0.000 0.000 0.584 0.008 0.052
#> GSM217724 4 0.4486 0.80708 0.384 0.000 0.000 0.584 0.004 0.028
#> GSM217725 1 0.3604 0.73881 0.788 0.000 0.000 0.036 0.008 0.168
#> GSM217726 1 0.2070 0.86548 0.908 0.000 0.000 0.044 0.048 0.000
#> GSM217727 1 0.2272 0.86288 0.900 0.000 0.000 0.040 0.056 0.004
#> GSM217728 1 0.1873 0.86485 0.924 0.000 0.000 0.048 0.008 0.020
#> GSM217729 1 0.0937 0.86878 0.960 0.000 0.000 0.040 0.000 0.000
#> GSM217730 1 0.1334 0.86848 0.948 0.000 0.000 0.032 0.020 0.000
#> GSM217731 1 0.1970 0.84671 0.912 0.000 0.000 0.060 0.028 0.000
#> GSM217732 1 0.2230 0.82927 0.892 0.000 0.000 0.084 0.024 0.000
#> GSM217733 1 0.2088 0.83906 0.904 0.000 0.000 0.068 0.028 0.000
#> GSM217734 1 0.1003 0.87282 0.964 0.000 0.000 0.016 0.020 0.000
#> GSM217735 1 0.1913 0.83935 0.908 0.000 0.000 0.080 0.012 0.000
#> GSM217736 1 0.0909 0.87794 0.968 0.000 0.000 0.020 0.012 0.000
#> GSM217737 5 0.6123 0.30108 0.000 0.168 0.000 0.016 0.420 0.396
#> GSM217738 6 0.5805 -0.50190 0.000 0.116 0.000 0.016 0.420 0.448
#> GSM217739 5 0.5316 0.24265 0.000 0.104 0.000 0.000 0.480 0.416
#> GSM217740 6 0.5326 -0.50950 0.000 0.104 0.000 0.000 0.432 0.464
#> GSM217741 2 0.4615 -0.07560 0.000 0.536 0.000 0.000 0.424 0.040
#> GSM217742 2 0.5723 -0.32760 0.000 0.460 0.000 0.004 0.392 0.144
#> GSM217743 5 0.4731 0.10448 0.000 0.428 0.000 0.008 0.532 0.032
#> GSM217744 2 0.4328 -0.11087 0.000 0.520 0.000 0.020 0.460 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:NMF 101 3.32e-01 2
#> SD:NMF 101 2.94e-07 3
#> SD:NMF 98 1.73e-07 4
#> SD:NMF 91 2.50e-07 5
#> SD:NMF 86 7.64e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) are extracted by 'CV' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.993 0.994 0.5029 0.495 0.495
#> 3 3 0.952 0.910 0.960 0.2632 0.869 0.736
#> 4 4 0.826 0.862 0.921 0.0673 0.986 0.961
#> 5 5 0.768 0.714 0.800 0.1066 0.881 0.662
#> 6 6 0.747 0.738 0.853 0.0487 0.957 0.820
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
#> GSM217644 2 0.0000 0.989 0.000 1.000
#> GSM217645 2 0.0000 0.989 0.000 1.000
#> GSM217646 2 0.0000 0.989 0.000 1.000
#> GSM217647 2 0.0000 0.989 0.000 1.000
#> GSM217648 2 0.0000 0.989 0.000 1.000
#> GSM217649 2 0.0000 0.989 0.000 1.000
#> GSM217650 2 0.0000 0.989 0.000 1.000
#> GSM217651 2 0.0000 0.989 0.000 1.000
#> GSM217652 2 0.0000 0.989 0.000 1.000
#> GSM217653 2 0.0000 0.989 0.000 1.000
#> GSM217654 2 0.0376 0.989 0.004 0.996
#> GSM217655 2 0.0000 0.989 0.000 1.000
#> GSM217656 2 0.1843 0.982 0.028 0.972
#> GSM217657 2 0.1843 0.982 0.028 0.972
#> GSM217658 2 0.0000 0.989 0.000 1.000
#> GSM217659 2 0.0000 0.989 0.000 1.000
#> GSM217660 2 0.0000 0.989 0.000 1.000
#> GSM217661 2 0.0000 0.989 0.000 1.000
#> GSM217662 2 0.0000 0.989 0.000 1.000
#> GSM217663 2 0.0000 0.989 0.000 1.000
#> GSM217664 2 0.0000 0.989 0.000 1.000
#> GSM217665 2 0.0000 0.989 0.000 1.000
#> GSM217666 2 0.0000 0.989 0.000 1.000
#> GSM217667 2 0.0000 0.989 0.000 1.000
#> GSM217668 1 0.0000 0.999 1.000 0.000
#> GSM217669 1 0.0000 0.999 1.000 0.000
#> GSM217670 1 0.0000 0.999 1.000 0.000
#> GSM217671 1 0.0000 0.999 1.000 0.000
#> GSM217672 1 0.0000 0.999 1.000 0.000
#> GSM217673 1 0.0000 0.999 1.000 0.000
#> GSM217674 1 0.0000 0.999 1.000 0.000
#> GSM217675 1 0.0000 0.999 1.000 0.000
#> GSM217676 1 0.0376 0.996 0.996 0.004
#> GSM217677 1 0.0000 0.999 1.000 0.000
#> GSM217678 1 0.0000 0.999 1.000 0.000
#> GSM217679 1 0.0000 0.999 1.000 0.000
#> GSM217680 1 0.0000 0.999 1.000 0.000
#> GSM217681 1 0.0000 0.999 1.000 0.000
#> GSM217682 1 0.0000 0.999 1.000 0.000
#> GSM217683 1 0.0000 0.999 1.000 0.000
#> GSM217684 1 0.0000 0.999 1.000 0.000
#> GSM217685 2 0.1633 0.985 0.024 0.976
#> GSM217686 2 0.1633 0.985 0.024 0.976
#> GSM217687 2 0.1633 0.985 0.024 0.976
#> GSM217688 2 0.1633 0.985 0.024 0.976
#> GSM217689 2 0.1633 0.985 0.024 0.976
#> GSM217690 2 0.1633 0.985 0.024 0.976
#> GSM217691 2 0.1633 0.985 0.024 0.976
#> GSM217692 2 0.1633 0.985 0.024 0.976
#> GSM217693 2 0.1633 0.985 0.024 0.976
#> GSM217694 2 0.1633 0.985 0.024 0.976
#> GSM217695 2 0.1633 0.985 0.024 0.976
#> GSM217696 2 0.1633 0.985 0.024 0.976
#> GSM217697 2 0.1633 0.985 0.024 0.976
#> GSM217698 2 0.1633 0.985 0.024 0.976
#> GSM217699 2 0.1633 0.985 0.024 0.976
#> GSM217700 2 0.1633 0.985 0.024 0.976
#> GSM217701 2 0.1633 0.985 0.024 0.976
#> GSM217702 2 0.1633 0.985 0.024 0.976
#> GSM217703 2 0.1633 0.985 0.024 0.976
#> GSM217704 2 0.1633 0.985 0.024 0.976
#> GSM217705 1 0.0000 0.999 1.000 0.000
#> GSM217706 1 0.0000 0.999 1.000 0.000
#> GSM217707 1 0.0000 0.999 1.000 0.000
#> GSM217708 1 0.0376 0.996 0.996 0.004
#> GSM217709 1 0.0672 0.993 0.992 0.008
#> GSM217710 1 0.0672 0.993 0.992 0.008
#> GSM217711 1 0.0672 0.993 0.992 0.008
#> GSM217712 1 0.0000 0.999 1.000 0.000
#> GSM217713 1 0.0000 0.999 1.000 0.000
#> GSM217714 1 0.0000 0.999 1.000 0.000
#> GSM217715 1 0.0000 0.999 1.000 0.000
#> GSM217716 1 0.0000 0.999 1.000 0.000
#> GSM217717 1 0.0000 0.999 1.000 0.000
#> GSM217718 1 0.0000 0.999 1.000 0.000
#> GSM217719 1 0.0000 0.999 1.000 0.000
#> GSM217720 1 0.0000 0.999 1.000 0.000
#> GSM217721 1 0.0000 0.999 1.000 0.000
#> GSM217722 1 0.0000 0.999 1.000 0.000
#> GSM217723 1 0.0672 0.993 0.992 0.008
#> GSM217724 1 0.0672 0.993 0.992 0.008
#> GSM217725 1 0.0672 0.993 0.992 0.008
#> GSM217726 1 0.0000 0.999 1.000 0.000
#> GSM217727 1 0.0000 0.999 1.000 0.000
#> GSM217728 1 0.0672 0.993 0.992 0.008
#> GSM217729 1 0.0000 0.999 1.000 0.000
#> GSM217730 1 0.0000 0.999 1.000 0.000
#> GSM217731 1 0.0000 0.999 1.000 0.000
#> GSM217732 1 0.0000 0.999 1.000 0.000
#> GSM217733 1 0.0000 0.999 1.000 0.000
#> GSM217734 1 0.0000 0.999 1.000 0.000
#> GSM217735 1 0.0000 0.999 1.000 0.000
#> GSM217736 1 0.0000 0.999 1.000 0.000
#> GSM217737 2 0.0000 0.989 0.000 1.000
#> GSM217738 2 0.0000 0.989 0.000 1.000
#> GSM217739 2 0.0000 0.989 0.000 1.000
#> GSM217740 2 0.0000 0.989 0.000 1.000
#> GSM217741 2 0.0000 0.989 0.000 1.000
#> GSM217742 2 0.0000 0.989 0.000 1.000
#> GSM217743 2 0.0000 0.989 0.000 1.000
#> GSM217744 2 0.0000 0.989 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.5678 0.614 0.000 0.684 0.316
#> GSM217645 2 0.5254 0.688 0.000 0.736 0.264
#> GSM217646 2 0.1031 0.890 0.000 0.976 0.024
#> GSM217647 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217648 2 0.1031 0.890 0.000 0.976 0.024
#> GSM217649 2 0.1031 0.890 0.000 0.976 0.024
#> GSM217650 2 0.1964 0.879 0.000 0.944 0.056
#> GSM217651 2 0.1964 0.879 0.000 0.944 0.056
#> GSM217652 2 0.1163 0.889 0.000 0.972 0.028
#> GSM217653 2 0.1529 0.886 0.000 0.960 0.040
#> GSM217654 2 0.6305 0.224 0.000 0.516 0.484
#> GSM217655 2 0.6291 0.276 0.000 0.532 0.468
#> GSM217656 3 0.6386 0.115 0.004 0.412 0.584
#> GSM217657 3 0.6386 0.115 0.004 0.412 0.584
#> GSM217658 2 0.1163 0.889 0.000 0.972 0.028
#> GSM217659 2 0.1031 0.890 0.000 0.976 0.024
#> GSM217660 2 0.6062 0.482 0.000 0.616 0.384
#> GSM217661 2 0.4654 0.760 0.000 0.792 0.208
#> GSM217662 2 0.2261 0.872 0.000 0.932 0.068
#> GSM217663 2 0.1529 0.886 0.000 0.960 0.040
#> GSM217664 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217668 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217669 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217676 1 0.0424 0.990 0.992 0.000 0.008
#> GSM217677 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217685 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217686 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217687 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217688 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217689 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217690 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217691 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217692 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217693 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217694 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217695 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217696 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217697 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217698 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217699 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217700 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217701 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217702 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217703 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217704 3 0.0000 0.952 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217708 1 0.0892 0.981 0.980 0.000 0.020
#> GSM217709 1 0.1289 0.972 0.968 0.000 0.032
#> GSM217710 1 0.1289 0.972 0.968 0.000 0.032
#> GSM217711 1 0.1289 0.972 0.968 0.000 0.032
#> GSM217712 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217723 1 0.1289 0.972 0.968 0.000 0.032
#> GSM217724 1 0.0892 0.981 0.980 0.000 0.020
#> GSM217725 1 0.1289 0.972 0.968 0.000 0.032
#> GSM217726 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217728 1 0.1289 0.972 0.968 0.000 0.032
#> GSM217729 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217737 2 0.4750 0.731 0.000 0.784 0.216
#> GSM217738 2 0.4750 0.731 0.000 0.784 0.216
#> GSM217739 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.890 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.890 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.4564 0.344 0.000 0.672 0 0.328
#> GSM217645 2 0.4250 0.491 0.000 0.724 0 0.276
#> GSM217646 2 0.0817 0.858 0.000 0.976 0 0.024
#> GSM217647 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217648 2 0.0817 0.858 0.000 0.976 0 0.024
#> GSM217649 2 0.0817 0.858 0.000 0.976 0 0.024
#> GSM217650 2 0.1716 0.835 0.000 0.936 0 0.064
#> GSM217651 2 0.1716 0.835 0.000 0.936 0 0.064
#> GSM217652 2 0.1118 0.853 0.000 0.964 0 0.036
#> GSM217653 2 0.1389 0.848 0.000 0.952 0 0.048
#> GSM217654 4 0.4999 0.157 0.000 0.492 0 0.508
#> GSM217655 2 0.4994 -0.344 0.000 0.520 0 0.480
#> GSM217656 4 0.3486 0.755 0.000 0.188 0 0.812
#> GSM217657 4 0.3486 0.755 0.000 0.188 0 0.812
#> GSM217658 2 0.1118 0.853 0.000 0.964 0 0.036
#> GSM217659 2 0.0817 0.858 0.000 0.976 0 0.024
#> GSM217660 2 0.4843 0.036 0.000 0.604 0 0.396
#> GSM217661 2 0.3801 0.626 0.000 0.780 0 0.220
#> GSM217662 2 0.1940 0.825 0.000 0.924 0 0.076
#> GSM217663 2 0.1389 0.848 0.000 0.952 0 0.048
#> GSM217664 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217665 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217666 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217667 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217668 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217669 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217670 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217671 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217672 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217673 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217674 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217675 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217676 1 0.3610 0.891 0.800 0.000 0 0.200
#> GSM217677 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217678 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217679 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217680 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217681 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217682 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217683 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217684 1 0.0188 0.912 0.996 0.000 0 0.004
#> GSM217685 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217705 1 0.0188 0.912 0.996 0.000 0 0.004
#> GSM217706 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217707 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217708 1 0.0817 0.903 0.976 0.000 0 0.024
#> GSM217709 1 0.1118 0.896 0.964 0.000 0 0.036
#> GSM217710 1 0.1118 0.896 0.964 0.000 0 0.036
#> GSM217711 1 0.1118 0.896 0.964 0.000 0 0.036
#> GSM217712 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217713 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217714 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217715 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217716 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217717 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217718 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217719 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217720 1 0.0188 0.912 0.996 0.000 0 0.004
#> GSM217721 1 0.0188 0.911 0.996 0.000 0 0.004
#> GSM217722 1 0.0000 0.912 1.000 0.000 0 0.000
#> GSM217723 1 0.2814 0.901 0.868 0.000 0 0.132
#> GSM217724 1 0.2647 0.904 0.880 0.000 0 0.120
#> GSM217725 1 0.2814 0.901 0.868 0.000 0 0.132
#> GSM217726 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217727 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217728 1 0.2814 0.901 0.868 0.000 0 0.132
#> GSM217729 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217730 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217731 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217732 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217733 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217734 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217735 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217736 1 0.3486 0.894 0.812 0.000 0 0.188
#> GSM217737 2 0.3764 0.570 0.000 0.784 0 0.216
#> GSM217738 2 0.3764 0.570 0.000 0.784 0 0.216
#> GSM217739 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217740 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217741 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217742 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217743 2 0.0000 0.863 0.000 1.000 0 0.000
#> GSM217744 2 0.0000 0.863 0.000 1.000 0 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.3949 0.5004 0.000 0.668 0.000 0.000 0.332
#> GSM217645 2 0.3684 0.5966 0.000 0.720 0.000 0.000 0.280
#> GSM217646 2 0.0794 0.8181 0.000 0.972 0.000 0.000 0.028
#> GSM217647 2 0.0290 0.8169 0.008 0.992 0.000 0.000 0.000
#> GSM217648 2 0.0794 0.8181 0.000 0.972 0.000 0.000 0.028
#> GSM217649 2 0.0794 0.8181 0.000 0.972 0.000 0.000 0.028
#> GSM217650 2 0.1764 0.8015 0.008 0.928 0.000 0.000 0.064
#> GSM217651 2 0.1764 0.8015 0.008 0.928 0.000 0.000 0.064
#> GSM217652 2 0.1251 0.8134 0.008 0.956 0.000 0.000 0.036
#> GSM217653 2 0.1270 0.8154 0.000 0.948 0.000 0.000 0.052
#> GSM217654 5 0.4430 -0.1643 0.000 0.456 0.000 0.004 0.540
#> GSM217655 2 0.4305 0.0179 0.000 0.512 0.000 0.000 0.488
#> GSM217656 5 0.1041 0.7042 0.000 0.004 0.000 0.032 0.964
#> GSM217657 5 0.1041 0.7042 0.000 0.004 0.000 0.032 0.964
#> GSM217658 2 0.1251 0.8134 0.008 0.956 0.000 0.000 0.036
#> GSM217659 2 0.0794 0.8181 0.000 0.972 0.000 0.000 0.028
#> GSM217660 2 0.5131 0.2446 0.040 0.540 0.000 0.000 0.420
#> GSM217661 2 0.3305 0.6794 0.000 0.776 0.000 0.000 0.224
#> GSM217662 2 0.1956 0.7984 0.008 0.916 0.000 0.000 0.076
#> GSM217663 2 0.1270 0.8154 0.000 0.948 0.000 0.000 0.052
#> GSM217664 2 0.0290 0.8169 0.008 0.992 0.000 0.000 0.000
#> GSM217665 2 0.0290 0.8169 0.008 0.992 0.000 0.000 0.000
#> GSM217666 2 0.0290 0.8169 0.008 0.992 0.000 0.000 0.000
#> GSM217667 2 0.0290 0.8169 0.008 0.992 0.000 0.000 0.000
#> GSM217668 1 0.4291 -0.0545 0.536 0.000 0.000 0.464 0.000
#> GSM217669 4 0.4300 0.2205 0.476 0.000 0.000 0.524 0.000
#> GSM217670 4 0.3508 0.6283 0.252 0.000 0.000 0.748 0.000
#> GSM217671 1 0.4305 -0.1297 0.512 0.000 0.000 0.488 0.000
#> GSM217672 1 0.4305 -0.1297 0.512 0.000 0.000 0.488 0.000
#> GSM217673 1 0.4305 -0.1297 0.512 0.000 0.000 0.488 0.000
#> GSM217674 1 0.3452 0.8362 0.756 0.000 0.000 0.244 0.000
#> GSM217675 1 0.3424 0.8128 0.760 0.000 0.000 0.240 0.000
#> GSM217676 4 0.4300 -0.2043 0.476 0.000 0.000 0.524 0.000
#> GSM217677 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217678 1 0.3586 0.8224 0.736 0.000 0.000 0.264 0.000
#> GSM217679 1 0.3508 0.8359 0.748 0.000 0.000 0.252 0.000
#> GSM217680 1 0.3586 0.8224 0.736 0.000 0.000 0.264 0.000
#> GSM217681 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217682 1 0.3452 0.8362 0.756 0.000 0.000 0.244 0.000
#> GSM217683 1 0.3452 0.8362 0.756 0.000 0.000 0.244 0.000
#> GSM217684 1 0.4114 0.2731 0.624 0.000 0.000 0.376 0.000
#> GSM217685 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.0162 0.9968 0.000 0.000 0.996 0.000 0.004
#> GSM217690 3 0.0162 0.9968 0.000 0.000 0.996 0.000 0.004
#> GSM217691 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0162 0.9968 0.000 0.000 0.996 0.000 0.004
#> GSM217704 3 0.0000 0.9994 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.3857 0.5628 0.312 0.000 0.000 0.688 0.000
#> GSM217706 4 0.3837 0.5819 0.308 0.000 0.000 0.692 0.000
#> GSM217707 4 0.3876 0.5729 0.316 0.000 0.000 0.684 0.000
#> GSM217708 4 0.1197 0.7039 0.048 0.000 0.000 0.952 0.000
#> GSM217709 4 0.0794 0.6919 0.028 0.000 0.000 0.972 0.000
#> GSM217710 4 0.0794 0.6919 0.028 0.000 0.000 0.972 0.000
#> GSM217711 4 0.0794 0.6919 0.028 0.000 0.000 0.972 0.000
#> GSM217712 4 0.3424 0.6493 0.240 0.000 0.000 0.760 0.000
#> GSM217713 4 0.2648 0.7087 0.152 0.000 0.000 0.848 0.000
#> GSM217714 4 0.4060 0.4943 0.360 0.000 0.000 0.640 0.000
#> GSM217715 4 0.4060 0.4943 0.360 0.000 0.000 0.640 0.000
#> GSM217716 4 0.2329 0.7234 0.124 0.000 0.000 0.876 0.000
#> GSM217717 4 0.2329 0.7234 0.124 0.000 0.000 0.876 0.000
#> GSM217718 4 0.2020 0.7242 0.100 0.000 0.000 0.900 0.000
#> GSM217719 4 0.2020 0.7242 0.100 0.000 0.000 0.900 0.000
#> GSM217720 4 0.3857 0.5628 0.312 0.000 0.000 0.688 0.000
#> GSM217721 4 0.2127 0.7249 0.108 0.000 0.000 0.892 0.000
#> GSM217722 4 0.3480 0.6420 0.248 0.000 0.000 0.752 0.000
#> GSM217723 4 0.2813 0.6098 0.168 0.000 0.000 0.832 0.000
#> GSM217724 4 0.3074 0.6024 0.196 0.000 0.000 0.804 0.000
#> GSM217725 4 0.2813 0.6098 0.168 0.000 0.000 0.832 0.000
#> GSM217726 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217727 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217728 4 0.2813 0.6098 0.168 0.000 0.000 0.832 0.000
#> GSM217729 1 0.3534 0.8323 0.744 0.000 0.000 0.256 0.000
#> GSM217730 1 0.3534 0.8323 0.744 0.000 0.000 0.256 0.000
#> GSM217731 1 0.3534 0.8323 0.744 0.000 0.000 0.256 0.000
#> GSM217732 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217733 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217734 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217735 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217736 1 0.3480 0.8388 0.752 0.000 0.000 0.248 0.000
#> GSM217737 2 0.5775 0.4642 0.136 0.600 0.000 0.000 0.264
#> GSM217738 2 0.5775 0.4642 0.136 0.600 0.000 0.000 0.264
#> GSM217739 2 0.3667 0.7444 0.140 0.812 0.000 0.000 0.048
#> GSM217740 2 0.3667 0.7444 0.140 0.812 0.000 0.000 0.048
#> GSM217741 2 0.3667 0.7444 0.140 0.812 0.000 0.000 0.048
#> GSM217742 2 0.3667 0.7444 0.140 0.812 0.000 0.000 0.048
#> GSM217743 2 0.3667 0.7444 0.140 0.812 0.000 0.000 0.048
#> GSM217744 2 0.3667 0.7444 0.140 0.812 0.000 0.000 0.048
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.3867 0.5056 0.000 0.660 0.000 0.000 0.012 0.328
#> GSM217645 2 0.3629 0.6125 0.000 0.712 0.000 0.000 0.012 0.276
#> GSM217646 2 0.0993 0.8510 0.000 0.964 0.000 0.000 0.012 0.024
#> GSM217647 2 0.0000 0.8514 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217648 2 0.0993 0.8510 0.000 0.964 0.000 0.000 0.012 0.024
#> GSM217649 2 0.0993 0.8510 0.000 0.964 0.000 0.000 0.012 0.024
#> GSM217650 2 0.1327 0.8456 0.000 0.936 0.000 0.000 0.000 0.064
#> GSM217651 2 0.1327 0.8456 0.000 0.936 0.000 0.000 0.000 0.064
#> GSM217652 2 0.0865 0.8538 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM217653 2 0.1434 0.8501 0.000 0.940 0.000 0.000 0.012 0.048
#> GSM217654 6 0.4242 -0.1581 0.000 0.448 0.000 0.000 0.016 0.536
#> GSM217655 2 0.4263 -0.0091 0.000 0.504 0.000 0.000 0.016 0.480
#> GSM217656 6 0.0291 0.6122 0.000 0.000 0.000 0.004 0.004 0.992
#> GSM217657 6 0.0291 0.6122 0.000 0.000 0.000 0.004 0.004 0.992
#> GSM217658 2 0.0865 0.8538 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM217659 2 0.0993 0.8510 0.000 0.964 0.000 0.000 0.012 0.024
#> GSM217660 2 0.5819 -0.1804 0.000 0.420 0.000 0.000 0.184 0.396
#> GSM217661 2 0.3287 0.6919 0.000 0.768 0.000 0.000 0.012 0.220
#> GSM217662 2 0.1501 0.8399 0.000 0.924 0.000 0.000 0.000 0.076
#> GSM217663 2 0.1434 0.8501 0.000 0.940 0.000 0.000 0.012 0.048
#> GSM217664 2 0.0000 0.8514 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.8514 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.8514 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217667 2 0.0000 0.8514 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217668 1 0.3810 0.1410 0.572 0.000 0.000 0.428 0.000 0.000
#> GSM217669 4 0.3860 0.2082 0.472 0.000 0.000 0.528 0.000 0.000
#> GSM217670 4 0.3695 0.6471 0.376 0.000 0.000 0.624 0.000 0.000
#> GSM217671 1 0.3833 0.0760 0.556 0.000 0.000 0.444 0.000 0.000
#> GSM217672 1 0.3833 0.0760 0.556 0.000 0.000 0.444 0.000 0.000
#> GSM217673 1 0.3833 0.0760 0.556 0.000 0.000 0.444 0.000 0.000
#> GSM217674 1 0.0146 0.8411 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217675 1 0.0713 0.8186 0.972 0.000 0.000 0.028 0.000 0.000
#> GSM217676 1 0.3647 0.0881 0.640 0.000 0.000 0.360 0.000 0.000
#> GSM217677 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0632 0.8228 0.976 0.000 0.000 0.024 0.000 0.000
#> GSM217679 1 0.0146 0.8411 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217680 1 0.0632 0.8228 0.976 0.000 0.000 0.024 0.000 0.000
#> GSM217681 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0146 0.8411 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217683 1 0.0146 0.8411 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217684 1 0.3547 0.4075 0.668 0.000 0.000 0.332 0.000 0.000
#> GSM217685 3 0.1007 0.9631 0.000 0.000 0.956 0.000 0.044 0.000
#> GSM217686 3 0.1007 0.9631 0.000 0.000 0.956 0.000 0.044 0.000
#> GSM217687 3 0.1007 0.9631 0.000 0.000 0.956 0.000 0.044 0.000
#> GSM217688 3 0.1007 0.9631 0.000 0.000 0.956 0.000 0.044 0.000
#> GSM217689 3 0.1970 0.9296 0.000 0.000 0.900 0.000 0.092 0.008
#> GSM217690 3 0.1970 0.9296 0.000 0.000 0.900 0.000 0.092 0.008
#> GSM217691 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217692 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217693 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217694 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217695 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217696 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217697 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217698 3 0.0000 0.9770 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.0000 0.9770 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0000 0.9770 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0000 0.9770 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.9770 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.1970 0.9296 0.000 0.000 0.900 0.000 0.092 0.008
#> GSM217704 3 0.0146 0.9770 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217705 4 0.3797 0.5511 0.420 0.000 0.000 0.580 0.000 0.000
#> GSM217706 4 0.3747 0.5628 0.396 0.000 0.000 0.604 0.000 0.000
#> GSM217707 4 0.3747 0.5541 0.396 0.000 0.000 0.604 0.000 0.000
#> GSM217708 4 0.2378 0.7058 0.152 0.000 0.000 0.848 0.000 0.000
#> GSM217709 4 0.2178 0.6950 0.132 0.000 0.000 0.868 0.000 0.000
#> GSM217710 4 0.2178 0.6950 0.132 0.000 0.000 0.868 0.000 0.000
#> GSM217711 4 0.2178 0.6950 0.132 0.000 0.000 0.868 0.000 0.000
#> GSM217712 4 0.3620 0.6543 0.352 0.000 0.000 0.648 0.000 0.000
#> GSM217713 4 0.3371 0.7181 0.292 0.000 0.000 0.708 0.000 0.000
#> GSM217714 4 0.3774 0.5245 0.408 0.000 0.000 0.592 0.000 0.000
#> GSM217715 4 0.3774 0.5245 0.408 0.000 0.000 0.592 0.000 0.000
#> GSM217716 4 0.3198 0.7349 0.260 0.000 0.000 0.740 0.000 0.000
#> GSM217717 4 0.3198 0.7349 0.260 0.000 0.000 0.740 0.000 0.000
#> GSM217718 4 0.3050 0.7355 0.236 0.000 0.000 0.764 0.000 0.000
#> GSM217719 4 0.3050 0.7355 0.236 0.000 0.000 0.764 0.000 0.000
#> GSM217720 4 0.3797 0.5511 0.420 0.000 0.000 0.580 0.000 0.000
#> GSM217721 4 0.3126 0.7367 0.248 0.000 0.000 0.752 0.000 0.000
#> GSM217722 4 0.3563 0.6404 0.336 0.000 0.000 0.664 0.000 0.000
#> GSM217723 4 0.3351 0.6278 0.288 0.000 0.000 0.712 0.000 0.000
#> GSM217724 4 0.3515 0.6198 0.324 0.000 0.000 0.676 0.000 0.000
#> GSM217725 4 0.3371 0.6248 0.292 0.000 0.000 0.708 0.000 0.000
#> GSM217726 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 4 0.3371 0.6248 0.292 0.000 0.000 0.708 0.000 0.000
#> GSM217729 1 0.0260 0.8384 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM217730 1 0.0260 0.8384 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM217731 1 0.0260 0.8384 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM217732 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.8433 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.4539 0.7410 0.000 0.096 0.000 0.000 0.688 0.216
#> GSM217738 5 0.4539 0.7410 0.000 0.096 0.000 0.000 0.688 0.216
#> GSM217739 5 0.1765 0.9245 0.000 0.096 0.000 0.000 0.904 0.000
#> GSM217740 5 0.1765 0.9245 0.000 0.096 0.000 0.000 0.904 0.000
#> GSM217741 5 0.1814 0.9257 0.000 0.100 0.000 0.000 0.900 0.000
#> GSM217742 5 0.1814 0.9257 0.000 0.100 0.000 0.000 0.900 0.000
#> GSM217743 5 0.1814 0.9257 0.000 0.100 0.000 0.000 0.900 0.000
#> GSM217744 5 0.1814 0.9257 0.000 0.100 0.000 0.000 0.900 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:hclust 101 3.32e-01 2
#> CV:hclust 96 4.53e-06 3
#> CV:hclust 96 1.26e-05 4
#> CV:hclust 87 1.44e-08 5
#> CV:hclust 91 8.21e-13 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.778 0.955 0.957 0.4979 0.495 0.495
#> 3 3 0.750 0.935 0.876 0.2629 0.873 0.744
#> 4 4 0.846 0.960 0.904 0.1503 0.882 0.679
#> 5 5 0.786 0.869 0.859 0.0577 1.000 1.000
#> 6 6 0.845 0.810 0.819 0.0467 0.957 0.830
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
#> GSM217644 2 0.163 0.956 0.024 0.976
#> GSM217645 2 0.163 0.956 0.024 0.976
#> GSM217646 2 0.163 0.956 0.024 0.976
#> GSM217647 2 0.163 0.956 0.024 0.976
#> GSM217648 2 0.163 0.956 0.024 0.976
#> GSM217649 2 0.163 0.956 0.024 0.976
#> GSM217650 2 0.163 0.956 0.024 0.976
#> GSM217651 2 0.163 0.956 0.024 0.976
#> GSM217652 2 0.163 0.956 0.024 0.976
#> GSM217653 2 0.163 0.956 0.024 0.976
#> GSM217654 2 0.163 0.956 0.024 0.976
#> GSM217655 2 0.163 0.956 0.024 0.976
#> GSM217656 2 0.295 0.944 0.052 0.948
#> GSM217657 2 0.163 0.956 0.024 0.976
#> GSM217658 2 0.163 0.956 0.024 0.976
#> GSM217659 2 0.163 0.956 0.024 0.976
#> GSM217660 2 0.163 0.956 0.024 0.976
#> GSM217661 2 0.163 0.956 0.024 0.976
#> GSM217662 2 0.163 0.956 0.024 0.976
#> GSM217663 2 0.163 0.956 0.024 0.976
#> GSM217664 2 0.163 0.956 0.024 0.976
#> GSM217665 2 0.163 0.956 0.024 0.976
#> GSM217666 2 0.163 0.956 0.024 0.976
#> GSM217667 2 0.163 0.956 0.024 0.976
#> GSM217668 1 0.343 0.963 0.936 0.064
#> GSM217669 1 0.343 0.963 0.936 0.064
#> GSM217670 1 0.343 0.963 0.936 0.064
#> GSM217671 1 0.343 0.963 0.936 0.064
#> GSM217672 1 0.343 0.963 0.936 0.064
#> GSM217673 1 0.343 0.963 0.936 0.064
#> GSM217674 1 0.000 0.965 1.000 0.000
#> GSM217675 1 0.000 0.965 1.000 0.000
#> GSM217676 1 0.000 0.965 1.000 0.000
#> GSM217677 1 0.000 0.965 1.000 0.000
#> GSM217678 1 0.000 0.965 1.000 0.000
#> GSM217679 1 0.000 0.965 1.000 0.000
#> GSM217680 1 0.000 0.965 1.000 0.000
#> GSM217681 1 0.000 0.965 1.000 0.000
#> GSM217682 1 0.000 0.965 1.000 0.000
#> GSM217683 1 0.000 0.965 1.000 0.000
#> GSM217684 1 0.343 0.963 0.936 0.064
#> GSM217685 2 0.469 0.930 0.100 0.900
#> GSM217686 2 0.469 0.930 0.100 0.900
#> GSM217687 2 0.469 0.930 0.100 0.900
#> GSM217688 2 0.469 0.930 0.100 0.900
#> GSM217689 2 0.469 0.930 0.100 0.900
#> GSM217690 2 0.469 0.930 0.100 0.900
#> GSM217691 2 0.469 0.930 0.100 0.900
#> GSM217692 2 0.469 0.930 0.100 0.900
#> GSM217693 2 0.469 0.930 0.100 0.900
#> GSM217694 2 0.469 0.930 0.100 0.900
#> GSM217695 2 0.469 0.930 0.100 0.900
#> GSM217696 2 0.469 0.930 0.100 0.900
#> GSM217697 2 0.469 0.930 0.100 0.900
#> GSM217698 2 0.469 0.930 0.100 0.900
#> GSM217699 2 0.469 0.930 0.100 0.900
#> GSM217700 2 0.469 0.930 0.100 0.900
#> GSM217701 2 0.469 0.930 0.100 0.900
#> GSM217702 2 0.469 0.930 0.100 0.900
#> GSM217703 2 0.469 0.930 0.100 0.900
#> GSM217704 2 0.469 0.930 0.100 0.900
#> GSM217705 1 0.343 0.963 0.936 0.064
#> GSM217706 1 0.343 0.963 0.936 0.064
#> GSM217707 1 0.327 0.964 0.940 0.060
#> GSM217708 1 0.224 0.965 0.964 0.036
#> GSM217709 1 0.343 0.963 0.936 0.064
#> GSM217710 1 0.343 0.963 0.936 0.064
#> GSM217711 1 0.343 0.963 0.936 0.064
#> GSM217712 1 0.343 0.963 0.936 0.064
#> GSM217713 1 0.343 0.963 0.936 0.064
#> GSM217714 1 0.343 0.963 0.936 0.064
#> GSM217715 1 0.343 0.963 0.936 0.064
#> GSM217716 1 0.343 0.963 0.936 0.064
#> GSM217717 1 0.343 0.963 0.936 0.064
#> GSM217718 1 0.343 0.963 0.936 0.064
#> GSM217719 1 0.343 0.963 0.936 0.064
#> GSM217720 1 0.343 0.963 0.936 0.064
#> GSM217721 1 0.343 0.963 0.936 0.064
#> GSM217722 1 0.260 0.965 0.956 0.044
#> GSM217723 1 0.000 0.965 1.000 0.000
#> GSM217724 1 0.000 0.965 1.000 0.000
#> GSM217725 1 0.000 0.965 1.000 0.000
#> GSM217726 1 0.000 0.965 1.000 0.000
#> GSM217727 1 0.000 0.965 1.000 0.000
#> GSM217728 1 0.000 0.965 1.000 0.000
#> GSM217729 1 0.000 0.965 1.000 0.000
#> GSM217730 1 0.000 0.965 1.000 0.000
#> GSM217731 1 0.000 0.965 1.000 0.000
#> GSM217732 1 0.000 0.965 1.000 0.000
#> GSM217733 1 0.000 0.965 1.000 0.000
#> GSM217734 1 0.000 0.965 1.000 0.000
#> GSM217735 1 0.000 0.965 1.000 0.000
#> GSM217736 1 0.000 0.965 1.000 0.000
#> GSM217737 2 0.163 0.956 0.024 0.976
#> GSM217738 2 0.163 0.956 0.024 0.976
#> GSM217739 2 0.163 0.956 0.024 0.976
#> GSM217740 2 0.163 0.956 0.024 0.976
#> GSM217741 2 0.163 0.956 0.024 0.976
#> GSM217742 2 0.163 0.956 0.024 0.976
#> GSM217743 2 0.163 0.956 0.024 0.976
#> GSM217744 2 0.163 0.956 0.024 0.976
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217645 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217646 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217649 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217650 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217651 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217652 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217653 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217654 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217655 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217656 2 0.1031 0.957 0.024 0.976 0.000
#> GSM217657 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217658 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217659 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217660 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217661 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217662 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217663 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217664 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.996 0.000 1.000 0.000
#> GSM217668 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217669 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217674 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217675 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217676 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217677 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217678 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217679 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217680 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217681 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217682 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217683 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217684 1 0.0237 0.877 0.996 0.000 0.004
#> GSM217685 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217686 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217687 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217688 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217689 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217690 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217691 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217692 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217693 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217694 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217695 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217696 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217697 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217698 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217699 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217700 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217701 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217702 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217703 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217704 3 0.5497 1.000 0.000 0.292 0.708
#> GSM217705 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.877 1.000 0.000 0.000
#> GSM217723 1 0.3038 0.873 0.896 0.000 0.104
#> GSM217724 1 0.5363 0.864 0.724 0.000 0.276
#> GSM217725 1 0.5397 0.864 0.720 0.000 0.280
#> GSM217726 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217727 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217728 1 0.5397 0.864 0.720 0.000 0.280
#> GSM217729 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217730 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217731 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217732 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217733 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217734 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217735 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217736 1 0.5431 0.863 0.716 0.000 0.284
#> GSM217737 2 0.0424 0.990 0.000 0.992 0.008
#> GSM217738 2 0.0424 0.990 0.000 0.992 0.008
#> GSM217739 2 0.0424 0.990 0.000 0.992 0.008
#> GSM217740 2 0.0424 0.990 0.000 0.992 0.008
#> GSM217741 2 0.0424 0.990 0.000 0.992 0.008
#> GSM217742 2 0.0424 0.990 0.000 0.992 0.008
#> GSM217743 2 0.0424 0.990 0.000 0.992 0.008
#> GSM217744 2 0.0424 0.990 0.000 0.992 0.008
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0672 0.960 0.000 0.984 0.008 0.008
#> GSM217645 2 0.0672 0.960 0.000 0.984 0.008 0.008
#> GSM217646 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217647 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217648 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217649 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217650 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217651 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217652 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217653 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217654 2 0.1305 0.947 0.000 0.960 0.004 0.036
#> GSM217655 2 0.1004 0.953 0.000 0.972 0.004 0.024
#> GSM217656 2 0.2860 0.892 0.004 0.888 0.008 0.100
#> GSM217657 2 0.1970 0.931 0.000 0.932 0.008 0.060
#> GSM217658 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217659 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217660 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217661 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217662 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217663 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217664 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217665 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217666 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217667 2 0.0336 0.962 0.000 0.992 0.008 0.000
#> GSM217668 4 0.4964 0.963 0.244 0.000 0.032 0.724
#> GSM217669 4 0.4872 0.964 0.244 0.000 0.028 0.728
#> GSM217670 4 0.4964 0.963 0.244 0.000 0.032 0.724
#> GSM217671 4 0.4964 0.963 0.244 0.000 0.032 0.724
#> GSM217672 4 0.4964 0.963 0.244 0.000 0.032 0.724
#> GSM217673 4 0.4964 0.963 0.244 0.000 0.032 0.724
#> GSM217674 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217675 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217676 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217677 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217678 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217680 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217683 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217684 4 0.5358 0.948 0.252 0.000 0.048 0.700
#> GSM217685 3 0.2816 0.979 0.000 0.064 0.900 0.036
#> GSM217686 3 0.2816 0.979 0.000 0.064 0.900 0.036
#> GSM217687 3 0.2816 0.979 0.000 0.064 0.900 0.036
#> GSM217688 3 0.2816 0.979 0.000 0.064 0.900 0.036
#> GSM217689 3 0.3245 0.971 0.000 0.064 0.880 0.056
#> GSM217690 3 0.3245 0.971 0.000 0.064 0.880 0.056
#> GSM217691 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217692 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217693 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217694 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217695 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217696 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217697 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217698 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217699 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217700 3 0.1716 0.983 0.000 0.064 0.936 0.000
#> GSM217701 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217702 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217703 3 0.3245 0.971 0.000 0.064 0.880 0.056
#> GSM217704 3 0.2300 0.982 0.000 0.064 0.920 0.016
#> GSM217705 4 0.5052 0.961 0.244 0.000 0.036 0.720
#> GSM217706 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217707 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217708 4 0.4353 0.953 0.232 0.000 0.012 0.756
#> GSM217709 4 0.4248 0.945 0.220 0.000 0.012 0.768
#> GSM217710 4 0.4098 0.930 0.204 0.000 0.012 0.784
#> GSM217711 4 0.4098 0.930 0.204 0.000 0.012 0.784
#> GSM217712 4 0.3942 0.962 0.236 0.000 0.000 0.764
#> GSM217713 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217714 4 0.4872 0.964 0.244 0.000 0.028 0.728
#> GSM217715 4 0.4872 0.964 0.244 0.000 0.028 0.728
#> GSM217716 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217717 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217718 4 0.3942 0.962 0.236 0.000 0.000 0.764
#> GSM217719 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217720 4 0.5052 0.961 0.244 0.000 0.036 0.720
#> GSM217721 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217722 4 0.4008 0.965 0.244 0.000 0.000 0.756
#> GSM217723 4 0.5396 0.540 0.464 0.000 0.012 0.524
#> GSM217724 1 0.1356 0.951 0.960 0.000 0.008 0.032
#> GSM217725 1 0.1284 0.962 0.964 0.000 0.012 0.024
#> GSM217726 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217727 1 0.0469 0.988 0.988 0.000 0.012 0.000
#> GSM217728 1 0.1174 0.966 0.968 0.000 0.012 0.020
#> GSM217729 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0336 0.986 0.992 0.000 0.008 0.000
#> GSM217733 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0336 0.986 0.992 0.000 0.008 0.000
#> GSM217736 1 0.0000 0.989 1.000 0.000 0.000 0.000
#> GSM217737 2 0.2814 0.903 0.000 0.868 0.000 0.132
#> GSM217738 2 0.2814 0.903 0.000 0.868 0.000 0.132
#> GSM217739 2 0.2760 0.904 0.000 0.872 0.000 0.128
#> GSM217740 2 0.2760 0.904 0.000 0.872 0.000 0.128
#> GSM217741 2 0.2760 0.904 0.000 0.872 0.000 0.128
#> GSM217742 2 0.2760 0.904 0.000 0.872 0.000 0.128
#> GSM217743 2 0.2760 0.904 0.000 0.872 0.000 0.128
#> GSM217744 2 0.2760 0.904 0.000 0.872 0.000 0.128
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0671 0.871 0.016 0.980 0.000 0.000 NA
#> GSM217645 2 0.0451 0.872 0.008 0.988 0.000 0.000 NA
#> GSM217646 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217647 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217648 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217649 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217650 2 0.0290 0.874 0.008 0.992 0.000 0.000 NA
#> GSM217651 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217652 2 0.0162 0.874 0.004 0.996 0.000 0.000 NA
#> GSM217653 2 0.0162 0.874 0.004 0.996 0.000 0.000 NA
#> GSM217654 2 0.2331 0.843 0.080 0.900 0.000 0.000 NA
#> GSM217655 2 0.2079 0.849 0.064 0.916 0.000 0.000 NA
#> GSM217656 2 0.6311 0.590 0.100 0.600 0.000 0.040 NA
#> GSM217657 2 0.4951 0.698 0.100 0.704 0.000 0.000 NA
#> GSM217658 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217659 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217660 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217661 2 0.0290 0.873 0.008 0.992 0.000 0.000 NA
#> GSM217662 2 0.0290 0.874 0.008 0.992 0.000 0.000 NA
#> GSM217663 2 0.0162 0.874 0.004 0.996 0.000 0.000 NA
#> GSM217664 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217665 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217666 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217667 2 0.0404 0.873 0.012 0.988 0.000 0.000 NA
#> GSM217668 4 0.1608 0.903 0.000 0.000 0.000 0.928 NA
#> GSM217669 4 0.1197 0.909 0.000 0.000 0.000 0.952 NA
#> GSM217670 4 0.1478 0.904 0.000 0.000 0.000 0.936 NA
#> GSM217671 4 0.1608 0.903 0.000 0.000 0.000 0.928 NA
#> GSM217672 4 0.1608 0.903 0.000 0.000 0.000 0.928 NA
#> GSM217673 4 0.1608 0.903 0.000 0.000 0.000 0.928 NA
#> GSM217674 1 0.3475 0.937 0.804 0.000 0.004 0.180 NA
#> GSM217675 1 0.3475 0.937 0.804 0.000 0.004 0.180 NA
#> GSM217676 1 0.3925 0.937 0.784 0.000 0.004 0.180 NA
#> GSM217677 1 0.3243 0.938 0.812 0.000 0.004 0.180 NA
#> GSM217678 1 0.4540 0.923 0.748 0.000 0.004 0.180 NA
#> GSM217679 1 0.3475 0.937 0.804 0.000 0.004 0.180 NA
#> GSM217680 1 0.4540 0.923 0.748 0.000 0.004 0.180 NA
#> GSM217681 1 0.3419 0.938 0.804 0.000 0.000 0.180 NA
#> GSM217682 1 0.3575 0.937 0.800 0.000 0.004 0.180 NA
#> GSM217683 1 0.3475 0.937 0.804 0.000 0.004 0.180 NA
#> GSM217684 4 0.2669 0.871 0.020 0.000 0.000 0.876 NA
#> GSM217685 3 0.2291 0.937 0.024 0.012 0.916 0.000 NA
#> GSM217686 3 0.2291 0.937 0.024 0.012 0.916 0.000 NA
#> GSM217687 3 0.2291 0.937 0.024 0.012 0.916 0.000 NA
#> GSM217688 3 0.2291 0.937 0.024 0.012 0.916 0.000 NA
#> GSM217689 3 0.3011 0.922 0.036 0.012 0.876 0.000 NA
#> GSM217690 3 0.3011 0.922 0.036 0.012 0.876 0.000 NA
#> GSM217691 3 0.2464 0.950 0.032 0.012 0.908 0.000 NA
#> GSM217692 3 0.2464 0.950 0.032 0.012 0.908 0.000 NA
#> GSM217693 3 0.2464 0.950 0.032 0.012 0.908 0.000 NA
#> GSM217694 3 0.2464 0.950 0.032 0.012 0.908 0.000 NA
#> GSM217695 3 0.2379 0.950 0.028 0.012 0.912 0.000 NA
#> GSM217696 3 0.2379 0.950 0.028 0.012 0.912 0.000 NA
#> GSM217697 3 0.2379 0.950 0.028 0.012 0.912 0.000 NA
#> GSM217698 3 0.2379 0.950 0.028 0.012 0.912 0.000 NA
#> GSM217699 3 0.0693 0.949 0.008 0.012 0.980 0.000 NA
#> GSM217700 3 0.1869 0.951 0.016 0.012 0.936 0.000 NA
#> GSM217701 3 0.0854 0.949 0.008 0.012 0.976 0.000 NA
#> GSM217702 3 0.0854 0.949 0.008 0.012 0.976 0.000 NA
#> GSM217703 3 0.3011 0.922 0.036 0.012 0.876 0.000 NA
#> GSM217704 3 0.2452 0.949 0.028 0.012 0.908 0.000 NA
#> GSM217705 4 0.1608 0.903 0.000 0.000 0.000 0.928 NA
#> GSM217706 4 0.0000 0.911 0.000 0.000 0.000 1.000 NA
#> GSM217707 4 0.0566 0.910 0.000 0.000 0.004 0.984 NA
#> GSM217708 4 0.3596 0.766 0.012 0.000 0.000 0.776 NA
#> GSM217709 4 0.3821 0.758 0.020 0.000 0.000 0.764 NA
#> GSM217710 4 0.3882 0.752 0.020 0.000 0.000 0.756 NA
#> GSM217711 4 0.3882 0.752 0.020 0.000 0.000 0.756 NA
#> GSM217712 4 0.0613 0.909 0.008 0.000 0.004 0.984 NA
#> GSM217713 4 0.0451 0.910 0.000 0.000 0.004 0.988 NA
#> GSM217714 4 0.0880 0.909 0.000 0.000 0.000 0.968 NA
#> GSM217715 4 0.0880 0.909 0.000 0.000 0.000 0.968 NA
#> GSM217716 4 0.0566 0.911 0.000 0.000 0.004 0.984 NA
#> GSM217717 4 0.0451 0.910 0.000 0.000 0.004 0.988 NA
#> GSM217718 4 0.1492 0.908 0.008 0.000 0.004 0.948 NA
#> GSM217719 4 0.1205 0.910 0.000 0.000 0.004 0.956 NA
#> GSM217720 4 0.1608 0.903 0.000 0.000 0.000 0.928 NA
#> GSM217721 4 0.0566 0.909 0.000 0.000 0.004 0.984 NA
#> GSM217722 4 0.0566 0.910 0.000 0.000 0.004 0.984 NA
#> GSM217723 4 0.6407 0.229 0.204 0.000 0.000 0.500 NA
#> GSM217724 1 0.5836 0.808 0.608 0.000 0.000 0.216 NA
#> GSM217725 1 0.6258 0.687 0.528 0.000 0.000 0.184 NA
#> GSM217726 1 0.3475 0.937 0.804 0.000 0.004 0.180 NA
#> GSM217727 1 0.3475 0.937 0.804 0.000 0.004 0.180 NA
#> GSM217728 1 0.6258 0.687 0.528 0.000 0.000 0.184 NA
#> GSM217729 1 0.4656 0.920 0.740 0.000 0.004 0.180 NA
#> GSM217730 1 0.4656 0.920 0.740 0.000 0.004 0.180 NA
#> GSM217731 1 0.4599 0.922 0.744 0.000 0.004 0.180 NA
#> GSM217732 1 0.3922 0.933 0.780 0.000 0.000 0.180 NA
#> GSM217733 1 0.4078 0.934 0.776 0.000 0.004 0.180 NA
#> GSM217734 1 0.3209 0.938 0.812 0.000 0.000 0.180 NA
#> GSM217735 1 0.3922 0.933 0.780 0.000 0.000 0.180 NA
#> GSM217736 1 0.2929 0.939 0.820 0.000 0.000 0.180 NA
#> GSM217737 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
#> GSM217738 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
#> GSM217739 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
#> GSM217740 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
#> GSM217741 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
#> GSM217742 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
#> GSM217743 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
#> GSM217744 2 0.4273 0.664 0.000 0.552 0.000 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.2112 0.8212 0.000 0.896 0.000 0.000 0.016 0.088
#> GSM217645 2 0.1779 0.8349 0.000 0.920 0.000 0.000 0.016 0.064
#> GSM217646 2 0.1075 0.8866 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM217647 2 0.0436 0.8930 0.004 0.988 0.000 0.000 0.004 0.004
#> GSM217648 2 0.0937 0.8895 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM217649 2 0.1075 0.8866 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM217650 2 0.0291 0.8942 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM217651 2 0.0865 0.8903 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM217652 2 0.0291 0.8942 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM217653 2 0.0146 0.8941 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217654 2 0.3834 0.4916 0.000 0.728 0.000 0.004 0.024 0.244
#> GSM217655 2 0.3511 0.5769 0.000 0.760 0.000 0.000 0.024 0.216
#> GSM217656 6 0.6757 0.0000 0.000 0.340 0.000 0.128 0.092 0.440
#> GSM217657 2 0.5663 -0.5882 0.000 0.492 0.000 0.032 0.072 0.404
#> GSM217658 2 0.0436 0.8930 0.004 0.988 0.000 0.000 0.004 0.004
#> GSM217659 2 0.1075 0.8866 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM217660 2 0.0937 0.8889 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM217661 2 0.1007 0.8858 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM217662 2 0.0291 0.8942 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM217663 2 0.0291 0.8942 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM217664 2 0.0436 0.8930 0.004 0.988 0.000 0.000 0.004 0.004
#> GSM217665 2 0.0436 0.8930 0.004 0.988 0.000 0.000 0.004 0.004
#> GSM217666 2 0.0436 0.8930 0.004 0.988 0.000 0.000 0.004 0.004
#> GSM217667 2 0.0436 0.8930 0.004 0.988 0.000 0.000 0.004 0.004
#> GSM217668 4 0.3852 0.7744 0.016 0.000 0.000 0.720 0.008 0.256
#> GSM217669 4 0.3775 0.7842 0.016 0.000 0.000 0.744 0.012 0.228
#> GSM217670 4 0.3582 0.7770 0.016 0.000 0.000 0.732 0.000 0.252
#> GSM217671 4 0.3652 0.7744 0.016 0.000 0.000 0.720 0.000 0.264
#> GSM217672 4 0.3652 0.7744 0.016 0.000 0.000 0.720 0.000 0.264
#> GSM217673 4 0.3652 0.7744 0.016 0.000 0.000 0.720 0.000 0.264
#> GSM217674 1 0.2680 0.8853 0.880 0.000 0.000 0.060 0.048 0.012
#> GSM217675 1 0.2898 0.8841 0.868 0.000 0.000 0.060 0.056 0.016
#> GSM217676 1 0.3391 0.8878 0.836 0.000 0.004 0.060 0.088 0.012
#> GSM217677 1 0.2189 0.8919 0.904 0.000 0.000 0.060 0.032 0.004
#> GSM217678 1 0.3580 0.8673 0.824 0.000 0.004 0.060 0.096 0.016
#> GSM217679 1 0.2614 0.8887 0.884 0.000 0.000 0.060 0.044 0.012
#> GSM217680 1 0.3794 0.8666 0.812 0.000 0.004 0.060 0.100 0.024
#> GSM217681 1 0.1976 0.8906 0.916 0.000 0.000 0.060 0.008 0.016
#> GSM217682 1 0.2836 0.8849 0.872 0.000 0.000 0.060 0.052 0.016
#> GSM217683 1 0.2744 0.8849 0.876 0.000 0.000 0.060 0.052 0.012
#> GSM217684 4 0.5160 0.7058 0.048 0.000 0.000 0.604 0.032 0.316
#> GSM217685 3 0.3295 0.8678 0.020 0.004 0.832 0.000 0.020 0.124
#> GSM217686 3 0.3295 0.8678 0.020 0.004 0.832 0.000 0.020 0.124
#> GSM217687 3 0.3295 0.8678 0.020 0.004 0.832 0.000 0.020 0.124
#> GSM217688 3 0.3295 0.8678 0.020 0.004 0.832 0.000 0.020 0.124
#> GSM217689 3 0.4411 0.8210 0.040 0.004 0.752 0.000 0.040 0.164
#> GSM217690 3 0.4411 0.8210 0.040 0.004 0.752 0.000 0.040 0.164
#> GSM217691 3 0.1780 0.9006 0.004 0.004 0.932 0.000 0.024 0.036
#> GSM217692 3 0.1780 0.9006 0.004 0.004 0.932 0.000 0.024 0.036
#> GSM217693 3 0.1780 0.9006 0.004 0.004 0.932 0.000 0.024 0.036
#> GSM217694 3 0.1780 0.9006 0.004 0.004 0.932 0.000 0.024 0.036
#> GSM217695 3 0.1706 0.9007 0.004 0.004 0.936 0.000 0.024 0.032
#> GSM217696 3 0.1706 0.9007 0.004 0.004 0.936 0.000 0.024 0.032
#> GSM217697 3 0.1706 0.9007 0.004 0.004 0.936 0.000 0.024 0.032
#> GSM217698 3 0.1921 0.9006 0.012 0.004 0.928 0.000 0.024 0.032
#> GSM217699 3 0.1854 0.8979 0.016 0.004 0.932 0.000 0.028 0.020
#> GSM217700 3 0.1053 0.9002 0.012 0.004 0.964 0.000 0.020 0.000
#> GSM217701 3 0.1854 0.8979 0.016 0.004 0.932 0.000 0.028 0.020
#> GSM217702 3 0.1854 0.8979 0.016 0.004 0.932 0.000 0.028 0.020
#> GSM217703 3 0.4478 0.8148 0.040 0.004 0.744 0.000 0.040 0.172
#> GSM217704 3 0.1706 0.9007 0.004 0.004 0.936 0.000 0.024 0.032
#> GSM217705 4 0.4056 0.7670 0.016 0.000 0.000 0.696 0.012 0.276
#> GSM217706 4 0.1173 0.7950 0.016 0.000 0.000 0.960 0.008 0.016
#> GSM217707 4 0.1630 0.7883 0.016 0.000 0.000 0.940 0.024 0.020
#> GSM217708 4 0.4185 0.6038 0.004 0.000 0.000 0.744 0.084 0.168
#> GSM217709 4 0.4030 0.5969 0.000 0.000 0.000 0.748 0.080 0.172
#> GSM217710 4 0.4494 0.5316 0.000 0.000 0.000 0.692 0.092 0.216
#> GSM217711 4 0.4494 0.5316 0.000 0.000 0.000 0.692 0.092 0.216
#> GSM217712 4 0.0767 0.7905 0.012 0.000 0.000 0.976 0.004 0.008
#> GSM217713 4 0.0748 0.7927 0.016 0.000 0.000 0.976 0.004 0.004
#> GSM217714 4 0.3261 0.7874 0.016 0.000 0.000 0.780 0.000 0.204
#> GSM217715 4 0.3376 0.7845 0.016 0.000 0.000 0.764 0.000 0.220
#> GSM217716 4 0.1168 0.7963 0.016 0.000 0.000 0.956 0.000 0.028
#> GSM217717 4 0.0603 0.7929 0.016 0.000 0.000 0.980 0.000 0.004
#> GSM217718 4 0.2071 0.7840 0.012 0.000 0.000 0.916 0.028 0.044
#> GSM217719 4 0.2164 0.7856 0.016 0.000 0.000 0.912 0.028 0.044
#> GSM217720 4 0.4077 0.7648 0.016 0.000 0.000 0.692 0.012 0.280
#> GSM217721 4 0.1059 0.7910 0.016 0.000 0.000 0.964 0.016 0.004
#> GSM217722 4 0.1794 0.7852 0.016 0.000 0.000 0.932 0.028 0.024
#> GSM217723 4 0.7533 0.0729 0.176 0.000 0.004 0.400 0.208 0.212
#> GSM217724 1 0.6288 0.6658 0.596 0.000 0.004 0.100 0.172 0.128
#> GSM217725 1 0.6929 0.5133 0.492 0.000 0.004 0.092 0.204 0.208
#> GSM217726 1 0.2866 0.8888 0.868 0.000 0.000 0.060 0.060 0.012
#> GSM217727 1 0.2866 0.8888 0.868 0.000 0.000 0.060 0.060 0.012
#> GSM217728 1 0.6869 0.5307 0.504 0.000 0.004 0.092 0.200 0.200
#> GSM217729 1 0.4006 0.8537 0.796 0.000 0.004 0.060 0.112 0.028
#> GSM217730 1 0.4235 0.8516 0.780 0.000 0.004 0.060 0.120 0.036
#> GSM217731 1 0.3794 0.8666 0.812 0.000 0.004 0.060 0.100 0.024
#> GSM217732 1 0.2793 0.8828 0.876 0.000 0.000 0.060 0.020 0.044
#> GSM217733 1 0.2655 0.8884 0.884 0.000 0.000 0.060 0.036 0.020
#> GSM217734 1 0.1983 0.8909 0.916 0.000 0.000 0.060 0.012 0.012
#> GSM217735 1 0.2793 0.8828 0.876 0.000 0.000 0.060 0.020 0.044
#> GSM217736 1 0.1668 0.8933 0.928 0.000 0.000 0.060 0.008 0.004
#> GSM217737 5 0.3923 0.9855 0.000 0.416 0.000 0.000 0.580 0.004
#> GSM217738 5 0.3923 0.9855 0.000 0.416 0.000 0.000 0.580 0.004
#> GSM217739 5 0.3789 0.9932 0.000 0.416 0.000 0.000 0.584 0.000
#> GSM217740 5 0.3789 0.9932 0.000 0.416 0.000 0.000 0.584 0.000
#> GSM217741 5 0.3923 0.9939 0.000 0.416 0.000 0.000 0.580 0.004
#> GSM217742 5 0.3923 0.9939 0.000 0.416 0.000 0.000 0.580 0.004
#> GSM217743 5 0.3923 0.9939 0.000 0.416 0.000 0.000 0.580 0.004
#> GSM217744 5 0.3923 0.9939 0.000 0.416 0.000 0.000 0.580 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:kmeans 101 3.32e-01 2
#> CV:kmeans 101 2.94e-07 3
#> CV:kmeans 101 6.77e-07 4
#> CV:kmeans 100 8.52e-07 5
#> CV:kmeans 97 1.30e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.5051 0.495 0.495
#> 3 3 1.000 0.999 0.998 0.2506 0.873 0.744
#> 4 4 1.000 0.996 0.996 0.1871 0.881 0.678
#> 5 5 0.945 0.960 0.960 0.0584 0.952 0.810
#> 6 6 0.916 0.810 0.890 0.0288 0.985 0.926
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 4 5
There is also optional best \(k\) = 2 3 4 5 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
#> GSM217644 2 0 1 0 1
#> GSM217645 2 0 1 0 1
#> GSM217646 2 0 1 0 1
#> GSM217647 2 0 1 0 1
#> GSM217648 2 0 1 0 1
#> GSM217649 2 0 1 0 1
#> GSM217650 2 0 1 0 1
#> GSM217651 2 0 1 0 1
#> GSM217652 2 0 1 0 1
#> GSM217653 2 0 1 0 1
#> GSM217654 2 0 1 0 1
#> GSM217655 2 0 1 0 1
#> GSM217656 2 0 1 0 1
#> GSM217657 2 0 1 0 1
#> GSM217658 2 0 1 0 1
#> GSM217659 2 0 1 0 1
#> GSM217660 2 0 1 0 1
#> GSM217661 2 0 1 0 1
#> GSM217662 2 0 1 0 1
#> GSM217663 2 0 1 0 1
#> GSM217664 2 0 1 0 1
#> GSM217665 2 0 1 0 1
#> GSM217666 2 0 1 0 1
#> GSM217667 2 0 1 0 1
#> GSM217668 1 0 1 1 0
#> GSM217669 1 0 1 1 0
#> GSM217670 1 0 1 1 0
#> GSM217671 1 0 1 1 0
#> GSM217672 1 0 1 1 0
#> GSM217673 1 0 1 1 0
#> GSM217674 1 0 1 1 0
#> GSM217675 1 0 1 1 0
#> GSM217676 1 0 1 1 0
#> GSM217677 1 0 1 1 0
#> GSM217678 1 0 1 1 0
#> GSM217679 1 0 1 1 0
#> GSM217680 1 0 1 1 0
#> GSM217681 1 0 1 1 0
#> GSM217682 1 0 1 1 0
#> GSM217683 1 0 1 1 0
#> GSM217684 1 0 1 1 0
#> GSM217685 2 0 1 0 1
#> GSM217686 2 0 1 0 1
#> GSM217687 2 0 1 0 1
#> GSM217688 2 0 1 0 1
#> GSM217689 2 0 1 0 1
#> GSM217690 2 0 1 0 1
#> GSM217691 2 0 1 0 1
#> GSM217692 2 0 1 0 1
#> GSM217693 2 0 1 0 1
#> GSM217694 2 0 1 0 1
#> GSM217695 2 0 1 0 1
#> GSM217696 2 0 1 0 1
#> GSM217697 2 0 1 0 1
#> GSM217698 2 0 1 0 1
#> GSM217699 2 0 1 0 1
#> GSM217700 2 0 1 0 1
#> GSM217701 2 0 1 0 1
#> GSM217702 2 0 1 0 1
#> GSM217703 2 0 1 0 1
#> GSM217704 2 0 1 0 1
#> GSM217705 1 0 1 1 0
#> GSM217706 1 0 1 1 0
#> GSM217707 1 0 1 1 0
#> GSM217708 1 0 1 1 0
#> GSM217709 1 0 1 1 0
#> GSM217710 1 0 1 1 0
#> GSM217711 1 0 1 1 0
#> GSM217712 1 0 1 1 0
#> GSM217713 1 0 1 1 0
#> GSM217714 1 0 1 1 0
#> GSM217715 1 0 1 1 0
#> GSM217716 1 0 1 1 0
#> GSM217717 1 0 1 1 0
#> GSM217718 1 0 1 1 0
#> GSM217719 1 0 1 1 0
#> GSM217720 1 0 1 1 0
#> GSM217721 1 0 1 1 0
#> GSM217722 1 0 1 1 0
#> GSM217723 1 0 1 1 0
#> GSM217724 1 0 1 1 0
#> GSM217725 1 0 1 1 0
#> GSM217726 1 0 1 1 0
#> GSM217727 1 0 1 1 0
#> GSM217728 1 0 1 1 0
#> GSM217729 1 0 1 1 0
#> GSM217730 1 0 1 1 0
#> GSM217731 1 0 1 1 0
#> GSM217732 1 0 1 1 0
#> GSM217733 1 0 1 1 0
#> GSM217734 1 0 1 1 0
#> GSM217735 1 0 1 1 0
#> GSM217736 1 0 1 1 0
#> GSM217737 2 0 1 0 1
#> GSM217738 2 0 1 0 1
#> GSM217739 2 0 1 0 1
#> GSM217740 2 0 1 0 1
#> GSM217741 2 0 1 0 1
#> GSM217742 2 0 1 0 1
#> GSM217743 2 0 1 0 1
#> GSM217744 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217645 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217646 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217647 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217648 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217649 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217650 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217651 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217652 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217653 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217654 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217655 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217656 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217657 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217658 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217659 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217660 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217661 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217662 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217663 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217664 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217665 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217666 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217667 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217668 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217669 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217674 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217675 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217676 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217677 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217678 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217679 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217680 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217681 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217682 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217683 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217684 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217685 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217686 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217687 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217688 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217689 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217690 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217691 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217692 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217693 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217694 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217695 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217696 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217697 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217698 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217699 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217700 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217701 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217702 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217703 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217704 3 0.0237 1.000 0.000 0.004 0.996
#> GSM217705 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217723 1 0.0000 0.998 1.000 0.000 0.000
#> GSM217724 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217725 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217726 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217727 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217728 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217729 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217730 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217731 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217732 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217733 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217734 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217735 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217736 1 0.0237 0.998 0.996 0.000 0.004
#> GSM217737 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217738 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217739 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217740 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217741 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217742 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217743 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217744 2 0.0000 1.000 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217645 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217646 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217647 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217648 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217649 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217650 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217651 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217652 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217653 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217654 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217655 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217656 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217657 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217658 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217659 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217660 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217661 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217662 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217663 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217664 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217665 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217666 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217667 2 0.0000 0.998 0.000 1.000 0 0.000
#> GSM217668 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217669 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217670 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217671 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217672 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217673 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217674 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217675 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217676 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217677 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217678 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217679 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217680 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217681 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217682 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217683 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217684 4 0.1716 0.931 0.064 0.000 0 0.936
#> GSM217685 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217705 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217706 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217707 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217708 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217709 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217710 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217711 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217712 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217713 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217714 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217715 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217716 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217717 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217718 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217719 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217720 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217721 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217722 4 0.0000 0.997 0.000 0.000 0 1.000
#> GSM217723 1 0.1716 0.939 0.936 0.000 0 0.064
#> GSM217724 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217725 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217726 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217727 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217728 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217729 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217730 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217731 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217732 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217733 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217734 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217735 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217736 1 0.0336 0.997 0.992 0.000 0 0.008
#> GSM217737 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217738 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217739 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217740 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217741 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217742 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217743 2 0.0336 0.996 0.008 0.992 0 0.000
#> GSM217744 2 0.0336 0.996 0.008 0.992 0 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0609 0.965 0.000 0.980 0.000 0.000 0.020
#> GSM217645 2 0.0609 0.965 0.000 0.980 0.000 0.000 0.020
#> GSM217646 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217648 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217649 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217651 2 0.0162 0.981 0.000 0.996 0.000 0.000 0.004
#> GSM217652 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217653 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217654 5 0.3039 0.858 0.000 0.192 0.000 0.000 0.808
#> GSM217655 2 0.3039 0.737 0.000 0.808 0.000 0.000 0.192
#> GSM217656 5 0.1270 0.812 0.000 0.052 0.000 0.000 0.948
#> GSM217657 5 0.1851 0.844 0.000 0.088 0.000 0.000 0.912
#> GSM217658 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217660 5 0.4297 0.488 0.000 0.472 0.000 0.000 0.528
#> GSM217661 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217662 2 0.0290 0.977 0.000 0.992 0.000 0.000 0.008
#> GSM217663 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217667 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> GSM217668 4 0.1043 0.962 0.000 0.000 0.000 0.960 0.040
#> GSM217669 4 0.1121 0.962 0.000 0.000 0.000 0.956 0.044
#> GSM217670 4 0.1043 0.962 0.000 0.000 0.000 0.960 0.040
#> GSM217671 4 0.1043 0.962 0.000 0.000 0.000 0.960 0.040
#> GSM217672 4 0.1043 0.962 0.000 0.000 0.000 0.960 0.040
#> GSM217673 4 0.1043 0.962 0.000 0.000 0.000 0.960 0.040
#> GSM217674 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.3242 0.845 0.116 0.000 0.000 0.844 0.040
#> GSM217685 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217686 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217687 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217688 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217689 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217690 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217691 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0162 0.998 0.000 0.000 0.996 0.000 0.004
#> GSM217704 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0963 0.963 0.000 0.000 0.000 0.964 0.036
#> GSM217706 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000
#> GSM217708 4 0.1671 0.931 0.000 0.000 0.000 0.924 0.076
#> GSM217709 4 0.1732 0.929 0.000 0.000 0.000 0.920 0.080
#> GSM217710 4 0.2127 0.910 0.000 0.000 0.000 0.892 0.108
#> GSM217711 4 0.2127 0.910 0.000 0.000 0.000 0.892 0.108
#> GSM217712 4 0.0162 0.965 0.000 0.000 0.000 0.996 0.004
#> GSM217713 4 0.0404 0.964 0.000 0.000 0.000 0.988 0.012
#> GSM217714 4 0.0794 0.964 0.000 0.000 0.000 0.972 0.028
#> GSM217715 4 0.0880 0.964 0.000 0.000 0.000 0.968 0.032
#> GSM217716 4 0.0510 0.965 0.000 0.000 0.000 0.984 0.016
#> GSM217717 4 0.0404 0.964 0.000 0.000 0.000 0.988 0.012
#> GSM217718 4 0.0404 0.964 0.000 0.000 0.000 0.988 0.012
#> GSM217719 4 0.0404 0.964 0.000 0.000 0.000 0.988 0.012
#> GSM217720 4 0.1043 0.962 0.000 0.000 0.000 0.960 0.040
#> GSM217721 4 0.0404 0.964 0.000 0.000 0.000 0.988 0.012
#> GSM217722 4 0.0162 0.965 0.000 0.000 0.000 0.996 0.004
#> GSM217723 1 0.2580 0.898 0.892 0.000 0.000 0.044 0.064
#> GSM217724 1 0.0609 0.977 0.980 0.000 0.000 0.000 0.020
#> GSM217725 1 0.1478 0.943 0.936 0.000 0.000 0.000 0.064
#> GSM217726 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.1197 0.957 0.952 0.000 0.000 0.000 0.048
#> GSM217729 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.2929 0.903 0.000 0.180 0.000 0.000 0.820
#> GSM217738 5 0.2966 0.905 0.000 0.184 0.000 0.000 0.816
#> GSM217739 5 0.3074 0.907 0.000 0.196 0.000 0.000 0.804
#> GSM217740 5 0.3074 0.907 0.000 0.196 0.000 0.000 0.804
#> GSM217741 5 0.3424 0.895 0.000 0.240 0.000 0.000 0.760
#> GSM217742 5 0.3336 0.900 0.000 0.228 0.000 0.000 0.772
#> GSM217743 5 0.3452 0.892 0.000 0.244 0.000 0.000 0.756
#> GSM217744 5 0.3452 0.892 0.000 0.244 0.000 0.000 0.756
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0603 0.9351 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM217645 2 0.0717 0.9316 0.000 0.976 0.000 0.000 0.008 0.016
#> GSM217646 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217648 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217649 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217651 2 0.0146 0.9465 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217652 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217654 5 0.5451 0.5941 0.000 0.136 0.000 0.000 0.524 0.340
#> GSM217655 2 0.5396 0.3526 0.000 0.564 0.000 0.000 0.152 0.284
#> GSM217656 5 0.3986 0.5593 0.000 0.004 0.000 0.000 0.532 0.464
#> GSM217657 5 0.4047 0.6323 0.000 0.012 0.000 0.000 0.604 0.384
#> GSM217658 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 2 0.3961 0.0578 0.000 0.556 0.000 0.000 0.440 0.004
#> GSM217661 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217662 2 0.0260 0.9432 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM217663 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217667 2 0.0000 0.9494 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217668 4 0.1643 0.6643 0.000 0.000 0.000 0.924 0.008 0.068
#> GSM217669 4 0.2389 0.5963 0.000 0.000 0.000 0.864 0.008 0.128
#> GSM217670 4 0.1701 0.6670 0.000 0.000 0.000 0.920 0.008 0.072
#> GSM217671 4 0.1812 0.6645 0.000 0.000 0.000 0.912 0.008 0.080
#> GSM217672 4 0.1643 0.6643 0.000 0.000 0.000 0.924 0.008 0.068
#> GSM217673 4 0.1584 0.6661 0.000 0.000 0.000 0.928 0.008 0.064
#> GSM217674 1 0.0291 0.9519 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217675 1 0.0291 0.9519 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217676 1 0.0291 0.9519 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217677 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0291 0.9519 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217683 1 0.0291 0.9519 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217684 4 0.3272 0.5315 0.076 0.000 0.000 0.836 0.008 0.080
#> GSM217685 3 0.0790 0.9622 0.000 0.000 0.968 0.000 0.000 0.032
#> GSM217686 3 0.0790 0.9622 0.000 0.000 0.968 0.000 0.000 0.032
#> GSM217687 3 0.0790 0.9622 0.000 0.000 0.968 0.000 0.000 0.032
#> GSM217688 3 0.0790 0.9622 0.000 0.000 0.968 0.000 0.000 0.032
#> GSM217689 3 0.0865 0.9608 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217690 3 0.0865 0.9608 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217691 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217692 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217693 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217694 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217695 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217696 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217697 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217698 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217699 3 0.0000 0.9677 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0260 0.9680 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM217701 3 0.0146 0.9674 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217702 3 0.0146 0.9674 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217703 3 0.0865 0.9608 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM217704 3 0.1141 0.9660 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM217705 4 0.1643 0.6811 0.000 0.000 0.000 0.924 0.008 0.068
#> GSM217706 4 0.2219 0.6409 0.000 0.000 0.000 0.864 0.000 0.136
#> GSM217707 4 0.2442 0.6338 0.000 0.000 0.000 0.852 0.004 0.144
#> GSM217708 4 0.3857 -0.7430 0.000 0.000 0.000 0.532 0.000 0.468
#> GSM217709 4 0.3860 -0.7482 0.000 0.000 0.000 0.528 0.000 0.472
#> GSM217710 6 0.3971 0.9768 0.000 0.000 0.000 0.448 0.004 0.548
#> GSM217711 6 0.3961 0.9772 0.000 0.000 0.000 0.440 0.004 0.556
#> GSM217712 4 0.2562 0.6119 0.000 0.000 0.000 0.828 0.000 0.172
#> GSM217713 4 0.2814 0.6105 0.000 0.000 0.000 0.820 0.008 0.172
#> GSM217714 4 0.1007 0.6837 0.000 0.000 0.000 0.956 0.000 0.044
#> GSM217715 4 0.0865 0.6832 0.000 0.000 0.000 0.964 0.000 0.036
#> GSM217716 4 0.2593 0.6319 0.000 0.000 0.000 0.844 0.008 0.148
#> GSM217717 4 0.2915 0.5933 0.000 0.000 0.000 0.808 0.008 0.184
#> GSM217718 4 0.3217 0.5248 0.000 0.000 0.000 0.768 0.008 0.224
#> GSM217719 4 0.3190 0.5451 0.000 0.000 0.000 0.772 0.008 0.220
#> GSM217720 4 0.1524 0.6786 0.000 0.000 0.000 0.932 0.008 0.060
#> GSM217721 4 0.2933 0.5717 0.000 0.000 0.000 0.796 0.004 0.200
#> GSM217722 4 0.2838 0.5808 0.000 0.000 0.000 0.808 0.004 0.188
#> GSM217723 1 0.4330 0.5705 0.632 0.000 0.000 0.036 0.000 0.332
#> GSM217724 1 0.2738 0.8191 0.820 0.000 0.000 0.000 0.004 0.176
#> GSM217725 1 0.3351 0.6963 0.712 0.000 0.000 0.000 0.000 0.288
#> GSM217726 1 0.0291 0.9519 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217727 1 0.0291 0.9519 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM217728 1 0.3175 0.7337 0.744 0.000 0.000 0.000 0.000 0.256
#> GSM217729 1 0.0146 0.9522 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217730 1 0.0146 0.9522 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217731 1 0.0146 0.9522 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217732 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9532 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.1387 0.8591 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM217738 5 0.1387 0.8591 0.000 0.068 0.000 0.000 0.932 0.000
#> GSM217739 5 0.1610 0.8646 0.000 0.084 0.000 0.000 0.916 0.000
#> GSM217740 5 0.1610 0.8646 0.000 0.084 0.000 0.000 0.916 0.000
#> GSM217741 5 0.1957 0.8590 0.000 0.112 0.000 0.000 0.888 0.000
#> GSM217742 5 0.1814 0.8630 0.000 0.100 0.000 0.000 0.900 0.000
#> GSM217743 5 0.1957 0.8590 0.000 0.112 0.000 0.000 0.888 0.000
#> GSM217744 5 0.1957 0.8590 0.000 0.112 0.000 0.000 0.888 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:skmeans 101 3.32e-01 2
#> CV:skmeans 101 2.94e-07 3
#> CV:skmeans 101 8.38e-07 4
#> CV:skmeans 100 2.98e-09 5
#> CV:skmeans 97 2.06e-08 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 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.661 0.890 0.946 0.4277 0.578 0.578
#> 3 3 1.000 0.983 0.993 0.4781 0.703 0.523
#> 4 4 0.987 0.938 0.975 0.1885 0.859 0.629
#> 5 5 0.964 0.914 0.965 0.0487 0.946 0.791
#> 6 6 0.856 0.811 0.890 0.0364 0.978 0.899
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 3 4
There is also optional best \(k\) = 3 4 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM217644 1 0.6048 0.857 0.852 0.148
#> GSM217645 1 0.5946 0.860 0.856 0.144
#> GSM217646 1 0.6048 0.857 0.852 0.148
#> GSM217647 1 0.6148 0.853 0.848 0.152
#> GSM217648 1 0.9988 0.150 0.520 0.480
#> GSM217649 1 0.6048 0.857 0.852 0.148
#> GSM217650 1 0.6048 0.857 0.852 0.148
#> GSM217651 2 0.9896 0.138 0.440 0.560
#> GSM217652 1 0.6048 0.857 0.852 0.148
#> GSM217653 1 0.8499 0.684 0.724 0.276
#> GSM217654 1 0.5946 0.860 0.856 0.144
#> GSM217655 1 0.5946 0.860 0.856 0.144
#> GSM217656 1 0.5842 0.862 0.860 0.140
#> GSM217657 1 0.5946 0.860 0.856 0.144
#> GSM217658 1 0.6048 0.857 0.852 0.148
#> GSM217659 1 0.6048 0.857 0.852 0.148
#> GSM217660 1 0.6048 0.857 0.852 0.148
#> GSM217661 1 0.6048 0.857 0.852 0.148
#> GSM217662 2 0.9323 0.431 0.348 0.652
#> GSM217663 1 0.6048 0.857 0.852 0.148
#> GSM217664 1 0.6048 0.857 0.852 0.148
#> GSM217665 1 0.6048 0.857 0.852 0.148
#> GSM217666 1 0.7950 0.742 0.760 0.240
#> GSM217667 1 0.8499 0.684 0.724 0.276
#> GSM217668 1 0.0938 0.933 0.988 0.012
#> GSM217669 1 0.0000 0.938 1.000 0.000
#> GSM217670 1 0.0000 0.938 1.000 0.000
#> GSM217671 1 0.0000 0.938 1.000 0.000
#> GSM217672 1 0.0000 0.938 1.000 0.000
#> GSM217673 1 0.0000 0.938 1.000 0.000
#> GSM217674 1 0.0000 0.938 1.000 0.000
#> GSM217675 1 0.0000 0.938 1.000 0.000
#> GSM217676 1 0.0000 0.938 1.000 0.000
#> GSM217677 1 0.0000 0.938 1.000 0.000
#> GSM217678 1 0.0000 0.938 1.000 0.000
#> GSM217679 1 0.0000 0.938 1.000 0.000
#> GSM217680 1 0.0000 0.938 1.000 0.000
#> GSM217681 1 0.0000 0.938 1.000 0.000
#> GSM217682 1 0.0000 0.938 1.000 0.000
#> GSM217683 1 0.0000 0.938 1.000 0.000
#> GSM217684 1 0.0000 0.938 1.000 0.000
#> GSM217685 2 0.0000 0.943 0.000 1.000
#> GSM217686 2 0.0000 0.943 0.000 1.000
#> GSM217687 2 0.0000 0.943 0.000 1.000
#> GSM217688 2 0.0000 0.943 0.000 1.000
#> GSM217689 2 0.2043 0.922 0.032 0.968
#> GSM217690 2 0.2603 0.912 0.044 0.956
#> GSM217691 2 0.0000 0.943 0.000 1.000
#> GSM217692 2 0.0000 0.943 0.000 1.000
#> GSM217693 2 0.0000 0.943 0.000 1.000
#> GSM217694 2 0.0000 0.943 0.000 1.000
#> GSM217695 2 0.0000 0.943 0.000 1.000
#> GSM217696 2 0.0000 0.943 0.000 1.000
#> GSM217697 2 0.0000 0.943 0.000 1.000
#> GSM217698 2 0.0000 0.943 0.000 1.000
#> GSM217699 2 0.0000 0.943 0.000 1.000
#> GSM217700 2 0.0000 0.943 0.000 1.000
#> GSM217701 2 0.1414 0.931 0.020 0.980
#> GSM217702 2 0.0000 0.943 0.000 1.000
#> GSM217703 2 0.0938 0.937 0.012 0.988
#> GSM217704 2 0.0000 0.943 0.000 1.000
#> GSM217705 1 0.0000 0.938 1.000 0.000
#> GSM217706 1 0.0000 0.938 1.000 0.000
#> GSM217707 1 0.0000 0.938 1.000 0.000
#> GSM217708 1 0.0000 0.938 1.000 0.000
#> GSM217709 1 0.0000 0.938 1.000 0.000
#> GSM217710 1 0.0000 0.938 1.000 0.000
#> GSM217711 1 0.0000 0.938 1.000 0.000
#> GSM217712 1 0.0000 0.938 1.000 0.000
#> GSM217713 1 0.0000 0.938 1.000 0.000
#> GSM217714 1 0.0000 0.938 1.000 0.000
#> GSM217715 1 0.0000 0.938 1.000 0.000
#> GSM217716 1 0.0000 0.938 1.000 0.000
#> GSM217717 1 0.0000 0.938 1.000 0.000
#> GSM217718 1 0.0000 0.938 1.000 0.000
#> GSM217719 1 0.0000 0.938 1.000 0.000
#> GSM217720 1 0.0000 0.938 1.000 0.000
#> GSM217721 1 0.0000 0.938 1.000 0.000
#> GSM217722 1 0.0000 0.938 1.000 0.000
#> GSM217723 1 0.0000 0.938 1.000 0.000
#> GSM217724 1 0.0000 0.938 1.000 0.000
#> GSM217725 1 0.0000 0.938 1.000 0.000
#> GSM217726 1 0.0000 0.938 1.000 0.000
#> GSM217727 1 0.0000 0.938 1.000 0.000
#> GSM217728 1 0.0000 0.938 1.000 0.000
#> GSM217729 1 0.0000 0.938 1.000 0.000
#> GSM217730 1 0.0000 0.938 1.000 0.000
#> GSM217731 1 0.0000 0.938 1.000 0.000
#> GSM217732 1 0.0000 0.938 1.000 0.000
#> GSM217733 1 0.0000 0.938 1.000 0.000
#> GSM217734 1 0.0000 0.938 1.000 0.000
#> GSM217735 1 0.0000 0.938 1.000 0.000
#> GSM217736 1 0.0000 0.938 1.000 0.000
#> GSM217737 2 0.9323 0.429 0.348 0.652
#> GSM217738 2 0.2236 0.921 0.036 0.964
#> GSM217739 2 0.4562 0.863 0.096 0.904
#> GSM217740 2 0.3114 0.905 0.056 0.944
#> GSM217741 2 0.2778 0.912 0.048 0.952
#> GSM217742 2 0.0000 0.943 0.000 1.000
#> GSM217743 2 0.0000 0.943 0.000 1.000
#> GSM217744 2 0.0000 0.943 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.000 0.989 0.000 1.000 0.000
#> GSM217645 2 0.000 0.989 0.000 1.000 0.000
#> GSM217646 2 0.000 0.989 0.000 1.000 0.000
#> GSM217647 2 0.000 0.989 0.000 1.000 0.000
#> GSM217648 2 0.000 0.989 0.000 1.000 0.000
#> GSM217649 2 0.000 0.989 0.000 1.000 0.000
#> GSM217650 2 0.000 0.989 0.000 1.000 0.000
#> GSM217651 2 0.000 0.989 0.000 1.000 0.000
#> GSM217652 2 0.000 0.989 0.000 1.000 0.000
#> GSM217653 2 0.000 0.989 0.000 1.000 0.000
#> GSM217654 2 0.000 0.989 0.000 1.000 0.000
#> GSM217655 2 0.000 0.989 0.000 1.000 0.000
#> GSM217656 2 0.722 0.643 0.176 0.712 0.112
#> GSM217657 2 0.164 0.938 0.044 0.956 0.000
#> GSM217658 2 0.000 0.989 0.000 1.000 0.000
#> GSM217659 2 0.000 0.989 0.000 1.000 0.000
#> GSM217660 2 0.000 0.989 0.000 1.000 0.000
#> GSM217661 2 0.000 0.989 0.000 1.000 0.000
#> GSM217662 2 0.000 0.989 0.000 1.000 0.000
#> GSM217663 2 0.000 0.989 0.000 1.000 0.000
#> GSM217664 2 0.000 0.989 0.000 1.000 0.000
#> GSM217665 2 0.000 0.989 0.000 1.000 0.000
#> GSM217666 2 0.000 0.989 0.000 1.000 0.000
#> GSM217667 2 0.000 0.989 0.000 1.000 0.000
#> GSM217668 1 0.588 0.457 0.652 0.348 0.000
#> GSM217669 1 0.000 0.992 1.000 0.000 0.000
#> GSM217670 1 0.000 0.992 1.000 0.000 0.000
#> GSM217671 1 0.000 0.992 1.000 0.000 0.000
#> GSM217672 1 0.000 0.992 1.000 0.000 0.000
#> GSM217673 1 0.000 0.992 1.000 0.000 0.000
#> GSM217674 1 0.000 0.992 1.000 0.000 0.000
#> GSM217675 1 0.000 0.992 1.000 0.000 0.000
#> GSM217676 1 0.000 0.992 1.000 0.000 0.000
#> GSM217677 1 0.000 0.992 1.000 0.000 0.000
#> GSM217678 1 0.000 0.992 1.000 0.000 0.000
#> GSM217679 1 0.000 0.992 1.000 0.000 0.000
#> GSM217680 1 0.000 0.992 1.000 0.000 0.000
#> GSM217681 1 0.000 0.992 1.000 0.000 0.000
#> GSM217682 1 0.000 0.992 1.000 0.000 0.000
#> GSM217683 1 0.000 0.992 1.000 0.000 0.000
#> GSM217684 1 0.000 0.992 1.000 0.000 0.000
#> GSM217685 3 0.000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.000 1.000 0.000 0.000 1.000
#> GSM217705 1 0.000 0.992 1.000 0.000 0.000
#> GSM217706 1 0.000 0.992 1.000 0.000 0.000
#> GSM217707 1 0.000 0.992 1.000 0.000 0.000
#> GSM217708 1 0.000 0.992 1.000 0.000 0.000
#> GSM217709 1 0.000 0.992 1.000 0.000 0.000
#> GSM217710 1 0.000 0.992 1.000 0.000 0.000
#> GSM217711 1 0.000 0.992 1.000 0.000 0.000
#> GSM217712 1 0.000 0.992 1.000 0.000 0.000
#> GSM217713 1 0.000 0.992 1.000 0.000 0.000
#> GSM217714 1 0.000 0.992 1.000 0.000 0.000
#> GSM217715 1 0.000 0.992 1.000 0.000 0.000
#> GSM217716 1 0.000 0.992 1.000 0.000 0.000
#> GSM217717 1 0.000 0.992 1.000 0.000 0.000
#> GSM217718 1 0.000 0.992 1.000 0.000 0.000
#> GSM217719 1 0.000 0.992 1.000 0.000 0.000
#> GSM217720 1 0.000 0.992 1.000 0.000 0.000
#> GSM217721 1 0.000 0.992 1.000 0.000 0.000
#> GSM217722 1 0.000 0.992 1.000 0.000 0.000
#> GSM217723 1 0.000 0.992 1.000 0.000 0.000
#> GSM217724 1 0.000 0.992 1.000 0.000 0.000
#> GSM217725 1 0.000 0.992 1.000 0.000 0.000
#> GSM217726 1 0.000 0.992 1.000 0.000 0.000
#> GSM217727 1 0.000 0.992 1.000 0.000 0.000
#> GSM217728 1 0.000 0.992 1.000 0.000 0.000
#> GSM217729 1 0.000 0.992 1.000 0.000 0.000
#> GSM217730 1 0.000 0.992 1.000 0.000 0.000
#> GSM217731 1 0.000 0.992 1.000 0.000 0.000
#> GSM217732 1 0.000 0.992 1.000 0.000 0.000
#> GSM217733 1 0.000 0.992 1.000 0.000 0.000
#> GSM217734 1 0.000 0.992 1.000 0.000 0.000
#> GSM217735 1 0.000 0.992 1.000 0.000 0.000
#> GSM217736 1 0.000 0.992 1.000 0.000 0.000
#> GSM217737 2 0.000 0.989 0.000 1.000 0.000
#> GSM217738 2 0.000 0.989 0.000 1.000 0.000
#> GSM217739 2 0.000 0.989 0.000 1.000 0.000
#> GSM217740 2 0.000 0.989 0.000 1.000 0.000
#> GSM217741 2 0.000 0.989 0.000 1.000 0.000
#> GSM217742 2 0.000 0.989 0.000 1.000 0.000
#> GSM217743 2 0.000 0.989 0.000 1.000 0.000
#> GSM217744 2 0.000 0.989 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217645 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217646 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217654 2 0.4955 0.157 0.000 0.556 0.000 0.444
#> GSM217655 2 0.4955 0.157 0.000 0.556 0.000 0.444
#> GSM217656 4 0.5140 0.579 0.020 0.284 0.004 0.692
#> GSM217657 4 0.4605 0.488 0.000 0.336 0.000 0.664
#> GSM217658 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217660 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217661 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217663 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217668 4 0.0188 0.939 0.004 0.000 0.000 0.996
#> GSM217669 4 0.1118 0.924 0.036 0.000 0.000 0.964
#> GSM217670 4 0.2281 0.872 0.096 0.000 0.000 0.904
#> GSM217671 4 0.1792 0.898 0.068 0.000 0.000 0.932
#> GSM217672 4 0.1022 0.926 0.032 0.000 0.000 0.968
#> GSM217673 4 0.0707 0.934 0.020 0.000 0.000 0.980
#> GSM217674 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217684 4 0.4790 0.435 0.380 0.000 0.000 0.620
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217705 4 0.0817 0.931 0.024 0.000 0.000 0.976
#> GSM217706 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217707 4 0.0336 0.938 0.008 0.000 0.000 0.992
#> GSM217708 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217709 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217710 4 0.0188 0.939 0.004 0.000 0.000 0.996
#> GSM217711 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217712 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217713 4 0.0469 0.937 0.012 0.000 0.000 0.988
#> GSM217714 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217715 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217716 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217717 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217718 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217719 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217720 4 0.0188 0.939 0.004 0.000 0.000 0.996
#> GSM217721 4 0.0000 0.939 0.000 0.000 0.000 1.000
#> GSM217722 4 0.0188 0.939 0.004 0.000 0.000 0.996
#> GSM217723 4 0.4008 0.697 0.244 0.000 0.000 0.756
#> GSM217724 1 0.1637 0.935 0.940 0.000 0.000 0.060
#> GSM217725 1 0.0188 0.993 0.996 0.000 0.000 0.004
#> GSM217726 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217728 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217729 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0707 0.978 0.980 0.000 0.000 0.020
#> GSM217732 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> GSM217737 2 0.0469 0.955 0.000 0.988 0.000 0.012
#> GSM217738 2 0.0336 0.959 0.000 0.992 0.000 0.008
#> GSM217739 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217740 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217741 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217742 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217743 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> GSM217744 2 0.0000 0.966 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
#> GSM217644 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217645 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217646 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217647 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217648 2 0.0162 0.870 0.000 0.996 0 0.000 0.004
#> GSM217649 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217650 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217651 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217652 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217653 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217654 2 0.4192 0.376 0.000 0.596 0 0.404 0.000
#> GSM217655 2 0.4182 0.386 0.000 0.600 0 0.400 0.000
#> GSM217656 2 0.4294 0.208 0.000 0.532 0 0.468 0.000
#> GSM217657 2 0.5529 0.264 0.000 0.512 0 0.420 0.068
#> GSM217658 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217659 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217660 2 0.4210 0.308 0.000 0.588 0 0.000 0.412
#> GSM217661 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217662 2 0.3143 0.660 0.000 0.796 0 0.000 0.204
#> GSM217663 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217664 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217665 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217666 2 0.0000 0.872 0.000 1.000 0 0.000 0.000
#> GSM217667 2 0.0703 0.855 0.000 0.976 0 0.000 0.024
#> GSM217668 4 0.0451 0.948 0.004 0.008 0 0.988 0.000
#> GSM217669 4 0.1043 0.929 0.040 0.000 0 0.960 0.000
#> GSM217670 4 0.2230 0.848 0.116 0.000 0 0.884 0.000
#> GSM217671 4 0.1478 0.906 0.064 0.000 0 0.936 0.000
#> GSM217672 4 0.0703 0.941 0.024 0.000 0 0.976 0.000
#> GSM217673 4 0.0794 0.939 0.028 0.000 0 0.972 0.000
#> GSM217674 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217675 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217676 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217677 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217678 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217679 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217680 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217681 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217682 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217683 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217684 4 0.4219 0.351 0.416 0.000 0 0.584 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1 0.000 0.000
#> GSM217705 4 0.0703 0.940 0.024 0.000 0 0.976 0.000
#> GSM217706 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217707 4 0.0162 0.951 0.004 0.000 0 0.996 0.000
#> GSM217708 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217709 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217710 4 0.0162 0.951 0.004 0.000 0 0.996 0.000
#> GSM217711 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217712 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217713 4 0.0404 0.948 0.012 0.000 0 0.988 0.000
#> GSM217714 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217715 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217716 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217717 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217718 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217719 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217720 4 0.0162 0.951 0.004 0.000 0 0.996 0.000
#> GSM217721 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217722 4 0.0000 0.952 0.000 0.000 0 1.000 0.000
#> GSM217723 4 0.3636 0.653 0.272 0.000 0 0.728 0.000
#> GSM217724 1 0.1410 0.926 0.940 0.000 0 0.060 0.000
#> GSM217725 1 0.0162 0.991 0.996 0.000 0 0.004 0.000
#> GSM217726 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217727 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217728 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217729 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217730 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217731 1 0.0880 0.960 0.968 0.000 0 0.032 0.000
#> GSM217732 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217733 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217734 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217735 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217736 1 0.0000 0.995 1.000 0.000 0 0.000 0.000
#> GSM217737 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
#> GSM217738 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
#> GSM217739 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
#> GSM217740 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
#> GSM217741 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
#> GSM217742 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
#> GSM217743 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
#> GSM217744 5 0.0000 1.000 0.000 0.000 0 0.000 1.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.3695 0.0783 0.000 0.624 0.000 0.000 0.000 0.376
#> GSM217645 2 0.2883 0.5551 0.000 0.788 0.000 0.000 0.000 0.212
#> GSM217646 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217648 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217649 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217651 2 0.1910 0.7337 0.000 0.892 0.000 0.000 0.000 0.108
#> GSM217652 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217654 6 0.5515 0.8032 0.000 0.372 0.000 0.136 0.000 0.492
#> GSM217655 2 0.5688 -0.6116 0.000 0.472 0.000 0.140 0.004 0.384
#> GSM217656 6 0.5392 0.8231 0.000 0.252 0.004 0.152 0.000 0.592
#> GSM217657 6 0.6301 0.8561 0.000 0.300 0.000 0.136 0.052 0.512
#> GSM217658 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 2 0.6012 -0.4323 0.000 0.396 0.000 0.000 0.240 0.364
#> GSM217661 2 0.0865 0.8165 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM217662 2 0.2697 0.5803 0.000 0.812 0.000 0.000 0.188 0.000
#> GSM217663 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.8476 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217667 2 0.0363 0.8364 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM217668 4 0.1398 0.8097 0.000 0.008 0.000 0.940 0.000 0.052
#> GSM217669 4 0.3139 0.7949 0.032 0.000 0.000 0.816 0.000 0.152
#> GSM217670 4 0.3911 0.5056 0.256 0.000 0.000 0.712 0.000 0.032
#> GSM217671 4 0.2001 0.7996 0.040 0.000 0.000 0.912 0.000 0.048
#> GSM217672 4 0.1616 0.8099 0.020 0.000 0.000 0.932 0.000 0.048
#> GSM217673 4 0.1780 0.8075 0.028 0.000 0.000 0.924 0.000 0.048
#> GSM217674 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0363 0.9385 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM217676 1 0.2048 0.8627 0.880 0.000 0.000 0.000 0.000 0.120
#> GSM217677 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0865 0.9244 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM217679 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.4378 0.3660 0.600 0.000 0.000 0.368 0.000 0.032
#> GSM217685 3 0.1075 0.8937 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM217686 3 0.1075 0.8937 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM217687 3 0.1075 0.8937 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM217688 3 0.1075 0.8937 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM217689 3 0.1075 0.8937 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM217690 3 0.1075 0.8937 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM217691 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217692 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217693 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217694 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217695 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217696 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217697 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217698 3 0.2416 0.8946 0.000 0.000 0.844 0.000 0.000 0.156
#> GSM217699 3 0.0000 0.8998 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.1663 0.8997 0.000 0.000 0.912 0.000 0.000 0.088
#> GSM217701 3 0.0937 0.8951 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM217702 3 0.0000 0.8998 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.1075 0.8937 0.000 0.000 0.952 0.000 0.000 0.048
#> GSM217704 3 0.2697 0.8902 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM217705 4 0.3104 0.7856 0.016 0.000 0.000 0.800 0.000 0.184
#> GSM217706 4 0.1141 0.8144 0.000 0.000 0.000 0.948 0.000 0.052
#> GSM217707 4 0.2703 0.7946 0.004 0.000 0.000 0.824 0.000 0.172
#> GSM217708 4 0.3647 0.6849 0.000 0.000 0.000 0.640 0.000 0.360
#> GSM217709 4 0.3547 0.6944 0.000 0.000 0.000 0.668 0.000 0.332
#> GSM217710 4 0.3975 0.4794 0.004 0.000 0.000 0.544 0.000 0.452
#> GSM217711 4 0.3531 0.6833 0.000 0.000 0.000 0.672 0.000 0.328
#> GSM217712 4 0.1204 0.8199 0.000 0.000 0.000 0.944 0.000 0.056
#> GSM217713 4 0.2536 0.7907 0.020 0.000 0.000 0.864 0.000 0.116
#> GSM217714 4 0.0260 0.8150 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217715 4 0.0865 0.8133 0.000 0.000 0.000 0.964 0.000 0.036
#> GSM217716 4 0.0260 0.8150 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217717 4 0.0260 0.8150 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217718 4 0.2340 0.7830 0.000 0.000 0.000 0.852 0.000 0.148
#> GSM217719 4 0.2135 0.7943 0.000 0.000 0.000 0.872 0.000 0.128
#> GSM217720 4 0.2668 0.7947 0.004 0.000 0.000 0.828 0.000 0.168
#> GSM217721 4 0.1267 0.8182 0.000 0.000 0.000 0.940 0.000 0.060
#> GSM217722 4 0.2793 0.7750 0.000 0.000 0.000 0.800 0.000 0.200
#> GSM217723 4 0.6009 0.3204 0.244 0.000 0.000 0.412 0.000 0.344
#> GSM217724 1 0.2664 0.8377 0.848 0.000 0.000 0.016 0.000 0.136
#> GSM217725 1 0.3371 0.6731 0.708 0.000 0.000 0.000 0.000 0.292
#> GSM217726 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.2762 0.7946 0.804 0.000 0.000 0.000 0.000 0.196
#> GSM217729 1 0.0146 0.9421 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217730 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0790 0.9188 0.968 0.000 0.000 0.032 0.000 0.000
#> GSM217732 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217738 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217739 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217740 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217741 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217742 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217743 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217744 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:pam 97 2.91e-06 2
#> CV:pam 100 2.32e-07 3
#> CV:pam 97 5.49e-06 4
#> CV:pam 95 2.12e-10 5
#> CV:pam 95 4.10e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.990 0.988 0.4992 0.495 0.495
#> 3 3 1.000 0.989 0.993 0.2660 0.873 0.744
#> 4 4 0.831 0.853 0.901 0.0799 0.983 0.954
#> 5 5 0.943 0.909 0.955 0.1651 0.827 0.529
#> 6 6 0.911 0.870 0.930 0.0118 0.992 0.960
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM217644 2 0.2043 0.986 0.032 0.968
#> GSM217645 2 0.2043 0.986 0.032 0.968
#> GSM217646 2 0.2043 0.986 0.032 0.968
#> GSM217647 2 0.2043 0.986 0.032 0.968
#> GSM217648 2 0.2043 0.986 0.032 0.968
#> GSM217649 2 0.2043 0.986 0.032 0.968
#> GSM217650 2 0.2043 0.986 0.032 0.968
#> GSM217651 2 0.2043 0.986 0.032 0.968
#> GSM217652 2 0.2043 0.986 0.032 0.968
#> GSM217653 2 0.2043 0.986 0.032 0.968
#> GSM217654 2 0.2043 0.986 0.032 0.968
#> GSM217655 2 0.2043 0.986 0.032 0.968
#> GSM217656 2 0.2778 0.972 0.048 0.952
#> GSM217657 2 0.2043 0.986 0.032 0.968
#> GSM217658 2 0.2043 0.986 0.032 0.968
#> GSM217659 2 0.2043 0.986 0.032 0.968
#> GSM217660 2 0.2043 0.986 0.032 0.968
#> GSM217661 2 0.2043 0.986 0.032 0.968
#> GSM217662 2 0.2043 0.986 0.032 0.968
#> GSM217663 2 0.2043 0.986 0.032 0.968
#> GSM217664 2 0.2043 0.986 0.032 0.968
#> GSM217665 2 0.2043 0.986 0.032 0.968
#> GSM217666 2 0.2043 0.986 0.032 0.968
#> GSM217667 2 0.2043 0.986 0.032 0.968
#> GSM217668 1 0.0376 0.998 0.996 0.004
#> GSM217669 1 0.0376 0.998 0.996 0.004
#> GSM217670 1 0.0376 0.998 0.996 0.004
#> GSM217671 1 0.0376 0.998 0.996 0.004
#> GSM217672 1 0.0376 0.998 0.996 0.004
#> GSM217673 1 0.0376 0.998 0.996 0.004
#> GSM217674 1 0.0000 0.998 1.000 0.000
#> GSM217675 1 0.0000 0.998 1.000 0.000
#> GSM217676 1 0.0000 0.998 1.000 0.000
#> GSM217677 1 0.0000 0.998 1.000 0.000
#> GSM217678 1 0.0000 0.998 1.000 0.000
#> GSM217679 1 0.0000 0.998 1.000 0.000
#> GSM217680 1 0.0000 0.998 1.000 0.000
#> GSM217681 1 0.0000 0.998 1.000 0.000
#> GSM217682 1 0.0000 0.998 1.000 0.000
#> GSM217683 1 0.0000 0.998 1.000 0.000
#> GSM217684 1 0.0376 0.998 0.996 0.004
#> GSM217685 2 0.0376 0.978 0.004 0.996
#> GSM217686 2 0.0376 0.978 0.004 0.996
#> GSM217687 2 0.0376 0.978 0.004 0.996
#> GSM217688 2 0.0376 0.978 0.004 0.996
#> GSM217689 2 0.0376 0.978 0.004 0.996
#> GSM217690 2 0.0376 0.978 0.004 0.996
#> GSM217691 2 0.0376 0.978 0.004 0.996
#> GSM217692 2 0.0376 0.978 0.004 0.996
#> GSM217693 2 0.0376 0.978 0.004 0.996
#> GSM217694 2 0.0376 0.978 0.004 0.996
#> GSM217695 2 0.0376 0.978 0.004 0.996
#> GSM217696 2 0.0376 0.978 0.004 0.996
#> GSM217697 2 0.0376 0.978 0.004 0.996
#> GSM217698 2 0.0376 0.978 0.004 0.996
#> GSM217699 2 0.0376 0.978 0.004 0.996
#> GSM217700 2 0.0376 0.978 0.004 0.996
#> GSM217701 2 0.0376 0.978 0.004 0.996
#> GSM217702 2 0.0376 0.978 0.004 0.996
#> GSM217703 2 0.0938 0.980 0.012 0.988
#> GSM217704 2 0.0376 0.978 0.004 0.996
#> GSM217705 1 0.0376 0.998 0.996 0.004
#> GSM217706 1 0.0376 0.998 0.996 0.004
#> GSM217707 1 0.0376 0.998 0.996 0.004
#> GSM217708 1 0.0376 0.998 0.996 0.004
#> GSM217709 1 0.0376 0.998 0.996 0.004
#> GSM217710 1 0.0376 0.998 0.996 0.004
#> GSM217711 1 0.0376 0.998 0.996 0.004
#> GSM217712 1 0.0376 0.998 0.996 0.004
#> GSM217713 1 0.0376 0.998 0.996 0.004
#> GSM217714 1 0.0376 0.998 0.996 0.004
#> GSM217715 1 0.0376 0.998 0.996 0.004
#> GSM217716 1 0.0376 0.998 0.996 0.004
#> GSM217717 1 0.0376 0.998 0.996 0.004
#> GSM217718 1 0.0376 0.998 0.996 0.004
#> GSM217719 1 0.0376 0.998 0.996 0.004
#> GSM217720 1 0.0376 0.998 0.996 0.004
#> GSM217721 1 0.0376 0.998 0.996 0.004
#> GSM217722 1 0.0376 0.998 0.996 0.004
#> GSM217723 1 0.0000 0.998 1.000 0.000
#> GSM217724 1 0.0000 0.998 1.000 0.000
#> GSM217725 1 0.0000 0.998 1.000 0.000
#> GSM217726 1 0.0000 0.998 1.000 0.000
#> GSM217727 1 0.0000 0.998 1.000 0.000
#> GSM217728 1 0.0000 0.998 1.000 0.000
#> GSM217729 1 0.0000 0.998 1.000 0.000
#> GSM217730 1 0.0000 0.998 1.000 0.000
#> GSM217731 1 0.0000 0.998 1.000 0.000
#> GSM217732 1 0.0000 0.998 1.000 0.000
#> GSM217733 1 0.0000 0.998 1.000 0.000
#> GSM217734 1 0.0000 0.998 1.000 0.000
#> GSM217735 1 0.0000 0.998 1.000 0.000
#> GSM217736 1 0.0000 0.998 1.000 0.000
#> GSM217737 2 0.2043 0.986 0.032 0.968
#> GSM217738 2 0.2043 0.986 0.032 0.968
#> GSM217739 2 0.2043 0.986 0.032 0.968
#> GSM217740 2 0.2043 0.986 0.032 0.968
#> GSM217741 2 0.2043 0.986 0.032 0.968
#> GSM217742 2 0.2043 0.986 0.032 0.968
#> GSM217743 2 0.2043 0.986 0.032 0.968
#> GSM217744 2 0.2043 0.986 0.032 0.968
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217645 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217646 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217647 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217648 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217649 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217650 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217651 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217652 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217653 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217654 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217655 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217656 2 0.0424 0.992 0.000 0.992 0.008
#> GSM217657 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217658 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217659 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217660 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217661 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217662 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217663 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217664 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217665 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217666 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217667 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217668 1 0.4974 0.712 0.764 0.236 0.000
#> GSM217669 1 0.0892 0.981 0.980 0.020 0.000
#> GSM217670 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217671 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217672 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217673 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217674 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217684 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217705 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217706 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217707 1 0.0424 0.985 0.992 0.008 0.000
#> GSM217708 1 0.0747 0.983 0.984 0.016 0.000
#> GSM217709 1 0.0424 0.985 0.992 0.008 0.000
#> GSM217710 1 0.0424 0.985 0.992 0.008 0.000
#> GSM217711 1 0.0424 0.985 0.992 0.008 0.000
#> GSM217712 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217713 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217714 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217715 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217716 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217717 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217718 1 0.0424 0.985 0.992 0.008 0.000
#> GSM217719 1 0.0424 0.985 0.992 0.008 0.000
#> GSM217720 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217721 1 0.1031 0.980 0.976 0.024 0.000
#> GSM217722 1 0.0592 0.984 0.988 0.012 0.000
#> GSM217723 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217724 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217725 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217726 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217728 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217729 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.985 1.000 0.000 0.000
#> GSM217737 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217738 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217739 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217740 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217741 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217742 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217743 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217744 2 0.0000 1.000 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217645 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217646 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217647 2 0.0000 0.965 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.965 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217650 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217651 2 0.0188 0.964 0.000 0.996 0.000 0.004
#> GSM217652 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217653 2 0.0000 0.965 0.000 1.000 0.000 0.000
#> GSM217654 2 0.0592 0.964 0.000 0.984 0.000 0.016
#> GSM217655 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217656 4 0.5939 0.433 0.248 0.084 0.000 0.668
#> GSM217657 2 0.4857 0.605 0.008 0.668 0.000 0.324
#> GSM217658 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217659 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217660 2 0.0469 0.965 0.000 0.988 0.000 0.012
#> GSM217661 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217662 2 0.0188 0.964 0.000 0.996 0.000 0.004
#> GSM217663 2 0.0188 0.965 0.000 0.996 0.000 0.004
#> GSM217664 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217665 2 0.0000 0.965 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.965 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.965 0.000 1.000 0.000 0.000
#> GSM217668 1 0.4831 0.386 0.704 0.280 0.000 0.016
#> GSM217669 1 0.0469 0.826 0.988 0.000 0.000 0.012
#> GSM217670 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217671 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217672 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217673 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217674 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217675 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217676 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217677 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217678 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217679 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217680 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217681 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217682 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217683 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217684 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217685 3 0.3975 0.596 0.000 0.000 0.760 0.240
#> GSM217686 3 0.3942 0.605 0.000 0.000 0.764 0.236
#> GSM217687 3 0.3801 0.637 0.000 0.000 0.780 0.220
#> GSM217688 3 0.3801 0.637 0.000 0.000 0.780 0.220
#> GSM217689 4 0.4941 0.504 0.000 0.000 0.436 0.564
#> GSM217690 4 0.4948 0.496 0.000 0.000 0.440 0.560
#> GSM217691 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0592 0.898 0.000 0.000 0.984 0.016
#> GSM217699 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217703 4 0.4356 0.582 0.000 0.000 0.292 0.708
#> GSM217704 3 0.0000 0.911 0.000 0.000 1.000 0.000
#> GSM217705 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217706 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217707 1 0.3219 0.847 0.836 0.000 0.000 0.164
#> GSM217708 1 0.0707 0.832 0.980 0.000 0.000 0.020
#> GSM217709 1 0.0000 0.829 1.000 0.000 0.000 0.000
#> GSM217710 1 0.0000 0.829 1.000 0.000 0.000 0.000
#> GSM217711 1 0.0000 0.829 1.000 0.000 0.000 0.000
#> GSM217712 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217713 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217714 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217715 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217716 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217717 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217718 1 0.0000 0.829 1.000 0.000 0.000 0.000
#> GSM217719 1 0.0921 0.834 0.972 0.000 0.000 0.028
#> GSM217720 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217721 1 0.0592 0.825 0.984 0.000 0.000 0.016
#> GSM217722 1 0.3801 0.851 0.780 0.000 0.000 0.220
#> GSM217723 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217724 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217725 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217726 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217727 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217728 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217729 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217730 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217731 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217732 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217733 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217734 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217735 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217736 1 0.4164 0.853 0.736 0.000 0.000 0.264
#> GSM217737 2 0.2868 0.876 0.000 0.864 0.000 0.136
#> GSM217738 2 0.3024 0.865 0.000 0.852 0.000 0.148
#> GSM217739 2 0.2647 0.890 0.000 0.880 0.000 0.120
#> GSM217740 2 0.2647 0.890 0.000 0.880 0.000 0.120
#> GSM217741 2 0.1211 0.948 0.000 0.960 0.000 0.040
#> GSM217742 2 0.1211 0.948 0.000 0.960 0.000 0.040
#> GSM217743 2 0.1211 0.948 0.000 0.960 0.000 0.040
#> GSM217744 2 0.1211 0.948 0.000 0.960 0.000 0.040
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217645 2 0.0290 0.799 0.000 0.992 0.000 0.000 0.008
#> GSM217646 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217647 2 0.4302 0.339 0.000 0.520 0.000 0.000 0.480
#> GSM217648 2 0.4302 0.339 0.000 0.520 0.000 0.000 0.480
#> GSM217649 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217650 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217651 2 0.4161 0.475 0.000 0.608 0.000 0.000 0.392
#> GSM217652 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217653 2 0.4302 0.339 0.000 0.520 0.000 0.000 0.480
#> GSM217654 2 0.0000 0.795 0.000 1.000 0.000 0.000 0.000
#> GSM217655 2 0.0000 0.795 0.000 1.000 0.000 0.000 0.000
#> GSM217656 2 0.4337 0.554 0.000 0.744 0.000 0.204 0.052
#> GSM217657 2 0.1270 0.767 0.000 0.948 0.000 0.000 0.052
#> GSM217658 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217659 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217660 2 0.1608 0.776 0.000 0.928 0.000 0.000 0.072
#> GSM217661 2 0.0162 0.797 0.000 0.996 0.000 0.000 0.004
#> GSM217662 5 0.1410 0.935 0.000 0.060 0.000 0.000 0.940
#> GSM217663 2 0.2690 0.723 0.000 0.844 0.000 0.000 0.156
#> GSM217664 2 0.0404 0.800 0.000 0.988 0.000 0.000 0.012
#> GSM217665 2 0.4302 0.339 0.000 0.520 0.000 0.000 0.480
#> GSM217666 2 0.4302 0.339 0.000 0.520 0.000 0.000 0.480
#> GSM217667 2 0.4302 0.339 0.000 0.520 0.000 0.000 0.480
#> GSM217668 4 0.0162 0.980 0.000 0.004 0.000 0.996 0.000
#> GSM217669 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217670 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217671 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217672 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217673 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217674 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217685 3 0.0162 0.997 0.000 0.000 0.996 0.000 0.004
#> GSM217686 3 0.0162 0.997 0.000 0.000 0.996 0.000 0.004
#> GSM217687 3 0.0162 0.997 0.000 0.000 0.996 0.000 0.004
#> GSM217688 3 0.0162 0.997 0.000 0.000 0.996 0.000 0.004
#> GSM217689 3 0.0162 0.997 0.000 0.000 0.996 0.000 0.004
#> GSM217690 3 0.0162 0.997 0.000 0.000 0.996 0.000 0.004
#> GSM217691 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0510 0.987 0.000 0.000 0.984 0.000 0.016
#> GSM217704 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217706 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.1197 0.940 0.048 0.000 0.000 0.952 0.000
#> GSM217708 4 0.3242 0.718 0.216 0.000 0.000 0.784 0.000
#> GSM217709 4 0.0290 0.978 0.008 0.000 0.000 0.992 0.000
#> GSM217710 4 0.0324 0.979 0.004 0.000 0.000 0.992 0.004
#> GSM217711 4 0.0162 0.981 0.000 0.000 0.000 0.996 0.004
#> GSM217712 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217713 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217714 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217718 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217719 4 0.0404 0.974 0.012 0.000 0.000 0.988 0.000
#> GSM217720 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217721 4 0.0000 0.983 0.000 0.000 0.000 1.000 0.000
#> GSM217722 4 0.1270 0.936 0.052 0.000 0.000 0.948 0.000
#> GSM217723 1 0.0703 0.971 0.976 0.000 0.000 0.024 0.000
#> GSM217724 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217725 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217726 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217729 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0162 0.979 0.000 0.004 0.000 0.000 0.996
#> GSM217738 5 0.0162 0.979 0.000 0.004 0.000 0.000 0.996
#> GSM217739 5 0.0162 0.979 0.000 0.004 0.000 0.000 0.996
#> GSM217740 5 0.0162 0.979 0.000 0.004 0.000 0.000 0.996
#> GSM217741 5 0.0703 0.978 0.000 0.024 0.000 0.000 0.976
#> GSM217742 5 0.0609 0.981 0.000 0.020 0.000 0.000 0.980
#> GSM217743 5 0.0609 0.981 0.000 0.020 0.000 0.000 0.980
#> GSM217744 5 0.0609 0.981 0.000 0.020 0.000 0.000 0.980
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0000 0.8531 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217645 2 0.0146 0.8509 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217646 2 0.0000 0.8531 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.3543 0.7709 0.000 0.768 0.000 0.000 0.200 0.032
#> GSM217648 2 0.3602 0.7626 0.000 0.760 0.000 0.000 0.208 0.032
#> GSM217649 2 0.0000 0.8531 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.8531 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217651 2 0.3418 0.7820 0.000 0.784 0.000 0.000 0.184 0.032
#> GSM217652 2 0.0000 0.8531 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.3658 0.7538 0.000 0.752 0.000 0.000 0.216 0.032
#> GSM217654 2 0.3172 0.7073 0.000 0.816 0.000 0.000 0.036 0.148
#> GSM217655 2 0.3134 0.7101 0.000 0.820 0.000 0.000 0.036 0.144
#> GSM217656 6 0.7037 -0.0552 0.000 0.296 0.000 0.132 0.136 0.436
#> GSM217657 2 0.4801 0.4944 0.000 0.668 0.000 0.000 0.136 0.196
#> GSM217658 2 0.0146 0.8531 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217659 2 0.0000 0.8531 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 2 0.2106 0.8400 0.000 0.904 0.000 0.000 0.064 0.032
#> GSM217661 2 0.0291 0.8493 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM217662 5 0.3088 0.8070 0.000 0.172 0.000 0.000 0.808 0.020
#> GSM217663 2 0.1921 0.8423 0.000 0.916 0.000 0.000 0.052 0.032
#> GSM217664 2 0.0713 0.8503 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM217665 2 0.3543 0.7709 0.000 0.768 0.000 0.000 0.200 0.032
#> GSM217666 2 0.3543 0.7709 0.000 0.768 0.000 0.000 0.200 0.032
#> GSM217667 2 0.3543 0.7709 0.000 0.768 0.000 0.000 0.200 0.032
#> GSM217668 4 0.0260 0.9417 0.000 0.008 0.000 0.992 0.000 0.000
#> GSM217669 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217670 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217671 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217672 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217673 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217685 3 0.2527 0.8116 0.000 0.000 0.832 0.000 0.000 0.168
#> GSM217686 3 0.2048 0.8561 0.000 0.000 0.880 0.000 0.000 0.120
#> GSM217687 3 0.2135 0.8504 0.000 0.000 0.872 0.000 0.000 0.128
#> GSM217688 3 0.2135 0.8504 0.000 0.000 0.872 0.000 0.000 0.128
#> GSM217689 3 0.3695 0.4407 0.000 0.000 0.624 0.000 0.000 0.376
#> GSM217690 3 0.3563 0.5352 0.000 0.000 0.664 0.000 0.000 0.336
#> GSM217691 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217692 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217693 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217694 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217695 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.1501 0.8818 0.000 0.000 0.924 0.000 0.000 0.076
#> GSM217700 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.1204 0.8895 0.000 0.000 0.944 0.000 0.000 0.056
#> GSM217702 3 0.1267 0.8882 0.000 0.000 0.940 0.000 0.000 0.060
#> GSM217703 6 0.3868 -0.4649 0.000 0.000 0.496 0.000 0.000 0.504
#> GSM217704 3 0.0000 0.9027 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217705 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217706 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217707 4 0.1866 0.8707 0.084 0.000 0.000 0.908 0.000 0.008
#> GSM217708 4 0.4459 0.6167 0.204 0.000 0.000 0.700 0.000 0.096
#> GSM217709 4 0.2501 0.8757 0.004 0.000 0.000 0.872 0.016 0.108
#> GSM217710 4 0.3153 0.8427 0.008 0.000 0.000 0.832 0.032 0.128
#> GSM217711 4 0.3108 0.8352 0.000 0.000 0.000 0.828 0.044 0.128
#> GSM217712 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217713 4 0.0363 0.9431 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM217714 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217715 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217716 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217717 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217718 4 0.0653 0.9404 0.004 0.000 0.000 0.980 0.004 0.012
#> GSM217719 4 0.2474 0.8878 0.032 0.000 0.000 0.884 0.004 0.080
#> GSM217720 4 0.0000 0.9469 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217721 4 0.1753 0.9014 0.000 0.000 0.000 0.912 0.004 0.084
#> GSM217722 4 0.1908 0.8576 0.096 0.000 0.000 0.900 0.000 0.004
#> GSM217723 1 0.0806 0.9688 0.972 0.000 0.000 0.020 0.000 0.008
#> GSM217724 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217725 1 0.0260 0.9921 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM217726 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0260 0.9921 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM217729 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9980 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0632 0.9180 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM217738 5 0.0632 0.9180 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM217739 5 0.0632 0.9180 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM217740 5 0.0632 0.9180 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM217741 5 0.1714 0.9292 0.000 0.092 0.000 0.000 0.908 0.000
#> GSM217742 5 0.1714 0.9292 0.000 0.092 0.000 0.000 0.908 0.000
#> GSM217743 5 0.1714 0.9292 0.000 0.092 0.000 0.000 0.908 0.000
#> GSM217744 5 0.1714 0.9292 0.000 0.092 0.000 0.000 0.908 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:mclust 101 3.32e-01 2
#> CV:mclust 101 2.94e-07 3
#> CV:mclust 98 2.58e-06 4
#> CV:mclust 94 1.01e-08 5
#> CV:mclust 97 9.11e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 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.5051 0.495 0.495
#> 3 3 1.000 0.996 0.998 0.2516 0.873 0.744
#> 4 4 0.905 0.909 0.946 0.1074 0.909 0.759
#> 5 5 0.816 0.744 0.826 0.0710 0.887 0.638
#> 6 6 0.756 0.811 0.825 0.0404 0.928 0.700
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2 3
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM217644 2 0.0000 1.000 0.000 1.000
#> GSM217645 2 0.0000 1.000 0.000 1.000
#> GSM217646 2 0.0000 1.000 0.000 1.000
#> GSM217647 2 0.0000 1.000 0.000 1.000
#> GSM217648 2 0.0000 1.000 0.000 1.000
#> GSM217649 2 0.0000 1.000 0.000 1.000
#> GSM217650 2 0.0000 1.000 0.000 1.000
#> GSM217651 2 0.0000 1.000 0.000 1.000
#> GSM217652 2 0.0000 1.000 0.000 1.000
#> GSM217653 2 0.0000 1.000 0.000 1.000
#> GSM217654 2 0.0000 1.000 0.000 1.000
#> GSM217655 2 0.0000 1.000 0.000 1.000
#> GSM217656 2 0.0376 0.996 0.004 0.996
#> GSM217657 2 0.0000 1.000 0.000 1.000
#> GSM217658 2 0.0000 1.000 0.000 1.000
#> GSM217659 2 0.0000 1.000 0.000 1.000
#> GSM217660 2 0.0000 1.000 0.000 1.000
#> GSM217661 2 0.0000 1.000 0.000 1.000
#> GSM217662 2 0.0000 1.000 0.000 1.000
#> GSM217663 2 0.0000 1.000 0.000 1.000
#> GSM217664 2 0.0000 1.000 0.000 1.000
#> GSM217665 2 0.0000 1.000 0.000 1.000
#> GSM217666 2 0.0000 1.000 0.000 1.000
#> GSM217667 2 0.0000 1.000 0.000 1.000
#> GSM217668 1 0.0000 1.000 1.000 0.000
#> GSM217669 1 0.0000 1.000 1.000 0.000
#> GSM217670 1 0.0000 1.000 1.000 0.000
#> GSM217671 1 0.0000 1.000 1.000 0.000
#> GSM217672 1 0.0000 1.000 1.000 0.000
#> GSM217673 1 0.0000 1.000 1.000 0.000
#> GSM217674 1 0.0000 1.000 1.000 0.000
#> GSM217675 1 0.0000 1.000 1.000 0.000
#> GSM217676 1 0.0000 1.000 1.000 0.000
#> GSM217677 1 0.0000 1.000 1.000 0.000
#> GSM217678 1 0.0000 1.000 1.000 0.000
#> GSM217679 1 0.0000 1.000 1.000 0.000
#> GSM217680 1 0.0000 1.000 1.000 0.000
#> GSM217681 1 0.0000 1.000 1.000 0.000
#> GSM217682 1 0.0000 1.000 1.000 0.000
#> GSM217683 1 0.0000 1.000 1.000 0.000
#> GSM217684 1 0.0000 1.000 1.000 0.000
#> GSM217685 2 0.0000 1.000 0.000 1.000
#> GSM217686 2 0.0000 1.000 0.000 1.000
#> GSM217687 2 0.0000 1.000 0.000 1.000
#> GSM217688 2 0.0000 1.000 0.000 1.000
#> GSM217689 2 0.0000 1.000 0.000 1.000
#> GSM217690 2 0.0000 1.000 0.000 1.000
#> GSM217691 2 0.0000 1.000 0.000 1.000
#> GSM217692 2 0.0000 1.000 0.000 1.000
#> GSM217693 2 0.0000 1.000 0.000 1.000
#> GSM217694 2 0.0000 1.000 0.000 1.000
#> GSM217695 2 0.0000 1.000 0.000 1.000
#> GSM217696 2 0.0000 1.000 0.000 1.000
#> GSM217697 2 0.0000 1.000 0.000 1.000
#> GSM217698 2 0.0000 1.000 0.000 1.000
#> GSM217699 2 0.0000 1.000 0.000 1.000
#> GSM217700 2 0.0000 1.000 0.000 1.000
#> GSM217701 2 0.0000 1.000 0.000 1.000
#> GSM217702 2 0.0000 1.000 0.000 1.000
#> GSM217703 2 0.0000 1.000 0.000 1.000
#> GSM217704 2 0.0000 1.000 0.000 1.000
#> GSM217705 1 0.0000 1.000 1.000 0.000
#> GSM217706 1 0.0000 1.000 1.000 0.000
#> GSM217707 1 0.0000 1.000 1.000 0.000
#> GSM217708 1 0.0000 1.000 1.000 0.000
#> GSM217709 1 0.0000 1.000 1.000 0.000
#> GSM217710 1 0.0000 1.000 1.000 0.000
#> GSM217711 1 0.0000 1.000 1.000 0.000
#> GSM217712 1 0.0000 1.000 1.000 0.000
#> GSM217713 1 0.0000 1.000 1.000 0.000
#> GSM217714 1 0.0000 1.000 1.000 0.000
#> GSM217715 1 0.0000 1.000 1.000 0.000
#> GSM217716 1 0.0000 1.000 1.000 0.000
#> GSM217717 1 0.0000 1.000 1.000 0.000
#> GSM217718 1 0.0000 1.000 1.000 0.000
#> GSM217719 1 0.0000 1.000 1.000 0.000
#> GSM217720 1 0.0000 1.000 1.000 0.000
#> GSM217721 1 0.0000 1.000 1.000 0.000
#> GSM217722 1 0.0000 1.000 1.000 0.000
#> GSM217723 1 0.0000 1.000 1.000 0.000
#> GSM217724 1 0.0000 1.000 1.000 0.000
#> GSM217725 1 0.0000 1.000 1.000 0.000
#> GSM217726 1 0.0000 1.000 1.000 0.000
#> GSM217727 1 0.0000 1.000 1.000 0.000
#> GSM217728 1 0.0000 1.000 1.000 0.000
#> GSM217729 1 0.0000 1.000 1.000 0.000
#> GSM217730 1 0.0000 1.000 1.000 0.000
#> GSM217731 1 0.0000 1.000 1.000 0.000
#> GSM217732 1 0.0000 1.000 1.000 0.000
#> GSM217733 1 0.0000 1.000 1.000 0.000
#> GSM217734 1 0.0000 1.000 1.000 0.000
#> GSM217735 1 0.0000 1.000 1.000 0.000
#> GSM217736 1 0.0000 1.000 1.000 0.000
#> GSM217737 2 0.0000 1.000 0.000 1.000
#> GSM217738 2 0.0000 1.000 0.000 1.000
#> GSM217739 2 0.0000 1.000 0.000 1.000
#> GSM217740 2 0.0000 1.000 0.000 1.000
#> GSM217741 2 0.0000 1.000 0.000 1.000
#> GSM217742 2 0.0000 1.000 0.000 1.000
#> GSM217743 2 0.0000 1.000 0.000 1.000
#> GSM217744 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
#> GSM217644 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217645 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217646 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217647 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217648 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217649 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217650 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217651 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217652 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217653 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217654 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217655 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217656 2 0.0661 0.987 0.008 0.988 0.004
#> GSM217657 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217658 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217659 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217660 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217661 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217662 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217663 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217664 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217665 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217666 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217667 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217668 1 0.3941 0.812 0.844 0.156 0.000
#> GSM217669 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217723 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217724 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217725 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217726 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217728 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217729 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.996 1.000 0.000 0.000
#> GSM217737 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217738 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217739 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217740 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217741 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217742 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217743 2 0.0000 1.000 0.000 1.000 0.000
#> GSM217744 2 0.0000 1.000 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0188 0.97500 0.000 0.996 0.000 0.004
#> GSM217645 2 0.0000 0.97589 0.000 1.000 0.000 0.000
#> GSM217646 2 0.0188 0.97518 0.000 0.996 0.000 0.004
#> GSM217647 2 0.0000 0.97589 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.97589 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0188 0.97518 0.000 0.996 0.000 0.004
#> GSM217650 2 0.0000 0.97589 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0188 0.97500 0.000 0.996 0.000 0.004
#> GSM217652 2 0.0000 0.97589 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0188 0.97500 0.000 0.996 0.000 0.004
#> GSM217654 4 0.4730 0.44767 0.000 0.364 0.000 0.636
#> GSM217655 2 0.2216 0.89689 0.000 0.908 0.000 0.092
#> GSM217656 4 0.2094 0.74870 0.024 0.024 0.012 0.940
#> GSM217657 4 0.3726 0.68165 0.000 0.212 0.000 0.788
#> GSM217658 2 0.0336 0.97374 0.000 0.992 0.000 0.008
#> GSM217659 2 0.0336 0.97374 0.000 0.992 0.000 0.008
#> GSM217660 2 0.2081 0.90767 0.000 0.916 0.000 0.084
#> GSM217661 2 0.0000 0.97589 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0188 0.97500 0.000 0.996 0.000 0.004
#> GSM217663 2 0.0000 0.97589 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0336 0.97374 0.000 0.992 0.000 0.008
#> GSM217665 2 0.0336 0.97374 0.000 0.992 0.000 0.008
#> GSM217666 2 0.0188 0.97516 0.000 0.996 0.000 0.004
#> GSM217667 2 0.0336 0.97374 0.000 0.992 0.000 0.008
#> GSM217668 1 0.4307 0.69677 0.784 0.192 0.000 0.024
#> GSM217669 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217670 1 0.0817 0.95227 0.976 0.000 0.000 0.024
#> GSM217671 1 0.0817 0.95246 0.976 0.000 0.000 0.024
#> GSM217672 1 0.0921 0.95240 0.972 0.000 0.000 0.028
#> GSM217673 1 0.0817 0.95227 0.976 0.000 0.000 0.024
#> GSM217674 1 0.0921 0.93795 0.972 0.000 0.000 0.028
#> GSM217675 1 0.0921 0.93795 0.972 0.000 0.000 0.028
#> GSM217676 1 0.0188 0.95234 0.996 0.000 0.000 0.004
#> GSM217677 1 0.0188 0.95073 0.996 0.000 0.000 0.004
#> GSM217678 1 0.0188 0.95234 0.996 0.000 0.000 0.004
#> GSM217679 1 0.0336 0.94949 0.992 0.000 0.000 0.008
#> GSM217680 1 0.0000 0.95174 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0188 0.95073 0.996 0.000 0.000 0.004
#> GSM217682 1 0.0707 0.94310 0.980 0.000 0.000 0.020
#> GSM217683 1 0.0592 0.94543 0.984 0.000 0.000 0.016
#> GSM217684 1 0.1211 0.95154 0.960 0.000 0.000 0.040
#> GSM217685 3 0.0707 0.98247 0.000 0.000 0.980 0.020
#> GSM217686 3 0.0707 0.98247 0.000 0.000 0.980 0.020
#> GSM217687 3 0.0469 0.98690 0.000 0.000 0.988 0.012
#> GSM217688 3 0.0336 0.98862 0.000 0.000 0.992 0.008
#> GSM217689 3 0.2149 0.92058 0.000 0.000 0.912 0.088
#> GSM217690 3 0.0707 0.98247 0.000 0.000 0.980 0.020
#> GSM217691 3 0.0188 0.98962 0.000 0.000 0.996 0.004
#> GSM217692 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0188 0.98999 0.000 0.000 0.996 0.004
#> GSM217699 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0188 0.98962 0.000 0.000 0.996 0.004
#> GSM217701 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.99096 0.000 0.000 1.000 0.000
#> GSM217703 4 0.3172 0.62981 0.000 0.000 0.160 0.840
#> GSM217704 3 0.0188 0.98962 0.000 0.000 0.996 0.004
#> GSM217705 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217706 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217707 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217708 4 0.4877 0.29727 0.408 0.000 0.000 0.592
#> GSM217709 4 0.3356 0.70586 0.176 0.000 0.000 0.824
#> GSM217710 4 0.2973 0.72373 0.144 0.000 0.000 0.856
#> GSM217711 4 0.1792 0.74440 0.068 0.000 0.000 0.932
#> GSM217712 1 0.2216 0.93023 0.908 0.000 0.000 0.092
#> GSM217713 1 0.1940 0.94023 0.924 0.000 0.000 0.076
#> GSM217714 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217715 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217716 1 0.1867 0.94235 0.928 0.000 0.000 0.072
#> GSM217717 1 0.2011 0.93786 0.920 0.000 0.000 0.080
#> GSM217718 4 0.4999 -0.00356 0.492 0.000 0.000 0.508
#> GSM217719 1 0.2760 0.89617 0.872 0.000 0.000 0.128
#> GSM217720 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217721 1 0.2345 0.92428 0.900 0.000 0.000 0.100
#> GSM217722 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217723 1 0.2081 0.93549 0.916 0.000 0.000 0.084
#> GSM217724 1 0.1792 0.94407 0.932 0.000 0.000 0.068
#> GSM217725 1 0.3219 0.85157 0.836 0.000 0.000 0.164
#> GSM217726 1 0.0188 0.95073 0.996 0.000 0.000 0.004
#> GSM217727 1 0.0336 0.94949 0.992 0.000 0.000 0.008
#> GSM217728 1 0.2216 0.93032 0.908 0.000 0.000 0.092
#> GSM217729 1 0.0000 0.95174 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.95174 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.95174 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0188 0.95073 0.996 0.000 0.000 0.004
#> GSM217733 1 0.0188 0.95073 0.996 0.000 0.000 0.004
#> GSM217734 1 0.0469 0.94750 0.988 0.000 0.000 0.012
#> GSM217735 1 0.0188 0.95073 0.996 0.000 0.000 0.004
#> GSM217736 1 0.0188 0.95073 0.996 0.000 0.000 0.004
#> GSM217737 4 0.3610 0.68930 0.000 0.200 0.000 0.800
#> GSM217738 4 0.2704 0.73871 0.000 0.124 0.000 0.876
#> GSM217739 4 0.2647 0.74039 0.000 0.120 0.000 0.880
#> GSM217740 4 0.2647 0.74039 0.000 0.120 0.000 0.880
#> GSM217741 2 0.0707 0.96615 0.000 0.980 0.000 0.020
#> GSM217742 2 0.3444 0.77841 0.000 0.816 0.000 0.184
#> GSM217743 2 0.1792 0.92710 0.000 0.932 0.000 0.068
#> GSM217744 2 0.0921 0.96131 0.000 0.972 0.000 0.028
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.1195 0.9132 0.028 0.960 0.000 0.000 0.012
#> GSM217645 2 0.0703 0.9145 0.024 0.976 0.000 0.000 0.000
#> GSM217646 2 0.0798 0.9158 0.016 0.976 0.000 0.000 0.008
#> GSM217647 2 0.0609 0.9121 0.020 0.980 0.000 0.000 0.000
#> GSM217648 2 0.1117 0.9150 0.020 0.964 0.000 0.000 0.016
#> GSM217649 2 0.0771 0.9156 0.020 0.976 0.000 0.000 0.004
#> GSM217650 2 0.1205 0.9109 0.040 0.956 0.000 0.000 0.004
#> GSM217651 2 0.1668 0.9063 0.032 0.940 0.000 0.000 0.028
#> GSM217652 2 0.0510 0.9159 0.016 0.984 0.000 0.000 0.000
#> GSM217653 2 0.0912 0.9141 0.016 0.972 0.000 0.000 0.012
#> GSM217654 5 0.4108 0.4719 0.008 0.308 0.000 0.000 0.684
#> GSM217655 2 0.3291 0.8248 0.040 0.840 0.000 0.000 0.120
#> GSM217656 5 0.0807 0.7888 0.012 0.000 0.000 0.012 0.976
#> GSM217657 5 0.1106 0.7908 0.012 0.024 0.000 0.000 0.964
#> GSM217658 2 0.1041 0.9126 0.032 0.964 0.000 0.000 0.004
#> GSM217659 2 0.1205 0.9108 0.040 0.956 0.000 0.000 0.004
#> GSM217660 2 0.2843 0.8275 0.008 0.848 0.000 0.000 0.144
#> GSM217661 2 0.0807 0.9160 0.012 0.976 0.000 0.000 0.012
#> GSM217662 2 0.1012 0.9146 0.020 0.968 0.000 0.000 0.012
#> GSM217663 2 0.0963 0.9081 0.036 0.964 0.000 0.000 0.000
#> GSM217664 2 0.0703 0.9144 0.024 0.976 0.000 0.000 0.000
#> GSM217665 2 0.0609 0.9130 0.020 0.980 0.000 0.000 0.000
#> GSM217666 2 0.1043 0.9069 0.040 0.960 0.000 0.000 0.000
#> GSM217667 2 0.0963 0.9081 0.036 0.964 0.000 0.000 0.000
#> GSM217668 4 0.1493 0.7151 0.024 0.028 0.000 0.948 0.000
#> GSM217669 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217670 4 0.0703 0.7463 0.024 0.000 0.000 0.976 0.000
#> GSM217671 4 0.0703 0.7602 0.024 0.000 0.000 0.976 0.000
#> GSM217672 4 0.0404 0.7659 0.012 0.000 0.000 0.988 0.000
#> GSM217673 4 0.0404 0.7659 0.012 0.000 0.000 0.988 0.000
#> GSM217674 1 0.4696 0.8549 0.556 0.016 0.000 0.428 0.000
#> GSM217675 1 0.4297 0.9300 0.528 0.000 0.000 0.472 0.000
#> GSM217676 1 0.4300 0.9313 0.524 0.000 0.000 0.476 0.000
#> GSM217677 1 0.4287 0.9256 0.540 0.000 0.000 0.460 0.000
#> GSM217678 1 0.4305 0.9261 0.512 0.000 0.000 0.488 0.000
#> GSM217679 1 0.4300 0.9314 0.524 0.000 0.000 0.476 0.000
#> GSM217680 1 0.4307 0.9098 0.504 0.000 0.000 0.496 0.000
#> GSM217681 1 0.4306 0.9035 0.508 0.000 0.000 0.492 0.000
#> GSM217682 1 0.4287 0.9256 0.540 0.000 0.000 0.460 0.000
#> GSM217683 1 0.4294 0.9274 0.532 0.000 0.000 0.468 0.000
#> GSM217684 4 0.1544 0.7051 0.068 0.000 0.000 0.932 0.000
#> GSM217685 3 0.0671 0.9805 0.004 0.000 0.980 0.000 0.016
#> GSM217686 3 0.1310 0.9698 0.024 0.000 0.956 0.000 0.020
#> GSM217687 3 0.0693 0.9811 0.008 0.000 0.980 0.000 0.012
#> GSM217688 3 0.0807 0.9800 0.012 0.000 0.976 0.000 0.012
#> GSM217689 3 0.2189 0.9147 0.012 0.000 0.904 0.000 0.084
#> GSM217690 3 0.1211 0.9722 0.016 0.000 0.960 0.000 0.024
#> GSM217691 3 0.0000 0.9855 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.9855 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0510 0.9820 0.016 0.000 0.984 0.000 0.000
#> GSM217694 3 0.0290 0.9852 0.008 0.000 0.992 0.000 0.000
#> GSM217695 3 0.0162 0.9856 0.004 0.000 0.996 0.000 0.000
#> GSM217696 3 0.0162 0.9852 0.004 0.000 0.996 0.000 0.000
#> GSM217697 3 0.0609 0.9809 0.020 0.000 0.980 0.000 0.000
#> GSM217698 3 0.0000 0.9855 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0162 0.9856 0.004 0.000 0.996 0.000 0.000
#> GSM217700 3 0.0162 0.9856 0.004 0.000 0.996 0.000 0.000
#> GSM217701 3 0.0162 0.9856 0.004 0.000 0.996 0.000 0.000
#> GSM217702 3 0.0162 0.9856 0.004 0.000 0.996 0.000 0.000
#> GSM217703 5 0.4108 0.4572 0.008 0.000 0.308 0.000 0.684
#> GSM217704 3 0.0162 0.9852 0.004 0.000 0.996 0.000 0.000
#> GSM217705 4 0.0290 0.7675 0.008 0.000 0.000 0.992 0.000
#> GSM217706 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217708 4 0.0566 0.7615 0.004 0.000 0.000 0.984 0.012
#> GSM217709 4 0.3957 0.3352 0.008 0.000 0.000 0.712 0.280
#> GSM217710 5 0.4452 0.2525 0.004 0.000 0.000 0.496 0.500
#> GSM217711 5 0.4047 0.5770 0.004 0.000 0.000 0.320 0.676
#> GSM217712 4 0.0324 0.7659 0.004 0.000 0.000 0.992 0.004
#> GSM217713 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217714 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0451 0.7645 0.008 0.000 0.000 0.988 0.004
#> GSM217718 4 0.0898 0.7580 0.020 0.000 0.000 0.972 0.008
#> GSM217719 4 0.1041 0.7512 0.032 0.000 0.000 0.964 0.004
#> GSM217720 4 0.0609 0.7614 0.020 0.000 0.000 0.980 0.000
#> GSM217721 4 0.0566 0.7622 0.012 0.000 0.000 0.984 0.004
#> GSM217722 4 0.0000 0.7685 0.000 0.000 0.000 1.000 0.000
#> GSM217723 4 0.2677 0.5806 0.112 0.000 0.000 0.872 0.016
#> GSM217724 4 0.3508 0.0511 0.252 0.000 0.000 0.748 0.000
#> GSM217725 1 0.6416 0.5922 0.480 0.000 0.000 0.332 0.188
#> GSM217726 1 0.4304 0.9290 0.516 0.000 0.000 0.484 0.000
#> GSM217727 1 0.4297 0.9300 0.528 0.000 0.000 0.472 0.000
#> GSM217728 4 0.4979 -0.8860 0.480 0.000 0.000 0.492 0.028
#> GSM217729 4 0.4305 -0.8981 0.488 0.000 0.000 0.512 0.000
#> GSM217730 4 0.4307 -0.9054 0.500 0.000 0.000 0.500 0.000
#> GSM217731 4 0.4304 -0.8907 0.484 0.000 0.000 0.516 0.000
#> GSM217732 1 0.4302 0.9121 0.520 0.000 0.000 0.480 0.000
#> GSM217733 4 0.4300 -0.8550 0.476 0.000 0.000 0.524 0.000
#> GSM217734 1 0.4304 0.9158 0.516 0.000 0.000 0.484 0.000
#> GSM217735 1 0.4300 0.9155 0.524 0.000 0.000 0.476 0.000
#> GSM217736 1 0.4305 0.9248 0.512 0.000 0.000 0.488 0.000
#> GSM217737 5 0.2561 0.7571 0.020 0.096 0.000 0.000 0.884
#> GSM217738 5 0.2304 0.7856 0.044 0.048 0.000 0.000 0.908
#> GSM217739 5 0.2300 0.7825 0.072 0.024 0.000 0.000 0.904
#> GSM217740 5 0.1661 0.7906 0.036 0.024 0.000 0.000 0.940
#> GSM217741 2 0.4167 0.7314 0.252 0.724 0.000 0.000 0.024
#> GSM217742 2 0.5725 0.5810 0.224 0.620 0.000 0.000 0.156
#> GSM217743 2 0.4935 0.5958 0.344 0.616 0.000 0.000 0.040
#> GSM217744 2 0.4491 0.6438 0.328 0.652 0.000 0.000 0.020
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0692 0.9230 0.004 0.976 0.000 0.000 0.000 0.020
#> GSM217645 2 0.2222 0.8964 0.024 0.916 0.000 0.008 0.028 0.024
#> GSM217646 2 0.0858 0.9223 0.000 0.968 0.000 0.000 0.028 0.004
#> GSM217647 2 0.0790 0.9248 0.000 0.968 0.000 0.000 0.032 0.000
#> GSM217648 2 0.1049 0.9183 0.000 0.960 0.000 0.000 0.032 0.008
#> GSM217649 2 0.1285 0.9100 0.000 0.944 0.000 0.000 0.052 0.004
#> GSM217650 2 0.1871 0.9017 0.032 0.928 0.000 0.000 0.016 0.024
#> GSM217651 2 0.1861 0.9099 0.020 0.928 0.000 0.000 0.016 0.036
#> GSM217652 2 0.2215 0.9033 0.024 0.916 0.000 0.008 0.032 0.020
#> GSM217653 2 0.0692 0.9262 0.000 0.976 0.000 0.000 0.020 0.004
#> GSM217654 6 0.3996 0.0741 0.004 0.352 0.000 0.000 0.008 0.636
#> GSM217655 2 0.4391 0.6943 0.068 0.772 0.000 0.000 0.080 0.080
#> GSM217656 6 0.1773 0.4617 0.000 0.036 0.000 0.016 0.016 0.932
#> GSM217657 6 0.1951 0.4301 0.004 0.060 0.000 0.000 0.020 0.916
#> GSM217658 2 0.1798 0.9050 0.028 0.932 0.000 0.000 0.020 0.020
#> GSM217659 2 0.0405 0.9255 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM217660 2 0.3047 0.7978 0.004 0.848 0.000 0.000 0.084 0.064
#> GSM217661 2 0.2062 0.8677 0.008 0.900 0.000 0.000 0.088 0.004
#> GSM217662 2 0.1620 0.9223 0.012 0.940 0.000 0.000 0.024 0.024
#> GSM217663 2 0.1010 0.9244 0.000 0.960 0.000 0.000 0.036 0.004
#> GSM217664 2 0.1630 0.9110 0.024 0.940 0.000 0.000 0.016 0.020
#> GSM217665 2 0.0713 0.9261 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM217666 2 0.1075 0.9176 0.000 0.952 0.000 0.000 0.048 0.000
#> GSM217667 2 0.1152 0.9224 0.000 0.952 0.000 0.000 0.044 0.004
#> GSM217668 4 0.2604 0.8039 0.064 0.004 0.000 0.884 0.044 0.004
#> GSM217669 4 0.1218 0.8556 0.028 0.000 0.000 0.956 0.004 0.012
#> GSM217670 4 0.1387 0.8361 0.068 0.000 0.000 0.932 0.000 0.000
#> GSM217671 4 0.3141 0.7402 0.200 0.000 0.000 0.788 0.012 0.000
#> GSM217672 4 0.1714 0.8342 0.092 0.000 0.000 0.908 0.000 0.000
#> GSM217673 4 0.1141 0.8539 0.052 0.000 0.000 0.948 0.000 0.000
#> GSM217674 1 0.4483 0.8686 0.664 0.004 0.004 0.288 0.040 0.000
#> GSM217675 1 0.4865 0.8315 0.572 0.008 0.000 0.372 0.048 0.000
#> GSM217676 1 0.4743 0.8510 0.600 0.000 0.000 0.348 0.044 0.008
#> GSM217677 1 0.3758 0.9039 0.700 0.000 0.000 0.284 0.016 0.000
#> GSM217678 1 0.3954 0.8986 0.636 0.000 0.000 0.352 0.012 0.000
#> GSM217679 1 0.3809 0.9091 0.684 0.000 0.004 0.304 0.008 0.000
#> GSM217680 1 0.3428 0.9043 0.696 0.000 0.000 0.304 0.000 0.000
#> GSM217681 1 0.3619 0.9026 0.680 0.000 0.000 0.316 0.004 0.000
#> GSM217682 1 0.4308 0.8975 0.664 0.000 0.008 0.300 0.028 0.000
#> GSM217683 1 0.4452 0.8817 0.644 0.000 0.004 0.312 0.040 0.000
#> GSM217684 4 0.2882 0.7600 0.180 0.000 0.000 0.812 0.008 0.000
#> GSM217685 3 0.0692 0.9719 0.000 0.000 0.976 0.000 0.004 0.020
#> GSM217686 3 0.0692 0.9719 0.000 0.000 0.976 0.000 0.004 0.020
#> GSM217687 3 0.0508 0.9755 0.004 0.000 0.984 0.000 0.000 0.012
#> GSM217688 3 0.0458 0.9748 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM217689 3 0.2915 0.8514 0.008 0.000 0.848 0.000 0.024 0.120
#> GSM217690 3 0.1737 0.9446 0.008 0.000 0.932 0.000 0.020 0.040
#> GSM217691 3 0.1151 0.9586 0.032 0.000 0.956 0.000 0.012 0.000
#> GSM217692 3 0.0622 0.9740 0.012 0.000 0.980 0.000 0.008 0.000
#> GSM217693 3 0.0858 0.9719 0.004 0.000 0.968 0.000 0.028 0.000
#> GSM217694 3 0.0820 0.9733 0.012 0.000 0.972 0.000 0.016 0.000
#> GSM217695 3 0.0725 0.9742 0.012 0.000 0.976 0.000 0.012 0.000
#> GSM217696 3 0.0260 0.9767 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM217697 3 0.0748 0.9743 0.004 0.000 0.976 0.000 0.016 0.004
#> GSM217698 3 0.0260 0.9764 0.008 0.000 0.992 0.000 0.000 0.000
#> GSM217699 3 0.0146 0.9764 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217700 3 0.0000 0.9766 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0000 0.9766 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.9766 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 6 0.3797 0.3223 0.000 0.000 0.292 0.000 0.016 0.692
#> GSM217704 3 0.0405 0.9758 0.008 0.000 0.988 0.000 0.004 0.000
#> GSM217705 4 0.1327 0.8549 0.064 0.000 0.000 0.936 0.000 0.000
#> GSM217706 4 0.1078 0.8535 0.016 0.000 0.000 0.964 0.012 0.008
#> GSM217707 4 0.1269 0.8482 0.020 0.000 0.000 0.956 0.012 0.012
#> GSM217708 4 0.1398 0.8353 0.000 0.000 0.000 0.940 0.008 0.052
#> GSM217709 4 0.3245 0.5829 0.000 0.000 0.000 0.764 0.008 0.228
#> GSM217710 4 0.4067 0.0422 0.000 0.000 0.000 0.548 0.008 0.444
#> GSM217711 6 0.4234 0.2910 0.004 0.000 0.000 0.372 0.016 0.608
#> GSM217712 4 0.1078 0.8558 0.016 0.000 0.000 0.964 0.008 0.012
#> GSM217713 4 0.0713 0.8548 0.028 0.000 0.000 0.972 0.000 0.000
#> GSM217714 4 0.0748 0.8580 0.016 0.000 0.000 0.976 0.004 0.004
#> GSM217715 4 0.0508 0.8577 0.012 0.000 0.000 0.984 0.000 0.004
#> GSM217716 4 0.2790 0.7819 0.132 0.000 0.000 0.844 0.024 0.000
#> GSM217717 4 0.1563 0.8497 0.056 0.000 0.000 0.932 0.012 0.000
#> GSM217718 4 0.2794 0.8055 0.144 0.000 0.000 0.840 0.012 0.004
#> GSM217719 4 0.3236 0.7716 0.180 0.000 0.000 0.796 0.024 0.000
#> GSM217720 4 0.2473 0.8217 0.136 0.000 0.000 0.856 0.008 0.000
#> GSM217721 4 0.1138 0.8616 0.012 0.000 0.000 0.960 0.024 0.004
#> GSM217722 4 0.0508 0.8600 0.012 0.000 0.000 0.984 0.004 0.000
#> GSM217723 4 0.3127 0.7885 0.056 0.000 0.000 0.840 0.004 0.100
#> GSM217724 4 0.3352 0.6309 0.172 0.000 0.000 0.800 0.012 0.016
#> GSM217725 1 0.5754 0.6993 0.536 0.000 0.000 0.248 0.004 0.212
#> GSM217726 1 0.4210 0.8905 0.636 0.000 0.000 0.336 0.028 0.000
#> GSM217727 1 0.4278 0.8928 0.632 0.000 0.000 0.336 0.032 0.000
#> GSM217728 1 0.4238 0.8982 0.628 0.000 0.000 0.344 0.000 0.028
#> GSM217729 1 0.3634 0.8972 0.644 0.000 0.000 0.356 0.000 0.000
#> GSM217730 1 0.3741 0.8968 0.672 0.000 0.000 0.320 0.008 0.000
#> GSM217731 1 0.3804 0.8984 0.656 0.000 0.000 0.336 0.008 0.000
#> GSM217732 1 0.3494 0.8340 0.736 0.000 0.000 0.252 0.012 0.000
#> GSM217733 1 0.3833 0.8804 0.648 0.000 0.000 0.344 0.008 0.000
#> GSM217734 1 0.3547 0.9010 0.696 0.000 0.000 0.300 0.004 0.000
#> GSM217735 1 0.3490 0.8523 0.724 0.000 0.000 0.268 0.008 0.000
#> GSM217736 1 0.3619 0.9093 0.680 0.000 0.000 0.316 0.004 0.000
#> GSM217737 5 0.5873 0.4386 0.028 0.104 0.000 0.000 0.492 0.376
#> GSM217738 5 0.5593 0.4191 0.020 0.084 0.000 0.000 0.488 0.408
#> GSM217739 5 0.5185 0.4101 0.016 0.056 0.000 0.000 0.536 0.392
#> GSM217740 5 0.4948 0.3778 0.000 0.064 0.000 0.000 0.472 0.464
#> GSM217741 5 0.4494 0.3798 0.012 0.464 0.000 0.000 0.512 0.012
#> GSM217742 5 0.5752 0.5347 0.004 0.396 0.000 0.000 0.452 0.148
#> GSM217743 5 0.4397 0.5529 0.012 0.336 0.000 0.000 0.632 0.020
#> GSM217744 5 0.4446 0.4326 0.016 0.424 0.000 0.000 0.552 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:NMF 101 3.32e-01 2
#> CV:NMF 101 2.94e-07 3
#> CV:NMF 98 1.73e-07 4
#> CV:NMF 91 4.47e-07 5
#> CV:NMF 89 2.34e-09 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) are extracted by 'MAD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.994 0.996 0.5041 0.495 0.495
#> 3 3 0.961 0.934 0.965 0.2597 0.873 0.744
#> 4 4 0.828 0.865 0.922 0.0694 0.983 0.953
#> 5 5 0.786 0.723 0.865 0.1139 0.882 0.665
#> 6 6 0.766 0.711 0.854 0.0386 0.967 0.858
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
#> GSM217644 2 0.0000 0.998 0.000 1.000
#> GSM217645 2 0.0000 0.998 0.000 1.000
#> GSM217646 2 0.0000 0.998 0.000 1.000
#> GSM217647 2 0.0000 0.998 0.000 1.000
#> GSM217648 2 0.0000 0.998 0.000 1.000
#> GSM217649 2 0.0000 0.998 0.000 1.000
#> GSM217650 2 0.0000 0.998 0.000 1.000
#> GSM217651 2 0.0000 0.998 0.000 1.000
#> GSM217652 2 0.0000 0.998 0.000 1.000
#> GSM217653 2 0.0000 0.998 0.000 1.000
#> GSM217654 2 0.0000 0.998 0.000 1.000
#> GSM217655 2 0.0000 0.998 0.000 1.000
#> GSM217656 2 0.0376 0.998 0.004 0.996
#> GSM217657 2 0.0376 0.998 0.004 0.996
#> GSM217658 2 0.0000 0.998 0.000 1.000
#> GSM217659 2 0.0000 0.998 0.000 1.000
#> GSM217660 2 0.0000 0.998 0.000 1.000
#> GSM217661 2 0.0000 0.998 0.000 1.000
#> GSM217662 2 0.0000 0.998 0.000 1.000
#> GSM217663 2 0.0000 0.998 0.000 1.000
#> GSM217664 2 0.0000 0.998 0.000 1.000
#> GSM217665 2 0.0000 0.998 0.000 1.000
#> GSM217666 2 0.0000 0.998 0.000 1.000
#> GSM217667 2 0.0000 0.998 0.000 1.000
#> GSM217668 1 0.0000 0.994 1.000 0.000
#> GSM217669 1 0.0376 0.992 0.996 0.004
#> GSM217670 1 0.0000 0.994 1.000 0.000
#> GSM217671 1 0.0000 0.994 1.000 0.000
#> GSM217672 1 0.0000 0.994 1.000 0.000
#> GSM217673 1 0.0000 0.994 1.000 0.000
#> GSM217674 1 0.0000 0.994 1.000 0.000
#> GSM217675 1 0.0000 0.994 1.000 0.000
#> GSM217676 1 0.1184 0.985 0.984 0.016
#> GSM217677 1 0.0000 0.994 1.000 0.000
#> GSM217678 1 0.0000 0.994 1.000 0.000
#> GSM217679 1 0.0000 0.994 1.000 0.000
#> GSM217680 1 0.0000 0.994 1.000 0.000
#> GSM217681 1 0.0000 0.994 1.000 0.000
#> GSM217682 1 0.0000 0.994 1.000 0.000
#> GSM217683 1 0.0000 0.994 1.000 0.000
#> GSM217684 1 0.0000 0.994 1.000 0.000
#> GSM217685 2 0.0376 0.998 0.004 0.996
#> GSM217686 2 0.0376 0.998 0.004 0.996
#> GSM217687 2 0.0376 0.998 0.004 0.996
#> GSM217688 2 0.0376 0.998 0.004 0.996
#> GSM217689 2 0.0376 0.998 0.004 0.996
#> GSM217690 2 0.0376 0.998 0.004 0.996
#> GSM217691 2 0.0376 0.998 0.004 0.996
#> GSM217692 2 0.0376 0.998 0.004 0.996
#> GSM217693 2 0.0376 0.998 0.004 0.996
#> GSM217694 2 0.0376 0.998 0.004 0.996
#> GSM217695 2 0.0376 0.998 0.004 0.996
#> GSM217696 2 0.0376 0.998 0.004 0.996
#> GSM217697 2 0.0376 0.998 0.004 0.996
#> GSM217698 2 0.0376 0.998 0.004 0.996
#> GSM217699 2 0.0376 0.998 0.004 0.996
#> GSM217700 2 0.0376 0.998 0.004 0.996
#> GSM217701 2 0.0376 0.998 0.004 0.996
#> GSM217702 2 0.0376 0.998 0.004 0.996
#> GSM217703 2 0.0376 0.998 0.004 0.996
#> GSM217704 2 0.0376 0.998 0.004 0.996
#> GSM217705 1 0.0000 0.994 1.000 0.000
#> GSM217706 1 0.0000 0.994 1.000 0.000
#> GSM217707 1 0.0000 0.994 1.000 0.000
#> GSM217708 1 0.1633 0.979 0.976 0.024
#> GSM217709 1 0.2043 0.973 0.968 0.032
#> GSM217710 1 0.2043 0.973 0.968 0.032
#> GSM217711 1 0.2043 0.973 0.968 0.032
#> GSM217712 1 0.0000 0.994 1.000 0.000
#> GSM217713 1 0.0000 0.994 1.000 0.000
#> GSM217714 1 0.0000 0.994 1.000 0.000
#> GSM217715 1 0.0000 0.994 1.000 0.000
#> GSM217716 1 0.0376 0.993 0.996 0.004
#> GSM217717 1 0.0376 0.993 0.996 0.004
#> GSM217718 1 0.0376 0.993 0.996 0.004
#> GSM217719 1 0.0376 0.993 0.996 0.004
#> GSM217720 1 0.0000 0.994 1.000 0.000
#> GSM217721 1 0.0376 0.993 0.996 0.004
#> GSM217722 1 0.0000 0.994 1.000 0.000
#> GSM217723 1 0.2043 0.973 0.968 0.032
#> GSM217724 1 0.1633 0.979 0.976 0.024
#> GSM217725 1 0.2043 0.973 0.968 0.032
#> GSM217726 1 0.0000 0.994 1.000 0.000
#> GSM217727 1 0.0000 0.994 1.000 0.000
#> GSM217728 1 0.2043 0.973 0.968 0.032
#> GSM217729 1 0.0000 0.994 1.000 0.000
#> GSM217730 1 0.0000 0.994 1.000 0.000
#> GSM217731 1 0.0000 0.994 1.000 0.000
#> GSM217732 1 0.0000 0.994 1.000 0.000
#> GSM217733 1 0.0000 0.994 1.000 0.000
#> GSM217734 1 0.0000 0.994 1.000 0.000
#> GSM217735 1 0.0000 0.994 1.000 0.000
#> GSM217736 1 0.0000 0.994 1.000 0.000
#> GSM217737 2 0.0000 0.998 0.000 1.000
#> GSM217738 2 0.0000 0.998 0.000 1.000
#> GSM217739 2 0.0000 0.998 0.000 1.000
#> GSM217740 2 0.0000 0.998 0.000 1.000
#> GSM217741 2 0.0000 0.998 0.000 1.000
#> GSM217742 2 0.0000 0.998 0.000 1.000
#> GSM217743 2 0.0000 0.998 0.000 1.000
#> GSM217744 2 0.0000 0.998 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.5431 0.686 0.000 0.716 0.284
#> GSM217645 2 0.2537 0.871 0.000 0.920 0.080
#> GSM217646 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217649 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217650 2 0.1860 0.886 0.000 0.948 0.052
#> GSM217651 2 0.1860 0.886 0.000 0.948 0.052
#> GSM217652 2 0.1529 0.889 0.000 0.960 0.040
#> GSM217653 2 0.1753 0.887 0.000 0.952 0.048
#> GSM217654 2 0.6008 0.556 0.000 0.628 0.372
#> GSM217655 2 0.6008 0.556 0.000 0.628 0.372
#> GSM217656 2 0.6307 0.281 0.000 0.512 0.488
#> GSM217657 2 0.6307 0.281 0.000 0.512 0.488
#> GSM217658 2 0.1163 0.891 0.000 0.972 0.028
#> GSM217659 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217660 2 0.5733 0.624 0.000 0.676 0.324
#> GSM217661 2 0.4178 0.805 0.000 0.828 0.172
#> GSM217662 2 0.1860 0.886 0.000 0.948 0.052
#> GSM217663 2 0.1753 0.887 0.000 0.952 0.048
#> GSM217664 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217668 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217669 1 0.0237 0.992 0.996 0.000 0.004
#> GSM217670 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217676 1 0.0892 0.981 0.980 0.000 0.020
#> GSM217677 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217708 1 0.1163 0.976 0.972 0.000 0.028
#> GSM217709 1 0.1411 0.969 0.964 0.000 0.036
#> GSM217710 1 0.1411 0.969 0.964 0.000 0.036
#> GSM217711 1 0.1411 0.969 0.964 0.000 0.036
#> GSM217712 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217716 1 0.0237 0.992 0.996 0.000 0.004
#> GSM217717 1 0.0237 0.992 0.996 0.000 0.004
#> GSM217718 1 0.0237 0.992 0.996 0.000 0.004
#> GSM217719 1 0.0237 0.992 0.996 0.000 0.004
#> GSM217720 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217721 1 0.0237 0.992 0.996 0.000 0.004
#> GSM217722 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217723 1 0.1411 0.969 0.964 0.000 0.036
#> GSM217724 1 0.1163 0.976 0.972 0.000 0.028
#> GSM217725 1 0.1411 0.969 0.964 0.000 0.036
#> GSM217726 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217728 1 0.1411 0.969 0.964 0.000 0.036
#> GSM217729 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.994 1.000 0.000 0.000
#> GSM217737 2 0.4002 0.803 0.000 0.840 0.160
#> GSM217738 2 0.4002 0.803 0.000 0.840 0.160
#> GSM217739 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.894 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.894 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.4817 0.0825 0.000 0.612 0 0.388
#> GSM217645 2 0.2647 0.7867 0.000 0.880 0 0.120
#> GSM217646 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217647 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217648 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217649 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217650 2 0.1637 0.8502 0.000 0.940 0 0.060
#> GSM217651 2 0.1637 0.8502 0.000 0.940 0 0.060
#> GSM217652 2 0.1474 0.8551 0.000 0.948 0 0.052
#> GSM217653 2 0.1637 0.8502 0.000 0.940 0 0.060
#> GSM217654 4 0.4907 0.4953 0.000 0.420 0 0.580
#> GSM217655 2 0.4996 -0.3491 0.000 0.516 0 0.484
#> GSM217656 4 0.3610 0.8243 0.000 0.200 0 0.800
#> GSM217657 4 0.3610 0.8243 0.000 0.200 0 0.800
#> GSM217658 2 0.1211 0.8607 0.000 0.960 0 0.040
#> GSM217659 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217660 2 0.4888 -0.0850 0.000 0.588 0 0.412
#> GSM217661 2 0.3569 0.6691 0.000 0.804 0 0.196
#> GSM217662 2 0.1716 0.8469 0.000 0.936 0 0.064
#> GSM217663 2 0.1637 0.8502 0.000 0.940 0 0.060
#> GSM217664 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217665 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217666 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217667 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217668 1 0.0000 0.9086 1.000 0.000 0 0.000
#> GSM217669 1 0.0188 0.9081 0.996 0.000 0 0.004
#> GSM217670 1 0.0000 0.9086 1.000 0.000 0 0.000
#> GSM217671 1 0.0000 0.9086 1.000 0.000 0 0.000
#> GSM217672 1 0.0000 0.9086 1.000 0.000 0 0.000
#> GSM217673 1 0.0000 0.9086 1.000 0.000 0 0.000
#> GSM217674 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217675 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217676 1 0.3764 0.8773 0.784 0.000 0 0.216
#> GSM217677 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217678 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217679 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217680 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217681 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217682 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217683 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217684 1 0.0188 0.9090 0.996 0.000 0 0.004
#> GSM217685 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217686 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217687 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217688 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217689 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217690 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217691 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217692 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217693 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217694 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217695 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217696 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217697 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217698 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217699 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217700 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217701 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217702 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217703 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217704 3 0.0000 1.0000 0.000 0.000 1 0.000
#> GSM217705 1 0.0000 0.9086 1.000 0.000 0 0.000
#> GSM217706 1 0.0188 0.9077 0.996 0.000 0 0.004
#> GSM217707 1 0.0188 0.9077 0.996 0.000 0 0.004
#> GSM217708 1 0.1022 0.8959 0.968 0.000 0 0.032
#> GSM217709 1 0.1211 0.8917 0.960 0.000 0 0.040
#> GSM217710 1 0.1211 0.8917 0.960 0.000 0 0.040
#> GSM217711 1 0.1211 0.8917 0.960 0.000 0 0.040
#> GSM217712 1 0.0188 0.9077 0.996 0.000 0 0.004
#> GSM217713 1 0.0188 0.9077 0.996 0.000 0 0.004
#> GSM217714 1 0.0188 0.9077 0.996 0.000 0 0.004
#> GSM217715 1 0.0188 0.9077 0.996 0.000 0 0.004
#> GSM217716 1 0.0336 0.9068 0.992 0.000 0 0.008
#> GSM217717 1 0.0336 0.9068 0.992 0.000 0 0.008
#> GSM217718 1 0.0336 0.9068 0.992 0.000 0 0.008
#> GSM217719 1 0.0336 0.9068 0.992 0.000 0 0.008
#> GSM217720 1 0.0000 0.9086 1.000 0.000 0 0.000
#> GSM217721 1 0.0336 0.9068 0.992 0.000 0 0.008
#> GSM217722 1 0.0188 0.9077 0.996 0.000 0 0.004
#> GSM217723 1 0.2530 0.8977 0.888 0.000 0 0.112
#> GSM217724 1 0.2408 0.9002 0.896 0.000 0 0.104
#> GSM217725 1 0.2530 0.8977 0.888 0.000 0 0.112
#> GSM217726 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217727 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217728 1 0.2530 0.8977 0.888 0.000 0 0.112
#> GSM217729 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217730 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217731 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217732 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217733 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217734 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217735 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217736 1 0.3569 0.8851 0.804 0.000 0 0.196
#> GSM217737 2 0.3726 0.5722 0.000 0.788 0 0.212
#> GSM217738 2 0.3726 0.5722 0.000 0.788 0 0.212
#> GSM217739 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217740 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217741 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217742 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217743 2 0.0000 0.8750 0.000 1.000 0 0.000
#> GSM217744 2 0.0000 0.8750 0.000 1.000 0 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.4161 0.3560 0.000 0.608 0 0.000 0.392
#> GSM217645 2 0.2329 0.8227 0.000 0.876 0 0.000 0.124
#> GSM217646 2 0.0162 0.8802 0.000 0.996 0 0.004 0.000
#> GSM217647 2 0.0000 0.8803 0.000 1.000 0 0.000 0.000
#> GSM217648 2 0.0162 0.8802 0.000 0.996 0 0.004 0.000
#> GSM217649 2 0.0162 0.8802 0.000 0.996 0 0.004 0.000
#> GSM217650 2 0.1410 0.8688 0.000 0.940 0 0.000 0.060
#> GSM217651 2 0.1410 0.8688 0.000 0.940 0 0.000 0.060
#> GSM217652 2 0.1430 0.8716 0.000 0.944 0 0.004 0.052
#> GSM217653 2 0.1478 0.8685 0.000 0.936 0 0.000 0.064
#> GSM217654 5 0.4210 0.0580 0.000 0.412 0 0.000 0.588
#> GSM217655 2 0.4305 0.0164 0.000 0.512 0 0.000 0.488
#> GSM217656 5 0.0510 0.7434 0.000 0.000 0 0.016 0.984
#> GSM217657 5 0.0510 0.7434 0.000 0.000 0 0.016 0.984
#> GSM217658 2 0.1205 0.8749 0.000 0.956 0 0.004 0.040
#> GSM217659 2 0.0162 0.8802 0.000 0.996 0 0.004 0.000
#> GSM217660 2 0.4481 0.2396 0.000 0.576 0 0.008 0.416
#> GSM217661 2 0.3109 0.7367 0.000 0.800 0 0.000 0.200
#> GSM217662 2 0.1478 0.8666 0.000 0.936 0 0.000 0.064
#> GSM217663 2 0.1478 0.8685 0.000 0.936 0 0.000 0.064
#> GSM217664 2 0.0162 0.8802 0.000 0.996 0 0.004 0.000
#> GSM217665 2 0.0000 0.8803 0.000 1.000 0 0.000 0.000
#> GSM217666 2 0.0162 0.8802 0.000 0.996 0 0.004 0.000
#> GSM217667 2 0.0162 0.8802 0.000 0.996 0 0.004 0.000
#> GSM217668 1 0.4045 0.2617 0.644 0.000 0 0.356 0.000
#> GSM217669 1 0.4235 0.0268 0.576 0.000 0 0.424 0.000
#> GSM217670 1 0.4300 -0.2757 0.524 0.000 0 0.476 0.000
#> GSM217671 1 0.4088 0.2285 0.632 0.000 0 0.368 0.000
#> GSM217672 1 0.4088 0.2285 0.632 0.000 0 0.368 0.000
#> GSM217673 1 0.4088 0.2285 0.632 0.000 0 0.368 0.000
#> GSM217674 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217675 1 0.0794 0.7783 0.972 0.000 0 0.028 0.000
#> GSM217676 1 0.4256 -0.0826 0.564 0.000 0 0.436 0.000
#> GSM217677 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217678 1 0.1121 0.7694 0.956 0.000 0 0.044 0.000
#> GSM217679 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217680 1 0.1121 0.7694 0.956 0.000 0 0.044 0.000
#> GSM217681 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217682 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217683 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217684 1 0.3561 0.4908 0.740 0.000 0 0.260 0.000
#> GSM217685 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217686 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217687 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217688 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217689 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217690 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217691 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217692 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217693 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217694 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217695 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217696 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217697 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217698 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217699 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217700 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217701 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217702 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217703 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217704 3 0.0000 1.0000 0.000 0.000 1 0.000 0.000
#> GSM217705 4 0.4074 0.6427 0.364 0.000 0 0.636 0.000
#> GSM217706 4 0.4297 0.3888 0.472 0.000 0 0.528 0.000
#> GSM217707 4 0.4297 0.3888 0.472 0.000 0 0.528 0.000
#> GSM217708 4 0.2424 0.6685 0.132 0.000 0 0.868 0.000
#> GSM217709 4 0.2127 0.6566 0.108 0.000 0 0.892 0.000
#> GSM217710 4 0.2127 0.6566 0.108 0.000 0 0.892 0.000
#> GSM217711 4 0.2127 0.6566 0.108 0.000 0 0.892 0.000
#> GSM217712 4 0.4235 0.4784 0.424 0.000 0 0.576 0.000
#> GSM217713 4 0.4291 0.4200 0.464 0.000 0 0.536 0.000
#> GSM217714 4 0.4305 0.2825 0.488 0.000 0 0.512 0.000
#> GSM217715 4 0.4306 0.2685 0.492 0.000 0 0.508 0.000
#> GSM217716 4 0.3707 0.6978 0.284 0.000 0 0.716 0.000
#> GSM217717 4 0.3707 0.6978 0.284 0.000 0 0.716 0.000
#> GSM217718 4 0.3561 0.7011 0.260 0.000 0 0.740 0.000
#> GSM217719 4 0.3561 0.7011 0.260 0.000 0 0.740 0.000
#> GSM217720 4 0.4074 0.6427 0.364 0.000 0 0.636 0.000
#> GSM217721 4 0.3707 0.6978 0.284 0.000 0 0.716 0.000
#> GSM217722 4 0.4161 0.5224 0.392 0.000 0 0.608 0.000
#> GSM217723 4 0.3561 0.6028 0.260 0.000 0 0.740 0.000
#> GSM217724 4 0.3730 0.6011 0.288 0.000 0 0.712 0.000
#> GSM217725 4 0.3586 0.5991 0.264 0.000 0 0.736 0.000
#> GSM217726 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217727 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217728 4 0.3586 0.5991 0.264 0.000 0 0.736 0.000
#> GSM217729 1 0.0963 0.7777 0.964 0.000 0 0.036 0.000
#> GSM217730 1 0.0963 0.7777 0.964 0.000 0 0.036 0.000
#> GSM217731 1 0.0609 0.7899 0.980 0.000 0 0.020 0.000
#> GSM217732 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217733 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217734 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217735 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217736 1 0.0000 0.8032 1.000 0.000 0 0.000 0.000
#> GSM217737 2 0.4240 0.6305 0.000 0.736 0 0.036 0.228
#> GSM217738 2 0.4240 0.6305 0.000 0.736 0 0.036 0.228
#> GSM217739 2 0.1469 0.8695 0.000 0.948 0 0.036 0.016
#> GSM217740 2 0.1469 0.8695 0.000 0.948 0 0.036 0.016
#> GSM217741 2 0.1469 0.8695 0.000 0.948 0 0.036 0.016
#> GSM217742 2 0.1469 0.8695 0.000 0.948 0 0.036 0.016
#> GSM217743 2 0.1469 0.8695 0.000 0.948 0 0.036 0.016
#> GSM217744 2 0.1469 0.8695 0.000 0.948 0 0.036 0.016
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.4292 0.3014 0.000 0.588 0.000 0.000 0.024 0.388
#> GSM217645 2 0.2402 0.8132 0.000 0.868 0.000 0.000 0.012 0.120
#> GSM217646 2 0.0000 0.8606 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.0458 0.8605 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217648 2 0.0632 0.8505 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM217649 2 0.0000 0.8606 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.1625 0.8559 0.000 0.928 0.000 0.000 0.012 0.060
#> GSM217651 2 0.1625 0.8559 0.000 0.928 0.000 0.000 0.012 0.060
#> GSM217652 2 0.1285 0.8593 0.000 0.944 0.000 0.000 0.004 0.052
#> GSM217653 2 0.1890 0.8526 0.000 0.916 0.000 0.000 0.024 0.060
#> GSM217654 6 0.4301 0.0819 0.000 0.392 0.000 0.000 0.024 0.584
#> GSM217655 2 0.4407 -0.0560 0.000 0.492 0.000 0.000 0.024 0.484
#> GSM217656 6 0.0000 0.6572 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM217657 6 0.0000 0.6572 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM217658 2 0.1082 0.8613 0.000 0.956 0.000 0.000 0.004 0.040
#> GSM217659 2 0.0000 0.8606 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 2 0.5765 -0.2228 0.000 0.416 0.000 0.000 0.172 0.412
#> GSM217661 2 0.3200 0.7156 0.000 0.788 0.000 0.000 0.016 0.196
#> GSM217662 2 0.1867 0.8529 0.000 0.916 0.000 0.000 0.020 0.064
#> GSM217663 2 0.1719 0.8543 0.000 0.924 0.000 0.000 0.016 0.060
#> GSM217664 2 0.0146 0.8589 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217665 2 0.0260 0.8605 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM217666 2 0.0146 0.8589 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217667 2 0.0146 0.8589 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217668 1 0.3672 0.2901 0.632 0.000 0.000 0.368 0.000 0.000
#> GSM217669 1 0.3833 0.0413 0.556 0.000 0.000 0.444 0.000 0.000
#> GSM217670 1 0.3868 -0.2649 0.504 0.000 0.000 0.496 0.000 0.000
#> GSM217671 1 0.3706 0.2598 0.620 0.000 0.000 0.380 0.000 0.000
#> GSM217672 1 0.3706 0.2598 0.620 0.000 0.000 0.380 0.000 0.000
#> GSM217673 1 0.3706 0.2598 0.620 0.000 0.000 0.380 0.000 0.000
#> GSM217674 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0790 0.7779 0.968 0.000 0.000 0.032 0.000 0.000
#> GSM217676 1 0.3860 -0.1410 0.528 0.000 0.000 0.472 0.000 0.000
#> GSM217677 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.1007 0.7729 0.956 0.000 0.000 0.044 0.000 0.000
#> GSM217679 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.1007 0.7729 0.956 0.000 0.000 0.044 0.000 0.000
#> GSM217681 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.3244 0.5077 0.732 0.000 0.000 0.268 0.000 0.000
#> GSM217685 3 0.0632 0.9666 0.000 0.000 0.976 0.000 0.024 0.000
#> GSM217686 3 0.0632 0.9666 0.000 0.000 0.976 0.000 0.024 0.000
#> GSM217687 3 0.0632 0.9666 0.000 0.000 0.976 0.000 0.024 0.000
#> GSM217688 3 0.0632 0.9666 0.000 0.000 0.976 0.000 0.024 0.000
#> GSM217689 3 0.2340 0.8784 0.000 0.000 0.852 0.000 0.148 0.000
#> GSM217690 3 0.2340 0.8784 0.000 0.000 0.852 0.000 0.148 0.000
#> GSM217691 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217692 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217693 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217694 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217695 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.2340 0.8784 0.000 0.000 0.852 0.000 0.148 0.000
#> GSM217704 3 0.0000 0.9750 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217705 4 0.3547 0.6462 0.332 0.000 0.000 0.668 0.000 0.000
#> GSM217706 4 0.3843 0.3733 0.452 0.000 0.000 0.548 0.000 0.000
#> GSM217707 4 0.3843 0.3733 0.452 0.000 0.000 0.548 0.000 0.000
#> GSM217708 4 0.1765 0.6728 0.096 0.000 0.000 0.904 0.000 0.000
#> GSM217709 4 0.1644 0.6606 0.076 0.000 0.000 0.920 0.000 0.004
#> GSM217710 4 0.1644 0.6606 0.076 0.000 0.000 0.920 0.000 0.004
#> GSM217711 4 0.1644 0.6606 0.076 0.000 0.000 0.920 0.000 0.004
#> GSM217712 4 0.3756 0.4699 0.400 0.000 0.000 0.600 0.000 0.000
#> GSM217713 4 0.3833 0.4030 0.444 0.000 0.000 0.556 0.000 0.000
#> GSM217714 4 0.3854 0.2688 0.464 0.000 0.000 0.536 0.000 0.000
#> GSM217715 4 0.3857 0.2553 0.468 0.000 0.000 0.532 0.000 0.000
#> GSM217716 4 0.3126 0.7009 0.248 0.000 0.000 0.752 0.000 0.000
#> GSM217717 4 0.3126 0.7009 0.248 0.000 0.000 0.752 0.000 0.000
#> GSM217718 4 0.2969 0.7040 0.224 0.000 0.000 0.776 0.000 0.000
#> GSM217719 4 0.2969 0.7040 0.224 0.000 0.000 0.776 0.000 0.000
#> GSM217720 4 0.3547 0.6462 0.332 0.000 0.000 0.668 0.000 0.000
#> GSM217721 4 0.3126 0.7009 0.248 0.000 0.000 0.752 0.000 0.000
#> GSM217722 4 0.3684 0.5066 0.372 0.000 0.000 0.628 0.000 0.000
#> GSM217723 4 0.3136 0.6118 0.228 0.000 0.000 0.768 0.000 0.004
#> GSM217724 4 0.3151 0.6121 0.252 0.000 0.000 0.748 0.000 0.000
#> GSM217725 4 0.3163 0.6083 0.232 0.000 0.000 0.764 0.000 0.004
#> GSM217726 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 4 0.3163 0.6083 0.232 0.000 0.000 0.764 0.000 0.004
#> GSM217729 1 0.0865 0.7809 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM217730 1 0.0865 0.7809 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM217731 1 0.0547 0.7925 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM217732 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.8053 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.5040 0.7345 0.000 0.152 0.000 0.000 0.636 0.212
#> GSM217738 5 0.5040 0.7345 0.000 0.152 0.000 0.000 0.636 0.212
#> GSM217739 5 0.2378 0.9219 0.000 0.152 0.000 0.000 0.848 0.000
#> GSM217740 5 0.2378 0.9219 0.000 0.152 0.000 0.000 0.848 0.000
#> GSM217741 5 0.2416 0.9239 0.000 0.156 0.000 0.000 0.844 0.000
#> GSM217742 5 0.2416 0.9239 0.000 0.156 0.000 0.000 0.844 0.000
#> GSM217743 5 0.2416 0.9239 0.000 0.156 0.000 0.000 0.844 0.000
#> GSM217744 5 0.2416 0.9239 0.000 0.156 0.000 0.000 0.844 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:hclust 101 3.32e-01 2
#> MAD:hclust 99 8.62e-07 3
#> MAD:hclust 97 7.59e-06 4
#> MAD:hclust 83 1.23e-07 5
#> MAD:hclust 84 4.22e-12 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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.986 0.988 0.5049 0.495 0.495
#> 3 3 0.746 0.929 0.863 0.2447 0.873 0.744
#> 4 4 0.770 0.935 0.878 0.1393 0.882 0.679
#> 5 5 0.773 0.864 0.852 0.0661 1.000 1.000
#> 6 6 0.737 0.779 0.818 0.0430 0.943 0.773
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
#> GSM217644 2 0.0000 0.989 0.000 1.000
#> GSM217645 2 0.0000 0.989 0.000 1.000
#> GSM217646 2 0.0000 0.989 0.000 1.000
#> GSM217647 2 0.0000 0.989 0.000 1.000
#> GSM217648 2 0.0000 0.989 0.000 1.000
#> GSM217649 2 0.0000 0.989 0.000 1.000
#> GSM217650 2 0.0000 0.989 0.000 1.000
#> GSM217651 2 0.0000 0.989 0.000 1.000
#> GSM217652 2 0.0000 0.989 0.000 1.000
#> GSM217653 2 0.0000 0.989 0.000 1.000
#> GSM217654 2 0.0000 0.989 0.000 1.000
#> GSM217655 2 0.0000 0.989 0.000 1.000
#> GSM217656 2 0.0000 0.989 0.000 1.000
#> GSM217657 2 0.0000 0.989 0.000 1.000
#> GSM217658 2 0.0000 0.989 0.000 1.000
#> GSM217659 2 0.0000 0.989 0.000 1.000
#> GSM217660 2 0.0000 0.989 0.000 1.000
#> GSM217661 2 0.0000 0.989 0.000 1.000
#> GSM217662 2 0.0000 0.989 0.000 1.000
#> GSM217663 2 0.0000 0.989 0.000 1.000
#> GSM217664 2 0.0000 0.989 0.000 1.000
#> GSM217665 2 0.0000 0.989 0.000 1.000
#> GSM217666 2 0.0000 0.989 0.000 1.000
#> GSM217667 2 0.0000 0.989 0.000 1.000
#> GSM217668 1 0.1843 0.985 0.972 0.028
#> GSM217669 1 0.1843 0.985 0.972 0.028
#> GSM217670 1 0.1843 0.985 0.972 0.028
#> GSM217671 1 0.1843 0.985 0.972 0.028
#> GSM217672 1 0.1843 0.985 0.972 0.028
#> GSM217673 1 0.1843 0.985 0.972 0.028
#> GSM217674 1 0.0000 0.986 1.000 0.000
#> GSM217675 1 0.0000 0.986 1.000 0.000
#> GSM217676 1 0.0000 0.986 1.000 0.000
#> GSM217677 1 0.0000 0.986 1.000 0.000
#> GSM217678 1 0.0000 0.986 1.000 0.000
#> GSM217679 1 0.0000 0.986 1.000 0.000
#> GSM217680 1 0.0000 0.986 1.000 0.000
#> GSM217681 1 0.0000 0.986 1.000 0.000
#> GSM217682 1 0.0000 0.986 1.000 0.000
#> GSM217683 1 0.0000 0.986 1.000 0.000
#> GSM217684 1 0.1843 0.985 0.972 0.028
#> GSM217685 2 0.1843 0.982 0.028 0.972
#> GSM217686 2 0.1843 0.982 0.028 0.972
#> GSM217687 2 0.1843 0.982 0.028 0.972
#> GSM217688 2 0.1843 0.982 0.028 0.972
#> GSM217689 2 0.1843 0.982 0.028 0.972
#> GSM217690 2 0.1843 0.982 0.028 0.972
#> GSM217691 2 0.1843 0.982 0.028 0.972
#> GSM217692 2 0.1843 0.982 0.028 0.972
#> GSM217693 2 0.1843 0.982 0.028 0.972
#> GSM217694 2 0.1843 0.982 0.028 0.972
#> GSM217695 2 0.1843 0.982 0.028 0.972
#> GSM217696 2 0.1843 0.982 0.028 0.972
#> GSM217697 2 0.1843 0.982 0.028 0.972
#> GSM217698 2 0.1843 0.982 0.028 0.972
#> GSM217699 2 0.1843 0.982 0.028 0.972
#> GSM217700 2 0.1843 0.982 0.028 0.972
#> GSM217701 2 0.1843 0.982 0.028 0.972
#> GSM217702 2 0.1843 0.982 0.028 0.972
#> GSM217703 2 0.1843 0.982 0.028 0.972
#> GSM217704 2 0.1843 0.982 0.028 0.972
#> GSM217705 1 0.1843 0.985 0.972 0.028
#> GSM217706 1 0.1843 0.985 0.972 0.028
#> GSM217707 1 0.1843 0.985 0.972 0.028
#> GSM217708 1 0.0376 0.986 0.996 0.004
#> GSM217709 1 0.1843 0.985 0.972 0.028
#> GSM217710 1 0.1843 0.985 0.972 0.028
#> GSM217711 1 0.1843 0.985 0.972 0.028
#> GSM217712 1 0.1843 0.985 0.972 0.028
#> GSM217713 1 0.1843 0.985 0.972 0.028
#> GSM217714 1 0.1843 0.985 0.972 0.028
#> GSM217715 1 0.1843 0.985 0.972 0.028
#> GSM217716 1 0.1843 0.985 0.972 0.028
#> GSM217717 1 0.1843 0.985 0.972 0.028
#> GSM217718 1 0.1843 0.985 0.972 0.028
#> GSM217719 1 0.1843 0.985 0.972 0.028
#> GSM217720 1 0.1843 0.985 0.972 0.028
#> GSM217721 1 0.1843 0.985 0.972 0.028
#> GSM217722 1 0.1414 0.985 0.980 0.020
#> GSM217723 1 0.0000 0.986 1.000 0.000
#> GSM217724 1 0.0000 0.986 1.000 0.000
#> GSM217725 1 0.0000 0.986 1.000 0.000
#> GSM217726 1 0.0000 0.986 1.000 0.000
#> GSM217727 1 0.0000 0.986 1.000 0.000
#> GSM217728 1 0.0000 0.986 1.000 0.000
#> GSM217729 1 0.0000 0.986 1.000 0.000
#> GSM217730 1 0.0000 0.986 1.000 0.000
#> GSM217731 1 0.0000 0.986 1.000 0.000
#> GSM217732 1 0.0000 0.986 1.000 0.000
#> GSM217733 1 0.0000 0.986 1.000 0.000
#> GSM217734 1 0.0000 0.986 1.000 0.000
#> GSM217735 1 0.0000 0.986 1.000 0.000
#> GSM217736 1 0.0000 0.986 1.000 0.000
#> GSM217737 2 0.0000 0.989 0.000 1.000
#> GSM217738 2 0.0000 0.989 0.000 1.000
#> GSM217739 2 0.0000 0.989 0.000 1.000
#> GSM217740 2 0.0000 0.989 0.000 1.000
#> GSM217741 2 0.0000 0.989 0.000 1.000
#> GSM217742 2 0.0000 0.989 0.000 1.000
#> GSM217743 2 0.0000 0.989 0.000 1.000
#> GSM217744 2 0.0000 0.989 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217645 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217646 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217647 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217648 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217649 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217650 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217651 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217652 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217653 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217654 2 0.5706 0.994 0.000 0.680 0.320
#> GSM217655 2 0.5706 0.994 0.000 0.680 0.320
#> GSM217656 2 0.5706 0.994 0.000 0.680 0.320
#> GSM217657 2 0.5706 0.994 0.000 0.680 0.320
#> GSM217658 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217659 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217660 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217661 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217662 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217663 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217664 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217665 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217666 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217667 2 0.5733 0.998 0.000 0.676 0.324
#> GSM217668 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217669 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217674 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217675 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217676 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217677 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217678 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217679 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217680 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217681 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217682 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217683 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217684 1 0.4002 0.860 0.840 0.160 0.000
#> GSM217685 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217686 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217687 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217688 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217689 3 0.0237 0.995 0.000 0.004 0.996
#> GSM217690 3 0.0237 0.995 0.000 0.004 0.996
#> GSM217691 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217692 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217693 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217694 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217695 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217696 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217697 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217698 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217699 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217700 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217701 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217702 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217703 3 0.0237 0.995 0.000 0.004 0.996
#> GSM217704 3 0.0000 0.999 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217710 1 0.0237 0.863 0.996 0.004 0.000
#> GSM217711 1 0.0237 0.863 0.996 0.004 0.000
#> GSM217712 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.865 1.000 0.000 0.000
#> GSM217723 1 0.1411 0.865 0.964 0.036 0.000
#> GSM217724 1 0.4654 0.857 0.792 0.208 0.000
#> GSM217725 1 0.5621 0.850 0.692 0.308 0.000
#> GSM217726 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217727 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217728 1 0.5591 0.850 0.696 0.304 0.000
#> GSM217729 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217730 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217731 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217732 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217733 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217734 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217735 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217736 1 0.5678 0.849 0.684 0.316 0.000
#> GSM217737 2 0.5706 0.995 0.000 0.680 0.320
#> GSM217738 2 0.5706 0.995 0.000 0.680 0.320
#> GSM217739 2 0.5706 0.995 0.000 0.680 0.320
#> GSM217740 2 0.5706 0.995 0.000 0.680 0.320
#> GSM217741 2 0.5706 0.995 0.000 0.680 0.320
#> GSM217742 2 0.5706 0.995 0.000 0.680 0.320
#> GSM217743 2 0.5706 0.995 0.000 0.680 0.320
#> GSM217744 2 0.5706 0.995 0.000 0.680 0.320
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0188 0.954 0.004 0.996 0.000 0.000
#> GSM217645 2 0.0188 0.954 0.004 0.996 0.000 0.000
#> GSM217646 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0188 0.955 0.004 0.996 0.000 0.000
#> GSM217648 2 0.0188 0.955 0.004 0.996 0.000 0.000
#> GSM217649 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0188 0.955 0.004 0.996 0.000 0.000
#> GSM217654 2 0.0657 0.949 0.012 0.984 0.004 0.000
#> GSM217655 2 0.0524 0.951 0.008 0.988 0.004 0.000
#> GSM217656 2 0.1488 0.933 0.032 0.956 0.012 0.000
#> GSM217657 2 0.1256 0.938 0.028 0.964 0.008 0.000
#> GSM217658 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217660 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217661 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0188 0.955 0.004 0.996 0.000 0.000
#> GSM217663 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0000 0.955 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0188 0.955 0.004 0.996 0.000 0.000
#> GSM217666 2 0.0188 0.955 0.004 0.996 0.000 0.000
#> GSM217667 2 0.0188 0.955 0.004 0.996 0.000 0.000
#> GSM217668 4 0.0707 0.951 0.000 0.000 0.020 0.980
#> GSM217669 4 0.0921 0.950 0.000 0.000 0.028 0.972
#> GSM217670 4 0.0707 0.951 0.000 0.000 0.020 0.980
#> GSM217671 4 0.0817 0.950 0.000 0.000 0.024 0.976
#> GSM217672 4 0.0707 0.951 0.000 0.000 0.020 0.980
#> GSM217673 4 0.0707 0.951 0.000 0.000 0.020 0.980
#> GSM217674 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217675 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217676 1 0.4857 0.970 0.700 0.000 0.016 0.284
#> GSM217677 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217678 1 0.4963 0.964 0.696 0.000 0.020 0.284
#> GSM217679 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217680 1 0.5062 0.964 0.692 0.000 0.024 0.284
#> GSM217681 1 0.4483 0.970 0.712 0.000 0.004 0.284
#> GSM217682 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217683 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217684 4 0.5816 -0.279 0.392 0.000 0.036 0.572
#> GSM217685 3 0.4010 0.963 0.064 0.100 0.836 0.000
#> GSM217686 3 0.4010 0.963 0.064 0.100 0.836 0.000
#> GSM217687 3 0.4010 0.963 0.064 0.100 0.836 0.000
#> GSM217688 3 0.4010 0.963 0.064 0.100 0.836 0.000
#> GSM217689 3 0.4426 0.950 0.092 0.096 0.812 0.000
#> GSM217690 3 0.4426 0.950 0.092 0.096 0.812 0.000
#> GSM217691 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217692 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217693 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217694 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217695 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217696 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217697 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217698 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217699 3 0.2530 0.977 0.004 0.100 0.896 0.000
#> GSM217700 3 0.2345 0.977 0.000 0.100 0.900 0.000
#> GSM217701 3 0.2530 0.977 0.004 0.100 0.896 0.000
#> GSM217702 3 0.2530 0.977 0.004 0.100 0.896 0.000
#> GSM217703 3 0.4426 0.950 0.092 0.096 0.812 0.000
#> GSM217704 3 0.2675 0.977 0.008 0.100 0.892 0.000
#> GSM217705 4 0.0469 0.952 0.000 0.000 0.012 0.988
#> GSM217706 4 0.0000 0.953 0.000 0.000 0.000 1.000
#> GSM217707 4 0.0188 0.953 0.000 0.000 0.004 0.996
#> GSM217708 4 0.0921 0.942 0.000 0.000 0.028 0.972
#> GSM217709 4 0.1109 0.940 0.004 0.000 0.028 0.968
#> GSM217710 4 0.1356 0.934 0.008 0.000 0.032 0.960
#> GSM217711 4 0.1356 0.934 0.008 0.000 0.032 0.960
#> GSM217712 4 0.0000 0.953 0.000 0.000 0.000 1.000
#> GSM217713 4 0.0336 0.952 0.000 0.000 0.008 0.992
#> GSM217714 4 0.0707 0.951 0.000 0.000 0.020 0.980
#> GSM217715 4 0.0707 0.951 0.000 0.000 0.020 0.980
#> GSM217716 4 0.0188 0.953 0.000 0.000 0.004 0.996
#> GSM217717 4 0.0188 0.953 0.000 0.000 0.004 0.996
#> GSM217718 4 0.0592 0.950 0.000 0.000 0.016 0.984
#> GSM217719 4 0.0592 0.950 0.000 0.000 0.016 0.984
#> GSM217720 4 0.0921 0.950 0.000 0.000 0.028 0.972
#> GSM217721 4 0.0188 0.953 0.000 0.000 0.004 0.996
#> GSM217722 4 0.0469 0.951 0.000 0.000 0.012 0.988
#> GSM217723 4 0.3634 0.782 0.096 0.000 0.048 0.856
#> GSM217724 1 0.6108 0.703 0.528 0.000 0.048 0.424
#> GSM217725 1 0.5754 0.907 0.636 0.000 0.048 0.316
#> GSM217726 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217727 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217728 1 0.5773 0.902 0.632 0.000 0.048 0.320
#> GSM217729 1 0.4963 0.964 0.696 0.000 0.020 0.284
#> GSM217730 1 0.5062 0.964 0.692 0.000 0.024 0.284
#> GSM217731 1 0.5062 0.964 0.692 0.000 0.024 0.284
#> GSM217732 1 0.4621 0.970 0.708 0.000 0.008 0.284
#> GSM217733 1 0.4483 0.970 0.712 0.000 0.004 0.284
#> GSM217734 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217735 1 0.4621 0.970 0.708 0.000 0.008 0.284
#> GSM217736 1 0.4621 0.971 0.708 0.000 0.008 0.284
#> GSM217737 2 0.3539 0.870 0.176 0.820 0.004 0.000
#> GSM217738 2 0.3539 0.870 0.176 0.820 0.004 0.000
#> GSM217739 2 0.3494 0.871 0.172 0.824 0.004 0.000
#> GSM217740 2 0.3494 0.871 0.172 0.824 0.004 0.000
#> GSM217741 2 0.3494 0.871 0.172 0.824 0.004 0.000
#> GSM217742 2 0.3494 0.871 0.172 0.824 0.004 0.000
#> GSM217743 2 0.3494 0.871 0.172 0.824 0.004 0.000
#> GSM217744 2 0.3494 0.871 0.172 0.824 0.004 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0693 0.879 0.012 0.980 0.000 0.000 NA
#> GSM217645 2 0.0451 0.881 0.004 0.988 0.000 0.000 NA
#> GSM217646 2 0.0510 0.882 0.016 0.984 0.000 0.000 NA
#> GSM217647 2 0.0898 0.880 0.008 0.972 0.000 0.000 NA
#> GSM217648 2 0.0693 0.883 0.012 0.980 0.000 0.000 NA
#> GSM217649 2 0.0510 0.882 0.016 0.984 0.000 0.000 NA
#> GSM217650 2 0.0000 0.882 0.000 1.000 0.000 0.000 NA
#> GSM217651 2 0.0290 0.882 0.008 0.992 0.000 0.000 NA
#> GSM217652 2 0.0000 0.882 0.000 1.000 0.000 0.000 NA
#> GSM217653 2 0.0771 0.881 0.004 0.976 0.000 0.000 NA
#> GSM217654 2 0.2158 0.861 0.052 0.920 0.008 0.000 NA
#> GSM217655 2 0.2060 0.863 0.052 0.924 0.008 0.000 NA
#> GSM217656 2 0.5493 0.697 0.072 0.708 0.008 0.028 NA
#> GSM217657 2 0.4139 0.780 0.068 0.796 0.008 0.000 NA
#> GSM217658 2 0.0162 0.882 0.004 0.996 0.000 0.000 NA
#> GSM217659 2 0.0510 0.882 0.016 0.984 0.000 0.000 NA
#> GSM217660 2 0.0451 0.882 0.008 0.988 0.004 0.000 NA
#> GSM217661 2 0.0404 0.881 0.012 0.988 0.000 0.000 NA
#> GSM217662 2 0.0771 0.881 0.004 0.976 0.000 0.000 NA
#> GSM217663 2 0.0162 0.882 0.004 0.996 0.000 0.000 NA
#> GSM217664 2 0.0290 0.882 0.008 0.992 0.000 0.000 NA
#> GSM217665 2 0.0898 0.880 0.008 0.972 0.000 0.000 NA
#> GSM217666 2 0.0898 0.880 0.008 0.972 0.000 0.000 NA
#> GSM217667 2 0.0898 0.880 0.008 0.972 0.000 0.000 NA
#> GSM217668 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217669 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217670 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217671 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217672 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217673 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217674 1 0.4125 0.922 0.772 0.000 0.000 0.172 NA
#> GSM217675 1 0.4059 0.923 0.776 0.000 0.000 0.172 NA
#> GSM217676 1 0.4252 0.925 0.764 0.000 0.000 0.172 NA
#> GSM217677 1 0.3848 0.926 0.788 0.000 0.000 0.172 NA
#> GSM217678 1 0.4059 0.916 0.776 0.000 0.000 0.172 NA
#> GSM217679 1 0.4059 0.923 0.776 0.000 0.000 0.172 NA
#> GSM217680 1 0.4125 0.915 0.772 0.000 0.000 0.172 NA
#> GSM217681 1 0.3132 0.927 0.820 0.000 0.000 0.172 NA
#> GSM217682 1 0.4125 0.922 0.772 0.000 0.000 0.172 NA
#> GSM217683 1 0.4125 0.922 0.772 0.000 0.000 0.172 NA
#> GSM217684 4 0.5906 0.321 0.268 0.000 0.008 0.604 NA
#> GSM217685 3 0.3857 0.919 0.052 0.028 0.832 0.000 NA
#> GSM217686 3 0.3869 0.919 0.056 0.028 0.832 0.000 NA
#> GSM217687 3 0.3857 0.919 0.052 0.028 0.832 0.000 NA
#> GSM217688 3 0.3857 0.919 0.052 0.028 0.832 0.000 NA
#> GSM217689 3 0.4193 0.902 0.064 0.020 0.804 0.000 NA
#> GSM217690 3 0.4193 0.902 0.064 0.020 0.804 0.000 NA
#> GSM217691 3 0.2450 0.938 0.032 0.028 0.912 0.000 NA
#> GSM217692 3 0.2450 0.938 0.032 0.028 0.912 0.000 NA
#> GSM217693 3 0.2532 0.938 0.036 0.028 0.908 0.000 NA
#> GSM217694 3 0.2450 0.938 0.032 0.028 0.912 0.000 NA
#> GSM217695 3 0.2277 0.938 0.024 0.028 0.920 0.000 NA
#> GSM217696 3 0.2277 0.938 0.024 0.028 0.920 0.000 NA
#> GSM217697 3 0.2277 0.938 0.024 0.028 0.920 0.000 NA
#> GSM217698 3 0.2277 0.938 0.024 0.028 0.920 0.000 NA
#> GSM217699 3 0.1893 0.938 0.012 0.028 0.936 0.000 NA
#> GSM217700 3 0.1082 0.940 0.008 0.028 0.964 0.000 NA
#> GSM217701 3 0.1997 0.938 0.016 0.028 0.932 0.000 NA
#> GSM217702 3 0.1997 0.938 0.016 0.028 0.932 0.000 NA
#> GSM217703 3 0.4193 0.902 0.064 0.020 0.804 0.000 NA
#> GSM217704 3 0.2184 0.938 0.020 0.028 0.924 0.000 NA
#> GSM217705 4 0.2233 0.894 0.000 0.000 0.016 0.904 NA
#> GSM217706 4 0.0162 0.898 0.000 0.000 0.000 0.996 NA
#> GSM217707 4 0.0404 0.897 0.000 0.000 0.000 0.988 NA
#> GSM217708 4 0.3422 0.786 0.004 0.000 0.004 0.792 NA
#> GSM217709 4 0.3489 0.781 0.004 0.000 0.004 0.784 NA
#> GSM217710 4 0.3522 0.779 0.004 0.000 0.004 0.780 NA
#> GSM217711 4 0.3522 0.779 0.004 0.000 0.004 0.780 NA
#> GSM217712 4 0.1026 0.894 0.004 0.000 0.004 0.968 NA
#> GSM217713 4 0.0404 0.897 0.000 0.000 0.000 0.988 NA
#> GSM217714 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217715 4 0.1671 0.892 0.000 0.000 0.000 0.924 NA
#> GSM217716 4 0.0609 0.898 0.000 0.000 0.000 0.980 NA
#> GSM217717 4 0.0000 0.898 0.000 0.000 0.000 1.000 NA
#> GSM217718 4 0.1202 0.892 0.004 0.000 0.004 0.960 NA
#> GSM217719 4 0.1041 0.893 0.000 0.000 0.004 0.964 NA
#> GSM217720 4 0.2408 0.891 0.000 0.000 0.016 0.892 NA
#> GSM217721 4 0.0566 0.897 0.000 0.000 0.004 0.984 NA
#> GSM217722 4 0.1041 0.893 0.000 0.000 0.004 0.964 NA
#> GSM217723 4 0.5325 0.584 0.088 0.000 0.000 0.636 NA
#> GSM217724 1 0.6507 0.576 0.488 0.000 0.000 0.268 NA
#> GSM217725 1 0.6144 0.699 0.548 0.000 0.000 0.172 NA
#> GSM217726 1 0.3991 0.925 0.780 0.000 0.000 0.172 NA
#> GSM217727 1 0.3991 0.925 0.780 0.000 0.000 0.172 NA
#> GSM217728 1 0.6148 0.706 0.552 0.000 0.000 0.180 NA
#> GSM217729 1 0.4059 0.916 0.776 0.000 0.000 0.172 NA
#> GSM217730 1 0.4125 0.915 0.772 0.000 0.000 0.172 NA
#> GSM217731 1 0.4125 0.915 0.772 0.000 0.000 0.172 NA
#> GSM217732 1 0.3806 0.926 0.796 0.000 0.008 0.172 NA
#> GSM217733 1 0.3438 0.925 0.808 0.000 0.000 0.172 NA
#> GSM217734 1 0.3438 0.927 0.808 0.000 0.000 0.172 NA
#> GSM217735 1 0.3806 0.926 0.796 0.000 0.008 0.172 NA
#> GSM217736 1 0.3527 0.928 0.804 0.000 0.000 0.172 NA
#> GSM217737 2 0.4489 0.683 0.000 0.572 0.008 0.000 NA
#> GSM217738 2 0.4489 0.683 0.000 0.572 0.008 0.000 NA
#> GSM217739 2 0.4489 0.683 0.000 0.572 0.008 0.000 NA
#> GSM217740 2 0.4489 0.683 0.000 0.572 0.008 0.000 NA
#> GSM217741 2 0.4227 0.686 0.000 0.580 0.000 0.000 NA
#> GSM217742 2 0.4227 0.686 0.000 0.580 0.000 0.000 NA
#> GSM217743 2 0.4227 0.686 0.000 0.580 0.000 0.000 NA
#> GSM217744 2 0.4227 0.686 0.000 0.580 0.000 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.1536 0.8968 0.000 0.940 0.000 0.016 0.004 0.040
#> GSM217645 2 0.0935 0.9074 0.000 0.964 0.000 0.000 0.004 0.032
#> GSM217646 2 0.1313 0.9040 0.000 0.952 0.000 0.016 0.004 0.028
#> GSM217647 2 0.0767 0.9066 0.000 0.976 0.000 0.008 0.012 0.004
#> GSM217648 2 0.1262 0.9100 0.000 0.956 0.000 0.016 0.008 0.020
#> GSM217649 2 0.1313 0.9040 0.000 0.952 0.000 0.016 0.004 0.028
#> GSM217650 2 0.0000 0.9128 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217651 2 0.0717 0.9113 0.000 0.976 0.000 0.008 0.000 0.016
#> GSM217652 2 0.0000 0.9128 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.0767 0.9066 0.000 0.976 0.000 0.008 0.012 0.004
#> GSM217654 2 0.4028 0.6584 0.000 0.752 0.000 0.044 0.012 0.192
#> GSM217655 2 0.3672 0.7043 0.000 0.780 0.000 0.036 0.008 0.176
#> GSM217656 6 0.5274 -0.3155 0.000 0.428 0.000 0.048 0.024 0.500
#> GSM217657 2 0.5196 0.2937 0.000 0.552 0.000 0.048 0.024 0.376
#> GSM217658 2 0.0000 0.9128 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.1313 0.9040 0.000 0.952 0.000 0.016 0.004 0.028
#> GSM217660 2 0.1275 0.9080 0.000 0.956 0.000 0.016 0.012 0.016
#> GSM217661 2 0.1313 0.9040 0.000 0.952 0.000 0.016 0.004 0.028
#> GSM217662 2 0.0862 0.9047 0.000 0.972 0.000 0.008 0.016 0.004
#> GSM217663 2 0.0551 0.9095 0.000 0.984 0.000 0.008 0.004 0.004
#> GSM217664 2 0.0405 0.9105 0.000 0.988 0.000 0.008 0.000 0.004
#> GSM217665 2 0.0767 0.9066 0.000 0.976 0.000 0.008 0.012 0.004
#> GSM217666 2 0.0767 0.9066 0.000 0.976 0.000 0.008 0.012 0.004
#> GSM217667 2 0.0767 0.9066 0.000 0.976 0.000 0.008 0.012 0.004
#> GSM217668 4 0.2466 0.7446 0.112 0.000 0.000 0.872 0.008 0.008
#> GSM217669 4 0.2547 0.7492 0.112 0.000 0.000 0.868 0.004 0.016
#> GSM217670 4 0.2312 0.7525 0.112 0.000 0.000 0.876 0.012 0.000
#> GSM217671 4 0.2100 0.7516 0.112 0.000 0.000 0.884 0.004 0.000
#> GSM217672 4 0.2100 0.7516 0.112 0.000 0.000 0.884 0.004 0.000
#> GSM217673 4 0.2100 0.7516 0.112 0.000 0.000 0.884 0.004 0.000
#> GSM217674 1 0.1390 0.8751 0.948 0.000 0.004 0.000 0.032 0.016
#> GSM217675 1 0.1341 0.8745 0.948 0.000 0.000 0.000 0.028 0.024
#> GSM217676 1 0.1498 0.8796 0.940 0.000 0.000 0.000 0.028 0.032
#> GSM217677 1 0.0951 0.8802 0.968 0.000 0.004 0.000 0.020 0.008
#> GSM217678 1 0.2389 0.8597 0.888 0.000 0.000 0.000 0.060 0.052
#> GSM217679 1 0.0820 0.8793 0.972 0.000 0.000 0.000 0.012 0.016
#> GSM217680 1 0.3063 0.8519 0.840 0.000 0.000 0.000 0.092 0.068
#> GSM217681 1 0.2058 0.8740 0.908 0.000 0.000 0.000 0.056 0.036
#> GSM217682 1 0.1390 0.8751 0.948 0.000 0.004 0.000 0.032 0.016
#> GSM217683 1 0.1390 0.8751 0.948 0.000 0.004 0.000 0.032 0.016
#> GSM217684 4 0.5357 0.2533 0.332 0.000 0.004 0.584 0.040 0.040
#> GSM217685 3 0.4675 0.8447 0.000 0.012 0.692 0.004 0.060 0.232
#> GSM217686 3 0.4675 0.8447 0.000 0.012 0.692 0.004 0.060 0.232
#> GSM217687 3 0.4675 0.8447 0.000 0.012 0.692 0.004 0.060 0.232
#> GSM217688 3 0.4675 0.8447 0.000 0.012 0.692 0.004 0.060 0.232
#> GSM217689 3 0.5166 0.8280 0.000 0.012 0.660 0.020 0.064 0.244
#> GSM217690 3 0.5166 0.8280 0.000 0.012 0.660 0.020 0.064 0.244
#> GSM217691 3 0.0767 0.8885 0.000 0.012 0.976 0.008 0.004 0.000
#> GSM217692 3 0.0767 0.8885 0.000 0.012 0.976 0.008 0.004 0.000
#> GSM217693 3 0.0767 0.8885 0.000 0.012 0.976 0.008 0.004 0.000
#> GSM217694 3 0.0767 0.8885 0.000 0.012 0.976 0.008 0.004 0.000
#> GSM217695 3 0.0363 0.8888 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM217696 3 0.0363 0.8888 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM217697 3 0.0363 0.8888 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM217698 3 0.0622 0.8888 0.000 0.012 0.980 0.000 0.008 0.000
#> GSM217699 3 0.3156 0.8860 0.000 0.012 0.852 0.004 0.048 0.084
#> GSM217700 3 0.2557 0.8886 0.000 0.012 0.892 0.004 0.036 0.056
#> GSM217701 3 0.3103 0.8864 0.000 0.012 0.856 0.004 0.048 0.080
#> GSM217702 3 0.3103 0.8864 0.000 0.012 0.856 0.004 0.048 0.080
#> GSM217703 3 0.5166 0.8280 0.000 0.012 0.660 0.020 0.064 0.244
#> GSM217704 3 0.0363 0.8888 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM217705 4 0.3833 0.7420 0.112 0.000 0.000 0.804 0.040 0.044
#> GSM217706 4 0.4890 0.7422 0.112 0.000 0.000 0.712 0.032 0.144
#> GSM217707 4 0.5230 0.7376 0.112 0.000 0.004 0.692 0.040 0.152
#> GSM217708 4 0.5487 -0.0325 0.108 0.000 0.000 0.456 0.004 0.432
#> GSM217709 4 0.5573 -0.1133 0.088 0.000 0.000 0.468 0.016 0.428
#> GSM217710 6 0.5075 0.0210 0.076 0.000 0.000 0.456 0.000 0.468
#> GSM217711 6 0.5075 0.0210 0.076 0.000 0.000 0.456 0.000 0.468
#> GSM217712 4 0.5274 0.7128 0.108 0.000 0.000 0.672 0.040 0.180
#> GSM217713 4 0.5319 0.7323 0.112 0.000 0.004 0.688 0.048 0.148
#> GSM217714 4 0.2404 0.7537 0.112 0.000 0.000 0.872 0.016 0.000
#> GSM217715 4 0.2100 0.7516 0.112 0.000 0.000 0.884 0.004 0.000
#> GSM217716 4 0.4711 0.7508 0.112 0.000 0.000 0.740 0.048 0.100
#> GSM217717 4 0.5249 0.7372 0.112 0.000 0.004 0.696 0.048 0.140
#> GSM217718 4 0.5530 0.7091 0.108 0.000 0.004 0.664 0.052 0.172
#> GSM217719 4 0.5570 0.7139 0.112 0.000 0.004 0.660 0.052 0.172
#> GSM217720 4 0.3263 0.7345 0.112 0.000 0.000 0.836 0.024 0.028
#> GSM217721 4 0.5314 0.7247 0.112 0.000 0.000 0.676 0.048 0.164
#> GSM217722 4 0.5387 0.7160 0.112 0.000 0.004 0.668 0.036 0.180
#> GSM217723 6 0.6999 0.1365 0.176 0.000 0.004 0.288 0.084 0.448
#> GSM217724 1 0.6246 0.4249 0.540 0.000 0.004 0.076 0.084 0.296
#> GSM217725 1 0.5440 0.4906 0.560 0.000 0.004 0.012 0.084 0.340
#> GSM217726 1 0.1092 0.8780 0.960 0.000 0.000 0.000 0.020 0.020
#> GSM217727 1 0.1176 0.8787 0.956 0.000 0.000 0.000 0.024 0.020
#> GSM217728 1 0.5405 0.5095 0.572 0.000 0.004 0.012 0.084 0.328
#> GSM217729 1 0.2680 0.8561 0.868 0.000 0.000 0.000 0.076 0.056
#> GSM217730 1 0.3118 0.8498 0.836 0.000 0.000 0.000 0.092 0.072
#> GSM217731 1 0.3017 0.8538 0.844 0.000 0.000 0.000 0.084 0.072
#> GSM217732 1 0.2288 0.8712 0.896 0.000 0.004 0.000 0.072 0.028
#> GSM217733 1 0.2448 0.8698 0.884 0.000 0.000 0.000 0.064 0.052
#> GSM217734 1 0.1970 0.8738 0.912 0.000 0.000 0.000 0.060 0.028
#> GSM217735 1 0.2288 0.8712 0.896 0.000 0.004 0.000 0.072 0.028
#> GSM217736 1 0.0692 0.8824 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM217737 5 0.4062 0.9879 0.000 0.344 0.000 0.012 0.640 0.004
#> GSM217738 5 0.4062 0.9879 0.000 0.344 0.000 0.012 0.640 0.004
#> GSM217739 5 0.4076 0.9900 0.000 0.348 0.000 0.012 0.636 0.004
#> GSM217740 5 0.4076 0.9900 0.000 0.348 0.000 0.012 0.636 0.004
#> GSM217741 5 0.3607 0.9909 0.000 0.348 0.000 0.000 0.652 0.000
#> GSM217742 5 0.3607 0.9909 0.000 0.348 0.000 0.000 0.652 0.000
#> GSM217743 5 0.3607 0.9909 0.000 0.348 0.000 0.000 0.652 0.000
#> GSM217744 5 0.3607 0.9909 0.000 0.348 0.000 0.000 0.652 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:kmeans 101 3.32e-01 2
#> MAD:kmeans 101 2.94e-07 3
#> MAD:kmeans 100 4.21e-07 4
#> MAD:kmeans 100 4.21e-07 5
#> MAD:kmeans 91 1.26e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.5051 0.495 0.495
#> 3 3 1.000 1.000 1.000 0.2507 0.873 0.744
#> 4 4 1.000 0.986 0.986 0.1848 0.881 0.678
#> 5 5 0.934 0.931 0.947 0.0606 0.943 0.776
#> 6 6 0.923 0.833 0.889 0.0303 0.983 0.918
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 4 5
There is also optional best \(k\) = 2 3 4 5 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
#> GSM217644 2 0 1 0 1
#> GSM217645 2 0 1 0 1
#> GSM217646 2 0 1 0 1
#> GSM217647 2 0 1 0 1
#> GSM217648 2 0 1 0 1
#> GSM217649 2 0 1 0 1
#> GSM217650 2 0 1 0 1
#> GSM217651 2 0 1 0 1
#> GSM217652 2 0 1 0 1
#> GSM217653 2 0 1 0 1
#> GSM217654 2 0 1 0 1
#> GSM217655 2 0 1 0 1
#> GSM217656 2 0 1 0 1
#> GSM217657 2 0 1 0 1
#> GSM217658 2 0 1 0 1
#> GSM217659 2 0 1 0 1
#> GSM217660 2 0 1 0 1
#> GSM217661 2 0 1 0 1
#> GSM217662 2 0 1 0 1
#> GSM217663 2 0 1 0 1
#> GSM217664 2 0 1 0 1
#> GSM217665 2 0 1 0 1
#> GSM217666 2 0 1 0 1
#> GSM217667 2 0 1 0 1
#> GSM217668 1 0 1 1 0
#> GSM217669 1 0 1 1 0
#> GSM217670 1 0 1 1 0
#> GSM217671 1 0 1 1 0
#> GSM217672 1 0 1 1 0
#> GSM217673 1 0 1 1 0
#> GSM217674 1 0 1 1 0
#> GSM217675 1 0 1 1 0
#> GSM217676 1 0 1 1 0
#> GSM217677 1 0 1 1 0
#> GSM217678 1 0 1 1 0
#> GSM217679 1 0 1 1 0
#> GSM217680 1 0 1 1 0
#> GSM217681 1 0 1 1 0
#> GSM217682 1 0 1 1 0
#> GSM217683 1 0 1 1 0
#> GSM217684 1 0 1 1 0
#> GSM217685 2 0 1 0 1
#> GSM217686 2 0 1 0 1
#> GSM217687 2 0 1 0 1
#> GSM217688 2 0 1 0 1
#> GSM217689 2 0 1 0 1
#> GSM217690 2 0 1 0 1
#> GSM217691 2 0 1 0 1
#> GSM217692 2 0 1 0 1
#> GSM217693 2 0 1 0 1
#> GSM217694 2 0 1 0 1
#> GSM217695 2 0 1 0 1
#> GSM217696 2 0 1 0 1
#> GSM217697 2 0 1 0 1
#> GSM217698 2 0 1 0 1
#> GSM217699 2 0 1 0 1
#> GSM217700 2 0 1 0 1
#> GSM217701 2 0 1 0 1
#> GSM217702 2 0 1 0 1
#> GSM217703 2 0 1 0 1
#> GSM217704 2 0 1 0 1
#> GSM217705 1 0 1 1 0
#> GSM217706 1 0 1 1 0
#> GSM217707 1 0 1 1 0
#> GSM217708 1 0 1 1 0
#> GSM217709 1 0 1 1 0
#> GSM217710 1 0 1 1 0
#> GSM217711 1 0 1 1 0
#> GSM217712 1 0 1 1 0
#> GSM217713 1 0 1 1 0
#> GSM217714 1 0 1 1 0
#> GSM217715 1 0 1 1 0
#> GSM217716 1 0 1 1 0
#> GSM217717 1 0 1 1 0
#> GSM217718 1 0 1 1 0
#> GSM217719 1 0 1 1 0
#> GSM217720 1 0 1 1 0
#> GSM217721 1 0 1 1 0
#> GSM217722 1 0 1 1 0
#> GSM217723 1 0 1 1 0
#> GSM217724 1 0 1 1 0
#> GSM217725 1 0 1 1 0
#> GSM217726 1 0 1 1 0
#> GSM217727 1 0 1 1 0
#> GSM217728 1 0 1 1 0
#> GSM217729 1 0 1 1 0
#> GSM217730 1 0 1 1 0
#> GSM217731 1 0 1 1 0
#> GSM217732 1 0 1 1 0
#> GSM217733 1 0 1 1 0
#> GSM217734 1 0 1 1 0
#> GSM217735 1 0 1 1 0
#> GSM217736 1 0 1 1 0
#> GSM217737 2 0 1 0 1
#> GSM217738 2 0 1 0 1
#> GSM217739 2 0 1 0 1
#> GSM217740 2 0 1 0 1
#> GSM217741 2 0 1 0 1
#> GSM217742 2 0 1 0 1
#> GSM217743 2 0 1 0 1
#> GSM217744 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0 1 0 1 0
#> GSM217645 2 0 1 0 1 0
#> GSM217646 2 0 1 0 1 0
#> GSM217647 2 0 1 0 1 0
#> GSM217648 2 0 1 0 1 0
#> GSM217649 2 0 1 0 1 0
#> GSM217650 2 0 1 0 1 0
#> GSM217651 2 0 1 0 1 0
#> GSM217652 2 0 1 0 1 0
#> GSM217653 2 0 1 0 1 0
#> GSM217654 2 0 1 0 1 0
#> GSM217655 2 0 1 0 1 0
#> GSM217656 2 0 1 0 1 0
#> GSM217657 2 0 1 0 1 0
#> GSM217658 2 0 1 0 1 0
#> GSM217659 2 0 1 0 1 0
#> GSM217660 2 0 1 0 1 0
#> GSM217661 2 0 1 0 1 0
#> GSM217662 2 0 1 0 1 0
#> GSM217663 2 0 1 0 1 0
#> GSM217664 2 0 1 0 1 0
#> GSM217665 2 0 1 0 1 0
#> GSM217666 2 0 1 0 1 0
#> GSM217667 2 0 1 0 1 0
#> GSM217668 1 0 1 1 0 0
#> GSM217669 1 0 1 1 0 0
#> GSM217670 1 0 1 1 0 0
#> GSM217671 1 0 1 1 0 0
#> GSM217672 1 0 1 1 0 0
#> GSM217673 1 0 1 1 0 0
#> GSM217674 1 0 1 1 0 0
#> GSM217675 1 0 1 1 0 0
#> GSM217676 1 0 1 1 0 0
#> GSM217677 1 0 1 1 0 0
#> GSM217678 1 0 1 1 0 0
#> GSM217679 1 0 1 1 0 0
#> GSM217680 1 0 1 1 0 0
#> GSM217681 1 0 1 1 0 0
#> GSM217682 1 0 1 1 0 0
#> GSM217683 1 0 1 1 0 0
#> GSM217684 1 0 1 1 0 0
#> GSM217685 3 0 1 0 0 1
#> GSM217686 3 0 1 0 0 1
#> GSM217687 3 0 1 0 0 1
#> GSM217688 3 0 1 0 0 1
#> GSM217689 3 0 1 0 0 1
#> GSM217690 3 0 1 0 0 1
#> GSM217691 3 0 1 0 0 1
#> GSM217692 3 0 1 0 0 1
#> GSM217693 3 0 1 0 0 1
#> GSM217694 3 0 1 0 0 1
#> GSM217695 3 0 1 0 0 1
#> GSM217696 3 0 1 0 0 1
#> GSM217697 3 0 1 0 0 1
#> GSM217698 3 0 1 0 0 1
#> GSM217699 3 0 1 0 0 1
#> GSM217700 3 0 1 0 0 1
#> GSM217701 3 0 1 0 0 1
#> GSM217702 3 0 1 0 0 1
#> GSM217703 3 0 1 0 0 1
#> GSM217704 3 0 1 0 0 1
#> GSM217705 1 0 1 1 0 0
#> GSM217706 1 0 1 1 0 0
#> GSM217707 1 0 1 1 0 0
#> GSM217708 1 0 1 1 0 0
#> GSM217709 1 0 1 1 0 0
#> GSM217710 1 0 1 1 0 0
#> GSM217711 1 0 1 1 0 0
#> GSM217712 1 0 1 1 0 0
#> GSM217713 1 0 1 1 0 0
#> GSM217714 1 0 1 1 0 0
#> GSM217715 1 0 1 1 0 0
#> GSM217716 1 0 1 1 0 0
#> GSM217717 1 0 1 1 0 0
#> GSM217718 1 0 1 1 0 0
#> GSM217719 1 0 1 1 0 0
#> GSM217720 1 0 1 1 0 0
#> GSM217721 1 0 1 1 0 0
#> GSM217722 1 0 1 1 0 0
#> GSM217723 1 0 1 1 0 0
#> GSM217724 1 0 1 1 0 0
#> GSM217725 1 0 1 1 0 0
#> GSM217726 1 0 1 1 0 0
#> GSM217727 1 0 1 1 0 0
#> GSM217728 1 0 1 1 0 0
#> GSM217729 1 0 1 1 0 0
#> GSM217730 1 0 1 1 0 0
#> GSM217731 1 0 1 1 0 0
#> GSM217732 1 0 1 1 0 0
#> GSM217733 1 0 1 1 0 0
#> GSM217734 1 0 1 1 0 0
#> GSM217735 1 0 1 1 0 0
#> GSM217736 1 0 1 1 0 0
#> GSM217737 2 0 1 0 1 0
#> GSM217738 2 0 1 0 1 0
#> GSM217739 2 0 1 0 1 0
#> GSM217740 2 0 1 0 1 0
#> GSM217741 2 0 1 0 1 0
#> GSM217742 2 0 1 0 1 0
#> GSM217743 2 0 1 0 1 0
#> GSM217744 2 0 1 0 1 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217645 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217646 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217647 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217648 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217649 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217650 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217651 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217652 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217653 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217654 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217655 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217656 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217657 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217658 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217659 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217660 2 0.0707 0.988 0.000 0.980 0 0.020
#> GSM217661 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217662 2 0.0188 0.991 0.000 0.996 0 0.004
#> GSM217663 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217664 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217665 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217666 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217667 2 0.0000 0.992 0.000 1.000 0 0.000
#> GSM217668 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217669 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217670 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217671 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217672 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217673 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217674 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217675 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217676 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217677 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217678 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217679 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217680 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217681 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217682 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217683 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217684 1 0.4817 0.338 0.612 0.000 0 0.388
#> GSM217685 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1 0.000
#> GSM217705 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217706 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217707 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217708 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217709 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217710 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217711 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217712 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217713 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217714 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217715 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217716 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217717 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217718 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217719 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217720 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217721 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217722 4 0.0921 1.000 0.028 0.000 0 0.972
#> GSM217723 1 0.0336 0.976 0.992 0.000 0 0.008
#> GSM217724 1 0.0336 0.976 0.992 0.000 0 0.008
#> GSM217725 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217726 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217727 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217728 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217729 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217730 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217731 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217732 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217733 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217734 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217735 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217736 1 0.0000 0.982 1.000 0.000 0 0.000
#> GSM217737 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217738 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217739 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217740 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217741 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217742 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217743 2 0.0921 0.986 0.000 0.972 0 0.028
#> GSM217744 2 0.0921 0.986 0.000 0.972 0 0.028
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0290 0.9561 0.000 0.992 0.000 0.000 0.008
#> GSM217645 2 0.0162 0.9601 0.000 0.996 0.000 0.000 0.004
#> GSM217646 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217648 2 0.0290 0.9564 0.000 0.992 0.000 0.000 0.008
#> GSM217649 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217651 2 0.1043 0.9213 0.000 0.960 0.000 0.000 0.040
#> GSM217652 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217653 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217654 5 0.2966 0.8780 0.000 0.184 0.000 0.000 0.816
#> GSM217655 2 0.4210 -0.0431 0.000 0.588 0.000 0.000 0.412
#> GSM217656 5 0.1571 0.7691 0.000 0.060 0.004 0.000 0.936
#> GSM217657 5 0.2020 0.8095 0.000 0.100 0.000 0.000 0.900
#> GSM217658 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217660 5 0.4182 0.7131 0.000 0.400 0.000 0.000 0.600
#> GSM217661 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217662 2 0.1410 0.8934 0.000 0.940 0.000 0.000 0.060
#> GSM217663 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217667 2 0.0000 0.9635 0.000 1.000 0.000 0.000 0.000
#> GSM217668 4 0.0794 0.9406 0.000 0.000 0.000 0.972 0.028
#> GSM217669 4 0.1043 0.9397 0.000 0.000 0.000 0.960 0.040
#> GSM217670 4 0.0794 0.9406 0.000 0.000 0.000 0.972 0.028
#> GSM217671 4 0.0794 0.9406 0.000 0.000 0.000 0.972 0.028
#> GSM217672 4 0.0794 0.9406 0.000 0.000 0.000 0.972 0.028
#> GSM217673 4 0.0794 0.9406 0.000 0.000 0.000 0.972 0.028
#> GSM217674 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217675 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217676 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217677 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217678 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217680 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217683 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217684 4 0.4971 0.0985 0.460 0.000 0.000 0.512 0.028
#> GSM217685 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217690 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217691 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217692 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217693 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217694 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217695 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217696 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217697 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217698 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217699 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0000 0.9984 0.000 0.000 1.000 0.000 0.000
#> GSM217704 3 0.0162 0.9981 0.000 0.000 0.996 0.000 0.004
#> GSM217705 4 0.0510 0.9418 0.000 0.000 0.000 0.984 0.016
#> GSM217706 4 0.0162 0.9421 0.000 0.000 0.000 0.996 0.004
#> GSM217707 4 0.0290 0.9417 0.000 0.000 0.000 0.992 0.008
#> GSM217708 4 0.2561 0.8675 0.000 0.000 0.000 0.856 0.144
#> GSM217709 4 0.2605 0.8648 0.000 0.000 0.000 0.852 0.148
#> GSM217710 4 0.2732 0.8562 0.000 0.000 0.000 0.840 0.160
#> GSM217711 4 0.2732 0.8562 0.000 0.000 0.000 0.840 0.160
#> GSM217712 4 0.0510 0.9407 0.000 0.000 0.000 0.984 0.016
#> GSM217713 4 0.0609 0.9405 0.000 0.000 0.000 0.980 0.020
#> GSM217714 4 0.0794 0.9406 0.000 0.000 0.000 0.972 0.028
#> GSM217715 4 0.0794 0.9406 0.000 0.000 0.000 0.972 0.028
#> GSM217716 4 0.0794 0.9422 0.000 0.000 0.000 0.972 0.028
#> GSM217717 4 0.0609 0.9405 0.000 0.000 0.000 0.980 0.020
#> GSM217718 4 0.0703 0.9379 0.000 0.000 0.000 0.976 0.024
#> GSM217719 4 0.0510 0.9398 0.000 0.000 0.000 0.984 0.016
#> GSM217720 4 0.0703 0.9409 0.000 0.000 0.000 0.976 0.024
#> GSM217721 4 0.0703 0.9379 0.000 0.000 0.000 0.976 0.024
#> GSM217722 4 0.0510 0.9403 0.000 0.000 0.000 0.984 0.016
#> GSM217723 1 0.2873 0.8731 0.856 0.000 0.000 0.016 0.128
#> GSM217724 1 0.1408 0.9508 0.948 0.000 0.000 0.008 0.044
#> GSM217725 1 0.2127 0.9065 0.892 0.000 0.000 0.000 0.108
#> GSM217726 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217727 1 0.0162 0.9834 0.996 0.000 0.000 0.000 0.004
#> GSM217728 1 0.1792 0.9266 0.916 0.000 0.000 0.000 0.084
#> GSM217729 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9837 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.3242 0.8957 0.000 0.216 0.000 0.000 0.784
#> GSM217738 5 0.3242 0.8957 0.000 0.216 0.000 0.000 0.784
#> GSM217739 5 0.3424 0.8995 0.000 0.240 0.000 0.000 0.760
#> GSM217740 5 0.3424 0.8995 0.000 0.240 0.000 0.000 0.760
#> GSM217741 5 0.3774 0.8756 0.000 0.296 0.000 0.000 0.704
#> GSM217742 5 0.3636 0.8897 0.000 0.272 0.000 0.000 0.728
#> GSM217743 5 0.3796 0.8722 0.000 0.300 0.000 0.000 0.700
#> GSM217744 5 0.3816 0.8681 0.000 0.304 0.000 0.000 0.696
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0363 0.9501 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM217645 2 0.0603 0.9454 0.000 0.980 0.000 0.000 0.016 0.004
#> GSM217646 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217648 2 0.0547 0.9443 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM217649 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0146 0.9571 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217651 2 0.1010 0.9279 0.000 0.960 0.000 0.000 0.036 0.004
#> GSM217652 2 0.0146 0.9571 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217653 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217654 5 0.4993 0.6503 0.000 0.080 0.000 0.000 0.560 0.360
#> GSM217655 2 0.6017 -0.0899 0.000 0.424 0.000 0.000 0.260 0.316
#> GSM217656 5 0.4086 0.5823 0.000 0.000 0.008 0.000 0.528 0.464
#> GSM217657 5 0.4184 0.6396 0.000 0.016 0.000 0.000 0.576 0.408
#> GSM217658 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 5 0.3499 0.5921 0.000 0.320 0.000 0.000 0.680 0.000
#> GSM217661 2 0.0146 0.9571 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217662 2 0.1588 0.8874 0.000 0.924 0.000 0.000 0.072 0.004
#> GSM217663 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217667 2 0.0000 0.9583 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217668 4 0.0000 0.6942 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217669 4 0.1267 0.6506 0.000 0.000 0.000 0.940 0.000 0.060
#> GSM217670 4 0.0405 0.6938 0.000 0.000 0.000 0.988 0.008 0.004
#> GSM217671 4 0.0000 0.6942 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217672 4 0.0000 0.6942 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217673 4 0.0000 0.6942 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217674 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217675 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217676 1 0.0260 0.9503 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM217677 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217678 1 0.0260 0.9488 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM217679 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217680 1 0.0260 0.9488 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM217681 1 0.0000 0.9509 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217683 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217684 4 0.3830 0.0119 0.376 0.000 0.000 0.620 0.000 0.004
#> GSM217685 3 0.0632 0.9657 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM217686 3 0.0632 0.9657 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM217687 3 0.0632 0.9657 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM217688 3 0.0632 0.9657 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM217689 3 0.0790 0.9628 0.000 0.000 0.968 0.000 0.000 0.032
#> GSM217690 3 0.0790 0.9628 0.000 0.000 0.968 0.000 0.000 0.032
#> GSM217691 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217692 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217693 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217694 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217695 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217696 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217697 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217698 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217699 3 0.0000 0.9700 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0260 0.9703 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM217701 3 0.0146 0.9695 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217702 3 0.0000 0.9700 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.1010 0.9587 0.000 0.000 0.960 0.000 0.004 0.036
#> GSM217704 3 0.1219 0.9682 0.000 0.000 0.948 0.000 0.004 0.048
#> GSM217705 4 0.2053 0.6617 0.000 0.000 0.000 0.888 0.004 0.108
#> GSM217706 4 0.2632 0.6441 0.000 0.000 0.000 0.832 0.004 0.164
#> GSM217707 4 0.2805 0.6208 0.000 0.000 0.000 0.812 0.004 0.184
#> GSM217708 6 0.3847 0.8349 0.000 0.000 0.000 0.456 0.000 0.544
#> GSM217709 6 0.3982 0.8182 0.000 0.000 0.000 0.460 0.004 0.536
#> GSM217710 6 0.3695 0.8596 0.000 0.000 0.000 0.376 0.000 0.624
#> GSM217711 6 0.3684 0.8543 0.000 0.000 0.000 0.372 0.000 0.628
#> GSM217712 4 0.3323 0.5449 0.000 0.000 0.000 0.752 0.008 0.240
#> GSM217713 4 0.3315 0.5783 0.000 0.000 0.000 0.780 0.020 0.200
#> GSM217714 4 0.0717 0.6963 0.000 0.000 0.000 0.976 0.008 0.016
#> GSM217715 4 0.0291 0.6935 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM217716 4 0.2872 0.6429 0.000 0.000 0.000 0.836 0.024 0.140
#> GSM217717 4 0.3394 0.5741 0.000 0.000 0.000 0.776 0.024 0.200
#> GSM217718 4 0.3840 0.3921 0.000 0.000 0.000 0.696 0.020 0.284
#> GSM217719 4 0.3799 0.4207 0.000 0.000 0.000 0.704 0.020 0.276
#> GSM217720 4 0.1471 0.6678 0.000 0.000 0.000 0.932 0.004 0.064
#> GSM217721 4 0.3766 0.4817 0.000 0.000 0.000 0.720 0.024 0.256
#> GSM217722 4 0.3215 0.5345 0.000 0.000 0.000 0.756 0.004 0.240
#> GSM217723 1 0.3742 0.6084 0.648 0.000 0.000 0.004 0.000 0.348
#> GSM217724 1 0.3081 0.7715 0.776 0.000 0.000 0.004 0.000 0.220
#> GSM217725 1 0.3371 0.6969 0.708 0.000 0.000 0.000 0.000 0.292
#> GSM217726 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217727 1 0.0146 0.9507 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217728 1 0.3266 0.7208 0.728 0.000 0.000 0.000 0.000 0.272
#> GSM217729 1 0.0260 0.9488 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM217730 1 0.0260 0.9488 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM217731 1 0.0146 0.9500 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217732 1 0.0000 0.9509 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9509 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9509 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9509 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9509 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.1141 0.8489 0.000 0.052 0.000 0.000 0.948 0.000
#> GSM217738 5 0.1204 0.8512 0.000 0.056 0.000 0.000 0.944 0.000
#> GSM217739 5 0.1501 0.8587 0.000 0.076 0.000 0.000 0.924 0.000
#> GSM217740 5 0.1501 0.8587 0.000 0.076 0.000 0.000 0.924 0.000
#> GSM217741 5 0.1714 0.8576 0.000 0.092 0.000 0.000 0.908 0.000
#> GSM217742 5 0.1663 0.8585 0.000 0.088 0.000 0.000 0.912 0.000
#> GSM217743 5 0.1714 0.8576 0.000 0.092 0.000 0.000 0.908 0.000
#> GSM217744 5 0.1814 0.8532 0.000 0.100 0.000 0.000 0.900 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:skmeans 101 3.32e-01 2
#> MAD:skmeans 101 2.94e-07 3
#> MAD:skmeans 100 5.38e-07 4
#> MAD:skmeans 99 4.93e-09 5
#> MAD:skmeans 96 1.70e-08 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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.626 0.825 0.903 0.4707 0.495 0.495
#> 3 3 1.000 0.982 0.993 0.3439 0.873 0.744
#> 4 4 0.974 0.943 0.974 0.1869 0.870 0.652
#> 5 5 0.951 0.928 0.969 0.0536 0.954 0.819
#> 6 6 0.873 0.776 0.883 0.0335 0.985 0.928
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 3 4
There is also optional best \(k\) = 3 4 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM217644 2 0.9983 0.452 0.476 0.524
#> GSM217645 2 0.9983 0.452 0.476 0.524
#> GSM217646 2 0.9983 0.452 0.476 0.524
#> GSM217647 2 0.9754 0.539 0.408 0.592
#> GSM217648 2 0.6623 0.726 0.172 0.828
#> GSM217649 2 0.9983 0.452 0.476 0.524
#> GSM217650 2 0.9983 0.452 0.476 0.524
#> GSM217651 2 0.7139 0.713 0.196 0.804
#> GSM217652 2 0.9983 0.452 0.476 0.524
#> GSM217653 2 0.7056 0.715 0.192 0.808
#> GSM217654 2 0.9983 0.452 0.476 0.524
#> GSM217655 2 0.9983 0.452 0.476 0.524
#> GSM217656 2 0.9983 0.452 0.476 0.524
#> GSM217657 2 0.9983 0.452 0.476 0.524
#> GSM217658 2 0.9983 0.452 0.476 0.524
#> GSM217659 2 0.9983 0.452 0.476 0.524
#> GSM217660 2 0.9881 0.506 0.436 0.564
#> GSM217661 2 0.9983 0.452 0.476 0.524
#> GSM217662 2 0.2423 0.779 0.040 0.960
#> GSM217663 2 0.9983 0.452 0.476 0.524
#> GSM217664 2 0.9983 0.452 0.476 0.524
#> GSM217665 2 0.9983 0.452 0.476 0.524
#> GSM217666 2 0.9248 0.608 0.340 0.660
#> GSM217667 2 0.9000 0.629 0.316 0.684
#> GSM217668 1 0.3733 0.893 0.928 0.072
#> GSM217669 1 0.0000 0.998 1.000 0.000
#> GSM217670 1 0.0000 0.998 1.000 0.000
#> GSM217671 1 0.0000 0.998 1.000 0.000
#> GSM217672 1 0.0000 0.998 1.000 0.000
#> GSM217673 1 0.0000 0.998 1.000 0.000
#> GSM217674 1 0.0000 0.998 1.000 0.000
#> GSM217675 1 0.0000 0.998 1.000 0.000
#> GSM217676 1 0.0000 0.998 1.000 0.000
#> GSM217677 1 0.0000 0.998 1.000 0.000
#> GSM217678 1 0.0000 0.998 1.000 0.000
#> GSM217679 1 0.0000 0.998 1.000 0.000
#> GSM217680 1 0.0000 0.998 1.000 0.000
#> GSM217681 1 0.0000 0.998 1.000 0.000
#> GSM217682 1 0.0000 0.998 1.000 0.000
#> GSM217683 1 0.0000 0.998 1.000 0.000
#> GSM217684 1 0.0000 0.998 1.000 0.000
#> GSM217685 2 0.0000 0.789 0.000 1.000
#> GSM217686 2 0.0000 0.789 0.000 1.000
#> GSM217687 2 0.0000 0.789 0.000 1.000
#> GSM217688 2 0.0000 0.789 0.000 1.000
#> GSM217689 2 0.0000 0.789 0.000 1.000
#> GSM217690 2 0.0000 0.789 0.000 1.000
#> GSM217691 2 0.0000 0.789 0.000 1.000
#> GSM217692 2 0.0000 0.789 0.000 1.000
#> GSM217693 2 0.0000 0.789 0.000 1.000
#> GSM217694 2 0.0000 0.789 0.000 1.000
#> GSM217695 2 0.0000 0.789 0.000 1.000
#> GSM217696 2 0.0000 0.789 0.000 1.000
#> GSM217697 2 0.0000 0.789 0.000 1.000
#> GSM217698 2 0.0000 0.789 0.000 1.000
#> GSM217699 2 0.0000 0.789 0.000 1.000
#> GSM217700 2 0.0000 0.789 0.000 1.000
#> GSM217701 2 0.0000 0.789 0.000 1.000
#> GSM217702 2 0.0000 0.789 0.000 1.000
#> GSM217703 2 0.0000 0.789 0.000 1.000
#> GSM217704 2 0.0000 0.789 0.000 1.000
#> GSM217705 1 0.0000 0.998 1.000 0.000
#> GSM217706 1 0.0000 0.998 1.000 0.000
#> GSM217707 1 0.0000 0.998 1.000 0.000
#> GSM217708 1 0.0000 0.998 1.000 0.000
#> GSM217709 1 0.0000 0.998 1.000 0.000
#> GSM217710 1 0.0000 0.998 1.000 0.000
#> GSM217711 1 0.0000 0.998 1.000 0.000
#> GSM217712 1 0.0000 0.998 1.000 0.000
#> GSM217713 1 0.0000 0.998 1.000 0.000
#> GSM217714 1 0.0000 0.998 1.000 0.000
#> GSM217715 1 0.0000 0.998 1.000 0.000
#> GSM217716 1 0.0000 0.998 1.000 0.000
#> GSM217717 1 0.0000 0.998 1.000 0.000
#> GSM217718 1 0.0000 0.998 1.000 0.000
#> GSM217719 1 0.0000 0.998 1.000 0.000
#> GSM217720 1 0.0000 0.998 1.000 0.000
#> GSM217721 1 0.0000 0.998 1.000 0.000
#> GSM217722 1 0.0000 0.998 1.000 0.000
#> GSM217723 1 0.0000 0.998 1.000 0.000
#> GSM217724 1 0.0000 0.998 1.000 0.000
#> GSM217725 1 0.0000 0.998 1.000 0.000
#> GSM217726 1 0.0000 0.998 1.000 0.000
#> GSM217727 1 0.0000 0.998 1.000 0.000
#> GSM217728 1 0.0000 0.998 1.000 0.000
#> GSM217729 1 0.0000 0.998 1.000 0.000
#> GSM217730 1 0.0000 0.998 1.000 0.000
#> GSM217731 1 0.0000 0.998 1.000 0.000
#> GSM217732 1 0.0000 0.998 1.000 0.000
#> GSM217733 1 0.0000 0.998 1.000 0.000
#> GSM217734 1 0.0000 0.998 1.000 0.000
#> GSM217735 1 0.0000 0.998 1.000 0.000
#> GSM217736 1 0.0000 0.998 1.000 0.000
#> GSM217737 2 0.2236 0.780 0.036 0.964
#> GSM217738 2 0.0000 0.789 0.000 1.000
#> GSM217739 2 0.0000 0.789 0.000 1.000
#> GSM217740 2 0.0376 0.788 0.004 0.996
#> GSM217741 2 0.0000 0.789 0.000 1.000
#> GSM217742 2 0.0000 0.789 0.000 1.000
#> GSM217743 2 0.0000 0.789 0.000 1.000
#> GSM217744 2 0.0000 0.789 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217645 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217646 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217649 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217650 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217651 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217652 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217653 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217654 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217655 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217656 2 0.8309 0.516 0.188 0.632 0.180
#> GSM217657 2 0.0424 0.981 0.000 0.992 0.008
#> GSM217658 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217659 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217660 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217661 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217662 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217663 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217664 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217668 1 0.5810 0.486 0.664 0.336 0.000
#> GSM217669 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217723 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217724 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217725 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217726 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217728 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217729 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.992 1.000 0.000 0.000
#> GSM217737 2 0.0592 0.977 0.000 0.988 0.012
#> GSM217738 2 0.0424 0.981 0.000 0.992 0.008
#> GSM217739 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.987 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.987 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217645 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217646 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217654 2 0.1474 0.9411 0.000 0.948 0.000 0.052
#> GSM217655 2 0.1474 0.9401 0.000 0.948 0.000 0.052
#> GSM217656 4 0.6965 0.0552 0.004 0.440 0.096 0.460
#> GSM217657 2 0.3945 0.7193 0.000 0.780 0.004 0.216
#> GSM217658 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217660 2 0.0188 0.9866 0.000 0.996 0.000 0.004
#> GSM217661 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217663 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.9877 0.000 1.000 0.000 0.000
#> GSM217668 4 0.0469 0.9306 0.012 0.000 0.000 0.988
#> GSM217669 4 0.2921 0.8221 0.140 0.000 0.000 0.860
#> GSM217670 4 0.4624 0.4777 0.340 0.000 0.000 0.660
#> GSM217671 4 0.1716 0.8971 0.064 0.000 0.000 0.936
#> GSM217672 4 0.0592 0.9291 0.016 0.000 0.000 0.984
#> GSM217673 4 0.1022 0.9212 0.032 0.000 0.000 0.968
#> GSM217674 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217684 1 0.4103 0.6356 0.744 0.000 0.000 0.256
#> GSM217685 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217686 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217687 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217688 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217689 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217690 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217691 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217703 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217704 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM217705 4 0.0707 0.9274 0.020 0.000 0.000 0.980
#> GSM217706 4 0.0336 0.9312 0.008 0.000 0.000 0.992
#> GSM217707 4 0.2345 0.8659 0.100 0.000 0.000 0.900
#> GSM217708 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217709 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217710 4 0.0592 0.9280 0.016 0.000 0.000 0.984
#> GSM217711 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217712 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217713 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217714 4 0.0336 0.9312 0.008 0.000 0.000 0.992
#> GSM217715 4 0.0336 0.9312 0.008 0.000 0.000 0.992
#> GSM217716 4 0.0336 0.9312 0.008 0.000 0.000 0.992
#> GSM217717 4 0.0336 0.9312 0.008 0.000 0.000 0.992
#> GSM217718 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217719 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217720 4 0.1022 0.9208 0.032 0.000 0.000 0.968
#> GSM217721 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217722 4 0.0188 0.9311 0.004 0.000 0.000 0.996
#> GSM217723 4 0.4776 0.4168 0.376 0.000 0.000 0.624
#> GSM217724 1 0.2760 0.8437 0.872 0.000 0.000 0.128
#> GSM217725 1 0.0707 0.9621 0.980 0.000 0.000 0.020
#> GSM217726 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217728 1 0.0817 0.9579 0.976 0.000 0.000 0.024
#> GSM217729 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217731 1 0.1940 0.9065 0.924 0.000 0.000 0.076
#> GSM217732 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9762 1.000 0.000 0.000 0.000
#> GSM217737 2 0.0524 0.9820 0.000 0.988 0.004 0.008
#> GSM217738 2 0.0188 0.9866 0.000 0.996 0.000 0.004
#> GSM217739 2 0.0188 0.9866 0.000 0.996 0.000 0.004
#> GSM217740 2 0.0188 0.9866 0.000 0.996 0.000 0.004
#> GSM217741 2 0.0188 0.9866 0.000 0.996 0.000 0.004
#> GSM217742 2 0.0188 0.9866 0.000 0.996 0.000 0.004
#> GSM217743 2 0.0188 0.9866 0.000 0.996 0.000 0.004
#> GSM217744 2 0.0188 0.9866 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
#> GSM217644 2 0.0162 0.9327 0.000 0.996 0.000 0.000 0.004
#> GSM217645 2 0.0162 0.9327 0.000 0.996 0.000 0.000 0.004
#> GSM217646 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217648 2 0.1197 0.9062 0.000 0.952 0.000 0.000 0.048
#> GSM217649 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217650 2 0.0162 0.9327 0.000 0.996 0.000 0.000 0.004
#> GSM217651 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217652 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217653 2 0.1121 0.9093 0.000 0.956 0.000 0.000 0.044
#> GSM217654 2 0.1408 0.9029 0.000 0.948 0.000 0.044 0.008
#> GSM217655 2 0.1408 0.9029 0.000 0.948 0.000 0.044 0.008
#> GSM217656 2 0.3099 0.8031 0.000 0.848 0.012 0.132 0.008
#> GSM217657 2 0.2754 0.8525 0.000 0.880 0.000 0.080 0.040
#> GSM217658 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217660 2 0.4307 0.0743 0.000 0.500 0.000 0.000 0.500
#> GSM217661 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217662 2 0.3366 0.6975 0.000 0.768 0.000 0.000 0.232
#> GSM217663 2 0.0162 0.9327 0.000 0.996 0.000 0.000 0.004
#> GSM217664 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.9336 0.000 1.000 0.000 0.000 0.000
#> GSM217666 2 0.0162 0.9325 0.000 0.996 0.000 0.000 0.004
#> GSM217667 2 0.3274 0.7197 0.000 0.780 0.000 0.000 0.220
#> GSM217668 4 0.1124 0.9141 0.004 0.036 0.000 0.960 0.000
#> GSM217669 4 0.2516 0.8197 0.140 0.000 0.000 0.860 0.000
#> GSM217670 4 0.3966 0.4866 0.336 0.000 0.000 0.664 0.000
#> GSM217671 4 0.1270 0.9076 0.052 0.000 0.000 0.948 0.000
#> GSM217672 4 0.0162 0.9406 0.004 0.000 0.000 0.996 0.000
#> GSM217673 4 0.0609 0.9329 0.020 0.000 0.000 0.980 0.000
#> GSM217674 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.3366 0.6846 0.768 0.000 0.000 0.232 0.000
#> GSM217685 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217690 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217691 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217704 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0510 0.9355 0.016 0.000 0.000 0.984 0.000
#> GSM217706 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.2020 0.8638 0.100 0.000 0.000 0.900 0.000
#> GSM217708 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217709 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217710 4 0.0404 0.9375 0.012 0.000 0.000 0.988 0.000
#> GSM217711 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217712 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217713 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217714 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217718 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217719 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217720 4 0.0794 0.9278 0.028 0.000 0.000 0.972 0.000
#> GSM217721 4 0.0000 0.9417 0.000 0.000 0.000 1.000 0.000
#> GSM217722 4 0.0162 0.9407 0.004 0.000 0.000 0.996 0.000
#> GSM217723 4 0.4201 0.3393 0.408 0.000 0.000 0.592 0.000
#> GSM217724 1 0.2377 0.8385 0.872 0.000 0.000 0.128 0.000
#> GSM217725 1 0.0510 0.9618 0.984 0.000 0.000 0.016 0.000
#> GSM217726 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0703 0.9544 0.976 0.000 0.000 0.024 0.000
#> GSM217729 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.1792 0.8900 0.916 0.000 0.000 0.084 0.000
#> GSM217732 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9745 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0000 0.9969 0.000 0.000 0.000 0.000 1.000
#> GSM217738 5 0.0000 0.9969 0.000 0.000 0.000 0.000 1.000
#> GSM217739 5 0.0000 0.9969 0.000 0.000 0.000 0.000 1.000
#> GSM217740 5 0.0000 0.9969 0.000 0.000 0.000 0.000 1.000
#> GSM217741 5 0.0162 0.9968 0.000 0.004 0.000 0.000 0.996
#> GSM217742 5 0.0162 0.9968 0.000 0.004 0.000 0.000 0.996
#> GSM217743 5 0.0162 0.9968 0.000 0.004 0.000 0.000 0.996
#> GSM217744 5 0.0290 0.9934 0.000 0.008 0.000 0.000 0.992
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.2883 0.7447 0.000 0.788 0.000 0.000 0.000 0.212
#> GSM217645 2 0.2260 0.8122 0.000 0.860 0.000 0.000 0.000 0.140
#> GSM217646 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217648 2 0.0458 0.8916 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217649 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0632 0.8913 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM217651 2 0.0632 0.8917 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM217652 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.0790 0.8815 0.000 0.968 0.000 0.000 0.032 0.000
#> GSM217654 2 0.4251 0.4597 0.000 0.624 0.000 0.028 0.000 0.348
#> GSM217655 2 0.4359 0.6662 0.000 0.724 0.000 0.040 0.024 0.212
#> GSM217656 6 0.5418 -0.0329 0.000 0.344 0.024 0.072 0.000 0.560
#> GSM217657 2 0.4902 0.3127 0.000 0.572 0.000 0.060 0.004 0.364
#> GSM217658 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 5 0.5799 0.0534 0.000 0.368 0.000 0.000 0.448 0.184
#> GSM217661 2 0.0363 0.8965 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM217662 2 0.3037 0.7175 0.000 0.808 0.000 0.000 0.176 0.016
#> GSM217663 2 0.0146 0.8980 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217664 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0000 0.8989 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217667 2 0.2003 0.7988 0.000 0.884 0.000 0.000 0.116 0.000
#> GSM217668 4 0.0748 0.7632 0.004 0.016 0.000 0.976 0.000 0.004
#> GSM217669 4 0.2747 0.6741 0.096 0.000 0.000 0.860 0.000 0.044
#> GSM217670 4 0.3446 0.2545 0.308 0.000 0.000 0.692 0.000 0.000
#> GSM217671 4 0.0865 0.7520 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM217672 4 0.0146 0.7687 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM217673 4 0.0363 0.7679 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM217674 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0146 0.9396 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217676 1 0.1267 0.9008 0.940 0.000 0.000 0.000 0.000 0.060
#> GSM217677 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0146 0.9396 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM217679 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.3330 0.5552 0.716 0.000 0.000 0.284 0.000 0.000
#> GSM217685 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217686 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217687 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217688 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217689 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217690 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217691 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217692 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217693 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217694 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217695 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217696 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217697 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217698 3 0.3023 0.8287 0.000 0.000 0.768 0.000 0.000 0.232
#> GSM217699 3 0.0260 0.8351 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM217700 3 0.3351 0.8240 0.000 0.000 0.712 0.000 0.000 0.288
#> GSM217701 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0260 0.8351 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM217703 3 0.0000 0.8343 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217704 3 0.3659 0.8137 0.000 0.000 0.636 0.000 0.000 0.364
#> GSM217705 4 0.2019 0.7410 0.012 0.000 0.000 0.900 0.000 0.088
#> GSM217706 4 0.0000 0.7683 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217707 4 0.3657 0.6490 0.108 0.000 0.000 0.792 0.000 0.100
#> GSM217708 4 0.3797 0.4003 0.000 0.000 0.000 0.580 0.000 0.420
#> GSM217709 4 0.3804 0.3988 0.000 0.000 0.000 0.576 0.000 0.424
#> GSM217710 4 0.3833 0.3545 0.000 0.000 0.000 0.556 0.000 0.444
#> GSM217711 4 0.3756 0.4351 0.000 0.000 0.000 0.600 0.000 0.400
#> GSM217712 4 0.1663 0.7593 0.000 0.000 0.000 0.912 0.000 0.088
#> GSM217713 4 0.2664 0.6911 0.000 0.000 0.000 0.816 0.000 0.184
#> GSM217714 4 0.0146 0.7688 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217715 4 0.0000 0.7683 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217716 4 0.0146 0.7688 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217717 4 0.0458 0.7702 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM217718 4 0.3446 0.5545 0.000 0.000 0.000 0.692 0.000 0.308
#> GSM217719 4 0.3175 0.6193 0.000 0.000 0.000 0.744 0.000 0.256
#> GSM217720 4 0.1983 0.7425 0.020 0.000 0.000 0.908 0.000 0.072
#> GSM217721 4 0.1501 0.7611 0.000 0.000 0.000 0.924 0.000 0.076
#> GSM217722 4 0.3265 0.6344 0.004 0.000 0.000 0.748 0.000 0.248
#> GSM217723 6 0.5930 -0.2411 0.212 0.000 0.000 0.384 0.000 0.404
#> GSM217724 1 0.3041 0.7953 0.832 0.000 0.000 0.040 0.000 0.128
#> GSM217725 1 0.3830 0.4149 0.620 0.000 0.000 0.004 0.000 0.376
#> GSM217726 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.2871 0.7594 0.804 0.000 0.000 0.004 0.000 0.192
#> GSM217729 1 0.0790 0.9224 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM217730 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.1204 0.8874 0.944 0.000 0.000 0.056 0.000 0.000
#> GSM217732 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217738 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217739 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217740 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217741 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217742 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217743 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217744 5 0.0000 0.9207 0.000 0.000 0.000 0.000 1.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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:pam 85 3.14e-01 2
#> MAD:pam 100 2.32e-07 3
#> MAD:pam 98 5.17e-07 4
#> MAD:pam 98 1.36e-11 5
#> MAD:pam 90 2.53e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.988 0.985 0.4968 0.495 0.495
#> 3 3 0.818 0.957 0.968 0.2673 0.873 0.744
#> 4 4 0.809 0.825 0.887 0.0917 0.983 0.954
#> 5 5 0.988 0.955 0.973 0.1614 0.821 0.510
#> 6 6 0.941 0.860 0.938 0.0109 0.987 0.937
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 5
There is also optional best \(k\) = 2 5 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
#> GSM217644 2 0.2603 0.982 0.044 0.956
#> GSM217645 2 0.2603 0.982 0.044 0.956
#> GSM217646 2 0.2603 0.982 0.044 0.956
#> GSM217647 2 0.2603 0.982 0.044 0.956
#> GSM217648 2 0.2603 0.982 0.044 0.956
#> GSM217649 2 0.2603 0.982 0.044 0.956
#> GSM217650 2 0.2603 0.982 0.044 0.956
#> GSM217651 2 0.2603 0.982 0.044 0.956
#> GSM217652 2 0.2603 0.982 0.044 0.956
#> GSM217653 2 0.2603 0.982 0.044 0.956
#> GSM217654 2 0.2778 0.979 0.048 0.952
#> GSM217655 2 0.2778 0.979 0.048 0.952
#> GSM217656 2 0.4298 0.940 0.088 0.912
#> GSM217657 2 0.2778 0.979 0.048 0.952
#> GSM217658 2 0.2603 0.982 0.044 0.956
#> GSM217659 2 0.2603 0.982 0.044 0.956
#> GSM217660 2 0.2603 0.982 0.044 0.956
#> GSM217661 2 0.2603 0.982 0.044 0.956
#> GSM217662 2 0.2603 0.982 0.044 0.956
#> GSM217663 2 0.2603 0.982 0.044 0.956
#> GSM217664 2 0.2603 0.982 0.044 0.956
#> GSM217665 2 0.2603 0.982 0.044 0.956
#> GSM217666 2 0.2603 0.982 0.044 0.956
#> GSM217667 2 0.2603 0.982 0.044 0.956
#> GSM217668 1 0.0000 1.000 1.000 0.000
#> GSM217669 1 0.0000 1.000 1.000 0.000
#> GSM217670 1 0.0000 1.000 1.000 0.000
#> GSM217671 1 0.0000 1.000 1.000 0.000
#> GSM217672 1 0.0000 1.000 1.000 0.000
#> GSM217673 1 0.0000 1.000 1.000 0.000
#> GSM217674 1 0.0000 1.000 1.000 0.000
#> GSM217675 1 0.0000 1.000 1.000 0.000
#> GSM217676 1 0.0000 1.000 1.000 0.000
#> GSM217677 1 0.0000 1.000 1.000 0.000
#> GSM217678 1 0.0000 1.000 1.000 0.000
#> GSM217679 1 0.0000 1.000 1.000 0.000
#> GSM217680 1 0.0000 1.000 1.000 0.000
#> GSM217681 1 0.0000 1.000 1.000 0.000
#> GSM217682 1 0.0000 1.000 1.000 0.000
#> GSM217683 1 0.0000 1.000 1.000 0.000
#> GSM217684 1 0.0000 1.000 1.000 0.000
#> GSM217685 2 0.0000 0.971 0.000 1.000
#> GSM217686 2 0.0000 0.971 0.000 1.000
#> GSM217687 2 0.0000 0.971 0.000 1.000
#> GSM217688 2 0.0000 0.971 0.000 1.000
#> GSM217689 2 0.0672 0.973 0.008 0.992
#> GSM217690 2 0.0672 0.973 0.008 0.992
#> GSM217691 2 0.0000 0.971 0.000 1.000
#> GSM217692 2 0.0000 0.971 0.000 1.000
#> GSM217693 2 0.0000 0.971 0.000 1.000
#> GSM217694 2 0.0000 0.971 0.000 1.000
#> GSM217695 2 0.0000 0.971 0.000 1.000
#> GSM217696 2 0.0000 0.971 0.000 1.000
#> GSM217697 2 0.0000 0.971 0.000 1.000
#> GSM217698 2 0.0000 0.971 0.000 1.000
#> GSM217699 2 0.0000 0.971 0.000 1.000
#> GSM217700 2 0.0000 0.971 0.000 1.000
#> GSM217701 2 0.0000 0.971 0.000 1.000
#> GSM217702 2 0.0000 0.971 0.000 1.000
#> GSM217703 2 0.0938 0.974 0.012 0.988
#> GSM217704 2 0.0000 0.971 0.000 1.000
#> GSM217705 1 0.0000 1.000 1.000 0.000
#> GSM217706 1 0.0000 1.000 1.000 0.000
#> GSM217707 1 0.0000 1.000 1.000 0.000
#> GSM217708 1 0.0000 1.000 1.000 0.000
#> GSM217709 1 0.0000 1.000 1.000 0.000
#> GSM217710 1 0.0000 1.000 1.000 0.000
#> GSM217711 1 0.0000 1.000 1.000 0.000
#> GSM217712 1 0.0000 1.000 1.000 0.000
#> GSM217713 1 0.0000 1.000 1.000 0.000
#> GSM217714 1 0.0000 1.000 1.000 0.000
#> GSM217715 1 0.0000 1.000 1.000 0.000
#> GSM217716 1 0.0000 1.000 1.000 0.000
#> GSM217717 1 0.0000 1.000 1.000 0.000
#> GSM217718 1 0.0000 1.000 1.000 0.000
#> GSM217719 1 0.0000 1.000 1.000 0.000
#> GSM217720 1 0.0000 1.000 1.000 0.000
#> GSM217721 1 0.0000 1.000 1.000 0.000
#> GSM217722 1 0.0000 1.000 1.000 0.000
#> GSM217723 1 0.0000 1.000 1.000 0.000
#> GSM217724 1 0.0000 1.000 1.000 0.000
#> GSM217725 1 0.0000 1.000 1.000 0.000
#> GSM217726 1 0.0000 1.000 1.000 0.000
#> GSM217727 1 0.0000 1.000 1.000 0.000
#> GSM217728 1 0.0000 1.000 1.000 0.000
#> GSM217729 1 0.0000 1.000 1.000 0.000
#> GSM217730 1 0.0000 1.000 1.000 0.000
#> GSM217731 1 0.0000 1.000 1.000 0.000
#> GSM217732 1 0.0000 1.000 1.000 0.000
#> GSM217733 1 0.0000 1.000 1.000 0.000
#> GSM217734 1 0.0000 1.000 1.000 0.000
#> GSM217735 1 0.0000 1.000 1.000 0.000
#> GSM217736 1 0.0000 1.000 1.000 0.000
#> GSM217737 2 0.2603 0.982 0.044 0.956
#> GSM217738 2 0.2603 0.982 0.044 0.956
#> GSM217739 2 0.2603 0.982 0.044 0.956
#> GSM217740 2 0.2603 0.982 0.044 0.956
#> GSM217741 2 0.2603 0.982 0.044 0.956
#> GSM217742 2 0.2603 0.982 0.044 0.956
#> GSM217743 2 0.2603 0.982 0.044 0.956
#> GSM217744 2 0.2603 0.982 0.044 0.956
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.000 1.000 0.000 1.000 0
#> GSM217645 2 0.000 1.000 0.000 1.000 0
#> GSM217646 2 0.000 1.000 0.000 1.000 0
#> GSM217647 2 0.000 1.000 0.000 1.000 0
#> GSM217648 2 0.000 1.000 0.000 1.000 0
#> GSM217649 2 0.000 1.000 0.000 1.000 0
#> GSM217650 2 0.000 1.000 0.000 1.000 0
#> GSM217651 2 0.000 1.000 0.000 1.000 0
#> GSM217652 2 0.000 1.000 0.000 1.000 0
#> GSM217653 2 0.000 1.000 0.000 1.000 0
#> GSM217654 2 0.000 1.000 0.000 1.000 0
#> GSM217655 2 0.000 1.000 0.000 1.000 0
#> GSM217656 2 0.000 1.000 0.000 1.000 0
#> GSM217657 2 0.000 1.000 0.000 1.000 0
#> GSM217658 2 0.000 1.000 0.000 1.000 0
#> GSM217659 2 0.000 1.000 0.000 1.000 0
#> GSM217660 2 0.000 1.000 0.000 1.000 0
#> GSM217661 2 0.000 1.000 0.000 1.000 0
#> GSM217662 2 0.000 1.000 0.000 1.000 0
#> GSM217663 2 0.000 1.000 0.000 1.000 0
#> GSM217664 2 0.000 1.000 0.000 1.000 0
#> GSM217665 2 0.000 1.000 0.000 1.000 0
#> GSM217666 2 0.000 1.000 0.000 1.000 0
#> GSM217667 2 0.000 1.000 0.000 1.000 0
#> GSM217668 1 0.522 0.763 0.740 0.260 0
#> GSM217669 1 0.341 0.905 0.876 0.124 0
#> GSM217670 1 0.394 0.890 0.844 0.156 0
#> GSM217671 1 0.394 0.890 0.844 0.156 0
#> GSM217672 1 0.388 0.893 0.848 0.152 0
#> GSM217673 1 0.375 0.898 0.856 0.144 0
#> GSM217674 1 0.000 0.927 1.000 0.000 0
#> GSM217675 1 0.000 0.927 1.000 0.000 0
#> GSM217676 1 0.000 0.927 1.000 0.000 0
#> GSM217677 1 0.000 0.927 1.000 0.000 0
#> GSM217678 1 0.000 0.927 1.000 0.000 0
#> GSM217679 1 0.000 0.927 1.000 0.000 0
#> GSM217680 1 0.000 0.927 1.000 0.000 0
#> GSM217681 1 0.000 0.927 1.000 0.000 0
#> GSM217682 1 0.000 0.927 1.000 0.000 0
#> GSM217683 1 0.000 0.927 1.000 0.000 0
#> GSM217684 1 0.400 0.887 0.840 0.160 0
#> GSM217685 3 0.000 1.000 0.000 0.000 1
#> GSM217686 3 0.000 1.000 0.000 0.000 1
#> GSM217687 3 0.000 1.000 0.000 0.000 1
#> GSM217688 3 0.000 1.000 0.000 0.000 1
#> GSM217689 3 0.000 1.000 0.000 0.000 1
#> GSM217690 3 0.000 1.000 0.000 0.000 1
#> GSM217691 3 0.000 1.000 0.000 0.000 1
#> GSM217692 3 0.000 1.000 0.000 0.000 1
#> GSM217693 3 0.000 1.000 0.000 0.000 1
#> GSM217694 3 0.000 1.000 0.000 0.000 1
#> GSM217695 3 0.000 1.000 0.000 0.000 1
#> GSM217696 3 0.000 1.000 0.000 0.000 1
#> GSM217697 3 0.000 1.000 0.000 0.000 1
#> GSM217698 3 0.000 1.000 0.000 0.000 1
#> GSM217699 3 0.000 1.000 0.000 0.000 1
#> GSM217700 3 0.000 1.000 0.000 0.000 1
#> GSM217701 3 0.000 1.000 0.000 0.000 1
#> GSM217702 3 0.000 1.000 0.000 0.000 1
#> GSM217703 3 0.000 1.000 0.000 0.000 1
#> GSM217704 3 0.000 1.000 0.000 0.000 1
#> GSM217705 1 0.400 0.887 0.840 0.160 0
#> GSM217706 1 0.375 0.898 0.856 0.144 0
#> GSM217707 1 0.175 0.926 0.952 0.048 0
#> GSM217708 1 0.375 0.898 0.856 0.144 0
#> GSM217709 1 0.175 0.926 0.952 0.048 0
#> GSM217710 1 0.175 0.926 0.952 0.048 0
#> GSM217711 1 0.175 0.926 0.952 0.048 0
#> GSM217712 1 0.375 0.898 0.856 0.144 0
#> GSM217713 1 0.400 0.887 0.840 0.160 0
#> GSM217714 1 0.388 0.893 0.848 0.152 0
#> GSM217715 1 0.388 0.893 0.848 0.152 0
#> GSM217716 1 0.382 0.896 0.852 0.148 0
#> GSM217717 1 0.388 0.893 0.848 0.152 0
#> GSM217718 1 0.175 0.926 0.952 0.048 0
#> GSM217719 1 0.175 0.926 0.952 0.048 0
#> GSM217720 1 0.400 0.887 0.840 0.160 0
#> GSM217721 1 0.394 0.890 0.844 0.156 0
#> GSM217722 1 0.375 0.898 0.856 0.144 0
#> GSM217723 1 0.000 0.927 1.000 0.000 0
#> GSM217724 1 0.000 0.927 1.000 0.000 0
#> GSM217725 1 0.000 0.927 1.000 0.000 0
#> GSM217726 1 0.000 0.927 1.000 0.000 0
#> GSM217727 1 0.000 0.927 1.000 0.000 0
#> GSM217728 1 0.000 0.927 1.000 0.000 0
#> GSM217729 1 0.000 0.927 1.000 0.000 0
#> GSM217730 1 0.000 0.927 1.000 0.000 0
#> GSM217731 1 0.000 0.927 1.000 0.000 0
#> GSM217732 1 0.000 0.927 1.000 0.000 0
#> GSM217733 1 0.000 0.927 1.000 0.000 0
#> GSM217734 1 0.000 0.927 1.000 0.000 0
#> GSM217735 1 0.000 0.927 1.000 0.000 0
#> GSM217736 1 0.000 0.927 1.000 0.000 0
#> GSM217737 2 0.000 1.000 0.000 1.000 0
#> GSM217738 2 0.000 1.000 0.000 1.000 0
#> GSM217739 2 0.000 1.000 0.000 1.000 0
#> GSM217740 2 0.000 1.000 0.000 1.000 0
#> GSM217741 2 0.000 1.000 0.000 1.000 0
#> GSM217742 2 0.000 1.000 0.000 1.000 0
#> GSM217743 2 0.000 1.000 0.000 1.000 0
#> GSM217744 2 0.000 1.000 0.000 1.000 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217645 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217646 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217654 2 0.0469 0.966 0.000 0.988 0.000 0.012
#> GSM217655 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217656 4 0.1557 0.384 0.000 0.056 0.000 0.944
#> GSM217657 2 0.4103 0.730 0.000 0.744 0.000 0.256
#> GSM217658 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217660 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217661 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217663 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217668 1 0.7381 0.571 0.492 0.180 0.000 0.328
#> GSM217669 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217670 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217671 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217672 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217673 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217674 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217684 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217685 3 0.4500 0.318 0.000 0.000 0.684 0.316
#> GSM217686 3 0.4500 0.318 0.000 0.000 0.684 0.316
#> GSM217687 3 0.4500 0.318 0.000 0.000 0.684 0.316
#> GSM217688 3 0.4500 0.318 0.000 0.000 0.684 0.316
#> GSM217689 4 0.4992 0.410 0.000 0.000 0.476 0.524
#> GSM217690 4 0.4992 0.410 0.000 0.000 0.476 0.524
#> GSM217691 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0817 0.846 0.000 0.000 0.976 0.024
#> GSM217699 3 0.0188 0.865 0.000 0.000 0.996 0.004
#> GSM217700 3 0.0188 0.865 0.000 0.000 0.996 0.004
#> GSM217701 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217703 4 0.4564 0.514 0.000 0.000 0.328 0.672
#> GSM217704 3 0.0000 0.867 0.000 0.000 1.000 0.000
#> GSM217705 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217706 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217707 1 0.3569 0.816 0.804 0.000 0.000 0.196
#> GSM217708 1 0.4193 0.810 0.732 0.000 0.000 0.268
#> GSM217709 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217710 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217711 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217712 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217713 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217714 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217715 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217716 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217717 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217718 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217719 1 0.4431 0.806 0.696 0.000 0.000 0.304
#> GSM217720 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217721 1 0.4564 0.803 0.672 0.000 0.000 0.328
#> GSM217722 1 0.3074 0.818 0.848 0.000 0.000 0.152
#> GSM217723 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217724 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217725 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217726 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217728 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217729 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.822 1.000 0.000 0.000 0.000
#> GSM217737 2 0.2814 0.873 0.000 0.868 0.000 0.132
#> GSM217738 2 0.3266 0.838 0.000 0.832 0.000 0.168
#> GSM217739 2 0.2760 0.877 0.000 0.872 0.000 0.128
#> GSM217740 2 0.2704 0.880 0.000 0.876 0.000 0.124
#> GSM217741 2 0.0000 0.974 0.000 1.000 0.000 0.000
#> GSM217742 2 0.0188 0.972 0.000 0.996 0.000 0.004
#> GSM217743 2 0.0188 0.972 0.000 0.996 0.000 0.004
#> GSM217744 2 0.0188 0.972 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
#> GSM217644 2 0.1478 0.9515 0.000 0.936 0.000 0.000 0.064
#> GSM217645 2 0.1410 0.9506 0.000 0.940 0.000 0.000 0.060
#> GSM217646 2 0.1478 0.9515 0.000 0.936 0.000 0.000 0.064
#> GSM217647 5 0.1121 0.9407 0.000 0.044 0.000 0.000 0.956
#> GSM217648 5 0.1121 0.9407 0.000 0.044 0.000 0.000 0.956
#> GSM217649 2 0.1478 0.9515 0.000 0.936 0.000 0.000 0.064
#> GSM217650 2 0.1478 0.9515 0.000 0.936 0.000 0.000 0.064
#> GSM217651 5 0.2230 0.8721 0.000 0.116 0.000 0.000 0.884
#> GSM217652 2 0.1478 0.9515 0.000 0.936 0.000 0.000 0.064
#> GSM217653 5 0.1121 0.9407 0.000 0.044 0.000 0.000 0.956
#> GSM217654 2 0.0794 0.9345 0.000 0.972 0.000 0.000 0.028
#> GSM217655 2 0.0794 0.9345 0.000 0.972 0.000 0.000 0.028
#> GSM217656 2 0.2149 0.8750 0.000 0.916 0.000 0.048 0.036
#> GSM217657 2 0.1121 0.9199 0.000 0.956 0.000 0.000 0.044
#> GSM217658 2 0.1478 0.9515 0.000 0.936 0.000 0.000 0.064
#> GSM217659 2 0.1478 0.9515 0.000 0.936 0.000 0.000 0.064
#> GSM217660 2 0.4192 0.3517 0.000 0.596 0.000 0.000 0.404
#> GSM217661 2 0.1270 0.9476 0.000 0.948 0.000 0.000 0.052
#> GSM217662 5 0.0510 0.9438 0.000 0.016 0.000 0.000 0.984
#> GSM217663 5 0.4297 0.0387 0.000 0.472 0.000 0.000 0.528
#> GSM217664 2 0.1544 0.9490 0.000 0.932 0.000 0.000 0.068
#> GSM217665 5 0.1121 0.9407 0.000 0.044 0.000 0.000 0.956
#> GSM217666 5 0.1121 0.9407 0.000 0.044 0.000 0.000 0.956
#> GSM217667 5 0.1121 0.9407 0.000 0.044 0.000 0.000 0.956
#> GSM217668 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217669 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217670 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217671 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217672 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217673 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217674 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0290 0.9934 0.992 0.000 0.000 0.008 0.000
#> GSM217679 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0162 0.9956 0.996 0.000 0.000 0.004 0.000
#> GSM217681 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217685 3 0.0609 0.9903 0.000 0.020 0.980 0.000 0.000
#> GSM217686 3 0.0609 0.9903 0.000 0.020 0.980 0.000 0.000
#> GSM217687 3 0.0609 0.9903 0.000 0.020 0.980 0.000 0.000
#> GSM217688 3 0.0609 0.9903 0.000 0.020 0.980 0.000 0.000
#> GSM217689 3 0.0703 0.9888 0.000 0.024 0.976 0.000 0.000
#> GSM217690 3 0.0703 0.9888 0.000 0.024 0.976 0.000 0.000
#> GSM217691 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0162 0.9933 0.000 0.004 0.996 0.000 0.000
#> GSM217700 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0290 0.9929 0.000 0.008 0.992 0.000 0.000
#> GSM217702 3 0.0290 0.9929 0.000 0.008 0.992 0.000 0.000
#> GSM217703 3 0.0703 0.9888 0.000 0.024 0.976 0.000 0.000
#> GSM217704 3 0.0000 0.9936 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217706 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.0162 0.9813 0.004 0.000 0.000 0.996 0.000
#> GSM217708 4 0.3730 0.5946 0.288 0.000 0.000 0.712 0.000
#> GSM217709 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217710 4 0.0162 0.9818 0.000 0.000 0.000 0.996 0.004
#> GSM217711 4 0.0451 0.9762 0.000 0.004 0.000 0.988 0.008
#> GSM217712 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217713 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217714 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217718 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217719 4 0.0162 0.9813 0.004 0.000 0.000 0.996 0.000
#> GSM217720 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217721 4 0.0000 0.9843 0.000 0.000 0.000 1.000 0.000
#> GSM217722 4 0.0703 0.9617 0.024 0.000 0.000 0.976 0.000
#> GSM217723 1 0.0290 0.9934 0.992 0.000 0.000 0.008 0.000
#> GSM217724 1 0.0290 0.9934 0.992 0.000 0.000 0.008 0.000
#> GSM217725 1 0.0290 0.9934 0.992 0.000 0.000 0.008 0.000
#> GSM217726 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0290 0.9934 0.992 0.000 0.000 0.008 0.000
#> GSM217729 1 0.0290 0.9934 0.992 0.000 0.000 0.008 0.000
#> GSM217730 1 0.0162 0.9956 0.996 0.000 0.000 0.004 0.000
#> GSM217731 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9973 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0290 0.9357 0.000 0.008 0.000 0.000 0.992
#> GSM217738 5 0.0290 0.9357 0.000 0.008 0.000 0.000 0.992
#> GSM217739 5 0.0000 0.9381 0.000 0.000 0.000 0.000 1.000
#> GSM217740 5 0.0000 0.9381 0.000 0.000 0.000 0.000 1.000
#> GSM217741 5 0.0510 0.9438 0.000 0.016 0.000 0.000 0.984
#> GSM217742 5 0.0404 0.9434 0.000 0.012 0.000 0.000 0.988
#> GSM217743 5 0.0404 0.9434 0.000 0.012 0.000 0.000 0.988
#> GSM217744 5 0.0404 0.9434 0.000 0.012 0.000 0.000 0.988
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0632 0.858 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM217645 2 0.0000 0.847 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217646 2 0.0547 0.859 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM217647 5 0.3390 0.728 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM217648 5 0.3351 0.734 0.000 0.288 0.000 0.000 0.712 0.000
#> GSM217649 2 0.0547 0.859 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM217650 2 0.0547 0.859 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM217651 5 0.3607 0.648 0.000 0.348 0.000 0.000 0.652 0.000
#> GSM217652 2 0.0547 0.859 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM217653 5 0.3151 0.756 0.000 0.252 0.000 0.000 0.748 0.000
#> GSM217654 2 0.2595 0.693 0.000 0.836 0.000 0.000 0.004 0.160
#> GSM217655 2 0.2595 0.693 0.000 0.836 0.000 0.000 0.004 0.160
#> GSM217656 6 0.4537 -0.404 0.000 0.480 0.000 0.024 0.004 0.492
#> GSM217657 2 0.2948 0.651 0.000 0.804 0.000 0.000 0.008 0.188
#> GSM217658 2 0.0547 0.859 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM217659 2 0.0547 0.859 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM217660 2 0.3647 0.251 0.000 0.640 0.000 0.000 0.360 0.000
#> GSM217661 2 0.0000 0.847 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217662 5 0.0458 0.834 0.000 0.016 0.000 0.000 0.984 0.000
#> GSM217663 2 0.3607 0.298 0.000 0.652 0.000 0.000 0.348 0.000
#> GSM217664 2 0.0713 0.854 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM217665 5 0.3390 0.728 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM217666 5 0.3390 0.728 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM217667 5 0.3390 0.728 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM217668 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217669 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217670 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217671 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217672 4 0.0260 0.964 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217673 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0146 0.996 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM217679 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.0260 0.964 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217685 3 0.0146 0.943 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217686 3 0.0146 0.943 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217687 3 0.0146 0.943 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217688 3 0.0146 0.943 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM217689 3 0.3684 0.279 0.000 0.000 0.628 0.000 0.000 0.372
#> GSM217690 3 0.3684 0.279 0.000 0.000 0.628 0.000 0.000 0.372
#> GSM217691 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217692 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217693 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217694 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217695 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 6 0.3868 -0.406 0.000 0.000 0.496 0.000 0.000 0.504
#> GSM217704 3 0.0000 0.946 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217705 4 0.0260 0.964 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217706 4 0.0146 0.965 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217707 4 0.0146 0.963 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM217708 4 0.4972 0.477 0.272 0.000 0.000 0.620 0.000 0.108
#> GSM217709 4 0.1644 0.923 0.004 0.000 0.000 0.920 0.000 0.076
#> GSM217710 4 0.1897 0.914 0.004 0.000 0.000 0.908 0.004 0.084
#> GSM217711 4 0.1753 0.916 0.000 0.000 0.000 0.912 0.004 0.084
#> GSM217712 4 0.0146 0.965 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217713 4 0.0458 0.960 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM217714 4 0.0146 0.965 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217715 4 0.0146 0.965 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217716 4 0.0146 0.965 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM217717 4 0.0000 0.965 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217718 4 0.0405 0.962 0.004 0.000 0.000 0.988 0.000 0.008
#> GSM217719 4 0.1285 0.939 0.004 0.000 0.000 0.944 0.000 0.052
#> GSM217720 4 0.0260 0.964 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217721 4 0.1007 0.945 0.000 0.000 0.000 0.956 0.000 0.044
#> GSM217722 4 0.0777 0.947 0.024 0.000 0.000 0.972 0.000 0.004
#> GSM217723 1 0.0260 0.994 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM217724 1 0.0405 0.991 0.988 0.000 0.000 0.004 0.008 0.000
#> GSM217725 1 0.0260 0.994 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM217726 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0405 0.991 0.988 0.000 0.000 0.004 0.008 0.000
#> GSM217729 1 0.0260 0.994 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM217730 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0363 0.830 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM217738 5 0.0363 0.830 0.000 0.012 0.000 0.000 0.988 0.000
#> GSM217739 5 0.0260 0.830 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM217740 5 0.0260 0.830 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM217741 5 0.0458 0.834 0.000 0.016 0.000 0.000 0.984 0.000
#> GSM217742 5 0.0458 0.834 0.000 0.016 0.000 0.000 0.984 0.000
#> GSM217743 5 0.0458 0.834 0.000 0.016 0.000 0.000 0.984 0.000
#> GSM217744 5 0.0458 0.834 0.000 0.016 0.000 0.000 0.984 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:mclust 101 3.32e-01 2
#> MAD:mclust 101 2.94e-07 3
#> MAD:mclust 94 2.16e-05 4
#> MAD:mclust 99 2.07e-07 5
#> MAD:mclust 94 1.46e-06 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 1.000 1.000 1.000 0.5051 0.495 0.495
#> 3 3 1.000 0.996 0.998 0.2516 0.873 0.744
#> 4 4 0.886 0.910 0.947 0.1086 0.909 0.759
#> 5 5 0.814 0.487 0.799 0.0646 0.960 0.866
#> 6 6 0.738 0.782 0.814 0.0399 0.872 0.580
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
#> GSM217644 2 0.0000 1.000 0.000 1.000
#> GSM217645 2 0.0000 1.000 0.000 1.000
#> GSM217646 2 0.0000 1.000 0.000 1.000
#> GSM217647 2 0.0000 1.000 0.000 1.000
#> GSM217648 2 0.0000 1.000 0.000 1.000
#> GSM217649 2 0.0000 1.000 0.000 1.000
#> GSM217650 2 0.0000 1.000 0.000 1.000
#> GSM217651 2 0.0000 1.000 0.000 1.000
#> GSM217652 2 0.0000 1.000 0.000 1.000
#> GSM217653 2 0.0000 1.000 0.000 1.000
#> GSM217654 2 0.0000 1.000 0.000 1.000
#> GSM217655 2 0.0000 1.000 0.000 1.000
#> GSM217656 2 0.0938 0.988 0.012 0.988
#> GSM217657 2 0.0000 1.000 0.000 1.000
#> GSM217658 2 0.0000 1.000 0.000 1.000
#> GSM217659 2 0.0000 1.000 0.000 1.000
#> GSM217660 2 0.0000 1.000 0.000 1.000
#> GSM217661 2 0.0000 1.000 0.000 1.000
#> GSM217662 2 0.0000 1.000 0.000 1.000
#> GSM217663 2 0.0000 1.000 0.000 1.000
#> GSM217664 2 0.0000 1.000 0.000 1.000
#> GSM217665 2 0.0000 1.000 0.000 1.000
#> GSM217666 2 0.0000 1.000 0.000 1.000
#> GSM217667 2 0.0000 1.000 0.000 1.000
#> GSM217668 1 0.0000 1.000 1.000 0.000
#> GSM217669 1 0.0000 1.000 1.000 0.000
#> GSM217670 1 0.0000 1.000 1.000 0.000
#> GSM217671 1 0.0000 1.000 1.000 0.000
#> GSM217672 1 0.0000 1.000 1.000 0.000
#> GSM217673 1 0.0000 1.000 1.000 0.000
#> GSM217674 1 0.0000 1.000 1.000 0.000
#> GSM217675 1 0.0000 1.000 1.000 0.000
#> GSM217676 1 0.0000 1.000 1.000 0.000
#> GSM217677 1 0.0000 1.000 1.000 0.000
#> GSM217678 1 0.0000 1.000 1.000 0.000
#> GSM217679 1 0.0000 1.000 1.000 0.000
#> GSM217680 1 0.0000 1.000 1.000 0.000
#> GSM217681 1 0.0000 1.000 1.000 0.000
#> GSM217682 1 0.0000 1.000 1.000 0.000
#> GSM217683 1 0.0000 1.000 1.000 0.000
#> GSM217684 1 0.0000 1.000 1.000 0.000
#> GSM217685 2 0.0000 1.000 0.000 1.000
#> GSM217686 2 0.0000 1.000 0.000 1.000
#> GSM217687 2 0.0000 1.000 0.000 1.000
#> GSM217688 2 0.0000 1.000 0.000 1.000
#> GSM217689 2 0.0000 1.000 0.000 1.000
#> GSM217690 2 0.0000 1.000 0.000 1.000
#> GSM217691 2 0.0000 1.000 0.000 1.000
#> GSM217692 2 0.0000 1.000 0.000 1.000
#> GSM217693 2 0.0000 1.000 0.000 1.000
#> GSM217694 2 0.0000 1.000 0.000 1.000
#> GSM217695 2 0.0000 1.000 0.000 1.000
#> GSM217696 2 0.0000 1.000 0.000 1.000
#> GSM217697 2 0.0000 1.000 0.000 1.000
#> GSM217698 2 0.0000 1.000 0.000 1.000
#> GSM217699 2 0.0000 1.000 0.000 1.000
#> GSM217700 2 0.0000 1.000 0.000 1.000
#> GSM217701 2 0.0000 1.000 0.000 1.000
#> GSM217702 2 0.0000 1.000 0.000 1.000
#> GSM217703 2 0.0000 1.000 0.000 1.000
#> GSM217704 2 0.0000 1.000 0.000 1.000
#> GSM217705 1 0.0000 1.000 1.000 0.000
#> GSM217706 1 0.0000 1.000 1.000 0.000
#> GSM217707 1 0.0000 1.000 1.000 0.000
#> GSM217708 1 0.0000 1.000 1.000 0.000
#> GSM217709 1 0.0000 1.000 1.000 0.000
#> GSM217710 1 0.0000 1.000 1.000 0.000
#> GSM217711 1 0.0000 1.000 1.000 0.000
#> GSM217712 1 0.0000 1.000 1.000 0.000
#> GSM217713 1 0.0000 1.000 1.000 0.000
#> GSM217714 1 0.0000 1.000 1.000 0.000
#> GSM217715 1 0.0000 1.000 1.000 0.000
#> GSM217716 1 0.0000 1.000 1.000 0.000
#> GSM217717 1 0.0000 1.000 1.000 0.000
#> GSM217718 1 0.0000 1.000 1.000 0.000
#> GSM217719 1 0.0000 1.000 1.000 0.000
#> GSM217720 1 0.0000 1.000 1.000 0.000
#> GSM217721 1 0.0000 1.000 1.000 0.000
#> GSM217722 1 0.0000 1.000 1.000 0.000
#> GSM217723 1 0.0000 1.000 1.000 0.000
#> GSM217724 1 0.0000 1.000 1.000 0.000
#> GSM217725 1 0.0000 1.000 1.000 0.000
#> GSM217726 1 0.0000 1.000 1.000 0.000
#> GSM217727 1 0.0000 1.000 1.000 0.000
#> GSM217728 1 0.0000 1.000 1.000 0.000
#> GSM217729 1 0.0000 1.000 1.000 0.000
#> GSM217730 1 0.0000 1.000 1.000 0.000
#> GSM217731 1 0.0000 1.000 1.000 0.000
#> GSM217732 1 0.0000 1.000 1.000 0.000
#> GSM217733 1 0.0000 1.000 1.000 0.000
#> GSM217734 1 0.0000 1.000 1.000 0.000
#> GSM217735 1 0.0000 1.000 1.000 0.000
#> GSM217736 1 0.0000 1.000 1.000 0.000
#> GSM217737 2 0.0000 1.000 0.000 1.000
#> GSM217738 2 0.0000 1.000 0.000 1.000
#> GSM217739 2 0.0000 1.000 0.000 1.000
#> GSM217740 2 0.0000 1.000 0.000 1.000
#> GSM217741 2 0.0000 1.000 0.000 1.000
#> GSM217742 2 0.0000 1.000 0.000 1.000
#> GSM217743 2 0.0000 1.000 0.000 1.000
#> GSM217744 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
#> GSM217644 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217645 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217646 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217647 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217648 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217649 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217650 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217651 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217652 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217653 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217654 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217655 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217656 2 0.0892 0.980 0.00 0.98 0.02
#> GSM217657 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217658 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217659 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217660 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217661 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217662 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217663 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217664 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217665 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217666 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217667 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217668 1 0.3686 0.833 0.86 0.14 0.00
#> GSM217669 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217670 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217671 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217672 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217673 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217674 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217675 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217676 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217677 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217678 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217679 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217680 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217681 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217682 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217683 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217684 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217685 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217686 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217687 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217688 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217689 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217690 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217691 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217692 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217693 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217694 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217695 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217696 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217697 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217698 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217699 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217700 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217701 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217702 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217703 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217704 3 0.0000 1.000 0.00 0.00 1.00
#> GSM217705 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217706 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217707 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217708 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217709 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217710 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217711 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217712 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217713 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217714 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217715 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217716 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217717 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217718 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217719 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217720 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217721 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217722 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217723 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217724 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217725 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217726 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217727 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217728 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217729 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217730 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217731 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217732 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217733 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217734 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217735 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217736 1 0.0000 0.997 1.00 0.00 0.00
#> GSM217737 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217738 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217739 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217740 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217741 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217742 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217743 2 0.0000 0.999 0.00 1.00 0.00
#> GSM217744 2 0.0000 0.999 0.00 1.00 0.00
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0336 0.971 0.000 0.992 0.000 0.008
#> GSM217645 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217646 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0188 0.973 0.000 0.996 0.000 0.004
#> GSM217649 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217654 4 0.4522 0.521 0.000 0.320 0.000 0.680
#> GSM217655 2 0.3528 0.761 0.000 0.808 0.000 0.192
#> GSM217656 4 0.1854 0.749 0.024 0.008 0.020 0.948
#> GSM217657 4 0.3402 0.729 0.000 0.164 0.004 0.832
#> GSM217658 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217660 2 0.1474 0.938 0.000 0.948 0.000 0.052
#> GSM217661 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0336 0.971 0.000 0.992 0.000 0.008
#> GSM217663 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0188 0.972 0.000 0.996 0.000 0.004
#> GSM217665 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.975 0.000 1.000 0.000 0.000
#> GSM217668 1 0.3377 0.787 0.848 0.140 0.000 0.012
#> GSM217669 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217670 1 0.1022 0.948 0.968 0.000 0.000 0.032
#> GSM217671 1 0.0469 0.949 0.988 0.000 0.000 0.012
#> GSM217672 1 0.0469 0.949 0.988 0.000 0.000 0.012
#> GSM217673 1 0.0592 0.950 0.984 0.000 0.000 0.016
#> GSM217674 1 0.0817 0.937 0.976 0.000 0.000 0.024
#> GSM217675 1 0.0817 0.938 0.976 0.000 0.000 0.024
#> GSM217676 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0469 0.944 0.988 0.000 0.000 0.012
#> GSM217678 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0336 0.946 0.992 0.000 0.000 0.008
#> GSM217680 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0592 0.942 0.984 0.000 0.000 0.016
#> GSM217683 1 0.0592 0.942 0.984 0.000 0.000 0.016
#> GSM217684 1 0.1474 0.945 0.948 0.000 0.000 0.052
#> GSM217685 3 0.0469 0.985 0.000 0.000 0.988 0.012
#> GSM217686 3 0.0469 0.985 0.000 0.000 0.988 0.012
#> GSM217687 3 0.0188 0.989 0.000 0.000 0.996 0.004
#> GSM217688 3 0.0188 0.989 0.000 0.000 0.996 0.004
#> GSM217689 3 0.2530 0.892 0.000 0.000 0.888 0.112
#> GSM217690 3 0.0921 0.974 0.000 0.000 0.972 0.028
#> GSM217691 3 0.0469 0.984 0.000 0.000 0.988 0.012
#> GSM217692 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0188 0.989 0.000 0.000 0.996 0.004
#> GSM217698 3 0.0188 0.989 0.000 0.000 0.996 0.004
#> GSM217699 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0336 0.986 0.000 0.000 0.992 0.008
#> GSM217701 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> GSM217703 4 0.3219 0.632 0.000 0.000 0.164 0.836
#> GSM217704 3 0.0188 0.988 0.000 0.000 0.996 0.004
#> GSM217705 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217706 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217707 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217708 4 0.4830 0.340 0.392 0.000 0.000 0.608
#> GSM217709 4 0.3486 0.706 0.188 0.000 0.000 0.812
#> GSM217710 4 0.2814 0.739 0.132 0.000 0.000 0.868
#> GSM217711 4 0.2408 0.748 0.104 0.000 0.000 0.896
#> GSM217712 1 0.2408 0.924 0.896 0.000 0.000 0.104
#> GSM217713 1 0.2081 0.937 0.916 0.000 0.000 0.084
#> GSM217714 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217715 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217716 1 0.2081 0.937 0.916 0.000 0.000 0.084
#> GSM217717 1 0.2149 0.935 0.912 0.000 0.000 0.088
#> GSM217718 4 0.4955 0.176 0.444 0.000 0.000 0.556
#> GSM217719 1 0.3219 0.860 0.836 0.000 0.000 0.164
#> GSM217720 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217721 1 0.2760 0.903 0.872 0.000 0.000 0.128
#> GSM217722 1 0.2081 0.937 0.916 0.000 0.000 0.084
#> GSM217723 1 0.2149 0.935 0.912 0.000 0.000 0.088
#> GSM217724 1 0.2011 0.939 0.920 0.000 0.000 0.080
#> GSM217725 1 0.2647 0.911 0.880 0.000 0.000 0.120
#> GSM217726 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217728 1 0.2149 0.935 0.912 0.000 0.000 0.088
#> GSM217729 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0592 0.942 0.984 0.000 0.000 0.016
#> GSM217735 1 0.0188 0.948 0.996 0.000 0.000 0.004
#> GSM217736 1 0.0000 0.949 1.000 0.000 0.000 0.000
#> GSM217737 4 0.3448 0.723 0.000 0.168 0.004 0.828
#> GSM217738 4 0.2773 0.747 0.000 0.116 0.004 0.880
#> GSM217739 4 0.2921 0.739 0.000 0.140 0.000 0.860
#> GSM217740 4 0.2814 0.742 0.000 0.132 0.000 0.868
#> GSM217741 2 0.1022 0.955 0.000 0.968 0.000 0.032
#> GSM217742 2 0.3649 0.744 0.000 0.796 0.000 0.204
#> GSM217743 2 0.1389 0.943 0.000 0.952 0.000 0.048
#> GSM217744 2 0.0707 0.964 0.000 0.980 0.000 0.020
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0912 0.912 0.000 0.972 0.000 0.012 0.016
#> GSM217645 2 0.1121 0.907 0.000 0.956 0.000 0.044 0.000
#> GSM217646 2 0.0451 0.913 0.000 0.988 0.000 0.008 0.004
#> GSM217647 2 0.0992 0.909 0.000 0.968 0.000 0.024 0.008
#> GSM217648 2 0.1211 0.911 0.000 0.960 0.000 0.016 0.024
#> GSM217649 2 0.0727 0.914 0.004 0.980 0.000 0.012 0.004
#> GSM217650 2 0.1628 0.901 0.000 0.936 0.000 0.056 0.008
#> GSM217651 2 0.1893 0.902 0.000 0.928 0.000 0.048 0.024
#> GSM217652 2 0.0955 0.912 0.000 0.968 0.000 0.028 0.004
#> GSM217653 2 0.0912 0.911 0.000 0.972 0.000 0.016 0.012
#> GSM217654 5 0.4014 0.574 0.000 0.256 0.000 0.016 0.728
#> GSM217655 2 0.4318 0.688 0.004 0.736 0.000 0.032 0.228
#> GSM217656 5 0.1153 0.799 0.004 0.024 0.000 0.008 0.964
#> GSM217657 5 0.1270 0.801 0.000 0.052 0.000 0.000 0.948
#> GSM217658 2 0.1282 0.906 0.000 0.952 0.000 0.044 0.004
#> GSM217659 2 0.1329 0.909 0.008 0.956 0.000 0.032 0.004
#> GSM217660 2 0.2971 0.815 0.000 0.836 0.000 0.008 0.156
#> GSM217661 2 0.0807 0.912 0.000 0.976 0.000 0.012 0.012
#> GSM217662 2 0.1082 0.909 0.000 0.964 0.000 0.008 0.028
#> GSM217663 2 0.0992 0.910 0.000 0.968 0.000 0.024 0.008
#> GSM217664 2 0.1444 0.907 0.000 0.948 0.000 0.040 0.012
#> GSM217665 2 0.0898 0.912 0.000 0.972 0.000 0.020 0.008
#> GSM217666 2 0.0992 0.910 0.000 0.968 0.000 0.024 0.008
#> GSM217667 2 0.1012 0.910 0.000 0.968 0.000 0.020 0.012
#> GSM217668 4 0.4562 0.822 0.492 0.008 0.000 0.500 0.000
#> GSM217669 1 0.4306 -0.821 0.508 0.000 0.000 0.492 0.000
#> GSM217670 1 0.4302 -0.800 0.520 0.000 0.000 0.480 0.000
#> GSM217671 1 0.4307 -0.827 0.504 0.000 0.000 0.496 0.000
#> GSM217672 1 0.4307 -0.826 0.504 0.000 0.000 0.496 0.000
#> GSM217673 1 0.4306 -0.821 0.508 0.000 0.000 0.492 0.000
#> GSM217674 1 0.1638 0.483 0.932 0.004 0.000 0.064 0.000
#> GSM217675 1 0.1121 0.510 0.956 0.000 0.000 0.044 0.000
#> GSM217676 1 0.0794 0.517 0.972 0.000 0.000 0.028 0.000
#> GSM217677 1 0.0703 0.519 0.976 0.000 0.000 0.024 0.000
#> GSM217678 1 0.0609 0.524 0.980 0.000 0.000 0.020 0.000
#> GSM217679 1 0.0404 0.523 0.988 0.000 0.000 0.012 0.000
#> GSM217680 1 0.0609 0.520 0.980 0.000 0.000 0.020 0.000
#> GSM217681 1 0.0794 0.519 0.972 0.000 0.000 0.028 0.000
#> GSM217682 1 0.0771 0.520 0.976 0.000 0.000 0.020 0.004
#> GSM217683 1 0.1043 0.509 0.960 0.000 0.000 0.040 0.000
#> GSM217684 1 0.4201 -0.549 0.592 0.000 0.000 0.408 0.000
#> GSM217685 3 0.0451 0.982 0.000 0.000 0.988 0.008 0.004
#> GSM217686 3 0.1041 0.973 0.000 0.000 0.964 0.032 0.004
#> GSM217687 3 0.0290 0.983 0.000 0.000 0.992 0.008 0.000
#> GSM217688 3 0.0290 0.983 0.000 0.000 0.992 0.008 0.000
#> GSM217689 3 0.2304 0.893 0.000 0.000 0.892 0.008 0.100
#> GSM217690 3 0.0290 0.982 0.000 0.000 0.992 0.000 0.008
#> GSM217691 3 0.0451 0.982 0.000 0.000 0.988 0.004 0.008
#> GSM217692 3 0.0290 0.983 0.000 0.000 0.992 0.008 0.000
#> GSM217693 3 0.0510 0.981 0.000 0.000 0.984 0.016 0.000
#> GSM217694 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0404 0.982 0.000 0.000 0.988 0.012 0.000
#> GSM217697 3 0.1671 0.944 0.000 0.000 0.924 0.076 0.000
#> GSM217698 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0162 0.984 0.000 0.000 0.996 0.000 0.004
#> GSM217701 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000
#> GSM217703 5 0.3715 0.553 0.000 0.000 0.260 0.004 0.736
#> GSM217704 3 0.1041 0.971 0.000 0.000 0.964 0.032 0.004
#> GSM217705 1 0.4307 -0.826 0.504 0.000 0.000 0.496 0.000
#> GSM217706 1 0.4306 -0.821 0.508 0.000 0.000 0.492 0.000
#> GSM217707 1 0.4307 -0.832 0.504 0.000 0.000 0.496 0.000
#> GSM217708 4 0.4748 0.831 0.492 0.000 0.000 0.492 0.016
#> GSM217709 4 0.6431 0.435 0.284 0.000 0.000 0.500 0.216
#> GSM217710 5 0.5631 0.158 0.076 0.000 0.000 0.424 0.500
#> GSM217711 5 0.4456 0.531 0.020 0.000 0.000 0.320 0.660
#> GSM217712 1 0.4452 -0.845 0.500 0.000 0.000 0.496 0.004
#> GSM217713 1 0.4306 -0.821 0.508 0.000 0.000 0.492 0.000
#> GSM217714 1 0.4306 -0.821 0.508 0.000 0.000 0.492 0.000
#> GSM217715 1 0.4306 -0.821 0.508 0.000 0.000 0.492 0.000
#> GSM217716 1 0.4307 -0.833 0.504 0.000 0.000 0.496 0.000
#> GSM217717 4 0.4307 0.815 0.500 0.000 0.000 0.500 0.000
#> GSM217718 4 0.4746 0.831 0.480 0.000 0.000 0.504 0.016
#> GSM217719 4 0.4561 0.832 0.488 0.000 0.000 0.504 0.008
#> GSM217720 1 0.4307 -0.826 0.504 0.000 0.000 0.496 0.000
#> GSM217721 4 0.4449 0.831 0.484 0.000 0.000 0.512 0.004
#> GSM217722 1 0.4307 -0.832 0.504 0.000 0.000 0.496 0.000
#> GSM217723 1 0.4288 -0.467 0.612 0.000 0.000 0.384 0.004
#> GSM217724 1 0.4201 -0.560 0.592 0.000 0.000 0.408 0.000
#> GSM217725 1 0.3476 0.359 0.804 0.000 0.000 0.020 0.176
#> GSM217726 1 0.0609 0.521 0.980 0.000 0.000 0.020 0.000
#> GSM217727 1 0.0703 0.522 0.976 0.000 0.000 0.024 0.000
#> GSM217728 1 0.1485 0.510 0.948 0.000 0.000 0.032 0.020
#> GSM217729 1 0.0963 0.512 0.964 0.000 0.000 0.036 0.000
#> GSM217730 1 0.0963 0.512 0.964 0.000 0.000 0.036 0.000
#> GSM217731 1 0.1410 0.491 0.940 0.000 0.000 0.060 0.000
#> GSM217732 1 0.0609 0.522 0.980 0.000 0.000 0.020 0.000
#> GSM217733 1 0.1478 0.491 0.936 0.000 0.000 0.064 0.000
#> GSM217734 1 0.0510 0.523 0.984 0.000 0.000 0.016 0.000
#> GSM217735 1 0.0510 0.523 0.984 0.000 0.000 0.016 0.000
#> GSM217736 1 0.0000 0.524 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.2416 0.779 0.000 0.100 0.000 0.012 0.888
#> GSM217738 5 0.1914 0.801 0.000 0.060 0.000 0.016 0.924
#> GSM217739 5 0.2719 0.789 0.000 0.068 0.000 0.048 0.884
#> GSM217740 5 0.1648 0.802 0.000 0.040 0.000 0.020 0.940
#> GSM217741 2 0.4113 0.756 0.000 0.740 0.000 0.232 0.028
#> GSM217742 2 0.5375 0.655 0.000 0.664 0.000 0.200 0.136
#> GSM217743 2 0.4654 0.636 0.000 0.628 0.000 0.348 0.024
#> GSM217744 2 0.4484 0.684 0.000 0.668 0.000 0.308 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.1708 0.8298 0.000 0.932 0.000 0.004 0.024 NA
#> GSM217645 2 0.2357 0.8061 0.004 0.888 0.000 0.012 0.004 NA
#> GSM217646 2 0.1148 0.8306 0.000 0.960 0.000 0.004 0.020 NA
#> GSM217647 2 0.1088 0.8311 0.000 0.960 0.000 0.000 0.016 NA
#> GSM217648 2 0.1408 0.8288 0.000 0.944 0.000 0.000 0.036 NA
#> GSM217649 2 0.1518 0.8295 0.000 0.944 0.000 0.008 0.024 NA
#> GSM217650 2 0.2355 0.7987 0.008 0.876 0.000 0.004 0.000 NA
#> GSM217651 2 0.2230 0.8151 0.000 0.892 0.000 0.000 0.024 NA
#> GSM217652 2 0.2350 0.8099 0.004 0.896 0.000 0.016 0.008 NA
#> GSM217653 2 0.1074 0.8306 0.000 0.960 0.000 0.000 0.028 NA
#> GSM217654 2 0.7369 -0.4275 0.000 0.324 0.000 0.108 0.292 NA
#> GSM217655 2 0.5189 0.6038 0.008 0.684 0.000 0.024 0.184 NA
#> GSM217656 5 0.6773 0.6706 0.012 0.028 0.000 0.232 0.436 NA
#> GSM217657 5 0.6615 0.7022 0.000 0.064 0.000 0.188 0.496 NA
#> GSM217658 2 0.1806 0.8129 0.004 0.908 0.000 0.000 0.000 NA
#> GSM217659 2 0.1138 0.8307 0.000 0.960 0.000 0.004 0.012 NA
#> GSM217660 2 0.3242 0.7522 0.000 0.816 0.000 0.004 0.148 NA
#> GSM217661 2 0.2773 0.8031 0.004 0.876 0.000 0.008 0.068 NA
#> GSM217662 2 0.2272 0.8252 0.000 0.900 0.000 0.004 0.056 NA
#> GSM217663 2 0.0993 0.8315 0.000 0.964 0.000 0.000 0.012 NA
#> GSM217664 2 0.1858 0.8131 0.000 0.904 0.000 0.000 0.004 NA
#> GSM217665 2 0.1461 0.8304 0.000 0.940 0.000 0.000 0.016 NA
#> GSM217666 2 0.1480 0.8289 0.000 0.940 0.000 0.000 0.020 NA
#> GSM217667 2 0.1480 0.8302 0.000 0.940 0.000 0.000 0.020 NA
#> GSM217668 4 0.4625 0.7827 0.228 0.004 0.000 0.700 0.016 NA
#> GSM217669 4 0.3789 0.8311 0.324 0.000 0.000 0.668 0.004 NA
#> GSM217670 4 0.3717 0.8030 0.384 0.000 0.000 0.616 0.000 NA
#> GSM217671 4 0.4372 0.7020 0.432 0.000 0.000 0.544 0.000 NA
#> GSM217672 4 0.3672 0.8114 0.368 0.000 0.000 0.632 0.000 NA
#> GSM217673 4 0.3547 0.8298 0.332 0.000 0.000 0.668 0.000 NA
#> GSM217674 1 0.3364 0.8384 0.832 0.012 0.000 0.068 0.000 NA
#> GSM217675 1 0.3586 0.8059 0.796 0.000 0.000 0.124 0.000 NA
#> GSM217676 1 0.3637 0.8043 0.792 0.000 0.000 0.124 0.000 NA
#> GSM217677 1 0.1565 0.8868 0.940 0.004 0.000 0.028 0.000 NA
#> GSM217678 1 0.1625 0.8893 0.928 0.000 0.000 0.060 0.000 NA
#> GSM217679 1 0.0790 0.8978 0.968 0.000 0.000 0.032 0.000 NA
#> GSM217680 1 0.0935 0.8876 0.964 0.000 0.000 0.032 0.000 NA
#> GSM217681 1 0.1411 0.8859 0.936 0.000 0.000 0.060 0.000 NA
#> GSM217682 1 0.2328 0.8794 0.892 0.000 0.000 0.052 0.000 NA
#> GSM217683 1 0.2857 0.8607 0.856 0.000 0.000 0.072 0.000 NA
#> GSM217684 4 0.4183 0.5895 0.480 0.000 0.000 0.508 0.000 NA
#> GSM217685 3 0.0603 0.9411 0.000 0.000 0.980 0.004 0.016 NA
#> GSM217686 3 0.1261 0.9347 0.000 0.000 0.952 0.000 0.024 NA
#> GSM217687 3 0.0146 0.9449 0.000 0.000 0.996 0.000 0.000 NA
#> GSM217688 3 0.0436 0.9447 0.000 0.000 0.988 0.004 0.004 NA
#> GSM217689 3 0.2879 0.8520 0.000 0.000 0.864 0.056 0.072 NA
#> GSM217690 3 0.1409 0.9265 0.000 0.000 0.948 0.012 0.032 NA
#> GSM217691 3 0.0862 0.9393 0.008 0.000 0.972 0.004 0.000 NA
#> GSM217692 3 0.0260 0.9445 0.000 0.000 0.992 0.000 0.000 NA
#> GSM217693 3 0.0922 0.9416 0.004 0.000 0.968 0.000 0.004 NA
#> GSM217694 3 0.0291 0.9449 0.004 0.000 0.992 0.000 0.000 NA
#> GSM217695 3 0.0547 0.9449 0.000 0.000 0.980 0.000 0.000 NA
#> GSM217696 3 0.0632 0.9426 0.000 0.000 0.976 0.000 0.000 NA
#> GSM217697 3 0.1204 0.9289 0.000 0.000 0.944 0.000 0.000 NA
#> GSM217698 3 0.0146 0.9447 0.000 0.000 0.996 0.000 0.000 NA
#> GSM217699 3 0.0146 0.9447 0.000 0.000 0.996 0.000 0.000 NA
#> GSM217700 3 0.0260 0.9447 0.000 0.000 0.992 0.000 0.000 NA
#> GSM217701 3 0.0260 0.9447 0.000 0.000 0.992 0.000 0.000 NA
#> GSM217702 3 0.0260 0.9447 0.000 0.000 0.992 0.000 0.000 NA
#> GSM217703 3 0.7274 -0.2534 0.000 0.000 0.368 0.184 0.324 NA
#> GSM217704 3 0.1364 0.9277 0.004 0.000 0.944 0.000 0.004 NA
#> GSM217705 4 0.3563 0.8307 0.336 0.000 0.000 0.664 0.000 NA
#> GSM217706 4 0.3809 0.8284 0.304 0.000 0.000 0.684 0.004 NA
#> GSM217707 4 0.3729 0.8276 0.296 0.000 0.000 0.692 0.000 NA
#> GSM217708 4 0.3644 0.8003 0.252 0.000 0.000 0.732 0.008 NA
#> GSM217709 4 0.3806 0.6350 0.112 0.000 0.000 0.796 0.080 NA
#> GSM217710 4 0.4324 0.2811 0.036 0.000 0.000 0.756 0.156 NA
#> GSM217711 4 0.5242 -0.0793 0.020 0.000 0.000 0.624 0.268 NA
#> GSM217712 4 0.3684 0.8300 0.300 0.000 0.000 0.692 0.004 NA
#> GSM217713 4 0.3620 0.8242 0.352 0.000 0.000 0.648 0.000 NA
#> GSM217714 4 0.3515 0.8314 0.324 0.000 0.000 0.676 0.000 NA
#> GSM217715 4 0.3499 0.8327 0.320 0.000 0.000 0.680 0.000 NA
#> GSM217716 4 0.4535 0.7382 0.424 0.000 0.000 0.548 0.012 NA
#> GSM217717 4 0.4634 0.8140 0.352 0.000 0.000 0.604 0.008 NA
#> GSM217718 4 0.3953 0.8065 0.328 0.000 0.000 0.656 0.016 NA
#> GSM217719 4 0.4479 0.7492 0.368 0.000 0.000 0.600 0.008 NA
#> GSM217720 4 0.3795 0.8062 0.364 0.000 0.000 0.632 0.000 NA
#> GSM217721 4 0.4330 0.8313 0.308 0.000 0.004 0.660 0.008 NA
#> GSM217722 4 0.3428 0.8333 0.304 0.000 0.000 0.696 0.000 NA
#> GSM217723 4 0.5259 0.6716 0.340 0.000 0.000 0.564 0.008 NA
#> GSM217724 4 0.4230 0.7883 0.364 0.000 0.000 0.612 0.000 NA
#> GSM217725 1 0.4121 0.7533 0.784 0.000 0.000 0.104 0.080 NA
#> GSM217726 1 0.2384 0.8789 0.888 0.000 0.000 0.064 0.000 NA
#> GSM217727 1 0.2106 0.8851 0.904 0.000 0.000 0.064 0.000 NA
#> GSM217728 1 0.2434 0.8790 0.892 0.000 0.000 0.064 0.036 NA
#> GSM217729 1 0.1501 0.8799 0.924 0.000 0.000 0.076 0.000 NA
#> GSM217730 1 0.1349 0.8820 0.940 0.000 0.000 0.056 0.000 NA
#> GSM217731 1 0.1779 0.8741 0.920 0.000 0.000 0.064 0.000 NA
#> GSM217732 1 0.2182 0.8520 0.900 0.004 0.000 0.076 0.000 NA
#> GSM217733 1 0.1838 0.8636 0.916 0.000 0.000 0.068 0.000 NA
#> GSM217734 1 0.1082 0.8832 0.956 0.000 0.000 0.040 0.000 NA
#> GSM217735 1 0.1829 0.8635 0.920 0.004 0.000 0.064 0.000 NA
#> GSM217736 1 0.1225 0.8976 0.952 0.000 0.000 0.036 0.000 NA
#> GSM217737 5 0.3019 0.7770 0.000 0.128 0.000 0.012 0.840 NA
#> GSM217738 5 0.2162 0.7993 0.000 0.088 0.000 0.004 0.896 NA
#> GSM217739 5 0.3003 0.7899 0.000 0.104 0.000 0.016 0.852 NA
#> GSM217740 5 0.4100 0.7952 0.000 0.104 0.000 0.040 0.788 NA
#> GSM217741 2 0.5148 0.5233 0.000 0.632 0.000 0.004 0.224 NA
#> GSM217742 2 0.5342 0.2254 0.000 0.512 0.000 0.004 0.388 NA
#> GSM217743 2 0.6104 0.2675 0.000 0.492 0.000 0.012 0.248 NA
#> GSM217744 2 0.5475 0.4690 0.000 0.576 0.000 0.012 0.116 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:NMF 101 3.32e-01 2
#> MAD:NMF 101 2.94e-07 3
#> MAD:NMF 99 2.97e-07 4
#> MAD:NMF 77 8.86e-07 5
#> MAD:NMF 94 1.92e-08 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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.853 0.978 0.987 0.5017 0.495 0.495
#> 3 3 0.741 0.502 0.769 0.2663 0.886 0.770
#> 4 4 0.867 0.886 0.932 0.0497 0.877 0.711
#> 5 5 0.767 0.668 0.768 0.1009 0.954 0.871
#> 6 6 0.803 0.817 0.872 0.0715 0.840 0.531
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
#> GSM217644 2 0.0000 0.994 0.000 1.000
#> GSM217645 2 0.0000 0.994 0.000 1.000
#> GSM217646 2 0.0000 0.994 0.000 1.000
#> GSM217647 2 0.0000 0.994 0.000 1.000
#> GSM217648 2 0.0000 0.994 0.000 1.000
#> GSM217649 2 0.0000 0.994 0.000 1.000
#> GSM217650 2 0.0000 0.994 0.000 1.000
#> GSM217651 2 0.0000 0.994 0.000 1.000
#> GSM217652 2 0.0000 0.994 0.000 1.000
#> GSM217653 2 0.0000 0.994 0.000 1.000
#> GSM217654 2 0.0000 0.994 0.000 1.000
#> GSM217655 2 0.0000 0.994 0.000 1.000
#> GSM217656 2 0.1414 0.985 0.020 0.980
#> GSM217657 2 0.1414 0.985 0.020 0.980
#> GSM217658 2 0.0000 0.994 0.000 1.000
#> GSM217659 2 0.0000 0.994 0.000 1.000
#> GSM217660 2 0.0000 0.994 0.000 1.000
#> GSM217661 2 0.0000 0.994 0.000 1.000
#> GSM217662 2 0.0000 0.994 0.000 1.000
#> GSM217663 2 0.0000 0.994 0.000 1.000
#> GSM217664 2 0.0000 0.994 0.000 1.000
#> GSM217665 2 0.0000 0.994 0.000 1.000
#> GSM217666 2 0.0000 0.994 0.000 1.000
#> GSM217667 2 0.0000 0.994 0.000 1.000
#> GSM217668 1 0.0000 0.978 1.000 0.000
#> GSM217669 1 0.0000 0.978 1.000 0.000
#> GSM217670 1 0.0376 0.977 0.996 0.004
#> GSM217671 1 0.0000 0.978 1.000 0.000
#> GSM217672 1 0.0000 0.978 1.000 0.000
#> GSM217673 1 0.0000 0.978 1.000 0.000
#> GSM217674 1 0.0000 0.978 1.000 0.000
#> GSM217675 1 0.0000 0.978 1.000 0.000
#> GSM217676 1 0.0376 0.977 0.996 0.004
#> GSM217677 1 0.0000 0.978 1.000 0.000
#> GSM217678 1 0.0000 0.978 1.000 0.000
#> GSM217679 1 0.0000 0.978 1.000 0.000
#> GSM217680 1 0.0000 0.978 1.000 0.000
#> GSM217681 1 0.0000 0.978 1.000 0.000
#> GSM217682 1 0.0000 0.978 1.000 0.000
#> GSM217683 1 0.0000 0.978 1.000 0.000
#> GSM217684 1 0.0000 0.978 1.000 0.000
#> GSM217685 2 0.0938 0.992 0.012 0.988
#> GSM217686 2 0.0938 0.992 0.012 0.988
#> GSM217687 2 0.0938 0.992 0.012 0.988
#> GSM217688 2 0.0938 0.992 0.012 0.988
#> GSM217689 2 0.0938 0.992 0.012 0.988
#> GSM217690 2 0.0938 0.992 0.012 0.988
#> GSM217691 2 0.0938 0.992 0.012 0.988
#> GSM217692 2 0.0938 0.992 0.012 0.988
#> GSM217693 2 0.0938 0.992 0.012 0.988
#> GSM217694 2 0.0938 0.992 0.012 0.988
#> GSM217695 2 0.0938 0.992 0.012 0.988
#> GSM217696 2 0.0938 0.992 0.012 0.988
#> GSM217697 2 0.0938 0.992 0.012 0.988
#> GSM217698 2 0.0938 0.992 0.012 0.988
#> GSM217699 2 0.0938 0.992 0.012 0.988
#> GSM217700 2 0.0938 0.992 0.012 0.988
#> GSM217701 2 0.0938 0.992 0.012 0.988
#> GSM217702 2 0.0938 0.992 0.012 0.988
#> GSM217703 2 0.0938 0.992 0.012 0.988
#> GSM217704 2 0.0938 0.992 0.012 0.988
#> GSM217705 1 0.0000 0.978 1.000 0.000
#> GSM217706 1 0.0376 0.977 0.996 0.004
#> GSM217707 1 0.0000 0.978 1.000 0.000
#> GSM217708 1 0.5294 0.885 0.880 0.120
#> GSM217709 1 0.5294 0.885 0.880 0.120
#> GSM217710 1 0.5294 0.885 0.880 0.120
#> GSM217711 1 0.5294 0.885 0.880 0.120
#> GSM217712 1 0.0000 0.978 1.000 0.000
#> GSM217713 1 0.0376 0.977 0.996 0.004
#> GSM217714 1 0.0000 0.978 1.000 0.000
#> GSM217715 1 0.0000 0.978 1.000 0.000
#> GSM217716 1 0.0376 0.977 0.996 0.004
#> GSM217717 1 0.0376 0.977 0.996 0.004
#> GSM217718 1 0.1184 0.969 0.984 0.016
#> GSM217719 1 0.1184 0.969 0.984 0.016
#> GSM217720 1 0.0000 0.978 1.000 0.000
#> GSM217721 1 0.0376 0.977 0.996 0.004
#> GSM217722 1 0.0000 0.978 1.000 0.000
#> GSM217723 1 0.5294 0.885 0.880 0.120
#> GSM217724 1 0.5294 0.885 0.880 0.120
#> GSM217725 1 0.5294 0.885 0.880 0.120
#> GSM217726 1 0.0000 0.978 1.000 0.000
#> GSM217727 1 0.0000 0.978 1.000 0.000
#> GSM217728 1 0.5294 0.885 0.880 0.120
#> GSM217729 1 0.0000 0.978 1.000 0.000
#> GSM217730 1 0.0000 0.978 1.000 0.000
#> GSM217731 1 0.0000 0.978 1.000 0.000
#> GSM217732 1 0.0000 0.978 1.000 0.000
#> GSM217733 1 0.0000 0.978 1.000 0.000
#> GSM217734 1 0.0000 0.978 1.000 0.000
#> GSM217735 1 0.0000 0.978 1.000 0.000
#> GSM217736 1 0.0000 0.978 1.000 0.000
#> GSM217737 2 0.0000 0.994 0.000 1.000
#> GSM217738 2 0.0000 0.994 0.000 1.000
#> GSM217739 2 0.0000 0.994 0.000 1.000
#> GSM217740 2 0.0000 0.994 0.000 1.000
#> GSM217741 2 0.0000 0.994 0.000 1.000
#> GSM217742 2 0.0000 0.994 0.000 1.000
#> GSM217743 2 0.0000 0.994 0.000 1.000
#> GSM217744 2 0.0000 0.994 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.5706 0.2633 0.000 0.680 0.320
#> GSM217645 2 0.5497 0.2608 0.000 0.708 0.292
#> GSM217646 2 0.6225 0.2225 0.000 0.568 0.432
#> GSM217647 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217648 3 0.6180 -0.0363 0.000 0.416 0.584
#> GSM217649 2 0.6225 0.2225 0.000 0.568 0.432
#> GSM217650 2 0.6260 0.2038 0.000 0.552 0.448
#> GSM217651 3 0.6225 -0.0631 0.000 0.432 0.568
#> GSM217652 2 0.6260 0.2038 0.000 0.552 0.448
#> GSM217653 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217654 2 0.1411 0.1876 0.000 0.964 0.036
#> GSM217655 2 0.1411 0.1876 0.000 0.964 0.036
#> GSM217656 2 0.6111 -0.0513 0.000 0.604 0.396
#> GSM217657 2 0.6111 -0.0513 0.000 0.604 0.396
#> GSM217658 2 0.6252 0.2090 0.000 0.556 0.444
#> GSM217659 2 0.6225 0.2225 0.000 0.568 0.432
#> GSM217660 3 0.6307 -0.1135 0.000 0.488 0.512
#> GSM217661 2 0.5760 0.2616 0.000 0.672 0.328
#> GSM217662 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217663 3 0.6274 -0.1069 0.000 0.456 0.544
#> GSM217664 3 0.6286 -0.1285 0.000 0.464 0.536
#> GSM217665 3 0.6168 -0.0366 0.000 0.412 0.588
#> GSM217666 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217667 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217668 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217669 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217670 1 0.0237 0.9734 0.996 0.000 0.004
#> GSM217671 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217676 1 0.0424 0.9709 0.992 0.000 0.008
#> GSM217677 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217685 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217686 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217687 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217688 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217689 2 0.6252 -0.0884 0.000 0.556 0.444
#> GSM217690 2 0.6252 -0.0884 0.000 0.556 0.444
#> GSM217691 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217692 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217693 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217694 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217695 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217696 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217697 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217698 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217699 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217700 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217701 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217702 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217703 2 0.6252 -0.0884 0.000 0.556 0.444
#> GSM217704 3 0.6286 0.1410 0.000 0.464 0.536
#> GSM217705 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217706 1 0.0237 0.9734 0.996 0.000 0.004
#> GSM217707 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217708 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217709 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217710 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217711 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217712 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217713 1 0.0237 0.9734 0.996 0.000 0.004
#> GSM217714 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217716 1 0.0237 0.9734 0.996 0.000 0.004
#> GSM217717 1 0.0237 0.9734 0.996 0.000 0.004
#> GSM217718 1 0.1129 0.9616 0.976 0.004 0.020
#> GSM217719 1 0.1129 0.9616 0.976 0.004 0.020
#> GSM217720 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217721 1 0.0237 0.9734 0.996 0.000 0.004
#> GSM217722 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217723 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217724 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217725 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217726 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217728 1 0.4209 0.8706 0.860 0.020 0.120
#> GSM217729 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.9749 1.000 0.000 0.000
#> GSM217737 3 0.6168 -0.0288 0.000 0.412 0.588
#> GSM217738 3 0.6168 -0.0288 0.000 0.412 0.588
#> GSM217739 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217740 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217741 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217742 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217743 3 0.6111 -0.0127 0.000 0.396 0.604
#> GSM217744 3 0.6111 -0.0127 0.000 0.396 0.604
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.4283 0.558 0.000 0.740 0.004 0.256
#> GSM217645 2 0.4483 0.493 0.000 0.712 0.004 0.284
#> GSM217646 2 0.3157 0.735 0.000 0.852 0.004 0.144
#> GSM217647 2 0.1389 0.824 0.000 0.952 0.048 0.000
#> GSM217648 2 0.1798 0.825 0.000 0.944 0.040 0.016
#> GSM217649 2 0.3157 0.735 0.000 0.852 0.004 0.144
#> GSM217650 2 0.2944 0.748 0.000 0.868 0.004 0.128
#> GSM217651 2 0.1520 0.819 0.000 0.956 0.024 0.020
#> GSM217652 2 0.2944 0.748 0.000 0.868 0.004 0.128
#> GSM217653 2 0.1389 0.824 0.000 0.952 0.048 0.000
#> GSM217654 4 0.5143 0.338 0.000 0.456 0.004 0.540
#> GSM217655 4 0.5143 0.338 0.000 0.456 0.004 0.540
#> GSM217656 4 0.2589 0.608 0.000 0.000 0.116 0.884
#> GSM217657 4 0.2589 0.608 0.000 0.000 0.116 0.884
#> GSM217658 2 0.2999 0.746 0.000 0.864 0.004 0.132
#> GSM217659 2 0.3157 0.735 0.000 0.852 0.004 0.144
#> GSM217660 2 0.3333 0.788 0.000 0.872 0.040 0.088
#> GSM217661 2 0.4220 0.574 0.000 0.748 0.004 0.248
#> GSM217662 2 0.1389 0.824 0.000 0.952 0.048 0.000
#> GSM217663 2 0.2111 0.813 0.000 0.932 0.024 0.044
#> GSM217664 2 0.1398 0.803 0.000 0.956 0.004 0.040
#> GSM217665 2 0.1109 0.823 0.000 0.968 0.028 0.004
#> GSM217666 2 0.1474 0.823 0.000 0.948 0.052 0.000
#> GSM217667 2 0.1474 0.823 0.000 0.948 0.052 0.000
#> GSM217668 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217669 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217670 1 0.0188 0.974 0.996 0.000 0.000 0.004
#> GSM217671 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217672 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217673 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217674 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217676 1 0.0336 0.972 0.992 0.000 0.000 0.008
#> GSM217677 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217684 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217685 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217686 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217687 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217688 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217689 3 0.2281 0.896 0.000 0.000 0.904 0.096
#> GSM217690 3 0.2281 0.896 0.000 0.000 0.904 0.096
#> GSM217691 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217703 3 0.2281 0.896 0.000 0.000 0.904 0.096
#> GSM217704 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217705 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217706 1 0.0188 0.974 0.996 0.000 0.000 0.004
#> GSM217707 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217708 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217709 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217710 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217711 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217712 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217713 1 0.0188 0.974 0.996 0.000 0.000 0.004
#> GSM217714 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217715 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217716 1 0.0188 0.974 0.996 0.000 0.000 0.004
#> GSM217717 1 0.0188 0.974 0.996 0.000 0.000 0.004
#> GSM217718 1 0.0817 0.962 0.976 0.000 0.000 0.024
#> GSM217719 1 0.0817 0.962 0.976 0.000 0.000 0.024
#> GSM217720 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217721 1 0.0188 0.974 0.996 0.000 0.000 0.004
#> GSM217722 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217723 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217724 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217725 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217726 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217728 1 0.2921 0.874 0.860 0.000 0.000 0.140
#> GSM217729 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.976 1.000 0.000 0.000 0.000
#> GSM217737 2 0.4259 0.774 0.000 0.816 0.056 0.128
#> GSM217738 2 0.4259 0.774 0.000 0.816 0.056 0.128
#> GSM217739 2 0.4037 0.776 0.000 0.832 0.056 0.112
#> GSM217740 2 0.4037 0.776 0.000 0.832 0.056 0.112
#> GSM217741 2 0.4037 0.776 0.000 0.832 0.056 0.112
#> GSM217742 2 0.4037 0.776 0.000 0.832 0.056 0.112
#> GSM217743 2 0.4037 0.776 0.000 0.832 0.056 0.112
#> GSM217744 2 0.4037 0.776 0.000 0.832 0.056 0.112
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.3684 0.4332 NA 0.720 0.000 0.000 0.280
#> GSM217645 2 0.3508 0.4302 NA 0.748 0.000 0.000 0.252
#> GSM217646 2 0.4161 0.3695 NA 0.608 0.000 0.000 0.392
#> GSM217647 5 0.4920 0.3581 NA 0.384 0.032 0.000 0.584
#> GSM217648 5 0.5003 0.2632 NA 0.424 0.032 0.000 0.544
#> GSM217649 2 0.4161 0.3695 NA 0.608 0.000 0.000 0.392
#> GSM217650 2 0.4201 0.3384 NA 0.592 0.000 0.000 0.408
#> GSM217651 5 0.4735 0.1365 NA 0.460 0.016 0.000 0.524
#> GSM217652 2 0.4201 0.3384 NA 0.592 0.000 0.000 0.408
#> GSM217653 5 0.4920 0.3581 NA 0.384 0.032 0.000 0.584
#> GSM217654 2 0.0404 0.3604 NA 0.988 0.000 0.000 0.000
#> GSM217655 2 0.0404 0.3604 NA 0.988 0.000 0.000 0.000
#> GSM217656 2 0.5111 0.1642 NA 0.500 0.000 0.000 0.036
#> GSM217657 2 0.5111 0.1642 NA 0.500 0.000 0.000 0.036
#> GSM217658 2 0.4192 0.3472 NA 0.596 0.000 0.000 0.404
#> GSM217659 2 0.4161 0.3695 NA 0.608 0.000 0.000 0.392
#> GSM217660 2 0.5047 -0.1933 NA 0.496 0.032 0.000 0.472
#> GSM217661 2 0.3730 0.4314 NA 0.712 0.000 0.000 0.288
#> GSM217662 5 0.4920 0.3581 NA 0.384 0.032 0.000 0.584
#> GSM217663 5 0.4746 0.0416 NA 0.480 0.016 0.000 0.504
#> GSM217664 2 0.4307 -0.0267 NA 0.504 0.000 0.000 0.496
#> GSM217665 5 0.4708 0.2206 NA 0.436 0.016 0.000 0.548
#> GSM217666 5 0.4980 0.3615 NA 0.380 0.036 0.000 0.584
#> GSM217667 5 0.5000 0.3487 NA 0.388 0.036 0.000 0.576
#> GSM217668 4 0.1908 0.7848 NA 0.000 0.000 0.908 0.000
#> GSM217669 4 0.0510 0.7872 NA 0.000 0.000 0.984 0.000
#> GSM217670 4 0.0162 0.7839 NA 0.000 0.000 0.996 0.000
#> GSM217671 4 0.0290 0.7855 NA 0.000 0.000 0.992 0.000
#> GSM217672 4 0.0290 0.7855 NA 0.000 0.000 0.992 0.000
#> GSM217673 4 0.0290 0.7855 NA 0.000 0.000 0.992 0.000
#> GSM217674 4 0.4150 0.7542 NA 0.000 0.000 0.612 0.000
#> GSM217675 4 0.4182 0.7464 NA 0.000 0.000 0.600 0.000
#> GSM217676 4 0.3857 0.7682 NA 0.000 0.000 0.688 0.000
#> GSM217677 4 0.4150 0.7542 NA 0.000 0.000 0.612 0.000
#> GSM217678 4 0.4101 0.7592 NA 0.000 0.000 0.628 0.000
#> GSM217679 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217680 4 0.4101 0.7592 NA 0.000 0.000 0.628 0.000
#> GSM217681 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217682 4 0.4171 0.7487 NA 0.000 0.000 0.604 0.000
#> GSM217683 4 0.4171 0.7487 NA 0.000 0.000 0.604 0.000
#> GSM217684 4 0.4088 0.7572 NA 0.000 0.000 0.632 0.000
#> GSM217685 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217689 3 0.2597 0.9192 NA 0.040 0.904 0.000 0.036
#> GSM217690 3 0.2597 0.9192 NA 0.040 0.904 0.000 0.036
#> GSM217691 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217703 3 0.2597 0.9192 NA 0.040 0.904 0.000 0.036
#> GSM217704 3 0.0000 0.9864 NA 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0794 0.7886 NA 0.000 0.000 0.972 0.000
#> GSM217706 4 0.0510 0.7870 NA 0.000 0.000 0.984 0.000
#> GSM217707 4 0.0609 0.7889 NA 0.000 0.000 0.980 0.000
#> GSM217708 4 0.3586 0.6313 NA 0.000 0.000 0.736 0.000
#> GSM217709 4 0.3561 0.6297 NA 0.000 0.000 0.740 0.000
#> GSM217710 4 0.3561 0.6297 NA 0.000 0.000 0.740 0.000
#> GSM217711 4 0.3561 0.6297 NA 0.000 0.000 0.740 0.000
#> GSM217712 4 0.0162 0.7859 NA 0.000 0.000 0.996 0.000
#> GSM217713 4 0.0162 0.7839 NA 0.000 0.000 0.996 0.000
#> GSM217714 4 0.0290 0.7855 NA 0.000 0.000 0.992 0.000
#> GSM217715 4 0.0290 0.7855 NA 0.000 0.000 0.992 0.000
#> GSM217716 4 0.0162 0.7839 NA 0.000 0.000 0.996 0.000
#> GSM217717 4 0.0162 0.7839 NA 0.000 0.000 0.996 0.000
#> GSM217718 4 0.2127 0.7383 NA 0.000 0.000 0.892 0.000
#> GSM217719 4 0.2127 0.7383 NA 0.000 0.000 0.892 0.000
#> GSM217720 4 0.0794 0.7886 NA 0.000 0.000 0.972 0.000
#> GSM217721 4 0.0162 0.7839 NA 0.000 0.000 0.996 0.000
#> GSM217722 4 0.0162 0.7859 NA 0.000 0.000 0.996 0.000
#> GSM217723 4 0.3913 0.6481 NA 0.000 0.000 0.676 0.000
#> GSM217724 4 0.4015 0.6513 NA 0.000 0.000 0.652 0.000
#> GSM217725 4 0.4015 0.6513 NA 0.000 0.000 0.652 0.000
#> GSM217726 4 0.4161 0.7540 NA 0.000 0.000 0.608 0.000
#> GSM217727 4 0.4161 0.7540 NA 0.000 0.000 0.608 0.000
#> GSM217728 4 0.4015 0.6513 NA 0.000 0.000 0.652 0.000
#> GSM217729 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217730 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217731 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217732 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217733 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217734 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217735 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217736 4 0.4150 0.7549 NA 0.000 0.000 0.612 0.000
#> GSM217737 5 0.1836 0.5703 NA 0.032 0.036 0.000 0.932
#> GSM217738 5 0.1836 0.5703 NA 0.032 0.036 0.000 0.932
#> GSM217739 5 0.0963 0.5776 NA 0.000 0.036 0.000 0.964
#> GSM217740 5 0.0963 0.5776 NA 0.000 0.036 0.000 0.964
#> GSM217741 5 0.0963 0.5776 NA 0.000 0.036 0.000 0.964
#> GSM217742 5 0.0963 0.5776 NA 0.000 0.036 0.000 0.964
#> GSM217743 5 0.0963 0.5776 NA 0.000 0.036 0.000 0.964
#> GSM217744 5 0.0963 0.5776 NA 0.000 0.036 0.000 0.964
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.1957 0.741 0.000 0.888 0.000 0.000 0.000 0.112
#> GSM217645 2 0.2260 0.717 0.000 0.860 0.000 0.000 0.000 0.140
#> GSM217646 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.3288 0.732 0.000 0.724 0.000 0.000 0.276 0.000
#> GSM217648 2 0.3151 0.750 0.000 0.748 0.000 0.000 0.252 0.000
#> GSM217649 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0458 0.807 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217651 2 0.2340 0.806 0.000 0.852 0.000 0.000 0.148 0.000
#> GSM217652 2 0.0458 0.807 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217653 2 0.3288 0.732 0.000 0.724 0.000 0.000 0.276 0.000
#> GSM217654 2 0.3782 0.293 0.000 0.588 0.000 0.000 0.000 0.412
#> GSM217655 2 0.3782 0.293 0.000 0.588 0.000 0.000 0.000 0.412
#> GSM217656 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM217657 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM217658 2 0.0363 0.806 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM217659 2 0.0000 0.802 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 2 0.4559 0.708 0.000 0.676 0.004 0.000 0.252 0.068
#> GSM217661 2 0.1863 0.747 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM217662 2 0.3288 0.732 0.000 0.724 0.000 0.000 0.276 0.000
#> GSM217663 2 0.2135 0.813 0.000 0.872 0.000 0.000 0.128 0.000
#> GSM217664 2 0.1863 0.816 0.000 0.896 0.000 0.000 0.104 0.000
#> GSM217665 2 0.2562 0.797 0.000 0.828 0.000 0.000 0.172 0.000
#> GSM217666 2 0.3126 0.754 0.000 0.752 0.000 0.000 0.248 0.000
#> GSM217667 2 0.3076 0.760 0.000 0.760 0.000 0.000 0.240 0.000
#> GSM217668 1 0.3971 -0.300 0.548 0.000 0.000 0.448 0.004 0.000
#> GSM217669 4 0.3684 0.749 0.372 0.000 0.000 0.628 0.000 0.000
#> GSM217670 4 0.3464 0.780 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM217671 4 0.3634 0.762 0.356 0.000 0.000 0.644 0.000 0.000
#> GSM217672 4 0.3634 0.762 0.356 0.000 0.000 0.644 0.000 0.000
#> GSM217673 4 0.3634 0.762 0.356 0.000 0.000 0.644 0.000 0.000
#> GSM217674 1 0.0146 0.929 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217675 1 0.0858 0.909 0.968 0.000 0.000 0.028 0.004 0.000
#> GSM217676 1 0.3789 0.258 0.660 0.000 0.000 0.332 0.008 0.000
#> GSM217677 1 0.0146 0.929 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217678 1 0.0713 0.912 0.972 0.000 0.000 0.028 0.000 0.000
#> GSM217679 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217680 1 0.0790 0.907 0.968 0.000 0.000 0.032 0.000 0.000
#> GSM217681 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217682 1 0.0603 0.917 0.980 0.000 0.000 0.016 0.004 0.000
#> GSM217683 1 0.0603 0.917 0.980 0.000 0.000 0.016 0.004 0.000
#> GSM217684 1 0.1866 0.852 0.908 0.000 0.000 0.084 0.008 0.000
#> GSM217685 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217686 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217687 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217688 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217689 3 0.1765 0.906 0.000 0.000 0.904 0.000 0.000 0.096
#> GSM217690 3 0.1765 0.906 0.000 0.000 0.904 0.000 0.000 0.096
#> GSM217691 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217692 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217693 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217694 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217695 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.1765 0.906 0.000 0.000 0.904 0.000 0.000 0.096
#> GSM217704 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217705 4 0.3782 0.699 0.412 0.000 0.000 0.588 0.000 0.000
#> GSM217706 4 0.3578 0.773 0.340 0.000 0.000 0.660 0.000 0.000
#> GSM217707 4 0.3647 0.759 0.360 0.000 0.000 0.640 0.000 0.000
#> GSM217708 4 0.1480 0.591 0.040 0.000 0.000 0.940 0.020 0.000
#> GSM217709 4 0.1257 0.591 0.028 0.000 0.000 0.952 0.020 0.000
#> GSM217710 4 0.1257 0.591 0.028 0.000 0.000 0.952 0.020 0.000
#> GSM217711 4 0.1257 0.591 0.028 0.000 0.000 0.952 0.020 0.000
#> GSM217712 4 0.3547 0.775 0.332 0.000 0.000 0.668 0.000 0.000
#> GSM217713 4 0.3464 0.780 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM217714 4 0.3647 0.758 0.360 0.000 0.000 0.640 0.000 0.000
#> GSM217715 4 0.3647 0.758 0.360 0.000 0.000 0.640 0.000 0.000
#> GSM217716 4 0.3464 0.780 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM217717 4 0.3464 0.780 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM217718 4 0.3253 0.734 0.192 0.000 0.000 0.788 0.020 0.000
#> GSM217719 4 0.3253 0.734 0.192 0.000 0.000 0.788 0.020 0.000
#> GSM217720 4 0.3782 0.699 0.412 0.000 0.000 0.588 0.000 0.000
#> GSM217721 4 0.3464 0.780 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM217722 4 0.3563 0.774 0.336 0.000 0.000 0.664 0.000 0.000
#> GSM217723 4 0.3156 0.539 0.180 0.000 0.000 0.800 0.020 0.000
#> GSM217724 4 0.3487 0.501 0.224 0.000 0.000 0.756 0.020 0.000
#> GSM217725 4 0.3487 0.501 0.224 0.000 0.000 0.756 0.020 0.000
#> GSM217726 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 4 0.3487 0.501 0.224 0.000 0.000 0.756 0.020 0.000
#> GSM217729 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217730 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217731 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217732 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217733 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217734 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217735 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217736 1 0.0146 0.932 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM217737 5 0.1398 0.964 0.000 0.052 0.000 0.000 0.940 0.008
#> GSM217738 5 0.1398 0.964 0.000 0.052 0.000 0.000 0.940 0.008
#> GSM217739 5 0.0713 0.988 0.000 0.028 0.000 0.000 0.972 0.000
#> GSM217740 5 0.0713 0.988 0.000 0.028 0.000 0.000 0.972 0.000
#> GSM217741 5 0.0713 0.988 0.000 0.028 0.000 0.000 0.972 0.000
#> GSM217742 5 0.0713 0.988 0.000 0.028 0.000 0.000 0.972 0.000
#> GSM217743 5 0.0713 0.988 0.000 0.028 0.000 0.000 0.972 0.000
#> GSM217744 5 0.0713 0.988 0.000 0.028 0.000 0.000 0.972 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:hclust 101 3.32e-01 2
#> ATC:hclust 49 NA 3
#> ATC:hclust 98 4.58e-06 4
#> ATC:hclust 77 1.96e-03 5
#> ATC:hclust 97 2.43e-11 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.998 0.998 0.5050 0.495 0.495
#> 3 3 0.744 0.871 0.772 0.2428 0.873 0.744
#> 4 4 0.664 0.885 0.816 0.1288 0.870 0.653
#> 5 5 0.771 0.802 0.832 0.0735 0.970 0.886
#> 6 6 0.853 0.787 0.818 0.0485 0.960 0.832
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
#> GSM217644 2 0.0000 0.998 0.000 1.000
#> GSM217645 2 0.0000 0.998 0.000 1.000
#> GSM217646 2 0.0000 0.998 0.000 1.000
#> GSM217647 2 0.0000 0.998 0.000 1.000
#> GSM217648 2 0.0000 0.998 0.000 1.000
#> GSM217649 2 0.0000 0.998 0.000 1.000
#> GSM217650 2 0.0000 0.998 0.000 1.000
#> GSM217651 2 0.0000 0.998 0.000 1.000
#> GSM217652 2 0.0000 0.998 0.000 1.000
#> GSM217653 2 0.0000 0.998 0.000 1.000
#> GSM217654 2 0.0000 0.998 0.000 1.000
#> GSM217655 2 0.0000 0.998 0.000 1.000
#> GSM217656 2 0.0000 0.998 0.000 1.000
#> GSM217657 2 0.0000 0.998 0.000 1.000
#> GSM217658 2 0.0000 0.998 0.000 1.000
#> GSM217659 2 0.0000 0.998 0.000 1.000
#> GSM217660 2 0.0000 0.998 0.000 1.000
#> GSM217661 2 0.0000 0.998 0.000 1.000
#> GSM217662 2 0.0000 0.998 0.000 1.000
#> GSM217663 2 0.0000 0.998 0.000 1.000
#> GSM217664 2 0.0000 0.998 0.000 1.000
#> GSM217665 2 0.0000 0.998 0.000 1.000
#> GSM217666 2 0.0000 0.998 0.000 1.000
#> GSM217667 2 0.0000 0.998 0.000 1.000
#> GSM217668 1 0.0376 0.998 0.996 0.004
#> GSM217669 1 0.0376 0.998 0.996 0.004
#> GSM217670 1 0.0376 0.998 0.996 0.004
#> GSM217671 1 0.0376 0.998 0.996 0.004
#> GSM217672 1 0.0376 0.998 0.996 0.004
#> GSM217673 1 0.0376 0.998 0.996 0.004
#> GSM217674 1 0.0000 0.998 1.000 0.000
#> GSM217675 1 0.0000 0.998 1.000 0.000
#> GSM217676 1 0.0000 0.998 1.000 0.000
#> GSM217677 1 0.0000 0.998 1.000 0.000
#> GSM217678 1 0.0000 0.998 1.000 0.000
#> GSM217679 1 0.0000 0.998 1.000 0.000
#> GSM217680 1 0.0000 0.998 1.000 0.000
#> GSM217681 1 0.0000 0.998 1.000 0.000
#> GSM217682 1 0.0000 0.998 1.000 0.000
#> GSM217683 1 0.0000 0.998 1.000 0.000
#> GSM217684 1 0.0376 0.998 0.996 0.004
#> GSM217685 2 0.0376 0.997 0.004 0.996
#> GSM217686 2 0.0376 0.997 0.004 0.996
#> GSM217687 2 0.0376 0.997 0.004 0.996
#> GSM217688 2 0.0376 0.997 0.004 0.996
#> GSM217689 2 0.0376 0.997 0.004 0.996
#> GSM217690 2 0.0376 0.997 0.004 0.996
#> GSM217691 2 0.0376 0.997 0.004 0.996
#> GSM217692 2 0.0376 0.997 0.004 0.996
#> GSM217693 2 0.0376 0.997 0.004 0.996
#> GSM217694 2 0.0376 0.997 0.004 0.996
#> GSM217695 2 0.0376 0.997 0.004 0.996
#> GSM217696 2 0.0376 0.997 0.004 0.996
#> GSM217697 2 0.0376 0.997 0.004 0.996
#> GSM217698 2 0.0376 0.997 0.004 0.996
#> GSM217699 2 0.0376 0.997 0.004 0.996
#> GSM217700 2 0.0376 0.997 0.004 0.996
#> GSM217701 2 0.0376 0.997 0.004 0.996
#> GSM217702 2 0.0376 0.997 0.004 0.996
#> GSM217703 2 0.0376 0.997 0.004 0.996
#> GSM217704 2 0.0376 0.997 0.004 0.996
#> GSM217705 1 0.0376 0.998 0.996 0.004
#> GSM217706 1 0.0376 0.998 0.996 0.004
#> GSM217707 1 0.0376 0.998 0.996 0.004
#> GSM217708 1 0.0000 0.998 1.000 0.000
#> GSM217709 1 0.0376 0.998 0.996 0.004
#> GSM217710 1 0.0376 0.998 0.996 0.004
#> GSM217711 1 0.0376 0.998 0.996 0.004
#> GSM217712 1 0.0376 0.998 0.996 0.004
#> GSM217713 1 0.0376 0.998 0.996 0.004
#> GSM217714 1 0.0376 0.998 0.996 0.004
#> GSM217715 1 0.0376 0.998 0.996 0.004
#> GSM217716 1 0.0376 0.998 0.996 0.004
#> GSM217717 1 0.0376 0.998 0.996 0.004
#> GSM217718 1 0.0376 0.998 0.996 0.004
#> GSM217719 1 0.0376 0.998 0.996 0.004
#> GSM217720 1 0.0376 0.998 0.996 0.004
#> GSM217721 1 0.0376 0.998 0.996 0.004
#> GSM217722 1 0.0376 0.998 0.996 0.004
#> GSM217723 1 0.0000 0.998 1.000 0.000
#> GSM217724 1 0.0000 0.998 1.000 0.000
#> GSM217725 1 0.0000 0.998 1.000 0.000
#> GSM217726 1 0.0000 0.998 1.000 0.000
#> GSM217727 1 0.0000 0.998 1.000 0.000
#> GSM217728 1 0.0000 0.998 1.000 0.000
#> GSM217729 1 0.0000 0.998 1.000 0.000
#> GSM217730 1 0.0000 0.998 1.000 0.000
#> GSM217731 1 0.0000 0.998 1.000 0.000
#> GSM217732 1 0.0000 0.998 1.000 0.000
#> GSM217733 1 0.0000 0.998 1.000 0.000
#> GSM217734 1 0.0000 0.998 1.000 0.000
#> GSM217735 1 0.0000 0.998 1.000 0.000
#> GSM217736 1 0.0000 0.998 1.000 0.000
#> GSM217737 2 0.0000 0.998 0.000 1.000
#> GSM217738 2 0.0000 0.998 0.000 1.000
#> GSM217739 2 0.0000 0.998 0.000 1.000
#> GSM217740 2 0.0000 0.998 0.000 1.000
#> GSM217741 2 0.0000 0.998 0.000 1.000
#> GSM217742 2 0.0000 0.998 0.000 1.000
#> GSM217743 2 0.0000 0.998 0.000 1.000
#> GSM217744 2 0.0000 0.998 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217645 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217646 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217647 2 0.1031 0.926 0.000 0.976 0.024
#> GSM217648 2 0.1031 0.926 0.000 0.976 0.024
#> GSM217649 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217650 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217651 2 0.1289 0.930 0.000 0.968 0.032
#> GSM217652 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217653 2 0.1031 0.926 0.000 0.976 0.024
#> GSM217654 2 0.1753 0.919 0.000 0.952 0.048
#> GSM217655 2 0.1753 0.919 0.000 0.952 0.048
#> GSM217656 2 0.6796 0.368 0.236 0.708 0.056
#> GSM217657 2 0.2261 0.900 0.000 0.932 0.068
#> GSM217658 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217659 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217660 2 0.1860 0.927 0.000 0.948 0.052
#> GSM217661 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217662 2 0.1031 0.926 0.000 0.976 0.024
#> GSM217663 2 0.1411 0.929 0.000 0.964 0.036
#> GSM217664 2 0.1163 0.929 0.000 0.972 0.028
#> GSM217665 2 0.0424 0.924 0.000 0.992 0.008
#> GSM217666 2 0.1031 0.926 0.000 0.976 0.024
#> GSM217667 2 0.1031 0.926 0.000 0.976 0.024
#> GSM217668 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217669 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217674 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217675 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217676 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217677 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217678 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217679 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217680 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217681 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217682 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217683 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217684 1 0.4399 0.805 0.812 0.000 0.188
#> GSM217685 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217686 3 0.6267 0.958 0.000 0.452 0.548
#> GSM217687 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217688 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217689 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217690 3 0.6225 0.982 0.000 0.432 0.568
#> GSM217691 3 0.6225 0.982 0.000 0.432 0.568
#> GSM217692 3 0.6267 0.958 0.000 0.452 0.548
#> GSM217693 3 0.6244 0.973 0.000 0.440 0.560
#> GSM217694 3 0.6225 0.982 0.000 0.432 0.568
#> GSM217695 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217696 3 0.6267 0.958 0.000 0.452 0.548
#> GSM217697 3 0.6267 0.958 0.000 0.452 0.548
#> GSM217698 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217699 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217700 3 0.6225 0.982 0.000 0.432 0.568
#> GSM217701 3 0.6260 0.956 0.000 0.448 0.552
#> GSM217702 3 0.6225 0.982 0.000 0.432 0.568
#> GSM217703 3 0.6215 0.984 0.000 0.428 0.572
#> GSM217704 3 0.6225 0.982 0.000 0.432 0.568
#> GSM217705 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.810 1.000 0.000 0.000
#> GSM217723 1 0.4605 0.804 0.796 0.000 0.204
#> GSM217724 1 0.6204 0.799 0.576 0.000 0.424
#> GSM217725 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217726 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217727 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217728 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217729 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217730 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217731 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217732 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217733 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217734 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217735 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217736 1 0.6215 0.799 0.572 0.000 0.428
#> GSM217737 2 0.1529 0.918 0.000 0.960 0.040
#> GSM217738 2 0.1529 0.918 0.000 0.960 0.040
#> GSM217739 2 0.1411 0.921 0.000 0.964 0.036
#> GSM217740 2 0.1411 0.921 0.000 0.964 0.036
#> GSM217741 2 0.1411 0.921 0.000 0.964 0.036
#> GSM217742 2 0.1411 0.921 0.000 0.964 0.036
#> GSM217743 2 0.1411 0.921 0.000 0.964 0.036
#> GSM217744 2 0.1411 0.921 0.000 0.964 0.036
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.3399 0.888 0.000 0.868 0.040 0.092
#> GSM217645 2 0.3399 0.888 0.000 0.868 0.040 0.092
#> GSM217646 2 0.3333 0.889 0.000 0.872 0.040 0.088
#> GSM217647 2 0.0000 0.884 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.884 0.000 1.000 0.000 0.000
#> GSM217649 2 0.3333 0.889 0.000 0.872 0.040 0.088
#> GSM217650 2 0.3333 0.889 0.000 0.872 0.040 0.088
#> GSM217651 2 0.3243 0.890 0.000 0.876 0.036 0.088
#> GSM217652 2 0.3333 0.889 0.000 0.872 0.040 0.088
#> GSM217653 2 0.0000 0.884 0.000 1.000 0.000 0.000
#> GSM217654 2 0.4907 0.813 0.000 0.764 0.060 0.176
#> GSM217655 2 0.4907 0.813 0.000 0.764 0.060 0.176
#> GSM217656 4 0.7256 0.288 0.020 0.176 0.196 0.608
#> GSM217657 2 0.5714 0.750 0.000 0.716 0.128 0.156
#> GSM217658 2 0.3333 0.889 0.000 0.872 0.040 0.088
#> GSM217659 2 0.3333 0.889 0.000 0.872 0.040 0.088
#> GSM217660 2 0.3243 0.890 0.000 0.876 0.036 0.088
#> GSM217661 2 0.3399 0.888 0.000 0.868 0.040 0.092
#> GSM217662 2 0.0000 0.884 0.000 1.000 0.000 0.000
#> GSM217663 2 0.3333 0.889 0.000 0.872 0.040 0.088
#> GSM217664 2 0.3243 0.890 0.000 0.876 0.036 0.088
#> GSM217665 2 0.0000 0.884 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.884 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.884 0.000 1.000 0.000 0.000
#> GSM217668 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217669 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217670 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217671 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217672 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217673 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217674 1 0.0817 0.922 0.976 0.000 0.024 0.000
#> GSM217675 1 0.0817 0.922 0.976 0.000 0.024 0.000
#> GSM217676 1 0.0707 0.923 0.980 0.000 0.020 0.000
#> GSM217677 1 0.0336 0.926 0.992 0.000 0.008 0.000
#> GSM217678 1 0.0707 0.923 0.980 0.000 0.020 0.000
#> GSM217679 1 0.0817 0.922 0.976 0.000 0.024 0.000
#> GSM217680 1 0.0707 0.923 0.980 0.000 0.020 0.000
#> GSM217681 1 0.0469 0.925 0.988 0.000 0.012 0.000
#> GSM217682 1 0.0921 0.921 0.972 0.000 0.028 0.000
#> GSM217683 1 0.0921 0.921 0.972 0.000 0.028 0.000
#> GSM217684 1 0.5781 -0.260 0.584 0.000 0.036 0.380
#> GSM217685 3 0.3545 0.975 0.000 0.164 0.828 0.008
#> GSM217686 3 0.3768 0.967 0.000 0.184 0.808 0.008
#> GSM217687 3 0.3545 0.975 0.000 0.164 0.828 0.008
#> GSM217688 3 0.3545 0.975 0.000 0.164 0.828 0.008
#> GSM217689 3 0.4849 0.944 0.000 0.164 0.772 0.064
#> GSM217690 3 0.4849 0.944 0.000 0.164 0.772 0.064
#> GSM217691 3 0.3900 0.975 0.000 0.164 0.816 0.020
#> GSM217692 3 0.4121 0.966 0.000 0.184 0.796 0.020
#> GSM217693 3 0.4121 0.966 0.000 0.184 0.796 0.020
#> GSM217694 3 0.3900 0.975 0.000 0.164 0.816 0.020
#> GSM217695 3 0.3900 0.975 0.000 0.164 0.816 0.020
#> GSM217696 3 0.4121 0.966 0.000 0.184 0.796 0.020
#> GSM217697 3 0.4121 0.966 0.000 0.184 0.796 0.020
#> GSM217698 3 0.3790 0.976 0.000 0.164 0.820 0.016
#> GSM217699 3 0.3219 0.977 0.000 0.164 0.836 0.000
#> GSM217700 3 0.3219 0.977 0.000 0.164 0.836 0.000
#> GSM217701 3 0.3219 0.977 0.000 0.164 0.836 0.000
#> GSM217702 3 0.3219 0.977 0.000 0.164 0.836 0.000
#> GSM217703 3 0.4849 0.944 0.000 0.164 0.772 0.064
#> GSM217704 3 0.3900 0.975 0.000 0.164 0.816 0.020
#> GSM217705 4 0.4741 0.936 0.328 0.000 0.004 0.668
#> GSM217706 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217707 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217708 4 0.6637 0.867 0.324 0.000 0.104 0.572
#> GSM217709 4 0.6430 0.870 0.312 0.000 0.092 0.596
#> GSM217710 4 0.6585 0.859 0.312 0.000 0.104 0.584
#> GSM217711 4 0.6585 0.859 0.312 0.000 0.104 0.584
#> GSM217712 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217713 4 0.4741 0.937 0.328 0.000 0.004 0.668
#> GSM217714 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217715 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217716 4 0.4741 0.937 0.328 0.000 0.004 0.668
#> GSM217717 4 0.4741 0.937 0.328 0.000 0.004 0.668
#> GSM217718 4 0.6071 0.901 0.324 0.000 0.064 0.612
#> GSM217719 4 0.5884 0.911 0.328 0.000 0.052 0.620
#> GSM217720 4 0.4741 0.936 0.328 0.000 0.004 0.668
#> GSM217721 4 0.5658 0.918 0.328 0.000 0.040 0.632
#> GSM217722 4 0.4564 0.938 0.328 0.000 0.000 0.672
#> GSM217723 1 0.6501 -0.071 0.588 0.000 0.096 0.316
#> GSM217724 1 0.2412 0.869 0.908 0.000 0.084 0.008
#> GSM217725 1 0.2266 0.873 0.912 0.000 0.084 0.004
#> GSM217726 1 0.0817 0.922 0.976 0.000 0.024 0.000
#> GSM217727 1 0.0817 0.922 0.976 0.000 0.024 0.000
#> GSM217728 1 0.2125 0.880 0.920 0.000 0.076 0.004
#> GSM217729 1 0.0592 0.924 0.984 0.000 0.016 0.000
#> GSM217730 1 0.0592 0.924 0.984 0.000 0.016 0.000
#> GSM217731 1 0.0592 0.924 0.984 0.000 0.016 0.000
#> GSM217732 1 0.0336 0.926 0.992 0.000 0.008 0.000
#> GSM217733 1 0.0592 0.924 0.984 0.000 0.016 0.000
#> GSM217734 1 0.0336 0.926 0.992 0.000 0.008 0.000
#> GSM217735 1 0.0336 0.926 0.992 0.000 0.008 0.000
#> GSM217736 1 0.0000 0.926 1.000 0.000 0.000 0.000
#> GSM217737 2 0.3048 0.834 0.000 0.876 0.016 0.108
#> GSM217738 2 0.3048 0.834 0.000 0.876 0.016 0.108
#> GSM217739 2 0.3048 0.834 0.000 0.876 0.016 0.108
#> GSM217740 2 0.3048 0.834 0.000 0.876 0.016 0.108
#> GSM217741 2 0.3048 0.834 0.000 0.876 0.016 0.108
#> GSM217742 2 0.3048 0.834 0.000 0.876 0.016 0.108
#> GSM217743 2 0.3048 0.834 0.000 0.876 0.016 0.108
#> GSM217744 2 0.3048 0.834 0.000 0.876 0.016 0.108
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.1195 0.718 0.000 0.960 0.028 0.000 0.012
#> GSM217645 2 0.1195 0.718 0.000 0.960 0.028 0.000 0.012
#> GSM217646 2 0.0955 0.725 0.000 0.968 0.028 0.000 0.004
#> GSM217647 2 0.3145 0.724 0.012 0.844 0.008 0.000 0.136
#> GSM217648 2 0.3053 0.726 0.012 0.852 0.008 0.000 0.128
#> GSM217649 2 0.0955 0.725 0.000 0.968 0.028 0.000 0.004
#> GSM217650 2 0.0794 0.727 0.000 0.972 0.028 0.000 0.000
#> GSM217651 2 0.1082 0.727 0.008 0.964 0.028 0.000 0.000
#> GSM217652 2 0.0794 0.727 0.000 0.972 0.028 0.000 0.000
#> GSM217653 2 0.3053 0.725 0.012 0.852 0.008 0.000 0.128
#> GSM217654 2 0.6542 -0.158 0.104 0.592 0.056 0.000 0.248
#> GSM217655 2 0.6542 -0.158 0.104 0.592 0.056 0.000 0.248
#> GSM217656 5 0.8743 0.612 0.132 0.156 0.088 0.148 0.476
#> GSM217657 5 0.7942 0.472 0.132 0.360 0.140 0.000 0.368
#> GSM217658 2 0.0794 0.727 0.000 0.972 0.028 0.000 0.000
#> GSM217659 2 0.0955 0.725 0.000 0.968 0.028 0.000 0.004
#> GSM217660 2 0.1412 0.727 0.008 0.952 0.036 0.000 0.004
#> GSM217661 2 0.0955 0.725 0.000 0.968 0.028 0.000 0.004
#> GSM217662 2 0.3099 0.725 0.012 0.848 0.008 0.000 0.132
#> GSM217663 2 0.1082 0.727 0.008 0.964 0.028 0.000 0.000
#> GSM217664 2 0.0955 0.727 0.004 0.968 0.028 0.000 0.000
#> GSM217665 2 0.2574 0.727 0.012 0.876 0.000 0.000 0.112
#> GSM217666 2 0.3145 0.724 0.012 0.844 0.008 0.000 0.136
#> GSM217667 2 0.3145 0.724 0.012 0.844 0.008 0.000 0.136
#> GSM217668 4 0.0566 0.901 0.000 0.000 0.004 0.984 0.012
#> GSM217669 4 0.0290 0.902 0.000 0.000 0.000 0.992 0.008
#> GSM217670 4 0.0404 0.901 0.000 0.000 0.000 0.988 0.012
#> GSM217671 4 0.0566 0.901 0.000 0.000 0.004 0.984 0.012
#> GSM217672 4 0.0404 0.901 0.000 0.000 0.000 0.988 0.012
#> GSM217673 4 0.0566 0.901 0.000 0.000 0.004 0.984 0.012
#> GSM217674 1 0.4048 0.944 0.772 0.000 0.016 0.196 0.016
#> GSM217675 1 0.4048 0.945 0.772 0.000 0.016 0.196 0.016
#> GSM217676 1 0.4471 0.941 0.752 0.000 0.016 0.196 0.036
#> GSM217677 1 0.3509 0.950 0.792 0.000 0.008 0.196 0.004
#> GSM217678 1 0.4471 0.941 0.752 0.000 0.016 0.196 0.036
#> GSM217679 1 0.3848 0.948 0.780 0.000 0.012 0.196 0.012
#> GSM217680 1 0.4471 0.941 0.752 0.000 0.016 0.196 0.036
#> GSM217681 1 0.3901 0.949 0.776 0.000 0.004 0.196 0.024
#> GSM217682 1 0.4394 0.937 0.756 0.000 0.016 0.196 0.032
#> GSM217683 1 0.4394 0.937 0.756 0.000 0.016 0.196 0.032
#> GSM217684 4 0.5246 0.358 0.288 0.000 0.020 0.652 0.040
#> GSM217685 3 0.2193 0.945 0.028 0.044 0.920 0.000 0.008
#> GSM217686 3 0.2026 0.947 0.012 0.056 0.924 0.000 0.008
#> GSM217687 3 0.2193 0.945 0.028 0.044 0.920 0.000 0.008
#> GSM217688 3 0.2193 0.945 0.028 0.044 0.920 0.000 0.008
#> GSM217689 3 0.3643 0.895 0.072 0.044 0.848 0.000 0.036
#> GSM217690 3 0.3643 0.895 0.072 0.044 0.848 0.000 0.036
#> GSM217691 3 0.2228 0.950 0.020 0.044 0.920 0.000 0.016
#> GSM217692 3 0.2542 0.944 0.020 0.056 0.904 0.000 0.020
#> GSM217693 3 0.2400 0.948 0.020 0.048 0.912 0.000 0.020
#> GSM217694 3 0.2228 0.950 0.020 0.044 0.920 0.000 0.016
#> GSM217695 3 0.2326 0.949 0.020 0.044 0.916 0.000 0.020
#> GSM217696 3 0.2542 0.944 0.020 0.056 0.904 0.000 0.020
#> GSM217697 3 0.2542 0.944 0.020 0.056 0.904 0.000 0.020
#> GSM217698 3 0.2228 0.950 0.016 0.044 0.920 0.000 0.020
#> GSM217699 3 0.1569 0.951 0.008 0.044 0.944 0.000 0.004
#> GSM217700 3 0.1682 0.951 0.012 0.044 0.940 0.000 0.004
#> GSM217701 3 0.2032 0.945 0.020 0.052 0.924 0.000 0.004
#> GSM217702 3 0.1682 0.951 0.012 0.044 0.940 0.000 0.004
#> GSM217703 3 0.3643 0.895 0.072 0.044 0.848 0.000 0.036
#> GSM217704 3 0.2326 0.949 0.020 0.044 0.916 0.000 0.020
#> GSM217705 4 0.0290 0.902 0.000 0.000 0.000 0.992 0.008
#> GSM217706 4 0.0324 0.901 0.000 0.000 0.004 0.992 0.004
#> GSM217707 4 0.0324 0.901 0.000 0.000 0.004 0.992 0.004
#> GSM217708 4 0.3366 0.743 0.000 0.000 0.000 0.768 0.232
#> GSM217709 4 0.3606 0.784 0.024 0.000 0.004 0.808 0.164
#> GSM217710 4 0.4167 0.691 0.024 0.000 0.000 0.724 0.252
#> GSM217711 4 0.4167 0.691 0.024 0.000 0.000 0.724 0.252
#> GSM217712 4 0.0162 0.901 0.000 0.000 0.004 0.996 0.000
#> GSM217713 4 0.0671 0.899 0.000 0.000 0.004 0.980 0.016
#> GSM217714 4 0.0404 0.901 0.000 0.000 0.000 0.988 0.012
#> GSM217715 4 0.0404 0.901 0.000 0.000 0.000 0.988 0.012
#> GSM217716 4 0.0566 0.900 0.000 0.000 0.004 0.984 0.012
#> GSM217717 4 0.0566 0.899 0.000 0.000 0.004 0.984 0.012
#> GSM217718 4 0.2389 0.846 0.000 0.000 0.004 0.880 0.116
#> GSM217719 4 0.1892 0.868 0.000 0.000 0.004 0.916 0.080
#> GSM217720 4 0.0290 0.902 0.000 0.000 0.000 0.992 0.008
#> GSM217721 4 0.1638 0.876 0.000 0.000 0.004 0.932 0.064
#> GSM217722 4 0.0162 0.901 0.000 0.000 0.004 0.996 0.000
#> GSM217723 4 0.6922 -0.124 0.308 0.000 0.016 0.464 0.212
#> GSM217724 1 0.6336 0.799 0.588 0.000 0.016 0.200 0.196
#> GSM217725 1 0.6309 0.804 0.592 0.000 0.016 0.196 0.196
#> GSM217726 1 0.3848 0.948 0.780 0.000 0.012 0.196 0.012
#> GSM217727 1 0.3848 0.948 0.780 0.000 0.012 0.196 0.012
#> GSM217728 1 0.6193 0.821 0.608 0.000 0.016 0.196 0.180
#> GSM217729 1 0.3840 0.950 0.780 0.000 0.008 0.196 0.016
#> GSM217730 1 0.4022 0.949 0.772 0.000 0.008 0.196 0.024
#> GSM217731 1 0.4295 0.945 0.760 0.000 0.012 0.196 0.032
#> GSM217732 1 0.3387 0.951 0.796 0.000 0.004 0.196 0.004
#> GSM217733 1 0.3933 0.950 0.776 0.000 0.008 0.196 0.020
#> GSM217734 1 0.3509 0.950 0.792 0.000 0.004 0.196 0.008
#> GSM217735 1 0.3387 0.951 0.796 0.000 0.004 0.196 0.004
#> GSM217736 1 0.3231 0.951 0.800 0.000 0.000 0.196 0.004
#> GSM217737 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
#> GSM217738 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
#> GSM217739 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
#> GSM217740 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
#> GSM217741 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
#> GSM217742 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
#> GSM217743 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
#> GSM217744 2 0.4658 0.565 0.000 0.576 0.016 0.000 0.408
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.1210 0.7736 0.000 0.960 0.008 0.008 0.004 0.020
#> GSM217645 2 0.1210 0.7736 0.000 0.960 0.008 0.008 0.004 0.020
#> GSM217646 2 0.0862 0.7785 0.000 0.972 0.008 0.004 0.000 0.016
#> GSM217647 2 0.3815 0.5895 0.000 0.788 0.008 0.040 0.156 0.008
#> GSM217648 2 0.3527 0.5985 0.000 0.804 0.008 0.024 0.156 0.008
#> GSM217649 2 0.0862 0.7785 0.000 0.972 0.008 0.004 0.000 0.016
#> GSM217650 2 0.0976 0.7792 0.000 0.968 0.008 0.008 0.000 0.016
#> GSM217651 2 0.1065 0.7738 0.000 0.964 0.008 0.020 0.000 0.008
#> GSM217652 2 0.0976 0.7792 0.000 0.968 0.008 0.008 0.000 0.016
#> GSM217653 2 0.3815 0.5895 0.000 0.788 0.008 0.040 0.156 0.008
#> GSM217654 2 0.6853 -0.0281 0.000 0.476 0.016 0.040 0.240 0.228
#> GSM217655 2 0.6782 0.0139 0.000 0.492 0.016 0.040 0.240 0.212
#> GSM217656 6 0.6532 0.5042 0.000 0.088 0.012 0.096 0.256 0.548
#> GSM217657 6 0.7632 0.3998 0.000 0.160 0.104 0.040 0.256 0.440
#> GSM217658 2 0.0767 0.7792 0.000 0.976 0.008 0.004 0.000 0.012
#> GSM217659 2 0.0862 0.7785 0.000 0.972 0.008 0.004 0.000 0.016
#> GSM217660 2 0.1167 0.7721 0.000 0.960 0.012 0.020 0.000 0.008
#> GSM217661 2 0.1210 0.7736 0.000 0.960 0.008 0.008 0.004 0.020
#> GSM217662 2 0.3815 0.5895 0.000 0.788 0.008 0.040 0.156 0.008
#> GSM217663 2 0.1065 0.7748 0.000 0.964 0.008 0.020 0.000 0.008
#> GSM217664 2 0.0622 0.7785 0.000 0.980 0.008 0.012 0.000 0.000
#> GSM217665 2 0.3497 0.6015 0.000 0.800 0.000 0.036 0.156 0.008
#> GSM217666 2 0.3747 0.5895 0.000 0.792 0.008 0.036 0.156 0.008
#> GSM217667 2 0.3747 0.5895 0.000 0.792 0.008 0.036 0.156 0.008
#> GSM217668 4 0.2443 0.8521 0.096 0.000 0.000 0.880 0.020 0.004
#> GSM217669 4 0.2163 0.8583 0.096 0.000 0.000 0.892 0.008 0.004
#> GSM217670 4 0.1908 0.8583 0.096 0.000 0.000 0.900 0.004 0.000
#> GSM217671 4 0.1908 0.8583 0.096 0.000 0.000 0.900 0.004 0.000
#> GSM217672 4 0.1765 0.8582 0.096 0.000 0.000 0.904 0.000 0.000
#> GSM217673 4 0.1908 0.8583 0.096 0.000 0.000 0.900 0.004 0.000
#> GSM217674 1 0.1296 0.8966 0.952 0.000 0.004 0.000 0.032 0.012
#> GSM217675 1 0.1657 0.8837 0.928 0.000 0.000 0.000 0.056 0.016
#> GSM217676 1 0.2258 0.8832 0.896 0.000 0.000 0.000 0.044 0.060
#> GSM217677 1 0.0653 0.9096 0.980 0.000 0.004 0.000 0.004 0.012
#> GSM217678 1 0.2197 0.8820 0.900 0.000 0.000 0.000 0.044 0.056
#> GSM217679 1 0.0665 0.9080 0.980 0.000 0.004 0.000 0.008 0.008
#> GSM217680 1 0.2197 0.8820 0.900 0.000 0.000 0.000 0.044 0.056
#> GSM217681 1 0.1168 0.9080 0.956 0.000 0.000 0.000 0.028 0.016
#> GSM217682 1 0.1605 0.8921 0.936 0.000 0.004 0.000 0.044 0.016
#> GSM217683 1 0.1605 0.8921 0.936 0.000 0.004 0.000 0.044 0.016
#> GSM217684 4 0.5551 0.2664 0.404 0.000 0.004 0.504 0.068 0.020
#> GSM217685 3 0.2948 0.8858 0.000 0.008 0.804 0.000 0.000 0.188
#> GSM217686 3 0.2110 0.8978 0.000 0.012 0.900 0.004 0.000 0.084
#> GSM217687 3 0.2915 0.8876 0.000 0.008 0.808 0.000 0.000 0.184
#> GSM217688 3 0.2915 0.8876 0.000 0.008 0.808 0.000 0.000 0.184
#> GSM217689 3 0.4039 0.8290 0.000 0.008 0.716 0.000 0.028 0.248
#> GSM217690 3 0.4135 0.8275 0.000 0.012 0.712 0.000 0.028 0.248
#> GSM217691 3 0.1553 0.8963 0.000 0.012 0.944 0.004 0.008 0.032
#> GSM217692 3 0.0665 0.8905 0.000 0.008 0.980 0.004 0.008 0.000
#> GSM217693 3 0.0810 0.8895 0.000 0.008 0.976 0.004 0.004 0.008
#> GSM217694 3 0.1553 0.8963 0.000 0.012 0.944 0.004 0.008 0.032
#> GSM217695 3 0.0665 0.8904 0.000 0.008 0.980 0.000 0.004 0.008
#> GSM217696 3 0.0912 0.8877 0.000 0.012 0.972 0.004 0.004 0.008
#> GSM217697 3 0.0912 0.8877 0.000 0.012 0.972 0.004 0.004 0.008
#> GSM217698 3 0.0767 0.8916 0.000 0.008 0.976 0.000 0.004 0.012
#> GSM217699 3 0.2593 0.8962 0.000 0.008 0.844 0.000 0.000 0.148
#> GSM217700 3 0.2768 0.8952 0.000 0.012 0.832 0.000 0.000 0.156
#> GSM217701 3 0.2932 0.8922 0.000 0.016 0.820 0.000 0.000 0.164
#> GSM217702 3 0.2768 0.8952 0.000 0.012 0.832 0.000 0.000 0.156
#> GSM217703 3 0.4039 0.8290 0.000 0.008 0.716 0.000 0.028 0.248
#> GSM217704 3 0.0767 0.8896 0.000 0.012 0.976 0.004 0.008 0.000
#> GSM217705 4 0.2568 0.8574 0.096 0.000 0.000 0.876 0.016 0.012
#> GSM217706 4 0.2834 0.8590 0.096 0.000 0.000 0.864 0.020 0.020
#> GSM217707 4 0.2994 0.8571 0.096 0.000 0.000 0.856 0.028 0.020
#> GSM217708 4 0.5375 0.4720 0.096 0.000 0.000 0.484 0.004 0.416
#> GSM217709 4 0.5180 0.6094 0.072 0.000 0.000 0.596 0.016 0.316
#> GSM217710 4 0.5149 0.4248 0.072 0.000 0.000 0.496 0.004 0.428
#> GSM217711 4 0.5149 0.4248 0.072 0.000 0.000 0.496 0.004 0.428
#> GSM217712 4 0.3150 0.8580 0.096 0.000 0.000 0.848 0.024 0.032
#> GSM217713 4 0.3277 0.8531 0.096 0.000 0.000 0.840 0.020 0.044
#> GSM217714 4 0.1908 0.8581 0.096 0.000 0.000 0.900 0.004 0.000
#> GSM217715 4 0.1908 0.8581 0.096 0.000 0.000 0.900 0.004 0.000
#> GSM217716 4 0.3210 0.8542 0.096 0.000 0.000 0.844 0.020 0.040
#> GSM217717 4 0.3277 0.8531 0.096 0.000 0.000 0.840 0.020 0.044
#> GSM217718 4 0.4966 0.7525 0.096 0.000 0.000 0.680 0.020 0.204
#> GSM217719 4 0.4794 0.7739 0.096 0.000 0.000 0.704 0.020 0.180
#> GSM217720 4 0.2468 0.8576 0.096 0.000 0.000 0.880 0.016 0.008
#> GSM217721 4 0.4419 0.8043 0.096 0.000 0.000 0.748 0.020 0.136
#> GSM217722 4 0.3150 0.8580 0.096 0.000 0.000 0.848 0.024 0.032
#> GSM217723 6 0.6988 -0.0833 0.308 0.000 0.000 0.248 0.064 0.380
#> GSM217724 1 0.4667 0.5432 0.632 0.000 0.000 0.004 0.056 0.308
#> GSM217725 1 0.4408 0.5874 0.656 0.000 0.000 0.000 0.052 0.292
#> GSM217726 1 0.0665 0.9080 0.980 0.000 0.004 0.000 0.008 0.008
#> GSM217727 1 0.0665 0.9080 0.980 0.000 0.004 0.000 0.008 0.008
#> GSM217728 1 0.4352 0.6081 0.668 0.000 0.000 0.000 0.052 0.280
#> GSM217729 1 0.1232 0.9080 0.956 0.000 0.004 0.000 0.024 0.016
#> GSM217730 1 0.1401 0.9057 0.948 0.000 0.004 0.000 0.028 0.020
#> GSM217731 1 0.1642 0.9010 0.936 0.000 0.004 0.000 0.032 0.028
#> GSM217732 1 0.0405 0.9114 0.988 0.000 0.004 0.000 0.000 0.008
#> GSM217733 1 0.1218 0.9081 0.956 0.000 0.004 0.000 0.028 0.012
#> GSM217734 1 0.0146 0.9103 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM217735 1 0.0405 0.9114 0.988 0.000 0.004 0.000 0.000 0.008
#> GSM217736 1 0.0146 0.9111 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM217737 5 0.4648 0.9903 0.000 0.372 0.040 0.004 0.584 0.000
#> GSM217738 5 0.4658 0.9942 0.000 0.376 0.040 0.004 0.580 0.000
#> GSM217739 5 0.4893 0.9911 0.000 0.376 0.040 0.004 0.572 0.008
#> GSM217740 5 0.4893 0.9911 0.000 0.376 0.040 0.004 0.572 0.008
#> GSM217741 5 0.4524 0.9950 0.000 0.376 0.040 0.000 0.584 0.000
#> GSM217742 5 0.4524 0.9950 0.000 0.376 0.040 0.000 0.584 0.000
#> GSM217743 5 0.4524 0.9950 0.000 0.376 0.040 0.000 0.584 0.000
#> GSM217744 5 0.4524 0.9950 0.000 0.376 0.040 0.000 0.584 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:kmeans 101 3.32e-01 2
#> ATC:kmeans 100 5.02e-07 3
#> ATC:kmeans 98 9.13e-07 4
#> ATC:kmeans 96 7.76e-06 5
#> ATC:kmeans 93 6.78e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.5051 0.495 0.495
#> 3 3 1.000 0.978 0.985 0.2548 0.871 0.740
#> 4 4 0.990 0.969 0.971 0.1787 0.881 0.676
#> 5 5 0.947 0.923 0.956 0.0423 0.979 0.915
#> 6 6 0.929 0.902 0.909 0.0320 0.968 0.861
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 4 5
There is also optional best \(k\) = 2 3 4 5 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
#> GSM217644 2 0 1 0 1
#> GSM217645 2 0 1 0 1
#> GSM217646 2 0 1 0 1
#> GSM217647 2 0 1 0 1
#> GSM217648 2 0 1 0 1
#> GSM217649 2 0 1 0 1
#> GSM217650 2 0 1 0 1
#> GSM217651 2 0 1 0 1
#> GSM217652 2 0 1 0 1
#> GSM217653 2 0 1 0 1
#> GSM217654 2 0 1 0 1
#> GSM217655 2 0 1 0 1
#> GSM217656 2 0 1 0 1
#> GSM217657 2 0 1 0 1
#> GSM217658 2 0 1 0 1
#> GSM217659 2 0 1 0 1
#> GSM217660 2 0 1 0 1
#> GSM217661 2 0 1 0 1
#> GSM217662 2 0 1 0 1
#> GSM217663 2 0 1 0 1
#> GSM217664 2 0 1 0 1
#> GSM217665 2 0 1 0 1
#> GSM217666 2 0 1 0 1
#> GSM217667 2 0 1 0 1
#> GSM217668 1 0 1 1 0
#> GSM217669 1 0 1 1 0
#> GSM217670 1 0 1 1 0
#> GSM217671 1 0 1 1 0
#> GSM217672 1 0 1 1 0
#> GSM217673 1 0 1 1 0
#> GSM217674 1 0 1 1 0
#> GSM217675 1 0 1 1 0
#> GSM217676 1 0 1 1 0
#> GSM217677 1 0 1 1 0
#> GSM217678 1 0 1 1 0
#> GSM217679 1 0 1 1 0
#> GSM217680 1 0 1 1 0
#> GSM217681 1 0 1 1 0
#> GSM217682 1 0 1 1 0
#> GSM217683 1 0 1 1 0
#> GSM217684 1 0 1 1 0
#> GSM217685 2 0 1 0 1
#> GSM217686 2 0 1 0 1
#> GSM217687 2 0 1 0 1
#> GSM217688 2 0 1 0 1
#> GSM217689 2 0 1 0 1
#> GSM217690 2 0 1 0 1
#> GSM217691 2 0 1 0 1
#> GSM217692 2 0 1 0 1
#> GSM217693 2 0 1 0 1
#> GSM217694 2 0 1 0 1
#> GSM217695 2 0 1 0 1
#> GSM217696 2 0 1 0 1
#> GSM217697 2 0 1 0 1
#> GSM217698 2 0 1 0 1
#> GSM217699 2 0 1 0 1
#> GSM217700 2 0 1 0 1
#> GSM217701 2 0 1 0 1
#> GSM217702 2 0 1 0 1
#> GSM217703 2 0 1 0 1
#> GSM217704 2 0 1 0 1
#> GSM217705 1 0 1 1 0
#> GSM217706 1 0 1 1 0
#> GSM217707 1 0 1 1 0
#> GSM217708 1 0 1 1 0
#> GSM217709 1 0 1 1 0
#> GSM217710 1 0 1 1 0
#> GSM217711 1 0 1 1 0
#> GSM217712 1 0 1 1 0
#> GSM217713 1 0 1 1 0
#> GSM217714 1 0 1 1 0
#> GSM217715 1 0 1 1 0
#> GSM217716 1 0 1 1 0
#> GSM217717 1 0 1 1 0
#> GSM217718 1 0 1 1 0
#> GSM217719 1 0 1 1 0
#> GSM217720 1 0 1 1 0
#> GSM217721 1 0 1 1 0
#> GSM217722 1 0 1 1 0
#> GSM217723 1 0 1 1 0
#> GSM217724 1 0 1 1 0
#> GSM217725 1 0 1 1 0
#> GSM217726 1 0 1 1 0
#> GSM217727 1 0 1 1 0
#> GSM217728 1 0 1 1 0
#> GSM217729 1 0 1 1 0
#> GSM217730 1 0 1 1 0
#> GSM217731 1 0 1 1 0
#> GSM217732 1 0 1 1 0
#> GSM217733 1 0 1 1 0
#> GSM217734 1 0 1 1 0
#> GSM217735 1 0 1 1 0
#> GSM217736 1 0 1 1 0
#> GSM217737 2 0 1 0 1
#> GSM217738 2 0 1 0 1
#> GSM217739 2 0 1 0 1
#> GSM217740 2 0 1 0 1
#> GSM217741 2 0 1 0 1
#> GSM217742 2 0 1 0 1
#> GSM217743 2 0 1 0 1
#> GSM217744 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217645 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217646 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217649 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217650 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217651 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217652 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217653 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217654 2 0.0237 0.978 0.000 0.996 0.004
#> GSM217655 2 0.0237 0.978 0.000 0.996 0.004
#> GSM217656 3 0.5621 0.558 0.000 0.308 0.692
#> GSM217657 2 0.4750 0.730 0.000 0.784 0.216
#> GSM217658 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217659 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217660 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217661 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217662 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217663 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217664 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217668 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217669 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217670 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217671 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217672 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217673 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217674 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217675 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217676 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217677 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217678 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217679 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217680 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217681 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217682 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217683 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217684 1 0.0000 0.993 1.000 0.000 0.000
#> GSM217685 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217686 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217687 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217688 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217689 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217690 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217691 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217692 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217693 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217694 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217695 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217696 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217697 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217698 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217699 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217700 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217701 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217702 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217703 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217704 3 0.0747 0.985 0.000 0.016 0.984
#> GSM217705 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217706 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217707 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217708 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217709 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217710 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217711 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217712 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217713 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217714 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217715 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217716 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217717 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217718 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217719 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217720 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217721 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217722 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217723 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217724 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217725 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217726 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217727 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217728 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217729 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217730 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217731 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217732 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217733 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217734 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217735 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217736 1 0.0424 0.993 0.992 0.000 0.008
#> GSM217737 2 0.3879 0.823 0.000 0.848 0.152
#> GSM217738 2 0.3879 0.823 0.000 0.848 0.152
#> GSM217739 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.982 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.982 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217645 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217646 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217647 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217650 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217651 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217652 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217653 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217654 2 0.1953 0.943 0.044 0.940 0.004 0.012
#> GSM217655 2 0.1863 0.944 0.040 0.944 0.004 0.012
#> GSM217656 3 0.6066 0.513 0.044 0.288 0.652 0.016
#> GSM217657 2 0.5206 0.727 0.044 0.752 0.192 0.012
#> GSM217658 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217659 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217660 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217661 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217662 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217663 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217665 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.978 0.000 1.000 0.000 0.000
#> GSM217668 4 0.1022 0.973 0.032 0.000 0.000 0.968
#> GSM217669 4 0.0592 0.977 0.016 0.000 0.000 0.984
#> GSM217670 4 0.1302 0.965 0.044 0.000 0.000 0.956
#> GSM217671 4 0.1211 0.968 0.040 0.000 0.000 0.960
#> GSM217672 4 0.1022 0.973 0.032 0.000 0.000 0.968
#> GSM217673 4 0.1302 0.965 0.044 0.000 0.000 0.956
#> GSM217674 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217675 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217676 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217677 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217678 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217679 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217680 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217681 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217682 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217683 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217684 4 0.3801 0.740 0.220 0.000 0.000 0.780
#> GSM217685 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217686 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217687 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217688 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217689 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217690 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217691 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217703 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217704 3 0.0000 0.983 0.000 0.000 1.000 0.000
#> GSM217705 4 0.0592 0.977 0.016 0.000 0.000 0.984
#> GSM217706 4 0.0921 0.975 0.028 0.000 0.000 0.972
#> GSM217707 4 0.0921 0.975 0.028 0.000 0.000 0.972
#> GSM217708 4 0.2589 0.878 0.116 0.000 0.000 0.884
#> GSM217709 4 0.0000 0.967 0.000 0.000 0.000 1.000
#> GSM217710 4 0.0000 0.967 0.000 0.000 0.000 1.000
#> GSM217711 4 0.0000 0.967 0.000 0.000 0.000 1.000
#> GSM217712 4 0.0592 0.977 0.016 0.000 0.000 0.984
#> GSM217713 4 0.0707 0.977 0.020 0.000 0.000 0.980
#> GSM217714 4 0.0592 0.977 0.016 0.000 0.000 0.984
#> GSM217715 4 0.0707 0.977 0.020 0.000 0.000 0.980
#> GSM217716 4 0.0921 0.975 0.028 0.000 0.000 0.972
#> GSM217717 4 0.0592 0.977 0.016 0.000 0.000 0.984
#> GSM217718 4 0.0469 0.975 0.012 0.000 0.000 0.988
#> GSM217719 4 0.0469 0.975 0.012 0.000 0.000 0.988
#> GSM217720 4 0.0707 0.977 0.020 0.000 0.000 0.980
#> GSM217721 4 0.0469 0.975 0.012 0.000 0.000 0.988
#> GSM217722 4 0.0592 0.977 0.016 0.000 0.000 0.984
#> GSM217723 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217724 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217725 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217726 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217727 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217728 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217729 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217730 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217731 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217732 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217733 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217734 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217735 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217736 1 0.1302 1.000 0.956 0.000 0.000 0.044
#> GSM217737 2 0.3355 0.817 0.004 0.836 0.160 0.000
#> GSM217738 2 0.3355 0.817 0.004 0.836 0.160 0.000
#> GSM217739 2 0.0188 0.976 0.004 0.996 0.000 0.000
#> GSM217740 2 0.0188 0.976 0.004 0.996 0.000 0.000
#> GSM217741 2 0.0188 0.976 0.004 0.996 0.000 0.000
#> GSM217742 2 0.0188 0.976 0.004 0.996 0.000 0.000
#> GSM217743 2 0.0188 0.976 0.004 0.996 0.000 0.000
#> GSM217744 2 0.0188 0.976 0.004 0.996 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0451 0.887 0.000 0.988 0.000 0.004 0.008
#> GSM217645 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217646 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217647 2 0.0000 0.887 0.000 1.000 0.000 0.000 0.000
#> GSM217648 2 0.0162 0.887 0.000 0.996 0.000 0.000 0.004
#> GSM217649 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217650 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217651 2 0.0324 0.887 0.000 0.992 0.000 0.004 0.004
#> GSM217652 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217653 2 0.0000 0.887 0.000 1.000 0.000 0.000 0.000
#> GSM217654 5 0.2690 0.808 0.000 0.156 0.000 0.000 0.844
#> GSM217655 5 0.3730 0.671 0.000 0.288 0.000 0.000 0.712
#> GSM217656 5 0.1282 0.833 0.000 0.004 0.044 0.000 0.952
#> GSM217657 5 0.1628 0.832 0.000 0.008 0.056 0.000 0.936
#> GSM217658 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217659 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217660 2 0.0794 0.876 0.000 0.972 0.000 0.000 0.028
#> GSM217661 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217662 2 0.0000 0.887 0.000 1.000 0.000 0.000 0.000
#> GSM217663 2 0.0000 0.887 0.000 1.000 0.000 0.000 0.000
#> GSM217664 2 0.0693 0.885 0.000 0.980 0.000 0.008 0.012
#> GSM217665 2 0.0000 0.887 0.000 1.000 0.000 0.000 0.000
#> GSM217666 2 0.0162 0.887 0.000 0.996 0.000 0.000 0.004
#> GSM217667 2 0.0162 0.887 0.000 0.996 0.000 0.000 0.004
#> GSM217668 4 0.0671 0.957 0.016 0.000 0.000 0.980 0.004
#> GSM217669 4 0.0404 0.957 0.012 0.000 0.000 0.988 0.000
#> GSM217670 4 0.0794 0.951 0.028 0.000 0.000 0.972 0.000
#> GSM217671 4 0.0865 0.953 0.024 0.000 0.000 0.972 0.004
#> GSM217672 4 0.0671 0.957 0.016 0.000 0.000 0.980 0.004
#> GSM217673 4 0.1041 0.947 0.032 0.000 0.000 0.964 0.004
#> GSM217674 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.3579 0.668 0.240 0.000 0.000 0.756 0.004
#> GSM217685 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.0162 0.996 0.000 0.000 0.996 0.000 0.004
#> GSM217690 3 0.0162 0.996 0.000 0.000 0.996 0.000 0.004
#> GSM217691 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0162 0.996 0.000 0.000 0.996 0.000 0.004
#> GSM217704 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0404 0.957 0.012 0.000 0.000 0.988 0.000
#> GSM217706 4 0.0510 0.957 0.016 0.000 0.000 0.984 0.000
#> GSM217707 4 0.0798 0.957 0.016 0.000 0.000 0.976 0.008
#> GSM217708 4 0.4159 0.752 0.156 0.000 0.000 0.776 0.068
#> GSM217709 4 0.1942 0.925 0.012 0.000 0.000 0.920 0.068
#> GSM217710 4 0.2660 0.875 0.008 0.000 0.000 0.864 0.128
#> GSM217711 4 0.2843 0.860 0.008 0.000 0.000 0.848 0.144
#> GSM217712 4 0.0566 0.957 0.012 0.000 0.000 0.984 0.004
#> GSM217713 4 0.0671 0.957 0.016 0.000 0.000 0.980 0.004
#> GSM217714 4 0.0404 0.957 0.012 0.000 0.000 0.988 0.000
#> GSM217715 4 0.0510 0.957 0.016 0.000 0.000 0.984 0.000
#> GSM217716 4 0.0771 0.957 0.020 0.000 0.000 0.976 0.004
#> GSM217717 4 0.0693 0.957 0.012 0.000 0.000 0.980 0.008
#> GSM217718 4 0.1364 0.945 0.012 0.000 0.000 0.952 0.036
#> GSM217719 4 0.1281 0.947 0.012 0.000 0.000 0.956 0.032
#> GSM217720 4 0.0404 0.957 0.012 0.000 0.000 0.988 0.000
#> GSM217721 4 0.1106 0.952 0.012 0.000 0.000 0.964 0.024
#> GSM217722 4 0.0566 0.957 0.012 0.000 0.000 0.984 0.004
#> GSM217723 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217724 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217725 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217726 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217729 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> GSM217737 2 0.6026 0.447 0.000 0.592 0.160 0.004 0.244
#> GSM217738 2 0.6026 0.447 0.000 0.592 0.160 0.004 0.244
#> GSM217739 2 0.3607 0.713 0.000 0.752 0.000 0.004 0.244
#> GSM217740 2 0.3607 0.713 0.000 0.752 0.000 0.004 0.244
#> GSM217741 2 0.3607 0.713 0.000 0.752 0.000 0.004 0.244
#> GSM217742 2 0.3607 0.713 0.000 0.752 0.000 0.004 0.244
#> GSM217743 2 0.3607 0.713 0.000 0.752 0.000 0.004 0.244
#> GSM217744 2 0.3607 0.713 0.000 0.752 0.000 0.004 0.244
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0260 0.918 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM217645 2 0.1196 0.911 0.000 0.952 0.000 0.000 0.040 0.008
#> GSM217646 2 0.1124 0.914 0.000 0.956 0.000 0.000 0.036 0.008
#> GSM217647 2 0.0632 0.914 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM217648 2 0.2003 0.766 0.000 0.884 0.000 0.000 0.116 0.000
#> GSM217649 2 0.1049 0.916 0.000 0.960 0.000 0.000 0.032 0.008
#> GSM217650 2 0.1196 0.911 0.000 0.952 0.000 0.000 0.040 0.008
#> GSM217651 2 0.0458 0.917 0.000 0.984 0.000 0.000 0.016 0.000
#> GSM217652 2 0.1124 0.914 0.000 0.956 0.000 0.000 0.036 0.008
#> GSM217653 2 0.0632 0.914 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM217654 6 0.2094 0.900 0.000 0.080 0.000 0.000 0.020 0.900
#> GSM217655 6 0.2234 0.864 0.000 0.124 0.000 0.000 0.004 0.872
#> GSM217656 6 0.0622 0.889 0.000 0.000 0.008 0.000 0.012 0.980
#> GSM217657 6 0.1584 0.887 0.000 0.000 0.008 0.000 0.064 0.928
#> GSM217658 2 0.1049 0.916 0.000 0.960 0.000 0.000 0.032 0.008
#> GSM217659 2 0.1049 0.916 0.000 0.960 0.000 0.000 0.032 0.008
#> GSM217660 2 0.2631 0.654 0.000 0.840 0.000 0.000 0.152 0.008
#> GSM217661 2 0.1196 0.911 0.000 0.952 0.000 0.000 0.040 0.008
#> GSM217662 2 0.0790 0.908 0.000 0.968 0.000 0.000 0.032 0.000
#> GSM217663 2 0.0632 0.914 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM217664 2 0.1124 0.914 0.000 0.956 0.000 0.000 0.036 0.008
#> GSM217665 2 0.0632 0.914 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM217666 2 0.0937 0.899 0.000 0.960 0.000 0.000 0.040 0.000
#> GSM217667 2 0.0865 0.904 0.000 0.964 0.000 0.000 0.036 0.000
#> GSM217668 4 0.0951 0.856 0.008 0.000 0.000 0.968 0.020 0.004
#> GSM217669 4 0.0551 0.860 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM217670 4 0.1237 0.851 0.020 0.000 0.000 0.956 0.020 0.004
#> GSM217671 4 0.1148 0.852 0.016 0.000 0.000 0.960 0.020 0.004
#> GSM217672 4 0.0837 0.857 0.004 0.000 0.000 0.972 0.020 0.004
#> GSM217673 4 0.1321 0.847 0.024 0.000 0.000 0.952 0.020 0.004
#> GSM217674 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.3653 0.620 0.228 0.000 0.000 0.748 0.020 0.004
#> GSM217685 3 0.0260 0.983 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM217686 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217687 3 0.0260 0.983 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM217688 3 0.0260 0.983 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM217689 3 0.0622 0.976 0.000 0.000 0.980 0.000 0.008 0.012
#> GSM217690 3 0.0622 0.976 0.000 0.000 0.980 0.000 0.008 0.012
#> GSM217691 3 0.0692 0.983 0.000 0.000 0.976 0.000 0.020 0.004
#> GSM217692 3 0.0777 0.982 0.000 0.000 0.972 0.000 0.024 0.004
#> GSM217693 3 0.0777 0.982 0.000 0.000 0.972 0.000 0.024 0.004
#> GSM217694 3 0.0692 0.983 0.000 0.000 0.976 0.000 0.020 0.004
#> GSM217695 3 0.0777 0.982 0.000 0.000 0.972 0.000 0.024 0.004
#> GSM217696 3 0.0777 0.982 0.000 0.000 0.972 0.000 0.024 0.004
#> GSM217697 3 0.0777 0.982 0.000 0.000 0.972 0.000 0.024 0.004
#> GSM217698 3 0.0508 0.984 0.000 0.000 0.984 0.000 0.012 0.004
#> GSM217699 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0146 0.984 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM217702 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.0717 0.974 0.000 0.000 0.976 0.000 0.008 0.016
#> GSM217704 3 0.0777 0.982 0.000 0.000 0.972 0.000 0.024 0.004
#> GSM217705 4 0.0603 0.860 0.000 0.000 0.000 0.980 0.016 0.004
#> GSM217706 4 0.0291 0.861 0.004 0.000 0.000 0.992 0.004 0.000
#> GSM217707 4 0.0405 0.861 0.004 0.000 0.000 0.988 0.008 0.000
#> GSM217708 4 0.6075 0.463 0.056 0.000 0.000 0.484 0.376 0.084
#> GSM217709 4 0.4835 0.589 0.000 0.000 0.000 0.580 0.352 0.068
#> GSM217710 4 0.5264 0.515 0.000 0.000 0.000 0.520 0.376 0.104
#> GSM217711 4 0.5368 0.498 0.000 0.000 0.000 0.508 0.376 0.116
#> GSM217712 4 0.0790 0.855 0.000 0.000 0.000 0.968 0.032 0.000
#> GSM217713 4 0.0748 0.860 0.004 0.000 0.000 0.976 0.016 0.004
#> GSM217714 4 0.0551 0.860 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM217715 4 0.0653 0.859 0.004 0.000 0.000 0.980 0.012 0.004
#> GSM217716 4 0.0748 0.860 0.004 0.000 0.000 0.976 0.016 0.004
#> GSM217717 4 0.0508 0.860 0.000 0.000 0.000 0.984 0.012 0.004
#> GSM217718 4 0.3867 0.668 0.000 0.000 0.000 0.660 0.328 0.012
#> GSM217719 4 0.3547 0.698 0.000 0.000 0.000 0.696 0.300 0.004
#> GSM217720 4 0.0551 0.861 0.004 0.000 0.000 0.984 0.008 0.004
#> GSM217721 4 0.3163 0.747 0.000 0.000 0.000 0.764 0.232 0.004
#> GSM217722 4 0.0363 0.860 0.000 0.000 0.000 0.988 0.012 0.000
#> GSM217723 1 0.2461 0.891 0.888 0.000 0.000 0.004 0.064 0.044
#> GSM217724 1 0.1480 0.943 0.940 0.000 0.000 0.000 0.040 0.020
#> GSM217725 1 0.1391 0.947 0.944 0.000 0.000 0.000 0.040 0.016
#> GSM217726 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.1391 0.947 0.944 0.000 0.000 0.000 0.040 0.016
#> GSM217729 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.988 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.5633 0.806 0.000 0.344 0.108 0.000 0.532 0.016
#> GSM217738 5 0.5579 0.819 0.000 0.352 0.100 0.000 0.532 0.016
#> GSM217739 5 0.4471 0.931 0.000 0.444 0.008 0.000 0.532 0.016
#> GSM217740 5 0.4471 0.931 0.000 0.444 0.008 0.000 0.532 0.016
#> GSM217741 5 0.4471 0.931 0.000 0.444 0.008 0.000 0.532 0.016
#> GSM217742 5 0.4471 0.931 0.000 0.444 0.008 0.000 0.532 0.016
#> GSM217743 5 0.4471 0.931 0.000 0.444 0.008 0.000 0.532 0.016
#> GSM217744 5 0.4471 0.931 0.000 0.444 0.008 0.000 0.532 0.016
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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:skmeans 101 3.32e-01 2
#> ATC:skmeans 101 1.85e-06 3
#> ATC:skmeans 101 4.97e-06 4
#> ATC:skmeans 99 4.30e-07 5
#> ATC:skmeans 99 1.38e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.681 0.797 0.921 0.4764 0.526 0.526
#> 3 3 0.761 0.953 0.939 0.3235 0.743 0.554
#> 4 4 0.978 0.951 0.975 0.1928 0.870 0.652
#> 5 5 0.976 0.935 0.972 0.0512 0.961 0.842
#> 6 6 0.963 0.915 0.962 0.0264 0.980 0.905
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 4 5
There is also optional best \(k\) = 4 5 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
#> GSM217644 1 0.987 0.316 0.568 0.432
#> GSM217645 1 0.987 0.316 0.568 0.432
#> GSM217646 1 0.987 0.316 0.568 0.432
#> GSM217647 2 0.697 0.743 0.188 0.812
#> GSM217648 2 0.456 0.856 0.096 0.904
#> GSM217649 1 0.987 0.316 0.568 0.432
#> GSM217650 1 0.987 0.316 0.568 0.432
#> GSM217651 2 0.518 0.835 0.116 0.884
#> GSM217652 1 0.987 0.316 0.568 0.432
#> GSM217653 2 0.163 0.920 0.024 0.976
#> GSM217654 1 0.987 0.316 0.568 0.432
#> GSM217655 1 0.987 0.316 0.568 0.432
#> GSM217656 1 0.983 0.333 0.576 0.424
#> GSM217657 2 0.949 0.341 0.368 0.632
#> GSM217658 1 0.988 0.305 0.564 0.436
#> GSM217659 1 0.987 0.316 0.568 0.432
#> GSM217660 2 0.827 0.618 0.260 0.740
#> GSM217661 1 0.987 0.316 0.568 0.432
#> GSM217662 2 0.000 0.938 0.000 1.000
#> GSM217663 2 1.000 -0.113 0.496 0.504
#> GSM217664 1 0.987 0.316 0.568 0.432
#> GSM217665 1 0.999 0.151 0.516 0.484
#> GSM217666 2 0.644 0.776 0.164 0.836
#> GSM217667 2 0.753 0.699 0.216 0.784
#> GSM217668 1 0.000 0.886 1.000 0.000
#> GSM217669 1 0.000 0.886 1.000 0.000
#> GSM217670 1 0.000 0.886 1.000 0.000
#> GSM217671 1 0.000 0.886 1.000 0.000
#> GSM217672 1 0.000 0.886 1.000 0.000
#> GSM217673 1 0.000 0.886 1.000 0.000
#> GSM217674 1 0.000 0.886 1.000 0.000
#> GSM217675 1 0.000 0.886 1.000 0.000
#> GSM217676 1 0.000 0.886 1.000 0.000
#> GSM217677 1 0.000 0.886 1.000 0.000
#> GSM217678 1 0.000 0.886 1.000 0.000
#> GSM217679 1 0.000 0.886 1.000 0.000
#> GSM217680 1 0.000 0.886 1.000 0.000
#> GSM217681 1 0.000 0.886 1.000 0.000
#> GSM217682 1 0.000 0.886 1.000 0.000
#> GSM217683 1 0.000 0.886 1.000 0.000
#> GSM217684 1 0.000 0.886 1.000 0.000
#> GSM217685 2 0.000 0.938 0.000 1.000
#> GSM217686 2 0.000 0.938 0.000 1.000
#> GSM217687 2 0.000 0.938 0.000 1.000
#> GSM217688 2 0.000 0.938 0.000 1.000
#> GSM217689 2 0.000 0.938 0.000 1.000
#> GSM217690 2 0.000 0.938 0.000 1.000
#> GSM217691 2 0.000 0.938 0.000 1.000
#> GSM217692 2 0.000 0.938 0.000 1.000
#> GSM217693 2 0.000 0.938 0.000 1.000
#> GSM217694 2 0.000 0.938 0.000 1.000
#> GSM217695 2 0.000 0.938 0.000 1.000
#> GSM217696 2 0.000 0.938 0.000 1.000
#> GSM217697 2 0.000 0.938 0.000 1.000
#> GSM217698 2 0.000 0.938 0.000 1.000
#> GSM217699 2 0.000 0.938 0.000 1.000
#> GSM217700 2 0.000 0.938 0.000 1.000
#> GSM217701 2 0.000 0.938 0.000 1.000
#> GSM217702 2 0.000 0.938 0.000 1.000
#> GSM217703 2 0.000 0.938 0.000 1.000
#> GSM217704 2 0.000 0.938 0.000 1.000
#> GSM217705 1 0.000 0.886 1.000 0.000
#> GSM217706 1 0.000 0.886 1.000 0.000
#> GSM217707 1 0.000 0.886 1.000 0.000
#> GSM217708 1 0.000 0.886 1.000 0.000
#> GSM217709 1 0.000 0.886 1.000 0.000
#> GSM217710 1 0.000 0.886 1.000 0.000
#> GSM217711 1 0.000 0.886 1.000 0.000
#> GSM217712 1 0.000 0.886 1.000 0.000
#> GSM217713 1 0.000 0.886 1.000 0.000
#> GSM217714 1 0.000 0.886 1.000 0.000
#> GSM217715 1 0.000 0.886 1.000 0.000
#> GSM217716 1 0.000 0.886 1.000 0.000
#> GSM217717 1 0.000 0.886 1.000 0.000
#> GSM217718 1 0.000 0.886 1.000 0.000
#> GSM217719 1 0.000 0.886 1.000 0.000
#> GSM217720 1 0.000 0.886 1.000 0.000
#> GSM217721 1 0.000 0.886 1.000 0.000
#> GSM217722 1 0.000 0.886 1.000 0.000
#> GSM217723 1 0.000 0.886 1.000 0.000
#> GSM217724 1 0.000 0.886 1.000 0.000
#> GSM217725 1 0.000 0.886 1.000 0.000
#> GSM217726 1 0.000 0.886 1.000 0.000
#> GSM217727 1 0.000 0.886 1.000 0.000
#> GSM217728 1 0.000 0.886 1.000 0.000
#> GSM217729 1 0.000 0.886 1.000 0.000
#> GSM217730 1 0.000 0.886 1.000 0.000
#> GSM217731 1 0.000 0.886 1.000 0.000
#> GSM217732 1 0.000 0.886 1.000 0.000
#> GSM217733 1 0.000 0.886 1.000 0.000
#> GSM217734 1 0.000 0.886 1.000 0.000
#> GSM217735 1 0.000 0.886 1.000 0.000
#> GSM217736 1 0.000 0.886 1.000 0.000
#> GSM217737 2 0.000 0.938 0.000 1.000
#> GSM217738 2 0.000 0.938 0.000 1.000
#> GSM217739 2 0.000 0.938 0.000 1.000
#> GSM217740 2 0.000 0.938 0.000 1.000
#> GSM217741 2 0.000 0.938 0.000 1.000
#> GSM217742 2 0.000 0.938 0.000 1.000
#> GSM217743 2 0.000 0.938 0.000 1.000
#> GSM217744 2 0.000 0.938 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0892 0.949 0.020 0.980 0.000
#> GSM217645 2 0.1129 0.946 0.020 0.976 0.004
#> GSM217646 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217649 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217650 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217651 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217652 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217653 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217654 2 0.4660 0.842 0.072 0.856 0.072
#> GSM217655 2 0.4660 0.842 0.072 0.856 0.072
#> GSM217656 2 0.7043 0.682 0.136 0.728 0.136
#> GSM217657 2 0.5085 0.822 0.072 0.836 0.092
#> GSM217658 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217659 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217660 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217661 2 0.0237 0.963 0.004 0.996 0.000
#> GSM217662 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217663 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217664 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217668 1 0.7412 0.729 0.696 0.192 0.112
#> GSM217669 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217670 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217671 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217672 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217673 1 0.2959 0.948 0.900 0.000 0.100
#> GSM217674 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217685 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217686 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217687 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217688 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217689 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217690 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217691 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217692 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217693 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217694 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217695 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217696 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217697 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217698 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217699 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217700 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217701 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217702 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217703 3 0.3192 1.000 0.000 0.112 0.888
#> GSM217704 3 0.3267 0.995 0.000 0.116 0.884
#> GSM217705 1 0.2796 0.948 0.908 0.000 0.092
#> GSM217706 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217707 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217708 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217709 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217710 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217711 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217712 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217713 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217714 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217715 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217716 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217717 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217718 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217719 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217720 1 0.3116 0.947 0.892 0.000 0.108
#> GSM217721 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217722 1 0.3192 0.947 0.888 0.000 0.112
#> GSM217723 1 0.2448 0.949 0.924 0.000 0.076
#> GSM217724 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217725 1 0.0237 0.948 0.996 0.000 0.004
#> GSM217726 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217728 1 0.0592 0.949 0.988 0.000 0.012
#> GSM217729 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.948 1.000 0.000 0.000
#> GSM217737 2 0.2796 0.885 0.000 0.908 0.092
#> GSM217738 2 0.2711 0.890 0.000 0.912 0.088
#> GSM217739 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.966 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.966 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.1706 0.928 0.000 0.948 0.016 0.036
#> GSM217645 2 0.1706 0.928 0.000 0.948 0.016 0.036
#> GSM217646 2 0.0779 0.948 0.000 0.980 0.016 0.004
#> GSM217647 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217648 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> GSM217650 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> GSM217651 2 0.0469 0.949 0.000 0.988 0.012 0.000
#> GSM217652 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> GSM217653 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217654 2 0.5950 0.699 0.000 0.696 0.156 0.148
#> GSM217655 2 0.5950 0.699 0.000 0.696 0.156 0.148
#> GSM217656 4 0.2670 0.893 0.000 0.024 0.072 0.904
#> GSM217657 2 0.6449 0.628 0.000 0.644 0.204 0.152
#> GSM217658 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> GSM217659 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> GSM217660 2 0.0817 0.945 0.000 0.976 0.024 0.000
#> GSM217661 2 0.0927 0.946 0.000 0.976 0.016 0.008
#> GSM217662 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217663 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> GSM217664 2 0.0592 0.949 0.000 0.984 0.016 0.000
#> GSM217665 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217666 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217667 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217668 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217669 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217670 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217671 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217672 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217673 4 0.1637 0.929 0.060 0.000 0.000 0.940
#> GSM217674 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217684 1 0.4605 0.476 0.664 0.000 0.000 0.336
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> GSM217704 3 0.0188 0.996 0.000 0.004 0.996 0.000
#> GSM217705 4 0.1118 0.953 0.036 0.000 0.000 0.964
#> GSM217706 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217707 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217708 4 0.0188 0.979 0.004 0.000 0.000 0.996
#> GSM217709 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217710 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217711 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217712 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217713 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217714 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217715 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217716 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217717 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217718 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217719 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217720 4 0.0336 0.976 0.008 0.000 0.000 0.992
#> GSM217721 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217722 4 0.0000 0.981 0.000 0.000 0.000 1.000
#> GSM217723 4 0.4072 0.662 0.252 0.000 0.000 0.748
#> GSM217724 1 0.2281 0.883 0.904 0.000 0.000 0.096
#> GSM217725 1 0.0336 0.973 0.992 0.000 0.000 0.008
#> GSM217726 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217728 1 0.0707 0.962 0.980 0.000 0.000 0.020
#> GSM217729 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.979 1.000 0.000 0.000 0.000
#> GSM217737 2 0.3444 0.789 0.000 0.816 0.184 0.000
#> GSM217738 2 0.3444 0.789 0.000 0.816 0.184 0.000
#> GSM217739 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217740 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217741 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217742 2 0.0336 0.947 0.000 0.992 0.008 0.000
#> GSM217743 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> GSM217744 2 0.0000 0.949 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
#> GSM217644 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217645 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217646 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217647 2 0.1671 0.881 0.000 0.924 0.000 0.000 0.076
#> GSM217648 5 0.4182 0.316 0.000 0.400 0.000 0.000 0.600
#> GSM217649 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217651 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217652 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217653 2 0.1197 0.899 0.000 0.952 0.000 0.000 0.048
#> GSM217654 2 0.1908 0.841 0.000 0.908 0.000 0.092 0.000
#> GSM217655 2 0.3242 0.679 0.000 0.784 0.000 0.216 0.000
#> GSM217656 4 0.2830 0.856 0.000 0.080 0.044 0.876 0.000
#> GSM217657 2 0.5218 0.613 0.000 0.684 0.180 0.136 0.000
#> GSM217658 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217660 2 0.1952 0.868 0.000 0.912 0.004 0.000 0.084
#> GSM217661 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217662 2 0.1908 0.869 0.000 0.908 0.000 0.000 0.092
#> GSM217663 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000
#> GSM217665 2 0.0162 0.920 0.000 0.996 0.000 0.000 0.004
#> GSM217666 2 0.2732 0.802 0.000 0.840 0.000 0.000 0.160
#> GSM217667 2 0.4045 0.471 0.000 0.644 0.000 0.000 0.356
#> GSM217668 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217669 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217670 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217671 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217672 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217673 4 0.1341 0.924 0.056 0.000 0.000 0.944 0.000
#> GSM217674 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.4060 0.416 0.640 0.000 0.000 0.360 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM217704 3 0.0162 0.995 0.000 0.004 0.996 0.000 0.000
#> GSM217705 4 0.0963 0.946 0.036 0.000 0.000 0.964 0.000
#> GSM217706 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217708 4 0.0162 0.976 0.004 0.000 0.000 0.996 0.000
#> GSM217709 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217710 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217711 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217712 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217713 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217714 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217718 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217719 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217720 4 0.0290 0.973 0.008 0.000 0.000 0.992 0.000
#> GSM217721 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217722 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM217723 4 0.3366 0.689 0.232 0.000 0.000 0.768 0.000
#> GSM217724 1 0.1965 0.863 0.904 0.000 0.000 0.096 0.000
#> GSM217725 1 0.0290 0.966 0.992 0.000 0.000 0.008 0.000
#> GSM217726 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0609 0.954 0.980 0.000 0.000 0.020 0.000
#> GSM217729 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.974 1.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
#> GSM217738 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
#> GSM217739 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
#> GSM217740 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
#> GSM217741 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
#> GSM217742 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
#> GSM217743 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
#> GSM217744 5 0.0000 0.948 0.000 0.000 0.000 0.000 1.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 6 0.2697 0.756 0.000 0.188 0.000 0.000 0.000 0.812
#> GSM217645 2 0.3864 0.152 0.000 0.520 0.000 0.000 0.000 0.480
#> GSM217646 2 0.2697 0.753 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM217647 2 0.0260 0.882 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM217648 5 0.3810 0.258 0.000 0.428 0.000 0.000 0.572 0.000
#> GSM217649 2 0.2697 0.753 0.000 0.812 0.000 0.000 0.000 0.188
#> GSM217650 2 0.0458 0.883 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM217651 2 0.0458 0.881 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM217652 2 0.0458 0.883 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM217653 2 0.0146 0.882 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217654 6 0.1285 0.918 0.000 0.052 0.000 0.004 0.000 0.944
#> GSM217655 6 0.1434 0.919 0.000 0.048 0.000 0.012 0.000 0.940
#> GSM217656 6 0.0820 0.898 0.000 0.000 0.012 0.016 0.000 0.972
#> GSM217657 6 0.0862 0.906 0.000 0.008 0.016 0.004 0.000 0.972
#> GSM217658 2 0.0363 0.883 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM217659 2 0.1075 0.870 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM217660 2 0.3853 0.580 0.000 0.708 0.012 0.000 0.008 0.272
#> GSM217661 2 0.3464 0.582 0.000 0.688 0.000 0.000 0.000 0.312
#> GSM217662 2 0.0632 0.877 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM217663 2 0.0146 0.883 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217664 2 0.0000 0.882 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217665 2 0.0000 0.882 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217666 2 0.0622 0.877 0.000 0.980 0.000 0.000 0.012 0.008
#> GSM217667 2 0.2178 0.772 0.000 0.868 0.000 0.000 0.132 0.000
#> GSM217668 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217669 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217670 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217671 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217672 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217673 4 0.1957 0.840 0.112 0.000 0.000 0.888 0.000 0.000
#> GSM217674 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217676 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 1 0.3288 0.582 0.724 0.000 0.000 0.276 0.000 0.000
#> GSM217685 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217686 3 0.0458 0.987 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM217687 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217688 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217689 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217690 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217691 3 0.0363 0.989 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM217692 3 0.0363 0.989 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM217693 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.000 0.028
#> GSM217694 3 0.0363 0.989 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM217695 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.000 0.028
#> GSM217696 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.000 0.028
#> GSM217697 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.000 0.028
#> GSM217698 3 0.0458 0.987 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM217699 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0260 0.990 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM217701 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.0000 0.991 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217704 3 0.0713 0.985 0.000 0.000 0.972 0.000 0.000 0.028
#> GSM217705 4 0.0865 0.936 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM217706 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217707 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217708 4 0.0790 0.953 0.000 0.000 0.000 0.968 0.000 0.032
#> GSM217709 4 0.0790 0.953 0.000 0.000 0.000 0.968 0.000 0.032
#> GSM217710 4 0.0865 0.950 0.000 0.000 0.000 0.964 0.000 0.036
#> GSM217711 4 0.0790 0.953 0.000 0.000 0.000 0.968 0.000 0.032
#> GSM217712 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217713 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217714 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217715 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217716 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217717 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217718 4 0.0790 0.953 0.000 0.000 0.000 0.968 0.000 0.032
#> GSM217719 4 0.0260 0.964 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217720 4 0.0260 0.962 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM217721 4 0.0260 0.964 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM217722 4 0.0000 0.967 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217723 4 0.4219 0.489 0.320 0.000 0.000 0.648 0.000 0.032
#> GSM217724 1 0.1806 0.869 0.908 0.000 0.000 0.088 0.000 0.004
#> GSM217725 1 0.0520 0.965 0.984 0.000 0.000 0.008 0.000 0.008
#> GSM217726 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0547 0.958 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM217729 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217730 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.978 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217738 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217739 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217740 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217741 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217742 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217743 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM217744 5 0.0000 0.931 0.000 0.000 0.000 0.000 1.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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:pam 85 3.14e-01 2
#> ATC:pam 101 2.94e-07 3
#> ATC:pam 100 1.13e-06 4
#> ATC:pam 98 1.01e-10 5
#> ATC:pam 98 1.78e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.558 0.842 0.874 0.4474 0.495 0.495
#> 3 3 0.715 0.857 0.900 0.3647 0.598 0.381
#> 4 4 0.970 0.933 0.954 0.2225 0.846 0.616
#> 5 5 0.931 0.861 0.937 0.0426 0.990 0.962
#> 6 6 0.936 0.910 0.922 0.0327 0.954 0.808
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 4
There is also optional best \(k\) = 4 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM217644 2 0.939 0.796 0.356 0.644
#> GSM217645 2 0.939 0.796 0.356 0.644
#> GSM217646 2 0.939 0.796 0.356 0.644
#> GSM217647 2 0.939 0.796 0.356 0.644
#> GSM217648 2 0.939 0.796 0.356 0.644
#> GSM217649 2 0.939 0.796 0.356 0.644
#> GSM217650 2 0.939 0.796 0.356 0.644
#> GSM217651 2 0.939 0.796 0.356 0.644
#> GSM217652 2 0.939 0.796 0.356 0.644
#> GSM217653 2 0.939 0.796 0.356 0.644
#> GSM217654 2 0.963 0.748 0.388 0.612
#> GSM217655 2 0.958 0.761 0.380 0.620
#> GSM217656 1 0.795 0.483 0.760 0.240
#> GSM217657 1 0.939 0.032 0.644 0.356
#> GSM217658 2 0.939 0.796 0.356 0.644
#> GSM217659 2 0.939 0.796 0.356 0.644
#> GSM217660 2 0.939 0.796 0.356 0.644
#> GSM217661 2 0.939 0.796 0.356 0.644
#> GSM217662 2 0.939 0.796 0.356 0.644
#> GSM217663 2 0.939 0.796 0.356 0.644
#> GSM217664 2 0.939 0.796 0.356 0.644
#> GSM217665 2 0.939 0.796 0.356 0.644
#> GSM217666 2 0.939 0.796 0.356 0.644
#> GSM217667 2 0.939 0.796 0.356 0.644
#> GSM217668 1 0.000 0.939 1.000 0.000
#> GSM217669 1 0.000 0.939 1.000 0.000
#> GSM217670 1 0.000 0.939 1.000 0.000
#> GSM217671 1 0.000 0.939 1.000 0.000
#> GSM217672 1 0.000 0.939 1.000 0.000
#> GSM217673 1 0.000 0.939 1.000 0.000
#> GSM217674 1 0.343 0.937 0.936 0.064
#> GSM217675 1 0.343 0.937 0.936 0.064
#> GSM217676 1 0.343 0.937 0.936 0.064
#> GSM217677 1 0.343 0.937 0.936 0.064
#> GSM217678 1 0.343 0.937 0.936 0.064
#> GSM217679 1 0.343 0.937 0.936 0.064
#> GSM217680 1 0.343 0.937 0.936 0.064
#> GSM217681 1 0.343 0.937 0.936 0.064
#> GSM217682 1 0.343 0.937 0.936 0.064
#> GSM217683 1 0.343 0.937 0.936 0.064
#> GSM217684 1 0.000 0.939 1.000 0.000
#> GSM217685 2 0.000 0.739 0.000 1.000
#> GSM217686 2 0.000 0.739 0.000 1.000
#> GSM217687 2 0.000 0.739 0.000 1.000
#> GSM217688 2 0.000 0.739 0.000 1.000
#> GSM217689 2 0.456 0.756 0.096 0.904
#> GSM217690 2 0.456 0.756 0.096 0.904
#> GSM217691 2 0.000 0.739 0.000 1.000
#> GSM217692 2 0.000 0.739 0.000 1.000
#> GSM217693 2 0.000 0.739 0.000 1.000
#> GSM217694 2 0.000 0.739 0.000 1.000
#> GSM217695 2 0.000 0.739 0.000 1.000
#> GSM217696 2 0.000 0.739 0.000 1.000
#> GSM217697 2 0.000 0.739 0.000 1.000
#> GSM217698 2 0.000 0.739 0.000 1.000
#> GSM217699 2 0.000 0.739 0.000 1.000
#> GSM217700 2 0.000 0.739 0.000 1.000
#> GSM217701 2 0.000 0.739 0.000 1.000
#> GSM217702 2 0.000 0.739 0.000 1.000
#> GSM217703 2 0.456 0.756 0.096 0.904
#> GSM217704 2 0.000 0.739 0.000 1.000
#> GSM217705 1 0.000 0.939 1.000 0.000
#> GSM217706 1 0.000 0.939 1.000 0.000
#> GSM217707 1 0.000 0.939 1.000 0.000
#> GSM217708 1 0.000 0.939 1.000 0.000
#> GSM217709 1 0.000 0.939 1.000 0.000
#> GSM217710 1 0.000 0.939 1.000 0.000
#> GSM217711 1 0.000 0.939 1.000 0.000
#> GSM217712 1 0.000 0.939 1.000 0.000
#> GSM217713 1 0.000 0.939 1.000 0.000
#> GSM217714 1 0.000 0.939 1.000 0.000
#> GSM217715 1 0.000 0.939 1.000 0.000
#> GSM217716 1 0.000 0.939 1.000 0.000
#> GSM217717 1 0.000 0.939 1.000 0.000
#> GSM217718 1 0.000 0.939 1.000 0.000
#> GSM217719 1 0.000 0.939 1.000 0.000
#> GSM217720 1 0.000 0.939 1.000 0.000
#> GSM217721 1 0.000 0.939 1.000 0.000
#> GSM217722 1 0.000 0.939 1.000 0.000
#> GSM217723 1 0.343 0.937 0.936 0.064
#> GSM217724 1 0.343 0.937 0.936 0.064
#> GSM217725 1 0.343 0.937 0.936 0.064
#> GSM217726 1 0.343 0.937 0.936 0.064
#> GSM217727 1 0.343 0.937 0.936 0.064
#> GSM217728 1 0.343 0.937 0.936 0.064
#> GSM217729 1 0.343 0.937 0.936 0.064
#> GSM217730 1 0.343 0.937 0.936 0.064
#> GSM217731 1 0.343 0.937 0.936 0.064
#> GSM217732 1 0.343 0.937 0.936 0.064
#> GSM217733 1 0.343 0.937 0.936 0.064
#> GSM217734 1 0.343 0.937 0.936 0.064
#> GSM217735 1 0.343 0.937 0.936 0.064
#> GSM217736 1 0.343 0.937 0.936 0.064
#> GSM217737 2 0.939 0.796 0.356 0.644
#> GSM217738 2 0.939 0.796 0.356 0.644
#> GSM217739 2 0.939 0.796 0.356 0.644
#> GSM217740 2 0.939 0.796 0.356 0.644
#> GSM217741 2 0.939 0.796 0.356 0.644
#> GSM217742 2 0.939 0.796 0.356 0.644
#> GSM217743 2 0.939 0.796 0.356 0.644
#> GSM217744 2 0.939 0.796 0.356 0.644
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217645 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217646 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217647 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217648 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217649 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217650 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217651 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217652 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217653 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217654 2 0.2356 0.791 0.000 0.928 0.072
#> GSM217655 2 0.2448 0.789 0.000 0.924 0.076
#> GSM217656 2 0.4555 0.709 0.000 0.800 0.200
#> GSM217657 2 0.4555 0.709 0.000 0.800 0.200
#> GSM217658 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217659 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217660 2 0.1163 0.809 0.000 0.972 0.028
#> GSM217661 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217662 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217663 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217664 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217665 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217666 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217667 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217668 2 0.5560 0.700 0.300 0.700 0.000
#> GSM217669 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217670 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217671 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217672 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217673 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217674 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217675 1 0.1753 0.935 0.952 0.048 0.000
#> GSM217676 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217684 2 0.5968 0.665 0.364 0.636 0.000
#> GSM217685 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217686 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217687 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217688 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217689 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217690 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217691 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217692 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217693 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217694 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217695 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217696 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217697 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217698 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217699 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217700 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217701 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217702 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217703 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217704 3 0.0000 1.000 0.000 0.000 1.000
#> GSM217705 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217706 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217707 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217708 1 0.2537 0.902 0.920 0.080 0.000
#> GSM217709 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217710 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217711 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217712 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217713 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217714 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217715 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217716 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217717 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217718 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217719 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217720 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217721 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217722 2 0.5835 0.681 0.340 0.660 0.000
#> GSM217723 1 0.0747 0.981 0.984 0.016 0.000
#> GSM217724 1 0.0747 0.981 0.984 0.016 0.000
#> GSM217725 1 0.0747 0.981 0.984 0.016 0.000
#> GSM217726 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217728 1 0.0747 0.981 0.984 0.016 0.000
#> GSM217729 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.991 1.000 0.000 0.000
#> GSM217737 2 0.1411 0.806 0.000 0.964 0.036
#> GSM217738 2 0.1411 0.806 0.000 0.964 0.036
#> GSM217739 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217740 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217741 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217742 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217743 2 0.1031 0.810 0.000 0.976 0.024
#> GSM217744 2 0.1031 0.810 0.000 0.976 0.024
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217645 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217646 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217647 2 0.0469 0.964 0.000 0.988 0.000 0.012
#> GSM217648 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217649 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217650 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217651 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217652 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217653 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217654 2 0.4382 0.588 0.000 0.704 0.000 0.296
#> GSM217655 2 0.4643 0.476 0.000 0.656 0.000 0.344
#> GSM217656 4 0.6041 0.335 0.000 0.332 0.060 0.608
#> GSM217657 4 0.5933 0.135 0.000 0.408 0.040 0.552
#> GSM217658 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217659 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217660 2 0.0000 0.965 0.000 1.000 0.000 0.000
#> GSM217661 2 0.0469 0.964 0.000 0.988 0.000 0.012
#> GSM217662 2 0.0592 0.962 0.000 0.984 0.000 0.016
#> GSM217663 2 0.0336 0.965 0.000 0.992 0.000 0.008
#> GSM217664 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217665 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217666 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217667 2 0.0188 0.966 0.000 0.996 0.000 0.004
#> GSM217668 4 0.2021 0.937 0.056 0.012 0.000 0.932
#> GSM217669 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217670 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217671 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217672 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217673 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217674 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217675 1 0.2868 0.828 0.864 0.000 0.000 0.136
#> GSM217676 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217684 4 0.4103 0.722 0.256 0.000 0.000 0.744
#> GSM217685 3 0.1211 0.974 0.000 0.000 0.960 0.040
#> GSM217686 3 0.1211 0.974 0.000 0.000 0.960 0.040
#> GSM217687 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217688 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217689 3 0.1389 0.970 0.000 0.000 0.952 0.048
#> GSM217690 3 0.1389 0.970 0.000 0.000 0.952 0.048
#> GSM217691 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217692 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217695 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217696 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217698 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217699 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217700 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217701 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217702 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217703 3 0.1389 0.970 0.000 0.000 0.952 0.048
#> GSM217704 3 0.0000 0.991 0.000 0.000 1.000 0.000
#> GSM217705 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217706 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217707 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217708 1 0.4661 0.428 0.652 0.000 0.000 0.348
#> GSM217709 4 0.1867 0.947 0.072 0.000 0.000 0.928
#> GSM217710 4 0.1867 0.947 0.072 0.000 0.000 0.928
#> GSM217711 4 0.1867 0.947 0.072 0.000 0.000 0.928
#> GSM217712 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217713 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217714 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217715 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217716 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217717 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217718 4 0.1867 0.947 0.072 0.000 0.000 0.928
#> GSM217719 4 0.1867 0.947 0.072 0.000 0.000 0.928
#> GSM217720 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217721 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217722 4 0.1792 0.949 0.068 0.000 0.000 0.932
#> GSM217723 1 0.0188 0.970 0.996 0.000 0.000 0.004
#> GSM217724 1 0.1474 0.929 0.948 0.000 0.000 0.052
#> GSM217725 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217726 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217728 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217729 1 0.1557 0.925 0.944 0.000 0.000 0.056
#> GSM217730 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.973 1.000 0.000 0.000 0.000
#> GSM217737 2 0.1854 0.940 0.000 0.940 0.012 0.048
#> GSM217738 2 0.1389 0.948 0.000 0.952 0.000 0.048
#> GSM217739 2 0.1302 0.949 0.000 0.956 0.000 0.044
#> GSM217740 2 0.1302 0.949 0.000 0.956 0.000 0.044
#> GSM217741 2 0.1022 0.954 0.000 0.968 0.000 0.032
#> GSM217742 2 0.1022 0.954 0.000 0.968 0.000 0.032
#> GSM217743 2 0.1022 0.954 0.000 0.968 0.000 0.032
#> GSM217744 2 0.1022 0.954 0.000 0.968 0.000 0.032
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217645 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217646 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217647 2 0.1043 0.81001 0.000 0.960 0.000 0.000 0.040
#> GSM217648 2 0.1043 0.81001 0.000 0.960 0.000 0.000 0.040
#> GSM217649 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217651 2 0.0162 0.81298 0.000 0.996 0.000 0.000 0.004
#> GSM217652 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217653 2 0.1043 0.81001 0.000 0.960 0.000 0.000 0.040
#> GSM217654 2 0.4256 -0.23696 0.000 0.564 0.000 0.000 0.436
#> GSM217655 2 0.4074 0.00513 0.000 0.636 0.000 0.000 0.364
#> GSM217656 5 0.6012 0.61937 0.000 0.144 0.012 0.228 0.616
#> GSM217657 5 0.4594 0.50714 0.000 0.364 0.012 0.004 0.620
#> GSM217658 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217660 2 0.0693 0.80806 0.000 0.980 0.008 0.000 0.012
#> GSM217661 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217662 2 0.3452 0.68980 0.000 0.756 0.000 0.000 0.244
#> GSM217663 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217664 2 0.0000 0.81281 0.000 1.000 0.000 0.000 0.000
#> GSM217665 2 0.1043 0.81001 0.000 0.960 0.000 0.000 0.040
#> GSM217666 2 0.1410 0.80399 0.000 0.940 0.000 0.000 0.060
#> GSM217667 2 0.1410 0.80399 0.000 0.940 0.000 0.000 0.060
#> GSM217668 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217669 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217670 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217671 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217672 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217673 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217674 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0703 0.94857 0.976 0.000 0.000 0.024 0.000
#> GSM217676 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217679 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.3109 0.65804 0.200 0.000 0.000 0.800 0.000
#> GSM217685 3 0.0703 0.94535 0.000 0.000 0.976 0.000 0.024
#> GSM217686 3 0.0794 0.94283 0.000 0.000 0.972 0.000 0.028
#> GSM217687 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217688 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217689 3 0.3534 0.74241 0.000 0.000 0.744 0.000 0.256
#> GSM217690 3 0.3480 0.75127 0.000 0.000 0.752 0.000 0.248
#> GSM217691 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217692 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217693 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217694 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217695 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217696 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217697 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217698 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217700 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217701 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217702 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217703 3 0.3534 0.74241 0.000 0.000 0.744 0.000 0.256
#> GSM217704 3 0.0000 0.95939 0.000 0.000 1.000 0.000 0.000
#> GSM217705 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217706 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217707 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217708 1 0.4283 0.17002 0.544 0.000 0.000 0.456 0.000
#> GSM217709 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217710 4 0.0162 0.98310 0.000 0.000 0.000 0.996 0.004
#> GSM217711 4 0.0162 0.98310 0.000 0.000 0.000 0.996 0.004
#> GSM217712 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217713 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217714 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217715 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217716 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217717 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217718 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217719 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217720 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217721 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217722 4 0.0000 0.98690 0.000 0.000 0.000 1.000 0.000
#> GSM217723 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217724 1 0.0794 0.94388 0.972 0.000 0.000 0.028 0.000
#> GSM217725 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217726 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217729 1 0.0609 0.95287 0.980 0.000 0.000 0.020 0.000
#> GSM217730 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.97187 1.000 0.000 0.000 0.000 0.000
#> GSM217737 2 0.4533 0.38754 0.000 0.544 0.008 0.000 0.448
#> GSM217738 2 0.4455 0.50592 0.000 0.588 0.008 0.000 0.404
#> GSM217739 2 0.4101 0.56638 0.000 0.628 0.000 0.000 0.372
#> GSM217740 2 0.4101 0.56638 0.000 0.628 0.000 0.000 0.372
#> GSM217741 2 0.3730 0.65931 0.000 0.712 0.000 0.000 0.288
#> GSM217742 2 0.3730 0.65931 0.000 0.712 0.000 0.000 0.288
#> GSM217743 2 0.3730 0.65931 0.000 0.712 0.000 0.000 0.288
#> GSM217744 2 0.3730 0.65931 0.000 0.712 0.000 0.000 0.288
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM217644 2 0.0146 0.9023 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217645 2 0.0146 0.9023 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217646 2 0.0000 0.9038 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217647 2 0.2340 0.8235 0.000 0.852 0.000 0.000 0.148 0.000
#> GSM217648 2 0.2941 0.7472 0.000 0.780 0.000 0.000 0.220 0.000
#> GSM217649 2 0.0000 0.9038 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217650 2 0.0000 0.9038 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217651 2 0.0260 0.9027 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM217652 2 0.0000 0.9038 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217653 2 0.2340 0.8235 0.000 0.852 0.000 0.000 0.148 0.000
#> GSM217654 6 0.3912 0.7140 0.000 0.340 0.000 0.000 0.012 0.648
#> GSM217655 6 0.3847 0.7071 0.000 0.348 0.000 0.000 0.008 0.644
#> GSM217656 6 0.1692 0.7211 0.000 0.048 0.000 0.008 0.012 0.932
#> GSM217657 6 0.1563 0.7279 0.000 0.056 0.000 0.000 0.012 0.932
#> GSM217658 2 0.0000 0.9038 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217659 2 0.0000 0.9038 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM217660 2 0.2163 0.8382 0.000 0.892 0.016 0.000 0.092 0.000
#> GSM217661 2 0.0146 0.9023 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM217662 5 0.3838 0.3351 0.000 0.448 0.000 0.000 0.552 0.000
#> GSM217663 2 0.0146 0.9036 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217664 2 0.0146 0.9032 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM217665 2 0.2340 0.8235 0.000 0.852 0.000 0.000 0.148 0.000
#> GSM217666 2 0.2969 0.7437 0.000 0.776 0.000 0.000 0.224 0.000
#> GSM217667 2 0.2969 0.7437 0.000 0.776 0.000 0.000 0.224 0.000
#> GSM217668 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217669 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217670 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217671 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217672 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217673 4 0.0146 0.9817 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM217674 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217675 1 0.0622 0.9465 0.980 0.000 0.000 0.008 0.012 0.000
#> GSM217676 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217678 1 0.1141 0.9333 0.948 0.000 0.000 0.000 0.052 0.000
#> GSM217679 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217680 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217682 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217683 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217684 4 0.2793 0.6997 0.200 0.000 0.000 0.800 0.000 0.000
#> GSM217685 3 0.0508 0.9640 0.000 0.000 0.984 0.000 0.004 0.012
#> GSM217686 3 0.0508 0.9640 0.000 0.000 0.984 0.000 0.004 0.012
#> GSM217687 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217688 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217689 3 0.3123 0.8372 0.000 0.000 0.824 0.000 0.040 0.136
#> GSM217690 3 0.3083 0.8410 0.000 0.000 0.828 0.000 0.040 0.132
#> GSM217691 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217692 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217693 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217694 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217695 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217696 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217697 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217698 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217699 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217700 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217701 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217702 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217703 3 0.3163 0.8333 0.000 0.000 0.820 0.000 0.040 0.140
#> GSM217704 3 0.0000 0.9727 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM217705 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217706 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217707 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217708 1 0.5423 0.0553 0.456 0.000 0.000 0.440 0.004 0.100
#> GSM217709 4 0.0725 0.9686 0.000 0.000 0.000 0.976 0.012 0.012
#> GSM217710 4 0.0993 0.9594 0.000 0.000 0.000 0.964 0.012 0.024
#> GSM217711 4 0.0993 0.9594 0.000 0.000 0.000 0.964 0.012 0.024
#> GSM217712 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217713 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217714 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217715 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217716 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217717 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217718 4 0.0146 0.9820 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM217719 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217720 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217721 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217722 4 0.0000 0.9845 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217723 1 0.1788 0.9161 0.916 0.000 0.000 0.004 0.076 0.004
#> GSM217724 1 0.1901 0.9135 0.912 0.000 0.000 0.008 0.076 0.004
#> GSM217725 1 0.1732 0.9185 0.920 0.000 0.000 0.004 0.072 0.004
#> GSM217726 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217727 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217728 1 0.1788 0.9161 0.916 0.000 0.000 0.004 0.076 0.004
#> GSM217729 1 0.1462 0.9285 0.936 0.000 0.000 0.008 0.056 0.000
#> GSM217730 1 0.0937 0.9389 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM217731 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217734 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217735 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.9544 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM217737 5 0.3022 0.8851 0.000 0.112 0.020 0.000 0.848 0.020
#> GSM217738 5 0.2844 0.8936 0.000 0.112 0.012 0.000 0.856 0.020
#> GSM217739 5 0.2135 0.9227 0.000 0.128 0.000 0.000 0.872 0.000
#> GSM217740 5 0.2135 0.9227 0.000 0.128 0.000 0.000 0.872 0.000
#> GSM217741 5 0.2135 0.9227 0.000 0.128 0.000 0.000 0.872 0.000
#> GSM217742 5 0.2135 0.9227 0.000 0.128 0.000 0.000 0.872 0.000
#> GSM217743 5 0.2135 0.9227 0.000 0.128 0.000 0.000 0.872 0.000
#> GSM217744 5 0.2135 0.9227 0.000 0.128 0.000 0.000 0.872 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:mclust 99 4.58e-01 2
#> ATC:mclust 101 8.56e-05 3
#> ATC:mclust 97 4.86e-06 4
#> ATC:mclust 97 3.79e-06 5
#> ATC:mclust 99 1.92e-10 6
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 3925 rows and 101 columns.
#> Top rows (392, 784, 1177, 1570, 1962) 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 1.000 0.989 0.996 0.5052 0.495 0.495
#> 3 3 1.000 0.973 0.989 0.2507 0.871 0.740
#> 4 4 0.809 0.831 0.907 0.1032 0.939 0.835
#> 5 5 0.783 0.425 0.775 0.0646 0.966 0.894
#> 6 6 0.744 0.498 0.759 0.0283 0.916 0.725
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
#> GSM217644 2 0.0000 0.992 0.000 1.000
#> GSM217645 2 0.0000 0.992 0.000 1.000
#> GSM217646 2 0.0000 0.992 0.000 1.000
#> GSM217647 2 0.0000 0.992 0.000 1.000
#> GSM217648 2 0.0000 0.992 0.000 1.000
#> GSM217649 2 0.0000 0.992 0.000 1.000
#> GSM217650 2 0.0000 0.992 0.000 1.000
#> GSM217651 2 0.0000 0.992 0.000 1.000
#> GSM217652 2 0.0000 0.992 0.000 1.000
#> GSM217653 2 0.0000 0.992 0.000 1.000
#> GSM217654 2 0.0000 0.992 0.000 1.000
#> GSM217655 2 0.0000 0.992 0.000 1.000
#> GSM217656 2 0.9686 0.345 0.396 0.604
#> GSM217657 2 0.0376 0.988 0.004 0.996
#> GSM217658 2 0.0000 0.992 0.000 1.000
#> GSM217659 2 0.0000 0.992 0.000 1.000
#> GSM217660 2 0.0000 0.992 0.000 1.000
#> GSM217661 2 0.0000 0.992 0.000 1.000
#> GSM217662 2 0.0000 0.992 0.000 1.000
#> GSM217663 2 0.0000 0.992 0.000 1.000
#> GSM217664 2 0.0000 0.992 0.000 1.000
#> GSM217665 2 0.0000 0.992 0.000 1.000
#> GSM217666 2 0.0000 0.992 0.000 1.000
#> GSM217667 2 0.0000 0.992 0.000 1.000
#> GSM217668 1 0.0000 1.000 1.000 0.000
#> GSM217669 1 0.0000 1.000 1.000 0.000
#> GSM217670 1 0.0000 1.000 1.000 0.000
#> GSM217671 1 0.0000 1.000 1.000 0.000
#> GSM217672 1 0.0000 1.000 1.000 0.000
#> GSM217673 1 0.0000 1.000 1.000 0.000
#> GSM217674 1 0.0000 1.000 1.000 0.000
#> GSM217675 1 0.0000 1.000 1.000 0.000
#> GSM217676 1 0.0000 1.000 1.000 0.000
#> GSM217677 1 0.0000 1.000 1.000 0.000
#> GSM217678 1 0.0000 1.000 1.000 0.000
#> GSM217679 1 0.0000 1.000 1.000 0.000
#> GSM217680 1 0.0000 1.000 1.000 0.000
#> GSM217681 1 0.0000 1.000 1.000 0.000
#> GSM217682 1 0.0000 1.000 1.000 0.000
#> GSM217683 1 0.0000 1.000 1.000 0.000
#> GSM217684 1 0.0000 1.000 1.000 0.000
#> GSM217685 2 0.0000 0.992 0.000 1.000
#> GSM217686 2 0.0000 0.992 0.000 1.000
#> GSM217687 2 0.0000 0.992 0.000 1.000
#> GSM217688 2 0.0000 0.992 0.000 1.000
#> GSM217689 2 0.0000 0.992 0.000 1.000
#> GSM217690 2 0.0000 0.992 0.000 1.000
#> GSM217691 2 0.0000 0.992 0.000 1.000
#> GSM217692 2 0.0000 0.992 0.000 1.000
#> GSM217693 2 0.0000 0.992 0.000 1.000
#> GSM217694 2 0.0000 0.992 0.000 1.000
#> GSM217695 2 0.0000 0.992 0.000 1.000
#> GSM217696 2 0.0000 0.992 0.000 1.000
#> GSM217697 2 0.0000 0.992 0.000 1.000
#> GSM217698 2 0.0000 0.992 0.000 1.000
#> GSM217699 2 0.0000 0.992 0.000 1.000
#> GSM217700 2 0.0000 0.992 0.000 1.000
#> GSM217701 2 0.0000 0.992 0.000 1.000
#> GSM217702 2 0.0000 0.992 0.000 1.000
#> GSM217703 2 0.0000 0.992 0.000 1.000
#> GSM217704 2 0.0000 0.992 0.000 1.000
#> GSM217705 1 0.0000 1.000 1.000 0.000
#> GSM217706 1 0.0000 1.000 1.000 0.000
#> GSM217707 1 0.0000 1.000 1.000 0.000
#> GSM217708 1 0.0000 1.000 1.000 0.000
#> GSM217709 1 0.0000 1.000 1.000 0.000
#> GSM217710 1 0.0000 1.000 1.000 0.000
#> GSM217711 1 0.0000 1.000 1.000 0.000
#> GSM217712 1 0.0000 1.000 1.000 0.000
#> GSM217713 1 0.0000 1.000 1.000 0.000
#> GSM217714 1 0.0000 1.000 1.000 0.000
#> GSM217715 1 0.0000 1.000 1.000 0.000
#> GSM217716 1 0.0000 1.000 1.000 0.000
#> GSM217717 1 0.0000 1.000 1.000 0.000
#> GSM217718 1 0.0000 1.000 1.000 0.000
#> GSM217719 1 0.0000 1.000 1.000 0.000
#> GSM217720 1 0.0000 1.000 1.000 0.000
#> GSM217721 1 0.0000 1.000 1.000 0.000
#> GSM217722 1 0.0000 1.000 1.000 0.000
#> GSM217723 1 0.0000 1.000 1.000 0.000
#> GSM217724 1 0.0000 1.000 1.000 0.000
#> GSM217725 1 0.0000 1.000 1.000 0.000
#> GSM217726 1 0.0000 1.000 1.000 0.000
#> GSM217727 1 0.0000 1.000 1.000 0.000
#> GSM217728 1 0.0000 1.000 1.000 0.000
#> GSM217729 1 0.0000 1.000 1.000 0.000
#> GSM217730 1 0.0000 1.000 1.000 0.000
#> GSM217731 1 0.0000 1.000 1.000 0.000
#> GSM217732 1 0.0000 1.000 1.000 0.000
#> GSM217733 1 0.0000 1.000 1.000 0.000
#> GSM217734 1 0.0000 1.000 1.000 0.000
#> GSM217735 1 0.0000 1.000 1.000 0.000
#> GSM217736 1 0.0000 1.000 1.000 0.000
#> GSM217737 2 0.0000 0.992 0.000 1.000
#> GSM217738 2 0.0000 0.992 0.000 1.000
#> GSM217739 2 0.0000 0.992 0.000 1.000
#> GSM217740 2 0.0000 0.992 0.000 1.000
#> GSM217741 2 0.0000 0.992 0.000 1.000
#> GSM217742 2 0.0000 0.992 0.000 1.000
#> GSM217743 2 0.0000 0.992 0.000 1.000
#> GSM217744 2 0.0000 0.992 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM217644 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217645 2 0.0424 0.981 0.008 0.992 0.000
#> GSM217646 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217647 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217648 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217649 2 0.0237 0.985 0.004 0.996 0.000
#> GSM217650 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217651 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217652 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217653 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217654 2 0.1832 0.946 0.036 0.956 0.008
#> GSM217655 2 0.2703 0.917 0.056 0.928 0.016
#> GSM217656 3 0.9226 0.143 0.412 0.152 0.436
#> GSM217657 2 0.4968 0.761 0.012 0.800 0.188
#> GSM217658 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217659 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217660 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217661 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217662 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217663 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217664 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217665 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217666 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217667 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217668 1 0.4605 0.741 0.796 0.204 0.000
#> GSM217669 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217670 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217671 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217672 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217673 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217674 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217675 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217676 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217677 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217678 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217679 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217680 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217681 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217682 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217683 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217684 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217685 3 0.0237 0.968 0.000 0.004 0.996
#> GSM217686 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217687 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217688 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217689 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217690 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217691 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217692 3 0.0424 0.965 0.000 0.008 0.992
#> GSM217693 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217694 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217695 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217696 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217697 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217698 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217699 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217700 3 0.0237 0.968 0.000 0.004 0.996
#> GSM217701 3 0.0237 0.968 0.000 0.004 0.996
#> GSM217702 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217703 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217704 3 0.0000 0.971 0.000 0.000 1.000
#> GSM217705 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217706 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217707 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217708 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217709 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217710 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217711 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217712 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217713 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217714 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217715 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217716 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217717 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217718 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217719 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217720 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217721 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217722 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217723 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217724 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217725 1 0.1031 0.971 0.976 0.000 0.024
#> GSM217726 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217727 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217728 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217729 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217730 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217731 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217732 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217733 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217734 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217735 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217736 1 0.0000 0.995 1.000 0.000 0.000
#> GSM217737 2 0.0237 0.985 0.000 0.996 0.004
#> GSM217738 2 0.0424 0.982 0.000 0.992 0.008
#> GSM217739 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217740 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217741 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217742 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217743 2 0.0000 0.988 0.000 1.000 0.000
#> GSM217744 2 0.0000 0.988 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM217644 2 0.0336 0.9330 0.000 0.992 0.000 0.008
#> GSM217645 2 0.2469 0.8531 0.000 0.892 0.000 0.108
#> GSM217646 2 0.0469 0.9329 0.000 0.988 0.000 0.012
#> GSM217647 2 0.0188 0.9336 0.000 0.996 0.000 0.004
#> GSM217648 2 0.0000 0.9333 0.000 1.000 0.000 0.000
#> GSM217649 2 0.0336 0.9335 0.000 0.992 0.000 0.008
#> GSM217650 2 0.0707 0.9309 0.000 0.980 0.000 0.020
#> GSM217651 2 0.0188 0.9338 0.000 0.996 0.000 0.004
#> GSM217652 2 0.0707 0.9294 0.000 0.980 0.000 0.020
#> GSM217653 2 0.0188 0.9335 0.000 0.996 0.000 0.004
#> GSM217654 4 0.3569 0.5170 0.000 0.196 0.000 0.804
#> GSM217655 2 0.3837 0.7263 0.000 0.776 0.000 0.224
#> GSM217656 4 0.1909 0.6015 0.008 0.004 0.048 0.940
#> GSM217657 4 0.1902 0.5895 0.000 0.004 0.064 0.932
#> GSM217658 2 0.0336 0.9335 0.000 0.992 0.000 0.008
#> GSM217659 2 0.0469 0.9329 0.000 0.988 0.000 0.012
#> GSM217660 2 0.0469 0.9333 0.000 0.988 0.000 0.012
#> GSM217661 2 0.3486 0.7616 0.000 0.812 0.000 0.188
#> GSM217662 2 0.1302 0.9151 0.000 0.956 0.000 0.044
#> GSM217663 2 0.0000 0.9333 0.000 1.000 0.000 0.000
#> GSM217664 2 0.0336 0.9335 0.000 0.992 0.000 0.008
#> GSM217665 2 0.0188 0.9336 0.000 0.996 0.000 0.004
#> GSM217666 2 0.0188 0.9336 0.000 0.996 0.000 0.004
#> GSM217667 2 0.0188 0.9336 0.000 0.996 0.000 0.004
#> GSM217668 1 0.4171 0.8300 0.828 0.084 0.000 0.088
#> GSM217669 1 0.3311 0.8727 0.828 0.000 0.000 0.172
#> GSM217670 1 0.2081 0.8897 0.916 0.000 0.000 0.084
#> GSM217671 1 0.1716 0.8901 0.936 0.000 0.000 0.064
#> GSM217672 1 0.2216 0.8889 0.908 0.000 0.000 0.092
#> GSM217673 1 0.2081 0.8895 0.916 0.000 0.000 0.084
#> GSM217674 1 0.0592 0.8772 0.984 0.000 0.000 0.016
#> GSM217675 1 0.0188 0.8842 0.996 0.000 0.000 0.004
#> GSM217676 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217677 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217678 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217679 1 0.0707 0.8744 0.980 0.000 0.000 0.020
#> GSM217680 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217681 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217682 1 0.0188 0.8842 0.996 0.000 0.000 0.004
#> GSM217683 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217684 1 0.1867 0.8900 0.928 0.000 0.000 0.072
#> GSM217685 3 0.2011 0.9158 0.000 0.000 0.920 0.080
#> GSM217686 3 0.1211 0.9430 0.000 0.000 0.960 0.040
#> GSM217687 3 0.0592 0.9562 0.000 0.000 0.984 0.016
#> GSM217688 3 0.0592 0.9562 0.000 0.000 0.984 0.016
#> GSM217689 3 0.4585 0.5689 0.000 0.000 0.668 0.332
#> GSM217690 3 0.2647 0.8756 0.000 0.000 0.880 0.120
#> GSM217691 3 0.0707 0.9522 0.000 0.000 0.980 0.020
#> GSM217692 3 0.0000 0.9600 0.000 0.000 1.000 0.000
#> GSM217693 3 0.0000 0.9600 0.000 0.000 1.000 0.000
#> GSM217694 3 0.0188 0.9593 0.000 0.000 0.996 0.004
#> GSM217695 3 0.0336 0.9583 0.000 0.000 0.992 0.008
#> GSM217696 3 0.0000 0.9600 0.000 0.000 1.000 0.000
#> GSM217697 3 0.0188 0.9596 0.000 0.000 0.996 0.004
#> GSM217698 3 0.0188 0.9596 0.000 0.000 0.996 0.004
#> GSM217699 3 0.0188 0.9593 0.000 0.000 0.996 0.004
#> GSM217700 3 0.0592 0.9548 0.000 0.000 0.984 0.016
#> GSM217701 3 0.1716 0.9233 0.000 0.000 0.936 0.064
#> GSM217702 3 0.0336 0.9594 0.000 0.000 0.992 0.008
#> GSM217703 4 0.4985 -0.1753 0.000 0.000 0.468 0.532
#> GSM217704 3 0.0188 0.9593 0.000 0.000 0.996 0.004
#> GSM217705 1 0.3356 0.8707 0.824 0.000 0.000 0.176
#> GSM217706 1 0.3311 0.8727 0.828 0.000 0.000 0.172
#> GSM217707 1 0.3311 0.8727 0.828 0.000 0.000 0.172
#> GSM217708 1 0.4877 0.4900 0.592 0.000 0.000 0.408
#> GSM217709 4 0.4888 0.0167 0.412 0.000 0.000 0.588
#> GSM217710 4 0.4193 0.4377 0.268 0.000 0.000 0.732
#> GSM217711 4 0.3356 0.5796 0.176 0.000 0.000 0.824
#> GSM217712 1 0.3486 0.8626 0.812 0.000 0.000 0.188
#> GSM217713 1 0.3356 0.8707 0.824 0.000 0.000 0.176
#> GSM217714 1 0.3311 0.8736 0.828 0.000 0.000 0.172
#> GSM217715 1 0.3266 0.8743 0.832 0.000 0.000 0.168
#> GSM217716 1 0.3311 0.8727 0.828 0.000 0.000 0.172
#> GSM217717 1 0.3400 0.8684 0.820 0.000 0.000 0.180
#> GSM217718 1 0.4855 0.5259 0.600 0.000 0.000 0.400
#> GSM217719 1 0.3649 0.8487 0.796 0.000 0.000 0.204
#> GSM217720 1 0.3311 0.8727 0.828 0.000 0.000 0.172
#> GSM217721 1 0.3486 0.8626 0.812 0.000 0.000 0.188
#> GSM217722 1 0.3400 0.8683 0.820 0.000 0.000 0.180
#> GSM217723 1 0.3356 0.8710 0.824 0.000 0.000 0.176
#> GSM217724 1 0.3356 0.8707 0.824 0.000 0.000 0.176
#> GSM217725 1 0.3074 0.8793 0.848 0.000 0.000 0.152
#> GSM217726 1 0.0469 0.8797 0.988 0.000 0.000 0.012
#> GSM217727 1 0.0336 0.8821 0.992 0.000 0.000 0.008
#> GSM217728 1 0.3074 0.8792 0.848 0.000 0.000 0.152
#> GSM217729 1 0.0188 0.8865 0.996 0.000 0.000 0.004
#> GSM217730 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217731 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217732 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217733 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217734 1 0.0188 0.8842 0.996 0.000 0.000 0.004
#> GSM217735 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217736 1 0.0000 0.8860 1.000 0.000 0.000 0.000
#> GSM217737 4 0.5600 0.2672 0.000 0.376 0.028 0.596
#> GSM217738 4 0.5193 0.1831 0.000 0.412 0.008 0.580
#> GSM217739 2 0.4837 0.4291 0.000 0.648 0.004 0.348
#> GSM217740 2 0.4920 0.3818 0.000 0.628 0.004 0.368
#> GSM217741 2 0.0895 0.9247 0.000 0.976 0.004 0.020
#> GSM217742 2 0.1661 0.9021 0.000 0.944 0.004 0.052
#> GSM217743 2 0.1398 0.9116 0.000 0.956 0.004 0.040
#> GSM217744 2 0.0779 0.9267 0.000 0.980 0.004 0.016
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM217644 2 0.0992 0.8629 0.008 0.968 0.000 0.000 0.024
#> GSM217645 2 0.3841 0.7560 0.032 0.808 0.000 0.012 0.148
#> GSM217646 2 0.2411 0.8410 0.108 0.884 0.000 0.000 0.008
#> GSM217647 2 0.0566 0.8628 0.012 0.984 0.000 0.000 0.004
#> GSM217648 2 0.0912 0.8587 0.012 0.972 0.000 0.000 0.016
#> GSM217649 2 0.1410 0.8591 0.060 0.940 0.000 0.000 0.000
#> GSM217650 2 0.2659 0.8390 0.060 0.888 0.000 0.000 0.052
#> GSM217651 2 0.1818 0.8627 0.044 0.932 0.000 0.000 0.024
#> GSM217652 2 0.2300 0.8502 0.052 0.908 0.000 0.000 0.040
#> GSM217653 2 0.0912 0.8637 0.012 0.972 0.000 0.000 0.016
#> GSM217654 5 0.1883 0.6416 0.008 0.048 0.000 0.012 0.932
#> GSM217655 5 0.6024 0.2038 0.132 0.336 0.000 0.000 0.532
#> GSM217656 5 0.1280 0.6541 0.000 0.008 0.008 0.024 0.960
#> GSM217657 5 0.1334 0.6528 0.004 0.012 0.004 0.020 0.960
#> GSM217658 2 0.1197 0.8606 0.048 0.952 0.000 0.000 0.000
#> GSM217659 2 0.1851 0.8513 0.088 0.912 0.000 0.000 0.000
#> GSM217660 2 0.2423 0.8543 0.080 0.896 0.000 0.000 0.024
#> GSM217661 2 0.4394 0.6871 0.036 0.744 0.000 0.008 0.212
#> GSM217662 2 0.2969 0.8022 0.020 0.852 0.000 0.000 0.128
#> GSM217663 2 0.0671 0.8643 0.016 0.980 0.000 0.000 0.004
#> GSM217664 2 0.1965 0.8570 0.052 0.924 0.000 0.000 0.024
#> GSM217665 2 0.0566 0.8628 0.004 0.984 0.000 0.000 0.012
#> GSM217666 2 0.0566 0.8633 0.004 0.984 0.000 0.000 0.012
#> GSM217667 2 0.0451 0.8637 0.004 0.988 0.000 0.000 0.008
#> GSM217668 4 0.1074 0.5116 0.016 0.004 0.000 0.968 0.012
#> GSM217669 4 0.0162 0.5183 0.004 0.000 0.000 0.996 0.000
#> GSM217670 4 0.1124 0.5022 0.036 0.000 0.000 0.960 0.004
#> GSM217671 4 0.0703 0.5095 0.024 0.000 0.000 0.976 0.000
#> GSM217672 4 0.0609 0.5119 0.020 0.000 0.000 0.980 0.000
#> GSM217673 4 0.0566 0.5149 0.012 0.000 0.000 0.984 0.004
#> GSM217674 4 0.4307 -0.6826 0.500 0.000 0.000 0.500 0.000
#> GSM217675 4 0.4304 -0.6287 0.484 0.000 0.000 0.516 0.000
#> GSM217676 4 0.4287 -0.5619 0.460 0.000 0.000 0.540 0.000
#> GSM217677 1 0.4307 0.3508 0.500 0.000 0.000 0.500 0.000
#> GSM217678 4 0.4300 -0.6021 0.476 0.000 0.000 0.524 0.000
#> GSM217679 4 0.4305 -0.6400 0.488 0.000 0.000 0.512 0.000
#> GSM217680 4 0.4302 -0.6140 0.480 0.000 0.000 0.520 0.000
#> GSM217681 4 0.4278 -0.5468 0.452 0.000 0.000 0.548 0.000
#> GSM217682 4 0.4305 -0.6395 0.488 0.000 0.000 0.512 0.000
#> GSM217683 4 0.4306 -0.6537 0.492 0.000 0.000 0.508 0.000
#> GSM217684 4 0.0880 0.5038 0.032 0.000 0.000 0.968 0.000
#> GSM217685 3 0.1124 0.9517 0.004 0.000 0.960 0.000 0.036
#> GSM217686 3 0.1357 0.9411 0.048 0.000 0.948 0.000 0.004
#> GSM217687 3 0.0324 0.9618 0.004 0.000 0.992 0.000 0.004
#> GSM217688 3 0.0671 0.9595 0.004 0.000 0.980 0.000 0.016
#> GSM217689 3 0.3790 0.6526 0.004 0.000 0.724 0.000 0.272
#> GSM217690 3 0.1608 0.9261 0.000 0.000 0.928 0.000 0.072
#> GSM217691 3 0.0162 0.9613 0.004 0.000 0.996 0.000 0.000
#> GSM217692 3 0.0510 0.9599 0.016 0.000 0.984 0.000 0.000
#> GSM217693 3 0.0290 0.9613 0.008 0.000 0.992 0.000 0.000
#> GSM217694 3 0.0451 0.9621 0.008 0.000 0.988 0.000 0.004
#> GSM217695 3 0.0162 0.9613 0.004 0.000 0.996 0.000 0.000
#> GSM217696 3 0.0404 0.9611 0.012 0.000 0.988 0.000 0.000
#> GSM217697 3 0.1671 0.9233 0.076 0.000 0.924 0.000 0.000
#> GSM217698 3 0.0000 0.9616 0.000 0.000 1.000 0.000 0.000
#> GSM217699 3 0.0324 0.9617 0.004 0.000 0.992 0.000 0.004
#> GSM217700 3 0.2095 0.9175 0.060 0.008 0.920 0.000 0.012
#> GSM217701 3 0.1251 0.9499 0.008 0.000 0.956 0.000 0.036
#> GSM217702 3 0.0000 0.9616 0.000 0.000 1.000 0.000 0.000
#> GSM217703 5 0.4443 -0.1337 0.004 0.000 0.472 0.000 0.524
#> GSM217704 3 0.0510 0.9607 0.016 0.000 0.984 0.000 0.000
#> GSM217705 4 0.0000 0.5187 0.000 0.000 0.000 1.000 0.000
#> GSM217706 4 0.0451 0.5185 0.008 0.000 0.000 0.988 0.004
#> GSM217707 4 0.0693 0.5154 0.012 0.000 0.000 0.980 0.008
#> GSM217708 4 0.1628 0.4652 0.008 0.000 0.000 0.936 0.056
#> GSM217709 4 0.2358 0.3942 0.008 0.000 0.000 0.888 0.104
#> GSM217710 5 0.4300 0.2888 0.000 0.000 0.000 0.476 0.524
#> GSM217711 5 0.4015 0.4738 0.000 0.000 0.000 0.348 0.652
#> GSM217712 4 0.0451 0.5161 0.008 0.000 0.000 0.988 0.004
#> GSM217713 4 0.0162 0.5185 0.000 0.000 0.000 0.996 0.004
#> GSM217714 4 0.0451 0.5185 0.008 0.000 0.000 0.988 0.004
#> GSM217715 4 0.0451 0.5185 0.008 0.000 0.000 0.988 0.004
#> GSM217716 4 0.0324 0.5185 0.004 0.000 0.000 0.992 0.004
#> GSM217717 4 0.0290 0.5182 0.008 0.000 0.000 0.992 0.000
#> GSM217718 4 0.0579 0.5128 0.008 0.000 0.000 0.984 0.008
#> GSM217719 4 0.0451 0.5161 0.008 0.000 0.000 0.988 0.004
#> GSM217720 4 0.0000 0.5187 0.000 0.000 0.000 1.000 0.000
#> GSM217721 4 0.0290 0.5182 0.008 0.000 0.000 0.992 0.000
#> GSM217722 4 0.0451 0.5185 0.008 0.000 0.000 0.988 0.004
#> GSM217723 4 0.2540 0.4123 0.088 0.000 0.000 0.888 0.024
#> GSM217724 4 0.3730 -0.0747 0.288 0.000 0.000 0.712 0.000
#> GSM217725 1 0.6459 0.4854 0.420 0.000 0.000 0.400 0.180
#> GSM217726 4 0.4294 -0.5819 0.468 0.000 0.000 0.532 0.000
#> GSM217727 4 0.4302 -0.6140 0.480 0.000 0.000 0.520 0.000
#> GSM217728 4 0.5501 -0.6648 0.444 0.000 0.000 0.492 0.064
#> GSM217729 4 0.4287 -0.5619 0.460 0.000 0.000 0.540 0.000
#> GSM217730 4 0.4291 -0.5705 0.464 0.000 0.000 0.536 0.000
#> GSM217731 4 0.4268 -0.5304 0.444 0.000 0.000 0.556 0.000
#> GSM217732 4 0.4294 -0.5807 0.468 0.000 0.000 0.532 0.000
#> GSM217733 4 0.4235 -0.4864 0.424 0.000 0.000 0.576 0.000
#> GSM217734 4 0.4297 -0.5915 0.472 0.000 0.000 0.528 0.000
#> GSM217735 4 0.4300 -0.6021 0.476 0.000 0.000 0.524 0.000
#> GSM217736 4 0.4294 -0.5810 0.468 0.000 0.000 0.532 0.000
#> GSM217737 5 0.5091 0.4902 0.088 0.236 0.000 0.000 0.676
#> GSM217738 5 0.6644 0.3112 0.236 0.276 0.004 0.000 0.484
#> GSM217739 2 0.5620 0.5361 0.272 0.612 0.000 0.000 0.116
#> GSM217740 2 0.5738 0.5193 0.264 0.604 0.000 0.000 0.132
#> GSM217741 2 0.3779 0.7367 0.200 0.776 0.000 0.000 0.024
#> GSM217742 2 0.4250 0.6848 0.252 0.720 0.000 0.000 0.028
#> GSM217743 2 0.4206 0.6721 0.272 0.708 0.000 0.000 0.020
#> GSM217744 2 0.3861 0.6891 0.264 0.728 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
#> GSM217644 2 0.2737 0.8308 0.004 0.876 0.000 0.004 0.056 0.060
#> GSM217645 2 0.4878 0.6728 0.020 0.712 0.000 0.012 0.072 0.184
#> GSM217646 2 0.2403 0.8173 0.040 0.900 0.000 0.000 0.040 0.020
#> GSM217647 2 0.1967 0.8173 0.012 0.904 0.000 0.000 0.084 0.000
#> GSM217648 2 0.3050 0.5594 0.000 0.764 0.000 0.000 0.236 0.000
#> GSM217649 2 0.1265 0.8282 0.008 0.948 0.000 0.000 0.044 0.000
#> GSM217650 2 0.3817 0.7556 0.020 0.792 0.000 0.000 0.048 0.140
#> GSM217651 2 0.2094 0.8386 0.004 0.908 0.000 0.000 0.064 0.024
#> GSM217652 2 0.2872 0.8022 0.008 0.864 0.000 0.000 0.052 0.076
#> GSM217653 2 0.2639 0.8288 0.008 0.880 0.000 0.000 0.064 0.048
#> GSM217654 6 0.2078 0.5150 0.004 0.044 0.000 0.000 0.040 0.912
#> GSM217655 6 0.5441 -0.0158 0.028 0.388 0.000 0.000 0.060 0.524
#> GSM217656 6 0.2952 0.5264 0.016 0.008 0.032 0.004 0.064 0.876
#> GSM217657 6 0.2271 0.5273 0.008 0.012 0.016 0.000 0.056 0.908
#> GSM217658 2 0.0858 0.8315 0.004 0.968 0.000 0.000 0.028 0.000
#> GSM217659 2 0.1401 0.8316 0.020 0.948 0.000 0.000 0.028 0.004
#> GSM217660 2 0.2993 0.7582 0.028 0.844 0.000 0.000 0.120 0.008
#> GSM217661 2 0.4577 0.6503 0.012 0.684 0.000 0.000 0.056 0.248
#> GSM217662 2 0.5493 0.6508 0.060 0.660 0.000 0.000 0.104 0.176
#> GSM217663 2 0.1167 0.8402 0.008 0.960 0.000 0.000 0.020 0.012
#> GSM217664 2 0.1649 0.8340 0.008 0.936 0.000 0.000 0.040 0.016
#> GSM217665 2 0.1787 0.8269 0.008 0.920 0.000 0.000 0.068 0.004
#> GSM217666 2 0.2053 0.8094 0.004 0.888 0.000 0.000 0.108 0.000
#> GSM217667 2 0.2020 0.7977 0.000 0.896 0.000 0.000 0.096 0.008
#> GSM217668 4 0.2516 0.5225 0.084 0.004 0.000 0.884 0.024 0.004
#> GSM217669 4 0.0405 0.5803 0.008 0.000 0.000 0.988 0.004 0.000
#> GSM217670 4 0.1082 0.5707 0.040 0.000 0.000 0.956 0.004 0.000
#> GSM217671 4 0.1010 0.5633 0.036 0.000 0.000 0.960 0.004 0.000
#> GSM217672 4 0.0603 0.5775 0.016 0.000 0.000 0.980 0.004 0.000
#> GSM217673 4 0.0858 0.5736 0.028 0.000 0.000 0.968 0.004 0.000
#> GSM217674 1 0.3851 0.8692 0.540 0.000 0.000 0.460 0.000 0.000
#> GSM217675 1 0.4535 0.8089 0.500 0.000 0.000 0.472 0.024 0.004
#> GSM217676 4 0.3866 -0.8382 0.484 0.000 0.000 0.516 0.000 0.000
#> GSM217677 1 0.3857 0.8775 0.532 0.000 0.000 0.468 0.000 0.000
#> GSM217678 4 0.3867 -0.8471 0.488 0.000 0.000 0.512 0.000 0.000
#> GSM217679 1 0.3993 0.8815 0.520 0.000 0.000 0.476 0.004 0.000
#> GSM217680 1 0.4097 0.8678 0.500 0.000 0.000 0.492 0.008 0.000
#> GSM217681 4 0.3866 -0.8382 0.484 0.000 0.000 0.516 0.000 0.000
#> GSM217682 1 0.3868 0.8640 0.504 0.000 0.000 0.496 0.000 0.000
#> GSM217683 1 0.3866 0.8776 0.516 0.000 0.000 0.484 0.000 0.000
#> GSM217684 4 0.1010 0.5596 0.036 0.000 0.000 0.960 0.004 0.000
#> GSM217685 3 0.1693 0.9286 0.012 0.000 0.936 0.000 0.032 0.020
#> GSM217686 3 0.1745 0.9262 0.020 0.000 0.924 0.000 0.056 0.000
#> GSM217687 3 0.0976 0.9361 0.008 0.000 0.968 0.000 0.016 0.008
#> GSM217688 3 0.1434 0.9329 0.012 0.000 0.948 0.000 0.028 0.012
#> GSM217689 3 0.4762 0.6441 0.024 0.000 0.692 0.000 0.064 0.220
#> GSM217690 3 0.2308 0.8945 0.012 0.000 0.896 0.000 0.016 0.076
#> GSM217691 3 0.1332 0.9362 0.028 0.008 0.952 0.000 0.012 0.000
#> GSM217692 3 0.1036 0.9387 0.008 0.000 0.964 0.000 0.024 0.004
#> GSM217693 3 0.1779 0.9234 0.064 0.000 0.920 0.000 0.016 0.000
#> GSM217694 3 0.1026 0.9394 0.008 0.004 0.968 0.000 0.012 0.008
#> GSM217695 3 0.1225 0.9335 0.036 0.000 0.952 0.000 0.012 0.000
#> GSM217696 3 0.1863 0.9224 0.044 0.000 0.920 0.000 0.036 0.000
#> GSM217697 3 0.2688 0.8926 0.068 0.000 0.868 0.000 0.064 0.000
#> GSM217698 3 0.0508 0.9382 0.012 0.000 0.984 0.000 0.004 0.000
#> GSM217699 3 0.0779 0.9361 0.008 0.000 0.976 0.000 0.008 0.008
#> GSM217700 3 0.2201 0.9221 0.016 0.024 0.916 0.000 0.036 0.008
#> GSM217701 3 0.1901 0.9289 0.012 0.016 0.932 0.000 0.024 0.016
#> GSM217702 3 0.0870 0.9393 0.012 0.000 0.972 0.000 0.012 0.004
#> GSM217703 6 0.4872 -0.1002 0.008 0.000 0.452 0.000 0.040 0.500
#> GSM217704 3 0.1480 0.9321 0.040 0.000 0.940 0.000 0.020 0.000
#> GSM217705 4 0.0551 0.5806 0.008 0.000 0.000 0.984 0.004 0.004
#> GSM217706 4 0.0291 0.5809 0.004 0.000 0.000 0.992 0.004 0.000
#> GSM217707 4 0.2724 0.5088 0.076 0.000 0.000 0.876 0.032 0.016
#> GSM217708 4 0.2809 0.4687 0.020 0.000 0.000 0.848 0.004 0.128
#> GSM217709 4 0.3196 0.4547 0.020 0.000 0.000 0.832 0.020 0.128
#> GSM217710 6 0.4574 0.2333 0.012 0.000 0.000 0.464 0.016 0.508
#> GSM217711 6 0.4317 0.4483 0.012 0.000 0.000 0.336 0.016 0.636
#> GSM217712 4 0.1577 0.5559 0.036 0.000 0.000 0.940 0.016 0.008
#> GSM217713 4 0.0458 0.5796 0.016 0.000 0.000 0.984 0.000 0.000
#> GSM217714 4 0.1065 0.5751 0.020 0.000 0.000 0.964 0.008 0.008
#> GSM217715 4 0.0000 0.5801 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM217716 4 0.0935 0.5753 0.032 0.000 0.000 0.964 0.004 0.000
#> GSM217717 4 0.0405 0.5797 0.008 0.000 0.000 0.988 0.000 0.004
#> GSM217718 4 0.1053 0.5721 0.012 0.000 0.000 0.964 0.004 0.020
#> GSM217719 4 0.0665 0.5797 0.008 0.000 0.000 0.980 0.004 0.008
#> GSM217720 4 0.0291 0.5798 0.004 0.000 0.000 0.992 0.004 0.000
#> GSM217721 4 0.0870 0.5772 0.012 0.000 0.000 0.972 0.004 0.012
#> GSM217722 4 0.1296 0.5656 0.032 0.000 0.000 0.952 0.012 0.004
#> GSM217723 4 0.3418 0.4018 0.084 0.000 0.000 0.820 0.004 0.092
#> GSM217724 4 0.4531 -0.5099 0.352 0.000 0.000 0.608 0.004 0.036
#> GSM217725 1 0.6129 0.5547 0.452 0.000 0.000 0.368 0.020 0.160
#> GSM217726 4 0.3868 -0.8486 0.492 0.000 0.000 0.508 0.000 0.000
#> GSM217727 4 0.3868 -0.8644 0.496 0.000 0.000 0.504 0.000 0.000
#> GSM217728 4 0.4902 -0.8177 0.452 0.000 0.000 0.500 0.012 0.036
#> GSM217729 4 0.3993 -0.8343 0.476 0.000 0.000 0.520 0.004 0.000
#> GSM217730 4 0.4093 -0.8385 0.476 0.000 0.000 0.516 0.008 0.000
#> GSM217731 4 0.4542 -0.7818 0.440 0.000 0.000 0.532 0.020 0.008
#> GSM217732 4 0.3867 -0.8480 0.488 0.000 0.000 0.512 0.000 0.000
#> GSM217733 4 0.4310 -0.7691 0.440 0.000 0.000 0.540 0.020 0.000
#> GSM217734 4 0.3997 -0.8482 0.488 0.000 0.000 0.508 0.004 0.000
#> GSM217735 1 0.3868 0.8573 0.504 0.000 0.000 0.496 0.000 0.000
#> GSM217736 4 0.3998 -0.8648 0.492 0.000 0.000 0.504 0.004 0.000
#> GSM217737 5 0.5359 0.5859 0.008 0.116 0.016 0.000 0.652 0.208
#> GSM217738 5 0.4525 0.6686 0.000 0.128 0.008 0.000 0.724 0.140
#> GSM217739 5 0.4040 0.8038 0.000 0.280 0.000 0.000 0.688 0.032
#> GSM217740 5 0.4089 0.7998 0.000 0.264 0.000 0.000 0.696 0.040
#> GSM217741 5 0.3810 0.6979 0.000 0.428 0.000 0.000 0.572 0.000
#> GSM217742 5 0.3684 0.7814 0.000 0.372 0.000 0.000 0.628 0.000
#> GSM217743 5 0.3819 0.7826 0.004 0.372 0.000 0.000 0.624 0.000
#> GSM217744 5 0.4218 0.7468 0.012 0.400 0.000 0.000 0.584 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)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:NMF 100 3.91e-01 2
#> ATC:NMF 100 5.02e-07 3
#> ATC:NMF 93 2.63e-07 4
#> ATC:NMF 69 7.61e-07 5
#> ATC:NMF 80 1.32e-10 6
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