cola Report for GDS4057

Date: 2019-12-25 21:08:29 CET, cola version: 1.3.2

Document is loading...


Summary

All available functions which can be applied to this res_list object:

res_list
#> A 'ConsensusPartitionList' object with 24 methods.
#>   On a matrix with 21168 rows and 103 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] 21168   103

Density distribution

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)

plot of chunk density-heatmap

Suggest the best k

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.996 0.998 **
SD:skmeans 2 1.000 0.998 0.999 **
CV:kmeans 2 1.000 0.982 0.994 **
CV:skmeans 2 1.000 0.983 0.993 **
CV:NMF 2 1.000 0.967 0.987 **
MAD:kmeans 2 1.000 0.998 0.999 **
MAD:skmeans 2 1.000 0.999 0.999 **
MAD:NMF 2 1.000 0.965 0.986 **
ATC:kmeans 3 1.000 0.989 0.995 **
ATC:pam 3 1.000 0.953 0.982 **
SD:NMF 2 0.999 0.954 0.981 **
ATC:skmeans 3 0.982 0.931 0.971 ** 2
ATC:NMF 2 0.939 0.923 0.968 *
CV:mclust 4 0.930 0.935 0.964 * 2,3
SD:mclust 2 0.917 0.968 0.979 *
MAD:mclust 6 0.911 0.893 0.939 *
ATC:mclust 2 0.864 0.931 0.969
MAD:pam 2 0.859 0.913 0.963
ATC:hclust 4 0.822 0.818 0.917
SD:pam 2 0.734 0.859 0.937
CV:pam 2 0.732 0.854 0.936
MAD:hclust 2 0.652 0.843 0.926
SD:hclust 2 0.482 0.855 0.908
CV:hclust 2 0.456 0.868 0.909

**: 1-PAC > 0.95, *: 1-PAC > 0.9

CDF of consensus matrices

Cumulative distribution function curves of consensus matrix for all methods.

collect_plots(res_list, fun = plot_ecdf)

plot of chunk collect-plots

Consensus heatmap

Consensus heatmaps for all methods. (What is a consensus heatmap?)

collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-1

collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-2

collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-3

collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-4

collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)

plot of chunk tab-collect-consensus-heatmap-5

Membership heatmap

Membership heatmaps for all methods. (What is a membership heatmap?)

collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-1

collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-2

collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-3

collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-4

collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)

plot of chunk tab-collect-membership-heatmap-5

Signature heatmap

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)

plot of chunk tab-collect-get-signatures-1

collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-2

collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-3

collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-4

collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)

plot of chunk tab-collect-get-signatures-5

Statistics table

The statistics used for measuring the stability of consensus partitioning. (How are they defined?)

get_stats(res_list, k = 2)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      2 0.999           0.954       0.981          0.501 0.499   0.499
#> CV:NMF      2 1.000           0.967       0.987          0.504 0.496   0.496
#> MAD:NMF     2 1.000           0.965       0.986          0.503 0.496   0.496
#> ATC:NMF     2 0.939           0.923       0.968          0.494 0.512   0.512
#> SD:skmeans  2 1.000           0.998       0.999          0.504 0.496   0.496
#> CV:skmeans  2 1.000           0.983       0.993          0.505 0.496   0.496
#> MAD:skmeans 2 1.000           0.999       0.999          0.504 0.496   0.496
#> ATC:skmeans 2 1.000           0.984       0.992          0.504 0.496   0.496
#> SD:mclust   2 0.917           0.968       0.979          0.503 0.495   0.495
#> CV:mclust   2 1.000           0.957       0.981          0.504 0.496   0.496
#> MAD:mclust  2 0.777           0.918       0.960          0.498 0.496   0.496
#> ATC:mclust  2 0.864           0.931       0.969          0.493 0.503   0.503
#> SD:kmeans   2 1.000           0.996       0.998          0.504 0.496   0.496
#> CV:kmeans   2 1.000           0.982       0.994          0.505 0.496   0.496
#> MAD:kmeans  2 1.000           0.998       0.999          0.504 0.496   0.496
#> ATC:kmeans  2 0.834           0.934       0.970          0.480 0.520   0.520
#> SD:pam      2 0.734           0.859       0.937          0.457 0.567   0.567
#> CV:pam      2 0.732           0.854       0.936          0.445 0.567   0.567
#> MAD:pam     2 0.859           0.913       0.963          0.473 0.525   0.525
#> ATC:pam     2 0.806           0.873       0.948          0.468 0.530   0.530
#> SD:hclust   2 0.482           0.855       0.908          0.450 0.506   0.506
#> CV:hclust   2 0.456           0.868       0.909          0.463 0.497   0.497
#> MAD:hclust  2 0.652           0.843       0.926          0.493 0.497   0.497
#> ATC:hclust  2 0.784           0.915       0.959          0.286 0.722   0.722
get_stats(res_list, k = 3)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.845           0.837       0.924          0.279 0.809   0.637
#> CV:NMF      3 0.824           0.849       0.921          0.284 0.791   0.604
#> MAD:NMF     3 0.793           0.822       0.917          0.280 0.829   0.669
#> ATC:NMF     3 0.864           0.851       0.942          0.295 0.787   0.606
#> SD:skmeans  3 0.805           0.791       0.899          0.281 0.807   0.628
#> CV:skmeans  3 0.715           0.748       0.872          0.274 0.855   0.712
#> MAD:skmeans 3 0.821           0.882       0.940          0.294 0.800   0.615
#> ATC:skmeans 3 0.982           0.931       0.971          0.215 0.880   0.760
#> SD:mclust   3 0.855           0.812       0.929          0.268 0.816   0.645
#> CV:mclust   3 0.907           0.934       0.964          0.296 0.766   0.562
#> MAD:mclust  3 0.882           0.879       0.939          0.299 0.775   0.576
#> ATC:mclust  3 0.608           0.599       0.764          0.273 0.798   0.614
#> SD:kmeans   3 0.756           0.810       0.892          0.262 0.874   0.748
#> CV:kmeans   3 0.738           0.822       0.894          0.260 0.883   0.763
#> MAD:kmeans  3 0.766           0.476       0.688          0.275 0.915   0.831
#> ATC:kmeans  3 1.000           0.989       0.995          0.260 0.767   0.595
#> SD:pam      3 0.601           0.770       0.879          0.428 0.706   0.516
#> CV:pam      3 0.493           0.438       0.696          0.437 0.677   0.487
#> MAD:pam     3 0.641           0.827       0.888          0.371 0.760   0.570
#> ATC:pam     3 1.000           0.953       0.982          0.302 0.725   0.540
#> SD:hclust   3 0.610           0.699       0.864          0.260 0.910   0.821
#> CV:hclust   3 0.569           0.749       0.857          0.301 0.875   0.752
#> MAD:hclust  3 0.554           0.701       0.842          0.231 0.876   0.756
#> ATC:hclust  3 0.473           0.598       0.808          0.739 0.615   0.502
get_stats(res_list, k = 4)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.819           0.827       0.914         0.1628 0.816   0.538
#> CV:NMF      4 0.766           0.817       0.907         0.1579 0.863   0.629
#> MAD:NMF     4 0.806           0.815       0.905         0.1570 0.799   0.506
#> ATC:NMF     4 0.682           0.771       0.869         0.1392 0.832   0.572
#> SD:skmeans  4 0.829           0.868       0.930         0.1400 0.879   0.674
#> CV:skmeans  4 0.780           0.798       0.904         0.1492 0.878   0.678
#> MAD:skmeans 4 0.830           0.861       0.926         0.1230 0.878   0.671
#> ATC:skmeans 4 0.788           0.787       0.905         0.0949 0.911   0.780
#> SD:mclust   4 0.791           0.849       0.922         0.1176 0.881   0.689
#> CV:mclust   4 0.930           0.935       0.964         0.0919 0.939   0.823
#> MAD:mclust  4 0.822           0.848       0.914         0.1128 0.915   0.761
#> ATC:mclust  4 0.677           0.774       0.861         0.1125 0.779   0.480
#> SD:kmeans   4 0.785           0.878       0.909         0.1489 0.857   0.641
#> CV:kmeans   4 0.765           0.856       0.902         0.1499 0.842   0.607
#> MAD:kmeans  4 0.691           0.732       0.810         0.1455 0.779   0.516
#> ATC:kmeans  4 0.698           0.614       0.789         0.1605 0.880   0.706
#> SD:pam      4 0.629           0.684       0.813         0.1076 0.908   0.753
#> CV:pam      4 0.584           0.660       0.766         0.1372 0.855   0.640
#> MAD:pam     4 0.611           0.590       0.792         0.1342 0.780   0.472
#> ATC:pam     4 0.759           0.785       0.854         0.1542 0.875   0.690
#> SD:hclust   4 0.703           0.776       0.871         0.1286 0.935   0.847
#> CV:hclust   4 0.629           0.763       0.848         0.0914 0.958   0.891
#> MAD:hclust  4 0.665           0.676       0.832         0.1022 0.951   0.877
#> ATC:hclust  4 0.822           0.818       0.917         0.3006 0.822   0.633
get_stats(res_list, k = 5)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.766           0.739       0.870         0.0603 0.926   0.726
#> CV:NMF      5 0.738           0.713       0.844         0.0591 0.902   0.642
#> MAD:NMF     5 0.729           0.716       0.854         0.0582 0.888   0.610
#> ATC:NMF     5 0.694           0.637       0.815         0.0505 0.957   0.846
#> SD:skmeans  5 0.768           0.701       0.857         0.0739 0.917   0.708
#> CV:skmeans  5 0.684           0.535       0.710         0.0644 0.905   0.672
#> MAD:skmeans 5 0.755           0.714       0.861         0.0741 0.902   0.663
#> ATC:skmeans 5 0.788           0.785       0.865         0.0771 0.904   0.728
#> SD:mclust   5 0.698           0.572       0.778         0.0831 0.939   0.805
#> CV:mclust   5 0.698           0.644       0.775         0.0865 0.966   0.881
#> MAD:mclust  5 0.665           0.624       0.783         0.0793 0.846   0.528
#> ATC:mclust  5 0.675           0.656       0.804         0.0693 0.953   0.838
#> SD:kmeans   5 0.783           0.811       0.868         0.0735 0.923   0.727
#> CV:kmeans   5 0.728           0.687       0.791         0.0720 0.923   0.722
#> MAD:kmeans  5 0.798           0.828       0.882         0.0677 0.905   0.669
#> ATC:kmeans  5 0.726           0.689       0.809         0.0810 0.858   0.568
#> SD:pam      5 0.863           0.830       0.913         0.0978 0.864   0.574
#> CV:pam      5 0.764           0.811       0.884         0.0873 0.869   0.583
#> MAD:pam     5 0.871           0.839       0.931         0.0847 0.891   0.619
#> ATC:pam     5 0.840           0.773       0.892         0.0845 0.909   0.700
#> SD:hclust   5 0.741           0.735       0.853         0.0402 0.994   0.983
#> CV:hclust   5 0.704           0.735       0.845         0.0467 0.993   0.980
#> MAD:hclust  5 0.685           0.641       0.795         0.0418 0.980   0.945
#> ATC:hclust  5 0.805           0.684       0.849         0.0622 0.905   0.752
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.734           0.651       0.814         0.0445 0.928   0.685
#> CV:NMF      6 0.722           0.619       0.801         0.0421 0.931   0.690
#> MAD:NMF     6 0.699           0.515       0.737         0.0456 0.919   0.664
#> ATC:NMF     6 0.710           0.665       0.804         0.0280 0.961   0.849
#> SD:skmeans  6 0.739           0.645       0.758         0.0347 0.969   0.857
#> CV:skmeans  6 0.665           0.521       0.740         0.0383 0.910   0.639
#> MAD:skmeans 6 0.724           0.620       0.784         0.0369 0.956   0.804
#> ATC:skmeans 6 0.752           0.723       0.850         0.0451 0.976   0.909
#> SD:mclust   6 0.722           0.546       0.727         0.0588 0.832   0.456
#> CV:mclust   6 0.752           0.585       0.773         0.0570 0.868   0.533
#> MAD:mclust  6 0.911           0.893       0.939         0.0608 0.911   0.626
#> ATC:mclust  6 0.730           0.607       0.769         0.0448 0.922   0.717
#> SD:kmeans   6 0.743           0.621       0.769         0.0442 0.958   0.811
#> CV:kmeans   6 0.712           0.617       0.791         0.0430 0.958   0.811
#> MAD:kmeans  6 0.752           0.603       0.749         0.0445 0.935   0.713
#> ATC:kmeans  6 0.745           0.744       0.834         0.0599 0.941   0.746
#> SD:pam      6 0.821           0.724       0.865         0.0313 0.983   0.918
#> CV:pam      6 0.761           0.699       0.846         0.0332 0.974   0.875
#> MAD:pam     6 0.830           0.773       0.889         0.0256 0.951   0.771
#> ATC:pam     6 0.886           0.797       0.895         0.0362 0.958   0.824
#> SD:hclust   6 0.701           0.715       0.819         0.0394 0.995   0.985
#> CV:hclust   6 0.725           0.653       0.807         0.0304 0.990   0.971
#> MAD:hclust  6 0.615           0.571       0.753         0.0468 0.941   0.829
#> ATC:hclust  6 0.841           0.737       0.864         0.0420 0.929   0.787

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)

plot of chunk tab-collect-stats-from-consensus-partition-list-1

collect_stats(res_list, k = 3)

plot of chunk tab-collect-stats-from-consensus-partition-list-2

collect_stats(res_list, k = 4)

plot of chunk tab-collect-stats-from-consensus-partition-list-3

collect_stats(res_list, k = 5)

plot of chunk tab-collect-stats-from-consensus-partition-list-4

collect_stats(res_list, k = 6)

plot of chunk tab-collect-stats-from-consensus-partition-list-5

Partition from all methods

Collect partitions from all methods:

collect_classes(res_list, k = 2)

plot of chunk tab-collect-classes-from-consensus-partition-list-1

collect_classes(res_list, k = 3)

plot of chunk tab-collect-classes-from-consensus-partition-list-2

collect_classes(res_list, k = 4)

plot of chunk tab-collect-classes-from-consensus-partition-list-3

collect_classes(res_list, k = 5)

plot of chunk tab-collect-classes-from-consensus-partition-list-4

collect_classes(res_list, k = 6)

plot of chunk tab-collect-classes-from-consensus-partition-list-5

Top rows overlap

Overlap of top rows from different top-row methods:

top_rows_overlap(res_list, top_n = 1000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-1

top_rows_overlap(res_list, top_n = 2000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-2

top_rows_overlap(res_list, top_n = 3000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-3

top_rows_overlap(res_list, top_n = 4000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-4

top_rows_overlap(res_list, top_n = 5000, method = "euler")

plot of chunk tab-top-rows-overlap-by-euler-5

Also visualize the correspondance of rankings between different top-row methods:

top_rows_overlap(res_list, top_n = 1000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-1

top_rows_overlap(res_list, top_n = 2000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-2

top_rows_overlap(res_list, top_n = 3000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-3

top_rows_overlap(res_list, top_n = 4000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-4

top_rows_overlap(res_list, top_n = 5000, method = "correspondance")

plot of chunk tab-top-rows-overlap-by-correspondance-5

Heatmaps of the top rows:

top_rows_heatmap(res_list, top_n = 1000)

plot of chunk tab-top-rows-heatmap-1

top_rows_heatmap(res_list, top_n = 2000)

plot of chunk tab-top-rows-heatmap-2

top_rows_heatmap(res_list, top_n = 3000)

plot of chunk tab-top-rows-heatmap-3

top_rows_heatmap(res_list, top_n = 4000)

plot of chunk tab-top-rows-heatmap-4

top_rows_heatmap(res_list, top_n = 5000)

plot of chunk tab-top-rows-heatmap-5

Test to known annotations

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) specimen(p) genotype/variation(p) other(p) k
#> SD:NMF      101           0.0265    1.84e-05                0.0111 0.001893 2
#> CV:NMF      102           0.0253    1.70e-05                0.0638 0.003847 2
#> MAD:NMF     101           0.0303    1.56e-05                0.0322 0.002815 2
#> ATC:NMF      97           0.3991    2.66e-06                0.5641 0.004550 2
#> SD:skmeans  103           0.0230    1.72e-05                0.0536 0.004798 2
#> CV:skmeans  102           0.0336    2.28e-05                0.0933 0.002490 2
#> MAD:skmeans 103           0.0230    1.72e-05                0.0536 0.004798 2
#> ATC:skmeans 103           0.1082    1.63e-05                0.1804 0.000624 2
#> SD:mclust   103           0.0131    8.80e-05                0.1561 0.001279 2
#> CV:mclust   102           0.0155    1.21e-04                0.1796 0.001943 2
#> MAD:mclust  101           0.0174    1.66e-04                0.2058 0.001488 2
#> ATC:mclust   99           0.0392    2.86e-04                0.4167 0.002768 2
#> SD:kmeans   103           0.0230    1.72e-05                0.0536 0.004798 2
#> CV:kmeans   102           0.0253    1.70e-05                0.0638 0.003847 2
#> MAD:kmeans  103           0.0230    1.72e-05                0.0536 0.004798 2
#> ATC:kmeans  101           0.6320    1.86e-05                0.8772 0.009359 2
#> SD:pam       94           0.0941    4.49e-05                0.1690 0.035763 2
#> CV:pam       93           0.1397    1.28e-05                0.3038 0.041575 2
#> MAD:pam     101           0.0862    2.55e-06                0.3983 0.042353 2
#> ATC:pam      98           0.5197    2.46e-05                0.8262 0.017480 2
#> SD:hclust   101           0.0304    2.56e-05                0.1565 0.020942 2
#> CV:hclust    99           0.0118    5.39e-05                0.1124 0.005424 2
#> MAD:hclust   97           0.0270    8.31e-06                0.2359 0.012107 2
#> ATC:hclust  100           0.3786    8.50e-04                0.4134 0.114708 2
test_to_known_factors(res_list, k = 3)
#>               n disease.state(p) specimen(p) genotype/variation(p) other(p) k
#> SD:NMF       94          0.01180    1.13e-06              2.77e-04  0.01352 3
#> CV:NMF       98          0.00679    3.92e-06              3.10e-03  0.01181 3
#> MAD:NMF      93          0.01795    8.19e-06              4.88e-04  0.00988 3
#> ATC:NMF      93          0.15545    2.06e-03              1.59e-01  0.01414 3
#> SD:skmeans   97          0.20009    1.93e-04              1.97e-03  0.01775 3
#> CV:skmeans   93          0.06525    5.50e-05              4.19e-05  0.00543 3
#> MAD:skmeans 100          0.25359    1.13e-04              4.48e-03  0.01893 3
#> ATC:skmeans  98          0.02929    2.27e-04              2.70e-02  0.02393 3
#> SD:mclust    91          0.32652    3.04e-04              7.91e-04  0.00231 3
#> CV:mclust   101          0.32760    4.23e-04              4.56e-04  0.01108 3
#> MAD:mclust   99          0.28614    2.89e-04              8.89e-04  0.01015 3
#> ATC:mclust   74          0.08191    2.34e-04              1.01e-02  0.00367 3
#> SD:kmeans   101          0.08943    1.60e-06              1.40e-04  0.01183 3
#> CV:kmeans   102          0.04262    1.96e-06              8.99e-05  0.00838 3
#> MAD:kmeans   41               NA          NA                    NA       NA 3
#> ATC:kmeans  103          0.11388    1.63e-05              2.15e-01  0.00862 3
#> SD:pam       98          0.28614    4.54e-05              2.10e-01  0.03341 3
#> CV:pam       46               NA          NA                    NA       NA 3
#> MAD:pam     100          0.26917    4.77e-05              1.87e-01  0.01690 3
#> ATC:pam     100          0.09710    7.42e-05              2.98e-01  0.02088 3
#> SD:hclust    83          0.02623    1.84e-06              6.71e-03  0.22578 3
#> CV:hclust    91          0.01809    5.05e-06              3.39e-03  0.07621 3
#> MAD:hclust   90          0.02263    3.66e-06              2.38e-03  0.07559 3
#> ATC:hclust   75          0.04318    1.91e-06              9.11e-01  0.27237 3
test_to_known_factors(res_list, k = 4)
#>               n disease.state(p) specimen(p) genotype/variation(p) other(p) k
#> SD:NMF       96           0.1810    1.16e-05              0.011889  0.01151 4
#> CV:NMF       95           0.2821    1.35e-04              0.022170  0.03191 4
#> MAD:NMF      95           0.2920    2.72e-05              0.069494  0.00593 4
#> ATC:NMF      98           0.3314    5.86e-03              0.027291  0.02103 4
#> SD:skmeans  100           0.4837    1.97e-05              0.001591  0.07063 4
#> CV:skmeans   91           0.3566    5.27e-05              0.013234  0.11266 4
#> MAD:skmeans  98           0.3562    4.21e-05              0.001850  0.06701 4
#> ATC:skmeans  91           0.1294    4.99e-03              0.128535  0.05384 4
#> SD:mclust   101           0.5038    1.18e-05              0.000835  0.00744 4
#> CV:mclust   103           0.3056    6.58e-06              0.000455  0.00687 4
#> MAD:mclust  101           0.2312    1.13e-05              0.000295  0.01346 4
#> ATC:mclust   96           0.2538    6.68e-04              0.473417  0.05020 4
#> SD:kmeans   102           0.3636    3.16e-05              0.000877  0.03888 4
#> CV:kmeans    97           0.2749    2.14e-04              0.005221  0.05687 4
#> MAD:kmeans   91           0.3553    2.07e-04              0.003369  0.11417 4
#> ATC:kmeans   73           0.0442    9.98e-06              0.241808  0.00829 4
#> SD:pam       95           0.3397    1.48e-04              0.000574  0.17560 4
#> CV:pam       93           0.2162    1.31e-05              0.005271  0.10266 4
#> MAD:pam      73           0.3417    1.65e-05              0.013931  0.46803 4
#> ATC:pam      97           0.3844    1.65e-04              0.165171  0.02511 4
#> SD:hclust    91           0.0314    1.58e-06              0.004650  0.07314 4
#> CV:hclust    91           0.0288    3.93e-06              0.016068  0.06811 4
#> MAD:hclust   79           0.0859    1.30e-04              0.015371  0.02023 4
#> ATC:hclust   96           0.0978    7.07e-06              0.391517  0.01633 4
test_to_known_factors(res_list, k = 5)
#>              n disease.state(p) specimen(p) genotype/variation(p) other(p) k
#> SD:NMF      90           0.2371    6.82e-05               0.01635  0.06837 5
#> CV:NMF      87           0.2927    5.17e-04               0.02598  0.01389 5
#> MAD:NMF     87           0.4619    1.67e-04               0.10046  0.01116 5
#> ATC:NMF     81           0.3848    5.14e-04               0.09135  0.03383 5
#> SD:skmeans  90           0.6313    8.60e-04               0.00268  0.26602 5
#> CV:skmeans  63           0.7114    1.86e-04               0.00345  0.00363 5
#> MAD:skmeans 88           0.4508    2.78e-04               0.00322  0.10260 5
#> ATC:skmeans 89           0.3078    1.04e-02               0.08178  0.11425 5
#> SD:mclust   69           0.5891    5.30e-05               0.06205  0.19518 5
#> CV:mclust   86           0.7504    1.77e-04               0.00145  0.06903 5
#> MAD:mclust  78           0.5721    1.38e-04               0.03604  0.20844 5
#> ATC:mclust  89           0.0160    2.49e-03               0.17891  0.26737 5
#> SD:kmeans   95           0.4167    7.16e-04               0.00159  0.09799 5
#> CV:kmeans   85           0.2519    3.23e-03               0.01475  0.11342 5
#> MAD:kmeans  99           0.4842    3.18e-04               0.00278  0.05365 5
#> ATC:kmeans  81           0.0875    7.59e-04               0.12038  0.19817 5
#> SD:pam      93           0.3555    2.84e-05               0.00357  0.01825 5
#> CV:pam      93           0.2375    4.73e-07               0.01197  0.02728 5
#> MAD:pam     95           0.1875    1.52e-05               0.00391  0.02425 5
#> ATC:pam     89           0.4036    4.85e-03               0.22838  0.03442 5
#> SD:hclust   90           0.1585    7.44e-05               0.01154  0.05450 5
#> CV:hclust   92           0.0904    4.97e-05               0.05658  0.06735 5
#> MAD:hclust  68           0.1674    4.22e-04               0.00715  0.02805 5
#> ATC:hclust  75           0.0293    7.75e-06               0.05707  0.09307 5
test_to_known_factors(res_list, k = 6)
#>               n disease.state(p) specimen(p) genotype/variation(p) other(p) k
#> SD:NMF       85           0.3847    1.63e-03              1.78e-03  0.02574 6
#> CV:NMF       75           0.4161    1.14e-03              1.51e-03  0.11868 6
#> MAD:NMF      61           0.4986    2.72e-04              8.66e-03  0.07384 6
#> ATC:NMF      84           0.1385    1.02e-03              7.17e-02  0.09806 6
#> SD:skmeans   81           0.5889    1.17e-03              1.12e-02  0.06547 6
#> CV:skmeans   68           0.7795    3.72e-03              5.71e-02  0.24729 6
#> MAD:skmeans  78           0.7174    7.20e-05              7.65e-03  0.19579 6
#> ATC:skmeans  88           0.5382    3.69e-04              1.45e-01  0.21260 6
#> SD:mclust    71           0.5338    6.80e-05              6.63e-03  0.10925 6
#> CV:mclust    71           0.2112    2.25e-04              3.40e-02  0.00777 6
#> MAD:mclust  101           0.7063    1.12e-04              1.07e-02  0.06549 6
#> ATC:mclust   68           0.0392    1.05e-03              2.46e-02  0.62787 6
#> SD:kmeans    76           0.0717    1.51e-02              3.56e-05  0.00330 6
#> CV:kmeans    75           0.1607    2.93e-03              8.47e-02  0.17243 6
#> MAD:kmeans   79           0.3951    1.70e-02              1.43e-02  0.16220 6
#> ATC:kmeans   89           0.1001    4.48e-04              2.44e-02  0.44023 6
#> SD:pam       89           0.3101    8.17e-06              1.27e-02  0.04023 6
#> CV:pam       86           0.2572    3.44e-06              4.85e-02  0.04661 6
#> MAD:pam      91           0.4196    8.17e-05              6.20e-03  0.16150 6
#> ATC:pam      93           0.4040    3.38e-04              5.40e-02  0.03288 6
#> SD:hclust    91           0.0323    3.13e-05              5.07e-02  0.10245 6
#> CV:hclust    90           0.0427    2.25e-05              2.52e-02  0.07104 6
#> MAD:hclust   76           0.3255    1.55e-04              8.14e-03  0.06878 6
#> ATC:hclust   82           0.0164    1.27e-06              1.12e-02  0.03817 6

Results for each method


SD:hclust

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-hclust-collect-plots

The plots are:

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:

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)

plot of chunk SD-hclust-select-partition-number

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.482           0.855       0.908         0.4502 0.506   0.506
#> 3 3 0.610           0.699       0.864         0.2604 0.910   0.821
#> 4 4 0.703           0.776       0.871         0.1286 0.935   0.847
#> 5 5 0.741           0.735       0.853         0.0402 0.994   0.983
#> 6 6 0.701           0.715       0.819         0.0394 0.995   0.985

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.8608      0.528 0.716 0.284
#> GSM549291     2  0.9427      0.659 0.360 0.640
#> GSM549274     2  0.5946      0.873 0.144 0.856
#> GSM750738     2  0.6438      0.865 0.164 0.836
#> GSM750748     1  0.0000      0.942 1.000 0.000
#> GSM549240     1  0.0376      0.940 0.996 0.004
#> GSM549279     1  0.5842      0.812 0.860 0.140
#> GSM549294     2  0.5629      0.876 0.132 0.868
#> GSM549300     2  0.1633      0.840 0.024 0.976
#> GSM549303     2  0.0000      0.826 0.000 1.000
#> GSM549309     2  0.0376      0.826 0.004 0.996
#> GSM750753     2  0.6048      0.871 0.148 0.852
#> GSM750752     2  0.9209      0.700 0.336 0.664
#> GSM549304     2  0.6438      0.864 0.164 0.836
#> GSM549305     2  0.5294      0.876 0.120 0.880
#> GSM549307     2  0.1633      0.840 0.024 0.976
#> GSM549306     2  0.0376      0.828 0.004 0.996
#> GSM549308     2  0.0000      0.826 0.000 1.000
#> GSM549233     1  0.0000      0.942 1.000 0.000
#> GSM549234     1  0.3274      0.904 0.940 0.060
#> GSM549250     1  0.0000      0.942 1.000 0.000
#> GSM549287     2  0.9286      0.688 0.344 0.656
#> GSM750735     1  0.0000      0.942 1.000 0.000
#> GSM750736     1  0.0000      0.942 1.000 0.000
#> GSM750749     1  0.0938      0.936 0.988 0.012
#> GSM549230     1  0.0000      0.942 1.000 0.000
#> GSM549231     1  0.0000      0.942 1.000 0.000
#> GSM549237     1  0.0000      0.942 1.000 0.000
#> GSM549254     1  0.8763      0.501 0.704 0.296
#> GSM750734     1  0.0000      0.942 1.000 0.000
#> GSM549271     2  0.9209      0.698 0.336 0.664
#> GSM549232     1  0.3274      0.904 0.940 0.060
#> GSM549246     1  0.1184      0.935 0.984 0.016
#> GSM549248     1  0.0000      0.942 1.000 0.000
#> GSM549255     1  0.3274      0.904 0.940 0.060
#> GSM750746     1  0.0000      0.942 1.000 0.000
#> GSM549259     1  0.0000      0.942 1.000 0.000
#> GSM549269     2  0.5408      0.876 0.124 0.876
#> GSM549273     2  0.0000      0.826 0.000 1.000
#> GSM549299     2  0.6438      0.864 0.164 0.836
#> GSM549301     2  0.0000      0.826 0.000 1.000
#> GSM549310     2  0.9209      0.700 0.336 0.664
#> GSM549311     2  0.0000      0.826 0.000 1.000
#> GSM549302     2  0.5946      0.873 0.144 0.856
#> GSM549235     1  0.0000      0.942 1.000 0.000
#> GSM549245     1  0.3274      0.904 0.940 0.060
#> GSM549265     1  0.2603      0.918 0.956 0.044
#> GSM549282     2  0.8267      0.785 0.260 0.740
#> GSM549296     2  0.9209      0.700 0.336 0.664
#> GSM750739     1  0.0000      0.942 1.000 0.000
#> GSM750742     1  0.0000      0.942 1.000 0.000
#> GSM750744     1  0.0000      0.942 1.000 0.000
#> GSM750750     2  0.8267      0.785 0.260 0.740
#> GSM549242     1  0.0000      0.942 1.000 0.000
#> GSM549252     1  0.2423      0.920 0.960 0.040
#> GSM549253     1  0.0000      0.942 1.000 0.000
#> GSM549256     1  0.0000      0.942 1.000 0.000
#> GSM549257     1  0.3274      0.904 0.940 0.060
#> GSM549263     1  0.0000      0.942 1.000 0.000
#> GSM549267     2  0.9286      0.688 0.344 0.656
#> GSM750745     1  0.0000      0.942 1.000 0.000
#> GSM549239     1  0.0000      0.942 1.000 0.000
#> GSM549244     1  0.2603      0.917 0.956 0.044
#> GSM549249     1  0.1843      0.928 0.972 0.028
#> GSM549260     1  0.0000      0.942 1.000 0.000
#> GSM549266     1  0.4939      0.852 0.892 0.108
#> GSM549293     2  0.5946      0.873 0.144 0.856
#> GSM549236     1  0.0000      0.942 1.000 0.000
#> GSM549238     1  0.1843      0.928 0.972 0.028
#> GSM549251     1  0.0000      0.942 1.000 0.000
#> GSM549258     1  0.0000      0.942 1.000 0.000
#> GSM549264     1  0.0000      0.942 1.000 0.000
#> GSM549243     1  0.0000      0.942 1.000 0.000
#> GSM549262     1  0.0000      0.942 1.000 0.000
#> GSM549278     1  0.9552      0.236 0.624 0.376
#> GSM549283     1  0.9358      0.346 0.648 0.352
#> GSM549298     2  0.0000      0.826 0.000 1.000
#> GSM750741     1  0.0000      0.942 1.000 0.000
#> GSM549286     2  0.5408      0.876 0.124 0.876
#> GSM549241     1  0.0000      0.942 1.000 0.000
#> GSM549247     1  0.0376      0.940 0.996 0.004
#> GSM549261     1  0.0000      0.942 1.000 0.000
#> GSM549270     2  0.5178      0.876 0.116 0.884
#> GSM549277     2  0.4161      0.867 0.084 0.916
#> GSM549280     2  0.4815      0.873 0.104 0.896
#> GSM549281     1  0.6887      0.745 0.816 0.184
#> GSM549285     2  0.9460      0.629 0.364 0.636
#> GSM549288     2  0.4161      0.867 0.084 0.916
#> GSM549292     2  0.5408      0.876 0.124 0.876
#> GSM549295     2  0.1843      0.842 0.028 0.972
#> GSM549297     2  0.4161      0.867 0.084 0.916
#> GSM750743     1  0.0000      0.942 1.000 0.000
#> GSM549268     1  0.6887      0.745 0.816 0.184
#> GSM549290     2  0.9286      0.689 0.344 0.656
#> GSM549272     2  0.5408      0.876 0.124 0.876
#> GSM549276     2  0.5178      0.876 0.116 0.884
#> GSM549275     1  0.3584      0.895 0.932 0.068
#> GSM549284     2  0.6438      0.865 0.164 0.836
#> GSM750737     1  0.7528      0.678 0.784 0.216
#> GSM750740     1  0.0000      0.942 1.000 0.000
#> GSM750747     1  0.0000      0.942 1.000 0.000
#> GSM750751     2  0.5519      0.876 0.128 0.872
#> GSM750754     2  0.9393      0.667 0.356 0.644

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.7880      0.522 0.668 0.168 0.164
#> GSM549291     3  0.9751      0.311 0.252 0.308 0.440
#> GSM549274     2  0.0892      0.746 0.020 0.980 0.000
#> GSM750738     2  0.2173      0.726 0.048 0.944 0.008
#> GSM750748     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549240     1  0.0424      0.923 0.992 0.008 0.000
#> GSM549279     1  0.4654      0.726 0.792 0.208 0.000
#> GSM549294     2  0.1170      0.748 0.008 0.976 0.016
#> GSM549300     3  0.5859      0.308 0.000 0.344 0.656
#> GSM549303     3  0.1411      0.572 0.000 0.036 0.964
#> GSM549309     3  0.1163      0.571 0.000 0.028 0.972
#> GSM750753     2  0.4196      0.693 0.024 0.864 0.112
#> GSM750752     2  0.9776     -0.256 0.232 0.388 0.380
#> GSM549304     2  0.2550      0.734 0.040 0.936 0.024
#> GSM549305     2  0.0892      0.744 0.000 0.980 0.020
#> GSM549307     3  0.5905      0.288 0.000 0.352 0.648
#> GSM549306     3  0.3482      0.531 0.000 0.128 0.872
#> GSM549308     3  0.1643      0.572 0.000 0.044 0.956
#> GSM549233     1  0.0237      0.925 0.996 0.004 0.000
#> GSM549234     1  0.3649      0.867 0.896 0.068 0.036
#> GSM549250     1  0.0983      0.919 0.980 0.004 0.016
#> GSM549287     3  0.9700      0.329 0.240 0.312 0.448
#> GSM750735     1  0.0000      0.926 1.000 0.000 0.000
#> GSM750736     1  0.0000      0.926 1.000 0.000 0.000
#> GSM750749     1  0.1315      0.913 0.972 0.020 0.008
#> GSM549230     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549254     1  0.8038      0.408 0.620 0.280 0.100
#> GSM750734     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549271     3  0.9714      0.321 0.236 0.324 0.440
#> GSM549232     1  0.3649      0.867 0.896 0.068 0.036
#> GSM549246     1  0.1491      0.913 0.968 0.016 0.016
#> GSM549248     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549255     1  0.3649      0.867 0.896 0.068 0.036
#> GSM750746     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549269     2  0.0000      0.743 0.000 1.000 0.000
#> GSM549273     3  0.1411      0.572 0.000 0.036 0.964
#> GSM549299     2  0.2550      0.734 0.040 0.936 0.024
#> GSM549301     3  0.1860      0.570 0.000 0.052 0.948
#> GSM549310     2  0.9776     -0.256 0.232 0.388 0.380
#> GSM549311     3  0.1289      0.573 0.000 0.032 0.968
#> GSM549302     2  0.0892      0.746 0.020 0.980 0.000
#> GSM549235     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549245     1  0.3649      0.867 0.896 0.068 0.036
#> GSM549265     1  0.2926      0.890 0.924 0.040 0.036
#> GSM549282     3  0.9211      0.363 0.176 0.312 0.512
#> GSM549296     2  0.9776     -0.256 0.232 0.388 0.380
#> GSM750739     1  0.0000      0.926 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.926 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.926 1.000 0.000 0.000
#> GSM750750     3  0.9211      0.363 0.176 0.312 0.512
#> GSM549242     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549252     1  0.3134      0.883 0.916 0.052 0.032
#> GSM549253     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549256     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549257     1  0.3649      0.867 0.896 0.068 0.036
#> GSM549263     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549267     3  0.9700      0.329 0.240 0.312 0.448
#> GSM750745     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549244     1  0.3253      0.880 0.912 0.052 0.036
#> GSM549249     1  0.2793      0.891 0.928 0.044 0.028
#> GSM549260     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549266     1  0.4121      0.780 0.832 0.168 0.000
#> GSM549293     2  0.0892      0.746 0.020 0.980 0.000
#> GSM549236     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549238     1  0.2663      0.893 0.932 0.044 0.024
#> GSM549251     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549258     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549264     1  0.0237      0.925 0.996 0.004 0.000
#> GSM549243     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549278     1  0.9153      0.124 0.524 0.300 0.176
#> GSM549283     1  0.8694      0.303 0.580 0.268 0.152
#> GSM549298     3  0.1860      0.571 0.000 0.052 0.948
#> GSM750741     1  0.0237      0.924 0.996 0.004 0.000
#> GSM549286     2  0.0000      0.743 0.000 1.000 0.000
#> GSM549241     1  0.0237      0.924 0.996 0.004 0.000
#> GSM549247     1  0.0424      0.923 0.992 0.008 0.000
#> GSM549261     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549270     2  0.2711      0.711 0.000 0.912 0.088
#> GSM549277     2  0.6075      0.441 0.008 0.676 0.316
#> GSM549280     2  0.6473      0.399 0.016 0.652 0.332
#> GSM549281     1  0.5581      0.724 0.788 0.176 0.036
#> GSM549285     2  0.9931     -0.177 0.288 0.388 0.324
#> GSM549288     2  0.5656      0.525 0.008 0.728 0.264
#> GSM549292     2  0.0000      0.743 0.000 1.000 0.000
#> GSM549295     3  0.6244      0.124 0.000 0.440 0.560
#> GSM549297     2  0.5541      0.543 0.008 0.740 0.252
#> GSM750743     1  0.0000      0.926 1.000 0.000 0.000
#> GSM549268     1  0.5581      0.724 0.788 0.176 0.036
#> GSM549290     3  0.9764      0.327 0.252 0.312 0.436
#> GSM549272     2  0.0000      0.743 0.000 1.000 0.000
#> GSM549276     2  0.2448      0.717 0.000 0.924 0.076
#> GSM549275     1  0.2772      0.874 0.916 0.080 0.004
#> GSM549284     2  0.4058      0.683 0.044 0.880 0.076
#> GSM750737     1  0.6511      0.662 0.748 0.180 0.072
#> GSM750740     1  0.0000      0.926 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.926 1.000 0.000 0.000
#> GSM750751     2  0.0829      0.747 0.004 0.984 0.012
#> GSM750754     3  0.9731      0.315 0.248 0.308 0.444

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     1  0.4907      0.276 0.580 0.000 0.000 0.420
#> GSM549291     4  0.3761      0.741 0.080 0.000 0.068 0.852
#> GSM549274     2  0.0707      0.868 0.000 0.980 0.000 0.020
#> GSM750738     2  0.2465      0.841 0.020 0.924 0.012 0.044
#> GSM750748     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM549240     1  0.1575      0.893 0.956 0.004 0.012 0.028
#> GSM549279     1  0.6414      0.594 0.700 0.180 0.040 0.080
#> GSM549294     2  0.1297      0.870 0.000 0.964 0.020 0.016
#> GSM549300     3  0.5906      0.522 0.000 0.292 0.644 0.064
#> GSM549303     3  0.3610      0.731 0.000 0.000 0.800 0.200
#> GSM549309     3  0.3873      0.722 0.000 0.000 0.772 0.228
#> GSM750753     2  0.4001      0.808 0.004 0.840 0.108 0.048
#> GSM750752     4  0.4511      0.722 0.072 0.068 0.028 0.832
#> GSM549304     2  0.2497      0.857 0.016 0.924 0.020 0.040
#> GSM549305     2  0.0817      0.869 0.000 0.976 0.024 0.000
#> GSM549307     3  0.5657      0.492 0.000 0.312 0.644 0.044
#> GSM549306     3  0.3959      0.740 0.000 0.068 0.840 0.092
#> GSM549308     3  0.2345      0.755 0.000 0.000 0.900 0.100
#> GSM549233     1  0.0707      0.908 0.980 0.000 0.000 0.020
#> GSM549234     1  0.3219      0.806 0.836 0.000 0.000 0.164
#> GSM549250     1  0.1389      0.896 0.952 0.000 0.000 0.048
#> GSM549287     4  0.4215      0.736 0.072 0.000 0.104 0.824
#> GSM750735     1  0.0469      0.908 0.988 0.000 0.000 0.012
#> GSM750736     1  0.0469      0.908 0.988 0.000 0.000 0.012
#> GSM750749     1  0.1305      0.895 0.960 0.004 0.000 0.036
#> GSM549230     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549231     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549237     1  0.0336      0.909 0.992 0.000 0.000 0.008
#> GSM549254     4  0.5404      0.105 0.476 0.012 0.000 0.512
#> GSM750734     1  0.0000      0.910 1.000 0.000 0.000 0.000
#> GSM549271     4  0.4752      0.725 0.068 0.008 0.124 0.800
#> GSM549232     1  0.3219      0.806 0.836 0.000 0.000 0.164
#> GSM549246     1  0.1637      0.889 0.940 0.000 0.000 0.060
#> GSM549248     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549255     1  0.3219      0.806 0.836 0.000 0.000 0.164
#> GSM750746     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM549259     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM549269     2  0.0376      0.868 0.000 0.992 0.004 0.004
#> GSM549273     3  0.3528      0.732 0.000 0.000 0.808 0.192
#> GSM549299     2  0.2497      0.857 0.016 0.924 0.020 0.040
#> GSM549301     3  0.2197      0.756 0.000 0.004 0.916 0.080
#> GSM549310     4  0.4511      0.722 0.072 0.068 0.028 0.832
#> GSM549311     3  0.3649      0.727 0.000 0.000 0.796 0.204
#> GSM549302     2  0.0707      0.868 0.000 0.980 0.000 0.020
#> GSM549235     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM549245     1  0.3219      0.806 0.836 0.000 0.000 0.164
#> GSM549265     1  0.2647      0.851 0.880 0.000 0.000 0.120
#> GSM549282     4  0.5542      0.457 0.016 0.012 0.328 0.644
#> GSM549296     4  0.4511      0.722 0.072 0.068 0.028 0.832
#> GSM750739     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM750742     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM750744     1  0.0000      0.910 1.000 0.000 0.000 0.000
#> GSM750750     4  0.5542      0.457 0.016 0.012 0.328 0.644
#> GSM549242     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549252     1  0.2868      0.833 0.864 0.000 0.000 0.136
#> GSM549253     1  0.0336      0.910 0.992 0.000 0.000 0.008
#> GSM549256     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549257     1  0.3219      0.806 0.836 0.000 0.000 0.164
#> GSM549263     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549267     4  0.4215      0.736 0.072 0.000 0.104 0.824
#> GSM750745     1  0.0000      0.910 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000      0.910 1.000 0.000 0.000 0.000
#> GSM549244     1  0.2921      0.830 0.860 0.000 0.000 0.140
#> GSM549249     1  0.2704      0.844 0.876 0.000 0.000 0.124
#> GSM549260     1  0.0376      0.909 0.992 0.000 0.004 0.004
#> GSM549266     1  0.5587      0.692 0.764 0.136 0.040 0.060
#> GSM549293     2  0.0707      0.868 0.000 0.980 0.000 0.020
#> GSM549236     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549238     1  0.2647      0.847 0.880 0.000 0.000 0.120
#> GSM549251     1  0.0336      0.910 0.992 0.000 0.000 0.008
#> GSM549258     1  0.0376      0.909 0.992 0.000 0.004 0.004
#> GSM549264     1  0.0592      0.909 0.984 0.000 0.000 0.016
#> GSM549243     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM549262     1  0.0469      0.910 0.988 0.000 0.000 0.012
#> GSM549278     4  0.4889      0.460 0.360 0.004 0.000 0.636
#> GSM549283     1  0.9001      0.116 0.488 0.212 0.156 0.144
#> GSM549298     3  0.2401      0.757 0.000 0.004 0.904 0.092
#> GSM750741     1  0.0967      0.905 0.976 0.004 0.004 0.016
#> GSM549286     2  0.0376      0.868 0.000 0.992 0.004 0.004
#> GSM549241     1  0.0564      0.909 0.988 0.004 0.004 0.004
#> GSM549247     1  0.1575      0.893 0.956 0.004 0.012 0.028
#> GSM549261     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM549270     2  0.2915      0.830 0.000 0.892 0.080 0.028
#> GSM549277     2  0.6548      0.439 0.000 0.592 0.304 0.104
#> GSM549280     2  0.6240      0.435 0.000 0.604 0.320 0.076
#> GSM549281     1  0.6582      0.606 0.708 0.108 0.060 0.124
#> GSM549285     4  0.8238      0.343 0.084 0.108 0.280 0.528
#> GSM549288     2  0.5968      0.564 0.000 0.664 0.252 0.084
#> GSM549292     2  0.0376      0.868 0.000 0.992 0.004 0.004
#> GSM549295     3  0.5847      0.261 0.000 0.404 0.560 0.036
#> GSM549297     2  0.5881      0.582 0.000 0.676 0.240 0.084
#> GSM750743     1  0.0000      0.910 1.000 0.000 0.000 0.000
#> GSM549268     1  0.6582      0.606 0.708 0.108 0.060 0.124
#> GSM549290     4  0.4946      0.719 0.088 0.004 0.124 0.784
#> GSM549272     2  0.0376      0.868 0.000 0.992 0.004 0.004
#> GSM549276     2  0.2450      0.841 0.000 0.912 0.072 0.016
#> GSM549275     1  0.4314      0.798 0.844 0.064 0.032 0.060
#> GSM549284     2  0.3796      0.791 0.020 0.864 0.036 0.080
#> GSM750737     1  0.4957      0.482 0.668 0.012 0.000 0.320
#> GSM750740     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM750747     1  0.0188      0.910 0.996 0.000 0.004 0.000
#> GSM750751     2  0.1059      0.871 0.000 0.972 0.016 0.012
#> GSM750754     4  0.3764      0.742 0.076 0.000 0.072 0.852

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     1  0.4882      0.220 0.532 0.000 0.000 0.444 0.024
#> GSM549291     4  0.3052      0.591 0.008 0.000 0.032 0.868 0.092
#> GSM549274     2  0.0992      0.853 0.000 0.968 0.000 0.008 0.024
#> GSM750738     2  0.2987      0.814 0.020 0.888 0.004 0.044 0.044
#> GSM750748     1  0.0162      0.901 0.996 0.000 0.000 0.000 0.004
#> GSM549240     1  0.1365      0.884 0.952 0.004 0.000 0.004 0.040
#> GSM549279     1  0.5708      0.605 0.692 0.164 0.004 0.028 0.112
#> GSM549294     2  0.1419      0.855 0.000 0.956 0.016 0.012 0.016
#> GSM549300     3  0.4170      0.384 0.000 0.272 0.712 0.004 0.012
#> GSM549303     3  0.5052      0.519 0.000 0.000 0.612 0.048 0.340
#> GSM549309     3  0.5811      0.469 0.000 0.000 0.568 0.116 0.316
#> GSM750753     2  0.3982      0.785 0.004 0.812 0.136 0.020 0.028
#> GSM750752     4  0.2104      0.581 0.000 0.044 0.008 0.924 0.024
#> GSM549304     2  0.2574      0.843 0.016 0.912 0.020 0.016 0.036
#> GSM549305     2  0.1106      0.855 0.000 0.964 0.024 0.000 0.012
#> GSM549307     3  0.4283      0.380 0.000 0.292 0.692 0.004 0.012
#> GSM549306     3  0.1872      0.525 0.000 0.052 0.928 0.020 0.000
#> GSM549308     3  0.1992      0.555 0.000 0.000 0.924 0.032 0.044
#> GSM549233     1  0.1012      0.899 0.968 0.000 0.000 0.012 0.020
#> GSM549234     1  0.3565      0.782 0.800 0.000 0.000 0.176 0.024
#> GSM549250     1  0.1741      0.886 0.936 0.000 0.000 0.040 0.024
#> GSM549287     4  0.4136      0.504 0.000 0.000 0.048 0.764 0.188
#> GSM750735     1  0.0404      0.900 0.988 0.000 0.000 0.012 0.000
#> GSM750736     1  0.0404      0.900 0.988 0.000 0.000 0.012 0.000
#> GSM750749     1  0.1386      0.887 0.952 0.000 0.000 0.016 0.032
#> GSM549230     1  0.0865      0.900 0.972 0.000 0.000 0.004 0.024
#> GSM549231     1  0.0865      0.900 0.972 0.000 0.000 0.004 0.024
#> GSM549237     1  0.0579      0.901 0.984 0.000 0.000 0.008 0.008
#> GSM549254     4  0.4666      0.188 0.412 0.000 0.000 0.572 0.016
#> GSM750734     1  0.0000      0.901 1.000 0.000 0.000 0.000 0.000
#> GSM549271     4  0.4767      0.478 0.004 0.004 0.116 0.752 0.124
#> GSM549232     1  0.3565      0.782 0.800 0.000 0.000 0.176 0.024
#> GSM549246     1  0.2104      0.876 0.916 0.000 0.000 0.060 0.024
#> GSM549248     1  0.0865      0.900 0.972 0.000 0.000 0.004 0.024
#> GSM549255     1  0.3565      0.782 0.800 0.000 0.000 0.176 0.024
#> GSM750746     1  0.0162      0.901 0.996 0.000 0.000 0.000 0.004
#> GSM549259     1  0.0162      0.901 0.996 0.000 0.000 0.000 0.004
#> GSM549269     2  0.0955      0.851 0.000 0.968 0.004 0.000 0.028
#> GSM549273     3  0.4836      0.522 0.000 0.000 0.612 0.032 0.356
#> GSM549299     2  0.2574      0.843 0.016 0.912 0.020 0.016 0.036
#> GSM549301     3  0.2103      0.555 0.000 0.004 0.920 0.020 0.056
#> GSM549310     4  0.2104      0.581 0.000 0.044 0.008 0.924 0.024
#> GSM549311     3  0.4849      0.518 0.000 0.000 0.608 0.032 0.360
#> GSM549302     2  0.0898      0.854 0.000 0.972 0.000 0.008 0.020
#> GSM549235     1  0.0290      0.900 0.992 0.000 0.000 0.000 0.008
#> GSM549245     1  0.3565      0.782 0.800 0.000 0.000 0.176 0.024
#> GSM549265     1  0.3146      0.827 0.844 0.000 0.000 0.128 0.028
#> GSM549282     5  0.6620      0.771 0.000 0.004 0.312 0.208 0.476
#> GSM549296     4  0.2104      0.581 0.000 0.044 0.008 0.924 0.024
#> GSM750739     1  0.0290      0.901 0.992 0.000 0.000 0.000 0.008
#> GSM750742     1  0.0865      0.900 0.972 0.000 0.000 0.004 0.024
#> GSM750744     1  0.0000      0.901 1.000 0.000 0.000 0.000 0.000
#> GSM750750     5  0.6630      0.773 0.000 0.004 0.316 0.208 0.472
#> GSM549242     1  0.0566      0.901 0.984 0.000 0.000 0.004 0.012
#> GSM549252     1  0.3284      0.809 0.828 0.000 0.000 0.148 0.024
#> GSM549253     1  0.0703      0.900 0.976 0.000 0.000 0.000 0.024
#> GSM549256     1  0.0566      0.901 0.984 0.000 0.000 0.004 0.012
#> GSM549257     1  0.3565      0.782 0.800 0.000 0.000 0.176 0.024
#> GSM549263     1  0.0865      0.900 0.972 0.000 0.000 0.004 0.024
#> GSM549267     4  0.4101      0.510 0.000 0.000 0.048 0.768 0.184
#> GSM750745     1  0.0000      0.901 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000      0.901 1.000 0.000 0.000 0.000 0.000
#> GSM549244     1  0.3326      0.805 0.824 0.000 0.000 0.152 0.024
#> GSM549249     1  0.3152      0.820 0.840 0.000 0.000 0.136 0.024
#> GSM549260     1  0.0404      0.899 0.988 0.000 0.000 0.000 0.012
#> GSM549266     1  0.4843      0.700 0.760 0.128 0.004 0.016 0.092
#> GSM549293     2  0.0898      0.854 0.000 0.972 0.000 0.008 0.020
#> GSM549236     1  0.0865      0.900 0.972 0.000 0.000 0.004 0.024
#> GSM549238     1  0.3193      0.821 0.840 0.000 0.000 0.132 0.028
#> GSM549251     1  0.0703      0.900 0.976 0.000 0.000 0.000 0.024
#> GSM549258     1  0.0404      0.899 0.988 0.000 0.000 0.000 0.012
#> GSM549264     1  0.0955      0.899 0.968 0.000 0.000 0.004 0.028
#> GSM549243     1  0.0404      0.902 0.988 0.000 0.000 0.000 0.012
#> GSM549262     1  0.0865      0.900 0.972 0.000 0.000 0.004 0.024
#> GSM549278     4  0.4206      0.324 0.288 0.000 0.000 0.696 0.016
#> GSM549283     1  0.8354      0.115 0.480 0.188 0.136 0.032 0.164
#> GSM549298     3  0.1493      0.555 0.000 0.000 0.948 0.024 0.028
#> GSM750741     1  0.0960      0.895 0.972 0.004 0.000 0.008 0.016
#> GSM549286     2  0.0955      0.851 0.000 0.968 0.004 0.000 0.028
#> GSM549241     1  0.0566      0.899 0.984 0.004 0.000 0.000 0.012
#> GSM549247     1  0.1365      0.884 0.952 0.004 0.000 0.004 0.040
#> GSM549261     1  0.0290      0.900 0.992 0.000 0.000 0.000 0.008
#> GSM549270     2  0.2733      0.812 0.000 0.872 0.112 0.012 0.004
#> GSM549277     2  0.5916      0.427 0.000 0.564 0.344 0.016 0.076
#> GSM549280     2  0.5489      0.438 0.000 0.580 0.364 0.024 0.032
#> GSM549281     1  0.5950      0.616 0.700 0.096 0.028 0.028 0.148
#> GSM549285     5  0.7790      0.552 0.060 0.080 0.296 0.064 0.500
#> GSM549288     2  0.5349      0.545 0.000 0.636 0.300 0.016 0.048
#> GSM549292     2  0.0955      0.851 0.000 0.968 0.004 0.000 0.028
#> GSM549295     3  0.4299      0.221 0.000 0.388 0.608 0.004 0.000
#> GSM549297     2  0.5334      0.565 0.000 0.648 0.284 0.016 0.052
#> GSM750743     1  0.0000      0.901 1.000 0.000 0.000 0.000 0.000
#> GSM549268     1  0.5950      0.616 0.700 0.096 0.028 0.028 0.148
#> GSM549290     4  0.5338      0.187 0.016 0.000 0.044 0.628 0.312
#> GSM549272     2  0.0955      0.851 0.000 0.968 0.004 0.000 0.028
#> GSM549276     2  0.2463      0.822 0.000 0.888 0.100 0.004 0.008
#> GSM549275     1  0.3620      0.788 0.832 0.048 0.000 0.008 0.112
#> GSM549284     2  0.3978      0.772 0.020 0.840 0.020 0.056 0.064
#> GSM750737     1  0.4451      0.479 0.644 0.000 0.000 0.340 0.016
#> GSM750740     1  0.0290      0.900 0.992 0.000 0.000 0.000 0.008
#> GSM750747     1  0.0290      0.900 0.992 0.000 0.000 0.000 0.008
#> GSM750751     2  0.1087      0.855 0.000 0.968 0.016 0.008 0.008
#> GSM750754     4  0.3222      0.583 0.004 0.000 0.036 0.852 0.108

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     1  0.5066     0.1865 0.496 0.000 0.004 0.436 0.000 0.064
#> GSM549291     4  0.3011     0.6182 0.004 0.000 0.000 0.800 0.004 0.192
#> GSM549274     2  0.1151     0.7856 0.000 0.956 0.032 0.000 0.000 0.012
#> GSM750738     2  0.4316     0.6935 0.012 0.792 0.096 0.060 0.004 0.036
#> GSM750748     1  0.0520     0.8670 0.984 0.000 0.008 0.000 0.000 0.008
#> GSM549240     1  0.2265     0.8335 0.896 0.000 0.052 0.000 0.000 0.052
#> GSM549279     1  0.6170     0.4867 0.592 0.124 0.192 0.000 0.000 0.092
#> GSM549294     2  0.1866     0.7823 0.000 0.908 0.084 0.000 0.000 0.008
#> GSM549300     3  0.5634     0.6081 0.000 0.216 0.608 0.000 0.152 0.024
#> GSM549303     5  0.1405     0.9224 0.000 0.000 0.004 0.024 0.948 0.024
#> GSM549309     5  0.2944     0.8425 0.000 0.000 0.004 0.072 0.856 0.068
#> GSM750753     2  0.3534     0.6858 0.000 0.740 0.244 0.000 0.000 0.016
#> GSM750752     4  0.0912     0.6143 0.000 0.004 0.008 0.972 0.012 0.004
#> GSM549304     2  0.2882     0.7669 0.004 0.848 0.120 0.000 0.000 0.028
#> GSM549305     2  0.1444     0.7855 0.000 0.928 0.072 0.000 0.000 0.000
#> GSM549307     3  0.5541     0.5994 0.000 0.236 0.608 0.000 0.136 0.020
#> GSM549306     3  0.5151     0.6248 0.000 0.044 0.620 0.000 0.296 0.040
#> GSM549308     3  0.5014     0.5228 0.000 0.000 0.544 0.008 0.392 0.056
#> GSM549233     1  0.1434     0.8639 0.940 0.000 0.000 0.012 0.000 0.048
#> GSM549234     1  0.3925     0.7495 0.764 0.000 0.004 0.168 0.000 0.064
#> GSM549250     1  0.2240     0.8518 0.904 0.000 0.008 0.032 0.000 0.056
#> GSM549287     4  0.3804     0.5185 0.000 0.000 0.000 0.656 0.008 0.336
#> GSM750735     1  0.1176     0.8639 0.956 0.000 0.024 0.000 0.000 0.020
#> GSM750736     1  0.1176     0.8639 0.956 0.000 0.024 0.000 0.000 0.020
#> GSM750749     1  0.2594     0.8295 0.880 0.000 0.056 0.004 0.000 0.060
#> GSM549230     1  0.1333     0.8642 0.944 0.000 0.008 0.000 0.000 0.048
#> GSM549231     1  0.1398     0.8632 0.940 0.000 0.008 0.000 0.000 0.052
#> GSM549237     1  0.0820     0.8686 0.972 0.000 0.016 0.000 0.000 0.012
#> GSM549254     4  0.4573     0.2570 0.372 0.000 0.000 0.584 0.000 0.044
#> GSM750734     1  0.0820     0.8662 0.972 0.000 0.012 0.000 0.000 0.016
#> GSM549271     4  0.4572     0.5190 0.000 0.000 0.032 0.692 0.032 0.244
#> GSM549232     1  0.3925     0.7495 0.764 0.000 0.004 0.168 0.000 0.064
#> GSM549246     1  0.2649     0.8413 0.876 0.000 0.004 0.052 0.000 0.068
#> GSM549248     1  0.1398     0.8632 0.940 0.000 0.008 0.000 0.000 0.052
#> GSM549255     1  0.3925     0.7495 0.764 0.000 0.004 0.168 0.000 0.064
#> GSM750746     1  0.0520     0.8670 0.984 0.000 0.008 0.000 0.000 0.008
#> GSM549259     1  0.0520     0.8670 0.984 0.000 0.008 0.000 0.000 0.008
#> GSM549269     2  0.1707     0.7721 0.000 0.928 0.056 0.000 0.004 0.012
#> GSM549273     5  0.0146     0.9168 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM549299     2  0.2882     0.7669 0.004 0.848 0.120 0.000 0.000 0.028
#> GSM549301     3  0.4951     0.5456 0.000 0.004 0.568 0.004 0.372 0.052
#> GSM549310     4  0.0912     0.6143 0.000 0.004 0.008 0.972 0.012 0.004
#> GSM549311     5  0.0603     0.9228 0.000 0.000 0.000 0.004 0.980 0.016
#> GSM549302     2  0.1074     0.7863 0.000 0.960 0.028 0.000 0.000 0.012
#> GSM549235     1  0.0717     0.8662 0.976 0.000 0.008 0.000 0.000 0.016
#> GSM549245     1  0.3925     0.7495 0.764 0.000 0.004 0.168 0.000 0.064
#> GSM549265     1  0.3436     0.7982 0.812 0.000 0.004 0.128 0.000 0.056
#> GSM549282     6  0.3818     0.7937 0.000 0.000 0.132 0.024 0.048 0.796
#> GSM549296     4  0.0912     0.6143 0.000 0.004 0.008 0.972 0.012 0.004
#> GSM750739     1  0.0508     0.8684 0.984 0.000 0.012 0.000 0.000 0.004
#> GSM750742     1  0.1333     0.8642 0.944 0.000 0.008 0.000 0.000 0.048
#> GSM750744     1  0.0909     0.8659 0.968 0.000 0.012 0.000 0.000 0.020
#> GSM750750     6  0.3858     0.7946 0.000 0.000 0.136 0.024 0.048 0.792
#> GSM549242     1  0.0858     0.8682 0.968 0.000 0.000 0.004 0.000 0.028
#> GSM549252     1  0.3672     0.7752 0.792 0.000 0.004 0.140 0.000 0.064
#> GSM549253     1  0.1333     0.8641 0.944 0.000 0.008 0.000 0.000 0.048
#> GSM549256     1  0.0858     0.8682 0.968 0.000 0.000 0.004 0.000 0.028
#> GSM549257     1  0.3925     0.7495 0.764 0.000 0.004 0.168 0.000 0.064
#> GSM549263     1  0.1333     0.8642 0.944 0.000 0.008 0.000 0.000 0.048
#> GSM549267     4  0.3789     0.5238 0.000 0.000 0.000 0.660 0.008 0.332
#> GSM750745     1  0.0820     0.8662 0.972 0.000 0.012 0.000 0.000 0.016
#> GSM549239     1  0.0820     0.8662 0.972 0.000 0.012 0.000 0.000 0.016
#> GSM549244     1  0.3710     0.7729 0.788 0.000 0.004 0.144 0.000 0.064
#> GSM549249     1  0.3495     0.7881 0.808 0.000 0.004 0.128 0.000 0.060
#> GSM549260     1  0.1442     0.8588 0.944 0.000 0.012 0.004 0.000 0.040
#> GSM549266     1  0.5652     0.5907 0.656 0.100 0.152 0.000 0.000 0.092
#> GSM549293     2  0.1074     0.7863 0.000 0.960 0.028 0.000 0.000 0.012
#> GSM549236     1  0.1462     0.8624 0.936 0.000 0.008 0.000 0.000 0.056
#> GSM549238     1  0.3564     0.7896 0.808 0.000 0.008 0.124 0.000 0.060
#> GSM549251     1  0.1152     0.8653 0.952 0.000 0.004 0.000 0.000 0.044
#> GSM549258     1  0.1564     0.8539 0.936 0.000 0.024 0.000 0.000 0.040
#> GSM549264     1  0.1500     0.8626 0.936 0.000 0.012 0.000 0.000 0.052
#> GSM549243     1  0.0725     0.8689 0.976 0.000 0.012 0.000 0.000 0.012
#> GSM549262     1  0.1398     0.8632 0.940 0.000 0.008 0.000 0.000 0.052
#> GSM549278     4  0.4233     0.3768 0.268 0.000 0.000 0.684 0.000 0.048
#> GSM549283     1  0.7072    -0.0532 0.400 0.140 0.336 0.000 0.000 0.124
#> GSM549298     3  0.4753     0.5662 0.000 0.000 0.580 0.004 0.368 0.048
#> GSM750741     1  0.1930     0.8461 0.916 0.000 0.036 0.000 0.000 0.048
#> GSM549286     2  0.1769     0.7705 0.000 0.924 0.060 0.000 0.004 0.012
#> GSM549241     1  0.1644     0.8531 0.932 0.000 0.028 0.000 0.000 0.040
#> GSM549247     1  0.2265     0.8335 0.896 0.000 0.052 0.000 0.000 0.052
#> GSM549261     1  0.0717     0.8662 0.976 0.000 0.008 0.000 0.000 0.016
#> GSM549270     2  0.2871     0.7139 0.000 0.804 0.192 0.004 0.000 0.000
#> GSM549277     2  0.5693     0.1922 0.000 0.472 0.432 0.004 0.036 0.056
#> GSM549280     2  0.5502     0.2315 0.000 0.508 0.408 0.004 0.052 0.028
#> GSM549281     1  0.6251     0.5000 0.604 0.084 0.176 0.008 0.000 0.128
#> GSM549285     6  0.5269     0.5741 0.032 0.052 0.332 0.000 0.000 0.584
#> GSM549288     2  0.5232     0.3642 0.000 0.548 0.384 0.004 0.024 0.040
#> GSM549292     2  0.1769     0.7705 0.000 0.924 0.060 0.000 0.004 0.012
#> GSM549295     3  0.5588     0.4419 0.000 0.316 0.544 0.000 0.132 0.008
#> GSM549297     2  0.5156     0.3899 0.000 0.560 0.376 0.004 0.024 0.036
#> GSM750743     1  0.0909     0.8659 0.968 0.000 0.012 0.000 0.000 0.020
#> GSM549268     1  0.6251     0.5000 0.604 0.084 0.176 0.008 0.000 0.128
#> GSM549290     4  0.4394     0.1086 0.000 0.000 0.004 0.496 0.016 0.484
#> GSM549272     2  0.1707     0.7721 0.000 0.928 0.056 0.000 0.004 0.012
#> GSM549276     2  0.2631     0.7267 0.000 0.820 0.180 0.000 0.000 0.000
#> GSM549275     1  0.4640     0.6737 0.720 0.016 0.160 0.000 0.000 0.104
#> GSM549284     2  0.3955     0.6880 0.012 0.784 0.092 0.000 0.000 0.112
#> GSM750737     1  0.4867     0.4264 0.600 0.000 0.012 0.340 0.000 0.048
#> GSM750740     1  0.0717     0.8662 0.976 0.000 0.008 0.000 0.000 0.016
#> GSM750747     1  0.0717     0.8662 0.976 0.000 0.008 0.000 0.000 0.016
#> GSM750751     2  0.1644     0.7833 0.000 0.920 0.076 0.000 0.000 0.004
#> GSM750754     4  0.3023     0.6099 0.000 0.000 0.000 0.784 0.004 0.212

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-hclust-membership-heatmap-5

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)

plot of chunk tab-SD-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-hclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-SD-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-hclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> SD:hclust 101           0.0304    2.56e-05               0.15646   0.0209 2
#> SD:hclust  83           0.0262    1.84e-06               0.00671   0.2258 3
#> SD:hclust  91           0.0314    1.58e-06               0.00465   0.0731 4
#> SD:hclust  90           0.1585    7.44e-05               0.01154   0.0545 5
#> SD:hclust  91           0.0323    3.13e-05               0.05072   0.1024 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.


SD:kmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-kmeans-collect-plots

The plots are:

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:

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)

plot of chunk SD-kmeans-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.996       0.998         0.5039 0.496   0.496
#> 3 3 0.756           0.810       0.892         0.2618 0.874   0.748
#> 4 4 0.785           0.878       0.909         0.1489 0.857   0.641
#> 5 5 0.783           0.811       0.868         0.0735 0.923   0.727
#> 6 6 0.743           0.621       0.769         0.0442 0.958   0.811

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      1.000 1.000 0.000
#> GSM549291     2  0.1843      0.973 0.028 0.972
#> GSM549274     2  0.0000      0.996 0.000 1.000
#> GSM750738     2  0.0000      0.996 0.000 1.000
#> GSM750748     1  0.0000      1.000 1.000 0.000
#> GSM549240     1  0.0000      1.000 1.000 0.000
#> GSM549279     2  0.2603      0.958 0.044 0.956
#> GSM549294     2  0.0000      0.996 0.000 1.000
#> GSM549300     2  0.0000      0.996 0.000 1.000
#> GSM549303     2  0.0000      0.996 0.000 1.000
#> GSM549309     2  0.0000      0.996 0.000 1.000
#> GSM750753     2  0.0000      0.996 0.000 1.000
#> GSM750752     2  0.0000      0.996 0.000 1.000
#> GSM549304     2  0.0000      0.996 0.000 1.000
#> GSM549305     2  0.0000      0.996 0.000 1.000
#> GSM549307     2  0.0000      0.996 0.000 1.000
#> GSM549306     2  0.0000      0.996 0.000 1.000
#> GSM549308     2  0.0000      0.996 0.000 1.000
#> GSM549233     1  0.0000      1.000 1.000 0.000
#> GSM549234     1  0.0000      1.000 1.000 0.000
#> GSM549250     1  0.0000      1.000 1.000 0.000
#> GSM549287     2  0.0000      0.996 0.000 1.000
#> GSM750735     1  0.0000      1.000 1.000 0.000
#> GSM750736     1  0.0000      1.000 1.000 0.000
#> GSM750749     1  0.0000      1.000 1.000 0.000
#> GSM549230     1  0.0000      1.000 1.000 0.000
#> GSM549231     1  0.0000      1.000 1.000 0.000
#> GSM549237     1  0.0000      1.000 1.000 0.000
#> GSM549254     1  0.0000      1.000 1.000 0.000
#> GSM750734     1  0.0000      1.000 1.000 0.000
#> GSM549271     2  0.0000      0.996 0.000 1.000
#> GSM549232     1  0.0000      1.000 1.000 0.000
#> GSM549246     1  0.0000      1.000 1.000 0.000
#> GSM549248     1  0.0000      1.000 1.000 0.000
#> GSM549255     1  0.0000      1.000 1.000 0.000
#> GSM750746     1  0.0000      1.000 1.000 0.000
#> GSM549259     1  0.0000      1.000 1.000 0.000
#> GSM549269     2  0.0000      0.996 0.000 1.000
#> GSM549273     2  0.0000      0.996 0.000 1.000
#> GSM549299     2  0.0000      0.996 0.000 1.000
#> GSM549301     2  0.0000      0.996 0.000 1.000
#> GSM549310     2  0.0000      0.996 0.000 1.000
#> GSM549311     2  0.0000      0.996 0.000 1.000
#> GSM549302     2  0.0000      0.996 0.000 1.000
#> GSM549235     1  0.0000      1.000 1.000 0.000
#> GSM549245     1  0.0000      1.000 1.000 0.000
#> GSM549265     1  0.0000      1.000 1.000 0.000
#> GSM549282     2  0.0000      0.996 0.000 1.000
#> GSM549296     2  0.0000      0.996 0.000 1.000
#> GSM750739     1  0.0000      1.000 1.000 0.000
#> GSM750742     1  0.0000      1.000 1.000 0.000
#> GSM750744     1  0.0000      1.000 1.000 0.000
#> GSM750750     2  0.0000      0.996 0.000 1.000
#> GSM549242     1  0.0000      1.000 1.000 0.000
#> GSM549252     1  0.0000      1.000 1.000 0.000
#> GSM549253     1  0.0000      1.000 1.000 0.000
#> GSM549256     1  0.0000      1.000 1.000 0.000
#> GSM549257     1  0.0000      1.000 1.000 0.000
#> GSM549263     1  0.0000      1.000 1.000 0.000
#> GSM549267     2  0.0000      0.996 0.000 1.000
#> GSM750745     1  0.0000      1.000 1.000 0.000
#> GSM549239     1  0.0000      1.000 1.000 0.000
#> GSM549244     1  0.0000      1.000 1.000 0.000
#> GSM549249     1  0.0000      1.000 1.000 0.000
#> GSM549260     1  0.0000      1.000 1.000 0.000
#> GSM549266     2  0.2423      0.961 0.040 0.960
#> GSM549293     2  0.0000      0.996 0.000 1.000
#> GSM549236     1  0.0000      1.000 1.000 0.000
#> GSM549238     1  0.0000      1.000 1.000 0.000
#> GSM549251     1  0.0000      1.000 1.000 0.000
#> GSM549258     1  0.0000      1.000 1.000 0.000
#> GSM549264     1  0.0000      1.000 1.000 0.000
#> GSM549243     1  0.0000      1.000 1.000 0.000
#> GSM549262     1  0.0000      1.000 1.000 0.000
#> GSM549278     1  0.0376      0.996 0.996 0.004
#> GSM549283     2  0.0000      0.996 0.000 1.000
#> GSM549298     2  0.0000      0.996 0.000 1.000
#> GSM750741     1  0.0000      1.000 1.000 0.000
#> GSM549286     2  0.0000      0.996 0.000 1.000
#> GSM549241     1  0.0000      1.000 1.000 0.000
#> GSM549247     1  0.0000      1.000 1.000 0.000
#> GSM549261     1  0.0000      1.000 1.000 0.000
#> GSM549270     2  0.0000      0.996 0.000 1.000
#> GSM549277     2  0.0000      0.996 0.000 1.000
#> GSM549280     2  0.0000      0.996 0.000 1.000
#> GSM549281     2  0.2603      0.958 0.044 0.956
#> GSM549285     2  0.0000      0.996 0.000 1.000
#> GSM549288     2  0.0000      0.996 0.000 1.000
#> GSM549292     2  0.0000      0.996 0.000 1.000
#> GSM549295     2  0.0000      0.996 0.000 1.000
#> GSM549297     2  0.0000      0.996 0.000 1.000
#> GSM750743     1  0.0000      1.000 1.000 0.000
#> GSM549268     2  0.2043      0.969 0.032 0.968
#> GSM549290     2  0.0000      0.996 0.000 1.000
#> GSM549272     2  0.0000      0.996 0.000 1.000
#> GSM549276     2  0.0000      0.996 0.000 1.000
#> GSM549275     1  0.0000      1.000 1.000 0.000
#> GSM549284     2  0.0000      0.996 0.000 1.000
#> GSM750737     1  0.0000      1.000 1.000 0.000
#> GSM750740     1  0.0000      1.000 1.000 0.000
#> GSM750747     1  0.0000      1.000 1.000 0.000
#> GSM750751     2  0.0000      0.996 0.000 1.000
#> GSM750754     2  0.0000      0.996 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.6432      0.521 0.568 0.004 0.428
#> GSM549291     3  0.0592      0.704 0.000 0.012 0.988
#> GSM549274     2  0.0424      0.977 0.000 0.992 0.008
#> GSM750738     2  0.3482      0.784 0.000 0.872 0.128
#> GSM750748     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549240     1  0.1129      0.884 0.976 0.004 0.020
#> GSM549279     2  0.1315      0.958 0.008 0.972 0.020
#> GSM549294     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549300     3  0.6286      0.458 0.000 0.464 0.536
#> GSM549303     3  0.5529      0.674 0.000 0.296 0.704
#> GSM549309     3  0.4062      0.710 0.000 0.164 0.836
#> GSM750753     2  0.0237      0.979 0.000 0.996 0.004
#> GSM750752     3  0.4235      0.653 0.000 0.176 0.824
#> GSM549304     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549305     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549307     2  0.1860      0.921 0.000 0.948 0.052
#> GSM549306     3  0.6244      0.510 0.000 0.440 0.560
#> GSM549308     3  0.6168      0.555 0.000 0.412 0.588
#> GSM549233     1  0.0424      0.890 0.992 0.000 0.008
#> GSM549234     1  0.6330      0.564 0.600 0.004 0.396
#> GSM549250     1  0.0237      0.890 0.996 0.000 0.004
#> GSM549287     3  0.1031      0.709 0.000 0.024 0.976
#> GSM750735     1  0.0424      0.888 0.992 0.000 0.008
#> GSM750736     1  0.1129      0.884 0.976 0.004 0.020
#> GSM750749     1  0.1129      0.884 0.976 0.004 0.020
#> GSM549230     1  0.0237      0.890 0.996 0.000 0.004
#> GSM549231     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549254     1  0.6442      0.523 0.564 0.004 0.432
#> GSM750734     1  0.0237      0.889 0.996 0.000 0.004
#> GSM549271     3  0.1031      0.709 0.000 0.024 0.976
#> GSM549232     1  0.6410      0.534 0.576 0.004 0.420
#> GSM549246     1  0.5722      0.679 0.704 0.004 0.292
#> GSM549248     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549255     1  0.6421      0.528 0.572 0.004 0.424
#> GSM750746     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549269     2  0.0424      0.977 0.000 0.992 0.008
#> GSM549273     3  0.6180      0.550 0.000 0.416 0.584
#> GSM549299     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549301     3  0.6235      0.517 0.000 0.436 0.564
#> GSM549310     3  0.3879      0.669 0.000 0.152 0.848
#> GSM549311     3  0.5497      0.676 0.000 0.292 0.708
#> GSM549302     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549235     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549245     1  0.6421      0.528 0.572 0.004 0.424
#> GSM549265     1  0.6398      0.537 0.580 0.004 0.416
#> GSM549282     3  0.5465      0.678 0.000 0.288 0.712
#> GSM549296     3  0.4062      0.650 0.000 0.164 0.836
#> GSM750739     1  0.0000      0.890 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.890 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.890 1.000 0.000 0.000
#> GSM750750     3  0.5591      0.668 0.000 0.304 0.696
#> GSM549242     1  0.0424      0.890 0.992 0.000 0.008
#> GSM549252     1  0.6345      0.559 0.596 0.004 0.400
#> GSM549253     1  0.0237      0.890 0.996 0.000 0.004
#> GSM549256     1  0.0424      0.890 0.992 0.000 0.008
#> GSM549257     1  0.6386      0.546 0.584 0.004 0.412
#> GSM549263     1  0.0237      0.890 0.996 0.000 0.004
#> GSM549267     3  0.0747      0.706 0.000 0.016 0.984
#> GSM750745     1  0.0237      0.889 0.996 0.000 0.004
#> GSM549239     1  0.0237      0.889 0.996 0.000 0.004
#> GSM549244     1  0.6421      0.528 0.572 0.004 0.424
#> GSM549249     1  0.6345      0.559 0.596 0.004 0.400
#> GSM549260     1  0.0424      0.889 0.992 0.000 0.008
#> GSM549266     2  0.1129      0.962 0.004 0.976 0.020
#> GSM549293     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549236     1  0.0237      0.890 0.996 0.000 0.004
#> GSM549238     1  0.2878      0.836 0.904 0.000 0.096
#> GSM549251     1  0.0237      0.890 0.996 0.000 0.004
#> GSM549258     1  0.0747      0.887 0.984 0.000 0.016
#> GSM549264     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549243     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549278     3  0.5588      0.274 0.276 0.004 0.720
#> GSM549283     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549298     3  0.6235      0.517 0.000 0.436 0.564
#> GSM750741     1  0.0747      0.887 0.984 0.000 0.016
#> GSM549286     2  0.0000      0.980 0.000 1.000 0.000
#> GSM549241     1  0.0592      0.887 0.988 0.000 0.012
#> GSM549247     1  0.1129      0.884 0.976 0.004 0.020
#> GSM549261     1  0.0000      0.890 1.000 0.000 0.000
#> GSM549270     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549277     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549280     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549281     2  0.1170      0.962 0.008 0.976 0.016
#> GSM549285     3  0.6192      0.544 0.000 0.420 0.580
#> GSM549288     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549292     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549295     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549297     2  0.0237      0.979 0.000 0.996 0.004
#> GSM750743     1  0.0237      0.889 0.996 0.000 0.004
#> GSM549268     2  0.1170      0.962 0.008 0.976 0.016
#> GSM549290     3  0.0747      0.706 0.000 0.016 0.984
#> GSM549272     2  0.0000      0.980 0.000 1.000 0.000
#> GSM549276     2  0.0237      0.979 0.000 0.996 0.004
#> GSM549275     1  0.1129      0.884 0.976 0.004 0.020
#> GSM549284     2  0.0237      0.979 0.000 0.996 0.004
#> GSM750737     1  0.5722      0.684 0.704 0.004 0.292
#> GSM750740     1  0.0000      0.890 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.890 1.000 0.000 0.000
#> GSM750751     2  0.0000      0.980 0.000 1.000 0.000
#> GSM750754     3  0.0747      0.707 0.000 0.016 0.984

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.2053      0.894 0.072 0.000 0.004 0.924
#> GSM549291     4  0.2814      0.813 0.000 0.000 0.132 0.868
#> GSM549274     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM750738     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM750748     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM549240     1  0.5383      0.781 0.744 0.000 0.128 0.128
#> GSM549279     2  0.6347      0.700 0.048 0.720 0.132 0.100
#> GSM549294     2  0.0000      0.930 0.000 1.000 0.000 0.000
#> GSM549300     3  0.3311      0.863 0.000 0.172 0.828 0.000
#> GSM549303     3  0.3439      0.913 0.000 0.048 0.868 0.084
#> GSM549309     3  0.2868      0.875 0.000 0.000 0.864 0.136
#> GSM750753     2  0.0188      0.929 0.000 0.996 0.004 0.000
#> GSM750752     4  0.2976      0.814 0.000 0.008 0.120 0.872
#> GSM549304     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM549305     2  0.0188      0.931 0.000 0.996 0.000 0.004
#> GSM549307     2  0.4431      0.495 0.000 0.696 0.304 0.000
#> GSM549306     3  0.2973      0.886 0.000 0.144 0.856 0.000
#> GSM549308     3  0.3266      0.907 0.000 0.108 0.868 0.024
#> GSM549233     1  0.2081      0.891 0.916 0.000 0.000 0.084
#> GSM549234     4  0.2469      0.880 0.108 0.000 0.000 0.892
#> GSM549250     1  0.1474      0.910 0.948 0.000 0.000 0.052
#> GSM549287     3  0.2868      0.875 0.000 0.000 0.864 0.136
#> GSM750735     1  0.4181      0.840 0.820 0.000 0.128 0.052
#> GSM750736     1  0.4940      0.809 0.776 0.000 0.128 0.096
#> GSM750749     1  0.5121      0.807 0.772 0.004 0.128 0.096
#> GSM549230     1  0.1474      0.910 0.948 0.000 0.000 0.052
#> GSM549231     1  0.1474      0.910 0.948 0.000 0.000 0.052
#> GSM549237     1  0.0921      0.919 0.972 0.000 0.000 0.028
#> GSM549254     4  0.0921      0.874 0.028 0.000 0.000 0.972
#> GSM750734     1  0.1520      0.910 0.956 0.000 0.024 0.020
#> GSM549271     3  0.2973      0.868 0.000 0.000 0.856 0.144
#> GSM549232     4  0.1867      0.896 0.072 0.000 0.000 0.928
#> GSM549246     4  0.2921      0.851 0.140 0.000 0.000 0.860
#> GSM549248     1  0.1022      0.918 0.968 0.000 0.000 0.032
#> GSM549255     4  0.1867      0.896 0.072 0.000 0.000 0.928
#> GSM750746     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0336      0.920 0.992 0.000 0.000 0.008
#> GSM549269     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM549273     3  0.3032      0.901 0.000 0.124 0.868 0.008
#> GSM549299     2  0.0188      0.929 0.000 0.996 0.004 0.000
#> GSM549301     3  0.2814      0.895 0.000 0.132 0.868 0.000
#> GSM549310     4  0.3498      0.778 0.000 0.008 0.160 0.832
#> GSM549311     3  0.3463      0.908 0.000 0.040 0.864 0.096
#> GSM549302     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM549235     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM549245     4  0.1867      0.896 0.072 0.000 0.000 0.928
#> GSM549265     4  0.2011      0.893 0.080 0.000 0.000 0.920
#> GSM549282     3  0.3486      0.911 0.000 0.044 0.864 0.092
#> GSM549296     4  0.2799      0.822 0.000 0.008 0.108 0.884
#> GSM750739     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM750742     1  0.1022      0.918 0.968 0.000 0.000 0.032
#> GSM750744     1  0.0336      0.921 0.992 0.000 0.000 0.008
#> GSM750750     3  0.3453      0.914 0.000 0.052 0.868 0.080
#> GSM549242     1  0.1557      0.910 0.944 0.000 0.000 0.056
#> GSM549252     4  0.2469      0.880 0.108 0.000 0.000 0.892
#> GSM549253     1  0.1474      0.910 0.948 0.000 0.000 0.052
#> GSM549256     1  0.2081      0.891 0.916 0.000 0.000 0.084
#> GSM549257     4  0.1867      0.896 0.072 0.000 0.000 0.928
#> GSM549263     1  0.1474      0.910 0.948 0.000 0.000 0.052
#> GSM549267     4  0.3649      0.737 0.000 0.000 0.204 0.796
#> GSM750745     1  0.2466      0.894 0.916 0.000 0.056 0.028
#> GSM549239     1  0.2363      0.896 0.920 0.000 0.056 0.024
#> GSM549244     4  0.1867      0.896 0.072 0.000 0.000 0.928
#> GSM549249     4  0.2469      0.880 0.108 0.000 0.000 0.892
#> GSM549260     1  0.1118      0.920 0.964 0.000 0.000 0.036
#> GSM549266     2  0.6230      0.707 0.048 0.728 0.132 0.092
#> GSM549293     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM549236     1  0.1474      0.910 0.948 0.000 0.000 0.052
#> GSM549238     4  0.4103      0.719 0.256 0.000 0.000 0.744
#> GSM549251     1  0.1474      0.910 0.948 0.000 0.000 0.052
#> GSM549258     1  0.4181      0.842 0.820 0.000 0.128 0.052
#> GSM549264     1  0.0921      0.919 0.972 0.000 0.000 0.028
#> GSM549243     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM549262     1  0.1022      0.918 0.968 0.000 0.000 0.032
#> GSM549278     4  0.2214      0.874 0.028 0.000 0.044 0.928
#> GSM549283     2  0.0804      0.924 0.000 0.980 0.008 0.012
#> GSM549298     3  0.2868      0.893 0.000 0.136 0.864 0.000
#> GSM750741     1  0.4940      0.809 0.776 0.000 0.128 0.096
#> GSM549286     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM549241     1  0.4336      0.836 0.812 0.000 0.128 0.060
#> GSM549247     1  0.5383      0.781 0.744 0.000 0.128 0.128
#> GSM549261     1  0.0336      0.920 0.992 0.000 0.000 0.008
#> GSM549270     2  0.0000      0.930 0.000 1.000 0.000 0.000
#> GSM549277     2  0.0921      0.919 0.000 0.972 0.028 0.000
#> GSM549280     2  0.0592      0.926 0.000 0.984 0.016 0.000
#> GSM549281     2  0.6347      0.700 0.048 0.720 0.132 0.100
#> GSM549285     3  0.3421      0.912 0.000 0.088 0.868 0.044
#> GSM549288     2  0.0817      0.921 0.000 0.976 0.024 0.000
#> GSM549292     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM549295     2  0.0817      0.920 0.000 0.976 0.024 0.000
#> GSM549297     2  0.0188      0.929 0.000 0.996 0.004 0.000
#> GSM750743     1  0.2197      0.899 0.928 0.000 0.048 0.024
#> GSM549268     2  0.6347      0.700 0.048 0.720 0.132 0.100
#> GSM549290     4  0.3649      0.737 0.000 0.000 0.204 0.796
#> GSM549272     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM549276     2  0.0336      0.931 0.000 0.992 0.000 0.008
#> GSM549275     1  0.4940      0.809 0.776 0.000 0.128 0.096
#> GSM549284     2  0.0707      0.931 0.000 0.980 0.000 0.020
#> GSM750737     4  0.3653      0.770 0.028 0.000 0.128 0.844
#> GSM750740     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM750751     2  0.0469      0.931 0.000 0.988 0.000 0.012
#> GSM750754     3  0.3444      0.825 0.000 0.000 0.816 0.184

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.1522      0.883 0.012 0.000 0.000 0.944 0.044
#> GSM549291     4  0.2344      0.855 0.000 0.000 0.032 0.904 0.064
#> GSM549274     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM750738     2  0.0671      0.895 0.000 0.980 0.000 0.004 0.016
#> GSM750748     1  0.1965      0.870 0.904 0.000 0.000 0.000 0.096
#> GSM549240     5  0.5216      0.711 0.248 0.000 0.004 0.080 0.668
#> GSM549279     5  0.4070      0.480 0.004 0.256 0.000 0.012 0.728
#> GSM549294     2  0.1965      0.883 0.000 0.904 0.000 0.000 0.096
#> GSM549300     3  0.3309      0.803 0.000 0.036 0.836 0.000 0.128
#> GSM549303     3  0.0854      0.899 0.000 0.004 0.976 0.008 0.012
#> GSM549309     3  0.2669      0.893 0.000 0.000 0.876 0.020 0.104
#> GSM750753     2  0.2338      0.879 0.000 0.884 0.004 0.000 0.112
#> GSM750752     4  0.2676      0.846 0.000 0.000 0.036 0.884 0.080
#> GSM549304     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM549305     2  0.0703      0.901 0.000 0.976 0.000 0.000 0.024
#> GSM549307     2  0.5938      0.498 0.000 0.552 0.320 0.000 0.128
#> GSM549306     3  0.1800      0.878 0.000 0.020 0.932 0.000 0.048
#> GSM549308     3  0.0865      0.893 0.000 0.004 0.972 0.000 0.024
#> GSM549233     1  0.2648      0.735 0.848 0.000 0.000 0.152 0.000
#> GSM549234     4  0.1469      0.894 0.036 0.000 0.000 0.948 0.016
#> GSM549250     1  0.1270      0.847 0.948 0.000 0.000 0.052 0.000
#> GSM549287     3  0.3681      0.862 0.000 0.000 0.808 0.044 0.148
#> GSM750735     5  0.3966      0.681 0.336 0.000 0.000 0.000 0.664
#> GSM750736     5  0.4251      0.707 0.316 0.000 0.000 0.012 0.672
#> GSM750749     5  0.3890      0.725 0.252 0.000 0.000 0.012 0.736
#> GSM549230     1  0.0510      0.870 0.984 0.000 0.000 0.016 0.000
#> GSM549231     1  0.0404      0.872 0.988 0.000 0.000 0.012 0.000
#> GSM549237     1  0.1341      0.879 0.944 0.000 0.000 0.000 0.056
#> GSM549254     4  0.1124      0.890 0.004 0.000 0.000 0.960 0.036
#> GSM750734     1  0.2179      0.856 0.888 0.000 0.000 0.000 0.112
#> GSM549271     3  0.4254      0.832 0.000 0.000 0.772 0.080 0.148
#> GSM549232     4  0.1211      0.896 0.024 0.000 0.000 0.960 0.016
#> GSM549246     4  0.1522      0.891 0.044 0.000 0.000 0.944 0.012
#> GSM549248     1  0.0162      0.876 0.996 0.000 0.000 0.000 0.004
#> GSM549255     4  0.1117      0.896 0.020 0.000 0.000 0.964 0.016
#> GSM750746     1  0.1965      0.870 0.904 0.000 0.000 0.000 0.096
#> GSM549259     1  0.2074      0.865 0.896 0.000 0.000 0.000 0.104
#> GSM549269     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM549273     3  0.1243      0.897 0.000 0.004 0.960 0.008 0.028
#> GSM549299     2  0.2488      0.870 0.000 0.872 0.004 0.000 0.124
#> GSM549301     3  0.1408      0.886 0.000 0.008 0.948 0.000 0.044
#> GSM549310     4  0.3992      0.765 0.000 0.000 0.124 0.796 0.080
#> GSM549311     3  0.2575      0.896 0.000 0.004 0.884 0.012 0.100
#> GSM549302     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM549235     1  0.1965      0.870 0.904 0.000 0.000 0.000 0.096
#> GSM549245     4  0.1117      0.896 0.020 0.000 0.000 0.964 0.016
#> GSM549265     4  0.1444      0.893 0.040 0.000 0.000 0.948 0.012
#> GSM549282     3  0.2352      0.898 0.000 0.004 0.896 0.008 0.092
#> GSM549296     4  0.2300      0.858 0.000 0.000 0.024 0.904 0.072
#> GSM750739     1  0.1851      0.872 0.912 0.000 0.000 0.000 0.088
#> GSM750742     1  0.0162      0.876 0.996 0.000 0.000 0.000 0.004
#> GSM750744     1  0.1197      0.879 0.952 0.000 0.000 0.000 0.048
#> GSM750750     3  0.2068      0.899 0.000 0.004 0.904 0.000 0.092
#> GSM549242     1  0.1732      0.822 0.920 0.000 0.000 0.080 0.000
#> GSM549252     4  0.1444      0.893 0.040 0.000 0.000 0.948 0.012
#> GSM549253     1  0.1043      0.857 0.960 0.000 0.000 0.040 0.000
#> GSM549256     1  0.2648      0.735 0.848 0.000 0.000 0.152 0.000
#> GSM549257     4  0.1211      0.896 0.024 0.000 0.000 0.960 0.016
#> GSM549263     1  0.0510      0.870 0.984 0.000 0.000 0.016 0.000
#> GSM549267     4  0.5162      0.635 0.000 0.000 0.160 0.692 0.148
#> GSM750745     1  0.3932      0.454 0.672 0.000 0.000 0.000 0.328
#> GSM549239     1  0.3586      0.615 0.736 0.000 0.000 0.000 0.264
#> GSM549244     4  0.1281      0.895 0.032 0.000 0.000 0.956 0.012
#> GSM549249     4  0.1444      0.893 0.040 0.000 0.000 0.948 0.012
#> GSM549260     1  0.2685      0.868 0.880 0.000 0.000 0.028 0.092
#> GSM549266     5  0.4096      0.471 0.004 0.260 0.000 0.012 0.724
#> GSM549293     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM549236     1  0.1197      0.851 0.952 0.000 0.000 0.048 0.000
#> GSM549238     4  0.3913      0.555 0.324 0.000 0.000 0.676 0.000
#> GSM549251     1  0.0794      0.865 0.972 0.000 0.000 0.028 0.000
#> GSM549258     5  0.4288      0.579 0.384 0.000 0.000 0.004 0.612
#> GSM549264     1  0.0451      0.874 0.988 0.000 0.000 0.008 0.004
#> GSM549243     1  0.1851      0.872 0.912 0.000 0.000 0.000 0.088
#> GSM549262     1  0.0162      0.876 0.996 0.000 0.000 0.000 0.004
#> GSM549278     4  0.1518      0.879 0.004 0.000 0.004 0.944 0.048
#> GSM549283     2  0.4350      0.458 0.000 0.588 0.004 0.000 0.408
#> GSM549298     3  0.1701      0.880 0.000 0.016 0.936 0.000 0.048
#> GSM750741     5  0.4232      0.708 0.312 0.000 0.000 0.012 0.676
#> GSM549286     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM549241     5  0.4047      0.699 0.320 0.000 0.000 0.004 0.676
#> GSM549247     5  0.5343      0.712 0.244 0.004 0.004 0.080 0.668
#> GSM549261     1  0.2074      0.865 0.896 0.000 0.000 0.000 0.104
#> GSM549270     2  0.1908      0.886 0.000 0.908 0.000 0.000 0.092
#> GSM549277     2  0.4879      0.781 0.000 0.720 0.124 0.000 0.156
#> GSM549280     2  0.4035      0.831 0.000 0.784 0.060 0.000 0.156
#> GSM549281     5  0.4044      0.480 0.004 0.252 0.000 0.012 0.732
#> GSM549285     3  0.3205      0.875 0.000 0.004 0.816 0.004 0.176
#> GSM549288     2  0.4069      0.833 0.000 0.788 0.076 0.000 0.136
#> GSM549292     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM549295     2  0.4717      0.786 0.000 0.736 0.144 0.000 0.120
#> GSM549297     2  0.2921      0.870 0.000 0.856 0.020 0.000 0.124
#> GSM750743     1  0.3932      0.454 0.672 0.000 0.000 0.000 0.328
#> GSM549268     5  0.4044      0.480 0.004 0.252 0.000 0.012 0.732
#> GSM549290     4  0.5198      0.628 0.000 0.000 0.164 0.688 0.148
#> GSM549272     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM549276     2  0.0510      0.901 0.000 0.984 0.000 0.000 0.016
#> GSM549275     5  0.4380      0.722 0.288 0.008 0.000 0.012 0.692
#> GSM549284     2  0.0162      0.902 0.000 0.996 0.000 0.004 0.000
#> GSM750737     4  0.3355      0.747 0.012 0.000 0.000 0.804 0.184
#> GSM750740     1  0.2074      0.865 0.896 0.000 0.000 0.000 0.104
#> GSM750747     1  0.1965      0.870 0.904 0.000 0.000 0.000 0.096
#> GSM750751     2  0.0865      0.901 0.000 0.972 0.000 0.004 0.024
#> GSM750754     3  0.5334      0.707 0.000 0.000 0.672 0.180 0.148

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.2703     0.7386 0.004 0.000 0.000 0.824 0.000 0.172
#> GSM549291     4  0.3565     0.6154 0.004 0.000 0.004 0.716 0.000 0.276
#> GSM549274     2  0.0405     0.8505 0.000 0.988 0.008 0.000 0.000 0.004
#> GSM750738     2  0.0862     0.8369 0.008 0.972 0.000 0.004 0.000 0.016
#> GSM750748     5  0.4008     0.7640 0.128 0.000 0.004 0.000 0.768 0.100
#> GSM549240     1  0.3868     0.7437 0.812 0.000 0.004 0.076 0.076 0.032
#> GSM549279     1  0.4993     0.6542 0.728 0.080 0.072 0.000 0.004 0.116
#> GSM549294     2  0.3782     0.7784 0.072 0.784 0.140 0.000 0.000 0.004
#> GSM549300     3  0.2361     0.4025 0.064 0.032 0.896 0.000 0.000 0.008
#> GSM549303     3  0.4213     0.2895 0.020 0.000 0.636 0.004 0.000 0.340
#> GSM549309     6  0.4466    -0.1792 0.020 0.000 0.476 0.004 0.000 0.500
#> GSM750753     2  0.4465     0.7287 0.080 0.704 0.212 0.000 0.000 0.004
#> GSM750752     4  0.3697     0.6250 0.016 0.000 0.004 0.732 0.000 0.248
#> GSM549304     2  0.0405     0.8505 0.000 0.988 0.008 0.000 0.000 0.004
#> GSM549305     2  0.2527     0.8215 0.024 0.868 0.108 0.000 0.000 0.000
#> GSM549307     3  0.4827     0.0314 0.064 0.296 0.632 0.000 0.000 0.008
#> GSM549306     3  0.2653     0.4671 0.000 0.012 0.844 0.000 0.000 0.144
#> GSM549308     3  0.3052     0.4412 0.000 0.004 0.780 0.000 0.000 0.216
#> GSM549233     5  0.3394     0.6033 0.000 0.000 0.000 0.236 0.752 0.012
#> GSM549234     4  0.1003     0.8207 0.000 0.000 0.000 0.964 0.016 0.020
#> GSM549250     5  0.1297     0.7812 0.000 0.000 0.000 0.040 0.948 0.012
#> GSM549287     6  0.3916     0.3491 0.000 0.000 0.300 0.020 0.000 0.680
#> GSM750735     1  0.3585     0.7135 0.792 0.000 0.000 0.004 0.156 0.048
#> GSM750736     1  0.3343     0.7218 0.812 0.000 0.000 0.004 0.144 0.040
#> GSM750749     1  0.3891     0.7535 0.788 0.000 0.004 0.004 0.096 0.108
#> GSM549230     5  0.0964     0.7927 0.000 0.000 0.004 0.016 0.968 0.012
#> GSM549231     5  0.0725     0.7932 0.000 0.000 0.000 0.012 0.976 0.012
#> GSM549237     5  0.1802     0.7962 0.072 0.000 0.000 0.000 0.916 0.012
#> GSM549254     4  0.0909     0.8146 0.012 0.000 0.000 0.968 0.000 0.020
#> GSM750734     5  0.4606     0.6299 0.268 0.000 0.000 0.000 0.656 0.076
#> GSM549271     6  0.4729     0.4522 0.000 0.000 0.284 0.080 0.000 0.636
#> GSM549232     4  0.0665     0.8224 0.008 0.000 0.000 0.980 0.008 0.004
#> GSM549246     4  0.1794     0.8048 0.000 0.000 0.000 0.924 0.040 0.036
#> GSM549248     5  0.0692     0.7947 0.000 0.000 0.000 0.004 0.976 0.020
#> GSM549255     4  0.0779     0.8222 0.008 0.000 0.000 0.976 0.008 0.008
#> GSM750746     5  0.4048     0.7624 0.132 0.000 0.004 0.000 0.764 0.100
#> GSM549259     5  0.4338     0.7427 0.164 0.000 0.004 0.000 0.732 0.100
#> GSM549269     2  0.0000     0.8503 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549273     3  0.3977     0.3705 0.020 0.004 0.692 0.000 0.000 0.284
#> GSM549299     2  0.5160     0.6994 0.080 0.672 0.208 0.000 0.000 0.040
#> GSM549301     3  0.2772     0.4605 0.000 0.004 0.816 0.000 0.000 0.180
#> GSM549310     4  0.4656     0.4848 0.016 0.000 0.044 0.660 0.000 0.280
#> GSM549311     3  0.4468    -0.0212 0.020 0.000 0.488 0.004 0.000 0.488
#> GSM549302     2  0.0146     0.8500 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549235     5  0.3968     0.7661 0.124 0.000 0.004 0.000 0.772 0.100
#> GSM549245     4  0.0779     0.8222 0.008 0.000 0.000 0.976 0.008 0.008
#> GSM549265     4  0.1418     0.8171 0.000 0.000 0.000 0.944 0.024 0.032
#> GSM549282     3  0.4126     0.0499 0.004 0.000 0.512 0.004 0.000 0.480
#> GSM549296     4  0.3457     0.6545 0.016 0.000 0.000 0.752 0.000 0.232
#> GSM750739     5  0.4046     0.7410 0.168 0.000 0.000 0.000 0.748 0.084
#> GSM750742     5  0.0405     0.7953 0.000 0.000 0.000 0.004 0.988 0.008
#> GSM750744     5  0.3344     0.7380 0.152 0.000 0.000 0.000 0.804 0.044
#> GSM750750     3  0.4103     0.1267 0.004 0.000 0.544 0.004 0.000 0.448
#> GSM549242     5  0.2872     0.6985 0.004 0.000 0.000 0.152 0.832 0.012
#> GSM549252     4  0.1498     0.8153 0.000 0.000 0.000 0.940 0.028 0.032
#> GSM549253     5  0.1049     0.7871 0.000 0.000 0.000 0.032 0.960 0.008
#> GSM549256     5  0.3518     0.5875 0.000 0.000 0.000 0.256 0.732 0.012
#> GSM549257     4  0.0520     0.8222 0.008 0.000 0.000 0.984 0.008 0.000
#> GSM549263     5  0.0862     0.7921 0.000 0.000 0.004 0.016 0.972 0.008
#> GSM549267     6  0.4916     0.2348 0.000 0.000 0.064 0.416 0.000 0.520
#> GSM750745     5  0.5105     0.2935 0.432 0.000 0.000 0.000 0.488 0.080
#> GSM549239     5  0.5059     0.3921 0.392 0.000 0.000 0.000 0.528 0.080
#> GSM549244     4  0.1074     0.8207 0.000 0.000 0.000 0.960 0.012 0.028
#> GSM549249     4  0.1498     0.8153 0.000 0.000 0.000 0.940 0.028 0.032
#> GSM549260     5  0.3940     0.7803 0.132 0.000 0.000 0.024 0.788 0.056
#> GSM549266     1  0.5006     0.6518 0.728 0.088 0.072 0.000 0.004 0.108
#> GSM549293     2  0.0146     0.8500 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549236     5  0.1480     0.7818 0.000 0.000 0.000 0.040 0.940 0.020
#> GSM549238     4  0.4475     0.2733 0.000 0.000 0.000 0.556 0.412 0.032
#> GSM549251     5  0.0993     0.7909 0.000 0.000 0.000 0.024 0.964 0.012
#> GSM549258     1  0.3825     0.5878 0.744 0.000 0.004 0.000 0.220 0.032
#> GSM549264     5  0.1555     0.7889 0.008 0.000 0.000 0.012 0.940 0.040
#> GSM549243     5  0.3248     0.7808 0.116 0.000 0.004 0.000 0.828 0.052
#> GSM549262     5  0.0405     0.7953 0.000 0.000 0.000 0.004 0.988 0.008
#> GSM549278     4  0.3046     0.7158 0.012 0.000 0.000 0.800 0.000 0.188
#> GSM549283     1  0.6912     0.2154 0.464 0.280 0.136 0.000 0.000 0.120
#> GSM549298     3  0.2768     0.4676 0.000 0.012 0.832 0.000 0.000 0.156
#> GSM750741     1  0.2260     0.7319 0.860 0.000 0.000 0.000 0.140 0.000
#> GSM549286     2  0.0000     0.8503 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549241     1  0.3475     0.6968 0.800 0.000 0.000 0.000 0.140 0.060
#> GSM549247     1  0.4011     0.7459 0.812 0.008 0.004 0.076 0.068 0.032
#> GSM549261     5  0.4234     0.7504 0.152 0.000 0.004 0.000 0.744 0.100
#> GSM549270     2  0.3790     0.7727 0.072 0.772 0.156 0.000 0.000 0.000
#> GSM549277     3  0.5909    -0.2058 0.092 0.356 0.512 0.000 0.000 0.040
#> GSM549280     3  0.6118    -0.3413 0.096 0.408 0.448 0.000 0.000 0.048
#> GSM549281     1  0.5425     0.6247 0.692 0.096 0.096 0.000 0.004 0.112
#> GSM549285     3  0.4855     0.1380 0.056 0.000 0.484 0.000 0.000 0.460
#> GSM549288     2  0.5243     0.3474 0.080 0.460 0.456 0.000 0.000 0.004
#> GSM549292     2  0.0000     0.8503 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     2  0.4853     0.3803 0.056 0.488 0.456 0.000 0.000 0.000
#> GSM549297     2  0.4790     0.6706 0.080 0.648 0.268 0.000 0.000 0.004
#> GSM750743     5  0.5099     0.3045 0.424 0.000 0.000 0.000 0.496 0.080
#> GSM549268     1  0.5425     0.6247 0.692 0.096 0.096 0.000 0.004 0.112
#> GSM549290     6  0.5047     0.2355 0.004 0.000 0.064 0.416 0.000 0.516
#> GSM549272     2  0.0000     0.8503 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549276     2  0.1594     0.8422 0.016 0.932 0.052 0.000 0.000 0.000
#> GSM549275     1  0.3689     0.7505 0.812 0.012 0.008 0.000 0.120 0.048
#> GSM549284     2  0.0551     0.8495 0.004 0.984 0.008 0.000 0.000 0.004
#> GSM750737     4  0.2905     0.6927 0.144 0.000 0.000 0.836 0.008 0.012
#> GSM750740     5  0.4234     0.7504 0.152 0.000 0.004 0.000 0.744 0.100
#> GSM750747     5  0.4087     0.7603 0.136 0.000 0.004 0.000 0.760 0.100
#> GSM750751     2  0.1333     0.8453 0.008 0.944 0.048 0.000 0.000 0.000
#> GSM750754     6  0.4949     0.5098 0.000 0.000 0.208 0.144 0.000 0.648

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-kmeans-membership-heatmap-5

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)

plot of chunk tab-SD-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-kmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-SD-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-kmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> SD:kmeans 103           0.0230    1.72e-05              5.36e-02   0.0048 2
#> SD:kmeans 101           0.0894    1.60e-06              1.40e-04   0.0118 3
#> SD:kmeans 102           0.3636    3.16e-05              8.77e-04   0.0389 4
#> SD:kmeans  95           0.4167    7.16e-04              1.59e-03   0.0980 5
#> SD:kmeans  76           0.0717    1.51e-02              3.56e-05   0.0033 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.


SD:skmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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)

plot of chunk SD-skmeans-collect-plots

The plots are:

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:

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)

plot of chunk SD-skmeans-select-partition-number

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.999         0.5043 0.496   0.496
#> 3 3 0.805           0.791       0.899         0.2814 0.807   0.628
#> 4 4 0.829           0.868       0.930         0.1400 0.879   0.674
#> 5 5 0.768           0.701       0.857         0.0739 0.917   0.708
#> 6 6 0.739           0.645       0.758         0.0347 0.969   0.857

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette   p1   p2
#> GSM549289     1   0.000      0.998 1.00 0.00
#> GSM549291     2   0.000      1.000 0.00 1.00
#> GSM549274     2   0.000      1.000 0.00 1.00
#> GSM750738     2   0.000      1.000 0.00 1.00
#> GSM750748     1   0.000      0.998 1.00 0.00
#> GSM549240     1   0.000      0.998 1.00 0.00
#> GSM549279     2   0.000      1.000 0.00 1.00
#> GSM549294     2   0.000      1.000 0.00 1.00
#> GSM549300     2   0.000      1.000 0.00 1.00
#> GSM549303     2   0.000      1.000 0.00 1.00
#> GSM549309     2   0.000      1.000 0.00 1.00
#> GSM750753     2   0.000      1.000 0.00 1.00
#> GSM750752     2   0.000      1.000 0.00 1.00
#> GSM549304     2   0.000      1.000 0.00 1.00
#> GSM549305     2   0.000      1.000 0.00 1.00
#> GSM549307     2   0.000      1.000 0.00 1.00
#> GSM549306     2   0.000      1.000 0.00 1.00
#> GSM549308     2   0.000      1.000 0.00 1.00
#> GSM549233     1   0.000      0.998 1.00 0.00
#> GSM549234     1   0.000      0.998 1.00 0.00
#> GSM549250     1   0.000      0.998 1.00 0.00
#> GSM549287     2   0.000      1.000 0.00 1.00
#> GSM750735     1   0.000      0.998 1.00 0.00
#> GSM750736     1   0.000      0.998 1.00 0.00
#> GSM750749     1   0.000      0.998 1.00 0.00
#> GSM549230     1   0.000      0.998 1.00 0.00
#> GSM549231     1   0.000      0.998 1.00 0.00
#> GSM549237     1   0.000      0.998 1.00 0.00
#> GSM549254     1   0.000      0.998 1.00 0.00
#> GSM750734     1   0.000      0.998 1.00 0.00
#> GSM549271     2   0.000      1.000 0.00 1.00
#> GSM549232     1   0.000      0.998 1.00 0.00
#> GSM549246     1   0.000      0.998 1.00 0.00
#> GSM549248     1   0.000      0.998 1.00 0.00
#> GSM549255     1   0.000      0.998 1.00 0.00
#> GSM750746     1   0.000      0.998 1.00 0.00
#> GSM549259     1   0.000      0.998 1.00 0.00
#> GSM549269     2   0.000      1.000 0.00 1.00
#> GSM549273     2   0.000      1.000 0.00 1.00
#> GSM549299     2   0.000      1.000 0.00 1.00
#> GSM549301     2   0.000      1.000 0.00 1.00
#> GSM549310     2   0.000      1.000 0.00 1.00
#> GSM549311     2   0.000      1.000 0.00 1.00
#> GSM549302     2   0.000      1.000 0.00 1.00
#> GSM549235     1   0.000      0.998 1.00 0.00
#> GSM549245     1   0.000      0.998 1.00 0.00
#> GSM549265     1   0.000      0.998 1.00 0.00
#> GSM549282     2   0.000      1.000 0.00 1.00
#> GSM549296     2   0.000      1.000 0.00 1.00
#> GSM750739     1   0.000      0.998 1.00 0.00
#> GSM750742     1   0.000      0.998 1.00 0.00
#> GSM750744     1   0.000      0.998 1.00 0.00
#> GSM750750     2   0.000      1.000 0.00 1.00
#> GSM549242     1   0.000      0.998 1.00 0.00
#> GSM549252     1   0.000      0.998 1.00 0.00
#> GSM549253     1   0.000      0.998 1.00 0.00
#> GSM549256     1   0.000      0.998 1.00 0.00
#> GSM549257     1   0.000      0.998 1.00 0.00
#> GSM549263     1   0.000      0.998 1.00 0.00
#> GSM549267     2   0.000      1.000 0.00 1.00
#> GSM750745     1   0.000      0.998 1.00 0.00
#> GSM549239     1   0.000      0.998 1.00 0.00
#> GSM549244     1   0.000      0.998 1.00 0.00
#> GSM549249     1   0.000      0.998 1.00 0.00
#> GSM549260     1   0.000      0.998 1.00 0.00
#> GSM549266     2   0.000      1.000 0.00 1.00
#> GSM549293     2   0.000      1.000 0.00 1.00
#> GSM549236     1   0.000      0.998 1.00 0.00
#> GSM549238     1   0.000      0.998 1.00 0.00
#> GSM549251     1   0.000      0.998 1.00 0.00
#> GSM549258     1   0.000      0.998 1.00 0.00
#> GSM549264     1   0.000      0.998 1.00 0.00
#> GSM549243     1   0.000      0.998 1.00 0.00
#> GSM549262     1   0.000      0.998 1.00 0.00
#> GSM549278     1   0.529      0.864 0.88 0.12
#> GSM549283     2   0.000      1.000 0.00 1.00
#> GSM549298     2   0.000      1.000 0.00 1.00
#> GSM750741     1   0.000      0.998 1.00 0.00
#> GSM549286     2   0.000      1.000 0.00 1.00
#> GSM549241     1   0.000      0.998 1.00 0.00
#> GSM549247     1   0.000      0.998 1.00 0.00
#> GSM549261     1   0.000      0.998 1.00 0.00
#> GSM549270     2   0.000      1.000 0.00 1.00
#> GSM549277     2   0.000      1.000 0.00 1.00
#> GSM549280     2   0.000      1.000 0.00 1.00
#> GSM549281     2   0.000      1.000 0.00 1.00
#> GSM549285     2   0.000      1.000 0.00 1.00
#> GSM549288     2   0.000      1.000 0.00 1.00
#> GSM549292     2   0.000      1.000 0.00 1.00
#> GSM549295     2   0.000      1.000 0.00 1.00
#> GSM549297     2   0.000      1.000 0.00 1.00
#> GSM750743     1   0.000      0.998 1.00 0.00
#> GSM549268     2   0.000      1.000 0.00 1.00
#> GSM549290     2   0.000      1.000 0.00 1.00
#> GSM549272     2   0.000      1.000 0.00 1.00
#> GSM549276     2   0.000      1.000 0.00 1.00
#> GSM549275     1   0.000      0.998 1.00 0.00
#> GSM549284     2   0.000      1.000 0.00 1.00
#> GSM750737     1   0.000      0.998 1.00 0.00
#> GSM750740     1   0.000      0.998 1.00 0.00
#> GSM750747     1   0.000      0.998 1.00 0.00
#> GSM750751     2   0.000      1.000 0.00 1.00
#> GSM750754     2   0.000      1.000 0.00 1.00

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.2066     0.7100 0.060 0.000 0.940
#> GSM549291     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM549274     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM750738     2  0.0424     0.8688 0.000 0.992 0.008
#> GSM750748     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549240     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549279     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549294     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549300     2  0.5988     0.6337 0.000 0.632 0.368
#> GSM549303     2  0.6260     0.5251 0.000 0.552 0.448
#> GSM549309     3  0.5706     0.0689 0.000 0.320 0.680
#> GSM750753     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM750752     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM549304     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549305     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549307     2  0.2448     0.8409 0.000 0.924 0.076
#> GSM549306     2  0.6079     0.6160 0.000 0.612 0.388
#> GSM549308     2  0.6079     0.6160 0.000 0.612 0.388
#> GSM549233     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549234     3  0.6095     0.5538 0.392 0.000 0.608
#> GSM549250     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549287     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM750735     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM750736     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM750749     1  0.3445     0.8245 0.896 0.088 0.016
#> GSM549230     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549231     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549237     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549254     3  0.5859     0.5973 0.344 0.000 0.656
#> GSM750734     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549271     3  0.4062     0.4761 0.000 0.164 0.836
#> GSM549232     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM549246     1  0.6026     0.1872 0.624 0.000 0.376
#> GSM549248     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549255     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM750746     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549259     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549269     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549273     2  0.6079     0.6160 0.000 0.612 0.388
#> GSM549299     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549301     2  0.6079     0.6160 0.000 0.612 0.388
#> GSM549310     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM549311     2  0.6302     0.4645 0.000 0.520 0.480
#> GSM549302     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549235     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549245     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM549265     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM549282     2  0.6204     0.5648 0.000 0.576 0.424
#> GSM549296     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM750739     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM750742     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM750744     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM750750     2  0.6095     0.6108 0.000 0.608 0.392
#> GSM549242     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549252     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM549253     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549256     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549257     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM549263     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549267     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM750745     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549239     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549244     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM549249     3  0.6079     0.5621 0.388 0.000 0.612
#> GSM549260     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549266     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549293     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549236     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549238     1  0.5926     0.2580 0.644 0.000 0.356
#> GSM549251     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549258     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549264     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549243     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549262     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549278     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM549283     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549298     2  0.6079     0.6160 0.000 0.612 0.388
#> GSM750741     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549286     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549241     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549247     1  0.1643     0.9029 0.956 0.044 0.000
#> GSM549261     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549270     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549277     2  0.1163     0.8646 0.000 0.972 0.028
#> GSM549280     2  0.1643     0.8576 0.000 0.956 0.044
#> GSM549281     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549285     2  0.6079     0.6160 0.000 0.612 0.388
#> GSM549288     2  0.0892     0.8677 0.000 0.980 0.020
#> GSM549292     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549295     2  0.0892     0.8677 0.000 0.980 0.020
#> GSM549297     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM750743     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM549268     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549290     3  0.0000     0.7027 0.000 0.000 1.000
#> GSM549272     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549276     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM549275     1  0.2796     0.8386 0.908 0.092 0.000
#> GSM549284     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM750737     1  0.6235    -0.0626 0.564 0.000 0.436
#> GSM750740     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM750747     1  0.0000     0.9551 1.000 0.000 0.000
#> GSM750751     2  0.0000     0.8739 0.000 1.000 0.000
#> GSM750754     3  0.0000     0.7027 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.0592      0.875 0.000 0.000 0.016 0.984
#> GSM549291     4  0.4972      0.259 0.000 0.000 0.456 0.544
#> GSM549274     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM750738     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM750748     1  0.0188      0.921 0.996 0.000 0.000 0.004
#> GSM549240     1  0.1635      0.903 0.948 0.000 0.008 0.044
#> GSM549279     2  0.0859      0.932 0.008 0.980 0.008 0.004
#> GSM549294     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549300     3  0.3123      0.791 0.000 0.156 0.844 0.000
#> GSM549303     3  0.0336      0.948 0.000 0.008 0.992 0.000
#> GSM549309     3  0.0336      0.944 0.000 0.000 0.992 0.008
#> GSM750753     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM750752     4  0.4331      0.614 0.000 0.000 0.288 0.712
#> GSM549304     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549305     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549307     2  0.4804      0.448 0.000 0.616 0.384 0.000
#> GSM549306     3  0.1637      0.908 0.000 0.060 0.940 0.000
#> GSM549308     3  0.0592      0.948 0.000 0.016 0.984 0.000
#> GSM549233     1  0.4543      0.652 0.676 0.000 0.000 0.324
#> GSM549234     4  0.0188      0.878 0.004 0.000 0.000 0.996
#> GSM549250     1  0.3975      0.771 0.760 0.000 0.000 0.240
#> GSM549287     3  0.0336      0.944 0.000 0.000 0.992 0.008
#> GSM750735     1  0.0524      0.918 0.988 0.000 0.008 0.004
#> GSM750736     1  0.0524      0.918 0.988 0.000 0.008 0.004
#> GSM750749     1  0.2629      0.873 0.912 0.024 0.060 0.004
#> GSM549230     1  0.3123      0.851 0.844 0.000 0.000 0.156
#> GSM549231     1  0.3024      0.857 0.852 0.000 0.000 0.148
#> GSM549237     1  0.0921      0.918 0.972 0.000 0.000 0.028
#> GSM549254     4  0.0657      0.875 0.004 0.000 0.012 0.984
#> GSM750734     1  0.0336      0.920 0.992 0.000 0.008 0.000
#> GSM549271     3  0.0336      0.944 0.000 0.000 0.992 0.008
#> GSM549232     4  0.0376      0.879 0.004 0.000 0.004 0.992
#> GSM549246     4  0.2760      0.764 0.128 0.000 0.000 0.872
#> GSM549248     1  0.1211      0.914 0.960 0.000 0.000 0.040
#> GSM549255     4  0.0524      0.879 0.004 0.000 0.008 0.988
#> GSM750746     1  0.0188      0.921 0.996 0.000 0.000 0.004
#> GSM549259     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549273     3  0.0592      0.948 0.000 0.016 0.984 0.000
#> GSM549299     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549301     3  0.0707      0.946 0.000 0.020 0.980 0.000
#> GSM549310     4  0.4877      0.387 0.000 0.000 0.408 0.592
#> GSM549311     3  0.0336      0.948 0.000 0.008 0.992 0.000
#> GSM549302     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549235     1  0.0188      0.921 0.996 0.000 0.000 0.004
#> GSM549245     4  0.0524      0.879 0.004 0.000 0.008 0.988
#> GSM549265     4  0.0188      0.878 0.004 0.000 0.000 0.996
#> GSM549282     3  0.0469      0.948 0.000 0.012 0.988 0.000
#> GSM549296     4  0.4008      0.672 0.000 0.000 0.244 0.756
#> GSM750739     1  0.0000      0.921 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0921      0.918 0.972 0.000 0.000 0.028
#> GSM750744     1  0.0592      0.920 0.984 0.000 0.000 0.016
#> GSM750750     3  0.0469      0.948 0.000 0.012 0.988 0.000
#> GSM549242     1  0.3764      0.798 0.784 0.000 0.000 0.216
#> GSM549252     4  0.0188      0.878 0.004 0.000 0.000 0.996
#> GSM549253     1  0.3528      0.821 0.808 0.000 0.000 0.192
#> GSM549256     1  0.4585      0.639 0.668 0.000 0.000 0.332
#> GSM549257     4  0.0376      0.879 0.004 0.000 0.004 0.992
#> GSM549263     1  0.3219      0.845 0.836 0.000 0.000 0.164
#> GSM549267     3  0.3219      0.763 0.000 0.000 0.836 0.164
#> GSM750745     1  0.0336      0.920 0.992 0.000 0.008 0.000
#> GSM549239     1  0.0336      0.920 0.992 0.000 0.008 0.000
#> GSM549244     4  0.0524      0.879 0.004 0.000 0.008 0.988
#> GSM549249     4  0.0188      0.878 0.004 0.000 0.000 0.996
#> GSM549260     1  0.2149      0.890 0.912 0.000 0.000 0.088
#> GSM549266     2  0.0859      0.932 0.008 0.980 0.008 0.004
#> GSM549293     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549236     1  0.4072      0.756 0.748 0.000 0.000 0.252
#> GSM549238     4  0.1867      0.825 0.072 0.000 0.000 0.928
#> GSM549251     1  0.3311      0.838 0.828 0.000 0.000 0.172
#> GSM549258     1  0.0524      0.918 0.988 0.000 0.008 0.004
#> GSM549264     1  0.1716      0.905 0.936 0.000 0.000 0.064
#> GSM549243     1  0.0188      0.921 0.996 0.000 0.000 0.004
#> GSM549262     1  0.0921      0.918 0.972 0.000 0.000 0.028
#> GSM549278     4  0.4040      0.680 0.000 0.000 0.248 0.752
#> GSM549283     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549298     3  0.0921      0.940 0.000 0.028 0.972 0.000
#> GSM750741     1  0.0524      0.918 0.988 0.000 0.008 0.004
#> GSM549286     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549241     1  0.0524      0.918 0.988 0.000 0.008 0.004
#> GSM549247     1  0.4447      0.773 0.812 0.136 0.008 0.044
#> GSM549261     1  0.0188      0.921 0.996 0.000 0.000 0.004
#> GSM549270     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549277     2  0.4382      0.632 0.000 0.704 0.296 0.000
#> GSM549280     2  0.4103      0.696 0.000 0.744 0.256 0.000
#> GSM549281     2  0.1229      0.931 0.008 0.968 0.020 0.004
#> GSM549285     3  0.0592      0.948 0.000 0.016 0.984 0.000
#> GSM549288     2  0.3610      0.769 0.000 0.800 0.200 0.000
#> GSM549292     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549295     2  0.3486      0.783 0.000 0.812 0.188 0.000
#> GSM549297     2  0.0921      0.929 0.000 0.972 0.028 0.000
#> GSM750743     1  0.0336      0.920 0.992 0.000 0.008 0.000
#> GSM549268     2  0.1296      0.930 0.004 0.964 0.028 0.004
#> GSM549290     3  0.3528      0.717 0.000 0.000 0.808 0.192
#> GSM549272     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM549275     1  0.2310      0.874 0.920 0.068 0.008 0.004
#> GSM549284     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM750737     4  0.1452      0.857 0.036 0.000 0.008 0.956
#> GSM750740     1  0.0188      0.921 0.996 0.000 0.000 0.004
#> GSM750747     1  0.0188      0.921 0.996 0.000 0.000 0.004
#> GSM750751     2  0.0000      0.945 0.000 1.000 0.000 0.000
#> GSM750754     3  0.0336      0.944 0.000 0.000 0.992 0.008

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.0992     0.8585 0.008 0.000 0.000 0.968 0.024
#> GSM549291     4  0.4770     0.5102 0.000 0.000 0.320 0.644 0.036
#> GSM549274     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM750738     2  0.0693     0.8585 0.000 0.980 0.000 0.012 0.008
#> GSM750748     1  0.3636     0.6228 0.728 0.000 0.000 0.000 0.272
#> GSM549240     5  0.2903     0.7309 0.080 0.000 0.000 0.048 0.872
#> GSM549279     2  0.4306     0.2314 0.000 0.508 0.000 0.000 0.492
#> GSM549294     2  0.0162     0.8643 0.000 0.996 0.000 0.000 0.004
#> GSM549300     3  0.3366     0.6413 0.000 0.232 0.768 0.000 0.000
#> GSM549303     3  0.0324     0.9241 0.000 0.000 0.992 0.004 0.004
#> GSM549309     3  0.0324     0.9241 0.000 0.000 0.992 0.004 0.004
#> GSM750753     2  0.0324     0.8639 0.000 0.992 0.004 0.000 0.004
#> GSM750752     4  0.3309     0.7780 0.000 0.000 0.128 0.836 0.036
#> GSM549304     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM549305     2  0.0162     0.8643 0.000 0.996 0.000 0.000 0.004
#> GSM549307     2  0.4210     0.3786 0.000 0.588 0.412 0.000 0.000
#> GSM549306     3  0.1792     0.8577 0.000 0.084 0.916 0.000 0.000
#> GSM549308     3  0.0000     0.9240 0.000 0.000 1.000 0.000 0.000
#> GSM549233     1  0.2179     0.6665 0.888 0.000 0.000 0.112 0.000
#> GSM549234     4  0.1410     0.8551 0.060 0.000 0.000 0.940 0.000
#> GSM549250     1  0.0703     0.7331 0.976 0.000 0.000 0.024 0.000
#> GSM549287     3  0.1195     0.9109 0.000 0.000 0.960 0.012 0.028
#> GSM750735     5  0.3395     0.6354 0.236 0.000 0.000 0.000 0.764
#> GSM750736     5  0.2286     0.7456 0.108 0.000 0.000 0.004 0.888
#> GSM750749     5  0.2420     0.7314 0.088 0.008 0.008 0.000 0.896
#> GSM549230     1  0.0404     0.7389 0.988 0.000 0.000 0.012 0.000
#> GSM549231     1  0.0324     0.7406 0.992 0.000 0.000 0.004 0.004
#> GSM549237     1  0.2074     0.7208 0.896 0.000 0.000 0.000 0.104
#> GSM549254     4  0.0771     0.8565 0.000 0.000 0.004 0.976 0.020
#> GSM750734     1  0.4235     0.3012 0.576 0.000 0.000 0.000 0.424
#> GSM549271     3  0.0807     0.9182 0.000 0.000 0.976 0.012 0.012
#> GSM549232     4  0.0404     0.8608 0.012 0.000 0.000 0.988 0.000
#> GSM549246     1  0.4436     0.1744 0.596 0.000 0.000 0.396 0.008
#> GSM549248     1  0.0609     0.7416 0.980 0.000 0.000 0.000 0.020
#> GSM549255     4  0.0510     0.8610 0.016 0.000 0.000 0.984 0.000
#> GSM750746     1  0.3774     0.5967 0.704 0.000 0.000 0.000 0.296
#> GSM549259     1  0.4060     0.4922 0.640 0.000 0.000 0.000 0.360
#> GSM549269     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM549273     3  0.0000     0.9240 0.000 0.000 1.000 0.000 0.000
#> GSM549299     2  0.0404     0.8623 0.000 0.988 0.000 0.000 0.012
#> GSM549301     3  0.0290     0.9214 0.000 0.008 0.992 0.000 0.000
#> GSM549310     4  0.4789     0.5509 0.000 0.004 0.292 0.668 0.036
#> GSM549311     3  0.0324     0.9241 0.000 0.000 0.992 0.004 0.004
#> GSM549302     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM549235     1  0.3534     0.6366 0.744 0.000 0.000 0.000 0.256
#> GSM549245     4  0.0510     0.8613 0.016 0.000 0.000 0.984 0.000
#> GSM549265     4  0.3728     0.7278 0.244 0.000 0.000 0.748 0.008
#> GSM549282     3  0.0162     0.9243 0.000 0.000 0.996 0.000 0.004
#> GSM549296     4  0.1836     0.8419 0.000 0.000 0.032 0.932 0.036
#> GSM750739     1  0.3752     0.5920 0.708 0.000 0.000 0.000 0.292
#> GSM750742     1  0.0609     0.7415 0.980 0.000 0.000 0.000 0.020
#> GSM750744     1  0.3074     0.6533 0.804 0.000 0.000 0.000 0.196
#> GSM750750     3  0.0000     0.9240 0.000 0.000 1.000 0.000 0.000
#> GSM549242     1  0.1469     0.7327 0.948 0.000 0.000 0.036 0.016
#> GSM549252     4  0.2929     0.7877 0.180 0.000 0.000 0.820 0.000
#> GSM549253     1  0.0510     0.7373 0.984 0.000 0.000 0.016 0.000
#> GSM549256     1  0.2516     0.6409 0.860 0.000 0.000 0.140 0.000
#> GSM549257     4  0.0880     0.8600 0.032 0.000 0.000 0.968 0.000
#> GSM549263     1  0.0404     0.7389 0.988 0.000 0.000 0.012 0.000
#> GSM549267     3  0.4269     0.6277 0.000 0.000 0.732 0.232 0.036
#> GSM750745     5  0.4242     0.1434 0.428 0.000 0.000 0.000 0.572
#> GSM549239     1  0.4304     0.0856 0.516 0.000 0.000 0.000 0.484
#> GSM549244     4  0.2179     0.8332 0.112 0.000 0.000 0.888 0.000
#> GSM549249     4  0.2605     0.8132 0.148 0.000 0.000 0.852 0.000
#> GSM549260     1  0.3906     0.6030 0.704 0.000 0.000 0.004 0.292
#> GSM549266     5  0.4307    -0.2900 0.000 0.500 0.000 0.000 0.500
#> GSM549293     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM549236     1  0.0510     0.7378 0.984 0.000 0.000 0.016 0.000
#> GSM549238     1  0.4182     0.1359 0.600 0.000 0.000 0.400 0.000
#> GSM549251     1  0.0404     0.7389 0.988 0.000 0.000 0.012 0.000
#> GSM549258     5  0.3210     0.6590 0.212 0.000 0.000 0.000 0.788
#> GSM549264     1  0.0404     0.7414 0.988 0.000 0.000 0.000 0.012
#> GSM549243     1  0.3508     0.6394 0.748 0.000 0.000 0.000 0.252
#> GSM549262     1  0.0609     0.7416 0.980 0.000 0.000 0.000 0.020
#> GSM549278     4  0.3649     0.7601 0.000 0.000 0.152 0.808 0.040
#> GSM549283     2  0.1965     0.8355 0.000 0.924 0.024 0.000 0.052
#> GSM549298     3  0.1121     0.8958 0.000 0.044 0.956 0.000 0.000
#> GSM750741     5  0.1851     0.7446 0.088 0.000 0.000 0.000 0.912
#> GSM549286     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM549241     5  0.2377     0.7368 0.128 0.000 0.000 0.000 0.872
#> GSM549247     5  0.3016     0.7107 0.032 0.040 0.000 0.044 0.884
#> GSM549261     1  0.3876     0.5706 0.684 0.000 0.000 0.000 0.316
#> GSM549270     2  0.0324     0.8639 0.000 0.992 0.004 0.000 0.004
#> GSM549277     2  0.4171     0.4135 0.000 0.604 0.396 0.000 0.000
#> GSM549280     2  0.4151     0.5173 0.000 0.652 0.344 0.000 0.004
#> GSM549281     2  0.4549     0.2964 0.000 0.528 0.008 0.000 0.464
#> GSM549285     3  0.0324     0.9222 0.000 0.004 0.992 0.000 0.004
#> GSM549288     2  0.3534     0.6596 0.000 0.744 0.256 0.000 0.000
#> GSM549292     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM549295     2  0.3336     0.6928 0.000 0.772 0.228 0.000 0.000
#> GSM549297     2  0.1571     0.8370 0.000 0.936 0.060 0.000 0.004
#> GSM750743     5  0.4306    -0.0952 0.492 0.000 0.000 0.000 0.508
#> GSM549268     2  0.5042     0.2887 0.000 0.508 0.032 0.000 0.460
#> GSM549290     3  0.4240     0.6369 0.000 0.000 0.736 0.228 0.036
#> GSM549272     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM549276     2  0.0000     0.8649 0.000 1.000 0.000 0.000 0.000
#> GSM549275     5  0.2694     0.7351 0.076 0.040 0.000 0.000 0.884
#> GSM549284     2  0.0162     0.8653 0.000 0.996 0.000 0.000 0.004
#> GSM750737     4  0.3455     0.6887 0.008 0.000 0.000 0.784 0.208
#> GSM750740     1  0.3816     0.5873 0.696 0.000 0.000 0.000 0.304
#> GSM750747     1  0.3816     0.5873 0.696 0.000 0.000 0.000 0.304
#> GSM750751     2  0.0000     0.8649 0.000 1.000 0.000 0.000 0.000
#> GSM750754     3  0.1493     0.9021 0.000 0.000 0.948 0.028 0.024

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.3473      0.744 0.004 0.000 0.000 0.780 0.024 0.192
#> GSM549291     4  0.6014      0.387 0.004 0.000 0.276 0.472 0.000 0.248
#> GSM549274     2  0.0260      0.798 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM750738     2  0.1092      0.776 0.000 0.960 0.000 0.020 0.000 0.020
#> GSM750748     5  0.4420      0.513 0.308 0.000 0.000 0.000 0.644 0.048
#> GSM549240     1  0.5317      0.431 0.628 0.008 0.000 0.036 0.048 0.280
#> GSM549279     6  0.5901      0.855 0.240 0.292 0.000 0.000 0.000 0.468
#> GSM549294     2  0.1349      0.787 0.004 0.940 0.000 0.000 0.000 0.056
#> GSM549300     3  0.4085      0.598 0.000 0.156 0.748 0.000 0.000 0.096
#> GSM549303     3  0.0632      0.859 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM549309     3  0.1327      0.850 0.000 0.000 0.936 0.000 0.000 0.064
#> GSM750753     2  0.1787      0.780 0.004 0.920 0.008 0.000 0.000 0.068
#> GSM750752     4  0.4065      0.686 0.000 0.000 0.056 0.724 0.000 0.220
#> GSM549304     2  0.0508      0.796 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM549305     2  0.1152      0.792 0.004 0.952 0.000 0.000 0.000 0.044
#> GSM549307     2  0.5249      0.244 0.000 0.484 0.420 0.000 0.000 0.096
#> GSM549306     3  0.2740      0.773 0.000 0.060 0.864 0.000 0.000 0.076
#> GSM549308     3  0.0937      0.849 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM549233     5  0.2982      0.607 0.004 0.000 0.000 0.164 0.820 0.012
#> GSM549234     4  0.2060      0.750 0.000 0.000 0.000 0.900 0.084 0.016
#> GSM549250     5  0.1829      0.681 0.004 0.000 0.000 0.064 0.920 0.012
#> GSM549287     3  0.2378      0.807 0.000 0.000 0.848 0.000 0.000 0.152
#> GSM750735     1  0.4196      0.606 0.740 0.000 0.000 0.000 0.116 0.144
#> GSM750736     1  0.3347      0.623 0.824 0.000 0.000 0.004 0.068 0.104
#> GSM750749     1  0.4953      0.251 0.600 0.008 0.000 0.004 0.052 0.336
#> GSM549230     5  0.0717      0.706 0.008 0.000 0.000 0.000 0.976 0.016
#> GSM549231     5  0.0508      0.704 0.012 0.000 0.000 0.000 0.984 0.004
#> GSM549237     5  0.2575      0.683 0.100 0.000 0.000 0.004 0.872 0.024
#> GSM549254     4  0.2312      0.750 0.012 0.000 0.000 0.876 0.000 0.112
#> GSM750734     1  0.4437      0.328 0.576 0.000 0.000 0.000 0.392 0.032
#> GSM549271     3  0.2191      0.825 0.000 0.000 0.876 0.004 0.000 0.120
#> GSM549232     4  0.0603      0.767 0.000 0.000 0.000 0.980 0.004 0.016
#> GSM549246     5  0.5477      0.196 0.020 0.000 0.000 0.344 0.552 0.084
#> GSM549248     5  0.1349      0.698 0.056 0.000 0.000 0.000 0.940 0.004
#> GSM549255     4  0.0508      0.766 0.000 0.000 0.000 0.984 0.004 0.012
#> GSM750746     5  0.4386      0.517 0.300 0.000 0.000 0.000 0.652 0.048
#> GSM549259     5  0.4720      0.360 0.388 0.000 0.000 0.000 0.560 0.052
#> GSM549269     2  0.0260      0.798 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM549273     3  0.1082      0.857 0.000 0.004 0.956 0.000 0.000 0.040
#> GSM549299     2  0.2114      0.771 0.008 0.904 0.012 0.000 0.000 0.076
#> GSM549301     3  0.1411      0.837 0.000 0.004 0.936 0.000 0.000 0.060
#> GSM549310     4  0.5834      0.457 0.000 0.004 0.236 0.520 0.000 0.240
#> GSM549311     3  0.0937      0.856 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM549302     2  0.0260      0.798 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM549235     5  0.4233      0.554 0.268 0.000 0.000 0.000 0.684 0.048
#> GSM549245     4  0.0692      0.766 0.000 0.000 0.000 0.976 0.004 0.020
#> GSM549265     4  0.5177      0.624 0.032 0.000 0.000 0.660 0.224 0.084
#> GSM549282     3  0.0632      0.858 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM549296     4  0.3539      0.703 0.000 0.000 0.024 0.756 0.000 0.220
#> GSM750739     5  0.4276      0.253 0.416 0.000 0.000 0.000 0.564 0.020
#> GSM750742     5  0.1196      0.703 0.040 0.000 0.000 0.000 0.952 0.008
#> GSM750744     5  0.4333      0.247 0.376 0.000 0.000 0.000 0.596 0.028
#> GSM750750     3  0.0146      0.857 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM549242     5  0.2883      0.683 0.036 0.000 0.000 0.076 0.868 0.020
#> GSM549252     4  0.3806      0.669 0.000 0.000 0.000 0.752 0.200 0.048
#> GSM549253     5  0.0820      0.701 0.000 0.000 0.000 0.016 0.972 0.012
#> GSM549256     5  0.3354      0.596 0.016 0.000 0.000 0.184 0.792 0.008
#> GSM549257     4  0.0725      0.765 0.000 0.000 0.000 0.976 0.012 0.012
#> GSM549263     5  0.0260      0.704 0.000 0.000 0.000 0.008 0.992 0.000
#> GSM549267     3  0.5173      0.514 0.000 0.000 0.616 0.160 0.000 0.224
#> GSM750745     1  0.3534      0.579 0.740 0.000 0.000 0.000 0.244 0.016
#> GSM549239     1  0.3979      0.394 0.628 0.000 0.000 0.000 0.360 0.012
#> GSM549244     4  0.2867      0.733 0.000 0.000 0.000 0.848 0.112 0.040
#> GSM549249     4  0.3453      0.700 0.000 0.000 0.000 0.792 0.164 0.044
#> GSM549260     5  0.5216      0.441 0.320 0.000 0.000 0.028 0.596 0.056
#> GSM549266     6  0.6158      0.820 0.284 0.292 0.004 0.000 0.000 0.420
#> GSM549293     2  0.0260      0.798 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM549236     5  0.1644      0.687 0.004 0.000 0.000 0.052 0.932 0.012
#> GSM549238     5  0.4400      0.227 0.000 0.000 0.000 0.376 0.592 0.032
#> GSM549251     5  0.0767      0.702 0.004 0.000 0.000 0.012 0.976 0.008
#> GSM549258     1  0.4387      0.654 0.720 0.000 0.000 0.000 0.152 0.128
#> GSM549264     5  0.2573      0.658 0.112 0.000 0.000 0.000 0.864 0.024
#> GSM549243     5  0.3989      0.573 0.236 0.000 0.000 0.000 0.720 0.044
#> GSM549262     5  0.1411      0.700 0.060 0.000 0.000 0.000 0.936 0.004
#> GSM549278     4  0.5374      0.593 0.000 0.000 0.168 0.580 0.000 0.252
#> GSM549283     2  0.3853      0.622 0.028 0.788 0.036 0.000 0.000 0.148
#> GSM549298     3  0.2145      0.811 0.000 0.028 0.900 0.000 0.000 0.072
#> GSM750741     1  0.3049      0.617 0.844 0.000 0.000 0.004 0.048 0.104
#> GSM549286     2  0.0405      0.799 0.004 0.988 0.000 0.000 0.000 0.008
#> GSM549241     1  0.4085      0.621 0.748 0.000 0.000 0.000 0.096 0.156
#> GSM549247     1  0.5260      0.344 0.632 0.028 0.000 0.040 0.016 0.284
#> GSM549261     5  0.4635      0.461 0.336 0.000 0.000 0.000 0.608 0.056
#> GSM549270     2  0.1787      0.779 0.004 0.920 0.008 0.000 0.000 0.068
#> GSM549277     2  0.5359      0.204 0.000 0.460 0.432 0.000 0.000 0.108
#> GSM549280     2  0.5336      0.336 0.000 0.544 0.332 0.000 0.000 0.124
#> GSM549281     6  0.6182      0.876 0.208 0.256 0.024 0.000 0.000 0.512
#> GSM549285     3  0.1196      0.848 0.000 0.008 0.952 0.000 0.000 0.040
#> GSM549288     2  0.5016      0.406 0.000 0.592 0.312 0.000 0.000 0.096
#> GSM549292     2  0.0260      0.798 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM549295     2  0.4771      0.490 0.000 0.652 0.248 0.000 0.000 0.100
#> GSM549297     2  0.3468      0.692 0.004 0.816 0.088 0.000 0.000 0.092
#> GSM750743     1  0.4229      0.537 0.668 0.000 0.000 0.000 0.292 0.040
#> GSM549268     6  0.6446      0.843 0.200 0.220 0.056 0.000 0.000 0.524
#> GSM549290     3  0.5473      0.418 0.000 0.000 0.568 0.192 0.000 0.240
#> GSM549272     2  0.0291      0.798 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM549276     2  0.0692      0.797 0.004 0.976 0.000 0.000 0.000 0.020
#> GSM549275     1  0.4493      0.555 0.728 0.036 0.000 0.000 0.044 0.192
#> GSM549284     2  0.0405      0.798 0.004 0.988 0.000 0.000 0.000 0.008
#> GSM750737     4  0.4970      0.500 0.252 0.000 0.000 0.640 0.004 0.104
#> GSM750740     5  0.4593      0.481 0.324 0.000 0.000 0.000 0.620 0.056
#> GSM750747     5  0.4593      0.481 0.324 0.000 0.000 0.000 0.620 0.056
#> GSM750751     2  0.0508      0.798 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM750754     3  0.2703      0.793 0.000 0.000 0.824 0.004 0.000 0.172

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-skmeans-membership-heatmap-5

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)

plot of chunk tab-SD-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-skmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-SD-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-skmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> SD:skmeans 103            0.023    1.72e-05               0.05361   0.0048 2
#> SD:skmeans  97            0.200    1.93e-04               0.00197   0.0178 3
#> SD:skmeans 100            0.484    1.97e-05               0.00159   0.0706 4
#> SD:skmeans  90            0.631    8.60e-04               0.00268   0.2660 5
#> SD:skmeans  81            0.589    1.17e-03               0.01123   0.0655 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.


SD:pam

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-pam-collect-plots

The plots are:

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:

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)

plot of chunk SD-pam-select-partition-number

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.734           0.859       0.937         0.4566 0.567   0.567
#> 3 3 0.601           0.770       0.879         0.4276 0.706   0.516
#> 4 4 0.629           0.684       0.813         0.1076 0.908   0.753
#> 5 5 0.863           0.830       0.913         0.0978 0.864   0.574
#> 6 6 0.821           0.724       0.865         0.0313 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] 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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      0.913 1.000 0.000
#> GSM549291     1  0.3879      0.860 0.924 0.076
#> GSM549274     1  0.9775      0.416 0.588 0.412
#> GSM750738     1  0.9795      0.407 0.584 0.416
#> GSM750748     1  0.0000      0.913 1.000 0.000
#> GSM549240     1  0.0000      0.913 1.000 0.000
#> GSM549279     1  0.8443      0.661 0.728 0.272
#> GSM549294     2  0.0672      0.966 0.008 0.992
#> GSM549300     2  0.0000      0.972 0.000 1.000
#> GSM549303     2  0.0000      0.972 0.000 1.000
#> GSM549309     2  0.0376      0.969 0.004 0.996
#> GSM750753     2  0.0000      0.972 0.000 1.000
#> GSM750752     1  0.9775      0.414 0.588 0.412
#> GSM549304     1  0.9795      0.407 0.584 0.416
#> GSM549305     2  0.0000      0.972 0.000 1.000
#> GSM549307     2  0.0000      0.972 0.000 1.000
#> GSM549306     2  0.0000      0.972 0.000 1.000
#> GSM549308     2  0.0000      0.972 0.000 1.000
#> GSM549233     1  0.0000      0.913 1.000 0.000
#> GSM549234     1  0.0000      0.913 1.000 0.000
#> GSM549250     1  0.0000      0.913 1.000 0.000
#> GSM549287     2  0.0672      0.966 0.008 0.992
#> GSM750735     1  0.0000      0.913 1.000 0.000
#> GSM750736     1  0.0000      0.913 1.000 0.000
#> GSM750749     1  0.0000      0.913 1.000 0.000
#> GSM549230     1  0.0000      0.913 1.000 0.000
#> GSM549231     1  0.0000      0.913 1.000 0.000
#> GSM549237     1  0.0000      0.913 1.000 0.000
#> GSM549254     1  0.1184      0.903 0.984 0.016
#> GSM750734     1  0.0000      0.913 1.000 0.000
#> GSM549271     2  0.0672      0.966 0.008 0.992
#> GSM549232     1  0.0000      0.913 1.000 0.000
#> GSM549246     1  0.0000      0.913 1.000 0.000
#> GSM549248     1  0.0000      0.913 1.000 0.000
#> GSM549255     1  0.0000      0.913 1.000 0.000
#> GSM750746     1  0.0000      0.913 1.000 0.000
#> GSM549259     1  0.0000      0.913 1.000 0.000
#> GSM549269     1  0.9754      0.425 0.592 0.408
#> GSM549273     2  0.0000      0.972 0.000 1.000
#> GSM549299     2  0.9710      0.195 0.400 0.600
#> GSM549301     2  0.0000      0.972 0.000 1.000
#> GSM549310     2  0.0000      0.972 0.000 1.000
#> GSM549311     2  0.0000      0.972 0.000 1.000
#> GSM549302     2  0.0000      0.972 0.000 1.000
#> GSM549235     1  0.0000      0.913 1.000 0.000
#> GSM549245     1  0.0000      0.913 1.000 0.000
#> GSM549265     1  0.0000      0.913 1.000 0.000
#> GSM549282     2  0.0938      0.963 0.012 0.988
#> GSM549296     1  0.9608      0.475 0.616 0.384
#> GSM750739     1  0.0000      0.913 1.000 0.000
#> GSM750742     1  0.0000      0.913 1.000 0.000
#> GSM750744     1  0.0000      0.913 1.000 0.000
#> GSM750750     2  0.0938      0.963 0.012 0.988
#> GSM549242     1  0.0000      0.913 1.000 0.000
#> GSM549252     1  0.0000      0.913 1.000 0.000
#> GSM549253     1  0.0000      0.913 1.000 0.000
#> GSM549256     1  0.0000      0.913 1.000 0.000
#> GSM549257     1  0.0000      0.913 1.000 0.000
#> GSM549263     1  0.0000      0.913 1.000 0.000
#> GSM549267     2  0.6343      0.795 0.160 0.840
#> GSM750745     1  0.0000      0.913 1.000 0.000
#> GSM549239     1  0.0000      0.913 1.000 0.000
#> GSM549244     1  0.0000      0.913 1.000 0.000
#> GSM549249     1  0.0000      0.913 1.000 0.000
#> GSM549260     1  0.0000      0.913 1.000 0.000
#> GSM549266     1  0.5946      0.803 0.856 0.144
#> GSM549293     1  0.9795      0.407 0.584 0.416
#> GSM549236     1  0.0000      0.913 1.000 0.000
#> GSM549238     1  0.0000      0.913 1.000 0.000
#> GSM549251     1  0.0000      0.913 1.000 0.000
#> GSM549258     1  0.0000      0.913 1.000 0.000
#> GSM549264     1  0.0000      0.913 1.000 0.000
#> GSM549243     1  0.0000      0.913 1.000 0.000
#> GSM549262     1  0.0000      0.913 1.000 0.000
#> GSM549278     1  0.0000      0.913 1.000 0.000
#> GSM549283     1  0.9323      0.542 0.652 0.348
#> GSM549298     2  0.0000      0.972 0.000 1.000
#> GSM750741     1  0.0000      0.913 1.000 0.000
#> GSM549286     2  0.0000      0.972 0.000 1.000
#> GSM549241     1  0.0000      0.913 1.000 0.000
#> GSM549247     1  0.0376      0.911 0.996 0.004
#> GSM549261     1  0.0000      0.913 1.000 0.000
#> GSM549270     2  0.0000      0.972 0.000 1.000
#> GSM549277     2  0.0000      0.972 0.000 1.000
#> GSM549280     2  0.0000      0.972 0.000 1.000
#> GSM549281     1  0.8081      0.693 0.752 0.248
#> GSM549285     1  0.8267      0.680 0.740 0.260
#> GSM549288     2  0.0000      0.972 0.000 1.000
#> GSM549292     2  0.6048      0.794 0.148 0.852
#> GSM549295     2  0.0000      0.972 0.000 1.000
#> GSM549297     2  0.0000      0.972 0.000 1.000
#> GSM750743     1  0.0000      0.913 1.000 0.000
#> GSM549268     1  0.8555      0.651 0.720 0.280
#> GSM549290     1  0.8443      0.635 0.728 0.272
#> GSM549272     2  0.0000      0.972 0.000 1.000
#> GSM549276     2  0.0000      0.972 0.000 1.000
#> GSM549275     1  0.5946      0.803 0.856 0.144
#> GSM549284     1  0.9909      0.334 0.556 0.444
#> GSM750737     1  0.0000      0.913 1.000 0.000
#> GSM750740     1  0.0000      0.913 1.000 0.000
#> GSM750747     1  0.0000      0.913 1.000 0.000
#> GSM750751     2  0.0000      0.972 0.000 1.000
#> GSM750754     1  0.9209      0.537 0.664 0.336

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.0000     0.8434 0.000 0.000 1.000
#> GSM549291     3  0.0000     0.8434 0.000 0.000 1.000
#> GSM549274     2  0.9947     0.0168 0.316 0.384 0.300
#> GSM750738     3  0.8427     0.5831 0.208 0.172 0.620
#> GSM750748     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549240     1  0.0592     0.8561 0.988 0.000 0.012
#> GSM549279     1  0.1411     0.8424 0.964 0.036 0.000
#> GSM549294     2  0.0424     0.8502 0.008 0.992 0.000
#> GSM549300     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549303     2  0.2878     0.8029 0.000 0.904 0.096
#> GSM549309     2  0.4750     0.6818 0.000 0.784 0.216
#> GSM750753     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM750752     3  0.4755     0.7784 0.184 0.008 0.808
#> GSM549304     2  0.9820     0.1270 0.312 0.424 0.264
#> GSM549305     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549307     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549306     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549308     2  0.1163     0.8443 0.000 0.972 0.028
#> GSM549233     1  0.5678     0.6906 0.684 0.000 0.316
#> GSM549234     3  0.3619     0.8272 0.136 0.000 0.864
#> GSM549250     1  0.4931     0.7847 0.768 0.000 0.232
#> GSM549287     2  0.5465     0.5781 0.000 0.712 0.288
#> GSM750735     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM750736     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM750749     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549230     1  0.4504     0.8099 0.804 0.000 0.196
#> GSM549231     1  0.4452     0.8121 0.808 0.000 0.192
#> GSM549237     1  0.4399     0.8144 0.812 0.000 0.188
#> GSM549254     3  0.4750     0.7801 0.216 0.000 0.784
#> GSM750734     1  0.1031     0.8595 0.976 0.000 0.024
#> GSM549271     3  0.2066     0.8123 0.000 0.060 0.940
#> GSM549232     3  0.2261     0.8456 0.068 0.000 0.932
#> GSM549246     1  0.6140     0.5286 0.596 0.000 0.404
#> GSM549248     1  0.4452     0.8121 0.808 0.000 0.192
#> GSM549255     3  0.4750     0.7801 0.216 0.000 0.784
#> GSM750746     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549259     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549269     2  0.7773     0.4871 0.316 0.612 0.072
#> GSM549273     2  0.1289     0.8427 0.000 0.968 0.032
#> GSM549299     2  0.5363     0.6134 0.276 0.724 0.000
#> GSM549301     2  0.1643     0.8367 0.000 0.956 0.044
#> GSM549310     3  0.4504     0.6628 0.000 0.196 0.804
#> GSM549311     2  0.4121     0.7385 0.000 0.832 0.168
#> GSM549302     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549235     1  0.4399     0.8135 0.812 0.000 0.188
#> GSM549245     3  0.3038     0.8385 0.104 0.000 0.896
#> GSM549265     3  0.0237     0.8439 0.004 0.000 0.996
#> GSM549282     2  0.5431     0.6120 0.000 0.716 0.284
#> GSM549296     3  0.4755     0.7784 0.184 0.008 0.808
#> GSM750739     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM750742     1  0.4452     0.8121 0.808 0.000 0.192
#> GSM750744     1  0.4062     0.8244 0.836 0.000 0.164
#> GSM750750     2  0.3192     0.7904 0.000 0.888 0.112
#> GSM549242     1  0.4654     0.8027 0.792 0.000 0.208
#> GSM549252     3  0.1163     0.8414 0.028 0.000 0.972
#> GSM549253     1  0.4702     0.7994 0.788 0.000 0.212
#> GSM549256     1  0.5497     0.7032 0.708 0.000 0.292
#> GSM549257     3  0.4750     0.7801 0.216 0.000 0.784
#> GSM549263     1  0.4654     0.8024 0.792 0.000 0.208
#> GSM549267     3  0.0000     0.8434 0.000 0.000 1.000
#> GSM750745     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549239     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549244     3  0.0000     0.8434 0.000 0.000 1.000
#> GSM549249     3  0.1163     0.8414 0.028 0.000 0.972
#> GSM549260     1  0.1753     0.8546 0.952 0.000 0.048
#> GSM549266     1  0.2878     0.7939 0.904 0.096 0.000
#> GSM549293     2  0.9882     0.0842 0.312 0.408 0.280
#> GSM549236     1  0.4796     0.7940 0.780 0.000 0.220
#> GSM549238     3  0.6252    -0.1182 0.444 0.000 0.556
#> GSM549251     1  0.4702     0.7994 0.788 0.000 0.212
#> GSM549258     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549264     1  0.4452     0.8121 0.808 0.000 0.192
#> GSM549243     1  0.0237     0.8605 0.996 0.000 0.004
#> GSM549262     1  0.4452     0.8121 0.808 0.000 0.192
#> GSM549278     3  0.1163     0.8463 0.028 0.000 0.972
#> GSM549283     1  0.5797     0.5287 0.712 0.280 0.008
#> GSM549298     2  0.1163     0.8443 0.000 0.972 0.028
#> GSM750741     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549286     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549241     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549247     1  0.4002     0.7055 0.840 0.000 0.160
#> GSM549261     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549270     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549277     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549280     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549281     1  0.1964     0.8283 0.944 0.056 0.000
#> GSM549285     1  0.7548     0.7236 0.684 0.112 0.204
#> GSM549288     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549292     2  0.7595     0.5829 0.136 0.688 0.176
#> GSM549295     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549297     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM750743     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM549268     1  0.3192     0.7823 0.888 0.112 0.000
#> GSM549290     3  0.0000     0.8434 0.000 0.000 1.000
#> GSM549272     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549276     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM549275     1  0.2625     0.8051 0.916 0.084 0.000
#> GSM549284     2  0.6769     0.5356 0.320 0.652 0.028
#> GSM750737     3  0.5291     0.7363 0.268 0.000 0.732
#> GSM750740     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM750747     1  0.0000     0.8604 1.000 0.000 0.000
#> GSM750751     2  0.0000     0.8537 0.000 1.000 0.000
#> GSM750754     3  0.0000     0.8434 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.4313    0.77334 0.260 0.000 0.004 0.736
#> GSM549291     4  0.5083    0.76596 0.248 0.000 0.036 0.716
#> GSM549274     2  0.0000    0.79657 0.000 1.000 0.000 0.000
#> GSM750738     2  0.3975    0.64670 0.000 0.760 0.000 0.240
#> GSM750748     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549240     1  0.6936    0.72597 0.548 0.132 0.000 0.320
#> GSM549279     1  0.6680    0.75347 0.604 0.136 0.000 0.260
#> GSM549294     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549300     3  0.3873    0.57335 0.000 0.228 0.772 0.000
#> GSM549303     3  0.0000    0.84231 0.000 0.000 1.000 0.000
#> GSM549309     3  0.0000    0.84231 0.000 0.000 1.000 0.000
#> GSM750753     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM750752     4  0.5491    0.56721 0.000 0.260 0.052 0.688
#> GSM549304     2  0.0336    0.80427 0.000 0.992 0.008 0.000
#> GSM549305     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549307     3  0.4776    0.19340 0.000 0.376 0.624 0.000
#> GSM549306     3  0.1389    0.80288 0.000 0.048 0.952 0.000
#> GSM549308     3  0.0000    0.84231 0.000 0.000 1.000 0.000
#> GSM549233     1  0.3726    0.31263 0.788 0.000 0.000 0.212
#> GSM549234     4  0.2973    0.75792 0.144 0.000 0.000 0.856
#> GSM549250     1  0.2469    0.51868 0.892 0.000 0.000 0.108
#> GSM549287     3  0.3501    0.71217 0.132 0.000 0.848 0.020
#> GSM750735     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM750736     1  0.6708    0.75160 0.596 0.132 0.000 0.272
#> GSM750749     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549230     1  0.0592    0.61334 0.984 0.000 0.000 0.016
#> GSM549231     1  0.0336    0.61828 0.992 0.000 0.000 0.008
#> GSM549237     1  0.0927    0.62402 0.976 0.008 0.000 0.016
#> GSM549254     4  0.0336    0.65422 0.008 0.000 0.000 0.992
#> GSM750734     1  0.6308    0.74495 0.648 0.120 0.000 0.232
#> GSM549271     4  0.7344    0.57426 0.168 0.012 0.248 0.572
#> GSM549232     4  0.3688    0.77760 0.208 0.000 0.000 0.792
#> GSM549246     1  0.4323    0.38338 0.776 0.020 0.000 0.204
#> GSM549248     1  0.0469    0.61596 0.988 0.000 0.000 0.012
#> GSM549255     4  0.0000    0.65437 0.000 0.000 0.000 1.000
#> GSM750746     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549259     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549269     2  0.0000    0.79657 0.000 1.000 0.000 0.000
#> GSM549273     3  0.0000    0.84231 0.000 0.000 1.000 0.000
#> GSM549299     2  0.1118    0.82202 0.000 0.964 0.036 0.000
#> GSM549301     3  0.0000    0.84231 0.000 0.000 1.000 0.000
#> GSM549310     4  0.6100    0.52533 0.000 0.272 0.084 0.644
#> GSM549311     3  0.0000    0.84231 0.000 0.000 1.000 0.000
#> GSM549302     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549235     1  0.0707    0.63196 0.980 0.000 0.000 0.020
#> GSM549245     4  0.3123    0.76380 0.156 0.000 0.000 0.844
#> GSM549265     4  0.4222    0.76882 0.272 0.000 0.000 0.728
#> GSM549282     3  0.4134    0.56975 0.260 0.000 0.740 0.000
#> GSM549296     4  0.5144    0.60784 0.000 0.216 0.052 0.732
#> GSM750739     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM750742     1  0.0336    0.61828 0.992 0.000 0.000 0.008
#> GSM750744     1  0.3687    0.67745 0.856 0.080 0.000 0.064
#> GSM750750     3  0.0000    0.84231 0.000 0.000 1.000 0.000
#> GSM549242     1  0.2412    0.56820 0.908 0.008 0.000 0.084
#> GSM549252     4  0.4134    0.77330 0.260 0.000 0.000 0.740
#> GSM549253     1  0.2011    0.55746 0.920 0.000 0.000 0.080
#> GSM549256     1  0.4290    0.47483 0.772 0.016 0.000 0.212
#> GSM549257     4  0.0469    0.66362 0.012 0.000 0.000 0.988
#> GSM549263     1  0.0921    0.60564 0.972 0.000 0.000 0.028
#> GSM549267     4  0.6532    0.66937 0.368 0.000 0.084 0.548
#> GSM750745     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549239     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549244     4  0.4134    0.77330 0.260 0.000 0.000 0.740
#> GSM549249     4  0.4830    0.68195 0.392 0.000 0.000 0.608
#> GSM549260     1  0.6783    0.71817 0.572 0.124 0.000 0.304
#> GSM549266     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549293     2  0.0524    0.80593 0.000 0.988 0.008 0.004
#> GSM549236     1  0.1792    0.57075 0.932 0.000 0.000 0.068
#> GSM549238     1  0.4746   -0.22191 0.632 0.000 0.000 0.368
#> GSM549251     1  0.1389    0.59089 0.952 0.000 0.000 0.048
#> GSM549258     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549264     1  0.0336    0.61908 0.992 0.000 0.000 0.008
#> GSM549243     1  0.6442    0.75347 0.632 0.124 0.000 0.244
#> GSM549262     1  0.0336    0.61828 0.992 0.000 0.000 0.008
#> GSM549278     4  0.4188    0.77750 0.244 0.000 0.004 0.752
#> GSM549283     2  0.7149   -0.00892 0.184 0.552 0.000 0.264
#> GSM549298     3  0.0188    0.83997 0.000 0.004 0.996 0.000
#> GSM750741     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549286     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549241     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549247     1  0.7113    0.66676 0.484 0.132 0.000 0.384
#> GSM549261     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549270     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549277     2  0.4643    0.60977 0.000 0.656 0.344 0.000
#> GSM549280     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549281     1  0.6680    0.75322 0.604 0.136 0.000 0.260
#> GSM549285     1  0.4605    0.13302 0.664 0.000 0.336 0.000
#> GSM549288     2  0.3123    0.84475 0.000 0.844 0.156 0.000
#> GSM549292     2  0.3453    0.81594 0.000 0.868 0.052 0.080
#> GSM549295     2  0.4193    0.73234 0.000 0.732 0.268 0.000
#> GSM549297     2  0.4008    0.76102 0.000 0.756 0.244 0.000
#> GSM750743     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549268     1  0.7081    0.72183 0.588 0.188 0.004 0.220
#> GSM549290     4  0.6489    0.66909 0.372 0.000 0.080 0.548
#> GSM549272     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549276     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM549275     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM549284     2  0.0469    0.80738 0.000 0.988 0.012 0.000
#> GSM750737     4  0.2124    0.57780 0.008 0.068 0.000 0.924
#> GSM750740     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM750747     1  0.6637    0.75546 0.608 0.132 0.000 0.260
#> GSM750751     2  0.2814    0.85977 0.000 0.868 0.132 0.000
#> GSM750754     3  0.7884   -0.26238 0.308 0.000 0.384 0.308

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.0609     0.9272 0.000 0.000 0.000 0.980 0.020
#> GSM549291     4  0.0404     0.9248 0.000 0.000 0.000 0.988 0.012
#> GSM549274     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM750738     2  0.4273     0.1738 0.000 0.552 0.000 0.448 0.000
#> GSM750748     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.1364     0.9172 0.952 0.000 0.000 0.036 0.012
#> GSM549279     1  0.0404     0.9511 0.988 0.000 0.000 0.000 0.012
#> GSM549294     2  0.0162     0.9362 0.000 0.996 0.000 0.000 0.004
#> GSM549300     3  0.4283     0.3734 0.000 0.348 0.644 0.000 0.008
#> GSM549303     3  0.0807     0.8650 0.000 0.000 0.976 0.012 0.012
#> GSM549309     3  0.1522     0.8560 0.000 0.000 0.944 0.012 0.044
#> GSM750753     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM750752     4  0.1243     0.9024 0.000 0.008 0.004 0.960 0.028
#> GSM549304     2  0.0162     0.9362 0.000 0.996 0.000 0.000 0.004
#> GSM549305     2  0.0324     0.9353 0.000 0.992 0.004 0.000 0.004
#> GSM549307     2  0.4555     0.1119 0.000 0.520 0.472 0.000 0.008
#> GSM549306     3  0.0579     0.8617 0.000 0.008 0.984 0.000 0.008
#> GSM549308     3  0.0000     0.8662 0.000 0.000 1.000 0.000 0.000
#> GSM549233     5  0.1956     0.8200 0.008 0.000 0.000 0.076 0.916
#> GSM549234     4  0.0609     0.9264 0.000 0.000 0.000 0.980 0.020
#> GSM549250     5  0.1697     0.8242 0.008 0.000 0.000 0.060 0.932
#> GSM549287     3  0.3278     0.7741 0.000 0.000 0.824 0.020 0.156
#> GSM750735     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM750736     1  0.0162     0.9540 0.996 0.000 0.000 0.004 0.000
#> GSM750749     1  0.0290     0.9523 0.992 0.000 0.000 0.000 0.008
#> GSM549230     5  0.1732     0.8372 0.080 0.000 0.000 0.000 0.920
#> GSM549231     5  0.1732     0.8372 0.080 0.000 0.000 0.000 0.920
#> GSM549237     5  0.2536     0.8202 0.128 0.000 0.000 0.004 0.868
#> GSM549254     4  0.0404     0.9298 0.000 0.000 0.000 0.988 0.012
#> GSM750734     1  0.3210     0.6984 0.788 0.000 0.000 0.000 0.212
#> GSM549271     4  0.2661     0.8481 0.000 0.000 0.056 0.888 0.056
#> GSM549232     4  0.0404     0.9298 0.000 0.000 0.000 0.988 0.012
#> GSM549246     5  0.2989     0.8238 0.060 0.000 0.000 0.072 0.868
#> GSM549248     5  0.2127     0.8297 0.108 0.000 0.000 0.000 0.892
#> GSM549255     4  0.0404     0.9298 0.000 0.000 0.000 0.988 0.012
#> GSM750746     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549269     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM549273     3  0.0693     0.8657 0.000 0.000 0.980 0.012 0.008
#> GSM549299     2  0.0693     0.9307 0.000 0.980 0.012 0.000 0.008
#> GSM549301     3  0.0162     0.8655 0.000 0.000 0.996 0.000 0.004
#> GSM549310     4  0.2381     0.8657 0.000 0.004 0.036 0.908 0.052
#> GSM549311     3  0.1597     0.8544 0.000 0.000 0.940 0.012 0.048
#> GSM549302     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM549235     5  0.4192     0.4656 0.404 0.000 0.000 0.000 0.596
#> GSM549245     4  0.0404     0.9298 0.000 0.000 0.000 0.988 0.012
#> GSM549265     4  0.3932     0.4679 0.000 0.000 0.000 0.672 0.328
#> GSM549282     3  0.4166     0.4606 0.000 0.000 0.648 0.004 0.348
#> GSM549296     4  0.0566     0.9179 0.000 0.000 0.004 0.984 0.012
#> GSM750739     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM750742     5  0.1732     0.8372 0.080 0.000 0.000 0.000 0.920
#> GSM750744     5  0.4150     0.4554 0.388 0.000 0.000 0.000 0.612
#> GSM750750     3  0.0162     0.8664 0.000 0.000 0.996 0.000 0.004
#> GSM549242     5  0.3269     0.8154 0.096 0.000 0.000 0.056 0.848
#> GSM549252     4  0.1197     0.9069 0.000 0.000 0.000 0.952 0.048
#> GSM549253     5  0.1740     0.8263 0.012 0.000 0.000 0.056 0.932
#> GSM549256     5  0.3226     0.8104 0.088 0.000 0.000 0.060 0.852
#> GSM549257     4  0.0404     0.9298 0.000 0.000 0.000 0.988 0.012
#> GSM549263     5  0.1704     0.8394 0.068 0.000 0.000 0.004 0.928
#> GSM549267     5  0.5039     0.0657 0.000 0.000 0.032 0.456 0.512
#> GSM750745     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.0404     0.9298 0.000 0.000 0.000 0.988 0.012
#> GSM549249     5  0.2280     0.7962 0.000 0.000 0.000 0.120 0.880
#> GSM549260     1  0.2922     0.8517 0.872 0.000 0.000 0.056 0.072
#> GSM549266     1  0.0404     0.9511 0.988 0.000 0.000 0.000 0.012
#> GSM549293     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM549236     5  0.1830     0.8375 0.040 0.000 0.000 0.028 0.932
#> GSM549238     5  0.1697     0.8242 0.008 0.000 0.000 0.060 0.932
#> GSM549251     5  0.1740     0.8400 0.056 0.000 0.000 0.012 0.932
#> GSM549258     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549264     5  0.2763     0.8041 0.148 0.000 0.000 0.004 0.848
#> GSM549243     1  0.0609     0.9417 0.980 0.000 0.000 0.000 0.020
#> GSM549262     5  0.1851     0.8365 0.088 0.000 0.000 0.000 0.912
#> GSM549278     4  0.0404     0.9298 0.000 0.000 0.000 0.988 0.012
#> GSM549283     1  0.4462     0.5324 0.672 0.308 0.000 0.004 0.016
#> GSM549298     3  0.0451     0.8635 0.000 0.004 0.988 0.000 0.008
#> GSM750741     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549286     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM549241     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.2006     0.8835 0.916 0.000 0.000 0.072 0.012
#> GSM549261     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM549270     2  0.0162     0.9361 0.000 0.996 0.000 0.000 0.004
#> GSM549277     2  0.2929     0.7919 0.000 0.840 0.152 0.000 0.008
#> GSM549280     2  0.0693     0.9307 0.000 0.980 0.012 0.000 0.008
#> GSM549281     1  0.0404     0.9507 0.988 0.000 0.000 0.000 0.012
#> GSM549285     5  0.4622     0.5262 0.040 0.000 0.276 0.000 0.684
#> GSM549288     2  0.1041     0.9196 0.000 0.964 0.032 0.000 0.004
#> GSM549292     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM549295     2  0.1502     0.8998 0.000 0.940 0.056 0.000 0.004
#> GSM549297     2  0.1331     0.9119 0.000 0.952 0.040 0.000 0.008
#> GSM750743     1  0.0162     0.9538 0.996 0.000 0.000 0.000 0.004
#> GSM549268     1  0.2777     0.8310 0.864 0.120 0.000 0.000 0.016
#> GSM549290     5  0.4817     0.2504 0.000 0.000 0.024 0.404 0.572
#> GSM549272     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM549276     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM549275     1  0.0162     0.9545 0.996 0.000 0.000 0.000 0.004
#> GSM549284     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM750737     4  0.3967     0.6104 0.264 0.000 0.000 0.724 0.012
#> GSM750740     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9559 1.000 0.000 0.000 0.000 0.000
#> GSM750751     2  0.0000     0.9373 0.000 1.000 0.000 0.000 0.000
#> GSM750754     3  0.5731     0.1820 0.000 0.000 0.480 0.084 0.436

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.0779     0.9064 0.000 0.000 0.008 0.976 0.008 0.008
#> GSM549291     4  0.0820     0.9030 0.000 0.000 0.016 0.972 0.000 0.012
#> GSM549274     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750738     2  0.3221     0.4682 0.000 0.736 0.000 0.264 0.000 0.000
#> GSM750748     1  0.0260     0.9300 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549240     1  0.0870     0.9239 0.972 0.000 0.000 0.012 0.012 0.004
#> GSM549279     1  0.1802     0.8925 0.916 0.000 0.000 0.000 0.012 0.072
#> GSM549294     2  0.3769     0.5100 0.004 0.640 0.000 0.000 0.000 0.356
#> GSM549300     6  0.2679     0.3248 0.000 0.040 0.096 0.000 0.000 0.864
#> GSM549303     3  0.2092     0.6721 0.000 0.000 0.876 0.000 0.000 0.124
#> GSM549309     3  0.0547     0.6666 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM750753     2  0.1556     0.7640 0.000 0.920 0.000 0.000 0.000 0.080
#> GSM750752     4  0.0547     0.9033 0.000 0.000 0.020 0.980 0.000 0.000
#> GSM549304     2  0.1863     0.7490 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM549305     2  0.3330     0.6045 0.000 0.716 0.000 0.000 0.000 0.284
#> GSM549307     6  0.3819     0.4907 0.000 0.172 0.064 0.000 0.000 0.764
#> GSM549306     6  0.3868    -0.5572 0.000 0.000 0.496 0.000 0.000 0.504
#> GSM549308     3  0.3782     0.5460 0.000 0.000 0.588 0.000 0.000 0.412
#> GSM549233     5  0.1588     0.8228 0.004 0.000 0.000 0.072 0.924 0.000
#> GSM549234     4  0.0260     0.9093 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM549250     5  0.0508     0.8437 0.004 0.000 0.000 0.012 0.984 0.000
#> GSM549287     3  0.0291     0.6598 0.000 0.000 0.992 0.004 0.000 0.004
#> GSM750735     1  0.0146     0.9298 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM750736     1  0.0260     0.9291 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM750749     1  0.2312     0.8669 0.876 0.000 0.000 0.000 0.012 0.112
#> GSM549230     5  0.0458     0.8444 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM549231     5  0.0458     0.8444 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM549237     5  0.1444     0.8278 0.072 0.000 0.000 0.000 0.928 0.000
#> GSM549254     4  0.0000     0.9121 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM750734     1  0.2941     0.7103 0.780 0.000 0.000 0.000 0.220 0.000
#> GSM549271     4  0.3969     0.5731 0.000 0.000 0.312 0.668 0.000 0.020
#> GSM549232     4  0.0000     0.9121 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549246     5  0.2265     0.8234 0.052 0.000 0.000 0.052 0.896 0.000
#> GSM549248     5  0.1007     0.8400 0.044 0.000 0.000 0.000 0.956 0.000
#> GSM549255     4  0.0000     0.9121 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM750746     1  0.0260     0.9300 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549259     1  0.0260     0.9300 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549269     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549273     3  0.2697     0.6557 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM549299     2  0.2823     0.6867 0.000 0.796 0.000 0.000 0.000 0.204
#> GSM549301     3  0.3828     0.5093 0.000 0.000 0.560 0.000 0.000 0.440
#> GSM549310     4  0.2730     0.7519 0.000 0.000 0.192 0.808 0.000 0.000
#> GSM549311     3  0.0260     0.6664 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM549302     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549235     5  0.3737     0.4347 0.392 0.000 0.000 0.000 0.608 0.000
#> GSM549245     4  0.0000     0.9121 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549265     4  0.3468     0.5603 0.000 0.000 0.004 0.712 0.284 0.000
#> GSM549282     3  0.5878     0.2877 0.000 0.000 0.468 0.000 0.308 0.224
#> GSM549296     4  0.0363     0.9076 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM750739     1  0.0146     0.9298 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM750742     5  0.0458     0.8444 0.016 0.000 0.000 0.000 0.984 0.000
#> GSM750744     5  0.3672     0.4350 0.368 0.000 0.000 0.000 0.632 0.000
#> GSM750750     3  0.3774     0.5509 0.000 0.000 0.592 0.000 0.000 0.408
#> GSM549242     5  0.2752     0.7931 0.108 0.000 0.000 0.036 0.856 0.000
#> GSM549252     4  0.0790     0.8928 0.000 0.000 0.000 0.968 0.032 0.000
#> GSM549253     5  0.0508     0.8437 0.004 0.000 0.000 0.012 0.984 0.000
#> GSM549256     5  0.2404     0.8070 0.080 0.000 0.000 0.036 0.884 0.000
#> GSM549257     4  0.0000     0.9121 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549263     5  0.0508     0.8447 0.012 0.000 0.000 0.004 0.984 0.000
#> GSM549267     5  0.6288     0.0771 0.000 0.000 0.360 0.232 0.396 0.012
#> GSM750745     1  0.0146     0.9298 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549239     1  0.0146     0.9298 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549244     4  0.0000     0.9121 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549249     5  0.2178     0.7775 0.000 0.000 0.000 0.132 0.868 0.000
#> GSM549260     1  0.2350     0.8609 0.888 0.000 0.000 0.036 0.076 0.000
#> GSM549266     1  0.3200     0.7910 0.788 0.000 0.000 0.000 0.016 0.196
#> GSM549293     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549236     5  0.0508     0.8437 0.004 0.000 0.000 0.012 0.984 0.000
#> GSM549238     5  0.1010     0.8368 0.004 0.000 0.000 0.036 0.960 0.000
#> GSM549251     5  0.0520     0.8444 0.008 0.000 0.000 0.008 0.984 0.000
#> GSM549258     1  0.0146     0.9298 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549264     5  0.1610     0.8182 0.084 0.000 0.000 0.000 0.916 0.000
#> GSM549243     1  0.0713     0.9207 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM549262     5  0.0632     0.8447 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM549278     4  0.0000     0.9121 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549283     1  0.5151     0.5540 0.648 0.152 0.000 0.000 0.008 0.192
#> GSM549298     3  0.3838     0.4962 0.000 0.000 0.552 0.000 0.000 0.448
#> GSM750741     1  0.0260     0.9300 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549286     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549241     1  0.0146     0.9298 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549247     1  0.1296     0.9138 0.952 0.000 0.000 0.032 0.012 0.004
#> GSM549261     1  0.0260     0.9300 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549270     2  0.2912     0.6542 0.000 0.784 0.000 0.000 0.000 0.216
#> GSM549277     6  0.3584     0.2634 0.000 0.308 0.000 0.000 0.004 0.688
#> GSM549280     2  0.3684     0.5024 0.000 0.664 0.000 0.000 0.004 0.332
#> GSM549281     1  0.2730     0.8364 0.836 0.000 0.000 0.000 0.012 0.152
#> GSM549285     5  0.4600     0.5210 0.012 0.000 0.040 0.000 0.648 0.300
#> GSM549288     2  0.3993     0.3291 0.000 0.592 0.008 0.000 0.000 0.400
#> GSM549292     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     2  0.3872     0.3508 0.000 0.604 0.004 0.000 0.000 0.392
#> GSM549297     6  0.3843    -0.2058 0.000 0.452 0.000 0.000 0.000 0.548
#> GSM750743     1  0.0713     0.9194 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM549268     1  0.4797     0.5912 0.648 0.060 0.000 0.000 0.012 0.280
#> GSM549290     5  0.6152     0.1932 0.000 0.000 0.332 0.204 0.452 0.012
#> GSM549272     2  0.1863     0.7543 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM549276     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549275     1  0.1588     0.8911 0.924 0.000 0.000 0.000 0.004 0.072
#> GSM549284     2  0.0000     0.7954 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750737     4  0.3244     0.5726 0.268 0.000 0.000 0.732 0.000 0.000
#> GSM750740     1  0.0260     0.9300 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM750747     1  0.0260     0.9300 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM750751     2  0.2562     0.6900 0.000 0.828 0.000 0.000 0.000 0.172
#> GSM750754     3  0.3260     0.5443 0.000 0.000 0.824 0.028 0.136 0.012

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-pam-membership-heatmap-5

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)

plot of chunk tab-SD-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-pam-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-SD-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-pam-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> SD:pam 94           0.0941    4.49e-05              0.169035   0.0358 2
#> SD:pam 98           0.2861    4.54e-05              0.210210   0.0334 3
#> SD:pam 95           0.3397    1.48e-04              0.000574   0.1756 4
#> SD:pam 93           0.3555    2.84e-05              0.003565   0.0182 5
#> SD:pam 89           0.3101    8.17e-06              0.012730   0.0402 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.


SD:mclust*

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-mclust-collect-plots

The plots are:

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:

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)

plot of chunk SD-mclust-select-partition-number

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.917           0.968       0.979         0.5030 0.495   0.495
#> 3 3 0.855           0.812       0.929         0.2683 0.816   0.645
#> 4 4 0.791           0.849       0.922         0.1176 0.881   0.689
#> 5 5 0.698           0.572       0.778         0.0831 0.939   0.805
#> 6 6 0.722           0.546       0.727         0.0588 0.832   0.456

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     2  0.6148      0.860 0.152 0.848
#> GSM549291     2  0.2236      0.960 0.036 0.964
#> GSM549274     2  0.0000      0.973 0.000 1.000
#> GSM750738     2  0.2423      0.957 0.040 0.960
#> GSM750748     1  0.1184      0.987 0.984 0.016
#> GSM549240     1  0.1184      0.987 0.984 0.016
#> GSM549279     2  0.4690      0.902 0.100 0.900
#> GSM549294     2  0.0000      0.973 0.000 1.000
#> GSM549300     2  0.0000      0.973 0.000 1.000
#> GSM549303     2  0.1184      0.967 0.016 0.984
#> GSM549309     2  0.1184      0.967 0.016 0.984
#> GSM750753     2  0.0000      0.973 0.000 1.000
#> GSM750752     2  0.5178      0.899 0.116 0.884
#> GSM549304     2  0.0000      0.973 0.000 1.000
#> GSM549305     2  0.0000      0.973 0.000 1.000
#> GSM549307     2  0.0000      0.973 0.000 1.000
#> GSM549306     2  0.0000      0.973 0.000 1.000
#> GSM549308     2  0.0000      0.973 0.000 1.000
#> GSM549233     1  0.0000      0.985 1.000 0.000
#> GSM549234     1  0.0000      0.985 1.000 0.000
#> GSM549250     1  0.0000      0.985 1.000 0.000
#> GSM549287     2  0.1184      0.967 0.016 0.984
#> GSM750735     1  0.1184      0.987 0.984 0.016
#> GSM750736     1  0.1184      0.987 0.984 0.016
#> GSM750749     2  0.6712      0.813 0.176 0.824
#> GSM549230     1  0.0000      0.985 1.000 0.000
#> GSM549231     1  0.0938      0.987 0.988 0.012
#> GSM549237     1  0.1184      0.987 0.984 0.016
#> GSM549254     1  0.5946      0.826 0.856 0.144
#> GSM750734     1  0.1184      0.987 0.984 0.016
#> GSM549271     2  0.1184      0.967 0.016 0.984
#> GSM549232     1  0.0000      0.985 1.000 0.000
#> GSM549246     1  0.0672      0.982 0.992 0.008
#> GSM549248     1  0.1184      0.987 0.984 0.016
#> GSM549255     1  0.0000      0.985 1.000 0.000
#> GSM750746     1  0.1184      0.987 0.984 0.016
#> GSM549259     1  0.1184      0.987 0.984 0.016
#> GSM549269     2  0.0000      0.973 0.000 1.000
#> GSM549273     2  0.1184      0.967 0.016 0.984
#> GSM549299     2  0.0000      0.973 0.000 1.000
#> GSM549301     2  0.0000      0.973 0.000 1.000
#> GSM549310     2  0.4161      0.927 0.084 0.916
#> GSM549311     2  0.1184      0.967 0.016 0.984
#> GSM549302     2  0.0000      0.973 0.000 1.000
#> GSM549235     1  0.1184      0.987 0.984 0.016
#> GSM549245     1  0.0376      0.984 0.996 0.004
#> GSM549265     1  0.4815      0.880 0.896 0.104
#> GSM549282     2  0.0000      0.973 0.000 1.000
#> GSM549296     2  0.5178      0.899 0.116 0.884
#> GSM750739     1  0.1184      0.987 0.984 0.016
#> GSM750742     1  0.1184      0.987 0.984 0.016
#> GSM750744     1  0.1184      0.987 0.984 0.016
#> GSM750750     2  0.0000      0.973 0.000 1.000
#> GSM549242     1  0.0000      0.985 1.000 0.000
#> GSM549252     1  0.0000      0.985 1.000 0.000
#> GSM549253     1  0.0000      0.985 1.000 0.000
#> GSM549256     1  0.0000      0.985 1.000 0.000
#> GSM549257     1  0.0000      0.985 1.000 0.000
#> GSM549263     1  0.0000      0.985 1.000 0.000
#> GSM549267     2  0.1184      0.967 0.016 0.984
#> GSM750745     1  0.1184      0.987 0.984 0.016
#> GSM549239     1  0.1184      0.987 0.984 0.016
#> GSM549244     1  0.0000      0.985 1.000 0.000
#> GSM549249     1  0.0000      0.985 1.000 0.000
#> GSM549260     1  0.0000      0.985 1.000 0.000
#> GSM549266     2  0.4690      0.902 0.100 0.900
#> GSM549293     2  0.0000      0.973 0.000 1.000
#> GSM549236     1  0.0000      0.985 1.000 0.000
#> GSM549238     1  0.0000      0.985 1.000 0.000
#> GSM549251     1  0.0000      0.985 1.000 0.000
#> GSM549258     1  0.1184      0.987 0.984 0.016
#> GSM549264     1  0.1184      0.987 0.984 0.016
#> GSM549243     1  0.1184      0.987 0.984 0.016
#> GSM549262     1  0.1184      0.987 0.984 0.016
#> GSM549278     2  0.6623      0.835 0.172 0.828
#> GSM549283     2  0.0000      0.973 0.000 1.000
#> GSM549298     2  0.0000      0.973 0.000 1.000
#> GSM750741     1  0.1184      0.987 0.984 0.016
#> GSM549286     2  0.0000      0.973 0.000 1.000
#> GSM549241     1  0.1184      0.987 0.984 0.016
#> GSM549247     1  0.1184      0.987 0.984 0.016
#> GSM549261     1  0.1184      0.987 0.984 0.016
#> GSM549270     2  0.0000      0.973 0.000 1.000
#> GSM549277     2  0.0000      0.973 0.000 1.000
#> GSM549280     2  0.0000      0.973 0.000 1.000
#> GSM549281     2  0.4562      0.906 0.096 0.904
#> GSM549285     2  0.0000      0.973 0.000 1.000
#> GSM549288     2  0.0000      0.973 0.000 1.000
#> GSM549292     2  0.0000      0.973 0.000 1.000
#> GSM549295     2  0.0000      0.973 0.000 1.000
#> GSM549297     2  0.0000      0.973 0.000 1.000
#> GSM750743     1  0.1184      0.987 0.984 0.016
#> GSM549268     2  0.3879      0.923 0.076 0.924
#> GSM549290     2  0.1184      0.967 0.016 0.984
#> GSM549272     2  0.0000      0.973 0.000 1.000
#> GSM549276     2  0.0000      0.973 0.000 1.000
#> GSM549275     1  0.2236      0.972 0.964 0.036
#> GSM549284     2  0.0000      0.973 0.000 1.000
#> GSM750737     1  0.0000      0.985 1.000 0.000
#> GSM750740     1  0.1184      0.987 0.984 0.016
#> GSM750747     1  0.1184      0.987 0.984 0.016
#> GSM750751     2  0.0000      0.973 0.000 1.000
#> GSM750754     2  0.1184      0.967 0.016 0.984

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM549291     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM549274     2  0.0892     0.9749 0.020 0.980 0.000
#> GSM750738     1  0.4609     0.8037 0.856 0.052 0.092
#> GSM750748     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549240     1  0.0237     0.9050 0.996 0.000 0.004
#> GSM549279     2  0.1031     0.9722 0.024 0.976 0.000
#> GSM549294     2  0.0237     0.9833 0.004 0.996 0.000
#> GSM549300     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549303     3  0.0892     0.8091 0.000 0.020 0.980
#> GSM549309     3  0.0892     0.8091 0.000 0.020 0.980
#> GSM750753     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM750752     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM549304     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549305     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549307     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549306     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549308     2  0.0747     0.9737 0.000 0.984 0.016
#> GSM549233     1  0.3551     0.8121 0.868 0.000 0.132
#> GSM549234     3  0.6309    -0.0369 0.500 0.000 0.500
#> GSM549250     1  0.1643     0.8895 0.956 0.000 0.044
#> GSM549287     3  0.0592     0.8117 0.000 0.012 0.988
#> GSM750735     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM750736     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM750749     2  0.3551     0.8418 0.132 0.868 0.000
#> GSM549230     1  0.1529     0.8919 0.960 0.000 0.040
#> GSM549231     1  0.1031     0.8979 0.976 0.000 0.024
#> GSM549237     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549254     1  0.6008     0.3881 0.628 0.000 0.372
#> GSM750734     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549271     3  0.0892     0.8091 0.000 0.020 0.980
#> GSM549232     3  0.6305     0.0266 0.484 0.000 0.516
#> GSM549246     1  0.5859     0.4501 0.656 0.000 0.344
#> GSM549248     1  0.0424     0.9036 0.992 0.000 0.008
#> GSM549255     1  0.6309    -0.0312 0.500 0.000 0.500
#> GSM750746     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549259     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549269     2  0.0892     0.9749 0.020 0.980 0.000
#> GSM549273     3  0.6274     0.0480 0.000 0.456 0.544
#> GSM549299     2  0.0592     0.9795 0.012 0.988 0.000
#> GSM549301     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549310     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM549311     3  0.0892     0.8091 0.000 0.020 0.980
#> GSM549302     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549235     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549245     3  0.6305     0.0266 0.484 0.000 0.516
#> GSM549265     3  0.6235     0.1726 0.436 0.000 0.564
#> GSM549282     3  0.4605     0.6070 0.000 0.204 0.796
#> GSM549296     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM750739     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM750742     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM750744     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM750750     2  0.3340     0.8633 0.000 0.880 0.120
#> GSM549242     1  0.1643     0.8895 0.956 0.000 0.044
#> GSM549252     1  0.6309    -0.0312 0.500 0.000 0.500
#> GSM549253     1  0.1529     0.8919 0.960 0.000 0.040
#> GSM549256     1  0.2261     0.8730 0.932 0.000 0.068
#> GSM549257     1  0.6309    -0.0151 0.504 0.000 0.496
#> GSM549263     1  0.1529     0.8919 0.960 0.000 0.040
#> GSM549267     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM750745     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549239     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549244     3  0.6305     0.0265 0.484 0.000 0.516
#> GSM549249     1  0.6309    -0.0151 0.504 0.000 0.496
#> GSM549260     1  0.1289     0.8956 0.968 0.000 0.032
#> GSM549266     2  0.1031     0.9722 0.024 0.976 0.000
#> GSM549293     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549236     1  0.1529     0.8919 0.960 0.000 0.040
#> GSM549238     1  0.4121     0.7672 0.832 0.000 0.168
#> GSM549251     1  0.1529     0.8919 0.960 0.000 0.040
#> GSM549258     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549264     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549243     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549262     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549278     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM549283     2  0.0892     0.9749 0.020 0.980 0.000
#> GSM549298     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM750741     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549286     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549241     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549247     1  0.0237     0.9050 0.996 0.000 0.004
#> GSM549261     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549270     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549277     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549280     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549281     2  0.1031     0.9722 0.024 0.976 0.000
#> GSM549285     2  0.0892     0.9749 0.020 0.980 0.000
#> GSM549288     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549292     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549295     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549297     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM750743     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM549268     2  0.1031     0.9722 0.024 0.976 0.000
#> GSM549290     3  0.0000     0.8143 0.000 0.000 1.000
#> GSM549272     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549276     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM549275     1  0.0424     0.9005 0.992 0.008 0.000
#> GSM549284     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM750737     1  0.3038     0.8398 0.896 0.000 0.104
#> GSM750740     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM750747     1  0.0000     0.9058 1.000 0.000 0.000
#> GSM750751     2  0.0000     0.9850 0.000 1.000 0.000
#> GSM750754     3  0.0000     0.8143 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.0000      0.863 0.000 0.000 0.000 1.000
#> GSM549291     4  0.0469      0.859 0.000 0.000 0.012 0.988
#> GSM549274     2  0.0592      0.945 0.000 0.984 0.016 0.000
#> GSM750738     1  0.6847      0.535 0.644 0.244 0.048 0.064
#> GSM750748     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549240     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549279     2  0.2489      0.897 0.068 0.912 0.020 0.000
#> GSM549294     2  0.0469      0.946 0.000 0.988 0.012 0.000
#> GSM549300     3  0.4679      0.469 0.000 0.352 0.648 0.000
#> GSM549303     3  0.4277      0.606 0.000 0.000 0.720 0.280
#> GSM549309     3  0.4406      0.575 0.000 0.000 0.700 0.300
#> GSM750753     2  0.0000      0.946 0.000 1.000 0.000 0.000
#> GSM750752     4  0.0188      0.863 0.000 0.000 0.004 0.996
#> GSM549304     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549305     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549307     2  0.3688      0.738 0.000 0.792 0.208 0.000
#> GSM549306     3  0.2973      0.791 0.000 0.144 0.856 0.000
#> GSM549308     3  0.1940      0.799 0.000 0.076 0.924 0.000
#> GSM549233     1  0.3649      0.807 0.796 0.000 0.000 0.204
#> GSM549234     4  0.0000      0.863 0.000 0.000 0.000 1.000
#> GSM549250     1  0.3444      0.826 0.816 0.000 0.000 0.184
#> GSM549287     4  0.3649      0.683 0.000 0.000 0.204 0.796
#> GSM750735     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM750736     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM750749     2  0.3447      0.818 0.128 0.852 0.020 0.000
#> GSM549230     1  0.3311      0.836 0.828 0.000 0.000 0.172
#> GSM549231     1  0.0707      0.919 0.980 0.000 0.000 0.020
#> GSM549237     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549254     4  0.3528      0.627 0.192 0.000 0.000 0.808
#> GSM750734     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549271     4  0.3649      0.683 0.000 0.000 0.204 0.796
#> GSM549232     4  0.0000      0.863 0.000 0.000 0.000 1.000
#> GSM549246     4  0.5000     -0.177 0.496 0.000 0.000 0.504
#> GSM549248     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549255     4  0.0469      0.855 0.012 0.000 0.000 0.988
#> GSM750746     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0707      0.944 0.000 0.980 0.020 0.000
#> GSM549273     3  0.1118      0.782 0.000 0.036 0.964 0.000
#> GSM549299     2  0.0707      0.944 0.000 0.980 0.020 0.000
#> GSM549301     3  0.2868      0.796 0.000 0.136 0.864 0.000
#> GSM549310     4  0.0469      0.859 0.000 0.000 0.012 0.988
#> GSM549311     3  0.4304      0.601 0.000 0.000 0.716 0.284
#> GSM549302     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549235     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549245     4  0.0000      0.863 0.000 0.000 0.000 1.000
#> GSM549265     4  0.0336      0.859 0.008 0.000 0.000 0.992
#> GSM549282     3  0.4764      0.687 0.000 0.032 0.748 0.220
#> GSM549296     4  0.0188      0.863 0.000 0.000 0.004 0.996
#> GSM750739     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM750750     3  0.2469      0.802 0.000 0.108 0.892 0.000
#> GSM549242     1  0.3356      0.833 0.824 0.000 0.000 0.176
#> GSM549252     4  0.0188      0.861 0.004 0.000 0.000 0.996
#> GSM549253     1  0.3356      0.833 0.824 0.000 0.000 0.176
#> GSM549256     1  0.3649      0.807 0.796 0.000 0.000 0.204
#> GSM549257     4  0.2868      0.706 0.136 0.000 0.000 0.864
#> GSM549263     1  0.3266      0.839 0.832 0.000 0.000 0.168
#> GSM549267     4  0.3649      0.683 0.000 0.000 0.204 0.796
#> GSM750745     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549244     4  0.0000      0.863 0.000 0.000 0.000 1.000
#> GSM549249     4  0.0000      0.863 0.000 0.000 0.000 1.000
#> GSM549260     1  0.3172      0.844 0.840 0.000 0.000 0.160
#> GSM549266     2  0.2413      0.901 0.064 0.916 0.020 0.000
#> GSM549293     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549236     1  0.3444      0.826 0.816 0.000 0.000 0.184
#> GSM549238     1  0.4134      0.733 0.740 0.000 0.000 0.260
#> GSM549251     1  0.3356      0.833 0.824 0.000 0.000 0.176
#> GSM549258     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549264     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549243     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549278     4  0.0000      0.863 0.000 0.000 0.000 1.000
#> GSM549283     2  0.0707      0.944 0.000 0.980 0.020 0.000
#> GSM549298     3  0.2647      0.801 0.000 0.120 0.880 0.000
#> GSM750741     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549286     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549241     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549247     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549261     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549270     2  0.0921      0.944 0.000 0.972 0.028 0.000
#> GSM549277     2  0.0707      0.944 0.000 0.980 0.020 0.000
#> GSM549280     2  0.0707      0.944 0.000 0.980 0.020 0.000
#> GSM549281     2  0.2413      0.901 0.064 0.916 0.020 0.000
#> GSM549285     2  0.1867      0.911 0.000 0.928 0.072 0.000
#> GSM549288     2  0.0707      0.944 0.000 0.980 0.020 0.000
#> GSM549292     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549295     2  0.1022      0.940 0.000 0.968 0.032 0.000
#> GSM549297     2  0.0707      0.944 0.000 0.980 0.020 0.000
#> GSM750743     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM549268     2  0.2335      0.905 0.060 0.920 0.020 0.000
#> GSM549290     4  0.3649      0.683 0.000 0.000 0.204 0.796
#> GSM549272     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549276     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM549275     1  0.0592      0.917 0.984 0.016 0.000 0.000
#> GSM549284     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM750737     1  0.3649      0.807 0.796 0.000 0.000 0.204
#> GSM750740     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.927 1.000 0.000 0.000 0.000
#> GSM750751     2  0.1118      0.942 0.000 0.964 0.036 0.000
#> GSM750754     4  0.3649      0.683 0.000 0.000 0.204 0.796

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.0566     0.7979 0.000 0.000 0.012 0.984 0.004
#> GSM549291     4  0.2329     0.7221 0.000 0.000 0.124 0.876 0.000
#> GSM549274     2  0.3790     0.4281 0.000 0.724 0.004 0.000 0.272
#> GSM750738     5  0.6494     0.0000 0.024 0.164 0.112 0.044 0.656
#> GSM750748     1  0.0000     0.7961 1.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.3706     0.6981 0.756 0.004 0.000 0.004 0.236
#> GSM549279     2  0.4944     0.3664 0.044 0.700 0.016 0.000 0.240
#> GSM549294     2  0.2891     0.4997 0.000 0.824 0.000 0.000 0.176
#> GSM549300     2  0.2848     0.4695 0.000 0.840 0.156 0.000 0.004
#> GSM549303     3  0.0609     0.6955 0.000 0.000 0.980 0.020 0.000
#> GSM549309     3  0.0609     0.6955 0.000 0.000 0.980 0.020 0.000
#> GSM750753     2  0.2561     0.5123 0.000 0.856 0.000 0.000 0.144
#> GSM750752     4  0.0880     0.7896 0.000 0.000 0.032 0.968 0.000
#> GSM549304     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549305     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549307     2  0.0794     0.5462 0.000 0.972 0.028 0.000 0.000
#> GSM549306     2  0.4440    -0.0702 0.000 0.528 0.468 0.000 0.004
#> GSM549308     3  0.2891     0.6449 0.000 0.176 0.824 0.000 0.000
#> GSM549233     4  0.7204    -0.0491 0.312 0.000 0.020 0.404 0.264
#> GSM549234     4  0.1608     0.8040 0.000 0.000 0.000 0.928 0.072
#> GSM549250     1  0.6661     0.5135 0.504 0.000 0.020 0.148 0.328
#> GSM549287     3  0.4249     0.1526 0.000 0.000 0.568 0.432 0.000
#> GSM750735     1  0.1357     0.7820 0.948 0.000 0.004 0.000 0.048
#> GSM750736     1  0.3550     0.6464 0.760 0.004 0.000 0.000 0.236
#> GSM750749     2  0.6183     0.1432 0.216 0.576 0.004 0.000 0.204
#> GSM549230     1  0.5284     0.6426 0.620 0.000 0.020 0.032 0.328
#> GSM549231     1  0.3882     0.7323 0.756 0.000 0.020 0.000 0.224
#> GSM549237     1  0.3196     0.7581 0.804 0.000 0.004 0.000 0.192
#> GSM549254     4  0.1732     0.8003 0.000 0.000 0.000 0.920 0.080
#> GSM750734     1  0.0000     0.7961 1.000 0.000 0.000 0.000 0.000
#> GSM549271     4  0.3983     0.4258 0.000 0.000 0.340 0.660 0.000
#> GSM549232     4  0.0794     0.8079 0.000 0.000 0.000 0.972 0.028
#> GSM549246     4  0.4197     0.6819 0.032 0.000 0.004 0.752 0.212
#> GSM549248     1  0.3690     0.7459 0.780 0.000 0.020 0.000 0.200
#> GSM549255     4  0.1478     0.8062 0.000 0.000 0.000 0.936 0.064
#> GSM750746     1  0.0000     0.7961 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0290     0.7952 0.992 0.000 0.000 0.000 0.008
#> GSM549269     2  0.2074     0.5298 0.000 0.896 0.000 0.000 0.104
#> GSM549273     3  0.2648     0.6341 0.000 0.152 0.848 0.000 0.000
#> GSM549299     2  0.0912     0.5467 0.000 0.972 0.016 0.000 0.012
#> GSM549301     3  0.3662     0.5298 0.000 0.252 0.744 0.000 0.004
#> GSM549310     4  0.0963     0.7874 0.000 0.000 0.036 0.964 0.000
#> GSM549311     3  0.0609     0.6955 0.000 0.000 0.980 0.020 0.000
#> GSM549302     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549235     1  0.0162     0.7961 0.996 0.000 0.000 0.000 0.004
#> GSM549245     4  0.1121     0.8100 0.000 0.000 0.000 0.956 0.044
#> GSM549265     4  0.2286     0.7718 0.000 0.000 0.004 0.888 0.108
#> GSM549282     3  0.2969     0.6753 0.000 0.128 0.852 0.020 0.000
#> GSM549296     4  0.0880     0.7896 0.000 0.000 0.032 0.968 0.000
#> GSM750739     1  0.0162     0.7957 0.996 0.000 0.004 0.000 0.000
#> GSM750742     1  0.3757     0.7412 0.772 0.000 0.020 0.000 0.208
#> GSM750744     1  0.0963     0.7949 0.964 0.000 0.000 0.000 0.036
#> GSM750750     3  0.2929     0.6408 0.000 0.180 0.820 0.000 0.000
#> GSM549242     1  0.6344     0.5770 0.556 0.000 0.020 0.120 0.304
#> GSM549252     4  0.1965     0.7928 0.000 0.000 0.000 0.904 0.096
#> GSM549253     1  0.5492     0.6332 0.608 0.000 0.020 0.044 0.328
#> GSM549256     1  0.7310     0.2813 0.388 0.000 0.024 0.300 0.288
#> GSM549257     4  0.2020     0.7873 0.000 0.000 0.000 0.900 0.100
#> GSM549263     1  0.5356     0.6398 0.616 0.000 0.020 0.036 0.328
#> GSM549267     4  0.4015     0.3620 0.000 0.000 0.348 0.652 0.000
#> GSM750745     1  0.1121     0.7838 0.956 0.000 0.000 0.000 0.044
#> GSM549239     1  0.0162     0.7958 0.996 0.000 0.000 0.000 0.004
#> GSM549244     4  0.0963     0.8092 0.000 0.000 0.000 0.964 0.036
#> GSM549249     4  0.1341     0.8092 0.000 0.000 0.000 0.944 0.056
#> GSM549260     1  0.4879     0.7088 0.720 0.000 0.016 0.052 0.212
#> GSM549266     2  0.4554     0.4125 0.032 0.736 0.016 0.000 0.216
#> GSM549293     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549236     1  0.5618     0.6282 0.600 0.000 0.020 0.052 0.328
#> GSM549238     4  0.6440     0.3622 0.168 0.000 0.020 0.576 0.236
#> GSM549251     1  0.5492     0.6332 0.608 0.000 0.020 0.044 0.328
#> GSM549258     1  0.2074     0.7586 0.896 0.000 0.000 0.000 0.104
#> GSM549264     1  0.2629     0.7755 0.860 0.000 0.004 0.000 0.136
#> GSM549243     1  0.0000     0.7961 1.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.3690     0.7456 0.780 0.000 0.020 0.000 0.200
#> GSM549278     4  0.2570     0.7765 0.000 0.000 0.028 0.888 0.084
#> GSM549283     2  0.3574     0.4706 0.000 0.804 0.028 0.000 0.168
#> GSM549298     2  0.4437    -0.0656 0.000 0.532 0.464 0.000 0.004
#> GSM750741     1  0.3430     0.6611 0.776 0.004 0.000 0.000 0.220
#> GSM549286     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549241     1  0.1270     0.7797 0.948 0.000 0.000 0.000 0.052
#> GSM549247     1  0.4735     0.6442 0.680 0.012 0.016 0.004 0.288
#> GSM549261     1  0.0880     0.7879 0.968 0.000 0.000 0.000 0.032
#> GSM549270     2  0.4192     0.2934 0.000 0.596 0.000 0.000 0.404
#> GSM549277     2  0.2139     0.5309 0.000 0.916 0.032 0.000 0.052
#> GSM549280     2  0.0794     0.5462 0.000 0.972 0.028 0.000 0.000
#> GSM549281     2  0.4181     0.4137 0.008 0.736 0.016 0.000 0.240
#> GSM549285     2  0.3994     0.4680 0.000 0.792 0.068 0.000 0.140
#> GSM549288     2  0.0794     0.5462 0.000 0.972 0.028 0.000 0.000
#> GSM549292     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549295     2  0.1907     0.5440 0.000 0.928 0.028 0.000 0.044
#> GSM549297     2  0.3562     0.4909 0.000 0.788 0.016 0.000 0.196
#> GSM750743     1  0.0000     0.7961 1.000 0.000 0.000 0.000 0.000
#> GSM549268     2  0.4061     0.4179 0.004 0.740 0.016 0.000 0.240
#> GSM549290     4  0.4242     0.2058 0.000 0.000 0.428 0.572 0.000
#> GSM549272     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549276     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM549275     1  0.3970     0.6316 0.752 0.024 0.000 0.000 0.224
#> GSM549284     2  0.4924     0.2741 0.000 0.552 0.028 0.000 0.420
#> GSM750737     1  0.6482     0.4800 0.492 0.000 0.000 0.232 0.276
#> GSM750740     1  0.0162     0.7958 0.996 0.000 0.000 0.000 0.004
#> GSM750747     1  0.0000     0.7961 1.000 0.000 0.000 0.000 0.000
#> GSM750751     2  0.4227     0.2768 0.000 0.580 0.000 0.000 0.420
#> GSM750754     3  0.4242     0.1636 0.000 0.000 0.572 0.428 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.4868     0.7148 0.000 0.000 0.008 0.588 0.052 0.352
#> GSM549291     4  0.3884     0.6406 0.000 0.000 0.036 0.724 0.000 0.240
#> GSM549274     2  0.2070     0.8009 0.000 0.892 0.008 0.000 0.000 0.100
#> GSM750738     2  0.5469     0.4579 0.036 0.692 0.020 0.008 0.068 0.176
#> GSM750748     1  0.3706     0.7127 0.620 0.000 0.000 0.000 0.380 0.000
#> GSM549240     1  0.0603     0.6144 0.980 0.000 0.000 0.000 0.004 0.016
#> GSM549279     6  0.5563     0.4042 0.184 0.272 0.000 0.000 0.000 0.544
#> GSM549294     2  0.2219     0.7742 0.000 0.864 0.000 0.000 0.000 0.136
#> GSM549300     6  0.4326     0.1510 0.000 0.024 0.404 0.000 0.000 0.572
#> GSM549303     3  0.3647     0.6383 0.000 0.000 0.640 0.360 0.000 0.000
#> GSM549309     3  0.3659     0.6355 0.000 0.000 0.636 0.364 0.000 0.000
#> GSM750753     2  0.3647     0.3020 0.000 0.640 0.000 0.000 0.000 0.360
#> GSM750752     4  0.4455     0.7060 0.000 0.000 0.016 0.616 0.016 0.352
#> GSM549304     2  0.0000     0.8454 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549305     2  0.1075     0.8497 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM549307     6  0.5255     0.2885 0.000 0.112 0.340 0.000 0.000 0.548
#> GSM549306     3  0.3315     0.5727 0.000 0.020 0.780 0.000 0.000 0.200
#> GSM549308     3  0.0692     0.7177 0.000 0.020 0.976 0.000 0.000 0.004
#> GSM549233     5  0.2798     0.6370 0.000 0.000 0.000 0.036 0.852 0.112
#> GSM549234     4  0.6775     0.6902 0.108 0.000 0.000 0.412 0.108 0.372
#> GSM549250     5  0.0508     0.6960 0.004 0.000 0.000 0.000 0.984 0.012
#> GSM549287     4  0.2562     0.2155 0.000 0.000 0.172 0.828 0.000 0.000
#> GSM750735     1  0.0508     0.6243 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM750736     1  0.1930     0.6401 0.916 0.000 0.000 0.000 0.036 0.048
#> GSM750749     6  0.4091     0.0917 0.472 0.008 0.000 0.000 0.000 0.520
#> GSM549230     5  0.0937     0.6798 0.040 0.000 0.000 0.000 0.960 0.000
#> GSM549231     5  0.2664     0.4852 0.184 0.000 0.000 0.000 0.816 0.000
#> GSM549237     1  0.3810     0.0153 0.572 0.000 0.000 0.000 0.428 0.000
#> GSM549254     6  0.7224    -0.7061 0.164 0.004 0.000 0.352 0.108 0.372
#> GSM750734     1  0.3706     0.7127 0.620 0.000 0.000 0.000 0.380 0.000
#> GSM549271     4  0.1863     0.3277 0.000 0.000 0.104 0.896 0.000 0.000
#> GSM549232     4  0.6612     0.6947 0.088 0.000 0.000 0.432 0.108 0.372
#> GSM549246     5  0.7119    -0.3810 0.160 0.000 0.004 0.356 0.384 0.096
#> GSM549248     5  0.2969     0.4032 0.224 0.000 0.000 0.000 0.776 0.000
#> GSM549255     4  0.6681     0.6939 0.096 0.000 0.000 0.424 0.108 0.372
#> GSM750746     1  0.3684     0.7195 0.628 0.000 0.000 0.000 0.372 0.000
#> GSM549259     1  0.3547     0.7364 0.668 0.000 0.000 0.000 0.332 0.000
#> GSM549269     2  0.1863     0.7899 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM549273     3  0.4663     0.6872 0.000 0.000 0.664 0.244 0.000 0.092
#> GSM549299     6  0.3833     0.2473 0.000 0.444 0.000 0.000 0.000 0.556
#> GSM549301     3  0.1092     0.7127 0.000 0.020 0.960 0.000 0.000 0.020
#> GSM549310     4  0.4443     0.7050 0.000 0.000 0.016 0.620 0.016 0.348
#> GSM549311     3  0.3695     0.6285 0.000 0.000 0.624 0.376 0.000 0.000
#> GSM549302     2  0.0146     0.8471 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549235     1  0.3684     0.7196 0.628 0.000 0.000 0.000 0.372 0.000
#> GSM549245     6  0.7026    -0.7147 0.148 0.000 0.000 0.372 0.108 0.372
#> GSM549265     4  0.7259     0.6085 0.120 0.000 0.000 0.408 0.220 0.252
#> GSM549282     3  0.3455     0.7119 0.000 0.020 0.776 0.200 0.000 0.004
#> GSM549296     4  0.4455     0.7060 0.000 0.000 0.016 0.616 0.016 0.352
#> GSM750739     1  0.3647     0.7257 0.640 0.000 0.000 0.000 0.360 0.000
#> GSM750742     5  0.3221     0.2983 0.264 0.000 0.000 0.000 0.736 0.000
#> GSM750744     1  0.3854     0.5712 0.536 0.000 0.000 0.000 0.464 0.000
#> GSM750750     3  0.1092     0.7208 0.000 0.020 0.960 0.020 0.000 0.000
#> GSM549242     5  0.0964     0.6934 0.004 0.000 0.000 0.016 0.968 0.012
#> GSM549252     4  0.7005     0.6709 0.144 0.000 0.000 0.376 0.108 0.372
#> GSM549253     5  0.0820     0.6964 0.016 0.000 0.000 0.000 0.972 0.012
#> GSM549256     5  0.1933     0.6734 0.004 0.000 0.000 0.032 0.920 0.044
#> GSM549257     4  0.6983     0.6735 0.140 0.000 0.000 0.380 0.108 0.372
#> GSM549263     5  0.0865     0.6830 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM549267     4  0.1958     0.3582 0.000 0.000 0.100 0.896 0.000 0.004
#> GSM750745     1  0.3684     0.7359 0.664 0.000 0.000 0.000 0.332 0.004
#> GSM549239     1  0.3672     0.7226 0.632 0.000 0.000 0.000 0.368 0.000
#> GSM549244     4  0.6775     0.6902 0.108 0.000 0.000 0.412 0.108 0.372
#> GSM549249     4  0.6842     0.6869 0.100 0.000 0.000 0.416 0.128 0.356
#> GSM549260     5  0.2473     0.6260 0.104 0.000 0.000 0.008 0.876 0.012
#> GSM549266     6  0.5369     0.3941 0.128 0.332 0.000 0.000 0.000 0.540
#> GSM549293     2  0.0000     0.8454 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549236     5  0.0725     0.6968 0.012 0.000 0.000 0.000 0.976 0.012
#> GSM549238     5  0.6119    -0.2910 0.004 0.000 0.000 0.268 0.436 0.292
#> GSM549251     5  0.1074     0.6923 0.028 0.000 0.000 0.000 0.960 0.012
#> GSM549258     1  0.3253     0.7140 0.788 0.000 0.000 0.000 0.192 0.020
#> GSM549264     1  0.3023     0.5150 0.768 0.000 0.000 0.000 0.232 0.000
#> GSM549243     1  0.3706     0.7127 0.620 0.000 0.000 0.000 0.380 0.000
#> GSM549262     5  0.3309     0.2483 0.280 0.000 0.000 0.000 0.720 0.000
#> GSM549278     4  0.5817     0.6792 0.000 0.000 0.032 0.568 0.120 0.280
#> GSM549283     6  0.4357     0.2928 0.012 0.420 0.008 0.000 0.000 0.560
#> GSM549298     3  0.3592     0.5229 0.000 0.020 0.740 0.000 0.000 0.240
#> GSM750741     1  0.1204     0.6157 0.944 0.000 0.000 0.000 0.000 0.056
#> GSM549286     2  0.0865     0.8520 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM549241     1  0.3230     0.7179 0.776 0.000 0.000 0.000 0.212 0.012
#> GSM549247     1  0.0458     0.6118 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM549261     1  0.3023     0.7295 0.768 0.000 0.000 0.000 0.232 0.000
#> GSM549270     2  0.1610     0.8305 0.000 0.916 0.000 0.000 0.000 0.084
#> GSM549277     6  0.5528     0.4591 0.004 0.196 0.220 0.000 0.000 0.580
#> GSM549280     6  0.4246     0.3195 0.000 0.400 0.020 0.000 0.000 0.580
#> GSM549281     6  0.5233     0.4004 0.112 0.332 0.000 0.000 0.000 0.556
#> GSM549285     3  0.4227     0.3310 0.004 0.020 0.632 0.000 0.000 0.344
#> GSM549288     6  0.5396     0.3818 0.000 0.152 0.284 0.000 0.000 0.564
#> GSM549292     2  0.0000     0.8454 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     6  0.5569     0.4134 0.000 0.280 0.180 0.000 0.000 0.540
#> GSM549297     2  0.3955     0.0293 0.000 0.560 0.004 0.000 0.000 0.436
#> GSM750743     1  0.3446     0.7400 0.692 0.000 0.000 0.000 0.308 0.000
#> GSM549268     6  0.5042     0.4033 0.092 0.332 0.000 0.000 0.000 0.576
#> GSM549290     4  0.2053     0.3513 0.000 0.000 0.108 0.888 0.000 0.004
#> GSM549272     2  0.0547     0.8514 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM549276     2  0.1007     0.8503 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM549275     1  0.1444     0.6066 0.928 0.000 0.000 0.000 0.000 0.072
#> GSM549284     2  0.1074     0.8327 0.000 0.960 0.012 0.000 0.000 0.028
#> GSM750737     5  0.7282    -0.1543 0.292 0.004 0.000 0.084 0.368 0.252
#> GSM750740     1  0.3371     0.7396 0.708 0.000 0.000 0.000 0.292 0.000
#> GSM750747     1  0.3684     0.7202 0.628 0.000 0.000 0.000 0.372 0.000
#> GSM750751     2  0.0865     0.8520 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM750754     4  0.2631     0.1990 0.000 0.000 0.180 0.820 0.000 0.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-mclust-membership-heatmap-5

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)

plot of chunk tab-SD-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-mclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-SD-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-mclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> SD:mclust 103           0.0131    8.80e-05              0.156105  0.00128 2
#> SD:mclust  91           0.3265    3.04e-04              0.000791  0.00231 3
#> SD:mclust 101           0.5038    1.18e-05              0.000835  0.00744 4
#> SD:mclust  69           0.5891    5.30e-05              0.062047  0.19518 5
#> SD:mclust  71           0.5338    6.80e-05              0.006630  0.10925 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.


SD:NMF**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk SD-NMF-collect-plots

The plots are:

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:

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)

plot of chunk SD-NMF-select-partition-number

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.999           0.954       0.981         0.5006 0.499   0.499
#> 3 3 0.845           0.837       0.924         0.2794 0.809   0.637
#> 4 4 0.819           0.827       0.914         0.1628 0.816   0.538
#> 5 5 0.766           0.739       0.870         0.0603 0.926   0.726
#> 6 6 0.734           0.651       0.814         0.0445 0.928   0.685

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000     0.9833 1.000 0.000
#> GSM549291     1  0.8016     0.6708 0.756 0.244
#> GSM549274     2  0.0000     0.9759 0.000 1.000
#> GSM750738     2  0.0000     0.9759 0.000 1.000
#> GSM750748     1  0.0000     0.9833 1.000 0.000
#> GSM549240     1  0.0000     0.9833 1.000 0.000
#> GSM549279     2  0.0938     0.9665 0.012 0.988
#> GSM549294     2  0.0000     0.9759 0.000 1.000
#> GSM549300     2  0.0000     0.9759 0.000 1.000
#> GSM549303     2  0.0000     0.9759 0.000 1.000
#> GSM549309     2  0.3114     0.9286 0.056 0.944
#> GSM750753     2  0.0000     0.9759 0.000 1.000
#> GSM750752     2  0.0376     0.9729 0.004 0.996
#> GSM549304     2  0.0000     0.9759 0.000 1.000
#> GSM549305     2  0.0000     0.9759 0.000 1.000
#> GSM549307     2  0.0000     0.9759 0.000 1.000
#> GSM549306     2  0.0000     0.9759 0.000 1.000
#> GSM549308     2  0.0000     0.9759 0.000 1.000
#> GSM549233     1  0.0000     0.9833 1.000 0.000
#> GSM549234     1  0.0000     0.9833 1.000 0.000
#> GSM549250     1  0.0000     0.9833 1.000 0.000
#> GSM549287     2  0.3114     0.9287 0.056 0.944
#> GSM750735     1  0.0000     0.9833 1.000 0.000
#> GSM750736     1  0.0000     0.9833 1.000 0.000
#> GSM750749     1  0.0000     0.9833 1.000 0.000
#> GSM549230     1  0.0000     0.9833 1.000 0.000
#> GSM549231     1  0.0000     0.9833 1.000 0.000
#> GSM549237     1  0.0000     0.9833 1.000 0.000
#> GSM549254     1  0.0000     0.9833 1.000 0.000
#> GSM750734     1  0.0000     0.9833 1.000 0.000
#> GSM549271     2  0.0000     0.9759 0.000 1.000
#> GSM549232     1  0.0000     0.9833 1.000 0.000
#> GSM549246     1  0.0000     0.9833 1.000 0.000
#> GSM549248     1  0.0000     0.9833 1.000 0.000
#> GSM549255     1  0.0000     0.9833 1.000 0.000
#> GSM750746     1  0.0000     0.9833 1.000 0.000
#> GSM549259     1  0.0000     0.9833 1.000 0.000
#> GSM549269     2  0.0000     0.9759 0.000 1.000
#> GSM549273     2  0.0000     0.9759 0.000 1.000
#> GSM549299     2  0.0000     0.9759 0.000 1.000
#> GSM549301     2  0.0000     0.9759 0.000 1.000
#> GSM549310     2  0.0000     0.9759 0.000 1.000
#> GSM549311     2  0.0000     0.9759 0.000 1.000
#> GSM549302     2  0.0000     0.9759 0.000 1.000
#> GSM549235     1  0.0000     0.9833 1.000 0.000
#> GSM549245     1  0.0000     0.9833 1.000 0.000
#> GSM549265     1  0.0000     0.9833 1.000 0.000
#> GSM549282     2  0.3584     0.9167 0.068 0.932
#> GSM549296     2  0.6531     0.7979 0.168 0.832
#> GSM750739     1  0.0000     0.9833 1.000 0.000
#> GSM750742     1  0.0000     0.9833 1.000 0.000
#> GSM750744     1  0.0000     0.9833 1.000 0.000
#> GSM750750     2  0.0000     0.9759 0.000 1.000
#> GSM549242     1  0.0000     0.9833 1.000 0.000
#> GSM549252     1  0.0000     0.9833 1.000 0.000
#> GSM549253     1  0.0000     0.9833 1.000 0.000
#> GSM549256     1  0.0000     0.9833 1.000 0.000
#> GSM549257     1  0.0000     0.9833 1.000 0.000
#> GSM549263     1  0.0000     0.9833 1.000 0.000
#> GSM549267     2  0.7745     0.7094 0.228 0.772
#> GSM750745     1  0.0000     0.9833 1.000 0.000
#> GSM549239     1  0.0000     0.9833 1.000 0.000
#> GSM549244     1  0.0000     0.9833 1.000 0.000
#> GSM549249     1  0.0000     0.9833 1.000 0.000
#> GSM549260     1  0.0000     0.9833 1.000 0.000
#> GSM549266     2  0.0000     0.9759 0.000 1.000
#> GSM549293     2  0.0000     0.9759 0.000 1.000
#> GSM549236     1  0.0000     0.9833 1.000 0.000
#> GSM549238     1  0.0000     0.9833 1.000 0.000
#> GSM549251     1  0.0000     0.9833 1.000 0.000
#> GSM549258     1  0.0000     0.9833 1.000 0.000
#> GSM549264     1  0.0000     0.9833 1.000 0.000
#> GSM549243     1  0.0000     0.9833 1.000 0.000
#> GSM549262     1  0.0000     0.9833 1.000 0.000
#> GSM549278     1  0.1414     0.9648 0.980 0.020
#> GSM549283     2  0.0000     0.9759 0.000 1.000
#> GSM549298     2  0.0000     0.9759 0.000 1.000
#> GSM750741     1  0.0000     0.9833 1.000 0.000
#> GSM549286     2  0.0000     0.9759 0.000 1.000
#> GSM549241     1  0.0000     0.9833 1.000 0.000
#> GSM549247     1  0.3584     0.9167 0.932 0.068
#> GSM549261     1  0.0000     0.9833 1.000 0.000
#> GSM549270     2  0.0000     0.9759 0.000 1.000
#> GSM549277     2  0.0000     0.9759 0.000 1.000
#> GSM549280     2  0.0000     0.9759 0.000 1.000
#> GSM549281     2  0.0000     0.9759 0.000 1.000
#> GSM549285     2  0.0000     0.9759 0.000 1.000
#> GSM549288     2  0.0000     0.9759 0.000 1.000
#> GSM549292     2  0.0000     0.9759 0.000 1.000
#> GSM549295     2  0.0000     0.9759 0.000 1.000
#> GSM549297     2  0.0000     0.9759 0.000 1.000
#> GSM750743     1  0.0000     0.9833 1.000 0.000
#> GSM549268     2  0.0000     0.9759 0.000 1.000
#> GSM549290     1  0.7299     0.7380 0.796 0.204
#> GSM549272     2  0.0000     0.9759 0.000 1.000
#> GSM549276     2  0.0000     0.9759 0.000 1.000
#> GSM549275     1  0.9358     0.4566 0.648 0.352
#> GSM549284     2  0.0000     0.9759 0.000 1.000
#> GSM750737     1  0.0000     0.9833 1.000 0.000
#> GSM750740     1  0.0000     0.9833 1.000 0.000
#> GSM750747     1  0.0000     0.9833 1.000 0.000
#> GSM750751     2  0.0000     0.9759 0.000 1.000
#> GSM750754     2  0.9998     0.0394 0.492 0.508

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.5733      0.540 0.676 0.000 0.324
#> GSM549291     3  0.2711      0.796 0.088 0.000 0.912
#> GSM549274     2  0.0237      0.913 0.004 0.996 0.000
#> GSM750738     2  0.0237      0.913 0.004 0.996 0.000
#> GSM750748     1  0.0000      0.943 1.000 0.000 0.000
#> GSM549240     1  0.6267      0.192 0.548 0.452 0.000
#> GSM549279     2  0.1643      0.890 0.044 0.956 0.000
#> GSM549294     2  0.0592      0.914 0.000 0.988 0.012
#> GSM549300     3  0.4062      0.766 0.000 0.164 0.836
#> GSM549303     3  0.0592      0.852 0.000 0.012 0.988
#> GSM549309     3  0.0000      0.851 0.000 0.000 1.000
#> GSM750753     2  0.2625      0.870 0.000 0.916 0.084
#> GSM750752     3  0.0237      0.852 0.000 0.004 0.996
#> GSM549304     2  0.0424      0.914 0.000 0.992 0.008
#> GSM549305     2  0.2165      0.887 0.000 0.936 0.064
#> GSM549307     3  0.6062      0.469 0.000 0.384 0.616
#> GSM549306     3  0.3038      0.814 0.000 0.104 0.896
#> GSM549308     3  0.0892      0.851 0.000 0.020 0.980
#> GSM549233     1  0.0747      0.942 0.984 0.000 0.016
#> GSM549234     1  0.1289      0.936 0.968 0.000 0.032
#> GSM549250     1  0.1163      0.938 0.972 0.000 0.028
#> GSM549287     3  0.0237      0.850 0.004 0.000 0.996
#> GSM750735     1  0.1753      0.920 0.952 0.048 0.000
#> GSM750736     1  0.6267      0.192 0.548 0.452 0.000
#> GSM750749     1  0.0892      0.937 0.980 0.020 0.000
#> GSM549230     1  0.0892      0.942 0.980 0.000 0.020
#> GSM549231     1  0.0892      0.942 0.980 0.000 0.020
#> GSM549237     1  0.0424      0.943 0.992 0.000 0.008
#> GSM549254     1  0.0661      0.943 0.988 0.008 0.004
#> GSM750734     1  0.0000      0.943 1.000 0.000 0.000
#> GSM549271     3  0.0237      0.852 0.000 0.004 0.996
#> GSM549232     1  0.1860      0.925 0.948 0.000 0.052
#> GSM549246     1  0.0892      0.942 0.980 0.000 0.020
#> GSM549248     1  0.0424      0.943 0.992 0.000 0.008
#> GSM549255     1  0.2261      0.912 0.932 0.000 0.068
#> GSM750746     1  0.0592      0.940 0.988 0.012 0.000
#> GSM549259     1  0.2165      0.907 0.936 0.064 0.000
#> GSM549269     2  0.0237      0.913 0.004 0.996 0.000
#> GSM549273     3  0.1289      0.848 0.000 0.032 0.968
#> GSM549299     2  0.2537      0.874 0.000 0.920 0.080
#> GSM549301     3  0.2356      0.832 0.000 0.072 0.928
#> GSM549310     3  0.0747      0.852 0.000 0.016 0.984
#> GSM549311     3  0.0000      0.851 0.000 0.000 1.000
#> GSM549302     2  0.0592      0.914 0.000 0.988 0.012
#> GSM549235     1  0.0237      0.943 0.996 0.000 0.004
#> GSM549245     1  0.1015      0.943 0.980 0.008 0.012
#> GSM549265     1  0.2165      0.916 0.936 0.000 0.064
#> GSM549282     3  0.0000      0.851 0.000 0.000 1.000
#> GSM549296     3  0.1529      0.834 0.040 0.000 0.960
#> GSM750739     1  0.0237      0.942 0.996 0.004 0.000
#> GSM750742     1  0.0592      0.943 0.988 0.000 0.012
#> GSM750744     1  0.0000      0.943 1.000 0.000 0.000
#> GSM750750     3  0.0747      0.852 0.000 0.016 0.984
#> GSM549242     1  0.0424      0.943 0.992 0.000 0.008
#> GSM549252     1  0.1753      0.927 0.952 0.000 0.048
#> GSM549253     1  0.0747      0.942 0.984 0.000 0.016
#> GSM549256     1  0.0424      0.943 0.992 0.000 0.008
#> GSM549257     1  0.1031      0.940 0.976 0.000 0.024
#> GSM549263     1  0.0892      0.942 0.980 0.000 0.020
#> GSM549267     3  0.1529      0.833 0.040 0.000 0.960
#> GSM750745     1  0.2165      0.907 0.936 0.064 0.000
#> GSM549239     1  0.1031      0.935 0.976 0.024 0.000
#> GSM549244     1  0.2165      0.916 0.936 0.000 0.064
#> GSM549249     1  0.1964      0.922 0.944 0.000 0.056
#> GSM549260     1  0.0237      0.943 0.996 0.000 0.004
#> GSM549266     2  0.1289      0.899 0.032 0.968 0.000
#> GSM549293     2  0.0000      0.913 0.000 1.000 0.000
#> GSM549236     1  0.1031      0.940 0.976 0.000 0.024
#> GSM549238     1  0.1529      0.932 0.960 0.000 0.040
#> GSM549251     1  0.0747      0.942 0.984 0.000 0.016
#> GSM549258     1  0.2959      0.874 0.900 0.100 0.000
#> GSM549264     1  0.0237      0.942 0.996 0.004 0.000
#> GSM549243     1  0.0000      0.943 1.000 0.000 0.000
#> GSM549262     1  0.0424      0.943 0.992 0.000 0.008
#> GSM549278     3  0.6244      0.141 0.440 0.000 0.560
#> GSM549283     2  0.1031      0.911 0.000 0.976 0.024
#> GSM549298     3  0.3038      0.814 0.000 0.104 0.896
#> GSM750741     1  0.5733      0.531 0.676 0.324 0.000
#> GSM549286     2  0.1163      0.910 0.000 0.972 0.028
#> GSM549241     2  0.6274      0.106 0.456 0.544 0.000
#> GSM549247     2  0.4346      0.727 0.184 0.816 0.000
#> GSM549261     1  0.2625      0.890 0.916 0.084 0.000
#> GSM549270     2  0.2625      0.870 0.000 0.916 0.084
#> GSM549277     3  0.6180      0.404 0.000 0.416 0.584
#> GSM549280     3  0.6235      0.354 0.000 0.436 0.564
#> GSM549281     2  0.1964      0.879 0.056 0.944 0.000
#> GSM549285     3  0.1529      0.846 0.000 0.040 0.960
#> GSM549288     3  0.6008      0.491 0.000 0.372 0.628
#> GSM549292     2  0.0237      0.914 0.000 0.996 0.004
#> GSM549295     3  0.6299      0.242 0.000 0.476 0.524
#> GSM549297     2  0.4235      0.744 0.000 0.824 0.176
#> GSM750743     1  0.0892      0.937 0.980 0.020 0.000
#> GSM549268     2  0.2918      0.896 0.044 0.924 0.032
#> GSM549290     3  0.2711      0.796 0.088 0.000 0.912
#> GSM549272     2  0.0237      0.914 0.000 0.996 0.004
#> GSM549276     2  0.1753      0.898 0.000 0.952 0.048
#> GSM549275     2  0.3340      0.810 0.120 0.880 0.000
#> GSM549284     2  0.1411      0.903 0.000 0.964 0.036
#> GSM750737     1  0.1163      0.933 0.972 0.028 0.000
#> GSM750740     1  0.0892      0.937 0.980 0.020 0.000
#> GSM750747     1  0.0592      0.940 0.988 0.012 0.000
#> GSM750751     2  0.1031      0.911 0.000 0.976 0.024
#> GSM750754     3  0.1753      0.828 0.048 0.000 0.952

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.2281      0.837 0.000 0.000 0.096 0.904
#> GSM549291     4  0.3400      0.771 0.000 0.000 0.180 0.820
#> GSM549274     2  0.0000      0.912 0.000 1.000 0.000 0.000
#> GSM750738     2  0.4992      0.164 0.000 0.524 0.000 0.476
#> GSM750748     1  0.0188      0.934 0.996 0.000 0.000 0.004
#> GSM549240     2  0.3734      0.799 0.108 0.848 0.000 0.044
#> GSM549279     2  0.1042      0.907 0.020 0.972 0.008 0.000
#> GSM549294     2  0.0592      0.911 0.000 0.984 0.016 0.000
#> GSM549300     3  0.2149      0.863 0.000 0.088 0.912 0.000
#> GSM549303     3  0.0927      0.870 0.000 0.008 0.976 0.016
#> GSM549309     3  0.0707      0.865 0.000 0.000 0.980 0.020
#> GSM750753     2  0.1792      0.889 0.000 0.932 0.068 0.000
#> GSM750752     4  0.0336      0.872 0.000 0.000 0.008 0.992
#> GSM549304     2  0.0000      0.912 0.000 1.000 0.000 0.000
#> GSM549305     2  0.1118      0.905 0.000 0.964 0.036 0.000
#> GSM549307     3  0.3726      0.762 0.000 0.212 0.788 0.000
#> GSM549306     3  0.1557      0.875 0.000 0.056 0.944 0.000
#> GSM549308     3  0.0707      0.875 0.000 0.020 0.980 0.000
#> GSM549233     4  0.4018      0.702 0.224 0.000 0.004 0.772
#> GSM549234     4  0.0000      0.873 0.000 0.000 0.000 1.000
#> GSM549250     1  0.5167      0.436 0.644 0.000 0.016 0.340
#> GSM549287     3  0.2921      0.760 0.000 0.000 0.860 0.140
#> GSM750735     1  0.0779      0.931 0.980 0.016 0.000 0.004
#> GSM750736     2  0.5442      0.426 0.336 0.636 0.000 0.028
#> GSM750749     1  0.0524      0.932 0.988 0.008 0.004 0.000
#> GSM549230     1  0.1042      0.928 0.972 0.000 0.008 0.020
#> GSM549231     1  0.0707      0.928 0.980 0.000 0.020 0.000
#> GSM549237     1  0.0524      0.932 0.988 0.000 0.008 0.004
#> GSM549254     4  0.0524      0.870 0.008 0.004 0.000 0.988
#> GSM750734     1  0.0188      0.934 0.996 0.000 0.000 0.004
#> GSM549271     3  0.3444      0.701 0.000 0.000 0.816 0.184
#> GSM549232     4  0.0000      0.873 0.000 0.000 0.000 1.000
#> GSM549246     4  0.5482      0.416 0.368 0.000 0.024 0.608
#> GSM549248     1  0.0188      0.934 0.996 0.000 0.000 0.004
#> GSM549255     4  0.0000      0.873 0.000 0.000 0.000 1.000
#> GSM750746     1  0.0188      0.934 0.996 0.000 0.000 0.004
#> GSM549259     1  0.1109      0.924 0.968 0.028 0.000 0.004
#> GSM549269     2  0.0000      0.912 0.000 1.000 0.000 0.000
#> GSM549273     3  0.0927      0.875 0.000 0.016 0.976 0.008
#> GSM549299     2  0.1637      0.894 0.000 0.940 0.060 0.000
#> GSM549301     3  0.1118      0.877 0.000 0.036 0.964 0.000
#> GSM549310     4  0.0592      0.871 0.000 0.000 0.016 0.984
#> GSM549311     3  0.0921      0.861 0.000 0.000 0.972 0.028
#> GSM549302     2  0.0657      0.911 0.000 0.984 0.012 0.004
#> GSM549235     1  0.0000      0.934 1.000 0.000 0.000 0.000
#> GSM549245     4  0.0336      0.870 0.000 0.008 0.000 0.992
#> GSM549265     4  0.3037      0.837 0.076 0.000 0.036 0.888
#> GSM549282     3  0.0895      0.863 0.004 0.000 0.976 0.020
#> GSM549296     4  0.0336      0.872 0.000 0.000 0.008 0.992
#> GSM750739     1  0.0376      0.934 0.992 0.004 0.000 0.004
#> GSM750742     1  0.0336      0.932 0.992 0.000 0.008 0.000
#> GSM750744     1  0.0188      0.934 0.996 0.000 0.000 0.004
#> GSM750750     3  0.0188      0.872 0.000 0.004 0.996 0.000
#> GSM549242     1  0.4428      0.596 0.720 0.000 0.004 0.276
#> GSM549252     4  0.0336      0.873 0.000 0.000 0.008 0.992
#> GSM549253     1  0.1978      0.889 0.928 0.000 0.004 0.068
#> GSM549256     4  0.4632      0.564 0.308 0.000 0.004 0.688
#> GSM549257     4  0.0336      0.873 0.000 0.000 0.008 0.992
#> GSM549263     1  0.1182      0.923 0.968 0.000 0.016 0.016
#> GSM549267     4  0.4356      0.637 0.000 0.000 0.292 0.708
#> GSM750745     1  0.0895      0.929 0.976 0.020 0.000 0.004
#> GSM549239     1  0.0188      0.934 0.996 0.004 0.000 0.000
#> GSM549244     4  0.0000      0.873 0.000 0.000 0.000 1.000
#> GSM549249     4  0.0524      0.873 0.004 0.000 0.008 0.988
#> GSM549260     1  0.0336      0.934 0.992 0.000 0.000 0.008
#> GSM549266     2  0.1059      0.909 0.016 0.972 0.012 0.000
#> GSM549293     2  0.0707      0.905 0.000 0.980 0.000 0.020
#> GSM549236     1  0.2973      0.847 0.884 0.000 0.020 0.096
#> GSM549238     4  0.2473      0.837 0.080 0.000 0.012 0.908
#> GSM549251     1  0.1042      0.927 0.972 0.000 0.008 0.020
#> GSM549258     1  0.1978      0.892 0.928 0.068 0.000 0.004
#> GSM549264     1  0.0992      0.932 0.976 0.008 0.004 0.012
#> GSM549243     1  0.0188      0.934 0.996 0.000 0.000 0.004
#> GSM549262     1  0.0469      0.931 0.988 0.000 0.012 0.000
#> GSM549278     4  0.4972      0.258 0.000 0.000 0.456 0.544
#> GSM549283     2  0.1637      0.895 0.000 0.940 0.060 0.000
#> GSM549298     3  0.1716      0.872 0.000 0.064 0.936 0.000
#> GSM750741     1  0.4677      0.539 0.680 0.316 0.000 0.004
#> GSM549286     2  0.0592      0.911 0.000 0.984 0.016 0.000
#> GSM549241     1  0.5105      0.239 0.564 0.432 0.000 0.004
#> GSM549247     2  0.2500      0.868 0.040 0.916 0.000 0.044
#> GSM549261     1  0.0895      0.929 0.976 0.020 0.000 0.004
#> GSM549270     2  0.1792      0.889 0.000 0.932 0.068 0.000
#> GSM549277     3  0.3444      0.793 0.000 0.184 0.816 0.000
#> GSM549280     3  0.4304      0.655 0.000 0.284 0.716 0.000
#> GSM549281     2  0.2670      0.887 0.040 0.908 0.052 0.000
#> GSM549285     3  0.1302      0.877 0.000 0.044 0.956 0.000
#> GSM549288     3  0.3356      0.801 0.000 0.176 0.824 0.000
#> GSM549292     2  0.0336      0.910 0.000 0.992 0.000 0.008
#> GSM549295     3  0.4972      0.246 0.000 0.456 0.544 0.000
#> GSM549297     2  0.3649      0.722 0.000 0.796 0.204 0.000
#> GSM750743     1  0.0524      0.933 0.988 0.008 0.000 0.004
#> GSM549268     2  0.3612      0.845 0.044 0.856 0.100 0.000
#> GSM549290     4  0.4431      0.626 0.000 0.000 0.304 0.696
#> GSM549272     2  0.0000      0.912 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0817      0.910 0.000 0.976 0.024 0.000
#> GSM549275     2  0.1389      0.888 0.048 0.952 0.000 0.000
#> GSM549284     2  0.2408      0.885 0.000 0.920 0.036 0.044
#> GSM750737     4  0.1510      0.860 0.028 0.016 0.000 0.956
#> GSM750740     1  0.0524      0.933 0.988 0.008 0.000 0.004
#> GSM750747     1  0.0188      0.934 0.996 0.000 0.000 0.004
#> GSM750751     2  0.0469      0.912 0.000 0.988 0.012 0.000
#> GSM750754     3  0.2647      0.781 0.000 0.000 0.880 0.120

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.1331    0.86134 0.000 0.000 0.040 0.952 0.008
#> GSM549291     4  0.1704    0.84425 0.000 0.000 0.068 0.928 0.004
#> GSM549274     2  0.0324    0.86076 0.000 0.992 0.004 0.000 0.004
#> GSM750738     2  0.4108    0.52174 0.000 0.684 0.000 0.308 0.008
#> GSM750748     1  0.1571    0.80444 0.936 0.000 0.000 0.004 0.060
#> GSM549240     2  0.4682    0.40055 0.356 0.620 0.000 0.024 0.000
#> GSM549279     2  0.5831    0.53786 0.304 0.616 0.036 0.008 0.036
#> GSM549294     2  0.1525    0.85537 0.012 0.948 0.036 0.000 0.004
#> GSM549300     3  0.0566    0.89452 0.000 0.012 0.984 0.000 0.004
#> GSM549303     3  0.1211    0.89258 0.000 0.000 0.960 0.024 0.016
#> GSM549309     3  0.1399    0.88983 0.000 0.000 0.952 0.020 0.028
#> GSM750753     2  0.1952    0.83679 0.000 0.912 0.084 0.000 0.004
#> GSM750752     4  0.0451    0.87103 0.000 0.008 0.000 0.988 0.004
#> GSM549304     2  0.0451    0.86061 0.000 0.988 0.004 0.000 0.008
#> GSM549305     2  0.1124    0.85703 0.004 0.960 0.036 0.000 0.000
#> GSM549307     3  0.1502    0.87674 0.000 0.056 0.940 0.000 0.004
#> GSM549306     3  0.0000    0.89652 0.000 0.000 1.000 0.000 0.000
#> GSM549308     3  0.0703    0.89569 0.000 0.000 0.976 0.000 0.024
#> GSM549233     4  0.3410    0.78018 0.068 0.000 0.000 0.840 0.092
#> GSM549234     4  0.0693    0.87055 0.000 0.008 0.000 0.980 0.012
#> GSM549250     5  0.2795    0.76514 0.056 0.000 0.000 0.064 0.880
#> GSM549287     3  0.2974    0.83518 0.000 0.000 0.868 0.080 0.052
#> GSM750735     1  0.1357    0.79996 0.948 0.004 0.000 0.000 0.048
#> GSM750736     1  0.4946    0.45440 0.656 0.300 0.000 0.008 0.036
#> GSM750749     1  0.1569    0.78973 0.944 0.004 0.008 0.000 0.044
#> GSM549230     1  0.3969    0.52604 0.692 0.000 0.000 0.004 0.304
#> GSM549231     5  0.2690    0.77212 0.156 0.000 0.000 0.000 0.844
#> GSM549237     1  0.3010    0.72499 0.824 0.000 0.000 0.004 0.172
#> GSM549254     4  0.1082    0.86504 0.008 0.000 0.000 0.964 0.028
#> GSM750734     1  0.0771    0.81156 0.976 0.000 0.000 0.004 0.020
#> GSM549271     3  0.3690    0.68972 0.000 0.000 0.764 0.224 0.012
#> GSM549232     4  0.0000    0.87105 0.000 0.000 0.000 1.000 0.000
#> GSM549246     4  0.4465    0.57652 0.212 0.000 0.000 0.732 0.056
#> GSM549248     1  0.4278    0.14976 0.548 0.000 0.000 0.000 0.452
#> GSM549255     4  0.0000    0.87105 0.000 0.000 0.000 1.000 0.000
#> GSM750746     1  0.0794    0.81236 0.972 0.000 0.000 0.000 0.028
#> GSM549259     1  0.0880    0.81224 0.968 0.000 0.000 0.000 0.032
#> GSM549269     2  0.0324    0.86087 0.004 0.992 0.004 0.000 0.000
#> GSM549273     3  0.1106    0.89374 0.000 0.000 0.964 0.024 0.012
#> GSM549299     2  0.3815    0.71253 0.012 0.764 0.220 0.000 0.004
#> GSM549301     3  0.0162    0.89675 0.000 0.000 0.996 0.000 0.004
#> GSM549310     4  0.0898    0.86821 0.000 0.000 0.020 0.972 0.008
#> GSM549311     3  0.1522    0.88716 0.000 0.000 0.944 0.012 0.044
#> GSM549302     2  0.0451    0.86061 0.000 0.988 0.004 0.000 0.008
#> GSM549235     1  0.2020    0.78164 0.900 0.000 0.000 0.000 0.100
#> GSM549245     4  0.0451    0.87068 0.000 0.008 0.000 0.988 0.004
#> GSM549265     4  0.4596    0.14401 0.004 0.004 0.000 0.500 0.492
#> GSM549282     5  0.3086    0.58352 0.000 0.000 0.180 0.004 0.816
#> GSM549296     4  0.0162    0.87102 0.000 0.000 0.000 0.996 0.004
#> GSM750739     1  0.1430    0.80783 0.944 0.000 0.000 0.004 0.052
#> GSM750742     5  0.3913    0.54772 0.324 0.000 0.000 0.000 0.676
#> GSM750744     1  0.4126    0.37457 0.620 0.000 0.000 0.000 0.380
#> GSM750750     3  0.0703    0.89569 0.000 0.000 0.976 0.000 0.024
#> GSM549242     1  0.4836    0.33486 0.612 0.000 0.000 0.356 0.032
#> GSM549252     4  0.1788    0.85623 0.004 0.008 0.000 0.932 0.056
#> GSM549253     5  0.4108    0.59953 0.308 0.000 0.000 0.008 0.684
#> GSM549256     4  0.1831    0.83102 0.076 0.000 0.000 0.920 0.004
#> GSM549257     4  0.0162    0.87125 0.000 0.000 0.000 0.996 0.004
#> GSM549263     5  0.3242    0.73241 0.216 0.000 0.000 0.000 0.784
#> GSM549267     4  0.3631    0.78076 0.000 0.000 0.104 0.824 0.072
#> GSM750745     1  0.0865    0.80613 0.972 0.000 0.000 0.004 0.024
#> GSM549239     1  0.1043    0.81113 0.960 0.000 0.000 0.000 0.040
#> GSM549244     4  0.1444    0.86379 0.000 0.012 0.000 0.948 0.040
#> GSM549249     4  0.2052    0.84344 0.004 0.004 0.000 0.912 0.080
#> GSM549260     1  0.0912    0.80891 0.972 0.000 0.000 0.012 0.016
#> GSM549266     2  0.5333    0.41760 0.376 0.576 0.036 0.000 0.012
#> GSM549293     2  0.0290    0.85943 0.000 0.992 0.000 0.000 0.008
#> GSM549236     5  0.2660    0.78334 0.128 0.000 0.000 0.008 0.864
#> GSM549238     4  0.4444    0.44276 0.012 0.000 0.000 0.624 0.364
#> GSM549251     1  0.3132    0.71524 0.820 0.000 0.000 0.008 0.172
#> GSM549258     1  0.0324    0.80807 0.992 0.004 0.000 0.000 0.004
#> GSM549264     5  0.2054    0.77559 0.072 0.008 0.000 0.004 0.916
#> GSM549243     1  0.1638    0.80279 0.932 0.000 0.000 0.004 0.064
#> GSM549262     1  0.3837    0.52546 0.692 0.000 0.000 0.000 0.308
#> GSM549278     4  0.4599    0.35260 0.000 0.000 0.384 0.600 0.016
#> GSM549283     2  0.4074    0.69864 0.012 0.752 0.224 0.000 0.012
#> GSM549298     3  0.0324    0.89649 0.000 0.004 0.992 0.000 0.004
#> GSM750741     1  0.1251    0.79082 0.956 0.008 0.000 0.000 0.036
#> GSM549286     2  0.0324    0.86076 0.000 0.992 0.004 0.000 0.004
#> GSM549241     1  0.1300    0.79027 0.956 0.028 0.000 0.000 0.016
#> GSM549247     2  0.1356    0.84711 0.028 0.956 0.000 0.012 0.004
#> GSM549261     1  0.1626    0.80919 0.940 0.016 0.000 0.000 0.044
#> GSM549270     2  0.2439    0.81261 0.000 0.876 0.120 0.000 0.004
#> GSM549277     3  0.2006    0.86686 0.000 0.072 0.916 0.000 0.012
#> GSM549280     3  0.1571    0.87297 0.000 0.060 0.936 0.000 0.004
#> GSM549281     1  0.6724    0.32647 0.568 0.200 0.196 0.000 0.036
#> GSM549285     3  0.3635    0.69012 0.000 0.004 0.748 0.000 0.248
#> GSM549288     3  0.3143    0.72604 0.000 0.204 0.796 0.000 0.000
#> GSM549292     2  0.0162    0.85957 0.000 0.996 0.000 0.000 0.004
#> GSM549295     3  0.3969    0.54711 0.000 0.304 0.692 0.000 0.004
#> GSM549297     2  0.4299    0.37202 0.000 0.608 0.388 0.000 0.004
#> GSM750743     1  0.1478    0.80637 0.936 0.000 0.000 0.000 0.064
#> GSM549268     1  0.6749   -0.00376 0.440 0.108 0.416 0.000 0.036
#> GSM549290     5  0.4990    0.29037 0.000 0.000 0.048 0.324 0.628
#> GSM549272     2  0.0486    0.86079 0.004 0.988 0.004 0.000 0.004
#> GSM549276     2  0.0955    0.85883 0.000 0.968 0.028 0.000 0.004
#> GSM549275     2  0.2513    0.80020 0.116 0.876 0.000 0.000 0.008
#> GSM549284     2  0.0727    0.85621 0.000 0.980 0.004 0.004 0.012
#> GSM750737     4  0.1485    0.85634 0.020 0.000 0.000 0.948 0.032
#> GSM750740     1  0.0510    0.81236 0.984 0.000 0.000 0.000 0.016
#> GSM750747     1  0.0510    0.81236 0.984 0.000 0.000 0.000 0.016
#> GSM750751     2  0.0771    0.85987 0.004 0.976 0.020 0.000 0.000
#> GSM750754     3  0.2569    0.85604 0.000 0.000 0.892 0.068 0.040

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.0603     0.8949 0.000 0.000 0.004 0.980 0.000 0.016
#> GSM549291     4  0.1780     0.8714 0.000 0.000 0.048 0.924 0.000 0.028
#> GSM549274     2  0.0713     0.8445 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM750738     2  0.6101     0.0986 0.000 0.404 0.000 0.364 0.004 0.228
#> GSM750748     1  0.0260     0.7112 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549240     2  0.4831     0.3485 0.380 0.572 0.000 0.028 0.000 0.020
#> GSM549279     6  0.5735     0.5318 0.112 0.108 0.128 0.000 0.000 0.652
#> GSM549294     2  0.1390     0.8386 0.004 0.948 0.016 0.000 0.000 0.032
#> GSM549300     3  0.1226     0.8120 0.000 0.004 0.952 0.000 0.004 0.040
#> GSM549303     3  0.3526     0.7730 0.000 0.000 0.792 0.016 0.020 0.172
#> GSM549309     3  0.2695     0.7903 0.000 0.000 0.844 0.004 0.008 0.144
#> GSM750753     2  0.5009     0.5421 0.000 0.624 0.256 0.000 0.000 0.120
#> GSM750752     4  0.0603     0.8956 0.000 0.000 0.000 0.980 0.004 0.016
#> GSM549304     2  0.2306     0.8099 0.000 0.888 0.016 0.004 0.000 0.092
#> GSM549305     2  0.0405     0.8461 0.000 0.988 0.008 0.000 0.000 0.004
#> GSM549307     3  0.0909     0.8151 0.000 0.012 0.968 0.000 0.000 0.020
#> GSM549306     3  0.0603     0.8162 0.000 0.004 0.980 0.000 0.000 0.016
#> GSM549308     3  0.0260     0.8169 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM549233     4  0.3453     0.8120 0.068 0.000 0.000 0.836 0.064 0.032
#> GSM549234     4  0.1196     0.8889 0.000 0.000 0.000 0.952 0.008 0.040
#> GSM549250     5  0.2604     0.7296 0.096 0.000 0.000 0.028 0.872 0.004
#> GSM549287     3  0.4788     0.7264 0.000 0.000 0.720 0.096 0.032 0.152
#> GSM750735     6  0.3713     0.6662 0.284 0.008 0.000 0.000 0.004 0.704
#> GSM750736     6  0.4189     0.6335 0.152 0.096 0.000 0.000 0.004 0.748
#> GSM750749     6  0.4130     0.6722 0.264 0.008 0.028 0.000 0.000 0.700
#> GSM549230     1  0.2980     0.5440 0.800 0.000 0.000 0.000 0.192 0.008
#> GSM549231     5  0.2821     0.7159 0.152 0.000 0.000 0.000 0.832 0.016
#> GSM549237     1  0.5238     0.1403 0.604 0.000 0.000 0.000 0.160 0.236
#> GSM549254     4  0.0547     0.8968 0.000 0.000 0.000 0.980 0.000 0.020
#> GSM750734     1  0.3869    -0.4872 0.500 0.000 0.000 0.000 0.000 0.500
#> GSM549271     3  0.2814     0.7030 0.000 0.000 0.820 0.172 0.000 0.008
#> GSM549232     4  0.0291     0.8967 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549246     4  0.4089     0.7050 0.176 0.000 0.000 0.760 0.040 0.024
#> GSM549248     5  0.4846     0.3033 0.356 0.000 0.000 0.000 0.576 0.068
#> GSM549255     4  0.0146     0.8963 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM750746     1  0.0547     0.7106 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM549259     1  0.0260     0.7122 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM549269     2  0.0146     0.8457 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549273     3  0.3560     0.7721 0.000 0.000 0.788 0.016 0.020 0.176
#> GSM549299     2  0.4832     0.4750 0.008 0.612 0.324 0.000 0.000 0.056
#> GSM549301     3  0.0551     0.8183 0.000 0.004 0.984 0.000 0.008 0.004
#> GSM549310     4  0.0858     0.8915 0.000 0.000 0.004 0.968 0.000 0.028
#> GSM549311     3  0.3973     0.7677 0.004 0.000 0.768 0.020 0.028 0.180
#> GSM549302     2  0.0146     0.8458 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549235     1  0.1082     0.7012 0.956 0.000 0.000 0.000 0.040 0.004
#> GSM549245     4  0.0458     0.8959 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM549265     5  0.5605     0.3946 0.000 0.000 0.000 0.212 0.544 0.244
#> GSM549282     5  0.1204     0.6878 0.000 0.000 0.056 0.000 0.944 0.000
#> GSM549296     4  0.0405     0.8960 0.000 0.000 0.004 0.988 0.000 0.008
#> GSM750739     6  0.3975     0.5215 0.452 0.000 0.000 0.000 0.004 0.544
#> GSM750742     5  0.3819     0.5397 0.316 0.000 0.000 0.000 0.672 0.012
#> GSM750744     6  0.5296     0.5674 0.260 0.000 0.000 0.000 0.152 0.588
#> GSM750750     3  0.0603     0.8167 0.000 0.000 0.980 0.000 0.016 0.004
#> GSM549242     1  0.4319     0.2103 0.576 0.000 0.000 0.400 0.000 0.024
#> GSM549252     4  0.1863     0.8783 0.000 0.000 0.000 0.920 0.044 0.036
#> GSM549253     1  0.4310    -0.2410 0.512 0.000 0.000 0.004 0.472 0.012
#> GSM549256     4  0.2631     0.7494 0.180 0.000 0.000 0.820 0.000 0.000
#> GSM549257     4  0.0146     0.8967 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM549263     5  0.4086     0.2732 0.464 0.000 0.000 0.000 0.528 0.008
#> GSM549267     4  0.3288     0.8202 0.000 0.000 0.036 0.848 0.064 0.052
#> GSM750745     6  0.3857     0.4949 0.468 0.000 0.000 0.000 0.000 0.532
#> GSM549239     1  0.3634    -0.0353 0.644 0.000 0.000 0.000 0.000 0.356
#> GSM549244     4  0.1003     0.8932 0.000 0.000 0.000 0.964 0.020 0.016
#> GSM549249     4  0.1429     0.8824 0.004 0.000 0.000 0.940 0.052 0.004
#> GSM549260     1  0.1082     0.6990 0.956 0.000 0.000 0.004 0.000 0.040
#> GSM549266     2  0.4659     0.5129 0.304 0.644 0.004 0.000 0.008 0.040
#> GSM549293     2  0.0603     0.8449 0.000 0.980 0.000 0.004 0.000 0.016
#> GSM549236     5  0.3000     0.7130 0.156 0.000 0.000 0.004 0.824 0.016
#> GSM549238     4  0.4165     0.2614 0.008 0.000 0.000 0.568 0.420 0.004
#> GSM549251     1  0.2066     0.6834 0.904 0.000 0.000 0.000 0.072 0.024
#> GSM549258     1  0.1556     0.6754 0.920 0.000 0.000 0.000 0.000 0.080
#> GSM549264     5  0.1579     0.7124 0.024 0.008 0.000 0.004 0.944 0.020
#> GSM549243     1  0.0891     0.7107 0.968 0.000 0.000 0.000 0.008 0.024
#> GSM549262     1  0.5033    -0.0542 0.476 0.000 0.000 0.000 0.452 0.072
#> GSM549278     4  0.3841     0.6318 0.000 0.000 0.244 0.724 0.000 0.032
#> GSM549283     3  0.5818     0.1046 0.000 0.352 0.456 0.000 0.000 0.192
#> GSM549298     3  0.0603     0.8170 0.000 0.000 0.980 0.000 0.004 0.016
#> GSM750741     6  0.3833     0.5404 0.444 0.000 0.000 0.000 0.000 0.556
#> GSM549286     2  0.0363     0.8448 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM549241     1  0.2178     0.5914 0.868 0.000 0.000 0.000 0.000 0.132
#> GSM549247     2  0.1364     0.8370 0.016 0.952 0.000 0.012 0.000 0.020
#> GSM549261     1  0.1908     0.6364 0.900 0.096 0.000 0.000 0.004 0.000
#> GSM549270     2  0.2586     0.7921 0.000 0.880 0.080 0.000 0.008 0.032
#> GSM549277     3  0.4407     0.7246 0.008 0.164 0.744 0.000 0.008 0.076
#> GSM549280     3  0.2058     0.7982 0.000 0.036 0.908 0.000 0.000 0.056
#> GSM549281     6  0.5566     0.6148 0.220 0.064 0.068 0.000 0.004 0.644
#> GSM549285     3  0.4233     0.6699 0.032 0.008 0.756 0.000 0.180 0.024
#> GSM549288     3  0.5060     0.4664 0.000 0.336 0.580 0.000 0.004 0.080
#> GSM549292     2  0.0458     0.8442 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM549295     3  0.5480     0.3327 0.000 0.368 0.520 0.000 0.008 0.104
#> GSM549297     2  0.4525     0.5597 0.000 0.696 0.228 0.000 0.008 0.068
#> GSM750743     6  0.3830     0.6141 0.376 0.000 0.000 0.000 0.004 0.620
#> GSM549268     6  0.6334     0.5040 0.140 0.080 0.180 0.000 0.008 0.592
#> GSM549290     5  0.3449     0.5961 0.000 0.000 0.016 0.196 0.780 0.008
#> GSM549272     2  0.0146     0.8457 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549276     2  0.0717     0.8453 0.000 0.976 0.008 0.000 0.000 0.016
#> GSM549275     2  0.4598     0.6941 0.132 0.732 0.020 0.000 0.000 0.116
#> GSM549284     2  0.1074     0.8412 0.000 0.960 0.000 0.000 0.012 0.028
#> GSM750737     6  0.3833     0.3308 0.008 0.000 0.000 0.344 0.000 0.648
#> GSM750740     1  0.0260     0.7116 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM750747     1  0.0260     0.7116 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM750751     2  0.0458     0.8464 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM750754     3  0.2633     0.8012 0.000 0.000 0.888 0.028 0.040 0.044

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-SD-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-SD-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-SD-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-SD-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-SD-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-SD-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-SD-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-SD-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-SD-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-SD-NMF-membership-heatmap-5

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)

plot of chunk tab-SD-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-SD-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-SD-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-SD-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-SD-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-SD-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk SD-NMF-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-SD-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-SD-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk SD-NMF-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> SD:NMF 101           0.0265    1.84e-05              0.011073  0.00189 2
#> SD:NMF  94           0.0118    1.13e-06              0.000277  0.01352 3
#> SD:NMF  96           0.1810    1.16e-05              0.011889  0.01151 4
#> SD:NMF  90           0.2371    6.82e-05              0.016348  0.06837 5
#> SD:NMF  85           0.3847    1.63e-03              0.001784  0.02574 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.


CV:hclust

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-hclust-collect-plots

The plots are:

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:

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)

plot of chunk CV-hclust-select-partition-number

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.456           0.868       0.909         0.4629 0.497   0.497
#> 3 3 0.569           0.749       0.857         0.3012 0.875   0.752
#> 4 4 0.629           0.763       0.848         0.0914 0.958   0.891
#> 5 5 0.704           0.735       0.845         0.0467 0.993   0.980
#> 6 6 0.725           0.653       0.807         0.0304 0.990   0.971

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.9933    -0.0821 0.548 0.452
#> GSM549291     2  0.8327     0.7976 0.264 0.736
#> GSM549274     2  0.5946     0.8964 0.144 0.856
#> GSM750738     2  0.7056     0.8749 0.192 0.808
#> GSM750748     1  0.0000     0.9446 1.000 0.000
#> GSM549240     1  0.2043     0.9298 0.968 0.032
#> GSM549279     2  0.9393     0.6534 0.356 0.644
#> GSM549294     2  0.5946     0.8963 0.144 0.856
#> GSM549300     2  0.2043     0.8636 0.032 0.968
#> GSM549303     2  0.0376     0.8463 0.004 0.996
#> GSM549309     2  0.1843     0.8521 0.028 0.972
#> GSM750753     2  0.5946     0.8972 0.144 0.856
#> GSM750752     2  0.7453     0.8522 0.212 0.788
#> GSM549304     2  0.7453     0.8592 0.212 0.788
#> GSM549305     2  0.5842     0.8973 0.140 0.860
#> GSM549307     2  0.1414     0.8573 0.020 0.980
#> GSM549306     2  0.0000     0.8449 0.000 1.000
#> GSM549308     2  0.0000     0.8449 0.000 1.000
#> GSM549233     1  0.0376     0.9434 0.996 0.004
#> GSM549234     1  0.2948     0.9167 0.948 0.052
#> GSM549250     1  0.0000     0.9446 1.000 0.000
#> GSM549287     2  0.7376     0.8549 0.208 0.792
#> GSM750735     1  0.0672     0.9422 0.992 0.008
#> GSM750736     1  0.0672     0.9422 0.992 0.008
#> GSM750749     1  0.3431     0.9043 0.936 0.064
#> GSM549230     1  0.0000     0.9446 1.000 0.000
#> GSM549231     1  0.0000     0.9446 1.000 0.000
#> GSM549237     1  0.0000     0.9446 1.000 0.000
#> GSM549254     1  0.9710     0.1420 0.600 0.400
#> GSM750734     1  0.0000     0.9446 1.000 0.000
#> GSM549271     2  0.7219     0.8612 0.200 0.800
#> GSM549232     1  0.3584     0.9017 0.932 0.068
#> GSM549246     1  0.3114     0.9150 0.944 0.056
#> GSM549248     1  0.0000     0.9446 1.000 0.000
#> GSM549255     1  0.3879     0.8937 0.924 0.076
#> GSM750746     1  0.0000     0.9446 1.000 0.000
#> GSM549259     1  0.0000     0.9446 1.000 0.000
#> GSM549269     2  0.5842     0.8973 0.140 0.860
#> GSM549273     2  0.0376     0.8463 0.004 0.996
#> GSM549299     2  0.7453     0.8592 0.212 0.788
#> GSM549301     2  0.0000     0.8449 0.000 1.000
#> GSM549310     2  0.7453     0.8520 0.212 0.788
#> GSM549311     2  0.0376     0.8463 0.004 0.996
#> GSM549302     2  0.5946     0.8964 0.144 0.856
#> GSM549235     1  0.0000     0.9446 1.000 0.000
#> GSM549245     1  0.3879     0.8937 0.924 0.076
#> GSM549265     1  0.3114     0.9139 0.944 0.056
#> GSM549282     2  0.5519     0.8932 0.128 0.872
#> GSM549296     2  0.7453     0.8522 0.212 0.788
#> GSM750739     1  0.0000     0.9446 1.000 0.000
#> GSM750742     1  0.0000     0.9446 1.000 0.000
#> GSM750744     1  0.0000     0.9446 1.000 0.000
#> GSM750750     2  0.5519     0.8932 0.128 0.872
#> GSM549242     1  0.0000     0.9446 1.000 0.000
#> GSM549252     1  0.1843     0.9328 0.972 0.028
#> GSM549253     1  0.0000     0.9446 1.000 0.000
#> GSM549256     1  0.0000     0.9446 1.000 0.000
#> GSM549257     1  0.3733     0.8978 0.928 0.072
#> GSM549263     1  0.0000     0.9446 1.000 0.000
#> GSM549267     2  0.7674     0.8401 0.224 0.776
#> GSM750745     1  0.0000     0.9446 1.000 0.000
#> GSM549239     1  0.0000     0.9446 1.000 0.000
#> GSM549244     1  0.2603     0.9224 0.956 0.044
#> GSM549249     1  0.1633     0.9351 0.976 0.024
#> GSM549260     1  0.0000     0.9446 1.000 0.000
#> GSM549266     2  0.9732     0.5403 0.404 0.596
#> GSM549293     2  0.5946     0.8964 0.144 0.856
#> GSM549236     1  0.0000     0.9446 1.000 0.000
#> GSM549238     1  0.1633     0.9351 0.976 0.024
#> GSM549251     1  0.0000     0.9446 1.000 0.000
#> GSM549258     1  0.1414     0.9368 0.980 0.020
#> GSM549264     1  0.0000     0.9446 1.000 0.000
#> GSM549243     1  0.0000     0.9446 1.000 0.000
#> GSM549262     1  0.0000     0.9446 1.000 0.000
#> GSM549278     2  0.9393     0.6426 0.356 0.644
#> GSM549283     2  0.8763     0.7612 0.296 0.704
#> GSM549298     2  0.0000     0.8449 0.000 1.000
#> GSM750741     1  0.1414     0.9368 0.980 0.020
#> GSM549286     2  0.5842     0.8973 0.140 0.860
#> GSM549241     1  0.1414     0.9368 0.980 0.020
#> GSM549247     1  0.2043     0.9298 0.968 0.032
#> GSM549261     1  0.0000     0.9446 1.000 0.000
#> GSM549270     2  0.5294     0.8963 0.120 0.880
#> GSM549277     2  0.4690     0.8928 0.100 0.900
#> GSM549280     2  0.4690     0.8933 0.100 0.900
#> GSM549281     1  0.9209     0.4065 0.664 0.336
#> GSM549285     2  0.6148     0.8895 0.152 0.848
#> GSM549288     2  0.4690     0.8928 0.100 0.900
#> GSM549292     2  0.5842     0.8973 0.140 0.860
#> GSM549295     2  0.0000     0.8449 0.000 1.000
#> GSM549297     2  0.4690     0.8928 0.100 0.900
#> GSM750743     1  0.0000     0.9446 1.000 0.000
#> GSM549268     1  0.9209     0.4065 0.664 0.336
#> GSM549290     2  0.7528     0.8526 0.216 0.784
#> GSM549272     2  0.5842     0.8973 0.140 0.860
#> GSM549276     2  0.5519     0.8970 0.128 0.872
#> GSM549275     1  0.3733     0.8984 0.928 0.072
#> GSM549284     2  0.7219     0.8712 0.200 0.800
#> GSM750737     1  0.4562     0.8694 0.904 0.096
#> GSM750740     1  0.0000     0.9446 1.000 0.000
#> GSM750747     1  0.0000     0.9446 1.000 0.000
#> GSM750751     2  0.5842     0.8971 0.140 0.860
#> GSM750754     2  0.8081     0.8142 0.248 0.752

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.9377      0.246 0.380 0.172 0.448
#> GSM549291     3  0.7664      0.603 0.104 0.228 0.668
#> GSM549274     2  0.1129      0.792 0.004 0.976 0.020
#> GSM750738     2  0.2527      0.766 0.044 0.936 0.020
#> GSM750748     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549240     1  0.1905      0.908 0.956 0.028 0.016
#> GSM549279     2  0.7762      0.502 0.212 0.668 0.120
#> GSM549294     2  0.3670      0.778 0.020 0.888 0.092
#> GSM549300     3  0.5988      0.375 0.000 0.368 0.632
#> GSM549303     3  0.3551      0.636 0.000 0.132 0.868
#> GSM549309     3  0.3193      0.638 0.004 0.100 0.896
#> GSM750753     2  0.5200      0.696 0.020 0.796 0.184
#> GSM750752     3  0.7394      0.612 0.064 0.284 0.652
#> GSM549304     2  0.4609      0.761 0.052 0.856 0.092
#> GSM549305     2  0.1031      0.792 0.000 0.976 0.024
#> GSM549307     3  0.5529      0.507 0.000 0.296 0.704
#> GSM549306     3  0.4702      0.580 0.000 0.212 0.788
#> GSM549308     3  0.4002      0.620 0.000 0.160 0.840
#> GSM549233     1  0.1170      0.917 0.976 0.016 0.008
#> GSM549234     1  0.5538      0.812 0.812 0.072 0.116
#> GSM549250     1  0.1711      0.911 0.960 0.008 0.032
#> GSM549287     3  0.7295      0.639 0.072 0.252 0.676
#> GSM750735     1  0.0747      0.919 0.984 0.016 0.000
#> GSM750736     1  0.0747      0.919 0.984 0.016 0.000
#> GSM750749     1  0.3791      0.869 0.892 0.060 0.048
#> GSM549230     1  0.0237      0.922 0.996 0.000 0.004
#> GSM549231     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549254     1  0.9509      0.036 0.484 0.220 0.296
#> GSM750734     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549271     3  0.7384      0.628 0.068 0.272 0.660
#> GSM549232     1  0.5851      0.790 0.792 0.068 0.140
#> GSM549246     1  0.3983      0.871 0.884 0.048 0.068
#> GSM549248     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549255     1  0.5939      0.787 0.788 0.072 0.140
#> GSM750746     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549269     2  0.0000      0.786 0.000 1.000 0.000
#> GSM549273     3  0.3412      0.633 0.000 0.124 0.876
#> GSM549299     2  0.4609      0.761 0.052 0.856 0.092
#> GSM549301     3  0.4002      0.620 0.000 0.160 0.840
#> GSM549310     3  0.7363      0.616 0.064 0.280 0.656
#> GSM549311     3  0.3412      0.633 0.000 0.124 0.876
#> GSM549302     2  0.0983      0.793 0.004 0.980 0.016
#> GSM549235     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549245     1  0.6087      0.778 0.780 0.076 0.144
#> GSM549265     1  0.5393      0.819 0.820 0.072 0.108
#> GSM549282     3  0.6322      0.623 0.024 0.276 0.700
#> GSM549296     3  0.7394      0.612 0.064 0.284 0.652
#> GSM750739     1  0.0000      0.922 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.922 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.922 1.000 0.000 0.000
#> GSM750750     3  0.6287      0.626 0.024 0.272 0.704
#> GSM549242     1  0.0475      0.922 0.992 0.004 0.004
#> GSM549252     1  0.4902      0.840 0.844 0.064 0.092
#> GSM549253     1  0.0237      0.922 0.996 0.004 0.000
#> GSM549256     1  0.0829      0.920 0.984 0.004 0.012
#> GSM549257     1  0.5913      0.786 0.788 0.068 0.144
#> GSM549263     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549267     3  0.7106      0.635 0.072 0.232 0.696
#> GSM750745     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549244     1  0.5467      0.815 0.816 0.072 0.112
#> GSM549249     1  0.5004      0.836 0.840 0.072 0.088
#> GSM549260     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549266     2  0.8350      0.367 0.280 0.600 0.120
#> GSM549293     2  0.0983      0.793 0.004 0.980 0.016
#> GSM549236     1  0.0424      0.922 0.992 0.000 0.008
#> GSM549238     1  0.4921      0.839 0.844 0.072 0.084
#> GSM549251     1  0.0237      0.922 0.996 0.000 0.004
#> GSM549258     1  0.1170      0.916 0.976 0.016 0.008
#> GSM549264     1  0.0475      0.922 0.992 0.004 0.004
#> GSM549243     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549278     3  0.8726      0.483 0.196 0.212 0.592
#> GSM549283     2  0.6634      0.629 0.144 0.752 0.104
#> GSM549298     3  0.4178      0.612 0.000 0.172 0.828
#> GSM750741     1  0.1170      0.916 0.976 0.016 0.008
#> GSM549286     2  0.0000      0.786 0.000 1.000 0.000
#> GSM549241     1  0.1170      0.916 0.976 0.016 0.008
#> GSM549247     1  0.1905      0.908 0.956 0.028 0.016
#> GSM549261     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549270     2  0.4291      0.698 0.000 0.820 0.180
#> GSM549277     2  0.5706      0.468 0.000 0.680 0.320
#> GSM549280     2  0.6104      0.392 0.004 0.648 0.348
#> GSM549281     1  0.8160      0.430 0.608 0.288 0.104
#> GSM549285     3  0.8157      0.382 0.072 0.412 0.516
#> GSM549288     2  0.5968      0.356 0.000 0.636 0.364
#> GSM549292     2  0.0000      0.786 0.000 1.000 0.000
#> GSM549295     3  0.5529      0.488 0.000 0.296 0.704
#> GSM549297     2  0.5216      0.586 0.000 0.740 0.260
#> GSM750743     1  0.0000      0.922 1.000 0.000 0.000
#> GSM549268     1  0.8160      0.430 0.608 0.288 0.104
#> GSM549290     3  0.7376      0.633 0.076 0.252 0.672
#> GSM549272     2  0.0000      0.786 0.000 1.000 0.000
#> GSM549276     2  0.3340      0.755 0.000 0.880 0.120
#> GSM549275     1  0.4136      0.834 0.864 0.116 0.020
#> GSM549284     2  0.4848      0.712 0.036 0.836 0.128
#> GSM750737     1  0.4097      0.861 0.880 0.060 0.060
#> GSM750740     1  0.0000      0.922 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.922 1.000 0.000 0.000
#> GSM750751     2  0.2063      0.794 0.008 0.948 0.044
#> GSM750754     3  0.7339      0.621 0.088 0.224 0.688

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.5442      0.443 0.336 0.000 0.028 0.636
#> GSM549291     4  0.3667      0.722 0.056 0.000 0.088 0.856
#> GSM549274     2  0.2189      0.755 0.004 0.932 0.020 0.044
#> GSM750738     2  0.3302      0.718 0.032 0.888 0.016 0.064
#> GSM750748     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549240     1  0.1993      0.895 0.944 0.016 0.024 0.016
#> GSM549279     2  0.8898      0.492 0.180 0.500 0.124 0.196
#> GSM549294     2  0.5505      0.739 0.016 0.752 0.072 0.160
#> GSM549300     3  0.5417      0.565 0.000 0.284 0.676 0.040
#> GSM549303     3  0.2882      0.820 0.000 0.024 0.892 0.084
#> GSM549309     3  0.3450      0.749 0.000 0.008 0.836 0.156
#> GSM750753     2  0.6743      0.672 0.016 0.656 0.176 0.152
#> GSM750752     4  0.4340      0.713 0.024 0.044 0.096 0.836
#> GSM549304     2  0.6053      0.734 0.032 0.728 0.084 0.156
#> GSM549305     2  0.2845      0.760 0.000 0.896 0.028 0.076
#> GSM549307     3  0.4562      0.732 0.000 0.208 0.764 0.028
#> GSM549306     3  0.3205      0.836 0.000 0.104 0.872 0.024
#> GSM549308     3  0.2565      0.853 0.000 0.056 0.912 0.032
#> GSM549233     1  0.1118      0.909 0.964 0.000 0.000 0.036
#> GSM549234     1  0.3801      0.761 0.780 0.000 0.000 0.220
#> GSM549250     1  0.1302      0.903 0.956 0.000 0.000 0.044
#> GSM549287     4  0.4567      0.710 0.032 0.008 0.168 0.792
#> GSM750735     1  0.0707      0.913 0.980 0.000 0.000 0.020
#> GSM750736     1  0.0707      0.913 0.980 0.000 0.000 0.020
#> GSM750749     1  0.3292      0.855 0.880 0.004 0.036 0.080
#> GSM549230     1  0.0188      0.917 0.996 0.000 0.000 0.004
#> GSM549231     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549237     1  0.0188      0.918 0.996 0.000 0.000 0.004
#> GSM549254     4  0.5893      0.136 0.444 0.012 0.016 0.528
#> GSM750734     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549271     4  0.4840      0.714 0.032 0.028 0.144 0.796
#> GSM549232     1  0.4122      0.735 0.760 0.000 0.004 0.236
#> GSM549246     1  0.2999      0.847 0.864 0.000 0.004 0.132
#> GSM549248     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549255     1  0.4155      0.731 0.756 0.000 0.004 0.240
#> GSM750746     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549269     2  0.1004      0.734 0.000 0.972 0.004 0.024
#> GSM549273     3  0.2882      0.820 0.000 0.024 0.892 0.084
#> GSM549299     2  0.6097      0.732 0.032 0.724 0.084 0.160
#> GSM549301     3  0.2565      0.853 0.000 0.056 0.912 0.032
#> GSM549310     4  0.4370      0.715 0.024 0.032 0.116 0.828
#> GSM549311     3  0.2882      0.820 0.000 0.024 0.892 0.084
#> GSM549302     2  0.2099      0.755 0.004 0.936 0.020 0.040
#> GSM549235     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549245     1  0.4220      0.720 0.748 0.000 0.004 0.248
#> GSM549265     1  0.3726      0.772 0.788 0.000 0.000 0.212
#> GSM549282     4  0.6099      0.394 0.024 0.016 0.396 0.564
#> GSM549296     4  0.4254      0.714 0.024 0.040 0.096 0.840
#> GSM750739     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM750750     4  0.6109      0.386 0.024 0.016 0.400 0.560
#> GSM549242     1  0.0469      0.917 0.988 0.000 0.000 0.012
#> GSM549252     1  0.3444      0.800 0.816 0.000 0.000 0.184
#> GSM549253     1  0.0188      0.917 0.996 0.000 0.000 0.004
#> GSM549256     1  0.0707      0.915 0.980 0.000 0.000 0.020
#> GSM549257     1  0.4155      0.730 0.756 0.000 0.004 0.240
#> GSM549263     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549267     4  0.3958      0.719 0.032 0.000 0.144 0.824
#> GSM750745     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549244     1  0.3870      0.770 0.788 0.000 0.004 0.208
#> GSM549249     1  0.3400      0.803 0.820 0.000 0.000 0.180
#> GSM549260     1  0.0376      0.916 0.992 0.000 0.004 0.004
#> GSM549266     2  0.9167      0.335 0.260 0.440 0.112 0.188
#> GSM549293     2  0.2099      0.755 0.004 0.936 0.020 0.040
#> GSM549236     1  0.0469      0.916 0.988 0.000 0.000 0.012
#> GSM549238     1  0.3356      0.807 0.824 0.000 0.000 0.176
#> GSM549251     1  0.0336      0.917 0.992 0.000 0.000 0.008
#> GSM549258     1  0.1394      0.905 0.964 0.008 0.012 0.016
#> GSM549264     1  0.0592      0.915 0.984 0.000 0.000 0.016
#> GSM549243     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549278     4  0.4758      0.652 0.156 0.000 0.064 0.780
#> GSM549283     2  0.7942      0.638 0.104 0.596 0.108 0.192
#> GSM549298     3  0.2521      0.852 0.000 0.064 0.912 0.024
#> GSM750741     1  0.1394      0.905 0.964 0.008 0.012 0.016
#> GSM549286     2  0.0657      0.738 0.000 0.984 0.004 0.012
#> GSM549241     1  0.1394      0.905 0.964 0.008 0.012 0.016
#> GSM549247     1  0.1993      0.895 0.944 0.016 0.024 0.016
#> GSM549261     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM549270     2  0.5855      0.689 0.000 0.704 0.160 0.136
#> GSM549277     2  0.7198      0.460 0.000 0.520 0.320 0.160
#> GSM549280     2  0.7396      0.404 0.004 0.500 0.340 0.156
#> GSM549281     1  0.8037      0.390 0.592 0.180 0.116 0.112
#> GSM549285     4  0.8321      0.253 0.056 0.136 0.336 0.472
#> GSM549288     2  0.7286      0.362 0.000 0.480 0.364 0.156
#> GSM549292     2  0.0895      0.734 0.000 0.976 0.004 0.020
#> GSM549295     3  0.4054      0.765 0.000 0.188 0.796 0.016
#> GSM549297     2  0.6509      0.607 0.000 0.632 0.228 0.140
#> GSM750743     1  0.0188      0.917 0.996 0.000 0.000 0.004
#> GSM549268     1  0.8037      0.390 0.592 0.180 0.116 0.112
#> GSM549290     4  0.5172      0.673 0.036 0.008 0.220 0.736
#> GSM549272     2  0.1004      0.734 0.000 0.972 0.004 0.024
#> GSM549276     2  0.4982      0.731 0.000 0.772 0.092 0.136
#> GSM549275     1  0.4805      0.784 0.820 0.052 0.052 0.076
#> GSM549284     2  0.5182      0.679 0.024 0.776 0.048 0.152
#> GSM750737     1  0.3016      0.847 0.872 0.004 0.004 0.120
#> GSM750740     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.918 1.000 0.000 0.000 0.000
#> GSM750751     2  0.4001      0.761 0.004 0.840 0.048 0.108
#> GSM750754     4  0.3850      0.726 0.044 0.000 0.116 0.840

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.4380      0.375 0.304 0.000 0.000 0.676 0.020
#> GSM549291     4  0.2099      0.701 0.024 0.000 0.024 0.928 0.024
#> GSM549274     2  0.1443      0.711 0.004 0.948 0.004 0.000 0.044
#> GSM750738     2  0.3246      0.646 0.024 0.848 0.000 0.008 0.120
#> GSM750748     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549240     1  0.2177      0.868 0.908 0.004 0.000 0.008 0.080
#> GSM549279     2  0.7571      0.347 0.124 0.436 0.036 0.032 0.372
#> GSM549294     2  0.4822      0.686 0.012 0.740 0.020 0.028 0.200
#> GSM549300     3  0.6120      0.438 0.000 0.224 0.596 0.008 0.172
#> GSM549303     3  0.1568      0.710 0.000 0.000 0.944 0.036 0.020
#> GSM549309     3  0.3115      0.614 0.000 0.000 0.852 0.112 0.036
#> GSM750753     2  0.6196      0.572 0.004 0.592 0.124 0.012 0.268
#> GSM750752     4  0.2777      0.685 0.000 0.028 0.040 0.896 0.036
#> GSM549304     2  0.4845      0.659 0.012 0.684 0.024 0.004 0.276
#> GSM549305     2  0.2519      0.713 0.000 0.884 0.016 0.000 0.100
#> GSM549307     3  0.5359      0.611 0.000 0.148 0.692 0.008 0.152
#> GSM549306     3  0.3902      0.732 0.000 0.048 0.808 0.008 0.136
#> GSM549308     3  0.2732      0.766 0.000 0.020 0.884 0.008 0.088
#> GSM549233     1  0.1168      0.901 0.960 0.000 0.000 0.032 0.008
#> GSM549234     1  0.3877      0.745 0.764 0.000 0.000 0.212 0.024
#> GSM549250     1  0.1408      0.893 0.948 0.000 0.000 0.044 0.008
#> GSM549287     4  0.3464      0.661 0.000 0.000 0.096 0.836 0.068
#> GSM750735     1  0.0609      0.906 0.980 0.000 0.000 0.020 0.000
#> GSM750736     1  0.0609      0.906 0.980 0.000 0.000 0.020 0.000
#> GSM750749     1  0.3473      0.835 0.852 0.004 0.008 0.052 0.084
#> GSM549230     1  0.0451      0.908 0.988 0.000 0.000 0.008 0.004
#> GSM549231     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549237     1  0.0324      0.909 0.992 0.000 0.000 0.004 0.004
#> GSM549254     4  0.5482      0.198 0.416 0.004 0.004 0.532 0.044
#> GSM750734     1  0.0000      0.908 1.000 0.000 0.000 0.000 0.000
#> GSM549271     4  0.3320      0.669 0.000 0.012 0.068 0.860 0.060
#> GSM549232     1  0.4083      0.720 0.744 0.000 0.000 0.228 0.028
#> GSM549246     1  0.3099      0.836 0.848 0.000 0.000 0.124 0.028
#> GSM549248     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549255     1  0.4083      0.720 0.744 0.000 0.000 0.228 0.028
#> GSM750746     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549259     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549269     2  0.1197      0.683 0.000 0.952 0.000 0.000 0.048
#> GSM549273     3  0.1582      0.708 0.000 0.000 0.944 0.028 0.028
#> GSM549299     2  0.4867      0.657 0.012 0.680 0.024 0.004 0.280
#> GSM549301     3  0.2732      0.766 0.000 0.020 0.884 0.008 0.088
#> GSM549310     4  0.2897      0.684 0.000 0.020 0.072 0.884 0.024
#> GSM549311     3  0.1582      0.708 0.000 0.000 0.944 0.028 0.028
#> GSM549302     2  0.1492      0.711 0.004 0.948 0.008 0.000 0.040
#> GSM549235     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549245     1  0.4169      0.705 0.732 0.000 0.000 0.240 0.028
#> GSM549265     1  0.3812      0.758 0.772 0.000 0.000 0.204 0.024
#> GSM549282     5  0.6171      0.805 0.004 0.016 0.204 0.152 0.624
#> GSM549296     4  0.2689      0.687 0.000 0.024 0.040 0.900 0.036
#> GSM750739     1  0.0000      0.908 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM750744     1  0.0000      0.908 1.000 0.000 0.000 0.000 0.000
#> GSM750750     5  0.6198      0.804 0.004 0.016 0.208 0.152 0.620
#> GSM549242     1  0.0566      0.908 0.984 0.000 0.000 0.012 0.004
#> GSM549252     1  0.3565      0.784 0.800 0.000 0.000 0.176 0.024
#> GSM549253     1  0.0324      0.908 0.992 0.000 0.000 0.004 0.004
#> GSM549256     1  0.0771      0.907 0.976 0.000 0.000 0.020 0.004
#> GSM549257     1  0.4113      0.714 0.740 0.000 0.000 0.232 0.028
#> GSM549263     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549267     4  0.2914      0.673 0.000 0.000 0.052 0.872 0.076
#> GSM750745     1  0.0000      0.908 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549244     1  0.3863      0.756 0.772 0.000 0.000 0.200 0.028
#> GSM549249     1  0.3527      0.788 0.804 0.000 0.000 0.172 0.024
#> GSM549260     1  0.0798      0.903 0.976 0.000 0.000 0.008 0.016
#> GSM549266     2  0.8028      0.203 0.212 0.388 0.032 0.036 0.332
#> GSM549293     2  0.1492      0.711 0.004 0.948 0.008 0.000 0.040
#> GSM549236     1  0.0693      0.906 0.980 0.000 0.000 0.012 0.008
#> GSM549238     1  0.3488      0.792 0.808 0.000 0.000 0.168 0.024
#> GSM549251     1  0.0451      0.908 0.988 0.000 0.000 0.008 0.004
#> GSM549258     1  0.1557      0.885 0.940 0.000 0.000 0.008 0.052
#> GSM549264     1  0.0693      0.906 0.980 0.000 0.000 0.008 0.012
#> GSM549243     1  0.0000      0.908 1.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549278     4  0.3344      0.624 0.112 0.000 0.012 0.848 0.028
#> GSM549283     2  0.6249      0.524 0.044 0.536 0.028 0.016 0.376
#> GSM549298     3  0.2761      0.762 0.000 0.024 0.872 0.000 0.104
#> GSM750741     1  0.1557      0.885 0.940 0.000 0.000 0.008 0.052
#> GSM549286     2  0.1270      0.690 0.000 0.948 0.000 0.000 0.052
#> GSM549241     1  0.1557      0.885 0.940 0.000 0.000 0.008 0.052
#> GSM549247     1  0.2177      0.868 0.908 0.004 0.000 0.008 0.080
#> GSM549261     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM549270     2  0.5094      0.640 0.000 0.696 0.076 0.008 0.220
#> GSM549277     2  0.6975      0.369 0.000 0.460 0.236 0.016 0.288
#> GSM549280     2  0.7166      0.330 0.000 0.444 0.248 0.024 0.284
#> GSM549281     1  0.7667      0.380 0.560 0.132 0.052 0.060 0.196
#> GSM549285     5  0.6328      0.623 0.020 0.092 0.124 0.080 0.684
#> GSM549288     2  0.7121      0.273 0.000 0.416 0.284 0.016 0.284
#> GSM549292     2  0.1121      0.684 0.000 0.956 0.000 0.000 0.044
#> GSM549295     3  0.4955      0.660 0.000 0.132 0.732 0.008 0.128
#> GSM549297     2  0.5847      0.561 0.000 0.624 0.132 0.008 0.236
#> GSM750743     1  0.0162      0.908 0.996 0.000 0.000 0.004 0.000
#> GSM549268     1  0.7667      0.380 0.560 0.132 0.052 0.060 0.196
#> GSM549290     4  0.5592      0.379 0.008 0.000 0.140 0.664 0.188
#> GSM549272     2  0.1043      0.687 0.000 0.960 0.000 0.000 0.040
#> GSM549276     2  0.4056      0.682 0.000 0.768 0.024 0.008 0.200
#> GSM549275     1  0.4185      0.713 0.752 0.024 0.000 0.008 0.216
#> GSM549284     2  0.5144      0.589 0.016 0.756 0.032 0.060 0.136
#> GSM750737     1  0.3035      0.833 0.856 0.000 0.000 0.112 0.032
#> GSM750740     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM750747     1  0.0162      0.908 0.996 0.000 0.000 0.000 0.004
#> GSM750751     2  0.3313      0.714 0.004 0.844 0.016 0.008 0.128
#> GSM750754     4  0.2688      0.693 0.012 0.000 0.036 0.896 0.056

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.4311      0.163 0.296 0.000 0.000 0.668 0.024 0.012
#> GSM549291     4  0.1873      0.722 0.020 0.000 0.008 0.924 0.000 0.048
#> GSM549274     2  0.1511      0.665 0.000 0.940 0.012 0.000 0.044 0.004
#> GSM750738     2  0.4129      0.568 0.004 0.720 0.000 0.008 0.240 0.028
#> GSM750748     1  0.0547      0.838 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM549240     1  0.2402      0.723 0.856 0.004 0.000 0.000 0.140 0.000
#> GSM549279     2  0.7969      0.342 0.076 0.416 0.052 0.028 0.312 0.116
#> GSM549294     2  0.4864      0.645 0.000 0.748 0.040 0.020 0.080 0.112
#> GSM549300     3  0.5292      0.482 0.000 0.188 0.680 0.004 0.076 0.052
#> GSM549303     3  0.4167      0.672 0.000 0.000 0.772 0.032 0.056 0.140
#> GSM549309     3  0.5337      0.583 0.000 0.000 0.680 0.116 0.056 0.148
#> GSM750753     2  0.6609      0.525 0.000 0.564 0.188 0.008 0.128 0.112
#> GSM750752     4  0.2528      0.704 0.000 0.016 0.012 0.900 0.032 0.040
#> GSM549304     2  0.5398      0.607 0.000 0.668 0.040 0.004 0.184 0.104
#> GSM549305     2  0.3547      0.667 0.000 0.828 0.036 0.000 0.088 0.048
#> GSM549307     3  0.4193      0.619 0.000 0.140 0.776 0.004 0.044 0.036
#> GSM549306     3  0.2471      0.718 0.000 0.044 0.900 0.004 0.032 0.020
#> GSM549308     3  0.0665      0.747 0.000 0.008 0.980 0.004 0.000 0.008
#> GSM549233     1  0.1636      0.825 0.936 0.000 0.000 0.024 0.036 0.004
#> GSM549234     1  0.3888      0.594 0.752 0.000 0.000 0.208 0.024 0.016
#> GSM549250     1  0.1367      0.820 0.944 0.000 0.000 0.044 0.012 0.000
#> GSM549287     4  0.3068      0.692 0.000 0.000 0.032 0.840 0.008 0.120
#> GSM750735     1  0.1151      0.830 0.956 0.000 0.000 0.012 0.032 0.000
#> GSM750736     1  0.1151      0.830 0.956 0.000 0.000 0.012 0.032 0.000
#> GSM750749     1  0.3728      0.681 0.816 0.000 0.008 0.040 0.112 0.024
#> GSM549230     1  0.0767      0.841 0.976 0.000 0.000 0.008 0.012 0.004
#> GSM549231     1  0.0260      0.840 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549237     1  0.0777      0.839 0.972 0.000 0.000 0.004 0.024 0.000
#> GSM549254     4  0.5535     -0.178 0.376 0.000 0.000 0.524 0.076 0.024
#> GSM750734     1  0.0363      0.840 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549271     4  0.2994      0.699 0.000 0.008 0.024 0.868 0.024 0.076
#> GSM549232     1  0.4073      0.561 0.732 0.000 0.000 0.224 0.028 0.016
#> GSM549246     1  0.3263      0.720 0.832 0.000 0.000 0.116 0.040 0.012
#> GSM549248     1  0.0260      0.840 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549255     1  0.4073      0.560 0.732 0.000 0.000 0.224 0.028 0.016
#> GSM750746     1  0.0547      0.838 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM549259     1  0.0458      0.839 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM549269     2  0.2669      0.613 0.000 0.836 0.000 0.000 0.156 0.008
#> GSM549273     3  0.4223      0.665 0.000 0.000 0.760 0.024 0.060 0.156
#> GSM549299     2  0.5439      0.605 0.000 0.664 0.040 0.004 0.184 0.108
#> GSM549301     3  0.0810      0.747 0.000 0.008 0.976 0.004 0.004 0.008
#> GSM549310     4  0.2732      0.702 0.000 0.008 0.032 0.888 0.024 0.048
#> GSM549311     3  0.4223      0.665 0.000 0.000 0.760 0.024 0.060 0.156
#> GSM549302     2  0.1320      0.666 0.000 0.948 0.016 0.000 0.036 0.000
#> GSM549235     1  0.0547      0.838 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM549245     1  0.4150      0.539 0.720 0.000 0.000 0.236 0.028 0.016
#> GSM549265     1  0.3799      0.617 0.764 0.000 0.000 0.196 0.024 0.016
#> GSM549282     6  0.3590      0.828 0.000 0.012 0.112 0.064 0.000 0.812
#> GSM549296     4  0.2403      0.706 0.000 0.008 0.012 0.904 0.032 0.044
#> GSM750739     1  0.0146      0.839 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM750742     1  0.0260      0.840 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM750744     1  0.0363      0.840 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM750750     6  0.3634      0.828 0.000 0.012 0.116 0.064 0.000 0.808
#> GSM549242     1  0.1116      0.836 0.960 0.000 0.000 0.008 0.028 0.004
#> GSM549252     1  0.3606      0.653 0.788 0.000 0.000 0.172 0.024 0.016
#> GSM549253     1  0.0508      0.840 0.984 0.000 0.000 0.004 0.012 0.000
#> GSM549256     1  0.1313      0.834 0.952 0.000 0.000 0.016 0.028 0.004
#> GSM549257     1  0.4099      0.553 0.728 0.000 0.000 0.228 0.028 0.016
#> GSM549263     1  0.0260      0.840 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549267     4  0.2544      0.699 0.000 0.000 0.012 0.864 0.004 0.120
#> GSM750745     1  0.0363      0.840 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549239     1  0.0363      0.839 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549244     1  0.3875      0.612 0.760 0.000 0.000 0.196 0.028 0.016
#> GSM549249     1  0.3572      0.660 0.792 0.000 0.000 0.168 0.024 0.016
#> GSM549260     1  0.1584      0.813 0.928 0.000 0.000 0.000 0.064 0.008
#> GSM549266     2  0.8392      0.187 0.172 0.376 0.048 0.020 0.260 0.124
#> GSM549293     2  0.1320      0.666 0.000 0.948 0.016 0.000 0.036 0.000
#> GSM549236     1  0.0717      0.837 0.976 0.000 0.000 0.008 0.016 0.000
#> GSM549238     1  0.3537      0.665 0.796 0.000 0.000 0.164 0.024 0.016
#> GSM549251     1  0.0748      0.841 0.976 0.000 0.000 0.004 0.016 0.004
#> GSM549258     1  0.1765      0.779 0.904 0.000 0.000 0.000 0.096 0.000
#> GSM549264     1  0.0692      0.838 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM549243     1  0.0146      0.840 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549262     1  0.0260      0.840 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549278     4  0.3467      0.660 0.092 0.000 0.004 0.836 0.032 0.036
#> GSM549283     2  0.6547      0.474 0.004 0.512 0.040 0.016 0.312 0.116
#> GSM549298     3  0.1078      0.745 0.000 0.016 0.964 0.000 0.012 0.008
#> GSM750741     1  0.1765      0.780 0.904 0.000 0.000 0.000 0.096 0.000
#> GSM549286     2  0.2489      0.626 0.000 0.860 0.000 0.000 0.128 0.012
#> GSM549241     1  0.1765      0.779 0.904 0.000 0.000 0.000 0.096 0.000
#> GSM549247     1  0.2402      0.723 0.856 0.004 0.000 0.000 0.140 0.000
#> GSM549261     1  0.0547      0.838 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM549270     2  0.5492      0.597 0.000 0.676 0.100 0.000 0.100 0.124
#> GSM549277     2  0.7284      0.336 0.000 0.428 0.268 0.004 0.132 0.168
#> GSM549280     2  0.7275      0.313 0.000 0.412 0.308 0.008 0.108 0.164
#> GSM549281     1  0.7671     -0.301 0.524 0.092 0.068 0.040 0.212 0.064
#> GSM549285     6  0.6034      0.648 0.000 0.068 0.140 0.016 0.136 0.640
#> GSM549288     2  0.7071      0.287 0.000 0.408 0.336 0.004 0.092 0.160
#> GSM549292     2  0.2593      0.615 0.000 0.844 0.000 0.000 0.148 0.008
#> GSM549295     3  0.3824      0.660 0.000 0.124 0.804 0.004 0.040 0.028
#> GSM549297     2  0.6160      0.519 0.000 0.600 0.160 0.000 0.096 0.144
#> GSM750743     1  0.0458      0.839 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM549268     1  0.7671     -0.301 0.524 0.092 0.068 0.040 0.212 0.064
#> GSM549290     4  0.5139      0.374 0.008 0.000 0.032 0.616 0.032 0.312
#> GSM549272     2  0.2482      0.619 0.000 0.848 0.000 0.000 0.148 0.004
#> GSM549276     2  0.4368      0.638 0.000 0.764 0.040 0.000 0.072 0.124
#> GSM549275     5  0.4651      0.000 0.372 0.012 0.000 0.000 0.588 0.028
#> GSM549284     2  0.5819      0.511 0.000 0.632 0.020 0.032 0.212 0.104
#> GSM750737     1  0.3655      0.671 0.812 0.000 0.000 0.100 0.072 0.016
#> GSM750740     1  0.0547      0.838 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM750747     1  0.0547      0.838 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM750751     2  0.3807      0.671 0.000 0.816 0.032 0.004 0.084 0.064
#> GSM750754     4  0.2412      0.716 0.012 0.000 0.012 0.892 0.004 0.080

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-hclust-membership-heatmap-5

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)

plot of chunk tab-CV-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-hclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-CV-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-hclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> CV:hclust 99           0.0118    5.39e-05               0.11238  0.00542 2
#> CV:hclust 91           0.0181    5.05e-06               0.00339  0.07621 3
#> CV:hclust 91           0.0288    3.93e-06               0.01607  0.06811 4
#> CV:hclust 92           0.0904    4.97e-05               0.05658  0.06735 5
#> CV:hclust 90           0.0427    2.25e-05               0.02519  0.07104 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.


CV:kmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-kmeans-collect-plots

The plots are:

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:

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)

plot of chunk CV-kmeans-select-partition-number

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.982       0.994          0.505 0.496   0.496
#> 3 3 0.738           0.822       0.894          0.260 0.883   0.763
#> 4 4 0.765           0.856       0.902          0.150 0.842   0.607
#> 5 5 0.728           0.687       0.791          0.072 0.923   0.722
#> 6 6 0.712           0.617       0.791          0.043 0.958   0.811

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 2

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1   0.000    0.99679 1.000 0.000
#> GSM549291     2   0.000    0.98977 0.000 1.000
#> GSM549274     2   0.000    0.98977 0.000 1.000
#> GSM750738     2   0.000    0.98977 0.000 1.000
#> GSM750748     1   0.000    0.99679 1.000 0.000
#> GSM549240     1   0.000    0.99679 1.000 0.000
#> GSM549279     2   0.000    0.98977 0.000 1.000
#> GSM549294     2   0.000    0.98977 0.000 1.000
#> GSM549300     2   0.000    0.98977 0.000 1.000
#> GSM549303     2   0.000    0.98977 0.000 1.000
#> GSM549309     2   0.000    0.98977 0.000 1.000
#> GSM750753     2   0.000    0.98977 0.000 1.000
#> GSM750752     2   0.000    0.98977 0.000 1.000
#> GSM549304     2   0.000    0.98977 0.000 1.000
#> GSM549305     2   0.000    0.98977 0.000 1.000
#> GSM549307     2   0.000    0.98977 0.000 1.000
#> GSM549306     2   0.000    0.98977 0.000 1.000
#> GSM549308     2   0.000    0.98977 0.000 1.000
#> GSM549233     1   0.000    0.99679 1.000 0.000
#> GSM549234     1   0.000    0.99679 1.000 0.000
#> GSM549250     1   0.000    0.99679 1.000 0.000
#> GSM549287     2   0.000    0.98977 0.000 1.000
#> GSM750735     1   0.000    0.99679 1.000 0.000
#> GSM750736     1   0.000    0.99679 1.000 0.000
#> GSM750749     1   0.644    0.80063 0.836 0.164
#> GSM549230     1   0.000    0.99679 1.000 0.000
#> GSM549231     1   0.000    0.99679 1.000 0.000
#> GSM549237     1   0.000    0.99679 1.000 0.000
#> GSM549254     1   0.000    0.99679 1.000 0.000
#> GSM750734     1   0.000    0.99679 1.000 0.000
#> GSM549271     2   0.000    0.98977 0.000 1.000
#> GSM549232     1   0.000    0.99679 1.000 0.000
#> GSM549246     1   0.000    0.99679 1.000 0.000
#> GSM549248     1   0.000    0.99679 1.000 0.000
#> GSM549255     1   0.000    0.99679 1.000 0.000
#> GSM750746     1   0.000    0.99679 1.000 0.000
#> GSM549259     1   0.000    0.99679 1.000 0.000
#> GSM549269     2   0.000    0.98977 0.000 1.000
#> GSM549273     2   0.000    0.98977 0.000 1.000
#> GSM549299     2   0.000    0.98977 0.000 1.000
#> GSM549301     2   0.000    0.98977 0.000 1.000
#> GSM549310     2   0.000    0.98977 0.000 1.000
#> GSM549311     2   0.000    0.98977 0.000 1.000
#> GSM549302     2   0.000    0.98977 0.000 1.000
#> GSM549235     1   0.000    0.99679 1.000 0.000
#> GSM549245     1   0.000    0.99679 1.000 0.000
#> GSM549265     1   0.000    0.99679 1.000 0.000
#> GSM549282     2   0.000    0.98977 0.000 1.000
#> GSM549296     2   0.000    0.98977 0.000 1.000
#> GSM750739     1   0.000    0.99679 1.000 0.000
#> GSM750742     1   0.000    0.99679 1.000 0.000
#> GSM750744     1   0.000    0.99679 1.000 0.000
#> GSM750750     2   0.000    0.98977 0.000 1.000
#> GSM549242     1   0.000    0.99679 1.000 0.000
#> GSM549252     1   0.000    0.99679 1.000 0.000
#> GSM549253     1   0.000    0.99679 1.000 0.000
#> GSM549256     1   0.000    0.99679 1.000 0.000
#> GSM549257     1   0.000    0.99679 1.000 0.000
#> GSM549263     1   0.000    0.99679 1.000 0.000
#> GSM549267     2   0.000    0.98977 0.000 1.000
#> GSM750745     1   0.000    0.99679 1.000 0.000
#> GSM549239     1   0.000    0.99679 1.000 0.000
#> GSM549244     1   0.000    0.99679 1.000 0.000
#> GSM549249     1   0.000    0.99679 1.000 0.000
#> GSM549260     1   0.000    0.99679 1.000 0.000
#> GSM549266     2   0.000    0.98977 0.000 1.000
#> GSM549293     2   0.000    0.98977 0.000 1.000
#> GSM549236     1   0.000    0.99679 1.000 0.000
#> GSM549238     1   0.000    0.99679 1.000 0.000
#> GSM549251     1   0.000    0.99679 1.000 0.000
#> GSM549258     1   0.000    0.99679 1.000 0.000
#> GSM549264     1   0.000    0.99679 1.000 0.000
#> GSM549243     1   0.000    0.99679 1.000 0.000
#> GSM549262     1   0.000    0.99679 1.000 0.000
#> GSM549278     2   1.000    0.00582 0.496 0.504
#> GSM549283     2   0.000    0.98977 0.000 1.000
#> GSM549298     2   0.000    0.98977 0.000 1.000
#> GSM750741     1   0.000    0.99679 1.000 0.000
#> GSM549286     2   0.000    0.98977 0.000 1.000
#> GSM549241     1   0.000    0.99679 1.000 0.000
#> GSM549247     1   0.000    0.99679 1.000 0.000
#> GSM549261     1   0.000    0.99679 1.000 0.000
#> GSM549270     2   0.000    0.98977 0.000 1.000
#> GSM549277     2   0.000    0.98977 0.000 1.000
#> GSM549280     2   0.000    0.98977 0.000 1.000
#> GSM549281     2   0.000    0.98977 0.000 1.000
#> GSM549285     2   0.000    0.98977 0.000 1.000
#> GSM549288     2   0.000    0.98977 0.000 1.000
#> GSM549292     2   0.000    0.98977 0.000 1.000
#> GSM549295     2   0.000    0.98977 0.000 1.000
#> GSM549297     2   0.000    0.98977 0.000 1.000
#> GSM750743     1   0.000    0.99679 1.000 0.000
#> GSM549268     2   0.000    0.98977 0.000 1.000
#> GSM549290     2   0.000    0.98977 0.000 1.000
#> GSM549272     2   0.000    0.98977 0.000 1.000
#> GSM549276     2   0.000    0.98977 0.000 1.000
#> GSM549275     1   0.000    0.99679 1.000 0.000
#> GSM549284     2   0.000    0.98977 0.000 1.000
#> GSM750737     1   0.000    0.99679 1.000 0.000
#> GSM750740     1   0.000    0.99679 1.000 0.000
#> GSM750747     1   0.000    0.99679 1.000 0.000
#> GSM750751     2   0.000    0.98977 0.000 1.000
#> GSM750754     2   0.000    0.98977 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.6308      0.407 0.508 0.000 0.492
#> GSM549291     3  0.0592      0.719 0.000 0.012 0.988
#> GSM549274     2  0.0592      0.933 0.000 0.988 0.012
#> GSM750738     2  0.4796      0.604 0.000 0.780 0.220
#> GSM750748     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549240     1  0.1031      0.901 0.976 0.000 0.024
#> GSM549279     2  0.0892      0.926 0.000 0.980 0.020
#> GSM549294     2  0.0000      0.936 0.000 1.000 0.000
#> GSM549300     3  0.6215      0.551 0.000 0.428 0.572
#> GSM549303     3  0.5678      0.718 0.000 0.316 0.684
#> GSM549309     3  0.5291      0.740 0.000 0.268 0.732
#> GSM750753     2  0.0000      0.936 0.000 1.000 0.000
#> GSM750752     3  0.4062      0.640 0.000 0.164 0.836
#> GSM549304     2  0.0424      0.935 0.000 0.992 0.008
#> GSM549305     2  0.0000      0.936 0.000 1.000 0.000
#> GSM549307     2  0.5291      0.513 0.000 0.732 0.268
#> GSM549306     3  0.6111      0.619 0.000 0.396 0.604
#> GSM549308     3  0.5926      0.680 0.000 0.356 0.644
#> GSM549233     1  0.0237      0.906 0.996 0.000 0.004
#> GSM549234     1  0.5650      0.706 0.688 0.000 0.312
#> GSM549250     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549287     3  0.2448      0.738 0.000 0.076 0.924
#> GSM750735     1  0.0592      0.904 0.988 0.000 0.012
#> GSM750736     1  0.0892      0.902 0.980 0.000 0.020
#> GSM750749     1  0.4413      0.835 0.852 0.024 0.124
#> GSM549230     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549254     1  0.5926      0.664 0.644 0.000 0.356
#> GSM750734     1  0.0424      0.905 0.992 0.000 0.008
#> GSM549271     3  0.4062      0.747 0.000 0.164 0.836
#> GSM549232     1  0.5859      0.672 0.656 0.000 0.344
#> GSM549246     1  0.5621      0.709 0.692 0.000 0.308
#> GSM549248     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549255     1  0.5859      0.672 0.656 0.000 0.344
#> GSM750746     1  0.0237      0.906 0.996 0.000 0.004
#> GSM549259     1  0.0237      0.906 0.996 0.000 0.004
#> GSM549269     2  0.0592      0.933 0.000 0.988 0.012
#> GSM549273     3  0.5785      0.704 0.000 0.332 0.668
#> GSM549299     2  0.0000      0.936 0.000 1.000 0.000
#> GSM549301     3  0.5968      0.671 0.000 0.364 0.636
#> GSM549310     3  0.1289      0.719 0.000 0.032 0.968
#> GSM549311     3  0.5497      0.732 0.000 0.292 0.708
#> GSM549302     2  0.0424      0.935 0.000 0.992 0.008
#> GSM549235     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549245     1  0.5859      0.672 0.656 0.000 0.344
#> GSM549265     1  0.5706      0.698 0.680 0.000 0.320
#> GSM549282     3  0.5363      0.738 0.000 0.276 0.724
#> GSM549296     3  0.4062      0.640 0.000 0.164 0.836
#> GSM750739     1  0.0000      0.906 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.906 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.906 1.000 0.000 0.000
#> GSM750750     3  0.5678      0.718 0.000 0.316 0.684
#> GSM549242     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549252     1  0.5650      0.706 0.688 0.000 0.312
#> GSM549253     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549256     1  0.0237      0.906 0.996 0.000 0.004
#> GSM549257     1  0.5859      0.672 0.656 0.000 0.344
#> GSM549263     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549267     3  0.0592      0.719 0.000 0.012 0.988
#> GSM750745     1  0.0592      0.904 0.988 0.000 0.012
#> GSM549239     1  0.0592      0.904 0.988 0.000 0.012
#> GSM549244     1  0.5859      0.672 0.656 0.000 0.344
#> GSM549249     1  0.5650      0.706 0.688 0.000 0.312
#> GSM549260     1  0.0424      0.905 0.992 0.000 0.008
#> GSM549266     2  0.0892      0.926 0.000 0.980 0.020
#> GSM549293     2  0.0424      0.935 0.000 0.992 0.008
#> GSM549236     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549238     1  0.3879      0.825 0.848 0.000 0.152
#> GSM549251     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549258     1  0.0592      0.904 0.988 0.000 0.012
#> GSM549264     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549243     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.906 1.000 0.000 0.000
#> GSM549278     3  0.1163      0.697 0.028 0.000 0.972
#> GSM549283     2  0.0000      0.936 0.000 1.000 0.000
#> GSM549298     3  0.5968      0.671 0.000 0.364 0.636
#> GSM750741     1  0.0592      0.904 0.988 0.000 0.012
#> GSM549286     2  0.0000      0.936 0.000 1.000 0.000
#> GSM549241     1  0.0592      0.904 0.988 0.000 0.012
#> GSM549247     1  0.2773      0.867 0.928 0.048 0.024
#> GSM549261     1  0.0237      0.906 0.996 0.000 0.004
#> GSM549270     2  0.0000      0.936 0.000 1.000 0.000
#> GSM549277     2  0.3941      0.752 0.000 0.844 0.156
#> GSM549280     2  0.2448      0.861 0.000 0.924 0.076
#> GSM549281     2  0.0592      0.930 0.000 0.988 0.012
#> GSM549285     3  0.6026      0.653 0.000 0.376 0.624
#> GSM549288     2  0.3752      0.771 0.000 0.856 0.144
#> GSM549292     2  0.0424      0.935 0.000 0.992 0.008
#> GSM549295     2  0.4702      0.648 0.000 0.788 0.212
#> GSM549297     2  0.0000      0.936 0.000 1.000 0.000
#> GSM750743     1  0.0592      0.904 0.988 0.000 0.012
#> GSM549268     2  0.0592      0.930 0.000 0.988 0.012
#> GSM549290     3  0.0592      0.719 0.000 0.012 0.988
#> GSM549272     2  0.0237      0.936 0.000 0.996 0.004
#> GSM549276     2  0.0000      0.936 0.000 1.000 0.000
#> GSM549275     1  0.1636      0.893 0.964 0.016 0.020
#> GSM549284     2  0.0424      0.935 0.000 0.992 0.008
#> GSM750737     1  0.5327      0.745 0.728 0.000 0.272
#> GSM750740     1  0.0237      0.906 0.996 0.000 0.004
#> GSM750747     1  0.0237      0.906 0.996 0.000 0.004
#> GSM750751     2  0.0000      0.936 0.000 1.000 0.000
#> GSM750754     3  0.0892      0.721 0.000 0.020 0.980

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.2101      0.877 0.060 0.000 0.012 0.928
#> GSM549291     4  0.2999      0.806 0.000 0.004 0.132 0.864
#> GSM549274     2  0.0592      0.915 0.000 0.984 0.000 0.016
#> GSM750738     2  0.1938      0.883 0.000 0.936 0.012 0.052
#> GSM750748     1  0.0376      0.933 0.992 0.000 0.004 0.004
#> GSM549240     1  0.4774      0.850 0.804 0.016 0.056 0.124
#> GSM549279     2  0.3497      0.840 0.008 0.876 0.056 0.060
#> GSM549294     2  0.0469      0.917 0.000 0.988 0.012 0.000
#> GSM549300     3  0.2868      0.838 0.000 0.136 0.864 0.000
#> GSM549303     3  0.2546      0.891 0.000 0.060 0.912 0.028
#> GSM549309     3  0.2578      0.886 0.000 0.052 0.912 0.036
#> GSM750753     2  0.0707      0.915 0.000 0.980 0.020 0.000
#> GSM750752     4  0.3088      0.804 0.000 0.008 0.128 0.864
#> GSM549304     2  0.0927      0.917 0.000 0.976 0.008 0.016
#> GSM549305     2  0.0469      0.917 0.000 0.988 0.012 0.000
#> GSM549307     3  0.4661      0.497 0.000 0.348 0.652 0.000
#> GSM549306     3  0.2011      0.886 0.000 0.080 0.920 0.000
#> GSM549308     3  0.2053      0.891 0.000 0.072 0.924 0.004
#> GSM549233     1  0.3271      0.852 0.856 0.000 0.012 0.132
#> GSM549234     4  0.2530      0.886 0.112 0.000 0.000 0.888
#> GSM549250     1  0.1938      0.917 0.936 0.000 0.012 0.052
#> GSM549287     3  0.3037      0.833 0.000 0.020 0.880 0.100
#> GSM750735     1  0.3174      0.898 0.892 0.008 0.048 0.052
#> GSM750736     1  0.3411      0.893 0.880 0.008 0.048 0.064
#> GSM750749     1  0.5969      0.750 0.732 0.052 0.048 0.168
#> GSM549230     1  0.1767      0.921 0.944 0.000 0.012 0.044
#> GSM549231     1  0.1677      0.922 0.948 0.000 0.012 0.040
#> GSM549237     1  0.0336      0.933 0.992 0.000 0.000 0.008
#> GSM549254     4  0.1356      0.866 0.032 0.000 0.008 0.960
#> GSM750734     1  0.2408      0.914 0.920 0.000 0.044 0.036
#> GSM549271     3  0.3552      0.808 0.000 0.024 0.848 0.128
#> GSM549232     4  0.2466      0.890 0.096 0.000 0.004 0.900
#> GSM549246     4  0.2469      0.887 0.108 0.000 0.000 0.892
#> GSM549248     1  0.0657      0.932 0.984 0.000 0.012 0.004
#> GSM549255     4  0.2530      0.890 0.100 0.000 0.004 0.896
#> GSM750746     1  0.0376      0.933 0.992 0.000 0.004 0.004
#> GSM549259     1  0.0376      0.933 0.992 0.000 0.004 0.004
#> GSM549269     2  0.0592      0.915 0.000 0.984 0.000 0.016
#> GSM549273     3  0.2563      0.892 0.000 0.072 0.908 0.020
#> GSM549299     2  0.0817      0.913 0.000 0.976 0.024 0.000
#> GSM549301     3  0.1867      0.890 0.000 0.072 0.928 0.000
#> GSM549310     4  0.4353      0.695 0.000 0.012 0.232 0.756
#> GSM549311     3  0.2546      0.891 0.000 0.060 0.912 0.028
#> GSM549302     2  0.0927      0.917 0.000 0.976 0.008 0.016
#> GSM549235     1  0.0376      0.933 0.992 0.000 0.004 0.004
#> GSM549245     4  0.2593      0.890 0.104 0.000 0.004 0.892
#> GSM549265     4  0.2530      0.888 0.112 0.000 0.000 0.888
#> GSM549282     3  0.2670      0.884 0.000 0.052 0.908 0.040
#> GSM549296     4  0.2799      0.817 0.000 0.008 0.108 0.884
#> GSM750739     1  0.0188      0.933 0.996 0.000 0.000 0.004
#> GSM750742     1  0.0804      0.931 0.980 0.000 0.012 0.008
#> GSM750744     1  0.0657      0.933 0.984 0.000 0.012 0.004
#> GSM750750     3  0.2443      0.891 0.000 0.060 0.916 0.024
#> GSM549242     1  0.2101      0.914 0.928 0.000 0.012 0.060
#> GSM549252     4  0.2647      0.882 0.120 0.000 0.000 0.880
#> GSM549253     1  0.1854      0.919 0.940 0.000 0.012 0.048
#> GSM549256     1  0.3324      0.848 0.852 0.000 0.012 0.136
#> GSM549257     4  0.2593      0.890 0.104 0.000 0.004 0.892
#> GSM549263     1  0.1767      0.921 0.944 0.000 0.012 0.044
#> GSM549267     4  0.4122      0.700 0.000 0.004 0.236 0.760
#> GSM750745     1  0.2313      0.913 0.924 0.000 0.044 0.032
#> GSM549239     1  0.2313      0.913 0.924 0.000 0.044 0.032
#> GSM549244     4  0.2593      0.890 0.104 0.000 0.004 0.892
#> GSM549249     4  0.2760      0.876 0.128 0.000 0.000 0.872
#> GSM549260     1  0.2908      0.915 0.896 0.000 0.040 0.064
#> GSM549266     2  0.3497      0.840 0.008 0.876 0.056 0.060
#> GSM549293     2  0.0927      0.917 0.000 0.976 0.008 0.016
#> GSM549236     1  0.1938      0.917 0.936 0.000 0.012 0.052
#> GSM549238     4  0.4137      0.784 0.208 0.000 0.012 0.780
#> GSM549251     1  0.1767      0.921 0.944 0.000 0.012 0.044
#> GSM549258     1  0.3497      0.895 0.876 0.008 0.056 0.060
#> GSM549264     1  0.1059      0.931 0.972 0.000 0.016 0.012
#> GSM549243     1  0.0524      0.933 0.988 0.000 0.008 0.004
#> GSM549262     1  0.0657      0.932 0.984 0.000 0.012 0.004
#> GSM549278     4  0.2011      0.839 0.000 0.000 0.080 0.920
#> GSM549283     2  0.0707      0.912 0.000 0.980 0.020 0.000
#> GSM549298     3  0.1867      0.890 0.000 0.072 0.928 0.000
#> GSM750741     1  0.3574      0.892 0.872 0.008 0.056 0.064
#> GSM549286     2  0.0927      0.917 0.000 0.976 0.008 0.016
#> GSM549241     1  0.3497      0.893 0.876 0.008 0.056 0.060
#> GSM549247     1  0.6668      0.731 0.700 0.120 0.056 0.124
#> GSM549261     1  0.0376      0.933 0.992 0.000 0.004 0.004
#> GSM549270     2  0.0592      0.916 0.000 0.984 0.016 0.000
#> GSM549277     2  0.4776      0.357 0.000 0.624 0.376 0.000
#> GSM549280     2  0.4522      0.494 0.000 0.680 0.320 0.000
#> GSM549281     2  0.2936      0.862 0.004 0.900 0.040 0.056
#> GSM549285     3  0.2342      0.889 0.000 0.080 0.912 0.008
#> GSM549288     2  0.4843      0.299 0.000 0.604 0.396 0.000
#> GSM549292     2  0.0927      0.917 0.000 0.976 0.008 0.016
#> GSM549295     3  0.4992      0.129 0.000 0.476 0.524 0.000
#> GSM549297     2  0.1118      0.907 0.000 0.964 0.036 0.000
#> GSM750743     1  0.2319      0.916 0.924 0.000 0.040 0.036
#> GSM549268     2  0.2936      0.862 0.004 0.900 0.040 0.056
#> GSM549290     4  0.4053      0.710 0.000 0.004 0.228 0.768
#> GSM549272     2  0.0927      0.917 0.000 0.976 0.008 0.016
#> GSM549276     2  0.0524      0.917 0.000 0.988 0.008 0.004
#> GSM549275     1  0.4238      0.876 0.848 0.032 0.060 0.060
#> GSM549284     2  0.0927      0.917 0.000 0.976 0.008 0.016
#> GSM750737     4  0.2982      0.847 0.068 0.004 0.032 0.896
#> GSM750740     1  0.0376      0.933 0.992 0.000 0.004 0.004
#> GSM750747     1  0.0376      0.933 0.992 0.000 0.004 0.004
#> GSM750751     2  0.0336      0.917 0.000 0.992 0.008 0.000
#> GSM750754     3  0.4655      0.498 0.000 0.004 0.684 0.312

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.3365     0.7963 0.008 0.000 0.004 0.808 0.180
#> GSM549291     4  0.4315     0.7287 0.000 0.000 0.024 0.700 0.276
#> GSM549274     2  0.0162     0.8792 0.000 0.996 0.000 0.000 0.004
#> GSM750738     2  0.1364     0.8485 0.000 0.952 0.000 0.036 0.012
#> GSM750748     1  0.2011     0.8214 0.908 0.000 0.004 0.000 0.088
#> GSM549240     5  0.6468     0.4457 0.332 0.012 0.000 0.144 0.512
#> GSM549279     5  0.4811    -0.0538 0.000 0.452 0.000 0.020 0.528
#> GSM549294     2  0.2411     0.8581 0.000 0.884 0.008 0.000 0.108
#> GSM549300     3  0.2712     0.7528 0.000 0.088 0.880 0.000 0.032
#> GSM549303     3  0.1682     0.8081 0.000 0.012 0.944 0.012 0.032
#> GSM549309     3  0.3007     0.7928 0.000 0.004 0.864 0.028 0.104
#> GSM750753     2  0.2470     0.8605 0.000 0.884 0.012 0.000 0.104
#> GSM750752     4  0.3675     0.7782 0.000 0.000 0.024 0.788 0.188
#> GSM549304     2  0.0404     0.8773 0.000 0.988 0.000 0.000 0.012
#> GSM549305     2  0.1956     0.8710 0.000 0.916 0.008 0.000 0.076
#> GSM549307     3  0.4679     0.5496 0.000 0.216 0.716 0.000 0.068
#> GSM549306     3  0.0865     0.8034 0.000 0.024 0.972 0.000 0.004
#> GSM549308     3  0.0609     0.8054 0.000 0.020 0.980 0.000 0.000
#> GSM549233     1  0.3074     0.6721 0.804 0.000 0.000 0.196 0.000
#> GSM549234     4  0.1883     0.8308 0.048 0.000 0.008 0.932 0.012
#> GSM549250     1  0.1908     0.7842 0.908 0.000 0.000 0.092 0.000
#> GSM549287     3  0.5009     0.6494 0.000 0.000 0.652 0.060 0.288
#> GSM750735     5  0.5972     0.3599 0.420 0.000 0.016 0.068 0.496
#> GSM750736     5  0.5967     0.3627 0.416 0.000 0.016 0.068 0.500
#> GSM750749     5  0.5830     0.5035 0.236 0.008 0.016 0.088 0.652
#> GSM549230     1  0.1270     0.8129 0.948 0.000 0.000 0.052 0.000
#> GSM549231     1  0.1197     0.8145 0.952 0.000 0.000 0.048 0.000
#> GSM549237     1  0.1197     0.8301 0.952 0.000 0.000 0.000 0.048
#> GSM549254     4  0.1792     0.8236 0.000 0.000 0.000 0.916 0.084
#> GSM750734     1  0.4095     0.6398 0.748 0.000 0.016 0.008 0.228
#> GSM549271     3  0.5498     0.6023 0.000 0.000 0.612 0.096 0.292
#> GSM549232     4  0.0794     0.8398 0.028 0.000 0.000 0.972 0.000
#> GSM549246     4  0.1942     0.8252 0.068 0.000 0.000 0.920 0.012
#> GSM549248     1  0.0510     0.8251 0.984 0.000 0.000 0.016 0.000
#> GSM549255     4  0.0880     0.8397 0.032 0.000 0.000 0.968 0.000
#> GSM750746     1  0.2011     0.8214 0.908 0.000 0.004 0.000 0.088
#> GSM549259     1  0.2011     0.8214 0.908 0.000 0.004 0.000 0.088
#> GSM549269     2  0.0324     0.8796 0.000 0.992 0.004 0.000 0.004
#> GSM549273     3  0.1569     0.8083 0.000 0.012 0.948 0.008 0.032
#> GSM549299     2  0.2536     0.8421 0.000 0.868 0.000 0.004 0.128
#> GSM549301     3  0.0609     0.8054 0.000 0.020 0.980 0.000 0.000
#> GSM549310     4  0.5137     0.6957 0.000 0.000 0.108 0.684 0.208
#> GSM549311     3  0.2756     0.8009 0.000 0.012 0.880 0.012 0.096
#> GSM549302     2  0.0451     0.8803 0.000 0.988 0.008 0.000 0.004
#> GSM549235     1  0.1952     0.8228 0.912 0.000 0.004 0.000 0.084
#> GSM549245     4  0.0880     0.8397 0.032 0.000 0.000 0.968 0.000
#> GSM549265     4  0.1756     0.8300 0.036 0.000 0.008 0.940 0.016
#> GSM549282     3  0.3768     0.7759 0.000 0.008 0.812 0.036 0.144
#> GSM549296     4  0.3675     0.7782 0.000 0.000 0.024 0.788 0.188
#> GSM750739     1  0.2457     0.8144 0.900 0.000 0.016 0.008 0.076
#> GSM750742     1  0.0510     0.8251 0.984 0.000 0.000 0.016 0.000
#> GSM750744     1  0.2850     0.7952 0.880 0.000 0.016 0.016 0.088
#> GSM750750     3  0.3319     0.7952 0.000 0.016 0.848 0.020 0.116
#> GSM549242     1  0.2561     0.7352 0.856 0.000 0.000 0.144 0.000
#> GSM549252     4  0.1956     0.8293 0.052 0.000 0.008 0.928 0.012
#> GSM549253     1  0.1908     0.7842 0.908 0.000 0.000 0.092 0.000
#> GSM549256     1  0.3143     0.6596 0.796 0.000 0.000 0.204 0.000
#> GSM549257     4  0.0880     0.8397 0.032 0.000 0.000 0.968 0.000
#> GSM549263     1  0.1270     0.8129 0.948 0.000 0.000 0.052 0.000
#> GSM549267     4  0.5691     0.6067 0.000 0.000 0.112 0.592 0.296
#> GSM750745     1  0.4236     0.6030 0.728 0.000 0.016 0.008 0.248
#> GSM549239     1  0.4236     0.6030 0.728 0.000 0.016 0.008 0.248
#> GSM549244     4  0.0880     0.8397 0.032 0.000 0.000 0.968 0.000
#> GSM549249     4  0.1877     0.8261 0.064 0.000 0.000 0.924 0.012
#> GSM549260     1  0.3011     0.7759 0.844 0.000 0.000 0.016 0.140
#> GSM549266     5  0.4740    -0.0887 0.000 0.468 0.000 0.016 0.516
#> GSM549293     2  0.0162     0.8792 0.000 0.996 0.000 0.000 0.004
#> GSM549236     1  0.2074     0.7732 0.896 0.000 0.000 0.104 0.000
#> GSM549238     4  0.4306     0.4915 0.328 0.000 0.000 0.660 0.012
#> GSM549251     1  0.1270     0.8129 0.948 0.000 0.000 0.052 0.000
#> GSM549258     1  0.4383     0.0908 0.572 0.000 0.000 0.004 0.424
#> GSM549264     1  0.2649     0.8121 0.900 0.000 0.016 0.036 0.048
#> GSM549243     1  0.1478     0.8265 0.936 0.000 0.000 0.000 0.064
#> GSM549262     1  0.0671     0.8255 0.980 0.000 0.000 0.016 0.004
#> GSM549278     4  0.3519     0.7754 0.000 0.000 0.008 0.776 0.216
#> GSM549283     2  0.3123     0.7967 0.000 0.812 0.000 0.004 0.184
#> GSM549298     3  0.0771     0.8047 0.000 0.020 0.976 0.000 0.004
#> GSM750741     5  0.5153     0.3250 0.436 0.000 0.000 0.040 0.524
#> GSM549286     2  0.0451     0.8800 0.000 0.988 0.008 0.000 0.004
#> GSM549241     5  0.4451     0.1503 0.492 0.000 0.000 0.004 0.504
#> GSM549247     5  0.7008     0.4789 0.296 0.048 0.000 0.144 0.512
#> GSM549261     1  0.2011     0.8214 0.908 0.000 0.004 0.000 0.088
#> GSM549270     2  0.2304     0.8621 0.000 0.892 0.008 0.000 0.100
#> GSM549277     2  0.6069     0.1028 0.000 0.448 0.432 0.000 0.120
#> GSM549280     2  0.6260     0.2190 0.000 0.476 0.372 0.000 0.152
#> GSM549281     5  0.4731    -0.0576 0.000 0.456 0.000 0.016 0.528
#> GSM549285     3  0.4554     0.7573 0.000 0.032 0.736 0.016 0.216
#> GSM549288     3  0.5948    -0.0223 0.000 0.408 0.484 0.000 0.108
#> GSM549292     2  0.0451     0.8803 0.000 0.988 0.008 0.000 0.004
#> GSM549295     3  0.5390     0.3099 0.000 0.324 0.600 0.000 0.076
#> GSM549297     2  0.4704     0.7391 0.000 0.736 0.152 0.000 0.112
#> GSM750743     1  0.4181     0.6178 0.736 0.000 0.016 0.008 0.240
#> GSM549268     5  0.4731    -0.0576 0.000 0.456 0.000 0.016 0.528
#> GSM549290     4  0.5649     0.6118 0.000 0.000 0.108 0.596 0.296
#> GSM549272     2  0.0451     0.8803 0.000 0.988 0.008 0.000 0.004
#> GSM549276     2  0.1251     0.8789 0.000 0.956 0.008 0.000 0.036
#> GSM549275     5  0.5588     0.4393 0.372 0.028 0.000 0.032 0.568
#> GSM549284     2  0.0162     0.8792 0.000 0.996 0.000 0.000 0.004
#> GSM750737     4  0.4065     0.6862 0.032 0.000 0.016 0.792 0.160
#> GSM750740     1  0.2011     0.8214 0.908 0.000 0.004 0.000 0.088
#> GSM750747     1  0.2011     0.8214 0.908 0.000 0.004 0.000 0.088
#> GSM750751     2  0.1831     0.8698 0.000 0.920 0.004 0.000 0.076
#> GSM750754     3  0.6575     0.3052 0.000 0.000 0.464 0.236 0.300

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.4209      0.192 0.020 0.000 0.000 0.596 0.000 0.384
#> GSM549291     6  0.4355      0.265 0.024 0.000 0.000 0.420 0.000 0.556
#> GSM549274     2  0.0260      0.884 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM750738     2  0.1053      0.870 0.020 0.964 0.000 0.012 0.000 0.004
#> GSM750748     5  0.3123      0.747 0.136 0.000 0.000 0.000 0.824 0.040
#> GSM549240     1  0.5465      0.637 0.684 0.012 0.000 0.116 0.144 0.044
#> GSM549279     1  0.5172      0.433 0.644 0.200 0.008 0.000 0.000 0.148
#> GSM549294     2  0.3176      0.841 0.084 0.832 0.000 0.000 0.000 0.084
#> GSM549300     3  0.3382      0.631 0.040 0.040 0.840 0.000 0.000 0.080
#> GSM549303     3  0.2605      0.605 0.028 0.000 0.864 0.000 0.000 0.108
#> GSM549309     3  0.4170      0.397 0.032 0.000 0.660 0.000 0.000 0.308
#> GSM750753     2  0.4368      0.800 0.080 0.768 0.044 0.000 0.000 0.108
#> GSM750752     4  0.4417      0.045 0.028 0.000 0.000 0.556 0.000 0.416
#> GSM549304     2  0.0622      0.882 0.008 0.980 0.000 0.000 0.000 0.012
#> GSM549305     2  0.2965      0.849 0.072 0.848 0.000 0.000 0.000 0.080
#> GSM549307     3  0.4593      0.597 0.044 0.120 0.748 0.000 0.000 0.088
#> GSM549306     3  0.0551      0.652 0.004 0.004 0.984 0.000 0.000 0.008
#> GSM549308     3  0.0547      0.650 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM549233     5  0.3945      0.411 0.000 0.000 0.000 0.380 0.612 0.008
#> GSM549234     4  0.0725      0.748 0.000 0.000 0.000 0.976 0.012 0.012
#> GSM549250     5  0.1958      0.729 0.000 0.000 0.000 0.100 0.896 0.004
#> GSM549287     6  0.4071      0.463 0.020 0.000 0.304 0.004 0.000 0.672
#> GSM750735     1  0.4329      0.613 0.712 0.000 0.000 0.016 0.232 0.040
#> GSM750736     1  0.4207      0.610 0.728 0.000 0.000 0.024 0.220 0.028
#> GSM750749     1  0.4133      0.643 0.768 0.000 0.000 0.012 0.100 0.120
#> GSM549230     5  0.1471      0.750 0.000 0.000 0.000 0.064 0.932 0.004
#> GSM549231     5  0.1285      0.754 0.000 0.000 0.000 0.052 0.944 0.004
#> GSM549237     5  0.1788      0.767 0.076 0.000 0.000 0.004 0.916 0.004
#> GSM549254     4  0.2350      0.670 0.036 0.000 0.000 0.888 0.000 0.076
#> GSM750734     5  0.4092      0.495 0.344 0.000 0.000 0.000 0.636 0.020
#> GSM549271     6  0.4373      0.580 0.008 0.000 0.260 0.044 0.000 0.688
#> GSM549232     4  0.0291      0.748 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549246     4  0.1232      0.746 0.004 0.000 0.000 0.956 0.024 0.016
#> GSM549248     5  0.0260      0.765 0.000 0.000 0.000 0.008 0.992 0.000
#> GSM549255     4  0.0291      0.748 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM750746     5  0.3123      0.747 0.136 0.000 0.000 0.000 0.824 0.040
#> GSM549259     5  0.3163      0.745 0.140 0.000 0.000 0.000 0.820 0.040
#> GSM549269     2  0.0260      0.884 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM549273     3  0.2605      0.605 0.028 0.000 0.864 0.000 0.000 0.108
#> GSM549299     2  0.4853      0.760 0.124 0.720 0.036 0.000 0.000 0.120
#> GSM549301     3  0.0458      0.651 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM549310     4  0.5249     -0.270 0.028 0.000 0.040 0.472 0.000 0.460
#> GSM549311     3  0.4022      0.481 0.040 0.000 0.708 0.000 0.000 0.252
#> GSM549302     2  0.0146      0.884 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM549235     5  0.3123      0.747 0.136 0.000 0.000 0.000 0.824 0.040
#> GSM549245     4  0.0291      0.748 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549265     4  0.1088      0.745 0.000 0.000 0.000 0.960 0.024 0.016
#> GSM549282     3  0.4139      0.386 0.024 0.000 0.640 0.000 0.000 0.336
#> GSM549296     4  0.4353      0.147 0.028 0.000 0.000 0.588 0.000 0.384
#> GSM750739     5  0.2949      0.743 0.140 0.000 0.000 0.000 0.832 0.028
#> GSM750742     5  0.0260      0.765 0.000 0.000 0.000 0.008 0.992 0.000
#> GSM750744     5  0.2996      0.713 0.144 0.000 0.000 0.008 0.832 0.016
#> GSM750750     3  0.3993      0.443 0.024 0.000 0.676 0.000 0.000 0.300
#> GSM549242     5  0.3575      0.549 0.000 0.000 0.000 0.284 0.708 0.008
#> GSM549252     4  0.1334      0.739 0.000 0.000 0.000 0.948 0.032 0.020
#> GSM549253     5  0.1858      0.734 0.000 0.000 0.000 0.092 0.904 0.004
#> GSM549256     5  0.4010      0.358 0.000 0.000 0.000 0.408 0.584 0.008
#> GSM549257     4  0.0291      0.748 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549263     5  0.1411      0.752 0.000 0.000 0.000 0.060 0.936 0.004
#> GSM549267     6  0.4371      0.629 0.000 0.000 0.052 0.284 0.000 0.664
#> GSM750745     5  0.4167      0.464 0.368 0.000 0.000 0.000 0.612 0.020
#> GSM549239     5  0.4167      0.464 0.368 0.000 0.000 0.000 0.612 0.020
#> GSM549244     4  0.0820      0.748 0.000 0.000 0.000 0.972 0.012 0.016
#> GSM549249     4  0.1334      0.739 0.000 0.000 0.000 0.948 0.032 0.020
#> GSM549260     5  0.4617      0.593 0.272 0.000 0.000 0.044 0.668 0.016
#> GSM549266     1  0.5275      0.397 0.624 0.228 0.008 0.000 0.000 0.140
#> GSM549293     2  0.0260      0.884 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM549236     5  0.2234      0.714 0.000 0.000 0.000 0.124 0.872 0.004
#> GSM549238     4  0.3756      0.462 0.000 0.000 0.000 0.712 0.268 0.020
#> GSM549251     5  0.1471      0.750 0.000 0.000 0.000 0.064 0.932 0.004
#> GSM549258     1  0.4411      0.186 0.576 0.000 0.000 0.012 0.400 0.012
#> GSM549264     5  0.2426      0.754 0.048 0.000 0.000 0.044 0.896 0.012
#> GSM549243     5  0.2494      0.756 0.120 0.000 0.000 0.000 0.864 0.016
#> GSM549262     5  0.0260      0.765 0.000 0.000 0.000 0.008 0.992 0.000
#> GSM549278     4  0.4473     -0.172 0.028 0.000 0.000 0.492 0.000 0.480
#> GSM549283     2  0.5793      0.598 0.220 0.596 0.032 0.000 0.000 0.152
#> GSM549298     3  0.0146      0.652 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM750741     1  0.3761      0.600 0.744 0.000 0.000 0.008 0.228 0.020
#> GSM549286     2  0.0260      0.883 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM549241     1  0.4065      0.465 0.672 0.000 0.000 0.000 0.300 0.028
#> GSM549247     1  0.5558      0.641 0.684 0.020 0.000 0.112 0.140 0.044
#> GSM549261     5  0.3123      0.747 0.136 0.000 0.000 0.000 0.824 0.040
#> GSM549270     2  0.3479      0.835 0.084 0.820 0.008 0.000 0.000 0.088
#> GSM549277     3  0.6737      0.255 0.100 0.296 0.476 0.000 0.000 0.128
#> GSM549280     3  0.6991      0.210 0.124 0.300 0.440 0.000 0.000 0.136
#> GSM549281     1  0.5539      0.381 0.604 0.232 0.016 0.000 0.000 0.148
#> GSM549285     3  0.5460      0.374 0.116 0.004 0.524 0.000 0.000 0.356
#> GSM549288     3  0.6358      0.363 0.092 0.264 0.540 0.000 0.000 0.104
#> GSM549292     2  0.0260      0.884 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM549295     3  0.5255      0.542 0.048 0.204 0.668 0.000 0.000 0.080
#> GSM549297     2  0.6027      0.543 0.092 0.600 0.212 0.000 0.000 0.096
#> GSM750743     5  0.4241      0.480 0.348 0.000 0.000 0.004 0.628 0.020
#> GSM549268     1  0.5539      0.381 0.604 0.232 0.016 0.000 0.000 0.148
#> GSM549290     6  0.4332      0.623 0.000 0.000 0.048 0.288 0.000 0.664
#> GSM549272     2  0.0000      0.884 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549276     2  0.2046      0.871 0.032 0.908 0.000 0.000 0.000 0.060
#> GSM549275     1  0.4396      0.656 0.752 0.012 0.004 0.004 0.160 0.068
#> GSM549284     2  0.0405      0.884 0.008 0.988 0.000 0.000 0.000 0.004
#> GSM750737     4  0.2656      0.645 0.120 0.000 0.000 0.860 0.012 0.008
#> GSM750740     5  0.3123      0.747 0.136 0.000 0.000 0.000 0.824 0.040
#> GSM750747     5  0.3123      0.747 0.136 0.000 0.000 0.000 0.824 0.040
#> GSM750751     2  0.2389      0.865 0.052 0.888 0.000 0.000 0.000 0.060
#> GSM750754     6  0.4601      0.671 0.000 0.000 0.200 0.112 0.000 0.688

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-kmeans-membership-heatmap-5

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)

plot of chunk tab-CV-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-kmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-CV-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-kmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> CV:kmeans 102           0.0253    1.70e-05              6.38e-02  0.00385 2
#> CV:kmeans 102           0.0426    1.96e-06              8.99e-05  0.00838 3
#> CV:kmeans  97           0.2749    2.14e-04              5.22e-03  0.05687 4
#> CV:kmeans  85           0.2519    3.23e-03              1.47e-02  0.11342 5
#> CV:kmeans  75           0.1607    2.93e-03              8.47e-02  0.17243 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.


CV:skmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-skmeans-collect-plots

The plots are:

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:

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)

plot of chunk CV-skmeans-select-partition-number

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.983       0.993         0.5049 0.496   0.496
#> 3 3 0.715           0.748       0.872         0.2740 0.855   0.712
#> 4 4 0.780           0.798       0.904         0.1492 0.878   0.678
#> 5 5 0.684           0.535       0.710         0.0644 0.905   0.672
#> 6 6 0.665           0.521       0.740         0.0383 0.910   0.639

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      0.992 1.000 0.000
#> GSM549291     2  0.0000      0.994 0.000 1.000
#> GSM549274     2  0.0000      0.994 0.000 1.000
#> GSM750738     2  0.0000      0.994 0.000 1.000
#> GSM750748     1  0.0000      0.992 1.000 0.000
#> GSM549240     1  0.0000      0.992 1.000 0.000
#> GSM549279     2  0.0000      0.994 0.000 1.000
#> GSM549294     2  0.0000      0.994 0.000 1.000
#> GSM549300     2  0.0000      0.994 0.000 1.000
#> GSM549303     2  0.0000      0.994 0.000 1.000
#> GSM549309     2  0.0000      0.994 0.000 1.000
#> GSM750753     2  0.0000      0.994 0.000 1.000
#> GSM750752     2  0.0000      0.994 0.000 1.000
#> GSM549304     2  0.0000      0.994 0.000 1.000
#> GSM549305     2  0.0000      0.994 0.000 1.000
#> GSM549307     2  0.0000      0.994 0.000 1.000
#> GSM549306     2  0.0000      0.994 0.000 1.000
#> GSM549308     2  0.0000      0.994 0.000 1.000
#> GSM549233     1  0.0000      0.992 1.000 0.000
#> GSM549234     1  0.0000      0.992 1.000 0.000
#> GSM549250     1  0.0000      0.992 1.000 0.000
#> GSM549287     2  0.0000      0.994 0.000 1.000
#> GSM750735     1  0.0000      0.992 1.000 0.000
#> GSM750736     1  0.0000      0.992 1.000 0.000
#> GSM750749     1  0.9608      0.368 0.616 0.384
#> GSM549230     1  0.0000      0.992 1.000 0.000
#> GSM549231     1  0.0000      0.992 1.000 0.000
#> GSM549237     1  0.0000      0.992 1.000 0.000
#> GSM549254     1  0.0376      0.989 0.996 0.004
#> GSM750734     1  0.0000      0.992 1.000 0.000
#> GSM549271     2  0.0000      0.994 0.000 1.000
#> GSM549232     1  0.0000      0.992 1.000 0.000
#> GSM549246     1  0.0000      0.992 1.000 0.000
#> GSM549248     1  0.0000      0.992 1.000 0.000
#> GSM549255     1  0.0000      0.992 1.000 0.000
#> GSM750746     1  0.0000      0.992 1.000 0.000
#> GSM549259     1  0.0000      0.992 1.000 0.000
#> GSM549269     2  0.0000      0.994 0.000 1.000
#> GSM549273     2  0.0000      0.994 0.000 1.000
#> GSM549299     2  0.0000      0.994 0.000 1.000
#> GSM549301     2  0.0000      0.994 0.000 1.000
#> GSM549310     2  0.0000      0.994 0.000 1.000
#> GSM549311     2  0.0000      0.994 0.000 1.000
#> GSM549302     2  0.0000      0.994 0.000 1.000
#> GSM549235     1  0.0000      0.992 1.000 0.000
#> GSM549245     1  0.0000      0.992 1.000 0.000
#> GSM549265     1  0.0000      0.992 1.000 0.000
#> GSM549282     2  0.0000      0.994 0.000 1.000
#> GSM549296     2  0.0000      0.994 0.000 1.000
#> GSM750739     1  0.0000      0.992 1.000 0.000
#> GSM750742     1  0.0000      0.992 1.000 0.000
#> GSM750744     1  0.0000      0.992 1.000 0.000
#> GSM750750     2  0.0000      0.994 0.000 1.000
#> GSM549242     1  0.0000      0.992 1.000 0.000
#> GSM549252     1  0.0000      0.992 1.000 0.000
#> GSM549253     1  0.0000      0.992 1.000 0.000
#> GSM549256     1  0.0000      0.992 1.000 0.000
#> GSM549257     1  0.0000      0.992 1.000 0.000
#> GSM549263     1  0.0000      0.992 1.000 0.000
#> GSM549267     2  0.0000      0.994 0.000 1.000
#> GSM750745     1  0.0000      0.992 1.000 0.000
#> GSM549239     1  0.0000      0.992 1.000 0.000
#> GSM549244     1  0.0000      0.992 1.000 0.000
#> GSM549249     1  0.0000      0.992 1.000 0.000
#> GSM549260     1  0.0000      0.992 1.000 0.000
#> GSM549266     2  0.0000      0.994 0.000 1.000
#> GSM549293     2  0.0000      0.994 0.000 1.000
#> GSM549236     1  0.0000      0.992 1.000 0.000
#> GSM549238     1  0.0000      0.992 1.000 0.000
#> GSM549251     1  0.0000      0.992 1.000 0.000
#> GSM549258     1  0.0000      0.992 1.000 0.000
#> GSM549264     1  0.0000      0.992 1.000 0.000
#> GSM549243     1  0.0000      0.992 1.000 0.000
#> GSM549262     1  0.0000      0.992 1.000 0.000
#> GSM549278     2  0.8608      0.597 0.284 0.716
#> GSM549283     2  0.0000      0.994 0.000 1.000
#> GSM549298     2  0.0000      0.994 0.000 1.000
#> GSM750741     1  0.0000      0.992 1.000 0.000
#> GSM549286     2  0.0000      0.994 0.000 1.000
#> GSM549241     1  0.0000      0.992 1.000 0.000
#> GSM549247     1  0.0000      0.992 1.000 0.000
#> GSM549261     1  0.0000      0.992 1.000 0.000
#> GSM549270     2  0.0000      0.994 0.000 1.000
#> GSM549277     2  0.0000      0.994 0.000 1.000
#> GSM549280     2  0.0000      0.994 0.000 1.000
#> GSM549281     2  0.0000      0.994 0.000 1.000
#> GSM549285     2  0.0000      0.994 0.000 1.000
#> GSM549288     2  0.0000      0.994 0.000 1.000
#> GSM549292     2  0.0000      0.994 0.000 1.000
#> GSM549295     2  0.0000      0.994 0.000 1.000
#> GSM549297     2  0.0000      0.994 0.000 1.000
#> GSM750743     1  0.0000      0.992 1.000 0.000
#> GSM549268     2  0.0000      0.994 0.000 1.000
#> GSM549290     2  0.0000      0.994 0.000 1.000
#> GSM549272     2  0.0000      0.994 0.000 1.000
#> GSM549276     2  0.0000      0.994 0.000 1.000
#> GSM549275     1  0.0000      0.992 1.000 0.000
#> GSM549284     2  0.0000      0.994 0.000 1.000
#> GSM750737     1  0.0000      0.992 1.000 0.000
#> GSM750740     1  0.0000      0.992 1.000 0.000
#> GSM750747     1  0.0000      0.992 1.000 0.000
#> GSM750751     2  0.0000      0.994 0.000 1.000
#> GSM750754     2  0.0000      0.994 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.3192      0.545 0.112 0.000 0.888
#> GSM549291     3  0.0237      0.646 0.000 0.004 0.996
#> GSM549274     2  0.0000      0.938 0.000 1.000 0.000
#> GSM750738     2  0.2537      0.829 0.000 0.920 0.080
#> GSM750748     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549240     1  0.0983      0.866 0.980 0.016 0.004
#> GSM549279     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549294     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549300     3  0.6305      0.381 0.000 0.484 0.516
#> GSM549303     3  0.6168      0.520 0.000 0.412 0.588
#> GSM549309     3  0.5706      0.579 0.000 0.320 0.680
#> GSM750753     2  0.0000      0.938 0.000 1.000 0.000
#> GSM750752     3  0.0892      0.637 0.000 0.020 0.980
#> GSM549304     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549305     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549307     2  0.5291      0.524 0.000 0.732 0.268
#> GSM549306     3  0.6280      0.444 0.000 0.460 0.540
#> GSM549308     3  0.6252      0.476 0.000 0.444 0.556
#> GSM549233     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549234     1  0.6192      0.534 0.580 0.000 0.420
#> GSM549250     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549287     3  0.3267      0.636 0.000 0.116 0.884
#> GSM750735     1  0.0000      0.879 1.000 0.000 0.000
#> GSM750736     1  0.0000      0.879 1.000 0.000 0.000
#> GSM750749     1  0.9173      0.177 0.536 0.200 0.264
#> GSM549230     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549254     3  0.6386     -0.225 0.412 0.004 0.584
#> GSM750734     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549271     3  0.5810      0.572 0.000 0.336 0.664
#> GSM549232     1  0.6252      0.501 0.556 0.000 0.444
#> GSM549246     1  0.5988      0.593 0.632 0.000 0.368
#> GSM549248     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549255     1  0.6252      0.501 0.556 0.000 0.444
#> GSM750746     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549269     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549273     3  0.6225      0.495 0.000 0.432 0.568
#> GSM549299     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549301     3  0.6267      0.461 0.000 0.452 0.548
#> GSM549310     3  0.0237      0.646 0.000 0.004 0.996
#> GSM549311     3  0.6154      0.524 0.000 0.408 0.592
#> GSM549302     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549235     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549245     1  0.6252      0.501 0.556 0.000 0.444
#> GSM549265     1  0.6215      0.524 0.572 0.000 0.428
#> GSM549282     3  0.6154      0.524 0.000 0.408 0.592
#> GSM549296     3  0.0592      0.641 0.000 0.012 0.988
#> GSM750739     1  0.0000      0.879 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.879 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.879 1.000 0.000 0.000
#> GSM750750     3  0.6225      0.495 0.000 0.432 0.568
#> GSM549242     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549252     1  0.6204      0.529 0.576 0.000 0.424
#> GSM549253     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549256     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549257     1  0.6252      0.501 0.556 0.000 0.444
#> GSM549263     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549267     3  0.0237      0.646 0.000 0.004 0.996
#> GSM750745     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549244     1  0.6252      0.501 0.556 0.000 0.444
#> GSM549249     1  0.6192      0.534 0.580 0.000 0.420
#> GSM549260     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549266     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549293     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549236     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549238     1  0.5733      0.638 0.676 0.000 0.324
#> GSM549251     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549258     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549264     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549243     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549278     3  0.0000      0.643 0.000 0.000 1.000
#> GSM549283     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549298     3  0.6260      0.469 0.000 0.448 0.552
#> GSM750741     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549286     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549241     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549247     1  0.4521      0.706 0.816 0.180 0.004
#> GSM549261     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549270     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549277     2  0.3816      0.779 0.000 0.852 0.148
#> GSM549280     2  0.4399      0.712 0.000 0.812 0.188
#> GSM549281     2  0.0892      0.924 0.000 0.980 0.020
#> GSM549285     3  0.6280      0.444 0.000 0.460 0.540
#> GSM549288     2  0.3879      0.773 0.000 0.848 0.152
#> GSM549292     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549295     2  0.4555      0.689 0.000 0.800 0.200
#> GSM549297     2  0.2165      0.885 0.000 0.936 0.064
#> GSM750743     1  0.0000      0.879 1.000 0.000 0.000
#> GSM549268     2  0.1860      0.897 0.000 0.948 0.052
#> GSM549290     3  0.0237      0.646 0.000 0.004 0.996
#> GSM549272     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549276     2  0.0000      0.938 0.000 1.000 0.000
#> GSM549275     1  0.5058      0.628 0.756 0.244 0.000
#> GSM549284     2  0.0000      0.938 0.000 1.000 0.000
#> GSM750737     1  0.5397      0.680 0.720 0.000 0.280
#> GSM750740     1  0.0000      0.879 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.879 1.000 0.000 0.000
#> GSM750751     2  0.0000      0.938 0.000 1.000 0.000
#> GSM750754     3  0.0237      0.646 0.000 0.004 0.996

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.0921      0.895 0.000 0.000 0.028 0.972
#> GSM549291     3  0.4356      0.589 0.000 0.000 0.708 0.292
#> GSM549274     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM750738     2  0.1022      0.877 0.000 0.968 0.000 0.032
#> GSM750748     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM549240     1  0.3366      0.824 0.872 0.028 0.004 0.096
#> GSM549279     2  0.0188      0.893 0.000 0.996 0.004 0.000
#> GSM549294     2  0.0188      0.895 0.000 0.996 0.004 0.000
#> GSM549300     3  0.3074      0.754 0.000 0.152 0.848 0.000
#> GSM549303     3  0.0336      0.883 0.000 0.008 0.992 0.000
#> GSM549309     3  0.0376      0.883 0.000 0.004 0.992 0.004
#> GSM750753     2  0.1022      0.884 0.000 0.968 0.032 0.000
#> GSM750752     4  0.4920      0.358 0.000 0.004 0.368 0.628
#> GSM549304     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM549305     2  0.0188      0.895 0.000 0.996 0.004 0.000
#> GSM549307     3  0.4830      0.213 0.000 0.392 0.608 0.000
#> GSM549306     3  0.1716      0.856 0.000 0.064 0.936 0.000
#> GSM549308     3  0.0592      0.882 0.000 0.016 0.984 0.000
#> GSM549233     1  0.4898      0.436 0.584 0.000 0.000 0.416
#> GSM549234     4  0.0188      0.906 0.004 0.000 0.000 0.996
#> GSM549250     1  0.4040      0.729 0.752 0.000 0.000 0.248
#> GSM549287     3  0.0336      0.881 0.000 0.000 0.992 0.008
#> GSM750735     1  0.0672      0.889 0.984 0.000 0.008 0.008
#> GSM750736     1  0.0992      0.885 0.976 0.004 0.008 0.012
#> GSM750749     1  0.6888      0.382 0.584 0.096 0.308 0.012
#> GSM549230     1  0.2704      0.843 0.876 0.000 0.000 0.124
#> GSM549231     1  0.2814      0.838 0.868 0.000 0.000 0.132
#> GSM549237     1  0.1118      0.886 0.964 0.000 0.000 0.036
#> GSM549254     4  0.0804      0.901 0.008 0.000 0.012 0.980
#> GSM750734     1  0.0524      0.890 0.988 0.000 0.004 0.008
#> GSM549271     3  0.0376      0.883 0.000 0.004 0.992 0.004
#> GSM549232     4  0.0188      0.907 0.000 0.000 0.004 0.996
#> GSM549246     4  0.3074      0.769 0.152 0.000 0.000 0.848
#> GSM549248     1  0.1474      0.880 0.948 0.000 0.000 0.052
#> GSM549255     4  0.0336      0.906 0.000 0.000 0.008 0.992
#> GSM750746     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM549273     3  0.0469      0.883 0.000 0.012 0.988 0.000
#> GSM549299     2  0.0921      0.885 0.000 0.972 0.028 0.000
#> GSM549301     3  0.1118      0.874 0.000 0.036 0.964 0.000
#> GSM549310     3  0.4277      0.606 0.000 0.000 0.720 0.280
#> GSM549311     3  0.0376      0.883 0.000 0.004 0.992 0.004
#> GSM549302     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM549235     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM549245     4  0.0336      0.906 0.000 0.000 0.008 0.992
#> GSM549265     4  0.0376      0.906 0.004 0.000 0.004 0.992
#> GSM549282     3  0.0376      0.883 0.000 0.004 0.992 0.004
#> GSM549296     4  0.4522      0.473 0.000 0.000 0.320 0.680
#> GSM750739     1  0.0376      0.890 0.992 0.000 0.004 0.004
#> GSM750742     1  0.1022      0.886 0.968 0.000 0.000 0.032
#> GSM750744     1  0.0895      0.890 0.976 0.000 0.004 0.020
#> GSM750750     3  0.0592      0.882 0.000 0.016 0.984 0.000
#> GSM549242     1  0.4164      0.711 0.736 0.000 0.000 0.264
#> GSM549252     4  0.0188      0.906 0.004 0.000 0.000 0.996
#> GSM549253     1  0.3528      0.788 0.808 0.000 0.000 0.192
#> GSM549256     1  0.4948      0.378 0.560 0.000 0.000 0.440
#> GSM549257     4  0.0188      0.907 0.000 0.000 0.004 0.996
#> GSM549263     1  0.2973      0.829 0.856 0.000 0.000 0.144
#> GSM549267     3  0.2868      0.790 0.000 0.000 0.864 0.136
#> GSM750745     1  0.0524      0.889 0.988 0.000 0.008 0.004
#> GSM549239     1  0.0524      0.889 0.988 0.000 0.008 0.004
#> GSM549244     4  0.0336      0.906 0.000 0.000 0.008 0.992
#> GSM549249     4  0.0188      0.906 0.004 0.000 0.000 0.996
#> GSM549260     1  0.1637      0.876 0.940 0.000 0.000 0.060
#> GSM549266     2  0.0336      0.894 0.000 0.992 0.008 0.000
#> GSM549293     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM549236     1  0.4250      0.694 0.724 0.000 0.000 0.276
#> GSM549238     4  0.3172      0.755 0.160 0.000 0.000 0.840
#> GSM549251     1  0.3172      0.817 0.840 0.000 0.000 0.160
#> GSM549258     1  0.0524      0.889 0.988 0.000 0.008 0.004
#> GSM549264     1  0.2216      0.866 0.908 0.000 0.000 0.092
#> GSM549243     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM549262     1  0.1022      0.886 0.968 0.000 0.000 0.032
#> GSM549278     3  0.4746      0.433 0.000 0.000 0.632 0.368
#> GSM549283     2  0.0469      0.893 0.000 0.988 0.012 0.000
#> GSM549298     3  0.0817      0.880 0.000 0.024 0.976 0.000
#> GSM750741     1  0.0524      0.889 0.988 0.000 0.008 0.004
#> GSM549286     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM549241     1  0.0524      0.889 0.988 0.000 0.008 0.004
#> GSM549247     1  0.6798      0.344 0.552 0.348 0.004 0.096
#> GSM549261     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM549270     2  0.0336      0.895 0.000 0.992 0.008 0.000
#> GSM549277     2  0.4981      0.251 0.000 0.536 0.464 0.000
#> GSM549280     2  0.4996      0.183 0.000 0.516 0.484 0.000
#> GSM549281     2  0.2530      0.828 0.000 0.888 0.112 0.000
#> GSM549285     3  0.1557      0.863 0.000 0.056 0.944 0.000
#> GSM549288     2  0.4992      0.212 0.000 0.524 0.476 0.000
#> GSM549292     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM549295     2  0.4985      0.237 0.000 0.532 0.468 0.000
#> GSM549297     2  0.3486      0.751 0.000 0.812 0.188 0.000
#> GSM750743     1  0.0672      0.889 0.984 0.000 0.008 0.008
#> GSM549268     2  0.3610      0.742 0.000 0.800 0.200 0.000
#> GSM549290     3  0.3266      0.759 0.000 0.000 0.832 0.168
#> GSM549272     2  0.0000      0.895 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0188      0.895 0.000 0.996 0.004 0.000
#> GSM549275     1  0.3992      0.726 0.800 0.188 0.008 0.004
#> GSM549284     2  0.0188      0.895 0.000 0.996 0.004 0.000
#> GSM750737     4  0.2271      0.854 0.076 0.000 0.008 0.916
#> GSM750740     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.890 1.000 0.000 0.000 0.000
#> GSM750751     2  0.0188      0.895 0.000 0.996 0.004 0.000
#> GSM750754     3  0.0921      0.872 0.000 0.000 0.972 0.028

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.4038     0.7111 0.000 0.000 0.080 0.792 0.128
#> GSM549291     3  0.5925     0.2934 0.000 0.000 0.556 0.316 0.128
#> GSM549274     2  0.0609     0.8991 0.000 0.980 0.000 0.000 0.020
#> GSM750738     2  0.1915     0.8774 0.000 0.928 0.000 0.032 0.040
#> GSM750748     1  0.3983     0.1514 0.660 0.000 0.000 0.000 0.340
#> GSM549240     1  0.5933     0.3461 0.632 0.048 0.000 0.060 0.260
#> GSM549279     2  0.5517     0.6954 0.068 0.688 0.020 0.008 0.216
#> GSM549294     2  0.0579     0.8973 0.000 0.984 0.008 0.000 0.008
#> GSM549300     3  0.3203     0.6952 0.000 0.168 0.820 0.000 0.012
#> GSM549303     3  0.0794     0.7555 0.000 0.000 0.972 0.000 0.028
#> GSM549309     3  0.0880     0.7546 0.000 0.000 0.968 0.000 0.032
#> GSM750753     2  0.1764     0.8708 0.000 0.928 0.064 0.000 0.008
#> GSM750752     4  0.5137     0.5980 0.000 0.016 0.152 0.724 0.108
#> GSM549304     2  0.0510     0.8996 0.000 0.984 0.000 0.000 0.016
#> GSM549305     2  0.0566     0.8979 0.000 0.984 0.012 0.000 0.004
#> GSM549307     3  0.4430     0.4241 0.000 0.360 0.628 0.000 0.012
#> GSM549306     3  0.2522     0.7403 0.000 0.108 0.880 0.000 0.012
#> GSM549308     3  0.0579     0.7589 0.000 0.008 0.984 0.000 0.008
#> GSM549233     5  0.6598     0.5959 0.276 0.000 0.000 0.260 0.464
#> GSM549234     4  0.1851     0.7726 0.000 0.000 0.000 0.912 0.088
#> GSM549250     5  0.6019     0.7483 0.380 0.000 0.000 0.120 0.500
#> GSM549287     3  0.2069     0.7351 0.000 0.000 0.912 0.012 0.076
#> GSM750735     1  0.2843     0.4369 0.848 0.000 0.000 0.008 0.144
#> GSM750736     1  0.3476     0.4264 0.804 0.000 0.000 0.020 0.176
#> GSM750749     1  0.7390     0.2532 0.532 0.036 0.116 0.040 0.276
#> GSM549230     5  0.5092     0.6830 0.440 0.000 0.000 0.036 0.524
#> GSM549231     5  0.5036     0.6804 0.452 0.000 0.000 0.032 0.516
#> GSM549237     1  0.4622    -0.3064 0.548 0.000 0.000 0.012 0.440
#> GSM549254     4  0.2332     0.7527 0.016 0.004 0.000 0.904 0.076
#> GSM750734     1  0.2179     0.4296 0.888 0.000 0.000 0.000 0.112
#> GSM549271     3  0.1943     0.7413 0.000 0.000 0.924 0.020 0.056
#> GSM549232     4  0.1043     0.7784 0.000 0.000 0.000 0.960 0.040
#> GSM549246     4  0.6164    -0.0552 0.136 0.000 0.000 0.476 0.388
#> GSM549248     1  0.4446    -0.5010 0.520 0.000 0.000 0.004 0.476
#> GSM549255     4  0.0963     0.7775 0.000 0.000 0.000 0.964 0.036
#> GSM750746     1  0.3895     0.1923 0.680 0.000 0.000 0.000 0.320
#> GSM549259     1  0.3534     0.3200 0.744 0.000 0.000 0.000 0.256
#> GSM549269     2  0.0609     0.8991 0.000 0.980 0.000 0.000 0.020
#> GSM549273     3  0.0798     0.7595 0.000 0.008 0.976 0.000 0.016
#> GSM549299     2  0.1943     0.8725 0.000 0.924 0.056 0.000 0.020
#> GSM549301     3  0.2130     0.7506 0.000 0.080 0.908 0.000 0.012
#> GSM549310     3  0.6207     0.2258 0.000 0.008 0.524 0.348 0.120
#> GSM549311     3  0.0794     0.7555 0.000 0.000 0.972 0.000 0.028
#> GSM549302     2  0.0609     0.8991 0.000 0.980 0.000 0.000 0.020
#> GSM549235     1  0.4060     0.0877 0.640 0.000 0.000 0.000 0.360
#> GSM549245     4  0.0880     0.7775 0.000 0.000 0.000 0.968 0.032
#> GSM549265     4  0.4305     0.6947 0.052 0.000 0.000 0.748 0.200
#> GSM549282     3  0.0794     0.7568 0.000 0.000 0.972 0.000 0.028
#> GSM549296     4  0.4850     0.5979 0.000 0.004 0.156 0.732 0.108
#> GSM750739     1  0.3707     0.2115 0.716 0.000 0.000 0.000 0.284
#> GSM750742     1  0.4300    -0.4509 0.524 0.000 0.000 0.000 0.476
#> GSM750744     1  0.3707     0.2066 0.716 0.000 0.000 0.000 0.284
#> GSM750750     3  0.0451     0.7591 0.000 0.004 0.988 0.000 0.008
#> GSM549242     5  0.6347     0.6808 0.376 0.000 0.000 0.164 0.460
#> GSM549252     4  0.3086     0.7269 0.004 0.000 0.000 0.816 0.180
#> GSM549253     5  0.5524     0.7447 0.416 0.000 0.000 0.068 0.516
#> GSM549256     5  0.6631     0.5005 0.236 0.000 0.000 0.324 0.440
#> GSM549257     4  0.1544     0.7762 0.000 0.000 0.000 0.932 0.068
#> GSM549263     5  0.5216     0.7142 0.436 0.000 0.000 0.044 0.520
#> GSM549267     3  0.4704     0.5905 0.000 0.000 0.736 0.152 0.112
#> GSM750745     1  0.1124     0.4608 0.960 0.000 0.000 0.004 0.036
#> GSM549239     1  0.2020     0.4447 0.900 0.000 0.000 0.000 0.100
#> GSM549244     4  0.2074     0.7664 0.000 0.000 0.000 0.896 0.104
#> GSM549249     4  0.3160     0.7227 0.004 0.000 0.000 0.808 0.188
#> GSM549260     1  0.4908     0.1708 0.636 0.000 0.000 0.044 0.320
#> GSM549266     2  0.4902     0.7364 0.036 0.728 0.024 0.004 0.208
#> GSM549293     2  0.0703     0.8985 0.000 0.976 0.000 0.000 0.024
#> GSM549236     5  0.6012     0.7449 0.376 0.000 0.000 0.120 0.504
#> GSM549238     4  0.5942     0.0985 0.116 0.000 0.000 0.524 0.360
#> GSM549251     5  0.5381     0.7328 0.428 0.000 0.000 0.056 0.516
#> GSM549258     1  0.2338     0.4556 0.884 0.000 0.000 0.004 0.112
#> GSM549264     1  0.4632    -0.4594 0.540 0.000 0.000 0.012 0.448
#> GSM549243     1  0.4088     0.0619 0.632 0.000 0.000 0.000 0.368
#> GSM549262     1  0.4294    -0.4292 0.532 0.000 0.000 0.000 0.468
#> GSM549278     4  0.6328     0.0224 0.004 0.000 0.412 0.448 0.136
#> GSM549283     2  0.2903     0.8445 0.000 0.872 0.080 0.000 0.048
#> GSM549298     3  0.1942     0.7536 0.000 0.068 0.920 0.000 0.012
#> GSM750741     1  0.3282     0.4265 0.804 0.000 0.000 0.008 0.188
#> GSM549286     2  0.0510     0.8994 0.000 0.984 0.000 0.000 0.016
#> GSM549241     1  0.2286     0.4580 0.888 0.000 0.000 0.004 0.108
#> GSM549247     1  0.7239     0.2671 0.520 0.164 0.000 0.068 0.248
#> GSM549261     1  0.3684     0.2760 0.720 0.000 0.000 0.000 0.280
#> GSM549270     2  0.1408     0.8817 0.000 0.948 0.044 0.000 0.008
#> GSM549277     3  0.4900     0.1465 0.000 0.464 0.512 0.000 0.024
#> GSM549280     3  0.4867     0.2415 0.000 0.432 0.544 0.000 0.024
#> GSM549281     2  0.6619     0.5771 0.028 0.592 0.144 0.008 0.228
#> GSM549285     3  0.2448     0.7472 0.000 0.088 0.892 0.000 0.020
#> GSM549288     3  0.4747     0.1018 0.000 0.484 0.500 0.000 0.016
#> GSM549292     2  0.0609     0.8991 0.000 0.980 0.000 0.000 0.020
#> GSM549295     3  0.4659     0.0887 0.000 0.488 0.500 0.000 0.012
#> GSM549297     2  0.3934     0.6213 0.000 0.740 0.244 0.000 0.016
#> GSM750743     1  0.1792     0.4446 0.916 0.000 0.000 0.000 0.084
#> GSM549268     2  0.6585     0.4669 0.016 0.548 0.224 0.000 0.212
#> GSM549290     3  0.4914     0.5596 0.000 0.000 0.712 0.180 0.108
#> GSM549272     2  0.0609     0.8991 0.000 0.980 0.000 0.000 0.020
#> GSM549276     2  0.0290     0.8977 0.000 0.992 0.008 0.000 0.000
#> GSM549275     1  0.5493     0.3636 0.672 0.124 0.000 0.008 0.196
#> GSM549284     2  0.1082     0.8968 0.000 0.964 0.008 0.000 0.028
#> GSM750737     4  0.4982     0.6154 0.220 0.000 0.000 0.692 0.088
#> GSM750740     1  0.3876     0.2231 0.684 0.000 0.000 0.000 0.316
#> GSM750747     1  0.3932     0.1840 0.672 0.000 0.000 0.000 0.328
#> GSM750751     2  0.0579     0.8989 0.000 0.984 0.008 0.000 0.008
#> GSM750754     3  0.2761     0.7126 0.000 0.000 0.872 0.024 0.104

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.5437     0.2851 0.004 0.000 0.040 0.608 0.056 0.292
#> GSM549291     6  0.6250     0.8233 0.008 0.000 0.344 0.252 0.000 0.396
#> GSM549274     2  0.1082     0.8330 0.004 0.956 0.000 0.000 0.000 0.040
#> GSM750738     2  0.2550     0.8039 0.024 0.892 0.000 0.036 0.000 0.048
#> GSM750748     5  0.4145     0.5049 0.252 0.000 0.000 0.000 0.700 0.048
#> GSM549240     1  0.6316     0.5323 0.560 0.020 0.000 0.032 0.136 0.252
#> GSM549279     2  0.6585     0.4381 0.216 0.448 0.040 0.000 0.000 0.296
#> GSM549294     2  0.2728     0.8183 0.008 0.872 0.040 0.000 0.000 0.080
#> GSM549300     3  0.2907     0.5368 0.000 0.152 0.828 0.000 0.000 0.020
#> GSM549303     3  0.1765     0.5262 0.000 0.000 0.904 0.000 0.000 0.096
#> GSM549309     3  0.2402     0.4788 0.000 0.000 0.856 0.004 0.000 0.140
#> GSM750753     2  0.2934     0.7932 0.000 0.844 0.112 0.000 0.000 0.044
#> GSM750752     4  0.5902    -0.2135 0.004 0.024 0.104 0.512 0.000 0.356
#> GSM549304     2  0.1080     0.8292 0.004 0.960 0.004 0.000 0.000 0.032
#> GSM549305     2  0.2129     0.8201 0.000 0.904 0.056 0.000 0.000 0.040
#> GSM549307     3  0.4146     0.4478 0.000 0.288 0.676 0.000 0.000 0.036
#> GSM549306     3  0.1895     0.5762 0.000 0.072 0.912 0.000 0.000 0.016
#> GSM549308     3  0.0146     0.5756 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM549233     5  0.4260     0.4625 0.016 0.000 0.000 0.268 0.692 0.024
#> GSM549234     4  0.2547     0.6720 0.004 0.000 0.000 0.880 0.080 0.036
#> GSM549250     5  0.2673     0.6003 0.004 0.000 0.000 0.132 0.852 0.012
#> GSM549287     3  0.3468     0.2277 0.000 0.000 0.728 0.008 0.000 0.264
#> GSM750735     1  0.5132     0.5973 0.684 0.000 0.000 0.032 0.168 0.116
#> GSM750736     1  0.4409     0.6398 0.748 0.000 0.000 0.028 0.156 0.068
#> GSM750749     1  0.6269     0.4635 0.588 0.016 0.048 0.012 0.076 0.260
#> GSM549230     5  0.0909     0.6502 0.020 0.000 0.000 0.012 0.968 0.000
#> GSM549231     5  0.1485     0.6450 0.024 0.000 0.000 0.028 0.944 0.004
#> GSM549237     5  0.3960     0.5405 0.224 0.000 0.000 0.008 0.736 0.032
#> GSM549254     4  0.4087     0.4958 0.064 0.004 0.000 0.744 0.000 0.188
#> GSM750734     1  0.4168     0.3711 0.584 0.000 0.000 0.000 0.400 0.016
#> GSM549271     3  0.3281     0.3786 0.004 0.000 0.784 0.012 0.000 0.200
#> GSM549232     4  0.1578     0.6530 0.004 0.000 0.000 0.936 0.012 0.048
#> GSM549246     5  0.6063    -0.0935 0.056 0.000 0.000 0.400 0.464 0.080
#> GSM549248     5  0.2488     0.6177 0.124 0.000 0.000 0.008 0.864 0.004
#> GSM549255     4  0.1622     0.6562 0.016 0.000 0.000 0.940 0.016 0.028
#> GSM750746     5  0.4274     0.4729 0.276 0.000 0.000 0.000 0.676 0.048
#> GSM549259     5  0.4497     0.3772 0.328 0.000 0.000 0.000 0.624 0.048
#> GSM549269     2  0.0891     0.8325 0.008 0.968 0.000 0.000 0.000 0.024
#> GSM549273     3  0.1297     0.5713 0.000 0.012 0.948 0.000 0.000 0.040
#> GSM549299     2  0.4023     0.7628 0.016 0.780 0.124 0.000 0.000 0.080
#> GSM549301     3  0.1320     0.5840 0.000 0.036 0.948 0.000 0.000 0.016
#> GSM549310     6  0.6437     0.8009 0.004 0.012 0.368 0.240 0.000 0.376
#> GSM549311     3  0.2100     0.5106 0.000 0.000 0.884 0.004 0.000 0.112
#> GSM549302     2  0.0547     0.8302 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM549235     5  0.4038     0.5168 0.244 0.000 0.000 0.000 0.712 0.044
#> GSM549245     4  0.1448     0.6630 0.012 0.000 0.000 0.948 0.016 0.024
#> GSM549265     4  0.5646     0.5566 0.080 0.000 0.000 0.640 0.200 0.080
#> GSM549282     3  0.2402     0.4845 0.000 0.000 0.856 0.004 0.000 0.140
#> GSM549296     4  0.5288    -0.1402 0.004 0.000 0.100 0.552 0.000 0.344
#> GSM750739     5  0.3996     0.3027 0.388 0.000 0.000 0.004 0.604 0.004
#> GSM750742     5  0.1471     0.6447 0.064 0.000 0.000 0.000 0.932 0.004
#> GSM750744     5  0.4419     0.1175 0.404 0.000 0.000 0.012 0.572 0.012
#> GSM750750     3  0.1471     0.5564 0.000 0.004 0.932 0.000 0.000 0.064
#> GSM549242     5  0.4178     0.5661 0.052 0.000 0.000 0.184 0.748 0.016
#> GSM549252     4  0.3388     0.6448 0.004 0.000 0.000 0.804 0.156 0.036
#> GSM549253     5  0.1643     0.6371 0.000 0.000 0.000 0.068 0.924 0.008
#> GSM549256     5  0.4578     0.4263 0.024 0.000 0.000 0.320 0.636 0.020
#> GSM549257     4  0.1719     0.6657 0.004 0.000 0.000 0.932 0.032 0.032
#> GSM549263     5  0.0713     0.6490 0.000 0.000 0.000 0.028 0.972 0.000
#> GSM549267     3  0.5220    -0.4826 0.000 0.000 0.528 0.100 0.000 0.372
#> GSM750745     1  0.3521     0.5695 0.724 0.000 0.000 0.004 0.268 0.004
#> GSM549239     1  0.3992     0.4261 0.624 0.000 0.000 0.000 0.364 0.012
#> GSM549244     4  0.2487     0.6668 0.000 0.000 0.000 0.876 0.092 0.032
#> GSM549249     4  0.3512     0.6212 0.000 0.000 0.000 0.772 0.196 0.032
#> GSM549260     5  0.5569     0.3057 0.304 0.000 0.000 0.048 0.584 0.064
#> GSM549266     2  0.6132     0.5409 0.176 0.524 0.028 0.000 0.000 0.272
#> GSM549293     2  0.0865     0.8285 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM549236     5  0.3016     0.5922 0.012 0.000 0.000 0.136 0.836 0.016
#> GSM549238     4  0.4393     0.1474 0.004 0.000 0.000 0.500 0.480 0.016
#> GSM549251     5  0.1364     0.6457 0.004 0.000 0.000 0.048 0.944 0.004
#> GSM549258     1  0.4905     0.5785 0.640 0.000 0.000 0.004 0.264 0.092
#> GSM549264     5  0.3905     0.5257 0.200 0.000 0.000 0.028 0.756 0.016
#> GSM549243     5  0.3641     0.5427 0.224 0.000 0.000 0.000 0.748 0.028
#> GSM549262     5  0.2149     0.6299 0.104 0.000 0.000 0.004 0.888 0.004
#> GSM549278     6  0.6343     0.8057 0.012 0.000 0.300 0.280 0.000 0.408
#> GSM549283     2  0.4957     0.7464 0.056 0.720 0.116 0.000 0.000 0.108
#> GSM549298     3  0.1461     0.5825 0.000 0.044 0.940 0.000 0.000 0.016
#> GSM750741     1  0.3782     0.6523 0.780 0.000 0.000 0.000 0.124 0.096
#> GSM549286     2  0.0363     0.8319 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM549241     1  0.4926     0.5886 0.640 0.000 0.000 0.000 0.240 0.120
#> GSM549247     1  0.6723     0.5106 0.544 0.096 0.000 0.032 0.072 0.256
#> GSM549261     5  0.4332     0.4678 0.288 0.000 0.000 0.000 0.664 0.048
#> GSM549270     2  0.3561     0.7715 0.012 0.812 0.120 0.000 0.000 0.056
#> GSM549277     3  0.5063     0.2215 0.008 0.368 0.560 0.000 0.000 0.064
#> GSM549280     3  0.5116     0.2612 0.016 0.360 0.568 0.000 0.000 0.056
#> GSM549281     2  0.7368     0.3702 0.152 0.376 0.176 0.000 0.000 0.296
#> GSM549285     3  0.3029     0.5650 0.008 0.052 0.852 0.000 0.000 0.088
#> GSM549288     3  0.4788     0.2403 0.000 0.372 0.568 0.000 0.000 0.060
#> GSM549292     2  0.0891     0.8305 0.008 0.968 0.000 0.000 0.000 0.024
#> GSM549295     3  0.4735     0.1566 0.004 0.416 0.540 0.000 0.000 0.040
#> GSM549297     2  0.4688     0.4636 0.004 0.616 0.328 0.000 0.000 0.052
#> GSM750743     1  0.4504     0.5031 0.628 0.000 0.000 0.008 0.332 0.032
#> GSM549268     2  0.7463     0.2855 0.140 0.348 0.228 0.000 0.000 0.284
#> GSM549290     3  0.5673    -0.6048 0.000 0.000 0.484 0.140 0.004 0.372
#> GSM549272     2  0.0777     0.8330 0.004 0.972 0.000 0.000 0.000 0.024
#> GSM549276     2  0.1492     0.8271 0.000 0.940 0.036 0.000 0.000 0.024
#> GSM549275     1  0.6468     0.5529 0.576 0.112 0.000 0.008 0.104 0.200
#> GSM549284     2  0.1049     0.8298 0.000 0.960 0.008 0.000 0.000 0.032
#> GSM750737     4  0.5895     0.3100 0.324 0.000 0.000 0.532 0.032 0.112
#> GSM750740     5  0.4204     0.5008 0.252 0.000 0.000 0.000 0.696 0.052
#> GSM750747     5  0.4190     0.4960 0.260 0.000 0.000 0.000 0.692 0.048
#> GSM750751     2  0.1871     0.8295 0.016 0.928 0.024 0.000 0.000 0.032
#> GSM750754     3  0.4183     0.0346 0.000 0.000 0.668 0.036 0.000 0.296

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-skmeans-membership-heatmap-5

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)

plot of chunk tab-CV-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-skmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-CV-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-skmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> CV:skmeans 102           0.0336    2.28e-05              9.33e-02  0.00249 2
#> CV:skmeans  93           0.0653    5.50e-05              4.19e-05  0.00543 3
#> CV:skmeans  91           0.3566    5.27e-05              1.32e-02  0.11266 4
#> CV:skmeans  63           0.7114    1.86e-04              3.45e-03  0.00363 5
#> CV:skmeans  68           0.7795    3.72e-03              5.71e-02  0.24729 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.


CV:pam

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-pam-collect-plots

The plots are:

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:

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)

plot of chunk CV-pam-select-partition-number

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.732           0.854       0.936         0.4451 0.567   0.567
#> 3 3 0.493           0.438       0.696         0.4366 0.677   0.487
#> 4 4 0.584           0.660       0.766         0.1372 0.855   0.640
#> 5 5 0.764           0.811       0.884         0.0873 0.869   0.583
#> 6 6 0.761           0.699       0.846         0.0332 0.974   0.875

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      0.926 1.000 0.000
#> GSM549291     1  0.2948      0.889 0.948 0.052
#> GSM549274     1  0.9427      0.478 0.640 0.360
#> GSM750738     1  0.9209      0.525 0.664 0.336
#> GSM750748     1  0.0000      0.926 1.000 0.000
#> GSM549240     1  0.0000      0.926 1.000 0.000
#> GSM549279     1  0.6623      0.769 0.828 0.172
#> GSM549294     2  0.5059      0.872 0.112 0.888
#> GSM549300     2  0.0000      0.931 0.000 1.000
#> GSM549303     2  0.0000      0.931 0.000 1.000
#> GSM549309     2  0.0672      0.929 0.008 0.992
#> GSM750753     2  0.4298      0.895 0.088 0.912
#> GSM750752     1  0.9491      0.464 0.632 0.368
#> GSM549304     1  0.9552      0.443 0.624 0.376
#> GSM549305     2  0.3733      0.905 0.072 0.928
#> GSM549307     2  0.0000      0.931 0.000 1.000
#> GSM549306     2  0.0000      0.931 0.000 1.000
#> GSM549308     2  0.0000      0.931 0.000 1.000
#> GSM549233     1  0.0000      0.926 1.000 0.000
#> GSM549234     1  0.0000      0.926 1.000 0.000
#> GSM549250     1  0.0000      0.926 1.000 0.000
#> GSM549287     2  0.0376      0.930 0.004 0.996
#> GSM750735     1  0.0000      0.926 1.000 0.000
#> GSM750736     1  0.0000      0.926 1.000 0.000
#> GSM750749     1  0.0000      0.926 1.000 0.000
#> GSM549230     1  0.0000      0.926 1.000 0.000
#> GSM549231     1  0.0000      0.926 1.000 0.000
#> GSM549237     1  0.0000      0.926 1.000 0.000
#> GSM549254     1  0.0376      0.923 0.996 0.004
#> GSM750734     1  0.0000      0.926 1.000 0.000
#> GSM549271     2  0.0672      0.930 0.008 0.992
#> GSM549232     1  0.0000      0.926 1.000 0.000
#> GSM549246     1  0.0000      0.926 1.000 0.000
#> GSM549248     1  0.0000      0.926 1.000 0.000
#> GSM549255     1  0.0000      0.926 1.000 0.000
#> GSM750746     1  0.0000      0.926 1.000 0.000
#> GSM549259     1  0.0000      0.926 1.000 0.000
#> GSM549269     1  0.9358      0.495 0.648 0.352
#> GSM549273     2  0.0000      0.931 0.000 1.000
#> GSM549299     2  0.9491      0.394 0.368 0.632
#> GSM549301     2  0.0000      0.931 0.000 1.000
#> GSM549310     2  0.0672      0.930 0.008 0.992
#> GSM549311     2  0.0000      0.931 0.000 1.000
#> GSM549302     2  0.4939      0.876 0.108 0.892
#> GSM549235     1  0.0000      0.926 1.000 0.000
#> GSM549245     1  0.0000      0.926 1.000 0.000
#> GSM549265     1  0.0000      0.926 1.000 0.000
#> GSM549282     2  0.3431      0.898 0.064 0.936
#> GSM549296     1  0.9775      0.358 0.588 0.412
#> GSM750739     1  0.0000      0.926 1.000 0.000
#> GSM750742     1  0.0000      0.926 1.000 0.000
#> GSM750744     1  0.0000      0.926 1.000 0.000
#> GSM750750     2  0.5059      0.854 0.112 0.888
#> GSM549242     1  0.0000      0.926 1.000 0.000
#> GSM549252     1  0.0000      0.926 1.000 0.000
#> GSM549253     1  0.0000      0.926 1.000 0.000
#> GSM549256     1  0.0000      0.926 1.000 0.000
#> GSM549257     1  0.0000      0.926 1.000 0.000
#> GSM549263     1  0.0000      0.926 1.000 0.000
#> GSM549267     2  0.7139      0.764 0.196 0.804
#> GSM750745     1  0.0000      0.926 1.000 0.000
#> GSM549239     1  0.0000      0.926 1.000 0.000
#> GSM549244     1  0.0000      0.926 1.000 0.000
#> GSM549249     1  0.0000      0.926 1.000 0.000
#> GSM549260     1  0.0000      0.926 1.000 0.000
#> GSM549266     1  0.5294      0.825 0.880 0.120
#> GSM549293     1  0.9522      0.452 0.628 0.372
#> GSM549236     1  0.0000      0.926 1.000 0.000
#> GSM549238     1  0.0000      0.926 1.000 0.000
#> GSM549251     1  0.0000      0.926 1.000 0.000
#> GSM549258     1  0.0000      0.926 1.000 0.000
#> GSM549264     1  0.0000      0.926 1.000 0.000
#> GSM549243     1  0.0000      0.926 1.000 0.000
#> GSM549262     1  0.0000      0.926 1.000 0.000
#> GSM549278     1  0.0000      0.926 1.000 0.000
#> GSM549283     1  0.7602      0.710 0.780 0.220
#> GSM549298     2  0.0000      0.931 0.000 1.000
#> GSM750741     1  0.0000      0.926 1.000 0.000
#> GSM549286     2  0.4022      0.900 0.080 0.920
#> GSM549241     1  0.0000      0.926 1.000 0.000
#> GSM549247     1  0.0000      0.926 1.000 0.000
#> GSM549261     1  0.0000      0.926 1.000 0.000
#> GSM549270     2  0.0000      0.931 0.000 1.000
#> GSM549277     2  0.0000      0.931 0.000 1.000
#> GSM549280     2  0.2043      0.923 0.032 0.968
#> GSM549281     1  0.4022      0.864 0.920 0.080
#> GSM549285     1  0.1184      0.915 0.984 0.016
#> GSM549288     2  0.0000      0.931 0.000 1.000
#> GSM549292     1  0.9988      0.131 0.520 0.480
#> GSM549295     2  0.0000      0.931 0.000 1.000
#> GSM549297     2  0.0000      0.931 0.000 1.000
#> GSM750743     1  0.0000      0.926 1.000 0.000
#> GSM549268     1  0.8327      0.648 0.736 0.264
#> GSM549290     1  0.8861      0.547 0.696 0.304
#> GSM549272     2  0.4298      0.895 0.088 0.912
#> GSM549276     2  0.3879      0.903 0.076 0.924
#> GSM549275     1  0.0000      0.926 1.000 0.000
#> GSM549284     1  0.9754      0.363 0.592 0.408
#> GSM750737     1  0.0000      0.926 1.000 0.000
#> GSM750740     1  0.0000      0.926 1.000 0.000
#> GSM750747     1  0.0000      0.926 1.000 0.000
#> GSM750751     2  0.4298      0.895 0.088 0.912
#> GSM750754     2  0.9775      0.317 0.412 0.588

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.9318    0.26979 0.172 0.352 0.476
#> GSM549291     3  0.8784    0.26678 0.124 0.352 0.524
#> GSM549274     2  0.6933    0.19093 0.208 0.716 0.076
#> GSM750738     2  0.8440    0.08992 0.184 0.620 0.196
#> GSM750748     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549240     1  0.0237    0.81013 0.996 0.000 0.004
#> GSM549279     1  0.4291    0.63722 0.820 0.180 0.000
#> GSM549294     2  0.6579    0.43985 0.020 0.652 0.328
#> GSM549300     2  0.6291    0.27779 0.000 0.532 0.468
#> GSM549303     3  0.6026   -0.05730 0.000 0.376 0.624
#> GSM549309     3  0.5968   -0.04801 0.000 0.364 0.636
#> GSM750753     2  0.5810    0.43791 0.000 0.664 0.336
#> GSM750752     2  0.9229   -0.03151 0.168 0.496 0.336
#> GSM549304     2  0.6449    0.26118 0.204 0.740 0.056
#> GSM549305     2  0.5859    0.43446 0.000 0.656 0.344
#> GSM549307     3  0.6302   -0.24692 0.000 0.480 0.520
#> GSM549306     3  0.6260   -0.18974 0.000 0.448 0.552
#> GSM549308     3  0.6045   -0.06108 0.000 0.380 0.620
#> GSM549233     1  0.5072    0.78046 0.792 0.012 0.196
#> GSM549234     2  0.9986   -0.27664 0.308 0.352 0.340
#> GSM549250     1  0.4399    0.79028 0.812 0.000 0.188
#> GSM549287     3  0.5621   -0.03257 0.000 0.308 0.692
#> GSM750735     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM750736     1  0.0424    0.80933 0.992 0.000 0.008
#> GSM750749     1  0.0424    0.80596 0.992 0.008 0.000
#> GSM549230     1  0.4291    0.79359 0.820 0.000 0.180
#> GSM549231     1  0.4291    0.79292 0.820 0.000 0.180
#> GSM549237     1  0.4178    0.79703 0.828 0.000 0.172
#> GSM549254     1  0.9587   -0.06018 0.440 0.356 0.204
#> GSM750734     1  0.2711    0.80972 0.912 0.000 0.088
#> GSM549271     3  0.6308    0.13837 0.000 0.492 0.508
#> GSM549232     3  0.9829    0.19777 0.248 0.352 0.400
#> GSM549246     1  0.6253    0.73182 0.732 0.036 0.232
#> GSM549248     1  0.4346    0.79172 0.816 0.000 0.184
#> GSM549255     1  0.9550   -0.04466 0.448 0.352 0.200
#> GSM750746     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549259     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549269     2  0.5633    0.23042 0.208 0.768 0.024
#> GSM549273     3  0.6045   -0.06108 0.000 0.380 0.620
#> GSM549299     2  0.9174    0.38743 0.164 0.504 0.332
#> GSM549301     3  0.6045   -0.06108 0.000 0.380 0.620
#> GSM549310     2  0.6045   -0.08913 0.000 0.620 0.380
#> GSM549311     3  0.5926   -0.04499 0.000 0.356 0.644
#> GSM549302     2  0.6482    0.42887 0.024 0.680 0.296
#> GSM549235     1  0.4235    0.79414 0.824 0.000 0.176
#> GSM549245     2  0.9986   -0.27697 0.308 0.352 0.340
#> GSM549265     3  0.9816    0.20404 0.244 0.356 0.400
#> GSM549282     3  0.4861   -0.00329 0.008 0.192 0.800
#> GSM549296     2  0.9424   -0.05133 0.184 0.464 0.352
#> GSM750739     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM750742     1  0.4291    0.79292 0.820 0.000 0.180
#> GSM750744     1  0.4291    0.79292 0.820 0.000 0.180
#> GSM750750     3  0.6379   -0.05413 0.008 0.368 0.624
#> GSM549242     1  0.4399    0.79083 0.812 0.000 0.188
#> GSM549252     3  0.9904    0.15746 0.268 0.352 0.380
#> GSM549253     1  0.4452    0.78833 0.808 0.000 0.192
#> GSM549256     1  0.4235    0.79663 0.824 0.000 0.176
#> GSM549257     1  0.9579   -0.05027 0.444 0.352 0.204
#> GSM549263     1  0.4346    0.79172 0.816 0.000 0.184
#> GSM549267     3  0.6379    0.22956 0.008 0.368 0.624
#> GSM750745     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549239     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549244     3  0.9550    0.26847 0.200 0.352 0.448
#> GSM549249     3  0.9904    0.15746 0.268 0.352 0.380
#> GSM549260     1  0.2261    0.81143 0.932 0.000 0.068
#> GSM549266     1  0.3686    0.68889 0.860 0.140 0.000
#> GSM549293     2  0.7199    0.17858 0.204 0.704 0.092
#> GSM549236     1  0.4452    0.78833 0.808 0.000 0.192
#> GSM549238     1  0.8404    0.55055 0.592 0.120 0.288
#> GSM549251     1  0.4452    0.78833 0.808 0.000 0.192
#> GSM549258     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549264     1  0.4291    0.79292 0.820 0.000 0.180
#> GSM549243     1  0.4121    0.79707 0.832 0.000 0.168
#> GSM549262     1  0.4291    0.79292 0.820 0.000 0.180
#> GSM549278     3  0.9792    0.21663 0.240 0.352 0.408
#> GSM549283     1  0.5774    0.54329 0.748 0.232 0.020
#> GSM549298     3  0.6045   -0.06108 0.000 0.380 0.620
#> GSM750741     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549286     2  0.5760    0.43981 0.000 0.672 0.328
#> GSM549241     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549247     1  0.3644    0.72287 0.872 0.124 0.004
#> GSM549261     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549270     2  0.5905    0.42851 0.000 0.648 0.352
#> GSM549277     2  0.5905    0.42851 0.000 0.648 0.352
#> GSM549280     2  0.5859    0.43446 0.000 0.656 0.344
#> GSM549281     1  0.2537    0.75532 0.920 0.080 0.000
#> GSM549285     1  0.5420    0.74931 0.752 0.008 0.240
#> GSM549288     2  0.6225    0.33226 0.000 0.568 0.432
#> GSM549292     2  0.5792    0.26834 0.192 0.772 0.036
#> GSM549295     2  0.6154    0.36861 0.000 0.592 0.408
#> GSM549297     2  0.5905    0.42851 0.000 0.648 0.352
#> GSM750743     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549268     1  0.7411    0.37201 0.668 0.256 0.076
#> GSM549290     3  0.8314    0.26116 0.092 0.352 0.556
#> GSM549272     2  0.5706    0.43883 0.000 0.680 0.320
#> GSM549276     2  0.5785    0.43921 0.000 0.668 0.332
#> GSM549275     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM549284     2  0.9034    0.35153 0.200 0.556 0.244
#> GSM750737     1  0.9424   -0.01102 0.464 0.352 0.184
#> GSM750740     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM750747     1  0.0000    0.81075 1.000 0.000 0.000
#> GSM750751     2  0.5760    0.43981 0.000 0.672 0.328
#> GSM750754     3  0.5905    0.22895 0.000 0.352 0.648

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.3991     0.7870 0.172 0.000 0.020 0.808
#> GSM549291     4  0.4004     0.7865 0.164 0.000 0.024 0.812
#> GSM549274     2  0.4164     0.6409 0.000 0.736 0.264 0.000
#> GSM750738     4  0.4925     0.2687 0.000 0.428 0.000 0.572
#> GSM750748     1  0.7084     0.7191 0.560 0.000 0.264 0.176
#> GSM549240     1  0.7325     0.7096 0.528 0.000 0.264 0.208
#> GSM549279     1  0.9404     0.5712 0.412 0.140 0.264 0.184
#> GSM549294     2  0.0188     0.7303 0.000 0.996 0.004 0.000
#> GSM549300     3  0.4999     0.5601 0.000 0.492 0.508 0.000
#> GSM549303     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM549309     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM750753     2  0.0000     0.7298 0.000 1.000 0.000 0.000
#> GSM750752     4  0.4238     0.6927 0.000 0.176 0.028 0.796
#> GSM549304     2  0.4313     0.6419 0.000 0.736 0.260 0.004
#> GSM549305     2  0.0000     0.7298 0.000 1.000 0.000 0.000
#> GSM549307     3  0.4855     0.7400 0.000 0.400 0.600 0.000
#> GSM549306     3  0.4304     0.8759 0.000 0.284 0.716 0.000
#> GSM549308     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM549233     1  0.3311     0.4402 0.828 0.000 0.000 0.172
#> GSM549234     4  0.2589     0.7847 0.116 0.000 0.000 0.884
#> GSM549250     1  0.0921     0.6225 0.972 0.000 0.000 0.028
#> GSM549287     3  0.4452     0.8882 0.008 0.260 0.732 0.000
#> GSM750735     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM750736     1  0.7377     0.7043 0.520 0.000 0.264 0.216
#> GSM750749     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549230     1  0.0336     0.6344 0.992 0.000 0.000 0.008
#> GSM549231     1  0.0000     0.6388 1.000 0.000 0.000 0.000
#> GSM549237     1  0.0657     0.6438 0.984 0.000 0.004 0.012
#> GSM549254     4  0.0927     0.7303 0.008 0.016 0.000 0.976
#> GSM750734     1  0.5875     0.7112 0.692 0.000 0.204 0.104
#> GSM549271     4  0.5808     0.6634 0.020 0.084 0.160 0.736
#> GSM549232     4  0.3400     0.7875 0.180 0.000 0.000 0.820
#> GSM549246     1  0.2999     0.5127 0.864 0.000 0.004 0.132
#> GSM549248     1  0.0469     0.6325 0.988 0.000 0.000 0.012
#> GSM549255     4  0.0000     0.7197 0.000 0.000 0.000 1.000
#> GSM750746     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549259     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549269     2  0.4164     0.6409 0.000 0.736 0.264 0.000
#> GSM549273     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM549299     2  0.2760     0.7003 0.000 0.872 0.128 0.000
#> GSM549301     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM549310     4  0.6316     0.5751 0.000 0.156 0.184 0.660
#> GSM549311     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM549302     2  0.1118     0.7168 0.000 0.964 0.000 0.036
#> GSM549235     1  0.1733     0.6593 0.948 0.000 0.028 0.024
#> GSM549245     4  0.2868     0.7897 0.136 0.000 0.000 0.864
#> GSM549265     4  0.4356     0.7270 0.292 0.000 0.000 0.708
#> GSM549282     3  0.7054     0.6321 0.232 0.196 0.572 0.000
#> GSM549296     4  0.4057     0.7086 0.000 0.152 0.032 0.816
#> GSM750739     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM750742     1  0.0000     0.6388 1.000 0.000 0.000 0.000
#> GSM750744     1  0.1545     0.6587 0.952 0.000 0.040 0.008
#> GSM750750     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM549242     1  0.2149     0.5678 0.912 0.000 0.000 0.088
#> GSM549252     4  0.3356     0.7889 0.176 0.000 0.000 0.824
#> GSM549253     1  0.2149     0.5678 0.912 0.000 0.000 0.088
#> GSM549256     1  0.4514     0.6294 0.800 0.000 0.064 0.136
#> GSM549257     4  0.0188     0.7228 0.004 0.000 0.000 0.996
#> GSM549263     1  0.0336     0.6344 0.992 0.000 0.000 0.008
#> GSM549267     4  0.7647     0.4546 0.388 0.000 0.208 0.404
#> GSM750745     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549239     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549244     4  0.3400     0.7875 0.180 0.000 0.000 0.820
#> GSM549249     4  0.4967     0.5692 0.452 0.000 0.000 0.548
#> GSM549260     1  0.7297     0.6811 0.536 0.000 0.244 0.220
#> GSM549266     1  0.9099     0.6080 0.452 0.120 0.264 0.164
#> GSM549293     2  0.4164     0.6409 0.000 0.736 0.264 0.000
#> GSM549236     1  0.1867     0.5850 0.928 0.000 0.000 0.072
#> GSM549238     1  0.4406     0.0821 0.700 0.000 0.000 0.300
#> GSM549251     1  0.0817     0.6249 0.976 0.000 0.000 0.024
#> GSM549258     1  0.7402     0.7033 0.516 0.000 0.264 0.220
#> GSM549264     1  0.0000     0.6388 1.000 0.000 0.000 0.000
#> GSM549243     1  0.3048     0.6780 0.876 0.000 0.108 0.016
#> GSM549262     1  0.0000     0.6388 1.000 0.000 0.000 0.000
#> GSM549278     4  0.4121     0.7867 0.184 0.000 0.020 0.796
#> GSM549283     2  0.9874    -0.2601 0.260 0.300 0.264 0.176
#> GSM549298     3  0.4164     0.8942 0.000 0.264 0.736 0.000
#> GSM750741     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549286     2  0.0000     0.7298 0.000 1.000 0.000 0.000
#> GSM549241     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549247     1  0.7752     0.6395 0.436 0.000 0.264 0.300
#> GSM549261     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549270     2  0.0000     0.7298 0.000 1.000 0.000 0.000
#> GSM549277     2  0.1211     0.6962 0.000 0.960 0.040 0.000
#> GSM549280     2  0.0188     0.7272 0.000 0.996 0.004 0.000
#> GSM549281     1  0.9272     0.4942 0.420 0.204 0.264 0.112
#> GSM549285     1  0.3324     0.5282 0.852 0.000 0.136 0.012
#> GSM549288     2  0.3726     0.3720 0.000 0.788 0.212 0.000
#> GSM549292     2  0.5077     0.6250 0.000 0.760 0.080 0.160
#> GSM549295     2  0.4331     0.1516 0.000 0.712 0.288 0.000
#> GSM549297     2  0.0921     0.7065 0.000 0.972 0.028 0.000
#> GSM750743     1  0.7084     0.7192 0.560 0.000 0.264 0.176
#> GSM549268     2  0.8331     0.0401 0.316 0.452 0.200 0.032
#> GSM549290     4  0.6094     0.6024 0.416 0.000 0.048 0.536
#> GSM549272     2  0.0000     0.7298 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0000     0.7298 0.000 1.000 0.000 0.000
#> GSM549275     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM549284     2  0.4155     0.6527 0.000 0.756 0.240 0.004
#> GSM750737     4  0.3074     0.5694 0.000 0.000 0.152 0.848
#> GSM750740     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM750747     1  0.7117     0.7190 0.556 0.000 0.264 0.180
#> GSM750751     2  0.0000     0.7298 0.000 1.000 0.000 0.000
#> GSM750754     3  0.6548     0.4128 0.176 0.000 0.636 0.188

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.1270      0.905 0.000 0.000 0.000 0.948 0.052
#> GSM549291     4  0.0404      0.919 0.000 0.000 0.000 0.988 0.012
#> GSM549274     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM750738     4  0.3642      0.678 0.000 0.232 0.000 0.760 0.008
#> GSM750748     1  0.1608      0.856 0.928 0.000 0.000 0.000 0.072
#> GSM549240     1  0.1485      0.869 0.948 0.000 0.000 0.020 0.032
#> GSM549279     1  0.3449      0.790 0.844 0.064 0.000 0.004 0.088
#> GSM549294     2  0.1608      0.899 0.000 0.928 0.000 0.000 0.072
#> GSM549300     3  0.4326      0.615 0.000 0.264 0.708 0.000 0.028
#> GSM549303     3  0.0324      0.942 0.000 0.000 0.992 0.004 0.004
#> GSM549309     3  0.0162      0.943 0.000 0.000 0.996 0.000 0.004
#> GSM750753     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM750752     4  0.0865      0.911 0.000 0.004 0.000 0.972 0.024
#> GSM549304     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM549305     2  0.0162      0.927 0.000 0.996 0.000 0.000 0.004
#> GSM549307     3  0.3224      0.798 0.000 0.160 0.824 0.000 0.016
#> GSM549306     3  0.0290      0.941 0.000 0.000 0.992 0.000 0.008
#> GSM549308     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> GSM549233     5  0.3759      0.812 0.092 0.000 0.000 0.092 0.816
#> GSM549234     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM549250     5  0.2886      0.830 0.148 0.000 0.000 0.008 0.844
#> GSM549287     3  0.1106      0.932 0.000 0.000 0.964 0.012 0.024
#> GSM750735     1  0.0000      0.874 1.000 0.000 0.000 0.000 0.000
#> GSM750736     1  0.0451      0.872 0.988 0.000 0.000 0.008 0.004
#> GSM750749     1  0.1965      0.816 0.904 0.000 0.000 0.000 0.096
#> GSM549230     5  0.2773      0.827 0.164 0.000 0.000 0.000 0.836
#> GSM549231     5  0.2690      0.828 0.156 0.000 0.000 0.000 0.844
#> GSM549237     5  0.3741      0.747 0.264 0.000 0.000 0.004 0.732
#> GSM549254     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM750734     1  0.2074      0.802 0.896 0.000 0.000 0.000 0.104
#> GSM549271     4  0.1403      0.897 0.000 0.000 0.024 0.952 0.024
#> GSM549232     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM549246     5  0.5232      0.701 0.268 0.000 0.000 0.084 0.648
#> GSM549248     5  0.4397      0.395 0.432 0.000 0.000 0.004 0.564
#> GSM549255     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM750746     1  0.1270      0.866 0.948 0.000 0.000 0.000 0.052
#> GSM549259     1  0.1197      0.867 0.952 0.000 0.000 0.000 0.048
#> GSM549269     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM549273     3  0.0671      0.939 0.000 0.000 0.980 0.004 0.016
#> GSM549299     2  0.1478      0.903 0.000 0.936 0.000 0.000 0.064
#> GSM549301     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> GSM549310     4  0.3246      0.810 0.000 0.008 0.120 0.848 0.024
#> GSM549311     3  0.0771      0.938 0.000 0.000 0.976 0.004 0.020
#> GSM549302     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM549235     1  0.3983      0.363 0.660 0.000 0.000 0.000 0.340
#> GSM549245     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM549265     4  0.4151      0.417 0.004 0.000 0.000 0.652 0.344
#> GSM549282     5  0.4446      0.118 0.000 0.000 0.476 0.004 0.520
#> GSM549296     4  0.0609      0.914 0.000 0.000 0.000 0.980 0.020
#> GSM750739     1  0.0404      0.874 0.988 0.000 0.000 0.000 0.012
#> GSM750742     5  0.2690      0.828 0.156 0.000 0.000 0.000 0.844
#> GSM750744     5  0.4201      0.570 0.408 0.000 0.000 0.000 0.592
#> GSM750750     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> GSM549242     5  0.3289      0.826 0.108 0.000 0.000 0.048 0.844
#> GSM549252     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM549253     5  0.3237      0.825 0.104 0.000 0.000 0.048 0.848
#> GSM549256     5  0.4333      0.766 0.212 0.000 0.000 0.048 0.740
#> GSM549257     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM549263     5  0.2690      0.828 0.156 0.000 0.000 0.000 0.844
#> GSM549267     5  0.5983      0.439 0.000 0.000 0.168 0.252 0.580
#> GSM750745     1  0.0000      0.874 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000      0.874 1.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.0290      0.923 0.000 0.000 0.000 0.992 0.008
#> GSM549249     5  0.3160      0.701 0.004 0.000 0.000 0.188 0.808
#> GSM549260     1  0.3090      0.819 0.860 0.000 0.000 0.052 0.088
#> GSM549266     1  0.4411      0.737 0.764 0.116 0.000 0.000 0.120
#> GSM549293     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM549236     5  0.3242      0.828 0.116 0.000 0.000 0.040 0.844
#> GSM549238     5  0.3543      0.791 0.060 0.000 0.000 0.112 0.828
#> GSM549251     5  0.2997      0.830 0.148 0.000 0.000 0.012 0.840
#> GSM549258     1  0.0992      0.862 0.968 0.000 0.000 0.024 0.008
#> GSM549264     5  0.3177      0.804 0.208 0.000 0.000 0.000 0.792
#> GSM549243     1  0.3586      0.581 0.736 0.000 0.000 0.000 0.264
#> GSM549262     5  0.2813      0.825 0.168 0.000 0.000 0.000 0.832
#> GSM549278     4  0.0693      0.914 0.012 0.000 0.000 0.980 0.008
#> GSM549283     1  0.5468      0.440 0.600 0.332 0.000 0.008 0.060
#> GSM549298     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> GSM750741     1  0.0000      0.874 1.000 0.000 0.000 0.000 0.000
#> GSM549286     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM549241     1  0.0000      0.874 1.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.3995      0.715 0.776 0.000 0.000 0.180 0.044
#> GSM549261     1  0.1341      0.864 0.944 0.000 0.000 0.000 0.056
#> GSM549270     2  0.0162      0.927 0.000 0.996 0.000 0.000 0.004
#> GSM549277     2  0.1493      0.911 0.000 0.948 0.024 0.000 0.028
#> GSM549280     2  0.2068      0.892 0.000 0.904 0.004 0.000 0.092
#> GSM549281     1  0.5906      0.463 0.576 0.284 0.000 0.000 0.140
#> GSM549285     5  0.5507      0.700 0.188 0.000 0.160 0.000 0.652
#> GSM549288     2  0.4528      0.662 0.000 0.728 0.212 0.000 0.060
#> GSM549292     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM549295     2  0.4590      0.230 0.000 0.568 0.420 0.000 0.012
#> GSM549297     2  0.1740      0.906 0.000 0.932 0.012 0.000 0.056
#> GSM750743     1  0.0510      0.872 0.984 0.000 0.000 0.000 0.016
#> GSM549268     2  0.5691      0.446 0.296 0.592 0.000 0.000 0.112
#> GSM549290     5  0.4166      0.451 0.000 0.000 0.004 0.348 0.648
#> GSM549272     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM549276     2  0.0000      0.928 0.000 1.000 0.000 0.000 0.000
#> GSM549275     1  0.0162      0.874 0.996 0.000 0.000 0.000 0.004
#> GSM549284     2  0.0290      0.928 0.000 0.992 0.000 0.000 0.008
#> GSM750737     4  0.3783      0.661 0.252 0.000 0.000 0.740 0.008
#> GSM750740     1  0.1341      0.864 0.944 0.000 0.000 0.000 0.056
#> GSM750747     1  0.1341      0.864 0.944 0.000 0.000 0.000 0.056
#> GSM750751     2  0.0510      0.924 0.000 0.984 0.000 0.000 0.016
#> GSM750754     3  0.2905      0.853 0.000 0.000 0.868 0.096 0.036

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.2213    0.87007 0.000 0.000 0.004 0.904 0.048 0.044
#> GSM549291     4  0.1196    0.89019 0.000 0.000 0.000 0.952 0.008 0.040
#> GSM549274     2  0.0000    0.81454 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750738     4  0.3464    0.50968 0.000 0.312 0.000 0.688 0.000 0.000
#> GSM750748     1  0.1814    0.82316 0.900 0.000 0.000 0.000 0.100 0.000
#> GSM549240     1  0.3639    0.77963 0.816 0.000 0.000 0.020 0.068 0.096
#> GSM549279     1  0.3394    0.65454 0.752 0.012 0.000 0.000 0.000 0.236
#> GSM549294     2  0.3620    0.41045 0.000 0.648 0.000 0.000 0.000 0.352
#> GSM549300     6  0.5537   -0.22257 0.000 0.136 0.388 0.000 0.000 0.476
#> GSM549303     3  0.0363    0.81829 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM549309     3  0.0363    0.81842 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM750753     2  0.0363    0.81329 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM750752     4  0.1148    0.88712 0.000 0.000 0.004 0.960 0.020 0.016
#> GSM549304     2  0.0146    0.81441 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549305     2  0.2562    0.70059 0.000 0.828 0.000 0.000 0.000 0.172
#> GSM549307     3  0.5508    0.14859 0.000 0.128 0.444 0.000 0.000 0.428
#> GSM549306     3  0.2697    0.76115 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM549308     3  0.1910    0.81586 0.000 0.000 0.892 0.000 0.000 0.108
#> GSM549233     5  0.2255    0.82121 0.016 0.000 0.000 0.088 0.892 0.004
#> GSM549234     4  0.0291    0.89957 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549250     5  0.1155    0.84655 0.036 0.000 0.000 0.004 0.956 0.004
#> GSM549287     3  0.1708    0.79163 0.000 0.000 0.932 0.004 0.024 0.040
#> GSM750735     1  0.0000    0.83539 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750736     1  0.0363    0.83390 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM750749     1  0.3727    0.39580 0.612 0.000 0.000 0.000 0.000 0.388
#> GSM549230     5  0.1387    0.84424 0.068 0.000 0.000 0.000 0.932 0.000
#> GSM549231     5  0.1082    0.84627 0.040 0.000 0.000 0.000 0.956 0.004
#> GSM549237     5  0.2664    0.76623 0.184 0.000 0.000 0.000 0.816 0.000
#> GSM549254     4  0.0146    0.90029 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM750734     1  0.1765    0.79253 0.904 0.000 0.000 0.000 0.096 0.000
#> GSM549271     4  0.2016    0.86984 0.000 0.000 0.016 0.920 0.024 0.040
#> GSM549232     4  0.0146    0.90029 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM549246     5  0.4349    0.69800 0.208 0.000 0.000 0.084 0.708 0.000
#> GSM549248     5  0.3737    0.35897 0.392 0.000 0.000 0.000 0.608 0.000
#> GSM549255     4  0.0146    0.90029 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM750746     1  0.1556    0.83055 0.920 0.000 0.000 0.000 0.080 0.000
#> GSM549259     1  0.1501    0.83148 0.924 0.000 0.000 0.000 0.076 0.000
#> GSM549269     2  0.0508    0.81291 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM549273     3  0.0363    0.81795 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM549299     2  0.3101    0.53725 0.000 0.756 0.000 0.000 0.000 0.244
#> GSM549301     3  0.1910    0.81586 0.000 0.000 0.892 0.000 0.000 0.108
#> GSM549310     4  0.3705    0.77920 0.000 0.004 0.120 0.812 0.024 0.040
#> GSM549311     3  0.0914    0.81144 0.000 0.000 0.968 0.000 0.016 0.016
#> GSM549302     2  0.0000    0.81454 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549235     1  0.3647    0.42154 0.640 0.000 0.000 0.000 0.360 0.000
#> GSM549245     4  0.0146    0.90029 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM549265     4  0.3965    0.31087 0.004 0.000 0.000 0.616 0.376 0.004
#> GSM549282     3  0.5937    0.21602 0.000 0.000 0.416 0.000 0.368 0.216
#> GSM549296     4  0.1232    0.88519 0.000 0.000 0.004 0.956 0.024 0.016
#> GSM750739     1  0.0458    0.83907 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM750742     5  0.1075    0.84652 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM750744     5  0.3684    0.55097 0.372 0.000 0.000 0.000 0.628 0.000
#> GSM750750     3  0.2003    0.81521 0.000 0.000 0.884 0.000 0.000 0.116
#> GSM549242     5  0.1682    0.84018 0.020 0.000 0.000 0.052 0.928 0.000
#> GSM549252     4  0.0291    0.89957 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549253     5  0.1391    0.84134 0.016 0.000 0.000 0.040 0.944 0.000
#> GSM549256     5  0.3193    0.78376 0.124 0.000 0.000 0.052 0.824 0.000
#> GSM549257     4  0.0146    0.90029 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM549263     5  0.1007    0.84636 0.044 0.000 0.000 0.000 0.956 0.000
#> GSM549267     5  0.5737    0.50572 0.000 0.000 0.128 0.212 0.616 0.044
#> GSM750745     1  0.0000    0.83539 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000    0.83539 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.0146    0.90029 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM549249     5  0.2006    0.80182 0.000 0.000 0.000 0.104 0.892 0.004
#> GSM549260     1  0.3032    0.79188 0.840 0.000 0.000 0.056 0.104 0.000
#> GSM549266     1  0.4589    0.20214 0.504 0.036 0.000 0.000 0.000 0.460
#> GSM549293     2  0.0000    0.81454 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549236     5  0.1642    0.84232 0.028 0.000 0.000 0.032 0.936 0.004
#> GSM549238     5  0.1728    0.83005 0.008 0.000 0.000 0.064 0.924 0.004
#> GSM549251     5  0.1082    0.84687 0.040 0.000 0.000 0.004 0.956 0.000
#> GSM549258     1  0.0603    0.82876 0.980 0.000 0.000 0.016 0.004 0.000
#> GSM549264     5  0.1814    0.83164 0.100 0.000 0.000 0.000 0.900 0.000
#> GSM549243     1  0.3371    0.59785 0.708 0.000 0.000 0.000 0.292 0.000
#> GSM549262     5  0.1501    0.84209 0.076 0.000 0.000 0.000 0.924 0.000
#> GSM549278     4  0.0665    0.89383 0.008 0.000 0.004 0.980 0.008 0.000
#> GSM549283     1  0.5557    0.16140 0.552 0.248 0.000 0.000 0.000 0.200
#> GSM549298     3  0.1957    0.81485 0.000 0.000 0.888 0.000 0.000 0.112
#> GSM750741     1  0.0363    0.83868 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549286     2  0.0000    0.81454 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549241     1  0.0000    0.83539 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.5494    0.61193 0.676 0.004 0.000 0.156 0.068 0.096
#> GSM549261     1  0.1556    0.83055 0.920 0.000 0.000 0.000 0.080 0.000
#> GSM549270     2  0.1663    0.77261 0.000 0.912 0.000 0.000 0.000 0.088
#> GSM549277     2  0.3872    0.38693 0.000 0.604 0.004 0.000 0.000 0.392
#> GSM549280     6  0.3864   -0.10532 0.000 0.480 0.000 0.000 0.000 0.520
#> GSM549281     6  0.5954   -0.00984 0.400 0.128 0.000 0.000 0.020 0.452
#> GSM549285     5  0.5518    0.64087 0.168 0.000 0.144 0.000 0.648 0.040
#> GSM549288     6  0.5794    0.05175 0.000 0.384 0.180 0.000 0.000 0.436
#> GSM549292     2  0.0260    0.81172 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM549295     2  0.5925   -0.04162 0.000 0.456 0.236 0.000 0.000 0.308
#> GSM549297     2  0.3950    0.30960 0.000 0.564 0.004 0.000 0.000 0.432
#> GSM750743     1  0.0458    0.83586 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM549268     6  0.5876    0.33447 0.180 0.276 0.000 0.000 0.012 0.532
#> GSM549290     5  0.4455    0.56514 0.000 0.000 0.008 0.264 0.680 0.048
#> GSM549272     2  0.0865    0.80435 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM549276     2  0.0458    0.81295 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM549275     1  0.0260    0.83782 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549284     2  0.0146    0.81386 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM750737     4  0.3426    0.58213 0.276 0.000 0.000 0.720 0.004 0.000
#> GSM750740     1  0.1556    0.83055 0.920 0.000 0.000 0.000 0.080 0.000
#> GSM750747     1  0.1610    0.82939 0.916 0.000 0.000 0.000 0.084 0.000
#> GSM750751     2  0.2491    0.69532 0.000 0.836 0.000 0.000 0.000 0.164
#> GSM750754     3  0.3234    0.72412 0.000 0.000 0.848 0.080 0.028 0.044

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-pam-membership-heatmap-5

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)

plot of chunk tab-CV-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-pam-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-CV-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-pam-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> CV:pam 93            0.140    1.28e-05               0.30380   0.0416 2
#> CV:pam 46               NA          NA                    NA       NA 3
#> CV:pam 93            0.216    1.31e-05               0.00527   0.1027 4
#> CV:pam 93            0.238    4.73e-07               0.01197   0.0273 5
#> CV:pam 86            0.257    3.44e-06               0.04846   0.0466 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.


CV:mclust*

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 4.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-mclust-collect-plots

The plots are:

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:

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)

plot of chunk CV-mclust-select-partition-number

The numeric values for all these statistics can be obtained by get_stats().

get_stats(res)
#>   k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> 2 2 1.000           0.957       0.981         0.5039 0.496   0.496
#> 3 3 0.907           0.934       0.964         0.2961 0.766   0.562
#> 4 4 0.930           0.935       0.964         0.0919 0.939   0.823
#> 5 5 0.698           0.644       0.775         0.0865 0.966   0.881
#> 6 6 0.752           0.585       0.773         0.0570 0.868   0.533

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     2  0.1184     0.9739 0.016 0.984
#> GSM549291     2  0.0376     0.9821 0.004 0.996
#> GSM549274     2  0.0000     0.9839 0.000 1.000
#> GSM750738     2  0.3584     0.9214 0.068 0.932
#> GSM750748     1  0.0376     0.9774 0.996 0.004
#> GSM549240     1  0.0376     0.9774 0.996 0.004
#> GSM549279     2  0.0000     0.9839 0.000 1.000
#> GSM549294     2  0.0000     0.9839 0.000 1.000
#> GSM549300     2  0.0000     0.9839 0.000 1.000
#> GSM549303     2  0.0376     0.9821 0.004 0.996
#> GSM549309     2  0.0376     0.9821 0.004 0.996
#> GSM750753     2  0.0000     0.9839 0.000 1.000
#> GSM750752     2  0.3274     0.9330 0.060 0.940
#> GSM549304     2  0.0000     0.9839 0.000 1.000
#> GSM549305     2  0.0000     0.9839 0.000 1.000
#> GSM549307     2  0.0000     0.9839 0.000 1.000
#> GSM549306     2  0.0000     0.9839 0.000 1.000
#> GSM549308     2  0.0000     0.9839 0.000 1.000
#> GSM549233     1  0.0000     0.9770 1.000 0.000
#> GSM549234     1  0.0000     0.9770 1.000 0.000
#> GSM549250     1  0.0000     0.9770 1.000 0.000
#> GSM549287     2  0.0376     0.9821 0.004 0.996
#> GSM750735     1  0.0376     0.9774 0.996 0.004
#> GSM750736     1  0.0376     0.9774 0.996 0.004
#> GSM750749     2  0.3733     0.9173 0.072 0.928
#> GSM549230     1  0.0000     0.9770 1.000 0.000
#> GSM549231     1  0.0000     0.9770 1.000 0.000
#> GSM549237     1  0.0376     0.9774 0.996 0.004
#> GSM549254     2  0.9983     0.0745 0.476 0.524
#> GSM750734     1  0.0376     0.9774 0.996 0.004
#> GSM549271     2  0.0376     0.9821 0.004 0.996
#> GSM549232     1  0.0000     0.9770 1.000 0.000
#> GSM549246     1  0.8608     0.6130 0.716 0.284
#> GSM549248     1  0.0376     0.9774 0.996 0.004
#> GSM549255     1  0.0000     0.9770 1.000 0.000
#> GSM750746     1  0.0376     0.9774 0.996 0.004
#> GSM549259     1  0.0376     0.9774 0.996 0.004
#> GSM549269     2  0.0000     0.9839 0.000 1.000
#> GSM549273     2  0.0376     0.9821 0.004 0.996
#> GSM549299     2  0.0000     0.9839 0.000 1.000
#> GSM549301     2  0.0000     0.9839 0.000 1.000
#> GSM549310     2  0.0376     0.9821 0.004 0.996
#> GSM549311     2  0.0376     0.9821 0.004 0.996
#> GSM549302     2  0.0000     0.9839 0.000 1.000
#> GSM549235     1  0.0376     0.9774 0.996 0.004
#> GSM549245     1  0.0000     0.9770 1.000 0.000
#> GSM549265     1  0.8713     0.5979 0.708 0.292
#> GSM549282     2  0.0000     0.9839 0.000 1.000
#> GSM549296     2  0.4022     0.9118 0.080 0.920
#> GSM750739     1  0.0376     0.9774 0.996 0.004
#> GSM750742     1  0.0376     0.9774 0.996 0.004
#> GSM750744     1  0.0376     0.9774 0.996 0.004
#> GSM750750     2  0.0000     0.9839 0.000 1.000
#> GSM549242     1  0.0000     0.9770 1.000 0.000
#> GSM549252     1  0.0000     0.9770 1.000 0.000
#> GSM549253     1  0.0000     0.9770 1.000 0.000
#> GSM549256     1  0.0000     0.9770 1.000 0.000
#> GSM549257     1  0.0000     0.9770 1.000 0.000
#> GSM549263     1  0.0000     0.9770 1.000 0.000
#> GSM549267     2  0.0376     0.9821 0.004 0.996
#> GSM750745     1  0.0376     0.9774 0.996 0.004
#> GSM549239     1  0.0376     0.9774 0.996 0.004
#> GSM549244     1  0.0000     0.9770 1.000 0.000
#> GSM549249     1  0.0000     0.9770 1.000 0.000
#> GSM549260     1  0.0000     0.9770 1.000 0.000
#> GSM549266     2  0.0000     0.9839 0.000 1.000
#> GSM549293     2  0.0000     0.9839 0.000 1.000
#> GSM549236     1  0.0000     0.9770 1.000 0.000
#> GSM549238     1  0.0000     0.9770 1.000 0.000
#> GSM549251     1  0.0000     0.9770 1.000 0.000
#> GSM549258     1  0.0376     0.9774 0.996 0.004
#> GSM549264     1  0.0376     0.9774 0.996 0.004
#> GSM549243     1  0.0376     0.9774 0.996 0.004
#> GSM549262     1  0.0376     0.9774 0.996 0.004
#> GSM549278     2  0.0672     0.9800 0.008 0.992
#> GSM549283     2  0.0000     0.9839 0.000 1.000
#> GSM549298     2  0.0000     0.9839 0.000 1.000
#> GSM750741     1  0.0376     0.9774 0.996 0.004
#> GSM549286     2  0.0000     0.9839 0.000 1.000
#> GSM549241     1  0.0376     0.9774 0.996 0.004
#> GSM549247     1  0.7139     0.7635 0.804 0.196
#> GSM549261     1  0.0376     0.9774 0.996 0.004
#> GSM549270     2  0.0000     0.9839 0.000 1.000
#> GSM549277     2  0.0000     0.9839 0.000 1.000
#> GSM549280     2  0.0000     0.9839 0.000 1.000
#> GSM549281     2  0.0000     0.9839 0.000 1.000
#> GSM549285     2  0.0000     0.9839 0.000 1.000
#> GSM549288     2  0.0000     0.9839 0.000 1.000
#> GSM549292     2  0.0000     0.9839 0.000 1.000
#> GSM549295     2  0.0000     0.9839 0.000 1.000
#> GSM549297     2  0.0000     0.9839 0.000 1.000
#> GSM750743     1  0.0376     0.9774 0.996 0.004
#> GSM549268     2  0.0000     0.9839 0.000 1.000
#> GSM549290     2  0.0376     0.9821 0.004 0.996
#> GSM549272     2  0.0000     0.9839 0.000 1.000
#> GSM549276     2  0.0000     0.9839 0.000 1.000
#> GSM549275     1  0.7745     0.7163 0.772 0.228
#> GSM549284     2  0.0000     0.9839 0.000 1.000
#> GSM750737     1  0.0000     0.9770 1.000 0.000
#> GSM750740     1  0.0376     0.9774 0.996 0.004
#> GSM750747     1  0.0376     0.9774 0.996 0.004
#> GSM750751     2  0.0000     0.9839 0.000 1.000
#> GSM750754     2  0.0376     0.9821 0.004 0.996

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549291     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549274     2  0.0000      0.986 0.000 1.000 0.000
#> GSM750738     1  0.2096      0.927 0.944 0.004 0.052
#> GSM750748     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549240     1  0.0424      0.975 0.992 0.008 0.000
#> GSM549279     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549294     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549300     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549303     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549309     3  0.0000      0.890 0.000 0.000 1.000
#> GSM750753     2  0.0000      0.986 0.000 1.000 0.000
#> GSM750752     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549304     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549305     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549307     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549306     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549308     2  0.0424      0.979 0.000 0.992 0.008
#> GSM549233     1  0.0892      0.963 0.980 0.000 0.020
#> GSM549234     3  0.5016      0.798 0.240 0.000 0.760
#> GSM549250     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549287     3  0.0000      0.890 0.000 0.000 1.000
#> GSM750735     1  0.0237      0.979 0.996 0.004 0.000
#> GSM750736     1  0.0237      0.979 0.996 0.004 0.000
#> GSM750749     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549230     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549237     1  0.0237      0.979 0.996 0.004 0.000
#> GSM549254     3  0.4750      0.819 0.216 0.000 0.784
#> GSM750734     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549271     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549232     3  0.4842      0.814 0.224 0.000 0.776
#> GSM549246     3  0.5216      0.773 0.260 0.000 0.740
#> GSM549248     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549255     3  0.4887      0.811 0.228 0.000 0.772
#> GSM750746     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549269     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549273     2  0.6299      0.163 0.000 0.524 0.476
#> GSM549299     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549301     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549310     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549311     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549302     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549235     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549245     3  0.4887      0.811 0.228 0.000 0.772
#> GSM549265     3  0.4062      0.843 0.164 0.000 0.836
#> GSM549282     3  0.2448      0.837 0.000 0.076 0.924
#> GSM549296     3  0.0000      0.890 0.000 0.000 1.000
#> GSM750739     1  0.0000      0.981 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.981 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.981 1.000 0.000 0.000
#> GSM750750     2  0.0747      0.972 0.000 0.984 0.016
#> GSM549242     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549252     3  0.4931      0.807 0.232 0.000 0.768
#> GSM549253     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549256     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549257     3  0.4887      0.811 0.228 0.000 0.772
#> GSM549263     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549267     3  0.0000      0.890 0.000 0.000 1.000
#> GSM750745     1  0.0237      0.979 0.996 0.004 0.000
#> GSM549239     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549244     3  0.4654      0.824 0.208 0.000 0.792
#> GSM549249     3  0.5178      0.778 0.256 0.000 0.744
#> GSM549260     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549266     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549293     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549236     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549238     1  0.5497      0.499 0.708 0.000 0.292
#> GSM549251     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549258     1  0.0237      0.979 0.996 0.004 0.000
#> GSM549264     1  0.0237      0.979 0.996 0.004 0.000
#> GSM549243     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549278     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549283     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549298     2  0.0000      0.986 0.000 1.000 0.000
#> GSM750741     1  0.0237      0.979 0.996 0.004 0.000
#> GSM549286     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549241     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549247     1  0.0747      0.967 0.984 0.016 0.000
#> GSM549261     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549270     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549277     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549280     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549281     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549285     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549288     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549292     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549295     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549297     2  0.0000      0.986 0.000 1.000 0.000
#> GSM750743     1  0.0000      0.981 1.000 0.000 0.000
#> GSM549268     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549290     3  0.0000      0.890 0.000 0.000 1.000
#> GSM549272     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549276     2  0.0000      0.986 0.000 1.000 0.000
#> GSM549275     1  0.4702      0.703 0.788 0.212 0.000
#> GSM549284     2  0.0000      0.986 0.000 1.000 0.000
#> GSM750737     1  0.0237      0.979 0.996 0.000 0.004
#> GSM750740     1  0.0000      0.981 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.981 1.000 0.000 0.000
#> GSM750751     2  0.0000      0.986 0.000 1.000 0.000
#> GSM750754     3  0.0000      0.890 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.0592      0.946 0.000 0.000 0.016 0.984
#> GSM549291     4  0.1118      0.940 0.000 0.000 0.036 0.964
#> GSM549274     2  0.0188      0.987 0.000 0.996 0.004 0.000
#> GSM750738     1  0.5763      0.657 0.708 0.084 0.004 0.204
#> GSM750748     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549240     1  0.1305      0.937 0.960 0.036 0.000 0.004
#> GSM549279     2  0.0336      0.986 0.000 0.992 0.008 0.000
#> GSM549294     2  0.0188      0.987 0.000 0.996 0.004 0.000
#> GSM549300     3  0.3907      0.731 0.000 0.232 0.768 0.000
#> GSM549303     3  0.2589      0.816 0.000 0.000 0.884 0.116
#> GSM549309     3  0.2760      0.806 0.000 0.000 0.872 0.128
#> GSM750753     2  0.0188      0.987 0.000 0.996 0.004 0.000
#> GSM750752     4  0.0707      0.945 0.000 0.000 0.020 0.980
#> GSM549304     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549305     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549307     2  0.2973      0.839 0.000 0.856 0.144 0.000
#> GSM549306     3  0.3172      0.824 0.000 0.160 0.840 0.000
#> GSM549308     3  0.1716      0.867 0.000 0.064 0.936 0.000
#> GSM549233     1  0.1637      0.928 0.940 0.000 0.000 0.060
#> GSM549234     4  0.0188      0.945 0.004 0.000 0.000 0.996
#> GSM549250     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549287     4  0.3266      0.847 0.000 0.000 0.168 0.832
#> GSM750735     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM750736     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM750749     2  0.0657      0.981 0.004 0.984 0.012 0.000
#> GSM549230     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549231     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549237     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549254     4  0.0188      0.945 0.004 0.000 0.000 0.996
#> GSM750734     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549271     4  0.3074      0.863 0.000 0.000 0.152 0.848
#> GSM549232     4  0.0000      0.946 0.000 0.000 0.000 1.000
#> GSM549246     4  0.3208      0.751 0.148 0.000 0.004 0.848
#> GSM549248     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549255     4  0.0000      0.946 0.000 0.000 0.000 1.000
#> GSM750746     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0188      0.987 0.000 0.996 0.004 0.000
#> GSM549273     3  0.0188      0.857 0.000 0.000 0.996 0.004
#> GSM549299     2  0.0188      0.987 0.000 0.996 0.004 0.000
#> GSM549301     3  0.3172      0.824 0.000 0.160 0.840 0.000
#> GSM549310     4  0.1792      0.924 0.000 0.000 0.068 0.932
#> GSM549311     3  0.2704      0.810 0.000 0.000 0.876 0.124
#> GSM549302     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549235     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549245     4  0.0000      0.946 0.000 0.000 0.000 1.000
#> GSM549265     4  0.0524      0.945 0.008 0.000 0.004 0.988
#> GSM549282     3  0.1792      0.843 0.000 0.000 0.932 0.068
#> GSM549296     4  0.0592      0.946 0.000 0.000 0.016 0.984
#> GSM750739     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM750750     3  0.0817      0.866 0.000 0.024 0.976 0.000
#> GSM549242     1  0.0469      0.965 0.988 0.000 0.000 0.012
#> GSM549252     4  0.0188      0.945 0.004 0.000 0.000 0.996
#> GSM549253     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549256     1  0.1474      0.934 0.948 0.000 0.000 0.052
#> GSM549257     4  0.0188      0.945 0.004 0.000 0.000 0.996
#> GSM549263     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549267     4  0.2704      0.887 0.000 0.000 0.124 0.876
#> GSM750745     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549239     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549244     4  0.0000      0.946 0.000 0.000 0.000 1.000
#> GSM549249     4  0.0336      0.944 0.008 0.000 0.000 0.992
#> GSM549260     1  0.0336      0.967 0.992 0.000 0.000 0.008
#> GSM549266     2  0.0336      0.986 0.000 0.992 0.008 0.000
#> GSM549293     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549236     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549238     1  0.2589      0.871 0.884 0.000 0.000 0.116
#> GSM549251     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549258     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549264     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549243     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549278     4  0.0707      0.945 0.000 0.000 0.020 0.980
#> GSM549283     2  0.0336      0.986 0.000 0.992 0.008 0.000
#> GSM549298     3  0.2216      0.861 0.000 0.092 0.908 0.000
#> GSM750741     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549286     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549241     1  0.0188      0.968 0.996 0.000 0.000 0.004
#> GSM549247     1  0.3933      0.728 0.792 0.200 0.000 0.008
#> GSM549261     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549270     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549277     2  0.0336      0.986 0.000 0.992 0.008 0.000
#> GSM549280     2  0.0592      0.981 0.000 0.984 0.016 0.000
#> GSM549281     2  0.0336      0.986 0.000 0.992 0.008 0.000
#> GSM549285     2  0.0592      0.981 0.000 0.984 0.016 0.000
#> GSM549288     2  0.0336      0.986 0.000 0.992 0.008 0.000
#> GSM549292     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549295     2  0.2408      0.887 0.000 0.896 0.104 0.000
#> GSM549297     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM750743     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM549268     2  0.0336      0.986 0.000 0.992 0.008 0.000
#> GSM549290     4  0.2408      0.902 0.000 0.000 0.104 0.896
#> GSM549272     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM549275     1  0.3975      0.671 0.760 0.240 0.000 0.000
#> GSM549284     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM750737     1  0.2011      0.910 0.920 0.000 0.000 0.080
#> GSM750740     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.969 1.000 0.000 0.000 0.000
#> GSM750751     2  0.0000      0.987 0.000 1.000 0.000 0.000
#> GSM750754     4  0.3024      0.867 0.000 0.000 0.148 0.852

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.2723    0.74636 0.000 0.000 0.124 0.864 0.012
#> GSM549291     4  0.3074    0.71271 0.000 0.000 0.196 0.804 0.000
#> GSM549274     2  0.3297    0.80551 0.000 0.848 0.068 0.000 0.084
#> GSM750738     5  0.7159    0.21554 0.044 0.312 0.036 0.076 0.532
#> GSM750748     1  0.0290    0.71333 0.992 0.000 0.000 0.000 0.008
#> GSM549240     1  0.3689    0.55105 0.740 0.004 0.000 0.000 0.256
#> GSM549279     2  0.5456    0.72914 0.004 0.608 0.072 0.000 0.316
#> GSM549294     2  0.2409    0.80521 0.000 0.900 0.032 0.000 0.068
#> GSM549300     3  0.6507    0.06807 0.000 0.316 0.472 0.000 0.212
#> GSM549303     3  0.1671    0.73228 0.000 0.000 0.924 0.076 0.000
#> GSM549309     3  0.1671    0.73228 0.000 0.000 0.924 0.076 0.000
#> GSM750753     2  0.2777    0.80899 0.000 0.864 0.016 0.000 0.120
#> GSM750752     4  0.1251    0.75493 0.000 0.000 0.036 0.956 0.008
#> GSM549304     2  0.1270    0.76877 0.000 0.948 0.000 0.000 0.052
#> GSM549305     2  0.0404    0.78453 0.000 0.988 0.000 0.000 0.012
#> GSM549307     2  0.5673    0.70826 0.000 0.628 0.156 0.000 0.216
#> GSM549306     3  0.5163    0.62396 0.000 0.152 0.692 0.000 0.156
#> GSM549308     3  0.2046    0.79974 0.000 0.068 0.916 0.000 0.016
#> GSM549233     5  0.6708    0.68588 0.244 0.000 0.000 0.376 0.380
#> GSM549234     4  0.3305    0.57999 0.000 0.000 0.000 0.776 0.224
#> GSM549250     1  0.5314    0.00525 0.528 0.000 0.000 0.052 0.420
#> GSM549287     4  0.4161    0.48958 0.000 0.000 0.392 0.608 0.000
#> GSM750735     1  0.2020    0.67093 0.900 0.000 0.000 0.000 0.100
#> GSM750736     1  0.3395    0.55965 0.764 0.000 0.000 0.000 0.236
#> GSM750749     2  0.7007    0.57703 0.092 0.484 0.072 0.000 0.352
#> GSM549230     1  0.4354    0.35278 0.624 0.000 0.000 0.008 0.368
#> GSM549231     1  0.4166    0.39555 0.648 0.000 0.000 0.004 0.348
#> GSM549237     1  0.3048    0.64798 0.820 0.000 0.000 0.004 0.176
#> GSM549254     4  0.1732    0.74371 0.000 0.000 0.000 0.920 0.080
#> GSM750734     1  0.0510    0.71215 0.984 0.000 0.000 0.000 0.016
#> GSM549271     4  0.3661    0.64525 0.000 0.000 0.276 0.724 0.000
#> GSM549232     4  0.1965    0.73422 0.000 0.000 0.000 0.904 0.096
#> GSM549246     4  0.3141    0.72389 0.000 0.000 0.016 0.832 0.152
#> GSM549248     1  0.3837    0.47151 0.692 0.000 0.000 0.000 0.308
#> GSM549255     4  0.2179    0.72649 0.000 0.000 0.000 0.888 0.112
#> GSM750746     1  0.0162    0.71362 0.996 0.000 0.000 0.000 0.004
#> GSM549259     1  0.0162    0.71362 0.996 0.000 0.000 0.000 0.004
#> GSM549269     2  0.3991    0.78082 0.000 0.780 0.048 0.000 0.172
#> GSM549273     3  0.1560    0.79023 0.000 0.020 0.948 0.004 0.028
#> GSM549299     2  0.4237    0.78843 0.000 0.752 0.048 0.000 0.200
#> GSM549301     3  0.2824    0.77758 0.000 0.116 0.864 0.000 0.020
#> GSM549310     4  0.1830    0.75303 0.000 0.000 0.068 0.924 0.008
#> GSM549311     3  0.1732    0.72817 0.000 0.000 0.920 0.080 0.000
#> GSM549302     2  0.0963    0.77610 0.000 0.964 0.000 0.000 0.036
#> GSM549235     1  0.0510    0.71181 0.984 0.000 0.000 0.000 0.016
#> GSM549245     4  0.2516    0.70552 0.000 0.000 0.000 0.860 0.140
#> GSM549265     4  0.2625    0.74298 0.000 0.000 0.016 0.876 0.108
#> GSM549282     3  0.2026    0.75528 0.000 0.012 0.924 0.056 0.008
#> GSM549296     4  0.1251    0.75493 0.000 0.000 0.036 0.956 0.008
#> GSM750739     1  0.0404    0.71149 0.988 0.000 0.000 0.000 0.012
#> GSM750742     1  0.3707    0.50230 0.716 0.000 0.000 0.000 0.284
#> GSM750744     1  0.1410    0.69666 0.940 0.000 0.000 0.000 0.060
#> GSM750750     3  0.1914    0.80000 0.000 0.060 0.924 0.000 0.016
#> GSM549242     1  0.5529   -0.05818 0.512 0.000 0.000 0.068 0.420
#> GSM549252     4  0.3452    0.53722 0.000 0.000 0.000 0.756 0.244
#> GSM549253     1  0.4658    0.20993 0.576 0.000 0.000 0.016 0.408
#> GSM549256     5  0.6769    0.67007 0.288 0.000 0.000 0.316 0.396
#> GSM549257     4  0.2891    0.66563 0.000 0.000 0.000 0.824 0.176
#> GSM549263     1  0.4367    0.34292 0.620 0.000 0.000 0.008 0.372
#> GSM549267     4  0.4060    0.53897 0.000 0.000 0.360 0.640 0.000
#> GSM750745     1  0.2329    0.65364 0.876 0.000 0.000 0.000 0.124
#> GSM549239     1  0.0000    0.71377 1.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.2280    0.72152 0.000 0.000 0.000 0.880 0.120
#> GSM549249     4  0.2930    0.67420 0.004 0.000 0.000 0.832 0.164
#> GSM549260     1  0.4329    0.44630 0.672 0.000 0.000 0.016 0.312
#> GSM549266     2  0.5387    0.73988 0.004 0.624 0.072 0.000 0.300
#> GSM549293     2  0.2179    0.72649 0.000 0.888 0.000 0.000 0.112
#> GSM549236     1  0.4682    0.16592 0.564 0.000 0.000 0.016 0.420
#> GSM549238     5  0.6769    0.68640 0.272 0.000 0.000 0.352 0.376
#> GSM549251     1  0.4482    0.32157 0.612 0.000 0.000 0.012 0.376
#> GSM549258     1  0.3074    0.59790 0.804 0.000 0.000 0.000 0.196
#> GSM549264     1  0.2891    0.66217 0.824 0.000 0.000 0.000 0.176
#> GSM549243     1  0.0000    0.71377 1.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.3684    0.50855 0.720 0.000 0.000 0.000 0.280
#> GSM549278     4  0.2516    0.73757 0.000 0.000 0.140 0.860 0.000
#> GSM549283     2  0.4850    0.77507 0.000 0.696 0.072 0.000 0.232
#> GSM549298     3  0.4916    0.66212 0.000 0.124 0.716 0.000 0.160
#> GSM750741     1  0.3662    0.53735 0.744 0.004 0.000 0.000 0.252
#> GSM549286     2  0.0609    0.78121 0.000 0.980 0.000 0.000 0.020
#> GSM549241     1  0.1732    0.68248 0.920 0.000 0.000 0.000 0.080
#> GSM549247     1  0.4400    0.48536 0.672 0.020 0.000 0.000 0.308
#> GSM549261     1  0.0162    0.71369 0.996 0.000 0.000 0.000 0.004
#> GSM549270     2  0.0579    0.79070 0.000 0.984 0.008 0.000 0.008
#> GSM549277     2  0.4732    0.77588 0.000 0.716 0.076 0.000 0.208
#> GSM549280     2  0.4707    0.77594 0.000 0.716 0.072 0.000 0.212
#> GSM549281     2  0.5387    0.73982 0.004 0.624 0.072 0.000 0.300
#> GSM549285     2  0.5391    0.73135 0.000 0.616 0.084 0.000 0.300
#> GSM549288     2  0.5195    0.75324 0.000 0.676 0.108 0.000 0.216
#> GSM549292     2  0.1608    0.75658 0.000 0.928 0.000 0.000 0.072
#> GSM549295     2  0.5638    0.71326 0.000 0.632 0.152 0.000 0.216
#> GSM549297     2  0.3321    0.80668 0.000 0.832 0.032 0.000 0.136
#> GSM750743     1  0.0162    0.71402 0.996 0.000 0.000 0.000 0.004
#> GSM549268     2  0.5387    0.73982 0.004 0.624 0.072 0.000 0.300
#> GSM549290     4  0.4060    0.54169 0.000 0.000 0.360 0.640 0.000
#> GSM549272     2  0.1121    0.77129 0.000 0.956 0.000 0.000 0.044
#> GSM549276     2  0.0510    0.78298 0.000 0.984 0.000 0.000 0.016
#> GSM549275     1  0.5001    0.45627 0.700 0.080 0.004 0.000 0.216
#> GSM549284     2  0.3152    0.74516 0.000 0.840 0.024 0.000 0.136
#> GSM750737     5  0.6600    0.44321 0.380 0.000 0.000 0.212 0.408
#> GSM750740     1  0.0290    0.71289 0.992 0.000 0.000 0.000 0.008
#> GSM750747     1  0.0000    0.71377 1.000 0.000 0.000 0.000 0.000
#> GSM750751     2  0.0609    0.78263 0.000 0.980 0.000 0.000 0.020
#> GSM750754     4  0.4161    0.48958 0.000 0.000 0.392 0.608 0.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.3606     0.3962 0.000 0.000 0.004 0.724 0.008 0.264
#> GSM549291     6  0.3997     0.1732 0.000 0.000 0.004 0.488 0.000 0.508
#> GSM549274     2  0.1655     0.7686 0.008 0.932 0.052 0.000 0.000 0.008
#> GSM750738     4  0.8156     0.1642 0.040 0.284 0.212 0.348 0.108 0.008
#> GSM750748     1  0.2300     0.8676 0.856 0.000 0.000 0.000 0.144 0.000
#> GSM549240     1  0.0405     0.8481 0.988 0.000 0.004 0.000 0.008 0.000
#> GSM549279     2  0.4013     0.6869 0.040 0.728 0.228 0.000 0.000 0.004
#> GSM549294     2  0.0632     0.7714 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM549300     3  0.4343     0.5813 0.000 0.120 0.724 0.000 0.000 0.156
#> GSM549303     6  0.2260     0.2944 0.000 0.000 0.140 0.000 0.000 0.860
#> GSM549309     6  0.1267     0.3646 0.000 0.000 0.060 0.000 0.000 0.940
#> GSM750753     2  0.2491     0.7425 0.000 0.836 0.164 0.000 0.000 0.000
#> GSM750752     4  0.2597     0.5211 0.000 0.000 0.000 0.824 0.000 0.176
#> GSM549304     2  0.2743     0.6882 0.000 0.828 0.164 0.000 0.008 0.000
#> GSM549305     2  0.1141     0.7645 0.000 0.948 0.052 0.000 0.000 0.000
#> GSM549307     3  0.3323     0.5433 0.000 0.240 0.752 0.000 0.000 0.008
#> GSM549306     3  0.4682     0.4356 0.000 0.048 0.556 0.000 0.000 0.396
#> GSM549308     6  0.3998    -0.3560 0.000 0.004 0.492 0.000 0.000 0.504
#> GSM549233     5  0.3819     0.3699 0.008 0.000 0.000 0.340 0.652 0.000
#> GSM549234     4  0.1910     0.7290 0.000 0.000 0.000 0.892 0.108 0.000
#> GSM549250     5  0.0405     0.7641 0.008 0.000 0.000 0.004 0.988 0.000
#> GSM549287     6  0.3782     0.3176 0.000 0.000 0.000 0.412 0.000 0.588
#> GSM750735     1  0.0508     0.8468 0.984 0.000 0.012 0.000 0.004 0.000
#> GSM750736     1  0.0291     0.8461 0.992 0.000 0.004 0.000 0.004 0.000
#> GSM750749     1  0.6094    -0.2364 0.396 0.376 0.224 0.000 0.000 0.004
#> GSM549230     5  0.1075     0.7879 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM549231     5  0.1141     0.7876 0.052 0.000 0.000 0.000 0.948 0.000
#> GSM549237     5  0.4015     0.5488 0.372 0.000 0.012 0.000 0.616 0.000
#> GSM549254     4  0.1471     0.7189 0.000 0.000 0.004 0.932 0.064 0.000
#> GSM750734     1  0.2340     0.8645 0.852 0.000 0.000 0.000 0.148 0.000
#> GSM549271     6  0.3843     0.2587 0.000 0.000 0.000 0.452 0.000 0.548
#> GSM549232     4  0.1471     0.7189 0.000 0.000 0.004 0.932 0.064 0.000
#> GSM549246     4  0.3955     0.5464 0.000 0.000 0.004 0.668 0.316 0.012
#> GSM549248     5  0.2562     0.7244 0.172 0.000 0.000 0.000 0.828 0.000
#> GSM549255     4  0.1858     0.7301 0.000 0.000 0.004 0.904 0.092 0.000
#> GSM750746     1  0.2219     0.8722 0.864 0.000 0.000 0.000 0.136 0.000
#> GSM549259     1  0.1814     0.8777 0.900 0.000 0.000 0.000 0.100 0.000
#> GSM549269     2  0.3545     0.6467 0.008 0.748 0.236 0.000 0.008 0.000
#> GSM549273     6  0.3563    -0.0484 0.000 0.000 0.336 0.000 0.000 0.664
#> GSM549299     2  0.3076     0.7038 0.000 0.760 0.240 0.000 0.000 0.000
#> GSM549301     3  0.4333     0.2884 0.000 0.020 0.512 0.000 0.000 0.468
#> GSM549310     4  0.3804    -0.0392 0.000 0.000 0.000 0.576 0.000 0.424
#> GSM549311     6  0.1267     0.3646 0.000 0.000 0.060 0.000 0.000 0.940
#> GSM549302     2  0.1957     0.7268 0.000 0.888 0.112 0.000 0.000 0.000
#> GSM549235     1  0.2219     0.8721 0.864 0.000 0.000 0.000 0.136 0.000
#> GSM549245     4  0.1958     0.7304 0.000 0.000 0.004 0.896 0.100 0.000
#> GSM549265     4  0.2361     0.7082 0.000 0.000 0.004 0.880 0.104 0.012
#> GSM549282     6  0.3076     0.1485 0.000 0.000 0.240 0.000 0.000 0.760
#> GSM549296     4  0.2562     0.5263 0.000 0.000 0.000 0.828 0.000 0.172
#> GSM750739     1  0.1714     0.8769 0.908 0.000 0.000 0.000 0.092 0.000
#> GSM750742     5  0.3717     0.3991 0.384 0.000 0.000 0.000 0.616 0.000
#> GSM750744     5  0.3866     0.0540 0.484 0.000 0.000 0.000 0.516 0.000
#> GSM750750     6  0.3864    -0.3193 0.000 0.000 0.480 0.000 0.000 0.520
#> GSM549242     5  0.1398     0.7210 0.008 0.000 0.000 0.052 0.940 0.000
#> GSM549252     4  0.1957     0.7273 0.000 0.000 0.000 0.888 0.112 0.000
#> GSM549253     5  0.0363     0.7696 0.012 0.000 0.000 0.000 0.988 0.000
#> GSM549256     5  0.3693     0.4737 0.008 0.000 0.004 0.280 0.708 0.000
#> GSM549257     4  0.1858     0.7301 0.000 0.000 0.004 0.904 0.092 0.000
#> GSM549263     5  0.1075     0.7879 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM549267     6  0.3828     0.2815 0.000 0.000 0.000 0.440 0.000 0.560
#> GSM750745     1  0.1556     0.8744 0.920 0.000 0.000 0.000 0.080 0.000
#> GSM549239     1  0.2300     0.8676 0.856 0.000 0.000 0.000 0.144 0.000
#> GSM549244     4  0.2006     0.7298 0.000 0.000 0.004 0.892 0.104 0.000
#> GSM549249     4  0.2196     0.7285 0.000 0.000 0.004 0.884 0.108 0.004
#> GSM549260     5  0.2146     0.7669 0.116 0.000 0.000 0.004 0.880 0.000
#> GSM549266     2  0.3930     0.6875 0.032 0.728 0.236 0.000 0.000 0.004
#> GSM549293     2  0.3103     0.6501 0.000 0.784 0.208 0.000 0.008 0.000
#> GSM549236     5  0.0972     0.7574 0.008 0.000 0.000 0.028 0.964 0.000
#> GSM549238     4  0.4144     0.2403 0.008 0.000 0.004 0.580 0.408 0.000
#> GSM549251     5  0.1075     0.7879 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM549258     1  0.0858     0.8581 0.968 0.000 0.004 0.000 0.028 0.000
#> GSM549264     1  0.3575     0.4095 0.708 0.000 0.008 0.000 0.284 0.000
#> GSM549243     1  0.2300     0.8676 0.856 0.000 0.000 0.000 0.144 0.000
#> GSM549262     5  0.3659     0.4443 0.364 0.000 0.000 0.000 0.636 0.000
#> GSM549278     4  0.3636     0.2631 0.000 0.000 0.004 0.676 0.000 0.320
#> GSM549283     2  0.3624     0.7024 0.016 0.756 0.220 0.000 0.000 0.008
#> GSM549298     3  0.4649     0.4543 0.000 0.048 0.572 0.000 0.000 0.380
#> GSM750741     1  0.0547     0.8426 0.980 0.000 0.020 0.000 0.000 0.000
#> GSM549286     2  0.0146     0.7692 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM549241     1  0.2191     0.8766 0.876 0.000 0.004 0.000 0.120 0.000
#> GSM549247     1  0.0291     0.8461 0.992 0.000 0.004 0.000 0.004 0.000
#> GSM549261     1  0.2219     0.8720 0.864 0.000 0.000 0.000 0.136 0.000
#> GSM549270     2  0.1327     0.7630 0.000 0.936 0.064 0.000 0.000 0.000
#> GSM549277     2  0.3820     0.6591 0.008 0.700 0.284 0.000 0.000 0.008
#> GSM549280     2  0.3725     0.6236 0.000 0.676 0.316 0.000 0.000 0.008
#> GSM549281     2  0.3858     0.6904 0.028 0.732 0.236 0.000 0.000 0.004
#> GSM549285     3  0.4916    -0.1332 0.032 0.444 0.508 0.000 0.000 0.016
#> GSM549288     2  0.4080     0.2799 0.000 0.536 0.456 0.000 0.000 0.008
#> GSM549292     2  0.2730     0.6715 0.000 0.808 0.192 0.000 0.000 0.000
#> GSM549295     3  0.3653     0.4775 0.000 0.300 0.692 0.000 0.000 0.008
#> GSM549297     2  0.2730     0.7301 0.000 0.808 0.192 0.000 0.000 0.000
#> GSM750743     1  0.1863     0.8780 0.896 0.000 0.000 0.000 0.104 0.000
#> GSM549268     2  0.3941     0.6900 0.028 0.732 0.232 0.000 0.000 0.008
#> GSM549290     6  0.3833     0.2748 0.000 0.000 0.000 0.444 0.000 0.556
#> GSM549272     2  0.1910     0.7291 0.000 0.892 0.108 0.000 0.000 0.000
#> GSM549276     2  0.0363     0.7701 0.000 0.988 0.012 0.000 0.000 0.000
#> GSM549275     1  0.0837     0.8433 0.972 0.004 0.020 0.000 0.004 0.000
#> GSM549284     2  0.3936     0.6511 0.008 0.716 0.260 0.000 0.008 0.008
#> GSM750737     4  0.4705     0.0691 0.044 0.000 0.000 0.484 0.472 0.000
#> GSM750740     1  0.1957     0.8781 0.888 0.000 0.000 0.000 0.112 0.000
#> GSM750747     1  0.2260     0.8701 0.860 0.000 0.000 0.000 0.140 0.000
#> GSM750751     2  0.0146     0.7692 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM750754     6  0.3782     0.3176 0.000 0.000 0.000 0.412 0.000 0.588

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-mclust-membership-heatmap-5

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)

plot of chunk tab-CV-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-mclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-CV-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-mclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> CV:mclust 102           0.0155    1.21e-04              0.179607  0.00194 2
#> CV:mclust 101           0.3276    4.23e-04              0.000456  0.01108 3
#> CV:mclust 103           0.3056    6.58e-06              0.000455  0.00687 4
#> CV:mclust  86           0.7504    1.77e-04              0.001453  0.06903 5
#> CV:mclust  71           0.2112    2.25e-04              0.034026  0.00777 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.


CV:NMF**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk CV-NMF-collect-plots

The plots are:

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:

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)

plot of chunk CV-NMF-select-partition-number

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.967       0.987         0.5043 0.496   0.496
#> 3 3 0.824           0.849       0.921         0.2843 0.791   0.604
#> 4 4 0.766           0.817       0.907         0.1579 0.863   0.629
#> 5 5 0.738           0.713       0.844         0.0591 0.902   0.642
#> 6 6 0.722           0.619       0.801         0.0421 0.931   0.690

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1   0.000     0.9832 1.000 0.000
#> GSM549291     2   0.697     0.7707 0.188 0.812
#> GSM549274     2   0.000     0.9896 0.000 1.000
#> GSM750738     2   0.118     0.9757 0.016 0.984
#> GSM750748     1   0.000     0.9832 1.000 0.000
#> GSM549240     1   0.000     0.9832 1.000 0.000
#> GSM549279     2   0.141     0.9721 0.020 0.980
#> GSM549294     2   0.000     0.9896 0.000 1.000
#> GSM549300     2   0.000     0.9896 0.000 1.000
#> GSM549303     2   0.000     0.9896 0.000 1.000
#> GSM549309     2   0.000     0.9896 0.000 1.000
#> GSM750753     2   0.000     0.9896 0.000 1.000
#> GSM750752     2   0.000     0.9896 0.000 1.000
#> GSM549304     2   0.000     0.9896 0.000 1.000
#> GSM549305     2   0.000     0.9896 0.000 1.000
#> GSM549307     2   0.000     0.9896 0.000 1.000
#> GSM549306     2   0.000     0.9896 0.000 1.000
#> GSM549308     2   0.000     0.9896 0.000 1.000
#> GSM549233     1   0.000     0.9832 1.000 0.000
#> GSM549234     1   0.000     0.9832 1.000 0.000
#> GSM549250     1   0.000     0.9832 1.000 0.000
#> GSM549287     2   0.000     0.9896 0.000 1.000
#> GSM750735     1   0.000     0.9832 1.000 0.000
#> GSM750736     1   0.000     0.9832 1.000 0.000
#> GSM750749     1   0.402     0.9033 0.920 0.080
#> GSM549230     1   0.000     0.9832 1.000 0.000
#> GSM549231     1   0.000     0.9832 1.000 0.000
#> GSM549237     1   0.000     0.9832 1.000 0.000
#> GSM549254     1   0.000     0.9832 1.000 0.000
#> GSM750734     1   0.000     0.9832 1.000 0.000
#> GSM549271     2   0.000     0.9896 0.000 1.000
#> GSM549232     1   0.000     0.9832 1.000 0.000
#> GSM549246     1   0.000     0.9832 1.000 0.000
#> GSM549248     1   0.000     0.9832 1.000 0.000
#> GSM549255     1   0.000     0.9832 1.000 0.000
#> GSM750746     1   0.000     0.9832 1.000 0.000
#> GSM549259     1   0.000     0.9832 1.000 0.000
#> GSM549269     2   0.000     0.9896 0.000 1.000
#> GSM549273     2   0.000     0.9896 0.000 1.000
#> GSM549299     2   0.000     0.9896 0.000 1.000
#> GSM549301     2   0.000     0.9896 0.000 1.000
#> GSM549310     2   0.000     0.9896 0.000 1.000
#> GSM549311     2   0.000     0.9896 0.000 1.000
#> GSM549302     2   0.000     0.9896 0.000 1.000
#> GSM549235     1   0.000     0.9832 1.000 0.000
#> GSM549245     1   0.000     0.9832 1.000 0.000
#> GSM549265     1   0.000     0.9832 1.000 0.000
#> GSM549282     2   0.000     0.9896 0.000 1.000
#> GSM549296     2   0.000     0.9896 0.000 1.000
#> GSM750739     1   0.000     0.9832 1.000 0.000
#> GSM750742     1   0.000     0.9832 1.000 0.000
#> GSM750744     1   0.000     0.9832 1.000 0.000
#> GSM750750     2   0.000     0.9896 0.000 1.000
#> GSM549242     1   0.000     0.9832 1.000 0.000
#> GSM549252     1   0.000     0.9832 1.000 0.000
#> GSM549253     1   0.000     0.9832 1.000 0.000
#> GSM549256     1   0.000     0.9832 1.000 0.000
#> GSM549257     1   0.000     0.9832 1.000 0.000
#> GSM549263     1   0.000     0.9832 1.000 0.000
#> GSM549267     2   0.000     0.9896 0.000 1.000
#> GSM750745     1   0.000     0.9832 1.000 0.000
#> GSM549239     1   0.000     0.9832 1.000 0.000
#> GSM549244     1   0.000     0.9832 1.000 0.000
#> GSM549249     1   0.000     0.9832 1.000 0.000
#> GSM549260     1   0.000     0.9832 1.000 0.000
#> GSM549266     2   0.000     0.9896 0.000 1.000
#> GSM549293     2   0.000     0.9896 0.000 1.000
#> GSM549236     1   0.000     0.9832 1.000 0.000
#> GSM549238     1   0.000     0.9832 1.000 0.000
#> GSM549251     1   0.000     0.9832 1.000 0.000
#> GSM549258     1   0.000     0.9832 1.000 0.000
#> GSM549264     1   0.000     0.9832 1.000 0.000
#> GSM549243     1   0.000     0.9832 1.000 0.000
#> GSM549262     1   0.000     0.9832 1.000 0.000
#> GSM549278     1   0.999     0.0453 0.516 0.484
#> GSM549283     2   0.000     0.9896 0.000 1.000
#> GSM549298     2   0.000     0.9896 0.000 1.000
#> GSM750741     1   0.000     0.9832 1.000 0.000
#> GSM549286     2   0.000     0.9896 0.000 1.000
#> GSM549241     1   0.000     0.9832 1.000 0.000
#> GSM549247     1   0.482     0.8778 0.896 0.104
#> GSM549261     1   0.000     0.9832 1.000 0.000
#> GSM549270     2   0.000     0.9896 0.000 1.000
#> GSM549277     2   0.000     0.9896 0.000 1.000
#> GSM549280     2   0.000     0.9896 0.000 1.000
#> GSM549281     2   0.000     0.9896 0.000 1.000
#> GSM549285     2   0.000     0.9896 0.000 1.000
#> GSM549288     2   0.000     0.9896 0.000 1.000
#> GSM549292     2   0.000     0.9896 0.000 1.000
#> GSM549295     2   0.000     0.9896 0.000 1.000
#> GSM549297     2   0.000     0.9896 0.000 1.000
#> GSM750743     1   0.000     0.9832 1.000 0.000
#> GSM549268     2   0.000     0.9896 0.000 1.000
#> GSM549290     2   0.775     0.7082 0.228 0.772
#> GSM549272     2   0.000     0.9896 0.000 1.000
#> GSM549276     2   0.000     0.9896 0.000 1.000
#> GSM549275     1   0.738     0.7386 0.792 0.208
#> GSM549284     2   0.000     0.9896 0.000 1.000
#> GSM750737     1   0.000     0.9832 1.000 0.000
#> GSM750740     1   0.000     0.9832 1.000 0.000
#> GSM750747     1   0.000     0.9832 1.000 0.000
#> GSM750751     2   0.000     0.9896 0.000 1.000
#> GSM750754     2   0.242     0.9523 0.040 0.960

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.5988      0.489 0.632 0.000 0.368
#> GSM549291     3  0.1860      0.851 0.052 0.000 0.948
#> GSM549274     2  0.0237      0.848 0.000 0.996 0.004
#> GSM750738     2  0.0829      0.845 0.012 0.984 0.004
#> GSM750748     1  0.0237      0.953 0.996 0.004 0.000
#> GSM549240     2  0.5363      0.601 0.276 0.724 0.000
#> GSM549279     2  0.0829      0.845 0.012 0.984 0.004
#> GSM549294     2  0.1163      0.851 0.000 0.972 0.028
#> GSM549300     3  0.3816      0.829 0.000 0.148 0.852
#> GSM549303     3  0.1163      0.891 0.000 0.028 0.972
#> GSM549309     3  0.0237      0.887 0.004 0.000 0.996
#> GSM750753     2  0.4555      0.712 0.000 0.800 0.200
#> GSM750752     3  0.0237      0.890 0.000 0.004 0.996
#> GSM549304     2  0.1031      0.851 0.000 0.976 0.024
#> GSM549305     2  0.3116      0.811 0.000 0.892 0.108
#> GSM549307     3  0.5327      0.692 0.000 0.272 0.728
#> GSM549306     3  0.3116      0.860 0.000 0.108 0.892
#> GSM549308     3  0.1529      0.889 0.000 0.040 0.960
#> GSM549233     1  0.1031      0.955 0.976 0.000 0.024
#> GSM549234     1  0.1753      0.948 0.952 0.000 0.048
#> GSM549250     1  0.1289      0.954 0.968 0.000 0.032
#> GSM549287     3  0.0237      0.887 0.004 0.000 0.996
#> GSM750735     1  0.1753      0.928 0.952 0.048 0.000
#> GSM750736     2  0.6126      0.347 0.400 0.600 0.000
#> GSM750749     1  0.1031      0.945 0.976 0.024 0.000
#> GSM549230     1  0.1163      0.954 0.972 0.000 0.028
#> GSM549231     1  0.1289      0.954 0.968 0.000 0.032
#> GSM549237     1  0.0424      0.955 0.992 0.000 0.008
#> GSM549254     1  0.2261      0.935 0.932 0.000 0.068
#> GSM750734     1  0.0424      0.952 0.992 0.008 0.000
#> GSM549271     3  0.0747      0.891 0.000 0.016 0.984
#> GSM549232     1  0.2625      0.925 0.916 0.000 0.084
#> GSM549246     1  0.1964      0.944 0.944 0.000 0.056
#> GSM549248     1  0.0424      0.955 0.992 0.000 0.008
#> GSM549255     1  0.1964      0.944 0.944 0.000 0.056
#> GSM750746     1  0.0592      0.950 0.988 0.012 0.000
#> GSM549259     1  0.2625      0.896 0.916 0.084 0.000
#> GSM549269     2  0.0424      0.849 0.000 0.992 0.008
#> GSM549273     3  0.1860      0.885 0.000 0.052 0.948
#> GSM549299     2  0.3686      0.781 0.000 0.860 0.140
#> GSM549301     3  0.2448      0.877 0.000 0.076 0.924
#> GSM549310     3  0.0892      0.892 0.000 0.020 0.980
#> GSM549311     3  0.0424      0.891 0.000 0.008 0.992
#> GSM549302     2  0.1529      0.850 0.000 0.960 0.040
#> GSM549235     1  0.0237      0.953 0.996 0.004 0.000
#> GSM549245     1  0.1989      0.947 0.948 0.004 0.048
#> GSM549265     1  0.2448      0.931 0.924 0.000 0.076
#> GSM549282     3  0.0237      0.887 0.004 0.000 0.996
#> GSM549296     3  0.0237      0.887 0.004 0.000 0.996
#> GSM750739     1  0.0237      0.953 0.996 0.004 0.000
#> GSM750742     1  0.0592      0.955 0.988 0.000 0.012
#> GSM750744     1  0.0237      0.953 0.996 0.004 0.000
#> GSM750750     3  0.1163      0.891 0.000 0.028 0.972
#> GSM549242     1  0.0747      0.956 0.984 0.000 0.016
#> GSM549252     1  0.1860      0.947 0.948 0.000 0.052
#> GSM549253     1  0.1163      0.954 0.972 0.000 0.028
#> GSM549256     1  0.0892      0.955 0.980 0.000 0.020
#> GSM549257     1  0.1964      0.944 0.944 0.000 0.056
#> GSM549263     1  0.1163      0.954 0.972 0.000 0.028
#> GSM549267     3  0.0747      0.880 0.016 0.000 0.984
#> GSM750745     1  0.2066      0.918 0.940 0.060 0.000
#> GSM549239     1  0.1031      0.945 0.976 0.024 0.000
#> GSM549244     1  0.2165      0.940 0.936 0.000 0.064
#> GSM549249     1  0.1860      0.947 0.948 0.000 0.052
#> GSM549260     1  0.0237      0.955 0.996 0.000 0.004
#> GSM549266     2  0.0424      0.845 0.008 0.992 0.000
#> GSM549293     2  0.0592      0.850 0.000 0.988 0.012
#> GSM549236     1  0.1289      0.954 0.968 0.000 0.032
#> GSM549238     1  0.1860      0.947 0.948 0.000 0.052
#> GSM549251     1  0.1289      0.954 0.968 0.000 0.032
#> GSM549258     1  0.5859      0.459 0.656 0.344 0.000
#> GSM549264     1  0.0237      0.953 0.996 0.004 0.000
#> GSM549243     1  0.0424      0.952 0.992 0.008 0.000
#> GSM549262     1  0.0592      0.955 0.988 0.000 0.012
#> GSM549278     3  0.4002      0.724 0.160 0.000 0.840
#> GSM549283     2  0.2448      0.836 0.000 0.924 0.076
#> GSM549298     3  0.2878      0.867 0.000 0.096 0.904
#> GSM750741     2  0.6252      0.219 0.444 0.556 0.000
#> GSM549286     2  0.1753      0.848 0.000 0.952 0.048
#> GSM549241     2  0.5733      0.513 0.324 0.676 0.000
#> GSM549247     2  0.2448      0.802 0.076 0.924 0.000
#> GSM549261     1  0.3192      0.865 0.888 0.112 0.000
#> GSM549270     2  0.4887      0.669 0.000 0.772 0.228
#> GSM549277     3  0.5733      0.598 0.000 0.324 0.676
#> GSM549280     3  0.5363      0.686 0.000 0.276 0.724
#> GSM549281     2  0.1860      0.846 0.000 0.948 0.052
#> GSM549285     3  0.2796      0.870 0.000 0.092 0.908
#> GSM549288     3  0.5291      0.697 0.000 0.268 0.732
#> GSM549292     2  0.0747      0.851 0.000 0.984 0.016
#> GSM549295     3  0.5363      0.686 0.000 0.276 0.724
#> GSM549297     2  0.6235      0.130 0.000 0.564 0.436
#> GSM750743     1  0.0747      0.949 0.984 0.016 0.000
#> GSM549268     2  0.4654      0.696 0.000 0.792 0.208
#> GSM549290     3  0.2261      0.834 0.068 0.000 0.932
#> GSM549272     2  0.0892      0.851 0.000 0.980 0.020
#> GSM549276     2  0.2625      0.829 0.000 0.916 0.084
#> GSM549275     2  0.1964      0.817 0.056 0.944 0.000
#> GSM549284     2  0.1860      0.847 0.000 0.948 0.052
#> GSM750737     1  0.0848      0.955 0.984 0.008 0.008
#> GSM750740     1  0.0237      0.953 0.996 0.004 0.000
#> GSM750747     1  0.0424      0.952 0.992 0.008 0.000
#> GSM750751     2  0.1753      0.848 0.000 0.952 0.048
#> GSM750754     3  0.0892      0.877 0.020 0.000 0.980

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.2593     0.8381 0.004 0.000 0.104 0.892
#> GSM549291     4  0.4819     0.5205 0.004 0.000 0.344 0.652
#> GSM549274     2  0.0188     0.8633 0.000 0.996 0.004 0.000
#> GSM750738     2  0.4998     0.0817 0.000 0.512 0.000 0.488
#> GSM750748     1  0.0524     0.9279 0.988 0.008 0.000 0.004
#> GSM549240     2  0.1722     0.8391 0.008 0.944 0.000 0.048
#> GSM549279     2  0.1356     0.8643 0.008 0.960 0.032 0.000
#> GSM549294     2  0.1211     0.8658 0.000 0.960 0.040 0.000
#> GSM549300     3  0.1211     0.9040 0.000 0.040 0.960 0.000
#> GSM549303     3  0.0469     0.9098 0.000 0.000 0.988 0.012
#> GSM549309     3  0.0817     0.9048 0.000 0.000 0.976 0.024
#> GSM750753     2  0.3942     0.7284 0.000 0.764 0.236 0.000
#> GSM750752     4  0.0672     0.8917 0.000 0.008 0.008 0.984
#> GSM549304     2  0.0817     0.8667 0.000 0.976 0.024 0.000
#> GSM549305     2  0.2408     0.8404 0.000 0.896 0.104 0.000
#> GSM549307     3  0.2081     0.8764 0.000 0.084 0.916 0.000
#> GSM549306     3  0.0592     0.9140 0.000 0.016 0.984 0.000
#> GSM549308     3  0.0000     0.9132 0.000 0.000 1.000 0.000
#> GSM549233     4  0.3157     0.7975 0.144 0.004 0.000 0.852
#> GSM549234     4  0.0000     0.8930 0.000 0.000 0.000 1.000
#> GSM549250     1  0.3801     0.7096 0.780 0.000 0.000 0.220
#> GSM549287     3  0.2654     0.8328 0.004 0.000 0.888 0.108
#> GSM750735     1  0.2216     0.8868 0.908 0.092 0.000 0.000
#> GSM750736     2  0.3850     0.7649 0.116 0.840 0.000 0.044
#> GSM750749     1  0.2546     0.8797 0.912 0.060 0.028 0.000
#> GSM549230     1  0.0469     0.9259 0.988 0.000 0.000 0.012
#> GSM549231     1  0.0469     0.9259 0.988 0.000 0.000 0.012
#> GSM549237     1  0.0188     0.9273 0.996 0.000 0.000 0.004
#> GSM549254     4  0.0000     0.8930 0.000 0.000 0.000 1.000
#> GSM750734     1  0.0524     0.9279 0.988 0.008 0.000 0.004
#> GSM549271     3  0.2760     0.8134 0.000 0.000 0.872 0.128
#> GSM549232     4  0.0336     0.8924 0.000 0.000 0.008 0.992
#> GSM549246     4  0.4831     0.5978 0.280 0.000 0.016 0.704
#> GSM549248     1  0.0336     0.9269 0.992 0.000 0.000 0.008
#> GSM549255     4  0.0000     0.8930 0.000 0.000 0.000 1.000
#> GSM750746     1  0.0469     0.9268 0.988 0.012 0.000 0.000
#> GSM549259     1  0.2408     0.8769 0.896 0.104 0.000 0.000
#> GSM549269     2  0.0188     0.8633 0.000 0.996 0.004 0.000
#> GSM549273     3  0.0336     0.9143 0.000 0.008 0.992 0.000
#> GSM549299     2  0.3311     0.7936 0.000 0.828 0.172 0.000
#> GSM549301     3  0.0469     0.9144 0.000 0.012 0.988 0.000
#> GSM549310     4  0.1118     0.8823 0.000 0.000 0.036 0.964
#> GSM549311     3  0.0817     0.9048 0.000 0.000 0.976 0.024
#> GSM549302     2  0.1004     0.8666 0.000 0.972 0.024 0.004
#> GSM549235     1  0.0188     0.9271 0.996 0.004 0.000 0.000
#> GSM549245     4  0.0469     0.8887 0.000 0.012 0.000 0.988
#> GSM549265     4  0.2988     0.8314 0.112 0.000 0.012 0.876
#> GSM549282     3  0.0927     0.9055 0.008 0.000 0.976 0.016
#> GSM549296     4  0.0524     0.8919 0.000 0.004 0.008 0.988
#> GSM750739     1  0.0524     0.9279 0.988 0.008 0.000 0.004
#> GSM750742     1  0.0188     0.9273 0.996 0.000 0.000 0.004
#> GSM750744     1  0.0657     0.9271 0.984 0.004 0.000 0.012
#> GSM750750     3  0.0000     0.9132 0.000 0.000 1.000 0.000
#> GSM549242     1  0.4905     0.4400 0.632 0.004 0.000 0.364
#> GSM549252     4  0.0524     0.8921 0.004 0.000 0.008 0.988
#> GSM549253     1  0.2469     0.8538 0.892 0.000 0.000 0.108
#> GSM549256     4  0.2773     0.8248 0.116 0.004 0.000 0.880
#> GSM549257     4  0.0000     0.8930 0.000 0.000 0.000 1.000
#> GSM549263     1  0.0592     0.9244 0.984 0.000 0.000 0.016
#> GSM549267     4  0.5028     0.3984 0.004 0.000 0.400 0.596
#> GSM750745     1  0.1940     0.8986 0.924 0.076 0.000 0.000
#> GSM549239     1  0.0921     0.9228 0.972 0.028 0.000 0.000
#> GSM549244     4  0.0000     0.8930 0.000 0.000 0.000 1.000
#> GSM549249     4  0.0937     0.8905 0.012 0.000 0.012 0.976
#> GSM549260     1  0.2773     0.8532 0.880 0.004 0.000 0.116
#> GSM549266     2  0.1256     0.8639 0.008 0.964 0.028 0.000
#> GSM549293     2  0.1297     0.8631 0.000 0.964 0.016 0.020
#> GSM549236     1  0.3355     0.7929 0.836 0.000 0.004 0.160
#> GSM549238     4  0.1151     0.8873 0.024 0.000 0.008 0.968
#> GSM549251     1  0.0817     0.9220 0.976 0.000 0.000 0.024
#> GSM549258     1  0.4981     0.1566 0.536 0.464 0.000 0.000
#> GSM549264     1  0.1182     0.9264 0.968 0.016 0.000 0.016
#> GSM549243     1  0.0336     0.9272 0.992 0.008 0.000 0.000
#> GSM549262     1  0.0188     0.9273 0.996 0.000 0.000 0.004
#> GSM549278     3  0.5126     0.0931 0.004 0.000 0.552 0.444
#> GSM549283     2  0.2973     0.8175 0.000 0.856 0.144 0.000
#> GSM549298     3  0.0469     0.9144 0.000 0.012 0.988 0.000
#> GSM750741     2  0.4477     0.5171 0.312 0.688 0.000 0.000
#> GSM549286     2  0.1022     0.8663 0.000 0.968 0.032 0.000
#> GSM549241     2  0.4222     0.5929 0.272 0.728 0.000 0.000
#> GSM549247     2  0.0817     0.8544 0.000 0.976 0.000 0.024
#> GSM549261     1  0.1940     0.8975 0.924 0.076 0.000 0.000
#> GSM549270     2  0.4164     0.6937 0.000 0.736 0.264 0.000
#> GSM549277     3  0.2589     0.8441 0.000 0.116 0.884 0.000
#> GSM549280     3  0.2345     0.8623 0.000 0.100 0.900 0.000
#> GSM549281     2  0.3791     0.7669 0.004 0.796 0.200 0.000
#> GSM549285     3  0.0592     0.9139 0.000 0.016 0.984 0.000
#> GSM549288     3  0.2149     0.8730 0.000 0.088 0.912 0.000
#> GSM549292     2  0.0657     0.8655 0.000 0.984 0.012 0.004
#> GSM549295     3  0.2647     0.8399 0.000 0.120 0.880 0.000
#> GSM549297     2  0.4992     0.2240 0.000 0.524 0.476 0.000
#> GSM750743     1  0.1004     0.9256 0.972 0.024 0.000 0.004
#> GSM549268     2  0.4776     0.4954 0.000 0.624 0.376 0.000
#> GSM549290     4  0.5203     0.3546 0.008 0.000 0.416 0.576
#> GSM549272     2  0.0817     0.8668 0.000 0.976 0.024 0.000
#> GSM549276     2  0.1867     0.8556 0.000 0.928 0.072 0.000
#> GSM549275     2  0.0592     0.8596 0.016 0.984 0.000 0.000
#> GSM549284     2  0.1624     0.8648 0.000 0.952 0.028 0.020
#> GSM750737     4  0.0592     0.8875 0.000 0.016 0.000 0.984
#> GSM750740     1  0.0592     0.9264 0.984 0.016 0.000 0.000
#> GSM750747     1  0.0469     0.9268 0.988 0.012 0.000 0.000
#> GSM750751     2  0.1211     0.8653 0.000 0.960 0.040 0.000
#> GSM750754     3  0.2737     0.8340 0.008 0.000 0.888 0.104

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.1568     0.8872 0.000 0.000 0.036 0.944 0.020
#> GSM549291     4  0.3789     0.6942 0.000 0.000 0.224 0.760 0.016
#> GSM549274     2  0.0290     0.8425 0.000 0.992 0.000 0.000 0.008
#> GSM750738     2  0.4794     0.4213 0.000 0.624 0.000 0.344 0.032
#> GSM750748     1  0.1908     0.7900 0.908 0.000 0.000 0.000 0.092
#> GSM549240     2  0.2844     0.7798 0.092 0.876 0.000 0.028 0.004
#> GSM549279     2  0.6301     0.5983 0.256 0.616 0.060 0.004 0.064
#> GSM549294     2  0.3050     0.8135 0.024 0.876 0.076 0.000 0.024
#> GSM549300     3  0.1117     0.8617 0.000 0.016 0.964 0.000 0.020
#> GSM549303     3  0.1670     0.8549 0.000 0.000 0.936 0.012 0.052
#> GSM549309     3  0.1082     0.8574 0.000 0.000 0.964 0.008 0.028
#> GSM750753     2  0.3333     0.7170 0.000 0.788 0.208 0.000 0.004
#> GSM750752     4  0.0324     0.8944 0.000 0.004 0.000 0.992 0.004
#> GSM549304     2  0.0404     0.8419 0.000 0.988 0.000 0.000 0.012
#> GSM549305     2  0.2006     0.8234 0.000 0.916 0.072 0.000 0.012
#> GSM549307     3  0.1331     0.8570 0.000 0.040 0.952 0.000 0.008
#> GSM549306     3  0.0807     0.8621 0.000 0.012 0.976 0.000 0.012
#> GSM549308     3  0.1041     0.8594 0.000 0.004 0.964 0.000 0.032
#> GSM549233     4  0.3526     0.8004 0.072 0.000 0.000 0.832 0.096
#> GSM549234     4  0.1059     0.8927 0.004 0.008 0.000 0.968 0.020
#> GSM549250     5  0.3779     0.6474 0.144 0.000 0.000 0.052 0.804
#> GSM549287     3  0.1907     0.8458 0.000 0.000 0.928 0.028 0.044
#> GSM750735     1  0.3242     0.6681 0.784 0.000 0.000 0.000 0.216
#> GSM750736     2  0.6106     0.4127 0.336 0.560 0.000 0.024 0.080
#> GSM750749     1  0.4925     0.5679 0.708 0.024 0.036 0.000 0.232
#> GSM549230     1  0.4030     0.3344 0.648 0.000 0.000 0.000 0.352
#> GSM549231     5  0.3366     0.6310 0.232 0.000 0.000 0.000 0.768
#> GSM549237     1  0.3561     0.6426 0.740 0.000 0.000 0.000 0.260
#> GSM549254     4  0.1869     0.8842 0.012 0.000 0.016 0.936 0.036
#> GSM750734     1  0.0963     0.7987 0.964 0.000 0.000 0.000 0.036
#> GSM549271     3  0.2920     0.7724 0.000 0.000 0.852 0.132 0.016
#> GSM549232     4  0.0162     0.8945 0.000 0.000 0.000 0.996 0.004
#> GSM549246     4  0.3009     0.8469 0.064 0.000 0.008 0.876 0.052
#> GSM549248     5  0.4171     0.3888 0.396 0.000 0.000 0.000 0.604
#> GSM549255     4  0.0162     0.8941 0.000 0.000 0.004 0.996 0.000
#> GSM750746     1  0.1341     0.8058 0.944 0.000 0.000 0.000 0.056
#> GSM549259     1  0.1430     0.8086 0.944 0.004 0.000 0.000 0.052
#> GSM549269     2  0.0290     0.8428 0.000 0.992 0.000 0.000 0.008
#> GSM549273     3  0.1809     0.8543 0.000 0.000 0.928 0.012 0.060
#> GSM549299     2  0.4863     0.3853 0.008 0.592 0.384 0.000 0.016
#> GSM549301     3  0.0162     0.8623 0.000 0.004 0.996 0.000 0.000
#> GSM549310     4  0.1750     0.8823 0.000 0.000 0.028 0.936 0.036
#> GSM549311     3  0.1597     0.8564 0.000 0.000 0.940 0.012 0.048
#> GSM549302     2  0.0000     0.8423 0.000 1.000 0.000 0.000 0.000
#> GSM549235     1  0.2074     0.7841 0.896 0.000 0.000 0.000 0.104
#> GSM549245     4  0.0451     0.8937 0.004 0.008 0.000 0.988 0.000
#> GSM549265     5  0.4758     0.0252 0.008 0.008 0.000 0.424 0.560
#> GSM549282     5  0.4150     0.1502 0.000 0.000 0.388 0.000 0.612
#> GSM549296     4  0.1211     0.8891 0.000 0.000 0.016 0.960 0.024
#> GSM750739     1  0.2230     0.7853 0.884 0.000 0.000 0.000 0.116
#> GSM750742     5  0.4227     0.3910 0.420 0.000 0.000 0.000 0.580
#> GSM750744     5  0.4249     0.2605 0.432 0.000 0.000 0.000 0.568
#> GSM750750     3  0.1041     0.8587 0.000 0.004 0.964 0.000 0.032
#> GSM549242     1  0.5000     0.1943 0.576 0.000 0.000 0.388 0.036
#> GSM549252     4  0.1732     0.8752 0.000 0.000 0.000 0.920 0.080
#> GSM549253     5  0.4639     0.5357 0.344 0.000 0.000 0.024 0.632
#> GSM549256     4  0.2233     0.8531 0.080 0.000 0.000 0.904 0.016
#> GSM549257     4  0.0324     0.8946 0.004 0.000 0.004 0.992 0.000
#> GSM549263     5  0.3857     0.5796 0.312 0.000 0.000 0.000 0.688
#> GSM549267     4  0.4960     0.5908 0.000 0.000 0.268 0.668 0.064
#> GSM750745     1  0.0794     0.7953 0.972 0.000 0.000 0.000 0.028
#> GSM549239     1  0.1043     0.8084 0.960 0.000 0.000 0.000 0.040
#> GSM549244     4  0.1557     0.8846 0.000 0.008 0.000 0.940 0.052
#> GSM549249     4  0.2629     0.8360 0.004 0.000 0.000 0.860 0.136
#> GSM549260     1  0.1750     0.7863 0.936 0.000 0.000 0.036 0.028
#> GSM549266     2  0.5800     0.6534 0.220 0.664 0.068 0.000 0.048
#> GSM549293     2  0.0451     0.8409 0.000 0.988 0.000 0.004 0.008
#> GSM549236     5  0.3995     0.6492 0.180 0.000 0.000 0.044 0.776
#> GSM549238     4  0.4063     0.6373 0.012 0.000 0.000 0.708 0.280
#> GSM549251     1  0.2852     0.7150 0.828 0.000 0.000 0.000 0.172
#> GSM549258     1  0.1364     0.7800 0.952 0.036 0.000 0.000 0.012
#> GSM549264     5  0.3250     0.6400 0.128 0.020 0.000 0.008 0.844
#> GSM549243     1  0.2074     0.7824 0.896 0.000 0.000 0.000 0.104
#> GSM549262     1  0.4171     0.2700 0.604 0.000 0.000 0.000 0.396
#> GSM549278     3  0.5092     0.1228 0.000 0.000 0.524 0.440 0.036
#> GSM549283     2  0.4772     0.4703 0.012 0.624 0.352 0.000 0.012
#> GSM549298     3  0.0566     0.8620 0.000 0.004 0.984 0.000 0.012
#> GSM750741     1  0.2972     0.7214 0.880 0.048 0.004 0.004 0.064
#> GSM549286     2  0.0162     0.8428 0.000 0.996 0.000 0.000 0.004
#> GSM549241     1  0.2139     0.7493 0.916 0.052 0.000 0.000 0.032
#> GSM549247     2  0.0992     0.8370 0.000 0.968 0.000 0.024 0.008
#> GSM549261     1  0.2208     0.8033 0.908 0.020 0.000 0.000 0.072
#> GSM549270     2  0.4473     0.5183 0.000 0.656 0.324 0.000 0.020
#> GSM549277     3  0.2511     0.8342 0.000 0.080 0.892 0.000 0.028
#> GSM549280     3  0.1701     0.8532 0.000 0.048 0.936 0.000 0.016
#> GSM549281     3  0.7100     0.4448 0.140 0.212 0.560 0.000 0.088
#> GSM549285     3  0.2825     0.8175 0.000 0.016 0.860 0.000 0.124
#> GSM549288     3  0.2069     0.8452 0.000 0.076 0.912 0.000 0.012
#> GSM549292     2  0.0404     0.8412 0.000 0.988 0.000 0.000 0.012
#> GSM549295     3  0.2844     0.8298 0.000 0.092 0.876 0.004 0.028
#> GSM549297     3  0.4937     0.1637 0.000 0.428 0.544 0.000 0.028
#> GSM750743     1  0.3366     0.6749 0.768 0.000 0.000 0.000 0.232
#> GSM549268     3  0.6776     0.5134 0.112 0.196 0.600 0.000 0.092
#> GSM549290     5  0.6309     0.2605 0.000 0.000 0.236 0.232 0.532
#> GSM549272     2  0.0000     0.8423 0.000 1.000 0.000 0.000 0.000
#> GSM549276     2  0.0880     0.8403 0.000 0.968 0.032 0.000 0.000
#> GSM549275     2  0.2069     0.8213 0.076 0.912 0.000 0.000 0.012
#> GSM549284     2  0.1571     0.8236 0.000 0.936 0.000 0.004 0.060
#> GSM750737     4  0.2300     0.8609 0.040 0.000 0.000 0.908 0.052
#> GSM750740     1  0.1282     0.8079 0.952 0.004 0.000 0.000 0.044
#> GSM750747     1  0.1341     0.8083 0.944 0.000 0.000 0.000 0.056
#> GSM750751     2  0.1597     0.8390 0.008 0.948 0.020 0.000 0.024
#> GSM750754     3  0.2300     0.8324 0.000 0.000 0.908 0.052 0.040

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.1116    0.89252 0.000 0.000 0.008 0.960 0.004 0.028
#> GSM549291     4  0.3686    0.66465 0.000 0.000 0.220 0.748 0.000 0.032
#> GSM549274     2  0.0363    0.82024 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM750738     2  0.5914    0.20663 0.000 0.464 0.000 0.344 0.004 0.188
#> GSM750748     1  0.0713    0.71504 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM549240     2  0.3347    0.69013 0.152 0.812 0.000 0.004 0.004 0.028
#> GSM549279     6  0.6892    0.42701 0.128 0.200 0.152 0.004 0.000 0.516
#> GSM549294     2  0.2088    0.79239 0.000 0.904 0.028 0.000 0.000 0.068
#> GSM549300     3  0.1410    0.76131 0.000 0.004 0.944 0.000 0.008 0.044
#> GSM549303     3  0.3714    0.70591 0.000 0.000 0.720 0.008 0.008 0.264
#> GSM549309     3  0.2703    0.74973 0.000 0.000 0.824 0.000 0.004 0.172
#> GSM750753     2  0.5161    0.13102 0.000 0.472 0.452 0.000 0.004 0.072
#> GSM750752     4  0.1010    0.88913 0.000 0.000 0.000 0.960 0.004 0.036
#> GSM549304     2  0.3295    0.75440 0.004 0.844 0.036 0.012 0.004 0.100
#> GSM549305     2  0.1644    0.80973 0.000 0.932 0.028 0.000 0.000 0.040
#> GSM549307     3  0.1074    0.77059 0.000 0.012 0.960 0.000 0.000 0.028
#> GSM549306     3  0.0146    0.77620 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM549308     3  0.0891    0.77790 0.000 0.000 0.968 0.000 0.008 0.024
#> GSM549233     4  0.2796    0.84908 0.044 0.000 0.000 0.868 0.080 0.008
#> GSM549234     4  0.1391    0.88750 0.000 0.000 0.000 0.944 0.016 0.040
#> GSM549250     5  0.2030    0.71549 0.064 0.000 0.000 0.028 0.908 0.000
#> GSM549287     3  0.5312    0.65565 0.000 0.000 0.648 0.120 0.024 0.208
#> GSM750735     6  0.4943    0.23928 0.376 0.016 0.000 0.004 0.032 0.572
#> GSM750736     6  0.5647    0.44681 0.152 0.204 0.000 0.016 0.008 0.620
#> GSM750749     6  0.5626    0.39530 0.276 0.008 0.068 0.000 0.040 0.608
#> GSM549230     1  0.3309    0.32082 0.720 0.000 0.000 0.000 0.280 0.000
#> GSM549231     5  0.2020    0.72081 0.096 0.000 0.000 0.000 0.896 0.008
#> GSM549237     1  0.5010    0.43477 0.644 0.000 0.000 0.000 0.172 0.184
#> GSM549254     4  0.1155    0.89118 0.004 0.000 0.004 0.956 0.000 0.036
#> GSM750734     1  0.3782    0.20626 0.588 0.000 0.000 0.000 0.000 0.412
#> GSM549271     3  0.2039    0.74506 0.000 0.000 0.904 0.076 0.000 0.020
#> GSM549232     4  0.0603    0.89309 0.000 0.000 0.000 0.980 0.004 0.016
#> GSM549246     4  0.2823    0.84930 0.068 0.000 0.000 0.872 0.044 0.016
#> GSM549248     5  0.4054    0.62118 0.188 0.000 0.000 0.000 0.740 0.072
#> GSM549255     4  0.0146    0.89402 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM750746     1  0.0363    0.71803 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549259     1  0.0725    0.71543 0.976 0.012 0.000 0.000 0.012 0.000
#> GSM549269     2  0.0260    0.82028 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM549273     3  0.4103    0.68738 0.000 0.000 0.684 0.020 0.008 0.288
#> GSM549299     3  0.5089    0.09852 0.000 0.384 0.540 0.000 0.004 0.072
#> GSM549301     3  0.1531    0.77473 0.000 0.000 0.928 0.000 0.004 0.068
#> GSM549310     4  0.1625    0.87875 0.000 0.000 0.012 0.928 0.000 0.060
#> GSM549311     3  0.4334    0.68171 0.000 0.004 0.676 0.020 0.012 0.288
#> GSM549302     2  0.0547    0.81793 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM549235     1  0.1007    0.70783 0.956 0.000 0.000 0.000 0.044 0.000
#> GSM549245     4  0.0260    0.89412 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM549265     5  0.5066    0.45640 0.000 0.000 0.000 0.176 0.636 0.188
#> GSM549282     5  0.2346    0.62284 0.000 0.000 0.124 0.000 0.868 0.008
#> GSM549296     4  0.0692    0.89268 0.000 0.000 0.004 0.976 0.000 0.020
#> GSM750739     1  0.4439    0.09191 0.540 0.000 0.000 0.000 0.028 0.432
#> GSM750742     5  0.3615    0.64281 0.292 0.000 0.000 0.000 0.700 0.008
#> GSM750744     6  0.6013    0.01337 0.200 0.000 0.000 0.004 0.396 0.400
#> GSM750750     3  0.1225    0.77768 0.000 0.000 0.952 0.000 0.012 0.036
#> GSM549242     1  0.4214    0.00844 0.528 0.000 0.000 0.460 0.004 0.008
#> GSM549252     4  0.2170    0.85931 0.000 0.000 0.000 0.888 0.100 0.012
#> GSM549253     5  0.4045    0.44772 0.428 0.000 0.000 0.008 0.564 0.000
#> GSM549256     4  0.2163    0.84745 0.096 0.000 0.000 0.892 0.004 0.008
#> GSM549257     4  0.0000    0.89388 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549263     5  0.3578    0.59442 0.340 0.000 0.000 0.000 0.660 0.000
#> GSM549267     4  0.4669    0.73913 0.000 0.000 0.104 0.748 0.084 0.064
#> GSM750745     1  0.3823    0.14962 0.564 0.000 0.000 0.000 0.000 0.436
#> GSM549239     1  0.3531    0.37440 0.672 0.000 0.000 0.000 0.000 0.328
#> GSM549244     4  0.1074    0.89343 0.000 0.000 0.000 0.960 0.028 0.012
#> GSM549249     4  0.2730    0.78537 0.000 0.000 0.000 0.808 0.192 0.000
#> GSM549260     1  0.0972    0.70457 0.964 0.000 0.000 0.008 0.000 0.028
#> GSM549266     2  0.5197    0.59379 0.096 0.672 0.036 0.000 0.000 0.196
#> GSM549293     2  0.0937    0.81197 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM549236     5  0.2250    0.72178 0.092 0.000 0.000 0.020 0.888 0.000
#> GSM549238     4  0.3923    0.43701 0.008 0.000 0.000 0.620 0.372 0.000
#> GSM549251     1  0.1897    0.67628 0.908 0.000 0.000 0.004 0.084 0.004
#> GSM549258     1  0.1753    0.67379 0.912 0.004 0.000 0.000 0.000 0.084
#> GSM549264     5  0.1719    0.68506 0.016 0.000 0.000 0.000 0.924 0.060
#> GSM549243     1  0.0547    0.71778 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM549262     5  0.5316    0.13937 0.416 0.000 0.000 0.000 0.480 0.104
#> GSM549278     3  0.4780    0.03346 0.000 0.000 0.480 0.476 0.004 0.040
#> GSM549283     3  0.5080    0.46159 0.000 0.224 0.640 0.000 0.004 0.132
#> GSM549298     3  0.0260    0.77523 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM750741     1  0.3838    0.10154 0.552 0.000 0.000 0.000 0.000 0.448
#> GSM549286     2  0.0937    0.81699 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM549241     1  0.2491    0.64495 0.868 0.020 0.000 0.000 0.000 0.112
#> GSM549247     2  0.0858    0.81802 0.004 0.968 0.000 0.000 0.000 0.028
#> GSM549261     1  0.1480    0.69887 0.940 0.040 0.000 0.000 0.020 0.000
#> GSM549270     2  0.4569    0.61849 0.000 0.700 0.156 0.000 0.000 0.144
#> GSM549277     3  0.4932    0.65074 0.000 0.152 0.668 0.000 0.004 0.176
#> GSM549280     3  0.1682    0.76671 0.000 0.020 0.928 0.000 0.000 0.052
#> GSM549281     6  0.5472    0.36481 0.044 0.108 0.180 0.000 0.004 0.664
#> GSM549285     3  0.2507    0.73913 0.000 0.004 0.884 0.000 0.072 0.040
#> GSM549288     3  0.5254    0.62653 0.000 0.156 0.620 0.000 0.004 0.220
#> GSM549292     2  0.0547    0.82037 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM549295     3  0.5273    0.62871 0.000 0.132 0.620 0.000 0.008 0.240
#> GSM549297     2  0.5807    0.23127 0.000 0.516 0.284 0.000 0.004 0.196
#> GSM750743     6  0.4886    0.06595 0.432 0.000 0.000 0.000 0.060 0.508
#> GSM549268     6  0.5165    0.16380 0.004 0.108 0.256 0.000 0.004 0.628
#> GSM549290     5  0.4087    0.58908 0.000 0.000 0.044 0.168 0.764 0.024
#> GSM549272     2  0.0146    0.82001 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549276     2  0.0405    0.82084 0.000 0.988 0.004 0.000 0.000 0.008
#> GSM549275     2  0.6514    0.47459 0.080 0.588 0.108 0.016 0.004 0.204
#> GSM549284     2  0.1116    0.81587 0.000 0.960 0.004 0.000 0.008 0.028
#> GSM750737     6  0.4328    0.02050 0.020 0.000 0.000 0.460 0.000 0.520
#> GSM750740     1  0.0458    0.71808 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM750747     1  0.0547    0.71778 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM750751     2  0.1471    0.80776 0.000 0.932 0.004 0.000 0.000 0.064
#> GSM750754     3  0.2487    0.76691 0.000 0.000 0.892 0.024 0.020 0.064

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-CV-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-CV-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-CV-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-CV-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-CV-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-CV-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-CV-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-CV-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-CV-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-CV-NMF-membership-heatmap-5

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)

plot of chunk tab-CV-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-CV-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-CV-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-CV-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-CV-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-CV-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk CV-NMF-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-CV-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-CV-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk CV-NMF-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> CV:NMF 102          0.02528    1.70e-05               0.06376  0.00385 2
#> CV:NMF  98          0.00679    3.92e-06               0.00310  0.01181 3
#> CV:NMF  95          0.28211    1.35e-04               0.02217  0.03191 4
#> CV:NMF  87          0.29269    5.17e-04               0.02598  0.01389 5
#> CV:NMF  75          0.41610    1.14e-03               0.00151  0.11868 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.


MAD:hclust

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-hclust-collect-plots

The plots are:

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:

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)

plot of chunk MAD-hclust-select-partition-number

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.652           0.843       0.926         0.4931 0.497   0.497
#> 3 3 0.554           0.701       0.842         0.2314 0.876   0.756
#> 4 4 0.665           0.676       0.832         0.1022 0.951   0.877
#> 5 5 0.685           0.641       0.795         0.0418 0.980   0.945
#> 6 6 0.615           0.571       0.753         0.0468 0.941   0.829

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     2  0.9866      0.222 0.432 0.568
#> GSM549291     2  0.6531      0.802 0.168 0.832
#> GSM549274     2  0.0672      0.928 0.008 0.992
#> GSM750738     2  0.1414      0.925 0.020 0.980
#> GSM750748     1  0.0000      0.909 1.000 0.000
#> GSM549240     1  0.0938      0.905 0.988 0.012
#> GSM549279     1  0.9170      0.536 0.668 0.332
#> GSM549294     2  0.2043      0.922 0.032 0.968
#> GSM549300     2  0.0672      0.928 0.008 0.992
#> GSM549303     2  0.0376      0.927 0.004 0.996
#> GSM549309     2  0.0938      0.928 0.012 0.988
#> GSM750753     2  0.0938      0.928 0.012 0.988
#> GSM750752     2  0.4161      0.889 0.084 0.916
#> GSM549304     2  0.2778      0.913 0.048 0.952
#> GSM549305     2  0.0672      0.928 0.008 0.992
#> GSM549307     2  0.0376      0.927 0.004 0.996
#> GSM549306     2  0.0376      0.927 0.004 0.996
#> GSM549308     2  0.0376      0.927 0.004 0.996
#> GSM549233     1  0.0000      0.909 1.000 0.000
#> GSM549234     1  0.7883      0.720 0.764 0.236
#> GSM549250     1  0.0000      0.909 1.000 0.000
#> GSM549287     2  0.4939      0.871 0.108 0.892
#> GSM750735     1  0.0376      0.908 0.996 0.004
#> GSM750736     1  0.0376      0.908 0.996 0.004
#> GSM750749     1  0.2778      0.885 0.952 0.048
#> GSM549230     1  0.0000      0.909 1.000 0.000
#> GSM549231     1  0.0000      0.909 1.000 0.000
#> GSM549237     1  0.0000      0.909 1.000 0.000
#> GSM549254     2  0.9944      0.127 0.456 0.544
#> GSM750734     1  0.0000      0.909 1.000 0.000
#> GSM549271     2  0.4690      0.876 0.100 0.900
#> GSM549232     1  0.8016      0.708 0.756 0.244
#> GSM549246     1  0.4562      0.854 0.904 0.096
#> GSM549248     1  0.0000      0.909 1.000 0.000
#> GSM549255     1  0.7950      0.714 0.760 0.240
#> GSM750746     1  0.0000      0.909 1.000 0.000
#> GSM549259     1  0.0000      0.909 1.000 0.000
#> GSM549269     2  0.0672      0.928 0.008 0.992
#> GSM549273     2  0.0376      0.927 0.004 0.996
#> GSM549299     2  0.2778      0.913 0.048 0.952
#> GSM549301     2  0.0376      0.927 0.004 0.996
#> GSM549310     2  0.4161      0.889 0.084 0.916
#> GSM549311     2  0.0376      0.927 0.004 0.996
#> GSM549302     2  0.0672      0.928 0.008 0.992
#> GSM549235     1  0.0000      0.909 1.000 0.000
#> GSM549245     1  0.7950      0.714 0.760 0.240
#> GSM549265     1  0.7528      0.745 0.784 0.216
#> GSM549282     2  0.1843      0.924 0.028 0.972
#> GSM549296     2  0.4161      0.889 0.084 0.916
#> GSM750739     1  0.0000      0.909 1.000 0.000
#> GSM750742     1  0.0000      0.909 1.000 0.000
#> GSM750744     1  0.0376      0.908 0.996 0.004
#> GSM750750     2  0.1843      0.924 0.028 0.972
#> GSM549242     1  0.0376      0.908 0.996 0.004
#> GSM549252     1  0.7453      0.748 0.788 0.212
#> GSM549253     1  0.0000      0.909 1.000 0.000
#> GSM549256     1  0.0376      0.908 0.996 0.004
#> GSM549257     1  0.8016      0.708 0.756 0.244
#> GSM549263     1  0.0000      0.909 1.000 0.000
#> GSM549267     2  0.4939      0.870 0.108 0.892
#> GSM750745     1  0.0000      0.909 1.000 0.000
#> GSM549239     1  0.0000      0.909 1.000 0.000
#> GSM549244     1  0.7815      0.725 0.768 0.232
#> GSM549249     1  0.7528      0.744 0.784 0.216
#> GSM549260     1  0.0000      0.909 1.000 0.000
#> GSM549266     1  0.8661      0.615 0.712 0.288
#> GSM549293     2  0.0672      0.928 0.008 0.992
#> GSM549236     1  0.0000      0.909 1.000 0.000
#> GSM549238     1  0.7453      0.748 0.788 0.212
#> GSM549251     1  0.0000      0.909 1.000 0.000
#> GSM549258     1  0.0000      0.909 1.000 0.000
#> GSM549264     1  0.0000      0.909 1.000 0.000
#> GSM549243     1  0.0000      0.909 1.000 0.000
#> GSM549262     1  0.0000      0.909 1.000 0.000
#> GSM549278     2  0.9129      0.510 0.328 0.672
#> GSM549283     2  0.9909      0.188 0.444 0.556
#> GSM549298     2  0.0376      0.927 0.004 0.996
#> GSM750741     1  0.0000      0.909 1.000 0.000
#> GSM549286     2  0.0672      0.928 0.008 0.992
#> GSM549241     1  0.0000      0.909 1.000 0.000
#> GSM549247     1  0.0938      0.905 0.988 0.012
#> GSM549261     1  0.0000      0.909 1.000 0.000
#> GSM549270     2  0.0376      0.927 0.004 0.996
#> GSM549277     2  0.0938      0.928 0.012 0.988
#> GSM549280     2  0.0672      0.928 0.008 0.992
#> GSM549281     1  0.9552      0.432 0.624 0.376
#> GSM549285     2  0.6438      0.805 0.164 0.836
#> GSM549288     2  0.0938      0.928 0.012 0.988
#> GSM549292     2  0.0672      0.928 0.008 0.992
#> GSM549295     2  0.0376      0.927 0.004 0.996
#> GSM549297     2  0.0672      0.928 0.008 0.992
#> GSM750743     1  0.0376      0.908 0.996 0.004
#> GSM549268     1  0.9552      0.432 0.624 0.376
#> GSM549290     2  0.3879      0.897 0.076 0.924
#> GSM549272     2  0.0672      0.928 0.008 0.992
#> GSM549276     2  0.0376      0.927 0.004 0.996
#> GSM549275     1  0.3584      0.872 0.932 0.068
#> GSM549284     2  0.0938      0.927 0.012 0.988
#> GSM750737     1  0.9954      0.166 0.540 0.460
#> GSM750740     1  0.0000      0.909 1.000 0.000
#> GSM750747     1  0.0000      0.909 1.000 0.000
#> GSM750751     2  0.1184      0.928 0.016 0.984
#> GSM750754     2  0.6343      0.813 0.160 0.840

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.9014     0.1863 0.380 0.136 0.484
#> GSM549291     3  0.6529     0.5705 0.116 0.124 0.760
#> GSM549274     2  0.0592     0.8255 0.000 0.988 0.012
#> GSM750738     2  0.1015     0.8129 0.012 0.980 0.008
#> GSM750748     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549240     1  0.1315     0.8777 0.972 0.020 0.008
#> GSM549279     1  0.8047     0.4950 0.632 0.256 0.112
#> GSM549294     2  0.3445     0.8064 0.016 0.896 0.088
#> GSM549300     2  0.6008     0.5320 0.004 0.664 0.332
#> GSM549303     3  0.4062     0.6002 0.000 0.164 0.836
#> GSM549309     3  0.3816     0.6043 0.000 0.148 0.852
#> GSM750753     2  0.5365     0.6652 0.004 0.744 0.252
#> GSM750752     3  0.6929     0.5382 0.052 0.260 0.688
#> GSM549304     2  0.4335     0.7884 0.036 0.864 0.100
#> GSM549305     2  0.1643     0.8268 0.000 0.956 0.044
#> GSM549307     3  0.5905     0.3850 0.000 0.352 0.648
#> GSM549306     3  0.5254     0.5181 0.000 0.264 0.736
#> GSM549308     3  0.4931     0.5535 0.000 0.232 0.768
#> GSM549233     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549234     1  0.7202     0.6721 0.716 0.124 0.160
#> GSM549250     1  0.0237     0.8849 0.996 0.000 0.004
#> GSM549287     3  0.6174     0.6197 0.064 0.168 0.768
#> GSM750735     1  0.0829     0.8834 0.984 0.012 0.004
#> GSM750736     1  0.0829     0.8834 0.984 0.012 0.004
#> GSM750749     1  0.2550     0.8601 0.936 0.024 0.040
#> GSM549230     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549231     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549237     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549254     3  0.9464     0.0802 0.408 0.180 0.412
#> GSM750734     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549271     3  0.6348     0.6029 0.060 0.188 0.752
#> GSM549232     1  0.7309     0.6625 0.708 0.124 0.168
#> GSM549246     1  0.3618     0.8233 0.884 0.012 0.104
#> GSM549248     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549255     1  0.7256     0.6675 0.712 0.124 0.164
#> GSM750746     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549259     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549269     2  0.0000     0.8201 0.000 1.000 0.000
#> GSM549273     3  0.4062     0.6002 0.000 0.164 0.836
#> GSM549299     2  0.4335     0.7884 0.036 0.864 0.100
#> GSM549301     3  0.5327     0.5134 0.000 0.272 0.728
#> GSM549310     3  0.7032     0.5255 0.052 0.272 0.676
#> GSM549311     3  0.4062     0.6002 0.000 0.164 0.836
#> GSM549302     2  0.0592     0.8255 0.000 0.988 0.012
#> GSM549235     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549245     1  0.7256     0.6675 0.712 0.124 0.164
#> GSM549265     1  0.6902     0.6964 0.736 0.116 0.148
#> GSM549282     3  0.5903     0.5998 0.024 0.232 0.744
#> GSM549296     3  0.7032     0.5255 0.052 0.272 0.676
#> GSM750739     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM750742     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM750744     1  0.0424     0.8853 0.992 0.008 0.000
#> GSM750750     3  0.5903     0.5998 0.024 0.232 0.744
#> GSM549242     1  0.0424     0.8856 0.992 0.008 0.000
#> GSM549252     1  0.6843     0.6993 0.740 0.116 0.144
#> GSM549253     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549256     1  0.0848     0.8835 0.984 0.008 0.008
#> GSM549257     1  0.7309     0.6625 0.708 0.124 0.168
#> GSM549263     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549267     3  0.6174     0.6196 0.064 0.168 0.768
#> GSM750745     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549239     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549244     1  0.7147     0.6779 0.720 0.124 0.156
#> GSM549249     1  0.6915     0.6946 0.736 0.124 0.140
#> GSM549260     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549266     1  0.7380     0.5728 0.684 0.228 0.088
#> GSM549293     2  0.0592     0.8255 0.000 0.988 0.012
#> GSM549236     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549238     1  0.6854     0.6983 0.740 0.124 0.136
#> GSM549251     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549258     1  0.0475     0.8851 0.992 0.004 0.004
#> GSM549264     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549243     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549262     1  0.0000     0.8857 1.000 0.000 0.000
#> GSM549278     3  0.8571     0.3987 0.272 0.140 0.588
#> GSM549283     1  0.9785    -0.1438 0.420 0.336 0.244
#> GSM549298     3  0.4974     0.5502 0.000 0.236 0.764
#> GSM750741     1  0.0661     0.8847 0.988 0.008 0.004
#> GSM549286     2  0.0000     0.8201 0.000 1.000 0.000
#> GSM549241     1  0.0848     0.8835 0.984 0.008 0.008
#> GSM549247     1  0.1315     0.8777 0.972 0.020 0.008
#> GSM549261     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM549270     2  0.2165     0.8225 0.000 0.936 0.064
#> GSM549277     2  0.6659     0.1109 0.008 0.532 0.460
#> GSM549280     2  0.5754     0.5920 0.004 0.700 0.296
#> GSM549281     1  0.8609     0.4122 0.596 0.244 0.160
#> GSM549285     3  0.9109     0.2654 0.148 0.364 0.488
#> GSM549288     2  0.6275     0.4740 0.008 0.644 0.348
#> GSM549292     2  0.0000     0.8201 0.000 1.000 0.000
#> GSM549295     3  0.6274     0.0988 0.000 0.456 0.544
#> GSM549297     2  0.5929     0.5504 0.004 0.676 0.320
#> GSM750743     1  0.0424     0.8853 0.992 0.008 0.000
#> GSM549268     1  0.8609     0.4122 0.596 0.244 0.160
#> GSM549290     3  0.6034     0.6158 0.036 0.212 0.752
#> GSM549272     2  0.0000     0.8201 0.000 1.000 0.000
#> GSM549276     2  0.2165     0.8225 0.000 0.936 0.064
#> GSM549275     1  0.3461     0.8315 0.900 0.076 0.024
#> GSM549284     2  0.4047     0.7316 0.004 0.848 0.148
#> GSM750737     1  0.9174     0.1697 0.504 0.164 0.332
#> GSM750740     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM750747     1  0.0237     0.8860 0.996 0.004 0.000
#> GSM750751     2  0.1832     0.8262 0.008 0.956 0.036
#> GSM750754     3  0.6455     0.5777 0.108 0.128 0.764

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.5779     0.4997 0.292 0.008 0.040 0.660
#> GSM549291     4  0.3991     0.6088 0.020 0.000 0.172 0.808
#> GSM549274     2  0.0592     0.8198 0.000 0.984 0.016 0.000
#> GSM750738     2  0.1404     0.7983 0.012 0.964 0.012 0.012
#> GSM750748     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM549240     1  0.1488     0.8439 0.956 0.012 0.000 0.032
#> GSM549279     1  0.8040     0.4080 0.588 0.176 0.088 0.148
#> GSM549294     2  0.3889     0.7970 0.004 0.844 0.112 0.040
#> GSM549300     2  0.5452     0.3838 0.000 0.556 0.428 0.016
#> GSM549303     3  0.3626     0.6430 0.000 0.004 0.812 0.184
#> GSM549309     3  0.3907     0.6079 0.000 0.000 0.768 0.232
#> GSM750753     2  0.5193     0.5863 0.000 0.656 0.324 0.020
#> GSM750752     4  0.5080     0.5843 0.000 0.092 0.144 0.764
#> GSM549304     2  0.4536     0.7715 0.032 0.812 0.136 0.020
#> GSM549305     2  0.1940     0.8191 0.000 0.924 0.076 0.000
#> GSM549307     3  0.3908     0.6102 0.000 0.212 0.784 0.004
#> GSM549306     3  0.2799     0.7225 0.000 0.108 0.884 0.008
#> GSM549308     3  0.2255     0.7271 0.000 0.068 0.920 0.012
#> GSM549233     1  0.0817     0.8512 0.976 0.000 0.000 0.024
#> GSM549234     1  0.4905     0.4729 0.632 0.004 0.000 0.364
#> GSM549250     1  0.0817     0.8510 0.976 0.000 0.000 0.024
#> GSM549287     4  0.4522     0.4846 0.000 0.000 0.320 0.680
#> GSM750735     1  0.1109     0.8491 0.968 0.004 0.000 0.028
#> GSM750736     1  0.1109     0.8491 0.968 0.004 0.000 0.028
#> GSM750749     1  0.2587     0.8161 0.908 0.004 0.012 0.076
#> GSM549230     1  0.0336     0.8555 0.992 0.000 0.000 0.008
#> GSM549231     1  0.0336     0.8555 0.992 0.000 0.000 0.008
#> GSM549237     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM549254     4  0.5910     0.4389 0.316 0.040 0.008 0.636
#> GSM750734     1  0.0336     0.8550 0.992 0.000 0.000 0.008
#> GSM549271     4  0.4535     0.5597 0.000 0.016 0.240 0.744
#> GSM549232     1  0.4950     0.4500 0.620 0.004 0.000 0.376
#> GSM549246     1  0.3306     0.7544 0.840 0.004 0.000 0.156
#> GSM549248     1  0.0336     0.8555 0.992 0.000 0.000 0.008
#> GSM549255     1  0.4936     0.4574 0.624 0.004 0.000 0.372
#> GSM750746     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM549259     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM549269     2  0.0000     0.8157 0.000 1.000 0.000 0.000
#> GSM549273     3  0.3626     0.6430 0.000 0.004 0.812 0.184
#> GSM549299     2  0.4536     0.7715 0.032 0.812 0.136 0.020
#> GSM549301     3  0.3143     0.7210 0.000 0.100 0.876 0.024
#> GSM549310     4  0.5151     0.5810 0.000 0.100 0.140 0.760
#> GSM549311     3  0.3626     0.6430 0.000 0.004 0.812 0.184
#> GSM549302     2  0.0469     0.8191 0.000 0.988 0.012 0.000
#> GSM549235     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM549245     1  0.4936     0.4574 0.624 0.004 0.000 0.372
#> GSM549265     1  0.4781     0.5214 0.660 0.004 0.000 0.336
#> GSM549282     3  0.4319     0.6006 0.000 0.012 0.760 0.228
#> GSM549296     4  0.5151     0.5810 0.000 0.100 0.140 0.760
#> GSM750739     1  0.0000     0.8557 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0336     0.8555 0.992 0.000 0.000 0.008
#> GSM750744     1  0.0469     0.8548 0.988 0.000 0.000 0.012
#> GSM750750     3  0.4319     0.6006 0.000 0.012 0.760 0.228
#> GSM549242     1  0.0592     0.8558 0.984 0.000 0.000 0.016
#> GSM549252     1  0.4800     0.5148 0.656 0.004 0.000 0.340
#> GSM549253     1  0.0469     0.8549 0.988 0.000 0.000 0.012
#> GSM549256     1  0.0817     0.8534 0.976 0.000 0.000 0.024
#> GSM549257     1  0.4950     0.4500 0.620 0.004 0.000 0.376
#> GSM549263     1  0.0336     0.8555 0.992 0.000 0.000 0.008
#> GSM549267     4  0.4543     0.4813 0.000 0.000 0.324 0.676
#> GSM750745     1  0.0469     0.8543 0.988 0.000 0.000 0.012
#> GSM549239     1  0.0592     0.8535 0.984 0.000 0.000 0.016
#> GSM549244     1  0.4905     0.4744 0.632 0.004 0.000 0.364
#> GSM549249     1  0.4819     0.5081 0.652 0.004 0.000 0.344
#> GSM549260     1  0.0707     0.8523 0.980 0.000 0.000 0.020
#> GSM549266     1  0.7357     0.4986 0.644 0.160 0.064 0.132
#> GSM549293     2  0.0469     0.8191 0.000 0.988 0.012 0.000
#> GSM549236     1  0.0469     0.8549 0.988 0.000 0.000 0.012
#> GSM549238     1  0.4800     0.5137 0.656 0.004 0.000 0.340
#> GSM549251     1  0.0469     0.8549 0.988 0.000 0.000 0.012
#> GSM549258     1  0.0817     0.8508 0.976 0.000 0.000 0.024
#> GSM549264     1  0.0336     0.8555 0.992 0.000 0.000 0.008
#> GSM549243     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM549262     1  0.0336     0.8555 0.992 0.000 0.000 0.008
#> GSM549278     4  0.5424     0.5692 0.176 0.012 0.064 0.748
#> GSM549283     1  0.9700    -0.1081 0.372 0.192 0.248 0.188
#> GSM549298     3  0.2402     0.7279 0.000 0.076 0.912 0.012
#> GSM750741     1  0.0895     0.8517 0.976 0.004 0.000 0.020
#> GSM549286     2  0.0000     0.8157 0.000 1.000 0.000 0.000
#> GSM549241     1  0.1109     0.8489 0.968 0.004 0.000 0.028
#> GSM549247     1  0.1488     0.8439 0.956 0.012 0.000 0.032
#> GSM549261     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM549270     2  0.2469     0.8126 0.000 0.892 0.108 0.000
#> GSM549277     3  0.6698     0.1539 0.000 0.372 0.532 0.096
#> GSM549280     2  0.5781     0.4595 0.000 0.584 0.380 0.036
#> GSM549281     1  0.8535     0.3286 0.548 0.156 0.132 0.164
#> GSM549285     3  0.8539     0.4250 0.096 0.164 0.532 0.208
#> GSM549288     2  0.5957     0.3430 0.000 0.540 0.420 0.040
#> GSM549292     2  0.0000     0.8157 0.000 1.000 0.000 0.000
#> GSM549295     3  0.4699     0.4129 0.000 0.320 0.676 0.004
#> GSM549297     2  0.5723     0.4519 0.000 0.580 0.388 0.032
#> GSM750743     1  0.0469     0.8548 0.988 0.000 0.000 0.012
#> GSM549268     1  0.8535     0.3286 0.548 0.156 0.132 0.164
#> GSM549290     4  0.5511     0.0308 0.000 0.016 0.484 0.500
#> GSM549272     2  0.0000     0.8157 0.000 1.000 0.000 0.000
#> GSM549276     2  0.2469     0.8126 0.000 0.892 0.108 0.000
#> GSM549275     1  0.3670     0.7713 0.860 0.044 0.004 0.092
#> GSM549284     2  0.4406     0.6919 0.004 0.788 0.184 0.024
#> GSM750737     4  0.6165     0.1076 0.448 0.040 0.004 0.508
#> GSM750740     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM750747     1  0.0188     0.8560 0.996 0.000 0.000 0.004
#> GSM750751     2  0.2101     0.8212 0.000 0.928 0.060 0.012
#> GSM750754     4  0.3937     0.6015 0.012 0.000 0.188 0.800

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.4016    0.49075 0.272 0.000 0.000 0.716 0.012
#> GSM549291     4  0.3080    0.60255 0.008 0.000 0.060 0.872 0.060
#> GSM549274     2  0.0880    0.77852 0.000 0.968 0.032 0.000 0.000
#> GSM750738     2  0.1685    0.74331 0.004 0.948 0.016 0.016 0.016
#> GSM750748     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM549240     1  0.2199    0.82710 0.916 0.000 0.060 0.016 0.008
#> GSM549279     1  0.7152    0.30948 0.508 0.068 0.344 0.036 0.044
#> GSM549294     2  0.4028    0.72726 0.004 0.764 0.212 0.008 0.012
#> GSM549300     2  0.5988    0.29707 0.000 0.480 0.420 0.004 0.096
#> GSM549303     5  0.1908    0.95742 0.000 0.000 0.000 0.092 0.908
#> GSM549309     5  0.3132    0.88348 0.000 0.000 0.008 0.172 0.820
#> GSM750753     2  0.5058    0.51067 0.000 0.584 0.380 0.004 0.032
#> GSM750752     4  0.3901    0.57974 0.000 0.060 0.032 0.832 0.076
#> GSM549304     2  0.4400    0.70644 0.024 0.740 0.224 0.004 0.008
#> GSM549305     2  0.2127    0.77674 0.000 0.892 0.108 0.000 0.000
#> GSM549307     3  0.6545    0.45486 0.000 0.168 0.492 0.008 0.332
#> GSM549306     3  0.6218    0.43903 0.000 0.072 0.508 0.028 0.392
#> GSM549308     3  0.5805    0.41039 0.000 0.036 0.524 0.032 0.408
#> GSM549233     1  0.1168    0.84124 0.960 0.000 0.008 0.032 0.000
#> GSM549234     1  0.4161    0.43187 0.608 0.000 0.000 0.392 0.000
#> GSM549250     1  0.0794    0.84036 0.972 0.000 0.000 0.028 0.000
#> GSM549287     4  0.4810    0.47768 0.000 0.000 0.084 0.712 0.204
#> GSM750735     1  0.2053    0.83030 0.928 0.000 0.040 0.016 0.016
#> GSM750736     1  0.2053    0.83030 0.928 0.000 0.040 0.016 0.016
#> GSM750749     1  0.3456    0.78353 0.852 0.000 0.092 0.028 0.028
#> GSM549230     1  0.0404    0.84440 0.988 0.000 0.000 0.012 0.000
#> GSM549231     1  0.0404    0.84440 0.988 0.000 0.000 0.012 0.000
#> GSM549237     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM549254     4  0.5267    0.47839 0.276 0.008 0.040 0.664 0.012
#> GSM750734     1  0.0898    0.84319 0.972 0.000 0.020 0.000 0.008
#> GSM549271     4  0.4158    0.55241 0.000 0.000 0.092 0.784 0.124
#> GSM549232     1  0.4192    0.41061 0.596 0.000 0.000 0.404 0.000
#> GSM549246     1  0.3365    0.73271 0.808 0.000 0.004 0.180 0.008
#> GSM549248     1  0.0290    0.84496 0.992 0.000 0.000 0.008 0.000
#> GSM549255     1  0.4182    0.41852 0.600 0.000 0.000 0.400 0.000
#> GSM750746     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM549259     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM549269     2  0.0324    0.76820 0.000 0.992 0.004 0.004 0.000
#> GSM549273     5  0.2068    0.95885 0.000 0.000 0.004 0.092 0.904
#> GSM549299     2  0.4400    0.70644 0.024 0.740 0.224 0.004 0.008
#> GSM549301     3  0.5638    0.44186 0.000 0.040 0.568 0.024 0.368
#> GSM549310     4  0.3920    0.57933 0.000 0.060 0.036 0.832 0.072
#> GSM549311     5  0.2068    0.95885 0.000 0.000 0.004 0.092 0.904
#> GSM549302     2  0.0703    0.77739 0.000 0.976 0.024 0.000 0.000
#> GSM549235     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM549245     1  0.4182    0.41852 0.600 0.000 0.000 0.400 0.000
#> GSM549265     1  0.4060    0.48991 0.640 0.000 0.000 0.360 0.000
#> GSM549282     3  0.5876   -0.00642 0.000 0.000 0.512 0.104 0.384
#> GSM549296     4  0.3920    0.57933 0.000 0.060 0.036 0.832 0.072
#> GSM750739     1  0.0000    0.84527 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0404    0.84440 0.988 0.000 0.000 0.012 0.000
#> GSM750744     1  0.1267    0.84032 0.960 0.000 0.024 0.004 0.012
#> GSM750750     3  0.5876   -0.00642 0.000 0.000 0.512 0.104 0.384
#> GSM549242     1  0.1173    0.84494 0.964 0.000 0.012 0.020 0.004
#> GSM549252     1  0.4074    0.48223 0.636 0.000 0.000 0.364 0.000
#> GSM549253     1  0.0510    0.84383 0.984 0.000 0.000 0.016 0.000
#> GSM549256     1  0.1356    0.84298 0.956 0.000 0.012 0.028 0.004
#> GSM549257     1  0.4192    0.41061 0.596 0.000 0.000 0.404 0.000
#> GSM549263     1  0.0404    0.84440 0.988 0.000 0.000 0.012 0.000
#> GSM549267     4  0.5037    0.47191 0.000 0.000 0.088 0.684 0.228
#> GSM750745     1  0.1012    0.84287 0.968 0.000 0.020 0.000 0.012
#> GSM549239     1  0.1483    0.84068 0.952 0.000 0.028 0.008 0.012
#> GSM549244     1  0.4150    0.44233 0.612 0.000 0.000 0.388 0.000
#> GSM549249     1  0.4088    0.47514 0.632 0.000 0.000 0.368 0.000
#> GSM549260     1  0.1673    0.83771 0.944 0.000 0.032 0.016 0.008
#> GSM549266     1  0.6523    0.43840 0.572 0.044 0.316 0.028 0.040
#> GSM549293     2  0.0703    0.77739 0.000 0.976 0.024 0.000 0.000
#> GSM549236     1  0.0510    0.84383 0.984 0.000 0.000 0.016 0.000
#> GSM549238     1  0.4060    0.48450 0.640 0.000 0.000 0.360 0.000
#> GSM549251     1  0.0510    0.84383 0.984 0.000 0.000 0.016 0.000
#> GSM549258     1  0.1836    0.83522 0.936 0.000 0.040 0.016 0.008
#> GSM549264     1  0.0727    0.84570 0.980 0.000 0.004 0.012 0.004
#> GSM549243     1  0.0324    0.84568 0.992 0.000 0.004 0.000 0.004
#> GSM549262     1  0.0290    0.84496 0.992 0.000 0.000 0.008 0.000
#> GSM549278     4  0.4156    0.56407 0.168 0.000 0.028 0.784 0.020
#> GSM549283     3  0.7432    0.13945 0.316 0.064 0.512 0.044 0.064
#> GSM549298     3  0.5926    0.42131 0.000 0.044 0.520 0.032 0.404
#> GSM750741     1  0.1808    0.83357 0.936 0.000 0.044 0.012 0.008
#> GSM549286     2  0.0324    0.76820 0.000 0.992 0.004 0.004 0.000
#> GSM549241     1  0.2100    0.83076 0.924 0.000 0.048 0.016 0.012
#> GSM549247     1  0.2199    0.82710 0.916 0.000 0.060 0.016 0.008
#> GSM549261     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM549270     2  0.2536    0.77191 0.000 0.868 0.128 0.000 0.004
#> GSM549277     3  0.5587    0.26156 0.000 0.256 0.644 0.012 0.088
#> GSM549280     2  0.5867    0.37159 0.000 0.508 0.408 0.008 0.076
#> GSM549281     1  0.7215    0.23688 0.484 0.064 0.368 0.040 0.044
#> GSM549285     3  0.4879    0.33891 0.080 0.024 0.788 0.032 0.076
#> GSM549288     2  0.6359    0.23332 0.000 0.456 0.424 0.016 0.104
#> GSM549292     2  0.0324    0.76820 0.000 0.992 0.004 0.004 0.000
#> GSM549295     3  0.7406    0.34098 0.000 0.288 0.356 0.028 0.328
#> GSM549297     2  0.5942    0.36582 0.000 0.512 0.396 0.008 0.084
#> GSM750743     1  0.1267    0.84032 0.960 0.000 0.024 0.004 0.012
#> GSM549268     1  0.7215    0.23688 0.484 0.064 0.368 0.040 0.044
#> GSM549290     4  0.6579   -0.04728 0.000 0.000 0.220 0.448 0.332
#> GSM549272     2  0.0324    0.76820 0.000 0.992 0.004 0.004 0.000
#> GSM549276     2  0.2583    0.77061 0.000 0.864 0.132 0.000 0.004
#> GSM549275     1  0.4666    0.71838 0.780 0.016 0.140 0.020 0.044
#> GSM549284     2  0.4919    0.65545 0.004 0.768 0.112 0.036 0.080
#> GSM750737     4  0.5910    0.19808 0.408 0.008 0.052 0.520 0.012
#> GSM750740     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM750747     1  0.0451    0.84583 0.988 0.000 0.008 0.000 0.004
#> GSM750751     2  0.2249    0.77969 0.000 0.896 0.096 0.008 0.000
#> GSM750754     4  0.3268    0.59537 0.004 0.000 0.060 0.856 0.080

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.4472    0.48611 0.228 0.000 0.000 0.708 0.036 0.028
#> GSM549291     4  0.3082    0.63996 0.008 0.000 0.020 0.828 0.000 0.144
#> GSM549274     2  0.1196    0.76000 0.000 0.952 0.040 0.000 0.008 0.000
#> GSM750738     2  0.2316    0.70534 0.000 0.912 0.012 0.032 0.024 0.020
#> GSM750748     1  0.0935    0.73717 0.964 0.000 0.000 0.000 0.032 0.004
#> GSM549240     1  0.3546    0.59776 0.788 0.000 0.004 0.020 0.180 0.008
#> GSM549279     5  0.6343    0.77314 0.348 0.048 0.080 0.008 0.508 0.008
#> GSM549294     2  0.4692    0.66155 0.000 0.716 0.152 0.008 0.120 0.004
#> GSM549300     3  0.5491   -0.02930 0.000 0.420 0.484 0.000 0.080 0.016
#> GSM549303     6  0.6775    0.57599 0.000 0.000 0.260 0.040 0.348 0.352
#> GSM549309     6  0.7349    0.55993 0.000 0.000 0.216 0.120 0.316 0.348
#> GSM750753     2  0.5464    0.27692 0.000 0.524 0.372 0.000 0.092 0.012
#> GSM750752     4  0.3285    0.62110 0.000 0.024 0.052 0.860 0.020 0.044
#> GSM549304     2  0.5024    0.61668 0.000 0.672 0.180 0.000 0.136 0.012
#> GSM549305     2  0.2913    0.74188 0.000 0.848 0.116 0.000 0.032 0.004
#> GSM549307     3  0.2219    0.59693 0.000 0.136 0.864 0.000 0.000 0.000
#> GSM549306     3  0.1950    0.56358 0.000 0.044 0.924 0.020 0.004 0.008
#> GSM549308     3  0.2034    0.52167 0.000 0.012 0.924 0.024 0.008 0.032
#> GSM549233     1  0.1515    0.73645 0.944 0.000 0.000 0.028 0.020 0.008
#> GSM549234     1  0.4718    0.32311 0.572 0.000 0.000 0.384 0.036 0.008
#> GSM549250     1  0.1167    0.73304 0.960 0.000 0.000 0.020 0.008 0.012
#> GSM549287     4  0.4514    0.50830 0.000 0.000 0.044 0.660 0.008 0.288
#> GSM750735     1  0.2814    0.62365 0.820 0.000 0.000 0.008 0.172 0.000
#> GSM750736     1  0.2848    0.61866 0.816 0.000 0.000 0.008 0.176 0.000
#> GSM750749     1  0.3848    0.35814 0.692 0.000 0.000 0.012 0.292 0.004
#> GSM549230     1  0.0767    0.73899 0.976 0.000 0.000 0.004 0.008 0.012
#> GSM549231     1  0.0767    0.73899 0.976 0.000 0.000 0.004 0.008 0.012
#> GSM549237     1  0.1152    0.73699 0.952 0.000 0.000 0.000 0.044 0.004
#> GSM549254     4  0.4843    0.47851 0.192 0.000 0.004 0.692 0.104 0.008
#> GSM750734     1  0.1814    0.69943 0.900 0.000 0.000 0.000 0.100 0.000
#> GSM549271     4  0.4140    0.59040 0.000 0.000 0.056 0.756 0.016 0.172
#> GSM549232     1  0.4751    0.30185 0.556 0.000 0.000 0.400 0.036 0.008
#> GSM549246     1  0.3987    0.56377 0.760 0.000 0.000 0.176 0.056 0.008
#> GSM549248     1  0.0622    0.73977 0.980 0.000 0.000 0.000 0.008 0.012
#> GSM549255     1  0.4743    0.30812 0.560 0.000 0.000 0.396 0.036 0.008
#> GSM750746     1  0.0935    0.73717 0.964 0.000 0.000 0.000 0.032 0.004
#> GSM549259     1  0.0935    0.73717 0.964 0.000 0.000 0.000 0.032 0.004
#> GSM549269     2  0.0508    0.74790 0.000 0.984 0.000 0.000 0.004 0.012
#> GSM549273     6  0.6775    0.57583 0.000 0.000 0.260 0.040 0.348 0.352
#> GSM549299     2  0.5024    0.61668 0.000 0.672 0.180 0.000 0.136 0.012
#> GSM549301     3  0.2669    0.53268 0.000 0.016 0.892 0.012 0.044 0.036
#> GSM549310     4  0.3136    0.62091 0.000 0.020 0.052 0.868 0.020 0.040
#> GSM549311     6  0.6775    0.57583 0.000 0.000 0.260 0.040 0.348 0.352
#> GSM549302     2  0.0972    0.75930 0.000 0.964 0.028 0.000 0.008 0.000
#> GSM549235     1  0.1010    0.73605 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM549245     1  0.4743    0.30812 0.560 0.000 0.000 0.396 0.036 0.008
#> GSM549265     1  0.4582    0.36526 0.612 0.000 0.000 0.348 0.028 0.012
#> GSM549282     6  0.4125    0.32598 0.000 0.000 0.244 0.024 0.016 0.716
#> GSM549296     4  0.3136    0.62091 0.000 0.020 0.052 0.868 0.020 0.040
#> GSM750739     1  0.0458    0.74170 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM750742     1  0.0767    0.73899 0.976 0.000 0.000 0.004 0.008 0.012
#> GSM750744     1  0.2048    0.68325 0.880 0.000 0.000 0.000 0.120 0.000
#> GSM750750     6  0.4125    0.32598 0.000 0.000 0.244 0.024 0.016 0.716
#> GSM549242     1  0.1873    0.73168 0.924 0.000 0.000 0.020 0.048 0.008
#> GSM549252     1  0.4527    0.36187 0.604 0.000 0.000 0.360 0.028 0.008
#> GSM549253     1  0.0881    0.73796 0.972 0.000 0.000 0.008 0.008 0.012
#> GSM549256     1  0.2036    0.73015 0.916 0.000 0.000 0.028 0.048 0.008
#> GSM549257     1  0.4751    0.30185 0.556 0.000 0.000 0.400 0.036 0.008
#> GSM549263     1  0.0767    0.73899 0.976 0.000 0.000 0.004 0.008 0.012
#> GSM549267     4  0.4302    0.48399 0.000 0.000 0.028 0.644 0.004 0.324
#> GSM750745     1  0.1863    0.69744 0.896 0.000 0.000 0.000 0.104 0.000
#> GSM549239     1  0.2234    0.68301 0.872 0.000 0.000 0.004 0.124 0.000
#> GSM549244     1  0.4598    0.32770 0.576 0.000 0.000 0.388 0.028 0.008
#> GSM549249     1  0.4538    0.35556 0.600 0.000 0.000 0.364 0.028 0.008
#> GSM549260     1  0.3144    0.65626 0.832 0.000 0.004 0.020 0.136 0.008
#> GSM549266     5  0.5997    0.63178 0.436 0.032 0.068 0.004 0.452 0.008
#> GSM549293     2  0.0972    0.75930 0.000 0.964 0.028 0.000 0.008 0.000
#> GSM549236     1  0.0881    0.73796 0.972 0.000 0.000 0.008 0.008 0.012
#> GSM549238     1  0.4515    0.36323 0.608 0.000 0.000 0.356 0.028 0.008
#> GSM549251     1  0.0881    0.73796 0.972 0.000 0.000 0.008 0.008 0.012
#> GSM549258     1  0.3337    0.63303 0.812 0.000 0.004 0.020 0.156 0.008
#> GSM549264     1  0.0964    0.74068 0.968 0.000 0.000 0.004 0.016 0.012
#> GSM549243     1  0.0363    0.74091 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549262     1  0.0622    0.73977 0.980 0.000 0.000 0.000 0.008 0.012
#> GSM549278     4  0.4106    0.60479 0.116 0.000 0.004 0.788 0.064 0.028
#> GSM549283     5  0.7558    0.45108 0.192 0.032 0.232 0.004 0.456 0.084
#> GSM549298     3  0.1976    0.53722 0.000 0.020 0.928 0.024 0.008 0.020
#> GSM750741     1  0.3159    0.63158 0.812 0.000 0.004 0.012 0.168 0.004
#> GSM549286     2  0.0405    0.74921 0.000 0.988 0.000 0.000 0.004 0.008
#> GSM549241     1  0.3513    0.60649 0.792 0.000 0.004 0.020 0.176 0.008
#> GSM549247     1  0.3546    0.59776 0.788 0.000 0.004 0.020 0.180 0.008
#> GSM549261     1  0.1010    0.73605 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM549270     2  0.3264    0.73074 0.000 0.820 0.136 0.000 0.040 0.004
#> GSM549277     3  0.6590    0.44913 0.000 0.196 0.540 0.000 0.160 0.104
#> GSM549280     2  0.5787    0.00144 0.000 0.444 0.436 0.000 0.096 0.024
#> GSM549281     5  0.6764    0.80736 0.316 0.036 0.108 0.012 0.504 0.024
#> GSM549285     3  0.7038    0.11778 0.040 0.008 0.404 0.004 0.300 0.244
#> GSM549288     3  0.6059    0.05629 0.000 0.396 0.468 0.008 0.104 0.024
#> GSM549292     2  0.0508    0.74790 0.000 0.984 0.000 0.000 0.004 0.012
#> GSM549295     3  0.4416    0.52407 0.000 0.232 0.712 0.020 0.032 0.004
#> GSM549297     2  0.5843    0.03863 0.000 0.460 0.420 0.004 0.096 0.020
#> GSM750743     1  0.2048    0.68325 0.880 0.000 0.000 0.000 0.120 0.000
#> GSM549268     5  0.6764    0.80736 0.316 0.036 0.108 0.012 0.504 0.024
#> GSM549290     6  0.4900    0.00537 0.000 0.000 0.044 0.372 0.012 0.572
#> GSM549272     2  0.0508    0.74790 0.000 0.984 0.000 0.000 0.004 0.012
#> GSM549276     2  0.3304    0.72854 0.000 0.816 0.140 0.000 0.040 0.004
#> GSM549275     1  0.4212   -0.02891 0.592 0.000 0.008 0.008 0.392 0.000
#> GSM549284     2  0.4474    0.60437 0.000 0.756 0.080 0.008 0.020 0.136
#> GSM750737     4  0.5569    0.13392 0.332 0.000 0.000 0.536 0.124 0.008
#> GSM750740     1  0.1010    0.73605 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM750747     1  0.1010    0.73605 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM750751     2  0.2914    0.74819 0.000 0.860 0.092 0.004 0.040 0.004
#> GSM750754     4  0.3384    0.63322 0.004 0.000 0.028 0.808 0.004 0.156

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-hclust-membership-heatmap-5

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)

plot of chunk tab-MAD-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-hclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-MAD-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-hclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> MAD:hclust 97           0.0270    8.31e-06               0.23588   0.0121 2
#> MAD:hclust 90           0.0226    3.66e-06               0.00238   0.0756 3
#> MAD:hclust 79           0.0859    1.30e-04               0.01537   0.0202 4
#> MAD:hclust 68           0.1674    4.22e-04               0.00715   0.0280 5
#> MAD:hclust 76           0.3255    1.55e-04               0.00814   0.0688 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.


MAD:kmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-kmeans-collect-plots

The plots are:

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:

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)

plot of chunk MAD-kmeans-select-partition-number

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.999         0.5041 0.496   0.496
#> 3 3 0.766           0.476       0.688         0.2745 0.915   0.831
#> 4 4 0.691           0.732       0.810         0.1455 0.779   0.516
#> 5 5 0.798           0.828       0.882         0.0677 0.905   0.669
#> 6 6 0.752           0.603       0.749         0.0445 0.935   0.713

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      1.000 1.000 0.000
#> GSM549291     2  0.0672      0.992 0.008 0.992
#> GSM549274     2  0.0000      0.998 0.000 1.000
#> GSM750738     2  0.0000      0.998 0.000 1.000
#> GSM750748     1  0.0000      1.000 1.000 0.000
#> GSM549240     1  0.0000      1.000 1.000 0.000
#> GSM549279     2  0.1414      0.981 0.020 0.980
#> GSM549294     2  0.0000      0.998 0.000 1.000
#> GSM549300     2  0.0000      0.998 0.000 1.000
#> GSM549303     2  0.0000      0.998 0.000 1.000
#> GSM549309     2  0.0000      0.998 0.000 1.000
#> GSM750753     2  0.0000      0.998 0.000 1.000
#> GSM750752     2  0.0000      0.998 0.000 1.000
#> GSM549304     2  0.0000      0.998 0.000 1.000
#> GSM549305     2  0.0000      0.998 0.000 1.000
#> GSM549307     2  0.0000      0.998 0.000 1.000
#> GSM549306     2  0.0000      0.998 0.000 1.000
#> GSM549308     2  0.0000      0.998 0.000 1.000
#> GSM549233     1  0.0000      1.000 1.000 0.000
#> GSM549234     1  0.0000      1.000 1.000 0.000
#> GSM549250     1  0.0000      1.000 1.000 0.000
#> GSM549287     2  0.0000      0.998 0.000 1.000
#> GSM750735     1  0.0000      1.000 1.000 0.000
#> GSM750736     1  0.0000      1.000 1.000 0.000
#> GSM750749     1  0.0000      1.000 1.000 0.000
#> GSM549230     1  0.0000      1.000 1.000 0.000
#> GSM549231     1  0.0000      1.000 1.000 0.000
#> GSM549237     1  0.0000      1.000 1.000 0.000
#> GSM549254     1  0.0376      0.996 0.996 0.004
#> GSM750734     1  0.0000      1.000 1.000 0.000
#> GSM549271     2  0.0000      0.998 0.000 1.000
#> GSM549232     1  0.0000      1.000 1.000 0.000
#> GSM549246     1  0.0000      1.000 1.000 0.000
#> GSM549248     1  0.0000      1.000 1.000 0.000
#> GSM549255     1  0.0000      1.000 1.000 0.000
#> GSM750746     1  0.0000      1.000 1.000 0.000
#> GSM549259     1  0.0000      1.000 1.000 0.000
#> GSM549269     2  0.0000      0.998 0.000 1.000
#> GSM549273     2  0.0000      0.998 0.000 1.000
#> GSM549299     2  0.0000      0.998 0.000 1.000
#> GSM549301     2  0.0000      0.998 0.000 1.000
#> GSM549310     2  0.0000      0.998 0.000 1.000
#> GSM549311     2  0.0000      0.998 0.000 1.000
#> GSM549302     2  0.0000      0.998 0.000 1.000
#> GSM549235     1  0.0000      1.000 1.000 0.000
#> GSM549245     1  0.0000      1.000 1.000 0.000
#> GSM549265     1  0.0000      1.000 1.000 0.000
#> GSM549282     2  0.0000      0.998 0.000 1.000
#> GSM549296     2  0.0000      0.998 0.000 1.000
#> GSM750739     1  0.0000      1.000 1.000 0.000
#> GSM750742     1  0.0000      1.000 1.000 0.000
#> GSM750744     1  0.0000      1.000 1.000 0.000
#> GSM750750     2  0.0000      0.998 0.000 1.000
#> GSM549242     1  0.0000      1.000 1.000 0.000
#> GSM549252     1  0.0000      1.000 1.000 0.000
#> GSM549253     1  0.0000      1.000 1.000 0.000
#> GSM549256     1  0.0000      1.000 1.000 0.000
#> GSM549257     1  0.0000      1.000 1.000 0.000
#> GSM549263     1  0.0000      1.000 1.000 0.000
#> GSM549267     2  0.0000      0.998 0.000 1.000
#> GSM750745     1  0.0000      1.000 1.000 0.000
#> GSM549239     1  0.0000      1.000 1.000 0.000
#> GSM549244     1  0.0000      1.000 1.000 0.000
#> GSM549249     1  0.0000      1.000 1.000 0.000
#> GSM549260     1  0.0000      1.000 1.000 0.000
#> GSM549266     2  0.1414      0.981 0.020 0.980
#> GSM549293     2  0.0000      0.998 0.000 1.000
#> GSM549236     1  0.0000      1.000 1.000 0.000
#> GSM549238     1  0.0000      1.000 1.000 0.000
#> GSM549251     1  0.0000      1.000 1.000 0.000
#> GSM549258     1  0.0000      1.000 1.000 0.000
#> GSM549264     1  0.0000      1.000 1.000 0.000
#> GSM549243     1  0.0000      1.000 1.000 0.000
#> GSM549262     1  0.0000      1.000 1.000 0.000
#> GSM549278     1  0.0000      1.000 1.000 0.000
#> GSM549283     2  0.0000      0.998 0.000 1.000
#> GSM549298     2  0.0000      0.998 0.000 1.000
#> GSM750741     1  0.0000      1.000 1.000 0.000
#> GSM549286     2  0.0000      0.998 0.000 1.000
#> GSM549241     1  0.0000      1.000 1.000 0.000
#> GSM549247     1  0.0000      1.000 1.000 0.000
#> GSM549261     1  0.0000      1.000 1.000 0.000
#> GSM549270     2  0.0000      0.998 0.000 1.000
#> GSM549277     2  0.0000      0.998 0.000 1.000
#> GSM549280     2  0.0000      0.998 0.000 1.000
#> GSM549281     2  0.1633      0.977 0.024 0.976
#> GSM549285     2  0.0000      0.998 0.000 1.000
#> GSM549288     2  0.0000      0.998 0.000 1.000
#> GSM549292     2  0.0000      0.998 0.000 1.000
#> GSM549295     2  0.0000      0.998 0.000 1.000
#> GSM549297     2  0.0000      0.998 0.000 1.000
#> GSM750743     1  0.0000      1.000 1.000 0.000
#> GSM549268     2  0.1414      0.981 0.020 0.980
#> GSM549290     2  0.0000      0.998 0.000 1.000
#> GSM549272     2  0.0000      0.998 0.000 1.000
#> GSM549276     2  0.0000      0.998 0.000 1.000
#> GSM549275     1  0.0000      1.000 1.000 0.000
#> GSM549284     2  0.0000      0.998 0.000 1.000
#> GSM750737     1  0.0000      1.000 1.000 0.000
#> GSM750740     1  0.0000      1.000 1.000 0.000
#> GSM750747     1  0.0000      1.000 1.000 0.000
#> GSM750751     2  0.0000      0.998 0.000 1.000
#> GSM750754     2  0.0000      0.998 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.7824    -0.1653 0.444 0.052 0.504
#> GSM549291     2  0.6309     0.0763 0.000 0.500 0.500
#> GSM549274     2  0.6305     0.4269 0.000 0.516 0.484
#> GSM750738     2  0.6307     0.4260 0.000 0.512 0.488
#> GSM750748     1  0.0000     0.8672 1.000 0.000 0.000
#> GSM549240     1  0.1289     0.8599 0.968 0.000 0.032
#> GSM549279     3  0.7480    -0.4068 0.036 0.456 0.508
#> GSM549294     2  0.6307     0.4215 0.000 0.512 0.488
#> GSM549300     2  0.3879     0.3965 0.000 0.848 0.152
#> GSM549303     2  0.5291     0.2540 0.000 0.732 0.268
#> GSM549309     2  0.6260     0.1335 0.000 0.552 0.448
#> GSM750753     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM750752     2  0.6280     0.1286 0.000 0.540 0.460
#> GSM549304     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549305     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549307     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549306     2  0.1643     0.3888 0.000 0.956 0.044
#> GSM549308     2  0.0424     0.3777 0.000 0.992 0.008
#> GSM549233     1  0.1753     0.8589 0.952 0.000 0.048
#> GSM549234     1  0.6309     0.1633 0.504 0.000 0.496
#> GSM549250     1  0.1411     0.8619 0.964 0.000 0.036
#> GSM549287     2  0.6274     0.1276 0.000 0.544 0.456
#> GSM750735     1  0.0747     0.8628 0.984 0.000 0.016
#> GSM750736     1  0.1289     0.8599 0.968 0.000 0.032
#> GSM750749     1  0.1163     0.8607 0.972 0.000 0.028
#> GSM549230     1  0.1411     0.8619 0.964 0.000 0.036
#> GSM549231     1  0.1411     0.8619 0.964 0.000 0.036
#> GSM549237     1  0.1031     0.8656 0.976 0.000 0.024
#> GSM549254     3  0.6672    -0.2331 0.472 0.008 0.520
#> GSM750734     1  0.0424     0.8659 0.992 0.000 0.008
#> GSM549271     2  0.6260     0.1337 0.000 0.552 0.448
#> GSM549232     1  0.6309     0.1522 0.500 0.000 0.500
#> GSM549246     1  0.6111     0.3926 0.604 0.000 0.396
#> GSM549248     1  0.1031     0.8656 0.976 0.000 0.024
#> GSM549255     1  0.6309     0.1522 0.500 0.000 0.500
#> GSM750746     1  0.0237     0.8669 0.996 0.000 0.004
#> GSM549259     1  0.0237     0.8669 0.996 0.000 0.004
#> GSM549269     2  0.6307     0.4215 0.000 0.512 0.488
#> GSM549273     2  0.0424     0.3777 0.000 0.992 0.008
#> GSM549299     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549301     2  0.0747     0.3836 0.000 0.984 0.016
#> GSM549310     2  0.6280     0.1286 0.000 0.540 0.460
#> GSM549311     2  0.5291     0.2540 0.000 0.732 0.268
#> GSM549302     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549235     1  0.0000     0.8672 1.000 0.000 0.000
#> GSM549245     3  0.6309    -0.2618 0.500 0.000 0.500
#> GSM549265     1  0.6309     0.1522 0.500 0.000 0.500
#> GSM549282     2  0.5397     0.2461 0.000 0.720 0.280
#> GSM549296     2  0.6295     0.1168 0.000 0.528 0.472
#> GSM750739     1  0.0000     0.8672 1.000 0.000 0.000
#> GSM750742     1  0.1031     0.8656 0.976 0.000 0.024
#> GSM750744     1  0.0237     0.8674 0.996 0.000 0.004
#> GSM750750     2  0.5178     0.2601 0.000 0.744 0.256
#> GSM549242     1  0.1753     0.8589 0.952 0.000 0.048
#> GSM549252     1  0.6309     0.1633 0.504 0.000 0.496
#> GSM549253     1  0.1411     0.8619 0.964 0.000 0.036
#> GSM549256     1  0.1753     0.8589 0.952 0.000 0.048
#> GSM549257     1  0.6308     0.1733 0.508 0.000 0.492
#> GSM549263     1  0.1411     0.8619 0.964 0.000 0.036
#> GSM549267     2  0.6302     0.1015 0.000 0.520 0.480
#> GSM750745     1  0.0424     0.8659 0.992 0.000 0.008
#> GSM549239     1  0.0424     0.8659 0.992 0.000 0.008
#> GSM549244     3  0.6309    -0.2618 0.500 0.000 0.500
#> GSM549249     1  0.6309     0.1633 0.504 0.000 0.496
#> GSM549260     1  0.0747     0.8661 0.984 0.000 0.016
#> GSM549266     3  0.7480    -0.4068 0.036 0.456 0.508
#> GSM549293     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549236     1  0.1411     0.8619 0.964 0.000 0.036
#> GSM549238     1  0.4452     0.7100 0.808 0.000 0.192
#> GSM549251     1  0.1411     0.8619 0.964 0.000 0.036
#> GSM549258     1  0.1163     0.8620 0.972 0.000 0.028
#> GSM549264     1  0.1031     0.8656 0.976 0.000 0.024
#> GSM549243     1  0.0000     0.8672 1.000 0.000 0.000
#> GSM549262     1  0.1031     0.8656 0.976 0.000 0.024
#> GSM549278     3  0.7283    -0.1485 0.028 0.460 0.512
#> GSM549283     2  0.6302     0.4320 0.000 0.520 0.480
#> GSM549298     2  0.1643     0.3888 0.000 0.956 0.044
#> GSM750741     1  0.1289     0.8599 0.968 0.000 0.032
#> GSM549286     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549241     1  0.0892     0.8607 0.980 0.000 0.020
#> GSM549247     1  0.1289     0.8599 0.968 0.000 0.032
#> GSM549261     1  0.0237     0.8669 0.996 0.000 0.004
#> GSM549270     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549277     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549280     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549281     3  0.7480    -0.4068 0.036 0.456 0.508
#> GSM549285     2  0.0424     0.3774 0.000 0.992 0.008
#> GSM549288     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549292     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549295     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549297     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM750743     1  0.0424     0.8659 0.992 0.000 0.008
#> GSM549268     3  0.7480    -0.4068 0.036 0.456 0.508
#> GSM549290     2  0.6302     0.1015 0.000 0.520 0.480
#> GSM549272     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549276     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM549275     1  0.1289     0.8599 0.968 0.000 0.032
#> GSM549284     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM750737     1  0.5835     0.5220 0.660 0.000 0.340
#> GSM750740     1  0.0237     0.8669 0.996 0.000 0.004
#> GSM750747     1  0.0237     0.8669 0.996 0.000 0.004
#> GSM750751     2  0.6299     0.4367 0.000 0.524 0.476
#> GSM750754     2  0.6309     0.0814 0.000 0.504 0.496

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.5788      0.809 0.084 0.000 0.228 0.688
#> GSM549291     4  0.5000      0.407 0.000 0.000 0.496 0.504
#> GSM549274     2  0.0336      0.908 0.000 0.992 0.000 0.008
#> GSM750738     2  0.0592      0.905 0.000 0.984 0.000 0.016
#> GSM750748     1  0.0000      0.831 1.000 0.000 0.000 0.000
#> GSM549240     1  0.4907      0.590 0.580 0.000 0.000 0.420
#> GSM549279     2  0.6744      0.443 0.084 0.528 0.004 0.384
#> GSM549294     2  0.0000      0.910 0.000 1.000 0.000 0.000
#> GSM549300     3  0.5295      0.140 0.000 0.488 0.504 0.008
#> GSM549303     3  0.1722      0.728 0.000 0.048 0.944 0.008
#> GSM549309     3  0.0524      0.698 0.000 0.004 0.988 0.008
#> GSM750753     2  0.0188      0.909 0.000 0.996 0.000 0.004
#> GSM750752     4  0.4996      0.430 0.000 0.000 0.484 0.516
#> GSM549304     2  0.0188      0.910 0.000 0.996 0.000 0.004
#> GSM549305     2  0.0000      0.910 0.000 1.000 0.000 0.000
#> GSM549307     2  0.2271      0.841 0.000 0.916 0.076 0.008
#> GSM549306     3  0.4511      0.630 0.000 0.268 0.724 0.008
#> GSM549308     3  0.3893      0.695 0.000 0.196 0.796 0.008
#> GSM549233     1  0.3355      0.776 0.836 0.000 0.004 0.160
#> GSM549234     4  0.6027      0.821 0.124 0.000 0.192 0.684
#> GSM549250     1  0.2831      0.797 0.876 0.000 0.004 0.120
#> GSM549287     3  0.0336      0.694 0.000 0.000 0.992 0.008
#> GSM750735     1  0.4331      0.705 0.712 0.000 0.000 0.288
#> GSM750736     1  0.4817      0.623 0.612 0.000 0.000 0.388
#> GSM750749     1  0.4790      0.629 0.620 0.000 0.000 0.380
#> GSM549230     1  0.2714      0.801 0.884 0.000 0.004 0.112
#> GSM549231     1  0.2654      0.803 0.888 0.000 0.004 0.108
#> GSM549237     1  0.1557      0.824 0.944 0.000 0.000 0.056
#> GSM549254     4  0.4387      0.725 0.024 0.000 0.200 0.776
#> GSM750734     1  0.1474      0.822 0.948 0.000 0.000 0.052
#> GSM549271     3  0.0336      0.694 0.000 0.000 0.992 0.008
#> GSM549232     4  0.5820      0.825 0.100 0.000 0.204 0.696
#> GSM549246     4  0.6078      0.795 0.152 0.000 0.164 0.684
#> GSM549248     1  0.2197      0.816 0.916 0.000 0.004 0.080
#> GSM549255     4  0.5820      0.825 0.100 0.000 0.204 0.696
#> GSM750746     1  0.0469      0.830 0.988 0.000 0.000 0.012
#> GSM549259     1  0.1302      0.827 0.956 0.000 0.000 0.044
#> GSM549269     2  0.0336      0.908 0.000 0.992 0.000 0.008
#> GSM549273     3  0.3972      0.693 0.000 0.204 0.788 0.008
#> GSM549299     2  0.0188      0.909 0.000 0.996 0.000 0.004
#> GSM549301     3  0.4011      0.689 0.000 0.208 0.784 0.008
#> GSM549310     3  0.4961     -0.324 0.000 0.000 0.552 0.448
#> GSM549311     3  0.1576      0.727 0.000 0.048 0.948 0.004
#> GSM549302     2  0.0188      0.910 0.000 0.996 0.000 0.004
#> GSM549235     1  0.0000      0.831 1.000 0.000 0.000 0.000
#> GSM549245     4  0.5820      0.825 0.100 0.000 0.204 0.696
#> GSM549265     4  0.5998      0.823 0.116 0.000 0.200 0.684
#> GSM549282     3  0.1118      0.722 0.000 0.036 0.964 0.000
#> GSM549296     4  0.4981      0.471 0.000 0.000 0.464 0.536
#> GSM750739     1  0.0000      0.831 1.000 0.000 0.000 0.000
#> GSM750742     1  0.2197      0.816 0.916 0.000 0.004 0.080
#> GSM750744     1  0.1302      0.826 0.956 0.000 0.000 0.044
#> GSM750750     3  0.1389      0.727 0.000 0.048 0.952 0.000
#> GSM549242     1  0.3257      0.783 0.844 0.000 0.004 0.152
#> GSM549252     4  0.6027      0.821 0.124 0.000 0.192 0.684
#> GSM549253     1  0.2831      0.797 0.876 0.000 0.004 0.120
#> GSM549256     1  0.3402      0.773 0.832 0.000 0.004 0.164
#> GSM549257     4  0.5820      0.824 0.108 0.000 0.192 0.700
#> GSM549263     1  0.2714      0.801 0.884 0.000 0.004 0.112
#> GSM549267     3  0.4776     -0.107 0.000 0.000 0.624 0.376
#> GSM750745     1  0.3764      0.751 0.784 0.000 0.000 0.216
#> GSM549239     1  0.3074      0.783 0.848 0.000 0.000 0.152
#> GSM549244     4  0.5839      0.826 0.104 0.000 0.200 0.696
#> GSM549249     4  0.6027      0.821 0.124 0.000 0.192 0.684
#> GSM549260     1  0.2011      0.820 0.920 0.000 0.000 0.080
#> GSM549266     2  0.6724      0.453 0.084 0.536 0.004 0.376
#> GSM549293     2  0.0188      0.910 0.000 0.996 0.000 0.004
#> GSM549236     1  0.2831      0.797 0.876 0.000 0.004 0.120
#> GSM549238     4  0.5016      0.421 0.396 0.000 0.004 0.600
#> GSM549251     1  0.2714      0.801 0.884 0.000 0.004 0.112
#> GSM549258     1  0.4454      0.697 0.692 0.000 0.000 0.308
#> GSM549264     1  0.2334      0.813 0.908 0.000 0.004 0.088
#> GSM549243     1  0.0000      0.831 1.000 0.000 0.000 0.000
#> GSM549262     1  0.2197      0.816 0.916 0.000 0.004 0.080
#> GSM549278     4  0.4804      0.604 0.000 0.000 0.384 0.616
#> GSM549283     2  0.0657      0.905 0.000 0.984 0.004 0.012
#> GSM549298     3  0.4539      0.625 0.000 0.272 0.720 0.008
#> GSM750741     1  0.4817      0.623 0.612 0.000 0.000 0.388
#> GSM549286     2  0.0188      0.910 0.000 0.996 0.000 0.004
#> GSM549241     1  0.4522      0.685 0.680 0.000 0.000 0.320
#> GSM549247     1  0.4907      0.590 0.580 0.000 0.000 0.420
#> GSM549261     1  0.1302      0.827 0.956 0.000 0.000 0.044
#> GSM549270     2  0.0000      0.910 0.000 1.000 0.000 0.000
#> GSM549277     2  0.1256      0.891 0.000 0.964 0.028 0.008
#> GSM549280     2  0.1109      0.893 0.000 0.968 0.028 0.004
#> GSM549281     2  0.6557      0.467 0.072 0.548 0.004 0.376
#> GSM549285     3  0.2530      0.723 0.000 0.100 0.896 0.004
#> GSM549288     2  0.1356      0.887 0.000 0.960 0.032 0.008
#> GSM549292     2  0.0188      0.910 0.000 0.996 0.000 0.004
#> GSM549295     2  0.1151      0.893 0.000 0.968 0.024 0.008
#> GSM549297     2  0.0188      0.909 0.000 0.996 0.000 0.004
#> GSM750743     1  0.3444      0.768 0.816 0.000 0.000 0.184
#> GSM549268     2  0.6557      0.467 0.072 0.548 0.004 0.376
#> GSM549290     3  0.4855     -0.182 0.000 0.000 0.600 0.400
#> GSM549272     2  0.0188      0.910 0.000 0.996 0.000 0.004
#> GSM549276     2  0.0000      0.910 0.000 1.000 0.000 0.000
#> GSM549275     1  0.4817      0.623 0.612 0.000 0.000 0.388
#> GSM549284     2  0.0188      0.910 0.000 0.996 0.000 0.004
#> GSM750737     4  0.1576      0.542 0.048 0.000 0.004 0.948
#> GSM750740     1  0.1302      0.827 0.956 0.000 0.000 0.044
#> GSM750747     1  0.0469      0.830 0.988 0.000 0.000 0.012
#> GSM750751     2  0.0000      0.910 0.000 1.000 0.000 0.000
#> GSM750754     3  0.1022      0.671 0.000 0.000 0.968 0.032

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.1041      0.877 0.000 0.000 0.004 0.964 0.032
#> GSM549291     4  0.3262      0.809 0.000 0.000 0.124 0.840 0.036
#> GSM549274     2  0.0162      0.902 0.000 0.996 0.000 0.000 0.004
#> GSM750738     2  0.0290      0.901 0.000 0.992 0.000 0.000 0.008
#> GSM750748     1  0.0671      0.916 0.980 0.000 0.004 0.000 0.016
#> GSM549240     5  0.5142      0.796 0.192 0.000 0.008 0.096 0.704
#> GSM549279     5  0.4041      0.671 0.012 0.164 0.012 0.016 0.796
#> GSM549294     2  0.1732      0.890 0.000 0.920 0.000 0.000 0.080
#> GSM549300     3  0.5930      0.539 0.000 0.196 0.596 0.000 0.208
#> GSM549303     3  0.1907      0.881 0.000 0.000 0.928 0.044 0.028
#> GSM549309     3  0.1205      0.876 0.000 0.000 0.956 0.040 0.004
#> GSM750753     2  0.2448      0.884 0.000 0.892 0.020 0.000 0.088
#> GSM750752     4  0.3037      0.823 0.000 0.000 0.100 0.860 0.040
#> GSM549304     2  0.0162      0.902 0.000 0.996 0.000 0.000 0.004
#> GSM549305     2  0.0963      0.901 0.000 0.964 0.000 0.000 0.036
#> GSM549307     2  0.5954      0.596 0.000 0.592 0.192 0.000 0.216
#> GSM549306     3  0.3921      0.821 0.000 0.044 0.784 0.000 0.172
#> GSM549308     3  0.2771      0.859 0.000 0.012 0.860 0.000 0.128
#> GSM549233     1  0.1732      0.861 0.920 0.000 0.000 0.080 0.000
#> GSM549234     4  0.1124      0.887 0.036 0.000 0.000 0.960 0.004
#> GSM549250     1  0.0510      0.916 0.984 0.000 0.000 0.016 0.000
#> GSM549287     3  0.1915      0.865 0.000 0.000 0.928 0.040 0.032
#> GSM750735     5  0.4161      0.789 0.280 0.000 0.000 0.016 0.704
#> GSM750736     5  0.4090      0.800 0.268 0.000 0.000 0.016 0.716
#> GSM750749     5  0.4208      0.810 0.248 0.000 0.004 0.020 0.728
#> GSM549230     1  0.0510      0.916 0.984 0.000 0.000 0.016 0.000
#> GSM549231     1  0.0510      0.916 0.984 0.000 0.000 0.016 0.000
#> GSM549237     1  0.0566      0.918 0.984 0.000 0.000 0.004 0.012
#> GSM549254     4  0.1121      0.879 0.000 0.000 0.000 0.956 0.044
#> GSM750734     1  0.1478      0.888 0.936 0.000 0.000 0.000 0.064
#> GSM549271     3  0.2074      0.863 0.000 0.000 0.920 0.044 0.036
#> GSM549232     4  0.1117      0.888 0.020 0.000 0.000 0.964 0.016
#> GSM549246     4  0.1043      0.885 0.040 0.000 0.000 0.960 0.000
#> GSM549248     1  0.0290      0.918 0.992 0.000 0.000 0.008 0.000
#> GSM549255     4  0.1216      0.888 0.020 0.000 0.000 0.960 0.020
#> GSM750746     1  0.0671      0.916 0.980 0.000 0.004 0.000 0.016
#> GSM549259     1  0.2124      0.854 0.900 0.000 0.004 0.000 0.096
#> GSM549269     2  0.0000      0.902 0.000 1.000 0.000 0.000 0.000
#> GSM549273     3  0.2930      0.878 0.000 0.012 0.880 0.032 0.076
#> GSM549299     2  0.2864      0.870 0.000 0.864 0.024 0.000 0.112
#> GSM549301     3  0.3438      0.836 0.000 0.020 0.808 0.000 0.172
#> GSM549310     4  0.4552      0.639 0.000 0.000 0.264 0.696 0.040
#> GSM549311     3  0.1408      0.879 0.000 0.000 0.948 0.044 0.008
#> GSM549302     2  0.0162      0.902 0.000 0.996 0.000 0.000 0.004
#> GSM549235     1  0.0566      0.917 0.984 0.000 0.004 0.000 0.012
#> GSM549245     4  0.1216      0.888 0.020 0.000 0.000 0.960 0.020
#> GSM549265     4  0.1202      0.888 0.032 0.000 0.004 0.960 0.004
#> GSM549282     3  0.1469      0.881 0.000 0.000 0.948 0.036 0.016
#> GSM549296     4  0.2569      0.843 0.000 0.000 0.068 0.892 0.040
#> GSM750739     1  0.0609      0.915 0.980 0.000 0.000 0.000 0.020
#> GSM750742     1  0.0290      0.918 0.992 0.000 0.000 0.008 0.000
#> GSM750744     1  0.0703      0.914 0.976 0.000 0.000 0.000 0.024
#> GSM750750     3  0.1753      0.883 0.000 0.000 0.936 0.032 0.032
#> GSM549242     1  0.1270      0.890 0.948 0.000 0.000 0.052 0.000
#> GSM549252     4  0.1124      0.887 0.036 0.000 0.000 0.960 0.004
#> GSM549253     1  0.0510      0.916 0.984 0.000 0.000 0.016 0.000
#> GSM549256     1  0.2179      0.823 0.888 0.000 0.000 0.112 0.000
#> GSM549257     4  0.1117      0.888 0.020 0.000 0.000 0.964 0.016
#> GSM549263     1  0.0510      0.916 0.984 0.000 0.000 0.016 0.000
#> GSM549267     4  0.4958      0.464 0.000 0.000 0.372 0.592 0.036
#> GSM750745     1  0.4126      0.230 0.620 0.000 0.000 0.000 0.380
#> GSM549239     1  0.3210      0.683 0.788 0.000 0.000 0.000 0.212
#> GSM549244     4  0.1082      0.888 0.028 0.000 0.000 0.964 0.008
#> GSM549249     4  0.1124      0.887 0.036 0.000 0.000 0.960 0.004
#> GSM549260     1  0.1571      0.891 0.936 0.000 0.000 0.004 0.060
#> GSM549266     5  0.4002      0.675 0.012 0.160 0.012 0.016 0.800
#> GSM549293     2  0.0162      0.902 0.000 0.996 0.000 0.000 0.004
#> GSM549236     1  0.0510      0.916 0.984 0.000 0.000 0.016 0.000
#> GSM549238     4  0.3231      0.725 0.196 0.000 0.000 0.800 0.004
#> GSM549251     1  0.0510      0.916 0.984 0.000 0.000 0.016 0.000
#> GSM549258     5  0.4151      0.682 0.344 0.000 0.000 0.004 0.652
#> GSM549264     1  0.0290      0.918 0.992 0.000 0.000 0.008 0.000
#> GSM549243     1  0.0404      0.917 0.988 0.000 0.000 0.000 0.012
#> GSM549262     1  0.0290      0.918 0.992 0.000 0.000 0.008 0.000
#> GSM549278     4  0.1626      0.872 0.000 0.000 0.016 0.940 0.044
#> GSM549283     2  0.4248      0.751 0.000 0.728 0.032 0.000 0.240
#> GSM549298     3  0.3921      0.821 0.000 0.044 0.784 0.000 0.172
#> GSM750741     5  0.4090      0.800 0.268 0.000 0.000 0.016 0.716
#> GSM549286     2  0.0000      0.902 0.000 1.000 0.000 0.000 0.000
#> GSM549241     5  0.3838      0.787 0.280 0.000 0.000 0.004 0.716
#> GSM549247     5  0.5142      0.796 0.192 0.000 0.008 0.096 0.704
#> GSM549261     1  0.2068      0.857 0.904 0.000 0.004 0.000 0.092
#> GSM549270     2  0.0963      0.901 0.000 0.964 0.000 0.000 0.036
#> GSM549277     2  0.5871      0.621 0.000 0.604 0.184 0.000 0.212
#> GSM549280     2  0.5201      0.731 0.000 0.684 0.128 0.000 0.188
#> GSM549281     5  0.3932      0.667 0.008 0.164 0.012 0.016 0.800
#> GSM549285     3  0.2597      0.856 0.000 0.004 0.872 0.004 0.120
#> GSM549288     2  0.5122      0.734 0.000 0.688 0.112 0.000 0.200
#> GSM549292     2  0.0000      0.902 0.000 1.000 0.000 0.000 0.000
#> GSM549295     2  0.3958      0.811 0.000 0.776 0.040 0.000 0.184
#> GSM549297     2  0.2722      0.874 0.000 0.872 0.020 0.000 0.108
#> GSM750743     1  0.4060      0.302 0.640 0.000 0.000 0.000 0.360
#> GSM549268     5  0.3932      0.667 0.008 0.164 0.012 0.016 0.800
#> GSM549290     4  0.4908      0.498 0.000 0.000 0.356 0.608 0.036
#> GSM549272     2  0.0000      0.902 0.000 1.000 0.000 0.000 0.000
#> GSM549276     2  0.0963      0.901 0.000 0.964 0.000 0.000 0.036
#> GSM549275     5  0.4363      0.811 0.244 0.008 0.004 0.016 0.728
#> GSM549284     2  0.0451      0.901 0.000 0.988 0.008 0.000 0.004
#> GSM750737     4  0.2612      0.809 0.008 0.000 0.000 0.868 0.124
#> GSM750740     1  0.2068      0.857 0.904 0.000 0.004 0.000 0.092
#> GSM750747     1  0.0771      0.914 0.976 0.000 0.004 0.000 0.020
#> GSM750751     2  0.0963      0.901 0.000 0.964 0.000 0.000 0.036
#> GSM750754     3  0.3012      0.799 0.000 0.000 0.860 0.104 0.036

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.3317     0.8166 0.024 0.104 0.000 0.836 0.000 0.036
#> GSM549291     4  0.5322     0.6079 0.024 0.104 0.000 0.636 0.000 0.236
#> GSM549274     2  0.3838     0.9799 0.000 0.552 0.448 0.000 0.000 0.000
#> GSM750738     2  0.4082     0.9392 0.004 0.560 0.432 0.004 0.000 0.000
#> GSM750748     5  0.3611     0.8108 0.096 0.108 0.000 0.000 0.796 0.000
#> GSM549240     1  0.3476     0.7635 0.840 0.056 0.000 0.068 0.032 0.004
#> GSM549279     1  0.4064     0.6864 0.740 0.200 0.056 0.004 0.000 0.000
#> GSM549294     3  0.3944    -0.6257 0.004 0.428 0.568 0.000 0.000 0.000
#> GSM549300     3  0.3969    -0.1071 0.016 0.000 0.652 0.000 0.000 0.332
#> GSM549303     6  0.2216     0.7380 0.024 0.016 0.052 0.000 0.000 0.908
#> GSM549309     6  0.0653     0.7399 0.012 0.000 0.004 0.004 0.000 0.980
#> GSM750753     3  0.3428    -0.2882 0.000 0.304 0.696 0.000 0.000 0.000
#> GSM750752     4  0.4733     0.6695 0.020 0.088 0.000 0.708 0.000 0.184
#> GSM549304     2  0.3843     0.9848 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM549305     3  0.3828    -0.7074 0.000 0.440 0.560 0.000 0.000 0.000
#> GSM549307     3  0.2623     0.3807 0.016 0.000 0.852 0.000 0.000 0.132
#> GSM549306     6  0.4580     0.3981 0.016 0.012 0.484 0.000 0.000 0.488
#> GSM549308     6  0.4429     0.5500 0.016 0.012 0.372 0.000 0.000 0.600
#> GSM549233     5  0.2558     0.7265 0.000 0.004 0.000 0.156 0.840 0.000
#> GSM549234     4  0.1124     0.8675 0.008 0.036 0.000 0.956 0.000 0.000
#> GSM549250     5  0.0603     0.8374 0.000 0.004 0.000 0.016 0.980 0.000
#> GSM549287     6  0.1957     0.7194 0.008 0.072 0.000 0.008 0.000 0.912
#> GSM750735     1  0.2651     0.7703 0.872 0.036 0.000 0.004 0.088 0.000
#> GSM750736     1  0.2535     0.7777 0.888 0.036 0.000 0.012 0.064 0.000
#> GSM750749     1  0.3782     0.7654 0.788 0.140 0.000 0.008 0.064 0.000
#> GSM549230     5  0.0146     0.8454 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM549231     5  0.0000     0.8454 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549237     5  0.1983     0.8418 0.072 0.020 0.000 0.000 0.908 0.000
#> GSM549254     4  0.1232     0.8628 0.016 0.024 0.000 0.956 0.000 0.004
#> GSM750734     5  0.4228     0.7234 0.212 0.072 0.000 0.000 0.716 0.000
#> GSM549271     6  0.2345     0.7156 0.016 0.072 0.000 0.016 0.000 0.896
#> GSM549232     4  0.0405     0.8675 0.008 0.004 0.000 0.988 0.000 0.000
#> GSM549246     4  0.1464     0.8660 0.016 0.036 0.000 0.944 0.004 0.000
#> GSM549248     5  0.0000     0.8454 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549255     4  0.0405     0.8669 0.008 0.004 0.000 0.988 0.000 0.000
#> GSM750746     5  0.3657     0.8087 0.100 0.108 0.000 0.000 0.792 0.000
#> GSM549259     5  0.4444     0.7397 0.184 0.108 0.000 0.000 0.708 0.000
#> GSM549269     2  0.3843     0.9762 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM549273     6  0.3737     0.6825 0.024 0.016 0.188 0.000 0.000 0.772
#> GSM549299     3  0.3819    -0.2485 0.012 0.316 0.672 0.000 0.000 0.000
#> GSM549301     6  0.4563     0.4603 0.016 0.012 0.448 0.000 0.000 0.524
#> GSM549310     4  0.5555     0.4436 0.020 0.088 0.004 0.576 0.000 0.312
#> GSM549311     6  0.1622     0.7406 0.016 0.016 0.028 0.000 0.000 0.940
#> GSM549302     2  0.3843     0.9848 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM549235     5  0.3563     0.8128 0.092 0.108 0.000 0.000 0.800 0.000
#> GSM549245     4  0.0405     0.8669 0.008 0.004 0.000 0.988 0.000 0.000
#> GSM549265     4  0.1461     0.8659 0.016 0.044 0.000 0.940 0.000 0.000
#> GSM549282     6  0.1204     0.7413 0.000 0.000 0.056 0.000 0.000 0.944
#> GSM549296     4  0.4206     0.7372 0.020 0.088 0.000 0.768 0.000 0.124
#> GSM750739     5  0.2997     0.8255 0.096 0.060 0.000 0.000 0.844 0.000
#> GSM750742     5  0.0000     0.8454 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM750744     5  0.2798     0.8196 0.112 0.036 0.000 0.000 0.852 0.000
#> GSM750750     6  0.2302     0.7231 0.008 0.000 0.120 0.000 0.000 0.872
#> GSM549242     5  0.3214     0.7734 0.032 0.016 0.000 0.116 0.836 0.000
#> GSM549252     4  0.1461     0.8659 0.016 0.044 0.000 0.940 0.000 0.000
#> GSM549253     5  0.0291     0.8429 0.000 0.004 0.000 0.004 0.992 0.000
#> GSM549256     5  0.3622     0.6189 0.004 0.016 0.000 0.236 0.744 0.000
#> GSM549257     4  0.0405     0.8669 0.008 0.004 0.000 0.988 0.000 0.000
#> GSM549263     5  0.0000     0.8454 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549267     6  0.5476     0.2214 0.020 0.096 0.000 0.304 0.000 0.580
#> GSM750745     1  0.5069    -0.0930 0.484 0.076 0.000 0.000 0.440 0.000
#> GSM549239     5  0.4938     0.4507 0.356 0.076 0.000 0.000 0.568 0.000
#> GSM549244     4  0.1245     0.8670 0.016 0.032 0.000 0.952 0.000 0.000
#> GSM549249     4  0.1391     0.8663 0.016 0.040 0.000 0.944 0.000 0.000
#> GSM549260     5  0.4457     0.7159 0.228 0.056 0.000 0.012 0.704 0.000
#> GSM549266     1  0.4121     0.6843 0.736 0.200 0.060 0.004 0.000 0.000
#> GSM549293     2  0.3843     0.9848 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM549236     5  0.0405     0.8417 0.000 0.004 0.000 0.008 0.988 0.000
#> GSM549238     4  0.4540     0.5271 0.008 0.040 0.000 0.644 0.308 0.000
#> GSM549251     5  0.0000     0.8454 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549258     1  0.3573     0.6908 0.796 0.052 0.000 0.004 0.148 0.000
#> GSM549264     5  0.1088     0.8401 0.016 0.024 0.000 0.000 0.960 0.000
#> GSM549243     5  0.2826     0.8278 0.092 0.052 0.000 0.000 0.856 0.000
#> GSM549262     5  0.0000     0.8454 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549278     4  0.2947     0.8210 0.024 0.080 0.000 0.864 0.000 0.032
#> GSM549283     3  0.5976     0.1551 0.244 0.320 0.436 0.000 0.000 0.000
#> GSM549298     3  0.4580    -0.4673 0.016 0.012 0.488 0.000 0.000 0.484
#> GSM750741     1  0.1686     0.7806 0.924 0.000 0.000 0.012 0.064 0.000
#> GSM549286     2  0.3843     0.9848 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM549241     1  0.2724     0.7549 0.864 0.052 0.000 0.000 0.084 0.000
#> GSM549247     1  0.3476     0.7635 0.840 0.056 0.000 0.068 0.032 0.004
#> GSM549261     5  0.4444     0.7397 0.184 0.108 0.000 0.000 0.708 0.000
#> GSM549270     3  0.3823    -0.7033 0.000 0.436 0.564 0.000 0.000 0.000
#> GSM549277     3  0.3767     0.3850 0.016 0.064 0.800 0.000 0.000 0.120
#> GSM549280     3  0.3189     0.3846 0.016 0.072 0.848 0.000 0.000 0.064
#> GSM549281     1  0.4402     0.6644 0.716 0.196 0.084 0.004 0.000 0.000
#> GSM549285     6  0.5012     0.6118 0.024 0.076 0.236 0.000 0.000 0.664
#> GSM549288     3  0.1616     0.3529 0.000 0.020 0.932 0.000 0.000 0.048
#> GSM549292     2  0.3843     0.9848 0.000 0.548 0.452 0.000 0.000 0.000
#> GSM549295     3  0.1398     0.2863 0.008 0.052 0.940 0.000 0.000 0.000
#> GSM549297     3  0.3126    -0.1287 0.000 0.248 0.752 0.000 0.000 0.000
#> GSM750743     1  0.5069    -0.0834 0.484 0.076 0.000 0.000 0.440 0.000
#> GSM549268     1  0.4402     0.6644 0.716 0.196 0.084 0.004 0.000 0.000
#> GSM549290     6  0.5542     0.1637 0.020 0.096 0.000 0.324 0.000 0.560
#> GSM549272     2  0.3847     0.9815 0.000 0.544 0.456 0.000 0.000 0.000
#> GSM549276     3  0.3857    -0.7879 0.000 0.468 0.532 0.000 0.000 0.000
#> GSM549275     1  0.2854     0.7749 0.860 0.088 0.000 0.004 0.048 0.000
#> GSM549284     2  0.3854     0.9622 0.000 0.536 0.464 0.000 0.000 0.000
#> GSM750737     4  0.2009     0.8273 0.068 0.024 0.000 0.908 0.000 0.000
#> GSM750740     5  0.4444     0.7397 0.184 0.108 0.000 0.000 0.708 0.000
#> GSM750747     5  0.3958     0.7906 0.128 0.108 0.000 0.000 0.764 0.000
#> GSM750751     3  0.3864    -0.8180 0.000 0.480 0.520 0.000 0.000 0.000
#> GSM750754     6  0.3306     0.6746 0.020 0.088 0.000 0.052 0.000 0.840

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-kmeans-membership-heatmap-5

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)

plot of chunk tab-MAD-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-kmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-MAD-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-kmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> MAD:kmeans 103            0.023    1.72e-05               0.05361   0.0048 2
#> MAD:kmeans  41               NA          NA                    NA       NA 3
#> MAD:kmeans  91            0.355    2.07e-04               0.00337   0.1142 4
#> MAD:kmeans  99            0.484    3.18e-04               0.00278   0.0536 5
#> MAD:kmeans  79            0.395    1.70e-02               0.01434   0.1622 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.


MAD:skmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-skmeans-collect-plots

The plots are:

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:

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)

plot of chunk MAD-skmeans-select-partition-number

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.5043 0.496   0.496
#> 3 3 0.821           0.882       0.940         0.2937 0.800   0.615
#> 4 4 0.830           0.861       0.926         0.1230 0.878   0.671
#> 5 5 0.755           0.714       0.861         0.0741 0.902   0.663
#> 6 6 0.724           0.620       0.784         0.0369 0.956   0.804

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1   0.000      0.999 1.000 0.000
#> GSM549291     2   0.000      1.000 0.000 1.000
#> GSM549274     2   0.000      1.000 0.000 1.000
#> GSM750738     2   0.000      1.000 0.000 1.000
#> GSM750748     1   0.000      0.999 1.000 0.000
#> GSM549240     1   0.000      0.999 1.000 0.000
#> GSM549279     2   0.000      1.000 0.000 1.000
#> GSM549294     2   0.000      1.000 0.000 1.000
#> GSM549300     2   0.000      1.000 0.000 1.000
#> GSM549303     2   0.000      1.000 0.000 1.000
#> GSM549309     2   0.000      1.000 0.000 1.000
#> GSM750753     2   0.000      1.000 0.000 1.000
#> GSM750752     2   0.000      1.000 0.000 1.000
#> GSM549304     2   0.000      1.000 0.000 1.000
#> GSM549305     2   0.000      1.000 0.000 1.000
#> GSM549307     2   0.000      1.000 0.000 1.000
#> GSM549306     2   0.000      1.000 0.000 1.000
#> GSM549308     2   0.000      1.000 0.000 1.000
#> GSM549233     1   0.000      0.999 1.000 0.000
#> GSM549234     1   0.000      0.999 1.000 0.000
#> GSM549250     1   0.000      0.999 1.000 0.000
#> GSM549287     2   0.000      1.000 0.000 1.000
#> GSM750735     1   0.000      0.999 1.000 0.000
#> GSM750736     1   0.000      0.999 1.000 0.000
#> GSM750749     1   0.000      0.999 1.000 0.000
#> GSM549230     1   0.000      0.999 1.000 0.000
#> GSM549231     1   0.000      0.999 1.000 0.000
#> GSM549237     1   0.000      0.999 1.000 0.000
#> GSM549254     1   0.295      0.946 0.948 0.052
#> GSM750734     1   0.000      0.999 1.000 0.000
#> GSM549271     2   0.000      1.000 0.000 1.000
#> GSM549232     1   0.000      0.999 1.000 0.000
#> GSM549246     1   0.000      0.999 1.000 0.000
#> GSM549248     1   0.000      0.999 1.000 0.000
#> GSM549255     1   0.000      0.999 1.000 0.000
#> GSM750746     1   0.000      0.999 1.000 0.000
#> GSM549259     1   0.000      0.999 1.000 0.000
#> GSM549269     2   0.000      1.000 0.000 1.000
#> GSM549273     2   0.000      1.000 0.000 1.000
#> GSM549299     2   0.000      1.000 0.000 1.000
#> GSM549301     2   0.000      1.000 0.000 1.000
#> GSM549310     2   0.000      1.000 0.000 1.000
#> GSM549311     2   0.000      1.000 0.000 1.000
#> GSM549302     2   0.000      1.000 0.000 1.000
#> GSM549235     1   0.000      0.999 1.000 0.000
#> GSM549245     1   0.000      0.999 1.000 0.000
#> GSM549265     1   0.000      0.999 1.000 0.000
#> GSM549282     2   0.000      1.000 0.000 1.000
#> GSM549296     2   0.000      1.000 0.000 1.000
#> GSM750739     1   0.000      0.999 1.000 0.000
#> GSM750742     1   0.000      0.999 1.000 0.000
#> GSM750744     1   0.000      0.999 1.000 0.000
#> GSM750750     2   0.000      1.000 0.000 1.000
#> GSM549242     1   0.000      0.999 1.000 0.000
#> GSM549252     1   0.000      0.999 1.000 0.000
#> GSM549253     1   0.000      0.999 1.000 0.000
#> GSM549256     1   0.000      0.999 1.000 0.000
#> GSM549257     1   0.000      0.999 1.000 0.000
#> GSM549263     1   0.000      0.999 1.000 0.000
#> GSM549267     2   0.000      1.000 0.000 1.000
#> GSM750745     1   0.000      0.999 1.000 0.000
#> GSM549239     1   0.000      0.999 1.000 0.000
#> GSM549244     1   0.000      0.999 1.000 0.000
#> GSM549249     1   0.000      0.999 1.000 0.000
#> GSM549260     1   0.000      0.999 1.000 0.000
#> GSM549266     2   0.000      1.000 0.000 1.000
#> GSM549293     2   0.000      1.000 0.000 1.000
#> GSM549236     1   0.000      0.999 1.000 0.000
#> GSM549238     1   0.000      0.999 1.000 0.000
#> GSM549251     1   0.000      0.999 1.000 0.000
#> GSM549258     1   0.000      0.999 1.000 0.000
#> GSM549264     1   0.000      0.999 1.000 0.000
#> GSM549243     1   0.000      0.999 1.000 0.000
#> GSM549262     1   0.000      0.999 1.000 0.000
#> GSM549278     1   0.163      0.975 0.976 0.024
#> GSM549283     2   0.000      1.000 0.000 1.000
#> GSM549298     2   0.000      1.000 0.000 1.000
#> GSM750741     1   0.000      0.999 1.000 0.000
#> GSM549286     2   0.000      1.000 0.000 1.000
#> GSM549241     1   0.000      0.999 1.000 0.000
#> GSM549247     1   0.000      0.999 1.000 0.000
#> GSM549261     1   0.000      0.999 1.000 0.000
#> GSM549270     2   0.000      1.000 0.000 1.000
#> GSM549277     2   0.000      1.000 0.000 1.000
#> GSM549280     2   0.000      1.000 0.000 1.000
#> GSM549281     2   0.000      1.000 0.000 1.000
#> GSM549285     2   0.000      1.000 0.000 1.000
#> GSM549288     2   0.000      1.000 0.000 1.000
#> GSM549292     2   0.000      1.000 0.000 1.000
#> GSM549295     2   0.000      1.000 0.000 1.000
#> GSM549297     2   0.000      1.000 0.000 1.000
#> GSM750743     1   0.000      0.999 1.000 0.000
#> GSM549268     2   0.000      1.000 0.000 1.000
#> GSM549290     2   0.000      1.000 0.000 1.000
#> GSM549272     2   0.000      1.000 0.000 1.000
#> GSM549276     2   0.000      1.000 0.000 1.000
#> GSM549275     1   0.000      0.999 1.000 0.000
#> GSM549284     2   0.000      1.000 0.000 1.000
#> GSM750737     1   0.000      0.999 1.000 0.000
#> GSM750740     1   0.000      0.999 1.000 0.000
#> GSM750747     1   0.000      0.999 1.000 0.000
#> GSM750751     2   0.000      1.000 0.000 1.000
#> GSM750754     2   0.000      1.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.0592     0.8531 0.012 0.000 0.988
#> GSM549291     3  0.0000     0.8514 0.000 0.000 1.000
#> GSM549274     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM750738     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM750748     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549240     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549279     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549294     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549300     2  0.3340     0.8667 0.000 0.880 0.120
#> GSM549303     2  0.6062     0.5570 0.000 0.616 0.384
#> GSM549309     3  0.1964     0.8059 0.000 0.056 0.944
#> GSM750753     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM750752     3  0.0000     0.8514 0.000 0.000 1.000
#> GSM549304     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549305     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549307     2  0.0237     0.9303 0.000 0.996 0.004
#> GSM549306     2  0.4178     0.8327 0.000 0.828 0.172
#> GSM549308     2  0.4750     0.7971 0.000 0.784 0.216
#> GSM549233     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549234     3  0.4974     0.7714 0.236 0.000 0.764
#> GSM549250     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549287     3  0.0000     0.8514 0.000 0.000 1.000
#> GSM750735     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM750736     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM750749     1  0.0424     0.9654 0.992 0.008 0.000
#> GSM549230     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549231     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549237     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549254     3  0.1289     0.8532 0.032 0.000 0.968
#> GSM750734     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549271     3  0.3551     0.7145 0.000 0.132 0.868
#> GSM549232     3  0.4555     0.8047 0.200 0.000 0.800
#> GSM549246     1  0.6225     0.0441 0.568 0.000 0.432
#> GSM549248     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549255     3  0.4504     0.8075 0.196 0.000 0.804
#> GSM750746     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549259     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549269     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549273     2  0.4750     0.7970 0.000 0.784 0.216
#> GSM549299     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549301     2  0.4504     0.8145 0.000 0.804 0.196
#> GSM549310     3  0.0237     0.8492 0.000 0.004 0.996
#> GSM549311     2  0.6095     0.5411 0.000 0.608 0.392
#> GSM549302     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549235     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549245     3  0.4504     0.8075 0.196 0.000 0.804
#> GSM549265     3  0.4605     0.8016 0.204 0.000 0.796
#> GSM549282     2  0.5706     0.6677 0.000 0.680 0.320
#> GSM549296     3  0.0000     0.8514 0.000 0.000 1.000
#> GSM750739     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM750742     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM750744     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM750750     2  0.5058     0.7679 0.000 0.756 0.244
#> GSM549242     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549252     3  0.4974     0.7714 0.236 0.000 0.764
#> GSM549253     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549256     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549257     3  0.5098     0.7555 0.248 0.000 0.752
#> GSM549263     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549267     3  0.0000     0.8514 0.000 0.000 1.000
#> GSM750745     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549239     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549244     3  0.4504     0.8075 0.196 0.000 0.804
#> GSM549249     3  0.4974     0.7714 0.236 0.000 0.764
#> GSM549260     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549266     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549293     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549236     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549238     1  0.5733     0.4184 0.676 0.000 0.324
#> GSM549251     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549258     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549264     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549243     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549262     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549278     3  0.0000     0.8514 0.000 0.000 1.000
#> GSM549283     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549298     2  0.4291     0.8269 0.000 0.820 0.180
#> GSM750741     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549286     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549241     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549247     1  0.0424     0.9654 0.992 0.008 0.000
#> GSM549261     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549270     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549277     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549280     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549281     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549285     2  0.4555     0.8112 0.000 0.800 0.200
#> GSM549288     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549292     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549295     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549297     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM750743     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM549268     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549290     3  0.0000     0.8514 0.000 0.000 1.000
#> GSM549272     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549276     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM549275     1  0.2878     0.8524 0.904 0.096 0.000
#> GSM549284     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM750737     3  0.6308     0.2047 0.492 0.000 0.508
#> GSM750740     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM750747     1  0.0000     0.9742 1.000 0.000 0.000
#> GSM750751     2  0.0000     0.9322 0.000 1.000 0.000
#> GSM750754     3  0.0000     0.8514 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.2255     0.8523 0.012 0.000 0.068 0.920
#> GSM549291     3  0.3726     0.6871 0.000 0.000 0.788 0.212
#> GSM549274     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM750738     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM750748     1  0.0336     0.9271 0.992 0.000 0.000 0.008
#> GSM549240     1  0.2563     0.8919 0.908 0.000 0.020 0.072
#> GSM549279     2  0.1762     0.9340 0.016 0.952 0.020 0.012
#> GSM549294     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549300     3  0.4998     0.0242 0.000 0.488 0.512 0.000
#> GSM549303     3  0.0707     0.8666 0.000 0.020 0.980 0.000
#> GSM549309     3  0.0707     0.8613 0.000 0.000 0.980 0.020
#> GSM750753     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM750752     4  0.5132     0.1349 0.000 0.004 0.448 0.548
#> GSM549304     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549305     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549307     2  0.3873     0.7172 0.000 0.772 0.228 0.000
#> GSM549306     3  0.3486     0.7356 0.000 0.188 0.812 0.000
#> GSM549308     3  0.0707     0.8666 0.000 0.020 0.980 0.000
#> GSM549233     1  0.4040     0.7531 0.752 0.000 0.000 0.248
#> GSM549234     4  0.0817     0.8921 0.024 0.000 0.000 0.976
#> GSM549250     1  0.3266     0.8472 0.832 0.000 0.000 0.168
#> GSM549287     3  0.0707     0.8613 0.000 0.000 0.980 0.020
#> GSM750735     1  0.1059     0.9200 0.972 0.000 0.012 0.016
#> GSM750736     1  0.1520     0.9145 0.956 0.000 0.020 0.024
#> GSM750749     1  0.1648     0.9157 0.956 0.012 0.016 0.016
#> GSM549230     1  0.2647     0.8865 0.880 0.000 0.000 0.120
#> GSM549231     1  0.2530     0.8913 0.888 0.000 0.000 0.112
#> GSM549237     1  0.1211     0.9233 0.960 0.000 0.000 0.040
#> GSM549254     4  0.2207     0.8417 0.012 0.004 0.056 0.928
#> GSM750734     1  0.0524     0.9246 0.988 0.000 0.004 0.008
#> GSM549271     3  0.0779     0.8630 0.000 0.004 0.980 0.016
#> GSM549232     4  0.0779     0.8921 0.016 0.000 0.004 0.980
#> GSM549246     4  0.3801     0.6763 0.220 0.000 0.000 0.780
#> GSM549248     1  0.1940     0.9102 0.924 0.000 0.000 0.076
#> GSM549255     4  0.0779     0.8921 0.016 0.000 0.004 0.980
#> GSM750746     1  0.0188     0.9270 0.996 0.000 0.000 0.004
#> GSM549259     1  0.0336     0.9266 0.992 0.000 0.000 0.008
#> GSM549269     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549273     3  0.0707     0.8666 0.000 0.020 0.980 0.000
#> GSM549299     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549301     3  0.1867     0.8399 0.000 0.072 0.928 0.000
#> GSM549310     3  0.4564     0.4830 0.000 0.000 0.672 0.328
#> GSM549311     3  0.0707     0.8666 0.000 0.020 0.980 0.000
#> GSM549302     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549235     1  0.0336     0.9271 0.992 0.000 0.000 0.008
#> GSM549245     4  0.0672     0.8885 0.008 0.000 0.008 0.984
#> GSM549265     4  0.0707     0.8919 0.020 0.000 0.000 0.980
#> GSM549282     3  0.0779     0.8661 0.000 0.016 0.980 0.004
#> GSM549296     4  0.4819     0.4248 0.000 0.004 0.344 0.652
#> GSM750739     1  0.0469     0.9271 0.988 0.000 0.000 0.012
#> GSM750742     1  0.1716     0.9153 0.936 0.000 0.000 0.064
#> GSM750744     1  0.1022     0.9261 0.968 0.000 0.000 0.032
#> GSM750750     3  0.0707     0.8666 0.000 0.020 0.980 0.000
#> GSM549242     1  0.3311     0.8473 0.828 0.000 0.000 0.172
#> GSM549252     4  0.0817     0.8921 0.024 0.000 0.000 0.976
#> GSM549253     1  0.2973     0.8688 0.856 0.000 0.000 0.144
#> GSM549256     1  0.4697     0.5610 0.644 0.000 0.000 0.356
#> GSM549257     4  0.0707     0.8924 0.020 0.000 0.000 0.980
#> GSM549263     1  0.2647     0.8865 0.880 0.000 0.000 0.120
#> GSM549267     3  0.1637     0.8395 0.000 0.000 0.940 0.060
#> GSM750745     1  0.1059     0.9200 0.972 0.000 0.012 0.016
#> GSM549239     1  0.0804     0.9226 0.980 0.000 0.008 0.012
#> GSM549244     4  0.0707     0.8924 0.020 0.000 0.000 0.980
#> GSM549249     4  0.0817     0.8921 0.024 0.000 0.000 0.976
#> GSM549260     1  0.1118     0.9269 0.964 0.000 0.000 0.036
#> GSM549266     2  0.1998     0.9278 0.020 0.944 0.020 0.016
#> GSM549293     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549236     1  0.3074     0.8619 0.848 0.000 0.000 0.152
#> GSM549238     4  0.2281     0.8324 0.096 0.000 0.000 0.904
#> GSM549251     1  0.2647     0.8865 0.880 0.000 0.000 0.120
#> GSM549258     1  0.1520     0.9145 0.956 0.000 0.020 0.024
#> GSM549264     1  0.1867     0.9121 0.928 0.000 0.000 0.072
#> GSM549243     1  0.0336     0.9271 0.992 0.000 0.000 0.008
#> GSM549262     1  0.1557     0.9181 0.944 0.000 0.000 0.056
#> GSM549278     3  0.4877     0.2882 0.000 0.000 0.592 0.408
#> GSM549283     2  0.0188     0.9631 0.000 0.996 0.004 0.000
#> GSM549298     3  0.3219     0.7607 0.000 0.164 0.836 0.000
#> GSM750741     1  0.1520     0.9145 0.956 0.000 0.020 0.024
#> GSM549286     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549241     1  0.1520     0.9145 0.956 0.000 0.020 0.024
#> GSM549247     1  0.4256     0.8313 0.840 0.048 0.020 0.092
#> GSM549261     1  0.0188     0.9270 0.996 0.000 0.000 0.004
#> GSM549270     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549277     2  0.3528     0.7725 0.000 0.808 0.192 0.000
#> GSM549280     2  0.2704     0.8618 0.000 0.876 0.124 0.000
#> GSM549281     2  0.1471     0.9426 0.004 0.960 0.024 0.012
#> GSM549285     3  0.1716     0.8451 0.000 0.064 0.936 0.000
#> GSM549288     2  0.2345     0.8867 0.000 0.900 0.100 0.000
#> GSM549292     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549295     2  0.1557     0.9270 0.000 0.944 0.056 0.000
#> GSM549297     2  0.0188     0.9631 0.000 0.996 0.004 0.000
#> GSM750743     1  0.0804     0.9230 0.980 0.000 0.012 0.008
#> GSM549268     2  0.1471     0.9426 0.004 0.960 0.024 0.012
#> GSM549290     3  0.2408     0.8062 0.000 0.000 0.896 0.104
#> GSM549272     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM549275     1  0.3769     0.8334 0.860 0.096 0.020 0.024
#> GSM549284     2  0.0336     0.9609 0.000 0.992 0.008 0.000
#> GSM750737     4  0.2142     0.8523 0.056 0.000 0.016 0.928
#> GSM750740     1  0.0188     0.9270 0.996 0.000 0.000 0.004
#> GSM750747     1  0.0188     0.9270 0.996 0.000 0.000 0.004
#> GSM750751     2  0.0000     0.9648 0.000 1.000 0.000 0.000
#> GSM750754     3  0.0707     0.8613 0.000 0.000 0.980 0.020

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.2747     0.8004 0.012 0.000 0.088 0.884 0.016
#> GSM549291     3  0.4090     0.5884 0.000 0.000 0.716 0.268 0.016
#> GSM549274     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM750738     2  0.1195     0.8978 0.000 0.960 0.000 0.028 0.012
#> GSM750748     1  0.3039     0.7672 0.808 0.000 0.000 0.000 0.192
#> GSM549240     5  0.2946     0.6283 0.088 0.000 0.000 0.044 0.868
#> GSM549279     5  0.4256     0.2121 0.000 0.436 0.000 0.000 0.564
#> GSM549294     2  0.0162     0.9180 0.000 0.996 0.000 0.000 0.004
#> GSM549300     2  0.4798     0.2146 0.000 0.540 0.440 0.000 0.020
#> GSM549303     3  0.0000     0.8604 0.000 0.000 1.000 0.000 0.000
#> GSM549309     3  0.0000     0.8604 0.000 0.000 1.000 0.000 0.000
#> GSM750753     2  0.0162     0.9180 0.000 0.996 0.000 0.000 0.004
#> GSM750752     4  0.4774     0.4104 0.000 0.012 0.328 0.644 0.016
#> GSM549304     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM549305     2  0.0000     0.9187 0.000 1.000 0.000 0.000 0.000
#> GSM549307     2  0.3882     0.7090 0.000 0.756 0.224 0.000 0.020
#> GSM549306     3  0.4026     0.6193 0.000 0.244 0.736 0.000 0.020
#> GSM549308     3  0.0609     0.8571 0.000 0.000 0.980 0.000 0.020
#> GSM549233     1  0.2127     0.7417 0.892 0.000 0.000 0.108 0.000
#> GSM549234     4  0.1331     0.8491 0.040 0.000 0.000 0.952 0.008
#> GSM549250     1  0.0880     0.8005 0.968 0.000 0.000 0.032 0.000
#> GSM549287     3  0.0451     0.8578 0.000 0.000 0.988 0.008 0.004
#> GSM750735     5  0.4126     0.2132 0.380 0.000 0.000 0.000 0.620
#> GSM750736     5  0.2674     0.6185 0.140 0.000 0.000 0.004 0.856
#> GSM750749     5  0.3318     0.5665 0.192 0.000 0.008 0.000 0.800
#> GSM549230     1  0.0162     0.8127 0.996 0.000 0.000 0.004 0.000
#> GSM549231     1  0.0162     0.8127 0.996 0.000 0.000 0.004 0.000
#> GSM549237     1  0.1608     0.8120 0.928 0.000 0.000 0.000 0.072
#> GSM549254     4  0.1704     0.8271 0.000 0.000 0.004 0.928 0.068
#> GSM750734     1  0.3730     0.6421 0.712 0.000 0.000 0.000 0.288
#> GSM549271     3  0.0162     0.8598 0.000 0.000 0.996 0.000 0.004
#> GSM549232     4  0.0290     0.8484 0.008 0.000 0.000 0.992 0.000
#> GSM549246     1  0.4473     0.1533 0.580 0.000 0.000 0.412 0.008
#> GSM549248     1  0.0290     0.8145 0.992 0.000 0.000 0.000 0.008
#> GSM549255     4  0.0162     0.8454 0.000 0.000 0.000 0.996 0.004
#> GSM750746     1  0.3143     0.7599 0.796 0.000 0.000 0.000 0.204
#> GSM549259     1  0.3534     0.7153 0.744 0.000 0.000 0.000 0.256
#> GSM549269     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM549273     3  0.0671     0.8575 0.000 0.004 0.980 0.000 0.016
#> GSM549299     2  0.0404     0.9181 0.000 0.988 0.000 0.000 0.012
#> GSM549301     3  0.2390     0.8059 0.000 0.084 0.896 0.000 0.020
#> GSM549310     3  0.5010     0.3557 0.000 0.008 0.592 0.376 0.024
#> GSM549311     3  0.0000     0.8604 0.000 0.000 1.000 0.000 0.000
#> GSM549302     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM549235     1  0.2773     0.7833 0.836 0.000 0.000 0.000 0.164
#> GSM549245     4  0.0324     0.8472 0.004 0.000 0.000 0.992 0.004
#> GSM549265     4  0.3308     0.7930 0.144 0.000 0.004 0.832 0.020
#> GSM549282     3  0.0162     0.8602 0.000 0.000 0.996 0.000 0.004
#> GSM549296     4  0.4054     0.5815 0.000 0.000 0.248 0.732 0.020
#> GSM750739     1  0.2561     0.7898 0.856 0.000 0.000 0.000 0.144
#> GSM750742     1  0.0290     0.8147 0.992 0.000 0.000 0.000 0.008
#> GSM750744     1  0.2127     0.7937 0.892 0.000 0.000 0.000 0.108
#> GSM750750     3  0.0404     0.8591 0.000 0.000 0.988 0.000 0.012
#> GSM549242     1  0.2124     0.7910 0.916 0.000 0.000 0.056 0.028
#> GSM549252     4  0.2233     0.8256 0.104 0.000 0.000 0.892 0.004
#> GSM549253     1  0.0510     0.8081 0.984 0.000 0.000 0.016 0.000
#> GSM549256     1  0.3455     0.6289 0.784 0.000 0.000 0.208 0.008
#> GSM549257     4  0.0693     0.8495 0.012 0.000 0.000 0.980 0.008
#> GSM549263     1  0.0290     0.8113 0.992 0.000 0.000 0.008 0.000
#> GSM549267     3  0.2136     0.8073 0.000 0.000 0.904 0.088 0.008
#> GSM750745     5  0.4307    -0.2504 0.500 0.000 0.000 0.000 0.500
#> GSM549239     1  0.4161     0.4642 0.608 0.000 0.000 0.000 0.392
#> GSM549244     4  0.1478     0.8447 0.064 0.000 0.000 0.936 0.000
#> GSM549249     4  0.1952     0.8369 0.084 0.000 0.000 0.912 0.004
#> GSM549260     1  0.3796     0.6589 0.700 0.000 0.000 0.000 0.300
#> GSM549266     5  0.4256     0.2169 0.000 0.436 0.000 0.000 0.564
#> GSM549293     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM549236     1  0.0963     0.7981 0.964 0.000 0.000 0.036 0.000
#> GSM549238     4  0.4434     0.2372 0.460 0.000 0.000 0.536 0.004
#> GSM549251     1  0.0162     0.8127 0.996 0.000 0.000 0.004 0.000
#> GSM549258     5  0.3774     0.3918 0.296 0.000 0.000 0.000 0.704
#> GSM549264     1  0.0609     0.8144 0.980 0.000 0.000 0.000 0.020
#> GSM549243     1  0.2813     0.7806 0.832 0.000 0.000 0.000 0.168
#> GSM549262     1  0.0290     0.8145 0.992 0.000 0.000 0.000 0.008
#> GSM549278     3  0.5045     0.0680 0.004 0.000 0.508 0.464 0.024
#> GSM549283     2  0.1704     0.8726 0.000 0.928 0.004 0.000 0.068
#> GSM549298     3  0.4026     0.6190 0.000 0.244 0.736 0.000 0.020
#> GSM750741     5  0.2074     0.6328 0.104 0.000 0.000 0.000 0.896
#> GSM549286     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM549241     5  0.2605     0.6097 0.148 0.000 0.000 0.000 0.852
#> GSM549247     5  0.2897     0.6315 0.052 0.020 0.000 0.040 0.888
#> GSM549261     1  0.3561     0.7116 0.740 0.000 0.000 0.000 0.260
#> GSM549270     2  0.0000     0.9187 0.000 1.000 0.000 0.000 0.000
#> GSM549277     2  0.3970     0.6931 0.000 0.744 0.236 0.000 0.020
#> GSM549280     2  0.3527     0.7648 0.000 0.804 0.172 0.000 0.024
#> GSM549281     5  0.4302     0.1011 0.000 0.480 0.000 0.000 0.520
#> GSM549285     3  0.1943     0.8278 0.000 0.056 0.924 0.000 0.020
#> GSM549288     2  0.3194     0.7919 0.000 0.832 0.148 0.000 0.020
#> GSM549292     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM549295     2  0.1740     0.8788 0.000 0.932 0.056 0.000 0.012
#> GSM549297     2  0.0579     0.9131 0.000 0.984 0.008 0.000 0.008
#> GSM750743     1  0.4273     0.3213 0.552 0.000 0.000 0.000 0.448
#> GSM549268     5  0.4307     0.0522 0.000 0.496 0.000 0.000 0.504
#> GSM549290     3  0.2624     0.7826 0.000 0.000 0.872 0.116 0.012
#> GSM549272     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM549276     2  0.0000     0.9187 0.000 1.000 0.000 0.000 0.000
#> GSM549275     5  0.2984     0.6354 0.108 0.032 0.000 0.000 0.860
#> GSM549284     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM750737     4  0.3496     0.7042 0.012 0.000 0.000 0.788 0.200
#> GSM750740     1  0.3395     0.7348 0.764 0.000 0.000 0.000 0.236
#> GSM750747     1  0.3274     0.7483 0.780 0.000 0.000 0.000 0.220
#> GSM750751     2  0.0290     0.9197 0.000 0.992 0.000 0.000 0.008
#> GSM750754     3  0.0451     0.8581 0.000 0.000 0.988 0.004 0.008

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.5041     0.6921 0.000 0.000 0.092 0.696 0.040 0.172
#> GSM549291     3  0.5563     0.2791 0.000 0.000 0.548 0.260 0.000 0.192
#> GSM549274     2  0.0547     0.8572 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM750738     2  0.1492     0.8315 0.000 0.940 0.000 0.024 0.000 0.036
#> GSM750748     5  0.4392     0.4834 0.332 0.000 0.000 0.000 0.628 0.040
#> GSM549240     1  0.4369     0.4761 0.744 0.000 0.000 0.036 0.044 0.176
#> GSM549279     6  0.6039     0.8519 0.344 0.216 0.000 0.004 0.000 0.436
#> GSM549294     2  0.1444     0.8317 0.000 0.928 0.000 0.000 0.000 0.072
#> GSM549300     3  0.5716     0.0629 0.000 0.392 0.444 0.000 0.000 0.164
#> GSM549303     3  0.0363     0.7592 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM549309     3  0.1204     0.7477 0.000 0.000 0.944 0.000 0.000 0.056
#> GSM750753     2  0.1349     0.8449 0.000 0.940 0.004 0.000 0.000 0.056
#> GSM750752     4  0.5641     0.4104 0.000 0.008 0.272 0.560 0.000 0.160
#> GSM549304     2  0.0458     0.8583 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM549305     2  0.0547     0.8589 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM549307     2  0.5277     0.4262 0.000 0.592 0.256 0.000 0.000 0.152
#> GSM549306     3  0.4831     0.5505 0.000 0.168 0.668 0.000 0.000 0.164
#> GSM549308     3  0.2402     0.7280 0.000 0.004 0.856 0.000 0.000 0.140
#> GSM549233     5  0.2809     0.6138 0.004 0.000 0.000 0.128 0.848 0.020
#> GSM549234     4  0.2325     0.7623 0.000 0.000 0.000 0.892 0.060 0.048
#> GSM549250     5  0.1088     0.6863 0.000 0.000 0.000 0.024 0.960 0.016
#> GSM549287     3  0.1913     0.7373 0.000 0.000 0.908 0.012 0.000 0.080
#> GSM750735     1  0.5111     0.5616 0.624 0.000 0.000 0.000 0.224 0.152
#> GSM750736     1  0.3417     0.5684 0.812 0.000 0.000 0.004 0.052 0.132
#> GSM750749     1  0.5238     0.2018 0.560 0.000 0.000 0.004 0.096 0.340
#> GSM549230     5  0.0520     0.6999 0.008 0.000 0.000 0.000 0.984 0.008
#> GSM549231     5  0.0260     0.6971 0.000 0.000 0.000 0.000 0.992 0.008
#> GSM549237     5  0.2679     0.6759 0.096 0.000 0.000 0.004 0.868 0.032
#> GSM549254     4  0.2766     0.7345 0.028 0.000 0.012 0.868 0.000 0.092
#> GSM750734     5  0.4377     0.1434 0.436 0.000 0.000 0.000 0.540 0.024
#> GSM549271     3  0.2264     0.7428 0.004 0.000 0.888 0.012 0.000 0.096
#> GSM549232     4  0.0993     0.7674 0.000 0.000 0.000 0.964 0.012 0.024
#> GSM549246     5  0.5156     0.3092 0.016 0.000 0.004 0.300 0.616 0.064
#> GSM549248     5  0.0891     0.6987 0.024 0.000 0.000 0.000 0.968 0.008
#> GSM549255     4  0.0935     0.7629 0.000 0.000 0.000 0.964 0.004 0.032
#> GSM750746     5  0.4493     0.4610 0.344 0.000 0.000 0.000 0.612 0.044
#> GSM549259     5  0.4591     0.3504 0.408 0.000 0.000 0.000 0.552 0.040
#> GSM549269     2  0.0713     0.8559 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM549273     3  0.1657     0.7539 0.000 0.016 0.928 0.000 0.000 0.056
#> GSM549299     2  0.1531     0.8419 0.000 0.928 0.004 0.000 0.000 0.068
#> GSM549301     3  0.3772     0.6680 0.000 0.068 0.772 0.000 0.000 0.160
#> GSM549310     3  0.6104    -0.0494 0.000 0.020 0.436 0.392 0.000 0.152
#> GSM549311     3  0.0632     0.7591 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM549302     2  0.0458     0.8573 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM549235     5  0.4253     0.5339 0.284 0.000 0.000 0.000 0.672 0.044
#> GSM549245     4  0.0692     0.7657 0.000 0.000 0.000 0.976 0.004 0.020
#> GSM549265     4  0.4710     0.6278 0.004 0.000 0.000 0.672 0.236 0.088
#> GSM549282     3  0.1349     0.7571 0.004 0.000 0.940 0.000 0.000 0.056
#> GSM549296     4  0.5285     0.5097 0.000 0.004 0.220 0.616 0.000 0.160
#> GSM750739     5  0.3778     0.5352 0.288 0.000 0.000 0.000 0.696 0.016
#> GSM750742     5  0.1151     0.6976 0.032 0.000 0.000 0.000 0.956 0.012
#> GSM750744     5  0.3782     0.5616 0.224 0.000 0.000 0.000 0.740 0.036
#> GSM750750     3  0.2278     0.7354 0.004 0.000 0.868 0.000 0.000 0.128
#> GSM549242     5  0.3341     0.6615 0.088 0.000 0.000 0.060 0.836 0.016
#> GSM549252     4  0.3739     0.6979 0.000 0.000 0.000 0.768 0.176 0.056
#> GSM549253     5  0.0717     0.6925 0.000 0.000 0.000 0.016 0.976 0.008
#> GSM549256     5  0.3750     0.5466 0.020 0.000 0.000 0.200 0.764 0.016
#> GSM549257     4  0.1245     0.7683 0.000 0.000 0.000 0.952 0.032 0.016
#> GSM549263     5  0.0520     0.6953 0.000 0.000 0.000 0.008 0.984 0.008
#> GSM549267     3  0.4131     0.6099 0.000 0.000 0.744 0.100 0.000 0.156
#> GSM750745     1  0.3879     0.4605 0.688 0.000 0.000 0.000 0.292 0.020
#> GSM549239     1  0.4520     0.0942 0.520 0.000 0.000 0.000 0.448 0.032
#> GSM549244     4  0.2867     0.7426 0.000 0.000 0.000 0.848 0.112 0.040
#> GSM549249     4  0.3612     0.7076 0.000 0.000 0.000 0.780 0.168 0.052
#> GSM549260     5  0.4792     0.2860 0.408 0.000 0.000 0.012 0.548 0.032
#> GSM549266     6  0.6004     0.8282 0.352 0.240 0.000 0.000 0.000 0.408
#> GSM549293     2  0.0632     0.8554 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM549236     5  0.0993     0.6873 0.000 0.000 0.000 0.024 0.964 0.012
#> GSM549238     5  0.4804    -0.1393 0.000 0.000 0.000 0.456 0.492 0.052
#> GSM549251     5  0.0436     0.6984 0.004 0.000 0.000 0.004 0.988 0.004
#> GSM549258     1  0.3172     0.6259 0.816 0.000 0.000 0.000 0.148 0.036
#> GSM549264     5  0.2189     0.6809 0.060 0.000 0.000 0.004 0.904 0.032
#> GSM549243     5  0.3518     0.5780 0.256 0.000 0.000 0.000 0.732 0.012
#> GSM549262     5  0.1124     0.6977 0.036 0.000 0.000 0.000 0.956 0.008
#> GSM549278     4  0.5961     0.1786 0.004 0.000 0.364 0.440 0.000 0.192
#> GSM549283     2  0.3737     0.6795 0.016 0.772 0.024 0.000 0.000 0.188
#> GSM549298     3  0.4952     0.5285 0.000 0.180 0.652 0.000 0.000 0.168
#> GSM750741     1  0.2772     0.5784 0.864 0.000 0.000 0.004 0.040 0.092
#> GSM549286     2  0.0547     0.8574 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM549241     1  0.2263     0.5960 0.896 0.000 0.000 0.000 0.048 0.056
#> GSM549247     1  0.4441     0.4033 0.728 0.004 0.000 0.040 0.024 0.204
#> GSM549261     5  0.4634     0.3635 0.400 0.000 0.000 0.000 0.556 0.044
#> GSM549270     2  0.1007     0.8535 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM549277     2  0.5446     0.3877 0.000 0.568 0.256 0.000 0.000 0.176
#> GSM549280     2  0.5058     0.4967 0.000 0.636 0.200 0.000 0.000 0.164
#> GSM549281     6  0.5835     0.8822 0.280 0.232 0.000 0.000 0.000 0.488
#> GSM549285     3  0.3166     0.7207 0.004 0.024 0.816 0.000 0.000 0.156
#> GSM549288     2  0.4570     0.6023 0.000 0.700 0.148 0.000 0.000 0.152
#> GSM549292     2  0.0632     0.8566 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM549295     2  0.3118     0.7558 0.000 0.836 0.092 0.000 0.000 0.072
#> GSM549297     2  0.1802     0.8345 0.000 0.916 0.012 0.000 0.000 0.072
#> GSM750743     1  0.4952     0.2265 0.524 0.000 0.000 0.000 0.408 0.068
#> GSM549268     6  0.6011     0.8703 0.264 0.232 0.008 0.000 0.000 0.496
#> GSM549290     3  0.4488     0.5691 0.000 0.000 0.708 0.128 0.000 0.164
#> GSM549272     2  0.0632     0.8566 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM549276     2  0.0458     0.8583 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM549275     1  0.4226     0.4559 0.744 0.032 0.000 0.000 0.032 0.192
#> GSM549284     2  0.0993     0.8581 0.000 0.964 0.012 0.000 0.000 0.024
#> GSM750737     4  0.4343     0.5952 0.188 0.000 0.000 0.724 0.004 0.084
#> GSM750740     5  0.4593     0.4014 0.380 0.000 0.000 0.000 0.576 0.044
#> GSM750747     5  0.4583     0.4091 0.376 0.000 0.000 0.000 0.580 0.044
#> GSM750751     2  0.0713     0.8589 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM750754     3  0.2212     0.7233 0.000 0.000 0.880 0.008 0.000 0.112

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-skmeans-membership-heatmap-5

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)

plot of chunk tab-MAD-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-skmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-MAD-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-skmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> MAD:skmeans 103            0.023    1.72e-05               0.05361   0.0048 2
#> MAD:skmeans 100            0.254    1.13e-04               0.00448   0.0189 3
#> MAD:skmeans  98            0.356    4.21e-05               0.00185   0.0670 4
#> MAD:skmeans  88            0.451    2.78e-04               0.00322   0.1026 5
#> MAD:skmeans  78            0.717    7.20e-05               0.00765   0.1958 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.


MAD:pam

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-pam-collect-plots

The plots are:

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:

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)

plot of chunk MAD-pam-select-partition-number

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.859           0.913       0.963         0.4731 0.525   0.525
#> 3 3 0.641           0.827       0.888         0.3710 0.760   0.570
#> 4 4 0.611           0.590       0.792         0.1342 0.780   0.472
#> 5 5 0.871           0.839       0.931         0.0847 0.891   0.619
#> 6 6 0.830           0.773       0.889         0.0256 0.951   0.771

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0672     0.9607 0.992 0.008
#> GSM549291     1  0.9977     0.0332 0.528 0.472
#> GSM549274     1  0.8555     0.6074 0.720 0.280
#> GSM750738     1  0.9635     0.3512 0.612 0.388
#> GSM750748     1  0.0000     0.9668 1.000 0.000
#> GSM549240     1  0.0000     0.9668 1.000 0.000
#> GSM549279     1  0.2043     0.9410 0.968 0.032
#> GSM549294     2  0.0000     0.9480 0.000 1.000
#> GSM549300     2  0.0000     0.9480 0.000 1.000
#> GSM549303     2  0.0000     0.9480 0.000 1.000
#> GSM549309     2  0.0376     0.9458 0.004 0.996
#> GSM750753     2  0.0000     0.9480 0.000 1.000
#> GSM750752     2  0.3879     0.8934 0.076 0.924
#> GSM549304     2  0.8661     0.6269 0.288 0.712
#> GSM549305     2  0.0000     0.9480 0.000 1.000
#> GSM549307     2  0.0000     0.9480 0.000 1.000
#> GSM549306     2  0.0000     0.9480 0.000 1.000
#> GSM549308     2  0.0000     0.9480 0.000 1.000
#> GSM549233     1  0.0000     0.9668 1.000 0.000
#> GSM549234     1  0.0000     0.9668 1.000 0.000
#> GSM549250     1  0.0000     0.9668 1.000 0.000
#> GSM549287     2  0.0000     0.9480 0.000 1.000
#> GSM750735     1  0.0000     0.9668 1.000 0.000
#> GSM750736     1  0.0000     0.9668 1.000 0.000
#> GSM750749     1  0.0000     0.9668 1.000 0.000
#> GSM549230     1  0.0000     0.9668 1.000 0.000
#> GSM549231     1  0.0000     0.9668 1.000 0.000
#> GSM549237     1  0.0000     0.9668 1.000 0.000
#> GSM549254     1  0.0376     0.9639 0.996 0.004
#> GSM750734     1  0.0000     0.9668 1.000 0.000
#> GSM549271     2  0.0000     0.9480 0.000 1.000
#> GSM549232     1  0.0000     0.9668 1.000 0.000
#> GSM549246     1  0.0000     0.9668 1.000 0.000
#> GSM549248     1  0.0000     0.9668 1.000 0.000
#> GSM549255     1  0.0000     0.9668 1.000 0.000
#> GSM750746     1  0.0000     0.9668 1.000 0.000
#> GSM549259     1  0.0000     0.9668 1.000 0.000
#> GSM549269     1  0.8499     0.6146 0.724 0.276
#> GSM549273     2  0.0000     0.9480 0.000 1.000
#> GSM549299     2  0.5294     0.8520 0.120 0.880
#> GSM549301     2  0.0000     0.9480 0.000 1.000
#> GSM549310     2  0.0000     0.9480 0.000 1.000
#> GSM549311     2  0.0000     0.9480 0.000 1.000
#> GSM549302     2  0.0000     0.9480 0.000 1.000
#> GSM549235     1  0.0000     0.9668 1.000 0.000
#> GSM549245     1  0.0000     0.9668 1.000 0.000
#> GSM549265     1  0.0000     0.9668 1.000 0.000
#> GSM549282     2  0.0672     0.9434 0.008 0.992
#> GSM549296     2  0.8267     0.6749 0.260 0.740
#> GSM750739     1  0.0000     0.9668 1.000 0.000
#> GSM750742     1  0.0000     0.9668 1.000 0.000
#> GSM750744     1  0.0000     0.9668 1.000 0.000
#> GSM750750     2  0.1843     0.9303 0.028 0.972
#> GSM549242     1  0.0000     0.9668 1.000 0.000
#> GSM549252     1  0.0000     0.9668 1.000 0.000
#> GSM549253     1  0.0000     0.9668 1.000 0.000
#> GSM549256     1  0.0000     0.9668 1.000 0.000
#> GSM549257     1  0.0000     0.9668 1.000 0.000
#> GSM549263     1  0.0000     0.9668 1.000 0.000
#> GSM549267     2  0.1633     0.9331 0.024 0.976
#> GSM750745     1  0.0000     0.9668 1.000 0.000
#> GSM549239     1  0.0000     0.9668 1.000 0.000
#> GSM549244     1  0.0000     0.9668 1.000 0.000
#> GSM549249     1  0.0000     0.9668 1.000 0.000
#> GSM549260     1  0.0000     0.9668 1.000 0.000
#> GSM549266     1  0.1843     0.9443 0.972 0.028
#> GSM549293     2  0.8861     0.5957 0.304 0.696
#> GSM549236     1  0.0000     0.9668 1.000 0.000
#> GSM549238     1  0.0000     0.9668 1.000 0.000
#> GSM549251     1  0.0000     0.9668 1.000 0.000
#> GSM549258     1  0.0000     0.9668 1.000 0.000
#> GSM549264     1  0.0000     0.9668 1.000 0.000
#> GSM549243     1  0.0000     0.9668 1.000 0.000
#> GSM549262     1  0.0000     0.9668 1.000 0.000
#> GSM549278     1  0.0376     0.9639 0.996 0.004
#> GSM549283     1  0.7883     0.6858 0.764 0.236
#> GSM549298     2  0.0000     0.9480 0.000 1.000
#> GSM750741     1  0.0000     0.9668 1.000 0.000
#> GSM549286     2  0.0000     0.9480 0.000 1.000
#> GSM549241     1  0.0000     0.9668 1.000 0.000
#> GSM549247     1  0.0000     0.9668 1.000 0.000
#> GSM549261     1  0.0000     0.9668 1.000 0.000
#> GSM549270     2  0.0000     0.9480 0.000 1.000
#> GSM549277     2  0.0000     0.9480 0.000 1.000
#> GSM549280     2  0.0000     0.9480 0.000 1.000
#> GSM549281     1  0.1843     0.9444 0.972 0.028
#> GSM549285     1  0.3879     0.8960 0.924 0.076
#> GSM549288     2  0.0000     0.9480 0.000 1.000
#> GSM549292     2  0.0000     0.9480 0.000 1.000
#> GSM549295     2  0.0000     0.9480 0.000 1.000
#> GSM549297     2  0.0000     0.9480 0.000 1.000
#> GSM750743     1  0.0000     0.9668 1.000 0.000
#> GSM549268     1  0.5294     0.8515 0.880 0.120
#> GSM549290     2  0.6623     0.8022 0.172 0.828
#> GSM549272     2  0.0000     0.9480 0.000 1.000
#> GSM549276     2  0.0000     0.9480 0.000 1.000
#> GSM549275     1  0.0000     0.9668 1.000 0.000
#> GSM549284     2  0.8267     0.6751 0.260 0.740
#> GSM750737     1  0.0000     0.9668 1.000 0.000
#> GSM750740     1  0.0000     0.9668 1.000 0.000
#> GSM750747     1  0.0000     0.9668 1.000 0.000
#> GSM750751     2  0.0000     0.9480 0.000 1.000
#> GSM750754     2  0.9209     0.5412 0.336 0.664

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.1753      0.871 0.048 0.000 0.952
#> GSM549291     3  0.0000      0.853 0.000 0.000 1.000
#> GSM549274     2  0.8740      0.145 0.432 0.460 0.108
#> GSM750738     3  0.6809      0.767 0.156 0.104 0.740
#> GSM750748     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549240     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549279     1  0.0892      0.885 0.980 0.020 0.000
#> GSM549294     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549300     2  0.0424      0.890 0.000 0.992 0.008
#> GSM549303     2  0.2625      0.861 0.000 0.916 0.084
#> GSM549309     2  0.5529      0.634 0.000 0.704 0.296
#> GSM750753     2  0.0000      0.891 0.000 1.000 0.000
#> GSM750752     3  0.4934      0.768 0.024 0.156 0.820
#> GSM549304     2  0.6529      0.691 0.152 0.756 0.092
#> GSM549305     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549307     2  0.0237      0.890 0.000 0.996 0.004
#> GSM549306     2  0.1753      0.878 0.000 0.952 0.048
#> GSM549308     2  0.2625      0.861 0.000 0.916 0.084
#> GSM549233     1  0.4452      0.834 0.808 0.000 0.192
#> GSM549234     3  0.3340      0.870 0.120 0.000 0.880
#> GSM549250     1  0.4235      0.845 0.824 0.000 0.176
#> GSM549287     2  0.5760      0.577 0.000 0.672 0.328
#> GSM750735     1  0.0000      0.895 1.000 0.000 0.000
#> GSM750736     1  0.0592      0.891 0.988 0.000 0.012
#> GSM750749     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549230     1  0.3816      0.862 0.852 0.000 0.148
#> GSM549231     1  0.3752      0.864 0.856 0.000 0.144
#> GSM549237     1  0.3412      0.874 0.876 0.000 0.124
#> GSM549254     3  0.4887      0.817 0.228 0.000 0.772
#> GSM750734     1  0.1031      0.894 0.976 0.000 0.024
#> GSM549271     3  0.4062      0.728 0.000 0.164 0.836
#> GSM549232     3  0.3340      0.870 0.120 0.000 0.880
#> GSM549246     1  0.5591      0.682 0.696 0.000 0.304
#> GSM549248     1  0.3752      0.864 0.856 0.000 0.144
#> GSM549255     3  0.4887      0.817 0.228 0.000 0.772
#> GSM750746     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549269     2  0.6587      0.304 0.424 0.568 0.008
#> GSM549273     2  0.2066      0.873 0.000 0.940 0.060
#> GSM549299     2  0.1529      0.869 0.040 0.960 0.000
#> GSM549301     2  0.1753      0.878 0.000 0.952 0.048
#> GSM549310     3  0.4346      0.733 0.000 0.184 0.816
#> GSM549311     2  0.5291      0.677 0.000 0.732 0.268
#> GSM549302     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549235     1  0.3412      0.872 0.876 0.000 0.124
#> GSM549245     3  0.3038      0.872 0.104 0.000 0.896
#> GSM549265     3  0.1860      0.872 0.052 0.000 0.948
#> GSM549282     2  0.5178      0.717 0.000 0.744 0.256
#> GSM549296     3  0.5263      0.806 0.088 0.084 0.828
#> GSM750739     1  0.0000      0.895 1.000 0.000 0.000
#> GSM750742     1  0.3752      0.864 0.856 0.000 0.144
#> GSM750744     1  0.3551      0.870 0.868 0.000 0.132
#> GSM750750     2  0.4953      0.780 0.016 0.808 0.176
#> GSM549242     1  0.3686      0.866 0.860 0.000 0.140
#> GSM549252     3  0.2625      0.869 0.084 0.000 0.916
#> GSM549253     1  0.4235      0.845 0.824 0.000 0.176
#> GSM549256     1  0.4399      0.829 0.812 0.000 0.188
#> GSM549257     3  0.4796      0.823 0.220 0.000 0.780
#> GSM549263     1  0.4235      0.845 0.824 0.000 0.176
#> GSM549267     3  0.0000      0.853 0.000 0.000 1.000
#> GSM750745     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549244     3  0.2625      0.869 0.084 0.000 0.916
#> GSM549249     3  0.2625      0.869 0.084 0.000 0.916
#> GSM549260     1  0.2066      0.886 0.940 0.000 0.060
#> GSM549266     1  0.1643      0.868 0.956 0.044 0.000
#> GSM549293     2  0.7059      0.650 0.164 0.724 0.112
#> GSM549236     1  0.4235      0.845 0.824 0.000 0.176
#> GSM549238     3  0.5560      0.545 0.300 0.000 0.700
#> GSM549251     1  0.4235      0.845 0.824 0.000 0.176
#> GSM549258     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549264     1  0.3619      0.867 0.864 0.000 0.136
#> GSM549243     1  0.0592      0.895 0.988 0.000 0.012
#> GSM549262     1  0.3752      0.864 0.856 0.000 0.144
#> GSM549278     3  0.2625      0.876 0.084 0.000 0.916
#> GSM549283     1  0.6062      0.302 0.616 0.384 0.000
#> GSM549298     2  0.1753      0.878 0.000 0.952 0.048
#> GSM750741     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549286     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549241     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549247     1  0.4605      0.662 0.796 0.000 0.204
#> GSM549261     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549270     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549277     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549280     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549281     1  0.0747      0.887 0.984 0.016 0.000
#> GSM549285     1  0.3983      0.864 0.852 0.004 0.144
#> GSM549288     2  0.0237      0.890 0.000 0.996 0.004
#> GSM549292     2  0.0237      0.890 0.000 0.996 0.004
#> GSM549295     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549297     2  0.0000      0.891 0.000 1.000 0.000
#> GSM750743     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549268     1  0.5058      0.627 0.756 0.244 0.000
#> GSM549290     3  0.0237      0.852 0.000 0.004 0.996
#> GSM549272     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549276     2  0.0000      0.891 0.000 1.000 0.000
#> GSM549275     1  0.0000      0.895 1.000 0.000 0.000
#> GSM549284     2  0.3619      0.787 0.136 0.864 0.000
#> GSM750737     3  0.4931      0.814 0.232 0.000 0.768
#> GSM750740     1  0.0000      0.895 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.895 1.000 0.000 0.000
#> GSM750751     2  0.0000      0.891 0.000 1.000 0.000
#> GSM750754     3  0.0000      0.853 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.1743     0.5170 0.004 0.000 0.056 0.940
#> GSM549291     4  0.2345     0.4878 0.000 0.000 0.100 0.900
#> GSM549274     2  0.3123     0.7100 0.156 0.844 0.000 0.000
#> GSM750738     2  0.4454     0.5149 0.000 0.692 0.000 0.308
#> GSM750748     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549240     1  0.0336     0.8548 0.992 0.000 0.000 0.008
#> GSM549279     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549294     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549300     3  0.4624     0.6766 0.000 0.340 0.660 0.000
#> GSM549303     3  0.3569     0.7863 0.000 0.196 0.804 0.000
#> GSM549309     3  0.3810     0.7867 0.000 0.188 0.804 0.008
#> GSM750753     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM750752     4  0.6694    -0.0454 0.000 0.392 0.092 0.516
#> GSM549304     2  0.1854     0.8285 0.048 0.940 0.000 0.012
#> GSM549305     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549307     3  0.4585     0.6890 0.000 0.332 0.668 0.000
#> GSM549306     3  0.4356     0.7397 0.000 0.292 0.708 0.000
#> GSM549308     3  0.3569     0.7863 0.000 0.196 0.804 0.000
#> GSM549233     4  0.7080     0.5103 0.236 0.000 0.196 0.568
#> GSM549234     4  0.2345     0.5360 0.100 0.000 0.000 0.900
#> GSM549250     4  0.7080     0.5094 0.236 0.000 0.196 0.568
#> GSM549287     3  0.4225     0.7817 0.000 0.184 0.792 0.024
#> GSM750735     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM750736     1  0.0592     0.8489 0.984 0.000 0.000 0.016
#> GSM750749     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549230     4  0.7479     0.4192 0.324 0.000 0.196 0.480
#> GSM549231     4  0.7479     0.4192 0.324 0.000 0.196 0.480
#> GSM549237     1  0.7172    -0.1390 0.484 0.000 0.140 0.376
#> GSM549254     4  0.4989     0.0487 0.472 0.000 0.000 0.528
#> GSM750734     1  0.4552     0.6120 0.784 0.000 0.044 0.172
#> GSM549271     3  0.4991     0.3914 0.000 0.004 0.608 0.388
#> GSM549232     4  0.2149     0.5392 0.088 0.000 0.000 0.912
#> GSM549246     4  0.7152     0.4795 0.284 0.000 0.172 0.544
#> GSM549248     4  0.7468     0.4244 0.320 0.000 0.196 0.484
#> GSM549255     4  0.4994     0.0338 0.480 0.000 0.000 0.520
#> GSM750746     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549269     2  0.2973     0.7261 0.144 0.856 0.000 0.000
#> GSM549273     3  0.4193     0.7571 0.000 0.268 0.732 0.000
#> GSM549299     2  0.0921     0.8475 0.028 0.972 0.000 0.000
#> GSM549301     3  0.4331     0.7431 0.000 0.288 0.712 0.000
#> GSM549310     4  0.7006    -0.1565 0.000 0.428 0.116 0.456
#> GSM549311     3  0.3810     0.7867 0.000 0.188 0.804 0.008
#> GSM549302     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549235     1  0.7302    -0.1306 0.500 0.000 0.168 0.332
#> GSM549245     4  0.3074     0.5213 0.152 0.000 0.000 0.848
#> GSM549265     4  0.2081     0.5567 0.000 0.000 0.084 0.916
#> GSM549282     3  0.4337     0.7248 0.000 0.140 0.808 0.052
#> GSM549296     4  0.6727    -0.0298 0.000 0.384 0.096 0.520
#> GSM750739     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM750742     4  0.7479     0.4192 0.324 0.000 0.196 0.480
#> GSM750744     1  0.7254    -0.1872 0.468 0.000 0.148 0.384
#> GSM750750     3  0.3810     0.7867 0.000 0.188 0.804 0.008
#> GSM549242     1  0.7024    -0.0625 0.512 0.000 0.128 0.360
#> GSM549252     4  0.0000     0.5409 0.000 0.000 0.000 1.000
#> GSM549253     4  0.7028     0.5131 0.228 0.000 0.196 0.576
#> GSM549256     4  0.7344     0.3204 0.380 0.000 0.160 0.460
#> GSM549257     4  0.4981     0.0647 0.464 0.000 0.000 0.536
#> GSM549263     4  0.7261     0.4823 0.268 0.000 0.196 0.536
#> GSM549267     4  0.4222     0.4214 0.000 0.000 0.272 0.728
#> GSM750745     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549244     4  0.0000     0.5409 0.000 0.000 0.000 1.000
#> GSM549249     4  0.3569     0.5592 0.000 0.000 0.196 0.804
#> GSM549260     1  0.4057     0.6669 0.816 0.000 0.032 0.152
#> GSM549266     1  0.0592     0.8491 0.984 0.016 0.000 0.000
#> GSM549293     2  0.1635     0.8343 0.044 0.948 0.000 0.008
#> GSM549236     4  0.7080     0.5090 0.236 0.000 0.196 0.568
#> GSM549238     4  0.5035     0.5758 0.056 0.000 0.196 0.748
#> GSM549251     4  0.7176     0.4970 0.252 0.000 0.196 0.552
#> GSM549258     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549264     4  0.7479     0.4192 0.324 0.000 0.196 0.480
#> GSM549243     1  0.0921     0.8385 0.972 0.000 0.000 0.028
#> GSM549262     4  0.7479     0.4192 0.324 0.000 0.196 0.480
#> GSM549278     4  0.3581     0.5130 0.116 0.000 0.032 0.852
#> GSM549283     1  0.5057     0.3898 0.648 0.340 0.012 0.000
#> GSM549298     3  0.4356     0.7397 0.000 0.292 0.708 0.000
#> GSM750741     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549286     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549241     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549247     1  0.2530     0.7339 0.888 0.000 0.000 0.112
#> GSM549261     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549270     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549277     2  0.4877     0.0157 0.000 0.592 0.408 0.000
#> GSM549280     2  0.0188     0.8587 0.000 0.996 0.004 0.000
#> GSM549281     1  0.0188     0.8575 0.996 0.004 0.000 0.000
#> GSM549285     3  0.6980     0.1157 0.164 0.000 0.572 0.264
#> GSM549288     2  0.4989    -0.2531 0.000 0.528 0.472 0.000
#> GSM549292     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549295     2  0.3074     0.6957 0.000 0.848 0.152 0.000
#> GSM549297     2  0.3400     0.6533 0.000 0.820 0.180 0.000
#> GSM750743     1  0.1211     0.8295 0.960 0.000 0.000 0.040
#> GSM549268     1  0.2081     0.7847 0.916 0.084 0.000 0.000
#> GSM549290     4  0.4406     0.4528 0.000 0.000 0.300 0.700
#> GSM549272     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM549275     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM549284     2  0.1807     0.8303 0.052 0.940 0.008 0.000
#> GSM750737     4  0.4998     0.0167 0.488 0.000 0.000 0.512
#> GSM750740     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.8598 1.000 0.000 0.000 0.000
#> GSM750751     2  0.0000     0.8610 0.000 1.000 0.000 0.000
#> GSM750754     3  0.4916     0.0509 0.000 0.000 0.576 0.424

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM549291     4  0.0162     0.9465 0.000 0.000 0.004 0.996 0.000
#> GSM549274     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM750738     4  0.4307     0.0101 0.000 0.500 0.000 0.500 0.000
#> GSM750748     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549279     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549294     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549300     3  0.2074     0.8277 0.000 0.104 0.896 0.000 0.000
#> GSM549303     3  0.0000     0.8835 0.000 0.000 1.000 0.000 0.000
#> GSM549309     3  0.0000     0.8835 0.000 0.000 1.000 0.000 0.000
#> GSM750753     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM750752     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM549304     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549305     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549307     3  0.2127     0.8247 0.000 0.108 0.892 0.000 0.000
#> GSM549306     3  0.0794     0.8802 0.000 0.028 0.972 0.000 0.000
#> GSM549308     3  0.0000     0.8835 0.000 0.000 1.000 0.000 0.000
#> GSM549233     5  0.0404     0.8348 0.012 0.000 0.000 0.000 0.988
#> GSM549234     4  0.0162     0.9463 0.000 0.000 0.000 0.996 0.004
#> GSM549250     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549287     3  0.0404     0.8794 0.000 0.000 0.988 0.000 0.012
#> GSM750735     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM750736     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM750749     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549230     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549231     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549237     5  0.3752     0.6045 0.292 0.000 0.000 0.000 0.708
#> GSM549254     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM750734     1  0.3857     0.5135 0.688 0.000 0.000 0.000 0.312
#> GSM549271     4  0.2127     0.8559 0.000 0.000 0.108 0.892 0.000
#> GSM549232     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM549246     5  0.3276     0.7591 0.132 0.000 0.000 0.032 0.836
#> GSM549248     5  0.0162     0.8378 0.004 0.000 0.000 0.000 0.996
#> GSM549255     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM750746     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549269     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549273     3  0.0290     0.8837 0.000 0.008 0.992 0.000 0.000
#> GSM549299     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549301     3  0.0794     0.8802 0.000 0.028 0.972 0.000 0.000
#> GSM549310     4  0.0880     0.9279 0.000 0.000 0.032 0.968 0.000
#> GSM549311     3  0.0000     0.8835 0.000 0.000 1.000 0.000 0.000
#> GSM549302     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549235     5  0.3774     0.6088 0.296 0.000 0.000 0.000 0.704
#> GSM549245     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM549265     5  0.4210     0.3039 0.000 0.000 0.000 0.412 0.588
#> GSM549282     3  0.1544     0.8453 0.000 0.000 0.932 0.000 0.068
#> GSM549296     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM750739     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM750742     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM750744     5  0.3534     0.6648 0.256 0.000 0.000 0.000 0.744
#> GSM750750     3  0.0000     0.8835 0.000 0.000 1.000 0.000 0.000
#> GSM549242     5  0.4242     0.3328 0.428 0.000 0.000 0.000 0.572
#> GSM549252     4  0.0404     0.9407 0.000 0.000 0.000 0.988 0.012
#> GSM549253     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549256     5  0.3534     0.6541 0.256 0.000 0.000 0.000 0.744
#> GSM549257     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM549263     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549267     5  0.6219     0.0953 0.000 0.000 0.140 0.424 0.436
#> GSM750745     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM549249     5  0.0290     0.8356 0.000 0.000 0.000 0.008 0.992
#> GSM549260     1  0.1851     0.8783 0.912 0.000 0.000 0.000 0.088
#> GSM549266     1  0.0404     0.9526 0.988 0.012 0.000 0.000 0.000
#> GSM549293     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549236     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549238     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549251     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549258     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549264     5  0.0162     0.8379 0.004 0.000 0.000 0.000 0.996
#> GSM549243     1  0.0703     0.9424 0.976 0.000 0.000 0.000 0.024
#> GSM549262     5  0.0000     0.8387 0.000 0.000 0.000 0.000 1.000
#> GSM549278     4  0.0000     0.9485 0.000 0.000 0.000 1.000 0.000
#> GSM549283     1  0.4067     0.5599 0.692 0.300 0.008 0.000 0.000
#> GSM549298     3  0.0794     0.8802 0.000 0.028 0.972 0.000 0.000
#> GSM750741     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549286     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549241     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.0609     0.9458 0.980 0.000 0.000 0.020 0.000
#> GSM549261     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549270     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549277     2  0.4242     0.2272 0.000 0.572 0.428 0.000 0.000
#> GSM549280     2  0.0609     0.9436 0.000 0.980 0.020 0.000 0.000
#> GSM549281     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549285     3  0.5148     0.1917 0.040 0.000 0.528 0.000 0.432
#> GSM549288     3  0.4256     0.2152 0.000 0.436 0.564 0.000 0.000
#> GSM549292     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549295     2  0.2424     0.8314 0.000 0.868 0.132 0.000 0.000
#> GSM549297     2  0.2471     0.8271 0.000 0.864 0.136 0.000 0.000
#> GSM750743     1  0.0703     0.9433 0.976 0.000 0.000 0.000 0.024
#> GSM549268     1  0.2127     0.8567 0.892 0.108 0.000 0.000 0.000
#> GSM549290     5  0.5446     0.5095 0.000 0.000 0.100 0.272 0.628
#> GSM549272     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549276     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM549275     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM549284     2  0.0290     0.9527 0.000 0.992 0.008 0.000 0.000
#> GSM750737     4  0.1732     0.8669 0.080 0.000 0.000 0.920 0.000
#> GSM750740     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9611 1.000 0.000 0.000 0.000 0.000
#> GSM750751     2  0.0000     0.9587 0.000 1.000 0.000 0.000 0.000
#> GSM750754     3  0.5002     0.4507 0.000 0.000 0.636 0.052 0.312

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549291     4  0.2340     0.8092 0.000 0.000 0.000 0.852 0.000 0.148
#> GSM549274     2  0.0000     0.8857 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750738     2  0.3789     0.2446 0.000 0.584 0.000 0.416 0.000 0.000
#> GSM750748     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549279     1  0.2048     0.8717 0.880 0.000 0.120 0.000 0.000 0.000
#> GSM549294     2  0.3221     0.7335 0.000 0.736 0.264 0.000 0.000 0.000
#> GSM549300     3  0.3418     0.7334 0.000 0.032 0.784 0.000 0.000 0.184
#> GSM549303     6  0.2454     0.5262 0.000 0.000 0.160 0.000 0.000 0.840
#> GSM549309     6  0.0000     0.6800 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM750753     2  0.0632     0.8796 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM750752     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549304     2  0.0000     0.8857 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549305     2  0.2491     0.8118 0.000 0.836 0.164 0.000 0.000 0.000
#> GSM549307     3  0.3247     0.7244 0.000 0.036 0.808 0.000 0.000 0.156
#> GSM549306     3  0.3261     0.7301 0.000 0.016 0.780 0.000 0.000 0.204
#> GSM549308     3  0.3221     0.6615 0.000 0.000 0.736 0.000 0.000 0.264
#> GSM549233     5  0.0508     0.8311 0.012 0.000 0.000 0.004 0.984 0.000
#> GSM549234     4  0.0146     0.9670 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM549250     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549287     6  0.0000     0.6800 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM750735     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750736     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750749     1  0.2378     0.8516 0.848 0.000 0.152 0.000 0.000 0.000
#> GSM549230     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549231     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549237     5  0.3371     0.5975 0.292 0.000 0.000 0.000 0.708 0.000
#> GSM549254     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM750734     1  0.3464     0.5292 0.688 0.000 0.000 0.000 0.312 0.000
#> GSM549271     6  0.3998    -0.0165 0.000 0.000 0.004 0.492 0.000 0.504
#> GSM549232     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549246     5  0.3014     0.7378 0.132 0.000 0.000 0.036 0.832 0.000
#> GSM549248     5  0.0146     0.8357 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM549255     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM750746     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549269     2  0.0260     0.8850 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM549273     6  0.3714     0.0928 0.000 0.004 0.340 0.000 0.000 0.656
#> GSM549299     2  0.2527     0.8068 0.000 0.832 0.168 0.000 0.000 0.000
#> GSM549301     3  0.3348     0.7212 0.000 0.016 0.768 0.000 0.000 0.216
#> GSM549310     4  0.1714     0.8834 0.000 0.000 0.000 0.908 0.000 0.092
#> GSM549311     6  0.0000     0.6800 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM549302     2  0.0000     0.8857 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549235     5  0.3390     0.5898 0.296 0.000 0.000 0.000 0.704 0.000
#> GSM549245     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549265     5  0.3789     0.2639 0.000 0.000 0.000 0.416 0.584 0.000
#> GSM549282     6  0.2882     0.5500 0.000 0.000 0.180 0.000 0.008 0.812
#> GSM549296     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM750739     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750742     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM750744     5  0.3175     0.6429 0.256 0.000 0.000 0.000 0.744 0.000
#> GSM750750     3  0.3747     0.4283 0.000 0.000 0.604 0.000 0.000 0.396
#> GSM549242     5  0.3944     0.3412 0.428 0.000 0.000 0.004 0.568 0.000
#> GSM549252     4  0.0363     0.9596 0.000 0.000 0.000 0.988 0.012 0.000
#> GSM549253     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549256     5  0.3314     0.6316 0.256 0.000 0.000 0.004 0.740 0.000
#> GSM549257     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549263     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549267     6  0.4769     0.5306 0.000 0.000 0.000 0.104 0.240 0.656
#> GSM750745     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549249     5  0.0260     0.8326 0.000 0.000 0.000 0.008 0.992 0.000
#> GSM549260     1  0.1806     0.8645 0.908 0.000 0.000 0.004 0.088 0.000
#> GSM549266     1  0.2454     0.8461 0.840 0.000 0.160 0.000 0.000 0.000
#> GSM549293     2  0.0000     0.8857 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549236     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549238     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549251     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549258     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549264     5  0.0146     0.8358 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM549243     1  0.0632     0.9189 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM549262     5  0.0000     0.8368 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM549278     4  0.0000     0.9700 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549283     1  0.5319     0.4432 0.596 0.220 0.184 0.000 0.000 0.000
#> GSM549298     3  0.3261     0.7301 0.000 0.016 0.780 0.000 0.000 0.204
#> GSM750741     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549286     2  0.0000     0.8857 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549241     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.0547     0.9212 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM549261     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549270     2  0.1714     0.8585 0.000 0.908 0.092 0.000 0.000 0.000
#> GSM549277     3  0.3615     0.4983 0.000 0.292 0.700 0.000 0.000 0.008
#> GSM549280     2  0.2558     0.7962 0.000 0.840 0.156 0.000 0.000 0.004
#> GSM549281     1  0.2378     0.8516 0.848 0.000 0.152 0.000 0.000 0.000
#> GSM549285     5  0.6953     0.1872 0.140 0.000 0.200 0.000 0.492 0.168
#> GSM549288     3  0.4827     0.5886 0.000 0.236 0.652 0.000 0.000 0.112
#> GSM549292     2  0.0000     0.8857 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     2  0.4004     0.4383 0.000 0.620 0.368 0.000 0.000 0.012
#> GSM549297     3  0.3804     0.1578 0.000 0.424 0.576 0.000 0.000 0.000
#> GSM750743     1  0.0632     0.9205 0.976 0.000 0.000 0.000 0.024 0.000
#> GSM549268     1  0.4134     0.7070 0.708 0.052 0.240 0.000 0.000 0.000
#> GSM549290     6  0.5185     0.4121 0.000 0.000 0.000 0.108 0.328 0.564
#> GSM549272     2  0.1663     0.8599 0.000 0.912 0.088 0.000 0.000 0.000
#> GSM549276     2  0.0146     0.8855 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM549275     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549284     2  0.0000     0.8857 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750737     4  0.1556     0.8657 0.080 0.000 0.000 0.920 0.000 0.000
#> GSM750740     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9332 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750751     2  0.1556     0.8644 0.000 0.920 0.080 0.000 0.000 0.000
#> GSM750754     6  0.0603     0.6788 0.000 0.000 0.000 0.004 0.016 0.980

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-pam-membership-heatmap-5

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)

plot of chunk tab-MAD-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-pam-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-MAD-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-pam-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> MAD:pam 101           0.0862    2.55e-06               0.39832   0.0424 2
#> MAD:pam 100           0.2692    4.77e-05               0.18665   0.0169 3
#> MAD:pam  73           0.3417    1.65e-05               0.01393   0.4680 4
#> MAD:pam  95           0.1875    1.52e-05               0.00391   0.0242 5
#> MAD:pam  91           0.4196    8.17e-05               0.00620   0.1615 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.


MAD:mclust*

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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)

plot of chunk MAD-mclust-collect-plots

The plots are:

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:

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)

plot of chunk MAD-mclust-select-partition-number

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.777           0.918       0.960         0.4975 0.496   0.496
#> 3 3 0.882           0.879       0.939         0.2986 0.775   0.576
#> 4 4 0.822           0.848       0.914         0.1128 0.915   0.761
#> 5 5 0.665           0.624       0.783         0.0793 0.846   0.528
#> 6 6 0.911           0.893       0.939         0.0608 0.911   0.626

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 6

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     2  0.5946      0.831 0.144 0.856
#> GSM549291     2  0.0376      0.971 0.004 0.996
#> GSM549274     2  0.0000      0.973 0.000 1.000
#> GSM750738     2  0.2236      0.949 0.036 0.964
#> GSM750748     1  0.0376      0.940 0.996 0.004
#> GSM549240     1  0.0376      0.940 0.996 0.004
#> GSM549279     2  0.2043      0.950 0.032 0.968
#> GSM549294     2  0.0000      0.973 0.000 1.000
#> GSM549300     2  0.0000      0.973 0.000 1.000
#> GSM549303     2  0.0376      0.971 0.004 0.996
#> GSM549309     2  0.0376      0.971 0.004 0.996
#> GSM750753     2  0.0000      0.973 0.000 1.000
#> GSM750752     2  0.4562      0.889 0.096 0.904
#> GSM549304     2  0.0000      0.973 0.000 1.000
#> GSM549305     2  0.0000      0.973 0.000 1.000
#> GSM549307     2  0.0000      0.973 0.000 1.000
#> GSM549306     2  0.0000      0.973 0.000 1.000
#> GSM549308     2  0.0000      0.973 0.000 1.000
#> GSM549233     1  0.0000      0.939 1.000 0.000
#> GSM549234     1  0.6712      0.817 0.824 0.176
#> GSM549250     1  0.0000      0.939 1.000 0.000
#> GSM549287     2  0.0376      0.971 0.004 0.996
#> GSM750735     1  0.0376      0.940 0.996 0.004
#> GSM750736     1  0.0938      0.936 0.988 0.012
#> GSM750749     2  0.6973      0.761 0.188 0.812
#> GSM549230     1  0.0000      0.939 1.000 0.000
#> GSM549231     1  0.0000      0.939 1.000 0.000
#> GSM549237     1  0.0376      0.940 0.996 0.004
#> GSM549254     2  0.9896      0.148 0.440 0.560
#> GSM750734     1  0.0376      0.940 0.996 0.004
#> GSM549271     2  0.0376      0.971 0.004 0.996
#> GSM549232     1  0.6712      0.817 0.824 0.176
#> GSM549246     1  0.7883      0.737 0.764 0.236
#> GSM549248     1  0.0376      0.940 0.996 0.004
#> GSM549255     1  0.6712      0.817 0.824 0.176
#> GSM750746     1  0.0376      0.940 0.996 0.004
#> GSM549259     1  0.0376      0.940 0.996 0.004
#> GSM549269     2  0.0000      0.973 0.000 1.000
#> GSM549273     2  0.0376      0.971 0.004 0.996
#> GSM549299     2  0.0000      0.973 0.000 1.000
#> GSM549301     2  0.0000      0.973 0.000 1.000
#> GSM549310     2  0.0672      0.970 0.008 0.992
#> GSM549311     2  0.0376      0.971 0.004 0.996
#> GSM549302     2  0.0000      0.973 0.000 1.000
#> GSM549235     1  0.0376      0.940 0.996 0.004
#> GSM549245     1  0.6712      0.817 0.824 0.176
#> GSM549265     1  0.9922      0.255 0.552 0.448
#> GSM549282     2  0.0376      0.971 0.004 0.996
#> GSM549296     2  0.5408      0.857 0.124 0.876
#> GSM750739     1  0.0376      0.940 0.996 0.004
#> GSM750742     1  0.0376      0.940 0.996 0.004
#> GSM750744     1  0.0376      0.940 0.996 0.004
#> GSM750750     2  0.0000      0.973 0.000 1.000
#> GSM549242     1  0.0000      0.939 1.000 0.000
#> GSM549252     1  0.6712      0.817 0.824 0.176
#> GSM549253     1  0.0000      0.939 1.000 0.000
#> GSM549256     1  0.0000      0.939 1.000 0.000
#> GSM549257     1  0.6712      0.817 0.824 0.176
#> GSM549263     1  0.0000      0.939 1.000 0.000
#> GSM549267     2  0.0376      0.971 0.004 0.996
#> GSM750745     1  0.0376      0.940 0.996 0.004
#> GSM549239     1  0.0376      0.940 0.996 0.004
#> GSM549244     1  0.6712      0.817 0.824 0.176
#> GSM549249     1  0.6712      0.817 0.824 0.176
#> GSM549260     1  0.0000      0.939 1.000 0.000
#> GSM549266     2  0.2603      0.939 0.044 0.956
#> GSM549293     2  0.0000      0.973 0.000 1.000
#> GSM549236     1  0.0000      0.939 1.000 0.000
#> GSM549238     1  0.0672      0.936 0.992 0.008
#> GSM549251     1  0.0000      0.939 1.000 0.000
#> GSM549258     1  0.0376      0.940 0.996 0.004
#> GSM549264     1  0.0376      0.940 0.996 0.004
#> GSM549243     1  0.0376      0.940 0.996 0.004
#> GSM549262     1  0.0376      0.940 0.996 0.004
#> GSM549278     2  0.5294      0.862 0.120 0.880
#> GSM549283     2  0.0000      0.973 0.000 1.000
#> GSM549298     2  0.0000      0.973 0.000 1.000
#> GSM750741     1  0.0376      0.940 0.996 0.004
#> GSM549286     2  0.0000      0.973 0.000 1.000
#> GSM549241     1  0.0376      0.940 0.996 0.004
#> GSM549247     1  0.6801      0.817 0.820 0.180
#> GSM549261     1  0.0376      0.940 0.996 0.004
#> GSM549270     2  0.0000      0.973 0.000 1.000
#> GSM549277     2  0.0000      0.973 0.000 1.000
#> GSM549280     2  0.0000      0.973 0.000 1.000
#> GSM549281     2  0.2043      0.950 0.032 0.968
#> GSM549285     2  0.0000      0.973 0.000 1.000
#> GSM549288     2  0.0000      0.973 0.000 1.000
#> GSM549292     2  0.0000      0.973 0.000 1.000
#> GSM549295     2  0.0000      0.973 0.000 1.000
#> GSM549297     2  0.0000      0.973 0.000 1.000
#> GSM750743     1  0.0376      0.940 0.996 0.004
#> GSM549268     2  0.0672      0.968 0.008 0.992
#> GSM549290     2  0.0376      0.971 0.004 0.996
#> GSM549272     2  0.0000      0.973 0.000 1.000
#> GSM549276     2  0.0000      0.973 0.000 1.000
#> GSM549275     1  0.8081      0.697 0.752 0.248
#> GSM549284     2  0.0000      0.973 0.000 1.000
#> GSM750737     1  0.6712      0.817 0.824 0.176
#> GSM750740     1  0.0376      0.940 0.996 0.004
#> GSM750747     1  0.0376      0.940 0.996 0.004
#> GSM750751     2  0.0000      0.973 0.000 1.000
#> GSM750754     2  0.0376      0.971 0.004 0.996

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.1765     0.8354 0.004 0.040 0.956
#> GSM549291     3  0.1753     0.8364 0.000 0.048 0.952
#> GSM549274     2  0.1031     0.9582 0.024 0.976 0.000
#> GSM750738     1  0.8118     0.4342 0.648 0.164 0.188
#> GSM750748     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549240     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549279     2  0.1163     0.9555 0.028 0.972 0.000
#> GSM549294     2  0.0424     0.9670 0.008 0.992 0.000
#> GSM549300     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549303     3  0.2356     0.8297 0.000 0.072 0.928
#> GSM549309     3  0.2356     0.8297 0.000 0.072 0.928
#> GSM750753     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM750752     3  0.1753     0.8364 0.000 0.048 0.952
#> GSM549304     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549305     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549307     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549306     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549308     2  0.1860     0.9253 0.000 0.948 0.052
#> GSM549233     1  0.1529     0.9389 0.960 0.000 0.040
#> GSM549234     3  0.5529     0.6465 0.296 0.000 0.704
#> GSM549250     1  0.1031     0.9490 0.976 0.000 0.024
#> GSM549287     3  0.2356     0.8297 0.000 0.072 0.928
#> GSM750735     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM750736     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM750749     2  0.3340     0.8468 0.120 0.880 0.000
#> GSM549230     1  0.1031     0.9490 0.976 0.000 0.024
#> GSM549231     1  0.1031     0.9490 0.976 0.000 0.024
#> GSM549237     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549254     3  0.7164     0.3036 0.452 0.024 0.524
#> GSM750734     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549271     3  0.2356     0.8297 0.000 0.072 0.928
#> GSM549232     3  0.5254     0.6835 0.264 0.000 0.736
#> GSM549246     1  0.6819    -0.1673 0.512 0.012 0.476
#> GSM549248     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549255     3  0.5465     0.6566 0.288 0.000 0.712
#> GSM750746     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549259     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549269     2  0.1031     0.9582 0.024 0.976 0.000
#> GSM549273     2  0.6302     0.0425 0.000 0.520 0.480
#> GSM549299     2  0.0237     0.9689 0.004 0.996 0.000
#> GSM549301     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549310     3  0.1753     0.8364 0.000 0.048 0.952
#> GSM549311     3  0.2356     0.8297 0.000 0.072 0.928
#> GSM549302     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549235     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549245     3  0.5016     0.7046 0.240 0.000 0.760
#> GSM549265     3  0.2902     0.8196 0.064 0.016 0.920
#> GSM549282     3  0.4555     0.6929 0.000 0.200 0.800
#> GSM549296     3  0.1753     0.8364 0.000 0.048 0.952
#> GSM750739     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM750742     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM750744     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM750750     2  0.1964     0.9217 0.000 0.944 0.056
#> GSM549242     1  0.1289     0.9443 0.968 0.000 0.032
#> GSM549252     3  0.5859     0.5670 0.344 0.000 0.656
#> GSM549253     1  0.1031     0.9490 0.976 0.000 0.024
#> GSM549256     1  0.1753     0.9320 0.952 0.000 0.048
#> GSM549257     3  0.5859     0.5669 0.344 0.000 0.656
#> GSM549263     1  0.1031     0.9490 0.976 0.000 0.024
#> GSM549267     3  0.2165     0.8328 0.000 0.064 0.936
#> GSM750745     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549239     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549244     3  0.5291     0.6795 0.268 0.000 0.732
#> GSM549249     3  0.5560     0.6407 0.300 0.000 0.700
#> GSM549260     1  0.0747     0.9528 0.984 0.000 0.016
#> GSM549266     2  0.1163     0.9555 0.028 0.972 0.000
#> GSM549293     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549236     1  0.1031     0.9490 0.976 0.000 0.024
#> GSM549238     1  0.2625     0.8985 0.916 0.000 0.084
#> GSM549251     1  0.1031     0.9490 0.976 0.000 0.024
#> GSM549258     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549264     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549243     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549262     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549278     3  0.1753     0.8364 0.000 0.048 0.952
#> GSM549283     2  0.1031     0.9582 0.024 0.976 0.000
#> GSM549298     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM750741     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549286     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549241     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549247     1  0.1031     0.9377 0.976 0.024 0.000
#> GSM549261     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549270     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549277     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549280     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549281     2  0.1163     0.9555 0.028 0.972 0.000
#> GSM549285     2  0.1031     0.9582 0.024 0.976 0.000
#> GSM549288     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549292     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549295     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549297     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM750743     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM549268     2  0.1163     0.9555 0.028 0.972 0.000
#> GSM549290     3  0.2066     0.8340 0.000 0.060 0.940
#> GSM549272     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549276     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM549275     1  0.3192     0.8276 0.888 0.112 0.000
#> GSM549284     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM750737     1  0.2878     0.8895 0.904 0.000 0.096
#> GSM750740     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM750747     1  0.0000     0.9592 1.000 0.000 0.000
#> GSM750751     2  0.0000     0.9706 0.000 1.000 0.000
#> GSM750754     3  0.2356     0.8297 0.000 0.072 0.928

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.2011     0.8483 0.000 0.000 0.080 0.920
#> GSM549291     4  0.3569     0.7947 0.000 0.000 0.196 0.804
#> GSM549274     2  0.1305     0.9106 0.000 0.960 0.036 0.004
#> GSM750738     2  0.9271     0.0572 0.248 0.392 0.092 0.268
#> GSM750748     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549240     1  0.0524     0.9368 0.988 0.000 0.008 0.004
#> GSM549279     2  0.2441     0.8957 0.020 0.920 0.056 0.004
#> GSM549294     2  0.0188     0.9130 0.000 0.996 0.004 0.000
#> GSM549300     3  0.4356     0.6831 0.000 0.292 0.708 0.000
#> GSM549303     3  0.1637     0.7720 0.000 0.000 0.940 0.060
#> GSM549309     3  0.1867     0.7616 0.000 0.000 0.928 0.072
#> GSM750753     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM750752     4  0.2216     0.8430 0.000 0.000 0.092 0.908
#> GSM549304     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549305     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549307     2  0.3942     0.6826 0.000 0.764 0.236 0.000
#> GSM549306     3  0.3907     0.7782 0.000 0.232 0.768 0.000
#> GSM549308     3  0.2760     0.8403 0.000 0.128 0.872 0.000
#> GSM549233     1  0.4072     0.7370 0.748 0.000 0.000 0.252
#> GSM549234     4  0.0000     0.8547 0.000 0.000 0.000 1.000
#> GSM549250     1  0.2973     0.8585 0.856 0.000 0.000 0.144
#> GSM549287     4  0.4804     0.6037 0.000 0.000 0.384 0.616
#> GSM750735     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM750736     1  0.0376     0.9382 0.992 0.000 0.004 0.004
#> GSM750749     2  0.5096     0.6488 0.184 0.756 0.056 0.004
#> GSM549230     1  0.2011     0.9058 0.920 0.000 0.000 0.080
#> GSM549231     1  0.1211     0.9254 0.960 0.000 0.000 0.040
#> GSM549237     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549254     4  0.1833     0.8382 0.032 0.000 0.024 0.944
#> GSM750734     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549271     4  0.4790     0.6095 0.000 0.000 0.380 0.620
#> GSM549232     4  0.0000     0.8547 0.000 0.000 0.000 1.000
#> GSM549246     4  0.4046     0.7319 0.124 0.000 0.048 0.828
#> GSM549248     1  0.0336     0.9382 0.992 0.000 0.000 0.008
#> GSM549255     4  0.0000     0.8547 0.000 0.000 0.000 1.000
#> GSM750746     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0592     0.9136 0.000 0.984 0.016 0.000
#> GSM549273     3  0.1545     0.8256 0.000 0.040 0.952 0.008
#> GSM549299     2  0.0921     0.9119 0.000 0.972 0.028 0.000
#> GSM549301     3  0.3569     0.8112 0.000 0.196 0.804 0.000
#> GSM549310     4  0.2921     0.8232 0.000 0.000 0.140 0.860
#> GSM549311     3  0.1792     0.7658 0.000 0.000 0.932 0.068
#> GSM549302     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549235     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549245     4  0.0000     0.8547 0.000 0.000 0.000 1.000
#> GSM549265     4  0.1807     0.8501 0.008 0.000 0.052 0.940
#> GSM549282     3  0.2816     0.8287 0.000 0.064 0.900 0.036
#> GSM549296     4  0.2081     0.8450 0.000 0.000 0.084 0.916
#> GSM750739     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM750750     3  0.2081     0.8411 0.000 0.084 0.916 0.000
#> GSM549242     1  0.2647     0.8798 0.880 0.000 0.000 0.120
#> GSM549252     4  0.0000     0.8547 0.000 0.000 0.000 1.000
#> GSM549253     1  0.2469     0.8878 0.892 0.000 0.000 0.108
#> GSM549256     1  0.4072     0.7381 0.748 0.000 0.000 0.252
#> GSM549257     4  0.0469     0.8472 0.012 0.000 0.000 0.988
#> GSM549263     1  0.2081     0.9034 0.916 0.000 0.000 0.084
#> GSM549267     4  0.4761     0.6206 0.000 0.000 0.372 0.628
#> GSM750745     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549244     4  0.0000     0.8547 0.000 0.000 0.000 1.000
#> GSM549249     4  0.0000     0.8547 0.000 0.000 0.000 1.000
#> GSM549260     1  0.1557     0.9190 0.944 0.000 0.000 0.056
#> GSM549266     2  0.2441     0.8957 0.020 0.920 0.056 0.004
#> GSM549293     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549236     1  0.2647     0.8790 0.880 0.000 0.000 0.120
#> GSM549238     1  0.4843     0.4928 0.604 0.000 0.000 0.396
#> GSM549251     1  0.2149     0.9010 0.912 0.000 0.000 0.088
#> GSM549258     1  0.0376     0.9382 0.992 0.000 0.004 0.004
#> GSM549264     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549243     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549278     4  0.2345     0.8452 0.000 0.000 0.100 0.900
#> GSM549283     2  0.1474     0.9030 0.000 0.948 0.052 0.000
#> GSM549298     3  0.3873     0.7828 0.000 0.228 0.772 0.000
#> GSM750741     1  0.0524     0.9368 0.988 0.000 0.008 0.004
#> GSM549286     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549241     1  0.0376     0.9382 0.992 0.000 0.004 0.004
#> GSM549247     1  0.0657     0.9349 0.984 0.000 0.012 0.004
#> GSM549261     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549270     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549277     2  0.1474     0.9030 0.000 0.948 0.052 0.000
#> GSM549280     2  0.1474     0.9030 0.000 0.948 0.052 0.000
#> GSM549281     2  0.2441     0.8957 0.020 0.920 0.056 0.004
#> GSM549285     2  0.4454     0.5556 0.000 0.692 0.308 0.000
#> GSM549288     2  0.2011     0.8891 0.000 0.920 0.080 0.000
#> GSM549292     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549295     2  0.2149     0.8825 0.000 0.912 0.088 0.000
#> GSM549297     2  0.0707     0.9129 0.000 0.980 0.020 0.000
#> GSM750743     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM549268     2  0.2328     0.8980 0.016 0.924 0.056 0.004
#> GSM549290     4  0.4730     0.6293 0.000 0.000 0.364 0.636
#> GSM549272     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549276     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM549275     1  0.3292     0.8203 0.868 0.112 0.016 0.004
#> GSM549284     2  0.1792     0.8956 0.000 0.932 0.068 0.000
#> GSM750737     1  0.4661     0.5924 0.652 0.000 0.000 0.348
#> GSM750740     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9401 1.000 0.000 0.000 0.000
#> GSM750751     2  0.0000     0.9132 0.000 1.000 0.000 0.000
#> GSM750754     4  0.4804     0.6037 0.000 0.000 0.384 0.616

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.4351     0.5525 0.000 0.000 0.132 0.768 0.100
#> GSM549291     3  0.5373     0.5618 0.000 0.000 0.632 0.276 0.092
#> GSM549274     2  0.3291     0.6727 0.000 0.840 0.120 0.000 0.040
#> GSM750738     3  0.8446     0.1939 0.004 0.252 0.376 0.196 0.172
#> GSM750748     1  0.1121     0.8197 0.956 0.000 0.000 0.000 0.044
#> GSM549240     1  0.2561     0.7591 0.856 0.000 0.000 0.000 0.144
#> GSM549279     2  0.7672     0.3015 0.060 0.404 0.308 0.000 0.228
#> GSM549294     2  0.0404     0.7132 0.000 0.988 0.000 0.000 0.012
#> GSM549300     3  0.5691    -0.1248 0.000 0.444 0.476 0.000 0.080
#> GSM549303     3  0.0162     0.6654 0.000 0.000 0.996 0.004 0.000
#> GSM549309     3  0.0451     0.6661 0.000 0.000 0.988 0.004 0.008
#> GSM750753     2  0.0451     0.7134 0.000 0.988 0.008 0.000 0.004
#> GSM750752     4  0.5768    -0.3038 0.000 0.000 0.428 0.484 0.088
#> GSM549304     2  0.0609     0.7095 0.000 0.980 0.000 0.000 0.020
#> GSM549305     2  0.0290     0.7110 0.000 0.992 0.000 0.000 0.008
#> GSM549307     2  0.5547     0.3902 0.000 0.564 0.356 0.000 0.080
#> GSM549306     3  0.4876     0.4705 0.000 0.220 0.700 0.000 0.080
#> GSM549308     3  0.3459     0.6112 0.000 0.116 0.832 0.000 0.052
#> GSM549233     4  0.5354     0.3804 0.108 0.000 0.000 0.652 0.240
#> GSM549234     4  0.1544     0.7626 0.000 0.000 0.000 0.932 0.068
#> GSM549250     5  0.5761     0.7828 0.184 0.000 0.000 0.196 0.620
#> GSM549287     3  0.4851     0.6312 0.000 0.000 0.712 0.196 0.092
#> GSM750735     1  0.0880     0.8282 0.968 0.000 0.000 0.000 0.032
#> GSM750736     1  0.2773     0.7424 0.836 0.000 0.000 0.000 0.164
#> GSM750749     1  0.6911     0.3110 0.520 0.232 0.028 0.000 0.220
#> GSM549230     5  0.5579     0.8992 0.264 0.000 0.000 0.116 0.620
#> GSM549231     5  0.5751     0.8577 0.348 0.000 0.000 0.100 0.552
#> GSM549237     1  0.4421     0.4188 0.748 0.000 0.000 0.068 0.184
#> GSM549254     4  0.1990     0.7701 0.004 0.000 0.028 0.928 0.040
#> GSM750734     1  0.1121     0.8197 0.956 0.000 0.000 0.000 0.044
#> GSM549271     3  0.4914     0.6274 0.000 0.000 0.704 0.204 0.092
#> GSM549232     4  0.0671     0.7629 0.000 0.000 0.004 0.980 0.016
#> GSM549246     4  0.2177     0.7525 0.004 0.000 0.008 0.908 0.080
#> GSM549248     5  0.5717     0.8389 0.368 0.000 0.000 0.092 0.540
#> GSM549255     4  0.0703     0.7757 0.000 0.000 0.000 0.976 0.024
#> GSM750746     1  0.1043     0.8216 0.960 0.000 0.000 0.000 0.040
#> GSM549259     1  0.0794     0.8295 0.972 0.000 0.000 0.000 0.028
#> GSM549269     2  0.0693     0.7133 0.000 0.980 0.008 0.000 0.012
#> GSM549273     3  0.2370     0.6464 0.000 0.056 0.904 0.000 0.040
#> GSM549299     2  0.4646     0.5967 0.000 0.712 0.228 0.000 0.060
#> GSM549301     3  0.3888     0.5878 0.000 0.136 0.800 0.000 0.064
#> GSM549310     3  0.5816     0.3234 0.000 0.000 0.468 0.440 0.092
#> GSM549311     3  0.0324     0.6655 0.000 0.000 0.992 0.004 0.004
#> GSM549302     2  0.0510     0.7107 0.000 0.984 0.000 0.000 0.016
#> GSM549235     1  0.1121     0.8197 0.956 0.000 0.000 0.000 0.044
#> GSM549245     4  0.0880     0.7762 0.000 0.000 0.000 0.968 0.032
#> GSM549265     4  0.2411     0.7299 0.000 0.000 0.008 0.884 0.108
#> GSM549282     3  0.2554     0.6424 0.000 0.072 0.892 0.000 0.036
#> GSM549296     4  0.5747    -0.2670 0.000 0.000 0.408 0.504 0.088
#> GSM750739     1  0.1197     0.8215 0.952 0.000 0.000 0.000 0.048
#> GSM750742     5  0.5760     0.8390 0.368 0.000 0.000 0.096 0.536
#> GSM750744     1  0.1197     0.8165 0.952 0.000 0.000 0.000 0.048
#> GSM750750     3  0.3112     0.6208 0.000 0.100 0.856 0.000 0.044
#> GSM549242     1  0.6581    -0.3289 0.468 0.000 0.000 0.252 0.280
#> GSM549252     4  0.2020     0.7413 0.000 0.000 0.000 0.900 0.100
#> GSM549253     5  0.5666     0.8874 0.244 0.000 0.000 0.136 0.620
#> GSM549256     4  0.5240     0.3987 0.092 0.000 0.000 0.656 0.252
#> GSM549257     4  0.1792     0.7535 0.000 0.000 0.000 0.916 0.084
#> GSM549263     5  0.5599     0.9000 0.260 0.000 0.000 0.120 0.620
#> GSM549267     3  0.5032     0.6168 0.000 0.000 0.688 0.220 0.092
#> GSM750745     1  0.0794     0.8289 0.972 0.000 0.000 0.000 0.028
#> GSM549239     1  0.0609     0.8279 0.980 0.000 0.000 0.000 0.020
#> GSM549244     4  0.0290     0.7739 0.000 0.000 0.000 0.992 0.008
#> GSM549249     4  0.0510     0.7755 0.000 0.000 0.000 0.984 0.016
#> GSM549260     1  0.3304     0.6447 0.816 0.000 0.000 0.016 0.168
#> GSM549266     2  0.7757     0.2960 0.068 0.400 0.304 0.000 0.228
#> GSM549293     2  0.0609     0.7095 0.000 0.980 0.000 0.000 0.020
#> GSM549236     5  0.5666     0.8874 0.244 0.000 0.000 0.136 0.620
#> GSM549238     4  0.3616     0.6402 0.032 0.000 0.000 0.804 0.164
#> GSM549251     5  0.5599     0.9000 0.260 0.000 0.000 0.120 0.620
#> GSM549258     1  0.1341     0.8170 0.944 0.000 0.000 0.000 0.056
#> GSM549264     1  0.2909     0.6688 0.848 0.000 0.000 0.012 0.140
#> GSM549243     1  0.1121     0.8197 0.956 0.000 0.000 0.000 0.044
#> GSM549262     5  0.5663     0.8113 0.384 0.000 0.000 0.084 0.532
#> GSM549278     3  0.6207     0.3234 0.000 0.000 0.460 0.400 0.140
#> GSM549283     2  0.6262     0.4028 0.000 0.504 0.332 0.000 0.164
#> GSM549298     3  0.4905     0.4635 0.000 0.224 0.696 0.000 0.080
#> GSM750741     1  0.2891     0.7304 0.824 0.000 0.000 0.000 0.176
#> GSM549286     2  0.0000     0.7125 0.000 1.000 0.000 0.000 0.000
#> GSM549241     1  0.1270     0.8188 0.948 0.000 0.000 0.000 0.052
#> GSM549247     1  0.2848     0.7504 0.840 0.000 0.004 0.000 0.156
#> GSM549261     1  0.0703     0.8291 0.976 0.000 0.000 0.000 0.024
#> GSM549270     2  0.0290     0.7110 0.000 0.992 0.000 0.000 0.008
#> GSM549277     2  0.6202     0.3436 0.000 0.496 0.356 0.000 0.148
#> GSM549280     2  0.4820     0.4856 0.000 0.632 0.332 0.000 0.036
#> GSM549281     2  0.7566     0.3215 0.052 0.416 0.304 0.000 0.228
#> GSM549285     3  0.6205     0.0796 0.000 0.332 0.512 0.000 0.156
#> GSM549288     2  0.5396     0.4369 0.000 0.588 0.340 0.000 0.072
#> GSM549292     2  0.0510     0.7107 0.000 0.984 0.000 0.000 0.016
#> GSM549295     2  0.5382     0.4443 0.000 0.592 0.336 0.000 0.072
#> GSM549297     2  0.3421     0.6256 0.000 0.788 0.204 0.000 0.008
#> GSM750743     1  0.0609     0.8275 0.980 0.000 0.000 0.000 0.020
#> GSM549268     2  0.7356     0.3266 0.036 0.424 0.312 0.000 0.228
#> GSM549290     3  0.5115     0.6027 0.000 0.000 0.676 0.232 0.092
#> GSM549272     2  0.0000     0.7125 0.000 1.000 0.000 0.000 0.000
#> GSM549276     2  0.0162     0.7119 0.000 0.996 0.000 0.000 0.004
#> GSM549275     1  0.3282     0.7088 0.804 0.008 0.000 0.000 0.188
#> GSM549284     2  0.4820     0.4943 0.000 0.632 0.332 0.000 0.036
#> GSM750737     4  0.4455     0.5631 0.068 0.000 0.000 0.744 0.188
#> GSM750740     1  0.0703     0.8292 0.976 0.000 0.000 0.000 0.024
#> GSM750747     1  0.0794     0.8256 0.972 0.000 0.000 0.000 0.028
#> GSM750751     2  0.0162     0.7124 0.000 0.996 0.000 0.000 0.004
#> GSM750754     3  0.4851     0.6312 0.000 0.000 0.712 0.196 0.092

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.1124      0.915 0.000 0.000 0.000 0.956 0.036 0.008
#> GSM549291     6  0.3990      0.512 0.000 0.000 0.016 0.304 0.004 0.676
#> GSM549274     2  0.0790      0.950 0.000 0.968 0.032 0.000 0.000 0.000
#> GSM750738     4  0.4002      0.673 0.000 0.212 0.016 0.748 0.008 0.016
#> GSM750748     1  0.1075      0.960 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM549240     1  0.0622      0.951 0.980 0.000 0.000 0.000 0.008 0.012
#> GSM549279     2  0.2756      0.888 0.084 0.872 0.028 0.000 0.000 0.016
#> GSM549294     2  0.0146      0.959 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM549300     3  0.0632      0.917 0.000 0.024 0.976 0.000 0.000 0.000
#> GSM549303     6  0.0632      0.928 0.000 0.000 0.024 0.000 0.000 0.976
#> GSM549309     6  0.0547      0.931 0.000 0.000 0.020 0.000 0.000 0.980
#> GSM750753     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750752     4  0.1693      0.889 0.000 0.000 0.020 0.932 0.004 0.044
#> GSM549304     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549305     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549307     3  0.0790      0.916 0.000 0.032 0.968 0.000 0.000 0.000
#> GSM549306     3  0.0806      0.918 0.000 0.020 0.972 0.000 0.000 0.008
#> GSM549308     3  0.1594      0.902 0.000 0.016 0.932 0.000 0.000 0.052
#> GSM549233     5  0.2730      0.749 0.000 0.000 0.000 0.192 0.808 0.000
#> GSM549234     4  0.0291      0.927 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549250     5  0.0146      0.887 0.000 0.000 0.000 0.004 0.996 0.000
#> GSM549287     6  0.0603      0.932 0.000 0.000 0.016 0.004 0.000 0.980
#> GSM750735     1  0.0547      0.960 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM750736     1  0.0363      0.950 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM750749     1  0.1026      0.944 0.968 0.008 0.012 0.000 0.004 0.008
#> GSM549230     5  0.0146      0.890 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM549231     5  0.1327      0.876 0.064 0.000 0.000 0.000 0.936 0.000
#> GSM549237     5  0.3843      0.184 0.452 0.000 0.000 0.000 0.548 0.000
#> GSM549254     4  0.0291      0.926 0.004 0.000 0.000 0.992 0.004 0.000
#> GSM750734     1  0.1075      0.960 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM549271     6  0.0717      0.931 0.000 0.000 0.016 0.008 0.000 0.976
#> GSM549232     4  0.0146      0.927 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM549246     4  0.3215      0.711 0.000 0.000 0.000 0.756 0.240 0.004
#> GSM549248     5  0.1501      0.870 0.076 0.000 0.000 0.000 0.924 0.000
#> GSM549255     4  0.0146      0.927 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM750746     1  0.1075      0.960 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM549259     1  0.0713      0.962 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM549269     2  0.0632      0.951 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM549273     3  0.3578      0.493 0.000 0.000 0.660 0.000 0.000 0.340
#> GSM549299     2  0.0146      0.959 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM549301     3  0.1003      0.917 0.000 0.020 0.964 0.000 0.000 0.016
#> GSM549310     4  0.3936      0.574 0.000 0.000 0.020 0.700 0.004 0.276
#> GSM549311     6  0.0547      0.931 0.000 0.000 0.020 0.000 0.000 0.980
#> GSM549302     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549235     1  0.1141      0.958 0.948 0.000 0.000 0.000 0.052 0.000
#> GSM549245     4  0.0146      0.927 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM549265     4  0.1411      0.903 0.000 0.000 0.000 0.936 0.060 0.004
#> GSM549282     6  0.2653      0.788 0.000 0.012 0.144 0.000 0.000 0.844
#> GSM549296     4  0.1478      0.898 0.000 0.000 0.020 0.944 0.004 0.032
#> GSM750739     1  0.1075      0.960 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM750742     5  0.1814      0.854 0.100 0.000 0.000 0.000 0.900 0.000
#> GSM750744     1  0.3288      0.641 0.724 0.000 0.000 0.000 0.276 0.000
#> GSM750750     3  0.1719      0.897 0.000 0.016 0.924 0.000 0.000 0.060
#> GSM549242     5  0.0692      0.883 0.004 0.000 0.000 0.020 0.976 0.000
#> GSM549252     4  0.0291      0.927 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549253     5  0.0146      0.890 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM549256     5  0.2823      0.729 0.000 0.000 0.000 0.204 0.796 0.000
#> GSM549257     4  0.0291      0.927 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549263     5  0.0146      0.890 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM549267     6  0.0717      0.931 0.000 0.000 0.016 0.008 0.000 0.976
#> GSM750745     1  0.0937      0.961 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM549239     1  0.1075      0.960 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM549244     4  0.0291      0.927 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549249     4  0.0291      0.927 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM549260     5  0.1501      0.864 0.076 0.000 0.000 0.000 0.924 0.000
#> GSM549266     2  0.2756      0.888 0.084 0.872 0.028 0.000 0.000 0.016
#> GSM549293     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549236     5  0.0146      0.890 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM549238     4  0.0458      0.925 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM549251     5  0.0146      0.890 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM549258     1  0.0508      0.952 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM549264     1  0.1267      0.951 0.940 0.000 0.000 0.000 0.060 0.000
#> GSM549243     1  0.1075      0.960 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM549262     5  0.1814      0.854 0.100 0.000 0.000 0.000 0.900 0.000
#> GSM549278     4  0.3125      0.829 0.000 0.000 0.000 0.836 0.084 0.080
#> GSM549283     2  0.0858      0.948 0.004 0.968 0.028 0.000 0.000 0.000
#> GSM549298     3  0.0806      0.918 0.000 0.020 0.972 0.000 0.000 0.008
#> GSM750741     1  0.0363      0.950 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM549286     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549241     1  0.0508      0.952 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM549247     1  0.0508      0.952 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM549261     1  0.0458      0.959 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM549270     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549277     3  0.2442      0.821 0.004 0.144 0.852 0.000 0.000 0.000
#> GSM549280     2  0.2416      0.833 0.000 0.844 0.156 0.000 0.000 0.000
#> GSM549281     2  0.2756      0.888 0.084 0.872 0.028 0.000 0.000 0.016
#> GSM549285     3  0.0870      0.914 0.004 0.012 0.972 0.000 0.000 0.012
#> GSM549288     3  0.2135      0.842 0.000 0.128 0.872 0.000 0.000 0.000
#> GSM549292     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     3  0.1663      0.886 0.000 0.088 0.912 0.000 0.000 0.000
#> GSM549297     2  0.0260      0.958 0.000 0.992 0.008 0.000 0.000 0.000
#> GSM750743     1  0.0937      0.961 0.960 0.000 0.000 0.000 0.040 0.000
#> GSM549268     2  0.2649      0.895 0.076 0.880 0.028 0.000 0.000 0.016
#> GSM549290     6  0.1003      0.924 0.000 0.000 0.016 0.020 0.000 0.964
#> GSM549272     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549276     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549275     1  0.0717      0.943 0.976 0.000 0.008 0.000 0.000 0.016
#> GSM549284     2  0.2320      0.847 0.000 0.864 0.132 0.000 0.000 0.004
#> GSM750737     4  0.1010      0.917 0.004 0.000 0.000 0.960 0.036 0.000
#> GSM750740     1  0.0713      0.962 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM750747     1  0.1075      0.960 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM750751     2  0.0000      0.960 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750754     6  0.0603      0.932 0.000 0.000 0.016 0.004 0.000 0.980

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-mclust-membership-heatmap-5

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)

plot of chunk tab-MAD-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-mclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-MAD-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-mclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> MAD:mclust 101           0.0174    1.66e-04              0.205841  0.00149 2
#> MAD:mclust  99           0.2861    2.89e-04              0.000889  0.01015 3
#> MAD:mclust 101           0.2312    1.13e-05              0.000295  0.01346 4
#> MAD:mclust  78           0.5721    1.38e-04              0.036036  0.20844 5
#> MAD:mclust 101           0.7063    1.12e-04              0.010675  0.06549 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.


MAD:NMF**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk MAD-NMF-collect-plots

The plots are:

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:

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)

plot of chunk MAD-NMF-select-partition-number

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.965       0.986         0.5028 0.496   0.496
#> 3 3 0.793           0.822       0.917         0.2798 0.829   0.669
#> 4 4 0.806           0.815       0.905         0.1570 0.799   0.506
#> 5 5 0.729           0.716       0.854         0.0582 0.888   0.610
#> 6 6 0.699           0.515       0.737         0.0456 0.919   0.664

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      0.995 1.000 0.000
#> GSM549291     2  0.9909      0.230 0.444 0.556
#> GSM549274     2  0.0000      0.975 0.000 1.000
#> GSM750738     2  0.0000      0.975 0.000 1.000
#> GSM750748     1  0.0000      0.995 1.000 0.000
#> GSM549240     1  0.0000      0.995 1.000 0.000
#> GSM549279     2  0.0938      0.965 0.012 0.988
#> GSM549294     2  0.0000      0.975 0.000 1.000
#> GSM549300     2  0.0000      0.975 0.000 1.000
#> GSM549303     2  0.0000      0.975 0.000 1.000
#> GSM549309     2  0.0000      0.975 0.000 1.000
#> GSM750753     2  0.0000      0.975 0.000 1.000
#> GSM750752     2  0.0000      0.975 0.000 1.000
#> GSM549304     2  0.0000      0.975 0.000 1.000
#> GSM549305     2  0.0000      0.975 0.000 1.000
#> GSM549307     2  0.0000      0.975 0.000 1.000
#> GSM549306     2  0.0000      0.975 0.000 1.000
#> GSM549308     2  0.0000      0.975 0.000 1.000
#> GSM549233     1  0.0000      0.995 1.000 0.000
#> GSM549234     1  0.0000      0.995 1.000 0.000
#> GSM549250     1  0.0000      0.995 1.000 0.000
#> GSM549287     2  0.0000      0.975 0.000 1.000
#> GSM750735     1  0.0000      0.995 1.000 0.000
#> GSM750736     1  0.0000      0.995 1.000 0.000
#> GSM750749     1  0.0000      0.995 1.000 0.000
#> GSM549230     1  0.0000      0.995 1.000 0.000
#> GSM549231     1  0.0000      0.995 1.000 0.000
#> GSM549237     1  0.0000      0.995 1.000 0.000
#> GSM549254     1  0.0000      0.995 1.000 0.000
#> GSM750734     1  0.0000      0.995 1.000 0.000
#> GSM549271     2  0.0000      0.975 0.000 1.000
#> GSM549232     1  0.0000      0.995 1.000 0.000
#> GSM549246     1  0.0000      0.995 1.000 0.000
#> GSM549248     1  0.0000      0.995 1.000 0.000
#> GSM549255     1  0.0000      0.995 1.000 0.000
#> GSM750746     1  0.0000      0.995 1.000 0.000
#> GSM549259     1  0.0000      0.995 1.000 0.000
#> GSM549269     2  0.0000      0.975 0.000 1.000
#> GSM549273     2  0.0000      0.975 0.000 1.000
#> GSM549299     2  0.0000      0.975 0.000 1.000
#> GSM549301     2  0.0000      0.975 0.000 1.000
#> GSM549310     2  0.0000      0.975 0.000 1.000
#> GSM549311     2  0.0000      0.975 0.000 1.000
#> GSM549302     2  0.0000      0.975 0.000 1.000
#> GSM549235     1  0.0000      0.995 1.000 0.000
#> GSM549245     1  0.0000      0.995 1.000 0.000
#> GSM549265     1  0.0000      0.995 1.000 0.000
#> GSM549282     2  0.0000      0.975 0.000 1.000
#> GSM549296     2  0.0000      0.975 0.000 1.000
#> GSM750739     1  0.0000      0.995 1.000 0.000
#> GSM750742     1  0.0000      0.995 1.000 0.000
#> GSM750744     1  0.0000      0.995 1.000 0.000
#> GSM750750     2  0.0000      0.975 0.000 1.000
#> GSM549242     1  0.0000      0.995 1.000 0.000
#> GSM549252     1  0.0000      0.995 1.000 0.000
#> GSM549253     1  0.0000      0.995 1.000 0.000
#> GSM549256     1  0.0000      0.995 1.000 0.000
#> GSM549257     1  0.0000      0.995 1.000 0.000
#> GSM549263     1  0.0000      0.995 1.000 0.000
#> GSM549267     2  0.2043      0.947 0.032 0.968
#> GSM750745     1  0.0000      0.995 1.000 0.000
#> GSM549239     1  0.0000      0.995 1.000 0.000
#> GSM549244     1  0.0000      0.995 1.000 0.000
#> GSM549249     1  0.0000      0.995 1.000 0.000
#> GSM549260     1  0.0000      0.995 1.000 0.000
#> GSM549266     2  0.0376      0.972 0.004 0.996
#> GSM549293     2  0.0000      0.975 0.000 1.000
#> GSM549236     1  0.0000      0.995 1.000 0.000
#> GSM549238     1  0.0000      0.995 1.000 0.000
#> GSM549251     1  0.0000      0.995 1.000 0.000
#> GSM549258     1  0.0000      0.995 1.000 0.000
#> GSM549264     1  0.0000      0.995 1.000 0.000
#> GSM549243     1  0.0000      0.995 1.000 0.000
#> GSM549262     1  0.0000      0.995 1.000 0.000
#> GSM549278     1  0.1633      0.971 0.976 0.024
#> GSM549283     2  0.0000      0.975 0.000 1.000
#> GSM549298     2  0.0000      0.975 0.000 1.000
#> GSM750741     1  0.0000      0.995 1.000 0.000
#> GSM549286     2  0.0000      0.975 0.000 1.000
#> GSM549241     1  0.0000      0.995 1.000 0.000
#> GSM549247     1  0.0000      0.995 1.000 0.000
#> GSM549261     1  0.0000      0.995 1.000 0.000
#> GSM549270     2  0.0000      0.975 0.000 1.000
#> GSM549277     2  0.0000      0.975 0.000 1.000
#> GSM549280     2  0.0000      0.975 0.000 1.000
#> GSM549281     2  0.0376      0.972 0.004 0.996
#> GSM549285     2  0.0376      0.972 0.004 0.996
#> GSM549288     2  0.0000      0.975 0.000 1.000
#> GSM549292     2  0.0000      0.975 0.000 1.000
#> GSM549295     2  0.0000      0.975 0.000 1.000
#> GSM549297     2  0.0000      0.975 0.000 1.000
#> GSM750743     1  0.0000      0.995 1.000 0.000
#> GSM549268     2  0.0000      0.975 0.000 1.000
#> GSM549290     2  0.9754      0.333 0.408 0.592
#> GSM549272     2  0.0000      0.975 0.000 1.000
#> GSM549276     2  0.0000      0.975 0.000 1.000
#> GSM549275     1  0.7674      0.703 0.776 0.224
#> GSM549284     2  0.0000      0.975 0.000 1.000
#> GSM750737     1  0.0000      0.995 1.000 0.000
#> GSM750740     1  0.0000      0.995 1.000 0.000
#> GSM750747     1  0.0000      0.995 1.000 0.000
#> GSM750751     2  0.0000      0.975 0.000 1.000
#> GSM750754     2  0.8386      0.640 0.268 0.732

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.5948     0.3382 0.360 0.000 0.640
#> GSM549291     3  0.0747     0.8745 0.016 0.000 0.984
#> GSM549274     2  0.0000     0.8736 0.000 1.000 0.000
#> GSM750738     2  0.0237     0.8752 0.000 0.996 0.004
#> GSM750748     1  0.0000     0.9312 1.000 0.000 0.000
#> GSM549240     1  0.4750     0.7281 0.784 0.216 0.000
#> GSM549279     2  0.1411     0.8503 0.036 0.964 0.000
#> GSM549294     2  0.0424     0.8765 0.000 0.992 0.008
#> GSM549300     3  0.5882     0.4475 0.000 0.348 0.652
#> GSM549303     3  0.1031     0.8807 0.000 0.024 0.976
#> GSM549309     3  0.0000     0.8835 0.000 0.000 1.000
#> GSM750753     2  0.2066     0.8615 0.000 0.940 0.060
#> GSM750752     3  0.0892     0.8822 0.000 0.020 0.980
#> GSM549304     2  0.1031     0.8782 0.000 0.976 0.024
#> GSM549305     2  0.1411     0.8751 0.000 0.964 0.036
#> GSM549307     2  0.6299     0.0715 0.000 0.524 0.476
#> GSM549306     3  0.4504     0.7225 0.000 0.196 0.804
#> GSM549308     3  0.1411     0.8754 0.000 0.036 0.964
#> GSM549233     1  0.1163     0.9315 0.972 0.000 0.028
#> GSM549234     1  0.2448     0.9113 0.924 0.000 0.076
#> GSM549250     1  0.1753     0.9257 0.952 0.000 0.048
#> GSM549287     3  0.0000     0.8835 0.000 0.000 1.000
#> GSM750735     1  0.0747     0.9272 0.984 0.016 0.000
#> GSM750736     1  0.6095     0.3937 0.608 0.392 0.000
#> GSM750749     1  0.1289     0.9207 0.968 0.032 0.000
#> GSM549230     1  0.1289     0.9306 0.968 0.000 0.032
#> GSM549231     1  0.1529     0.9286 0.960 0.000 0.040
#> GSM549237     1  0.0892     0.9324 0.980 0.000 0.020
#> GSM549254     1  0.1964     0.9214 0.944 0.000 0.056
#> GSM750734     1  0.0000     0.9312 1.000 0.000 0.000
#> GSM549271     3  0.0424     0.8848 0.000 0.008 0.992
#> GSM549232     1  0.3879     0.8463 0.848 0.000 0.152
#> GSM549246     1  0.2959     0.8947 0.900 0.000 0.100
#> GSM549248     1  0.0424     0.9323 0.992 0.000 0.008
#> GSM549255     1  0.2711     0.9036 0.912 0.000 0.088
#> GSM750746     1  0.0424     0.9297 0.992 0.008 0.000
#> GSM549259     1  0.1643     0.9135 0.956 0.044 0.000
#> GSM549269     2  0.0237     0.8719 0.004 0.996 0.000
#> GSM549273     3  0.2165     0.8576 0.000 0.064 0.936
#> GSM549299     2  0.1643     0.8713 0.000 0.956 0.044
#> GSM549301     3  0.3412     0.8045 0.000 0.124 0.876
#> GSM549310     3  0.1289     0.8783 0.000 0.032 0.968
#> GSM549311     3  0.0237     0.8844 0.000 0.004 0.996
#> GSM549302     2  0.0892     0.8783 0.000 0.980 0.020
#> GSM549235     1  0.0237     0.9319 0.996 0.000 0.004
#> GSM549245     1  0.1964     0.9226 0.944 0.000 0.056
#> GSM549265     1  0.4654     0.7780 0.792 0.000 0.208
#> GSM549282     3  0.0000     0.8835 0.000 0.000 1.000
#> GSM549296     3  0.0424     0.8848 0.000 0.008 0.992
#> GSM750739     1  0.0424     0.9297 0.992 0.008 0.000
#> GSM750742     1  0.1031     0.9318 0.976 0.000 0.024
#> GSM750744     1  0.0424     0.9323 0.992 0.000 0.008
#> GSM750750     3  0.0424     0.8848 0.000 0.008 0.992
#> GSM549242     1  0.0747     0.9325 0.984 0.000 0.016
#> GSM549252     1  0.3038     0.8909 0.896 0.000 0.104
#> GSM549253     1  0.1411     0.9296 0.964 0.000 0.036
#> GSM549256     1  0.0892     0.9323 0.980 0.000 0.020
#> GSM549257     1  0.1643     0.9273 0.956 0.000 0.044
#> GSM549263     1  0.1529     0.9286 0.960 0.000 0.040
#> GSM549267     3  0.0424     0.8795 0.008 0.000 0.992
#> GSM750745     1  0.1411     0.9184 0.964 0.036 0.000
#> GSM549239     1  0.0592     0.9285 0.988 0.012 0.000
#> GSM549244     1  0.3752     0.8547 0.856 0.000 0.144
#> GSM549249     1  0.3482     0.8701 0.872 0.000 0.128
#> GSM549260     1  0.0237     0.9319 0.996 0.000 0.004
#> GSM549266     2  0.1163     0.8564 0.028 0.972 0.000
#> GSM549293     2  0.0592     0.8778 0.000 0.988 0.012
#> GSM549236     1  0.1643     0.9273 0.956 0.000 0.044
#> GSM549238     1  0.2261     0.9162 0.932 0.000 0.068
#> GSM549251     1  0.1289     0.9306 0.968 0.000 0.032
#> GSM549258     1  0.2448     0.8907 0.924 0.076 0.000
#> GSM549264     1  0.0424     0.9325 0.992 0.000 0.008
#> GSM549243     1  0.0237     0.9305 0.996 0.004 0.000
#> GSM549262     1  0.0892     0.9323 0.980 0.000 0.020
#> GSM549278     3  0.2796     0.7988 0.092 0.000 0.908
#> GSM549283     2  0.1163     0.8776 0.000 0.972 0.028
#> GSM549298     3  0.5138     0.6397 0.000 0.252 0.748
#> GSM750741     1  0.5859     0.5034 0.656 0.344 0.000
#> GSM549286     2  0.1163     0.8775 0.000 0.972 0.028
#> GSM549241     1  0.6274     0.2156 0.544 0.456 0.000
#> GSM549247     2  0.5859     0.4120 0.344 0.656 0.000
#> GSM549261     1  0.1964     0.9053 0.944 0.056 0.000
#> GSM549270     2  0.1964     0.8641 0.000 0.944 0.056
#> GSM549277     2  0.6154     0.2930 0.000 0.592 0.408
#> GSM549280     2  0.6235     0.2126 0.000 0.564 0.436
#> GSM549281     2  0.0983     0.8680 0.016 0.980 0.004
#> GSM549285     3  0.1860     0.8670 0.000 0.052 0.948
#> GSM549288     3  0.6305     0.0147 0.000 0.484 0.516
#> GSM549292     2  0.0592     0.8778 0.000 0.988 0.012
#> GSM549295     2  0.6126     0.3179 0.000 0.600 0.400
#> GSM549297     2  0.2448     0.8488 0.000 0.924 0.076
#> GSM750743     1  0.0424     0.9297 0.992 0.008 0.000
#> GSM549268     2  0.1182     0.8743 0.012 0.976 0.012
#> GSM549290     3  0.0747     0.8742 0.016 0.000 0.984
#> GSM549272     2  0.0747     0.8781 0.000 0.984 0.016
#> GSM549276     2  0.1411     0.8751 0.000 0.964 0.036
#> GSM549275     2  0.4346     0.6855 0.184 0.816 0.000
#> GSM549284     2  0.3619     0.7958 0.000 0.864 0.136
#> GSM750737     1  0.0424     0.9297 0.992 0.008 0.000
#> GSM750740     1  0.0592     0.9285 0.988 0.012 0.000
#> GSM750747     1  0.0424     0.9297 0.992 0.008 0.000
#> GSM750751     2  0.1031     0.8782 0.000 0.976 0.024
#> GSM750754     3  0.0592     0.8771 0.012 0.000 0.988

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.4175     0.6772 0.012 0.000 0.212 0.776
#> GSM549291     3  0.4877     0.3162 0.000 0.000 0.592 0.408
#> GSM549274     2  0.0376     0.9100 0.000 0.992 0.004 0.004
#> GSM750738     4  0.4406     0.5145 0.000 0.300 0.000 0.700
#> GSM750748     1  0.0376     0.9323 0.992 0.000 0.004 0.004
#> GSM549240     2  0.5665     0.6443 0.176 0.716 0.000 0.108
#> GSM549279     2  0.1545     0.8995 0.040 0.952 0.008 0.000
#> GSM549294     2  0.0817     0.9121 0.000 0.976 0.024 0.000
#> GSM549300     3  0.2814     0.8001 0.000 0.132 0.868 0.000
#> GSM549303     3  0.1042     0.8394 0.000 0.008 0.972 0.020
#> GSM549309     3  0.0817     0.8360 0.000 0.000 0.976 0.024
#> GSM750753     2  0.1302     0.9071 0.000 0.956 0.044 0.000
#> GSM750752     4  0.1174     0.8662 0.000 0.020 0.012 0.968
#> GSM549304     2  0.0779     0.9115 0.000 0.980 0.016 0.004
#> GSM549305     2  0.1022     0.9110 0.000 0.968 0.032 0.000
#> GSM549307     3  0.3764     0.7264 0.000 0.216 0.784 0.000
#> GSM549306     3  0.1792     0.8331 0.000 0.068 0.932 0.000
#> GSM549308     3  0.0817     0.8411 0.000 0.024 0.976 0.000
#> GSM549233     4  0.5105     0.2445 0.432 0.000 0.004 0.564
#> GSM549234     4  0.0524     0.8769 0.008 0.000 0.004 0.988
#> GSM549250     1  0.4050     0.7907 0.808 0.000 0.024 0.168
#> GSM549287     3  0.1302     0.8281 0.000 0.000 0.956 0.044
#> GSM750735     1  0.1398     0.9194 0.956 0.040 0.000 0.004
#> GSM750736     2  0.5646     0.5173 0.296 0.656 0.000 0.048
#> GSM750749     1  0.2124     0.8902 0.924 0.068 0.008 0.000
#> GSM549230     1  0.1677     0.9259 0.948 0.000 0.012 0.040
#> GSM549231     1  0.2224     0.9159 0.928 0.000 0.032 0.040
#> GSM549237     1  0.1151     0.9318 0.968 0.000 0.008 0.024
#> GSM549254     4  0.0779     0.8716 0.004 0.016 0.000 0.980
#> GSM750734     1  0.0469     0.9331 0.988 0.000 0.000 0.012
#> GSM549271     3  0.1824     0.8238 0.000 0.004 0.936 0.060
#> GSM549232     4  0.0188     0.8760 0.000 0.000 0.004 0.996
#> GSM549246     4  0.5571     0.3298 0.396 0.000 0.024 0.580
#> GSM549248     1  0.1109     0.9315 0.968 0.000 0.004 0.028
#> GSM549255     4  0.0188     0.8760 0.000 0.000 0.004 0.996
#> GSM750746     1  0.0188     0.9318 0.996 0.000 0.000 0.004
#> GSM549259     1  0.1305     0.9195 0.960 0.036 0.000 0.004
#> GSM549269     2  0.0188     0.9088 0.000 0.996 0.000 0.004
#> GSM549273     3  0.1452     0.8411 0.000 0.036 0.956 0.008
#> GSM549299     2  0.1557     0.9014 0.000 0.944 0.056 0.000
#> GSM549301     3  0.1118     0.8403 0.000 0.036 0.964 0.000
#> GSM549310     4  0.1510     0.8557 0.000 0.016 0.028 0.956
#> GSM549311     3  0.0921     0.8360 0.000 0.000 0.972 0.028
#> GSM549302     2  0.0927     0.9110 0.000 0.976 0.016 0.008
#> GSM549235     1  0.0188     0.9315 0.996 0.000 0.004 0.000
#> GSM549245     4  0.0592     0.8713 0.000 0.016 0.000 0.984
#> GSM549265     4  0.2300     0.8547 0.028 0.000 0.048 0.924
#> GSM549282     3  0.0469     0.8359 0.000 0.000 0.988 0.012
#> GSM549296     4  0.0524     0.8735 0.000 0.004 0.008 0.988
#> GSM750739     1  0.0707     0.9333 0.980 0.000 0.000 0.020
#> GSM750742     1  0.1297     0.9303 0.964 0.000 0.020 0.016
#> GSM750744     1  0.1109     0.9315 0.968 0.000 0.004 0.028
#> GSM750750     3  0.0524     0.8397 0.000 0.008 0.988 0.004
#> GSM549242     1  0.3945     0.7334 0.780 0.000 0.004 0.216
#> GSM549252     4  0.0804     0.8756 0.012 0.000 0.008 0.980
#> GSM549253     1  0.2342     0.9007 0.912 0.000 0.008 0.080
#> GSM549256     4  0.4088     0.6795 0.232 0.000 0.004 0.764
#> GSM549257     4  0.0524     0.8765 0.004 0.000 0.008 0.988
#> GSM549263     1  0.2282     0.9130 0.924 0.000 0.024 0.052
#> GSM549267     3  0.4624     0.4757 0.000 0.000 0.660 0.340
#> GSM750745     1  0.1151     0.9247 0.968 0.024 0.000 0.008
#> GSM549239     1  0.0376     0.9312 0.992 0.004 0.000 0.004
#> GSM549244     4  0.0336     0.8754 0.000 0.000 0.008 0.992
#> GSM549249     4  0.0937     0.8745 0.012 0.000 0.012 0.976
#> GSM549260     1  0.1118     0.9316 0.964 0.000 0.000 0.036
#> GSM549266     2  0.1584     0.9021 0.036 0.952 0.012 0.000
#> GSM549293     2  0.0895     0.9056 0.000 0.976 0.004 0.020
#> GSM549236     1  0.3404     0.8636 0.864 0.000 0.032 0.104
#> GSM549238     4  0.2773     0.8329 0.072 0.000 0.028 0.900
#> GSM549251     1  0.1722     0.9237 0.944 0.000 0.008 0.048
#> GSM549258     1  0.2480     0.8726 0.904 0.088 0.000 0.008
#> GSM549264     1  0.1677     0.9266 0.948 0.000 0.012 0.040
#> GSM549243     1  0.0336     0.9326 0.992 0.000 0.000 0.008
#> GSM549262     1  0.1406     0.9301 0.960 0.000 0.016 0.024
#> GSM549278     3  0.3763     0.7386 0.024 0.000 0.832 0.144
#> GSM549283     2  0.1557     0.9017 0.000 0.944 0.056 0.000
#> GSM549298     3  0.2149     0.8261 0.000 0.088 0.912 0.000
#> GSM750741     1  0.5295    -0.0503 0.504 0.488 0.000 0.008
#> GSM549286     2  0.0817     0.9117 0.000 0.976 0.024 0.000
#> GSM549241     2  0.5150     0.3657 0.396 0.596 0.000 0.008
#> GSM549247     2  0.2928     0.8474 0.052 0.896 0.000 0.052
#> GSM549261     1  0.1211     0.9181 0.960 0.040 0.000 0.000
#> GSM549270     2  0.1211     0.9087 0.000 0.960 0.040 0.000
#> GSM549277     3  0.3837     0.7174 0.000 0.224 0.776 0.000
#> GSM549280     3  0.4564     0.5532 0.000 0.328 0.672 0.000
#> GSM549281     2  0.2124     0.9018 0.028 0.932 0.040 0.000
#> GSM549285     3  0.0804     0.8393 0.008 0.012 0.980 0.000
#> GSM549288     3  0.3688     0.7348 0.000 0.208 0.792 0.000
#> GSM549292     2  0.0927     0.9083 0.000 0.976 0.008 0.016
#> GSM549295     3  0.4985     0.1964 0.000 0.468 0.532 0.000
#> GSM549297     2  0.2868     0.8212 0.000 0.864 0.136 0.000
#> GSM750743     1  0.0937     0.9324 0.976 0.012 0.000 0.012
#> GSM549268     2  0.2483     0.8953 0.032 0.916 0.052 0.000
#> GSM549290     3  0.4877     0.3078 0.000 0.000 0.592 0.408
#> GSM549272     2  0.0657     0.9116 0.000 0.984 0.012 0.004
#> GSM549276     2  0.1022     0.9110 0.000 0.968 0.032 0.000
#> GSM549275     2  0.1940     0.8742 0.076 0.924 0.000 0.000
#> GSM549284     2  0.3443     0.8040 0.000 0.848 0.136 0.016
#> GSM750737     4  0.1297     0.8687 0.016 0.020 0.000 0.964
#> GSM750740     1  0.0895     0.9267 0.976 0.020 0.000 0.004
#> GSM750747     1  0.0188     0.9318 0.996 0.000 0.000 0.004
#> GSM750751     2  0.1022     0.9110 0.000 0.968 0.032 0.000
#> GSM750754     3  0.1302     0.8268 0.000 0.000 0.956 0.044

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.2909    0.76890 0.000 0.000 0.140 0.848 0.012
#> GSM549291     4  0.4590    0.33351 0.000 0.000 0.420 0.568 0.012
#> GSM549274     2  0.0000    0.88156 0.000 1.000 0.000 0.000 0.000
#> GSM750738     4  0.4273    0.20634 0.000 0.448 0.000 0.552 0.000
#> GSM750748     1  0.1544    0.80765 0.932 0.000 0.000 0.000 0.068
#> GSM549240     1  0.5148    0.53011 0.692 0.220 0.000 0.080 0.008
#> GSM549279     2  0.5858    0.54125 0.284 0.624 0.028 0.004 0.060
#> GSM549294     2  0.1862    0.87422 0.004 0.932 0.048 0.000 0.016
#> GSM549300     3  0.1408    0.84055 0.000 0.044 0.948 0.000 0.008
#> GSM549303     3  0.1012    0.83870 0.000 0.000 0.968 0.012 0.020
#> GSM549309     3  0.0955    0.83534 0.000 0.000 0.968 0.004 0.028
#> GSM750753     2  0.2497    0.83704 0.004 0.880 0.112 0.000 0.004
#> GSM750752     4  0.0613    0.83985 0.000 0.004 0.008 0.984 0.004
#> GSM549304     2  0.0162    0.88297 0.000 0.996 0.004 0.000 0.000
#> GSM549305     2  0.1717    0.87350 0.004 0.936 0.052 0.000 0.008
#> GSM549307     3  0.1851    0.82455 0.000 0.088 0.912 0.000 0.000
#> GSM549306     3  0.0703    0.84462 0.000 0.024 0.976 0.000 0.000
#> GSM549308     3  0.1124    0.84000 0.000 0.004 0.960 0.000 0.036
#> GSM549233     4  0.4083    0.69385 0.132 0.000 0.000 0.788 0.080
#> GSM549234     4  0.0771    0.83786 0.000 0.004 0.000 0.976 0.020
#> GSM549250     5  0.3741    0.71906 0.108 0.000 0.000 0.076 0.816
#> GSM549287     3  0.2104    0.81643 0.000 0.000 0.916 0.024 0.060
#> GSM750735     1  0.1671    0.80574 0.924 0.000 0.000 0.000 0.076
#> GSM750736     1  0.5733    0.32110 0.552 0.380 0.000 0.024 0.044
#> GSM750749     1  0.2177    0.77916 0.908 0.004 0.008 0.000 0.080
#> GSM549230     1  0.3452    0.62824 0.756 0.000 0.000 0.000 0.244
#> GSM549231     5  0.2891    0.72759 0.176 0.000 0.000 0.000 0.824
#> GSM549237     1  0.2074    0.79280 0.896 0.000 0.000 0.000 0.104
#> GSM549254     4  0.2201    0.82648 0.008 0.000 0.032 0.920 0.040
#> GSM750734     1  0.1121    0.80897 0.956 0.000 0.000 0.000 0.044
#> GSM549271     3  0.2130    0.79780 0.000 0.000 0.908 0.080 0.012
#> GSM549232     4  0.0162    0.83883 0.000 0.004 0.000 0.996 0.000
#> GSM549246     4  0.3395    0.76075 0.108 0.000 0.016 0.848 0.028
#> GSM549248     1  0.4294    0.04598 0.532 0.000 0.000 0.000 0.468
#> GSM549255     4  0.0162    0.83890 0.000 0.000 0.004 0.996 0.000
#> GSM750746     1  0.0963    0.81521 0.964 0.000 0.000 0.000 0.036
#> GSM549259     1  0.1522    0.81456 0.944 0.012 0.000 0.000 0.044
#> GSM549269     2  0.0451    0.88340 0.004 0.988 0.008 0.000 0.000
#> GSM549273     3  0.0798    0.84049 0.000 0.000 0.976 0.008 0.016
#> GSM549299     2  0.3883    0.68511 0.004 0.744 0.244 0.000 0.008
#> GSM549301     3  0.0771    0.84476 0.000 0.020 0.976 0.000 0.004
#> GSM549310     4  0.1682    0.83158 0.000 0.004 0.044 0.940 0.012
#> GSM549311     3  0.1638    0.82948 0.000 0.000 0.932 0.004 0.064
#> GSM549302     2  0.0162    0.88297 0.000 0.996 0.004 0.000 0.000
#> GSM549235     1  0.1792    0.79952 0.916 0.000 0.000 0.000 0.084
#> GSM549245     4  0.0451    0.83850 0.000 0.004 0.000 0.988 0.008
#> GSM549265     4  0.4564    0.42083 0.008 0.004 0.000 0.600 0.388
#> GSM549282     5  0.3586    0.40421 0.000 0.000 0.264 0.000 0.736
#> GSM549296     4  0.1281    0.83395 0.000 0.000 0.032 0.956 0.012
#> GSM750739     1  0.1544    0.81068 0.932 0.000 0.000 0.000 0.068
#> GSM750742     5  0.4088    0.47741 0.368 0.000 0.000 0.000 0.632
#> GSM750744     1  0.3999    0.45078 0.656 0.000 0.000 0.000 0.344
#> GSM750750     3  0.1270    0.83545 0.000 0.000 0.948 0.000 0.052
#> GSM549242     1  0.4009    0.43379 0.684 0.000 0.000 0.312 0.004
#> GSM549252     4  0.1502    0.82918 0.000 0.004 0.000 0.940 0.056
#> GSM549253     5  0.4436    0.42181 0.396 0.000 0.000 0.008 0.596
#> GSM549256     4  0.2179    0.78616 0.100 0.000 0.000 0.896 0.004
#> GSM549257     4  0.0324    0.83950 0.004 0.000 0.004 0.992 0.000
#> GSM549263     5  0.3366    0.69629 0.232 0.000 0.000 0.000 0.768
#> GSM549267     4  0.5475    0.49945 0.000 0.000 0.308 0.604 0.088
#> GSM750745     1  0.1043    0.80427 0.960 0.000 0.000 0.000 0.040
#> GSM549239     1  0.0609    0.81615 0.980 0.000 0.000 0.000 0.020
#> GSM549244     4  0.0794    0.83697 0.000 0.000 0.000 0.972 0.028
#> GSM549249     4  0.1478    0.82706 0.000 0.000 0.000 0.936 0.064
#> GSM549260     1  0.1082    0.80519 0.964 0.000 0.000 0.008 0.028
#> GSM549266     1  0.6466   -0.03103 0.480 0.408 0.060 0.000 0.052
#> GSM549293     2  0.0290    0.87737 0.000 0.992 0.000 0.008 0.000
#> GSM549236     5  0.3427    0.72579 0.192 0.000 0.000 0.012 0.796
#> GSM549238     4  0.3885    0.62477 0.008 0.000 0.000 0.724 0.268
#> GSM549251     1  0.2424    0.76073 0.868 0.000 0.000 0.000 0.132
#> GSM549258     1  0.0609    0.80839 0.980 0.000 0.000 0.000 0.020
#> GSM549264     5  0.2429    0.71580 0.076 0.020 0.000 0.004 0.900
#> GSM549243     1  0.1341    0.81027 0.944 0.000 0.000 0.000 0.056
#> GSM549262     1  0.3684    0.57852 0.720 0.000 0.000 0.000 0.280
#> GSM549278     3  0.3795    0.68394 0.004 0.000 0.788 0.184 0.024
#> GSM549283     2  0.3762    0.68853 0.004 0.748 0.244 0.000 0.004
#> GSM549298     3  0.0898    0.84475 0.000 0.020 0.972 0.000 0.008
#> GSM750741     1  0.1864    0.78011 0.924 0.004 0.000 0.004 0.068
#> GSM549286     2  0.0162    0.88297 0.000 0.996 0.004 0.000 0.000
#> GSM549241     1  0.1597    0.78898 0.940 0.012 0.000 0.000 0.048
#> GSM549247     2  0.4799    0.59944 0.220 0.716 0.000 0.056 0.008
#> GSM549261     1  0.1893    0.80996 0.928 0.024 0.000 0.000 0.048
#> GSM549270     2  0.3001    0.80853 0.004 0.844 0.144 0.000 0.008
#> GSM549277     3  0.2389    0.80844 0.000 0.116 0.880 0.000 0.004
#> GSM549280     3  0.2727    0.80387 0.000 0.116 0.868 0.000 0.016
#> GSM549281     3  0.7876    0.07147 0.216 0.320 0.392 0.004 0.068
#> GSM549285     3  0.4568    0.58601 0.008 0.020 0.684 0.000 0.288
#> GSM549288     3  0.3366    0.68681 0.000 0.232 0.768 0.000 0.000
#> GSM549292     2  0.0000    0.88156 0.000 1.000 0.000 0.000 0.000
#> GSM549295     3  0.3521    0.67981 0.000 0.232 0.764 0.000 0.004
#> GSM549297     2  0.4491    0.42495 0.004 0.624 0.364 0.000 0.008
#> GSM750743     1  0.1732    0.80810 0.920 0.000 0.000 0.000 0.080
#> GSM549268     3  0.7476    0.28379 0.168 0.276 0.480 0.000 0.076
#> GSM549290     5  0.6349    0.00462 0.000 0.000 0.168 0.360 0.472
#> GSM549272     2  0.0290    0.88340 0.000 0.992 0.008 0.000 0.000
#> GSM549276     2  0.0955    0.88231 0.000 0.968 0.028 0.000 0.004
#> GSM549275     2  0.2249    0.82146 0.096 0.896 0.000 0.000 0.008
#> GSM549284     2  0.1018    0.86428 0.000 0.968 0.000 0.016 0.016
#> GSM750737     4  0.2462    0.81979 0.016 0.004 0.020 0.912 0.048
#> GSM750740     1  0.0771    0.81545 0.976 0.004 0.000 0.000 0.020
#> GSM750747     1  0.0794    0.81574 0.972 0.000 0.000 0.000 0.028
#> GSM750751     2  0.1059    0.88215 0.004 0.968 0.020 0.000 0.008
#> GSM750754     3  0.1774    0.82225 0.000 0.000 0.932 0.016 0.052

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.2462    0.80979 0.012 0.000 0.032 0.892 0.000 0.064
#> GSM549291     4  0.5018    0.40591 0.012 0.000 0.328 0.604 0.004 0.052
#> GSM549274     2  0.1562    0.82013 0.024 0.940 0.000 0.000 0.004 0.032
#> GSM750738     2  0.5887    0.02979 0.000 0.428 0.000 0.396 0.004 0.172
#> GSM750748     1  0.4176   -0.01538 0.580 0.000 0.000 0.000 0.016 0.404
#> GSM549240     6  0.6843    0.32762 0.292 0.192 0.000 0.060 0.004 0.452
#> GSM549279     1  0.7206    0.09135 0.448 0.256 0.132 0.000 0.004 0.160
#> GSM549294     2  0.2095    0.81622 0.016 0.916 0.028 0.000 0.000 0.040
#> GSM549300     3  0.1464    0.81227 0.000 0.016 0.944 0.000 0.004 0.036
#> GSM549303     3  0.3343    0.78112 0.000 0.000 0.796 0.024 0.004 0.176
#> GSM549309     3  0.2834    0.79826 0.000 0.000 0.848 0.016 0.008 0.128
#> GSM750753     2  0.4247    0.60697 0.000 0.688 0.268 0.000 0.004 0.040
#> GSM750752     4  0.0858    0.83548 0.000 0.000 0.004 0.968 0.000 0.028
#> GSM549304     2  0.2721    0.80138 0.000 0.868 0.040 0.000 0.004 0.088
#> GSM549305     2  0.1334    0.82209 0.000 0.948 0.032 0.000 0.000 0.020
#> GSM549307     3  0.1951    0.80497 0.000 0.060 0.916 0.000 0.004 0.020
#> GSM549306     3  0.0547    0.81583 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM549308     3  0.0291    0.81737 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM549233     4  0.5266    0.59571 0.076 0.000 0.000 0.692 0.088 0.144
#> GSM549234     4  0.2002    0.81611 0.000 0.004 0.000 0.908 0.012 0.076
#> GSM549250     5  0.2560    0.65795 0.016 0.000 0.000 0.016 0.880 0.088
#> GSM549287     3  0.4010    0.76631 0.000 0.000 0.772 0.068 0.012 0.148
#> GSM750735     1  0.3799    0.30214 0.756 0.024 0.000 0.000 0.012 0.208
#> GSM750736     1  0.5835    0.18832 0.564 0.164 0.000 0.008 0.008 0.256
#> GSM750749     1  0.4299    0.29955 0.748 0.028 0.028 0.000 0.008 0.188
#> GSM549230     6  0.6095    0.22018 0.380 0.000 0.000 0.004 0.224 0.392
#> GSM549231     5  0.2954    0.65447 0.048 0.000 0.000 0.000 0.844 0.108
#> GSM549237     1  0.4539    0.09159 0.688 0.000 0.000 0.000 0.096 0.216
#> GSM549254     4  0.1285    0.83039 0.000 0.000 0.004 0.944 0.000 0.052
#> GSM750734     1  0.0458    0.34954 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM549271     3  0.2011    0.79884 0.000 0.000 0.912 0.064 0.004 0.020
#> GSM549232     4  0.0547    0.83494 0.000 0.000 0.000 0.980 0.000 0.020
#> GSM549246     4  0.3994    0.70333 0.056 0.000 0.000 0.792 0.036 0.116
#> GSM549248     5  0.3834    0.48873 0.268 0.000 0.000 0.000 0.708 0.024
#> GSM549255     4  0.0260    0.83407 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM750746     1  0.4084   -0.00175 0.588 0.000 0.000 0.000 0.012 0.400
#> GSM549259     1  0.4329   -0.02806 0.576 0.008 0.000 0.000 0.012 0.404
#> GSM549269     2  0.0935    0.82752 0.000 0.964 0.004 0.000 0.000 0.032
#> GSM549273     3  0.3730    0.77316 0.000 0.004 0.772 0.032 0.004 0.188
#> GSM549299     2  0.4544    0.51698 0.000 0.632 0.320 0.000 0.004 0.044
#> GSM549301     3  0.0603    0.82000 0.000 0.004 0.980 0.000 0.000 0.016
#> GSM549310     4  0.1719    0.82191 0.000 0.000 0.016 0.924 0.000 0.060
#> GSM549311     3  0.3452    0.77843 0.000 0.000 0.788 0.016 0.012 0.184
#> GSM549302     2  0.0922    0.82383 0.000 0.968 0.000 0.004 0.004 0.024
#> GSM549235     1  0.4597   -0.08678 0.548 0.000 0.000 0.000 0.040 0.412
#> GSM549245     4  0.0748    0.83308 0.000 0.004 0.000 0.976 0.004 0.016
#> GSM549265     5  0.6495    0.38328 0.084 0.000 0.004 0.236 0.548 0.128
#> GSM549282     5  0.2214    0.60888 0.000 0.000 0.096 0.000 0.888 0.016
#> GSM549296     4  0.0858    0.83302 0.000 0.000 0.004 0.968 0.000 0.028
#> GSM750739     1  0.2257    0.32689 0.876 0.000 0.000 0.000 0.008 0.116
#> GSM750742     5  0.4276    0.57717 0.104 0.000 0.000 0.000 0.728 0.168
#> GSM750744     1  0.5100    0.14426 0.612 0.000 0.000 0.000 0.260 0.128
#> GSM750750     3  0.0622    0.81907 0.000 0.000 0.980 0.000 0.012 0.008
#> GSM549242     6  0.6114    0.34183 0.304 0.000 0.000 0.328 0.000 0.368
#> GSM549252     4  0.2129    0.81753 0.000 0.000 0.000 0.904 0.040 0.056
#> GSM549253     5  0.5646    0.06888 0.120 0.000 0.000 0.008 0.484 0.388
#> GSM549256     4  0.3477    0.69701 0.056 0.000 0.000 0.808 0.004 0.132
#> GSM549257     4  0.0458    0.83496 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM549263     5  0.4427    0.47877 0.044 0.000 0.000 0.004 0.660 0.292
#> GSM549267     4  0.5042    0.65966 0.000 0.000 0.116 0.716 0.072 0.096
#> GSM750745     1  0.0547    0.34572 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM549239     1  0.1588    0.31860 0.924 0.000 0.000 0.000 0.004 0.072
#> GSM549244     4  0.1565    0.82811 0.000 0.004 0.000 0.940 0.028 0.028
#> GSM549249     4  0.1471    0.82160 0.000 0.000 0.000 0.932 0.064 0.004
#> GSM549260     1  0.4101   -0.04331 0.580 0.000 0.000 0.012 0.000 0.408
#> GSM549266     2  0.6179   -0.10180 0.368 0.420 0.012 0.000 0.000 0.200
#> GSM549293     2  0.1296    0.81955 0.000 0.948 0.000 0.004 0.004 0.044
#> GSM549236     5  0.3473    0.62628 0.024 0.000 0.000 0.004 0.780 0.192
#> GSM549238     4  0.3976    0.38549 0.004 0.000 0.000 0.612 0.380 0.004
#> GSM549251     1  0.5308   -0.26763 0.484 0.000 0.000 0.004 0.088 0.424
#> GSM549258     1  0.3737    0.00163 0.608 0.000 0.000 0.000 0.000 0.392
#> GSM549264     5  0.1434    0.63969 0.020 0.008 0.000 0.000 0.948 0.024
#> GSM549243     1  0.4176   -0.02199 0.580 0.000 0.000 0.000 0.016 0.404
#> GSM549262     5  0.4570    0.06462 0.436 0.000 0.000 0.000 0.528 0.036
#> GSM549278     3  0.4360    0.58035 0.000 0.000 0.680 0.260 0.000 0.060
#> GSM549283     3  0.5163   -0.10598 0.000 0.460 0.464 0.000 0.004 0.072
#> GSM549298     3  0.0508    0.81818 0.000 0.004 0.984 0.000 0.000 0.012
#> GSM750741     1  0.1349    0.34723 0.940 0.000 0.000 0.000 0.004 0.056
#> GSM549286     2  0.0865    0.82600 0.000 0.964 0.000 0.000 0.000 0.036
#> GSM549241     1  0.3265    0.17475 0.748 0.004 0.000 0.000 0.000 0.248
#> GSM549247     2  0.3926    0.66168 0.052 0.768 0.000 0.004 0.004 0.172
#> GSM549261     1  0.5039   -0.11757 0.540 0.044 0.000 0.000 0.016 0.400
#> GSM549270     2  0.3168    0.75159 0.000 0.828 0.116 0.000 0.000 0.056
#> GSM549277     3  0.3946    0.72498 0.000 0.168 0.756 0.000 0.000 0.076
#> GSM549280     3  0.2915    0.78491 0.004 0.064 0.864 0.000 0.004 0.064
#> GSM549281     1  0.6532    0.18582 0.548 0.136 0.112 0.000 0.000 0.204
#> GSM549285     3  0.4197    0.66940 0.000 0.016 0.752 0.000 0.172 0.060
#> GSM549288     3  0.5335    0.37366 0.000 0.364 0.532 0.000 0.004 0.100
#> GSM549292     2  0.1152    0.82147 0.000 0.952 0.000 0.000 0.004 0.044
#> GSM549295     3  0.5110    0.58585 0.000 0.248 0.616 0.000 0.000 0.136
#> GSM549297     2  0.4573    0.53196 0.000 0.672 0.244 0.000 0.000 0.084
#> GSM750743     1  0.2704    0.32852 0.844 0.000 0.000 0.000 0.016 0.140
#> GSM549268     1  0.7112    0.06556 0.452 0.124 0.196 0.000 0.000 0.228
#> GSM549290     5  0.5154    0.31371 0.000 0.000 0.040 0.312 0.608 0.040
#> GSM549272     2  0.0405    0.82694 0.000 0.988 0.004 0.000 0.000 0.008
#> GSM549276     2  0.1257    0.82469 0.000 0.952 0.028 0.000 0.000 0.020
#> GSM549275     2  0.5106    0.63878 0.100 0.700 0.036 0.000 0.004 0.160
#> GSM549284     2  0.1151    0.82404 0.000 0.956 0.000 0.000 0.012 0.032
#> GSM750737     4  0.5736    0.28885 0.340 0.000 0.000 0.480 0.000 0.180
#> GSM750740     1  0.4084   -0.00175 0.588 0.000 0.000 0.000 0.012 0.400
#> GSM750747     1  0.4093   -0.00805 0.584 0.000 0.000 0.000 0.012 0.404
#> GSM750751     2  0.1320    0.82524 0.000 0.948 0.016 0.000 0.000 0.036
#> GSM750754     3  0.2594    0.80652 0.000 0.000 0.888 0.036 0.020 0.056

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-MAD-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-MAD-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-MAD-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-MAD-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-MAD-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-MAD-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-MAD-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-MAD-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-MAD-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-MAD-NMF-membership-heatmap-5

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)

plot of chunk tab-MAD-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-MAD-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-MAD-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-MAD-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-MAD-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-MAD-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk MAD-NMF-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-MAD-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-MAD-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk MAD-NMF-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> MAD:NMF 101           0.0303    1.56e-05              0.032233  0.00282 2
#> MAD:NMF  93           0.0179    8.19e-06              0.000488  0.00988 3
#> MAD:NMF  95           0.2920    2.72e-05              0.069494  0.00593 4
#> MAD:NMF  87           0.4619    1.67e-04              0.100457  0.01116 5
#> MAD:NMF  61           0.4986    2.72e-04              0.008657  0.07384 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.


ATC:hclust

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'hclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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)

plot of chunk ATC-hclust-collect-plots

The plots are:

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:

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)

plot of chunk ATC-hclust-select-partition-number

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.784           0.915       0.959         0.2862 0.722   0.722
#> 3 3 0.473           0.598       0.808         0.7389 0.615   0.502
#> 4 4 0.822           0.818       0.917         0.3006 0.822   0.633
#> 5 5 0.805           0.684       0.849         0.0622 0.905   0.752
#> 6 6 0.841           0.737       0.864         0.0420 0.929   0.787

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      0.965 1.000 0.000
#> GSM549291     1  0.0672      0.961 0.992 0.008
#> GSM549274     1  0.0000      0.965 1.000 0.000
#> GSM750738     1  0.0000      0.965 1.000 0.000
#> GSM750748     1  0.0000      0.965 1.000 0.000
#> GSM549240     1  0.0000      0.965 1.000 0.000
#> GSM549279     1  0.0938      0.957 0.988 0.012
#> GSM549294     1  0.6531      0.788 0.832 0.168
#> GSM549300     2  0.4298      0.906 0.088 0.912
#> GSM549303     2  0.0000      0.892 0.000 1.000
#> GSM549309     2  0.0000      0.892 0.000 1.000
#> GSM750753     1  0.6531      0.787 0.832 0.168
#> GSM750752     1  0.0000      0.965 1.000 0.000
#> GSM549304     1  0.0000      0.965 1.000 0.000
#> GSM549305     1  0.6531      0.787 0.832 0.168
#> GSM549307     2  0.4431      0.905 0.092 0.908
#> GSM549306     2  0.2236      0.900 0.036 0.964
#> GSM549308     2  0.0000      0.892 0.000 1.000
#> GSM549233     1  0.0000      0.965 1.000 0.000
#> GSM549234     1  0.0000      0.965 1.000 0.000
#> GSM549250     1  0.0000      0.965 1.000 0.000
#> GSM549287     1  0.7299      0.732 0.796 0.204
#> GSM750735     1  0.0000      0.965 1.000 0.000
#> GSM750736     1  0.0000      0.965 1.000 0.000
#> GSM750749     1  0.2043      0.943 0.968 0.032
#> GSM549230     1  0.0000      0.965 1.000 0.000
#> GSM549231     1  0.0000      0.965 1.000 0.000
#> GSM549237     1  0.0000      0.965 1.000 0.000
#> GSM549254     1  0.0000      0.965 1.000 0.000
#> GSM750734     1  0.0000      0.965 1.000 0.000
#> GSM549271     1  0.9795      0.218 0.584 0.416
#> GSM549232     1  0.0000      0.965 1.000 0.000
#> GSM549246     1  0.0000      0.965 1.000 0.000
#> GSM549248     1  0.0000      0.965 1.000 0.000
#> GSM549255     1  0.0000      0.965 1.000 0.000
#> GSM750746     1  0.0000      0.965 1.000 0.000
#> GSM549259     1  0.0000      0.965 1.000 0.000
#> GSM549269     1  0.0376      0.963 0.996 0.004
#> GSM549273     2  0.0000      0.892 0.000 1.000
#> GSM549299     1  0.2043      0.942 0.968 0.032
#> GSM549301     2  0.0000      0.892 0.000 1.000
#> GSM549310     1  0.0376      0.963 0.996 0.004
#> GSM549311     2  0.4815      0.901 0.104 0.896
#> GSM549302     1  0.0000      0.965 1.000 0.000
#> GSM549235     1  0.0000      0.965 1.000 0.000
#> GSM549245     1  0.0000      0.965 1.000 0.000
#> GSM549265     1  0.0000      0.965 1.000 0.000
#> GSM549282     1  0.9754      0.248 0.592 0.408
#> GSM549296     1  0.0376      0.963 0.996 0.004
#> GSM750739     1  0.0000      0.965 1.000 0.000
#> GSM750742     1  0.0000      0.965 1.000 0.000
#> GSM750744     1  0.0000      0.965 1.000 0.000
#> GSM750750     2  0.4815      0.901 0.104 0.896
#> GSM549242     1  0.0000      0.965 1.000 0.000
#> GSM549252     1  0.0000      0.965 1.000 0.000
#> GSM549253     1  0.0000      0.965 1.000 0.000
#> GSM549256     1  0.0000      0.965 1.000 0.000
#> GSM549257     1  0.0000      0.965 1.000 0.000
#> GSM549263     1  0.0000      0.965 1.000 0.000
#> GSM549267     1  0.6048      0.815 0.852 0.148
#> GSM750745     1  0.0000      0.965 1.000 0.000
#> GSM549239     1  0.0000      0.965 1.000 0.000
#> GSM549244     1  0.0000      0.965 1.000 0.000
#> GSM549249     1  0.0000      0.965 1.000 0.000
#> GSM549260     1  0.0000      0.965 1.000 0.000
#> GSM549266     1  0.0938      0.957 0.988 0.012
#> GSM549293     1  0.0000      0.965 1.000 0.000
#> GSM549236     1  0.0000      0.965 1.000 0.000
#> GSM549238     1  0.0000      0.965 1.000 0.000
#> GSM549251     1  0.0000      0.965 1.000 0.000
#> GSM549258     1  0.0000      0.965 1.000 0.000
#> GSM549264     1  0.0000      0.965 1.000 0.000
#> GSM549243     1  0.0000      0.965 1.000 0.000
#> GSM549262     1  0.0000      0.965 1.000 0.000
#> GSM549278     1  0.0000      0.965 1.000 0.000
#> GSM549283     1  0.1184      0.955 0.984 0.016
#> GSM549298     2  0.0000      0.892 0.000 1.000
#> GSM750741     1  0.0000      0.965 1.000 0.000
#> GSM549286     1  0.1414      0.952 0.980 0.020
#> GSM549241     1  0.0000      0.965 1.000 0.000
#> GSM549247     1  0.0000      0.965 1.000 0.000
#> GSM549261     1  0.0000      0.965 1.000 0.000
#> GSM549270     2  0.8909      0.649 0.308 0.692
#> GSM549277     2  0.6148      0.870 0.152 0.848
#> GSM549280     2  0.8955      0.641 0.312 0.688
#> GSM549281     1  0.2043      0.943 0.968 0.032
#> GSM549285     1  0.5842      0.821 0.860 0.140
#> GSM549288     2  0.6623      0.850 0.172 0.828
#> GSM549292     1  0.0000      0.965 1.000 0.000
#> GSM549295     2  0.4298      0.906 0.088 0.912
#> GSM549297     2  0.6148      0.870 0.152 0.848
#> GSM750743     1  0.0000      0.965 1.000 0.000
#> GSM549268     1  0.2043      0.943 0.968 0.032
#> GSM549290     1  0.1414      0.952 0.980 0.020
#> GSM549272     1  0.0376      0.963 0.996 0.004
#> GSM549276     1  0.6048      0.818 0.852 0.148
#> GSM549275     1  0.0000      0.965 1.000 0.000
#> GSM549284     1  0.0000      0.965 1.000 0.000
#> GSM750737     1  0.0000      0.965 1.000 0.000
#> GSM750740     1  0.0000      0.965 1.000 0.000
#> GSM750747     1  0.0000      0.965 1.000 0.000
#> GSM750751     1  0.4562      0.877 0.904 0.096
#> GSM750754     1  0.9286      0.435 0.656 0.344

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.5591      0.320 0.696 0.304 0.000
#> GSM549291     2  0.6291      0.482 0.468 0.532 0.000
#> GSM549274     2  0.6291      0.485 0.468 0.532 0.000
#> GSM750738     2  0.6299      0.468 0.476 0.524 0.000
#> GSM750748     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549240     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549279     1  0.6295     -0.327 0.528 0.472 0.000
#> GSM549294     2  0.5397      0.589 0.280 0.720 0.000
#> GSM549300     2  0.6305     -0.568 0.000 0.516 0.484
#> GSM549303     3  0.0000      0.927 0.000 0.000 1.000
#> GSM549309     3  0.0000      0.927 0.000 0.000 1.000
#> GSM750753     2  0.5864      0.588 0.288 0.704 0.008
#> GSM750752     1  0.6308     -0.407 0.508 0.492 0.000
#> GSM549304     2  0.6291      0.485 0.468 0.532 0.000
#> GSM549305     2  0.5397      0.589 0.280 0.720 0.000
#> GSM549307     2  0.6299     -0.560 0.000 0.524 0.476
#> GSM549306     3  0.3551      0.852 0.000 0.132 0.868
#> GSM549308     3  0.0000      0.927 0.000 0.000 1.000
#> GSM549233     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549234     1  0.0424      0.902 0.992 0.008 0.000
#> GSM549250     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549287     2  0.5325      0.584 0.248 0.748 0.004
#> GSM750735     1  0.5138      0.475 0.748 0.252 0.000
#> GSM750736     1  0.0237      0.905 0.996 0.004 0.000
#> GSM750749     2  0.6215      0.533 0.428 0.572 0.000
#> GSM549230     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549237     1  0.0592      0.898 0.988 0.012 0.000
#> GSM549254     1  0.4504      0.617 0.804 0.196 0.000
#> GSM750734     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549271     2  0.2269      0.285 0.040 0.944 0.016
#> GSM549232     1  0.2959      0.790 0.900 0.100 0.000
#> GSM549246     1  0.4504      0.617 0.804 0.196 0.000
#> GSM549248     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549255     1  0.0892      0.891 0.980 0.020 0.000
#> GSM750746     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549269     2  0.6274      0.503 0.456 0.544 0.000
#> GSM549273     3  0.0000      0.927 0.000 0.000 1.000
#> GSM549299     2  0.6180      0.543 0.416 0.584 0.000
#> GSM549301     3  0.0000      0.927 0.000 0.000 1.000
#> GSM549310     2  0.6286      0.491 0.464 0.536 0.000
#> GSM549311     2  0.6280     -0.546 0.000 0.540 0.460
#> GSM549302     2  0.6291      0.485 0.468 0.532 0.000
#> GSM549235     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549245     1  0.0424      0.902 0.992 0.008 0.000
#> GSM549265     1  0.0892      0.891 0.980 0.020 0.000
#> GSM549282     2  0.1647      0.293 0.036 0.960 0.004
#> GSM549296     2  0.6286      0.491 0.464 0.536 0.000
#> GSM750739     1  0.0000      0.907 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.907 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.907 1.000 0.000 0.000
#> GSM750750     2  0.6291     -0.554 0.000 0.532 0.468
#> GSM549242     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549252     1  0.0892      0.891 0.980 0.020 0.000
#> GSM549253     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549256     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549257     1  0.0892      0.891 0.980 0.020 0.000
#> GSM549263     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549267     2  0.5560      0.586 0.300 0.700 0.000
#> GSM750745     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549244     1  0.0237      0.905 0.996 0.004 0.000
#> GSM549249     1  0.0237      0.905 0.996 0.004 0.000
#> GSM549260     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549266     1  0.6308     -0.387 0.508 0.492 0.000
#> GSM549293     2  0.6291      0.485 0.468 0.532 0.000
#> GSM549236     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549238     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549251     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549258     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549264     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549243     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549278     1  0.6307     -0.393 0.512 0.488 0.000
#> GSM549283     2  0.6235      0.524 0.436 0.564 0.000
#> GSM549298     3  0.0000      0.927 0.000 0.000 1.000
#> GSM750741     1  0.2165      0.838 0.936 0.064 0.000
#> GSM549286     2  0.6215      0.534 0.428 0.572 0.000
#> GSM549241     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549247     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549261     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549270     2  0.5138     -0.233 0.000 0.748 0.252
#> GSM549277     2  0.6154     -0.476 0.000 0.592 0.408
#> GSM549280     2  0.5098     -0.225 0.000 0.752 0.248
#> GSM549281     2  0.6215      0.533 0.428 0.572 0.000
#> GSM549285     2  0.5591      0.577 0.304 0.696 0.000
#> GSM549288     2  0.6079     -0.450 0.000 0.612 0.388
#> GSM549292     2  0.6291      0.485 0.468 0.532 0.000
#> GSM549295     3  0.6305      0.536 0.000 0.484 0.516
#> GSM549297     2  0.6168     -0.479 0.000 0.588 0.412
#> GSM750743     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549268     2  0.6215      0.533 0.428 0.572 0.000
#> GSM549290     2  0.6225      0.530 0.432 0.568 0.000
#> GSM549272     2  0.6274      0.503 0.456 0.544 0.000
#> GSM549276     2  0.5497      0.589 0.292 0.708 0.000
#> GSM549275     1  0.0000      0.907 1.000 0.000 0.000
#> GSM549284     2  0.6299      0.468 0.476 0.524 0.000
#> GSM750737     1  0.4291      0.650 0.820 0.180 0.000
#> GSM750740     1  0.0000      0.907 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.907 1.000 0.000 0.000
#> GSM750751     2  0.5905      0.572 0.352 0.648 0.000
#> GSM750754     2  0.5159      0.427 0.140 0.820 0.040

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     2  0.4250   0.540281 0.276 0.724 0.000 0.000
#> GSM549291     2  0.1297   0.814486 0.020 0.964 0.000 0.016
#> GSM549274     2  0.0937   0.810266 0.012 0.976 0.000 0.012
#> GSM750738     2  0.1488   0.806794 0.032 0.956 0.000 0.012
#> GSM750748     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549240     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549279     2  0.3907   0.737188 0.120 0.836 0.000 0.044
#> GSM549294     2  0.3801   0.686814 0.000 0.780 0.000 0.220
#> GSM549300     4  0.2589   0.728231 0.000 0.000 0.116 0.884
#> GSM549303     3  0.0188   0.967847 0.000 0.000 0.996 0.004
#> GSM549309     3  0.0188   0.967847 0.000 0.000 0.996 0.004
#> GSM750753     2  0.3801   0.684514 0.000 0.780 0.000 0.220
#> GSM750752     2  0.2255   0.785671 0.068 0.920 0.000 0.012
#> GSM549304     2  0.1059   0.810295 0.016 0.972 0.000 0.012
#> GSM549305     2  0.3801   0.685267 0.000 0.780 0.000 0.220
#> GSM549307     4  0.2408   0.735942 0.000 0.000 0.104 0.896
#> GSM549306     3  0.3172   0.793127 0.000 0.000 0.840 0.160
#> GSM549308     3  0.0000   0.969035 0.000 0.000 1.000 0.000
#> GSM549233     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549234     1  0.1118   0.945417 0.964 0.036 0.000 0.000
#> GSM549250     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549287     2  0.4454   0.558981 0.000 0.692 0.000 0.308
#> GSM750735     1  0.5281  -0.000291 0.528 0.464 0.000 0.008
#> GSM750736     1  0.0188   0.968896 0.996 0.004 0.000 0.000
#> GSM750749     2  0.2730   0.800375 0.016 0.896 0.000 0.088
#> GSM549230     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549231     1  0.0188   0.969114 0.996 0.004 0.000 0.000
#> GSM549237     1  0.0921   0.952520 0.972 0.028 0.000 0.000
#> GSM549254     2  0.4977   0.202850 0.460 0.540 0.000 0.000
#> GSM750734     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549271     4  0.4925   0.190013 0.000 0.428 0.000 0.572
#> GSM549232     1  0.3528   0.750695 0.808 0.192 0.000 0.000
#> GSM549246     2  0.4977   0.202850 0.460 0.540 0.000 0.000
#> GSM549248     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549255     1  0.1557   0.927559 0.944 0.056 0.000 0.000
#> GSM750746     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0707   0.807972 0.000 0.980 0.000 0.020
#> GSM549273     3  0.0000   0.969035 0.000 0.000 1.000 0.000
#> GSM549299     2  0.1716   0.801195 0.000 0.936 0.000 0.064
#> GSM549301     3  0.0000   0.969035 0.000 0.000 1.000 0.000
#> GSM549310     2  0.0804   0.812300 0.008 0.980 0.000 0.012
#> GSM549311     4  0.2149   0.744239 0.000 0.000 0.088 0.912
#> GSM549302     2  0.0937   0.810266 0.012 0.976 0.000 0.012
#> GSM549235     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549245     1  0.1118   0.945417 0.964 0.036 0.000 0.000
#> GSM549265     1  0.1557   0.927715 0.944 0.056 0.000 0.000
#> GSM549282     4  0.4941   0.152888 0.000 0.436 0.000 0.564
#> GSM549296     2  0.0804   0.812300 0.008 0.980 0.000 0.012
#> GSM750739     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM750750     4  0.2281   0.740471 0.000 0.000 0.096 0.904
#> GSM549242     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549252     1  0.1637   0.923617 0.940 0.060 0.000 0.000
#> GSM549253     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549256     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549257     1  0.1637   0.923617 0.940 0.060 0.000 0.000
#> GSM549263     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549267     2  0.3942   0.659251 0.000 0.764 0.000 0.236
#> GSM750745     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549244     1  0.0469   0.963782 0.988 0.012 0.000 0.000
#> GSM549249     1  0.0469   0.963782 0.988 0.012 0.000 0.000
#> GSM549260     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549266     2  0.3796   0.762429 0.096 0.848 0.000 0.056
#> GSM549293     2  0.0937   0.810266 0.012 0.976 0.000 0.012
#> GSM549236     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549238     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549251     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549258     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549264     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549243     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549278     2  0.2450   0.791391 0.072 0.912 0.000 0.016
#> GSM549283     2  0.2021   0.808539 0.012 0.932 0.000 0.056
#> GSM549298     3  0.0000   0.969035 0.000 0.000 1.000 0.000
#> GSM750741     1  0.2704   0.843085 0.876 0.124 0.000 0.000
#> GSM549286     2  0.1118   0.807215 0.000 0.964 0.000 0.036
#> GSM549241     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549247     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549261     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549270     4  0.3539   0.675258 0.000 0.176 0.004 0.820
#> GSM549277     4  0.1584   0.757149 0.000 0.012 0.036 0.952
#> GSM549280     4  0.3583   0.672190 0.000 0.180 0.004 0.816
#> GSM549281     2  0.2730   0.800375 0.016 0.896 0.000 0.088
#> GSM549285     2  0.3873   0.653560 0.000 0.772 0.000 0.228
#> GSM549288     4  0.1297   0.753970 0.000 0.016 0.020 0.964
#> GSM549292     2  0.0937   0.810266 0.012 0.976 0.000 0.012
#> GSM549295     4  0.3610   0.634372 0.000 0.000 0.200 0.800
#> GSM549297     4  0.1677   0.757235 0.000 0.012 0.040 0.948
#> GSM750743     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549268     2  0.2730   0.800375 0.016 0.896 0.000 0.088
#> GSM549290     2  0.1557   0.801556 0.000 0.944 0.000 0.056
#> GSM549272     2  0.0707   0.807972 0.000 0.980 0.000 0.020
#> GSM549276     2  0.3610   0.708331 0.000 0.800 0.000 0.200
#> GSM549275     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM549284     2  0.1488   0.806794 0.032 0.956 0.000 0.012
#> GSM750737     2  0.5000   0.064015 0.500 0.500 0.000 0.000
#> GSM750740     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000   0.971490 1.000 0.000 0.000 0.000
#> GSM750751     2  0.2760   0.763860 0.000 0.872 0.000 0.128
#> GSM750754     2  0.4955   0.203640 0.000 0.556 0.000 0.444

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     2  0.6376     0.0512 0.264 0.516 0.000 0.220 0.000
#> GSM549291     2  0.4961    -0.0252 0.020 0.520 0.000 0.456 0.004
#> GSM549274     2  0.0000     0.6246 0.000 1.000 0.000 0.000 0.000
#> GSM750738     2  0.0898     0.6135 0.020 0.972 0.000 0.008 0.000
#> GSM750748     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549279     4  0.5968     0.1470 0.108 0.444 0.000 0.448 0.000
#> GSM549294     2  0.5368     0.3032 0.000 0.596 0.000 0.332 0.072
#> GSM549300     5  0.1430     0.8185 0.000 0.000 0.052 0.004 0.944
#> GSM549303     3  0.0510     0.9606 0.000 0.000 0.984 0.000 0.016
#> GSM549309     3  0.0510     0.9606 0.000 0.000 0.984 0.000 0.016
#> GSM750753     2  0.5420     0.2908 0.000 0.592 0.000 0.332 0.076
#> GSM750752     2  0.3323     0.5053 0.056 0.844 0.000 0.100 0.000
#> GSM549304     2  0.0162     0.6233 0.004 0.996 0.000 0.000 0.000
#> GSM549305     2  0.5375     0.3131 0.000 0.604 0.000 0.320 0.076
#> GSM549307     5  0.1331     0.8225 0.000 0.000 0.040 0.008 0.952
#> GSM549306     3  0.2852     0.7920 0.000 0.000 0.828 0.000 0.172
#> GSM549308     3  0.0000     0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM549233     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549234     1  0.1106     0.9176 0.964 0.012 0.000 0.024 0.000
#> GSM549250     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549287     4  0.4747     0.4653 0.000 0.196 0.000 0.720 0.084
#> GSM750735     1  0.6385     0.1209 0.516 0.232 0.000 0.252 0.000
#> GSM750736     1  0.0162     0.9372 0.996 0.004 0.000 0.000 0.000
#> GSM750749     4  0.4425     0.3542 0.008 0.392 0.000 0.600 0.000
#> GSM549230     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549231     1  0.0162     0.9375 0.996 0.000 0.000 0.004 0.000
#> GSM549237     1  0.0955     0.9198 0.968 0.028 0.000 0.004 0.000
#> GSM549254     1  0.6188    -0.1051 0.448 0.416 0.000 0.136 0.000
#> GSM750734     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549271     4  0.4180     0.2018 0.000 0.036 0.000 0.744 0.220
#> GSM549232     1  0.3863     0.7364 0.796 0.152 0.000 0.052 0.000
#> GSM549246     1  0.6188    -0.1051 0.448 0.416 0.000 0.136 0.000
#> GSM549248     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549255     1  0.1668     0.8999 0.940 0.032 0.000 0.028 0.000
#> GSM750746     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549269     2  0.0609     0.6226 0.000 0.980 0.000 0.020 0.000
#> GSM549273     3  0.0162     0.9633 0.000 0.000 0.996 0.000 0.004
#> GSM549299     2  0.4221     0.4712 0.000 0.732 0.000 0.236 0.032
#> GSM549301     3  0.0000     0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM549310     2  0.4425     0.1777 0.008 0.600 0.000 0.392 0.000
#> GSM549311     5  0.3496     0.7583 0.000 0.000 0.012 0.200 0.788
#> GSM549302     2  0.0000     0.6246 0.000 1.000 0.000 0.000 0.000
#> GSM549235     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549245     1  0.1106     0.9176 0.964 0.012 0.000 0.024 0.000
#> GSM549265     1  0.1661     0.8995 0.940 0.036 0.000 0.024 0.000
#> GSM549282     4  0.3710     0.2148 0.000 0.024 0.000 0.784 0.192
#> GSM549296     2  0.4436     0.1710 0.008 0.596 0.000 0.396 0.000
#> GSM750739     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM750744     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM750750     5  0.3656     0.7712 0.000 0.000 0.032 0.168 0.800
#> GSM549242     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549252     1  0.1750     0.8962 0.936 0.036 0.000 0.028 0.000
#> GSM549253     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549256     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549257     1  0.1750     0.8962 0.936 0.036 0.000 0.028 0.000
#> GSM549263     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549267     4  0.4817     0.4385 0.000 0.264 0.000 0.680 0.056
#> GSM750745     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549244     1  0.0451     0.9330 0.988 0.004 0.000 0.008 0.000
#> GSM549249     1  0.0451     0.9330 0.988 0.004 0.000 0.008 0.000
#> GSM549260     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549266     4  0.5725     0.2135 0.084 0.428 0.000 0.488 0.000
#> GSM549293     2  0.0000     0.6246 0.000 1.000 0.000 0.000 0.000
#> GSM549236     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549238     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549251     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549258     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549264     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549243     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549278     2  0.5450    -0.1201 0.060 0.496 0.000 0.444 0.000
#> GSM549283     2  0.4522    -0.0488 0.008 0.552 0.000 0.440 0.000
#> GSM549298     3  0.0000     0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM750741     1  0.2677     0.8201 0.872 0.112 0.000 0.016 0.000
#> GSM549286     2  0.2248     0.5937 0.000 0.900 0.000 0.088 0.012
#> GSM549241     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549261     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549270     5  0.5074     0.6096 0.000 0.072 0.000 0.268 0.660
#> GSM549277     5  0.1478     0.8371 0.000 0.000 0.000 0.064 0.936
#> GSM549280     5  0.5096     0.6035 0.000 0.072 0.000 0.272 0.656
#> GSM549281     4  0.4425     0.3542 0.008 0.392 0.000 0.600 0.000
#> GSM549285     4  0.3074     0.4707 0.000 0.196 0.000 0.804 0.000
#> GSM549288     5  0.2179     0.8261 0.000 0.000 0.000 0.112 0.888
#> GSM549292     2  0.0000     0.6246 0.000 1.000 0.000 0.000 0.000
#> GSM549295     5  0.2424     0.7557 0.000 0.000 0.132 0.000 0.868
#> GSM549297     5  0.1478     0.8373 0.000 0.000 0.000 0.064 0.936
#> GSM750743     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549268     4  0.4425     0.3542 0.008 0.392 0.000 0.600 0.000
#> GSM549290     2  0.4287     0.0193 0.000 0.540 0.000 0.460 0.000
#> GSM549272     2  0.0609     0.6226 0.000 0.980 0.000 0.020 0.000
#> GSM549276     2  0.5203     0.3683 0.000 0.648 0.000 0.272 0.080
#> GSM549275     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM549284     2  0.0898     0.6135 0.020 0.972 0.000 0.008 0.000
#> GSM750737     1  0.6121     0.0374 0.488 0.380 0.000 0.132 0.000
#> GSM750740     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9395 1.000 0.000 0.000 0.000 0.000
#> GSM750751     2  0.4398     0.4494 0.000 0.720 0.000 0.240 0.040
#> GSM750754     4  0.4412     0.4262 0.000 0.080 0.000 0.756 0.164

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.4616      0.344 0.228 0.084 0.000 0.684 0.000 0.004
#> GSM549291     4  0.5075      0.251 0.012 0.228 0.000 0.652 0.000 0.108
#> GSM549274     2  0.0458      0.799 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM750738     2  0.1334      0.779 0.020 0.948 0.000 0.032 0.000 0.000
#> GSM750748     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549279     4  0.4841      0.364 0.080 0.076 0.012 0.752 0.000 0.080
#> GSM549294     2  0.5203      0.534 0.000 0.588 0.052 0.028 0.000 0.332
#> GSM549300     3  0.1564      0.756 0.000 0.000 0.936 0.000 0.040 0.024
#> GSM549303     5  0.0717      0.954 0.000 0.000 0.008 0.000 0.976 0.016
#> GSM549309     5  0.0717      0.954 0.000 0.000 0.008 0.000 0.976 0.016
#> GSM750753     2  0.5428      0.525 0.000 0.592 0.048 0.052 0.000 0.308
#> GSM750752     2  0.4296      0.418 0.052 0.700 0.000 0.244 0.000 0.004
#> GSM549304     2  0.0777      0.798 0.004 0.972 0.000 0.024 0.000 0.000
#> GSM549305     2  0.5004      0.546 0.000 0.600 0.048 0.020 0.000 0.332
#> GSM549307     3  0.1257      0.759 0.000 0.000 0.952 0.000 0.028 0.020
#> GSM549306     5  0.2981      0.778 0.000 0.000 0.160 0.000 0.820 0.020
#> GSM549308     5  0.0146      0.958 0.000 0.000 0.004 0.000 0.996 0.000
#> GSM549233     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549234     1  0.0972      0.941 0.964 0.008 0.000 0.028 0.000 0.000
#> GSM549250     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549287     6  0.4569      0.579 0.000 0.024 0.008 0.408 0.000 0.560
#> GSM750735     1  0.5193     -0.163 0.484 0.032 0.000 0.452 0.000 0.032
#> GSM750736     1  0.0146      0.964 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM750749     4  0.3525      0.223 0.000 0.032 0.012 0.800 0.000 0.156
#> GSM549230     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549231     1  0.0458      0.957 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM549237     1  0.1225      0.932 0.952 0.012 0.000 0.036 0.000 0.000
#> GSM549254     4  0.5083      0.290 0.408 0.068 0.000 0.520 0.000 0.004
#> GSM750734     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549271     6  0.4028      0.642 0.000 0.012 0.044 0.192 0.000 0.752
#> GSM549232     1  0.3683      0.686 0.764 0.044 0.000 0.192 0.000 0.000
#> GSM549246     4  0.5083      0.290 0.408 0.068 0.000 0.520 0.000 0.004
#> GSM549248     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549255     1  0.1757      0.900 0.916 0.008 0.000 0.076 0.000 0.000
#> GSM750746     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549269     2  0.0405      0.798 0.000 0.988 0.000 0.004 0.000 0.008
#> GSM549273     5  0.0520      0.955 0.000 0.000 0.000 0.008 0.984 0.008
#> GSM549299     2  0.5437      0.589 0.000 0.648 0.032 0.184 0.000 0.136
#> GSM549301     5  0.0146      0.958 0.000 0.000 0.004 0.000 0.996 0.000
#> GSM549310     4  0.4481      0.265 0.000 0.296 0.000 0.648 0.000 0.056
#> GSM549311     3  0.3993      0.406 0.000 0.000 0.520 0.004 0.000 0.476
#> GSM549302     2  0.0458      0.799 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM549235     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549245     1  0.0972      0.941 0.964 0.008 0.000 0.028 0.000 0.000
#> GSM549265     1  0.1757      0.900 0.916 0.008 0.000 0.076 0.000 0.000
#> GSM549282     6  0.2982      0.655 0.000 0.004 0.012 0.164 0.000 0.820
#> GSM549296     4  0.4517      0.266 0.000 0.292 0.000 0.648 0.000 0.060
#> GSM750739     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750744     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750750     3  0.4412      0.477 0.000 0.000 0.572 0.008 0.016 0.404
#> GSM549242     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549252     1  0.1812      0.896 0.912 0.008 0.000 0.080 0.000 0.000
#> GSM549253     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549256     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549257     1  0.1812      0.896 0.912 0.008 0.000 0.080 0.000 0.000
#> GSM549263     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549267     6  0.5209      0.493 0.000 0.092 0.000 0.416 0.000 0.492
#> GSM750745     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549244     1  0.0405      0.959 0.988 0.004 0.000 0.008 0.000 0.000
#> GSM549249     1  0.0405      0.959 0.988 0.004 0.000 0.008 0.000 0.000
#> GSM549260     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549266     4  0.4343      0.337 0.056 0.044 0.012 0.784 0.000 0.104
#> GSM549293     2  0.0458      0.799 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM549236     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549238     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549251     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549258     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549264     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549243     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549278     4  0.2803      0.360 0.032 0.064 0.000 0.876 0.000 0.028
#> GSM549283     4  0.5235      0.205 0.000 0.284 0.012 0.608 0.000 0.096
#> GSM549298     5  0.0146      0.958 0.000 0.000 0.004 0.000 0.996 0.000
#> GSM750741     1  0.2581      0.815 0.856 0.016 0.000 0.128 0.000 0.000
#> GSM549286     2  0.1956      0.776 0.000 0.908 0.004 0.008 0.000 0.080
#> GSM549241     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549261     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549270     3  0.4778      0.530 0.000 0.060 0.652 0.012 0.000 0.276
#> GSM549277     3  0.1297      0.763 0.000 0.000 0.948 0.012 0.000 0.040
#> GSM549280     3  0.4797      0.523 0.000 0.060 0.648 0.012 0.000 0.280
#> GSM549281     4  0.3525      0.223 0.000 0.032 0.012 0.800 0.000 0.156
#> GSM549285     4  0.4996     -0.354 0.000 0.064 0.004 0.548 0.000 0.384
#> GSM549288     3  0.2266      0.741 0.000 0.000 0.880 0.012 0.000 0.108
#> GSM549292     2  0.0458      0.799 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM549295     3  0.2538      0.712 0.000 0.000 0.860 0.000 0.124 0.016
#> GSM549297     3  0.1297      0.763 0.000 0.000 0.948 0.012 0.000 0.040
#> GSM750743     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549268     4  0.3525      0.223 0.000 0.032 0.012 0.800 0.000 0.156
#> GSM549290     4  0.4749      0.215 0.000 0.260 0.000 0.648 0.000 0.092
#> GSM549272     2  0.0405      0.798 0.000 0.988 0.000 0.004 0.000 0.008
#> GSM549276     2  0.5026      0.600 0.000 0.640 0.076 0.016 0.000 0.268
#> GSM549275     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549284     2  0.1334      0.779 0.020 0.948 0.000 0.032 0.000 0.000
#> GSM750737     4  0.4979      0.233 0.448 0.056 0.000 0.492 0.000 0.004
#> GSM750740     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750751     2  0.3934      0.661 0.000 0.716 0.020 0.008 0.000 0.256
#> GSM750754     6  0.4916      0.572 0.000 0.000 0.064 0.416 0.000 0.520

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-hclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-hclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-hclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-hclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-hclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-hclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-hclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-hclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-hclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-hclust-membership-heatmap-5

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)

plot of chunk tab-ATC-hclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-hclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-hclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-hclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-hclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-hclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-hclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-ATC-hclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-hclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-hclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> ATC:hclust 100           0.3786    8.50e-04                0.4134   0.1147 2
#> ATC:hclust  75           0.0432    1.91e-06                0.9114   0.2724 3
#> ATC:hclust  96           0.0978    7.07e-06                0.3915   0.0163 4
#> ATC:hclust  75           0.0293    7.75e-06                0.0571   0.0931 5
#> ATC:hclust  82           0.0164    1.27e-06                0.0112   0.0382 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.


ATC:kmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 3.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-kmeans-collect-plots

The plots are:

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:

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)

plot of chunk ATC-kmeans-select-partition-number

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.834           0.934       0.970         0.4799 0.520   0.520
#> 3 3 1.000           0.989       0.995         0.2602 0.767   0.595
#> 4 4 0.698           0.614       0.789         0.1605 0.880   0.706
#> 5 5 0.726           0.689       0.809         0.0810 0.858   0.568
#> 6 6 0.745           0.744       0.834         0.0599 0.941   0.746

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1   0.000     0.9665 1.000 0.000
#> GSM549291     2   0.373     0.9197 0.072 0.928
#> GSM549274     1   0.697     0.7839 0.812 0.188
#> GSM750738     1   0.000     0.9665 1.000 0.000
#> GSM750748     1   0.000     0.9665 1.000 0.000
#> GSM549240     1   0.000     0.9665 1.000 0.000
#> GSM549279     1   0.697     0.7839 0.812 0.188
#> GSM549294     2   0.000     0.9702 0.000 1.000
#> GSM549300     2   0.000     0.9702 0.000 1.000
#> GSM549303     2   0.000     0.9702 0.000 1.000
#> GSM549309     2   0.000     0.9702 0.000 1.000
#> GSM750753     2   0.000     0.9702 0.000 1.000
#> GSM750752     1   0.605     0.8315 0.852 0.148
#> GSM549304     1   0.689     0.7890 0.816 0.184
#> GSM549305     2   0.000     0.9702 0.000 1.000
#> GSM549307     2   0.000     0.9702 0.000 1.000
#> GSM549306     2   0.000     0.9702 0.000 1.000
#> GSM549308     2   0.000     0.9702 0.000 1.000
#> GSM549233     1   0.000     0.9665 1.000 0.000
#> GSM549234     1   0.000     0.9665 1.000 0.000
#> GSM549250     1   0.000     0.9665 1.000 0.000
#> GSM549287     2   0.000     0.9702 0.000 1.000
#> GSM750735     1   0.000     0.9665 1.000 0.000
#> GSM750736     1   0.000     0.9665 1.000 0.000
#> GSM750749     2   0.343     0.9271 0.064 0.936
#> GSM549230     1   0.000     0.9665 1.000 0.000
#> GSM549231     1   0.000     0.9665 1.000 0.000
#> GSM549237     1   0.000     0.9665 1.000 0.000
#> GSM549254     1   0.000     0.9665 1.000 0.000
#> GSM750734     1   0.000     0.9665 1.000 0.000
#> GSM549271     2   0.000     0.9702 0.000 1.000
#> GSM549232     1   0.000     0.9665 1.000 0.000
#> GSM549246     1   0.000     0.9665 1.000 0.000
#> GSM549248     1   0.000     0.9665 1.000 0.000
#> GSM549255     1   0.000     0.9665 1.000 0.000
#> GSM750746     1   0.000     0.9665 1.000 0.000
#> GSM549259     1   0.000     0.9665 1.000 0.000
#> GSM549269     1   0.955     0.4277 0.624 0.376
#> GSM549273     2   0.000     0.9702 0.000 1.000
#> GSM549299     2   0.295     0.9362 0.052 0.948
#> GSM549301     2   0.000     0.9702 0.000 1.000
#> GSM549310     2   0.343     0.9271 0.064 0.936
#> GSM549311     2   0.000     0.9702 0.000 1.000
#> GSM549302     2   0.456     0.8947 0.096 0.904
#> GSM549235     1   0.000     0.9665 1.000 0.000
#> GSM549245     1   0.000     0.9665 1.000 0.000
#> GSM549265     1   0.000     0.9665 1.000 0.000
#> GSM549282     2   0.000     0.9702 0.000 1.000
#> GSM549296     2   0.552     0.8558 0.128 0.872
#> GSM750739     1   0.000     0.9665 1.000 0.000
#> GSM750742     1   0.000     0.9665 1.000 0.000
#> GSM750744     1   0.000     0.9665 1.000 0.000
#> GSM750750     2   0.000     0.9702 0.000 1.000
#> GSM549242     1   0.000     0.9665 1.000 0.000
#> GSM549252     1   0.000     0.9665 1.000 0.000
#> GSM549253     1   0.000     0.9665 1.000 0.000
#> GSM549256     1   0.000     0.9665 1.000 0.000
#> GSM549257     1   0.000     0.9665 1.000 0.000
#> GSM549263     1   0.000     0.9665 1.000 0.000
#> GSM549267     2   0.118     0.9606 0.016 0.984
#> GSM750745     1   0.000     0.9665 1.000 0.000
#> GSM549239     1   0.000     0.9665 1.000 0.000
#> GSM549244     1   0.000     0.9665 1.000 0.000
#> GSM549249     1   0.000     0.9665 1.000 0.000
#> GSM549260     1   0.000     0.9665 1.000 0.000
#> GSM549266     1   0.697     0.7839 0.812 0.188
#> GSM549293     1   0.697     0.7839 0.812 0.188
#> GSM549236     1   0.000     0.9665 1.000 0.000
#> GSM549238     1   0.000     0.9665 1.000 0.000
#> GSM549251     1   0.000     0.9665 1.000 0.000
#> GSM549258     1   0.000     0.9665 1.000 0.000
#> GSM549264     1   0.000     0.9665 1.000 0.000
#> GSM549243     1   0.000     0.9665 1.000 0.000
#> GSM549262     1   0.000     0.9665 1.000 0.000
#> GSM549278     1   0.494     0.8735 0.892 0.108
#> GSM549283     2   0.373     0.9197 0.072 0.928
#> GSM549298     2   0.000     0.9702 0.000 1.000
#> GSM750741     1   0.000     0.9665 1.000 0.000
#> GSM549286     2   0.000     0.9702 0.000 1.000
#> GSM549241     1   0.000     0.9665 1.000 0.000
#> GSM549247     1   0.000     0.9665 1.000 0.000
#> GSM549261     1   0.000     0.9665 1.000 0.000
#> GSM549270     2   0.000     0.9702 0.000 1.000
#> GSM549277     2   0.000     0.9702 0.000 1.000
#> GSM549280     2   0.000     0.9702 0.000 1.000
#> GSM549281     2   0.000     0.9702 0.000 1.000
#> GSM549285     2   0.343     0.9271 0.064 0.936
#> GSM549288     2   0.000     0.9702 0.000 1.000
#> GSM549292     1   0.839     0.6589 0.732 0.268
#> GSM549295     2   0.000     0.9702 0.000 1.000
#> GSM549297     2   0.000     0.9702 0.000 1.000
#> GSM750743     1   0.000     0.9665 1.000 0.000
#> GSM549268     2   0.000     0.9702 0.000 1.000
#> GSM549290     2   0.998     0.0653 0.472 0.528
#> GSM549272     2   0.000     0.9702 0.000 1.000
#> GSM549276     2   0.000     0.9702 0.000 1.000
#> GSM549275     1   0.000     0.9665 1.000 0.000
#> GSM549284     1   0.574     0.8445 0.864 0.136
#> GSM750737     1   0.000     0.9665 1.000 0.000
#> GSM750740     1   0.000     0.9665 1.000 0.000
#> GSM750747     1   0.000     0.9665 1.000 0.000
#> GSM750751     2   0.000     0.9702 0.000 1.000
#> GSM750754     2   0.000     0.9702 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.0237      0.995 0.996 0.004 0.000
#> GSM549291     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549274     2  0.0000      0.985 0.000 1.000 0.000
#> GSM750738     2  0.3816      0.787 0.148 0.852 0.000
#> GSM750748     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549240     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549279     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549294     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549300     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549303     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549309     3  0.0000      1.000 0.000 0.000 1.000
#> GSM750753     2  0.0000      0.985 0.000 1.000 0.000
#> GSM750752     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549304     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549305     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549307     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549306     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549308     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549233     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549234     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549250     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549287     2  0.0000      0.985 0.000 1.000 0.000
#> GSM750735     1  0.0237      0.995 0.996 0.004 0.000
#> GSM750736     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750749     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549230     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549254     1  0.1163      0.967 0.972 0.028 0.000
#> GSM750734     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549271     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549232     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549246     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549248     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549255     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750746     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549269     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549273     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549299     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549301     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549310     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549311     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549302     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549235     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549245     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549265     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549282     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549296     2  0.0000      0.985 0.000 1.000 0.000
#> GSM750739     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750750     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549242     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549252     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549253     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549256     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549257     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549263     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549267     2  0.0000      0.985 0.000 1.000 0.000
#> GSM750745     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549244     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549249     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549260     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549266     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549293     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549236     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549238     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549251     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549258     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549264     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549243     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549278     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549283     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549298     3  0.0000      1.000 0.000 0.000 1.000
#> GSM750741     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549286     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549241     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549247     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549261     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549270     2  0.4121      0.805 0.000 0.832 0.168
#> GSM549277     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549280     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549281     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549285     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549288     2  0.4062      0.810 0.000 0.836 0.164
#> GSM549292     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549295     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549297     3  0.0000      1.000 0.000 0.000 1.000
#> GSM750743     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549268     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549290     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549272     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549276     2  0.0000      0.985 0.000 1.000 0.000
#> GSM549275     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549284     2  0.0000      0.985 0.000 1.000 0.000
#> GSM750737     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750740     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750751     2  0.0000      0.985 0.000 1.000 0.000
#> GSM750754     2  0.0000      0.985 0.000 1.000 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.6323     0.2376 0.100 0.272 0.000 0.628
#> GSM549291     2  0.4843     0.3408 0.000 0.604 0.000 0.396
#> GSM549274     4  0.4830    -0.2448 0.000 0.392 0.000 0.608
#> GSM750738     4  0.0707     0.1651 0.000 0.020 0.000 0.980
#> GSM750748     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549240     1  0.0921     0.8872 0.972 0.000 0.000 0.028
#> GSM549279     2  0.4999     0.3580 0.000 0.508 0.000 0.492
#> GSM549294     2  0.4382     0.5742 0.000 0.704 0.000 0.296
#> GSM549300     3  0.1743     0.9395 0.000 0.056 0.940 0.004
#> GSM549303     3  0.0000     0.9501 0.000 0.000 1.000 0.000
#> GSM549309     3  0.0000     0.9501 0.000 0.000 1.000 0.000
#> GSM750753     2  0.4072     0.5727 0.000 0.748 0.000 0.252
#> GSM750752     4  0.4624    -0.1027 0.000 0.340 0.000 0.660
#> GSM549304     4  0.4830    -0.2448 0.000 0.392 0.000 0.608
#> GSM549305     2  0.4564     0.5473 0.000 0.672 0.000 0.328
#> GSM549307     3  0.2466     0.9159 0.000 0.096 0.900 0.004
#> GSM549306     3  0.0000     0.9501 0.000 0.000 1.000 0.000
#> GSM549308     3  0.0000     0.9501 0.000 0.000 1.000 0.000
#> GSM549233     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549234     1  0.4776     0.5358 0.624 0.000 0.000 0.376
#> GSM549250     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549287     2  0.2081     0.5421 0.000 0.916 0.000 0.084
#> GSM750735     4  0.6003    -0.1081 0.456 0.040 0.000 0.504
#> GSM750736     1  0.3873     0.7322 0.772 0.000 0.000 0.228
#> GSM750749     2  0.2647     0.5864 0.000 0.880 0.000 0.120
#> GSM549230     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549231     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549237     1  0.3801     0.7398 0.780 0.000 0.000 0.220
#> GSM549254     4  0.6015     0.2204 0.080 0.268 0.000 0.652
#> GSM750734     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549271     2  0.0336     0.5939 0.000 0.992 0.000 0.008
#> GSM549232     4  0.5966     0.2665 0.316 0.060 0.000 0.624
#> GSM549246     4  0.6646     0.2717 0.304 0.112 0.000 0.584
#> GSM549248     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549255     1  0.4898     0.4570 0.584 0.000 0.000 0.416
#> GSM750746     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549269     4  0.4898    -0.2789 0.000 0.416 0.000 0.584
#> GSM549273     3  0.0000     0.9501 0.000 0.000 1.000 0.000
#> GSM549299     2  0.4972     0.4315 0.000 0.544 0.000 0.456
#> GSM549301     3  0.0000     0.9501 0.000 0.000 1.000 0.000
#> GSM549310     2  0.4877     0.3234 0.000 0.592 0.000 0.408
#> GSM549311     3  0.1474     0.9422 0.000 0.052 0.948 0.000
#> GSM549302     4  0.4888    -0.2711 0.000 0.412 0.000 0.588
#> GSM549235     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549245     1  0.4790     0.5292 0.620 0.000 0.000 0.380
#> GSM549265     4  0.4941    -0.0753 0.436 0.000 0.000 0.564
#> GSM549282     2  0.0469     0.5935 0.000 0.988 0.000 0.012
#> GSM549296     2  0.4888     0.3214 0.000 0.588 0.000 0.412
#> GSM750739     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM750750     3  0.1474     0.9422 0.000 0.052 0.948 0.000
#> GSM549242     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549252     1  0.4843     0.4997 0.604 0.000 0.000 0.396
#> GSM549253     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549256     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549257     1  0.4790     0.5292 0.620 0.000 0.000 0.380
#> GSM549263     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549267     2  0.4222     0.4518 0.000 0.728 0.000 0.272
#> GSM750745     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549244     1  0.4382     0.6519 0.704 0.000 0.000 0.296
#> GSM549249     1  0.4790     0.5292 0.620 0.000 0.000 0.380
#> GSM549260     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549266     2  0.4855     0.4545 0.000 0.600 0.000 0.400
#> GSM549293     4  0.4790    -0.2335 0.000 0.380 0.000 0.620
#> GSM549236     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549238     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549251     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549258     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549264     1  0.3266     0.7849 0.832 0.000 0.000 0.168
#> GSM549243     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549278     2  0.4996     0.1914 0.000 0.516 0.000 0.484
#> GSM549283     2  0.4955     0.4681 0.000 0.556 0.000 0.444
#> GSM549298     3  0.0000     0.9501 0.000 0.000 1.000 0.000
#> GSM750741     1  0.3873     0.7322 0.772 0.000 0.000 0.228
#> GSM549286     2  0.4916     0.4897 0.000 0.576 0.000 0.424
#> GSM549241     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549247     1  0.3873     0.7322 0.772 0.000 0.000 0.228
#> GSM549261     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549270     2  0.6027     0.5179 0.000 0.660 0.088 0.252
#> GSM549277     3  0.4283     0.7460 0.000 0.256 0.740 0.004
#> GSM549280     2  0.3123     0.6031 0.000 0.844 0.000 0.156
#> GSM549281     2  0.3172     0.6173 0.000 0.840 0.000 0.160
#> GSM549285     2  0.2704     0.5846 0.000 0.876 0.000 0.124
#> GSM549288     2  0.5159     0.5546 0.000 0.756 0.088 0.156
#> GSM549292     4  0.4877    -0.2632 0.000 0.408 0.000 0.592
#> GSM549295     3  0.0895     0.9482 0.000 0.020 0.976 0.004
#> GSM549297     3  0.3626     0.8362 0.000 0.184 0.812 0.004
#> GSM750743     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549268     2  0.3172     0.6173 0.000 0.840 0.000 0.160
#> GSM549290     2  0.4925     0.2951 0.000 0.572 0.000 0.428
#> GSM549272     2  0.4916     0.4897 0.000 0.576 0.000 0.424
#> GSM549276     2  0.4624     0.5465 0.000 0.660 0.000 0.340
#> GSM549275     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM549284     4  0.4697    -0.2203 0.000 0.356 0.000 0.644
#> GSM750737     4  0.6280     0.1949 0.344 0.072 0.000 0.584
#> GSM750740     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9042 1.000 0.000 0.000 0.000
#> GSM750751     2  0.4643     0.5459 0.000 0.656 0.000 0.344
#> GSM750754     2  0.2345     0.5326 0.000 0.900 0.000 0.100

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.1202     0.4550 0.004 0.032 0.000 0.960 0.004
#> GSM549291     5  0.6266     0.5190 0.000 0.152 0.000 0.376 0.472
#> GSM549274     2  0.0794     0.6981 0.000 0.972 0.000 0.028 0.000
#> GSM750738     2  0.3999     0.4040 0.000 0.656 0.000 0.344 0.000
#> GSM750748     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.3844     0.6354 0.792 0.000 0.000 0.164 0.044
#> GSM549279     2  0.5957     0.2413 0.000 0.572 0.000 0.280 0.148
#> GSM549294     5  0.4430     0.0747 0.000 0.456 0.000 0.004 0.540
#> GSM549300     3  0.3438     0.8165 0.000 0.000 0.808 0.020 0.172
#> GSM549303     3  0.0290     0.8538 0.000 0.000 0.992 0.008 0.000
#> GSM549309     3  0.0290     0.8538 0.000 0.000 0.992 0.008 0.000
#> GSM750753     5  0.4074     0.2292 0.000 0.364 0.000 0.000 0.636
#> GSM750752     2  0.4238     0.3713 0.000 0.628 0.000 0.368 0.004
#> GSM549304     2  0.0794     0.6972 0.000 0.972 0.000 0.028 0.000
#> GSM549305     5  0.4307    -0.0411 0.000 0.496 0.000 0.000 0.504
#> GSM549307     3  0.4626     0.6622 0.000 0.000 0.616 0.020 0.364
#> GSM549306     3  0.0000     0.8547 0.000 0.000 1.000 0.000 0.000
#> GSM549308     3  0.0000     0.8547 0.000 0.000 1.000 0.000 0.000
#> GSM549233     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549234     4  0.4225     0.7572 0.364 0.004 0.000 0.632 0.000
#> GSM549250     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549287     5  0.4049     0.5932 0.000 0.056 0.000 0.164 0.780
#> GSM750735     4  0.4725     0.7306 0.196 0.024 0.000 0.740 0.040
#> GSM750736     4  0.5407     0.6506 0.424 0.004 0.000 0.524 0.048
#> GSM750749     5  0.5681     0.5792 0.000 0.124 0.000 0.268 0.608
#> GSM549230     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549231     1  0.0290     0.9571 0.992 0.000 0.000 0.000 0.008
#> GSM549237     4  0.5280     0.6172 0.440 0.000 0.000 0.512 0.048
#> GSM549254     4  0.1202     0.4550 0.004 0.032 0.000 0.960 0.004
#> GSM750734     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM549271     5  0.3056     0.5749 0.000 0.068 0.000 0.068 0.864
#> GSM549232     4  0.3489     0.6921 0.144 0.036 0.000 0.820 0.000
#> GSM549246     4  0.2331     0.5720 0.064 0.024 0.000 0.908 0.004
#> GSM549248     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549255     4  0.4025     0.7793 0.292 0.008 0.000 0.700 0.000
#> GSM750746     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0880     0.9439 0.968 0.000 0.000 0.000 0.032
#> GSM549269     2  0.0404     0.6975 0.000 0.988 0.000 0.012 0.000
#> GSM549273     3  0.0290     0.8538 0.000 0.000 0.992 0.008 0.000
#> GSM549299     2  0.5733     0.1984 0.000 0.608 0.000 0.136 0.256
#> GSM549301     3  0.0000     0.8547 0.000 0.000 1.000 0.000 0.000
#> GSM549310     5  0.6500     0.4727 0.000 0.188 0.000 0.400 0.412
#> GSM549311     3  0.3977     0.7933 0.000 0.000 0.764 0.032 0.204
#> GSM549302     2  0.0404     0.6975 0.000 0.988 0.000 0.012 0.000
#> GSM549235     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM549245     4  0.4182     0.7655 0.352 0.004 0.000 0.644 0.000
#> GSM549265     4  0.4169     0.7722 0.240 0.028 0.000 0.732 0.000
#> GSM549282     5  0.3464     0.5797 0.000 0.068 0.000 0.096 0.836
#> GSM549296     5  0.6480     0.4774 0.000 0.184 0.000 0.400 0.416
#> GSM750739     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM750744     1  0.0404     0.9563 0.988 0.000 0.000 0.000 0.012
#> GSM750750     3  0.3284     0.8212 0.000 0.000 0.828 0.024 0.148
#> GSM549242     1  0.0290     0.9561 0.992 0.000 0.000 0.000 0.008
#> GSM549252     4  0.4127     0.7780 0.312 0.008 0.000 0.680 0.000
#> GSM549253     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549256     1  0.0404     0.9563 0.988 0.000 0.000 0.000 0.012
#> GSM549257     4  0.4166     0.7674 0.348 0.004 0.000 0.648 0.000
#> GSM549263     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549267     5  0.6206     0.5307 0.000 0.152 0.000 0.344 0.504
#> GSM750745     1  0.0609     0.9497 0.980 0.000 0.000 0.000 0.020
#> GSM549239     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.4350     0.7068 0.408 0.000 0.000 0.588 0.004
#> GSM549249     4  0.4211     0.7605 0.360 0.004 0.000 0.636 0.000
#> GSM549260     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM549266     2  0.6562    -0.1751 0.000 0.464 0.000 0.228 0.308
#> GSM549293     2  0.0794     0.6972 0.000 0.972 0.000 0.028 0.000
#> GSM549236     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549238     1  0.0912     0.9445 0.972 0.000 0.000 0.016 0.012
#> GSM549251     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549258     1  0.1043     0.9390 0.960 0.000 0.000 0.000 0.040
#> GSM549264     1  0.4977    -0.1240 0.604 0.000 0.000 0.356 0.040
#> GSM549243     1  0.0000     0.9581 1.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.0162     0.9577 0.996 0.000 0.000 0.000 0.004
#> GSM549278     5  0.6188     0.4947 0.000 0.136 0.000 0.416 0.448
#> GSM549283     2  0.3789     0.4772 0.000 0.760 0.000 0.016 0.224
#> GSM549298     3  0.0000     0.8547 0.000 0.000 1.000 0.000 0.000
#> GSM750741     4  0.5250     0.6620 0.416 0.000 0.000 0.536 0.048
#> GSM549286     2  0.0794     0.6827 0.000 0.972 0.000 0.000 0.028
#> GSM549241     1  0.1197     0.9327 0.952 0.000 0.000 0.000 0.048
#> GSM549247     4  0.5291     0.5858 0.456 0.000 0.000 0.496 0.048
#> GSM549261     1  0.1121     0.9356 0.956 0.000 0.000 0.000 0.044
#> GSM549270     5  0.4659     0.2560 0.000 0.332 0.004 0.020 0.644
#> GSM549277     3  0.5349     0.4841 0.000 0.020 0.488 0.020 0.472
#> GSM549280     5  0.2966     0.4713 0.000 0.184 0.000 0.000 0.816
#> GSM549281     5  0.5787     0.5100 0.000 0.240 0.000 0.152 0.608
#> GSM549285     5  0.6021     0.5498 0.000 0.188 0.000 0.232 0.580
#> GSM549288     5  0.3670     0.4618 0.000 0.180 0.004 0.020 0.796
#> GSM549292     2  0.0510     0.6981 0.000 0.984 0.000 0.016 0.000
#> GSM549295     3  0.2561     0.8386 0.000 0.000 0.884 0.020 0.096
#> GSM549297     3  0.5231     0.5620 0.000 0.016 0.536 0.020 0.428
#> GSM750743     1  0.1197     0.9327 0.952 0.000 0.000 0.000 0.048
#> GSM549268     5  0.5787     0.5100 0.000 0.240 0.000 0.152 0.608
#> GSM549290     5  0.6428     0.4994 0.000 0.180 0.000 0.364 0.456
#> GSM549272     2  0.0794     0.6827 0.000 0.972 0.000 0.000 0.028
#> GSM549276     2  0.4278     0.0600 0.000 0.548 0.000 0.000 0.452
#> GSM549275     1  0.1121     0.9356 0.956 0.000 0.000 0.000 0.044
#> GSM549284     2  0.1197     0.6836 0.000 0.952 0.000 0.048 0.000
#> GSM750737     4  0.3106     0.6762 0.132 0.024 0.000 0.844 0.000
#> GSM750740     1  0.1197     0.9327 0.952 0.000 0.000 0.000 0.048
#> GSM750747     1  0.0794     0.9456 0.972 0.000 0.000 0.000 0.028
#> GSM750751     2  0.4268     0.0610 0.000 0.556 0.000 0.000 0.444
#> GSM750754     5  0.4125     0.5942 0.000 0.056 0.000 0.172 0.772

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.2867     0.7081 0.000 0.000 0.000 0.848 0.040 0.112
#> GSM549291     6  0.2518     0.6623 0.000 0.016 0.000 0.092 0.012 0.880
#> GSM549274     2  0.0000     0.8791 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750738     2  0.2697     0.6930 0.000 0.812 0.000 0.188 0.000 0.000
#> GSM750748     1  0.0458     0.9283 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM549240     1  0.5691     0.3488 0.568 0.000 0.000 0.256 0.164 0.012
#> GSM549279     6  0.6883     0.2931 0.000 0.340 0.000 0.104 0.132 0.424
#> GSM549294     5  0.5647     0.5615 0.000 0.260 0.000 0.004 0.552 0.184
#> GSM549300     3  0.3595     0.6788 0.000 0.000 0.704 0.008 0.288 0.000
#> GSM549303     3  0.0146     0.8905 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM549309     3  0.0146     0.8905 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM750753     5  0.4801     0.6369 0.000 0.196 0.000 0.000 0.668 0.136
#> GSM750752     2  0.3702     0.5930 0.000 0.720 0.000 0.264 0.004 0.012
#> GSM549304     2  0.0146     0.8777 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM549305     5  0.5142     0.6068 0.000 0.304 0.000 0.000 0.584 0.112
#> GSM549307     5  0.4284     0.1254 0.000 0.000 0.384 0.008 0.596 0.012
#> GSM549306     3  0.0000     0.8912 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549308     3  0.0000     0.8912 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549233     1  0.1049     0.9247 0.960 0.000 0.000 0.008 0.032 0.000
#> GSM549234     4  0.2311     0.8457 0.104 0.000 0.000 0.880 0.016 0.000
#> GSM549250     1  0.1049     0.9247 0.960 0.000 0.000 0.008 0.032 0.000
#> GSM549287     6  0.3073     0.5450 0.000 0.000 0.000 0.008 0.204 0.788
#> GSM750735     4  0.4034     0.7438 0.024 0.000 0.000 0.776 0.148 0.052
#> GSM750736     4  0.5136     0.7531 0.168 0.000 0.000 0.660 0.160 0.012
#> GSM750749     6  0.4367     0.6135 0.000 0.024 0.000 0.076 0.148 0.752
#> GSM549230     1  0.0972     0.9273 0.964 0.000 0.000 0.008 0.028 0.000
#> GSM549231     1  0.0972     0.9277 0.964 0.000 0.000 0.008 0.028 0.000
#> GSM549237     4  0.5368     0.7289 0.208 0.000 0.000 0.632 0.144 0.016
#> GSM549254     4  0.2250     0.7506 0.000 0.000 0.000 0.896 0.040 0.064
#> GSM750734     1  0.0363     0.9287 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549271     6  0.3578     0.3605 0.000 0.000 0.000 0.000 0.340 0.660
#> GSM549232     4  0.1155     0.8147 0.036 0.000 0.000 0.956 0.004 0.004
#> GSM549246     4  0.2538     0.7771 0.020 0.000 0.000 0.892 0.040 0.048
#> GSM549248     1  0.0717     0.9269 0.976 0.000 0.000 0.008 0.016 0.000
#> GSM549255     4  0.1788     0.8405 0.076 0.000 0.000 0.916 0.004 0.004
#> GSM750746     1  0.0363     0.9286 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM549259     1  0.2191     0.8796 0.876 0.000 0.000 0.000 0.120 0.004
#> GSM549269     2  0.0000     0.8791 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549273     3  0.0146     0.8905 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM549299     6  0.5540     0.1666 0.000 0.440 0.000 0.016 0.084 0.460
#> GSM549301     3  0.0000     0.8912 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549310     6  0.3542     0.6401 0.000 0.028 0.000 0.156 0.016 0.800
#> GSM549311     3  0.4700     0.7087 0.000 0.000 0.700 0.008 0.180 0.112
#> GSM549302     2  0.0000     0.8791 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549235     1  0.0458     0.9283 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM549245     4  0.2311     0.8457 0.104 0.000 0.000 0.880 0.016 0.000
#> GSM549265     4  0.1444     0.8405 0.072 0.000 0.000 0.928 0.000 0.000
#> GSM549282     6  0.3428     0.3990 0.000 0.000 0.000 0.000 0.304 0.696
#> GSM549296     6  0.3516     0.6330 0.000 0.024 0.000 0.172 0.012 0.792
#> GSM750739     1  0.0146     0.9291 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM750742     1  0.0891     0.9276 0.968 0.000 0.000 0.008 0.024 0.000
#> GSM750744     1  0.0972     0.9261 0.964 0.000 0.000 0.008 0.028 0.000
#> GSM750750     3  0.3254     0.7914 0.000 0.000 0.804 0.008 0.172 0.016
#> GSM549242     1  0.0717     0.9291 0.976 0.000 0.000 0.008 0.016 0.000
#> GSM549252     4  0.1765     0.8466 0.096 0.000 0.000 0.904 0.000 0.000
#> GSM549253     1  0.0717     0.9269 0.976 0.000 0.000 0.008 0.016 0.000
#> GSM549256     1  0.1644     0.9079 0.932 0.000 0.000 0.040 0.028 0.000
#> GSM549257     4  0.1814     0.8467 0.100 0.000 0.000 0.900 0.000 0.000
#> GSM549263     1  0.0891     0.9276 0.968 0.000 0.000 0.008 0.024 0.000
#> GSM549267     6  0.2016     0.6565 0.000 0.016 0.000 0.040 0.024 0.920
#> GSM750745     1  0.1327     0.9089 0.936 0.000 0.000 0.000 0.064 0.000
#> GSM549239     1  0.0146     0.9290 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549244     4  0.2624     0.8359 0.124 0.000 0.000 0.856 0.020 0.000
#> GSM549249     4  0.2311     0.8457 0.104 0.000 0.000 0.880 0.016 0.000
#> GSM549260     1  0.0260     0.9289 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM549266     6  0.6647     0.3850 0.000 0.280 0.000 0.092 0.132 0.496
#> GSM549293     2  0.0146     0.8777 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM549236     1  0.0806     0.9271 0.972 0.000 0.000 0.008 0.020 0.000
#> GSM549238     1  0.3083     0.8007 0.828 0.000 0.000 0.132 0.040 0.000
#> GSM549251     1  0.0806     0.9271 0.972 0.000 0.000 0.008 0.020 0.000
#> GSM549258     1  0.2320     0.8739 0.864 0.000 0.000 0.000 0.132 0.004
#> GSM549264     4  0.5530     0.6454 0.260 0.000 0.000 0.588 0.140 0.012
#> GSM549243     1  0.0146     0.9293 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549262     1  0.0717     0.9269 0.976 0.000 0.000 0.008 0.016 0.000
#> GSM549278     6  0.3307     0.6506 0.000 0.012 0.000 0.120 0.040 0.828
#> GSM549283     2  0.5627     0.0858 0.000 0.544 0.000 0.016 0.112 0.328
#> GSM549298     3  0.0000     0.8912 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM750741     4  0.5426     0.7390 0.188 0.000 0.000 0.628 0.168 0.016
#> GSM549286     2  0.0000     0.8791 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549241     1  0.2669     0.8555 0.836 0.000 0.000 0.000 0.156 0.008
#> GSM549247     4  0.5338     0.7349 0.192 0.000 0.000 0.632 0.164 0.012
#> GSM549261     1  0.2593     0.8611 0.844 0.000 0.000 0.000 0.148 0.008
#> GSM549270     5  0.4297     0.6465 0.000 0.176 0.000 0.000 0.724 0.100
#> GSM549277     5  0.4178     0.4349 0.000 0.000 0.260 0.008 0.700 0.032
#> GSM549280     5  0.4307     0.5515 0.000 0.072 0.000 0.000 0.704 0.224
#> GSM549281     6  0.5863     0.2957 0.000 0.092 0.000 0.040 0.336 0.532
#> GSM549285     6  0.1785     0.6489 0.000 0.016 0.000 0.008 0.048 0.928
#> GSM549288     5  0.4432     0.5737 0.000 0.080 0.000 0.008 0.720 0.192
#> GSM549292     2  0.0000     0.8791 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     3  0.3398     0.7204 0.000 0.000 0.740 0.008 0.252 0.000
#> GSM549297     5  0.4253     0.3552 0.000 0.000 0.304 0.008 0.664 0.024
#> GSM750743     1  0.3020     0.8426 0.824 0.000 0.000 0.012 0.156 0.008
#> GSM549268     6  0.5863     0.2957 0.000 0.092 0.000 0.040 0.336 0.532
#> GSM549290     6  0.2400     0.6593 0.000 0.024 0.000 0.064 0.016 0.896
#> GSM549272     2  0.0000     0.8791 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549276     5  0.5353     0.4780 0.000 0.420 0.000 0.000 0.472 0.108
#> GSM549275     1  0.2841     0.8428 0.824 0.000 0.000 0.000 0.164 0.012
#> GSM549284     2  0.0458     0.8688 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM750737     4  0.2494     0.7880 0.028 0.000 0.000 0.896 0.040 0.036
#> GSM750740     1  0.2593     0.8598 0.844 0.000 0.000 0.000 0.148 0.008
#> GSM750747     1  0.2006     0.8903 0.892 0.000 0.000 0.000 0.104 0.004
#> GSM750751     5  0.5419     0.4644 0.000 0.424 0.000 0.000 0.460 0.116
#> GSM750754     6  0.2980     0.5571 0.000 0.000 0.000 0.008 0.192 0.800

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-kmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-kmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-kmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-kmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-kmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-kmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-kmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-kmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-kmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-kmeans-membership-heatmap-5

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)

plot of chunk tab-ATC-kmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-kmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-kmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-kmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-kmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-kmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-kmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-ATC-kmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-kmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-kmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> ATC:kmeans 101           0.6320    1.86e-05                0.8772  0.00936 2
#> ATC:kmeans 103           0.1139    1.63e-05                0.2149  0.00862 3
#> ATC:kmeans  73           0.0442    9.98e-06                0.2418  0.00829 4
#> ATC:kmeans  81           0.0875    7.59e-04                0.1204  0.19817 5
#> ATC:kmeans  89           0.1001    4.48e-04                0.0244  0.44023 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.


ATC:skmeans**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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)

plot of chunk ATC-skmeans-collect-plots

The plots are:

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:

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)

plot of chunk ATC-skmeans-select-partition-number

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.984       0.992         0.5039 0.496   0.496
#> 3 3 0.982           0.931       0.971         0.2148 0.880   0.760
#> 4 4 0.788           0.787       0.905         0.0949 0.911   0.780
#> 5 5 0.788           0.785       0.865         0.0771 0.904   0.728
#> 6 6 0.752           0.723       0.850         0.0451 0.976   0.909

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1   0.000      1.000 1.000 0.000
#> GSM549291     2   0.000      0.984 0.000 1.000
#> GSM549274     2   0.000      0.984 0.000 1.000
#> GSM750738     1   0.000      1.000 1.000 0.000
#> GSM750748     1   0.000      1.000 1.000 0.000
#> GSM549240     1   0.000      1.000 1.000 0.000
#> GSM549279     2   0.697      0.785 0.188 0.812
#> GSM549294     2   0.000      0.984 0.000 1.000
#> GSM549300     2   0.000      0.984 0.000 1.000
#> GSM549303     2   0.000      0.984 0.000 1.000
#> GSM549309     2   0.000      0.984 0.000 1.000
#> GSM750753     2   0.000      0.984 0.000 1.000
#> GSM750752     2   0.416      0.908 0.084 0.916
#> GSM549304     2   0.706      0.779 0.192 0.808
#> GSM549305     2   0.000      0.984 0.000 1.000
#> GSM549307     2   0.000      0.984 0.000 1.000
#> GSM549306     2   0.000      0.984 0.000 1.000
#> GSM549308     2   0.000      0.984 0.000 1.000
#> GSM549233     1   0.000      1.000 1.000 0.000
#> GSM549234     1   0.000      1.000 1.000 0.000
#> GSM549250     1   0.000      1.000 1.000 0.000
#> GSM549287     2   0.000      0.984 0.000 1.000
#> GSM750735     1   0.000      1.000 1.000 0.000
#> GSM750736     1   0.000      1.000 1.000 0.000
#> GSM750749     2   0.000      0.984 0.000 1.000
#> GSM549230     1   0.000      1.000 1.000 0.000
#> GSM549231     1   0.000      1.000 1.000 0.000
#> GSM549237     1   0.000      1.000 1.000 0.000
#> GSM549254     1   0.000      1.000 1.000 0.000
#> GSM750734     1   0.000      1.000 1.000 0.000
#> GSM549271     2   0.000      0.984 0.000 1.000
#> GSM549232     1   0.000      1.000 1.000 0.000
#> GSM549246     1   0.000      1.000 1.000 0.000
#> GSM549248     1   0.000      1.000 1.000 0.000
#> GSM549255     1   0.000      1.000 1.000 0.000
#> GSM750746     1   0.000      1.000 1.000 0.000
#> GSM549259     1   0.000      1.000 1.000 0.000
#> GSM549269     2   0.000      0.984 0.000 1.000
#> GSM549273     2   0.000      0.984 0.000 1.000
#> GSM549299     2   0.000      0.984 0.000 1.000
#> GSM549301     2   0.000      0.984 0.000 1.000
#> GSM549310     2   0.000      0.984 0.000 1.000
#> GSM549311     2   0.000      0.984 0.000 1.000
#> GSM549302     2   0.000      0.984 0.000 1.000
#> GSM549235     1   0.000      1.000 1.000 0.000
#> GSM549245     1   0.000      1.000 1.000 0.000
#> GSM549265     1   0.000      1.000 1.000 0.000
#> GSM549282     2   0.000      0.984 0.000 1.000
#> GSM549296     2   0.000      0.984 0.000 1.000
#> GSM750739     1   0.000      1.000 1.000 0.000
#> GSM750742     1   0.000      1.000 1.000 0.000
#> GSM750744     1   0.000      1.000 1.000 0.000
#> GSM750750     2   0.000      0.984 0.000 1.000
#> GSM549242     1   0.000      1.000 1.000 0.000
#> GSM549252     1   0.000      1.000 1.000 0.000
#> GSM549253     1   0.000      1.000 1.000 0.000
#> GSM549256     1   0.000      1.000 1.000 0.000
#> GSM549257     1   0.000      1.000 1.000 0.000
#> GSM549263     1   0.000      1.000 1.000 0.000
#> GSM549267     2   0.000      0.984 0.000 1.000
#> GSM750745     1   0.000      1.000 1.000 0.000
#> GSM549239     1   0.000      1.000 1.000 0.000
#> GSM549244     1   0.000      1.000 1.000 0.000
#> GSM549249     1   0.000      1.000 1.000 0.000
#> GSM549260     1   0.000      1.000 1.000 0.000
#> GSM549266     2   0.000      0.984 0.000 1.000
#> GSM549293     2   0.706      0.779 0.192 0.808
#> GSM549236     1   0.000      1.000 1.000 0.000
#> GSM549238     1   0.000      1.000 1.000 0.000
#> GSM549251     1   0.000      1.000 1.000 0.000
#> GSM549258     1   0.000      1.000 1.000 0.000
#> GSM549264     1   0.000      1.000 1.000 0.000
#> GSM549243     1   0.000      1.000 1.000 0.000
#> GSM549262     1   0.000      1.000 1.000 0.000
#> GSM549278     2   0.118      0.971 0.016 0.984
#> GSM549283     2   0.000      0.984 0.000 1.000
#> GSM549298     2   0.000      0.984 0.000 1.000
#> GSM750741     1   0.000      1.000 1.000 0.000
#> GSM549286     2   0.000      0.984 0.000 1.000
#> GSM549241     1   0.000      1.000 1.000 0.000
#> GSM549247     1   0.000      1.000 1.000 0.000
#> GSM549261     1   0.000      1.000 1.000 0.000
#> GSM549270     2   0.000      0.984 0.000 1.000
#> GSM549277     2   0.000      0.984 0.000 1.000
#> GSM549280     2   0.000      0.984 0.000 1.000
#> GSM549281     2   0.000      0.984 0.000 1.000
#> GSM549285     2   0.000      0.984 0.000 1.000
#> GSM549288     2   0.000      0.984 0.000 1.000
#> GSM549292     2   0.000      0.984 0.000 1.000
#> GSM549295     2   0.000      0.984 0.000 1.000
#> GSM549297     2   0.000      0.984 0.000 1.000
#> GSM750743     1   0.000      1.000 1.000 0.000
#> GSM549268     2   0.000      0.984 0.000 1.000
#> GSM549290     2   0.000      0.984 0.000 1.000
#> GSM549272     2   0.000      0.984 0.000 1.000
#> GSM549276     2   0.000      0.984 0.000 1.000
#> GSM549275     1   0.000      1.000 1.000 0.000
#> GSM549284     2   0.494      0.883 0.108 0.892
#> GSM750737     1   0.000      1.000 1.000 0.000
#> GSM750740     1   0.000      1.000 1.000 0.000
#> GSM750747     1   0.000      1.000 1.000 0.000
#> GSM750751     2   0.000      0.984 0.000 1.000
#> GSM750754     2   0.000      0.984 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549291     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549274     2  0.0237      0.862 0.000 0.996 0.004
#> GSM750738     2  0.0000      0.861 0.000 1.000 0.000
#> GSM750748     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549240     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549279     2  0.0237      0.862 0.000 0.996 0.004
#> GSM549294     3  0.5859      0.364 0.000 0.344 0.656
#> GSM549300     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549303     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549309     3  0.0000      0.972 0.000 0.000 1.000
#> GSM750753     3  0.4291      0.739 0.000 0.180 0.820
#> GSM750752     2  0.0000      0.861 0.000 1.000 0.000
#> GSM549304     2  0.0000      0.861 0.000 1.000 0.000
#> GSM549305     2  0.6215      0.377 0.000 0.572 0.428
#> GSM549307     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549306     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549308     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549233     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549234     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549250     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549287     3  0.0000      0.972 0.000 0.000 1.000
#> GSM750735     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750736     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750749     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549230     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549254     1  0.0237      0.997 0.996 0.004 0.000
#> GSM750734     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549271     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549232     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549246     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549248     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549255     1  0.0237      0.997 0.996 0.004 0.000
#> GSM750746     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549269     2  0.0237      0.862 0.000 0.996 0.004
#> GSM549273     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549299     2  0.6225      0.368 0.000 0.568 0.432
#> GSM549301     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549310     3  0.0892      0.955 0.000 0.020 0.980
#> GSM549311     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549302     2  0.0237      0.862 0.000 0.996 0.004
#> GSM549235     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549245     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549265     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549282     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549296     3  0.0892      0.955 0.000 0.020 0.980
#> GSM750739     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750750     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549242     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549252     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549253     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549256     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549257     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549263     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549267     3  0.0000      0.972 0.000 0.000 1.000
#> GSM750745     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549244     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549249     1  0.0237      0.997 0.996 0.004 0.000
#> GSM549260     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549266     2  0.6308      0.190 0.000 0.508 0.492
#> GSM549293     2  0.0000      0.861 0.000 1.000 0.000
#> GSM549236     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549238     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549251     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549258     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549264     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549243     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549278     3  0.0237      0.968 0.000 0.004 0.996
#> GSM549283     2  0.0424      0.860 0.000 0.992 0.008
#> GSM549298     3  0.0000      0.972 0.000 0.000 1.000
#> GSM750741     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549286     2  0.0237      0.862 0.000 0.996 0.004
#> GSM549241     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549247     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549261     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549270     3  0.4235      0.745 0.000 0.176 0.824
#> GSM549277     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549280     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549281     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549285     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549288     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549292     2  0.0237      0.862 0.000 0.996 0.004
#> GSM549295     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549297     3  0.0000      0.972 0.000 0.000 1.000
#> GSM750743     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549268     3  0.0000      0.972 0.000 0.000 1.000
#> GSM549290     3  0.0237      0.968 0.000 0.004 0.996
#> GSM549272     2  0.0237      0.862 0.000 0.996 0.004
#> GSM549276     2  0.5905      0.517 0.000 0.648 0.352
#> GSM549275     1  0.0000      0.999 1.000 0.000 0.000
#> GSM549284     2  0.0000      0.861 0.000 1.000 0.000
#> GSM750737     1  0.0237      0.997 0.996 0.004 0.000
#> GSM750740     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.999 1.000 0.000 0.000
#> GSM750751     2  0.6225      0.368 0.000 0.568 0.432
#> GSM750754     3  0.0000      0.972 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.3801     0.4930 0.220 0.000 0.000 0.780
#> GSM549291     4  0.4998     0.2784 0.000 0.000 0.488 0.512
#> GSM549274     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM750738     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM750748     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549240     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549279     2  0.4122     0.7287 0.000 0.760 0.004 0.236
#> GSM549294     3  0.4193     0.5826 0.000 0.268 0.732 0.000
#> GSM549300     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549303     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549309     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM750753     3  0.2530     0.7664 0.000 0.112 0.888 0.000
#> GSM750752     2  0.3610     0.6652 0.000 0.800 0.000 0.200
#> GSM549304     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM549305     3  0.4967     0.2202 0.000 0.452 0.548 0.000
#> GSM549307     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549306     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549308     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549233     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549234     1  0.3873     0.7347 0.772 0.000 0.000 0.228
#> GSM549250     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549287     3  0.0707     0.8420 0.000 0.000 0.980 0.020
#> GSM750735     1  0.3528     0.7150 0.808 0.000 0.000 0.192
#> GSM750736     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM750749     3  0.3528     0.6749 0.000 0.000 0.808 0.192
#> GSM549230     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549231     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549237     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549254     4  0.3801     0.4912 0.220 0.000 0.000 0.780
#> GSM750734     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549271     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549232     1  0.3942     0.7243 0.764 0.000 0.000 0.236
#> GSM549246     4  0.4898     0.0906 0.416 0.000 0.000 0.584
#> GSM549248     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549255     1  0.3975     0.7188 0.760 0.000 0.000 0.240
#> GSM750746     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM549273     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549299     3  0.5183     0.3282 0.000 0.408 0.584 0.008
#> GSM549301     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549310     4  0.4741     0.5443 0.000 0.004 0.328 0.668
#> GSM549311     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549302     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM549235     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549245     1  0.3873     0.7347 0.772 0.000 0.000 0.228
#> GSM549265     1  0.3873     0.7347 0.772 0.000 0.000 0.228
#> GSM549282     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549296     4  0.4697     0.5599 0.000 0.008 0.296 0.696
#> GSM750739     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM750750     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549242     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549252     1  0.3873     0.7347 0.772 0.000 0.000 0.228
#> GSM549253     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549256     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549257     1  0.3801     0.7437 0.780 0.000 0.000 0.220
#> GSM549263     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549267     3  0.4040     0.5017 0.000 0.000 0.752 0.248
#> GSM750745     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549244     1  0.3726     0.7525 0.788 0.000 0.000 0.212
#> GSM549249     1  0.3873     0.7347 0.772 0.000 0.000 0.228
#> GSM549260     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549266     3  0.7551     0.1209 0.000 0.356 0.448 0.196
#> GSM549293     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM549236     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549238     1  0.0469     0.9274 0.988 0.000 0.000 0.012
#> GSM549251     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549258     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549264     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549243     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549278     4  0.4564     0.4823 0.000 0.000 0.328 0.672
#> GSM549283     2  0.4446     0.6643 0.000 0.776 0.196 0.028
#> GSM549298     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM750741     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549286     2  0.0188     0.8914 0.000 0.996 0.004 0.000
#> GSM549241     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549247     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549261     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549270     3  0.2408     0.7741 0.000 0.104 0.896 0.000
#> GSM549277     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549280     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549281     3  0.3486     0.6801 0.000 0.000 0.812 0.188
#> GSM549285     3  0.0188     0.8539 0.000 0.000 0.996 0.004
#> GSM549288     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549292     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM549295     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM549297     3  0.0000     0.8565 0.000 0.000 1.000 0.000
#> GSM750743     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549268     3  0.3311     0.6990 0.000 0.000 0.828 0.172
#> GSM549290     4  0.4925     0.4210 0.000 0.000 0.428 0.572
#> GSM549272     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM549276     2  0.4961     0.0616 0.000 0.552 0.448 0.000
#> GSM549275     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM549284     2  0.0000     0.8943 0.000 1.000 0.000 0.000
#> GSM750737     1  0.4985     0.2137 0.532 0.000 0.000 0.468
#> GSM750740     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9355 1.000 0.000 0.000 0.000
#> GSM750751     3  0.4967     0.2198 0.000 0.452 0.548 0.000
#> GSM750754     3  0.0921     0.8353 0.000 0.000 0.972 0.028

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     5  0.5878     0.2302 0.116 0.000 0.000 0.336 0.548
#> GSM549291     5  0.4046     0.7484 0.000 0.000 0.296 0.008 0.696
#> GSM549274     2  0.0000     0.8991 0.000 1.000 0.000 0.000 0.000
#> GSM750738     2  0.1282     0.8639 0.000 0.952 0.000 0.044 0.004
#> GSM750748     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.1270     0.9137 0.948 0.000 0.000 0.052 0.000
#> GSM549279     2  0.6561     0.4989 0.000 0.552 0.016 0.224 0.208
#> GSM549294     3  0.3827     0.6579 0.000 0.144 0.812 0.020 0.024
#> GSM549300     3  0.0290     0.8036 0.000 0.000 0.992 0.000 0.008
#> GSM549303     3  0.0609     0.8026 0.000 0.000 0.980 0.000 0.020
#> GSM549309     3  0.0609     0.8026 0.000 0.000 0.980 0.000 0.020
#> GSM750753     3  0.1948     0.7697 0.000 0.036 0.932 0.008 0.024
#> GSM750752     2  0.4062     0.6623 0.000 0.764 0.000 0.196 0.040
#> GSM549304     2  0.0000     0.8991 0.000 1.000 0.000 0.000 0.000
#> GSM549305     3  0.5169     0.3711 0.000 0.364 0.596 0.016 0.024
#> GSM549307     3  0.0000     0.8030 0.000 0.000 1.000 0.000 0.000
#> GSM549306     3  0.0510     0.8034 0.000 0.000 0.984 0.000 0.016
#> GSM549308     3  0.0510     0.8034 0.000 0.000 0.984 0.000 0.016
#> GSM549233     1  0.1043     0.9314 0.960 0.000 0.000 0.040 0.000
#> GSM549234     4  0.4030     0.8427 0.352 0.000 0.000 0.648 0.000
#> GSM549250     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549287     3  0.3366     0.5631 0.000 0.000 0.784 0.004 0.212
#> GSM750735     1  0.5200     0.4246 0.688 0.000 0.000 0.152 0.160
#> GSM750736     1  0.2471     0.7791 0.864 0.000 0.000 0.136 0.000
#> GSM750749     3  0.5774     0.3918 0.000 0.000 0.612 0.156 0.232
#> GSM549230     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549231     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549237     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549254     4  0.5458    -0.0206 0.068 0.000 0.000 0.552 0.380
#> GSM750734     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549271     3  0.0609     0.8026 0.000 0.000 0.980 0.000 0.020
#> GSM549232     4  0.3999     0.8447 0.344 0.000 0.000 0.656 0.000
#> GSM549246     4  0.5689     0.3327 0.136 0.000 0.000 0.616 0.248
#> GSM549248     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549255     4  0.4015     0.8441 0.348 0.000 0.000 0.652 0.000
#> GSM750746     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549269     2  0.0000     0.8991 0.000 1.000 0.000 0.000 0.000
#> GSM549273     3  0.0510     0.8034 0.000 0.000 0.984 0.000 0.016
#> GSM549299     3  0.5466     0.3772 0.000 0.336 0.600 0.012 0.052
#> GSM549301     3  0.0510     0.8034 0.000 0.000 0.984 0.000 0.016
#> GSM549310     5  0.4133     0.7983 0.000 0.012 0.232 0.012 0.744
#> GSM549311     3  0.0880     0.7959 0.000 0.000 0.968 0.000 0.032
#> GSM549302     2  0.0000     0.8991 0.000 1.000 0.000 0.000 0.000
#> GSM549235     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549245     4  0.4015     0.8451 0.348 0.000 0.000 0.652 0.000
#> GSM549265     4  0.4045     0.8392 0.356 0.000 0.000 0.644 0.000
#> GSM549282     3  0.1043     0.7904 0.000 0.000 0.960 0.000 0.040
#> GSM549296     5  0.4391     0.7947 0.000 0.016 0.216 0.024 0.744
#> GSM750739     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM750744     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM750750     3  0.0609     0.8026 0.000 0.000 0.980 0.000 0.020
#> GSM549242     1  0.0290     0.9606 0.992 0.000 0.000 0.008 0.000
#> GSM549252     4  0.3999     0.8447 0.344 0.000 0.000 0.656 0.000
#> GSM549253     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549256     1  0.1478     0.8995 0.936 0.000 0.000 0.064 0.000
#> GSM549257     4  0.4182     0.7728 0.400 0.000 0.000 0.600 0.000
#> GSM549263     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549267     5  0.4440     0.3856 0.000 0.000 0.468 0.004 0.528
#> GSM750745     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.4045     0.8391 0.356 0.000 0.000 0.644 0.000
#> GSM549249     4  0.4015     0.8451 0.348 0.000 0.000 0.652 0.000
#> GSM549260     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549266     3  0.8417     0.0167 0.000 0.256 0.340 0.164 0.240
#> GSM549293     2  0.0000     0.8991 0.000 1.000 0.000 0.000 0.000
#> GSM549236     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549238     1  0.3039     0.6596 0.808 0.000 0.000 0.192 0.000
#> GSM549251     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549258     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549264     1  0.0963     0.9357 0.964 0.000 0.000 0.036 0.000
#> GSM549243     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.0162     0.9630 0.996 0.000 0.000 0.004 0.000
#> GSM549278     5  0.3759     0.7314 0.000 0.000 0.136 0.056 0.808
#> GSM549283     2  0.5962     0.4281 0.000 0.620 0.272 0.036 0.072
#> GSM549298     3  0.0510     0.8034 0.000 0.000 0.984 0.000 0.016
#> GSM750741     1  0.0510     0.9476 0.984 0.000 0.000 0.016 0.000
#> GSM549286     2  0.0162     0.8978 0.000 0.996 0.000 0.004 0.000
#> GSM549241     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549247     1  0.1544     0.8930 0.932 0.000 0.000 0.068 0.000
#> GSM549261     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549270     3  0.2060     0.7669 0.000 0.036 0.928 0.012 0.024
#> GSM549277     3  0.0000     0.8030 0.000 0.000 1.000 0.000 0.000
#> GSM549280     3  0.0451     0.7987 0.000 0.000 0.988 0.004 0.008
#> GSM549281     3  0.5592     0.4339 0.000 0.000 0.636 0.144 0.220
#> GSM549285     3  0.1638     0.7743 0.000 0.000 0.932 0.004 0.064
#> GSM549288     3  0.0000     0.8030 0.000 0.000 1.000 0.000 0.000
#> GSM549292     2  0.0000     0.8991 0.000 1.000 0.000 0.000 0.000
#> GSM549295     3  0.0000     0.8030 0.000 0.000 1.000 0.000 0.000
#> GSM549297     3  0.0000     0.8030 0.000 0.000 1.000 0.000 0.000
#> GSM750743     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM549268     3  0.5167     0.5027 0.000 0.000 0.684 0.116 0.200
#> GSM549290     5  0.3452     0.7925 0.000 0.000 0.244 0.000 0.756
#> GSM549272     2  0.0162     0.8978 0.000 0.996 0.000 0.004 0.000
#> GSM549276     3  0.5342     0.1587 0.000 0.464 0.496 0.016 0.024
#> GSM549275     1  0.0404     0.9550 0.988 0.000 0.000 0.012 0.000
#> GSM549284     2  0.0324     0.8952 0.000 0.992 0.000 0.004 0.004
#> GSM750737     4  0.5115     0.5064 0.168 0.000 0.000 0.696 0.136
#> GSM750740     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9633 1.000 0.000 0.000 0.000 0.000
#> GSM750751     3  0.5181     0.3673 0.000 0.368 0.592 0.016 0.024
#> GSM750754     3  0.2891     0.6315 0.000 0.000 0.824 0.000 0.176

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     6  0.6461     0.2918 0.060 0.000 0.000 0.268 0.160 0.512
#> GSM549291     6  0.4133     0.6116 0.000 0.000 0.252 0.008 0.032 0.708
#> GSM549274     2  0.0260     0.8768 0.000 0.992 0.000 0.008 0.000 0.000
#> GSM750738     2  0.1082     0.8494 0.000 0.956 0.000 0.040 0.004 0.000
#> GSM750748     1  0.0436     0.9226 0.988 0.000 0.000 0.004 0.004 0.004
#> GSM549240     1  0.2978     0.8323 0.860 0.000 0.000 0.072 0.056 0.012
#> GSM549279     5  0.4568     0.2311 0.000 0.276 0.016 0.016 0.676 0.016
#> GSM549294     3  0.5126     0.4349 0.000 0.112 0.684 0.008 0.180 0.016
#> GSM549300     3  0.0291     0.7991 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM549303     3  0.0260     0.7999 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM549309     3  0.0260     0.7999 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM750753     3  0.3629     0.6509 0.000 0.044 0.820 0.008 0.112 0.016
#> GSM750752     2  0.4114     0.6182 0.000 0.740 0.000 0.200 0.008 0.052
#> GSM549304     2  0.0260     0.8763 0.000 0.992 0.000 0.008 0.000 0.000
#> GSM549305     3  0.6065     0.1707 0.000 0.296 0.536 0.008 0.140 0.020
#> GSM549307     3  0.0603     0.7955 0.000 0.000 0.980 0.000 0.016 0.004
#> GSM549306     3  0.0146     0.8006 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM549308     3  0.0260     0.7999 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM549233     1  0.2744     0.8034 0.840 0.000 0.000 0.144 0.016 0.000
#> GSM549234     4  0.2793     0.7822 0.200 0.000 0.000 0.800 0.000 0.000
#> GSM549250     1  0.1528     0.9011 0.936 0.000 0.000 0.048 0.016 0.000
#> GSM549287     3  0.3695     0.4684 0.000 0.000 0.712 0.000 0.016 0.272
#> GSM750735     1  0.5196     0.1571 0.520 0.000 0.000 0.080 0.396 0.004
#> GSM750736     1  0.4320     0.5647 0.704 0.000 0.000 0.240 0.048 0.008
#> GSM750749     5  0.3737     0.6416 0.000 0.000 0.392 0.000 0.608 0.000
#> GSM549230     1  0.0820     0.9206 0.972 0.000 0.000 0.012 0.016 0.000
#> GSM549231     1  0.0914     0.9182 0.968 0.000 0.000 0.016 0.016 0.000
#> GSM549237     1  0.0862     0.9215 0.972 0.000 0.000 0.004 0.016 0.008
#> GSM549254     4  0.6209    -0.2014 0.016 0.000 0.000 0.420 0.188 0.376
#> GSM750734     1  0.0291     0.9229 0.992 0.000 0.000 0.004 0.004 0.000
#> GSM549271     3  0.0260     0.7999 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM549232     4  0.3087     0.7609 0.176 0.004 0.000 0.808 0.012 0.000
#> GSM549246     4  0.6901     0.1428 0.092 0.000 0.000 0.472 0.200 0.236
#> GSM549248     1  0.0914     0.9182 0.968 0.000 0.000 0.016 0.016 0.000
#> GSM549255     4  0.3401     0.7700 0.204 0.000 0.000 0.776 0.016 0.004
#> GSM750746     1  0.0146     0.9231 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549259     1  0.0405     0.9225 0.988 0.000 0.000 0.000 0.008 0.004
#> GSM549269     2  0.1218     0.8631 0.000 0.956 0.000 0.012 0.028 0.004
#> GSM549273     3  0.0146     0.8006 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM549299     3  0.6971     0.0388 0.000 0.276 0.480 0.012 0.152 0.080
#> GSM549301     3  0.0146     0.8006 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM549310     6  0.3781     0.7086 0.000 0.008 0.116 0.028 0.036 0.812
#> GSM549311     3  0.0692     0.7905 0.000 0.000 0.976 0.000 0.004 0.020
#> GSM549302     2  0.0551     0.8743 0.000 0.984 0.000 0.004 0.008 0.004
#> GSM549235     1  0.0291     0.9228 0.992 0.000 0.000 0.004 0.000 0.004
#> GSM549245     4  0.2933     0.7824 0.200 0.000 0.000 0.796 0.004 0.000
#> GSM549265     4  0.2964     0.7813 0.204 0.004 0.000 0.792 0.000 0.000
#> GSM549282     3  0.1719     0.7536 0.000 0.000 0.924 0.000 0.016 0.060
#> GSM549296     6  0.4304     0.7057 0.000 0.008 0.140 0.040 0.040 0.772
#> GSM750739     1  0.0260     0.9234 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM750742     1  0.0717     0.9207 0.976 0.000 0.000 0.008 0.016 0.000
#> GSM750744     1  0.0806     0.9236 0.972 0.000 0.000 0.008 0.020 0.000
#> GSM750750     3  0.0260     0.7999 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM549242     1  0.0806     0.9229 0.972 0.000 0.000 0.020 0.008 0.000
#> GSM549252     4  0.2793     0.7822 0.200 0.000 0.000 0.800 0.000 0.000
#> GSM549253     1  0.1168     0.9150 0.956 0.000 0.000 0.028 0.016 0.000
#> GSM549256     1  0.2613     0.8092 0.848 0.000 0.000 0.140 0.012 0.000
#> GSM549257     4  0.3647     0.6066 0.360 0.000 0.000 0.640 0.000 0.000
#> GSM549263     1  0.0914     0.9182 0.968 0.000 0.000 0.016 0.016 0.000
#> GSM549267     6  0.4318     0.2603 0.000 0.000 0.448 0.000 0.020 0.532
#> GSM750745     1  0.0547     0.9206 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM549239     1  0.0291     0.9232 0.992 0.000 0.000 0.004 0.004 0.000
#> GSM549244     4  0.3373     0.7479 0.248 0.000 0.000 0.744 0.008 0.000
#> GSM549249     4  0.2854     0.7814 0.208 0.000 0.000 0.792 0.000 0.000
#> GSM549260     1  0.0291     0.9229 0.992 0.000 0.000 0.004 0.004 0.000
#> GSM549266     5  0.4992     0.5451 0.000 0.140 0.160 0.000 0.684 0.016
#> GSM549293     2  0.0146     0.8764 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM549236     1  0.1088     0.9168 0.960 0.000 0.000 0.024 0.016 0.000
#> GSM549238     1  0.3871     0.4718 0.676 0.000 0.000 0.308 0.016 0.000
#> GSM549251     1  0.0914     0.9196 0.968 0.000 0.000 0.016 0.016 0.000
#> GSM549258     1  0.0547     0.9206 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM549264     1  0.1983     0.8837 0.908 0.000 0.000 0.072 0.020 0.000
#> GSM549243     1  0.0146     0.9228 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM549262     1  0.0717     0.9207 0.976 0.000 0.000 0.008 0.016 0.000
#> GSM549278     6  0.4074     0.6682 0.000 0.000 0.096 0.044 0.068 0.792
#> GSM549283     2  0.7179    -0.2206 0.000 0.384 0.276 0.020 0.280 0.040
#> GSM549298     3  0.0146     0.8006 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM750741     1  0.2386     0.8691 0.896 0.000 0.000 0.028 0.064 0.012
#> GSM549286     2  0.2257     0.8381 0.000 0.912 0.008 0.016 0.044 0.020
#> GSM549241     1  0.1578     0.9002 0.936 0.000 0.000 0.004 0.048 0.012
#> GSM549247     1  0.3190     0.8137 0.844 0.000 0.000 0.088 0.056 0.012
#> GSM549261     1  0.0909     0.9161 0.968 0.000 0.000 0.000 0.020 0.012
#> GSM549270     3  0.3325     0.6619 0.000 0.028 0.832 0.004 0.120 0.016
#> GSM549277     3  0.0363     0.7981 0.000 0.000 0.988 0.000 0.012 0.000
#> GSM549280     3  0.1265     0.7752 0.000 0.000 0.948 0.000 0.044 0.008
#> GSM549281     5  0.3930     0.6172 0.000 0.000 0.420 0.000 0.576 0.004
#> GSM549285     3  0.3592     0.6358 0.000 0.000 0.808 0.008 0.068 0.116
#> GSM549288     3  0.0547     0.7959 0.000 0.000 0.980 0.000 0.020 0.000
#> GSM549292     2  0.0000     0.8769 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     3  0.0603     0.7955 0.000 0.000 0.980 0.000 0.016 0.004
#> GSM549297     3  0.0777     0.7917 0.000 0.000 0.972 0.000 0.024 0.004
#> GSM750743     1  0.0922     0.9179 0.968 0.000 0.000 0.004 0.024 0.004
#> GSM549268     5  0.3982     0.5414 0.000 0.000 0.460 0.000 0.536 0.004
#> GSM549290     6  0.2752     0.6995 0.000 0.012 0.104 0.000 0.020 0.864
#> GSM549272     2  0.2288     0.8267 0.000 0.900 0.000 0.016 0.068 0.016
#> GSM549276     3  0.6409    -0.0406 0.000 0.384 0.440 0.016 0.140 0.020
#> GSM549275     1  0.1887     0.8945 0.924 0.000 0.000 0.016 0.048 0.012
#> GSM549284     2  0.0146     0.8764 0.000 0.996 0.000 0.004 0.000 0.000
#> GSM750737     4  0.6518     0.2644 0.096 0.000 0.000 0.548 0.192 0.164
#> GSM750740     1  0.0520     0.9219 0.984 0.000 0.000 0.000 0.008 0.008
#> GSM750747     1  0.0146     0.9233 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM750751     3  0.6167     0.1552 0.000 0.300 0.528 0.012 0.140 0.020
#> GSM750754     3  0.2814     0.6272 0.000 0.000 0.820 0.000 0.008 0.172

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-skmeans-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-skmeans-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-skmeans-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-skmeans-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-skmeans-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-skmeans-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-skmeans-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-skmeans-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-skmeans-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-skmeans-membership-heatmap-5

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)

plot of chunk tab-ATC-skmeans-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-skmeans-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-skmeans-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-skmeans-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-skmeans-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-skmeans-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-skmeans-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-ATC-skmeans-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-skmeans-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-skmeans-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> ATC:skmeans 103           0.1082    1.63e-05                0.1804 0.000624 2
#> ATC:skmeans  98           0.0293    2.27e-04                0.0270 0.023931 3
#> ATC:skmeans  91           0.1294    4.99e-03                0.1285 0.053841 4
#> ATC:skmeans  89           0.3078    1.04e-02                0.0818 0.114250 5
#> ATC:skmeans  88           0.5382    3.69e-04                0.1451 0.212604 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.


ATC:pam**

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'pam' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 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)

plot of chunk ATC-pam-collect-plots

The plots are:

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:

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)

plot of chunk ATC-pam-select-partition-number

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.806           0.873       0.948         0.4684 0.530   0.530
#> 3 3 1.000           0.953       0.982         0.3017 0.725   0.540
#> 4 4 0.759           0.785       0.854         0.1542 0.875   0.690
#> 5 5 0.840           0.773       0.892         0.0845 0.909   0.700
#> 6 6 0.886           0.797       0.895         0.0362 0.958   0.824

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 3

Following shows the table of the partitions (You need to click the show/hide code output link to see it). The membership matrix (columns with name p*) is inferred by clue::cl_consensus() function with the SE method. Basically the value in the membership matrix represents the probability to belong to a certain group. The finall class label for an item is determined with the group with highest probability it belongs to.

In get_classes() function, the entropy is calculated from the membership matrix and the silhouette score is calculated from the consensus matrix.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1   0.000     0.9474 1.000 0.000
#> GSM549291     2   0.871     0.5949 0.292 0.708
#> GSM549274     1   0.802     0.6756 0.756 0.244
#> GSM750738     1   0.141     0.9320 0.980 0.020
#> GSM750748     1   0.000     0.9474 1.000 0.000
#> GSM549240     1   0.000     0.9474 1.000 0.000
#> GSM549279     1   0.802     0.6756 0.756 0.244
#> GSM549294     2   0.000     0.9333 0.000 1.000
#> GSM549300     2   0.000     0.9333 0.000 1.000
#> GSM549303     2   0.000     0.9333 0.000 1.000
#> GSM549309     2   0.000     0.9333 0.000 1.000
#> GSM750753     2   0.000     0.9333 0.000 1.000
#> GSM750752     1   0.416     0.8752 0.916 0.084
#> GSM549304     1   0.745     0.7226 0.788 0.212
#> GSM549305     2   0.000     0.9333 0.000 1.000
#> GSM549307     2   0.000     0.9333 0.000 1.000
#> GSM549306     2   0.000     0.9333 0.000 1.000
#> GSM549308     2   0.000     0.9333 0.000 1.000
#> GSM549233     1   0.000     0.9474 1.000 0.000
#> GSM549234     1   0.000     0.9474 1.000 0.000
#> GSM549250     1   0.000     0.9474 1.000 0.000
#> GSM549287     2   0.000     0.9333 0.000 1.000
#> GSM750735     1   0.000     0.9474 1.000 0.000
#> GSM750736     1   0.000     0.9474 1.000 0.000
#> GSM750749     2   0.983     0.2657 0.424 0.576
#> GSM549230     1   0.000     0.9474 1.000 0.000
#> GSM549231     1   0.000     0.9474 1.000 0.000
#> GSM549237     1   0.000     0.9474 1.000 0.000
#> GSM549254     1   0.000     0.9474 1.000 0.000
#> GSM750734     1   0.000     0.9474 1.000 0.000
#> GSM549271     2   0.000     0.9333 0.000 1.000
#> GSM549232     1   0.000     0.9474 1.000 0.000
#> GSM549246     1   0.000     0.9474 1.000 0.000
#> GSM549248     1   0.000     0.9474 1.000 0.000
#> GSM549255     1   0.000     0.9474 1.000 0.000
#> GSM750746     1   0.000     0.9474 1.000 0.000
#> GSM549259     1   0.000     0.9474 1.000 0.000
#> GSM549269     1   0.921     0.5017 0.664 0.336
#> GSM549273     2   0.000     0.9333 0.000 1.000
#> GSM549299     2   0.402     0.8684 0.080 0.920
#> GSM549301     2   0.000     0.9333 0.000 1.000
#> GSM549310     2   0.760     0.7107 0.220 0.780
#> GSM549311     2   0.000     0.9333 0.000 1.000
#> GSM549302     2   0.833     0.6439 0.264 0.736
#> GSM549235     1   0.000     0.9474 1.000 0.000
#> GSM549245     1   0.000     0.9474 1.000 0.000
#> GSM549265     1   0.000     0.9474 1.000 0.000
#> GSM549282     2   0.000     0.9333 0.000 1.000
#> GSM549296     2   0.900     0.5487 0.316 0.684
#> GSM750739     1   0.000     0.9474 1.000 0.000
#> GSM750742     1   0.000     0.9474 1.000 0.000
#> GSM750744     1   0.000     0.9474 1.000 0.000
#> GSM750750     2   0.000     0.9333 0.000 1.000
#> GSM549242     1   0.000     0.9474 1.000 0.000
#> GSM549252     1   0.000     0.9474 1.000 0.000
#> GSM549253     1   0.000     0.9474 1.000 0.000
#> GSM549256     1   0.000     0.9474 1.000 0.000
#> GSM549257     1   0.000     0.9474 1.000 0.000
#> GSM549263     1   0.000     0.9474 1.000 0.000
#> GSM549267     2   0.653     0.7766 0.168 0.832
#> GSM750745     1   0.000     0.9474 1.000 0.000
#> GSM549239     1   0.000     0.9474 1.000 0.000
#> GSM549244     1   0.000     0.9474 1.000 0.000
#> GSM549249     1   0.000     0.9474 1.000 0.000
#> GSM549260     1   0.000     0.9474 1.000 0.000
#> GSM549266     1   0.802     0.6756 0.756 0.244
#> GSM549293     1   0.788     0.6879 0.764 0.236
#> GSM549236     1   0.000     0.9474 1.000 0.000
#> GSM549238     1   0.000     0.9474 1.000 0.000
#> GSM549251     1   0.000     0.9474 1.000 0.000
#> GSM549258     1   0.000     0.9474 1.000 0.000
#> GSM549264     1   0.000     0.9474 1.000 0.000
#> GSM549243     1   0.000     0.9474 1.000 0.000
#> GSM549262     1   0.000     0.9474 1.000 0.000
#> GSM549278     1   0.311     0.9017 0.944 0.056
#> GSM549283     1   0.981     0.2737 0.580 0.420
#> GSM549298     2   0.000     0.9333 0.000 1.000
#> GSM750741     1   0.000     0.9474 1.000 0.000
#> GSM549286     2   0.000     0.9333 0.000 1.000
#> GSM549241     1   0.000     0.9474 1.000 0.000
#> GSM549247     1   0.000     0.9474 1.000 0.000
#> GSM549261     1   0.000     0.9474 1.000 0.000
#> GSM549270     2   0.000     0.9333 0.000 1.000
#> GSM549277     2   0.000     0.9333 0.000 1.000
#> GSM549280     2   0.000     0.9333 0.000 1.000
#> GSM549281     2   0.000     0.9333 0.000 1.000
#> GSM549285     2   1.000     0.0561 0.488 0.512
#> GSM549288     2   0.000     0.9333 0.000 1.000
#> GSM549292     1   0.973     0.3264 0.596 0.404
#> GSM549295     2   0.000     0.9333 0.000 1.000
#> GSM549297     2   0.000     0.9333 0.000 1.000
#> GSM750743     1   0.000     0.9474 1.000 0.000
#> GSM549268     2   0.000     0.9333 0.000 1.000
#> GSM549290     1   0.999     0.0257 0.520 0.480
#> GSM549272     2   0.000     0.9333 0.000 1.000
#> GSM549276     2   0.000     0.9333 0.000 1.000
#> GSM549275     1   0.000     0.9474 1.000 0.000
#> GSM549284     1   0.402     0.8793 0.920 0.080
#> GSM750737     1   0.000     0.9474 1.000 0.000
#> GSM750740     1   0.000     0.9474 1.000 0.000
#> GSM750747     1   0.000     0.9474 1.000 0.000
#> GSM750751     2   0.000     0.9333 0.000 1.000
#> GSM750754     2   0.000     0.9333 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.5968      0.427 0.636 0.364 0.000
#> GSM549291     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549274     2  0.0000      0.972 0.000 1.000 0.000
#> GSM750738     2  0.0000      0.972 0.000 1.000 0.000
#> GSM750748     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549240     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549279     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549294     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549300     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549303     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549309     3  0.0000      1.000 0.000 0.000 1.000
#> GSM750753     2  0.0237      0.970 0.000 0.996 0.004
#> GSM750752     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549304     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549305     2  0.0237      0.970 0.000 0.996 0.004
#> GSM549307     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549306     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549308     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549233     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549234     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549250     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549287     2  0.0237      0.970 0.000 0.996 0.004
#> GSM750735     1  0.4974      0.683 0.764 0.236 0.000
#> GSM750736     1  0.0000      0.976 1.000 0.000 0.000
#> GSM750749     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549230     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549231     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549237     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549254     2  0.3192      0.839 0.112 0.888 0.000
#> GSM750734     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549271     2  0.0237      0.970 0.000 0.996 0.004
#> GSM549232     1  0.6062      0.369 0.616 0.384 0.000
#> GSM549246     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549248     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549255     1  0.0000      0.976 1.000 0.000 0.000
#> GSM750746     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549259     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549269     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549273     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549299     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549301     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549310     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549311     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549302     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549235     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549245     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549265     2  0.5835      0.486 0.340 0.660 0.000
#> GSM549282     2  0.0237      0.970 0.000 0.996 0.004
#> GSM549296     2  0.0000      0.972 0.000 1.000 0.000
#> GSM750739     1  0.0000      0.976 1.000 0.000 0.000
#> GSM750742     1  0.0000      0.976 1.000 0.000 0.000
#> GSM750744     1  0.0000      0.976 1.000 0.000 0.000
#> GSM750750     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549242     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549252     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549253     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549256     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549257     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549263     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549267     2  0.0000      0.972 0.000 1.000 0.000
#> GSM750745     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549239     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549244     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549249     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549260     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549266     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549293     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549236     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549238     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549251     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549258     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549264     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549243     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549262     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549278     2  0.5058      0.648 0.244 0.756 0.000
#> GSM549283     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549298     3  0.0000      1.000 0.000 0.000 1.000
#> GSM750741     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549286     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549241     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549247     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549261     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549270     2  0.2356      0.908 0.000 0.928 0.072
#> GSM549277     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549280     2  0.0237      0.970 0.000 0.996 0.004
#> GSM549281     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549285     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549288     2  0.2261      0.912 0.000 0.932 0.068
#> GSM549292     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549295     3  0.0000      1.000 0.000 0.000 1.000
#> GSM549297     3  0.0000      1.000 0.000 0.000 1.000
#> GSM750743     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549268     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549290     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549272     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549276     2  0.0000      0.972 0.000 1.000 0.000
#> GSM549275     1  0.0000      0.976 1.000 0.000 0.000
#> GSM549284     2  0.0000      0.972 0.000 1.000 0.000
#> GSM750737     1  0.1031      0.951 0.976 0.024 0.000
#> GSM750740     1  0.0000      0.976 1.000 0.000 0.000
#> GSM750747     1  0.0000      0.976 1.000 0.000 0.000
#> GSM750751     2  0.0000      0.972 0.000 1.000 0.000
#> GSM750754     2  0.0237      0.970 0.000 0.996 0.004

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.6655      0.668 0.192 0.184 0.000 0.624
#> GSM549291     2  0.5000      0.522 0.000 0.504 0.000 0.496
#> GSM549274     2  0.0188      0.774 0.000 0.996 0.000 0.004
#> GSM750738     2  0.2647      0.681 0.000 0.880 0.000 0.120
#> GSM750748     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549240     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549279     2  0.0469      0.772 0.000 0.988 0.000 0.012
#> GSM549294     2  0.4406      0.744 0.000 0.700 0.000 0.300
#> GSM549300     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM549303     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM549309     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM750753     2  0.4776      0.712 0.000 0.624 0.000 0.376
#> GSM750752     4  0.4941      0.260 0.000 0.436 0.000 0.564
#> GSM549304     2  0.0188      0.774 0.000 0.996 0.000 0.004
#> GSM549305     2  0.4776      0.712 0.000 0.624 0.000 0.376
#> GSM549307     3  0.2593      0.891 0.000 0.004 0.892 0.104
#> GSM549306     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM549308     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM549233     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549234     4  0.4790      0.716 0.380 0.000 0.000 0.620
#> GSM549250     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549287     4  0.5000     -0.664 0.000 0.500 0.000 0.500
#> GSM750735     1  0.4122      0.534 0.760 0.236 0.000 0.004
#> GSM750736     1  0.3356      0.679 0.824 0.000 0.000 0.176
#> GSM750749     2  0.4814      0.740 0.008 0.676 0.000 0.316
#> GSM549230     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549231     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549237     1  0.0469      0.948 0.988 0.000 0.000 0.012
#> GSM549254     4  0.6100      0.493 0.072 0.304 0.000 0.624
#> GSM750734     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549271     2  0.4817      0.710 0.000 0.612 0.000 0.388
#> GSM549232     4  0.6452      0.722 0.268 0.112 0.000 0.620
#> GSM549246     4  0.4817      0.703 0.388 0.000 0.000 0.612
#> GSM549248     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549255     4  0.4790      0.716 0.380 0.000 0.000 0.620
#> GSM750746     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549269     2  0.0000      0.776 0.000 1.000 0.000 0.000
#> GSM549273     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM549299     2  0.0188      0.776 0.000 0.996 0.000 0.004
#> GSM549301     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM549310     2  0.3486      0.617 0.000 0.812 0.000 0.188
#> GSM549311     3  0.1940      0.909 0.000 0.000 0.924 0.076
#> GSM549302     2  0.0000      0.776 0.000 1.000 0.000 0.000
#> GSM549235     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549245     4  0.4790      0.716 0.380 0.000 0.000 0.620
#> GSM549265     4  0.6521      0.720 0.256 0.124 0.000 0.620
#> GSM549282     2  0.4855      0.706 0.000 0.600 0.000 0.400
#> GSM549296     2  0.4103      0.516 0.000 0.744 0.000 0.256
#> GSM750739     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM750744     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM750750     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM549242     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549252     4  0.4790      0.716 0.380 0.000 0.000 0.620
#> GSM549253     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549256     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549257     4  0.4790      0.716 0.380 0.000 0.000 0.620
#> GSM549263     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549267     2  0.4072      0.603 0.000 0.748 0.000 0.252
#> GSM750745     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549244     4  0.4790      0.716 0.380 0.000 0.000 0.620
#> GSM549249     4  0.4790      0.716 0.380 0.000 0.000 0.620
#> GSM549260     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549266     2  0.0804      0.769 0.008 0.980 0.000 0.012
#> GSM549293     2  0.0188      0.774 0.000 0.996 0.000 0.004
#> GSM549236     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549238     1  0.1867      0.871 0.928 0.000 0.000 0.072
#> GSM549251     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549258     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549264     1  0.0921      0.931 0.972 0.000 0.000 0.028
#> GSM549243     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549262     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549278     4  0.4855      0.310 0.000 0.400 0.000 0.600
#> GSM549283     2  0.0000      0.776 0.000 1.000 0.000 0.000
#> GSM549298     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> GSM750741     1  0.0469      0.948 0.988 0.000 0.000 0.012
#> GSM549286     2  0.0000      0.776 0.000 1.000 0.000 0.000
#> GSM549241     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549247     1  0.4977     -0.342 0.540 0.000 0.000 0.460
#> GSM549261     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549270     2  0.4776      0.712 0.000 0.624 0.000 0.376
#> GSM549277     3  0.4889      0.650 0.000 0.004 0.636 0.360
#> GSM549280     2  0.4776      0.712 0.000 0.624 0.000 0.376
#> GSM549281     2  0.4500      0.743 0.000 0.684 0.000 0.316
#> GSM549285     2  0.1059      0.767 0.012 0.972 0.000 0.016
#> GSM549288     2  0.4776      0.712 0.000 0.624 0.000 0.376
#> GSM549292     2  0.0000      0.776 0.000 1.000 0.000 0.000
#> GSM549295     3  0.1557      0.918 0.000 0.000 0.944 0.056
#> GSM549297     3  0.4632      0.713 0.000 0.004 0.688 0.308
#> GSM750743     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549268     2  0.4522      0.742 0.000 0.680 0.000 0.320
#> GSM549290     2  0.4855      0.190 0.000 0.600 0.000 0.400
#> GSM549272     2  0.0000      0.776 0.000 1.000 0.000 0.000
#> GSM549276     2  0.4406      0.744 0.000 0.700 0.000 0.300
#> GSM549275     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM549284     2  0.0188      0.774 0.000 0.996 0.000 0.004
#> GSM750737     4  0.5436      0.721 0.356 0.024 0.000 0.620
#> GSM750740     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.962 1.000 0.000 0.000 0.000
#> GSM750751     2  0.4477      0.741 0.000 0.688 0.000 0.312
#> GSM750754     2  0.4999      0.639 0.000 0.508 0.000 0.492

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.1403     0.8723 0.024 0.024 0.000 0.952 0.000
#> GSM549291     2  0.6519     0.1628 0.000 0.436 0.000 0.196 0.368
#> GSM549274     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM750738     2  0.4291     0.1627 0.000 0.536 0.000 0.464 0.000
#> GSM750748     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549279     2  0.1043     0.7869 0.000 0.960 0.000 0.000 0.040
#> GSM549294     5  0.4297     0.3134 0.000 0.472 0.000 0.000 0.528
#> GSM549300     3  0.1197     0.8875 0.000 0.000 0.952 0.048 0.000
#> GSM549303     3  0.0000     0.9096 0.000 0.000 1.000 0.000 0.000
#> GSM549309     3  0.0000     0.9096 0.000 0.000 1.000 0.000 0.000
#> GSM750753     5  0.3039     0.6694 0.000 0.192 0.000 0.000 0.808
#> GSM750752     4  0.3395     0.6176 0.000 0.236 0.000 0.764 0.000
#> GSM549304     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM549305     5  0.4201     0.4659 0.000 0.408 0.000 0.000 0.592
#> GSM549307     5  0.5271    -0.1328 0.000 0.000 0.432 0.048 0.520
#> GSM549306     3  0.0000     0.9096 0.000 0.000 1.000 0.000 0.000
#> GSM549308     3  0.0000     0.9096 0.000 0.000 1.000 0.000 0.000
#> GSM549233     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549234     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM549250     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549287     5  0.0290     0.6626 0.000 0.000 0.000 0.008 0.992
#> GSM750735     1  0.3109     0.7433 0.800 0.200 0.000 0.000 0.000
#> GSM750736     4  0.4306     0.0589 0.492 0.000 0.000 0.508 0.000
#> GSM750749     5  0.4440     0.3152 0.004 0.468 0.000 0.000 0.528
#> GSM549230     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549231     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549237     1  0.0703     0.9592 0.976 0.000 0.000 0.024 0.000
#> GSM549254     4  0.1197     0.8423 0.000 0.048 0.000 0.952 0.000
#> GSM750734     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549271     5  0.0000     0.6644 0.000 0.000 0.000 0.000 1.000
#> GSM549232     4  0.1282     0.8918 0.044 0.004 0.000 0.952 0.000
#> GSM549246     4  0.1410     0.8849 0.060 0.000 0.000 0.940 0.000
#> GSM549248     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549255     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM750746     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549269     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM549273     3  0.0000     0.9096 0.000 0.000 1.000 0.000 0.000
#> GSM549299     2  0.0162     0.8030 0.000 0.996 0.000 0.000 0.004
#> GSM549301     3  0.0000     0.9096 0.000 0.000 1.000 0.000 0.000
#> GSM549310     2  0.2969     0.7276 0.000 0.852 0.000 0.128 0.020
#> GSM549311     3  0.5296     0.3052 0.000 0.000 0.480 0.048 0.472
#> GSM549302     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM549235     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549245     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM549265     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM549282     5  0.1792     0.6475 0.000 0.084 0.000 0.000 0.916
#> GSM549296     2  0.3596     0.6672 0.000 0.784 0.000 0.200 0.016
#> GSM750739     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM750744     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM750750     3  0.0703     0.9002 0.000 0.000 0.976 0.024 0.000
#> GSM549242     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549252     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM549253     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549256     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549257     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM549263     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549267     2  0.5236     0.6030 0.000 0.684 0.000 0.164 0.152
#> GSM750745     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM549249     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM549260     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549266     2  0.2338     0.7332 0.004 0.884 0.000 0.000 0.112
#> GSM549293     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM549236     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549238     1  0.3143     0.7356 0.796 0.000 0.000 0.204 0.000
#> GSM549251     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549258     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549264     1  0.2891     0.7751 0.824 0.000 0.000 0.176 0.000
#> GSM549243     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549278     4  0.4798     0.2027 0.000 0.396 0.000 0.580 0.024
#> GSM549283     2  0.2179     0.7332 0.000 0.888 0.000 0.000 0.112
#> GSM549298     3  0.0000     0.9096 0.000 0.000 1.000 0.000 0.000
#> GSM750741     1  0.1410     0.9242 0.940 0.000 0.000 0.060 0.000
#> GSM549286     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM549241     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549247     4  0.2329     0.8154 0.124 0.000 0.000 0.876 0.000
#> GSM549261     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549270     5  0.3710     0.6832 0.000 0.144 0.000 0.048 0.808
#> GSM549277     5  0.3532     0.5822 0.000 0.000 0.128 0.048 0.824
#> GSM549280     5  0.2179     0.6937 0.000 0.112 0.000 0.000 0.888
#> GSM549281     5  0.4297     0.3134 0.000 0.472 0.000 0.000 0.528
#> GSM549285     2  0.3012     0.6967 0.104 0.860 0.000 0.000 0.036
#> GSM549288     5  0.2520     0.6591 0.000 0.056 0.000 0.048 0.896
#> GSM549292     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM549295     3  0.4822     0.5743 0.000 0.000 0.664 0.048 0.288
#> GSM549297     5  0.3991     0.5257 0.000 0.000 0.172 0.048 0.780
#> GSM750743     1  0.0404     0.9697 0.988 0.000 0.000 0.012 0.000
#> GSM549268     5  0.4249     0.3878 0.000 0.432 0.000 0.000 0.568
#> GSM549290     2  0.5666     0.4557 0.000 0.592 0.000 0.300 0.108
#> GSM549272     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM549276     2  0.4305    -0.3380 0.000 0.512 0.000 0.000 0.488
#> GSM549275     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM549284     2  0.0000     0.8052 0.000 1.000 0.000 0.000 0.000
#> GSM750737     4  0.1197     0.8946 0.048 0.000 0.000 0.952 0.000
#> GSM750740     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9795 1.000 0.000 0.000 0.000 0.000
#> GSM750751     5  0.4307     0.3062 0.000 0.496 0.000 0.000 0.504
#> GSM750754     5  0.0000     0.6644 0.000 0.000 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.0865      0.866 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM549291     6  0.1806      0.661 0.000 0.088 0.000 0.000 0.004 0.908
#> GSM549274     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750738     4  0.3866      0.068 0.000 0.484 0.000 0.516 0.000 0.000
#> GSM750748     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549279     2  0.1765      0.800 0.000 0.904 0.000 0.000 0.096 0.000
#> GSM549294     5  0.3543      0.738 0.000 0.032 0.000 0.000 0.768 0.200
#> GSM549300     3  0.2823      0.795 0.000 0.000 0.796 0.000 0.204 0.000
#> GSM549303     3  0.0000      0.933 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549309     3  0.0000      0.933 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM750753     5  0.5138      0.710 0.000 0.128 0.000 0.000 0.604 0.268
#> GSM750752     4  0.2823      0.641 0.000 0.204 0.000 0.796 0.000 0.000
#> GSM549304     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549305     5  0.4873      0.713 0.000 0.100 0.000 0.000 0.632 0.268
#> GSM549307     5  0.4634      0.330 0.000 0.000 0.284 0.000 0.644 0.072
#> GSM549306     3  0.0000      0.933 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549308     3  0.0000      0.933 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549233     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549234     4  0.0000      0.882 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549250     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549287     6  0.0363      0.658 0.000 0.000 0.000 0.000 0.012 0.988
#> GSM750735     1  0.2793      0.747 0.800 0.200 0.000 0.000 0.000 0.000
#> GSM750736     4  0.3833      0.101 0.444 0.000 0.000 0.556 0.000 0.000
#> GSM750749     5  0.3470      0.739 0.000 0.028 0.000 0.000 0.772 0.200
#> GSM549230     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549231     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549237     1  0.0790      0.944 0.968 0.000 0.000 0.032 0.000 0.000
#> GSM549254     4  0.0865      0.866 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM750734     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549271     6  0.3409      0.180 0.000 0.000 0.000 0.000 0.300 0.700
#> GSM549232     4  0.0146      0.880 0.000 0.004 0.000 0.996 0.000 0.000
#> GSM549246     4  0.1141      0.859 0.052 0.000 0.000 0.948 0.000 0.000
#> GSM549248     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549255     4  0.0547      0.875 0.020 0.000 0.000 0.980 0.000 0.000
#> GSM750746     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0458      0.963 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM549269     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549273     3  0.0000      0.933 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549299     2  0.0146      0.861 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM549301     3  0.0000      0.933 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549310     2  0.4455      0.548 0.000 0.688 0.000 0.080 0.000 0.232
#> GSM549311     6  0.4475      0.473 0.000 0.000 0.088 0.000 0.220 0.692
#> GSM549302     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549235     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549245     4  0.0000      0.882 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549265     4  0.0000      0.882 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549282     6  0.0000      0.658 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM549296     2  0.4971      0.370 0.000 0.604 0.000 0.096 0.000 0.300
#> GSM750739     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM750742     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750744     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM750750     3  0.1387      0.898 0.000 0.000 0.932 0.000 0.068 0.000
#> GSM549242     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549252     4  0.0000      0.882 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549253     1  0.0632      0.963 0.976 0.000 0.000 0.024 0.000 0.000
#> GSM549256     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549257     4  0.0000      0.882 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549263     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549267     6  0.3023      0.575 0.000 0.232 0.000 0.000 0.000 0.768
#> GSM750745     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549239     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549244     4  0.0000      0.882 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549249     4  0.0000      0.882 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM549260     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549266     2  0.3151      0.660 0.000 0.748 0.000 0.000 0.252 0.000
#> GSM549293     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549236     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549238     1  0.2883      0.775 0.788 0.000 0.000 0.212 0.000 0.000
#> GSM549251     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549258     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549264     1  0.2941      0.761 0.780 0.000 0.000 0.220 0.000 0.000
#> GSM549243     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549262     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549278     6  0.6125      0.144 0.000 0.312 0.000 0.336 0.000 0.352
#> GSM549283     2  0.3151      0.660 0.000 0.748 0.000 0.000 0.252 0.000
#> GSM549298     3  0.0000      0.933 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM750741     1  0.1387      0.913 0.932 0.000 0.000 0.068 0.000 0.000
#> GSM549286     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549241     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549247     4  0.0790      0.855 0.032 0.000 0.000 0.968 0.000 0.000
#> GSM549261     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549270     5  0.2625      0.664 0.000 0.056 0.000 0.000 0.872 0.072
#> GSM549277     5  0.1444      0.667 0.000 0.000 0.000 0.000 0.928 0.072
#> GSM549280     5  0.2823      0.732 0.000 0.000 0.000 0.000 0.796 0.204
#> GSM549281     5  0.3470      0.739 0.000 0.028 0.000 0.000 0.772 0.200
#> GSM549285     2  0.3789      0.237 0.000 0.584 0.000 0.000 0.000 0.416
#> GSM549288     5  0.4530      0.287 0.000 0.044 0.000 0.000 0.600 0.356
#> GSM549292     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549295     3  0.4456      0.639 0.000 0.000 0.668 0.000 0.268 0.064
#> GSM549297     5  0.1802      0.665 0.000 0.000 0.012 0.000 0.916 0.072
#> GSM750743     1  0.1075      0.957 0.952 0.000 0.000 0.048 0.000 0.000
#> GSM549268     5  0.3470      0.739 0.000 0.028 0.000 0.000 0.772 0.200
#> GSM549290     6  0.3464      0.444 0.000 0.312 0.000 0.000 0.000 0.688
#> GSM549272     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM549276     5  0.5788      0.533 0.000 0.316 0.000 0.000 0.484 0.200
#> GSM549275     1  0.0865      0.963 0.964 0.000 0.000 0.036 0.000 0.000
#> GSM549284     2  0.0000      0.864 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM750737     4  0.0865      0.866 0.036 0.000 0.000 0.964 0.000 0.000
#> GSM750740     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750747     1  0.0000      0.961 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750751     5  0.5543      0.630 0.000 0.240 0.000 0.000 0.556 0.204
#> GSM750754     6  0.0000      0.658 0.000 0.000 0.000 0.000 0.000 1.000

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-pam-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-pam-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-pam-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-pam-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-pam-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-pam-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-pam-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-pam-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-pam-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-pam-membership-heatmap-5

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)

plot of chunk tab-ATC-pam-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-pam-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-pam-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-pam-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-pam-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-pam-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-pam-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-ATC-pam-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-pam-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-pam-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> ATC:pam  98           0.5197    2.46e-05                 0.826   0.0175 2
#> ATC:pam 100           0.0971    7.42e-05                 0.298   0.0209 3
#> ATC:pam  97           0.3844    1.65e-04                 0.165   0.0251 4
#> ATC:pam  89           0.4036    4.85e-03                 0.228   0.0344 5
#> ATC:pam  93           0.4040    3.38e-04                 0.054   0.0329 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.


ATC:mclust

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'mclust' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-mclust-collect-plots

The plots are:

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:

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)

plot of chunk ATC-mclust-select-partition-number

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.864           0.931       0.969         0.4934 0.503   0.503
#> 3 3 0.608           0.599       0.764         0.2735 0.798   0.614
#> 4 4 0.677           0.774       0.861         0.1125 0.779   0.480
#> 5 5 0.675           0.656       0.804         0.0693 0.953   0.838
#> 6 6 0.730           0.607       0.769         0.0448 0.922   0.717

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     2  0.2043      0.949 0.032 0.968
#> GSM549291     2  0.0376      0.970 0.004 0.996
#> GSM549274     2  0.0376      0.970 0.004 0.996
#> GSM750738     2  0.0000      0.971 0.000 1.000
#> GSM750748     1  0.0000      0.960 1.000 0.000
#> GSM549240     1  0.0000      0.960 1.000 0.000
#> GSM549279     2  0.1184      0.963 0.016 0.984
#> GSM549294     2  0.0376      0.970 0.004 0.996
#> GSM549300     2  0.0000      0.971 0.000 1.000
#> GSM549303     2  0.0000      0.971 0.000 1.000
#> GSM549309     2  0.0000      0.971 0.000 1.000
#> GSM750753     2  0.0000      0.971 0.000 1.000
#> GSM750752     2  0.0000      0.971 0.000 1.000
#> GSM549304     2  0.0000      0.971 0.000 1.000
#> GSM549305     2  0.0000      0.971 0.000 1.000
#> GSM549307     2  0.0000      0.971 0.000 1.000
#> GSM549306     2  0.0000      0.971 0.000 1.000
#> GSM549308     2  0.0000      0.971 0.000 1.000
#> GSM549233     1  0.0000      0.960 1.000 0.000
#> GSM549234     1  0.5059      0.882 0.888 0.112
#> GSM549250     1  0.0000      0.960 1.000 0.000
#> GSM549287     2  0.0000      0.971 0.000 1.000
#> GSM750735     2  0.1184      0.963 0.016 0.984
#> GSM750736     1  0.7602      0.732 0.780 0.220
#> GSM750749     2  0.1184      0.963 0.016 0.984
#> GSM549230     1  0.0000      0.960 1.000 0.000
#> GSM549231     1  0.0000      0.960 1.000 0.000
#> GSM549237     1  0.1843      0.944 0.972 0.028
#> GSM549254     2  0.3879      0.904 0.076 0.924
#> GSM750734     1  0.0000      0.960 1.000 0.000
#> GSM549271     2  0.0000      0.971 0.000 1.000
#> GSM549232     2  0.9286      0.473 0.344 0.656
#> GSM549246     2  0.7883      0.687 0.236 0.764
#> GSM549248     1  0.0000      0.960 1.000 0.000
#> GSM549255     1  0.9850      0.270 0.572 0.428
#> GSM750746     1  0.0000      0.960 1.000 0.000
#> GSM549259     1  0.0000      0.960 1.000 0.000
#> GSM549269     2  0.0376      0.970 0.004 0.996
#> GSM549273     2  0.0000      0.971 0.000 1.000
#> GSM549299     2  0.0376      0.970 0.004 0.996
#> GSM549301     2  0.0000      0.971 0.000 1.000
#> GSM549310     2  0.0000      0.971 0.000 1.000
#> GSM549311     2  0.0000      0.971 0.000 1.000
#> GSM549302     2  0.0000      0.971 0.000 1.000
#> GSM549235     1  0.0000      0.960 1.000 0.000
#> GSM549245     1  0.5178      0.878 0.884 0.116
#> GSM549265     2  0.9323      0.464 0.348 0.652
#> GSM549282     2  0.0000      0.971 0.000 1.000
#> GSM549296     2  0.0000      0.971 0.000 1.000
#> GSM750739     1  0.0000      0.960 1.000 0.000
#> GSM750742     1  0.0000      0.960 1.000 0.000
#> GSM750744     1  0.0000      0.960 1.000 0.000
#> GSM750750     2  0.0000      0.971 0.000 1.000
#> GSM549242     1  0.0000      0.960 1.000 0.000
#> GSM549252     1  0.6048      0.841 0.852 0.148
#> GSM549253     1  0.0000      0.960 1.000 0.000
#> GSM549256     1  0.0000      0.960 1.000 0.000
#> GSM549257     1  0.4939      0.885 0.892 0.108
#> GSM549263     1  0.0000      0.960 1.000 0.000
#> GSM549267     2  0.0000      0.971 0.000 1.000
#> GSM750745     1  0.0000      0.960 1.000 0.000
#> GSM549239     1  0.0000      0.960 1.000 0.000
#> GSM549244     1  0.5059      0.882 0.888 0.112
#> GSM549249     1  0.5629      0.861 0.868 0.132
#> GSM549260     1  0.0000      0.960 1.000 0.000
#> GSM549266     2  0.1184      0.963 0.016 0.984
#> GSM549293     2  0.0000      0.971 0.000 1.000
#> GSM549236     1  0.0000      0.960 1.000 0.000
#> GSM549238     1  0.0000      0.960 1.000 0.000
#> GSM549251     1  0.0000      0.960 1.000 0.000
#> GSM549258     1  0.0000      0.960 1.000 0.000
#> GSM549264     1  0.0376      0.958 0.996 0.004
#> GSM549243     1  0.0000      0.960 1.000 0.000
#> GSM549262     1  0.0000      0.960 1.000 0.000
#> GSM549278     2  0.1184      0.963 0.016 0.984
#> GSM549283     2  0.1184      0.963 0.016 0.984
#> GSM549298     2  0.0000      0.971 0.000 1.000
#> GSM750741     1  0.4690      0.892 0.900 0.100
#> GSM549286     2  0.0000      0.971 0.000 1.000
#> GSM549241     1  0.0000      0.960 1.000 0.000
#> GSM549247     1  0.3733      0.914 0.928 0.072
#> GSM549261     1  0.0000      0.960 1.000 0.000
#> GSM549270     2  0.0000      0.971 0.000 1.000
#> GSM549277     2  0.0000      0.971 0.000 1.000
#> GSM549280     2  0.0000      0.971 0.000 1.000
#> GSM549281     2  0.1184      0.963 0.016 0.984
#> GSM549285     2  0.1184      0.963 0.016 0.984
#> GSM549288     2  0.0000      0.971 0.000 1.000
#> GSM549292     2  0.0000      0.971 0.000 1.000
#> GSM549295     2  0.0000      0.971 0.000 1.000
#> GSM549297     2  0.0000      0.971 0.000 1.000
#> GSM750743     1  0.0000      0.960 1.000 0.000
#> GSM549268     2  0.1184      0.963 0.016 0.984
#> GSM549290     2  0.0000      0.971 0.000 1.000
#> GSM549272     2  0.0000      0.971 0.000 1.000
#> GSM549276     2  0.0000      0.971 0.000 1.000
#> GSM549275     1  0.4298      0.895 0.912 0.088
#> GSM549284     2  0.0000      0.971 0.000 1.000
#> GSM750737     2  0.9248      0.483 0.340 0.660
#> GSM750740     1  0.0000      0.960 1.000 0.000
#> GSM750747     1  0.0000      0.960 1.000 0.000
#> GSM750751     2  0.0000      0.971 0.000 1.000
#> GSM750754     2  0.0000      0.971 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     3  0.2261    0.36132 0.000 0.068 0.932
#> GSM549291     3  0.5327    0.15310 0.000 0.272 0.728
#> GSM549274     2  0.6026    0.70712 0.000 0.624 0.376
#> GSM750738     2  0.6839    0.69265 0.024 0.624 0.352
#> GSM750748     1  0.0237    0.92883 0.996 0.000 0.004
#> GSM549240     1  0.4654    0.77691 0.792 0.000 0.208
#> GSM549279     2  0.6888    0.65362 0.016 0.552 0.432
#> GSM549294     2  0.6026    0.70712 0.000 0.624 0.376
#> GSM549300     2  0.0237    0.55222 0.000 0.996 0.004
#> GSM549303     2  0.5431    0.15720 0.000 0.716 0.284
#> GSM549309     2  0.5621    0.10729 0.000 0.692 0.308
#> GSM750753     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM750752     3  0.5968   -0.00868 0.000 0.364 0.636
#> GSM549304     2  0.6057    0.72061 0.004 0.656 0.340
#> GSM549305     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549307     2  0.1163    0.57410 0.000 0.972 0.028
#> GSM549306     2  0.0592    0.55132 0.000 0.988 0.012
#> GSM549308     2  0.1753    0.53524 0.000 0.952 0.048
#> GSM549233     1  0.0892    0.92831 0.980 0.000 0.020
#> GSM549234     3  0.6180    0.01167 0.416 0.000 0.584
#> GSM549250     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549287     3  0.5785    0.08038 0.000 0.332 0.668
#> GSM750735     3  0.8714   -0.27013 0.108 0.408 0.484
#> GSM750736     1  0.6519    0.66774 0.760 0.132 0.108
#> GSM750749     2  0.6905    0.64230 0.016 0.544 0.440
#> GSM549230     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549231     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549237     1  0.4796    0.76509 0.780 0.000 0.220
#> GSM549254     3  0.3607    0.34439 0.008 0.112 0.880
#> GSM750734     1  0.0000    0.92816 1.000 0.000 0.000
#> GSM549271     3  0.5968   -0.03103 0.000 0.364 0.636
#> GSM549232     3  0.4397    0.35458 0.028 0.116 0.856
#> GSM549246     3  0.7062    0.44379 0.236 0.068 0.696
#> GSM549248     1  0.0892    0.92831 0.980 0.000 0.020
#> GSM549255     3  0.6513    0.05813 0.400 0.008 0.592
#> GSM750746     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM549259     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM549269     2  0.6026    0.70712 0.000 0.624 0.376
#> GSM549273     2  0.1753    0.53524 0.000 0.952 0.048
#> GSM549299     2  0.6111    0.69377 0.000 0.604 0.396
#> GSM549301     2  0.1753    0.53524 0.000 0.952 0.048
#> GSM549310     3  0.5591    0.13858 0.000 0.304 0.696
#> GSM549311     2  0.5621    0.10729 0.000 0.692 0.308
#> GSM549302     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549235     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM549245     3  0.6180    0.01167 0.416 0.000 0.584
#> GSM549265     3  0.4931    0.43374 0.212 0.004 0.784
#> GSM549282     3  0.5882    0.03398 0.000 0.348 0.652
#> GSM549296     3  0.5650    0.13186 0.000 0.312 0.688
#> GSM750739     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM750742     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM750744     1  0.0592    0.92885 0.988 0.000 0.012
#> GSM750750     2  0.3038    0.47817 0.000 0.896 0.104
#> GSM549242     1  0.0892    0.92734 0.980 0.000 0.020
#> GSM549252     3  0.6225   -0.02067 0.432 0.000 0.568
#> GSM549253     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549256     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549257     1  0.6280    0.22072 0.540 0.000 0.460
#> GSM549263     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549267     3  0.5706    0.11535 0.000 0.320 0.680
#> GSM750745     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM549239     1  0.0000    0.92816 1.000 0.000 0.000
#> GSM549244     3  0.6192   -0.00242 0.420 0.000 0.580
#> GSM549249     3  0.6180    0.01167 0.416 0.000 0.584
#> GSM549260     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549266     2  0.6888    0.65362 0.016 0.552 0.432
#> GSM549293     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549236     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549238     1  0.5058    0.75206 0.756 0.000 0.244
#> GSM549251     1  0.0747    0.92854 0.984 0.000 0.016
#> GSM549258     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM549264     1  0.5178    0.73707 0.744 0.000 0.256
#> GSM549243     1  0.0000    0.92816 1.000 0.000 0.000
#> GSM549262     1  0.0892    0.92831 0.980 0.000 0.020
#> GSM549278     3  0.4750    0.23304 0.000 0.216 0.784
#> GSM549283     2  0.6721    0.69535 0.016 0.604 0.380
#> GSM549298     2  0.0592    0.55132 0.000 0.988 0.012
#> GSM750741     1  0.4629    0.77622 0.808 0.004 0.188
#> GSM549286     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549241     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM549247     1  0.4750    0.76886 0.784 0.000 0.216
#> GSM549261     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM549270     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549277     2  0.2165    0.59398 0.000 0.936 0.064
#> GSM549280     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549281     2  0.6888    0.65362 0.016 0.552 0.432
#> GSM549285     2  0.6823    0.58160 0.012 0.504 0.484
#> GSM549288     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549292     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549295     2  0.0000    0.55359 0.000 1.000 0.000
#> GSM549297     2  0.1529    0.58126 0.000 0.960 0.040
#> GSM750743     1  0.0424    0.92755 0.992 0.000 0.008
#> GSM549268     2  0.6888    0.65362 0.016 0.552 0.432
#> GSM549290     3  0.5621    0.13031 0.000 0.308 0.692
#> GSM549272     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549276     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM549275     1  0.5219    0.77215 0.788 0.016 0.196
#> GSM549284     2  0.6839    0.69265 0.024 0.624 0.352
#> GSM750737     3  0.7777    0.21704 0.364 0.060 0.576
#> GSM750740     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM750747     1  0.0237    0.92783 0.996 0.000 0.004
#> GSM750751     2  0.5835    0.72307 0.000 0.660 0.340
#> GSM750754     3  0.5706    0.11223 0.000 0.320 0.680

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.5040     0.2244 0.008 0.364 0.000 0.628
#> GSM549291     2  0.5102     0.7540 0.000 0.732 0.048 0.220
#> GSM549274     2  0.1584     0.8443 0.000 0.952 0.036 0.012
#> GSM750738     2  0.3058     0.8050 0.056 0.900 0.024 0.020
#> GSM750748     1  0.0592     0.9462 0.984 0.000 0.000 0.016
#> GSM549240     4  0.4790     0.5649 0.380 0.000 0.000 0.620
#> GSM549279     2  0.3558     0.8376 0.044 0.880 0.052 0.024
#> GSM549294     2  0.1557     0.8396 0.000 0.944 0.056 0.000
#> GSM549300     3  0.5311     0.5929 0.000 0.328 0.648 0.024
#> GSM549303     3  0.0707     0.8348 0.000 0.020 0.980 0.000
#> GSM549309     3  0.0707     0.8348 0.000 0.020 0.980 0.000
#> GSM750753     2  0.1302     0.8421 0.000 0.956 0.044 0.000
#> GSM750752     2  0.5312     0.7443 0.000 0.712 0.052 0.236
#> GSM549304     2  0.1520     0.8291 0.000 0.956 0.024 0.020
#> GSM549305     2  0.0188     0.8422 0.000 0.996 0.004 0.000
#> GSM549307     3  0.5628     0.4024 0.000 0.420 0.556 0.024
#> GSM549306     3  0.1389     0.8311 0.000 0.048 0.952 0.000
#> GSM549308     3  0.0707     0.8348 0.000 0.020 0.980 0.000
#> GSM549233     1  0.1211     0.9430 0.960 0.000 0.000 0.040
#> GSM549234     4  0.2589     0.7377 0.116 0.000 0.000 0.884
#> GSM549250     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549287     2  0.5240     0.7582 0.000 0.740 0.072 0.188
#> GSM750735     2  0.4689     0.8116 0.084 0.824 0.052 0.040
#> GSM750736     4  0.7469     0.5465 0.368 0.180 0.000 0.452
#> GSM750749     2  0.3756     0.8366 0.044 0.872 0.052 0.032
#> GSM549230     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549231     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549237     4  0.4985     0.3538 0.468 0.000 0.000 0.532
#> GSM549254     4  0.4999     0.3275 0.012 0.328 0.000 0.660
#> GSM750734     1  0.0469     0.9452 0.988 0.000 0.000 0.012
#> GSM549271     2  0.5434     0.7707 0.000 0.740 0.128 0.132
#> GSM549232     4  0.4361     0.5580 0.020 0.208 0.000 0.772
#> GSM549246     4  0.4267     0.5787 0.024 0.188 0.000 0.788
#> GSM549248     1  0.1211     0.9430 0.960 0.000 0.000 0.040
#> GSM549255     4  0.3219     0.7363 0.112 0.020 0.000 0.868
#> GSM750746     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549269     2  0.1807     0.8426 0.000 0.940 0.052 0.008
#> GSM549273     3  0.0707     0.8348 0.000 0.020 0.980 0.000
#> GSM549299     2  0.2549     0.8425 0.024 0.916 0.056 0.004
#> GSM549301     3  0.0707     0.8348 0.000 0.020 0.980 0.000
#> GSM549310     2  0.4956     0.7491 0.000 0.732 0.036 0.232
#> GSM549311     3  0.5770     0.6949 0.000 0.148 0.712 0.140
#> GSM549302     2  0.1520     0.8291 0.000 0.956 0.024 0.020
#> GSM549235     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549245     4  0.2589     0.7377 0.116 0.000 0.000 0.884
#> GSM549265     4  0.2578     0.6916 0.052 0.036 0.000 0.912
#> GSM549282     2  0.5314     0.7605 0.000 0.740 0.084 0.176
#> GSM549296     2  0.4956     0.7491 0.000 0.732 0.036 0.232
#> GSM750739     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM750742     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM750744     1  0.0817     0.9468 0.976 0.000 0.000 0.024
#> GSM750750     3  0.2489     0.8221 0.000 0.068 0.912 0.020
#> GSM549242     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549252     4  0.2814     0.7372 0.132 0.000 0.000 0.868
#> GSM549253     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549256     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549257     4  0.4304     0.6589 0.284 0.000 0.000 0.716
#> GSM549263     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549267     2  0.5318     0.7547 0.000 0.732 0.072 0.196
#> GSM750745     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0336     0.9437 0.992 0.000 0.000 0.008
#> GSM549244     4  0.2589     0.7377 0.116 0.000 0.000 0.884
#> GSM549249     4  0.2589     0.7377 0.116 0.000 0.000 0.884
#> GSM549260     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549266     2  0.3558     0.8376 0.044 0.880 0.052 0.024
#> GSM549293     2  0.1520     0.8291 0.000 0.956 0.024 0.020
#> GSM549236     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549238     4  0.3837     0.7047 0.224 0.000 0.000 0.776
#> GSM549251     1  0.1389     0.9433 0.952 0.000 0.000 0.048
#> GSM549258     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549264     4  0.4624     0.5877 0.340 0.000 0.000 0.660
#> GSM549243     1  0.0592     0.9462 0.984 0.000 0.000 0.016
#> GSM549262     1  0.1211     0.9430 0.960 0.000 0.000 0.040
#> GSM549278     2  0.4343     0.7418 0.000 0.732 0.004 0.264
#> GSM549283     2  0.3000     0.8406 0.040 0.900 0.052 0.008
#> GSM549298     3  0.1389     0.8311 0.000 0.048 0.952 0.000
#> GSM750741     1  0.6636    -0.4075 0.476 0.032 0.028 0.464
#> GSM549286     2  0.0779     0.8372 0.000 0.980 0.016 0.004
#> GSM549241     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549247     4  0.4730     0.5894 0.364 0.000 0.000 0.636
#> GSM549261     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549270     2  0.2060     0.8373 0.000 0.932 0.052 0.016
#> GSM549277     2  0.5914     0.0721 0.008 0.556 0.412 0.024
#> GSM549280     2  0.2412     0.8318 0.000 0.908 0.084 0.008
#> GSM549281     2  0.3451     0.8373 0.044 0.884 0.052 0.020
#> GSM549285     2  0.4499     0.8315 0.044 0.836 0.052 0.068
#> GSM549288     2  0.2973     0.8225 0.000 0.884 0.096 0.020
#> GSM549292     2  0.1520     0.8291 0.000 0.956 0.024 0.020
#> GSM549295     3  0.5467     0.5421 0.000 0.364 0.612 0.024
#> GSM549297     2  0.5636     0.0184 0.000 0.552 0.424 0.024
#> GSM750743     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM549268     2  0.3451     0.8373 0.044 0.884 0.052 0.020
#> GSM549290     2  0.5318     0.7547 0.000 0.732 0.072 0.196
#> GSM549272     2  0.0376     0.8413 0.000 0.992 0.004 0.004
#> GSM549276     2  0.0188     0.8422 0.000 0.996 0.004 0.000
#> GSM549275     4  0.5560     0.5554 0.392 0.024 0.000 0.584
#> GSM549284     2  0.3058     0.8050 0.056 0.900 0.024 0.020
#> GSM750737     4  0.5926     0.6390 0.116 0.192 0.000 0.692
#> GSM750740     1  0.0000     0.9432 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0336     0.9437 0.992 0.000 0.000 0.008
#> GSM750751     2  0.0188     0.8422 0.000 0.996 0.004 0.000
#> GSM750754     2  0.5332     0.7564 0.000 0.736 0.080 0.184

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     4  0.3476     0.5375 0.000 0.176 0.000 0.804 0.020
#> GSM549291     2  0.6799     0.4855 0.000 0.560 0.076 0.272 0.092
#> GSM549274     2  0.3774    -0.2306 0.000 0.704 0.000 0.000 0.296
#> GSM750738     5  0.4297     0.8561 0.000 0.472 0.000 0.000 0.528
#> GSM750748     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549240     4  0.6219     0.5702 0.292 0.000 0.000 0.532 0.176
#> GSM549279     2  0.4275     0.5388 0.000 0.696 0.000 0.020 0.284
#> GSM549294     2  0.0000     0.5539 0.000 1.000 0.000 0.000 0.000
#> GSM549300     3  0.4747     0.1517 0.000 0.484 0.500 0.000 0.016
#> GSM549303     3  0.0000     0.7639 0.000 0.000 1.000 0.000 0.000
#> GSM549309     3  0.0000     0.7639 0.000 0.000 1.000 0.000 0.000
#> GSM750753     2  0.0000     0.5539 0.000 1.000 0.000 0.000 0.000
#> GSM750752     5  0.8221     0.0741 0.000 0.308 0.172 0.156 0.364
#> GSM549304     5  0.4297     0.8561 0.000 0.472 0.000 0.000 0.528
#> GSM549305     2  0.0880     0.5385 0.000 0.968 0.000 0.000 0.032
#> GSM549307     2  0.4620     0.1868 0.000 0.592 0.392 0.000 0.016
#> GSM549306     3  0.1043     0.7557 0.000 0.040 0.960 0.000 0.000
#> GSM549308     3  0.0000     0.7639 0.000 0.000 1.000 0.000 0.000
#> GSM549233     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM549234     4  0.2020     0.7398 0.100 0.000 0.000 0.900 0.000
#> GSM549250     1  0.0290     0.9589 0.992 0.000 0.000 0.008 0.000
#> GSM549287     2  0.7178     0.5142 0.000 0.560 0.172 0.172 0.096
#> GSM750735     2  0.6846     0.3595 0.012 0.528 0.020 0.136 0.304
#> GSM750736     4  0.8032     0.5541 0.264 0.120 0.000 0.416 0.200
#> GSM750749     2  0.4790     0.5299 0.000 0.672 0.020 0.016 0.292
#> GSM549230     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549231     1  0.0609     0.9494 0.980 0.000 0.000 0.020 0.000
#> GSM549237     4  0.5049     0.2840 0.480 0.000 0.000 0.488 0.032
#> GSM549254     4  0.3438     0.5448 0.000 0.172 0.000 0.808 0.020
#> GSM750734     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM549271     2  0.6037     0.5421 0.000 0.636 0.172 0.172 0.020
#> GSM549232     4  0.2677     0.6482 0.016 0.112 0.000 0.872 0.000
#> GSM549246     4  0.2773     0.6197 0.000 0.112 0.000 0.868 0.020
#> GSM549248     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM549255     4  0.0880     0.7069 0.032 0.000 0.000 0.968 0.000
#> GSM750746     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.1121     0.9363 0.956 0.000 0.000 0.000 0.044
#> GSM549269     2  0.1792     0.4795 0.000 0.916 0.000 0.000 0.084
#> GSM549273     3  0.0000     0.7639 0.000 0.000 1.000 0.000 0.000
#> GSM549299     2  0.0794     0.5616 0.000 0.972 0.000 0.000 0.028
#> GSM549301     3  0.0000     0.7639 0.000 0.000 1.000 0.000 0.000
#> GSM549310     2  0.7057     0.5204 0.000 0.572 0.172 0.168 0.088
#> GSM549311     3  0.5912     0.4066 0.000 0.284 0.616 0.064 0.036
#> GSM549302     2  0.4302    -0.8119 0.000 0.520 0.000 0.000 0.480
#> GSM549235     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM549245     4  0.1792     0.7361 0.084 0.000 0.000 0.916 0.000
#> GSM549265     4  0.0671     0.6942 0.016 0.004 0.000 0.980 0.000
#> GSM549282     2  0.6992     0.5221 0.000 0.576 0.172 0.172 0.080
#> GSM549296     2  0.7103     0.5184 0.000 0.568 0.172 0.168 0.092
#> GSM750739     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM750744     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM750750     3  0.4299     0.5907 0.000 0.220 0.744 0.008 0.028
#> GSM549242     1  0.0703     0.9467 0.976 0.000 0.000 0.024 0.000
#> GSM549252     4  0.1851     0.7368 0.088 0.000 0.000 0.912 0.000
#> GSM549253     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549256     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549257     4  0.3534     0.6882 0.256 0.000 0.000 0.744 0.000
#> GSM549263     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549267     2  0.7178     0.5139 0.000 0.560 0.172 0.172 0.096
#> GSM750745     1  0.0404     0.9563 0.988 0.000 0.000 0.000 0.012
#> GSM549239     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549244     4  0.2377     0.7374 0.128 0.000 0.000 0.872 0.000
#> GSM549249     4  0.2074     0.7401 0.104 0.000 0.000 0.896 0.000
#> GSM549260     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549266     2  0.4227     0.5356 0.000 0.692 0.000 0.016 0.292
#> GSM549293     5  0.4297     0.8561 0.000 0.472 0.000 0.000 0.528
#> GSM549236     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549238     4  0.3508     0.6903 0.252 0.000 0.000 0.748 0.000
#> GSM549251     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549258     1  0.1740     0.9183 0.932 0.000 0.000 0.012 0.056
#> GSM549264     4  0.4894     0.5486 0.352 0.000 0.000 0.612 0.036
#> GSM549243     1  0.0162     0.9609 0.996 0.000 0.000 0.004 0.000
#> GSM549262     1  0.0000     0.9603 1.000 0.000 0.000 0.000 0.000
#> GSM549278     2  0.4551     0.4646 0.000 0.616 0.000 0.368 0.016
#> GSM549283     2  0.2777     0.5655 0.000 0.864 0.000 0.016 0.120
#> GSM549298     3  0.1043     0.7557 0.000 0.040 0.960 0.000 0.000
#> GSM750741     1  0.6951    -0.3152 0.424 0.012 0.000 0.340 0.224
#> GSM549286     2  0.1197     0.5189 0.000 0.952 0.000 0.000 0.048
#> GSM549241     1  0.1502     0.9246 0.940 0.000 0.000 0.004 0.056
#> GSM549247     4  0.6301     0.5984 0.252 0.000 0.000 0.532 0.216
#> GSM549261     1  0.1502     0.9246 0.940 0.000 0.000 0.004 0.056
#> GSM549270     2  0.0794     0.5453 0.000 0.972 0.000 0.000 0.028
#> GSM549277     2  0.2172     0.5109 0.000 0.908 0.076 0.000 0.016
#> GSM549280     2  0.0000     0.5539 0.000 1.000 0.000 0.000 0.000
#> GSM549281     2  0.4227     0.5356 0.000 0.692 0.000 0.016 0.292
#> GSM549285     2  0.5687     0.5364 0.000 0.676 0.020 0.144 0.160
#> GSM549288     2  0.2624     0.5701 0.000 0.872 0.116 0.000 0.012
#> GSM549292     5  0.4300     0.8512 0.000 0.476 0.000 0.000 0.524
#> GSM549295     3  0.4747     0.1383 0.000 0.488 0.496 0.000 0.016
#> GSM549297     2  0.3381     0.3692 0.000 0.808 0.176 0.000 0.016
#> GSM750743     1  0.1943     0.9099 0.924 0.000 0.000 0.020 0.056
#> GSM549268     2  0.4227     0.5356 0.000 0.692 0.000 0.016 0.292
#> GSM549290     2  0.7178     0.5139 0.000 0.560 0.172 0.172 0.096
#> GSM549272     2  0.0963     0.5342 0.000 0.964 0.000 0.000 0.036
#> GSM549276     2  0.0880     0.5385 0.000 0.968 0.000 0.000 0.032
#> GSM549275     4  0.6235     0.5398 0.324 0.004 0.000 0.528 0.144
#> GSM549284     5  0.4297     0.8561 0.000 0.472 0.000 0.000 0.528
#> GSM750737     4  0.3010     0.6543 0.020 0.100 0.000 0.868 0.012
#> GSM750740     1  0.1341     0.9276 0.944 0.000 0.000 0.000 0.056
#> GSM750747     1  0.0579     0.9549 0.984 0.000 0.000 0.008 0.008
#> GSM750751     2  0.0880     0.5385 0.000 0.968 0.000 0.000 0.032
#> GSM750754     2  0.7263     0.5083 0.000 0.552 0.172 0.172 0.104

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     4  0.4003    0.51942 0.020 0.020 0.000 0.736 0.000 0.224
#> GSM549291     2  0.6471   -0.77297 0.000 0.368 0.016 0.312 0.000 0.304
#> GSM549274     5  0.3864    0.02586 0.000 0.480 0.000 0.000 0.520 0.000
#> GSM750738     5  0.0777    0.83058 0.000 0.024 0.000 0.004 0.972 0.000
#> GSM750748     1  0.0363    0.91746 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM549240     4  0.5488    0.34722 0.372 0.012 0.000 0.536 0.008 0.072
#> GSM549279     2  0.3245    0.44864 0.000 0.764 0.000 0.000 0.008 0.228
#> GSM549294     2  0.2003    0.52313 0.000 0.884 0.000 0.000 0.116 0.000
#> GSM549300     2  0.6114    0.15082 0.000 0.504 0.256 0.000 0.016 0.224
#> GSM549303     3  0.1327    0.81936 0.000 0.000 0.936 0.000 0.000 0.064
#> GSM549309     3  0.1387    0.81863 0.000 0.000 0.932 0.000 0.000 0.068
#> GSM750753     2  0.2135    0.52173 0.000 0.872 0.000 0.000 0.128 0.000
#> GSM750752     5  0.6777    0.12902 0.000 0.188 0.008 0.124 0.544 0.136
#> GSM549304     5  0.0632    0.83353 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM549305     2  0.3515    0.48020 0.000 0.676 0.000 0.000 0.324 0.000
#> GSM549307     2  0.6021    0.32062 0.000 0.568 0.172 0.000 0.036 0.224
#> GSM549306     3  0.2100    0.79386 0.000 0.112 0.884 0.000 0.000 0.004
#> GSM549308     3  0.0000    0.83590 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549233     1  0.0508    0.91547 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM549234     4  0.1003    0.69323 0.020 0.000 0.000 0.964 0.000 0.016
#> GSM549250     1  0.1296    0.90212 0.952 0.000 0.000 0.032 0.004 0.012
#> GSM549287     6  0.6317    0.88173 0.000 0.372 0.016 0.216 0.000 0.396
#> GSM750735     2  0.5924    0.30783 0.056 0.632 0.004 0.096 0.008 0.204
#> GSM750736     1  0.7133   -0.28780 0.368 0.188 0.000 0.364 0.008 0.072
#> GSM750749     2  0.3437    0.43422 0.000 0.752 0.004 0.000 0.008 0.236
#> GSM549230     1  0.0870    0.91477 0.972 0.000 0.000 0.012 0.004 0.012
#> GSM549231     1  0.0603    0.91374 0.980 0.000 0.000 0.016 0.004 0.000
#> GSM549237     1  0.4924   -0.00292 0.524 0.004 0.000 0.428 0.008 0.036
#> GSM549254     4  0.4074    0.52451 0.020 0.028 0.000 0.740 0.000 0.212
#> GSM750734     1  0.0000    0.91614 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549271     2  0.5696   -0.01116 0.000 0.632 0.076 0.208 0.000 0.084
#> GSM549232     4  0.3839    0.50630 0.020 0.172 0.000 0.776 0.000 0.032
#> GSM549246     4  0.3514    0.57050 0.020 0.000 0.000 0.768 0.004 0.208
#> GSM549248     1  0.0146    0.91616 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM549255     4  0.1478    0.68957 0.020 0.000 0.000 0.944 0.004 0.032
#> GSM750746     1  0.0000    0.91614 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.1333    0.89136 0.944 0.000 0.000 0.000 0.008 0.048
#> GSM549269     2  0.3266    0.49217 0.000 0.728 0.000 0.000 0.272 0.000
#> GSM549273     3  0.0146    0.83611 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM549299     2  0.4680    0.23231 0.000 0.680 0.000 0.000 0.120 0.200
#> GSM549301     3  0.0000    0.83590 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM549310     6  0.7037    0.80792 0.000 0.344 0.008 0.136 0.092 0.420
#> GSM549311     3  0.6953    0.23662 0.000 0.172 0.468 0.108 0.000 0.252
#> GSM549302     5  0.1444    0.79084 0.000 0.072 0.000 0.000 0.928 0.000
#> GSM549235     1  0.0000    0.91614 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549245     4  0.0909    0.69320 0.020 0.000 0.000 0.968 0.000 0.012
#> GSM549265     4  0.1478    0.68929 0.020 0.000 0.000 0.944 0.004 0.032
#> GSM549282     2  0.5955   -0.43400 0.000 0.540 0.016 0.216 0.000 0.228
#> GSM549296     6  0.6984    0.84002 0.000 0.340 0.008 0.152 0.076 0.424
#> GSM750739     1  0.0000    0.91614 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0870    0.91477 0.972 0.000 0.000 0.012 0.004 0.012
#> GSM750744     1  0.0260    0.91663 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM750750     3  0.4455    0.62301 0.000 0.160 0.712 0.000 0.000 0.128
#> GSM549242     1  0.0870    0.91477 0.972 0.000 0.000 0.012 0.004 0.012
#> GSM549252     4  0.1924    0.69357 0.048 0.000 0.000 0.920 0.004 0.028
#> GSM549253     1  0.0870    0.91477 0.972 0.000 0.000 0.012 0.004 0.012
#> GSM549256     1  0.0964    0.91312 0.968 0.000 0.000 0.016 0.004 0.012
#> GSM549257     4  0.3154    0.62751 0.184 0.000 0.000 0.800 0.004 0.012
#> GSM549263     1  0.0870    0.91477 0.972 0.000 0.000 0.012 0.004 0.012
#> GSM549267     6  0.6286    0.89350 0.000 0.336 0.016 0.216 0.000 0.432
#> GSM750745     1  0.0260    0.91534 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM549239     1  0.0363    0.91746 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM549244     4  0.1003    0.69323 0.020 0.000 0.000 0.964 0.000 0.016
#> GSM549249     4  0.0909    0.69320 0.020 0.000 0.000 0.968 0.000 0.012
#> GSM549260     1  0.0363    0.91746 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM549266     2  0.3431    0.44379 0.000 0.756 0.000 0.000 0.016 0.228
#> GSM549293     5  0.0632    0.83353 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM549236     1  0.0508    0.91716 0.984 0.000 0.000 0.012 0.004 0.000
#> GSM549238     4  0.4092    0.45568 0.344 0.000 0.000 0.636 0.000 0.020
#> GSM549251     1  0.0508    0.91716 0.984 0.000 0.000 0.012 0.004 0.000
#> GSM549258     1  0.2123    0.86713 0.908 0.000 0.000 0.020 0.008 0.064
#> GSM549264     4  0.4896    0.37821 0.372 0.004 0.000 0.572 0.004 0.048
#> GSM549243     1  0.0508    0.91736 0.984 0.000 0.000 0.012 0.000 0.004
#> GSM549262     1  0.0000    0.91614 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549278     2  0.6088   -0.72759 0.000 0.380 0.000 0.340 0.000 0.280
#> GSM549283     2  0.3566    0.49574 0.000 0.788 0.000 0.000 0.056 0.156
#> GSM549298     3  0.2100    0.79386 0.000 0.112 0.884 0.000 0.000 0.004
#> GSM750741     1  0.6076    0.10419 0.524 0.052 0.000 0.348 0.012 0.064
#> GSM549286     2  0.3847    0.33228 0.000 0.544 0.000 0.000 0.456 0.000
#> GSM549241     1  0.2036    0.87010 0.912 0.000 0.000 0.016 0.008 0.064
#> GSM549247     4  0.5524    0.38759 0.352 0.016 0.000 0.552 0.008 0.072
#> GSM549261     1  0.1841    0.87556 0.920 0.000 0.000 0.008 0.008 0.064
#> GSM549270     2  0.4253    0.51876 0.000 0.704 0.000 0.000 0.232 0.064
#> GSM549277     2  0.5371    0.41569 0.000 0.636 0.024 0.000 0.116 0.224
#> GSM549280     2  0.2288    0.51975 0.000 0.876 0.004 0.000 0.116 0.004
#> GSM549281     2  0.3431    0.44379 0.000 0.756 0.000 0.000 0.016 0.228
#> GSM549285     2  0.4542    0.39699 0.000 0.684 0.004 0.072 0.000 0.240
#> GSM549288     2  0.4468    0.47960 0.000 0.760 0.060 0.000 0.060 0.120
#> GSM549292     5  0.0632    0.83353 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM549295     2  0.6314    0.21775 0.000 0.516 0.224 0.000 0.036 0.224
#> GSM549297     2  0.6111    0.35997 0.000 0.584 0.076 0.000 0.116 0.224
#> GSM750743     1  0.2206    0.86369 0.904 0.000 0.000 0.024 0.008 0.064
#> GSM549268     2  0.3431    0.44379 0.000 0.756 0.000 0.000 0.016 0.228
#> GSM549290     6  0.6280    0.89095 0.000 0.332 0.016 0.216 0.000 0.436
#> GSM549272     2  0.3782    0.41377 0.000 0.588 0.000 0.000 0.412 0.000
#> GSM549276     2  0.3482    0.48498 0.000 0.684 0.000 0.000 0.316 0.000
#> GSM549275     4  0.5451    0.34278 0.376 0.008 0.000 0.532 0.008 0.076
#> GSM549284     5  0.0632    0.83353 0.000 0.024 0.000 0.000 0.976 0.000
#> GSM750737     4  0.4172    0.62315 0.092 0.004 0.000 0.760 0.004 0.140
#> GSM750740     1  0.1841    0.87556 0.920 0.000 0.000 0.008 0.008 0.064
#> GSM750747     1  0.0436    0.91508 0.988 0.000 0.000 0.004 0.004 0.004
#> GSM750751     2  0.3175    0.50925 0.000 0.744 0.000 0.000 0.256 0.000
#> GSM750754     6  0.6317    0.88015 0.000 0.372 0.016 0.216 0.000 0.396

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-mclust-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-mclust-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-mclust-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-mclust-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-mclust-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-mclust-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-mclust-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-mclust-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-mclust-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-mclust-membership-heatmap-5

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)

plot of chunk tab-ATC-mclust-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-mclust-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-mclust-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-mclust-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-mclust-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-mclust-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-mclust-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-ATC-mclust-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-mclust-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-mclust-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> ATC:mclust 99           0.0392    0.000286                0.4167  0.00277 2
#> ATC:mclust 74           0.0819    0.000234                0.0101  0.00367 3
#> ATC:mclust 96           0.2538    0.000668                0.4734  0.05020 4
#> ATC:mclust 89           0.0160    0.002489                0.1789  0.26737 5
#> ATC:mclust 68           0.0392    0.001049                0.0246  0.62787 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.


ATC:NMF*

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 21168 rows and 103 columns.
#>   Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'NMF' method.
#>   Performed in total 1250 partitions by row resampling.
#>   Best k for subgroups seems to be 2.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

collect_plots() function collects all the plots made from res for all k (number of partitions) into one single page to provide an easy and fast comparison between different k.

collect_plots(res)

plot of chunk ATC-NMF-collect-plots

The plots are:

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:

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)

plot of chunk ATC-NMF-select-partition-number

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.939           0.923       0.968         0.4944 0.512   0.512
#> 3 3 0.864           0.851       0.942         0.2955 0.787   0.606
#> 4 4 0.682           0.771       0.869         0.1392 0.832   0.572
#> 5 5 0.694           0.637       0.815         0.0505 0.957   0.846
#> 6 6 0.710           0.665       0.804         0.0280 0.961   0.849

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>           class entropy silhouette    p1    p2
#> GSM549289     1  0.0000      0.948 1.000 0.000
#> GSM549291     2  0.0000      0.994 0.000 1.000
#> GSM549274     1  0.9795      0.352 0.584 0.416
#> GSM750738     1  0.0000      0.948 1.000 0.000
#> GSM750748     1  0.0000      0.948 1.000 0.000
#> GSM549240     1  0.0000      0.948 1.000 0.000
#> GSM549279     1  0.7815      0.698 0.768 0.232
#> GSM549294     2  0.0000      0.994 0.000 1.000
#> GSM549300     2  0.0000      0.994 0.000 1.000
#> GSM549303     2  0.0000      0.994 0.000 1.000
#> GSM549309     2  0.0000      0.994 0.000 1.000
#> GSM750753     2  0.0000      0.994 0.000 1.000
#> GSM750752     1  0.9608      0.429 0.616 0.384
#> GSM549304     1  0.9933      0.251 0.548 0.452
#> GSM549305     2  0.0000      0.994 0.000 1.000
#> GSM549307     2  0.0000      0.994 0.000 1.000
#> GSM549306     2  0.0000      0.994 0.000 1.000
#> GSM549308     2  0.0000      0.994 0.000 1.000
#> GSM549233     1  0.0000      0.948 1.000 0.000
#> GSM549234     1  0.0000      0.948 1.000 0.000
#> GSM549250     1  0.0000      0.948 1.000 0.000
#> GSM549287     2  0.0000      0.994 0.000 1.000
#> GSM750735     1  0.0000      0.948 1.000 0.000
#> GSM750736     1  0.0000      0.948 1.000 0.000
#> GSM750749     2  0.0000      0.994 0.000 1.000
#> GSM549230     1  0.0000      0.948 1.000 0.000
#> GSM549231     1  0.0000      0.948 1.000 0.000
#> GSM549237     1  0.0000      0.948 1.000 0.000
#> GSM549254     1  0.0000      0.948 1.000 0.000
#> GSM750734     1  0.0000      0.948 1.000 0.000
#> GSM549271     2  0.0000      0.994 0.000 1.000
#> GSM549232     1  0.0000      0.948 1.000 0.000
#> GSM549246     1  0.0000      0.948 1.000 0.000
#> GSM549248     1  0.0000      0.948 1.000 0.000
#> GSM549255     1  0.0000      0.948 1.000 0.000
#> GSM750746     1  0.0000      0.948 1.000 0.000
#> GSM549259     1  0.0000      0.948 1.000 0.000
#> GSM549269     2  0.2423      0.954 0.040 0.960
#> GSM549273     2  0.0000      0.994 0.000 1.000
#> GSM549299     2  0.0000      0.994 0.000 1.000
#> GSM549301     2  0.0000      0.994 0.000 1.000
#> GSM549310     2  0.0000      0.994 0.000 1.000
#> GSM549311     2  0.0000      0.994 0.000 1.000
#> GSM549302     2  0.0000      0.994 0.000 1.000
#> GSM549235     1  0.0000      0.948 1.000 0.000
#> GSM549245     1  0.0000      0.948 1.000 0.000
#> GSM549265     1  0.0000      0.948 1.000 0.000
#> GSM549282     2  0.0000      0.994 0.000 1.000
#> GSM549296     2  0.0376      0.990 0.004 0.996
#> GSM750739     1  0.0000      0.948 1.000 0.000
#> GSM750742     1  0.0000      0.948 1.000 0.000
#> GSM750744     1  0.0000      0.948 1.000 0.000
#> GSM750750     2  0.0000      0.994 0.000 1.000
#> GSM549242     1  0.0000      0.948 1.000 0.000
#> GSM549252     1  0.0000      0.948 1.000 0.000
#> GSM549253     1  0.0000      0.948 1.000 0.000
#> GSM549256     1  0.0000      0.948 1.000 0.000
#> GSM549257     1  0.0000      0.948 1.000 0.000
#> GSM549263     1  0.0000      0.948 1.000 0.000
#> GSM549267     2  0.0000      0.994 0.000 1.000
#> GSM750745     1  0.0000      0.948 1.000 0.000
#> GSM549239     1  0.0000      0.948 1.000 0.000
#> GSM549244     1  0.0000      0.948 1.000 0.000
#> GSM549249     1  0.0000      0.948 1.000 0.000
#> GSM549260     1  0.0000      0.948 1.000 0.000
#> GSM549266     1  0.8861      0.588 0.696 0.304
#> GSM549293     1  0.9996      0.135 0.512 0.488
#> GSM549236     1  0.0000      0.948 1.000 0.000
#> GSM549238     1  0.0000      0.948 1.000 0.000
#> GSM549251     1  0.0000      0.948 1.000 0.000
#> GSM549258     1  0.0000      0.948 1.000 0.000
#> GSM549264     1  0.0000      0.948 1.000 0.000
#> GSM549243     1  0.0000      0.948 1.000 0.000
#> GSM549262     1  0.0000      0.948 1.000 0.000
#> GSM549278     1  0.9754      0.373 0.592 0.408
#> GSM549283     2  0.0000      0.994 0.000 1.000
#> GSM549298     2  0.0000      0.994 0.000 1.000
#> GSM750741     1  0.0000      0.948 1.000 0.000
#> GSM549286     2  0.0000      0.994 0.000 1.000
#> GSM549241     1  0.0000      0.948 1.000 0.000
#> GSM549247     1  0.0000      0.948 1.000 0.000
#> GSM549261     1  0.0000      0.948 1.000 0.000
#> GSM549270     2  0.0000      0.994 0.000 1.000
#> GSM549277     2  0.0000      0.994 0.000 1.000
#> GSM549280     2  0.0000      0.994 0.000 1.000
#> GSM549281     2  0.0000      0.994 0.000 1.000
#> GSM549285     2  0.0000      0.994 0.000 1.000
#> GSM549288     2  0.0000      0.994 0.000 1.000
#> GSM549292     2  0.3584      0.922 0.068 0.932
#> GSM549295     2  0.0000      0.994 0.000 1.000
#> GSM549297     2  0.0000      0.994 0.000 1.000
#> GSM750743     1  0.0000      0.948 1.000 0.000
#> GSM549268     2  0.0000      0.994 0.000 1.000
#> GSM549290     2  0.5059      0.866 0.112 0.888
#> GSM549272     2  0.0000      0.994 0.000 1.000
#> GSM549276     2  0.0000      0.994 0.000 1.000
#> GSM549275     1  0.0000      0.948 1.000 0.000
#> GSM549284     1  0.9460      0.473 0.636 0.364
#> GSM750737     1  0.0000      0.948 1.000 0.000
#> GSM750740     1  0.0000      0.948 1.000 0.000
#> GSM750747     1  0.0000      0.948 1.000 0.000
#> GSM750751     2  0.0000      0.994 0.000 1.000
#> GSM750754     2  0.0000      0.994 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>           class entropy silhouette    p1    p2    p3
#> GSM549289     1  0.0237     0.9551 0.996 0.000 0.004
#> GSM549291     3  0.0592     0.9405 0.012 0.000 0.988
#> GSM549274     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM750738     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM750748     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549240     1  0.5291     0.6092 0.732 0.268 0.000
#> GSM549279     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549294     2  0.6215     0.2281 0.000 0.572 0.428
#> GSM549300     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549303     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549309     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM750753     3  0.6309    -0.0309 0.000 0.496 0.504
#> GSM750752     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549304     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549305     2  0.1289     0.8427 0.000 0.968 0.032
#> GSM549307     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549306     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549308     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549233     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549234     1  0.5178     0.6461 0.744 0.256 0.000
#> GSM549250     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549287     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM750735     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM750736     2  0.1753     0.8283 0.048 0.952 0.000
#> GSM750749     3  0.0592     0.9404 0.012 0.000 0.988
#> GSM549230     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549231     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549237     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549254     1  0.0424     0.9533 0.992 0.008 0.000
#> GSM750734     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549271     3  0.1289     0.9257 0.000 0.032 0.968
#> GSM549232     2  0.6305     0.0154 0.484 0.516 0.000
#> GSM549246     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549248     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549255     1  0.0747     0.9476 0.984 0.016 0.000
#> GSM750746     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549259     1  0.0237     0.9558 0.996 0.004 0.000
#> GSM549269     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549273     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549299     2  0.6062     0.3484 0.000 0.616 0.384
#> GSM549301     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549310     2  0.4555     0.6908 0.000 0.800 0.200
#> GSM549311     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549302     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549235     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549245     2  0.6062     0.3391 0.384 0.616 0.000
#> GSM549265     1  0.6062     0.3689 0.616 0.384 0.000
#> GSM549282     3  0.0424     0.9456 0.000 0.008 0.992
#> GSM549296     2  0.4178     0.7278 0.000 0.828 0.172
#> GSM750739     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM750742     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM750744     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM750750     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549242     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549252     1  0.0747     0.9468 0.984 0.016 0.000
#> GSM549253     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549256     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549257     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549263     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549267     3  0.0424     0.9459 0.000 0.008 0.992
#> GSM750745     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549239     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549244     1  0.2878     0.8698 0.904 0.096 0.000
#> GSM549249     1  0.0424     0.9537 0.992 0.008 0.000
#> GSM549260     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549266     2  0.8972     0.4713 0.200 0.564 0.236
#> GSM549293     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549236     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549238     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549251     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549258     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549264     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549243     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549262     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549278     1  0.6295     0.0984 0.528 0.000 0.472
#> GSM549283     2  0.0237     0.8559 0.000 0.996 0.004
#> GSM549298     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM750741     1  0.0592     0.9507 0.988 0.012 0.000
#> GSM549286     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549241     1  0.1289     0.9329 0.968 0.032 0.000
#> GSM549247     2  0.5810     0.4927 0.336 0.664 0.000
#> GSM549261     1  0.0424     0.9533 0.992 0.008 0.000
#> GSM549270     3  0.6260     0.1420 0.000 0.448 0.552
#> GSM549277     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549280     3  0.0424     0.9456 0.000 0.008 0.992
#> GSM549281     3  0.1289     0.9265 0.000 0.032 0.968
#> GSM549285     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549288     3  0.1411     0.9236 0.000 0.036 0.964
#> GSM549292     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549295     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549297     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM750743     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM549268     3  0.0000     0.9498 0.000 0.000 1.000
#> GSM549290     3  0.3619     0.7784 0.136 0.000 0.864
#> GSM549272     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM549276     2  0.0592     0.8524 0.000 0.988 0.012
#> GSM549275     1  0.5016     0.6563 0.760 0.240 0.000
#> GSM549284     2  0.0000     0.8576 0.000 1.000 0.000
#> GSM750737     1  0.0237     0.9558 0.996 0.004 0.000
#> GSM750740     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM750747     1  0.0000     0.9579 1.000 0.000 0.000
#> GSM750751     2  0.1643     0.8350 0.000 0.956 0.044
#> GSM750754     3  0.0000     0.9498 0.000 0.000 1.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>           class entropy silhouette    p1    p2    p3    p4
#> GSM549289     4  0.4469     0.7107 0.080 0.000 0.112 0.808
#> GSM549291     4  0.5000    -0.0479 0.000 0.000 0.496 0.504
#> GSM549274     2  0.1474     0.7944 0.000 0.948 0.000 0.052
#> GSM750738     2  0.3569     0.6732 0.000 0.804 0.000 0.196
#> GSM750748     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549240     1  0.3606     0.7969 0.840 0.140 0.000 0.020
#> GSM549279     2  0.3791     0.7899 0.016 0.844 0.128 0.012
#> GSM549294     2  0.4018     0.7149 0.000 0.772 0.224 0.004
#> GSM549300     3  0.0592     0.8718 0.000 0.016 0.984 0.000
#> GSM549303     3  0.1716     0.8520 0.000 0.000 0.936 0.064
#> GSM549309     3  0.2281     0.8306 0.000 0.000 0.904 0.096
#> GSM750753     2  0.4193     0.6670 0.000 0.732 0.268 0.000
#> GSM750752     4  0.4543     0.5284 0.000 0.324 0.000 0.676
#> GSM549304     2  0.2149     0.7840 0.000 0.912 0.000 0.088
#> GSM549305     2  0.2676     0.8095 0.000 0.896 0.092 0.012
#> GSM549307     3  0.1004     0.8717 0.000 0.024 0.972 0.004
#> GSM549306     3  0.0657     0.8725 0.000 0.004 0.984 0.012
#> GSM549308     3  0.0817     0.8700 0.000 0.000 0.976 0.024
#> GSM549233     1  0.3942     0.6788 0.764 0.000 0.000 0.236
#> GSM549234     4  0.5470     0.7106 0.168 0.100 0.000 0.732
#> GSM549250     1  0.4134     0.6286 0.740 0.000 0.000 0.260
#> GSM549287     4  0.4992     0.0441 0.000 0.000 0.476 0.524
#> GSM750735     1  0.1953     0.8880 0.940 0.044 0.012 0.004
#> GSM750736     2  0.4769     0.5075 0.308 0.684 0.000 0.008
#> GSM750749     3  0.5733     0.6122 0.208 0.064 0.716 0.012
#> GSM549230     1  0.0469     0.9345 0.988 0.000 0.000 0.012
#> GSM549231     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549237     1  0.0469     0.9346 0.988 0.000 0.000 0.012
#> GSM549254     4  0.3301     0.7359 0.048 0.000 0.076 0.876
#> GSM750734     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549271     3  0.3550     0.8352 0.000 0.096 0.860 0.044
#> GSM549232     4  0.5764     0.5848 0.024 0.292 0.020 0.664
#> GSM549246     4  0.4088     0.7330 0.140 0.000 0.040 0.820
#> GSM549248     1  0.0336     0.9354 0.992 0.000 0.000 0.008
#> GSM549255     4  0.3464     0.7469 0.108 0.032 0.000 0.860
#> GSM750746     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549259     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549269     2  0.1209     0.8081 0.000 0.964 0.032 0.004
#> GSM549273     3  0.0707     0.8710 0.000 0.000 0.980 0.020
#> GSM549299     2  0.5994     0.5524 0.000 0.636 0.296 0.068
#> GSM549301     3  0.0592     0.8717 0.000 0.000 0.984 0.016
#> GSM549310     4  0.2722     0.7245 0.000 0.032 0.064 0.904
#> GSM549311     3  0.3172     0.7767 0.000 0.000 0.840 0.160
#> GSM549302     2  0.1474     0.7944 0.000 0.948 0.000 0.052
#> GSM549235     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549245     4  0.5392     0.6710 0.072 0.204 0.000 0.724
#> GSM549265     4  0.4323     0.6840 0.028 0.184 0.000 0.788
#> GSM549282     3  0.4452     0.6218 0.000 0.008 0.732 0.260
#> GSM549296     4  0.3693     0.7231 0.000 0.072 0.072 0.856
#> GSM750739     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM750742     1  0.0336     0.9354 0.992 0.000 0.000 0.008
#> GSM750744     1  0.0469     0.9339 0.988 0.000 0.000 0.012
#> GSM750750     3  0.1118     0.8657 0.000 0.000 0.964 0.036
#> GSM549242     1  0.2081     0.8926 0.916 0.000 0.000 0.084
#> GSM549252     4  0.4387     0.6896 0.236 0.012 0.000 0.752
#> GSM549253     1  0.2530     0.8560 0.888 0.000 0.000 0.112
#> GSM549256     1  0.4643     0.4379 0.656 0.000 0.000 0.344
#> GSM549257     4  0.4967     0.2508 0.452 0.000 0.000 0.548
#> GSM549263     1  0.0817     0.9275 0.976 0.000 0.000 0.024
#> GSM549267     4  0.4137     0.6267 0.000 0.012 0.208 0.780
#> GSM750745     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549239     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549244     4  0.4829     0.7266 0.156 0.068 0.000 0.776
#> GSM549249     4  0.4174     0.7388 0.140 0.044 0.000 0.816
#> GSM549260     1  0.0188     0.9362 0.996 0.000 0.000 0.004
#> GSM549266     2  0.6927     0.6071 0.160 0.628 0.200 0.012
#> GSM549293     2  0.2081     0.7817 0.000 0.916 0.000 0.084
#> GSM549236     1  0.1792     0.8978 0.932 0.000 0.000 0.068
#> GSM549238     4  0.4500     0.5657 0.316 0.000 0.000 0.684
#> GSM549251     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549258     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549264     1  0.2345     0.8663 0.900 0.000 0.000 0.100
#> GSM549243     1  0.0188     0.9362 0.996 0.000 0.000 0.004
#> GSM549262     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM549278     3  0.4868     0.5492 0.012 0.000 0.684 0.304
#> GSM549283     2  0.2831     0.7981 0.000 0.876 0.120 0.004
#> GSM549298     3  0.0707     0.8710 0.000 0.020 0.980 0.000
#> GSM750741     1  0.0524     0.9323 0.988 0.008 0.000 0.004
#> GSM549286     2  0.1557     0.7940 0.000 0.944 0.000 0.056
#> GSM549241     1  0.1042     0.9226 0.972 0.020 0.000 0.008
#> GSM549247     2  0.5778     0.4040 0.356 0.604 0.000 0.040
#> GSM549261     1  0.0188     0.9359 0.996 0.004 0.000 0.000
#> GSM549270     2  0.4220     0.6891 0.000 0.748 0.248 0.004
#> GSM549277     3  0.1661     0.8589 0.000 0.052 0.944 0.004
#> GSM549280     3  0.2530     0.8191 0.000 0.112 0.888 0.000
#> GSM549281     3  0.4891     0.5122 0.000 0.308 0.680 0.012
#> GSM549285     3  0.1909     0.8688 0.004 0.008 0.940 0.048
#> GSM549288     3  0.1042     0.8731 0.000 0.020 0.972 0.008
#> GSM549292     2  0.1792     0.7897 0.000 0.932 0.000 0.068
#> GSM549295     3  0.1661     0.8588 0.000 0.052 0.944 0.004
#> GSM549297     3  0.2944     0.8011 0.000 0.128 0.868 0.004
#> GSM750743     1  0.0188     0.9364 0.996 0.000 0.000 0.004
#> GSM549268     3  0.4248     0.6767 0.000 0.220 0.768 0.012
#> GSM549290     4  0.2715     0.7131 0.004 0.004 0.100 0.892
#> GSM549272     2  0.1004     0.8071 0.000 0.972 0.024 0.004
#> GSM549276     2  0.2546     0.8075 0.000 0.900 0.092 0.008
#> GSM549275     1  0.4724     0.7533 0.792 0.096 0.000 0.112
#> GSM549284     2  0.3975     0.6046 0.000 0.760 0.000 0.240
#> GSM750737     1  0.3982     0.7007 0.776 0.000 0.004 0.220
#> GSM750740     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM750747     1  0.0000     0.9369 1.000 0.000 0.000 0.000
#> GSM750751     2  0.2466     0.8084 0.000 0.900 0.096 0.004
#> GSM750754     3  0.3311     0.7685 0.000 0.000 0.828 0.172

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>           class entropy silhouette    p1    p2    p3    p4    p5
#> GSM549289     5  0.6140    0.81701 0.024 0.000 0.068 0.432 0.476
#> GSM549291     3  0.6785   -0.37533 0.000 0.000 0.364 0.280 0.356
#> GSM549274     2  0.0771    0.77300 0.000 0.976 0.000 0.020 0.004
#> GSM750738     2  0.4977    0.33263 0.000 0.604 0.000 0.356 0.040
#> GSM750748     1  0.0290    0.89978 0.992 0.000 0.000 0.000 0.008
#> GSM549240     1  0.2125    0.86635 0.920 0.052 0.000 0.004 0.024
#> GSM549279     2  0.4472    0.75979 0.032 0.800 0.072 0.004 0.092
#> GSM549294     2  0.4774    0.65222 0.000 0.688 0.264 0.004 0.044
#> GSM549300     3  0.1270    0.79337 0.000 0.000 0.948 0.000 0.052
#> GSM549303     3  0.2011    0.77424 0.000 0.000 0.908 0.004 0.088
#> GSM549309     3  0.2563    0.75690 0.000 0.000 0.872 0.008 0.120
#> GSM750753     2  0.4768    0.61544 0.000 0.672 0.288 0.004 0.036
#> GSM750752     4  0.3883    0.42479 0.000 0.184 0.000 0.780 0.036
#> GSM549304     2  0.2707    0.74324 0.000 0.876 0.000 0.024 0.100
#> GSM549305     2  0.2017    0.78516 0.000 0.912 0.080 0.000 0.008
#> GSM549307     3  0.0566    0.79326 0.000 0.004 0.984 0.000 0.012
#> GSM549306     3  0.1608    0.78492 0.000 0.000 0.928 0.000 0.072
#> GSM549308     3  0.1671    0.78662 0.000 0.000 0.924 0.000 0.076
#> GSM549233     1  0.5901    0.26439 0.540 0.000 0.000 0.344 0.116
#> GSM549234     4  0.3120    0.53138 0.032 0.064 0.000 0.876 0.028
#> GSM549250     1  0.5896    0.43733 0.596 0.000 0.000 0.236 0.168
#> GSM549287     3  0.6756    0.09678 0.000 0.000 0.404 0.308 0.288
#> GSM750735     1  0.3089    0.82861 0.884 0.032 0.032 0.004 0.048
#> GSM750736     1  0.6139    0.18647 0.528 0.380 0.000 0.044 0.048
#> GSM750749     3  0.5141    0.63093 0.136 0.028 0.744 0.004 0.088
#> GSM549230     1  0.0404    0.89922 0.988 0.000 0.000 0.012 0.000
#> GSM549231     1  0.0671    0.89719 0.980 0.000 0.000 0.016 0.004
#> GSM549237     1  0.0324    0.90036 0.992 0.000 0.000 0.004 0.004
#> GSM549254     5  0.5268    0.80775 0.004 0.004 0.028 0.480 0.484
#> GSM750734     1  0.0000    0.90079 1.000 0.000 0.000 0.000 0.000
#> GSM549271     3  0.3546    0.75707 0.000 0.060 0.852 0.024 0.064
#> GSM549232     4  0.4457    0.50451 0.016 0.104 0.000 0.784 0.096
#> GSM549246     4  0.6414   -0.74468 0.080 0.000 0.032 0.464 0.424
#> GSM549248     1  0.0290    0.90002 0.992 0.000 0.000 0.008 0.000
#> GSM549255     4  0.3842    0.17340 0.028 0.012 0.000 0.804 0.156
#> GSM750746     1  0.0000    0.90079 1.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0162    0.90065 0.996 0.000 0.000 0.000 0.004
#> GSM549269     2  0.2798    0.78510 0.000 0.888 0.060 0.008 0.044
#> GSM549273     3  0.1197    0.79385 0.000 0.000 0.952 0.000 0.048
#> GSM549299     2  0.5593    0.46190 0.000 0.588 0.068 0.008 0.336
#> GSM549301     3  0.0963    0.79060 0.000 0.000 0.964 0.000 0.036
#> GSM549310     4  0.5483   -0.80790 0.000 0.012 0.040 0.532 0.416
#> GSM549311     3  0.4588    0.67306 0.000 0.000 0.720 0.060 0.220
#> GSM549302     2  0.1106    0.77088 0.000 0.964 0.000 0.024 0.012
#> GSM549235     1  0.0000    0.90079 1.000 0.000 0.000 0.000 0.000
#> GSM549245     4  0.3126    0.51150 0.016 0.088 0.000 0.868 0.028
#> GSM549265     4  0.3573    0.53537 0.012 0.072 0.000 0.844 0.072
#> GSM549282     3  0.6955    0.00967 0.000 0.004 0.352 0.324 0.320
#> GSM549296     4  0.5214   -0.18562 0.000 0.024 0.048 0.684 0.244
#> GSM750739     1  0.0000    0.90079 1.000 0.000 0.000 0.000 0.000
#> GSM750742     1  0.0510    0.89782 0.984 0.000 0.000 0.016 0.000
#> GSM750744     1  0.0609    0.89641 0.980 0.000 0.000 0.020 0.000
#> GSM750750     3  0.1410    0.79247 0.000 0.000 0.940 0.000 0.060
#> GSM549242     1  0.2992    0.82638 0.868 0.000 0.000 0.068 0.064
#> GSM549252     4  0.3633    0.53714 0.064 0.028 0.000 0.848 0.060
#> GSM549253     1  0.2236    0.85686 0.908 0.000 0.000 0.068 0.024
#> GSM549256     1  0.3913    0.52505 0.676 0.000 0.000 0.324 0.000
#> GSM549257     4  0.4275    0.29555 0.284 0.000 0.000 0.696 0.020
#> GSM549263     1  0.3180    0.81591 0.856 0.000 0.000 0.068 0.076
#> GSM549267     4  0.5165    0.33899 0.000 0.004 0.080 0.676 0.240
#> GSM750745     1  0.0404    0.89953 0.988 0.000 0.000 0.000 0.012
#> GSM549239     1  0.0451    0.89910 0.988 0.000 0.000 0.004 0.008
#> GSM549244     4  0.3518    0.54274 0.036 0.044 0.000 0.856 0.064
#> GSM549249     4  0.1787    0.51872 0.016 0.032 0.000 0.940 0.012
#> GSM549260     1  0.0566    0.90024 0.984 0.000 0.000 0.004 0.012
#> GSM549266     2  0.6556    0.54759 0.200 0.572 0.204 0.000 0.024
#> GSM549293     2  0.1907    0.76297 0.000 0.928 0.000 0.044 0.028
#> GSM549236     1  0.4498    0.71145 0.756 0.000 0.000 0.112 0.132
#> GSM549238     4  0.4487    0.44759 0.140 0.000 0.000 0.756 0.104
#> GSM549251     1  0.0290    0.90002 0.992 0.000 0.000 0.008 0.000
#> GSM549258     1  0.0162    0.90065 0.996 0.000 0.000 0.000 0.004
#> GSM549264     1  0.4169    0.74375 0.784 0.000 0.000 0.116 0.100
#> GSM549243     1  0.0324    0.90090 0.992 0.000 0.000 0.004 0.004
#> GSM549262     1  0.0290    0.90003 0.992 0.000 0.000 0.008 0.000
#> GSM549278     3  0.5808    0.42568 0.008 0.000 0.600 0.100 0.292
#> GSM549283     2  0.4583    0.72975 0.000 0.748 0.192 0.016 0.044
#> GSM549298     3  0.0451    0.79245 0.000 0.004 0.988 0.000 0.008
#> GSM750741     1  0.2116    0.86109 0.912 0.008 0.000 0.004 0.076
#> GSM549286     2  0.2326    0.77507 0.000 0.916 0.020 0.044 0.020
#> GSM549241     1  0.1173    0.89015 0.964 0.012 0.000 0.004 0.020
#> GSM549247     2  0.6015    0.32444 0.356 0.552 0.000 0.024 0.068
#> GSM549261     1  0.0579    0.89813 0.984 0.008 0.000 0.000 0.008
#> GSM549270     2  0.5203    0.55836 0.000 0.620 0.324 0.004 0.052
#> GSM549277     3  0.1981    0.78390 0.000 0.048 0.924 0.000 0.028
#> GSM549280     3  0.1728    0.78937 0.000 0.020 0.940 0.004 0.036
#> GSM549281     3  0.4250    0.68015 0.000 0.128 0.784 0.004 0.084
#> GSM549285     3  0.6216    0.40060 0.012 0.024 0.496 0.048 0.420
#> GSM549288     3  0.3060    0.73169 0.000 0.128 0.848 0.000 0.024
#> GSM549292     2  0.1800    0.76344 0.000 0.932 0.000 0.048 0.020
#> GSM549295     3  0.1300    0.78879 0.000 0.016 0.956 0.000 0.028
#> GSM549297     3  0.2012    0.77679 0.000 0.060 0.920 0.000 0.020
#> GSM750743     1  0.0162    0.90048 0.996 0.000 0.000 0.004 0.000
#> GSM549268     3  0.3012    0.76187 0.000 0.060 0.876 0.008 0.056
#> GSM549290     4  0.4464    0.27147 0.000 0.000 0.028 0.684 0.288
#> GSM549272     2  0.2546    0.78215 0.000 0.904 0.036 0.012 0.048
#> GSM549276     2  0.2497    0.77920 0.000 0.880 0.112 0.004 0.004
#> GSM549275     1  0.6781    0.37344 0.552 0.208 0.000 0.032 0.208
#> GSM549284     2  0.3863    0.59063 0.000 0.740 0.000 0.248 0.012
#> GSM750737     4  0.7209   -0.23498 0.264 0.004 0.012 0.388 0.332
#> GSM750740     1  0.0404    0.89953 0.988 0.000 0.000 0.000 0.012
#> GSM750747     1  0.0162    0.90065 0.996 0.000 0.000 0.000 0.004
#> GSM750751     2  0.2727    0.77742 0.000 0.868 0.116 0.000 0.016
#> GSM750754     3  0.4527    0.58545 0.000 0.000 0.692 0.036 0.272

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>           class entropy silhouette    p1    p2    p3    p4    p5    p6
#> GSM549289     5  0.4465     0.7406 0.024 0.000 0.044 0.128 0.772 0.032
#> GSM549291     5  0.4688     0.5409 0.000 0.000 0.208 0.084 0.696 0.012
#> GSM549274     2  0.1007     0.7308 0.000 0.956 0.000 0.044 0.000 0.000
#> GSM750738     4  0.4696     0.4355 0.000 0.276 0.000 0.660 0.016 0.048
#> GSM750748     1  0.0000     0.8903 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549240     1  0.2468     0.8291 0.884 0.092 0.000 0.012 0.008 0.004
#> GSM549279     2  0.6782     0.5727 0.120 0.624 0.052 0.024 0.060 0.120
#> GSM549294     2  0.4976     0.6017 0.000 0.676 0.228 0.004 0.020 0.072
#> GSM549300     3  0.2527     0.7614 0.000 0.004 0.884 0.000 0.064 0.048
#> GSM549303     3  0.2214     0.7569 0.000 0.000 0.888 0.000 0.096 0.016
#> GSM549309     3  0.2798     0.7415 0.000 0.000 0.852 0.000 0.112 0.036
#> GSM750753     2  0.5062     0.5497 0.000 0.648 0.248 0.000 0.016 0.088
#> GSM750752     4  0.3077     0.6692 0.000 0.068 0.000 0.860 0.040 0.032
#> GSM549304     2  0.3246     0.6899 0.000 0.848 0.000 0.028 0.048 0.076
#> GSM549305     2  0.1799     0.7326 0.000 0.928 0.052 0.004 0.008 0.008
#> GSM549307     3  0.1720     0.7709 0.000 0.000 0.928 0.000 0.040 0.032
#> GSM549306     3  0.1829     0.7657 0.000 0.000 0.920 0.000 0.056 0.024
#> GSM549308     3  0.1984     0.7615 0.000 0.000 0.912 0.000 0.032 0.056
#> GSM549233     1  0.5057     0.1247 0.504 0.000 0.000 0.436 0.012 0.048
#> GSM549234     4  0.2302     0.7034 0.024 0.036 0.000 0.912 0.016 0.012
#> GSM549250     1  0.5091     0.5373 0.632 0.000 0.000 0.172 0.000 0.196
#> GSM549287     6  0.6394     0.5204 0.000 0.000 0.336 0.152 0.044 0.468
#> GSM750735     1  0.6533     0.5674 0.656 0.076 0.044 0.044 0.060 0.120
#> GSM750736     1  0.7450     0.0785 0.440 0.220 0.000 0.228 0.024 0.088
#> GSM750749     3  0.6884     0.4001 0.140 0.072 0.580 0.004 0.044 0.160
#> GSM549230     1  0.0717     0.8882 0.976 0.000 0.000 0.008 0.000 0.016
#> GSM549231     1  0.0692     0.8888 0.976 0.000 0.000 0.020 0.000 0.004
#> GSM549237     1  0.0291     0.8898 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM549254     5  0.4083     0.7697 0.004 0.000 0.024 0.216 0.740 0.016
#> GSM750734     1  0.0146     0.8903 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM549271     3  0.6046     0.4867 0.000 0.024 0.648 0.108 0.072 0.148
#> GSM549232     4  0.4386     0.6133 0.004 0.108 0.004 0.780 0.052 0.052
#> GSM549246     5  0.4371     0.7793 0.016 0.000 0.032 0.184 0.748 0.020
#> GSM549248     1  0.0260     0.8901 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM549255     4  0.4302     0.4410 0.016 0.016 0.000 0.700 0.260 0.008
#> GSM750746     1  0.0000     0.8903 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549259     1  0.0146     0.8903 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM549269     2  0.3787     0.7211 0.000 0.828 0.024 0.052 0.024 0.072
#> GSM549273     3  0.2608     0.7525 0.000 0.000 0.872 0.000 0.080 0.048
#> GSM549299     2  0.6638     0.2220 0.000 0.460 0.048 0.004 0.320 0.168
#> GSM549301     3  0.1418     0.7674 0.000 0.000 0.944 0.000 0.024 0.032
#> GSM549310     5  0.3855     0.7226 0.000 0.000 0.024 0.272 0.704 0.000
#> GSM549311     3  0.5087     0.3560 0.000 0.000 0.620 0.028 0.052 0.300
#> GSM549302     2  0.1785     0.7269 0.000 0.928 0.000 0.048 0.008 0.016
#> GSM549235     1  0.0405     0.8904 0.988 0.000 0.000 0.004 0.000 0.008
#> GSM549245     4  0.2257     0.6903 0.004 0.060 0.000 0.904 0.028 0.004
#> GSM549265     4  0.1686     0.6855 0.008 0.004 0.000 0.932 0.004 0.052
#> GSM549282     6  0.5135     0.6701 0.000 0.000 0.240 0.144 0.000 0.616
#> GSM549296     4  0.5317    -0.0121 0.000 0.012 0.040 0.560 0.368 0.020
#> GSM750739     1  0.0508     0.8897 0.984 0.000 0.000 0.012 0.000 0.004
#> GSM750742     1  0.0972     0.8838 0.964 0.000 0.000 0.008 0.000 0.028
#> GSM750744     1  0.0632     0.8872 0.976 0.000 0.000 0.024 0.000 0.000
#> GSM750750     3  0.1918     0.7552 0.000 0.000 0.904 0.000 0.008 0.088
#> GSM549242     1  0.1983     0.8521 0.908 0.000 0.000 0.020 0.072 0.000
#> GSM549252     4  0.1693     0.6980 0.032 0.000 0.000 0.936 0.020 0.012
#> GSM549253     1  0.1780     0.8646 0.924 0.000 0.000 0.028 0.000 0.048
#> GSM549256     1  0.2941     0.7091 0.780 0.000 0.000 0.220 0.000 0.000
#> GSM549257     4  0.4498     0.3201 0.320 0.000 0.000 0.640 0.024 0.016
#> GSM549263     1  0.3139     0.7757 0.812 0.000 0.000 0.028 0.000 0.160
#> GSM549267     6  0.5335     0.5293 0.000 0.000 0.100 0.364 0.004 0.532
#> GSM750745     1  0.0260     0.8900 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM549239     1  0.0291     0.8898 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM549244     4  0.2764     0.6582 0.020 0.000 0.000 0.872 0.024 0.084
#> GSM549249     4  0.2945     0.6651 0.016 0.000 0.000 0.864 0.072 0.048
#> GSM549260     1  0.0551     0.8899 0.984 0.000 0.000 0.004 0.008 0.004
#> GSM549266     2  0.6362     0.4148 0.268 0.524 0.168 0.000 0.008 0.032
#> GSM549293     2  0.2784     0.7158 0.000 0.868 0.000 0.092 0.020 0.020
#> GSM549236     1  0.4195     0.6785 0.724 0.000 0.000 0.076 0.000 0.200
#> GSM549238     4  0.5132     0.4191 0.136 0.000 0.000 0.672 0.020 0.172
#> GSM549251     1  0.0146     0.8902 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM549258     1  0.0405     0.8905 0.988 0.000 0.000 0.004 0.000 0.008
#> GSM549264     1  0.3316     0.7782 0.812 0.000 0.000 0.052 0.000 0.136
#> GSM549243     1  0.0146     0.8902 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM549262     1  0.0508     0.8897 0.984 0.000 0.000 0.004 0.000 0.012
#> GSM549278     3  0.6350     0.0229 0.004 0.000 0.424 0.032 0.400 0.140
#> GSM549283     2  0.5780     0.6199 0.000 0.660 0.164 0.028 0.036 0.112
#> GSM549298     3  0.0405     0.7712 0.000 0.000 0.988 0.000 0.004 0.008
#> GSM750741     1  0.2605     0.8101 0.864 0.000 0.000 0.000 0.108 0.028
#> GSM549286     2  0.2756     0.7275 0.000 0.880 0.016 0.076 0.016 0.012
#> GSM549241     1  0.0951     0.8836 0.968 0.004 0.000 0.000 0.008 0.020
#> GSM549247     2  0.4787     0.0727 0.456 0.508 0.000 0.008 0.020 0.008
#> GSM549261     1  0.0000     0.8903 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM549270     2  0.5683     0.4662 0.000 0.572 0.308 0.004 0.028 0.088
#> GSM549277     3  0.1850     0.7683 0.000 0.016 0.924 0.000 0.008 0.052
#> GSM549280     3  0.3452     0.7221 0.000 0.052 0.828 0.000 0.020 0.100
#> GSM549281     3  0.5481     0.5688 0.004 0.100 0.684 0.004 0.056 0.152
#> GSM549285     6  0.4255     0.5601 0.008 0.008 0.228 0.008 0.020 0.728
#> GSM549288     3  0.4031     0.6305 0.000 0.168 0.768 0.000 0.028 0.036
#> GSM549292     2  0.2362     0.7213 0.000 0.892 0.000 0.080 0.012 0.016
#> GSM549295     3  0.1887     0.7618 0.000 0.012 0.924 0.000 0.016 0.048
#> GSM549297     3  0.1829     0.7606 0.000 0.028 0.928 0.000 0.008 0.036
#> GSM750743     1  0.0622     0.8894 0.980 0.000 0.000 0.012 0.000 0.008
#> GSM549268     3  0.4111     0.6991 0.004 0.064 0.796 0.000 0.044 0.092
#> GSM549290     6  0.5924     0.4160 0.000 0.000 0.036 0.376 0.096 0.492
#> GSM549272     2  0.3848     0.7159 0.000 0.816 0.012 0.092 0.024 0.056
#> GSM549276     2  0.3363     0.7214 0.000 0.852 0.064 0.020 0.016 0.048
#> GSM549275     1  0.7150    -0.1081 0.380 0.312 0.000 0.008 0.240 0.060
#> GSM549284     2  0.4675     0.3646 0.000 0.584 0.000 0.376 0.024 0.016
#> GSM750737     5  0.6668     0.5081 0.112 0.004 0.012 0.288 0.520 0.064
#> GSM750740     1  0.0508     0.8889 0.984 0.000 0.000 0.000 0.004 0.012
#> GSM750747     1  0.0260     0.8904 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM750751     2  0.2831     0.7294 0.000 0.876 0.072 0.012 0.008 0.032
#> GSM750754     3  0.4815     0.3582 0.000 0.000 0.556 0.000 0.384 0.060

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-ATC-NMF-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-ATC-NMF-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-ATC-NMF-consensus-heatmap-3

consensus_heatmap(res, k = 5)

plot of chunk tab-ATC-NMF-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-ATC-NMF-consensus-heatmap-5

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-ATC-NMF-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-ATC-NMF-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-ATC-NMF-membership-heatmap-3

membership_heatmap(res, k = 5)

plot of chunk tab-ATC-NMF-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-ATC-NMF-membership-heatmap-5

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)

plot of chunk tab-ATC-NMF-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-ATC-NMF-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-ATC-NMF-get-signatures-3

get_signatures(res, k = 5)

plot of chunk tab-ATC-NMF-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-ATC-NMF-get-signatures-5

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-3

get_signatures(res, k = 5, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-4

get_signatures(res, k = 6, scale_rows = FALSE)

plot of chunk tab-ATC-NMF-get-signatures-no-scale-5

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk ATC-NMF-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-ATC-NMF-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-3

dimension_reduction(res, k = 5, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-4

dimension_reduction(res, k = 6, method = "UMAP")

plot of chunk tab-ATC-NMF-dimension-reduction-5

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk ATC-NMF-collect-classes

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) specimen(p) genotype/variation(p) other(p) k
#> ATC:NMF 97            0.399    2.66e-06                0.5641  0.00455 2
#> ATC:NMF 93            0.155    2.06e-03                0.1589  0.01414 3
#> ATC:NMF 98            0.331    5.86e-03                0.0273  0.02103 4
#> ATC:NMF 81            0.385    5.14e-04                0.0913  0.03383 5
#> ATC:NMF 84            0.138    1.02e-03                0.0717  0.09806 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.

Session info

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