cola Report for recount2:SRP044668

Date: 2019-12-26 00:20:39 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 17064 rows and 93 columns.
#>   Top rows are extracted by 'SD, CV, MAD, ATC' methods.
#>   Subgroups are detected by 'hclust, kmeans, skmeans, pam, mclust, NMF' method.
#>   Number of partitions are tried for k = 2, 3, 4, 5, 6.
#>   Performed in total 30000 partitions by row resampling.
#> 
#> Following methods can be applied to this 'ConsensusPartitionList' object:
#>  [1] "cola_report"           "collect_classes"       "collect_plots"         "collect_stats"        
#>  [5] "colnames"              "functional_enrichment" "get_anno_col"          "get_anno"             
#>  [9] "get_classes"           "get_matrix"            "get_membership"        "get_stats"            
#> [13] "is_best_k"             "is_stable_k"           "ncol"                  "nrow"                 
#> [17] "rownames"              "show"                  "suggest_best_k"        "test_to_known_factors"
#> [21] "top_rows_heatmap"      "top_rows_overlap"     
#> 
#> You can get result for a single method by, e.g. object["SD", "hclust"] or object["SD:hclust"]
#> or a subset of methods by object[c("SD", "CV")], c("hclust", "kmeans")]

The call of run_all_consensus_partition_methods() was:

#> run_all_consensus_partition_methods(data = mat, mc.cores = 4)

Dimension of the input matrix:

mat = get_matrix(res_list)
dim(mat)
#> [1] 17064    93

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, 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.975 0.990 **
SD:pam 6 1.000 0.955 0.983 ** 2,5
SD:mclust 2 1.000 0.987 0.995 **
CV:kmeans 2 1.000 0.968 0.980 **
CV:pam 6 1.000 0.963 0.987 ** 4,5
MAD:kmeans 2 1.000 0.990 0.995 **
MAD:mclust 2 1.000 0.991 0.996 **
ATC:kmeans 2 1.000 0.967 0.987 **
ATC:mclust 2 1.000 0.990 0.996 **
ATC:NMF 3 1.000 0.983 0.994 ** 2
SD:NMF 4 0.980 0.944 0.979 ** 2,3
MAD:skmeans 6 0.958 0.920 0.953 ** 2,3,5
SD:skmeans 6 0.950 0.897 0.948 ** 2,3
CV:mclust 3 0.932 0.947 0.973 * 2
MAD:pam 6 0.923 0.904 0.959 *
ATC:pam 6 0.921 0.921 0.950 * 2,4,5
ATC:skmeans 6 0.918 0.818 0.909 * 2,3
CV:NMF 5 0.917 0.901 0.946 * 2
MAD:NMF 6 0.907 0.881 0.922 * 2,3,4
CV:skmeans 6 0.901 0.800 0.871 * 2,3,5
MAD:hclust 2 0.889 0.936 0.968
CV:hclust 6 0.870 0.891 0.914
ATC:hclust 2 0.693 0.908 0.955
SD:hclust 3 0.658 0.844 0.914

**: 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 1.000           0.975       0.990          0.497 0.504   0.504
#> CV:NMF      2 1.000           0.978       0.990          0.494 0.504   0.504
#> MAD:NMF     2 1.000           0.965       0.986          0.497 0.504   0.504
#> ATC:NMF     2 1.000           1.000       1.000          0.485 0.516   0.516
#> SD:skmeans  2 1.000           0.931       0.976          0.502 0.499   0.499
#> CV:skmeans  2 0.955           0.943       0.977          0.499 0.502   0.502
#> MAD:skmeans 2 1.000           0.970       0.987          0.504 0.496   0.496
#> ATC:skmeans 2 1.000           0.986       0.995          0.505 0.496   0.496
#> SD:mclust   2 1.000           0.987       0.995          0.506 0.495   0.495
#> CV:mclust   2 1.000           0.980       0.991          0.506 0.495   0.495
#> MAD:mclust  2 1.000           0.991       0.996          0.505 0.495   0.495
#> ATC:mclust  2 1.000           0.990       0.996          0.503 0.497   0.497
#> SD:kmeans   2 1.000           0.975       0.990          0.490 0.511   0.511
#> CV:kmeans   2 1.000           0.968       0.980          0.474 0.520   0.520
#> MAD:kmeans  2 1.000           0.990       0.995          0.494 0.508   0.508
#> ATC:kmeans  2 1.000           0.967       0.987          0.501 0.502   0.502
#> SD:pam      2 1.000           0.970       0.988          0.475 0.520   0.520
#> CV:pam      2 0.777           0.892       0.955          0.465 0.525   0.525
#> MAD:pam     2 0.896           0.969       0.986          0.483 0.520   0.520
#> ATC:pam     2 1.000           0.994       0.997          0.490 0.511   0.511
#> SD:hclust   2 0.631           0.788       0.897          0.463 0.496   0.496
#> CV:hclust   2 0.376           0.728       0.843          0.434 0.583   0.583
#> MAD:hclust  2 0.889           0.936       0.968          0.501 0.497   0.497
#> ATC:hclust  2 0.693           0.908       0.955          0.488 0.516   0.516
get_stats(res_list, k = 3)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      3 0.961           0.936       0.975          0.290 0.800   0.625
#> CV:NMF      3 0.893           0.850       0.943          0.345 0.786   0.593
#> MAD:NMF     3 1.000           0.959       0.984          0.282 0.813   0.646
#> ATC:NMF     3 1.000           0.983       0.994          0.285 0.818   0.661
#> SD:skmeans  3 1.000           0.992       0.997          0.262 0.824   0.663
#> CV:skmeans  3 1.000           0.979       0.991          0.255 0.830   0.674
#> MAD:skmeans 3 1.000           0.983       0.992          0.258 0.842   0.690
#> ATC:skmeans 3 0.943           0.907       0.956          0.226 0.860   0.723
#> SD:mclust   3 0.741           0.756       0.890          0.244 0.867   0.735
#> CV:mclust   3 0.932           0.947       0.973          0.222 0.848   0.706
#> MAD:mclust  3 0.699           0.755       0.880          0.244 0.849   0.703
#> ATC:mclust  3 0.588           0.842       0.912          0.255 0.787   0.600
#> SD:kmeans   3 0.895           0.929       0.943          0.296 0.807   0.642
#> CV:kmeans   3 0.596           0.672       0.806          0.316 0.844   0.708
#> MAD:kmeans  3 0.639           0.852       0.883          0.293 0.814   0.651
#> ATC:kmeans  3 0.759           0.790       0.893          0.286 0.807   0.634
#> SD:pam      3 0.690           0.797       0.867          0.368 0.727   0.517
#> CV:pam      3 0.719           0.972       0.948          0.271 0.807   0.650
#> MAD:pam     3 0.750           0.910       0.942          0.368 0.726   0.515
#> ATC:pam     3 0.769           0.247       0.659          0.348 0.672   0.439
#> SD:hclust   3 0.658           0.844       0.914          0.371 0.832   0.672
#> CV:hclust   3 0.468           0.325       0.771          0.289 0.908   0.847
#> MAD:hclust  3 0.886           0.921       0.961          0.240 0.897   0.792
#> ATC:hclust  3 0.757           0.877       0.927          0.289 0.869   0.747
get_stats(res_list, k = 4)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      4 0.980           0.944       0.979          0.158 0.851   0.612
#> CV:NMF      4 0.854           0.835       0.922          0.119 0.758   0.414
#> MAD:NMF     4 0.990           0.945       0.979          0.158 0.863   0.642
#> ATC:NMF     4 0.873           0.839       0.931          0.198 0.837   0.585
#> SD:skmeans  4 0.886           0.945       0.964          0.174 0.867   0.647
#> CV:skmeans  4 0.859           0.905       0.950          0.191 0.872   0.662
#> MAD:skmeans 4 0.867           0.738       0.863          0.170 0.874   0.668
#> ATC:skmeans 4 0.792           0.897       0.884          0.142 0.886   0.699
#> SD:mclust   4 0.804           0.865       0.859          0.174 0.872   0.660
#> CV:mclust   4 0.829           0.840       0.935          0.125 0.914   0.783
#> MAD:mclust  4 0.636           0.775       0.818          0.156 0.840   0.588
#> ATC:mclust  4 0.654           0.689       0.824          0.147 0.855   0.627
#> SD:kmeans   4 0.770           0.776       0.847          0.156 0.875   0.671
#> CV:kmeans   4 0.716           0.769       0.851          0.134 0.879   0.708
#> MAD:kmeans  4 0.774           0.519       0.726          0.155 0.939   0.841
#> ATC:kmeans  4 0.664           0.828       0.858          0.124 0.853   0.615
#> SD:pam      4 0.773           0.883       0.913          0.152 0.745   0.392
#> CV:pam      4 0.989           0.947       0.981          0.163 0.911   0.773
#> MAD:pam     4 0.766           0.830       0.910          0.126 0.880   0.663
#> ATC:pam     4 0.942           0.929       0.967          0.124 0.734   0.379
#> SD:hclust   4 0.734           0.690       0.834          0.134 0.938   0.828
#> CV:hclust   4 0.593           0.727       0.759          0.213 0.704   0.467
#> MAD:hclust  4 0.734           0.762       0.816          0.172 0.860   0.644
#> ATC:hclust  4 0.746           0.795       0.834          0.114 0.924   0.805
get_stats(res_list, k = 5)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      5 0.867           0.869       0.919         0.0663 0.915   0.693
#> CV:NMF      5 0.917           0.901       0.946         0.0609 0.914   0.686
#> MAD:NMF     5 0.866           0.863       0.914         0.0706 0.926   0.726
#> ATC:NMF     5 0.837           0.868       0.917         0.0507 0.888   0.606
#> SD:skmeans  5 0.899           0.886       0.922         0.0638 0.909   0.665
#> CV:skmeans  5 0.968           0.894       0.949         0.0638 0.891   0.619
#> MAD:skmeans 5 0.901           0.909       0.937         0.0704 0.894   0.631
#> ATC:skmeans 5 0.810           0.917       0.919         0.0636 0.966   0.876
#> SD:mclust   5 0.817           0.816       0.904         0.0712 0.914   0.680
#> CV:mclust   5 0.734           0.745       0.806         0.0891 0.914   0.739
#> MAD:mclust  5 0.680           0.747       0.850         0.0599 0.919   0.694
#> ATC:mclust  5 0.831           0.777       0.899         0.0868 0.884   0.615
#> SD:kmeans   5 0.795           0.820       0.828         0.0711 0.930   0.735
#> CV:kmeans   5 0.771           0.805       0.863         0.0802 0.912   0.723
#> MAD:kmeans  5 0.792           0.791       0.852         0.0689 0.832   0.519
#> ATC:kmeans  5 0.758           0.617       0.782         0.0747 0.953   0.825
#> SD:pam      5 1.000           0.965       0.986         0.0609 0.954   0.815
#> CV:pam      5 1.000           0.966       0.987         0.1433 0.876   0.619
#> MAD:pam     5 0.875           0.909       0.947         0.0672 0.871   0.560
#> ATC:pam     5 0.974           0.955       0.981         0.0493 0.942   0.787
#> SD:hclust   5 0.763           0.633       0.806         0.0671 0.870   0.600
#> CV:hclust   5 0.798           0.787       0.877         0.1060 0.918   0.729
#> MAD:hclust  5 0.771           0.795       0.873         0.0577 0.971   0.885
#> ATC:hclust  5 0.757           0.758       0.826         0.0946 0.877   0.625
get_stats(res_list, k = 6)
#>             k 1-PAC mean_silhouette concordance area_increased  Rand Jaccard
#> SD:NMF      6 0.898           0.857       0.908         0.0358 0.931   0.697
#> CV:NMF      6 0.881           0.754       0.872         0.0329 0.944   0.751
#> MAD:NMF     6 0.907           0.881       0.922         0.0359 0.927   0.680
#> ATC:NMF     6 0.840           0.758       0.868         0.0341 0.962   0.827
#> SD:skmeans  6 0.950           0.897       0.948         0.0314 0.972   0.863
#> CV:skmeans  6 0.901           0.800       0.871         0.0290 0.962   0.822
#> MAD:skmeans 6 0.958           0.920       0.953         0.0316 0.965   0.832
#> ATC:skmeans 6 0.918           0.818       0.909         0.0483 0.968   0.872
#> SD:mclust   6 0.808           0.654       0.831         0.0329 0.919   0.650
#> CV:mclust   6 0.898           0.844       0.922         0.0715 0.917   0.682
#> MAD:mclust  6 0.787           0.651       0.809         0.0624 0.942   0.730
#> ATC:mclust  6 0.893           0.855       0.912         0.0511 0.925   0.669
#> SD:kmeans   6 0.780           0.764       0.805         0.0408 0.967   0.848
#> CV:kmeans   6 0.746           0.729       0.786         0.0493 0.956   0.819
#> MAD:kmeans  6 0.788           0.729       0.803         0.0373 0.965   0.829
#> ATC:kmeans  6 0.803           0.663       0.793         0.0445 0.911   0.652
#> SD:pam      6 1.000           0.955       0.983         0.0261 0.980   0.903
#> CV:pam      6 1.000           0.963       0.987         0.0264 0.979   0.901
#> MAD:pam     6 0.923           0.904       0.959         0.0287 0.980   0.902
#> ATC:pam     6 0.921           0.921       0.950         0.0456 0.965   0.843
#> SD:hclust   6 0.848           0.811       0.882         0.0429 0.911   0.646
#> CV:hclust   6 0.870           0.891       0.914         0.0611 0.946   0.775
#> MAD:hclust  6 0.848           0.801       0.850         0.0351 0.950   0.781
#> ATC:hclust  6 0.783           0.681       0.752         0.0490 0.952   0.784

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

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

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

collect_plots(res)

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.631           0.788       0.897         0.4628 0.496   0.496
#> 3 3 0.658           0.844       0.914         0.3715 0.832   0.672
#> 4 4 0.734           0.690       0.834         0.1344 0.938   0.828
#> 5 5 0.763           0.633       0.806         0.0671 0.870   0.600
#> 6 6 0.848           0.811       0.882         0.0429 0.911   0.646

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
#> SRR1521352     1  0.0000      0.948 1.000 0.000
#> SRR1521353     2  0.9775      0.543 0.412 0.588
#> SRR1521354     2  0.9775      0.543 0.412 0.588
#> SRR1521355     1  0.0000      0.948 1.000 0.000
#> SRR1521356     1  0.0000      0.948 1.000 0.000
#> SRR1521357     2  0.0000      0.789 0.000 1.000
#> SRR1521358     2  0.0000      0.789 0.000 1.000
#> SRR1521359     1  0.7056      0.676 0.808 0.192
#> SRR1521360     1  0.9393      0.257 0.644 0.356
#> SRR1521361     1  0.9393      0.257 0.644 0.356
#> SRR1521362     1  0.0000      0.948 1.000 0.000
#> SRR1521363     2  0.0672      0.788 0.008 0.992
#> SRR1521364     2  0.9732      0.557 0.404 0.596
#> SRR1521365     2  0.0000      0.789 0.000 1.000
#> SRR1521366     2  0.9732      0.557 0.404 0.596
#> SRR1521368     2  0.0000      0.789 0.000 1.000
#> SRR1521369     2  0.9732      0.557 0.404 0.596
#> SRR1521370     2  0.9775      0.543 0.412 0.588
#> SRR1521371     1  0.0000      0.948 1.000 0.000
#> SRR1521372     1  0.2603      0.901 0.956 0.044
#> SRR1521373     2  0.0000      0.789 0.000 1.000
#> SRR1521374     2  0.0000      0.789 0.000 1.000
#> SRR1521375     2  0.0000      0.789 0.000 1.000
#> SRR1521376     2  0.2603      0.776 0.044 0.956
#> SRR1521377     2  0.9732      0.557 0.404 0.596
#> SRR1521378     2  0.9775      0.543 0.412 0.588
#> SRR1521379     2  0.0672      0.788 0.008 0.992
#> SRR1521380     2  0.9732      0.557 0.404 0.596
#> SRR1521381     1  0.9393      0.257 0.644 0.356
#> SRR1521382     2  0.0000      0.789 0.000 1.000
#> SRR1521383     1  0.0000      0.948 1.000 0.000
#> SRR1521384     2  0.0000      0.789 0.000 1.000
#> SRR1521385     1  0.0000      0.948 1.000 0.000
#> SRR1521387     2  0.0000      0.789 0.000 1.000
#> SRR1521386     2  0.9775      0.543 0.412 0.588
#> SRR1521388     1  0.0000      0.948 1.000 0.000
#> SRR1521389     1  0.0000      0.948 1.000 0.000
#> SRR1521390     1  0.0000      0.948 1.000 0.000
#> SRR1521391     1  0.6531      0.720 0.832 0.168
#> SRR1521392     1  0.0000      0.948 1.000 0.000
#> SRR1521393     1  0.0000      0.948 1.000 0.000
#> SRR1521394     1  0.0000      0.948 1.000 0.000
#> SRR1521395     1  0.0000      0.948 1.000 0.000
#> SRR1521396     1  0.0000      0.948 1.000 0.000
#> SRR1521397     1  0.0000      0.948 1.000 0.000
#> SRR1521398     1  0.0000      0.948 1.000 0.000
#> SRR1521399     1  0.0000      0.948 1.000 0.000
#> SRR1521400     1  0.0000      0.948 1.000 0.000
#> SRR1521401     1  0.0000      0.948 1.000 0.000
#> SRR1521403     1  0.2778      0.896 0.952 0.048
#> SRR1521402     1  0.0000      0.948 1.000 0.000
#> SRR1521405     1  0.0000      0.948 1.000 0.000
#> SRR1521406     1  0.0000      0.948 1.000 0.000
#> SRR1521404     1  0.0000      0.948 1.000 0.000
#> SRR1521408     2  0.9775      0.543 0.412 0.588
#> SRR1521407     1  0.9323      0.284 0.652 0.348
#> SRR1521409     2  0.9896      0.376 0.440 0.560
#> SRR1521410     1  0.0000      0.948 1.000 0.000
#> SRR1521411     1  0.0000      0.948 1.000 0.000
#> SRR1521412     1  0.0000      0.948 1.000 0.000
#> SRR1521414     1  0.0000      0.948 1.000 0.000
#> SRR1521413     1  0.0000      0.948 1.000 0.000
#> SRR1521415     1  0.0000      0.948 1.000 0.000
#> SRR1521416     1  0.0000      0.948 1.000 0.000
#> SRR1521417     1  0.0000      0.948 1.000 0.000
#> SRR1521418     1  0.0000      0.948 1.000 0.000
#> SRR1521419     1  0.0000      0.948 1.000 0.000
#> SRR1521420     1  0.0000      0.948 1.000 0.000
#> SRR1521421     1  0.0000      0.948 1.000 0.000
#> SRR1521422     1  0.0000      0.948 1.000 0.000
#> SRR1521424     1  0.0000      0.948 1.000 0.000
#> SRR1521423     1  0.0000      0.948 1.000 0.000
#> SRR1521426     1  0.0000      0.948 1.000 0.000
#> SRR1521427     2  0.0000      0.789 0.000 1.000
#> SRR1521425     1  0.0000      0.948 1.000 0.000
#> SRR1521428     2  0.0000      0.789 0.000 1.000
#> SRR1521430     2  0.9732      0.557 0.404 0.596
#> SRR1521429     2  0.0000      0.789 0.000 1.000
#> SRR1521432     2  0.9732      0.557 0.404 0.596
#> SRR1521433     2  0.9732      0.557 0.404 0.596
#> SRR1521434     2  0.9732      0.557 0.404 0.596
#> SRR1521435     2  0.9732      0.557 0.404 0.596
#> SRR1521436     2  0.0938      0.787 0.012 0.988
#> SRR1521437     2  0.0000      0.789 0.000 1.000
#> SRR1521431     2  0.9732      0.557 0.404 0.596
#> SRR1521438     2  0.8386      0.662 0.268 0.732
#> SRR1521439     2  0.0000      0.789 0.000 1.000
#> SRR1521440     2  0.0000      0.789 0.000 1.000
#> SRR1521441     2  0.0000      0.789 0.000 1.000
#> SRR1521443     2  0.0000      0.789 0.000 1.000
#> SRR1521442     2  0.0000      0.789 0.000 1.000
#> SRR1521444     2  0.0000      0.789 0.000 1.000
#> SRR1521445     2  0.0000      0.789 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
#> SRR1521352     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521353     3  0.0000      0.910 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.910 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521359     1  0.6260      0.413 0.552 0.000 0.448
#> SRR1521360     3  0.5254      0.565 0.264 0.000 0.736
#> SRR1521361     3  0.5254      0.565 0.264 0.000 0.736
#> SRR1521362     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521363     2  0.0424      0.961 0.000 0.992 0.008
#> SRR1521364     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521365     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521366     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521368     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521369     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521370     3  0.0000      0.910 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521372     1  0.5926      0.636 0.644 0.000 0.356
#> SRR1521373     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521376     2  0.3941      0.804 0.000 0.844 0.156
#> SRR1521377     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521378     3  0.0000      0.910 0.000 0.000 1.000
#> SRR1521379     2  0.0892      0.952 0.000 0.980 0.020
#> SRR1521380     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521381     3  0.5254      0.565 0.264 0.000 0.736
#> SRR1521382     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521383     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521384     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521385     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521387     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521386     3  0.0000      0.910 0.000 0.000 1.000
#> SRR1521388     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521391     1  0.6215      0.474 0.572 0.000 0.428
#> SRR1521392     1  0.5216      0.775 0.740 0.000 0.260
#> SRR1521393     1  0.5216      0.775 0.740 0.000 0.260
#> SRR1521394     1  0.5216      0.775 0.740 0.000 0.260
#> SRR1521395     1  0.5216      0.775 0.740 0.000 0.260
#> SRR1521396     1  0.5216      0.775 0.740 0.000 0.260
#> SRR1521397     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521399     1  0.5016      0.790 0.760 0.000 0.240
#> SRR1521400     1  0.5216      0.775 0.740 0.000 0.260
#> SRR1521401     1  0.5216      0.775 0.740 0.000 0.260
#> SRR1521403     1  0.5968      0.621 0.636 0.000 0.364
#> SRR1521402     1  0.5016      0.790 0.760 0.000 0.240
#> SRR1521405     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521404     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521408     3  0.0000      0.910 0.000 0.000 1.000
#> SRR1521407     3  0.5397      0.530 0.280 0.000 0.720
#> SRR1521409     2  0.8987      0.203 0.192 0.560 0.248
#> SRR1521410     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521411     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521412     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521414     1  0.5016      0.790 0.760 0.000 0.240
#> SRR1521413     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521415     1  0.5016      0.790 0.760 0.000 0.240
#> SRR1521416     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521420     1  0.5098      0.784 0.752 0.000 0.248
#> SRR1521421     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521422     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521424     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521423     1  0.0000      0.851 1.000 0.000 0.000
#> SRR1521426     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521427     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521425     1  0.3038      0.859 0.896 0.000 0.104
#> SRR1521428     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521430     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521429     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521432     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521433     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521434     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521435     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521436     2  0.2959      0.871 0.000 0.900 0.100
#> SRR1521437     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521431     3  0.0424      0.912 0.000 0.008 0.992
#> SRR1521438     3  0.5882      0.407 0.000 0.348 0.652
#> SRR1521439     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.968 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.968 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
#> SRR1521352     1  0.4730      0.373 0.636 0.000 0.000 0.364
#> SRR1521353     3  0.0188      0.861 0.000 0.000 0.996 0.004
#> SRR1521354     3  0.0188      0.861 0.000 0.000 0.996 0.004
#> SRR1521355     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.7627     -0.253 0.388 0.000 0.204 0.408
#> SRR1521360     3  0.6857      0.235 0.104 0.000 0.492 0.404
#> SRR1521361     3  0.6857      0.235 0.104 0.000 0.492 0.404
#> SRR1521362     4  0.4830      0.629 0.392 0.000 0.000 0.608
#> SRR1521363     2  0.0336      0.961 0.000 0.992 0.008 0.000
#> SRR1521364     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521365     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521368     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521370     3  0.0188      0.861 0.000 0.000 0.996 0.004
#> SRR1521371     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521372     1  0.6854      0.437 0.528 0.000 0.112 0.360
#> SRR1521373     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521376     2  0.3172      0.796 0.000 0.840 0.160 0.000
#> SRR1521377     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521378     3  0.0188      0.861 0.000 0.000 0.996 0.004
#> SRR1521379     2  0.0707      0.950 0.000 0.980 0.020 0.000
#> SRR1521380     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521381     3  0.6857      0.235 0.104 0.000 0.492 0.404
#> SRR1521382     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521383     1  0.4564      0.450 0.672 0.000 0.000 0.328
#> SRR1521384     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521385     1  0.4643      0.425 0.656 0.000 0.000 0.344
#> SRR1521387     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0188      0.861 0.000 0.000 0.996 0.004
#> SRR1521388     4  0.4713      0.674 0.360 0.000 0.000 0.640
#> SRR1521389     4  0.4713      0.674 0.360 0.000 0.000 0.640
#> SRR1521390     4  0.4713      0.674 0.360 0.000 0.000 0.640
#> SRR1521391     1  0.7460      0.326 0.468 0.000 0.184 0.348
#> SRR1521392     1  0.5253      0.582 0.624 0.000 0.016 0.360
#> SRR1521393     1  0.5253      0.582 0.624 0.000 0.016 0.360
#> SRR1521394     1  0.5253      0.582 0.624 0.000 0.016 0.360
#> SRR1521395     1  0.5253      0.582 0.624 0.000 0.016 0.360
#> SRR1521396     1  0.5253      0.582 0.624 0.000 0.016 0.360
#> SRR1521397     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.4697      0.593 0.644 0.000 0.000 0.356
#> SRR1521400     1  0.5253      0.582 0.624 0.000 0.016 0.360
#> SRR1521401     1  0.5253      0.582 0.624 0.000 0.016 0.360
#> SRR1521403     4  0.7040     -0.391 0.420 0.000 0.120 0.460
#> SRR1521402     1  0.4697      0.593 0.644 0.000 0.000 0.356
#> SRR1521405     4  0.4713      0.674 0.360 0.000 0.000 0.640
#> SRR1521406     1  0.1867      0.589 0.928 0.000 0.000 0.072
#> SRR1521404     1  0.4730      0.373 0.636 0.000 0.000 0.364
#> SRR1521408     3  0.0188      0.861 0.000 0.000 0.996 0.004
#> SRR1521407     3  0.7026      0.195 0.120 0.000 0.476 0.404
#> SRR1521409     2  0.6686      0.256 0.076 0.560 0.008 0.356
#> SRR1521410     1  0.3873      0.578 0.772 0.000 0.000 0.228
#> SRR1521411     1  0.2921      0.641 0.860 0.000 0.000 0.140
#> SRR1521412     1  0.2921      0.641 0.860 0.000 0.000 0.140
#> SRR1521414     1  0.4697      0.593 0.644 0.000 0.000 0.356
#> SRR1521413     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.4697      0.593 0.644 0.000 0.000 0.356
#> SRR1521416     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.5203      0.511 0.576 0.000 0.008 0.416
#> SRR1521421     1  0.3873      0.578 0.772 0.000 0.000 0.228
#> SRR1521422     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521424     1  0.4643      0.425 0.656 0.000 0.000 0.344
#> SRR1521423     1  0.0000      0.627 1.000 0.000 0.000 0.000
#> SRR1521426     1  0.4643      0.425 0.656 0.000 0.000 0.344
#> SRR1521427     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.3873      0.578 0.772 0.000 0.000 0.228
#> SRR1521428     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521429     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521433     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521434     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521435     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521436     2  0.2408      0.862 0.000 0.896 0.104 0.000
#> SRR1521437     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0188      0.863 0.000 0.004 0.996 0.000
#> SRR1521438     3  0.4643      0.431 0.000 0.344 0.656 0.000
#> SRR1521439     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.967 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.967 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     5  0.6175   0.204539 0.344 0.000 0.000 0.148 0.508
#> SRR1521353     3  0.1282   0.938211 0.000 0.000 0.952 0.004 0.044
#> SRR1521354     3  0.1282   0.938211 0.000 0.000 0.952 0.004 0.044
#> SRR1521355     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     5  0.5038   0.325933 0.128 0.000 0.152 0.004 0.716
#> SRR1521360     5  0.5732   0.091606 0.072 0.000 0.428 0.004 0.496
#> SRR1521361     5  0.5732   0.091606 0.072 0.000 0.428 0.004 0.496
#> SRR1521362     4  0.1364   0.940030 0.012 0.000 0.000 0.952 0.036
#> SRR1521363     2  0.0290   0.959494 0.000 0.992 0.000 0.000 0.008
#> SRR1521364     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.1282   0.938211 0.000 0.000 0.952 0.004 0.044
#> SRR1521371     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521372     5  0.5644   0.181113 0.328 0.000 0.096 0.000 0.576
#> SRR1521373     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     2  0.2773   0.782026 0.000 0.836 0.164 0.000 0.000
#> SRR1521377     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.1282   0.938211 0.000 0.000 0.952 0.004 0.044
#> SRR1521379     2  0.0693   0.949369 0.000 0.980 0.012 0.000 0.008
#> SRR1521380     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     5  0.5732   0.091606 0.072 0.000 0.428 0.004 0.496
#> SRR1521382     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     5  0.5812   0.187144 0.372 0.000 0.000 0.100 0.528
#> SRR1521384     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     5  0.5960   0.205947 0.352 0.000 0.000 0.120 0.528
#> SRR1521387     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.1282   0.938211 0.000 0.000 0.952 0.004 0.044
#> SRR1521388     4  0.0162   0.985590 0.004 0.000 0.000 0.996 0.000
#> SRR1521389     4  0.0162   0.985590 0.004 0.000 0.000 0.996 0.000
#> SRR1521390     4  0.0162   0.985590 0.004 0.000 0.000 0.996 0.000
#> SRR1521391     5  0.6238   0.140009 0.384 0.000 0.128 0.004 0.484
#> SRR1521392     5  0.4242   0.086825 0.428 0.000 0.000 0.000 0.572
#> SRR1521393     5  0.4242   0.086825 0.428 0.000 0.000 0.000 0.572
#> SRR1521394     5  0.4242   0.086825 0.428 0.000 0.000 0.000 0.572
#> SRR1521395     5  0.4242   0.086825 0.428 0.000 0.000 0.000 0.572
#> SRR1521396     5  0.4242   0.086825 0.428 0.000 0.000 0.000 0.572
#> SRR1521397     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521399     1  0.4307   0.008698 0.504 0.000 0.000 0.000 0.496
#> SRR1521400     5  0.4235   0.091006 0.424 0.000 0.000 0.000 0.576
#> SRR1521401     5  0.4235   0.091006 0.424 0.000 0.000 0.000 0.576
#> SRR1521403     5  0.7258   0.214083 0.288 0.000 0.104 0.100 0.508
#> SRR1521402     1  0.4307  -0.000504 0.500 0.000 0.000 0.000 0.500
#> SRR1521405     4  0.0162   0.985590 0.004 0.000 0.000 0.996 0.000
#> SRR1521406     1  0.2193   0.619037 0.900 0.000 0.000 0.008 0.092
#> SRR1521404     5  0.6175   0.204539 0.344 0.000 0.000 0.148 0.508
#> SRR1521408     3  0.1282   0.938211 0.000 0.000 0.952 0.004 0.044
#> SRR1521407     5  0.5858   0.120772 0.084 0.000 0.416 0.004 0.496
#> SRR1521409     2  0.5480   0.255806 0.072 0.560 0.000 0.000 0.368
#> SRR1521410     1  0.4307  -0.086516 0.504 0.000 0.000 0.000 0.496
#> SRR1521411     1  0.3895   0.305011 0.680 0.000 0.000 0.000 0.320
#> SRR1521412     1  0.3895   0.305011 0.680 0.000 0.000 0.000 0.320
#> SRR1521414     1  0.4307   0.008698 0.504 0.000 0.000 0.000 0.496
#> SRR1521413     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.4307   0.008698 0.504 0.000 0.000 0.000 0.496
#> SRR1521416     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     5  0.3636   0.239069 0.272 0.000 0.000 0.000 0.728
#> SRR1521421     5  0.4297   0.056700 0.472 0.000 0.000 0.000 0.528
#> SRR1521422     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     5  0.5960   0.205947 0.352 0.000 0.000 0.120 0.528
#> SRR1521423     1  0.0000   0.724854 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     5  0.5960   0.205947 0.352 0.000 0.000 0.120 0.528
#> SRR1521427     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     5  0.4297   0.056700 0.472 0.000 0.000 0.000 0.528
#> SRR1521428     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.2127   0.853079 0.000 0.892 0.108 0.000 0.000
#> SRR1521437     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000   0.954021 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.3983   0.447602 0.000 0.340 0.660 0.000 0.000
#> SRR1521439     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000   0.965387 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000   0.965387 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.5157     0.8062 0.296 0.000 0.000 0.084 0.012 0.608
#> SRR1521353     3  0.1644     0.8153 0.000 0.000 0.920 0.000 0.004 0.076
#> SRR1521354     3  0.1644     0.8153 0.000 0.000 0.920 0.000 0.004 0.076
#> SRR1521355     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.6241     0.4716 0.100 0.000 0.120 0.000 0.196 0.584
#> SRR1521360     3  0.7006     0.1856 0.072 0.000 0.396 0.000 0.228 0.304
#> SRR1521361     3  0.7006     0.1856 0.072 0.000 0.396 0.000 0.228 0.304
#> SRR1521362     4  0.2170     0.8862 0.000 0.000 0.000 0.888 0.012 0.100
#> SRR1521363     2  0.0458     0.9562 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1521364     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0363     0.8279 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521370     3  0.1644     0.8153 0.000 0.000 0.920 0.000 0.004 0.076
#> SRR1521371     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521372     5  0.2051     0.8422 0.004 0.000 0.096 0.000 0.896 0.004
#> SRR1521373     2  0.0260     0.9610 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1521374     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0260     0.9610 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1521376     2  0.2743     0.7823 0.000 0.828 0.164 0.000 0.000 0.008
#> SRR1521377     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.1644     0.8153 0.000 0.000 0.920 0.000 0.004 0.076
#> SRR1521379     2  0.0820     0.9480 0.000 0.972 0.012 0.000 0.000 0.016
#> SRR1521380     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     3  0.7006     0.1856 0.072 0.000 0.396 0.000 0.228 0.304
#> SRR1521382     2  0.0260     0.9610 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR1521383     6  0.4857     0.8109 0.320 0.000 0.000 0.036 0.024 0.620
#> SRR1521384     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.5070     0.8181 0.300 0.000 0.000 0.056 0.024 0.620
#> SRR1521387     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.1644     0.8153 0.000 0.000 0.920 0.000 0.004 0.076
#> SRR1521388     4  0.0000     0.9736 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000     0.9736 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0000     0.9736 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521391     5  0.3196     0.7680 0.000 0.000 0.108 0.000 0.828 0.064
#> SRR1521392     5  0.0146     0.9200 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521393     5  0.0146     0.9200 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521394     5  0.0146     0.9200 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521395     5  0.0146     0.9200 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521396     5  0.0146     0.9200 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521397     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.1610     0.8890 0.084 0.000 0.000 0.000 0.916 0.000
#> SRR1521400     5  0.0291     0.9192 0.004 0.000 0.000 0.000 0.992 0.004
#> SRR1521401     5  0.0291     0.9192 0.004 0.000 0.000 0.000 0.992 0.004
#> SRR1521403     5  0.4519     0.7168 0.000 0.000 0.104 0.036 0.752 0.108
#> SRR1521402     5  0.1556     0.8912 0.080 0.000 0.000 0.000 0.920 0.000
#> SRR1521405     4  0.0000     0.9736 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521406     1  0.3351     0.5327 0.712 0.000 0.000 0.000 0.000 0.288
#> SRR1521404     6  0.5157     0.8062 0.296 0.000 0.000 0.084 0.012 0.608
#> SRR1521408     3  0.1644     0.8153 0.000 0.000 0.920 0.000 0.004 0.076
#> SRR1521407     3  0.7070     0.1441 0.080 0.000 0.384 0.000 0.220 0.316
#> SRR1521409     2  0.6372     0.2608 0.072 0.552 0.000 0.000 0.160 0.216
#> SRR1521410     6  0.4263     0.6170 0.480 0.000 0.000 0.000 0.016 0.504
#> SRR1521411     1  0.5466     0.0165 0.572 0.000 0.000 0.000 0.212 0.216
#> SRR1521412     1  0.5466     0.0165 0.572 0.000 0.000 0.000 0.212 0.216
#> SRR1521414     5  0.1610     0.8890 0.084 0.000 0.000 0.000 0.916 0.000
#> SRR1521413     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     5  0.1610     0.8890 0.084 0.000 0.000 0.000 0.916 0.000
#> SRR1521416     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     6  0.5530     0.6013 0.224 0.000 0.000 0.000 0.216 0.560
#> SRR1521421     6  0.4355     0.7259 0.420 0.000 0.000 0.000 0.024 0.556
#> SRR1521422     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     6  0.5070     0.8181 0.300 0.000 0.000 0.056 0.024 0.620
#> SRR1521423     1  0.0000     0.8787 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     6  0.5070     0.8181 0.300 0.000 0.000 0.056 0.024 0.620
#> SRR1521427     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.4355     0.7259 0.420 0.000 0.000 0.000 0.024 0.556
#> SRR1521428     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.2165     0.8520 0.000 0.884 0.108 0.000 0.000 0.008
#> SRR1521437     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.8295 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.3578     0.4065 0.000 0.340 0.660 0.000 0.000 0.000
#> SRR1521439     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9648 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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.975       0.990         0.4895 0.511   0.511
#> 3 3 0.895           0.929       0.943         0.2961 0.807   0.642
#> 4 4 0.770           0.776       0.847         0.1562 0.875   0.671
#> 5 5 0.795           0.820       0.828         0.0711 0.930   0.735
#> 6 6 0.780           0.764       0.805         0.0408 0.967   0.848

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
#> SRR1521352     1   0.000      0.989 1.000 0.000
#> SRR1521353     1   0.000      0.989 1.000 0.000
#> SRR1521354     1   0.000      0.989 1.000 0.000
#> SRR1521355     1   0.000      0.989 1.000 0.000
#> SRR1521356     1   0.000      0.989 1.000 0.000
#> SRR1521357     2   0.000      0.989 0.000 1.000
#> SRR1521358     2   0.000      0.989 0.000 1.000
#> SRR1521359     1   0.000      0.989 1.000 0.000
#> SRR1521360     1   0.469      0.885 0.900 0.100
#> SRR1521361     1   0.000      0.989 1.000 0.000
#> SRR1521362     1   0.000      0.989 1.000 0.000
#> SRR1521363     2   0.000      0.989 0.000 1.000
#> SRR1521364     2   0.000      0.989 0.000 1.000
#> SRR1521365     2   0.000      0.989 0.000 1.000
#> SRR1521366     2   0.000      0.989 0.000 1.000
#> SRR1521368     2   0.000      0.989 0.000 1.000
#> SRR1521369     2   0.000      0.989 0.000 1.000
#> SRR1521370     1   0.000      0.989 1.000 0.000
#> SRR1521371     1   0.000      0.989 1.000 0.000
#> SRR1521372     1   0.000      0.989 1.000 0.000
#> SRR1521373     2   0.000      0.989 0.000 1.000
#> SRR1521374     2   0.000      0.989 0.000 1.000
#> SRR1521375     2   0.000      0.989 0.000 1.000
#> SRR1521376     2   0.000      0.989 0.000 1.000
#> SRR1521377     2   0.000      0.989 0.000 1.000
#> SRR1521378     2   0.971      0.325 0.400 0.600
#> SRR1521379     2   0.000      0.989 0.000 1.000
#> SRR1521380     2   0.000      0.989 0.000 1.000
#> SRR1521381     1   0.000      0.989 1.000 0.000
#> SRR1521382     2   0.000      0.989 0.000 1.000
#> SRR1521383     1   0.000      0.989 1.000 0.000
#> SRR1521384     2   0.000      0.989 0.000 1.000
#> SRR1521385     1   0.000      0.989 1.000 0.000
#> SRR1521387     2   0.000      0.989 0.000 1.000
#> SRR1521386     1   0.833      0.638 0.736 0.264
#> SRR1521388     1   0.000      0.989 1.000 0.000
#> SRR1521389     1   0.000      0.989 1.000 0.000
#> SRR1521390     1   0.000      0.989 1.000 0.000
#> SRR1521391     1   0.000      0.989 1.000 0.000
#> SRR1521392     1   0.000      0.989 1.000 0.000
#> SRR1521393     1   0.000      0.989 1.000 0.000
#> SRR1521394     1   0.000      0.989 1.000 0.000
#> SRR1521395     1   0.000      0.989 1.000 0.000
#> SRR1521396     1   0.000      0.989 1.000 0.000
#> SRR1521397     1   0.000      0.989 1.000 0.000
#> SRR1521398     1   0.000      0.989 1.000 0.000
#> SRR1521399     1   0.000      0.989 1.000 0.000
#> SRR1521400     1   0.000      0.989 1.000 0.000
#> SRR1521401     1   0.000      0.989 1.000 0.000
#> SRR1521403     1   0.000      0.989 1.000 0.000
#> SRR1521402     1   0.000      0.989 1.000 0.000
#> SRR1521405     1   0.000      0.989 1.000 0.000
#> SRR1521406     1   0.000      0.989 1.000 0.000
#> SRR1521404     1   0.000      0.989 1.000 0.000
#> SRR1521408     1   0.000      0.989 1.000 0.000
#> SRR1521407     1   0.000      0.989 1.000 0.000
#> SRR1521409     1   0.714      0.757 0.804 0.196
#> SRR1521410     1   0.000      0.989 1.000 0.000
#> SRR1521411     1   0.000      0.989 1.000 0.000
#> SRR1521412     1   0.000      0.989 1.000 0.000
#> SRR1521414     1   0.000      0.989 1.000 0.000
#> SRR1521413     1   0.000      0.989 1.000 0.000
#> SRR1521415     1   0.000      0.989 1.000 0.000
#> SRR1521416     1   0.000      0.989 1.000 0.000
#> SRR1521417     1   0.000      0.989 1.000 0.000
#> SRR1521418     1   0.000      0.989 1.000 0.000
#> SRR1521419     1   0.000      0.989 1.000 0.000
#> SRR1521420     1   0.000      0.989 1.000 0.000
#> SRR1521421     1   0.000      0.989 1.000 0.000
#> SRR1521422     1   0.000      0.989 1.000 0.000
#> SRR1521424     1   0.000      0.989 1.000 0.000
#> SRR1521423     1   0.000      0.989 1.000 0.000
#> SRR1521426     1   0.000      0.989 1.000 0.000
#> SRR1521427     2   0.000      0.989 0.000 1.000
#> SRR1521425     1   0.000      0.989 1.000 0.000
#> SRR1521428     2   0.000      0.989 0.000 1.000
#> SRR1521430     2   0.000      0.989 0.000 1.000
#> SRR1521429     2   0.000      0.989 0.000 1.000
#> SRR1521432     2   0.000      0.989 0.000 1.000
#> SRR1521433     2   0.000      0.989 0.000 1.000
#> SRR1521434     2   0.000      0.989 0.000 1.000
#> SRR1521435     2   0.000      0.989 0.000 1.000
#> SRR1521436     2   0.000      0.989 0.000 1.000
#> SRR1521437     2   0.000      0.989 0.000 1.000
#> SRR1521431     2   0.000      0.989 0.000 1.000
#> SRR1521438     2   0.000      0.989 0.000 1.000
#> SRR1521439     2   0.000      0.989 0.000 1.000
#> SRR1521440     2   0.000      0.989 0.000 1.000
#> SRR1521441     2   0.000      0.989 0.000 1.000
#> SRR1521443     2   0.000      0.989 0.000 1.000
#> SRR1521442     2   0.000      0.989 0.000 1.000
#> SRR1521444     2   0.000      0.989 0.000 1.000
#> SRR1521445     2   0.000      0.989 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
#> SRR1521352     1  0.2356      0.922 0.928 0.000 0.072
#> SRR1521353     3  0.2682      0.906 0.076 0.004 0.920
#> SRR1521354     3  0.2682      0.906 0.076 0.004 0.920
#> SRR1521355     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521359     1  0.5216      0.724 0.740 0.000 0.260
#> SRR1521360     3  0.2682      0.906 0.076 0.004 0.920
#> SRR1521361     3  0.2537      0.900 0.080 0.000 0.920
#> SRR1521362     1  0.2878      0.910 0.904 0.000 0.096
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521364     3  0.2878      0.918 0.000 0.096 0.904
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521366     3  0.2878      0.918 0.000 0.096 0.904
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521369     3  0.2982      0.920 0.024 0.056 0.920
#> SRR1521370     3  0.2682      0.906 0.076 0.004 0.920
#> SRR1521371     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521372     1  0.5216      0.707 0.740 0.000 0.260
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521376     3  0.4121      0.874 0.000 0.168 0.832
#> SRR1521377     3  0.2878      0.918 0.000 0.096 0.904
#> SRR1521378     3  0.3009      0.919 0.028 0.052 0.920
#> SRR1521379     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521380     3  0.2878      0.918 0.000 0.096 0.904
#> SRR1521381     1  0.5363      0.686 0.724 0.000 0.276
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521383     1  0.2356      0.922 0.928 0.000 0.072
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521385     1  0.2356      0.922 0.928 0.000 0.072
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521386     3  0.2682      0.906 0.076 0.004 0.920
#> SRR1521388     1  0.2878      0.910 0.904 0.000 0.096
#> SRR1521389     1  0.2878      0.910 0.904 0.000 0.096
#> SRR1521390     1  0.2878      0.910 0.904 0.000 0.096
#> SRR1521391     3  0.2625      0.899 0.084 0.000 0.916
#> SRR1521392     1  0.2356      0.911 0.928 0.000 0.072
#> SRR1521393     1  0.2356      0.911 0.928 0.000 0.072
#> SRR1521394     1  0.2356      0.911 0.928 0.000 0.072
#> SRR1521395     1  0.2356      0.911 0.928 0.000 0.072
#> SRR1521396     1  0.2356      0.911 0.928 0.000 0.072
#> SRR1521397     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521399     1  0.0592      0.937 0.988 0.000 0.012
#> SRR1521400     1  0.2356      0.911 0.928 0.000 0.072
#> SRR1521401     1  0.0747      0.936 0.984 0.000 0.016
#> SRR1521403     1  0.2711      0.905 0.912 0.000 0.088
#> SRR1521402     1  0.2356      0.911 0.928 0.000 0.072
#> SRR1521405     1  0.2878      0.910 0.904 0.000 0.096
#> SRR1521406     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521404     1  0.2356      0.922 0.928 0.000 0.072
#> SRR1521408     3  0.2682      0.906 0.076 0.004 0.920
#> SRR1521407     1  0.4452      0.805 0.808 0.000 0.192
#> SRR1521409     1  0.5706      0.672 0.680 0.000 0.320
#> SRR1521410     1  0.1753      0.926 0.952 0.000 0.048
#> SRR1521411     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521420     1  0.0592      0.938 0.988 0.000 0.012
#> SRR1521421     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521424     1  0.2356      0.922 0.928 0.000 0.072
#> SRR1521423     1  0.0000      0.940 1.000 0.000 0.000
#> SRR1521426     1  0.2165      0.924 0.936 0.000 0.064
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521425     1  0.1964      0.924 0.944 0.000 0.056
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521430     3  0.4121      0.874 0.000 0.168 0.832
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521432     3  0.2537      0.920 0.000 0.080 0.920
#> SRR1521433     3  0.4121      0.874 0.000 0.168 0.832
#> SRR1521434     3  0.4121      0.874 0.000 0.168 0.832
#> SRR1521435     3  0.4121      0.874 0.000 0.168 0.832
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521431     3  0.2537      0.920 0.000 0.080 0.920
#> SRR1521438     3  0.4121      0.874 0.000 0.168 0.832
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521445     2  0.0000      1.000 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
#> SRR1521352     4  0.3123     0.8849 0.156 0.000 0.000 0.844
#> SRR1521353     3  0.0967     0.9660 0.016 0.004 0.976 0.004
#> SRR1521354     3  0.0967     0.9660 0.016 0.004 0.976 0.004
#> SRR1521355     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521356     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521357     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0707     0.9552 0.000 0.980 0.000 0.020
#> SRR1521359     4  0.5793     0.5096 0.360 0.000 0.040 0.600
#> SRR1521360     3  0.0844     0.9675 0.012 0.004 0.980 0.004
#> SRR1521361     3  0.5228     0.5884 0.312 0.000 0.664 0.024
#> SRR1521362     4  0.3172     0.8739 0.160 0.000 0.000 0.840
#> SRR1521363     2  0.2921     0.9263 0.000 0.860 0.000 0.140
#> SRR1521364     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521365     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521368     2  0.2704     0.9321 0.000 0.876 0.000 0.124
#> SRR1521369     3  0.0712     0.9706 0.004 0.008 0.984 0.004
#> SRR1521370     3  0.0967     0.9660 0.016 0.004 0.976 0.004
#> SRR1521371     1  0.4250     0.5769 0.724 0.000 0.000 0.276
#> SRR1521372     1  0.2742     0.5572 0.900 0.000 0.076 0.024
#> SRR1521373     2  0.2921     0.9263 0.000 0.860 0.000 0.140
#> SRR1521374     2  0.2704     0.9321 0.000 0.876 0.000 0.124
#> SRR1521375     2  0.2921     0.9263 0.000 0.860 0.000 0.140
#> SRR1521376     3  0.2867     0.8873 0.000 0.012 0.884 0.104
#> SRR1521377     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521378     3  0.0712     0.9706 0.004 0.008 0.984 0.004
#> SRR1521379     2  0.3105     0.9243 0.000 0.856 0.004 0.140
#> SRR1521380     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521381     1  0.6079    -0.0882 0.568 0.000 0.052 0.380
#> SRR1521382     2  0.2921     0.9263 0.000 0.860 0.000 0.140
#> SRR1521383     4  0.3266     0.8869 0.168 0.000 0.000 0.832
#> SRR1521384     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.3266     0.8869 0.168 0.000 0.000 0.832
#> SRR1521387     2  0.2704     0.9321 0.000 0.876 0.000 0.124
#> SRR1521386     3  0.0712     0.9684 0.008 0.004 0.984 0.004
#> SRR1521388     4  0.2973     0.8846 0.144 0.000 0.000 0.856
#> SRR1521389     4  0.2973     0.8846 0.144 0.000 0.000 0.856
#> SRR1521390     4  0.2973     0.8846 0.144 0.000 0.000 0.856
#> SRR1521391     1  0.4507     0.3973 0.756 0.000 0.224 0.020
#> SRR1521392     1  0.1284     0.6204 0.964 0.000 0.012 0.024
#> SRR1521393     1  0.1174     0.6229 0.968 0.000 0.012 0.020
#> SRR1521394     1  0.1174     0.6229 0.968 0.000 0.012 0.020
#> SRR1521395     1  0.1174     0.6229 0.968 0.000 0.012 0.020
#> SRR1521396     1  0.1174     0.6229 0.968 0.000 0.012 0.020
#> SRR1521397     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521398     1  0.4746     0.5438 0.632 0.000 0.000 0.368
#> SRR1521399     1  0.0188     0.6307 0.996 0.000 0.000 0.004
#> SRR1521400     1  0.0707     0.6260 0.980 0.000 0.000 0.020
#> SRR1521401     1  0.0707     0.6260 0.980 0.000 0.000 0.020
#> SRR1521403     1  0.2973     0.5595 0.856 0.000 0.000 0.144
#> SRR1521402     1  0.0188     0.6293 0.996 0.000 0.000 0.004
#> SRR1521405     4  0.2973     0.8846 0.144 0.000 0.000 0.856
#> SRR1521406     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521404     4  0.3266     0.8869 0.168 0.000 0.000 0.832
#> SRR1521408     3  0.0967     0.9660 0.016 0.004 0.976 0.004
#> SRR1521407     1  0.5793    -0.0852 0.580 0.000 0.036 0.384
#> SRR1521409     4  0.5835     0.3595 0.280 0.000 0.064 0.656
#> SRR1521410     1  0.4907     0.4463 0.580 0.000 0.000 0.420
#> SRR1521411     1  0.4746     0.5438 0.632 0.000 0.000 0.368
#> SRR1521412     1  0.4713     0.5482 0.640 0.000 0.000 0.360
#> SRR1521414     1  0.0469     0.6313 0.988 0.000 0.000 0.012
#> SRR1521413     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521415     1  0.0188     0.6307 0.996 0.000 0.000 0.004
#> SRR1521416     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521417     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521418     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521419     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521420     4  0.4431     0.6310 0.304 0.000 0.000 0.696
#> SRR1521421     1  0.2814     0.6097 0.868 0.000 0.000 0.132
#> SRR1521422     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521424     4  0.3266     0.8869 0.168 0.000 0.000 0.832
#> SRR1521423     1  0.4790     0.5367 0.620 0.000 0.000 0.380
#> SRR1521426     4  0.3123     0.8849 0.156 0.000 0.000 0.844
#> SRR1521427     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.3219     0.8785 0.164 0.000 0.000 0.836
#> SRR1521428     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0657     0.9701 0.000 0.012 0.984 0.004
#> SRR1521429     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521433     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521434     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521435     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521436     2  0.2704     0.9321 0.000 0.876 0.000 0.124
#> SRR1521437     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0469     0.9718 0.000 0.012 0.988 0.000
#> SRR1521438     3  0.0657     0.9701 0.000 0.012 0.984 0.004
#> SRR1521439     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9587 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9587 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.3885     0.8467 0.268 0.000 0.000 0.724 0.008
#> SRR1521353     3  0.2074     0.9408 0.000 0.000 0.920 0.036 0.044
#> SRR1521354     3  0.2074     0.9408 0.000 0.000 0.920 0.036 0.044
#> SRR1521355     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.1197     0.9003 0.000 0.952 0.000 0.000 0.048
#> SRR1521359     4  0.5083     0.6366 0.140 0.000 0.000 0.700 0.160
#> SRR1521360     3  0.2378     0.9309 0.000 0.000 0.904 0.048 0.048
#> SRR1521361     5  0.6800     0.1790 0.004 0.000 0.356 0.232 0.408
#> SRR1521362     4  0.4747     0.8083 0.196 0.000 0.000 0.720 0.084
#> SRR1521363     2  0.4909     0.8258 0.000 0.716 0.000 0.164 0.120
#> SRR1521364     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0510     0.9048 0.000 0.984 0.000 0.000 0.016
#> SRR1521366     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.4541     0.8456 0.000 0.752 0.000 0.136 0.112
#> SRR1521369     3  0.1331     0.9536 0.000 0.000 0.952 0.008 0.040
#> SRR1521370     3  0.2304     0.9338 0.000 0.000 0.908 0.048 0.044
#> SRR1521371     1  0.1872     0.8261 0.928 0.000 0.000 0.020 0.052
#> SRR1521372     5  0.5278     0.7359 0.180 0.000 0.008 0.116 0.696
#> SRR1521373     2  0.4909     0.8258 0.000 0.716 0.000 0.164 0.120
#> SRR1521374     2  0.4541     0.8456 0.000 0.752 0.000 0.136 0.112
#> SRR1521375     2  0.4909     0.8258 0.000 0.716 0.000 0.164 0.120
#> SRR1521376     3  0.3569     0.8064 0.000 0.000 0.828 0.104 0.068
#> SRR1521377     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.1444     0.9525 0.000 0.000 0.948 0.012 0.040
#> SRR1521379     2  0.6097     0.7699 0.000 0.644 0.036 0.196 0.124
#> SRR1521380     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     5  0.6221     0.3562 0.092 0.000 0.016 0.400 0.492
#> SRR1521382     2  0.4909     0.8258 0.000 0.716 0.000 0.164 0.120
#> SRR1521383     4  0.3910     0.8468 0.272 0.000 0.000 0.720 0.008
#> SRR1521384     2  0.0510     0.9048 0.000 0.984 0.000 0.000 0.016
#> SRR1521385     4  0.3910     0.8468 0.272 0.000 0.000 0.720 0.008
#> SRR1521387     2  0.4541     0.8456 0.000 0.752 0.000 0.136 0.112
#> SRR1521386     3  0.1444     0.9525 0.000 0.000 0.948 0.012 0.040
#> SRR1521388     4  0.5491     0.7943 0.272 0.000 0.000 0.624 0.104
#> SRR1521389     4  0.5491     0.7943 0.272 0.000 0.000 0.624 0.104
#> SRR1521390     4  0.5491     0.7943 0.272 0.000 0.000 0.624 0.104
#> SRR1521391     5  0.4372     0.7185 0.172 0.000 0.072 0.000 0.756
#> SRR1521392     5  0.4090     0.7769 0.268 0.000 0.000 0.016 0.716
#> SRR1521393     5  0.4138     0.7773 0.276 0.000 0.000 0.016 0.708
#> SRR1521394     5  0.4138     0.7773 0.276 0.000 0.000 0.016 0.708
#> SRR1521395     5  0.4138     0.7773 0.276 0.000 0.000 0.016 0.708
#> SRR1521396     5  0.4138     0.7773 0.276 0.000 0.000 0.016 0.708
#> SRR1521397     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0290     0.8987 0.992 0.000 0.000 0.008 0.000
#> SRR1521399     5  0.4508     0.7145 0.332 0.000 0.000 0.020 0.648
#> SRR1521400     5  0.4644     0.7710 0.280 0.000 0.000 0.040 0.680
#> SRR1521401     5  0.4562     0.7650 0.292 0.000 0.000 0.032 0.676
#> SRR1521403     5  0.6203     0.6017 0.188 0.000 0.000 0.268 0.544
#> SRR1521402     5  0.4445     0.7578 0.300 0.000 0.000 0.024 0.676
#> SRR1521405     4  0.5491     0.7943 0.272 0.000 0.000 0.624 0.104
#> SRR1521406     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.3910     0.8468 0.272 0.000 0.000 0.720 0.008
#> SRR1521408     3  0.2074     0.9408 0.000 0.000 0.920 0.036 0.044
#> SRR1521407     5  0.5799     0.3345 0.092 0.000 0.000 0.416 0.492
#> SRR1521409     4  0.3724     0.4461 0.028 0.000 0.000 0.788 0.184
#> SRR1521410     1  0.0162     0.8984 0.996 0.000 0.000 0.004 0.000
#> SRR1521411     1  0.0609     0.8882 0.980 0.000 0.000 0.020 0.000
#> SRR1521412     1  0.1408     0.8646 0.948 0.000 0.000 0.044 0.008
#> SRR1521414     1  0.4206     0.3802 0.708 0.000 0.000 0.020 0.272
#> SRR1521413     1  0.0162     0.9010 0.996 0.000 0.000 0.004 0.000
#> SRR1521415     1  0.4626     0.0693 0.616 0.000 0.000 0.020 0.364
#> SRR1521416     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     4  0.5288     0.5958 0.404 0.000 0.000 0.544 0.052
#> SRR1521421     1  0.6052     0.2058 0.572 0.000 0.000 0.180 0.248
#> SRR1521422     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.3910     0.8468 0.272 0.000 0.000 0.720 0.008
#> SRR1521423     1  0.0000     0.9026 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.3934     0.8453 0.276 0.000 0.000 0.716 0.008
#> SRR1521427     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     4  0.4313     0.7725 0.356 0.000 0.000 0.636 0.008
#> SRR1521428     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.4634     0.8422 0.000 0.744 0.000 0.136 0.120
#> SRR1521437     2  0.0609     0.9044 0.000 0.980 0.000 0.000 0.020
#> SRR1521431     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0000     0.9630 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9058 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0510     0.9048 0.000 0.984 0.000 0.000 0.016
#> SRR1521445     2  0.0000     0.9058 0.000 1.000 0.000 0.000 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
#> SRR1521352     4   0.186     0.6472 0.104 0.000 0.000 0.896 0.000 NA
#> SRR1521353     3   0.411     0.8495 0.000 0.000 0.792 0.056 0.064 NA
#> SRR1521354     3   0.411     0.8495 0.000 0.000 0.792 0.056 0.064 NA
#> SRR1521355     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521356     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521357     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521358     2   0.211     0.8605 0.000 0.916 0.000 0.020 0.032 NA
#> SRR1521359     4   0.525     0.5047 0.032 0.000 0.000 0.668 0.184 NA
#> SRR1521360     3   0.471     0.8041 0.000 0.000 0.740 0.064 0.068 NA
#> SRR1521361     4   0.645     0.2354 0.000 0.000 0.060 0.448 0.368 NA
#> SRR1521362     4   0.510     0.5375 0.068 0.000 0.000 0.624 0.020 NA
#> SRR1521363     2   0.382     0.7404 0.000 0.624 0.000 0.004 0.000 NA
#> SRR1521364     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521365     2   0.126     0.8653 0.000 0.952 0.000 0.020 0.028 NA
#> SRR1521366     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521368     2   0.440     0.7928 0.000 0.696 0.000 0.020 0.032 NA
#> SRR1521369     3   0.248     0.8941 0.000 0.000 0.892 0.012 0.040 NA
#> SRR1521370     3   0.455     0.8179 0.000 0.000 0.752 0.056 0.064 NA
#> SRR1521371     1   0.197     0.8796 0.920 0.000 0.000 0.012 0.048 NA
#> SRR1521372     5   0.410     0.6860 0.048 0.000 0.000 0.076 0.792 NA
#> SRR1521373     2   0.370     0.7409 0.000 0.624 0.000 0.000 0.000 NA
#> SRR1521374     2   0.440     0.7928 0.000 0.696 0.000 0.020 0.032 NA
#> SRR1521375     2   0.370     0.7409 0.000 0.624 0.000 0.000 0.000 NA
#> SRR1521376     3   0.281     0.7674 0.000 0.000 0.824 0.004 0.004 NA
#> SRR1521377     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521378     3   0.282     0.8891 0.000 0.000 0.876 0.028 0.036 NA
#> SRR1521379     2   0.565     0.5724 0.000 0.480 0.028 0.076 0.000 NA
#> SRR1521380     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521381     4   0.576     0.2660 0.016 0.000 0.000 0.496 0.372 NA
#> SRR1521382     2   0.370     0.7409 0.000 0.624 0.000 0.000 0.000 NA
#> SRR1521383     4   0.186     0.6472 0.104 0.000 0.000 0.896 0.000 NA
#> SRR1521384     2   0.126     0.8653 0.000 0.952 0.000 0.020 0.028 NA
#> SRR1521385     4   0.201     0.6466 0.104 0.000 0.000 0.892 0.000 NA
#> SRR1521387     2   0.440     0.7928 0.000 0.696 0.000 0.020 0.032 NA
#> SRR1521386     3   0.330     0.8781 0.000 0.000 0.848 0.044 0.048 NA
#> SRR1521388     4   0.613     0.4899 0.144 0.000 0.000 0.480 0.028 NA
#> SRR1521389     4   0.613     0.4899 0.144 0.000 0.000 0.480 0.028 NA
#> SRR1521390     4   0.613     0.4899 0.144 0.000 0.000 0.480 0.028 NA
#> SRR1521391     5   0.340     0.8232 0.052 0.000 0.008 0.000 0.820 NA
#> SRR1521392     5   0.400     0.8835 0.120 0.000 0.000 0.000 0.760 NA
#> SRR1521393     5   0.400     0.8835 0.120 0.000 0.000 0.000 0.760 NA
#> SRR1521394     5   0.400     0.8835 0.120 0.000 0.000 0.000 0.760 NA
#> SRR1521395     5   0.400     0.8835 0.120 0.000 0.000 0.000 0.760 NA
#> SRR1521396     5   0.400     0.8835 0.120 0.000 0.000 0.000 0.760 NA
#> SRR1521397     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521398     1   0.145     0.8984 0.948 0.000 0.000 0.012 0.020 NA
#> SRR1521399     5   0.366     0.8161 0.168 0.000 0.000 0.020 0.788 NA
#> SRR1521400     5   0.294     0.8432 0.112 0.000 0.000 0.036 0.848 NA
#> SRR1521401     5   0.297     0.8488 0.128 0.000 0.000 0.028 0.840 NA
#> SRR1521403     4   0.610     0.0952 0.052 0.000 0.000 0.432 0.428 NA
#> SRR1521402     5   0.340     0.8360 0.148 0.000 0.000 0.020 0.812 NA
#> SRR1521405     4   0.613     0.4899 0.144 0.000 0.000 0.480 0.028 NA
#> SRR1521406     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521404     4   0.186     0.6472 0.104 0.000 0.000 0.896 0.000 NA
#> SRR1521408     3   0.411     0.8495 0.000 0.000 0.792 0.056 0.064 NA
#> SRR1521407     4   0.575     0.2692 0.016 0.000 0.000 0.500 0.368 NA
#> SRR1521409     4   0.539     0.3976 0.000 0.000 0.000 0.492 0.116 NA
#> SRR1521410     1   0.148     0.8920 0.944 0.000 0.000 0.032 0.004 NA
#> SRR1521411     1   0.207     0.8783 0.916 0.000 0.000 0.016 0.048 NA
#> SRR1521412     1   0.327     0.8036 0.840 0.000 0.000 0.036 0.100 NA
#> SRR1521414     1   0.458     0.4413 0.636 0.000 0.000 0.020 0.320 NA
#> SRR1521413     1   0.126     0.9020 0.956 0.000 0.000 0.008 0.016 NA
#> SRR1521415     1   0.481     0.1980 0.552 0.000 0.000 0.020 0.404 NA
#> SRR1521416     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521417     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521418     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521419     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521420     4   0.581     0.4134 0.316 0.000 0.000 0.540 0.120 NA
#> SRR1521421     4   0.648     0.2501 0.312 0.000 0.000 0.420 0.244 NA
#> SRR1521422     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521424     4   0.186     0.6472 0.104 0.000 0.000 0.896 0.000 NA
#> SRR1521423     1   0.000     0.9156 1.000 0.000 0.000 0.000 0.000 NA
#> SRR1521426     4   0.186     0.6472 0.104 0.000 0.000 0.896 0.000 NA
#> SRR1521427     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521425     4   0.453     0.4923 0.292 0.000 0.000 0.660 0.028 NA
#> SRR1521428     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521430     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521429     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521432     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521433     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521434     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521435     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521436     2   0.442     0.7908 0.000 0.692 0.000 0.020 0.032 NA
#> SRR1521437     2   0.133     0.8648 0.000 0.948 0.000 0.020 0.032 NA
#> SRR1521431     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521438     3   0.000     0.9177 0.000 0.000 1.000 0.000 0.000 NA
#> SRR1521439     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521440     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521441     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521443     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521442     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA
#> SRR1521444     2   0.126     0.8653 0.000 0.952 0.000 0.020 0.028 NA
#> SRR1521445     2   0.000     0.8687 0.000 1.000 0.000 0.000 0.000 NA

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

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 17064 rows and 93 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 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 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.931       0.976         0.5020 0.499   0.499
#> 3 3 1.000           0.992       0.997         0.2625 0.824   0.663
#> 4 4 0.886           0.945       0.964         0.1744 0.867   0.647
#> 5 5 0.899           0.886       0.922         0.0638 0.909   0.665
#> 6 6 0.950           0.897       0.948         0.0314 0.972   0.863

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3

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
#> SRR1521352     1   0.000     0.9700 1.000 0.000
#> SRR1521353     2   0.963     0.3467 0.388 0.612
#> SRR1521354     1   1.000     0.0326 0.512 0.488
#> SRR1521355     1   0.000     0.9700 1.000 0.000
#> SRR1521356     1   0.000     0.9700 1.000 0.000
#> SRR1521357     2   0.000     0.9796 0.000 1.000
#> SRR1521358     2   0.000     0.9796 0.000 1.000
#> SRR1521359     1   0.000     0.9700 1.000 0.000
#> SRR1521360     2   0.000     0.9796 0.000 1.000
#> SRR1521361     1   0.000     0.9700 1.000 0.000
#> SRR1521362     1   0.000     0.9700 1.000 0.000
#> SRR1521363     2   0.000     0.9796 0.000 1.000
#> SRR1521364     2   0.000     0.9796 0.000 1.000
#> SRR1521365     2   0.000     0.9796 0.000 1.000
#> SRR1521366     2   0.000     0.9796 0.000 1.000
#> SRR1521368     2   0.000     0.9796 0.000 1.000
#> SRR1521369     2   0.000     0.9796 0.000 1.000
#> SRR1521370     1   0.999     0.0624 0.520 0.480
#> SRR1521371     1   0.000     0.9700 1.000 0.000
#> SRR1521372     1   0.000     0.9700 1.000 0.000
#> SRR1521373     2   0.000     0.9796 0.000 1.000
#> SRR1521374     2   0.000     0.9796 0.000 1.000
#> SRR1521375     2   0.000     0.9796 0.000 1.000
#> SRR1521376     2   0.000     0.9796 0.000 1.000
#> SRR1521377     2   0.000     0.9796 0.000 1.000
#> SRR1521378     2   0.000     0.9796 0.000 1.000
#> SRR1521379     2   0.000     0.9796 0.000 1.000
#> SRR1521380     2   0.000     0.9796 0.000 1.000
#> SRR1521381     1   0.000     0.9700 1.000 0.000
#> SRR1521382     2   0.000     0.9796 0.000 1.000
#> SRR1521383     1   0.000     0.9700 1.000 0.000
#> SRR1521384     2   0.000     0.9796 0.000 1.000
#> SRR1521385     1   0.000     0.9700 1.000 0.000
#> SRR1521387     2   0.000     0.9796 0.000 1.000
#> SRR1521386     2   0.000     0.9796 0.000 1.000
#> SRR1521388     1   0.000     0.9700 1.000 0.000
#> SRR1521389     1   0.000     0.9700 1.000 0.000
#> SRR1521390     1   0.000     0.9700 1.000 0.000
#> SRR1521391     1   0.000     0.9700 1.000 0.000
#> SRR1521392     1   0.000     0.9700 1.000 0.000
#> SRR1521393     1   0.000     0.9700 1.000 0.000
#> SRR1521394     1   0.000     0.9700 1.000 0.000
#> SRR1521395     1   0.000     0.9700 1.000 0.000
#> SRR1521396     1   0.000     0.9700 1.000 0.000
#> SRR1521397     1   0.000     0.9700 1.000 0.000
#> SRR1521398     1   0.000     0.9700 1.000 0.000
#> SRR1521399     1   0.000     0.9700 1.000 0.000
#> SRR1521400     1   0.000     0.9700 1.000 0.000
#> SRR1521401     1   0.000     0.9700 1.000 0.000
#> SRR1521403     1   0.000     0.9700 1.000 0.000
#> SRR1521402     1   0.000     0.9700 1.000 0.000
#> SRR1521405     1   0.000     0.9700 1.000 0.000
#> SRR1521406     1   0.000     0.9700 1.000 0.000
#> SRR1521404     1   0.000     0.9700 1.000 0.000
#> SRR1521408     2   0.973     0.3025 0.404 0.596
#> SRR1521407     1   0.000     0.9700 1.000 0.000
#> SRR1521409     1   0.997     0.1189 0.532 0.468
#> SRR1521410     1   0.000     0.9700 1.000 0.000
#> SRR1521411     1   0.000     0.9700 1.000 0.000
#> SRR1521412     1   0.000     0.9700 1.000 0.000
#> SRR1521414     1   0.000     0.9700 1.000 0.000
#> SRR1521413     1   0.000     0.9700 1.000 0.000
#> SRR1521415     1   0.000     0.9700 1.000 0.000
#> SRR1521416     1   0.000     0.9700 1.000 0.000
#> SRR1521417     1   0.000     0.9700 1.000 0.000
#> SRR1521418     1   0.000     0.9700 1.000 0.000
#> SRR1521419     1   0.000     0.9700 1.000 0.000
#> SRR1521420     1   0.000     0.9700 1.000 0.000
#> SRR1521421     1   0.000     0.9700 1.000 0.000
#> SRR1521422     1   0.000     0.9700 1.000 0.000
#> SRR1521424     1   0.000     0.9700 1.000 0.000
#> SRR1521423     1   0.000     0.9700 1.000 0.000
#> SRR1521426     1   0.000     0.9700 1.000 0.000
#> SRR1521427     2   0.000     0.9796 0.000 1.000
#> SRR1521425     1   0.000     0.9700 1.000 0.000
#> SRR1521428     2   0.000     0.9796 0.000 1.000
#> SRR1521430     2   0.000     0.9796 0.000 1.000
#> SRR1521429     2   0.000     0.9796 0.000 1.000
#> SRR1521432     2   0.000     0.9796 0.000 1.000
#> SRR1521433     2   0.000     0.9796 0.000 1.000
#> SRR1521434     2   0.000     0.9796 0.000 1.000
#> SRR1521435     2   0.000     0.9796 0.000 1.000
#> SRR1521436     2   0.000     0.9796 0.000 1.000
#> SRR1521437     2   0.000     0.9796 0.000 1.000
#> SRR1521431     2   0.000     0.9796 0.000 1.000
#> SRR1521438     2   0.000     0.9796 0.000 1.000
#> SRR1521439     2   0.000     0.9796 0.000 1.000
#> SRR1521440     2   0.000     0.9796 0.000 1.000
#> SRR1521441     2   0.000     0.9796 0.000 1.000
#> SRR1521443     2   0.000     0.9796 0.000 1.000
#> SRR1521442     2   0.000     0.9796 0.000 1.000
#> SRR1521444     2   0.000     0.9796 0.000 1.000
#> SRR1521445     2   0.000     0.9796 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
#> SRR1521352     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521353     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521354     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521355     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521356     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521357     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521358     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521359     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521360     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521361     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521362     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521363     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521364     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521365     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521366     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521368     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521369     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521370     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521371     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521372     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521373     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521374     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521375     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521376     2   0.484      0.711 0.000 0.776 0.224
#> SRR1521377     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521378     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521379     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521380     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521381     1   0.207      0.936 0.940 0.000 0.060
#> SRR1521382     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521383     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521384     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521385     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521387     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521386     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521388     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521389     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521390     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521391     3   0.116      0.966 0.028 0.000 0.972
#> SRR1521392     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521393     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521394     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521395     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521396     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521397     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521398     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521399     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521400     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521401     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521403     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521402     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521405     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521406     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521404     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521408     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521407     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521409     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521410     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521411     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521412     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521414     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521413     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521415     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521416     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521417     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521418     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521419     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521420     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521421     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521422     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521424     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521423     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521426     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521427     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521425     1   0.000      0.999 1.000 0.000 0.000
#> SRR1521428     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521430     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521429     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521432     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521433     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521434     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521435     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521436     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521437     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521431     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521438     3   0.000      0.998 0.000 0.000 1.000
#> SRR1521439     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521440     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521441     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521443     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521442     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521444     2   0.000      0.991 0.000 1.000 0.000
#> SRR1521445     2   0.000      0.991 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
#> SRR1521352     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521353     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521354     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521355     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521356     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521357     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521358     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521359     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521360     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521361     3   0.234      0.892 0.100 0.000 0.900 0.000
#> SRR1521362     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521363     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521364     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521365     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521366     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521368     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521369     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521370     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521371     1   0.222      0.931 0.908 0.000 0.000 0.092
#> SRR1521372     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521373     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521374     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521375     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521376     2   0.487      0.324 0.000 0.596 0.404 0.000
#> SRR1521377     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521378     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521379     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521380     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521381     4   0.410      0.805 0.192 0.000 0.016 0.792
#> SRR1521382     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521383     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521384     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521385     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521387     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521386     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521388     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521389     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521390     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521391     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521392     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521393     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521394     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521395     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521396     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521397     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521398     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521399     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521400     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521401     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521403     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521402     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521405     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521406     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521404     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521408     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521407     4   0.349      0.816 0.188 0.000 0.000 0.812
#> SRR1521409     4   0.433      0.596 0.000 0.288 0.000 0.712
#> SRR1521410     1   0.276      0.928 0.872 0.000 0.000 0.128
#> SRR1521411     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521412     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521414     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521413     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521415     1   0.000      0.924 1.000 0.000 0.000 0.000
#> SRR1521416     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521417     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521418     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521419     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521420     4   0.194      0.886 0.076 0.000 0.000 0.924
#> SRR1521421     1   0.228      0.931 0.904 0.000 0.000 0.096
#> SRR1521422     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521424     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521423     1   0.270      0.931 0.876 0.000 0.000 0.124
#> SRR1521426     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521427     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521425     4   0.000      0.953 0.000 0.000 0.000 1.000
#> SRR1521428     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521430     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521429     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521432     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521433     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521434     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521435     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521436     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521437     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521431     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521438     3   0.000      0.995 0.000 0.000 1.000 0.000
#> SRR1521439     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521440     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521441     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521443     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521442     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521444     2   0.000      0.982 0.000 1.000 0.000 0.000
#> SRR1521445     2   0.000      0.982 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0880      0.911 0.032 0.000 0.000 0.968 0.000
#> SRR1521353     3  0.3496      0.835 0.000 0.000 0.788 0.012 0.200
#> SRR1521354     3  0.3496      0.835 0.000 0.000 0.788 0.012 0.200
#> SRR1521355     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.3274      0.705 0.000 0.000 0.000 0.780 0.220
#> SRR1521360     3  0.4163      0.799 0.000 0.000 0.740 0.032 0.228
#> SRR1521361     5  0.4059      0.450 0.000 0.000 0.172 0.052 0.776
#> SRR1521362     4  0.1041      0.911 0.032 0.000 0.000 0.964 0.004
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0510      0.900 0.000 0.000 0.984 0.000 0.016
#> SRR1521370     3  0.3496      0.835 0.000 0.000 0.788 0.012 0.200
#> SRR1521371     1  0.0162      0.956 0.996 0.000 0.000 0.000 0.004
#> SRR1521372     5  0.3395      0.855 0.236 0.000 0.000 0.000 0.764
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.4088      0.381 0.000 0.368 0.632 0.000 0.000
#> SRR1521377     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.2843      0.859 0.000 0.000 0.848 0.008 0.144
#> SRR1521379     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521380     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     5  0.1608      0.648 0.000 0.000 0.000 0.072 0.928
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.1168      0.911 0.032 0.000 0.000 0.960 0.008
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.1168      0.911 0.032 0.000 0.000 0.960 0.008
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.3496      0.835 0.000 0.000 0.788 0.012 0.200
#> SRR1521388     4  0.1205      0.909 0.040 0.000 0.000 0.956 0.004
#> SRR1521389     4  0.1205      0.909 0.040 0.000 0.000 0.956 0.004
#> SRR1521390     4  0.1205      0.909 0.040 0.000 0.000 0.956 0.004
#> SRR1521391     5  0.1043      0.724 0.040 0.000 0.000 0.000 0.960
#> SRR1521392     5  0.3424      0.856 0.240 0.000 0.000 0.000 0.760
#> SRR1521393     5  0.3424      0.856 0.240 0.000 0.000 0.000 0.760
#> SRR1521394     5  0.3424      0.856 0.240 0.000 0.000 0.000 0.760
#> SRR1521395     5  0.3424      0.856 0.240 0.000 0.000 0.000 0.760
#> SRR1521396     5  0.3424      0.856 0.240 0.000 0.000 0.000 0.760
#> SRR1521397     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.3452      0.853 0.244 0.000 0.000 0.000 0.756
#> SRR1521400     5  0.3424      0.856 0.240 0.000 0.000 0.000 0.760
#> SRR1521401     5  0.3424      0.856 0.240 0.000 0.000 0.000 0.760
#> SRR1521403     5  0.4297      0.443 0.472 0.000 0.000 0.000 0.528
#> SRR1521402     5  0.3452      0.853 0.244 0.000 0.000 0.000 0.756
#> SRR1521405     4  0.1205      0.909 0.040 0.000 0.000 0.956 0.004
#> SRR1521406     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.1168      0.911 0.032 0.000 0.000 0.960 0.008
#> SRR1521408     3  0.3496      0.835 0.000 0.000 0.788 0.012 0.200
#> SRR1521407     5  0.2377      0.596 0.000 0.000 0.000 0.128 0.872
#> SRR1521409     4  0.4779      0.453 0.000 0.340 0.000 0.628 0.032
#> SRR1521410     1  0.0703      0.934 0.976 0.000 0.000 0.024 0.000
#> SRR1521411     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521414     1  0.1197      0.906 0.952 0.000 0.000 0.000 0.048
#> SRR1521413     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.1671      0.872 0.924 0.000 0.000 0.000 0.076
#> SRR1521416     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.4651      0.307 0.608 0.000 0.000 0.372 0.020
#> SRR1521421     1  0.1310      0.922 0.956 0.000 0.000 0.020 0.024
#> SRR1521422     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.1168      0.911 0.032 0.000 0.000 0.960 0.008
#> SRR1521423     1  0.0000      0.960 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.1168      0.911 0.032 0.000 0.000 0.960 0.008
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     4  0.4313      0.466 0.356 0.000 0.000 0.636 0.008
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0000      0.904 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      1.000 0.000 1.000 0.000 0.000 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
#> SRR1521352     4  0.0790     0.9623 0.000 0.000 0.000 0.968 0.000 0.032
#> SRR1521353     3  0.4110     0.5486 0.000 0.000 0.608 0.000 0.016 0.376
#> SRR1521354     3  0.4110     0.5486 0.000 0.000 0.608 0.000 0.016 0.376
#> SRR1521355     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.0713     0.8554 0.000 0.000 0.000 0.028 0.000 0.972
#> SRR1521360     6  0.1556     0.7842 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR1521361     6  0.0000     0.8718 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521362     4  0.0000     0.9601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521363     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0717     0.8396 0.000 0.000 0.976 0.000 0.016 0.008
#> SRR1521370     3  0.4131     0.5353 0.000 0.000 0.600 0.000 0.016 0.384
#> SRR1521371     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521372     5  0.0993     0.9327 0.024 0.000 0.000 0.000 0.964 0.012
#> SRR1521373     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.2597     0.6309 0.000 0.176 0.824 0.000 0.000 0.000
#> SRR1521377     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.3290     0.7142 0.000 0.000 0.776 0.000 0.016 0.208
#> SRR1521379     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521380     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.0000     0.8718 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521382     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     4  0.1524     0.9592 0.000 0.000 0.000 0.932 0.008 0.060
#> SRR1521384     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     4  0.1524     0.9592 0.000 0.000 0.000 0.932 0.008 0.060
#> SRR1521387     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.4099     0.5541 0.000 0.000 0.612 0.000 0.016 0.372
#> SRR1521388     4  0.0000     0.9601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000     0.9601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0000     0.9601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521391     5  0.0260     0.9046 0.000 0.000 0.000 0.000 0.992 0.008
#> SRR1521392     5  0.0632     0.9329 0.024 0.000 0.000 0.000 0.976 0.000
#> SRR1521393     5  0.0632     0.9329 0.024 0.000 0.000 0.000 0.976 0.000
#> SRR1521394     5  0.0632     0.9329 0.024 0.000 0.000 0.000 0.976 0.000
#> SRR1521395     5  0.0632     0.9329 0.024 0.000 0.000 0.000 0.976 0.000
#> SRR1521396     5  0.0632     0.9329 0.024 0.000 0.000 0.000 0.976 0.000
#> SRR1521397     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.0993     0.9327 0.024 0.000 0.000 0.000 0.964 0.012
#> SRR1521400     5  0.0993     0.9327 0.024 0.000 0.000 0.000 0.964 0.012
#> SRR1521401     5  0.0993     0.9327 0.024 0.000 0.000 0.000 0.964 0.012
#> SRR1521403     5  0.4264     0.0542 0.484 0.000 0.000 0.000 0.500 0.016
#> SRR1521402     5  0.0993     0.9327 0.024 0.000 0.000 0.000 0.964 0.012
#> SRR1521405     4  0.0000     0.9601 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521406     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.1524     0.9592 0.000 0.000 0.000 0.932 0.008 0.060
#> SRR1521408     3  0.4099     0.5541 0.000 0.000 0.612 0.000 0.016 0.372
#> SRR1521407     6  0.0000     0.8718 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521409     6  0.5155     0.4285 0.000 0.280 0.000 0.124 0.000 0.596
#> SRR1521410     1  0.0260     0.9590 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR1521411     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521414     1  0.1297     0.9274 0.948 0.000 0.000 0.000 0.040 0.012
#> SRR1521413     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.2446     0.8348 0.864 0.000 0.000 0.000 0.124 0.012
#> SRR1521416     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.2716     0.8591 0.868 0.000 0.000 0.028 0.008 0.096
#> SRR1521421     1  0.2118     0.8809 0.888 0.000 0.000 0.000 0.008 0.104
#> SRR1521422     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.1524     0.9592 0.000 0.000 0.000 0.932 0.008 0.060
#> SRR1521423     1  0.0000     0.9650 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.1524     0.9592 0.000 0.000 0.000 0.932 0.008 0.060
#> SRR1521427     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.4000     0.7205 0.764 0.000 0.000 0.164 0.008 0.064
#> SRR1521428     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000     0.8487 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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 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 1.000           0.970       0.988         0.4751 0.520   0.520
#> 3 3 0.690           0.797       0.867         0.3684 0.727   0.517
#> 4 4 0.773           0.883       0.913         0.1517 0.745   0.392
#> 5 5 1.000           0.965       0.986         0.0609 0.954   0.815
#> 6 6 1.000           0.955       0.983         0.0261 0.980   0.903

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 5

There is also optional best \(k\) = 2 5 that is worth to check.

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> SRR1521352     1   0.000      0.998 1.000 0.000
#> SRR1521353     1   0.000      0.998 1.000 0.000
#> SRR1521354     1   0.000      0.998 1.000 0.000
#> SRR1521355     1   0.000      0.998 1.000 0.000
#> SRR1521356     1   0.000      0.998 1.000 0.000
#> SRR1521357     2   0.000      0.970 0.000 1.000
#> SRR1521358     2   0.000      0.970 0.000 1.000
#> SRR1521359     1   0.000      0.998 1.000 0.000
#> SRR1521360     1   0.163      0.976 0.976 0.024
#> SRR1521361     1   0.000      0.998 1.000 0.000
#> SRR1521362     1   0.000      0.998 1.000 0.000
#> SRR1521363     2   0.000      0.970 0.000 1.000
#> SRR1521364     2   0.000      0.970 0.000 1.000
#> SRR1521365     2   0.000      0.970 0.000 1.000
#> SRR1521366     2   0.981      0.302 0.420 0.580
#> SRR1521368     2   0.000      0.970 0.000 1.000
#> SRR1521369     1   0.163      0.976 0.976 0.024
#> SRR1521370     1   0.000      0.998 1.000 0.000
#> SRR1521371     1   0.000      0.998 1.000 0.000
#> SRR1521372     1   0.000      0.998 1.000 0.000
#> SRR1521373     2   0.000      0.970 0.000 1.000
#> SRR1521374     2   0.000      0.970 0.000 1.000
#> SRR1521375     2   0.000      0.970 0.000 1.000
#> SRR1521376     2   0.000      0.970 0.000 1.000
#> SRR1521377     2   0.000      0.970 0.000 1.000
#> SRR1521378     1   0.163      0.976 0.976 0.024
#> SRR1521379     2   0.000      0.970 0.000 1.000
#> SRR1521380     2   0.000      0.970 0.000 1.000
#> SRR1521381     1   0.000      0.998 1.000 0.000
#> SRR1521382     2   0.000      0.970 0.000 1.000
#> SRR1521383     1   0.000      0.998 1.000 0.000
#> SRR1521384     2   0.000      0.970 0.000 1.000
#> SRR1521385     1   0.000      0.998 1.000 0.000
#> SRR1521387     2   0.000      0.970 0.000 1.000
#> SRR1521386     1   0.163      0.976 0.976 0.024
#> SRR1521388     1   0.000      0.998 1.000 0.000
#> SRR1521389     1   0.000      0.998 1.000 0.000
#> SRR1521390     1   0.000      0.998 1.000 0.000
#> SRR1521391     1   0.000      0.998 1.000 0.000
#> SRR1521392     1   0.000      0.998 1.000 0.000
#> SRR1521393     1   0.000      0.998 1.000 0.000
#> SRR1521394     1   0.000      0.998 1.000 0.000
#> SRR1521395     1   0.000      0.998 1.000 0.000
#> SRR1521396     1   0.000      0.998 1.000 0.000
#> SRR1521397     1   0.000      0.998 1.000 0.000
#> SRR1521398     1   0.000      0.998 1.000 0.000
#> SRR1521399     1   0.000      0.998 1.000 0.000
#> SRR1521400     1   0.000      0.998 1.000 0.000
#> SRR1521401     1   0.000      0.998 1.000 0.000
#> SRR1521403     1   0.000      0.998 1.000 0.000
#> SRR1521402     1   0.000      0.998 1.000 0.000
#> SRR1521405     1   0.000      0.998 1.000 0.000
#> SRR1521406     1   0.000      0.998 1.000 0.000
#> SRR1521404     1   0.000      0.998 1.000 0.000
#> SRR1521408     1   0.000      0.998 1.000 0.000
#> SRR1521407     1   0.000      0.998 1.000 0.000
#> SRR1521409     1   0.163      0.976 0.976 0.024
#> SRR1521410     1   0.000      0.998 1.000 0.000
#> SRR1521411     1   0.000      0.998 1.000 0.000
#> SRR1521412     1   0.000      0.998 1.000 0.000
#> SRR1521414     1   0.000      0.998 1.000 0.000
#> SRR1521413     1   0.000      0.998 1.000 0.000
#> SRR1521415     1   0.000      0.998 1.000 0.000
#> SRR1521416     1   0.000      0.998 1.000 0.000
#> SRR1521417     1   0.000      0.998 1.000 0.000
#> SRR1521418     1   0.000      0.998 1.000 0.000
#> SRR1521419     1   0.000      0.998 1.000 0.000
#> SRR1521420     1   0.000      0.998 1.000 0.000
#> SRR1521421     1   0.000      0.998 1.000 0.000
#> SRR1521422     1   0.000      0.998 1.000 0.000
#> SRR1521424     1   0.000      0.998 1.000 0.000
#> SRR1521423     1   0.000      0.998 1.000 0.000
#> SRR1521426     1   0.000      0.998 1.000 0.000
#> SRR1521427     2   0.000      0.970 0.000 1.000
#> SRR1521425     1   0.000      0.998 1.000 0.000
#> SRR1521428     2   0.000      0.970 0.000 1.000
#> SRR1521430     2   0.000      0.970 0.000 1.000
#> SRR1521429     2   0.000      0.970 0.000 1.000
#> SRR1521432     2   0.969      0.369 0.396 0.604
#> SRR1521433     2   0.000      0.970 0.000 1.000
#> SRR1521434     2   0.000      0.970 0.000 1.000
#> SRR1521435     2   0.000      0.970 0.000 1.000
#> SRR1521436     2   0.000      0.970 0.000 1.000
#> SRR1521437     2   0.000      0.970 0.000 1.000
#> SRR1521431     2   0.738      0.735 0.208 0.792
#> SRR1521438     2   0.000      0.970 0.000 1.000
#> SRR1521439     2   0.000      0.970 0.000 1.000
#> SRR1521440     2   0.000      0.970 0.000 1.000
#> SRR1521441     2   0.000      0.970 0.000 1.000
#> SRR1521443     2   0.000      0.970 0.000 1.000
#> SRR1521442     2   0.000      0.970 0.000 1.000
#> SRR1521444     2   0.000      0.970 0.000 1.000
#> SRR1521445     2   0.000      0.970 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
#> SRR1521352     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521353     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521354     3  0.6192      0.689 0.420 0.000 0.580
#> SRR1521355     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521356     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521357     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521359     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521360     3  0.5431      0.710 0.284 0.000 0.716
#> SRR1521361     3  0.5431      0.710 0.284 0.000 0.716
#> SRR1521362     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521363     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521364     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521365     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521366     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521368     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521369     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521370     3  0.6180      0.690 0.416 0.000 0.584
#> SRR1521371     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521372     3  0.5431      0.710 0.284 0.000 0.716
#> SRR1521373     2  0.1031      0.904 0.024 0.976 0.000
#> SRR1521374     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521376     2  0.6180      0.587 0.416 0.584 0.000
#> SRR1521377     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521378     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521379     2  0.0424      0.914 0.008 0.992 0.000
#> SRR1521380     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521381     3  0.5327      0.708 0.272 0.000 0.728
#> SRR1521382     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521383     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521384     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521385     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521387     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521386     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521388     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521389     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521390     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521391     3  0.5431      0.710 0.284 0.000 0.716
#> SRR1521392     3  0.0592      0.648 0.012 0.000 0.988
#> SRR1521393     3  0.0424      0.632 0.008 0.000 0.992
#> SRR1521394     3  0.0424      0.632 0.008 0.000 0.992
#> SRR1521395     3  0.0424      0.632 0.008 0.000 0.992
#> SRR1521396     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521397     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521398     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521399     3  0.6026     -0.605 0.376 0.000 0.624
#> SRR1521400     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521401     3  0.0237      0.638 0.004 0.000 0.996
#> SRR1521403     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521402     3  0.0892      0.643 0.020 0.000 0.980
#> SRR1521405     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521406     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521404     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521408     3  0.6180      0.690 0.416 0.000 0.584
#> SRR1521407     3  0.0237      0.645 0.004 0.000 0.996
#> SRR1521409     3  0.5763      0.709 0.276 0.008 0.716
#> SRR1521410     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521411     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521412     1  0.6280      0.944 0.540 0.000 0.460
#> SRR1521414     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521413     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521415     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521416     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521417     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521418     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521419     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521420     3  0.0237      0.638 0.004 0.000 0.996
#> SRR1521421     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521422     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521424     3  0.0000      0.643 0.000 0.000 1.000
#> SRR1521423     1  0.6204      0.997 0.576 0.000 0.424
#> SRR1521426     1  0.6215      0.992 0.572 0.000 0.428
#> SRR1521427     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521425     1  0.6235      0.981 0.564 0.000 0.436
#> SRR1521428     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521430     2  0.6204      0.578 0.424 0.576 0.000
#> SRR1521429     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521432     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521433     2  0.6204      0.578 0.424 0.576 0.000
#> SRR1521434     2  0.6204      0.578 0.424 0.576 0.000
#> SRR1521435     2  0.6204      0.578 0.424 0.576 0.000
#> SRR1521436     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521431     3  0.6204      0.688 0.424 0.000 0.576
#> SRR1521438     2  0.6204      0.578 0.424 0.576 0.000
#> SRR1521439     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.918 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.918 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
#> SRR1521352     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521353     3  0.2973      0.847 0.000 0.000 0.856 0.144
#> SRR1521354     3  0.3123      0.838 0.000 0.000 0.844 0.156
#> SRR1521355     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521356     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521357     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521360     3  0.3907      0.747 0.000 0.000 0.768 0.232
#> SRR1521361     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521362     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521363     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521364     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.3444      0.808 0.000 0.000 0.816 0.184
#> SRR1521371     1  0.1022      0.833 0.968 0.000 0.000 0.032
#> SRR1521372     4  0.5548      0.339 0.032 0.000 0.340 0.628
#> SRR1521373     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521376     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521377     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.4836      0.518 0.000 0.672 0.008 0.320
#> SRR1521380     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521381     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521382     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521384     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521387     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521388     4  0.2973      0.820 0.144 0.000 0.000 0.856
#> SRR1521389     4  0.2973      0.820 0.144 0.000 0.000 0.856
#> SRR1521390     4  0.2973      0.820 0.144 0.000 0.000 0.856
#> SRR1521391     3  0.6167      0.658 0.124 0.000 0.668 0.208
#> SRR1521392     1  0.3688      0.749 0.792 0.000 0.000 0.208
#> SRR1521393     1  0.3688      0.749 0.792 0.000 0.000 0.208
#> SRR1521394     1  0.3688      0.749 0.792 0.000 0.000 0.208
#> SRR1521395     1  0.3688      0.749 0.792 0.000 0.000 0.208
#> SRR1521396     1  0.3688      0.749 0.792 0.000 0.000 0.208
#> SRR1521397     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521398     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521399     1  0.3266      0.774 0.832 0.000 0.000 0.168
#> SRR1521400     4  0.2704      0.776 0.124 0.000 0.000 0.876
#> SRR1521401     1  0.3688      0.749 0.792 0.000 0.000 0.208
#> SRR1521403     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521402     1  0.3688      0.749 0.792 0.000 0.000 0.208
#> SRR1521405     4  0.2973      0.820 0.144 0.000 0.000 0.856
#> SRR1521406     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521404     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.3123      0.838 0.000 0.000 0.844 0.156
#> SRR1521407     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521409     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521410     4  0.3311      0.789 0.172 0.000 0.000 0.828
#> SRR1521411     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521412     1  0.3873      0.815 0.772 0.000 0.000 0.228
#> SRR1521414     1  0.1792      0.840 0.932 0.000 0.000 0.068
#> SRR1521413     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521415     1  0.2921      0.848 0.860 0.000 0.000 0.140
#> SRR1521416     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521417     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521418     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521419     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521420     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521421     4  0.0188      0.904 0.004 0.000 0.000 0.996
#> SRR1521422     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521424     4  0.0000      0.906 0.000 0.000 0.000 1.000
#> SRR1521423     1  0.2704      0.868 0.876 0.000 0.000 0.124
#> SRR1521426     4  0.2973      0.820 0.144 0.000 0.000 0.856
#> SRR1521427     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.3074      0.811 0.152 0.000 0.000 0.848
#> SRR1521428     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521429     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.0000      0.937 0.000 0.000 1.000 0.000
#> SRR1521439     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.985 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.985 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521353     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0162      0.986 0.000 0.000 0.996 0.004 0.000
#> SRR1521355     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521360     3  0.1341      0.929 0.000 0.000 0.944 0.056 0.000
#> SRR1521361     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521362     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521363     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0162      0.986 0.000 0.000 0.996 0.004 0.000
#> SRR1521371     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521372     4  0.0451      0.988 0.000 0.000 0.004 0.988 0.008
#> SRR1521373     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521377     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.5174      0.408 0.000 0.604 0.056 0.340 0.000
#> SRR1521380     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521382     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521384     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521387     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.0162      0.996 0.000 0.000 0.000 0.996 0.004
#> SRR1521389     4  0.0162      0.996 0.000 0.000 0.000 0.996 0.004
#> SRR1521390     4  0.0162      0.996 0.000 0.000 0.000 0.996 0.004
#> SRR1521391     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521392     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521393     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521394     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521395     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521396     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521397     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.2127      0.878 0.108 0.000 0.000 0.000 0.892
#> SRR1521400     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521401     5  0.0162      0.987 0.000 0.000 0.000 0.004 0.996
#> SRR1521403     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521402     5  0.0451      0.981 0.008 0.000 0.000 0.004 0.988
#> SRR1521405     4  0.0162      0.996 0.000 0.000 0.000 0.996 0.004
#> SRR1521406     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521408     3  0.2488      0.854 0.000 0.000 0.872 0.004 0.124
#> SRR1521407     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521409     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521410     4  0.0510      0.983 0.016 0.000 0.000 0.984 0.000
#> SRR1521411     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.4291      0.125 0.536 0.000 0.000 0.464 0.000
#> SRR1521414     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521416     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521421     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521422     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521423     1  0.0000      0.964 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.0000      0.998 0.000 0.000 0.000 1.000 0.000
#> SRR1521427     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     4  0.0162      0.995 0.004 0.000 0.000 0.996 0.000
#> SRR1521428     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.0404      0.968 0.000 0.988 0.012 0.000 0.000
#> SRR1521437     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0000      0.989 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.980 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.0790      0.966 0.000 0.000 0.000 0.032 0.000 0.968
#> SRR1521353     3  0.0790      0.962 0.000 0.000 0.968 0.000 0.000 0.032
#> SRR1521354     3  0.0790      0.962 0.000 0.000 0.968 0.000 0.000 0.032
#> SRR1521355     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521360     3  0.1610      0.907 0.000 0.000 0.916 0.000 0.000 0.084
#> SRR1521361     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521362     4  0.1714      0.885 0.000 0.000 0.000 0.908 0.000 0.092
#> SRR1521363     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521370     3  0.0790      0.962 0.000 0.000 0.968 0.000 0.000 0.032
#> SRR1521371     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521372     6  0.0405      0.978 0.000 0.000 0.004 0.000 0.008 0.988
#> SRR1521373     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521377     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521379     2  0.4594      0.400 0.000 0.608 0.052 0.000 0.000 0.340
#> SRR1521380     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521382     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521384     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521387     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.0790      0.962 0.000 0.000 0.968 0.000 0.000 0.032
#> SRR1521388     4  0.0000      0.972 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000      0.972 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0000      0.972 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521391     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521392     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521393     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521394     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521395     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521396     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521397     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.1863      0.853 0.104 0.000 0.000 0.000 0.896 0.000
#> SRR1521400     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521401     5  0.0000      0.983 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521403     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521402     5  0.0260      0.976 0.008 0.000 0.000 0.000 0.992 0.000
#> SRR1521405     4  0.0000      0.972 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.2771      0.845 0.000 0.000 0.852 0.000 0.116 0.032
#> SRR1521407     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521409     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521410     6  0.0937      0.954 0.040 0.000 0.000 0.000 0.000 0.960
#> SRR1521411     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.3854      0.106 0.536 0.000 0.000 0.000 0.000 0.464
#> SRR1521414     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521416     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     6  0.0790      0.962 0.032 0.000 0.000 0.000 0.000 0.968
#> SRR1521421     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521422     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     6  0.0000      0.986 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521423     1  0.0000      0.963 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     6  0.0790      0.966 0.000 0.000 0.000 0.032 0.000 0.968
#> SRR1521427     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.0790      0.962 0.032 0.000 0.000 0.000 0.000 0.968
#> SRR1521428     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.0363      0.966 0.000 0.988 0.012 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000      0.980 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.980 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 1.000           0.987       0.995         0.5056 0.495   0.495
#> 3 3 0.741           0.756       0.890         0.2440 0.867   0.735
#> 4 4 0.804           0.865       0.859         0.1745 0.872   0.660
#> 5 5 0.817           0.816       0.904         0.0712 0.914   0.680
#> 6 6 0.808           0.654       0.831         0.0329 0.919   0.650

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
#> SRR1521352     1   0.000      0.991 1.000 0.000
#> SRR1521353     2   0.000      1.000 0.000 1.000
#> SRR1521354     2   0.000      1.000 0.000 1.000
#> SRR1521355     1   0.000      0.991 1.000 0.000
#> SRR1521356     1   0.000      0.991 1.000 0.000
#> SRR1521357     2   0.000      1.000 0.000 1.000
#> SRR1521358     2   0.000      1.000 0.000 1.000
#> SRR1521359     1   0.000      0.991 1.000 0.000
#> SRR1521360     2   0.000      1.000 0.000 1.000
#> SRR1521361     1   0.985      0.252 0.572 0.428
#> SRR1521362     1   0.000      0.991 1.000 0.000
#> SRR1521363     2   0.000      1.000 0.000 1.000
#> SRR1521364     2   0.000      1.000 0.000 1.000
#> SRR1521365     2   0.000      1.000 0.000 1.000
#> SRR1521366     2   0.000      1.000 0.000 1.000
#> SRR1521368     2   0.000      1.000 0.000 1.000
#> SRR1521369     2   0.000      1.000 0.000 1.000
#> SRR1521370     2   0.000      1.000 0.000 1.000
#> SRR1521371     1   0.000      0.991 1.000 0.000
#> SRR1521372     1   0.000      0.991 1.000 0.000
#> SRR1521373     2   0.000      1.000 0.000 1.000
#> SRR1521374     2   0.000      1.000 0.000 1.000
#> SRR1521375     2   0.000      1.000 0.000 1.000
#> SRR1521376     2   0.000      1.000 0.000 1.000
#> SRR1521377     2   0.000      1.000 0.000 1.000
#> SRR1521378     2   0.000      1.000 0.000 1.000
#> SRR1521379     2   0.000      1.000 0.000 1.000
#> SRR1521380     2   0.000      1.000 0.000 1.000
#> SRR1521381     1   0.000      0.991 1.000 0.000
#> SRR1521382     2   0.000      1.000 0.000 1.000
#> SRR1521383     1   0.000      0.991 1.000 0.000
#> SRR1521384     2   0.000      1.000 0.000 1.000
#> SRR1521385     1   0.000      0.991 1.000 0.000
#> SRR1521387     2   0.000      1.000 0.000 1.000
#> SRR1521386     2   0.000      1.000 0.000 1.000
#> SRR1521388     1   0.000      0.991 1.000 0.000
#> SRR1521389     1   0.000      0.991 1.000 0.000
#> SRR1521390     1   0.000      0.991 1.000 0.000
#> SRR1521391     1   0.000      0.991 1.000 0.000
#> SRR1521392     1   0.000      0.991 1.000 0.000
#> SRR1521393     1   0.000      0.991 1.000 0.000
#> SRR1521394     1   0.000      0.991 1.000 0.000
#> SRR1521395     1   0.000      0.991 1.000 0.000
#> SRR1521396     1   0.000      0.991 1.000 0.000
#> SRR1521397     1   0.000      0.991 1.000 0.000
#> SRR1521398     1   0.000      0.991 1.000 0.000
#> SRR1521399     1   0.000      0.991 1.000 0.000
#> SRR1521400     1   0.000      0.991 1.000 0.000
#> SRR1521401     1   0.000      0.991 1.000 0.000
#> SRR1521403     1   0.000      0.991 1.000 0.000
#> SRR1521402     1   0.000      0.991 1.000 0.000
#> SRR1521405     1   0.000      0.991 1.000 0.000
#> SRR1521406     1   0.000      0.991 1.000 0.000
#> SRR1521404     1   0.000      0.991 1.000 0.000
#> SRR1521408     2   0.000      1.000 0.000 1.000
#> SRR1521407     1   0.000      0.991 1.000 0.000
#> SRR1521409     2   0.000      1.000 0.000 1.000
#> SRR1521410     1   0.000      0.991 1.000 0.000
#> SRR1521411     1   0.000      0.991 1.000 0.000
#> SRR1521412     1   0.000      0.991 1.000 0.000
#> SRR1521414     1   0.000      0.991 1.000 0.000
#> SRR1521413     1   0.000      0.991 1.000 0.000
#> SRR1521415     1   0.000      0.991 1.000 0.000
#> SRR1521416     1   0.000      0.991 1.000 0.000
#> SRR1521417     1   0.000      0.991 1.000 0.000
#> SRR1521418     1   0.000      0.991 1.000 0.000
#> SRR1521419     1   0.000      0.991 1.000 0.000
#> SRR1521420     1   0.000      0.991 1.000 0.000
#> SRR1521421     1   0.000      0.991 1.000 0.000
#> SRR1521422     1   0.000      0.991 1.000 0.000
#> SRR1521424     1   0.000      0.991 1.000 0.000
#> SRR1521423     1   0.000      0.991 1.000 0.000
#> SRR1521426     1   0.000      0.991 1.000 0.000
#> SRR1521427     2   0.000      1.000 0.000 1.000
#> SRR1521425     1   0.000      0.991 1.000 0.000
#> SRR1521428     2   0.000      1.000 0.000 1.000
#> SRR1521430     2   0.000      1.000 0.000 1.000
#> SRR1521429     2   0.000      1.000 0.000 1.000
#> SRR1521432     2   0.000      1.000 0.000 1.000
#> SRR1521433     2   0.000      1.000 0.000 1.000
#> SRR1521434     2   0.000      1.000 0.000 1.000
#> SRR1521435     2   0.000      1.000 0.000 1.000
#> SRR1521436     2   0.000      1.000 0.000 1.000
#> SRR1521437     2   0.000      1.000 0.000 1.000
#> SRR1521431     2   0.000      1.000 0.000 1.000
#> SRR1521438     2   0.000      1.000 0.000 1.000
#> SRR1521439     2   0.000      1.000 0.000 1.000
#> SRR1521440     2   0.000      1.000 0.000 1.000
#> SRR1521441     2   0.000      1.000 0.000 1.000
#> SRR1521443     2   0.000      1.000 0.000 1.000
#> SRR1521442     2   0.000      1.000 0.000 1.000
#> SRR1521444     2   0.000      1.000 0.000 1.000
#> SRR1521445     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
#> SRR1521352     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521353     3  0.0424    0.88416 0.008 0.000 0.992
#> SRR1521354     3  0.0424    0.88416 0.008 0.000 0.992
#> SRR1521355     1  0.2356    0.81473 0.928 0.000 0.072
#> SRR1521356     1  0.0892    0.83621 0.980 0.000 0.020
#> SRR1521357     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521358     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521359     1  0.5926    0.61072 0.644 0.000 0.356
#> SRR1521360     3  0.6859    0.26358 0.016 0.420 0.564
#> SRR1521361     3  0.8633   -0.16303 0.436 0.100 0.464
#> SRR1521362     1  0.5926    0.61072 0.644 0.000 0.356
#> SRR1521363     2  0.6799    0.02722 0.012 0.532 0.456
#> SRR1521364     3  0.0892    0.88651 0.000 0.020 0.980
#> SRR1521365     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521366     3  0.0892    0.88651 0.000 0.020 0.980
#> SRR1521368     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521369     3  0.0892    0.88651 0.000 0.020 0.980
#> SRR1521370     3  0.6553    0.28582 0.008 0.412 0.580
#> SRR1521371     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521372     1  0.4887    0.72463 0.772 0.000 0.228
#> SRR1521373     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521374     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521375     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521376     3  0.6745    0.24518 0.012 0.428 0.560
#> SRR1521377     3  0.0892    0.88651 0.000 0.020 0.980
#> SRR1521378     3  0.0424    0.88416 0.008 0.000 0.992
#> SRR1521379     2  0.6799    0.02722 0.012 0.532 0.456
#> SRR1521380     3  0.0892    0.88651 0.000 0.020 0.980
#> SRR1521381     1  0.6008    0.58678 0.628 0.000 0.372
#> SRR1521382     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521383     1  0.5926    0.61072 0.644 0.000 0.356
#> SRR1521384     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521385     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521387     2  0.1529    0.86712 0.000 0.960 0.040
#> SRR1521386     3  0.0424    0.88416 0.008 0.000 0.992
#> SRR1521388     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521389     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521390     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521391     1  0.6451    0.55291 0.608 0.008 0.384
#> SRR1521392     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521393     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521394     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521395     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521396     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521397     1  0.0237    0.83863 0.996 0.000 0.004
#> SRR1521398     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521399     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521400     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521401     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521403     1  0.5327    0.68724 0.728 0.000 0.272
#> SRR1521402     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521405     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521406     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521404     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521408     3  0.0424    0.88416 0.008 0.000 0.992
#> SRR1521407     1  0.5926    0.61072 0.644 0.000 0.356
#> SRR1521409     2  0.6941    0.00677 0.016 0.520 0.464
#> SRR1521410     1  0.2878    0.80172 0.904 0.000 0.096
#> SRR1521411     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521412     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521414     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521413     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521415     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521416     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521417     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521418     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521419     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521420     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521421     1  0.0424    0.83981 0.992 0.000 0.008
#> SRR1521422     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521424     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521423     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521426     1  0.5968    0.60677 0.636 0.000 0.364
#> SRR1521427     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521425     1  0.0000    0.83731 1.000 0.000 0.000
#> SRR1521428     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521430     3  0.0747    0.88737 0.000 0.016 0.984
#> SRR1521429     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521432     3  0.0424    0.88679 0.000 0.008 0.992
#> SRR1521433     3  0.0592    0.88769 0.000 0.012 0.988
#> SRR1521434     3  0.0592    0.88769 0.000 0.012 0.988
#> SRR1521435     3  0.0592    0.88769 0.000 0.012 0.988
#> SRR1521436     2  0.6252    0.07618 0.000 0.556 0.444
#> SRR1521437     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521431     3  0.0424    0.88679 0.000 0.008 0.992
#> SRR1521438     3  0.0892    0.88651 0.000 0.020 0.980
#> SRR1521439     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521440     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521441     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521443     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521442     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521444     2  0.0000    0.90195 0.000 1.000 0.000
#> SRR1521445     2  0.0000    0.90195 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
#> SRR1521352     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521353     3  0.0000      0.961 0.000 0.000 1.000 0.000
#> SRR1521354     3  0.0000      0.961 0.000 0.000 1.000 0.000
#> SRR1521355     1  0.0336      0.876 0.992 0.000 0.008 0.000
#> SRR1521356     1  0.0188      0.879 0.996 0.000 0.004 0.000
#> SRR1521357     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.3198      0.802 0.080 0.000 0.040 0.880
#> SRR1521360     3  0.4378      0.810 0.020 0.072 0.836 0.072
#> SRR1521361     4  0.5015      0.664 0.024 0.028 0.176 0.772
#> SRR1521362     4  0.3266      0.804 0.084 0.000 0.040 0.876
#> SRR1521363     2  0.5610      0.722 0.000 0.720 0.176 0.104
#> SRR1521364     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521365     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521368     2  0.0817      0.931 0.000 0.976 0.024 0.000
#> SRR1521369     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521370     3  0.2131      0.912 0.000 0.036 0.932 0.032
#> SRR1521371     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521372     4  0.3647      0.756 0.108 0.000 0.040 0.852
#> SRR1521373     2  0.1510      0.922 0.000 0.956 0.028 0.016
#> SRR1521374     2  0.0817      0.931 0.000 0.976 0.024 0.000
#> SRR1521375     2  0.1510      0.922 0.000 0.956 0.028 0.016
#> SRR1521376     3  0.4979      0.664 0.004 0.224 0.740 0.032
#> SRR1521377     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521378     3  0.0000      0.961 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.5788      0.716 0.004 0.716 0.176 0.104
#> SRR1521380     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521381     4  0.3229      0.799 0.072 0.000 0.048 0.880
#> SRR1521382     2  0.1406      0.924 0.000 0.960 0.024 0.016
#> SRR1521383     4  0.5282      0.847 0.276 0.000 0.036 0.688
#> SRR1521384     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521387     2  0.2647      0.858 0.000 0.880 0.120 0.000
#> SRR1521386     3  0.0000      0.961 0.000 0.000 1.000 0.000
#> SRR1521388     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521389     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521390     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521391     4  0.6660      0.148 0.084 0.000 0.452 0.464
#> SRR1521392     1  0.4454      0.736 0.692 0.000 0.000 0.308
#> SRR1521393     1  0.4454      0.736 0.692 0.000 0.000 0.308
#> SRR1521394     1  0.4454      0.736 0.692 0.000 0.000 0.308
#> SRR1521395     1  0.4454      0.736 0.692 0.000 0.000 0.308
#> SRR1521396     1  0.4454      0.736 0.692 0.000 0.000 0.308
#> SRR1521397     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.3837      0.786 0.776 0.000 0.000 0.224
#> SRR1521400     1  0.3873      0.783 0.772 0.000 0.000 0.228
#> SRR1521401     1  0.3873      0.783 0.772 0.000 0.000 0.228
#> SRR1521403     4  0.3731      0.786 0.120 0.000 0.036 0.844
#> SRR1521402     1  0.3873      0.783 0.772 0.000 0.000 0.228
#> SRR1521405     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521406     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521404     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521408     3  0.0000      0.961 0.000 0.000 1.000 0.000
#> SRR1521407     4  0.3198      0.802 0.080 0.000 0.040 0.880
#> SRR1521409     2  0.6376      0.683 0.020 0.692 0.176 0.112
#> SRR1521410     1  0.0336      0.875 0.992 0.000 0.000 0.008
#> SRR1521411     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521414     1  0.1118      0.870 0.964 0.000 0.000 0.036
#> SRR1521413     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.3801      0.789 0.780 0.000 0.000 0.220
#> SRR1521416     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.0336      0.876 0.992 0.000 0.008 0.000
#> SRR1521421     1  0.3161      0.826 0.864 0.000 0.012 0.124
#> SRR1521422     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521424     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521423     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521426     4  0.5256      0.851 0.272 0.000 0.036 0.692
#> SRR1521427     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521428     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521429     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000      0.961 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521434     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521435     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521436     2  0.4123      0.740 0.000 0.772 0.220 0.008
#> SRR1521437     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000      0.961 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.0592      0.964 0.000 0.016 0.984 0.000
#> SRR1521439     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.941 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.941 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0693    0.76302 0.012 0.000 0.008 0.980 0.000
#> SRR1521353     3  0.0000    0.93144 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0000    0.93144 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1  0.3700    0.74960 0.752 0.000 0.000 0.008 0.240
#> SRR1521356     1  0.3430    0.76929 0.776 0.000 0.000 0.004 0.220
#> SRR1521357     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.4485    0.66113 0.000 0.000 0.292 0.680 0.028
#> SRR1521360     4  0.4746    0.34164 0.000 0.000 0.480 0.504 0.016
#> SRR1521361     4  0.4774    0.58803 0.000 0.000 0.360 0.612 0.028
#> SRR1521362     4  0.1153    0.75979 0.004 0.000 0.008 0.964 0.024
#> SRR1521363     4  0.6502    0.42705 0.004 0.288 0.200 0.508 0.000
#> SRR1521364     3  0.0290    0.92913 0.000 0.008 0.992 0.000 0.000
#> SRR1521365     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0290    0.92913 0.000 0.008 0.992 0.000 0.000
#> SRR1521368     2  0.2377    0.86767 0.000 0.872 0.128 0.000 0.000
#> SRR1521369     3  0.0290    0.92913 0.000 0.008 0.992 0.000 0.000
#> SRR1521370     3  0.4436   -0.00578 0.000 0.000 0.596 0.396 0.008
#> SRR1521371     1  0.4291    0.33081 0.536 0.000 0.000 0.000 0.464
#> SRR1521372     4  0.5932    0.58427 0.000 0.000 0.308 0.560 0.132
#> SRR1521373     2  0.3934    0.69827 0.000 0.740 0.244 0.016 0.000
#> SRR1521374     2  0.2377    0.86767 0.000 0.872 0.128 0.000 0.000
#> SRR1521375     2  0.2873    0.85879 0.000 0.856 0.128 0.016 0.000
#> SRR1521376     3  0.4937   -0.17147 0.000 0.028 0.544 0.428 0.000
#> SRR1521377     3  0.0162    0.93217 0.000 0.004 0.996 0.000 0.000
#> SRR1521378     3  0.0000    0.93144 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     4  0.5181    0.37943 0.004 0.032 0.452 0.512 0.000
#> SRR1521380     3  0.0162    0.93217 0.000 0.004 0.996 0.000 0.000
#> SRR1521381     4  0.4546    0.65216 0.000 0.000 0.304 0.668 0.028
#> SRR1521382     2  0.2873    0.85879 0.000 0.856 0.128 0.016 0.000
#> SRR1521383     4  0.1597    0.75592 0.020 0.000 0.008 0.948 0.024
#> SRR1521384     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.1018    0.76461 0.016 0.000 0.016 0.968 0.000
#> SRR1521387     2  0.0880    0.92755 0.000 0.968 0.032 0.000 0.000
#> SRR1521386     3  0.0000    0.93144 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.0000    0.76036 0.000 0.000 0.000 1.000 0.000
#> SRR1521389     4  0.0000    0.76036 0.000 0.000 0.000 1.000 0.000
#> SRR1521390     4  0.0000    0.76036 0.000 0.000 0.000 1.000 0.000
#> SRR1521391     4  0.5232    0.60015 0.000 0.000 0.340 0.600 0.060
#> SRR1521392     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521393     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521394     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521395     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521396     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521397     1  0.0000    0.87334 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.2852    0.80317 0.828 0.000 0.000 0.000 0.172
#> SRR1521399     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521400     5  0.1121    0.94001 0.000 0.000 0.000 0.044 0.956
#> SRR1521401     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521403     4  0.6454    0.58747 0.028 0.000 0.292 0.560 0.120
#> SRR1521402     5  0.0000    0.99164 0.000 0.000 0.000 0.000 1.000
#> SRR1521405     4  0.0000    0.76036 0.000 0.000 0.000 1.000 0.000
#> SRR1521406     1  0.0162    0.87528 0.996 0.000 0.000 0.000 0.004
#> SRR1521404     4  0.0798    0.76283 0.016 0.000 0.008 0.976 0.000
#> SRR1521408     3  0.0000    0.93144 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     4  0.4546    0.65216 0.000 0.000 0.304 0.668 0.028
#> SRR1521409     4  0.4318    0.60697 0.004 0.004 0.348 0.644 0.000
#> SRR1521410     1  0.1121    0.85349 0.956 0.000 0.000 0.044 0.000
#> SRR1521411     1  0.0290    0.87530 0.992 0.000 0.000 0.000 0.008
#> SRR1521412     1  0.3689    0.73414 0.740 0.000 0.000 0.004 0.256
#> SRR1521414     5  0.0510    0.97661 0.016 0.000 0.000 0.000 0.984
#> SRR1521413     1  0.0404    0.87490 0.988 0.000 0.000 0.000 0.012
#> SRR1521415     5  0.0162    0.98865 0.004 0.000 0.000 0.000 0.996
#> SRR1521416     1  0.0162    0.87528 0.996 0.000 0.000 0.000 0.004
#> SRR1521417     1  0.0162    0.87528 0.996 0.000 0.000 0.000 0.004
#> SRR1521418     1  0.1197    0.86441 0.952 0.000 0.000 0.000 0.048
#> SRR1521419     1  0.0162    0.87528 0.996 0.000 0.000 0.000 0.004
#> SRR1521420     1  0.3789    0.75691 0.760 0.000 0.000 0.016 0.224
#> SRR1521421     1  0.4538    0.37475 0.540 0.000 0.000 0.008 0.452
#> SRR1521422     1  0.0162    0.87528 0.996 0.000 0.000 0.000 0.004
#> SRR1521424     4  0.0798    0.76169 0.016 0.000 0.008 0.976 0.000
#> SRR1521423     1  0.0162    0.87528 0.996 0.000 0.000 0.000 0.004
#> SRR1521426     4  0.0798    0.76169 0.016 0.000 0.008 0.976 0.000
#> SRR1521427     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.0609    0.86623 0.980 0.000 0.000 0.020 0.000
#> SRR1521428     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0162    0.93217 0.000 0.004 0.996 0.000 0.000
#> SRR1521429     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000    0.93144 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0162    0.93217 0.000 0.004 0.996 0.000 0.000
#> SRR1521434     3  0.0162    0.93217 0.000 0.004 0.996 0.000 0.000
#> SRR1521435     3  0.0162    0.93217 0.000 0.004 0.996 0.000 0.000
#> SRR1521436     2  0.3630    0.76217 0.000 0.780 0.204 0.016 0.000
#> SRR1521437     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000    0.93144 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0162    0.93217 0.000 0.004 0.996 0.000 0.000
#> SRR1521439     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000    0.94388 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000    0.94388 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.0458     0.5585 0.000 0.000 0.000 0.016 0.000 0.984
#> SRR1521353     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521354     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521355     5  0.5928     0.1797 0.220 0.000 0.000 0.000 0.436 0.344
#> SRR1521356     1  0.5145     0.0530 0.484 0.000 0.000 0.000 0.432 0.084
#> SRR1521357     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0790     0.8499 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR1521359     6  0.3626     0.5837 0.000 0.000 0.068 0.000 0.144 0.788
#> SRR1521360     3  0.4654     0.1942 0.000 0.000 0.504 0.016 0.016 0.464
#> SRR1521361     3  0.6017    -0.1305 0.000 0.000 0.420 0.016 0.148 0.416
#> SRR1521362     6  0.3232     0.5844 0.000 0.000 0.020 0.016 0.140 0.824
#> SRR1521363     4  0.6498    -0.1377 0.000 0.268 0.020 0.384 0.000 0.328
#> SRR1521364     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0790     0.8499 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR1521366     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.3769     0.6704 0.000 0.640 0.000 0.356 0.000 0.004
#> SRR1521369     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521370     3  0.4654     0.1942 0.000 0.000 0.504 0.016 0.016 0.464
#> SRR1521371     5  0.6003     0.2477 0.308 0.000 0.000 0.000 0.432 0.260
#> SRR1521372     5  0.4941     0.0241 0.000 0.000 0.072 0.000 0.552 0.376
#> SRR1521373     2  0.3807     0.6577 0.000 0.628 0.000 0.368 0.000 0.004
#> SRR1521374     2  0.3769     0.6704 0.000 0.640 0.000 0.356 0.000 0.004
#> SRR1521375     2  0.3782     0.6671 0.000 0.636 0.000 0.360 0.000 0.004
#> SRR1521376     3  0.5962     0.2072 0.000 0.008 0.464 0.352 0.000 0.176
#> SRR1521377     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521379     6  0.5291     0.2165 0.000 0.008 0.088 0.352 0.000 0.552
#> SRR1521380     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.5032     0.4315 0.000 0.000 0.216 0.000 0.148 0.636
#> SRR1521382     2  0.3782     0.6671 0.000 0.636 0.000 0.360 0.000 0.004
#> SRR1521383     6  0.2655     0.5802 0.004 0.000 0.000 0.008 0.140 0.848
#> SRR1521384     2  0.0790     0.8499 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR1521385     6  0.0363     0.5607 0.000 0.000 0.000 0.012 0.000 0.988
#> SRR1521387     2  0.3782     0.6671 0.000 0.636 0.000 0.360 0.000 0.004
#> SRR1521386     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521388     4  0.3706     0.6922 0.000 0.000 0.000 0.620 0.000 0.380
#> SRR1521389     4  0.3706     0.6922 0.000 0.000 0.000 0.620 0.000 0.380
#> SRR1521390     4  0.3706     0.6922 0.000 0.000 0.000 0.620 0.000 0.380
#> SRR1521391     3  0.5832     0.1466 0.000 0.000 0.492 0.000 0.260 0.248
#> SRR1521392     5  0.0146     0.7534 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR1521393     5  0.0260     0.7531 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1521394     5  0.0260     0.7531 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1521395     5  0.0260     0.7531 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1521396     5  0.0260     0.7531 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1521397     1  0.0858     0.8787 0.968 0.000 0.000 0.000 0.004 0.028
#> SRR1521398     1  0.4278     0.4250 0.632 0.000 0.000 0.000 0.336 0.032
#> SRR1521399     5  0.0000     0.7532 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521400     5  0.1957     0.6610 0.000 0.000 0.000 0.000 0.888 0.112
#> SRR1521401     5  0.0000     0.7532 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521403     6  0.3954     0.5847 0.020 0.000 0.052 0.000 0.148 0.780
#> SRR1521402     5  0.0146     0.7521 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521405     4  0.3706     0.6922 0.000 0.000 0.000 0.620 0.000 0.380
#> SRR1521406     1  0.0000     0.8879 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     6  0.0622     0.5666 0.000 0.000 0.000 0.012 0.008 0.980
#> SRR1521408     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521407     6  0.4313     0.5414 0.000 0.000 0.124 0.000 0.148 0.728
#> SRR1521409     6  0.5061     0.2251 0.000 0.004 0.076 0.352 0.000 0.568
#> SRR1521410     1  0.1663     0.8428 0.912 0.000 0.000 0.000 0.000 0.088
#> SRR1521411     1  0.0632     0.8830 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR1521412     6  0.6116    -0.0719 0.312 0.000 0.000 0.000 0.320 0.368
#> SRR1521414     5  0.3652     0.5212 0.016 0.000 0.000 0.000 0.720 0.264
#> SRR1521413     1  0.1141     0.8687 0.948 0.000 0.000 0.000 0.052 0.000
#> SRR1521415     5  0.3221     0.5298 0.000 0.000 0.000 0.000 0.736 0.264
#> SRR1521416     1  0.0000     0.8879 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8879 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.1910     0.8254 0.892 0.000 0.000 0.000 0.108 0.000
#> SRR1521419     1  0.0000     0.8879 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     6  0.5974     0.0378 0.248 0.000 0.000 0.000 0.312 0.440
#> SRR1521421     5  0.5728     0.1635 0.168 0.000 0.000 0.000 0.452 0.380
#> SRR1521422     1  0.0000     0.8879 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     6  0.0363     0.5607 0.000 0.000 0.000 0.012 0.000 0.988
#> SRR1521423     1  0.0000     0.8879 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     6  0.0363     0.5607 0.000 0.000 0.000 0.012 0.000 0.988
#> SRR1521427     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.1610     0.8467 0.916 0.000 0.000 0.000 0.000 0.084
#> SRR1521428     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.6526     0.3180 0.000 0.420 0.044 0.368 0.000 0.168
#> SRR1521437     2  0.0790     0.8499 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR1521431     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000     0.8602 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0790     0.8499 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR1521445     2  0.0000     0.8523 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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 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 1.000           0.975       0.990         0.4965 0.504   0.504
#> 3 3 0.961           0.936       0.975         0.2895 0.800   0.625
#> 4 4 0.980           0.944       0.979         0.1577 0.851   0.612
#> 5 5 0.867           0.869       0.919         0.0663 0.915   0.693
#> 6 6 0.898           0.857       0.908         0.0358 0.931   0.697

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
#> SRR1521352     1  0.0000      0.989 1.000 0.000
#> SRR1521353     1  0.4690      0.884 0.900 0.100
#> SRR1521354     1  0.0000      0.989 1.000 0.000
#> SRR1521355     1  0.0000      0.989 1.000 0.000
#> SRR1521356     1  0.0000      0.989 1.000 0.000
#> SRR1521357     2  0.0000      0.992 0.000 1.000
#> SRR1521358     2  0.0000      0.992 0.000 1.000
#> SRR1521359     1  0.0000      0.989 1.000 0.000
#> SRR1521360     2  0.8955      0.536 0.312 0.688
#> SRR1521361     1  0.1414      0.971 0.980 0.020
#> SRR1521362     1  0.0000      0.989 1.000 0.000
#> SRR1521363     2  0.0000      0.992 0.000 1.000
#> SRR1521364     2  0.0000      0.992 0.000 1.000
#> SRR1521365     2  0.0000      0.992 0.000 1.000
#> SRR1521366     2  0.0000      0.992 0.000 1.000
#> SRR1521368     2  0.0000      0.992 0.000 1.000
#> SRR1521369     2  0.0000      0.992 0.000 1.000
#> SRR1521370     1  0.0376      0.985 0.996 0.004
#> SRR1521371     1  0.0000      0.989 1.000 0.000
#> SRR1521372     1  0.0376      0.985 0.996 0.004
#> SRR1521373     2  0.0000      0.992 0.000 1.000
#> SRR1521374     2  0.0000      0.992 0.000 1.000
#> SRR1521375     2  0.0000      0.992 0.000 1.000
#> SRR1521376     2  0.0000      0.992 0.000 1.000
#> SRR1521377     2  0.0000      0.992 0.000 1.000
#> SRR1521378     2  0.0000      0.992 0.000 1.000
#> SRR1521379     2  0.0000      0.992 0.000 1.000
#> SRR1521380     2  0.0000      0.992 0.000 1.000
#> SRR1521381     1  0.0000      0.989 1.000 0.000
#> SRR1521382     2  0.0000      0.992 0.000 1.000
#> SRR1521383     1  0.0000      0.989 1.000 0.000
#> SRR1521384     2  0.0000      0.992 0.000 1.000
#> SRR1521385     1  0.0000      0.989 1.000 0.000
#> SRR1521387     2  0.0000      0.992 0.000 1.000
#> SRR1521386     2  0.0672      0.984 0.008 0.992
#> SRR1521388     1  0.0000      0.989 1.000 0.000
#> SRR1521389     1  0.0000      0.989 1.000 0.000
#> SRR1521390     1  0.0000      0.989 1.000 0.000
#> SRR1521391     1  0.0000      0.989 1.000 0.000
#> SRR1521392     1  0.0000      0.989 1.000 0.000
#> SRR1521393     1  0.0000      0.989 1.000 0.000
#> SRR1521394     1  0.0000      0.989 1.000 0.000
#> SRR1521395     1  0.0000      0.989 1.000 0.000
#> SRR1521396     1  0.0000      0.989 1.000 0.000
#> SRR1521397     1  0.0000      0.989 1.000 0.000
#> SRR1521398     1  0.0000      0.989 1.000 0.000
#> SRR1521399     1  0.0000      0.989 1.000 0.000
#> SRR1521400     1  0.0000      0.989 1.000 0.000
#> SRR1521401     1  0.0000      0.989 1.000 0.000
#> SRR1521403     1  0.0000      0.989 1.000 0.000
#> SRR1521402     1  0.0000      0.989 1.000 0.000
#> SRR1521405     1  0.0000      0.989 1.000 0.000
#> SRR1521406     1  0.0000      0.989 1.000 0.000
#> SRR1521404     1  0.0000      0.989 1.000 0.000
#> SRR1521408     1  0.1184      0.975 0.984 0.016
#> SRR1521407     1  0.0000      0.989 1.000 0.000
#> SRR1521409     1  0.9866      0.233 0.568 0.432
#> SRR1521410     1  0.0000      0.989 1.000 0.000
#> SRR1521411     1  0.0000      0.989 1.000 0.000
#> SRR1521412     1  0.0000      0.989 1.000 0.000
#> SRR1521414     1  0.0000      0.989 1.000 0.000
#> SRR1521413     1  0.0000      0.989 1.000 0.000
#> SRR1521415     1  0.0000      0.989 1.000 0.000
#> SRR1521416     1  0.0000      0.989 1.000 0.000
#> SRR1521417     1  0.0000      0.989 1.000 0.000
#> SRR1521418     1  0.0000      0.989 1.000 0.000
#> SRR1521419     1  0.0000      0.989 1.000 0.000
#> SRR1521420     1  0.0000      0.989 1.000 0.000
#> SRR1521421     1  0.0000      0.989 1.000 0.000
#> SRR1521422     1  0.0000      0.989 1.000 0.000
#> SRR1521424     1  0.0000      0.989 1.000 0.000
#> SRR1521423     1  0.0000      0.989 1.000 0.000
#> SRR1521426     1  0.0000      0.989 1.000 0.000
#> SRR1521427     2  0.0000      0.992 0.000 1.000
#> SRR1521425     1  0.0000      0.989 1.000 0.000
#> SRR1521428     2  0.0000      0.992 0.000 1.000
#> SRR1521430     2  0.0000      0.992 0.000 1.000
#> SRR1521429     2  0.0000      0.992 0.000 1.000
#> SRR1521432     2  0.0000      0.992 0.000 1.000
#> SRR1521433     2  0.0000      0.992 0.000 1.000
#> SRR1521434     2  0.0000      0.992 0.000 1.000
#> SRR1521435     2  0.0000      0.992 0.000 1.000
#> SRR1521436     2  0.0000      0.992 0.000 1.000
#> SRR1521437     2  0.0000      0.992 0.000 1.000
#> SRR1521431     2  0.0000      0.992 0.000 1.000
#> SRR1521438     2  0.0000      0.992 0.000 1.000
#> SRR1521439     2  0.0000      0.992 0.000 1.000
#> SRR1521440     2  0.0000      0.992 0.000 1.000
#> SRR1521441     2  0.0000      0.992 0.000 1.000
#> SRR1521443     2  0.0000      0.992 0.000 1.000
#> SRR1521442     2  0.0000      0.992 0.000 1.000
#> SRR1521444     2  0.0000      0.992 0.000 1.000
#> SRR1521445     2  0.0000      0.992 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
#> SRR1521352     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521353     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521359     1  0.4062      0.789 0.836 0.000 0.164
#> SRR1521360     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521361     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521362     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521363     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521364     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521365     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521366     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521368     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521369     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521370     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521372     1  0.5327      0.608 0.728 0.000 0.272
#> SRR1521373     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521376     2  0.0892      0.979 0.000 0.980 0.020
#> SRR1521377     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521378     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521379     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521380     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521381     3  0.6126      0.323 0.400 0.000 0.600
#> SRR1521382     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521383     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521386     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521388     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521391     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521392     3  0.6215      0.244 0.428 0.000 0.572
#> SRR1521393     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521394     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521395     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521396     1  0.0424      0.964 0.992 0.000 0.008
#> SRR1521397     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521399     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521400     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521401     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521403     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521402     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521405     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521404     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521408     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521407     1  0.5560      0.561 0.700 0.000 0.300
#> SRR1521409     1  0.6225      0.259 0.568 0.432 0.000
#> SRR1521410     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.971 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521430     3  0.3551      0.812 0.000 0.132 0.868
#> SRR1521429     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521432     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521433     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521434     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521435     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521436     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521431     3  0.0000      0.941 0.000 0.000 1.000
#> SRR1521438     3  0.3879      0.788 0.000 0.152 0.848
#> SRR1521439     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.999 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
#> SRR1521352     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521353     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521354     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521355     1  0.0817     0.9507 0.976 0.000 0.000 0.024
#> SRR1521356     1  0.2408     0.8674 0.896 0.000 0.000 0.104
#> SRR1521357     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.1211     0.9328 0.000 0.000 0.040 0.960
#> SRR1521360     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521361     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521362     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521363     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521364     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521371     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521372     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521373     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521376     2  0.4998     0.0347 0.000 0.512 0.488 0.000
#> SRR1521377     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521380     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521381     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521382     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521384     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521387     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521388     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521389     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521390     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521391     1  0.4985     0.1254 0.532 0.000 0.468 0.000
#> SRR1521392     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521393     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521394     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521395     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521396     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521397     1  0.0336     0.9647 0.992 0.000 0.000 0.008
#> SRR1521398     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521400     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521401     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521403     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521402     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521405     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521406     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521404     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521407     3  0.0376     0.9827 0.004 0.000 0.992 0.004
#> SRR1521409     2  0.2408     0.8648 0.000 0.896 0.000 0.104
#> SRR1521410     1  0.3444     0.7612 0.816 0.000 0.000 0.184
#> SRR1521411     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521414     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521416     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521420     4  0.4585     0.4880 0.332 0.000 0.000 0.668
#> SRR1521421     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521422     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521424     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521423     1  0.0000     0.9711 1.000 0.000 0.000 0.000
#> SRR1521426     4  0.0000     0.9680 0.000 0.000 0.000 1.000
#> SRR1521427     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.0188     0.9650 0.004 0.000 0.000 0.996
#> SRR1521428     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.1302     0.9441 0.000 0.044 0.956 0.000
#> SRR1521429     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9895 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.2868     0.8322 0.000 0.136 0.864 0.000
#> SRR1521439     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9739 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9739 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0000     0.8386 0.000 0.000 0.000 1.000 0.000
#> SRR1521353     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0162     0.9161 0.000 0.000 0.996 0.000 0.004
#> SRR1521355     1  0.0771     0.8875 0.976 0.000 0.000 0.004 0.020
#> SRR1521356     1  0.1205     0.8768 0.956 0.000 0.000 0.004 0.040
#> SRR1521357     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.0324     0.8365 0.004 0.000 0.000 0.992 0.004
#> SRR1521360     3  0.2798     0.7920 0.000 0.000 0.852 0.140 0.008
#> SRR1521361     3  0.3264     0.7585 0.000 0.000 0.820 0.164 0.016
#> SRR1521362     4  0.2813     0.8240 0.000 0.000 0.000 0.832 0.168
#> SRR1521363     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521371     1  0.1908     0.8319 0.908 0.000 0.000 0.000 0.092
#> SRR1521372     1  0.2852     0.7394 0.828 0.000 0.000 0.000 0.172
#> SRR1521373     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.4307     0.0691 0.000 0.496 0.504 0.000 0.000
#> SRR1521377     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.2377     0.8416 0.000 0.872 0.000 0.128 0.000
#> SRR1521380     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     4  0.6804     0.0677 0.000 0.000 0.332 0.368 0.300
#> SRR1521382     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.2561     0.8288 0.000 0.000 0.000 0.856 0.144
#> SRR1521384     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.0324     0.8365 0.004 0.000 0.000 0.992 0.004
#> SRR1521387     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.2813     0.8240 0.000 0.000 0.000 0.832 0.168
#> SRR1521389     4  0.2813     0.8240 0.000 0.000 0.000 0.832 0.168
#> SRR1521390     4  0.2813     0.8240 0.000 0.000 0.000 0.832 0.168
#> SRR1521391     5  0.3731     0.8856 0.112 0.000 0.072 0.000 0.816
#> SRR1521392     5  0.2966     0.9745 0.184 0.000 0.000 0.000 0.816
#> SRR1521393     5  0.2966     0.9745 0.184 0.000 0.000 0.000 0.816
#> SRR1521394     5  0.2966     0.9745 0.184 0.000 0.000 0.000 0.816
#> SRR1521395     5  0.2966     0.9745 0.184 0.000 0.000 0.000 0.816
#> SRR1521396     5  0.2966     0.9745 0.184 0.000 0.000 0.000 0.816
#> SRR1521397     1  0.0162     0.8944 0.996 0.000 0.000 0.000 0.004
#> SRR1521398     1  0.3671     0.6291 0.756 0.000 0.000 0.008 0.236
#> SRR1521399     5  0.3074     0.9632 0.196 0.000 0.000 0.000 0.804
#> SRR1521400     5  0.2813     0.9645 0.168 0.000 0.000 0.000 0.832
#> SRR1521401     5  0.2891     0.9709 0.176 0.000 0.000 0.000 0.824
#> SRR1521403     1  0.3242     0.6463 0.784 0.000 0.000 0.000 0.216
#> SRR1521402     5  0.3366     0.9248 0.232 0.000 0.000 0.000 0.768
#> SRR1521405     4  0.2813     0.8240 0.000 0.000 0.000 0.832 0.168
#> SRR1521406     1  0.0162     0.8934 0.996 0.000 0.000 0.000 0.004
#> SRR1521404     4  0.0000     0.8386 0.000 0.000 0.000 1.000 0.000
#> SRR1521408     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     3  0.5291     0.1310 0.000 0.000 0.496 0.456 0.048
#> SRR1521409     4  0.3671     0.6154 0.000 0.236 0.000 0.756 0.008
#> SRR1521410     1  0.2304     0.8301 0.892 0.000 0.000 0.100 0.008
#> SRR1521411     1  0.2351     0.8356 0.896 0.000 0.000 0.088 0.016
#> SRR1521412     1  0.5126     0.6770 0.696 0.000 0.000 0.152 0.152
#> SRR1521414     1  0.0609     0.8892 0.980 0.000 0.000 0.000 0.020
#> SRR1521413     1  0.0000     0.8948 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.0609     0.8892 0.980 0.000 0.000 0.000 0.020
#> SRR1521416     1  0.0000     0.8948 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8948 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.8948 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.8948 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     4  0.4132     0.5261 0.260 0.000 0.000 0.720 0.020
#> SRR1521421     1  0.3574     0.7549 0.804 0.000 0.000 0.168 0.028
#> SRR1521422     1  0.0162     0.8944 0.996 0.000 0.000 0.000 0.004
#> SRR1521424     4  0.0162     0.8374 0.000 0.000 0.000 0.996 0.004
#> SRR1521423     1  0.0000     0.8948 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.0000     0.8386 0.000 0.000 0.000 1.000 0.000
#> SRR1521427     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.3642     0.7056 0.760 0.000 0.000 0.232 0.008
#> SRR1521428     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0703     0.9002 0.000 0.024 0.976 0.000 0.000
#> SRR1521429     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9185 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.2852     0.7448 0.000 0.172 0.828 0.000 0.000
#> SRR1521439     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9939 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9939 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.3531      0.679 0.000 0.000 0.000 0.328 0.000 0.672
#> SRR1521353     3  0.0363      0.942 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521354     3  0.0458      0.941 0.000 0.000 0.984 0.000 0.000 0.016
#> SRR1521355     1  0.0405      0.894 0.988 0.000 0.000 0.008 0.004 0.000
#> SRR1521356     1  0.0405      0.894 0.988 0.000 0.000 0.004 0.008 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.3738      0.684 0.004 0.000 0.004 0.312 0.000 0.680
#> SRR1521360     6  0.3607      0.483 0.000 0.000 0.348 0.000 0.000 0.652
#> SRR1521361     6  0.2823      0.608 0.000 0.000 0.204 0.000 0.000 0.796
#> SRR1521362     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0260      0.944 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0260      0.944 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521370     3  0.0260      0.944 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521371     1  0.1765      0.849 0.904 0.000 0.000 0.000 0.096 0.000
#> SRR1521372     1  0.4309      0.694 0.660 0.000 0.000 0.000 0.044 0.296
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.4461      0.145 0.000 0.464 0.512 0.000 0.004 0.020
#> SRR1521377     3  0.0260      0.944 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521378     3  0.0260      0.944 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521379     6  0.3847      0.239 0.000 0.456 0.000 0.000 0.000 0.544
#> SRR1521380     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.5402      0.659 0.000 0.000 0.088 0.104 0.124 0.684
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     4  0.0363      0.987 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.3515      0.679 0.000 0.000 0.000 0.324 0.000 0.676
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.0260      0.944 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521388     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000      0.995 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0146      0.995 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1521391     5  0.0458      0.887 0.000 0.000 0.016 0.000 0.984 0.000
#> SRR1521392     5  0.0146      0.898 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521393     5  0.0146      0.898 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521394     5  0.0146      0.898 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521395     5  0.0146      0.898 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521396     5  0.0146      0.898 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521397     1  0.0665      0.891 0.980 0.000 0.000 0.004 0.008 0.008
#> SRR1521398     6  0.5973      0.207 0.360 0.000 0.000 0.000 0.228 0.412
#> SRR1521399     5  0.4272      0.708 0.044 0.000 0.000 0.000 0.668 0.288
#> SRR1521400     5  0.1349      0.881 0.004 0.000 0.000 0.000 0.940 0.056
#> SRR1521401     5  0.2572      0.837 0.012 0.000 0.000 0.000 0.852 0.136
#> SRR1521403     1  0.3481      0.654 0.756 0.000 0.004 0.012 0.228 0.000
#> SRR1521402     5  0.5003      0.649 0.104 0.000 0.000 0.000 0.608 0.288
#> SRR1521405     4  0.0146      0.995 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1521406     1  0.1714      0.870 0.908 0.000 0.000 0.000 0.000 0.092
#> SRR1521404     6  0.3547      0.673 0.000 0.000 0.000 0.332 0.000 0.668
#> SRR1521408     3  0.0260      0.944 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521407     6  0.3210      0.678 0.000 0.000 0.088 0.072 0.004 0.836
#> SRR1521409     6  0.5361      0.644 0.000 0.120 0.000 0.160 0.048 0.672
#> SRR1521410     1  0.2871      0.818 0.804 0.000 0.000 0.000 0.004 0.192
#> SRR1521411     1  0.3383      0.763 0.728 0.000 0.000 0.000 0.004 0.268
#> SRR1521412     6  0.2709      0.626 0.132 0.000 0.000 0.000 0.020 0.848
#> SRR1521414     1  0.3445      0.768 0.732 0.000 0.000 0.000 0.008 0.260
#> SRR1521413     1  0.0713      0.890 0.972 0.000 0.000 0.000 0.000 0.028
#> SRR1521415     1  0.3240      0.785 0.752 0.000 0.000 0.000 0.004 0.244
#> SRR1521416     1  0.0146      0.896 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521417     1  0.0146      0.896 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521418     1  0.0146      0.896 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521419     1  0.0146      0.896 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521420     6  0.3529      0.695 0.040 0.000 0.000 0.152 0.008 0.800
#> SRR1521421     6  0.1082      0.616 0.040 0.000 0.000 0.000 0.004 0.956
#> SRR1521422     1  0.0260      0.895 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR1521424     6  0.3515      0.679 0.000 0.000 0.000 0.324 0.000 0.676
#> SRR1521423     1  0.0146      0.896 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521426     6  0.3515      0.679 0.000 0.000 0.000 0.324 0.000 0.676
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.3529      0.698 0.028 0.000 0.000 0.208 0.000 0.764
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.1148      0.927 0.000 0.016 0.960 0.000 0.004 0.020
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0547      0.939 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR1521433     3  0.0692      0.937 0.000 0.000 0.976 0.000 0.004 0.020
#> SRR1521434     3  0.0692      0.937 0.000 0.000 0.976 0.000 0.004 0.020
#> SRR1521435     3  0.0692      0.937 0.000 0.000 0.976 0.000 0.004 0.020
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0547      0.939 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR1521438     3  0.2971      0.775 0.000 0.144 0.832 0.000 0.004 0.020
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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 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.376           0.728       0.843         0.4339 0.583   0.583
#> 3 3 0.468           0.325       0.771         0.2891 0.908   0.847
#> 4 4 0.593           0.727       0.759         0.2128 0.704   0.467
#> 5 5 0.798           0.787       0.877         0.1060 0.918   0.729
#> 6 6 0.870           0.891       0.914         0.0611 0.946   0.775

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
#> SRR1521352     1  0.8327      0.723 0.736 0.264
#> SRR1521353     1  0.9608      0.624 0.616 0.384
#> SRR1521354     1  0.9608      0.624 0.616 0.384
#> SRR1521355     1  0.0376      0.753 0.996 0.004
#> SRR1521356     1  0.0376      0.753 0.996 0.004
#> SRR1521357     2  0.0000      0.942 0.000 1.000
#> SRR1521358     2  0.0000      0.942 0.000 1.000
#> SRR1521359     1  0.8207      0.726 0.744 0.256
#> SRR1521360     1  0.8207      0.726 0.744 0.256
#> SRR1521361     1  0.8207      0.726 0.744 0.256
#> SRR1521362     1  0.9970      0.496 0.532 0.468
#> SRR1521363     2  0.0938      0.929 0.012 0.988
#> SRR1521364     1  0.9983      0.477 0.524 0.476
#> SRR1521365     2  0.0000      0.942 0.000 1.000
#> SRR1521366     1  0.9983      0.477 0.524 0.476
#> SRR1521368     2  0.0000      0.942 0.000 1.000
#> SRR1521369     1  0.9795      0.584 0.584 0.416
#> SRR1521370     1  0.9608      0.624 0.616 0.384
#> SRR1521371     1  0.0000      0.752 1.000 0.000
#> SRR1521372     1  0.0000      0.752 1.000 0.000
#> SRR1521373     2  0.0000      0.942 0.000 1.000
#> SRR1521374     2  0.0000      0.942 0.000 1.000
#> SRR1521375     2  0.0000      0.942 0.000 1.000
#> SRR1521376     2  0.5519      0.764 0.128 0.872
#> SRR1521377     1  0.9795      0.584 0.584 0.416
#> SRR1521378     1  0.9608      0.624 0.616 0.384
#> SRR1521379     2  0.5519      0.764 0.128 0.872
#> SRR1521380     1  0.9983      0.477 0.524 0.476
#> SRR1521381     1  0.8207      0.726 0.744 0.256
#> SRR1521382     2  0.0000      0.942 0.000 1.000
#> SRR1521383     1  0.8267      0.724 0.740 0.260
#> SRR1521384     2  0.0000      0.942 0.000 1.000
#> SRR1521385     1  0.8327      0.723 0.736 0.264
#> SRR1521387     2  0.0000      0.942 0.000 1.000
#> SRR1521386     1  0.9608      0.624 0.616 0.384
#> SRR1521388     1  0.9970      0.496 0.532 0.468
#> SRR1521389     1  0.9970      0.496 0.532 0.468
#> SRR1521390     1  0.9970      0.496 0.532 0.468
#> SRR1521391     1  0.0000      0.752 1.000 0.000
#> SRR1521392     1  0.0000      0.752 1.000 0.000
#> SRR1521393     1  0.0000      0.752 1.000 0.000
#> SRR1521394     1  0.0000      0.752 1.000 0.000
#> SRR1521395     1  0.0000      0.752 1.000 0.000
#> SRR1521396     1  0.0000      0.752 1.000 0.000
#> SRR1521397     1  0.0376      0.753 0.996 0.004
#> SRR1521398     1  0.0000      0.752 1.000 0.000
#> SRR1521399     1  0.0000      0.752 1.000 0.000
#> SRR1521400     1  0.0000      0.752 1.000 0.000
#> SRR1521401     1  0.0000      0.752 1.000 0.000
#> SRR1521403     1  0.8016      0.729 0.756 0.244
#> SRR1521402     1  0.0000      0.752 1.000 0.000
#> SRR1521405     1  0.9970      0.496 0.532 0.468
#> SRR1521406     1  0.0376      0.753 0.996 0.004
#> SRR1521404     1  0.8327      0.723 0.736 0.264
#> SRR1521408     1  0.9608      0.624 0.616 0.384
#> SRR1521407     1  0.8207      0.726 0.744 0.256
#> SRR1521409     2  0.9998     -0.320 0.492 0.508
#> SRR1521410     1  0.5946      0.746 0.856 0.144
#> SRR1521411     1  0.0376      0.751 0.996 0.004
#> SRR1521412     1  0.0376      0.751 0.996 0.004
#> SRR1521414     1  0.0000      0.752 1.000 0.000
#> SRR1521413     1  0.0376      0.753 0.996 0.004
#> SRR1521415     1  0.0000      0.752 1.000 0.000
#> SRR1521416     1  0.0376      0.753 0.996 0.004
#> SRR1521417     1  0.0376      0.753 0.996 0.004
#> SRR1521418     1  0.0376      0.753 0.996 0.004
#> SRR1521419     1  0.0376      0.753 0.996 0.004
#> SRR1521420     1  0.8207      0.726 0.744 0.256
#> SRR1521421     1  0.6343      0.744 0.840 0.160
#> SRR1521422     1  0.0376      0.753 0.996 0.004
#> SRR1521424     1  0.8327      0.723 0.736 0.264
#> SRR1521423     1  0.0376      0.753 0.996 0.004
#> SRR1521426     1  0.8327      0.723 0.736 0.264
#> SRR1521427     2  0.0000      0.942 0.000 1.000
#> SRR1521425     1  0.5946      0.746 0.856 0.144
#> SRR1521428     2  0.0000      0.942 0.000 1.000
#> SRR1521430     1  0.9983      0.477 0.524 0.476
#> SRR1521429     2  0.0000      0.942 0.000 1.000
#> SRR1521432     1  0.9795      0.584 0.584 0.416
#> SRR1521433     1  0.9983      0.477 0.524 0.476
#> SRR1521434     1  0.9983      0.477 0.524 0.476
#> SRR1521435     1  0.9983      0.477 0.524 0.476
#> SRR1521436     2  0.0000      0.942 0.000 1.000
#> SRR1521437     2  0.0000      0.942 0.000 1.000
#> SRR1521431     1  0.9795      0.584 0.584 0.416
#> SRR1521438     2  0.9087      0.223 0.324 0.676
#> SRR1521439     2  0.0000      0.942 0.000 1.000
#> SRR1521440     2  0.0000      0.942 0.000 1.000
#> SRR1521441     2  0.0000      0.942 0.000 1.000
#> SRR1521443     2  0.0000      0.942 0.000 1.000
#> SRR1521442     2  0.0000      0.942 0.000 1.000
#> SRR1521444     2  0.0000      0.942 0.000 1.000
#> SRR1521445     2  0.0000      0.942 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
#> SRR1521352     1  0.5733     -0.237 0.676 0.000 0.324
#> SRR1521353     1  0.8894     -0.365 0.548 0.152 0.300
#> SRR1521354     1  0.8894     -0.365 0.548 0.152 0.300
#> SRR1521355     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521356     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521357     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521359     1  0.5706     -0.219 0.680 0.000 0.320
#> SRR1521360     1  0.5760     -0.243 0.672 0.000 0.328
#> SRR1521361     1  0.5760     -0.243 0.672 0.000 0.328
#> SRR1521362     3  0.6286      1.000 0.464 0.000 0.536
#> SRR1521363     2  0.0661      0.959 0.004 0.988 0.008
#> SRR1521364     1  0.9680     -0.296 0.456 0.244 0.300
#> SRR1521365     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521366     1  0.9680     -0.296 0.456 0.244 0.300
#> SRR1521368     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521369     1  0.9231     -0.340 0.516 0.184 0.300
#> SRR1521370     1  0.8894     -0.365 0.548 0.152 0.300
#> SRR1521371     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521372     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521373     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521376     2  0.3755      0.808 0.120 0.872 0.008
#> SRR1521377     1  0.9231     -0.340 0.516 0.184 0.300
#> SRR1521378     1  0.8894     -0.365 0.548 0.152 0.300
#> SRR1521379     2  0.3755      0.808 0.120 0.872 0.008
#> SRR1521380     1  0.9680     -0.296 0.456 0.244 0.300
#> SRR1521381     1  0.5760     -0.243 0.672 0.000 0.328
#> SRR1521382     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521383     1  0.5706     -0.226 0.680 0.000 0.320
#> SRR1521384     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521385     1  0.5733     -0.237 0.676 0.000 0.324
#> SRR1521387     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521386     1  0.8894     -0.365 0.548 0.152 0.300
#> SRR1521388     3  0.6286      1.000 0.464 0.000 0.536
#> SRR1521389     3  0.6286      1.000 0.464 0.000 0.536
#> SRR1521390     3  0.6286      1.000 0.464 0.000 0.536
#> SRR1521391     1  0.6286      0.140 0.536 0.000 0.464
#> SRR1521392     1  0.6286      0.140 0.536 0.000 0.464
#> SRR1521393     1  0.6286      0.140 0.536 0.000 0.464
#> SRR1521394     1  0.6286      0.140 0.536 0.000 0.464
#> SRR1521395     1  0.6286      0.140 0.536 0.000 0.464
#> SRR1521396     1  0.6286      0.140 0.536 0.000 0.464
#> SRR1521397     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521398     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521399     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521400     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521401     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521403     1  0.5591     -0.188 0.696 0.000 0.304
#> SRR1521402     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521405     3  0.6286      1.000 0.464 0.000 0.536
#> SRR1521406     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521404     1  0.5733     -0.237 0.676 0.000 0.324
#> SRR1521408     1  0.8894     -0.365 0.548 0.152 0.300
#> SRR1521407     1  0.5706     -0.219 0.680 0.000 0.320
#> SRR1521409     1  0.9806     -0.294 0.420 0.252 0.328
#> SRR1521410     1  0.3941      0.187 0.844 0.000 0.156
#> SRR1521411     1  0.0237      0.388 0.996 0.000 0.004
#> SRR1521412     1  0.0237      0.388 0.996 0.000 0.004
#> SRR1521414     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521413     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521415     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521416     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521417     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521418     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521419     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521420     1  0.5706     -0.219 0.680 0.000 0.320
#> SRR1521421     1  0.4178      0.145 0.828 0.000 0.172
#> SRR1521422     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521424     1  0.5733     -0.237 0.676 0.000 0.324
#> SRR1521423     1  0.0237      0.390 0.996 0.000 0.004
#> SRR1521426     1  0.5733     -0.237 0.676 0.000 0.324
#> SRR1521427     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521425     1  0.3941      0.187 0.844 0.000 0.156
#> SRR1521428     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521430     1  0.9680     -0.296 0.456 0.244 0.300
#> SRR1521429     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521432     1  0.9231     -0.340 0.516 0.184 0.300
#> SRR1521433     1  0.9680     -0.296 0.456 0.244 0.300
#> SRR1521434     1  0.9680     -0.296 0.456 0.244 0.300
#> SRR1521435     1  0.9680     -0.296 0.456 0.244 0.300
#> SRR1521436     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521431     1  0.9231     -0.340 0.516 0.184 0.300
#> SRR1521438     2  0.6852      0.322 0.300 0.664 0.036
#> SRR1521439     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.969 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.969 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
#> SRR1521352     3  0.4981      0.341 0.464 0.000 0.536 0.000
#> SRR1521353     3  0.6230      0.608 0.256 0.004 0.652 0.088
#> SRR1521354     3  0.6230      0.608 0.256 0.004 0.652 0.088
#> SRR1521355     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521359     3  0.5273      0.343 0.456 0.000 0.536 0.008
#> SRR1521360     3  0.5085      0.471 0.376 0.000 0.616 0.008
#> SRR1521361     3  0.5085      0.471 0.376 0.000 0.616 0.008
#> SRR1521362     3  0.6279      0.421 0.180 0.000 0.664 0.156
#> SRR1521363     2  0.0592      0.956 0.000 0.984 0.016 0.000
#> SRR1521364     3  0.7563      0.615 0.204 0.088 0.620 0.088
#> SRR1521365     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.7563      0.615 0.204 0.088 0.620 0.088
#> SRR1521368     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.6661      0.617 0.224 0.028 0.660 0.088
#> SRR1521370     3  0.6230      0.608 0.256 0.004 0.652 0.088
#> SRR1521371     1  0.0524      0.870 0.988 0.000 0.004 0.008
#> SRR1521372     1  0.2271      0.826 0.916 0.000 0.076 0.008
#> SRR1521373     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521376     2  0.2944      0.834 0.004 0.868 0.128 0.000
#> SRR1521377     3  0.6661      0.617 0.224 0.028 0.660 0.088
#> SRR1521378     3  0.6230      0.608 0.256 0.004 0.652 0.088
#> SRR1521379     2  0.2944      0.834 0.004 0.868 0.128 0.000
#> SRR1521380     3  0.7563      0.615 0.204 0.088 0.620 0.088
#> SRR1521381     3  0.5099      0.467 0.380 0.000 0.612 0.008
#> SRR1521382     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521383     1  0.4998     -0.300 0.512 0.000 0.488 0.000
#> SRR1521384     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521385     3  0.4981      0.341 0.464 0.000 0.536 0.000
#> SRR1521387     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.6230      0.608 0.256 0.004 0.652 0.088
#> SRR1521388     3  0.6279      0.421 0.180 0.000 0.664 0.156
#> SRR1521389     3  0.6279      0.421 0.180 0.000 0.664 0.156
#> SRR1521390     3  0.6279      0.421 0.180 0.000 0.664 0.156
#> SRR1521391     4  0.4008      1.000 0.244 0.000 0.000 0.756
#> SRR1521392     4  0.4008      1.000 0.244 0.000 0.000 0.756
#> SRR1521393     4  0.4008      1.000 0.244 0.000 0.000 0.756
#> SRR1521394     4  0.4008      1.000 0.244 0.000 0.000 0.756
#> SRR1521395     4  0.4008      1.000 0.244 0.000 0.000 0.756
#> SRR1521396     4  0.4008      1.000 0.244 0.000 0.000 0.756
#> SRR1521397     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0524      0.870 0.988 0.000 0.004 0.008
#> SRR1521399     1  0.2271      0.826 0.916 0.000 0.076 0.008
#> SRR1521400     1  0.2271      0.826 0.916 0.000 0.076 0.008
#> SRR1521401     1  0.2271      0.826 0.916 0.000 0.076 0.008
#> SRR1521403     3  0.5273      0.364 0.456 0.000 0.536 0.008
#> SRR1521402     1  0.2271      0.826 0.916 0.000 0.076 0.008
#> SRR1521405     3  0.6279      0.421 0.180 0.000 0.664 0.156
#> SRR1521406     1  0.0336      0.871 0.992 0.000 0.008 0.000
#> SRR1521404     3  0.4981      0.341 0.464 0.000 0.536 0.000
#> SRR1521408     3  0.6230      0.608 0.256 0.004 0.652 0.088
#> SRR1521407     3  0.5193      0.420 0.412 0.000 0.580 0.008
#> SRR1521409     3  0.7815      0.417 0.256 0.248 0.488 0.008
#> SRR1521410     1  0.4431      0.388 0.696 0.000 0.304 0.000
#> SRR1521411     1  0.0376      0.870 0.992 0.000 0.004 0.004
#> SRR1521412     1  0.0376      0.870 0.992 0.000 0.004 0.004
#> SRR1521414     1  0.2271      0.826 0.916 0.000 0.076 0.008
#> SRR1521413     1  0.0336      0.871 0.992 0.000 0.008 0.000
#> SRR1521415     1  0.2271      0.826 0.916 0.000 0.076 0.008
#> SRR1521416     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0336      0.871 0.992 0.000 0.008 0.000
#> SRR1521420     3  0.5273      0.343 0.456 0.000 0.536 0.008
#> SRR1521421     1  0.4720      0.317 0.672 0.000 0.324 0.004
#> SRR1521422     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521424     3  0.4981      0.341 0.464 0.000 0.536 0.000
#> SRR1521423     1  0.0000      0.873 1.000 0.000 0.000 0.000
#> SRR1521426     3  0.4981      0.341 0.464 0.000 0.536 0.000
#> SRR1521427     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.4500      0.356 0.684 0.000 0.316 0.000
#> SRR1521428     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.7563      0.615 0.204 0.088 0.620 0.088
#> SRR1521429     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.6661      0.617 0.224 0.028 0.660 0.088
#> SRR1521433     3  0.7563      0.615 0.204 0.088 0.620 0.088
#> SRR1521434     3  0.7563      0.615 0.204 0.088 0.620 0.088
#> SRR1521435     3  0.7563      0.615 0.204 0.088 0.620 0.088
#> SRR1521436     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.6661      0.617 0.224 0.028 0.660 0.088
#> SRR1521438     2  0.5815      0.488 0.060 0.652 0.288 0.000
#> SRR1521439     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.970 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.970 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.6336      0.646 0.368 0.000 0.164 0.468 0.000
#> SRR1521353     3  0.0955      0.936 0.028 0.000 0.968 0.004 0.000
#> SRR1521354     3  0.0955      0.936 0.028 0.000 0.968 0.004 0.000
#> SRR1521355     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521356     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521357     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.6515      0.632 0.376 0.000 0.168 0.452 0.004
#> SRR1521360     4  0.6936      0.591 0.332 0.000 0.296 0.368 0.004
#> SRR1521361     4  0.6936      0.591 0.332 0.000 0.296 0.368 0.004
#> SRR1521362     4  0.1197      0.453 0.048 0.000 0.000 0.952 0.000
#> SRR1521363     2  0.1043      0.932 0.000 0.960 0.040 0.000 0.000
#> SRR1521364     3  0.1410      0.934 0.000 0.060 0.940 0.000 0.000
#> SRR1521365     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.1410      0.934 0.000 0.060 0.940 0.000 0.000
#> SRR1521368     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0955      0.936 0.028 0.000 0.968 0.004 0.000
#> SRR1521371     1  0.0566      0.835 0.984 0.000 0.000 0.012 0.004
#> SRR1521372     1  0.2536      0.789 0.900 0.000 0.052 0.044 0.004
#> SRR1521373     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     2  0.2690      0.808 0.000 0.844 0.156 0.000 0.000
#> SRR1521377     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0955      0.936 0.028 0.000 0.968 0.004 0.000
#> SRR1521379     2  0.2690      0.808 0.000 0.844 0.156 0.000 0.000
#> SRR1521380     3  0.1410      0.934 0.000 0.060 0.940 0.000 0.000
#> SRR1521381     4  0.6924      0.597 0.332 0.000 0.288 0.376 0.004
#> SRR1521382     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     1  0.6334     -0.539 0.452 0.000 0.160 0.388 0.000
#> SRR1521384     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.6347      0.642 0.376 0.000 0.164 0.460 0.000
#> SRR1521387     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0955      0.936 0.028 0.000 0.968 0.004 0.000
#> SRR1521388     4  0.1197      0.453 0.048 0.000 0.000 0.952 0.000
#> SRR1521389     4  0.1197      0.453 0.048 0.000 0.000 0.952 0.000
#> SRR1521390     4  0.1197      0.453 0.048 0.000 0.000 0.952 0.000
#> SRR1521391     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521392     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521393     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521394     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521395     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521396     5  0.0000      1.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521397     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521398     1  0.0566      0.835 0.984 0.000 0.000 0.012 0.004
#> SRR1521399     1  0.2536      0.789 0.900 0.000 0.052 0.044 0.004
#> SRR1521400     1  0.2464      0.792 0.904 0.000 0.048 0.044 0.004
#> SRR1521401     1  0.2464      0.792 0.904 0.000 0.048 0.044 0.004
#> SRR1521403     1  0.6811     -0.560 0.416 0.000 0.240 0.340 0.004
#> SRR1521402     1  0.2227      0.800 0.916 0.000 0.032 0.048 0.004
#> SRR1521405     4  0.1197      0.453 0.048 0.000 0.000 0.952 0.000
#> SRR1521406     1  0.0162      0.836 0.996 0.000 0.000 0.004 0.000
#> SRR1521404     4  0.6336      0.646 0.368 0.000 0.164 0.468 0.000
#> SRR1521408     3  0.0955      0.936 0.028 0.000 0.968 0.004 0.000
#> SRR1521407     4  0.6867      0.580 0.372 0.000 0.252 0.372 0.004
#> SRR1521409     4  0.8692      0.472 0.236 0.224 0.232 0.304 0.004
#> SRR1521410     1  0.3966      0.196 0.664 0.000 0.000 0.336 0.000
#> SRR1521411     1  0.0451      0.835 0.988 0.000 0.000 0.008 0.004
#> SRR1521412     1  0.0451      0.835 0.988 0.000 0.000 0.008 0.004
#> SRR1521414     1  0.2227      0.800 0.916 0.000 0.032 0.048 0.004
#> SRR1521413     1  0.0290      0.833 0.992 0.000 0.000 0.008 0.000
#> SRR1521415     1  0.2227      0.800 0.916 0.000 0.032 0.048 0.004
#> SRR1521416     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521417     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521418     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521419     1  0.0290      0.833 0.992 0.000 0.000 0.008 0.000
#> SRR1521420     4  0.6515      0.632 0.376 0.000 0.168 0.452 0.004
#> SRR1521421     1  0.4774      0.103 0.632 0.000 0.024 0.340 0.004
#> SRR1521422     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521424     4  0.6347      0.642 0.376 0.000 0.164 0.460 0.000
#> SRR1521423     1  0.0162      0.837 0.996 0.000 0.000 0.004 0.000
#> SRR1521426     4  0.6347      0.642 0.376 0.000 0.164 0.460 0.000
#> SRR1521427     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.4060      0.130 0.640 0.000 0.000 0.360 0.000
#> SRR1521428     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.1410      0.934 0.000 0.060 0.940 0.000 0.000
#> SRR1521429     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.1410      0.934 0.000 0.060 0.940 0.000 0.000
#> SRR1521434     3  0.1410      0.934 0.000 0.060 0.940 0.000 0.000
#> SRR1521435     3  0.1410      0.934 0.000 0.060 0.940 0.000 0.000
#> SRR1521436     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.943 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     2  0.4101      0.421 0.000 0.628 0.372 0.000 0.000
#> SRR1521439     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.967 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.967 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.1151      0.817 0.012 0.000 0.000 0.032 0.000 0.956
#> SRR1521353     3  0.1003      0.944 0.000 0.000 0.964 0.016 0.000 0.020
#> SRR1521354     3  0.1003      0.944 0.000 0.000 0.964 0.016 0.000 0.020
#> SRR1521355     1  0.2092      0.905 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521356     1  0.2092      0.905 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521357     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.0622      0.821 0.008 0.000 0.000 0.012 0.000 0.980
#> SRR1521360     6  0.2723      0.753 0.004 0.000 0.128 0.016 0.000 0.852
#> SRR1521361     6  0.2723      0.753 0.004 0.000 0.128 0.016 0.000 0.852
#> SRR1521362     4  0.1812      1.000 0.008 0.000 0.000 0.912 0.000 0.080
#> SRR1521363     2  0.1265      0.922 0.000 0.948 0.044 0.008 0.000 0.000
#> SRR1521364     3  0.1285      0.939 0.000 0.052 0.944 0.004 0.000 0.000
#> SRR1521365     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.1285      0.939 0.000 0.052 0.944 0.004 0.000 0.000
#> SRR1521368     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0146      0.950 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521370     3  0.1003      0.944 0.000 0.000 0.964 0.016 0.000 0.020
#> SRR1521371     1  0.2558      0.893 0.840 0.000 0.000 0.004 0.000 0.156
#> SRR1521372     1  0.2800      0.798 0.876 0.000 0.020 0.076 0.004 0.024
#> SRR1521373     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     2  0.2595      0.798 0.000 0.836 0.160 0.004 0.000 0.000
#> SRR1521377     3  0.0146      0.950 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521378     3  0.1003      0.944 0.000 0.000 0.964 0.016 0.000 0.020
#> SRR1521379     2  0.2595      0.798 0.000 0.836 0.160 0.004 0.000 0.000
#> SRR1521380     3  0.1285      0.939 0.000 0.052 0.944 0.004 0.000 0.000
#> SRR1521381     6  0.2636      0.759 0.004 0.000 0.120 0.016 0.000 0.860
#> SRR1521382     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     6  0.1918      0.792 0.088 0.000 0.000 0.008 0.000 0.904
#> SRR1521384     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.1088      0.819 0.016 0.000 0.000 0.024 0.000 0.960
#> SRR1521387     2  0.0146      0.962 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1521386     3  0.1003      0.944 0.000 0.000 0.964 0.016 0.000 0.020
#> SRR1521388     4  0.1812      1.000 0.008 0.000 0.000 0.912 0.000 0.080
#> SRR1521389     4  0.1812      1.000 0.008 0.000 0.000 0.912 0.000 0.080
#> SRR1521390     4  0.1812      1.000 0.008 0.000 0.000 0.912 0.000 0.080
#> SRR1521391     5  0.0146      1.000 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521392     5  0.0146      1.000 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521393     5  0.0146      1.000 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521394     5  0.0146      1.000 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521395     5  0.0146      1.000 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521396     5  0.0146      1.000 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521397     1  0.2135      0.904 0.872 0.000 0.000 0.000 0.000 0.128
#> SRR1521398     1  0.2558      0.893 0.840 0.000 0.000 0.004 0.000 0.156
#> SRR1521399     1  0.2800      0.798 0.876 0.000 0.020 0.076 0.004 0.024
#> SRR1521400     1  0.3460      0.814 0.828 0.000 0.016 0.072 0.000 0.084
#> SRR1521401     1  0.3460      0.814 0.828 0.000 0.016 0.072 0.000 0.084
#> SRR1521403     6  0.3243      0.776 0.064 0.000 0.076 0.016 0.000 0.844
#> SRR1521402     1  0.1951      0.829 0.916 0.000 0.000 0.060 0.004 0.020
#> SRR1521405     4  0.1812      1.000 0.008 0.000 0.000 0.912 0.000 0.080
#> SRR1521406     1  0.2053      0.901 0.888 0.000 0.000 0.004 0.000 0.108
#> SRR1521404     6  0.1151      0.817 0.012 0.000 0.000 0.032 0.000 0.956
#> SRR1521408     3  0.1003      0.944 0.000 0.000 0.964 0.016 0.000 0.020
#> SRR1521407     6  0.2203      0.789 0.004 0.000 0.084 0.016 0.000 0.896
#> SRR1521409     6  0.4473      0.544 0.000 0.212 0.072 0.008 0.000 0.708
#> SRR1521410     6  0.3766      0.530 0.304 0.000 0.000 0.012 0.000 0.684
#> SRR1521411     1  0.2941      0.823 0.780 0.000 0.000 0.000 0.000 0.220
#> SRR1521412     1  0.2941      0.823 0.780 0.000 0.000 0.000 0.000 0.220
#> SRR1521414     1  0.1951      0.829 0.916 0.000 0.000 0.060 0.004 0.020
#> SRR1521413     1  0.2092      0.904 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521415     1  0.1951      0.829 0.916 0.000 0.000 0.060 0.004 0.020
#> SRR1521416     1  0.2092      0.905 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521417     1  0.2092      0.905 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521418     1  0.2092      0.905 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521419     1  0.2092      0.904 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521420     6  0.0622      0.821 0.008 0.000 0.000 0.012 0.000 0.980
#> SRR1521421     6  0.3405      0.587 0.272 0.000 0.000 0.004 0.000 0.724
#> SRR1521422     1  0.2092      0.905 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521424     6  0.1088      0.819 0.016 0.000 0.000 0.024 0.000 0.960
#> SRR1521423     1  0.2092      0.905 0.876 0.000 0.000 0.000 0.000 0.124
#> SRR1521426     6  0.1088      0.819 0.016 0.000 0.000 0.024 0.000 0.960
#> SRR1521427     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.3650      0.565 0.280 0.000 0.000 0.012 0.000 0.708
#> SRR1521428     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.1285      0.939 0.000 0.052 0.944 0.004 0.000 0.000
#> SRR1521429     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0146      0.950 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521433     3  0.1285      0.939 0.000 0.052 0.944 0.004 0.000 0.000
#> SRR1521434     3  0.1285      0.939 0.000 0.052 0.944 0.004 0.000 0.000
#> SRR1521435     3  0.1285      0.939 0.000 0.052 0.944 0.004 0.000 0.000
#> SRR1521436     2  0.0146      0.962 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0146      0.950 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521438     2  0.3830      0.407 0.000 0.620 0.376 0.004 0.000 0.000
#> SRR1521439     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.965 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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.968       0.980         0.4743 0.520   0.520
#> 3 3 0.596           0.672       0.806         0.3157 0.844   0.708
#> 4 4 0.716           0.769       0.851         0.1342 0.879   0.708
#> 5 5 0.771           0.805       0.863         0.0802 0.912   0.723
#> 6 6 0.746           0.729       0.786         0.0493 0.956   0.819

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
#> SRR1521352     1  0.0000     0.9853 1.000 0.000
#> SRR1521353     1  0.0000     0.9853 1.000 0.000
#> SRR1521354     1  0.0000     0.9853 1.000 0.000
#> SRR1521355     1  0.0000     0.9853 1.000 0.000
#> SRR1521356     1  0.0000     0.9853 1.000 0.000
#> SRR1521357     2  0.1414     0.9887 0.020 0.980
#> SRR1521358     2  0.1414     0.9887 0.020 0.980
#> SRR1521359     1  0.0000     0.9853 1.000 0.000
#> SRR1521360     1  0.0000     0.9853 1.000 0.000
#> SRR1521361     1  0.0000     0.9853 1.000 0.000
#> SRR1521362     1  0.0376     0.9828 0.996 0.004
#> SRR1521363     2  0.1414     0.9887 0.020 0.980
#> SRR1521364     2  0.1414     0.9887 0.020 0.980
#> SRR1521365     2  0.1414     0.9887 0.020 0.980
#> SRR1521366     2  0.1414     0.9887 0.020 0.980
#> SRR1521368     2  0.1414     0.9887 0.020 0.980
#> SRR1521369     1  0.9977     0.0553 0.528 0.472
#> SRR1521370     1  0.0000     0.9853 1.000 0.000
#> SRR1521371     1  0.0000     0.9853 1.000 0.000
#> SRR1521372     1  0.0000     0.9853 1.000 0.000
#> SRR1521373     2  0.1414     0.9887 0.020 0.980
#> SRR1521374     2  0.1414     0.9887 0.020 0.980
#> SRR1521375     2  0.1414     0.9887 0.020 0.980
#> SRR1521376     2  0.1414     0.9887 0.020 0.980
#> SRR1521377     2  0.1414     0.9887 0.020 0.980
#> SRR1521378     1  0.6623     0.7800 0.828 0.172
#> SRR1521379     2  0.1414     0.9887 0.020 0.980
#> SRR1521380     2  0.1414     0.9887 0.020 0.980
#> SRR1521381     1  0.0000     0.9853 1.000 0.000
#> SRR1521382     2  0.1414     0.9887 0.020 0.980
#> SRR1521383     1  0.0000     0.9853 1.000 0.000
#> SRR1521384     2  0.1414     0.9887 0.020 0.980
#> SRR1521385     1  0.0000     0.9853 1.000 0.000
#> SRR1521387     2  0.1414     0.9887 0.020 0.980
#> SRR1521386     1  0.1843     0.9592 0.972 0.028
#> SRR1521388     1  0.0376     0.9828 0.996 0.004
#> SRR1521389     1  0.0376     0.9828 0.996 0.004
#> SRR1521390     1  0.0376     0.9828 0.996 0.004
#> SRR1521391     1  0.1184     0.9733 0.984 0.016
#> SRR1521392     1  0.1184     0.9733 0.984 0.016
#> SRR1521393     1  0.1184     0.9733 0.984 0.016
#> SRR1521394     1  0.1184     0.9733 0.984 0.016
#> SRR1521395     1  0.1184     0.9733 0.984 0.016
#> SRR1521396     1  0.1184     0.9733 0.984 0.016
#> SRR1521397     1  0.0000     0.9853 1.000 0.000
#> SRR1521398     1  0.0000     0.9853 1.000 0.000
#> SRR1521399     1  0.0000     0.9853 1.000 0.000
#> SRR1521400     1  0.0000     0.9853 1.000 0.000
#> SRR1521401     1  0.0000     0.9853 1.000 0.000
#> SRR1521403     1  0.0000     0.9853 1.000 0.000
#> SRR1521402     1  0.0000     0.9853 1.000 0.000
#> SRR1521405     1  0.0376     0.9828 0.996 0.004
#> SRR1521406     1  0.0000     0.9853 1.000 0.000
#> SRR1521404     1  0.0000     0.9853 1.000 0.000
#> SRR1521408     1  0.0000     0.9853 1.000 0.000
#> SRR1521407     1  0.0000     0.9853 1.000 0.000
#> SRR1521409     1  0.0000     0.9853 1.000 0.000
#> SRR1521410     1  0.0000     0.9853 1.000 0.000
#> SRR1521411     1  0.0000     0.9853 1.000 0.000
#> SRR1521412     1  0.0000     0.9853 1.000 0.000
#> SRR1521414     1  0.0000     0.9853 1.000 0.000
#> SRR1521413     1  0.0000     0.9853 1.000 0.000
#> SRR1521415     1  0.0000     0.9853 1.000 0.000
#> SRR1521416     1  0.0000     0.9853 1.000 0.000
#> SRR1521417     1  0.0000     0.9853 1.000 0.000
#> SRR1521418     1  0.0000     0.9853 1.000 0.000
#> SRR1521419     1  0.0000     0.9853 1.000 0.000
#> SRR1521420     1  0.0000     0.9853 1.000 0.000
#> SRR1521421     1  0.0000     0.9853 1.000 0.000
#> SRR1521422     1  0.0000     0.9853 1.000 0.000
#> SRR1521424     1  0.0000     0.9853 1.000 0.000
#> SRR1521423     1  0.0000     0.9853 1.000 0.000
#> SRR1521426     1  0.0000     0.9853 1.000 0.000
#> SRR1521427     2  0.1414     0.9887 0.020 0.980
#> SRR1521425     1  0.0000     0.9853 1.000 0.000
#> SRR1521428     2  0.1414     0.9887 0.020 0.980
#> SRR1521430     2  0.1414     0.9887 0.020 0.980
#> SRR1521429     2  0.1414     0.9887 0.020 0.980
#> SRR1521432     2  0.7376     0.7636 0.208 0.792
#> SRR1521433     2  0.1414     0.9887 0.020 0.980
#> SRR1521434     2  0.1414     0.9887 0.020 0.980
#> SRR1521435     2  0.1414     0.9887 0.020 0.980
#> SRR1521436     2  0.1414     0.9887 0.020 0.980
#> SRR1521437     2  0.1414     0.9887 0.020 0.980
#> SRR1521431     2  0.7376     0.7636 0.208 0.792
#> SRR1521438     2  0.1414     0.9887 0.020 0.980
#> SRR1521439     2  0.1414     0.9887 0.020 0.980
#> SRR1521440     2  0.1414     0.9887 0.020 0.980
#> SRR1521441     2  0.1414     0.9887 0.020 0.980
#> SRR1521443     2  0.1414     0.9887 0.020 0.980
#> SRR1521442     2  0.1414     0.9887 0.020 0.980
#> SRR1521444     2  0.1414     0.9887 0.020 0.980
#> SRR1521445     2  0.1414     0.9887 0.020 0.980

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>            class entropy silhouette    p1    p2    p3
#> SRR1521352     1  0.3619     0.7641 0.864 0.000 0.136
#> SRR1521353     3  0.5896     0.6531 0.292 0.008 0.700
#> SRR1521354     3  0.5896     0.6531 0.292 0.008 0.700
#> SRR1521355     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521356     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521357     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521358     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521359     1  0.2959     0.7802 0.900 0.000 0.100
#> SRR1521360     3  0.5896     0.6531 0.292 0.008 0.700
#> SRR1521361     3  0.6308     0.0151 0.492 0.000 0.508
#> SRR1521362     1  0.4235     0.7376 0.824 0.000 0.176
#> SRR1521363     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521364     3  0.6215     0.2312 0.000 0.428 0.572
#> SRR1521365     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521366     3  0.5926     0.4149 0.000 0.356 0.644
#> SRR1521368     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521369     3  0.7213     0.6852 0.212 0.088 0.700
#> SRR1521370     3  0.5896     0.6531 0.292 0.008 0.700
#> SRR1521371     1  0.0237     0.8045 0.996 0.000 0.004
#> SRR1521372     1  0.5859     0.4475 0.656 0.000 0.344
#> SRR1521373     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521374     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521375     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521376     2  0.6215     0.2786 0.000 0.572 0.428
#> SRR1521377     3  0.6095     0.3390 0.000 0.392 0.608
#> SRR1521378     3  0.6487     0.6716 0.268 0.032 0.700
#> SRR1521379     2  0.5621     0.5116 0.000 0.692 0.308
#> SRR1521380     3  0.6111     0.3292 0.000 0.396 0.604
#> SRR1521381     1  0.5529     0.5669 0.704 0.000 0.296
#> SRR1521382     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521383     1  0.3267     0.7733 0.884 0.000 0.116
#> SRR1521384     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521385     1  0.3619     0.7641 0.864 0.000 0.136
#> SRR1521387     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521386     3  0.6322     0.6670 0.276 0.024 0.700
#> SRR1521388     1  0.4235     0.7376 0.824 0.000 0.176
#> SRR1521389     1  0.4235     0.7376 0.824 0.000 0.176
#> SRR1521390     1  0.4235     0.7376 0.824 0.000 0.176
#> SRR1521391     1  0.6309     0.2542 0.504 0.000 0.496
#> SRR1521392     1  0.6309     0.2542 0.504 0.000 0.496
#> SRR1521393     1  0.6309     0.2542 0.504 0.000 0.496
#> SRR1521394     1  0.6309     0.2542 0.504 0.000 0.496
#> SRR1521395     1  0.6309     0.2542 0.504 0.000 0.496
#> SRR1521396     1  0.6309     0.2542 0.504 0.000 0.496
#> SRR1521397     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521398     1  0.0237     0.8045 0.996 0.000 0.004
#> SRR1521399     1  0.5216     0.5964 0.740 0.000 0.260
#> SRR1521400     1  0.5591     0.5236 0.696 0.000 0.304
#> SRR1521401     1  0.5216     0.5964 0.740 0.000 0.260
#> SRR1521403     1  0.2625     0.7739 0.916 0.000 0.084
#> SRR1521402     1  0.5216     0.5964 0.740 0.000 0.260
#> SRR1521405     1  0.4235     0.7376 0.824 0.000 0.176
#> SRR1521406     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521404     1  0.3412     0.7701 0.876 0.000 0.124
#> SRR1521408     3  0.5896     0.6531 0.292 0.008 0.700
#> SRR1521407     1  0.5465     0.5835 0.712 0.000 0.288
#> SRR1521409     1  0.6062     0.5087 0.616 0.000 0.384
#> SRR1521410     1  0.2261     0.7877 0.932 0.000 0.068
#> SRR1521411     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521412     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521414     1  0.2448     0.7725 0.924 0.000 0.076
#> SRR1521413     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521415     1  0.2448     0.7725 0.924 0.000 0.076
#> SRR1521416     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521418     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521419     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521420     1  0.1964     0.7926 0.944 0.000 0.056
#> SRR1521421     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521422     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521424     1  0.3619     0.7641 0.864 0.000 0.136
#> SRR1521423     1  0.0000     0.8055 1.000 0.000 0.000
#> SRR1521426     1  0.3267     0.7733 0.884 0.000 0.116
#> SRR1521427     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521425     1  0.2796     0.7783 0.908 0.000 0.092
#> SRR1521428     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521430     2  0.6215     0.2786 0.000 0.572 0.428
#> SRR1521429     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521432     3  0.7529     0.5034 0.060 0.316 0.624
#> SRR1521433     2  0.6215     0.2786 0.000 0.572 0.428
#> SRR1521434     2  0.6215     0.2786 0.000 0.572 0.428
#> SRR1521435     2  0.6215     0.2786 0.000 0.572 0.428
#> SRR1521436     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521437     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521431     3  0.7529     0.5034 0.060 0.316 0.624
#> SRR1521438     2  0.6215     0.2786 0.000 0.572 0.428
#> SRR1521439     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521440     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521441     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521443     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521442     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521444     2  0.0000     0.8752 0.000 1.000 0.000
#> SRR1521445     2  0.0000     0.8752 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
#> SRR1521352     1  0.5659      0.577 0.600 0.000 0.032 0.368
#> SRR1521353     3  0.1867      0.891 0.072 0.000 0.928 0.000
#> SRR1521354     3  0.1867      0.891 0.072 0.000 0.928 0.000
#> SRR1521355     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521356     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521357     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521359     1  0.5582      0.586 0.620 0.000 0.032 0.348
#> SRR1521360     3  0.1978      0.890 0.068 0.000 0.928 0.004
#> SRR1521361     3  0.4212      0.649 0.216 0.000 0.772 0.012
#> SRR1521362     1  0.6252      0.504 0.512 0.000 0.056 0.432
#> SRR1521363     2  0.1389      0.971 0.000 0.952 0.000 0.048
#> SRR1521364     3  0.2737      0.909 0.000 0.104 0.888 0.008
#> SRR1521365     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.2737      0.909 0.000 0.104 0.888 0.008
#> SRR1521368     2  0.0707      0.984 0.000 0.980 0.000 0.020
#> SRR1521369     3  0.1978      0.894 0.068 0.004 0.928 0.000
#> SRR1521370     3  0.1867      0.891 0.072 0.000 0.928 0.000
#> SRR1521371     1  0.2973      0.422 0.856 0.000 0.000 0.144
#> SRR1521372     1  0.5077      0.234 0.760 0.000 0.080 0.160
#> SRR1521373     2  0.1389      0.971 0.000 0.952 0.000 0.048
#> SRR1521374     2  0.0707      0.984 0.000 0.980 0.000 0.020
#> SRR1521375     2  0.1389      0.971 0.000 0.952 0.000 0.048
#> SRR1521376     3  0.2859      0.907 0.000 0.112 0.880 0.008
#> SRR1521377     3  0.2675      0.910 0.000 0.100 0.892 0.008
#> SRR1521378     3  0.1978      0.894 0.068 0.004 0.928 0.000
#> SRR1521379     3  0.4959      0.790 0.000 0.196 0.752 0.052
#> SRR1521380     3  0.2737      0.909 0.000 0.104 0.888 0.008
#> SRR1521381     1  0.4153      0.621 0.820 0.000 0.048 0.132
#> SRR1521382     2  0.1389      0.971 0.000 0.952 0.000 0.048
#> SRR1521383     1  0.5452      0.584 0.616 0.000 0.024 0.360
#> SRR1521384     2  0.0188      0.989 0.000 0.996 0.000 0.004
#> SRR1521385     1  0.5659      0.577 0.600 0.000 0.032 0.368
#> SRR1521387     2  0.0707      0.984 0.000 0.980 0.000 0.020
#> SRR1521386     3  0.1867      0.891 0.072 0.000 0.928 0.000
#> SRR1521388     1  0.6252      0.504 0.512 0.000 0.056 0.432
#> SRR1521389     1  0.6252      0.504 0.512 0.000 0.056 0.432
#> SRR1521390     1  0.6252      0.504 0.512 0.000 0.056 0.432
#> SRR1521391     4  0.6507      1.000 0.404 0.000 0.076 0.520
#> SRR1521392     4  0.6507      1.000 0.404 0.000 0.076 0.520
#> SRR1521393     4  0.6507      1.000 0.404 0.000 0.076 0.520
#> SRR1521394     4  0.6507      1.000 0.404 0.000 0.076 0.520
#> SRR1521395     4  0.6507      1.000 0.404 0.000 0.076 0.520
#> SRR1521396     4  0.6507      1.000 0.404 0.000 0.076 0.520
#> SRR1521397     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521398     1  0.0336      0.639 0.992 0.000 0.000 0.008
#> SRR1521399     1  0.3591      0.351 0.824 0.000 0.008 0.168
#> SRR1521400     1  0.3925      0.326 0.808 0.000 0.016 0.176
#> SRR1521401     1  0.3636      0.340 0.820 0.000 0.008 0.172
#> SRR1521403     1  0.1724      0.637 0.948 0.000 0.020 0.032
#> SRR1521402     1  0.3498      0.373 0.832 0.000 0.008 0.160
#> SRR1521405     1  0.6252      0.504 0.512 0.000 0.056 0.432
#> SRR1521406     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521404     1  0.5573      0.579 0.604 0.000 0.028 0.368
#> SRR1521408     3  0.1867      0.891 0.072 0.000 0.928 0.000
#> SRR1521407     1  0.4956      0.614 0.756 0.000 0.056 0.188
#> SRR1521409     1  0.5936      0.560 0.576 0.000 0.044 0.380
#> SRR1521410     1  0.3649      0.629 0.796 0.000 0.000 0.204
#> SRR1521411     1  0.0188      0.643 0.996 0.000 0.000 0.004
#> SRR1521412     1  0.0000      0.642 1.000 0.000 0.000 0.000
#> SRR1521414     1  0.2921      0.431 0.860 0.000 0.000 0.140
#> SRR1521413     1  0.0524      0.643 0.988 0.000 0.004 0.008
#> SRR1521415     1  0.2921      0.431 0.860 0.000 0.000 0.140
#> SRR1521416     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521417     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521418     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521419     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521420     1  0.4500      0.606 0.684 0.000 0.000 0.316
#> SRR1521421     1  0.0592      0.644 0.984 0.000 0.000 0.016
#> SRR1521422     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521424     1  0.5659      0.577 0.600 0.000 0.032 0.368
#> SRR1521423     1  0.0376      0.643 0.992 0.000 0.004 0.004
#> SRR1521426     1  0.5482      0.580 0.608 0.000 0.024 0.368
#> SRR1521427     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.4585      0.600 0.668 0.000 0.000 0.332
#> SRR1521428     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.2859      0.907 0.000 0.112 0.880 0.008
#> SRR1521429     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.2399      0.908 0.032 0.048 0.920 0.000
#> SRR1521433     3  0.2859      0.907 0.000 0.112 0.880 0.008
#> SRR1521434     3  0.2859      0.907 0.000 0.112 0.880 0.008
#> SRR1521435     3  0.2859      0.907 0.000 0.112 0.880 0.008
#> SRR1521436     2  0.0921      0.981 0.000 0.972 0.000 0.028
#> SRR1521437     2  0.0188      0.989 0.000 0.996 0.000 0.004
#> SRR1521431     3  0.2399      0.908 0.032 0.048 0.920 0.000
#> SRR1521438     3  0.2859      0.907 0.000 0.112 0.880 0.008
#> SRR1521439     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.990 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.990 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.4003     0.8074 0.288 0.000 0.000 0.704 0.008
#> SRR1521353     3  0.2100     0.9224 0.012 0.000 0.924 0.016 0.048
#> SRR1521354     3  0.2100     0.9224 0.012 0.000 0.924 0.016 0.048
#> SRR1521355     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521356     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521357     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521358     2  0.0898     0.9472 0.000 0.972 0.000 0.008 0.020
#> SRR1521359     4  0.4639     0.6871 0.368 0.000 0.000 0.612 0.020
#> SRR1521360     3  0.2086     0.9231 0.008 0.000 0.924 0.020 0.048
#> SRR1521361     3  0.6595     0.4603 0.216 0.000 0.604 0.116 0.064
#> SRR1521362     4  0.4848     0.7806 0.176 0.000 0.012 0.736 0.076
#> SRR1521363     2  0.3846     0.8641 0.000 0.800 0.000 0.144 0.056
#> SRR1521364     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521365     2  0.0609     0.9478 0.000 0.980 0.000 0.000 0.020
#> SRR1521366     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521368     2  0.2592     0.9235 0.000 0.892 0.000 0.056 0.052
#> SRR1521369     3  0.1525     0.9305 0.012 0.000 0.948 0.004 0.036
#> SRR1521370     3  0.2100     0.9224 0.012 0.000 0.924 0.016 0.048
#> SRR1521371     1  0.2074     0.7358 0.896 0.000 0.000 0.000 0.104
#> SRR1521372     1  0.3952     0.6709 0.812 0.000 0.032 0.024 0.132
#> SRR1521373     2  0.3669     0.8766 0.000 0.816 0.000 0.128 0.056
#> SRR1521374     2  0.2446     0.9270 0.000 0.900 0.000 0.056 0.044
#> SRR1521375     2  0.3669     0.8766 0.000 0.816 0.000 0.128 0.056
#> SRR1521376     3  0.1673     0.9139 0.000 0.016 0.944 0.032 0.008
#> SRR1521377     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521378     3  0.1525     0.9305 0.012 0.000 0.948 0.004 0.036
#> SRR1521379     3  0.5783     0.6267 0.000 0.124 0.692 0.136 0.048
#> SRR1521380     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521381     1  0.5113    -0.0655 0.576 0.000 0.000 0.380 0.044
#> SRR1521382     2  0.3669     0.8766 0.000 0.816 0.000 0.128 0.056
#> SRR1521383     4  0.4088     0.7947 0.304 0.000 0.000 0.688 0.008
#> SRR1521384     2  0.1041     0.9461 0.000 0.964 0.000 0.004 0.032
#> SRR1521385     4  0.4025     0.8060 0.292 0.000 0.000 0.700 0.008
#> SRR1521387     2  0.2520     0.9254 0.000 0.896 0.000 0.056 0.048
#> SRR1521386     3  0.1525     0.9305 0.012 0.000 0.948 0.004 0.036
#> SRR1521388     4  0.4952     0.7778 0.188 0.000 0.012 0.724 0.076
#> SRR1521389     4  0.4952     0.7778 0.188 0.000 0.012 0.724 0.076
#> SRR1521390     4  0.4952     0.7778 0.188 0.000 0.012 0.724 0.076
#> SRR1521391     5  0.3832     0.9802 0.172 0.000 0.016 0.016 0.796
#> SRR1521392     5  0.3943     0.9960 0.184 0.000 0.016 0.016 0.784
#> SRR1521393     5  0.3943     0.9960 0.184 0.000 0.016 0.016 0.784
#> SRR1521394     5  0.3943     0.9960 0.184 0.000 0.016 0.016 0.784
#> SRR1521395     5  0.3943     0.9960 0.184 0.000 0.016 0.016 0.784
#> SRR1521396     5  0.3943     0.9960 0.184 0.000 0.016 0.016 0.784
#> SRR1521397     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521398     1  0.1493     0.7651 0.948 0.000 0.000 0.024 0.028
#> SRR1521399     1  0.2733     0.7162 0.872 0.000 0.004 0.012 0.112
#> SRR1521400     1  0.2886     0.7136 0.864 0.000 0.004 0.016 0.116
#> SRR1521401     1  0.2835     0.7151 0.868 0.000 0.004 0.016 0.112
#> SRR1521403     1  0.2448     0.7305 0.892 0.000 0.000 0.088 0.020
#> SRR1521402     1  0.2733     0.7162 0.872 0.000 0.004 0.012 0.112
#> SRR1521405     4  0.4952     0.7778 0.188 0.000 0.012 0.724 0.076
#> SRR1521406     1  0.2470     0.7532 0.884 0.000 0.000 0.104 0.012
#> SRR1521404     4  0.3980     0.8092 0.284 0.000 0.000 0.708 0.008
#> SRR1521408     3  0.2100     0.9224 0.012 0.000 0.924 0.016 0.048
#> SRR1521407     1  0.5523    -0.0531 0.564 0.000 0.004 0.368 0.064
#> SRR1521409     4  0.4915     0.6018 0.236 0.000 0.004 0.696 0.064
#> SRR1521410     1  0.3353     0.6512 0.796 0.000 0.000 0.196 0.008
#> SRR1521411     1  0.0992     0.7641 0.968 0.000 0.000 0.024 0.008
#> SRR1521412     1  0.1195     0.7638 0.960 0.000 0.000 0.028 0.012
#> SRR1521414     1  0.2361     0.7285 0.892 0.000 0.000 0.012 0.096
#> SRR1521413     1  0.1082     0.7674 0.964 0.000 0.000 0.028 0.008
#> SRR1521415     1  0.2361     0.7285 0.892 0.000 0.000 0.012 0.096
#> SRR1521416     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521417     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521418     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521419     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521420     1  0.4481    -0.1762 0.576 0.000 0.000 0.416 0.008
#> SRR1521421     1  0.2408     0.7108 0.892 0.000 0.000 0.092 0.016
#> SRR1521422     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521424     4  0.4025     0.8060 0.292 0.000 0.000 0.700 0.008
#> SRR1521423     1  0.2624     0.7492 0.872 0.000 0.000 0.116 0.012
#> SRR1521426     4  0.4025     0.8054 0.292 0.000 0.000 0.700 0.008
#> SRR1521427     2  0.0000     0.9501 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.4549    -0.3304 0.528 0.000 0.000 0.464 0.008
#> SRR1521428     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521430     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521429     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521432     3  0.1248     0.9354 0.008 0.008 0.964 0.004 0.016
#> SRR1521433     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521434     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521435     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521436     2  0.3186     0.9149 0.000 0.872 0.020 0.056 0.052
#> SRR1521437     2  0.1168     0.9452 0.000 0.960 0.000 0.008 0.032
#> SRR1521431     3  0.1248     0.9354 0.008 0.008 0.964 0.004 0.016
#> SRR1521438     3  0.0510     0.9365 0.000 0.016 0.984 0.000 0.000
#> SRR1521439     2  0.0000     0.9501 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521441     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521443     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521442     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521444     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004
#> SRR1521445     2  0.0162     0.9503 0.000 0.996 0.000 0.000 0.004

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>            class entropy silhouette    p1    p2    p3    p4    p5    p6
#> SRR1521352     4  0.1444      0.636 0.072 0.000 0.000 0.928 0.000 0.000
#> SRR1521353     3  0.4069      0.847 0.008 0.000 0.776 0.008 0.064 0.144
#> SRR1521354     3  0.4069      0.847 0.008 0.000 0.776 0.008 0.064 0.144
#> SRR1521355     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521356     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521357     2  0.0000      0.913 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.1065      0.909 0.000 0.964 0.000 0.008 0.020 0.008
#> SRR1521359     4  0.5070      0.483 0.300 0.000 0.000 0.620 0.024 0.056
#> SRR1521360     3  0.4052      0.842 0.008 0.000 0.772 0.004 0.068 0.148
#> SRR1521361     4  0.8291      0.285 0.276 0.000 0.192 0.332 0.064 0.136
#> SRR1521362     4  0.4518      0.474 0.036 0.000 0.000 0.612 0.004 0.348
#> SRR1521363     2  0.4628      0.755 0.000 0.668 0.000 0.012 0.052 0.268
#> SRR1521364     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0717      0.910 0.000 0.976 0.000 0.008 0.016 0.000
#> SRR1521366     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.3567      0.856 0.000 0.804 0.000 0.008 0.052 0.136
#> SRR1521369     3  0.2839      0.878 0.000 0.000 0.860 0.004 0.044 0.092
#> SRR1521370     3  0.4069      0.847 0.008 0.000 0.776 0.008 0.064 0.144
#> SRR1521371     1  0.4242      0.692 0.776 0.000 0.000 0.064 0.044 0.116
#> SRR1521372     1  0.4197      0.532 0.800 0.000 0.012 0.060 0.068 0.060
#> SRR1521373     2  0.4122      0.789 0.000 0.704 0.000 0.000 0.048 0.248
#> SRR1521374     2  0.3465      0.860 0.000 0.812 0.000 0.008 0.048 0.132
#> SRR1521375     2  0.4122      0.789 0.000 0.704 0.000 0.000 0.048 0.248
#> SRR1521376     3  0.1850      0.853 0.000 0.000 0.924 0.008 0.016 0.052
#> SRR1521377     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.3272      0.868 0.000 0.000 0.824 0.004 0.048 0.124
#> SRR1521379     3  0.6429      0.373 0.000 0.128 0.544 0.008 0.060 0.260
#> SRR1521380     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     4  0.5762      0.368 0.372 0.000 0.000 0.512 0.036 0.080
#> SRR1521382     2  0.4122      0.789 0.000 0.704 0.000 0.000 0.048 0.248
#> SRR1521383     4  0.1610      0.632 0.084 0.000 0.000 0.916 0.000 0.000
#> SRR1521384     2  0.1599      0.905 0.000 0.940 0.000 0.008 0.028 0.024
#> SRR1521385     4  0.1501      0.635 0.076 0.000 0.000 0.924 0.000 0.000
#> SRR1521387     2  0.3527      0.859 0.000 0.808 0.000 0.008 0.052 0.132
#> SRR1521386     3  0.3272      0.868 0.000 0.000 0.824 0.004 0.048 0.124
#> SRR1521388     4  0.5053      0.451 0.064 0.000 0.000 0.564 0.008 0.364
#> SRR1521389     4  0.5053      0.451 0.064 0.000 0.000 0.564 0.008 0.364
#> SRR1521390     4  0.4961      0.451 0.064 0.000 0.000 0.564 0.004 0.368
#> SRR1521391     5  0.2531      0.979 0.132 0.000 0.000 0.012 0.856 0.000
#> SRR1521392     5  0.2653      0.996 0.144 0.000 0.000 0.012 0.844 0.000
#> SRR1521393     5  0.2653      0.996 0.144 0.000 0.000 0.012 0.844 0.000
#> SRR1521394     5  0.2653      0.996 0.144 0.000 0.000 0.012 0.844 0.000
#> SRR1521395     5  0.2653      0.996 0.144 0.000 0.000 0.012 0.844 0.000
#> SRR1521396     5  0.2653      0.996 0.144 0.000 0.000 0.012 0.844 0.000
#> SRR1521397     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521398     1  0.4463      0.692 0.752 0.000 0.000 0.104 0.028 0.116
#> SRR1521399     1  0.2777      0.618 0.880 0.000 0.000 0.044 0.044 0.032
#> SRR1521400     1  0.3306      0.592 0.848 0.000 0.000 0.056 0.044 0.052
#> SRR1521401     1  0.2906      0.612 0.872 0.000 0.000 0.052 0.044 0.032
#> SRR1521403     1  0.4459      0.309 0.640 0.000 0.000 0.320 0.008 0.032
#> SRR1521402     1  0.2777      0.618 0.880 0.000 0.000 0.044 0.044 0.032
#> SRR1521405     4  0.4961      0.451 0.064 0.000 0.000 0.564 0.004 0.368
#> SRR1521406     1  0.4991      0.691 0.680 0.000 0.000 0.120 0.016 0.184
#> SRR1521404     4  0.1501      0.634 0.076 0.000 0.000 0.924 0.000 0.000
#> SRR1521408     3  0.4069      0.847 0.008 0.000 0.776 0.008 0.064 0.144
#> SRR1521407     4  0.6298      0.336 0.368 0.000 0.004 0.468 0.040 0.120
#> SRR1521409     4  0.6289      0.445 0.220 0.000 0.004 0.516 0.024 0.236
#> SRR1521410     1  0.4175      0.109 0.524 0.000 0.000 0.464 0.000 0.012
#> SRR1521411     1  0.2491      0.631 0.836 0.000 0.000 0.164 0.000 0.000
#> SRR1521412     1  0.2743      0.625 0.828 0.000 0.000 0.164 0.000 0.008
#> SRR1521414     1  0.2777      0.618 0.880 0.000 0.000 0.044 0.044 0.032
#> SRR1521413     1  0.4421      0.694 0.732 0.000 0.000 0.104 0.008 0.156
#> SRR1521415     1  0.2777      0.618 0.880 0.000 0.000 0.044 0.044 0.032
#> SRR1521416     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521417     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521418     1  0.5249      0.687 0.648 0.000 0.000 0.136 0.016 0.200
#> SRR1521419     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521420     4  0.3789      0.314 0.416 0.000 0.000 0.584 0.000 0.000
#> SRR1521421     1  0.4121      0.199 0.604 0.000 0.000 0.380 0.000 0.016
#> SRR1521422     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521424     4  0.1501      0.635 0.076 0.000 0.000 0.924 0.000 0.000
#> SRR1521423     1  0.5284      0.686 0.644 0.000 0.000 0.140 0.016 0.200
#> SRR1521426     4  0.1444      0.636 0.072 0.000 0.000 0.928 0.000 0.000
#> SRR1521427     2  0.0000      0.913 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     4  0.3659      0.401 0.364 0.000 0.000 0.636 0.000 0.000
#> SRR1521428     2  0.0000      0.913 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0146      0.913 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1521432     3  0.1826      0.890 0.000 0.000 0.924 0.004 0.020 0.052
#> SRR1521433     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.4920      0.810 0.000 0.732 0.072 0.008 0.052 0.136
#> SRR1521437     2  0.1599      0.905 0.000 0.940 0.000 0.008 0.028 0.024
#> SRR1521431     3  0.1826      0.890 0.000 0.000 0.924 0.004 0.020 0.052
#> SRR1521438     3  0.0000      0.894 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000      0.913 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0146      0.913 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1521441     2  0.0146      0.913 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1521443     2  0.0146      0.913 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1521442     2  0.0146      0.913 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR1521444     2  0.0000      0.913 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0146      0.913 0.000 0.996 0.000 0.004 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-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

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 17064 rows and 93 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 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 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 0.955           0.943       0.977         0.4990 0.502   0.502
#> 3 3 1.000           0.979       0.991         0.2548 0.830   0.674
#> 4 4 0.859           0.905       0.950         0.1908 0.872   0.662
#> 5 5 0.968           0.894       0.949         0.0638 0.891   0.619
#> 6 6 0.901           0.800       0.871         0.0290 0.962   0.822

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 5

There is also optional best \(k\) = 2 3 5 that is worth to check.

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> SRR1521352     1   0.000      0.974 1.000 0.000
#> SRR1521353     2   0.973      0.313 0.404 0.596
#> SRR1521354     1   0.866      0.594 0.712 0.288
#> SRR1521355     1   0.000      0.974 1.000 0.000
#> SRR1521356     1   0.000      0.974 1.000 0.000
#> SRR1521357     2   0.000      0.977 0.000 1.000
#> SRR1521358     2   0.000      0.977 0.000 1.000
#> SRR1521359     1   0.000      0.974 1.000 0.000
#> SRR1521360     2   0.000      0.977 0.000 1.000
#> SRR1521361     1   0.000      0.974 1.000 0.000
#> SRR1521362     1   0.000      0.974 1.000 0.000
#> SRR1521363     2   0.000      0.977 0.000 1.000
#> SRR1521364     2   0.000      0.977 0.000 1.000
#> SRR1521365     2   0.000      0.977 0.000 1.000
#> SRR1521366     2   0.000      0.977 0.000 1.000
#> SRR1521368     2   0.000      0.977 0.000 1.000
#> SRR1521369     2   0.000      0.977 0.000 1.000
#> SRR1521370     1   0.866      0.594 0.712 0.288
#> SRR1521371     1   0.000      0.974 1.000 0.000
#> SRR1521372     1   0.000      0.974 1.000 0.000
#> SRR1521373     2   0.000      0.977 0.000 1.000
#> SRR1521374     2   0.000      0.977 0.000 1.000
#> SRR1521375     2   0.000      0.977 0.000 1.000
#> SRR1521376     2   0.000      0.977 0.000 1.000
#> SRR1521377     2   0.000      0.977 0.000 1.000
#> SRR1521378     2   0.788      0.685 0.236 0.764
#> SRR1521379     2   0.000      0.977 0.000 1.000
#> SRR1521380     2   0.000      0.977 0.000 1.000
#> SRR1521381     1   0.000      0.974 1.000 0.000
#> SRR1521382     2   0.000      0.977 0.000 1.000
#> SRR1521383     1   0.000      0.974 1.000 0.000
#> SRR1521384     2   0.000      0.977 0.000 1.000
#> SRR1521385     1   0.000      0.974 1.000 0.000
#> SRR1521387     2   0.000      0.977 0.000 1.000
#> SRR1521386     2   0.788      0.685 0.236 0.764
#> SRR1521388     1   0.000      0.974 1.000 0.000
#> SRR1521389     1   0.000      0.974 1.000 0.000
#> SRR1521390     1   0.000      0.974 1.000 0.000
#> SRR1521391     1   0.000      0.974 1.000 0.000
#> SRR1521392     1   0.000      0.974 1.000 0.000
#> SRR1521393     1   0.000      0.974 1.000 0.000
#> SRR1521394     1   0.000      0.974 1.000 0.000
#> SRR1521395     1   0.000      0.974 1.000 0.000
#> SRR1521396     1   0.000      0.974 1.000 0.000
#> SRR1521397     1   0.000      0.974 1.000 0.000
#> SRR1521398     1   0.000      0.974 1.000 0.000
#> SRR1521399     1   0.000      0.974 1.000 0.000
#> SRR1521400     1   0.000      0.974 1.000 0.000
#> SRR1521401     1   0.000      0.974 1.000 0.000
#> SRR1521403     1   0.000      0.974 1.000 0.000
#> SRR1521402     1   0.000      0.974 1.000 0.000
#> SRR1521405     1   0.000      0.974 1.000 0.000
#> SRR1521406     1   0.000      0.974 1.000 0.000
#> SRR1521404     1   0.000      0.974 1.000 0.000
#> SRR1521408     1   0.866      0.594 0.712 0.288
#> SRR1521407     1   0.000      0.974 1.000 0.000
#> SRR1521409     1   0.961      0.373 0.616 0.384
#> SRR1521410     1   0.000      0.974 1.000 0.000
#> SRR1521411     1   0.000      0.974 1.000 0.000
#> SRR1521412     1   0.000      0.974 1.000 0.000
#> SRR1521414     1   0.000      0.974 1.000 0.000
#> SRR1521413     1   0.000      0.974 1.000 0.000
#> SRR1521415     1   0.000      0.974 1.000 0.000
#> SRR1521416     1   0.000      0.974 1.000 0.000
#> SRR1521417     1   0.000      0.974 1.000 0.000
#> SRR1521418     1   0.000      0.974 1.000 0.000
#> SRR1521419     1   0.000      0.974 1.000 0.000
#> SRR1521420     1   0.000      0.974 1.000 0.000
#> SRR1521421     1   0.000      0.974 1.000 0.000
#> SRR1521422     1   0.000      0.974 1.000 0.000
#> SRR1521424     1   0.000      0.974 1.000 0.000
#> SRR1521423     1   0.000      0.974 1.000 0.000
#> SRR1521426     1   0.000      0.974 1.000 0.000
#> SRR1521427     2   0.000      0.977 0.000 1.000
#> SRR1521425     1   0.000      0.974 1.000 0.000
#> SRR1521428     2   0.000      0.977 0.000 1.000
#> SRR1521430     2   0.000      0.977 0.000 1.000
#> SRR1521429     2   0.000      0.977 0.000 1.000
#> SRR1521432     2   0.000      0.977 0.000 1.000
#> SRR1521433     2   0.000      0.977 0.000 1.000
#> SRR1521434     2   0.000      0.977 0.000 1.000
#> SRR1521435     2   0.000      0.977 0.000 1.000
#> SRR1521436     2   0.000      0.977 0.000 1.000
#> SRR1521437     2   0.000      0.977 0.000 1.000
#> SRR1521431     2   0.000      0.977 0.000 1.000
#> SRR1521438     2   0.000      0.977 0.000 1.000
#> SRR1521439     2   0.000      0.977 0.000 1.000
#> SRR1521440     2   0.000      0.977 0.000 1.000
#> SRR1521441     2   0.000      0.977 0.000 1.000
#> SRR1521443     2   0.000      0.977 0.000 1.000
#> SRR1521442     2   0.000      0.977 0.000 1.000
#> SRR1521444     2   0.000      0.977 0.000 1.000
#> SRR1521445     2   0.000      0.977 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
#> SRR1521352     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521353     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521359     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521360     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521361     3  0.5216      0.641 0.260 0.000 0.740
#> SRR1521362     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521363     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521364     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521365     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521366     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521368     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521369     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521370     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521372     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521373     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521376     2  0.1289      0.958 0.000 0.968 0.032
#> SRR1521377     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521378     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521379     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521380     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521381     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521382     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521383     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521386     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521388     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521391     1  0.4654      0.736 0.792 0.000 0.208
#> SRR1521392     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521393     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521394     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521395     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521396     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521397     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521399     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521400     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521401     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521403     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521402     1  0.0424      0.990 0.992 0.000 0.008
#> SRR1521405     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521404     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521408     3  0.0000      0.978 0.000 0.000 1.000
#> SRR1521407     1  0.0237      0.992 0.996 0.000 0.004
#> SRR1521409     2  0.4605      0.718 0.204 0.796 0.000
#> SRR1521410     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521430     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521429     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521432     3  0.0237      0.979 0.000 0.004 0.996
#> SRR1521433     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521434     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521435     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521436     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521431     3  0.0237      0.979 0.000 0.004 0.996
#> SRR1521438     3  0.0424      0.979 0.000 0.008 0.992
#> SRR1521439     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.988 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.988 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
#> SRR1521352     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521353     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521354     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521355     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521356     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521357     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521358     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521359     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521360     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521361     1   0.657      0.582 0.604 0.000 0.116 0.280
#> SRR1521362     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521363     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521364     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521365     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521366     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521368     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521369     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521370     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521371     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521372     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521373     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521374     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521375     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521376     2   0.462      0.486 0.000 0.660 0.340 0.000
#> SRR1521377     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521378     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521379     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521380     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521381     1   0.441      0.648 0.700 0.000 0.000 0.300
#> SRR1521382     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521383     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521384     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521385     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521387     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521386     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521388     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521389     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521390     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521391     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521392     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521393     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521394     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521395     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521396     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521397     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521398     1   0.253      0.835 0.888 0.000 0.000 0.112
#> SRR1521399     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521400     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521401     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521403     1   0.458      0.453 0.668 0.000 0.000 0.332
#> SRR1521402     1   0.000      0.927 1.000 0.000 0.000 0.000
#> SRR1521405     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521406     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521404     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521408     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521407     4   0.488      0.177 0.408 0.000 0.000 0.592
#> SRR1521409     2   0.702      0.213 0.344 0.524 0.000 0.132
#> SRR1521410     4   0.247      0.893 0.108 0.000 0.000 0.892
#> SRR1521411     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521412     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521414     1   0.121      0.904 0.960 0.000 0.000 0.040
#> SRR1521413     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521415     1   0.121      0.904 0.960 0.000 0.000 0.040
#> SRR1521416     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521417     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521418     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521419     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521420     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521421     4   0.464      0.573 0.344 0.000 0.000 0.656
#> SRR1521422     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521424     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521423     4   0.281      0.892 0.132 0.000 0.000 0.868
#> SRR1521426     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521427     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521425     4   0.000      0.896 0.000 0.000 0.000 1.000
#> SRR1521428     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521430     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521429     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521432     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521433     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521434     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521435     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521436     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521437     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521431     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521438     3   0.000      1.000 0.000 0.000 1.000 0.000
#> SRR1521439     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521440     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521441     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521443     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521442     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521444     2   0.000      0.967 0.000 1.000 0.000 0.000
#> SRR1521445     2   0.000      0.967 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0404      0.932 0.012 0.000 0.000 0.988 0.000
#> SRR1521353     3  0.0451      0.992 0.000 0.000 0.988 0.008 0.004
#> SRR1521354     3  0.0451      0.992 0.000 0.000 0.988 0.008 0.004
#> SRR1521355     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521356     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521357     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.0912      0.925 0.016 0.000 0.000 0.972 0.012
#> SRR1521360     3  0.0693      0.987 0.000 0.000 0.980 0.008 0.012
#> SRR1521361     5  0.5433      0.290 0.032 0.000 0.016 0.412 0.540
#> SRR1521362     4  0.1117      0.928 0.020 0.000 0.000 0.964 0.016
#> SRR1521363     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521365     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521368     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0451      0.992 0.000 0.000 0.988 0.008 0.004
#> SRR1521370     3  0.0451      0.992 0.000 0.000 0.988 0.008 0.004
#> SRR1521371     1  0.1430      0.887 0.944 0.000 0.000 0.004 0.052
#> SRR1521372     1  0.4287      0.153 0.540 0.000 0.000 0.000 0.460
#> SRR1521373     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     2  0.4166      0.461 0.000 0.648 0.348 0.004 0.000
#> SRR1521377     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521378     3  0.0451      0.992 0.000 0.000 0.988 0.008 0.004
#> SRR1521379     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521380     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521381     5  0.4331      0.340 0.004 0.000 0.000 0.400 0.596
#> SRR1521382     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.0510      0.932 0.016 0.000 0.000 0.984 0.000
#> SRR1521384     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.0404      0.932 0.012 0.000 0.000 0.988 0.000
#> SRR1521387     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0451      0.992 0.000 0.000 0.988 0.008 0.004
#> SRR1521388     4  0.1469      0.924 0.036 0.000 0.000 0.948 0.016
#> SRR1521389     4  0.1469      0.924 0.036 0.000 0.000 0.948 0.016
#> SRR1521390     4  0.1469      0.924 0.036 0.000 0.000 0.948 0.016
#> SRR1521391     5  0.0880      0.892 0.032 0.000 0.000 0.000 0.968
#> SRR1521392     5  0.0880      0.892 0.032 0.000 0.000 0.000 0.968
#> SRR1521393     5  0.0880      0.892 0.032 0.000 0.000 0.000 0.968
#> SRR1521394     5  0.0880      0.892 0.032 0.000 0.000 0.000 0.968
#> SRR1521395     5  0.0880      0.892 0.032 0.000 0.000 0.000 0.968
#> SRR1521396     5  0.0880      0.892 0.032 0.000 0.000 0.000 0.968
#> SRR1521397     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521398     1  0.1357      0.890 0.948 0.000 0.000 0.004 0.048
#> SRR1521399     1  0.4287      0.153 0.540 0.000 0.000 0.000 0.460
#> SRR1521400     5  0.1341      0.880 0.056 0.000 0.000 0.000 0.944
#> SRR1521401     5  0.1410      0.880 0.060 0.000 0.000 0.000 0.940
#> SRR1521403     1  0.1331      0.888 0.952 0.000 0.000 0.008 0.040
#> SRR1521402     1  0.4219      0.275 0.584 0.000 0.000 0.000 0.416
#> SRR1521405     4  0.1469      0.924 0.036 0.000 0.000 0.948 0.016
#> SRR1521406     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521404     4  0.0404      0.932 0.012 0.000 0.000 0.988 0.000
#> SRR1521408     3  0.0451      0.992 0.000 0.000 0.988 0.008 0.004
#> SRR1521407     4  0.5215      0.192 0.052 0.000 0.000 0.576 0.372
#> SRR1521409     4  0.2735      0.840 0.000 0.036 0.000 0.880 0.084
#> SRR1521410     1  0.1671      0.874 0.924 0.000 0.000 0.076 0.000
#> SRR1521411     1  0.0404      0.906 0.988 0.000 0.000 0.012 0.000
#> SRR1521412     1  0.0404      0.906 0.988 0.000 0.000 0.012 0.000
#> SRR1521414     1  0.0703      0.891 0.976 0.000 0.000 0.000 0.024
#> SRR1521413     1  0.0703      0.909 0.976 0.000 0.000 0.024 0.000
#> SRR1521415     1  0.0703      0.891 0.976 0.000 0.000 0.000 0.024
#> SRR1521416     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521417     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521418     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521419     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521420     4  0.2416      0.867 0.100 0.000 0.000 0.888 0.012
#> SRR1521421     1  0.1444      0.873 0.948 0.000 0.000 0.040 0.012
#> SRR1521422     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521424     4  0.0404      0.932 0.012 0.000 0.000 0.988 0.000
#> SRR1521423     1  0.0794      0.910 0.972 0.000 0.000 0.028 0.000
#> SRR1521426     4  0.0404      0.932 0.012 0.000 0.000 0.988 0.000
#> SRR1521427     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     4  0.1792      0.879 0.084 0.000 0.000 0.916 0.000
#> SRR1521428     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521429     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.993 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521434     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521435     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521436     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.993 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0162      0.993 0.000 0.000 0.996 0.004 0.000
#> SRR1521439     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.983 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.983 0.000 1.000 0.000 0.000 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
#> SRR1521352     4  0.2772     0.8505 0.004 0.000 0.000 0.816 0.000 0.180
#> SRR1521353     3  0.3023     0.8361 0.000 0.000 0.768 0.000 0.000 0.232
#> SRR1521354     3  0.3023     0.8361 0.000 0.000 0.768 0.000 0.000 0.232
#> SRR1521355     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521356     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521357     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     4  0.3634     0.7279 0.000 0.000 0.000 0.644 0.000 0.356
#> SRR1521360     3  0.3795     0.7126 0.000 0.000 0.632 0.004 0.000 0.364
#> SRR1521361     6  0.0937     0.3226 0.000 0.000 0.000 0.040 0.000 0.960
#> SRR1521362     4  0.0405     0.7950 0.008 0.000 0.000 0.988 0.004 0.000
#> SRR1521363     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.2854     0.8441 0.000 0.000 0.792 0.000 0.000 0.208
#> SRR1521370     3  0.3023     0.8361 0.000 0.000 0.768 0.000 0.000 0.232
#> SRR1521371     1  0.0458     0.8811 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR1521372     6  0.6082     0.3504 0.324 0.000 0.000 0.000 0.284 0.392
#> SRR1521373     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.3838     0.1131 0.000 0.448 0.552 0.000 0.000 0.000
#> SRR1521377     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.2912     0.8420 0.000 0.000 0.784 0.000 0.000 0.216
#> SRR1521379     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521380     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.6006    -0.1779 0.000 0.000 0.000 0.248 0.332 0.420
#> SRR1521382     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     4  0.2805     0.8506 0.004 0.000 0.000 0.812 0.000 0.184
#> SRR1521384     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     4  0.2871     0.8491 0.004 0.000 0.000 0.804 0.000 0.192
#> SRR1521387     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.2969     0.8392 0.000 0.000 0.776 0.000 0.000 0.224
#> SRR1521388     4  0.0405     0.7950 0.008 0.000 0.000 0.988 0.004 0.000
#> SRR1521389     4  0.0405     0.7950 0.008 0.000 0.000 0.988 0.004 0.000
#> SRR1521390     4  0.0405     0.7950 0.008 0.000 0.000 0.988 0.004 0.000
#> SRR1521391     5  0.0146     0.8495 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521392     5  0.0146     0.8495 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521393     5  0.0146     0.8495 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521394     5  0.0146     0.8495 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521395     5  0.0146     0.8495 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521396     5  0.0146     0.8495 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521397     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521398     1  0.0603     0.8837 0.980 0.000 0.000 0.004 0.016 0.000
#> SRR1521399     6  0.6079     0.3552 0.328 0.000 0.000 0.000 0.280 0.392
#> SRR1521400     5  0.3965     0.3843 0.008 0.000 0.000 0.000 0.604 0.388
#> SRR1521401     5  0.4066     0.3696 0.012 0.000 0.000 0.000 0.596 0.392
#> SRR1521403     1  0.3794     0.5218 0.724 0.000 0.000 0.000 0.028 0.248
#> SRR1521402     6  0.6014     0.3442 0.368 0.000 0.000 0.000 0.240 0.392
#> SRR1521405     4  0.0405     0.7950 0.008 0.000 0.000 0.988 0.004 0.000
#> SRR1521406     1  0.0405     0.8922 0.988 0.000 0.000 0.008 0.000 0.004
#> SRR1521404     4  0.2805     0.8505 0.004 0.000 0.000 0.812 0.000 0.184
#> SRR1521408     3  0.3023     0.8361 0.000 0.000 0.768 0.000 0.000 0.232
#> SRR1521407     6  0.3076     0.0835 0.000 0.000 0.000 0.240 0.000 0.760
#> SRR1521409     4  0.5686     0.5824 0.000 0.028 0.000 0.512 0.084 0.376
#> SRR1521410     1  0.2706     0.7449 0.852 0.000 0.000 0.124 0.000 0.024
#> SRR1521411     1  0.1349     0.8547 0.940 0.000 0.000 0.004 0.000 0.056
#> SRR1521412     1  0.1285     0.8572 0.944 0.000 0.000 0.004 0.000 0.052
#> SRR1521414     1  0.4437     0.1607 0.576 0.000 0.000 0.000 0.032 0.392
#> SRR1521413     1  0.0146     0.8917 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521415     1  0.4437     0.1607 0.576 0.000 0.000 0.000 0.032 0.392
#> SRR1521416     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521417     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521418     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521419     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521420     4  0.4168     0.6657 0.016 0.000 0.000 0.584 0.000 0.400
#> SRR1521421     6  0.3652     0.3822 0.324 0.000 0.000 0.004 0.000 0.672
#> SRR1521422     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521424     4  0.2871     0.8491 0.004 0.000 0.000 0.804 0.000 0.192
#> SRR1521423     1  0.0260     0.8935 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521426     4  0.2838     0.8501 0.004 0.000 0.000 0.808 0.000 0.188
#> SRR1521427     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     4  0.3695     0.8113 0.024 0.000 0.000 0.732 0.000 0.244
#> SRR1521428     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.1957     0.8604 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR1521433     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.1957     0.8604 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR1521438     3  0.0000     0.8629 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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 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.777           0.892       0.955         0.4654 0.525   0.525
#> 3 3 0.719           0.972       0.948         0.2711 0.807   0.650
#> 4 4 0.989           0.947       0.981         0.1631 0.911   0.773
#> 5 5 1.000           0.966       0.987         0.1433 0.876   0.619
#> 6 6 1.000           0.963       0.987         0.0264 0.979   0.901

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 4 5

There is also optional best \(k\) = 4 5 that is worth to check.

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> SRR1521352     1   0.000     0.9641 1.000 0.000
#> SRR1521353     1   0.000     0.9641 1.000 0.000
#> SRR1521354     1   0.000     0.9641 1.000 0.000
#> SRR1521355     1   0.000     0.9641 1.000 0.000
#> SRR1521356     1   0.000     0.9641 1.000 0.000
#> SRR1521357     2   0.000     0.9264 0.000 1.000
#> SRR1521358     2   0.000     0.9264 0.000 1.000
#> SRR1521359     1   0.000     0.9641 1.000 0.000
#> SRR1521360     1   0.000     0.9641 1.000 0.000
#> SRR1521361     1   0.000     0.9641 1.000 0.000
#> SRR1521362     1   0.000     0.9641 1.000 0.000
#> SRR1521363     2   0.000     0.9264 0.000 1.000
#> SRR1521364     2   0.605     0.8534 0.148 0.852
#> SRR1521365     2   0.000     0.9264 0.000 1.000
#> SRR1521366     2   0.760     0.7678 0.220 0.780
#> SRR1521368     2   0.000     0.9264 0.000 1.000
#> SRR1521369     1   0.992     0.0832 0.552 0.448
#> SRR1521370     1   0.000     0.9641 1.000 0.000
#> SRR1521371     1   0.000     0.9641 1.000 0.000
#> SRR1521372     1   0.000     0.9641 1.000 0.000
#> SRR1521373     2   0.000     0.9264 0.000 1.000
#> SRR1521374     2   0.000     0.9264 0.000 1.000
#> SRR1521375     2   0.000     0.9264 0.000 1.000
#> SRR1521376     2   0.605     0.8534 0.148 0.852
#> SRR1521377     2   0.866     0.6588 0.288 0.712
#> SRR1521378     1   0.990     0.1131 0.560 0.440
#> SRR1521379     2   0.605     0.8534 0.148 0.852
#> SRR1521380     2   0.706     0.8045 0.192 0.808
#> SRR1521381     1   0.000     0.9641 1.000 0.000
#> SRR1521382     2   0.000     0.9264 0.000 1.000
#> SRR1521383     1   0.000     0.9641 1.000 0.000
#> SRR1521384     2   0.000     0.9264 0.000 1.000
#> SRR1521385     1   0.000     0.9641 1.000 0.000
#> SRR1521387     2   0.000     0.9264 0.000 1.000
#> SRR1521386     1   0.990     0.1131 0.560 0.440
#> SRR1521388     1   0.000     0.9641 1.000 0.000
#> SRR1521389     1   0.000     0.9641 1.000 0.000
#> SRR1521390     1   0.000     0.9641 1.000 0.000
#> SRR1521391     1   0.000     0.9641 1.000 0.000
#> SRR1521392     1   0.000     0.9641 1.000 0.000
#> SRR1521393     1   0.000     0.9641 1.000 0.000
#> SRR1521394     1   0.000     0.9641 1.000 0.000
#> SRR1521395     1   0.000     0.9641 1.000 0.000
#> SRR1521396     1   0.000     0.9641 1.000 0.000
#> SRR1521397     1   0.000     0.9641 1.000 0.000
#> SRR1521398     1   0.000     0.9641 1.000 0.000
#> SRR1521399     1   0.000     0.9641 1.000 0.000
#> SRR1521400     1   0.000     0.9641 1.000 0.000
#> SRR1521401     1   0.000     0.9641 1.000 0.000
#> SRR1521403     1   0.000     0.9641 1.000 0.000
#> SRR1521402     1   0.000     0.9641 1.000 0.000
#> SRR1521405     1   0.000     0.9641 1.000 0.000
#> SRR1521406     1   0.000     0.9641 1.000 0.000
#> SRR1521404     1   0.000     0.9641 1.000 0.000
#> SRR1521408     1   0.000     0.9641 1.000 0.000
#> SRR1521407     1   0.000     0.9641 1.000 0.000
#> SRR1521409     1   0.000     0.9641 1.000 0.000
#> SRR1521410     1   0.000     0.9641 1.000 0.000
#> SRR1521411     1   0.000     0.9641 1.000 0.000
#> SRR1521412     1   0.000     0.9641 1.000 0.000
#> SRR1521414     1   0.000     0.9641 1.000 0.000
#> SRR1521413     1   0.000     0.9641 1.000 0.000
#> SRR1521415     1   0.000     0.9641 1.000 0.000
#> SRR1521416     1   0.000     0.9641 1.000 0.000
#> SRR1521417     1   0.000     0.9641 1.000 0.000
#> SRR1521418     1   0.000     0.9641 1.000 0.000
#> SRR1521419     1   0.000     0.9641 1.000 0.000
#> SRR1521420     1   0.000     0.9641 1.000 0.000
#> SRR1521421     1   0.000     0.9641 1.000 0.000
#> SRR1521422     1   0.000     0.9641 1.000 0.000
#> SRR1521424     1   0.000     0.9641 1.000 0.000
#> SRR1521423     1   0.000     0.9641 1.000 0.000
#> SRR1521426     1   0.000     0.9641 1.000 0.000
#> SRR1521427     2   0.000     0.9264 0.000 1.000
#> SRR1521425     1   0.000     0.9641 1.000 0.000
#> SRR1521428     2   0.000     0.9264 0.000 1.000
#> SRR1521430     2   0.605     0.8534 0.148 0.852
#> SRR1521429     2   0.000     0.9264 0.000 1.000
#> SRR1521432     1   0.999    -0.0630 0.516 0.484
#> SRR1521433     2   0.605     0.8534 0.148 0.852
#> SRR1521434     2   0.605     0.8534 0.148 0.852
#> SRR1521435     2   0.605     0.8534 0.148 0.852
#> SRR1521436     2   0.000     0.9264 0.000 1.000
#> SRR1521437     2   0.000     0.9264 0.000 1.000
#> SRR1521431     2   0.993     0.2576 0.452 0.548
#> SRR1521438     2   0.595     0.8559 0.144 0.856
#> SRR1521439     2   0.000     0.9264 0.000 1.000
#> SRR1521440     2   0.000     0.9264 0.000 1.000
#> SRR1521441     2   0.000     0.9264 0.000 1.000
#> SRR1521443     2   0.000     0.9264 0.000 1.000
#> SRR1521442     2   0.000     0.9264 0.000 1.000
#> SRR1521444     2   0.000     0.9264 0.000 1.000
#> SRR1521445     2   0.000     0.9264 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
#> SRR1521352     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521353     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521354     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521355     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521359     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521360     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521361     1  0.0237      0.970 0.996 0.000 0.004
#> SRR1521362     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521363     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521364     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521365     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521366     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521368     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521369     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521370     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521371     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521372     1  0.0237      0.970 0.996 0.000 0.004
#> SRR1521373     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521376     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521377     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521378     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521379     3  0.7433      0.851 0.168 0.132 0.700
#> SRR1521380     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521381     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521382     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521383     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521386     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521388     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521391     1  0.4178      0.808 0.828 0.000 0.172
#> SRR1521392     1  0.4178      0.808 0.828 0.000 0.172
#> SRR1521393     1  0.4178      0.808 0.828 0.000 0.172
#> SRR1521394     1  0.4178      0.808 0.828 0.000 0.172
#> SRR1521395     1  0.4178      0.808 0.828 0.000 0.172
#> SRR1521396     1  0.4178      0.808 0.828 0.000 0.172
#> SRR1521397     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521399     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521400     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521401     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521403     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521402     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521405     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521404     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521408     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521407     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521409     1  0.0237      0.970 0.996 0.000 0.004
#> SRR1521410     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.974 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521430     3  0.4351      0.989 0.168 0.004 0.828
#> SRR1521429     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521432     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521433     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521434     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521435     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521436     2  0.0747      0.984 0.000 0.984 0.016
#> SRR1521437     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521431     3  0.4178      0.993 0.172 0.000 0.828
#> SRR1521438     3  0.4351      0.989 0.168 0.004 0.828
#> SRR1521439     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.999 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
#> SRR1521352     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521353     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521354     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521355     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521359     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521360     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521361     3  0.4776      0.388 0.376 0.000 0.624 0.000
#> SRR1521362     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521363     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521364     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521371     1  0.0336      0.973 0.992 0.000 0.000 0.008
#> SRR1521372     1  0.3801      0.691 0.780 0.000 0.220 0.000
#> SRR1521373     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521376     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521377     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521379     3  0.2760      0.783 0.000 0.128 0.872 0.000
#> SRR1521380     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521381     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521382     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521383     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521384     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521385     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521387     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521388     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521389     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521390     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521391     4  0.0000      1.000 0.000 0.000 0.000 1.000
#> SRR1521392     4  0.0000      1.000 0.000 0.000 0.000 1.000
#> SRR1521393     4  0.0000      1.000 0.000 0.000 0.000 1.000
#> SRR1521394     4  0.0000      1.000 0.000 0.000 0.000 1.000
#> SRR1521395     4  0.0000      1.000 0.000 0.000 0.000 1.000
#> SRR1521396     4  0.0000      1.000 0.000 0.000 0.000 1.000
#> SRR1521397     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.0336      0.973 0.992 0.000 0.000 0.008
#> SRR1521400     1  0.4103      0.660 0.744 0.000 0.000 0.256
#> SRR1521401     1  0.4103      0.661 0.744 0.000 0.000 0.256
#> SRR1521403     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521402     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521405     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521406     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521404     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521408     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521407     1  0.0188      0.976 0.996 0.000 0.004 0.000
#> SRR1521409     3  0.5493      0.171 0.456 0.016 0.528 0.000
#> SRR1521410     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521411     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521414     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521416     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521421     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521422     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521424     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521423     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521426     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521427     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.0000      0.980 1.000 0.000 0.000 0.000
#> SRR1521428     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521429     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.1867      0.904 0.000 0.928 0.072 0.000
#> SRR1521437     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.0000      0.936 0.000 0.000 1.000 0.000
#> SRR1521439     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.996 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521353     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521360     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521361     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521362     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521363     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521371     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521372     4   0.238      0.828 0.000 0.000 0.128 0.872 0.000
#> SRR1521373     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521377     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     3   0.238      0.823 0.000 0.128 0.872 0.000 0.000
#> SRR1521380     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521382     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521384     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521387     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521389     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521390     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521391     5   0.000      0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1521392     5   0.000      0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1521393     5   0.000      0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1521394     5   0.000      0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1521395     5   0.000      0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1521396     5   0.000      0.932 0.000 0.000 0.000 0.000 1.000
#> SRR1521397     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521399     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521400     4   0.338      0.751 0.176 0.000 0.000 0.808 0.016
#> SRR1521401     5   0.417      0.329 0.396 0.000 0.000 0.000 0.604
#> SRR1521403     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521402     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521405     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521406     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521408     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521409     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521410     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521411     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521412     1   0.321      0.669 0.788 0.000 0.000 0.212 0.000
#> SRR1521414     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521413     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521416     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521421     4   0.185      0.884 0.088 0.000 0.000 0.912 0.000
#> SRR1521422     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521423     1   0.000      0.984 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521427     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     4   0.000      0.978 0.000 0.000 0.000 1.000 0.000
#> SRR1521428     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2   0.161      0.907 0.000 0.928 0.072 0.000 0.000
#> SRR1521437     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3   0.000      0.992 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2   0.000      0.996 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2   0.000      0.996 0.000 1.000 0.000 0.000 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
#> SRR1521352     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521353     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521354     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521355     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521356     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521357     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521358     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521359     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521360     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521361     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521362     4   0.000      1.000 0.000 0.000 0.000  1 0.000 0.000
#> SRR1521363     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521364     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521365     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521366     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521368     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521369     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521370     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521371     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521372     6   0.214      0.817 0.000 0.000 0.128  0 0.000 0.872
#> SRR1521373     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521374     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521375     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521376     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521377     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521378     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521379     3   0.214      0.817 0.000 0.128 0.872  0 0.000 0.000
#> SRR1521380     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521381     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521382     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521383     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521384     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521385     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521387     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521386     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521388     4   0.000      1.000 0.000 0.000 0.000  1 0.000 0.000
#> SRR1521389     4   0.000      1.000 0.000 0.000 0.000  1 0.000 0.000
#> SRR1521390     4   0.000      1.000 0.000 0.000 0.000  1 0.000 0.000
#> SRR1521391     5   0.000      0.900 0.000 0.000 0.000  0 1.000 0.000
#> SRR1521392     5   0.000      0.900 0.000 0.000 0.000  0 1.000 0.000
#> SRR1521393     5   0.000      0.900 0.000 0.000 0.000  0 1.000 0.000
#> SRR1521394     5   0.000      0.900 0.000 0.000 0.000  0 1.000 0.000
#> SRR1521395     5   0.000      0.900 0.000 0.000 0.000  0 1.000 0.000
#> SRR1521396     5   0.000      0.900 0.000 0.000 0.000  0 1.000 0.000
#> SRR1521397     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521398     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521399     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521400     6   0.304      0.746 0.176 0.000 0.000  0 0.016 0.808
#> SRR1521401     5   0.375      0.328 0.396 0.000 0.000  0 0.604 0.000
#> SRR1521403     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521402     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521405     4   0.000      1.000 0.000 0.000 0.000  1 0.000 0.000
#> SRR1521406     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521404     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521408     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521407     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521409     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521410     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521411     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521412     1   0.288      0.687 0.788 0.000 0.000  0 0.000 0.212
#> SRR1521414     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521413     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521415     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521416     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521417     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521418     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521419     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521420     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521421     6   0.166      0.877 0.088 0.000 0.000  0 0.000 0.912
#> SRR1521422     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521424     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521423     1   0.000      0.985 1.000 0.000 0.000  0 0.000 0.000
#> SRR1521426     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521427     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521425     6   0.000      0.970 0.000 0.000 0.000  0 0.000 1.000
#> SRR1521428     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521430     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521429     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521432     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521433     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521434     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521435     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521436     2   0.144      0.904 0.000 0.928 0.072  0 0.000 0.000
#> SRR1521437     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521431     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521438     3   0.000      0.992 0.000 0.000 1.000  0 0.000 0.000
#> SRR1521439     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521440     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521441     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521443     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521442     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521444     2   0.000      0.996 0.000 1.000 0.000  0 0.000 0.000
#> SRR1521445     2   0.000      0.996 0.000 1.000 0.000  0 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-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

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

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

collect_plots(res)

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.980       0.991         0.5055 0.495   0.495
#> 3 3 0.932           0.947       0.973         0.2216 0.848   0.706
#> 4 4 0.829           0.840       0.935         0.1252 0.914   0.783
#> 5 5 0.734           0.745       0.806         0.0891 0.914   0.739
#> 6 6 0.898           0.844       0.922         0.0715 0.917   0.682

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
#> SRR1521352     1   0.000      0.994 1.000 0.000
#> SRR1521353     2   0.000      0.988 0.000 1.000
#> SRR1521354     2   0.000      0.988 0.000 1.000
#> SRR1521355     1   0.000      0.994 1.000 0.000
#> SRR1521356     1   0.000      0.994 1.000 0.000
#> SRR1521357     2   0.000      0.988 0.000 1.000
#> SRR1521358     2   0.000      0.988 0.000 1.000
#> SRR1521359     1   0.000      0.994 1.000 0.000
#> SRR1521360     2   0.000      0.988 0.000 1.000
#> SRR1521361     2   0.929      0.476 0.344 0.656
#> SRR1521362     1   0.000      0.994 1.000 0.000
#> SRR1521363     2   0.000      0.988 0.000 1.000
#> SRR1521364     2   0.000      0.988 0.000 1.000
#> SRR1521365     2   0.000      0.988 0.000 1.000
#> SRR1521366     2   0.000      0.988 0.000 1.000
#> SRR1521368     2   0.000      0.988 0.000 1.000
#> SRR1521369     2   0.000      0.988 0.000 1.000
#> SRR1521370     2   0.000      0.988 0.000 1.000
#> SRR1521371     1   0.000      0.994 1.000 0.000
#> SRR1521372     1   0.760      0.714 0.780 0.220
#> SRR1521373     2   0.000      0.988 0.000 1.000
#> SRR1521374     2   0.000      0.988 0.000 1.000
#> SRR1521375     2   0.000      0.988 0.000 1.000
#> SRR1521376     2   0.000      0.988 0.000 1.000
#> SRR1521377     2   0.000      0.988 0.000 1.000
#> SRR1521378     2   0.000      0.988 0.000 1.000
#> SRR1521379     2   0.000      0.988 0.000 1.000
#> SRR1521380     2   0.000      0.988 0.000 1.000
#> SRR1521381     1   0.000      0.994 1.000 0.000
#> SRR1521382     2   0.000      0.988 0.000 1.000
#> SRR1521383     1   0.000      0.994 1.000 0.000
#> SRR1521384     2   0.000      0.988 0.000 1.000
#> SRR1521385     1   0.000      0.994 1.000 0.000
#> SRR1521387     2   0.000      0.988 0.000 1.000
#> SRR1521386     2   0.000      0.988 0.000 1.000
#> SRR1521388     1   0.000      0.994 1.000 0.000
#> SRR1521389     1   0.000      0.994 1.000 0.000
#> SRR1521390     1   0.000      0.994 1.000 0.000
#> SRR1521391     1   0.000      0.994 1.000 0.000
#> SRR1521392     1   0.000      0.994 1.000 0.000
#> SRR1521393     1   0.000      0.994 1.000 0.000
#> SRR1521394     1   0.000      0.994 1.000 0.000
#> SRR1521395     1   0.000      0.994 1.000 0.000
#> SRR1521396     1   0.000      0.994 1.000 0.000
#> SRR1521397     1   0.000      0.994 1.000 0.000
#> SRR1521398     1   0.000      0.994 1.000 0.000
#> SRR1521399     1   0.000      0.994 1.000 0.000
#> SRR1521400     1   0.000      0.994 1.000 0.000
#> SRR1521401     1   0.000      0.994 1.000 0.000
#> SRR1521403     1   0.000      0.994 1.000 0.000
#> SRR1521402     1   0.000      0.994 1.000 0.000
#> SRR1521405     1   0.000      0.994 1.000 0.000
#> SRR1521406     1   0.000      0.994 1.000 0.000
#> SRR1521404     1   0.000      0.994 1.000 0.000
#> SRR1521408     2   0.000      0.988 0.000 1.000
#> SRR1521407     1   0.327      0.932 0.940 0.060
#> SRR1521409     2   0.680      0.777 0.180 0.820
#> SRR1521410     1   0.000      0.994 1.000 0.000
#> SRR1521411     1   0.000      0.994 1.000 0.000
#> SRR1521412     1   0.000      0.994 1.000 0.000
#> SRR1521414     1   0.000      0.994 1.000 0.000
#> SRR1521413     1   0.000      0.994 1.000 0.000
#> SRR1521415     1   0.000      0.994 1.000 0.000
#> SRR1521416     1   0.000      0.994 1.000 0.000
#> SRR1521417     1   0.000      0.994 1.000 0.000
#> SRR1521418     1   0.000      0.994 1.000 0.000
#> SRR1521419     1   0.000      0.994 1.000 0.000
#> SRR1521420     1   0.000      0.994 1.000 0.000
#> SRR1521421     1   0.000      0.994 1.000 0.000
#> SRR1521422     1   0.000      0.994 1.000 0.000
#> SRR1521424     1   0.000      0.994 1.000 0.000
#> SRR1521423     1   0.000      0.994 1.000 0.000
#> SRR1521426     1   0.000      0.994 1.000 0.000
#> SRR1521427     2   0.000      0.988 0.000 1.000
#> SRR1521425     1   0.000      0.994 1.000 0.000
#> SRR1521428     2   0.000      0.988 0.000 1.000
#> SRR1521430     2   0.000      0.988 0.000 1.000
#> SRR1521429     2   0.000      0.988 0.000 1.000
#> SRR1521432     2   0.000      0.988 0.000 1.000
#> SRR1521433     2   0.000      0.988 0.000 1.000
#> SRR1521434     2   0.000      0.988 0.000 1.000
#> SRR1521435     2   0.000      0.988 0.000 1.000
#> SRR1521436     2   0.000      0.988 0.000 1.000
#> SRR1521437     2   0.000      0.988 0.000 1.000
#> SRR1521431     2   0.000      0.988 0.000 1.000
#> SRR1521438     2   0.000      0.988 0.000 1.000
#> SRR1521439     2   0.000      0.988 0.000 1.000
#> SRR1521440     2   0.000      0.988 0.000 1.000
#> SRR1521441     2   0.000      0.988 0.000 1.000
#> SRR1521443     2   0.000      0.988 0.000 1.000
#> SRR1521442     2   0.000      0.988 0.000 1.000
#> SRR1521444     2   0.000      0.988 0.000 1.000
#> SRR1521445     2   0.000      0.988 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
#> SRR1521352     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521353     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521354     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521355     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521359     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521360     2  0.6034      0.799 0.068 0.780 0.152
#> SRR1521361     1  0.8052      0.531 0.652 0.196 0.152
#> SRR1521362     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521363     2  0.5656      0.821 0.068 0.804 0.128
#> SRR1521364     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521365     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521366     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521368     2  0.1031      0.939 0.000 0.976 0.024
#> SRR1521369     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521370     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521371     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521372     1  0.4045      0.847 0.872 0.024 0.104
#> SRR1521373     2  0.3482      0.871 0.000 0.872 0.128
#> SRR1521374     2  0.1031      0.939 0.000 0.976 0.024
#> SRR1521375     2  0.3340      0.878 0.000 0.880 0.120
#> SRR1521376     2  0.6034      0.799 0.068 0.780 0.152
#> SRR1521377     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521378     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521379     2  0.5974      0.803 0.068 0.784 0.148
#> SRR1521380     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521381     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521382     2  0.3340      0.878 0.000 0.880 0.120
#> SRR1521383     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521386     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521388     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521389     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521390     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521391     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521392     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521393     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521394     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521395     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521396     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521397     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521398     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521399     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521400     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521401     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521403     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521402     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521405     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521406     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521404     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521408     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521407     1  0.4174      0.849 0.872 0.036 0.092
#> SRR1521409     1  0.8875      0.129 0.508 0.364 0.128
#> SRR1521410     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521425     1  0.0237      0.975 0.996 0.000 0.004
#> SRR1521428     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521430     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521429     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521432     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521433     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521434     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521435     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521436     2  0.1643      0.929 0.000 0.956 0.044
#> SRR1521437     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521431     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521438     3  0.0237      1.000 0.000 0.004 0.996
#> SRR1521439     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.947 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.947 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
#> SRR1521352     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521353     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521354     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521355     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521359     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521360     3  0.7289     0.2710 0.200 0.268 0.532 0.000
#> SRR1521361     1  0.4991     0.4677 0.608 0.004 0.000 0.388
#> SRR1521362     1  0.2704     0.7937 0.876 0.000 0.000 0.124
#> SRR1521363     2  0.3649     0.6992 0.204 0.796 0.000 0.000
#> SRR1521364     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521371     1  0.2704     0.7937 0.876 0.000 0.000 0.124
#> SRR1521372     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521373     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521376     2  0.3852     0.7121 0.192 0.800 0.008 0.000
#> SRR1521377     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.3751     0.7090 0.196 0.800 0.004 0.000
#> SRR1521380     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521381     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521382     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521383     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521384     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521385     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521387     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521388     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521389     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521390     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521391     4  0.4941    -0.0487 0.436 0.000 0.000 0.564
#> SRR1521392     4  0.0000     0.8781 0.000 0.000 0.000 1.000
#> SRR1521393     4  0.0000     0.8781 0.000 0.000 0.000 1.000
#> SRR1521394     4  0.0000     0.8781 0.000 0.000 0.000 1.000
#> SRR1521395     4  0.0000     0.8781 0.000 0.000 0.000 1.000
#> SRR1521396     4  0.0000     0.8781 0.000 0.000 0.000 1.000
#> SRR1521397     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.2704     0.7937 0.876 0.000 0.000 0.124
#> SRR1521399     1  0.4790     0.4878 0.620 0.000 0.000 0.380
#> SRR1521400     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521401     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521403     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521402     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521405     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521406     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521404     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521408     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521407     1  0.4817     0.4751 0.612 0.000 0.000 0.388
#> SRR1521409     2  0.4072     0.6153 0.252 0.748 0.000 0.000
#> SRR1521410     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521411     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.1557     0.8414 0.944 0.000 0.000 0.056
#> SRR1521414     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521416     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521421     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521422     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521424     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521423     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521426     1  0.0000     0.8739 1.000 0.000 0.000 0.000
#> SRR1521427     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.0336     0.8698 0.992 0.000 0.000 0.008
#> SRR1521428     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521429     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.0524     0.9416 0.004 0.988 0.008 0.000
#> SRR1521437     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.0000     0.9690 0.000 0.000 1.000 0.000
#> SRR1521439     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9506 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9506 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.3424     0.7457 0.240 0.000 0.000 0.760 0.000
#> SRR1521353     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1  0.5423     0.5885 0.644 0.000 0.000 0.244 0.112
#> SRR1521356     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521357     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     1  0.1608     0.5821 0.928 0.000 0.000 0.072 0.000
#> SRR1521360     3  0.6400     0.2657 0.336 0.124 0.524 0.016 0.000
#> SRR1521361     1  0.3018     0.4961 0.872 0.004 0.056 0.068 0.000
#> SRR1521362     1  0.3424     0.5558 0.760 0.000 0.000 0.240 0.000
#> SRR1521363     2  0.5421     0.6825 0.192 0.696 0.088 0.024 0.000
#> SRR1521364     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.1792     0.8780 0.000 0.916 0.084 0.000 0.000
#> SRR1521369     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0955     0.9377 0.028 0.000 0.968 0.004 0.000
#> SRR1521371     1  0.1082     0.5617 0.964 0.000 0.000 0.008 0.028
#> SRR1521372     1  0.1991     0.5476 0.916 0.004 0.004 0.076 0.000
#> SRR1521373     2  0.3634     0.8363 0.076 0.832 0.088 0.004 0.000
#> SRR1521374     2  0.1792     0.8780 0.000 0.916 0.084 0.000 0.000
#> SRR1521375     2  0.3634     0.8363 0.076 0.832 0.088 0.004 0.000
#> SRR1521376     2  0.5563     0.6475 0.208 0.672 0.104 0.016 0.000
#> SRR1521377     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.5516     0.6519 0.208 0.676 0.100 0.016 0.000
#> SRR1521380     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     1  0.1908     0.5951 0.908 0.000 0.000 0.092 0.000
#> SRR1521382     2  0.3634     0.8363 0.076 0.832 0.088 0.004 0.000
#> SRR1521383     1  0.4262     0.2286 0.560 0.000 0.000 0.440 0.000
#> SRR1521384     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.3274     0.7623 0.220 0.000 0.000 0.780 0.000
#> SRR1521387     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.1851     0.7761 0.088 0.000 0.000 0.912 0.000
#> SRR1521389     4  0.1851     0.7761 0.088 0.000 0.000 0.912 0.000
#> SRR1521390     4  0.1851     0.7761 0.088 0.000 0.000 0.912 0.000
#> SRR1521391     1  0.4169     0.0983 0.732 0.000 0.000 0.028 0.240
#> SRR1521392     5  0.3796     1.0000 0.300 0.000 0.000 0.000 0.700
#> SRR1521393     5  0.3796     1.0000 0.300 0.000 0.000 0.000 0.700
#> SRR1521394     5  0.3796     1.0000 0.300 0.000 0.000 0.000 0.700
#> SRR1521395     5  0.3796     1.0000 0.300 0.000 0.000 0.000 0.700
#> SRR1521396     5  0.3796     1.0000 0.300 0.000 0.000 0.000 0.700
#> SRR1521397     1  0.6463     0.5024 0.488 0.000 0.000 0.212 0.300
#> SRR1521398     1  0.1668     0.5427 0.940 0.000 0.000 0.032 0.028
#> SRR1521399     1  0.1121     0.6167 0.956 0.000 0.000 0.044 0.000
#> SRR1521400     1  0.1341     0.6028 0.944 0.000 0.000 0.056 0.000
#> SRR1521401     1  0.1582     0.5879 0.944 0.000 0.000 0.028 0.028
#> SRR1521403     1  0.2127     0.5616 0.892 0.000 0.000 0.108 0.000
#> SRR1521402     1  0.1197     0.6166 0.952 0.000 0.000 0.048 0.000
#> SRR1521405     4  0.1851     0.7761 0.088 0.000 0.000 0.912 0.000
#> SRR1521406     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521404     4  0.3895     0.5752 0.320 0.000 0.000 0.680 0.000
#> SRR1521408     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     1  0.1544     0.5534 0.932 0.000 0.000 0.068 0.000
#> SRR1521409     4  0.7833     0.2727 0.288 0.288 0.064 0.360 0.000
#> SRR1521410     1  0.6358     0.4708 0.516 0.000 0.000 0.208 0.276
#> SRR1521411     1  0.3596     0.6249 0.776 0.000 0.000 0.212 0.012
#> SRR1521412     1  0.2561     0.6133 0.856 0.000 0.000 0.144 0.000
#> SRR1521414     1  0.2966     0.6134 0.816 0.000 0.000 0.184 0.000
#> SRR1521413     1  0.6407     0.5317 0.512 0.000 0.000 0.244 0.244
#> SRR1521415     1  0.2929     0.6123 0.820 0.000 0.000 0.180 0.000
#> SRR1521416     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521417     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521418     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521419     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521420     1  0.5720     0.5693 0.624 0.000 0.000 0.208 0.168
#> SRR1521421     1  0.3210     0.6161 0.788 0.000 0.000 0.212 0.000
#> SRR1521422     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521424     4  0.3242     0.7613 0.216 0.000 0.000 0.784 0.000
#> SRR1521423     1  0.6608     0.4993 0.456 0.000 0.000 0.244 0.300
#> SRR1521426     4  0.3366     0.7438 0.232 0.000 0.000 0.768 0.000
#> SRR1521427     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.6703     0.2702 0.428 0.000 0.000 0.276 0.296
#> SRR1521428     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.1981     0.8856 0.064 0.920 0.016 0.000 0.000
#> SRR1521437     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0000     0.9689 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9238 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0162     0.9222 0.000 0.996 0.004 0.000 0.000
#> SRR1521445     2  0.0000     0.9238 0.000 1.000 0.000 0.000 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
#> SRR1521352     4  0.1556     0.8836 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR1521353     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521354     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521355     1  0.1663     0.8408 0.912 0.000 0.000 0.000 0.000 0.088
#> SRR1521356     1  0.0000     0.8857 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.1498     0.8560 0.032 0.000 0.000 0.028 0.000 0.940
#> SRR1521360     3  0.4725     0.4447 0.000 0.064 0.604 0.000 0.000 0.332
#> SRR1521361     6  0.0000     0.8444 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521362     4  0.3688     0.7066 0.020 0.000 0.000 0.724 0.000 0.256
#> SRR1521363     2  0.3245     0.7142 0.000 0.764 0.000 0.008 0.000 0.228
#> SRR1521364     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0458     0.9134 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1521369     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521370     3  0.1141     0.9157 0.000 0.000 0.948 0.000 0.000 0.052
#> SRR1521371     6  0.1168     0.8592 0.016 0.000 0.000 0.028 0.000 0.956
#> SRR1521372     6  0.0458     0.8459 0.000 0.000 0.000 0.016 0.000 0.984
#> SRR1521373     2  0.1714     0.8666 0.000 0.908 0.000 0.000 0.000 0.092
#> SRR1521374     2  0.0458     0.9134 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1521375     2  0.1714     0.8666 0.000 0.908 0.000 0.000 0.000 0.092
#> SRR1521376     2  0.5974     0.2047 0.000 0.428 0.336 0.000 0.000 0.236
#> SRR1521377     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521379     2  0.5974     0.2047 0.000 0.428 0.336 0.000 0.000 0.236
#> SRR1521380     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.1411     0.8581 0.004 0.000 0.000 0.060 0.000 0.936
#> SRR1521382     2  0.1714     0.8666 0.000 0.908 0.000 0.000 0.000 0.092
#> SRR1521383     4  0.4168     0.6825 0.048 0.000 0.000 0.696 0.000 0.256
#> SRR1521384     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     4  0.1556     0.8836 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR1521387     2  0.0458     0.9134 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR1521386     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521388     4  0.0000     0.8536 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000     0.8536 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0000     0.8536 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521391     6  0.3253     0.7297 0.000 0.000 0.000 0.020 0.192 0.788
#> SRR1521392     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521393     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521394     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521395     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521396     5  0.0000     1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521397     1  0.3470     0.7249 0.796 0.000 0.000 0.052 0.000 0.152
#> SRR1521398     6  0.0547     0.8447 0.000 0.000 0.000 0.020 0.000 0.980
#> SRR1521399     6  0.1524     0.8582 0.008 0.000 0.000 0.060 0.000 0.932
#> SRR1521400     6  0.1411     0.8581 0.004 0.000 0.000 0.060 0.000 0.936
#> SRR1521401     6  0.1141     0.8588 0.000 0.000 0.000 0.052 0.000 0.948
#> SRR1521403     6  0.1327     0.8570 0.000 0.000 0.000 0.064 0.000 0.936
#> SRR1521402     6  0.1524     0.8582 0.008 0.000 0.000 0.060 0.000 0.932
#> SRR1521405     4  0.0000     0.8536 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521406     1  0.0000     0.8857 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.2854     0.7836 0.000 0.000 0.000 0.792 0.000 0.208
#> SRR1521408     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521407     6  0.0508     0.8488 0.012 0.000 0.000 0.004 0.000 0.984
#> SRR1521409     6  0.5083     0.3299 0.000 0.116 0.000 0.280 0.000 0.604
#> SRR1521410     6  0.5501     0.3643 0.336 0.000 0.000 0.144 0.000 0.520
#> SRR1521411     1  0.3710     0.5788 0.696 0.000 0.000 0.012 0.000 0.292
#> SRR1521412     6  0.0547     0.8547 0.000 0.000 0.000 0.020 0.000 0.980
#> SRR1521414     6  0.2511     0.8304 0.064 0.000 0.000 0.056 0.000 0.880
#> SRR1521413     1  0.1387     0.8549 0.932 0.000 0.000 0.000 0.000 0.068
#> SRR1521415     6  0.1908     0.8532 0.028 0.000 0.000 0.056 0.000 0.916
#> SRR1521416     1  0.0000     0.8857 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8857 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0820     0.8761 0.972 0.000 0.000 0.012 0.000 0.016
#> SRR1521419     1  0.0000     0.8857 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.5066     0.4456 0.608 0.000 0.000 0.116 0.000 0.276
#> SRR1521421     6  0.3834     0.6099 0.268 0.000 0.000 0.024 0.000 0.708
#> SRR1521422     1  0.0000     0.8857 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.1556     0.8836 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR1521423     1  0.0000     0.8857 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.1556     0.8836 0.000 0.000 0.000 0.920 0.000 0.080
#> SRR1521427     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.6053     0.0795 0.272 0.000 0.000 0.320 0.000 0.408
#> SRR1521428     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.2214     0.8545 0.000 0.888 0.016 0.000 0.000 0.096
#> SRR1521437     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000     0.9716 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9190 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 5.
#> 
#> Following methods can be applied to this 'ConsensusPartition' object:
#>  [1] "cola_report"             "collect_classes"         "collect_plots"          
#>  [4] "collect_stats"           "colnames"                "compare_signatures"     
#>  [7] "consensus_heatmap"       "dimension_reduction"     "functional_enrichment"  
#> [10] "get_anno_col"            "get_anno"                "get_classes"            
#> [13] "get_consensus"           "get_matrix"              "get_membership"         
#> [16] "get_param"               "get_signatures"          "get_stats"              
#> [19] "is_best_k"               "is_stable_k"             "membership_heatmap"     
#> [22] "ncol"                    "nrow"                    "plot_ecdf"              
#> [25] "rownames"                "select_partition_number" "show"                   
#> [28] "suggest_best_k"          "test_to_known_factors"

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

collect_plots(res)

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.978       0.990         0.4943 0.504   0.504
#> 3 3 0.893           0.850       0.943         0.3452 0.786   0.593
#> 4 4 0.854           0.835       0.922         0.1189 0.758   0.414
#> 5 5 0.917           0.901       0.946         0.0609 0.914   0.686
#> 6 6 0.881           0.754       0.872         0.0329 0.944   0.751

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

suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2

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
#> SRR1521352     1   0.000      0.996 1.000 0.000
#> SRR1521353     1   0.224      0.960 0.964 0.036
#> SRR1521354     1   0.000      0.996 1.000 0.000
#> SRR1521355     1   0.000      0.996 1.000 0.000
#> SRR1521356     1   0.000      0.996 1.000 0.000
#> SRR1521357     2   0.000      0.982 0.000 1.000
#> SRR1521358     2   0.000      0.982 0.000 1.000
#> SRR1521359     1   0.000      0.996 1.000 0.000
#> SRR1521360     2   0.939      0.450 0.356 0.644
#> SRR1521361     1   0.000      0.996 1.000 0.000
#> SRR1521362     1   0.000      0.996 1.000 0.000
#> SRR1521363     2   0.000      0.982 0.000 1.000
#> SRR1521364     2   0.000      0.982 0.000 1.000
#> SRR1521365     2   0.000      0.982 0.000 1.000
#> SRR1521366     2   0.000      0.982 0.000 1.000
#> SRR1521368     2   0.000      0.982 0.000 1.000
#> SRR1521369     2   0.000      0.982 0.000 1.000
#> SRR1521370     1   0.000      0.996 1.000 0.000
#> SRR1521371     1   0.000      0.996 1.000 0.000
#> SRR1521372     1   0.000      0.996 1.000 0.000
#> SRR1521373     2   0.000      0.982 0.000 1.000
#> SRR1521374     2   0.000      0.982 0.000 1.000
#> SRR1521375     2   0.000      0.982 0.000 1.000
#> SRR1521376     2   0.000      0.982 0.000 1.000
#> SRR1521377     2   0.000      0.982 0.000 1.000
#> SRR1521378     2   0.714      0.761 0.196 0.804
#> SRR1521379     2   0.000      0.982 0.000 1.000
#> SRR1521380     2   0.000      0.982 0.000 1.000
#> SRR1521381     1   0.000      0.996 1.000 0.000
#> SRR1521382     2   0.000      0.982 0.000 1.000
#> SRR1521383     1   0.000      0.996 1.000 0.000
#> SRR1521384     2   0.000      0.982 0.000 1.000
#> SRR1521385     1   0.000      0.996 1.000 0.000
#> SRR1521387     2   0.000      0.982 0.000 1.000
#> SRR1521386     2   0.605      0.826 0.148 0.852
#> SRR1521388     1   0.000      0.996 1.000 0.000
#> SRR1521389     1   0.000      0.996 1.000 0.000
#> SRR1521390     1   0.000      0.996 1.000 0.000
#> SRR1521391     1   0.000      0.996 1.000 0.000
#> SRR1521392     1   0.000      0.996 1.000 0.000
#> SRR1521393     1   0.000      0.996 1.000 0.000
#> SRR1521394     1   0.000      0.996 1.000 0.000
#> SRR1521395     1   0.000      0.996 1.000 0.000
#> SRR1521396     1   0.000      0.996 1.000 0.000
#> SRR1521397     1   0.000      0.996 1.000 0.000
#> SRR1521398     1   0.000      0.996 1.000 0.000
#> SRR1521399     1   0.000      0.996 1.000 0.000
#> SRR1521400     1   0.000      0.996 1.000 0.000
#> SRR1521401     1   0.000      0.996 1.000 0.000
#> SRR1521403     1   0.000      0.996 1.000 0.000
#> SRR1521402     1   0.000      0.996 1.000 0.000
#> SRR1521405     1   0.000      0.996 1.000 0.000
#> SRR1521406     1   0.000      0.996 1.000 0.000
#> SRR1521404     1   0.000      0.996 1.000 0.000
#> SRR1521408     1   0.000      0.996 1.000 0.000
#> SRR1521407     1   0.000      0.996 1.000 0.000
#> SRR1521409     1   0.615      0.818 0.848 0.152
#> SRR1521410     1   0.000      0.996 1.000 0.000
#> SRR1521411     1   0.000      0.996 1.000 0.000
#> SRR1521412     1   0.000      0.996 1.000 0.000
#> SRR1521414     1   0.000      0.996 1.000 0.000
#> SRR1521413     1   0.000      0.996 1.000 0.000
#> SRR1521415     1   0.000      0.996 1.000 0.000
#> SRR1521416     1   0.000      0.996 1.000 0.000
#> SRR1521417     1   0.000      0.996 1.000 0.000
#> SRR1521418     1   0.000      0.996 1.000 0.000
#> SRR1521419     1   0.000      0.996 1.000 0.000
#> SRR1521420     1   0.000      0.996 1.000 0.000
#> SRR1521421     1   0.000      0.996 1.000 0.000
#> SRR1521422     1   0.000      0.996 1.000 0.000
#> SRR1521424     1   0.000      0.996 1.000 0.000
#> SRR1521423     1   0.000      0.996 1.000 0.000
#> SRR1521426     1   0.000      0.996 1.000 0.000
#> SRR1521427     2   0.000      0.982 0.000 1.000
#> SRR1521425     1   0.000      0.996 1.000 0.000
#> SRR1521428     2   0.000      0.982 0.000 1.000
#> SRR1521430     2   0.000      0.982 0.000 1.000
#> SRR1521429     2   0.000      0.982 0.000 1.000
#> SRR1521432     2   0.000      0.982 0.000 1.000
#> SRR1521433     2   0.000      0.982 0.000 1.000
#> SRR1521434     2   0.000      0.982 0.000 1.000
#> SRR1521435     2   0.000      0.982 0.000 1.000
#> SRR1521436     2   0.000      0.982 0.000 1.000
#> SRR1521437     2   0.000      0.982 0.000 1.000
#> SRR1521431     2   0.000      0.982 0.000 1.000
#> SRR1521438     2   0.000      0.982 0.000 1.000
#> SRR1521439     2   0.000      0.982 0.000 1.000
#> SRR1521440     2   0.000      0.982 0.000 1.000
#> SRR1521441     2   0.000      0.982 0.000 1.000
#> SRR1521443     2   0.000      0.982 0.000 1.000
#> SRR1521442     2   0.000      0.982 0.000 1.000
#> SRR1521444     2   0.000      0.982 0.000 1.000
#> SRR1521445     2   0.000      0.982 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
#> SRR1521352     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521353     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521354     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521355     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521356     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521357     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521358     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521359     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521360     3  0.6126     0.2397 0.000 0.400 0.600
#> SRR1521361     3  0.4784     0.7147 0.200 0.004 0.796
#> SRR1521362     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521363     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521364     2  0.5905     0.4805 0.000 0.648 0.352
#> SRR1521365     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521366     3  0.6252     0.0953 0.000 0.444 0.556
#> SRR1521368     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521369     3  0.0237     0.8983 0.000 0.004 0.996
#> SRR1521370     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521371     1  0.6154     0.3110 0.592 0.000 0.408
#> SRR1521372     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521373     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521374     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521375     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521376     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521377     2  0.6168     0.3433 0.000 0.588 0.412
#> SRR1521378     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521379     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521380     2  0.5216     0.6446 0.000 0.740 0.260
#> SRR1521381     3  0.1860     0.8710 0.052 0.000 0.948
#> SRR1521382     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521383     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521384     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521385     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521387     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521386     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521388     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521389     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521390     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521391     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521392     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521393     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521394     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521395     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521396     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521397     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521398     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521399     3  0.0424     0.8971 0.008 0.000 0.992
#> SRR1521400     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521401     3  0.1753     0.8710 0.048 0.000 0.952
#> SRR1521403     1  0.0424     0.9477 0.992 0.000 0.008
#> SRR1521402     3  0.1411     0.8807 0.036 0.000 0.964
#> SRR1521405     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521406     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521404     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521408     3  0.0000     0.9008 0.000 0.000 1.000
#> SRR1521407     3  0.6244     0.2581 0.440 0.000 0.560
#> SRR1521409     1  0.6267     0.1384 0.548 0.452 0.000
#> SRR1521410     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521411     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521412     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521414     1  0.6274     0.1668 0.544 0.000 0.456
#> SRR1521413     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521415     3  0.6154     0.2337 0.408 0.000 0.592
#> SRR1521416     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521417     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521418     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521419     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521420     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521421     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521422     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521424     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521423     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521426     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521427     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521425     1  0.0000     0.9552 1.000 0.000 0.000
#> SRR1521428     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521430     2  0.0237     0.9358 0.000 0.996 0.004
#> SRR1521429     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521432     2  0.6215     0.2994 0.000 0.572 0.428
#> SRR1521433     2  0.0892     0.9248 0.000 0.980 0.020
#> SRR1521434     2  0.1031     0.9216 0.000 0.976 0.024
#> SRR1521435     2  0.0892     0.9248 0.000 0.980 0.020
#> SRR1521436     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521437     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521431     2  0.6126     0.3736 0.000 0.600 0.400
#> SRR1521438     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521439     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521440     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521441     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521443     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521442     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521444     2  0.0000     0.9383 0.000 1.000 0.000
#> SRR1521445     2  0.0000     0.9383 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
#> SRR1521352     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521353     3  0.0000     0.8957 0.000 0.000 1.000 0.000
#> SRR1521354     3  0.0000     0.8957 0.000 0.000 1.000 0.000
#> SRR1521355     4  0.4955    -0.0470 0.444 0.000 0.000 0.556
#> SRR1521356     4  0.4972    -0.0963 0.456 0.000 0.000 0.544
#> SRR1521357     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521360     3  0.0592     0.8985 0.000 0.016 0.984 0.000
#> SRR1521361     3  0.1824     0.8636 0.000 0.004 0.936 0.060
#> SRR1521362     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521363     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521364     3  0.2345     0.8596 0.000 0.100 0.900 0.000
#> SRR1521365     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0592     0.8985 0.000 0.016 0.984 0.000
#> SRR1521368     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000     0.8957 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.0000     0.8957 0.000 0.000 1.000 0.000
#> SRR1521371     1  0.0000     0.8286 1.000 0.000 0.000 0.000
#> SRR1521372     1  0.0188     0.8283 0.996 0.004 0.000 0.000
#> SRR1521373     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521376     2  0.1118     0.9518 0.000 0.964 0.036 0.000
#> SRR1521377     3  0.0707     0.8981 0.000 0.020 0.980 0.000
#> SRR1521378     3  0.0000     0.8957 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521380     3  0.1022     0.8943 0.000 0.032 0.968 0.000
#> SRR1521381     3  0.7254     0.0247 0.148 0.000 0.468 0.384
#> SRR1521382     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521384     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521387     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0000     0.8957 0.000 0.000 1.000 0.000
#> SRR1521388     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521389     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521390     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521391     1  0.1022     0.8223 0.968 0.000 0.032 0.000
#> SRR1521392     1  0.1022     0.8223 0.968 0.000 0.032 0.000
#> SRR1521393     1  0.1022     0.8223 0.968 0.000 0.032 0.000
#> SRR1521394     1  0.1022     0.8223 0.968 0.000 0.032 0.000
#> SRR1521395     1  0.1022     0.8223 0.968 0.000 0.032 0.000
#> SRR1521396     1  0.1022     0.8223 0.968 0.000 0.032 0.000
#> SRR1521397     1  0.4624     0.6202 0.660 0.000 0.000 0.340
#> SRR1521398     1  0.0336     0.8299 0.992 0.000 0.000 0.008
#> SRR1521399     1  0.0000     0.8286 1.000 0.000 0.000 0.000
#> SRR1521400     1  0.1022     0.8223 0.968 0.000 0.032 0.000
#> SRR1521401     1  0.0592     0.8261 0.984 0.000 0.016 0.000
#> SRR1521403     1  0.4222     0.7109 0.728 0.000 0.000 0.272
#> SRR1521402     1  0.0000     0.8286 1.000 0.000 0.000 0.000
#> SRR1521405     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521406     1  0.3123     0.7917 0.844 0.000 0.000 0.156
#> SRR1521404     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.0000     0.8957 0.000 0.000 1.000 0.000
#> SRR1521407     3  0.5080     0.2679 0.004 0.000 0.576 0.420
#> SRR1521409     2  0.3801     0.7287 0.000 0.780 0.000 0.220
#> SRR1521410     4  0.2081     0.8417 0.084 0.000 0.000 0.916
#> SRR1521411     1  0.3975     0.7399 0.760 0.000 0.000 0.240
#> SRR1521412     1  0.3311     0.7850 0.828 0.000 0.000 0.172
#> SRR1521414     1  0.0336     0.8298 0.992 0.000 0.000 0.008
#> SRR1521413     1  0.3569     0.7719 0.804 0.000 0.000 0.196
#> SRR1521415     1  0.0336     0.8298 0.992 0.000 0.000 0.008
#> SRR1521416     1  0.4222     0.7112 0.728 0.000 0.000 0.272
#> SRR1521417     1  0.4661     0.6044 0.652 0.000 0.000 0.348
#> SRR1521418     1  0.3486     0.7767 0.812 0.000 0.000 0.188
#> SRR1521419     1  0.4277     0.7024 0.720 0.000 0.000 0.280
#> SRR1521420     4  0.1637     0.8629 0.060 0.000 0.000 0.940
#> SRR1521421     1  0.4866     0.4898 0.596 0.000 0.000 0.404
#> SRR1521422     1  0.4830     0.5176 0.608 0.000 0.000 0.392
#> SRR1521424     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521423     1  0.4585     0.6311 0.668 0.000 0.000 0.332
#> SRR1521426     4  0.0000     0.9152 0.000 0.000 0.000 1.000
#> SRR1521427     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.0707     0.9015 0.020 0.000 0.000 0.980
#> SRR1521428     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.4500     0.5883 0.000 0.316 0.684 0.000
#> SRR1521429     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0592     0.8985 0.000 0.016 0.984 0.000
#> SRR1521433     3  0.1867     0.8781 0.000 0.072 0.928 0.000
#> SRR1521434     3  0.1716     0.8822 0.000 0.064 0.936 0.000
#> SRR1521435     3  0.2149     0.8683 0.000 0.088 0.912 0.000
#> SRR1521436     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0707     0.8981 0.000 0.020 0.980 0.000
#> SRR1521438     3  0.4103     0.6874 0.000 0.256 0.744 0.000
#> SRR1521439     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9894 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9894 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0000      0.908 0.000 0.000 0.000 1.000 0.000
#> SRR1521353     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1  0.1043      0.903 0.960 0.000 0.000 0.000 0.040
#> SRR1521356     1  0.1121      0.901 0.956 0.000 0.000 0.000 0.044
#> SRR1521357     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.0000      0.908 0.000 0.000 0.000 1.000 0.000
#> SRR1521360     3  0.0794      0.906 0.000 0.000 0.972 0.028 0.000
#> SRR1521361     3  0.2074      0.840 0.000 0.000 0.896 0.104 0.000
#> SRR1521362     4  0.2522      0.885 0.052 0.000 0.000 0.896 0.052
#> SRR1521363     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.1121      0.901 0.000 0.044 0.956 0.000 0.000
#> SRR1521365     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521371     1  0.4262      0.204 0.560 0.000 0.000 0.000 0.440
#> SRR1521372     1  0.1270      0.922 0.948 0.000 0.000 0.000 0.052
#> SRR1521373     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     2  0.1121      0.948 0.000 0.956 0.044 0.000 0.000
#> SRR1521377     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.0290      0.989 0.000 0.992 0.000 0.008 0.000
#> SRR1521380     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     5  0.4171      0.307 0.000 0.000 0.000 0.396 0.604
#> SRR1521382     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.0000      0.908 0.000 0.000 0.000 1.000 0.000
#> SRR1521384     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.0000      0.908 0.000 0.000 0.000 1.000 0.000
#> SRR1521387     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.2522      0.885 0.052 0.000 0.000 0.896 0.052
#> SRR1521389     4  0.2522      0.885 0.052 0.000 0.000 0.896 0.052
#> SRR1521390     4  0.2522      0.885 0.052 0.000 0.000 0.896 0.052
#> SRR1521391     5  0.1270      0.948 0.052 0.000 0.000 0.000 0.948
#> SRR1521392     5  0.1270      0.948 0.052 0.000 0.000 0.000 0.948
#> SRR1521393     5  0.1270      0.948 0.052 0.000 0.000 0.000 0.948
#> SRR1521394     5  0.1270      0.948 0.052 0.000 0.000 0.000 0.948
#> SRR1521395     5  0.1270      0.948 0.052 0.000 0.000 0.000 0.948
#> SRR1521396     5  0.1270      0.948 0.052 0.000 0.000 0.000 0.948
#> SRR1521397     1  0.0162      0.923 0.996 0.000 0.000 0.000 0.004
#> SRR1521398     5  0.1341      0.945 0.056 0.000 0.000 0.000 0.944
#> SRR1521399     1  0.1270      0.922 0.948 0.000 0.000 0.000 0.052
#> SRR1521400     5  0.1270      0.948 0.052 0.000 0.000 0.000 0.948
#> SRR1521401     5  0.1732      0.921 0.080 0.000 0.000 0.000 0.920
#> SRR1521403     1  0.1357      0.923 0.948 0.000 0.000 0.004 0.048
#> SRR1521402     1  0.1270      0.922 0.948 0.000 0.000 0.000 0.052
#> SRR1521405     4  0.2522      0.885 0.052 0.000 0.000 0.896 0.052
#> SRR1521406     1  0.1270      0.922 0.948 0.000 0.000 0.000 0.052
#> SRR1521404     4  0.0000      0.908 0.000 0.000 0.000 1.000 0.000
#> SRR1521408     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     3  0.4249      0.284 0.000 0.000 0.568 0.432 0.000
#> SRR1521409     4  0.3427      0.702 0.000 0.012 0.000 0.796 0.192
#> SRR1521410     1  0.2074      0.887 0.896 0.000 0.000 0.104 0.000
#> SRR1521411     1  0.2074      0.887 0.896 0.000 0.000 0.104 0.000
#> SRR1521412     1  0.2074      0.887 0.896 0.000 0.000 0.104 0.000
#> SRR1521414     1  0.1270      0.922 0.948 0.000 0.000 0.000 0.052
#> SRR1521413     1  0.1557      0.916 0.940 0.000 0.000 0.052 0.008
#> SRR1521415     1  0.1270      0.922 0.948 0.000 0.000 0.000 0.052
#> SRR1521416     1  0.0290      0.924 0.992 0.000 0.000 0.000 0.008
#> SRR1521417     1  0.0000      0.922 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.1121      0.924 0.956 0.000 0.000 0.000 0.044
#> SRR1521419     1  0.0880      0.925 0.968 0.000 0.000 0.000 0.032
#> SRR1521420     4  0.3730      0.548 0.288 0.000 0.000 0.712 0.000
#> SRR1521421     1  0.2074      0.887 0.896 0.000 0.000 0.104 0.000
#> SRR1521422     1  0.0510      0.916 0.984 0.000 0.000 0.000 0.016
#> SRR1521424     4  0.0000      0.908 0.000 0.000 0.000 1.000 0.000
#> SRR1521423     1  0.0000      0.922 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.0000      0.908 0.000 0.000 0.000 1.000 0.000
#> SRR1521427     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.2891      0.818 0.824 0.000 0.000 0.176 0.000
#> SRR1521428     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.3999      0.521 0.000 0.344 0.656 0.000 0.000
#> SRR1521429     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.1121      0.900 0.000 0.044 0.956 0.000 0.000
#> SRR1521434     3  0.0880      0.908 0.000 0.032 0.968 0.000 0.000
#> SRR1521435     3  0.1341      0.891 0.000 0.056 0.944 0.000 0.000
#> SRR1521436     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.3586      0.660 0.000 0.264 0.736 0.000 0.000
#> SRR1521439     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.998 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.998 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.3996      0.422 0.004 0.000 0.000 0.484 0.000 0.512
#> SRR1521353     3  0.0260      0.916 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1521354     3  0.0665      0.910 0.000 0.000 0.980 0.004 0.008 0.008
#> SRR1521355     1  0.0260      0.776 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521356     1  0.0260      0.776 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521357     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.3996      0.422 0.004 0.000 0.000 0.484 0.000 0.512
#> SRR1521360     3  0.3810      0.163 0.000 0.000 0.572 0.000 0.000 0.428
#> SRR1521361     6  0.4147      0.177 0.000 0.000 0.436 0.012 0.000 0.552
#> SRR1521362     4  0.0260      0.845 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR1521363     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.1349      0.888 0.000 0.056 0.940 0.000 0.000 0.004
#> SRR1521365     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0146      0.917 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR1521368     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0260      0.916 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1521370     3  0.0146      0.917 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR1521371     1  0.3774      0.167 0.592 0.000 0.000 0.000 0.408 0.000
#> SRR1521372     1  0.4357      0.556 0.500 0.000 0.004 0.004 0.008 0.484
#> SRR1521373     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     2  0.2308      0.851 0.000 0.880 0.108 0.000 0.008 0.004
#> SRR1521377     3  0.0000      0.917 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.0000      0.917 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521379     2  0.2527      0.782 0.000 0.832 0.000 0.000 0.000 0.168
#> SRR1521380     3  0.0146      0.917 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR1521381     6  0.5342      0.341 0.004 0.000 0.000 0.096 0.388 0.512
#> SRR1521382     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     4  0.3982     -0.438 0.004 0.000 0.000 0.536 0.000 0.460
#> SRR1521384     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.3996      0.422 0.004 0.000 0.000 0.484 0.000 0.512
#> SRR1521387     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000      0.917 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521388     4  0.0260      0.845 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR1521389     4  0.0260      0.845 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR1521390     4  0.0260      0.845 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR1521391     5  0.0260      0.846 0.008 0.000 0.000 0.000 0.992 0.000
#> SRR1521392     5  0.0363      0.849 0.012 0.000 0.000 0.000 0.988 0.000
#> SRR1521393     5  0.0458      0.851 0.016 0.000 0.000 0.000 0.984 0.000
#> SRR1521394     5  0.0458      0.851 0.016 0.000 0.000 0.000 0.984 0.000
#> SRR1521395     5  0.0458      0.851 0.016 0.000 0.000 0.000 0.984 0.000
#> SRR1521396     5  0.0458      0.851 0.016 0.000 0.000 0.000 0.984 0.000
#> SRR1521397     1  0.0000      0.778 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     5  0.2985      0.747 0.056 0.000 0.000 0.000 0.844 0.100
#> SRR1521399     1  0.4226      0.557 0.504 0.000 0.000 0.004 0.008 0.484
#> SRR1521400     5  0.4032      0.514 0.008 0.000 0.000 0.000 0.572 0.420
#> SRR1521401     5  0.4314      0.436 0.012 0.000 0.000 0.004 0.500 0.484
#> SRR1521403     1  0.0000      0.778 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521402     1  0.4127      0.559 0.508 0.000 0.000 0.004 0.004 0.484
#> SRR1521405     4  0.0260      0.845 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR1521406     1  0.1327      0.764 0.936 0.000 0.000 0.000 0.000 0.064
#> SRR1521404     6  0.3996      0.422 0.004 0.000 0.000 0.484 0.000 0.512
#> SRR1521408     3  0.0260      0.916 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1521407     6  0.2902      0.536 0.000 0.000 0.004 0.196 0.000 0.800
#> SRR1521409     6  0.6702      0.407 0.004 0.084 0.000 0.256 0.144 0.512
#> SRR1521410     6  0.2221      0.486 0.032 0.000 0.000 0.072 0.000 0.896
#> SRR1521411     1  0.3869      0.549 0.500 0.000 0.000 0.000 0.000 0.500
#> SRR1521412     6  0.0692      0.465 0.020 0.000 0.000 0.000 0.004 0.976
#> SRR1521414     1  0.4127      0.559 0.508 0.000 0.000 0.004 0.004 0.484
#> SRR1521413     1  0.2664      0.719 0.816 0.000 0.000 0.000 0.000 0.184
#> SRR1521415     1  0.4226      0.557 0.504 0.000 0.000 0.004 0.008 0.484
#> SRR1521416     1  0.0000      0.778 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0146      0.777 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521418     1  0.0000      0.778 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.778 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     6  0.3426      0.528 0.004 0.000 0.000 0.276 0.000 0.720
#> SRR1521421     6  0.0363      0.469 0.012 0.000 0.000 0.000 0.000 0.988
#> SRR1521422     1  0.0260      0.776 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521424     6  0.3996      0.422 0.004 0.000 0.000 0.484 0.000 0.512
#> SRR1521423     1  0.0146      0.777 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521426     6  0.3996      0.422 0.004 0.000 0.000 0.484 0.000 0.512
#> SRR1521427     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.2278      0.527 0.004 0.000 0.000 0.128 0.000 0.868
#> SRR1521428     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.3791      0.585 0.000 0.300 0.688 0.000 0.008 0.004
#> SRR1521429     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0260      0.916 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1521433     3  0.1477      0.893 0.000 0.048 0.940 0.000 0.008 0.004
#> SRR1521434     3  0.1194      0.903 0.000 0.032 0.956 0.000 0.008 0.004
#> SRR1521435     3  0.1477      0.893 0.000 0.048 0.940 0.000 0.008 0.004
#> SRR1521436     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0260      0.916 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1521438     3  0.3243      0.714 0.000 0.208 0.780 0.000 0.008 0.004
#> SRR1521439     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.986 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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.889           0.936       0.968         0.5014 0.497   0.497
#> 3 3 0.886           0.921       0.961         0.2397 0.897   0.792
#> 4 4 0.734           0.762       0.816         0.1725 0.860   0.644
#> 5 5 0.771           0.795       0.873         0.0577 0.971   0.885
#> 6 6 0.848           0.801       0.850         0.0351 0.950   0.781

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
#> SRR1521352     1  0.0000      0.942 1.000 0.000
#> SRR1521353     2  0.0376      0.994 0.004 0.996
#> SRR1521354     2  0.0376      0.994 0.004 0.996
#> SRR1521355     1  0.0000      0.942 1.000 0.000
#> SRR1521356     1  0.0000      0.942 1.000 0.000
#> SRR1521357     2  0.0000      0.995 0.000 1.000
#> SRR1521358     2  0.0000      0.995 0.000 1.000
#> SRR1521359     1  0.7745      0.743 0.772 0.228
#> SRR1521360     1  0.9044      0.605 0.680 0.320
#> SRR1521361     1  0.9044      0.605 0.680 0.320
#> SRR1521362     1  0.2948      0.913 0.948 0.052
#> SRR1521363     2  0.0000      0.995 0.000 1.000
#> SRR1521364     2  0.0376      0.994 0.004 0.996
#> SRR1521365     2  0.0000      0.995 0.000 1.000
#> SRR1521366     2  0.0376      0.994 0.004 0.996
#> SRR1521368     2  0.0000      0.995 0.000 1.000
#> SRR1521369     2  0.0376      0.994 0.004 0.996
#> SRR1521370     2  0.0376      0.994 0.004 0.996
#> SRR1521371     1  0.0000      0.942 1.000 0.000
#> SRR1521372     1  0.6531      0.813 0.832 0.168
#> SRR1521373     2  0.0000      0.995 0.000 1.000
#> SRR1521374     2  0.0000      0.995 0.000 1.000
#> SRR1521375     2  0.0000      0.995 0.000 1.000
#> SRR1521376     2  0.0000      0.995 0.000 1.000
#> SRR1521377     2  0.0376      0.994 0.004 0.996
#> SRR1521378     2  0.0376      0.994 0.004 0.996
#> SRR1521379     2  0.0000      0.995 0.000 1.000
#> SRR1521380     2  0.0376      0.994 0.004 0.996
#> SRR1521381     1  0.9044      0.605 0.680 0.320
#> SRR1521382     2  0.0000      0.995 0.000 1.000
#> SRR1521383     1  0.0000      0.942 1.000 0.000
#> SRR1521384     2  0.0000      0.995 0.000 1.000
#> SRR1521385     1  0.0000      0.942 1.000 0.000
#> SRR1521387     2  0.0000      0.995 0.000 1.000
#> SRR1521386     2  0.0376      0.994 0.004 0.996
#> SRR1521388     1  0.0000      0.942 1.000 0.000
#> SRR1521389     1  0.0000      0.942 1.000 0.000
#> SRR1521390     1  0.0000      0.942 1.000 0.000
#> SRR1521391     1  0.8207      0.706 0.744 0.256
#> SRR1521392     1  0.1843      0.932 0.972 0.028
#> SRR1521393     1  0.1843      0.932 0.972 0.028
#> SRR1521394     1  0.1843      0.932 0.972 0.028
#> SRR1521395     1  0.1843      0.932 0.972 0.028
#> SRR1521396     1  0.1843      0.932 0.972 0.028
#> SRR1521397     1  0.0000      0.942 1.000 0.000
#> SRR1521398     1  0.0000      0.942 1.000 0.000
#> SRR1521399     1  0.0000      0.942 1.000 0.000
#> SRR1521400     1  0.1843      0.932 0.972 0.028
#> SRR1521401     1  0.1843      0.932 0.972 0.028
#> SRR1521403     1  0.6531      0.813 0.832 0.168
#> SRR1521402     1  0.1633      0.934 0.976 0.024
#> SRR1521405     1  0.0000      0.942 1.000 0.000
#> SRR1521406     1  0.0000      0.942 1.000 0.000
#> SRR1521404     1  0.0672      0.940 0.992 0.008
#> SRR1521408     2  0.5178      0.857 0.116 0.884
#> SRR1521407     1  0.8763      0.645 0.704 0.296
#> SRR1521409     1  0.9833      0.369 0.576 0.424
#> SRR1521410     1  0.0000      0.942 1.000 0.000
#> SRR1521411     1  0.0000      0.942 1.000 0.000
#> SRR1521412     1  0.0000      0.942 1.000 0.000
#> SRR1521414     1  0.0000      0.942 1.000 0.000
#> SRR1521413     1  0.0000      0.942 1.000 0.000
#> SRR1521415     1  0.0000      0.942 1.000 0.000
#> SRR1521416     1  0.0000      0.942 1.000 0.000
#> SRR1521417     1  0.0000      0.942 1.000 0.000
#> SRR1521418     1  0.0000      0.942 1.000 0.000
#> SRR1521419     1  0.0000      0.942 1.000 0.000
#> SRR1521420     1  0.0672      0.940 0.992 0.008
#> SRR1521421     1  0.0000      0.942 1.000 0.000
#> SRR1521422     1  0.0000      0.942 1.000 0.000
#> SRR1521424     1  0.0000      0.942 1.000 0.000
#> SRR1521423     1  0.0000      0.942 1.000 0.000
#> SRR1521426     1  0.0000      0.942 1.000 0.000
#> SRR1521427     2  0.0000      0.995 0.000 1.000
#> SRR1521425     1  0.0000      0.942 1.000 0.000
#> SRR1521428     2  0.0000      0.995 0.000 1.000
#> SRR1521430     2  0.0376      0.994 0.004 0.996
#> SRR1521429     2  0.0000      0.995 0.000 1.000
#> SRR1521432     2  0.0376      0.994 0.004 0.996
#> SRR1521433     2  0.0376      0.994 0.004 0.996
#> SRR1521434     2  0.0376      0.994 0.004 0.996
#> SRR1521435     2  0.0376      0.994 0.004 0.996
#> SRR1521436     2  0.0000      0.995 0.000 1.000
#> SRR1521437     2  0.0000      0.995 0.000 1.000
#> SRR1521431     2  0.0376      0.994 0.004 0.996
#> SRR1521438     2  0.0000      0.995 0.000 1.000
#> SRR1521439     2  0.0000      0.995 0.000 1.000
#> SRR1521440     2  0.0000      0.995 0.000 1.000
#> SRR1521441     2  0.0000      0.995 0.000 1.000
#> SRR1521443     2  0.0000      0.995 0.000 1.000
#> SRR1521442     2  0.0000      0.995 0.000 1.000
#> SRR1521444     2  0.0000      0.995 0.000 1.000
#> SRR1521445     2  0.0000      0.995 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
#> SRR1521352     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521353     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521359     1  0.4931      0.738 0.768 0.000 0.232
#> SRR1521360     1  0.5733      0.600 0.676 0.000 0.324
#> SRR1521361     1  0.5733      0.600 0.676 0.000 0.324
#> SRR1521362     1  0.1860      0.911 0.948 0.000 0.052
#> SRR1521363     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521364     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521365     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521366     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521368     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521369     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521370     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521372     1  0.4178      0.809 0.828 0.000 0.172
#> SRR1521373     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521376     2  0.4002      0.811 0.000 0.840 0.160
#> SRR1521377     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521378     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521379     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521380     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521381     1  0.5733      0.600 0.676 0.000 0.324
#> SRR1521382     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521383     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521386     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521388     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521391     1  0.5216      0.702 0.740 0.000 0.260
#> SRR1521392     1  0.1163      0.931 0.972 0.000 0.028
#> SRR1521393     1  0.1163      0.931 0.972 0.000 0.028
#> SRR1521394     1  0.1163      0.931 0.972 0.000 0.028
#> SRR1521395     1  0.1163      0.931 0.972 0.000 0.028
#> SRR1521396     1  0.1163      0.931 0.972 0.000 0.028
#> SRR1521397     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521399     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521400     1  0.1163      0.931 0.972 0.000 0.028
#> SRR1521401     1  0.1163      0.931 0.972 0.000 0.028
#> SRR1521403     1  0.4178      0.809 0.828 0.000 0.172
#> SRR1521402     1  0.1031      0.933 0.976 0.000 0.024
#> SRR1521405     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521404     1  0.0424      0.939 0.992 0.000 0.008
#> SRR1521408     3  0.3192      0.850 0.112 0.000 0.888
#> SRR1521407     1  0.5560      0.640 0.700 0.000 0.300
#> SRR1521409     1  0.8915      0.448 0.572 0.212 0.216
#> SRR1521410     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521420     1  0.0592      0.937 0.988 0.000 0.012
#> SRR1521421     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.942 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521430     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521429     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521432     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521433     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521434     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521435     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521436     2  0.3879      0.821 0.000 0.848 0.152
#> SRR1521437     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521431     3  0.0000      0.991 0.000 0.000 1.000
#> SRR1521438     2  0.5785      0.522 0.000 0.668 0.332
#> SRR1521439     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.973 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
#> SRR1521352     4   0.357      0.640 0.196 0.000 0.000 0.804
#> SRR1521353     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521354     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521355     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521356     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521357     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521358     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521359     1   0.756      0.448 0.460 0.000 0.204 0.336
#> SRR1521360     1   0.766      0.452 0.460 0.000 0.296 0.244
#> SRR1521361     1   0.766      0.452 0.460 0.000 0.296 0.244
#> SRR1521362     4   0.597      0.425 0.368 0.000 0.048 0.584
#> SRR1521363     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521364     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521365     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521366     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521368     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521369     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521370     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521371     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521372     1   0.636      0.635 0.652 0.000 0.144 0.204
#> SRR1521373     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521374     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521375     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521376     2   0.317      0.811 0.000 0.840 0.160 0.000
#> SRR1521377     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521378     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521379     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521380     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521381     1   0.766      0.452 0.460 0.000 0.296 0.244
#> SRR1521382     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521383     4   0.312      0.636 0.156 0.000 0.000 0.844
#> SRR1521384     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521385     4   0.361      0.637 0.200 0.000 0.000 0.800
#> SRR1521387     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521386     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521388     4   0.468      0.469 0.352 0.000 0.000 0.648
#> SRR1521389     4   0.468      0.469 0.352 0.000 0.000 0.648
#> SRR1521390     4   0.468      0.469 0.352 0.000 0.000 0.648
#> SRR1521391     1   0.711      0.593 0.564 0.000 0.232 0.204
#> SRR1521392     1   0.468      0.663 0.648 0.000 0.000 0.352
#> SRR1521393     1   0.468      0.663 0.648 0.000 0.000 0.352
#> SRR1521394     1   0.468      0.663 0.648 0.000 0.000 0.352
#> SRR1521395     1   0.468      0.663 0.648 0.000 0.000 0.352
#> SRR1521396     1   0.468      0.663 0.648 0.000 0.000 0.352
#> SRR1521397     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521398     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521399     1   0.483      0.615 0.608 0.000 0.000 0.392
#> SRR1521400     1   0.468      0.663 0.648 0.000 0.000 0.352
#> SRR1521401     1   0.468      0.663 0.648 0.000 0.000 0.352
#> SRR1521403     1   0.636      0.635 0.652 0.000 0.144 0.204
#> SRR1521402     1   0.470      0.659 0.644 0.000 0.000 0.356
#> SRR1521405     4   0.468      0.469 0.352 0.000 0.000 0.648
#> SRR1521406     4   0.380      0.504 0.220 0.000 0.000 0.780
#> SRR1521404     4   0.387      0.626 0.208 0.000 0.004 0.788
#> SRR1521408     3   0.286      0.838 0.096 0.000 0.888 0.016
#> SRR1521407     1   0.768      0.451 0.460 0.000 0.272 0.268
#> SRR1521409     1   0.984      0.348 0.344 0.212 0.216 0.228
#> SRR1521410     4   0.194      0.680 0.076 0.000 0.000 0.924
#> SRR1521411     4   0.179      0.682 0.068 0.000 0.000 0.932
#> SRR1521412     4   0.179      0.682 0.068 0.000 0.000 0.932
#> SRR1521414     1   0.483      0.615 0.608 0.000 0.000 0.392
#> SRR1521413     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521415     1   0.483      0.615 0.608 0.000 0.000 0.392
#> SRR1521416     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521417     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521418     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521419     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521420     4   0.535     -0.307 0.432 0.000 0.012 0.556
#> SRR1521421     4   0.307      0.634 0.152 0.000 0.000 0.848
#> SRR1521422     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521424     4   0.361      0.637 0.200 0.000 0.000 0.800
#> SRR1521423     4   0.241      0.701 0.104 0.000 0.000 0.896
#> SRR1521426     4   0.361      0.637 0.200 0.000 0.000 0.800
#> SRR1521427     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521425     4   0.307      0.640 0.152 0.000 0.000 0.848
#> SRR1521428     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521430     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521429     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521432     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521433     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521434     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521435     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521436     2   0.307      0.820 0.000 0.848 0.152 0.000
#> SRR1521437     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521431     3   0.000      0.991 0.000 0.000 1.000 0.000
#> SRR1521438     2   0.458      0.525 0.000 0.668 0.332 0.000
#> SRR1521439     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521440     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521441     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521443     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521442     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521444     2   0.000      0.973 0.000 1.000 0.000 0.000
#> SRR1521445     2   0.000      0.973 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     1  0.4069     0.6016 0.792 0.000 0.000 0.096 0.112
#> SRR1521353     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521356     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521357     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     5  0.6448     0.3923 0.348 0.000 0.188 0.000 0.464
#> SRR1521360     5  0.6596     0.4547 0.256 0.000 0.280 0.000 0.464
#> SRR1521361     5  0.6596     0.4547 0.256 0.000 0.280 0.000 0.464
#> SRR1521362     4  0.3563     0.8350 0.032 0.000 0.044 0.852 0.072
#> SRR1521363     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521371     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521372     5  0.3106     0.6728 0.024 0.000 0.132 0.000 0.844
#> SRR1521373     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     2  0.2732     0.7888 0.000 0.840 0.160 0.000 0.000
#> SRR1521377     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521380     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     5  0.6596     0.4547 0.256 0.000 0.280 0.000 0.464
#> SRR1521382     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     1  0.2488     0.6423 0.872 0.000 0.000 0.004 0.124
#> SRR1521384     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     1  0.4010     0.6046 0.796 0.000 0.000 0.088 0.116
#> SRR1521387     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.0000     0.9629 0.000 0.000 0.000 1.000 0.000
#> SRR1521389     4  0.0000     0.9629 0.000 0.000 0.000 1.000 0.000
#> SRR1521390     4  0.0000     0.9629 0.000 0.000 0.000 1.000 0.000
#> SRR1521391     5  0.3430     0.6112 0.004 0.000 0.220 0.000 0.776
#> SRR1521392     5  0.0963     0.7097 0.036 0.000 0.000 0.000 0.964
#> SRR1521393     5  0.0963     0.7097 0.036 0.000 0.000 0.000 0.964
#> SRR1521394     5  0.0963     0.7097 0.036 0.000 0.000 0.000 0.964
#> SRR1521395     5  0.0963     0.7097 0.036 0.000 0.000 0.000 0.964
#> SRR1521396     5  0.0963     0.7097 0.036 0.000 0.000 0.000 0.964
#> SRR1521397     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521398     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521399     5  0.2020     0.6579 0.100 0.000 0.000 0.000 0.900
#> SRR1521400     5  0.0963     0.7097 0.036 0.000 0.000 0.000 0.964
#> SRR1521401     5  0.0963     0.7097 0.036 0.000 0.000 0.000 0.964
#> SRR1521403     5  0.3106     0.6728 0.024 0.000 0.132 0.000 0.844
#> SRR1521402     5  0.1121     0.7040 0.044 0.000 0.000 0.000 0.956
#> SRR1521405     4  0.0000     0.9629 0.000 0.000 0.000 1.000 0.000
#> SRR1521406     1  0.4547     0.5107 0.588 0.000 0.000 0.012 0.400
#> SRR1521404     1  0.4094     0.5964 0.788 0.000 0.000 0.084 0.128
#> SRR1521408     3  0.2329     0.8322 0.000 0.000 0.876 0.000 0.124
#> SRR1521407     5  0.6596     0.4441 0.280 0.000 0.256 0.000 0.464
#> SRR1521409     5  0.8426     0.3311 0.224 0.212 0.204 0.000 0.360
#> SRR1521410     1  0.2286     0.6770 0.888 0.000 0.000 0.004 0.108
#> SRR1521411     1  0.2074     0.6788 0.896 0.000 0.000 0.000 0.104
#> SRR1521412     1  0.2074     0.6788 0.896 0.000 0.000 0.000 0.104
#> SRR1521414     5  0.2020     0.6579 0.100 0.000 0.000 0.000 0.900
#> SRR1521413     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521415     5  0.2020     0.6579 0.100 0.000 0.000 0.000 0.900
#> SRR1521416     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521417     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521418     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521419     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521420     1  0.4249    -0.0635 0.568 0.000 0.000 0.000 0.432
#> SRR1521421     1  0.2329     0.6434 0.876 0.000 0.000 0.000 0.124
#> SRR1521422     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521424     1  0.4010     0.6046 0.796 0.000 0.000 0.088 0.116
#> SRR1521423     1  0.3942     0.7170 0.728 0.000 0.000 0.012 0.260
#> SRR1521426     1  0.4010     0.6046 0.796 0.000 0.000 0.088 0.116
#> SRR1521427     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.2563     0.6434 0.872 0.000 0.000 0.008 0.120
#> SRR1521428     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.2648     0.7990 0.000 0.848 0.152 0.000 0.000
#> SRR1521437     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9902 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     2  0.3949     0.5243 0.000 0.668 0.332 0.000 0.000
#> SRR1521439     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9688 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9688 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.1765     0.6721 0.000 0.000 0.000 0.096 0.000 0.904
#> SRR1521353     3  0.1007     0.9606 0.044 0.000 0.956 0.000 0.000 0.000
#> SRR1521354     3  0.1007     0.9606 0.044 0.000 0.956 0.000 0.000 0.000
#> SRR1521355     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521356     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521357     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.6705    -0.0180 0.088 0.000 0.124 0.000 0.348 0.440
#> SRR1521360     5  0.7141     0.0735 0.088 0.000 0.216 0.000 0.348 0.348
#> SRR1521361     5  0.7141     0.0735 0.088 0.000 0.216 0.000 0.348 0.348
#> SRR1521362     4  0.3235     0.8500 0.016 0.000 0.032 0.852 0.012 0.088
#> SRR1521363     2  0.0458     0.9605 0.016 0.984 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0260     0.9636 0.008 0.992 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.1007     0.9606 0.044 0.000 0.956 0.000 0.000 0.000
#> SRR1521370     3  0.1007     0.9606 0.044 0.000 0.956 0.000 0.000 0.000
#> SRR1521371     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521372     5  0.3350     0.6758 0.012 0.000 0.112 0.000 0.828 0.048
#> SRR1521373     2  0.0458     0.9605 0.016 0.984 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0260     0.9636 0.008 0.992 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0458     0.9605 0.016 0.984 0.000 0.000 0.000 0.000
#> SRR1521376     2  0.2896     0.7928 0.016 0.824 0.160 0.000 0.000 0.000
#> SRR1521377     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.1007     0.9606 0.044 0.000 0.956 0.000 0.000 0.000
#> SRR1521379     2  0.0458     0.9605 0.016 0.984 0.000 0.000 0.000 0.000
#> SRR1521380     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     5  0.7141     0.0735 0.088 0.000 0.216 0.000 0.348 0.348
#> SRR1521382     2  0.0458     0.9605 0.016 0.984 0.000 0.000 0.000 0.000
#> SRR1521383     6  0.0291     0.6479 0.000 0.000 0.000 0.004 0.004 0.992
#> SRR1521384     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.1663     0.6758 0.000 0.000 0.000 0.088 0.000 0.912
#> SRR1521387     2  0.0260     0.9636 0.008 0.992 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.1007     0.9606 0.044 0.000 0.956 0.000 0.000 0.000
#> SRR1521388     4  0.0000     0.9656 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000     0.9656 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0000     0.9656 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521391     5  0.3023     0.6176 0.000 0.000 0.212 0.000 0.784 0.004
#> SRR1521392     5  0.0909     0.7604 0.020 0.000 0.000 0.000 0.968 0.012
#> SRR1521393     5  0.0909     0.7604 0.020 0.000 0.000 0.000 0.968 0.012
#> SRR1521394     5  0.0909     0.7604 0.020 0.000 0.000 0.000 0.968 0.012
#> SRR1521395     5  0.0909     0.7604 0.020 0.000 0.000 0.000 0.968 0.012
#> SRR1521396     5  0.0909     0.7604 0.020 0.000 0.000 0.000 0.968 0.012
#> SRR1521397     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521398     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521399     5  0.2106     0.7287 0.064 0.000 0.000 0.000 0.904 0.032
#> SRR1521400     5  0.0909     0.7604 0.020 0.000 0.000 0.000 0.968 0.012
#> SRR1521401     5  0.0909     0.7604 0.020 0.000 0.000 0.000 0.968 0.012
#> SRR1521403     5  0.3350     0.6758 0.012 0.000 0.112 0.000 0.828 0.048
#> SRR1521402     5  0.1088     0.7576 0.024 0.000 0.000 0.000 0.960 0.016
#> SRR1521405     4  0.0000     0.9656 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521406     1  0.2163     0.3858 0.892 0.000 0.000 0.000 0.016 0.092
#> SRR1521404     6  0.1897     0.6741 0.004 0.000 0.000 0.084 0.004 0.908
#> SRR1521408     3  0.3249     0.8224 0.044 0.000 0.824 0.000 0.128 0.004
#> SRR1521407     6  0.7065    -0.1455 0.088 0.000 0.192 0.000 0.348 0.372
#> SRR1521409     5  0.8513     0.0589 0.076 0.196 0.164 0.000 0.292 0.272
#> SRR1521410     6  0.2001     0.4985 0.092 0.000 0.000 0.004 0.004 0.900
#> SRR1521411     6  0.2118     0.4697 0.104 0.000 0.000 0.000 0.008 0.888
#> SRR1521412     6  0.2118     0.4697 0.104 0.000 0.000 0.000 0.008 0.888
#> SRR1521414     5  0.2106     0.7287 0.064 0.000 0.000 0.000 0.904 0.032
#> SRR1521413     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521415     5  0.2106     0.7287 0.064 0.000 0.000 0.000 0.904 0.032
#> SRR1521416     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521417     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521418     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521419     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521420     6  0.4079     0.3765 0.032 0.000 0.000 0.000 0.288 0.680
#> SRR1521421     6  0.0405     0.6484 0.004 0.000 0.000 0.000 0.008 0.988
#> SRR1521422     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521424     6  0.1663     0.6758 0.000 0.000 0.000 0.088 0.000 0.912
#> SRR1521423     1  0.3997     0.9415 0.508 0.000 0.000 0.000 0.004 0.488
#> SRR1521426     6  0.1663     0.6758 0.000 0.000 0.000 0.088 0.000 0.912
#> SRR1521427     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.0405     0.6480 0.000 0.000 0.000 0.008 0.004 0.988
#> SRR1521428     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.2821     0.8030 0.016 0.832 0.152 0.000 0.000 0.000
#> SRR1521437     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9715 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     2  0.3684     0.5363 0.004 0.664 0.332 0.000 0.000 0.000
#> SRR1521439     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9657 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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.990       0.995         0.4940 0.508   0.508
#> 3 3 0.639           0.852       0.883         0.2928 0.814   0.651
#> 4 4 0.774           0.519       0.726         0.1550 0.939   0.841
#> 5 5 0.792           0.791       0.852         0.0689 0.832   0.519
#> 6 6 0.788           0.729       0.803         0.0373 0.965   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
#> SRR1521352     1  0.0000      0.992 1.000 0.000
#> SRR1521353     1  0.1414      0.975 0.980 0.020
#> SRR1521354     1  0.0938      0.982 0.988 0.012
#> SRR1521355     1  0.0000      0.992 1.000 0.000
#> SRR1521356     1  0.0000      0.992 1.000 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000
#> SRR1521359     1  0.0000      0.992 1.000 0.000
#> SRR1521360     1  0.7453      0.738 0.788 0.212
#> SRR1521361     1  0.0000      0.992 1.000 0.000
#> SRR1521362     1  0.0000      0.992 1.000 0.000
#> SRR1521363     2  0.0000      1.000 0.000 1.000
#> SRR1521364     2  0.0000      1.000 0.000 1.000
#> SRR1521365     2  0.0000      1.000 0.000 1.000
#> SRR1521366     2  0.0000      1.000 0.000 1.000
#> SRR1521368     2  0.0000      1.000 0.000 1.000
#> SRR1521369     2  0.0000      1.000 0.000 1.000
#> SRR1521370     1  0.0938      0.982 0.988 0.012
#> SRR1521371     1  0.0000      0.992 1.000 0.000
#> SRR1521372     1  0.0000      0.992 1.000 0.000
#> SRR1521373     2  0.0000      1.000 0.000 1.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000
#> SRR1521376     2  0.0000      1.000 0.000 1.000
#> SRR1521377     2  0.0000      1.000 0.000 1.000
#> SRR1521378     2  0.0000      1.000 0.000 1.000
#> SRR1521379     2  0.0000      1.000 0.000 1.000
#> SRR1521380     2  0.0000      1.000 0.000 1.000
#> SRR1521381     1  0.0000      0.992 1.000 0.000
#> SRR1521382     2  0.0000      1.000 0.000 1.000
#> SRR1521383     1  0.0000      0.992 1.000 0.000
#> SRR1521384     2  0.0000      1.000 0.000 1.000
#> SRR1521385     1  0.0000      0.992 1.000 0.000
#> SRR1521387     2  0.0000      1.000 0.000 1.000
#> SRR1521386     2  0.0672      0.992 0.008 0.992
#> SRR1521388     1  0.0000      0.992 1.000 0.000
#> SRR1521389     1  0.0000      0.992 1.000 0.000
#> SRR1521390     1  0.0000      0.992 1.000 0.000
#> SRR1521391     1  0.0000      0.992 1.000 0.000
#> SRR1521392     1  0.0000      0.992 1.000 0.000
#> SRR1521393     1  0.0000      0.992 1.000 0.000
#> SRR1521394     1  0.0000      0.992 1.000 0.000
#> SRR1521395     1  0.0000      0.992 1.000 0.000
#> SRR1521396     1  0.0000      0.992 1.000 0.000
#> SRR1521397     1  0.0000      0.992 1.000 0.000
#> SRR1521398     1  0.0000      0.992 1.000 0.000
#> SRR1521399     1  0.0000      0.992 1.000 0.000
#> SRR1521400     1  0.0000      0.992 1.000 0.000
#> SRR1521401     1  0.0000      0.992 1.000 0.000
#> SRR1521403     1  0.0000      0.992 1.000 0.000
#> SRR1521402     1  0.0000      0.992 1.000 0.000
#> SRR1521405     1  0.0000      0.992 1.000 0.000
#> SRR1521406     1  0.0000      0.992 1.000 0.000
#> SRR1521404     1  0.0000      0.992 1.000 0.000
#> SRR1521408     1  0.1414      0.975 0.980 0.020
#> SRR1521407     1  0.0000      0.992 1.000 0.000
#> SRR1521409     1  0.6247      0.818 0.844 0.156
#> SRR1521410     1  0.0000      0.992 1.000 0.000
#> SRR1521411     1  0.0000      0.992 1.000 0.000
#> SRR1521412     1  0.0000      0.992 1.000 0.000
#> SRR1521414     1  0.0000      0.992 1.000 0.000
#> SRR1521413     1  0.0000      0.992 1.000 0.000
#> SRR1521415     1  0.0000      0.992 1.000 0.000
#> SRR1521416     1  0.0000      0.992 1.000 0.000
#> SRR1521417     1  0.0000      0.992 1.000 0.000
#> SRR1521418     1  0.0000      0.992 1.000 0.000
#> SRR1521419     1  0.0000      0.992 1.000 0.000
#> SRR1521420     1  0.0000      0.992 1.000 0.000
#> SRR1521421     1  0.0000      0.992 1.000 0.000
#> SRR1521422     1  0.0000      0.992 1.000 0.000
#> SRR1521424     1  0.0000      0.992 1.000 0.000
#> SRR1521423     1  0.0000      0.992 1.000 0.000
#> SRR1521426     1  0.0000      0.992 1.000 0.000
#> SRR1521427     2  0.0000      1.000 0.000 1.000
#> SRR1521425     1  0.0000      0.992 1.000 0.000
#> SRR1521428     2  0.0000      1.000 0.000 1.000
#> SRR1521430     2  0.0000      1.000 0.000 1.000
#> SRR1521429     2  0.0000      1.000 0.000 1.000
#> SRR1521432     2  0.0000      1.000 0.000 1.000
#> SRR1521433     2  0.0000      1.000 0.000 1.000
#> SRR1521434     2  0.0000      1.000 0.000 1.000
#> SRR1521435     2  0.0000      1.000 0.000 1.000
#> SRR1521436     2  0.0000      1.000 0.000 1.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000
#> SRR1521431     2  0.0000      1.000 0.000 1.000
#> SRR1521438     2  0.0000      1.000 0.000 1.000
#> SRR1521439     2  0.0000      1.000 0.000 1.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000
#> SRR1521445     2  0.0000      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
#> SRR1521352     1  0.4654      0.821 0.792 0.000 0.208
#> SRR1521353     3  0.4172      0.742 0.156 0.004 0.840
#> SRR1521354     3  0.4172      0.742 0.156 0.004 0.840
#> SRR1521355     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521359     1  0.5810      0.716 0.664 0.000 0.336
#> SRR1521360     3  0.4591      0.767 0.120 0.032 0.848
#> SRR1521361     3  0.4796      0.636 0.220 0.000 0.780
#> SRR1521362     1  0.5016      0.804 0.760 0.000 0.240
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521364     3  0.4842      0.804 0.000 0.224 0.776
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521366     3  0.4796      0.805 0.000 0.220 0.780
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521369     3  0.4002      0.803 0.000 0.160 0.840
#> SRR1521370     3  0.4047      0.743 0.148 0.004 0.848
#> SRR1521371     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521372     1  0.5529      0.678 0.704 0.000 0.296
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521376     3  0.6026      0.660 0.000 0.376 0.624
#> SRR1521377     3  0.4842      0.804 0.000 0.224 0.776
#> SRR1521378     3  0.4002      0.803 0.000 0.160 0.840
#> SRR1521379     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521380     3  0.4842      0.804 0.000 0.224 0.776
#> SRR1521381     1  0.5988      0.567 0.632 0.000 0.368
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521383     1  0.4654      0.821 0.792 0.000 0.208
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521385     1  0.4654      0.821 0.792 0.000 0.208
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521386     3  0.4551      0.801 0.020 0.140 0.840
#> SRR1521388     1  0.4796      0.815 0.780 0.000 0.220
#> SRR1521389     1  0.4796      0.815 0.780 0.000 0.220
#> SRR1521390     1  0.4796      0.815 0.780 0.000 0.220
#> SRR1521391     3  0.4002      0.737 0.160 0.000 0.840
#> SRR1521392     1  0.3686      0.817 0.860 0.000 0.140
#> SRR1521393     1  0.3686      0.817 0.860 0.000 0.140
#> SRR1521394     1  0.3686      0.817 0.860 0.000 0.140
#> SRR1521395     1  0.3686      0.817 0.860 0.000 0.140
#> SRR1521396     1  0.3686      0.817 0.860 0.000 0.140
#> SRR1521397     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521399     1  0.1643      0.868 0.956 0.000 0.044
#> SRR1521400     1  0.3686      0.817 0.860 0.000 0.140
#> SRR1521401     1  0.1643      0.868 0.956 0.000 0.044
#> SRR1521403     1  0.4555      0.795 0.800 0.000 0.200
#> SRR1521402     1  0.3686      0.817 0.860 0.000 0.140
#> SRR1521405     1  0.4796      0.815 0.780 0.000 0.220
#> SRR1521406     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521404     1  0.4654      0.821 0.792 0.000 0.208
#> SRR1521408     3  0.4172      0.742 0.156 0.004 0.840
#> SRR1521407     1  0.4887      0.779 0.772 0.000 0.228
#> SRR1521409     1  0.6680      0.508 0.508 0.008 0.484
#> SRR1521410     1  0.3816      0.833 0.852 0.000 0.148
#> SRR1521411     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521420     1  0.0747      0.879 0.984 0.000 0.016
#> SRR1521421     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521424     1  0.4654      0.821 0.792 0.000 0.208
#> SRR1521423     1  0.0000      0.881 1.000 0.000 0.000
#> SRR1521426     1  0.4605      0.823 0.796 0.000 0.204
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521425     1  0.3816      0.833 0.852 0.000 0.148
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521430     3  0.6026      0.660 0.000 0.376 0.624
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521432     3  0.4842      0.804 0.000 0.224 0.776
#> SRR1521433     3  0.6026      0.660 0.000 0.376 0.624
#> SRR1521434     3  0.6026      0.660 0.000 0.376 0.624
#> SRR1521435     3  0.6026      0.660 0.000 0.376 0.624
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521431     3  0.4842      0.804 0.000 0.224 0.776
#> SRR1521438     3  0.6026      0.660 0.000 0.376 0.624
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000
#> SRR1521445     2  0.0000      1.000 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
#> SRR1521352     1  0.4985   -0.40070 0.532 0.000 0.000 0.468
#> SRR1521353     3  0.4776    0.85121 0.000 0.000 0.624 0.376
#> SRR1521354     3  0.4776    0.85121 0.000 0.000 0.624 0.376
#> SRR1521355     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0707    0.96205 0.000 0.980 0.000 0.020
#> SRR1521359     4  0.7634    0.56007 0.300 0.000 0.236 0.464
#> SRR1521360     3  0.4776    0.85121 0.000 0.000 0.624 0.376
#> SRR1521361     3  0.1398    0.32868 0.040 0.000 0.956 0.004
#> SRR1521362     4  0.6495    0.36024 0.436 0.000 0.072 0.492
#> SRR1521363     2  0.2408    0.94225 0.000 0.896 0.000 0.104
#> SRR1521364     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521365     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521368     2  0.2345    0.94371 0.000 0.900 0.000 0.100
#> SRR1521369     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521370     3  0.4776    0.85121 0.000 0.000 0.624 0.376
#> SRR1521371     1  0.1211    0.45739 0.960 0.000 0.040 0.000
#> SRR1521372     1  0.5964    0.29397 0.536 0.000 0.424 0.040
#> SRR1521373     2  0.2408    0.94225 0.000 0.896 0.000 0.104
#> SRR1521374     2  0.2345    0.94371 0.000 0.900 0.000 0.100
#> SRR1521375     2  0.2408    0.94225 0.000 0.896 0.000 0.104
#> SRR1521376     3  0.5295    0.79272 0.000 0.008 0.504 0.488
#> SRR1521377     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521378     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521379     2  0.2408    0.94225 0.000 0.896 0.000 0.104
#> SRR1521380     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521381     3  0.7503   -0.53360 0.276 0.000 0.496 0.228
#> SRR1521382     2  0.2408    0.94225 0.000 0.896 0.000 0.104
#> SRR1521383     1  0.5503   -0.42737 0.516 0.000 0.016 0.468
#> SRR1521384     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521385     1  0.5503   -0.42737 0.516 0.000 0.016 0.468
#> SRR1521387     2  0.2345    0.94371 0.000 0.900 0.000 0.100
#> SRR1521386     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521388     1  0.4999   -0.42152 0.508 0.000 0.000 0.492
#> SRR1521389     1  0.4999   -0.42152 0.508 0.000 0.000 0.492
#> SRR1521390     1  0.4999   -0.42152 0.508 0.000 0.000 0.492
#> SRR1521391     3  0.1824    0.30904 0.060 0.000 0.936 0.004
#> SRR1521392     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521393     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521394     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521395     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521396     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521397     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.4776    0.36414 0.624 0.000 0.376 0.000
#> SRR1521400     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521401     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521403     1  0.6451    0.27568 0.524 0.000 0.404 0.072
#> SRR1521402     1  0.5039    0.35055 0.592 0.000 0.404 0.004
#> SRR1521405     1  0.4999   -0.42152 0.508 0.000 0.000 0.492
#> SRR1521406     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521404     1  0.5503   -0.42737 0.516 0.000 0.016 0.468
#> SRR1521408     3  0.4776    0.85121 0.000 0.000 0.624 0.376
#> SRR1521407     3  0.7841   -0.59771 0.312 0.000 0.404 0.284
#> SRR1521409     4  0.6489    0.46210 0.080 0.000 0.372 0.548
#> SRR1521410     1  0.4134   -0.00961 0.740 0.000 0.000 0.260
#> SRR1521411     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.1022    0.45987 0.968 0.000 0.032 0.000
#> SRR1521414     1  0.4761    0.36527 0.628 0.000 0.372 0.000
#> SRR1521413     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.4776    0.36414 0.624 0.000 0.376 0.000
#> SRR1521416     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.4630   -0.00889 0.732 0.000 0.016 0.252
#> SRR1521421     1  0.4781    0.36839 0.660 0.000 0.336 0.004
#> SRR1521422     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521424     1  0.5503   -0.42737 0.516 0.000 0.016 0.468
#> SRR1521423     1  0.0000    0.46717 1.000 0.000 0.000 0.000
#> SRR1521426     1  0.4985   -0.40070 0.532 0.000 0.000 0.468
#> SRR1521427     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.4925   -0.35655 0.572 0.000 0.000 0.428
#> SRR1521428     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521429     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521433     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521434     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521435     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521436     2  0.2345    0.94371 0.000 0.900 0.000 0.100
#> SRR1521437     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521438     3  0.4866    0.86172 0.000 0.000 0.596 0.404
#> SRR1521439     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000    0.96566 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000    0.96566 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.5491     0.7795 0.272 0.000 0.000 0.624 0.104
#> SRR1521353     3  0.2209     0.9236 0.000 0.000 0.912 0.032 0.056
#> SRR1521354     3  0.2209     0.9236 0.000 0.000 0.912 0.032 0.056
#> SRR1521355     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0703     0.9147 0.000 0.976 0.000 0.000 0.024
#> SRR1521359     4  0.6300     0.3515 0.152 0.000 0.000 0.428 0.420
#> SRR1521360     3  0.3146     0.8752 0.000 0.000 0.856 0.052 0.092
#> SRR1521361     5  0.4487     0.5781 0.000 0.000 0.104 0.140 0.756
#> SRR1521362     4  0.4049     0.7424 0.164 0.000 0.000 0.780 0.056
#> SRR1521363     2  0.4457     0.8478 0.000 0.756 0.000 0.152 0.092
#> SRR1521364     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0404     0.9161 0.000 0.988 0.000 0.000 0.012
#> SRR1521366     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.4194     0.8610 0.000 0.780 0.000 0.132 0.088
#> SRR1521369     3  0.0404     0.9611 0.000 0.000 0.988 0.012 0.000
#> SRR1521370     3  0.2592     0.9108 0.000 0.000 0.892 0.052 0.056
#> SRR1521371     1  0.0404     0.8425 0.988 0.000 0.000 0.000 0.012
#> SRR1521372     5  0.3458     0.7834 0.120 0.000 0.016 0.024 0.840
#> SRR1521373     2  0.4457     0.8478 0.000 0.756 0.000 0.152 0.092
#> SRR1521374     2  0.4194     0.8610 0.000 0.780 0.000 0.132 0.088
#> SRR1521375     2  0.4457     0.8478 0.000 0.756 0.000 0.152 0.092
#> SRR1521376     3  0.3586     0.8072 0.000 0.000 0.828 0.096 0.076
#> SRR1521377     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0290     0.9620 0.000 0.000 0.992 0.008 0.000
#> SRR1521379     2  0.4936     0.8141 0.000 0.712 0.000 0.172 0.116
#> SRR1521380     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     5  0.4781     0.6312 0.048 0.000 0.040 0.152 0.760
#> SRR1521382     2  0.4457     0.8478 0.000 0.756 0.000 0.152 0.092
#> SRR1521383     4  0.5535     0.7796 0.272 0.000 0.000 0.620 0.108
#> SRR1521384     2  0.0404     0.9161 0.000 0.988 0.000 0.000 0.012
#> SRR1521385     4  0.5535     0.7796 0.272 0.000 0.000 0.620 0.108
#> SRR1521387     2  0.4194     0.8610 0.000 0.780 0.000 0.132 0.088
#> SRR1521386     3  0.0404     0.9611 0.000 0.000 0.988 0.012 0.000
#> SRR1521388     4  0.3928     0.7052 0.296 0.000 0.000 0.700 0.004
#> SRR1521389     4  0.3928     0.7052 0.296 0.000 0.000 0.700 0.004
#> SRR1521390     4  0.3928     0.7052 0.296 0.000 0.000 0.700 0.004
#> SRR1521391     5  0.3933     0.6383 0.008 0.000 0.196 0.020 0.776
#> SRR1521392     5  0.3366     0.8228 0.212 0.000 0.000 0.004 0.784
#> SRR1521393     5  0.3579     0.8235 0.240 0.000 0.000 0.004 0.756
#> SRR1521394     5  0.3579     0.8235 0.240 0.000 0.000 0.004 0.756
#> SRR1521395     5  0.3579     0.8235 0.240 0.000 0.000 0.004 0.756
#> SRR1521396     5  0.3579     0.8235 0.240 0.000 0.000 0.004 0.756
#> SRR1521397     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0290     0.8451 0.992 0.000 0.000 0.000 0.008
#> SRR1521399     5  0.3884     0.7699 0.288 0.000 0.000 0.004 0.708
#> SRR1521400     5  0.3210     0.8244 0.212 0.000 0.000 0.000 0.788
#> SRR1521401     5  0.3579     0.8218 0.240 0.000 0.000 0.004 0.756
#> SRR1521403     5  0.4406     0.7058 0.108 0.000 0.000 0.128 0.764
#> SRR1521402     5  0.3607     0.8190 0.244 0.000 0.000 0.004 0.752
#> SRR1521405     4  0.3928     0.7052 0.296 0.000 0.000 0.700 0.004
#> SRR1521406     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.5535     0.7796 0.272 0.000 0.000 0.620 0.108
#> SRR1521408     3  0.2209     0.9236 0.000 0.000 0.912 0.032 0.056
#> SRR1521407     5  0.4263     0.6238 0.060 0.000 0.000 0.180 0.760
#> SRR1521409     4  0.4546     0.1518 0.008 0.000 0.000 0.532 0.460
#> SRR1521410     1  0.2011     0.7200 0.908 0.000 0.000 0.088 0.004
#> SRR1521411     1  0.0404     0.8425 0.988 0.000 0.000 0.000 0.012
#> SRR1521412     1  0.0771     0.8351 0.976 0.000 0.000 0.004 0.020
#> SRR1521414     1  0.4425    -0.2509 0.544 0.000 0.000 0.004 0.452
#> SRR1521413     1  0.0162     0.8473 0.996 0.000 0.000 0.000 0.004
#> SRR1521415     5  0.4420     0.4599 0.448 0.000 0.000 0.004 0.548
#> SRR1521416     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.6138    -0.0585 0.552 0.000 0.000 0.272 0.176
#> SRR1521421     1  0.5816    -0.0907 0.468 0.000 0.000 0.092 0.440
#> SRR1521422     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.5535     0.7796 0.272 0.000 0.000 0.620 0.108
#> SRR1521423     1  0.0000     0.8490 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.5512     0.7777 0.276 0.000 0.000 0.620 0.104
#> SRR1521427     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.5769    -0.2019 0.556 0.000 0.000 0.340 0.104
#> SRR1521428     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0162     0.9619 0.000 0.000 0.996 0.000 0.004
#> SRR1521429     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.4194     0.8610 0.000 0.780 0.000 0.132 0.088
#> SRR1521437     2  0.0404     0.9161 0.000 0.988 0.000 0.000 0.012
#> SRR1521431     3  0.0000     0.9635 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0162     0.9619 0.000 0.000 0.996 0.000 0.004
#> SRR1521439     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9168 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0404     0.9161 0.000 0.988 0.000 0.000 0.012
#> SRR1521445     2  0.0000     0.9168 0.000 1.000 0.000 0.000 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
#> SRR1521352     4  0.5954      0.733 0.204 0.000 0.000 0.468 0.004 0.324
#> SRR1521353     3  0.5216      0.744 0.000 0.000 0.696 0.088 0.072 0.144
#> SRR1521354     3  0.5216      0.744 0.000 0.000 0.696 0.088 0.072 0.144
#> SRR1521355     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.3394      0.811 0.000 0.840 0.000 0.060 0.032 0.068
#> SRR1521359     6  0.6644      0.226 0.064 0.000 0.000 0.260 0.188 0.488
#> SRR1521360     3  0.5851      0.651 0.000 0.000 0.620 0.088 0.088 0.204
#> SRR1521361     6  0.5829      0.442 0.000 0.000 0.024 0.108 0.368 0.500
#> SRR1521362     4  0.4527      0.667 0.132 0.000 0.000 0.724 0.008 0.136
#> SRR1521363     2  0.4246      0.653 0.000 0.580 0.000 0.000 0.020 0.400
#> SRR1521364     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.1890      0.829 0.000 0.916 0.000 0.060 0.024 0.000
#> SRR1521366     3  0.0363      0.886 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521368     2  0.5429      0.708 0.000 0.616 0.000 0.068 0.044 0.272
#> SRR1521369     3  0.2458      0.860 0.000 0.000 0.892 0.024 0.016 0.068
#> SRR1521370     3  0.5561      0.699 0.000 0.000 0.652 0.088 0.072 0.188
#> SRR1521371     1  0.1616      0.847 0.932 0.000 0.000 0.000 0.048 0.020
#> SRR1521372     5  0.2939      0.751 0.032 0.000 0.000 0.012 0.856 0.100
#> SRR1521373     2  0.4246      0.653 0.000 0.580 0.000 0.000 0.020 0.400
#> SRR1521374     2  0.5429      0.708 0.000 0.616 0.000 0.068 0.044 0.272
#> SRR1521375     2  0.4246      0.653 0.000 0.580 0.000 0.000 0.020 0.400
#> SRR1521376     3  0.3236      0.754 0.000 0.000 0.840 0.020 0.036 0.104
#> SRR1521377     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.2186      0.866 0.000 0.000 0.908 0.024 0.012 0.056
#> SRR1521379     6  0.4335     -0.569 0.000 0.472 0.000 0.000 0.020 0.508
#> SRR1521380     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.5861      0.439 0.016 0.000 0.004 0.112 0.376 0.492
#> SRR1521382     2  0.4246      0.653 0.000 0.580 0.000 0.000 0.020 0.400
#> SRR1521383     4  0.6078      0.728 0.208 0.000 0.000 0.456 0.008 0.328
#> SRR1521384     2  0.1890      0.829 0.000 0.916 0.000 0.060 0.024 0.000
#> SRR1521385     4  0.6070      0.732 0.208 0.000 0.000 0.460 0.008 0.324
#> SRR1521387     2  0.5373      0.716 0.000 0.628 0.000 0.068 0.044 0.260
#> SRR1521386     3  0.3765      0.818 0.000 0.000 0.804 0.084 0.016 0.096
#> SRR1521388     4  0.2762      0.678 0.196 0.000 0.000 0.804 0.000 0.000
#> SRR1521389     4  0.2762      0.678 0.196 0.000 0.000 0.804 0.000 0.000
#> SRR1521390     4  0.2762      0.678 0.196 0.000 0.000 0.804 0.000 0.000
#> SRR1521391     5  0.3542      0.594 0.000 0.000 0.044 0.068 0.832 0.056
#> SRR1521392     5  0.2019      0.832 0.088 0.000 0.000 0.012 0.900 0.000
#> SRR1521393     5  0.2266      0.843 0.108 0.000 0.000 0.012 0.880 0.000
#> SRR1521394     5  0.2266      0.843 0.108 0.000 0.000 0.012 0.880 0.000
#> SRR1521395     5  0.2266      0.843 0.108 0.000 0.000 0.012 0.880 0.000
#> SRR1521396     5  0.2266      0.843 0.108 0.000 0.000 0.012 0.880 0.000
#> SRR1521397     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0692      0.887 0.976 0.000 0.000 0.000 0.004 0.020
#> SRR1521399     5  0.3662      0.819 0.128 0.000 0.000 0.008 0.800 0.064
#> SRR1521400     5  0.2350      0.823 0.076 0.000 0.000 0.000 0.888 0.036
#> SRR1521401     5  0.3330      0.834 0.108 0.000 0.000 0.008 0.828 0.056
#> SRR1521403     5  0.4702      0.256 0.036 0.000 0.000 0.020 0.644 0.300
#> SRR1521402     5  0.3330      0.834 0.108 0.000 0.000 0.008 0.828 0.056
#> SRR1521405     4  0.2762      0.678 0.196 0.000 0.000 0.804 0.000 0.000
#> SRR1521406     1  0.0260      0.893 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR1521404     4  0.6070      0.732 0.208 0.000 0.000 0.460 0.008 0.324
#> SRR1521408     3  0.5216      0.744 0.000 0.000 0.696 0.088 0.072 0.144
#> SRR1521407     6  0.5799      0.436 0.020 0.000 0.000 0.112 0.372 0.496
#> SRR1521409     6  0.3566      0.259 0.000 0.000 0.000 0.104 0.096 0.800
#> SRR1521410     1  0.2179      0.806 0.900 0.000 0.000 0.064 0.000 0.036
#> SRR1521411     1  0.1003      0.880 0.964 0.000 0.000 0.000 0.016 0.020
#> SRR1521412     1  0.1767      0.856 0.932 0.000 0.000 0.012 0.020 0.036
#> SRR1521414     5  0.4959      0.596 0.304 0.000 0.000 0.008 0.616 0.072
#> SRR1521413     1  0.0692      0.887 0.976 0.000 0.000 0.000 0.004 0.020
#> SRR1521415     5  0.4626      0.700 0.228 0.000 0.000 0.008 0.688 0.076
#> SRR1521416     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.6122     -0.168 0.468 0.000 0.000 0.112 0.040 0.380
#> SRR1521421     6  0.6574      0.117 0.336 0.000 0.000 0.028 0.244 0.392
#> SRR1521422     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.6070      0.732 0.208 0.000 0.000 0.460 0.008 0.324
#> SRR1521423     1  0.0000      0.896 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.5973      0.733 0.208 0.000 0.000 0.464 0.004 0.324
#> SRR1521427     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.5940     -0.312 0.456 0.000 0.000 0.192 0.004 0.348
#> SRR1521428     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.5373      0.716 0.000 0.628 0.000 0.068 0.044 0.260
#> SRR1521437     2  0.1890      0.829 0.000 0.916 0.000 0.060 0.024 0.000
#> SRR1521431     3  0.0000      0.888 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0260      0.885 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR1521439     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.1890      0.829 0.000 0.916 0.000 0.060 0.024 0.000
#> SRR1521445     2  0.0000      0.837 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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-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.970       0.987         0.5036 0.496   0.496
#> 3 3 1.000           0.983       0.992         0.2580 0.842   0.690
#> 4 4 0.867           0.738       0.863         0.1697 0.874   0.668
#> 5 5 0.901           0.909       0.937         0.0704 0.894   0.631
#> 6 6 0.958           0.920       0.953         0.0316 0.965   0.832

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 5

There is also optional best \(k\) = 2 3 5 that is worth to check.

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> SRR1521352     1   0.000      0.993 1.000 0.000
#> SRR1521353     2   0.529      0.861 0.120 0.880
#> SRR1521354     2   0.895      0.565 0.312 0.688
#> SRR1521355     1   0.000      0.993 1.000 0.000
#> SRR1521356     1   0.000      0.993 1.000 0.000
#> SRR1521357     2   0.000      0.980 0.000 1.000
#> SRR1521358     2   0.000      0.980 0.000 1.000
#> SRR1521359     1   0.000      0.993 1.000 0.000
#> SRR1521360     2   0.000      0.980 0.000 1.000
#> SRR1521361     1   0.000      0.993 1.000 0.000
#> SRR1521362     1   0.000      0.993 1.000 0.000
#> SRR1521363     2   0.000      0.980 0.000 1.000
#> SRR1521364     2   0.000      0.980 0.000 1.000
#> SRR1521365     2   0.000      0.980 0.000 1.000
#> SRR1521366     2   0.000      0.980 0.000 1.000
#> SRR1521368     2   0.000      0.980 0.000 1.000
#> SRR1521369     2   0.000      0.980 0.000 1.000
#> SRR1521370     2   0.876      0.596 0.296 0.704
#> SRR1521371     1   0.000      0.993 1.000 0.000
#> SRR1521372     1   0.000      0.993 1.000 0.000
#> SRR1521373     2   0.000      0.980 0.000 1.000
#> SRR1521374     2   0.000      0.980 0.000 1.000
#> SRR1521375     2   0.000      0.980 0.000 1.000
#> SRR1521376     2   0.000      0.980 0.000 1.000
#> SRR1521377     2   0.000      0.980 0.000 1.000
#> SRR1521378     2   0.000      0.980 0.000 1.000
#> SRR1521379     2   0.000      0.980 0.000 1.000
#> SRR1521380     2   0.000      0.980 0.000 1.000
#> SRR1521381     1   0.000      0.993 1.000 0.000
#> SRR1521382     2   0.000      0.980 0.000 1.000
#> SRR1521383     1   0.000      0.993 1.000 0.000
#> SRR1521384     2   0.000      0.980 0.000 1.000
#> SRR1521385     1   0.000      0.993 1.000 0.000
#> SRR1521387     2   0.000      0.980 0.000 1.000
#> SRR1521386     2   0.000      0.980 0.000 1.000
#> SRR1521388     1   0.000      0.993 1.000 0.000
#> SRR1521389     1   0.000      0.993 1.000 0.000
#> SRR1521390     1   0.000      0.993 1.000 0.000
#> SRR1521391     1   0.000      0.993 1.000 0.000
#> SRR1521392     1   0.000      0.993 1.000 0.000
#> SRR1521393     1   0.000      0.993 1.000 0.000
#> SRR1521394     1   0.000      0.993 1.000 0.000
#> SRR1521395     1   0.000      0.993 1.000 0.000
#> SRR1521396     1   0.000      0.993 1.000 0.000
#> SRR1521397     1   0.000      0.993 1.000 0.000
#> SRR1521398     1   0.000      0.993 1.000 0.000
#> SRR1521399     1   0.000      0.993 1.000 0.000
#> SRR1521400     1   0.000      0.993 1.000 0.000
#> SRR1521401     1   0.000      0.993 1.000 0.000
#> SRR1521403     1   0.000      0.993 1.000 0.000
#> SRR1521402     1   0.000      0.993 1.000 0.000
#> SRR1521405     1   0.000      0.993 1.000 0.000
#> SRR1521406     1   0.000      0.993 1.000 0.000
#> SRR1521404     1   0.000      0.993 1.000 0.000
#> SRR1521408     2   0.529      0.861 0.120 0.880
#> SRR1521407     1   0.000      0.993 1.000 0.000
#> SRR1521409     1   0.932      0.460 0.652 0.348
#> SRR1521410     1   0.000      0.993 1.000 0.000
#> SRR1521411     1   0.000      0.993 1.000 0.000
#> SRR1521412     1   0.000      0.993 1.000 0.000
#> SRR1521414     1   0.000      0.993 1.000 0.000
#> SRR1521413     1   0.000      0.993 1.000 0.000
#> SRR1521415     1   0.000      0.993 1.000 0.000
#> SRR1521416     1   0.000      0.993 1.000 0.000
#> SRR1521417     1   0.000      0.993 1.000 0.000
#> SRR1521418     1   0.000      0.993 1.000 0.000
#> SRR1521419     1   0.000      0.993 1.000 0.000
#> SRR1521420     1   0.000      0.993 1.000 0.000
#> SRR1521421     1   0.000      0.993 1.000 0.000
#> SRR1521422     1   0.000      0.993 1.000 0.000
#> SRR1521424     1   0.000      0.993 1.000 0.000
#> SRR1521423     1   0.000      0.993 1.000 0.000
#> SRR1521426     1   0.000      0.993 1.000 0.000
#> SRR1521427     2   0.000      0.980 0.000 1.000
#> SRR1521425     1   0.000      0.993 1.000 0.000
#> SRR1521428     2   0.000      0.980 0.000 1.000
#> SRR1521430     2   0.000      0.980 0.000 1.000
#> SRR1521429     2   0.000      0.980 0.000 1.000
#> SRR1521432     2   0.000      0.980 0.000 1.000
#> SRR1521433     2   0.000      0.980 0.000 1.000
#> SRR1521434     2   0.000      0.980 0.000 1.000
#> SRR1521435     2   0.000      0.980 0.000 1.000
#> SRR1521436     2   0.000      0.980 0.000 1.000
#> SRR1521437     2   0.000      0.980 0.000 1.000
#> SRR1521431     2   0.000      0.980 0.000 1.000
#> SRR1521438     2   0.000      0.980 0.000 1.000
#> SRR1521439     2   0.000      0.980 0.000 1.000
#> SRR1521440     2   0.000      0.980 0.000 1.000
#> SRR1521441     2   0.000      0.980 0.000 1.000
#> SRR1521443     2   0.000      0.980 0.000 1.000
#> SRR1521442     2   0.000      0.980 0.000 1.000
#> SRR1521444     2   0.000      0.980 0.000 1.000
#> SRR1521445     2   0.000      0.980 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
#> SRR1521352     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521353     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521359     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521360     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521361     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521362     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521363     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521364     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521365     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521366     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521368     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521369     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521370     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521372     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521373     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521376     2  0.4291      0.777 0.000 0.820 0.180
#> SRR1521377     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521378     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521379     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521380     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521381     1  0.4178      0.799 0.828 0.000 0.172
#> SRR1521382     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521383     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521386     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521388     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521391     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521392     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521393     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521394     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521395     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521396     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521397     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521399     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521400     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521401     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521403     1  0.0237      0.993 0.996 0.000 0.004
#> SRR1521402     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521405     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521404     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521408     3  0.0000      0.995 0.000 0.000 1.000
#> SRR1521407     1  0.0424      0.991 0.992 0.000 0.008
#> SRR1521409     2  0.4887      0.692 0.228 0.772 0.000
#> SRR1521410     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.994 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521430     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521429     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521432     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521433     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521434     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521435     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521436     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521431     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521438     3  0.0424      0.995 0.000 0.008 0.992
#> SRR1521439     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.981 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.981 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
#> SRR1521352     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521353     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521354     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521355     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.5964      0.933 0.424 0.000 0.040 0.536
#> SRR1521360     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521361     3  0.0188      0.373 0.000 0.000 0.996 0.004
#> SRR1521362     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521363     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521364     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521365     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521368     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521370     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521371     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521372     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521373     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521376     2  0.5112      0.381 0.000 0.608 0.008 0.384
#> SRR1521377     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521378     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521379     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521380     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521381     3  0.5408     -0.626 0.488 0.000 0.500 0.012
#> SRR1521382     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521384     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521387     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521388     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521389     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521390     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521391     3  0.4996     -0.615 0.484 0.000 0.516 0.000
#> SRR1521392     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521393     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521394     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521395     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521396     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521397     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521400     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521401     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521403     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521402     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521405     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521406     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521404     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521408     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521407     1  0.5396      0.622 0.524 0.000 0.464 0.012
#> SRR1521409     1  0.7902     -0.547 0.368 0.304 0.000 0.328
#> SRR1521410     1  0.4941     -0.824 0.564 0.000 0.000 0.436
#> SRR1521411     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521414     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521413     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.4981      0.629 0.536 0.000 0.464 0.000
#> SRR1521416     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.3764     -0.171 0.784 0.000 0.000 0.216
#> SRR1521421     1  0.1940      0.550 0.924 0.000 0.076 0.000
#> SRR1521422     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521424     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521423     1  0.0000      0.534 1.000 0.000 0.000 0.000
#> SRR1521426     4  0.4981      0.993 0.464 0.000 0.000 0.536
#> SRR1521427     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.4989      0.983 0.472 0.000 0.000 0.528
#> SRR1521428     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521429     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521433     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521434     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521435     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521436     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521438     3  0.4981      0.885 0.000 0.000 0.536 0.464
#> SRR1521439     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.983 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.983 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.1410      0.951 0.060 0.000 0.000 0.940 0.000
#> SRR1521353     3  0.2970      0.855 0.000 0.000 0.828 0.004 0.168
#> SRR1521354     3  0.2970      0.855 0.000 0.000 0.828 0.004 0.168
#> SRR1521355     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.3003      0.743 0.000 0.000 0.000 0.812 0.188
#> SRR1521360     3  0.4303      0.797 0.000 0.000 0.752 0.056 0.192
#> SRR1521361     5  0.1981      0.759 0.000 0.000 0.016 0.064 0.920
#> SRR1521362     4  0.1270      0.949 0.052 0.000 0.000 0.948 0.000
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0404      0.919 0.000 0.000 0.988 0.000 0.012
#> SRR1521370     3  0.2970      0.855 0.000 0.000 0.828 0.004 0.168
#> SRR1521371     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521372     5  0.1410      0.842 0.060 0.000 0.000 0.000 0.940
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.4161      0.335 0.000 0.392 0.608 0.000 0.000
#> SRR1521377     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0404      0.919 0.000 0.000 0.988 0.000 0.012
#> SRR1521379     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521380     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     5  0.1478      0.770 0.000 0.000 0.000 0.064 0.936
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.1341      0.951 0.056 0.000 0.000 0.944 0.000
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.1341      0.951 0.056 0.000 0.000 0.944 0.000
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.2674      0.869 0.000 0.000 0.856 0.004 0.140
#> SRR1521388     4  0.1478      0.950 0.064 0.000 0.000 0.936 0.000
#> SRR1521389     4  0.1478      0.950 0.064 0.000 0.000 0.936 0.000
#> SRR1521390     4  0.1478      0.950 0.064 0.000 0.000 0.936 0.000
#> SRR1521391     5  0.0807      0.808 0.012 0.000 0.012 0.000 0.976
#> SRR1521392     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521393     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521394     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521395     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521396     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521397     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521400     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521401     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521403     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521402     5  0.3039      0.902 0.192 0.000 0.000 0.000 0.808
#> SRR1521405     4  0.1478      0.950 0.064 0.000 0.000 0.936 0.000
#> SRR1521406     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.1341      0.951 0.056 0.000 0.000 0.944 0.000
#> SRR1521408     3  0.2970      0.855 0.000 0.000 0.828 0.004 0.168
#> SRR1521407     5  0.1478      0.770 0.000 0.000 0.000 0.064 0.936
#> SRR1521409     4  0.3970      0.663 0.000 0.224 0.000 0.752 0.024
#> SRR1521410     1  0.1270      0.890 0.948 0.000 0.000 0.052 0.000
#> SRR1521411     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521414     1  0.3561      0.565 0.740 0.000 0.000 0.000 0.260
#> SRR1521413     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.3949      0.389 0.668 0.000 0.000 0.000 0.332
#> SRR1521416     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.1300      0.909 0.956 0.000 0.000 0.028 0.016
#> SRR1521421     1  0.1877      0.880 0.924 0.000 0.000 0.012 0.064
#> SRR1521422     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.1341      0.951 0.056 0.000 0.000 0.944 0.000
#> SRR1521423     1  0.0000      0.938 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.1410      0.951 0.060 0.000 0.000 0.940 0.000
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.3586      0.589 0.736 0.000 0.000 0.264 0.000
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0000      0.922 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      1.000 0.000 1.000 0.000 0.000 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
#> SRR1521352     4  0.1349      0.954 0.004 0.000 0.000 0.940 0.000 0.056
#> SRR1521353     3  0.4127      0.674 0.000 0.000 0.684 0.004 0.028 0.284
#> SRR1521354     3  0.4127      0.674 0.000 0.000 0.684 0.004 0.028 0.284
#> SRR1521355     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521356     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.0713      0.874 0.000 0.000 0.000 0.028 0.000 0.972
#> SRR1521360     6  0.1765      0.795 0.000 0.000 0.096 0.000 0.000 0.904
#> SRR1521361     6  0.0146      0.889 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR1521362     4  0.0405      0.950 0.004 0.000 0.000 0.988 0.008 0.000
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.1857      0.848 0.000 0.000 0.924 0.004 0.028 0.044
#> SRR1521370     3  0.4165      0.664 0.000 0.000 0.676 0.004 0.028 0.292
#> SRR1521371     1  0.0000      0.977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521372     5  0.1341      0.936 0.024 0.000 0.000 0.000 0.948 0.028
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.3050      0.559 0.000 0.236 0.764 0.000 0.000 0.000
#> SRR1521377     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.2554      0.824 0.000 0.000 0.876 0.004 0.028 0.092
#> SRR1521379     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521380     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.0146      0.889 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     4  0.1858      0.943 0.012 0.000 0.000 0.912 0.000 0.076
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     4  0.1753      0.942 0.004 0.000 0.000 0.912 0.000 0.084
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.4087      0.683 0.000 0.000 0.692 0.004 0.028 0.276
#> SRR1521388     4  0.0405      0.950 0.004 0.000 0.000 0.988 0.008 0.000
#> SRR1521389     4  0.0405      0.950 0.004 0.000 0.000 0.988 0.008 0.000
#> SRR1521390     4  0.0405      0.950 0.004 0.000 0.000 0.988 0.008 0.000
#> SRR1521391     5  0.0260      0.909 0.000 0.000 0.000 0.000 0.992 0.008
#> SRR1521392     5  0.0865      0.947 0.036 0.000 0.000 0.000 0.964 0.000
#> SRR1521393     5  0.0865      0.947 0.036 0.000 0.000 0.000 0.964 0.000
#> SRR1521394     5  0.0865      0.947 0.036 0.000 0.000 0.000 0.964 0.000
#> SRR1521395     5  0.0865      0.947 0.036 0.000 0.000 0.000 0.964 0.000
#> SRR1521396     5  0.0865      0.947 0.036 0.000 0.000 0.000 0.964 0.000
#> SRR1521397     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521398     1  0.0000      0.977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.1297      0.948 0.040 0.000 0.000 0.000 0.948 0.012
#> SRR1521400     5  0.1297      0.948 0.040 0.000 0.000 0.000 0.948 0.012
#> SRR1521401     5  0.1297      0.948 0.040 0.000 0.000 0.000 0.948 0.012
#> SRR1521403     5  0.1297      0.948 0.040 0.000 0.000 0.000 0.948 0.012
#> SRR1521402     5  0.1297      0.948 0.040 0.000 0.000 0.000 0.948 0.012
#> SRR1521405     4  0.0405      0.950 0.004 0.000 0.000 0.988 0.008 0.000
#> SRR1521406     1  0.0000      0.977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.1531      0.951 0.004 0.000 0.000 0.928 0.000 0.068
#> SRR1521408     3  0.4087      0.683 0.000 0.000 0.692 0.004 0.028 0.276
#> SRR1521407     6  0.0363      0.886 0.000 0.000 0.000 0.000 0.012 0.988
#> SRR1521409     6  0.4560      0.565 0.000 0.200 0.000 0.108 0.000 0.692
#> SRR1521410     1  0.0632      0.960 0.976 0.000 0.000 0.024 0.000 0.000
#> SRR1521411     1  0.0000      0.977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000      0.977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521414     5  0.3784      0.618 0.308 0.000 0.000 0.000 0.680 0.012
#> SRR1521413     1  0.0000      0.977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     5  0.2877      0.813 0.168 0.000 0.000 0.000 0.820 0.012
#> SRR1521416     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521417     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521418     1  0.0000      0.977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521420     1  0.1967      0.901 0.904 0.000 0.000 0.012 0.000 0.084
#> SRR1521421     1  0.2147      0.893 0.896 0.000 0.000 0.000 0.020 0.084
#> SRR1521422     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521424     4  0.1700      0.945 0.004 0.000 0.000 0.916 0.000 0.080
#> SRR1521423     1  0.0146      0.977 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521426     4  0.1349      0.954 0.004 0.000 0.000 0.940 0.000 0.056
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.2856      0.849 0.856 0.000 0.000 0.068 0.000 0.076
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000      0.875 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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-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.896           0.969       0.986         0.4828 0.520   0.520
#> 3 3 0.750           0.910       0.942         0.3683 0.726   0.515
#> 4 4 0.766           0.830       0.910         0.1264 0.880   0.663
#> 5 5 0.875           0.909       0.947         0.0672 0.871   0.560
#> 6 6 0.923           0.904       0.959         0.0287 0.980   0.902

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
#> SRR1521352     1  0.0000      0.980 1.000 0.000
#> SRR1521353     1  0.4022      0.907 0.920 0.080
#> SRR1521354     1  0.0000      0.980 1.000 0.000
#> SRR1521355     1  0.0000      0.980 1.000 0.000
#> SRR1521356     1  0.0000      0.980 1.000 0.000
#> SRR1521357     2  0.0000      0.992 0.000 1.000
#> SRR1521358     2  0.0000      0.992 0.000 1.000
#> SRR1521359     1  0.0000      0.980 1.000 0.000
#> SRR1521360     1  0.7219      0.768 0.800 0.200
#> SRR1521361     1  0.0000      0.980 1.000 0.000
#> SRR1521362     1  0.0000      0.980 1.000 0.000
#> SRR1521363     2  0.0000      0.992 0.000 1.000
#> SRR1521364     2  0.0000      0.992 0.000 1.000
#> SRR1521365     2  0.0000      0.992 0.000 1.000
#> SRR1521366     2  0.8144      0.646 0.252 0.748
#> SRR1521368     2  0.0000      0.992 0.000 1.000
#> SRR1521369     1  0.7219      0.768 0.800 0.200
#> SRR1521370     1  0.0000      0.980 1.000 0.000
#> SRR1521371     1  0.0000      0.980 1.000 0.000
#> SRR1521372     1  0.0000      0.980 1.000 0.000
#> SRR1521373     2  0.0000      0.992 0.000 1.000
#> SRR1521374     2  0.0000      0.992 0.000 1.000
#> SRR1521375     2  0.0000      0.992 0.000 1.000
#> SRR1521376     2  0.0000      0.992 0.000 1.000
#> SRR1521377     2  0.0000      0.992 0.000 1.000
#> SRR1521378     1  0.7219      0.768 0.800 0.200
#> SRR1521379     2  0.0000      0.992 0.000 1.000
#> SRR1521380     2  0.0000      0.992 0.000 1.000
#> SRR1521381     1  0.0000      0.980 1.000 0.000
#> SRR1521382     2  0.0000      0.992 0.000 1.000
#> SRR1521383     1  0.0000      0.980 1.000 0.000
#> SRR1521384     2  0.0000      0.992 0.000 1.000
#> SRR1521385     1  0.0000      0.980 1.000 0.000
#> SRR1521387     2  0.0000      0.992 0.000 1.000
#> SRR1521386     1  0.7219      0.768 0.800 0.200
#> SRR1521388     1  0.0000      0.980 1.000 0.000
#> SRR1521389     1  0.0000      0.980 1.000 0.000
#> SRR1521390     1  0.0000      0.980 1.000 0.000
#> SRR1521391     1  0.0000      0.980 1.000 0.000
#> SRR1521392     1  0.0000      0.980 1.000 0.000
#> SRR1521393     1  0.0000      0.980 1.000 0.000
#> SRR1521394     1  0.0000      0.980 1.000 0.000
#> SRR1521395     1  0.0000      0.980 1.000 0.000
#> SRR1521396     1  0.0000      0.980 1.000 0.000
#> SRR1521397     1  0.0000      0.980 1.000 0.000
#> SRR1521398     1  0.0000      0.980 1.000 0.000
#> SRR1521399     1  0.0000      0.980 1.000 0.000
#> SRR1521400     1  0.0000      0.980 1.000 0.000
#> SRR1521401     1  0.0000      0.980 1.000 0.000
#> SRR1521403     1  0.0000      0.980 1.000 0.000
#> SRR1521402     1  0.0000      0.980 1.000 0.000
#> SRR1521405     1  0.0000      0.980 1.000 0.000
#> SRR1521406     1  0.0000      0.980 1.000 0.000
#> SRR1521404     1  0.0000      0.980 1.000 0.000
#> SRR1521408     1  0.0938      0.970 0.988 0.012
#> SRR1521407     1  0.0000      0.980 1.000 0.000
#> SRR1521409     1  0.7219      0.768 0.800 0.200
#> SRR1521410     1  0.0000      0.980 1.000 0.000
#> SRR1521411     1  0.0000      0.980 1.000 0.000
#> SRR1521412     1  0.0000      0.980 1.000 0.000
#> SRR1521414     1  0.0000      0.980 1.000 0.000
#> SRR1521413     1  0.0000      0.980 1.000 0.000
#> SRR1521415     1  0.0000      0.980 1.000 0.000
#> SRR1521416     1  0.0000      0.980 1.000 0.000
#> SRR1521417     1  0.0000      0.980 1.000 0.000
#> SRR1521418     1  0.0000      0.980 1.000 0.000
#> SRR1521419     1  0.0000      0.980 1.000 0.000
#> SRR1521420     1  0.0000      0.980 1.000 0.000
#> SRR1521421     1  0.0000      0.980 1.000 0.000
#> SRR1521422     1  0.0000      0.980 1.000 0.000
#> SRR1521424     1  0.0000      0.980 1.000 0.000
#> SRR1521423     1  0.0000      0.980 1.000 0.000
#> SRR1521426     1  0.0000      0.980 1.000 0.000
#> SRR1521427     2  0.0000      0.992 0.000 1.000
#> SRR1521425     1  0.0000      0.980 1.000 0.000
#> SRR1521428     2  0.0000      0.992 0.000 1.000
#> SRR1521430     2  0.0000      0.992 0.000 1.000
#> SRR1521429     2  0.0000      0.992 0.000 1.000
#> SRR1521432     2  0.0000      0.992 0.000 1.000
#> SRR1521433     2  0.0000      0.992 0.000 1.000
#> SRR1521434     2  0.0000      0.992 0.000 1.000
#> SRR1521435     2  0.0000      0.992 0.000 1.000
#> SRR1521436     2  0.0000      0.992 0.000 1.000
#> SRR1521437     2  0.0000      0.992 0.000 1.000
#> SRR1521431     2  0.0000      0.992 0.000 1.000
#> SRR1521438     2  0.0000      0.992 0.000 1.000
#> SRR1521439     2  0.0000      0.992 0.000 1.000
#> SRR1521440     2  0.0000      0.992 0.000 1.000
#> SRR1521441     2  0.0000      0.992 0.000 1.000
#> SRR1521443     2  0.0000      0.992 0.000 1.000
#> SRR1521442     2  0.0000      0.992 0.000 1.000
#> SRR1521444     2  0.0000      0.992 0.000 1.000
#> SRR1521445     2  0.0000      0.992 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
#> SRR1521352     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521353     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521359     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521360     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521361     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521362     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521363     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521364     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521365     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521366     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521368     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521369     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521370     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521372     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521373     2  0.2537      0.921 0.000 0.920 0.080
#> SRR1521374     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521376     2  0.3941      0.873 0.000 0.844 0.156
#> SRR1521377     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521378     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521379     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521380     3  0.4654      0.641 0.000 0.208 0.792
#> SRR1521381     3  0.0892      0.882 0.020 0.000 0.980
#> SRR1521382     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521383     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521384     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521385     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521387     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521386     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521388     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521391     3  0.1163      0.882 0.028 0.000 0.972
#> SRR1521392     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521393     3  0.4887      0.820 0.228 0.000 0.772
#> SRR1521394     3  0.5835      0.652 0.340 0.000 0.660
#> SRR1521395     3  0.4887      0.820 0.228 0.000 0.772
#> SRR1521396     3  0.4121      0.868 0.168 0.000 0.832
#> SRR1521397     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521399     1  0.6008      0.231 0.628 0.000 0.372
#> SRR1521400     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521401     3  0.4887      0.820 0.228 0.000 0.772
#> SRR1521403     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521402     3  0.4887      0.820 0.228 0.000 0.772
#> SRR1521405     1  0.0424      0.973 0.992 0.000 0.008
#> SRR1521406     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521404     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521408     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521407     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521409     3  0.1031      0.882 0.024 0.000 0.976
#> SRR1521410     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521412     1  0.0424      0.973 0.992 0.000 0.008
#> SRR1521414     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521420     3  0.4887      0.820 0.228 0.000 0.772
#> SRR1521421     3  0.4605      0.842 0.204 0.000 0.796
#> SRR1521422     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521424     3  0.4062      0.871 0.164 0.000 0.836
#> SRR1521423     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.981 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521430     2  0.4062      0.867 0.000 0.836 0.164
#> SRR1521429     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521432     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521433     2  0.4062      0.867 0.000 0.836 0.164
#> SRR1521434     2  0.4062      0.867 0.000 0.836 0.164
#> SRR1521435     2  0.4062      0.867 0.000 0.836 0.164
#> SRR1521436     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521431     3  0.0000      0.880 0.000 0.000 1.000
#> SRR1521438     2  0.4062      0.867 0.000 0.836 0.164
#> SRR1521439     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.966 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.966 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
#> SRR1521352     4  0.2760      0.745 0.128 0.000 0.000 0.872
#> SRR1521353     4  0.4776      0.437 0.000 0.000 0.376 0.624
#> SRR1521354     4  0.4356      0.596 0.000 0.000 0.292 0.708
#> SRR1521355     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.0817      0.787 0.024 0.000 0.000 0.976
#> SRR1521360     4  0.4134      0.639 0.000 0.000 0.260 0.740
#> SRR1521361     4  0.0000      0.787 0.000 0.000 0.000 1.000
#> SRR1521362     4  0.0817      0.787 0.024 0.000 0.000 0.976
#> SRR1521363     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521364     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.2408      0.892 0.000 0.000 0.896 0.104
#> SRR1521370     4  0.4164      0.634 0.000 0.000 0.264 0.736
#> SRR1521371     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521372     4  0.0000      0.787 0.000 0.000 0.000 1.000
#> SRR1521373     2  0.0707      0.959 0.000 0.980 0.000 0.020
#> SRR1521374     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521376     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521377     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.4877      0.216 0.000 0.592 0.000 0.408
#> SRR1521380     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521381     4  0.0000      0.787 0.000 0.000 0.000 1.000
#> SRR1521382     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.2814      0.742 0.132 0.000 0.000 0.868
#> SRR1521384     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.0817      0.787 0.024 0.000 0.000 0.976
#> SRR1521387     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.2408      0.891 0.000 0.000 0.896 0.104
#> SRR1521388     1  0.4431      0.658 0.696 0.000 0.000 0.304
#> SRR1521389     1  0.3975      0.712 0.760 0.000 0.000 0.240
#> SRR1521390     1  0.4713      0.580 0.640 0.000 0.000 0.360
#> SRR1521391     4  0.3975      0.652 0.000 0.000 0.240 0.760
#> SRR1521392     4  0.4008      0.685 0.244 0.000 0.000 0.756
#> SRR1521393     4  0.4661      0.617 0.348 0.000 0.000 0.652
#> SRR1521394     4  0.4697      0.606 0.356 0.000 0.000 0.644
#> SRR1521395     4  0.4661      0.617 0.348 0.000 0.000 0.652
#> SRR1521396     4  0.4661      0.617 0.348 0.000 0.000 0.652
#> SRR1521397     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521399     4  0.4999      0.299 0.492 0.000 0.000 0.508
#> SRR1521400     4  0.0000      0.787 0.000 0.000 0.000 1.000
#> SRR1521401     4  0.4661      0.617 0.348 0.000 0.000 0.652
#> SRR1521403     4  0.0469      0.788 0.012 0.000 0.000 0.988
#> SRR1521402     4  0.4661      0.617 0.348 0.000 0.000 0.652
#> SRR1521405     1  0.4713      0.580 0.640 0.000 0.000 0.360
#> SRR1521406     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521404     4  0.2704      0.748 0.124 0.000 0.000 0.876
#> SRR1521408     4  0.4356      0.596 0.000 0.000 0.292 0.708
#> SRR1521407     4  0.0817      0.787 0.024 0.000 0.000 0.976
#> SRR1521409     4  0.0817      0.787 0.024 0.000 0.000 0.976
#> SRR1521410     1  0.3975      0.712 0.760 0.000 0.000 0.240
#> SRR1521411     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.1118      0.858 0.964 0.000 0.000 0.036
#> SRR1521414     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.2647      0.776 0.880 0.000 0.000 0.120
#> SRR1521416     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521420     4  0.2814      0.742 0.132 0.000 0.000 0.868
#> SRR1521421     4  0.3528      0.726 0.192 0.000 0.000 0.808
#> SRR1521422     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521424     4  0.0817      0.787 0.024 0.000 0.000 0.976
#> SRR1521423     1  0.0000      0.881 1.000 0.000 0.000 0.000
#> SRR1521426     1  0.4713      0.580 0.640 0.000 0.000 0.360
#> SRR1521427     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.4250      0.686 0.724 0.000 0.000 0.276
#> SRR1521428     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521429     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.0000      0.985 0.000 0.000 1.000 0.000
#> SRR1521439     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.978 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.978 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0000      0.886 0.000 0.000 0.000 1.000 0.000
#> SRR1521353     3  0.2471      0.877 0.000 0.000 0.864 0.000 0.136
#> SRR1521354     3  0.2471      0.877 0.000 0.000 0.864 0.000 0.136
#> SRR1521355     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521360     4  0.5967      0.479 0.000 0.000 0.308 0.556 0.136
#> SRR1521361     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521362     4  0.0510      0.890 0.000 0.000 0.000 0.984 0.016
#> SRR1521363     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.2074      0.901 0.000 0.000 0.896 0.000 0.104
#> SRR1521370     3  0.2471      0.877 0.000 0.000 0.864 0.000 0.136
#> SRR1521371     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521372     5  0.1851      0.815 0.000 0.000 0.000 0.088 0.912
#> SRR1521373     2  0.0703      0.952 0.000 0.976 0.000 0.000 0.024
#> SRR1521374     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521377     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.4697      0.267 0.000 0.592 0.000 0.388 0.020
#> SRR1521380     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521382     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521384     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521387     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.1732      0.916 0.000 0.000 0.920 0.000 0.080
#> SRR1521388     4  0.0000      0.886 0.000 0.000 0.000 1.000 0.000
#> SRR1521389     4  0.0000      0.886 0.000 0.000 0.000 1.000 0.000
#> SRR1521390     4  0.0000      0.886 0.000 0.000 0.000 1.000 0.000
#> SRR1521391     5  0.0000      0.891 0.000 0.000 0.000 0.000 1.000
#> SRR1521392     5  0.0000      0.891 0.000 0.000 0.000 0.000 1.000
#> SRR1521393     5  0.2179      0.908 0.112 0.000 0.000 0.000 0.888
#> SRR1521394     5  0.2179      0.908 0.112 0.000 0.000 0.000 0.888
#> SRR1521395     5  0.2179      0.908 0.112 0.000 0.000 0.000 0.888
#> SRR1521396     5  0.0404      0.896 0.012 0.000 0.000 0.000 0.988
#> SRR1521397     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.2230      0.905 0.116 0.000 0.000 0.000 0.884
#> SRR1521400     5  0.0000      0.891 0.000 0.000 0.000 0.000 1.000
#> SRR1521401     5  0.2179      0.908 0.112 0.000 0.000 0.000 0.888
#> SRR1521403     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521402     5  0.2230      0.905 0.116 0.000 0.000 0.000 0.884
#> SRR1521405     4  0.0000      0.886 0.000 0.000 0.000 1.000 0.000
#> SRR1521406     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.2230      0.903 0.000 0.000 0.000 0.884 0.116
#> SRR1521408     3  0.2471      0.877 0.000 0.000 0.864 0.000 0.136
#> SRR1521407     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521409     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521410     4  0.2561      0.827 0.144 0.000 0.000 0.856 0.000
#> SRR1521411     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.4150      0.280 0.612 0.000 0.000 0.388 0.000
#> SRR1521414     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.3452      0.621 0.756 0.000 0.000 0.000 0.244
#> SRR1521416     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     4  0.2864      0.848 0.112 0.000 0.000 0.864 0.024
#> SRR1521421     4  0.3055      0.879 0.072 0.000 0.000 0.864 0.064
#> SRR1521422     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.2471      0.904 0.000 0.000 0.000 0.864 0.136
#> SRR1521423     1  0.0000      0.951 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.0000      0.886 0.000 0.000 0.000 1.000 0.000
#> SRR1521427     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     4  0.2471      0.834 0.136 0.000 0.000 0.864 0.000
#> SRR1521428     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0000      0.955 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.978 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.978 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.2664      0.752 0.000 0.000 0.000 0.184 0.000 0.816
#> SRR1521353     3  0.2664      0.831 0.000 0.000 0.816 0.000 0.000 0.184
#> SRR1521354     3  0.2664      0.831 0.000 0.000 0.816 0.000 0.000 0.184
#> SRR1521355     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521360     6  0.3076      0.588 0.000 0.000 0.240 0.000 0.000 0.760
#> SRR1521361     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521362     4  0.2793      0.742 0.000 0.000 0.000 0.800 0.000 0.200
#> SRR1521363     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.2562      0.840 0.000 0.000 0.828 0.000 0.000 0.172
#> SRR1521370     3  0.2664      0.831 0.000 0.000 0.816 0.000 0.000 0.184
#> SRR1521371     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521372     5  0.2793      0.707 0.000 0.000 0.000 0.000 0.800 0.200
#> SRR1521373     2  0.0713      0.945 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR1521374     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521377     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521379     2  0.3774      0.263 0.000 0.592 0.000 0.000 0.000 0.408
#> SRR1521380     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521382     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521384     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521387     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.2300      0.857 0.000 0.000 0.856 0.000 0.000 0.144
#> SRR1521388     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521391     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521392     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521393     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521394     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521395     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521396     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521397     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.0146      0.969 0.004 0.000 0.000 0.000 0.996 0.000
#> SRR1521400     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521401     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521403     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521402     5  0.0000      0.973 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521405     4  0.0000      0.943 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.2664      0.831 0.000 0.000 0.816 0.000 0.000 0.184
#> SRR1521407     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521409     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521410     6  0.2697      0.752 0.188 0.000 0.000 0.000 0.000 0.812
#> SRR1521411     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521412     1  0.3774      0.200 0.592 0.000 0.000 0.000 0.000 0.408
#> SRR1521414     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.3023      0.674 0.768 0.000 0.000 0.000 0.232 0.000
#> SRR1521416     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     6  0.2454      0.783 0.160 0.000 0.000 0.000 0.000 0.840
#> SRR1521421     6  0.1957      0.826 0.112 0.000 0.000 0.000 0.000 0.888
#> SRR1521422     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     6  0.0000      0.893 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521423     1  0.0000      0.950 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     6  0.2664      0.752 0.000 0.000 0.000 0.184 0.000 0.816
#> SRR1521427     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.2664      0.756 0.184 0.000 0.000 0.000 0.000 0.816
#> SRR1521428     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000      0.931 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.977 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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

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

collect_plots(res)

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 1.000           0.991       0.996         0.5055 0.495   0.495
#> 3 3 0.699           0.755       0.880         0.2438 0.849   0.703
#> 4 4 0.636           0.775       0.818         0.1560 0.840   0.588
#> 5 5 0.680           0.747       0.850         0.0599 0.919   0.694
#> 6 6 0.787           0.651       0.809         0.0624 0.942   0.730

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
#> SRR1521352     1   0.000      0.992 1.000 0.000
#> SRR1521353     2   0.000      0.999 0.000 1.000
#> SRR1521354     2   0.000      0.999 0.000 1.000
#> SRR1521355     1   0.000      0.992 1.000 0.000
#> SRR1521356     1   0.000      0.992 1.000 0.000
#> SRR1521357     2   0.000      0.999 0.000 1.000
#> SRR1521358     2   0.000      0.999 0.000 1.000
#> SRR1521359     1   0.000      0.992 1.000 0.000
#> SRR1521360     2   0.000      0.999 0.000 1.000
#> SRR1521361     1   0.775      0.709 0.772 0.228
#> SRR1521362     1   0.000      0.992 1.000 0.000
#> SRR1521363     2   0.000      0.999 0.000 1.000
#> SRR1521364     2   0.000      0.999 0.000 1.000
#> SRR1521365     2   0.000      0.999 0.000 1.000
#> SRR1521366     2   0.000      0.999 0.000 1.000
#> SRR1521368     2   0.000      0.999 0.000 1.000
#> SRR1521369     2   0.000      0.999 0.000 1.000
#> SRR1521370     2   0.000      0.999 0.000 1.000
#> SRR1521371     1   0.000      0.992 1.000 0.000
#> SRR1521372     1   0.000      0.992 1.000 0.000
#> SRR1521373     2   0.000      0.999 0.000 1.000
#> SRR1521374     2   0.000      0.999 0.000 1.000
#> SRR1521375     2   0.000      0.999 0.000 1.000
#> SRR1521376     2   0.000      0.999 0.000 1.000
#> SRR1521377     2   0.000      0.999 0.000 1.000
#> SRR1521378     2   0.000      0.999 0.000 1.000
#> SRR1521379     2   0.000      0.999 0.000 1.000
#> SRR1521380     2   0.000      0.999 0.000 1.000
#> SRR1521381     1   0.000      0.992 1.000 0.000
#> SRR1521382     2   0.000      0.999 0.000 1.000
#> SRR1521383     1   0.000      0.992 1.000 0.000
#> SRR1521384     2   0.000      0.999 0.000 1.000
#> SRR1521385     1   0.000      0.992 1.000 0.000
#> SRR1521387     2   0.000      0.999 0.000 1.000
#> SRR1521386     2   0.000      0.999 0.000 1.000
#> SRR1521388     1   0.000      0.992 1.000 0.000
#> SRR1521389     1   0.000      0.992 1.000 0.000
#> SRR1521390     1   0.000      0.992 1.000 0.000
#> SRR1521391     1   0.552      0.853 0.872 0.128
#> SRR1521392     1   0.000      0.992 1.000 0.000
#> SRR1521393     1   0.000      0.992 1.000 0.000
#> SRR1521394     1   0.000      0.992 1.000 0.000
#> SRR1521395     1   0.000      0.992 1.000 0.000
#> SRR1521396     1   0.000      0.992 1.000 0.000
#> SRR1521397     1   0.000      0.992 1.000 0.000
#> SRR1521398     1   0.000      0.992 1.000 0.000
#> SRR1521399     1   0.000      0.992 1.000 0.000
#> SRR1521400     1   0.000      0.992 1.000 0.000
#> SRR1521401     1   0.000      0.992 1.000 0.000
#> SRR1521403     1   0.000      0.992 1.000 0.000
#> SRR1521402     1   0.000      0.992 1.000 0.000
#> SRR1521405     1   0.000      0.992 1.000 0.000
#> SRR1521406     1   0.000      0.992 1.000 0.000
#> SRR1521404     1   0.000      0.992 1.000 0.000
#> SRR1521408     2   0.000      0.999 0.000 1.000
#> SRR1521407     1   0.000      0.992 1.000 0.000
#> SRR1521409     2   0.242      0.958 0.040 0.960
#> SRR1521410     1   0.000      0.992 1.000 0.000
#> SRR1521411     1   0.000      0.992 1.000 0.000
#> SRR1521412     1   0.000      0.992 1.000 0.000
#> SRR1521414     1   0.000      0.992 1.000 0.000
#> SRR1521413     1   0.000      0.992 1.000 0.000
#> SRR1521415     1   0.000      0.992 1.000 0.000
#> SRR1521416     1   0.000      0.992 1.000 0.000
#> SRR1521417     1   0.000      0.992 1.000 0.000
#> SRR1521418     1   0.000      0.992 1.000 0.000
#> SRR1521419     1   0.000      0.992 1.000 0.000
#> SRR1521420     1   0.000      0.992 1.000 0.000
#> SRR1521421     1   0.000      0.992 1.000 0.000
#> SRR1521422     1   0.000      0.992 1.000 0.000
#> SRR1521424     1   0.000      0.992 1.000 0.000
#> SRR1521423     1   0.000      0.992 1.000 0.000
#> SRR1521426     1   0.000      0.992 1.000 0.000
#> SRR1521427     2   0.000      0.999 0.000 1.000
#> SRR1521425     1   0.000      0.992 1.000 0.000
#> SRR1521428     2   0.000      0.999 0.000 1.000
#> SRR1521430     2   0.000      0.999 0.000 1.000
#> SRR1521429     2   0.000      0.999 0.000 1.000
#> SRR1521432     2   0.000      0.999 0.000 1.000
#> SRR1521433     2   0.000      0.999 0.000 1.000
#> SRR1521434     2   0.000      0.999 0.000 1.000
#> SRR1521435     2   0.000      0.999 0.000 1.000
#> SRR1521436     2   0.000      0.999 0.000 1.000
#> SRR1521437     2   0.000      0.999 0.000 1.000
#> SRR1521431     2   0.000      0.999 0.000 1.000
#> SRR1521438     2   0.000      0.999 0.000 1.000
#> SRR1521439     2   0.000      0.999 0.000 1.000
#> SRR1521440     2   0.000      0.999 0.000 1.000
#> SRR1521441     2   0.000      0.999 0.000 1.000
#> SRR1521443     2   0.000      0.999 0.000 1.000
#> SRR1521442     2   0.000      0.999 0.000 1.000
#> SRR1521444     2   0.000      0.999 0.000 1.000
#> SRR1521445     2   0.000      0.999 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
#> SRR1521352     1  0.6244      0.424 0.560 0.000 0.440
#> SRR1521353     3  0.0000      0.852 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.852 0.000 0.000 1.000
#> SRR1521355     1  0.3619      0.731 0.864 0.000 0.136
#> SRR1521356     1  0.2959      0.753 0.900 0.000 0.100
#> SRR1521357     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521359     1  0.6280      0.399 0.540 0.000 0.460
#> SRR1521360     3  0.5681      0.557 0.236 0.016 0.748
#> SRR1521361     3  0.5948      0.220 0.360 0.000 0.640
#> SRR1521362     1  0.6280      0.399 0.540 0.000 0.460
#> SRR1521363     3  0.6794      0.595 0.028 0.324 0.648
#> SRR1521364     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521365     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521366     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521368     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521369     3  0.1163      0.859 0.000 0.028 0.972
#> SRR1521370     3  0.0829      0.852 0.004 0.012 0.984
#> SRR1521371     1  0.0237      0.784 0.996 0.000 0.004
#> SRR1521372     1  0.5254      0.636 0.736 0.000 0.264
#> SRR1521373     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521376     3  0.6211      0.712 0.036 0.228 0.736
#> SRR1521377     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521378     3  0.0000      0.852 0.000 0.000 1.000
#> SRR1521379     3  0.7039      0.606 0.040 0.312 0.648
#> SRR1521380     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521381     1  0.6302      0.340 0.520 0.000 0.480
#> SRR1521382     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521383     1  0.6244      0.424 0.560 0.000 0.440
#> SRR1521384     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521385     1  0.6244      0.424 0.560 0.000 0.440
#> SRR1521387     2  0.0424      0.990 0.000 0.992 0.008
#> SRR1521386     3  0.0000      0.852 0.000 0.000 1.000
#> SRR1521388     1  0.6252      0.419 0.556 0.000 0.444
#> SRR1521389     1  0.6252      0.419 0.556 0.000 0.444
#> SRR1521390     1  0.6252      0.419 0.556 0.000 0.444
#> SRR1521391     3  0.5968      0.199 0.364 0.000 0.636
#> SRR1521392     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521393     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521394     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521395     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521396     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521397     1  0.2261      0.768 0.932 0.000 0.068
#> SRR1521398     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521399     1  0.0892      0.788 0.980 0.000 0.020
#> SRR1521400     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521401     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521403     1  0.6260      0.418 0.552 0.000 0.448
#> SRR1521402     1  0.1031      0.787 0.976 0.000 0.024
#> SRR1521405     1  0.6252      0.419 0.556 0.000 0.444
#> SRR1521406     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521404     1  0.6244      0.424 0.560 0.000 0.440
#> SRR1521408     3  0.0000      0.852 0.000 0.000 1.000
#> SRR1521407     1  0.6274      0.405 0.544 0.000 0.456
#> SRR1521409     3  0.7849      0.493 0.248 0.104 0.648
#> SRR1521410     1  0.5397      0.603 0.720 0.000 0.280
#> SRR1521411     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521412     1  0.0747      0.787 0.984 0.000 0.016
#> SRR1521414     1  0.0747      0.787 0.984 0.000 0.016
#> SRR1521413     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521415     1  0.0892      0.788 0.980 0.000 0.020
#> SRR1521416     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521418     1  0.0424      0.786 0.992 0.000 0.008
#> SRR1521419     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521420     1  0.0747      0.787 0.984 0.000 0.016
#> SRR1521421     1  0.0892      0.788 0.980 0.000 0.020
#> SRR1521422     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521424     1  0.6244      0.424 0.560 0.000 0.440
#> SRR1521423     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521426     1  0.6244      0.424 0.560 0.000 0.440
#> SRR1521427     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.783 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521430     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521429     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521432     3  0.0892      0.858 0.000 0.020 0.980
#> SRR1521433     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521434     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521435     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521436     3  0.7187      0.302 0.024 0.480 0.496
#> SRR1521437     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521431     3  0.1031      0.859 0.000 0.024 0.976
#> SRR1521438     3  0.1529      0.861 0.000 0.040 0.960
#> SRR1521439     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.999 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
#> SRR1521352     4  0.0188     0.8174 0.000 0.000 0.004 0.996
#> SRR1521353     3  0.3610     0.9101 0.000 0.000 0.800 0.200
#> SRR1521354     3  0.3610     0.9101 0.000 0.000 0.800 0.200
#> SRR1521355     1  0.7084     0.7645 0.552 0.000 0.164 0.284
#> SRR1521356     1  0.7198     0.7940 0.548 0.000 0.196 0.256
#> SRR1521357     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.4562     0.7190 0.208 0.000 0.028 0.764
#> SRR1521360     3  0.7240     0.3551 0.144 0.000 0.456 0.400
#> SRR1521361     4  0.5690     0.6573 0.216 0.000 0.084 0.700
#> SRR1521362     4  0.2918     0.7862 0.116 0.000 0.008 0.876
#> SRR1521363     2  0.6478     0.4343 0.000 0.576 0.088 0.336
#> SRR1521364     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521365     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521368     2  0.3569     0.7509 0.000 0.804 0.000 0.196
#> SRR1521369     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521370     3  0.5344     0.7631 0.032 0.000 0.668 0.300
#> SRR1521371     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521372     4  0.5016     0.5979 0.396 0.000 0.004 0.600
#> SRR1521373     2  0.3907     0.7220 0.000 0.768 0.000 0.232
#> SRR1521374     2  0.3569     0.7509 0.000 0.804 0.000 0.196
#> SRR1521375     2  0.3610     0.7476 0.000 0.800 0.000 0.200
#> SRR1521376     3  0.7495     0.4752 0.000 0.192 0.468 0.340
#> SRR1521377     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521378     3  0.3610     0.9101 0.000 0.000 0.800 0.200
#> SRR1521379     2  0.6523     0.4060 0.000 0.564 0.088 0.348
#> SRR1521380     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521381     4  0.5072     0.6938 0.208 0.000 0.052 0.740
#> SRR1521382     2  0.3610     0.7476 0.000 0.800 0.000 0.200
#> SRR1521383     4  0.1356     0.8036 0.032 0.000 0.008 0.960
#> SRR1521384     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.0188     0.8174 0.000 0.000 0.004 0.996
#> SRR1521387     2  0.3853     0.7706 0.000 0.820 0.020 0.160
#> SRR1521386     3  0.3610     0.9101 0.000 0.000 0.800 0.200
#> SRR1521388     4  0.0336     0.8197 0.000 0.000 0.008 0.992
#> SRR1521389     4  0.0336     0.8197 0.000 0.000 0.008 0.992
#> SRR1521390     4  0.0336     0.8197 0.000 0.000 0.008 0.992
#> SRR1521391     3  0.5925     0.4600 0.036 0.000 0.512 0.452
#> SRR1521392     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521393     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521394     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521395     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521396     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521397     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521398     1  0.7205     0.7974 0.548 0.000 0.200 0.252
#> SRR1521399     1  0.0707     0.6677 0.980 0.000 0.000 0.020
#> SRR1521400     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521401     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521403     4  0.5131     0.6826 0.280 0.000 0.028 0.692
#> SRR1521402     1  0.0000     0.6607 1.000 0.000 0.000 0.000
#> SRR1521405     4  0.0336     0.8197 0.000 0.000 0.008 0.992
#> SRR1521406     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521404     4  0.0336     0.8197 0.000 0.000 0.008 0.992
#> SRR1521408     3  0.3610     0.9101 0.000 0.000 0.800 0.200
#> SRR1521407     4  0.5031     0.6929 0.212 0.000 0.048 0.740
#> SRR1521409     4  0.6659     0.0461 0.000 0.400 0.088 0.512
#> SRR1521410     1  0.7505     0.7244 0.476 0.000 0.200 0.324
#> SRR1521411     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521412     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521414     1  0.3342     0.7074 0.868 0.000 0.032 0.100
#> SRR1521413     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521415     1  0.0592     0.6671 0.984 0.000 0.016 0.000
#> SRR1521416     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521417     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521418     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521419     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521420     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521421     1  0.5947     0.7341 0.688 0.000 0.112 0.200
#> SRR1521422     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521424     4  0.0188     0.8174 0.000 0.000 0.004 0.996
#> SRR1521423     1  0.7176     0.7999 0.552 0.000 0.196 0.252
#> SRR1521426     4  0.0188     0.8174 0.000 0.000 0.004 0.996
#> SRR1521427     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.7205     0.7974 0.548 0.000 0.200 0.252
#> SRR1521428     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521429     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.4019     0.9151 0.000 0.012 0.792 0.196
#> SRR1521433     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521434     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521435     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521436     2  0.5321     0.6495 0.000 0.716 0.056 0.228
#> SRR1521437     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.4019     0.9151 0.000 0.012 0.792 0.196
#> SRR1521438     3  0.4348     0.9182 0.000 0.024 0.780 0.196
#> SRR1521439     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000     0.8719 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000     0.8719 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.6094     0.6055 0.384 0.000 0.128 0.488 0.000
#> SRR1521353     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1  0.3636     0.7883 0.832 0.000 0.004 0.084 0.080
#> SRR1521356     1  0.1757     0.8899 0.936 0.000 0.004 0.048 0.012
#> SRR1521357     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.7914     0.5691 0.264 0.000 0.152 0.444 0.140
#> SRR1521360     3  0.5102     0.5739 0.000 0.000 0.696 0.176 0.128
#> SRR1521361     5  0.6647    -0.0541 0.000 0.000 0.232 0.344 0.424
#> SRR1521362     4  0.6939     0.6126 0.352 0.000 0.140 0.472 0.036
#> SRR1521363     2  0.7631     0.3644 0.000 0.504 0.204 0.168 0.124
#> SRR1521364     3  0.0162     0.9323 0.000 0.004 0.996 0.000 0.000
#> SRR1521365     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0162     0.9323 0.000 0.004 0.996 0.000 0.000
#> SRR1521368     2  0.2966     0.8200 0.000 0.848 0.136 0.000 0.016
#> SRR1521369     3  0.0324     0.9301 0.000 0.004 0.992 0.000 0.004
#> SRR1521370     3  0.3714     0.7432 0.000 0.000 0.812 0.132 0.056
#> SRR1521371     1  0.0510     0.9243 0.984 0.000 0.000 0.000 0.016
#> SRR1521372     5  0.7069     0.2026 0.048 0.000 0.164 0.272 0.516
#> SRR1521373     2  0.4390     0.7650 0.000 0.776 0.156 0.052 0.016
#> SRR1521374     2  0.2966     0.8200 0.000 0.848 0.136 0.000 0.016
#> SRR1521375     2  0.3818     0.7964 0.000 0.812 0.144 0.028 0.016
#> SRR1521376     3  0.5780     0.5719 0.000 0.028 0.672 0.180 0.120
#> SRR1521377     3  0.0162     0.9323 0.000 0.004 0.996 0.000 0.000
#> SRR1521378     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     5  0.7856     0.0695 0.008 0.084 0.232 0.204 0.472
#> SRR1521380     3  0.0162     0.9323 0.000 0.004 0.996 0.000 0.000
#> SRR1521381     4  0.6322     0.0542 0.000 0.000 0.156 0.436 0.408
#> SRR1521382     2  0.3730     0.8048 0.000 0.820 0.136 0.028 0.016
#> SRR1521383     4  0.6802     0.5785 0.396 0.000 0.132 0.444 0.028
#> SRR1521384     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.6150     0.5837 0.404 0.000 0.132 0.464 0.000
#> SRR1521387     2  0.3011     0.8175 0.000 0.844 0.140 0.000 0.016
#> SRR1521386     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.0000     0.4701 0.000 0.000 0.000 1.000 0.000
#> SRR1521389     4  0.0000     0.4701 0.000 0.000 0.000 1.000 0.000
#> SRR1521390     4  0.0000     0.4701 0.000 0.000 0.000 1.000 0.000
#> SRR1521391     3  0.4689     0.5235 0.000 0.000 0.688 0.264 0.048
#> SRR1521392     5  0.2674     0.7447 0.140 0.000 0.000 0.004 0.856
#> SRR1521393     5  0.2516     0.7448 0.140 0.000 0.000 0.000 0.860
#> SRR1521394     5  0.2516     0.7448 0.140 0.000 0.000 0.000 0.860
#> SRR1521395     5  0.2516     0.7448 0.140 0.000 0.000 0.000 0.860
#> SRR1521396     5  0.2516     0.7448 0.140 0.000 0.000 0.000 0.860
#> SRR1521397     1  0.1357     0.8960 0.948 0.000 0.000 0.048 0.004
#> SRR1521398     1  0.0162     0.9288 0.996 0.000 0.000 0.000 0.004
#> SRR1521399     5  0.2648     0.7434 0.152 0.000 0.000 0.000 0.848
#> SRR1521400     5  0.3495     0.7328 0.152 0.000 0.000 0.032 0.816
#> SRR1521401     5  0.2648     0.7434 0.152 0.000 0.000 0.000 0.848
#> SRR1521403     5  0.6320    -0.0947 0.000 0.000 0.156 0.404 0.440
#> SRR1521402     5  0.3495     0.7328 0.152 0.000 0.000 0.032 0.816
#> SRR1521405     4  0.0000     0.4701 0.000 0.000 0.000 1.000 0.000
#> SRR1521406     1  0.0000     0.9290 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.6281     0.5986 0.392 0.000 0.132 0.472 0.004
#> SRR1521408     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     4  0.6322     0.0542 0.000 0.000 0.156 0.436 0.408
#> SRR1521409     5  0.7513     0.0362 0.008 0.044 0.216 0.256 0.476
#> SRR1521410     1  0.0865     0.9158 0.972 0.000 0.000 0.024 0.004
#> SRR1521411     1  0.0162     0.9288 0.996 0.000 0.000 0.000 0.004
#> SRR1521412     1  0.3449     0.8077 0.844 0.000 0.004 0.064 0.088
#> SRR1521414     5  0.3274     0.6947 0.220 0.000 0.000 0.000 0.780
#> SRR1521413     1  0.0162     0.9288 0.996 0.000 0.000 0.000 0.004
#> SRR1521415     5  0.3003     0.7237 0.188 0.000 0.000 0.000 0.812
#> SRR1521416     1  0.0000     0.9290 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.9290 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0693     0.9242 0.980 0.000 0.000 0.012 0.008
#> SRR1521419     1  0.0000     0.9290 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.3750     0.7852 0.824 0.000 0.004 0.084 0.088
#> SRR1521421     1  0.5106     0.5944 0.692 0.000 0.004 0.088 0.216
#> SRR1521422     1  0.0000     0.9290 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.6137     0.5990 0.392 0.000 0.132 0.476 0.000
#> SRR1521423     1  0.0000     0.9290 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.6105     0.5987 0.392 0.000 0.128 0.480 0.000
#> SRR1521427     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.0162     0.9268 0.996 0.000 0.000 0.000 0.004
#> SRR1521428     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.5060     0.6519 0.000 0.700 0.228 0.056 0.016
#> SRR1521437     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9337 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0162     0.9323 0.000 0.004 0.996 0.000 0.000
#> SRR1521439     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9046 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9046 0.000 1.000 0.000 0.000 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
#> SRR1521352     4  0.1556    0.66106 0.080 0.000 0.000 0.920 0.000 0.000
#> SRR1521353     3  0.0000    0.88707 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521354     3  0.0000    0.88707 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521355     1  0.5622    0.58369 0.640 0.000 0.000 0.204 0.084 0.072
#> SRR1521356     1  0.3950    0.73344 0.780 0.000 0.000 0.144 0.060 0.016
#> SRR1521357     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0363    0.84257 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1521359     4  0.3492    0.61622 0.000 0.000 0.032 0.788 0.176 0.004
#> SRR1521360     3  0.5610    0.22725 0.000 0.000 0.536 0.352 0.088 0.024
#> SRR1521361     4  0.5022    0.55930 0.000 0.000 0.112 0.680 0.188 0.020
#> SRR1521362     4  0.2039    0.65261 0.052 0.000 0.020 0.916 0.012 0.000
#> SRR1521363     6  0.5646    0.40607 0.000 0.204 0.000 0.264 0.000 0.532
#> SRR1521364     3  0.1075    0.89395 0.000 0.048 0.952 0.000 0.000 0.000
#> SRR1521365     2  0.0363    0.84257 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1521366     3  0.1075    0.89395 0.000 0.048 0.952 0.000 0.000 0.000
#> SRR1521368     2  0.4592   -0.13965 0.000 0.496 0.000 0.036 0.000 0.468
#> SRR1521369     3  0.1007    0.89398 0.000 0.044 0.956 0.000 0.000 0.000
#> SRR1521370     3  0.4938    0.33338 0.000 0.000 0.592 0.348 0.040 0.020
#> SRR1521371     1  0.4402    0.63957 0.716 0.000 0.000 0.168 0.116 0.000
#> SRR1521372     6  0.6095   -0.73524 0.000 0.000 0.012 0.180 0.376 0.432
#> SRR1521373     6  0.4756    0.15657 0.000 0.432 0.004 0.040 0.000 0.524
#> SRR1521374     2  0.4592   -0.13965 0.000 0.496 0.000 0.036 0.000 0.468
#> SRR1521375     6  0.4578    0.13362 0.000 0.444 0.000 0.036 0.000 0.520
#> SRR1521376     6  0.6125    0.13965 0.000 0.004 0.300 0.264 0.000 0.432
#> SRR1521377     3  0.1075    0.89395 0.000 0.048 0.952 0.000 0.000 0.000
#> SRR1521378     3  0.0000    0.88707 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521379     6  0.4328    0.00099 0.000 0.000 0.020 0.460 0.000 0.520
#> SRR1521380     3  0.1075    0.89395 0.000 0.048 0.952 0.000 0.000 0.000
#> SRR1521381     4  0.4031    0.60318 0.000 0.000 0.060 0.748 0.188 0.004
#> SRR1521382     6  0.4578    0.13362 0.000 0.444 0.000 0.036 0.000 0.520
#> SRR1521383     4  0.2730    0.62888 0.152 0.000 0.000 0.836 0.012 0.000
#> SRR1521384     2  0.0363    0.84257 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1521385     4  0.1765    0.65743 0.096 0.000 0.000 0.904 0.000 0.000
#> SRR1521387     2  0.4192    0.09193 0.000 0.572 0.000 0.016 0.000 0.412
#> SRR1521386     3  0.0000    0.88707 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521388     4  0.3854    0.41831 0.000 0.000 0.000 0.536 0.464 0.000
#> SRR1521389     4  0.3854    0.41831 0.000 0.000 0.000 0.536 0.464 0.000
#> SRR1521390     4  0.3854    0.41831 0.000 0.000 0.000 0.536 0.464 0.000
#> SRR1521391     3  0.4648    0.30352 0.000 0.000 0.584 0.372 0.040 0.004
#> SRR1521392     5  0.4333    0.90759 0.020 0.000 0.000 0.000 0.512 0.468
#> SRR1521393     5  0.3857    0.90452 0.000 0.000 0.000 0.000 0.532 0.468
#> SRR1521394     5  0.3857    0.90452 0.000 0.000 0.000 0.000 0.532 0.468
#> SRR1521395     5  0.3857    0.90452 0.000 0.000 0.000 0.000 0.532 0.468
#> SRR1521396     5  0.3857    0.90452 0.000 0.000 0.000 0.000 0.532 0.468
#> SRR1521397     1  0.2178    0.78157 0.868 0.000 0.000 0.132 0.000 0.000
#> SRR1521398     1  0.0972    0.84664 0.964 0.000 0.000 0.008 0.028 0.000
#> SRR1521399     5  0.4469    0.90654 0.028 0.000 0.000 0.000 0.504 0.468
#> SRR1521400     5  0.4331    0.90495 0.020 0.000 0.000 0.000 0.516 0.464
#> SRR1521401     5  0.4469    0.90654 0.028 0.000 0.000 0.000 0.504 0.468
#> SRR1521403     4  0.4618    0.55653 0.000 0.000 0.020 0.716 0.188 0.076
#> SRR1521402     5  0.4756    0.89238 0.048 0.000 0.000 0.000 0.488 0.464
#> SRR1521405     4  0.3854    0.41831 0.000 0.000 0.000 0.536 0.464 0.000
#> SRR1521406     1  0.0146    0.85029 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521404     4  0.2048    0.64944 0.120 0.000 0.000 0.880 0.000 0.000
#> SRR1521408     3  0.0000    0.88707 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521407     4  0.3441    0.61041 0.000 0.000 0.024 0.784 0.188 0.004
#> SRR1521409     4  0.4261   -0.00114 0.000 0.000 0.020 0.572 0.000 0.408
#> SRR1521410     1  0.1663    0.80762 0.912 0.000 0.000 0.088 0.000 0.000
#> SRR1521411     1  0.0713    0.84636 0.972 0.000 0.000 0.000 0.028 0.000
#> SRR1521412     1  0.6359    0.37121 0.512 0.000 0.000 0.304 0.112 0.072
#> SRR1521414     5  0.7348    0.58292 0.144 0.000 0.000 0.184 0.384 0.288
#> SRR1521413     1  0.0713    0.84636 0.972 0.000 0.000 0.000 0.028 0.000
#> SRR1521415     5  0.7268    0.60714 0.132 0.000 0.000 0.180 0.396 0.292
#> SRR1521416     1  0.0000    0.84982 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000    0.84982 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.2934    0.78835 0.844 0.000 0.000 0.112 0.044 0.000
#> SRR1521419     1  0.0000    0.84982 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.6240    0.39806 0.528 0.000 0.000 0.300 0.100 0.072
#> SRR1521421     4  0.7134   -0.02118 0.232 0.000 0.000 0.372 0.312 0.084
#> SRR1521422     1  0.0000    0.84982 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.1556    0.66106 0.080 0.000 0.000 0.920 0.000 0.000
#> SRR1521423     1  0.0000    0.84982 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.1556    0.66106 0.080 0.000 0.000 0.920 0.000 0.000
#> SRR1521427     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.0363    0.84912 0.988 0.000 0.000 0.012 0.000 0.000
#> SRR1521428     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.1141    0.89266 0.000 0.052 0.948 0.000 0.000 0.000
#> SRR1521429     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0146    0.88773 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1521433     3  0.1141    0.89266 0.000 0.052 0.948 0.000 0.000 0.000
#> SRR1521434     3  0.1141    0.89266 0.000 0.052 0.948 0.000 0.000 0.000
#> SRR1521435     3  0.1141    0.89266 0.000 0.052 0.948 0.000 0.000 0.000
#> SRR1521436     2  0.5891   -0.29476 0.000 0.416 0.004 0.172 0.000 0.408
#> SRR1521437     2  0.0363    0.84257 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1521431     3  0.0146    0.88773 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR1521438     3  0.1141    0.89266 0.000 0.052 0.948 0.000 0.000 0.000
#> SRR1521439     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0363    0.84257 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1521445     2  0.0000    0.84602 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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-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.4969 0.504   0.504
#> 3 3 1.000           0.959       0.984         0.2823 0.813   0.646
#> 4 4 0.990           0.945       0.979         0.1579 0.863   0.642
#> 5 5 0.866           0.863       0.914         0.0706 0.926   0.726
#> 6 6 0.907           0.881       0.922         0.0359 0.927   0.680

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 4

There is also optional best \(k\) = 2 3 4 that is worth to check.

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> SRR1521352     1  0.0000      0.982 1.000 0.000
#> SRR1521353     1  0.8861      0.575 0.696 0.304
#> SRR1521354     1  0.0938      0.972 0.988 0.012
#> SRR1521355     1  0.0000      0.982 1.000 0.000
#> SRR1521356     1  0.0000      0.982 1.000 0.000
#> SRR1521357     2  0.0000      0.989 0.000 1.000
#> SRR1521358     2  0.0000      0.989 0.000 1.000
#> SRR1521359     1  0.0000      0.982 1.000 0.000
#> SRR1521360     2  0.9686      0.313 0.396 0.604
#> SRR1521361     1  0.1843      0.958 0.972 0.028
#> SRR1521362     1  0.0000      0.982 1.000 0.000
#> SRR1521363     2  0.0000      0.989 0.000 1.000
#> SRR1521364     2  0.0000      0.989 0.000 1.000
#> SRR1521365     2  0.0000      0.989 0.000 1.000
#> SRR1521366     2  0.0000      0.989 0.000 1.000
#> SRR1521368     2  0.0000      0.989 0.000 1.000
#> SRR1521369     2  0.0000      0.989 0.000 1.000
#> SRR1521370     1  0.3431      0.922 0.936 0.064
#> SRR1521371     1  0.0000      0.982 1.000 0.000
#> SRR1521372     1  0.0000      0.982 1.000 0.000
#> SRR1521373     2  0.0000      0.989 0.000 1.000
#> SRR1521374     2  0.0000      0.989 0.000 1.000
#> SRR1521375     2  0.0000      0.989 0.000 1.000
#> SRR1521376     2  0.0000      0.989 0.000 1.000
#> SRR1521377     2  0.0000      0.989 0.000 1.000
#> SRR1521378     2  0.0000      0.989 0.000 1.000
#> SRR1521379     2  0.0000      0.989 0.000 1.000
#> SRR1521380     2  0.0000      0.989 0.000 1.000
#> SRR1521381     1  0.0000      0.982 1.000 0.000
#> SRR1521382     2  0.0000      0.989 0.000 1.000
#> SRR1521383     1  0.0000      0.982 1.000 0.000
#> SRR1521384     2  0.0000      0.989 0.000 1.000
#> SRR1521385     1  0.0000      0.982 1.000 0.000
#> SRR1521387     2  0.0000      0.989 0.000 1.000
#> SRR1521386     2  0.0376      0.985 0.004 0.996
#> SRR1521388     1  0.0000      0.982 1.000 0.000
#> SRR1521389     1  0.0000      0.982 1.000 0.000
#> SRR1521390     1  0.0000      0.982 1.000 0.000
#> SRR1521391     1  0.0000      0.982 1.000 0.000
#> SRR1521392     1  0.0000      0.982 1.000 0.000
#> SRR1521393     1  0.0000      0.982 1.000 0.000
#> SRR1521394     1  0.0000      0.982 1.000 0.000
#> SRR1521395     1  0.0000      0.982 1.000 0.000
#> SRR1521396     1  0.0000      0.982 1.000 0.000
#> SRR1521397     1  0.0000      0.982 1.000 0.000
#> SRR1521398     1  0.0000      0.982 1.000 0.000
#> SRR1521399     1  0.0000      0.982 1.000 0.000
#> SRR1521400     1  0.0000      0.982 1.000 0.000
#> SRR1521401     1  0.0000      0.982 1.000 0.000
#> SRR1521403     1  0.0000      0.982 1.000 0.000
#> SRR1521402     1  0.0000      0.982 1.000 0.000
#> SRR1521405     1  0.0000      0.982 1.000 0.000
#> SRR1521406     1  0.0000      0.982 1.000 0.000
#> SRR1521404     1  0.0000      0.982 1.000 0.000
#> SRR1521408     1  0.6531      0.798 0.832 0.168
#> SRR1521407     1  0.0000      0.982 1.000 0.000
#> SRR1521409     1  0.9286      0.488 0.656 0.344
#> SRR1521410     1  0.0000      0.982 1.000 0.000
#> SRR1521411     1  0.0000      0.982 1.000 0.000
#> SRR1521412     1  0.0000      0.982 1.000 0.000
#> SRR1521414     1  0.0000      0.982 1.000 0.000
#> SRR1521413     1  0.0000      0.982 1.000 0.000
#> SRR1521415     1  0.0000      0.982 1.000 0.000
#> SRR1521416     1  0.0000      0.982 1.000 0.000
#> SRR1521417     1  0.0000      0.982 1.000 0.000
#> SRR1521418     1  0.0000      0.982 1.000 0.000
#> SRR1521419     1  0.0000      0.982 1.000 0.000
#> SRR1521420     1  0.0000      0.982 1.000 0.000
#> SRR1521421     1  0.0000      0.982 1.000 0.000
#> SRR1521422     1  0.0000      0.982 1.000 0.000
#> SRR1521424     1  0.0000      0.982 1.000 0.000
#> SRR1521423     1  0.0000      0.982 1.000 0.000
#> SRR1521426     1  0.0000      0.982 1.000 0.000
#> SRR1521427     2  0.0000      0.989 0.000 1.000
#> SRR1521425     1  0.0000      0.982 1.000 0.000
#> SRR1521428     2  0.0000      0.989 0.000 1.000
#> SRR1521430     2  0.0000      0.989 0.000 1.000
#> SRR1521429     2  0.0000      0.989 0.000 1.000
#> SRR1521432     2  0.0000      0.989 0.000 1.000
#> SRR1521433     2  0.0000      0.989 0.000 1.000
#> SRR1521434     2  0.0000      0.989 0.000 1.000
#> SRR1521435     2  0.0000      0.989 0.000 1.000
#> SRR1521436     2  0.0000      0.989 0.000 1.000
#> SRR1521437     2  0.0000      0.989 0.000 1.000
#> SRR1521431     2  0.0000      0.989 0.000 1.000
#> SRR1521438     2  0.0000      0.989 0.000 1.000
#> SRR1521439     2  0.0000      0.989 0.000 1.000
#> SRR1521440     2  0.0000      0.989 0.000 1.000
#> SRR1521441     2  0.0000      0.989 0.000 1.000
#> SRR1521443     2  0.0000      0.989 0.000 1.000
#> SRR1521442     2  0.0000      0.989 0.000 1.000
#> SRR1521444     2  0.0000      0.989 0.000 1.000
#> SRR1521445     2  0.0000      0.989 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
#> SRR1521352     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521353     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521354     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521359     1  0.2959      0.878 0.900 0.000 0.100
#> SRR1521360     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521361     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521362     1  0.0237      0.972 0.996 0.000 0.004
#> SRR1521363     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521364     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521365     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521366     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521368     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521369     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521370     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521372     1  0.5497      0.585 0.708 0.000 0.292
#> SRR1521373     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521376     2  0.1289      0.967 0.000 0.968 0.032
#> SRR1521377     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521378     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521379     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521380     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521381     3  0.6154      0.276 0.408 0.000 0.592
#> SRR1521382     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521383     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521386     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521388     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521391     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521392     1  0.5138      0.665 0.748 0.000 0.252
#> SRR1521393     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521394     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521395     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521396     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521397     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521399     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521400     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521401     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521403     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521402     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521405     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521404     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521408     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521407     1  0.1529      0.940 0.960 0.000 0.040
#> SRR1521409     1  0.5968      0.441 0.636 0.364 0.000
#> SRR1521410     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.976 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521430     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521429     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521432     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521433     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521434     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521435     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521436     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521431     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521438     3  0.0000      0.977 0.000 0.000 1.000
#> SRR1521439     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.999 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.999 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
#> SRR1521352     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521353     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521354     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521355     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0707      0.969 0.980 0.000 0.000 0.020
#> SRR1521357     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.1474      0.935 0.000 0.000 0.052 0.948
#> SRR1521360     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521361     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521362     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521363     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521364     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521371     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521372     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521373     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521374     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521376     3  0.4866      0.296 0.000 0.404 0.596 0.000
#> SRR1521377     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521380     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521381     3  0.0188      0.929 0.004 0.000 0.996 0.000
#> SRR1521382     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521384     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521387     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521388     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521389     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521390     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521391     3  0.4888      0.319 0.412 0.000 0.588 0.000
#> SRR1521392     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521393     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521394     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521395     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521396     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521397     1  0.0188      0.983 0.996 0.000 0.000 0.004
#> SRR1521398     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521400     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521401     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521403     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521402     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521405     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521406     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521404     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521407     3  0.4933      0.260 0.432 0.000 0.568 0.000
#> SRR1521409     2  0.2081      0.907 0.000 0.916 0.000 0.084
#> SRR1521410     1  0.4222      0.624 0.728 0.000 0.000 0.272
#> SRR1521411     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521412     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521414     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521416     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.2469      0.876 0.892 0.000 0.000 0.108
#> SRR1521421     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521422     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521424     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521423     1  0.0000      0.986 1.000 0.000 0.000 0.000
#> SRR1521426     4  0.0000      0.982 0.000 0.000 0.000 1.000
#> SRR1521427     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.2973      0.829 0.144 0.000 0.000 0.856
#> SRR1521428     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521429     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.0000      0.933 0.000 0.000 1.000 0.000
#> SRR1521439     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.996 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.996 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.2773    0.88476 0.164 0.000 0.000 0.836 0.000
#> SRR1521353     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1  0.2813    0.89982 0.832 0.000 0.000 0.000 0.168
#> SRR1521356     1  0.3386    0.88179 0.832 0.000 0.000 0.040 0.128
#> SRR1521357     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.3841    0.85772 0.188 0.000 0.032 0.780 0.000
#> SRR1521360     3  0.2471    0.80992 0.136 0.000 0.864 0.000 0.000
#> SRR1521361     3  0.4712    0.67971 0.168 0.000 0.732 0.000 0.100
#> SRR1521362     4  0.0000    0.89437 0.000 0.000 0.000 1.000 0.000
#> SRR1521363     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521371     1  0.3480    0.85817 0.752 0.000 0.000 0.000 0.248
#> SRR1521372     5  0.3636    0.54423 0.272 0.000 0.000 0.000 0.728
#> SRR1521373     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.3983    0.47623 0.000 0.340 0.660 0.000 0.000
#> SRR1521377     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.2890    0.78565 0.160 0.836 0.000 0.004 0.000
#> SRR1521380     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     3  0.6868    0.00225 0.164 0.000 0.428 0.020 0.388
#> SRR1521382     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     4  0.0162    0.89355 0.004 0.000 0.000 0.996 0.000
#> SRR1521384     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.3876    0.75490 0.316 0.000 0.000 0.684 0.000
#> SRR1521387     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.0162    0.89336 0.004 0.000 0.000 0.996 0.000
#> SRR1521389     4  0.0162    0.89336 0.004 0.000 0.000 0.996 0.000
#> SRR1521390     4  0.0000    0.89437 0.000 0.000 0.000 1.000 0.000
#> SRR1521391     5  0.2304    0.79538 0.008 0.000 0.100 0.000 0.892
#> SRR1521392     5  0.0510    0.88785 0.016 0.000 0.000 0.000 0.984
#> SRR1521393     5  0.0510    0.88785 0.016 0.000 0.000 0.000 0.984
#> SRR1521394     5  0.0510    0.88785 0.016 0.000 0.000 0.000 0.984
#> SRR1521395     5  0.0510    0.88785 0.016 0.000 0.000 0.000 0.984
#> SRR1521396     5  0.0510    0.88785 0.016 0.000 0.000 0.000 0.984
#> SRR1521397     1  0.3412    0.89261 0.820 0.000 0.000 0.028 0.152
#> SRR1521398     1  0.3366    0.87285 0.768 0.000 0.000 0.000 0.232
#> SRR1521399     5  0.1197    0.87872 0.048 0.000 0.000 0.000 0.952
#> SRR1521400     5  0.0963    0.88522 0.036 0.000 0.000 0.000 0.964
#> SRR1521401     5  0.0963    0.88283 0.036 0.000 0.000 0.000 0.964
#> SRR1521403     5  0.3143    0.67982 0.204 0.000 0.000 0.000 0.796
#> SRR1521402     5  0.1544    0.86397 0.068 0.000 0.000 0.000 0.932
#> SRR1521405     4  0.0000    0.89437 0.000 0.000 0.000 1.000 0.000
#> SRR1521406     1  0.2966    0.89449 0.816 0.000 0.000 0.000 0.184
#> SRR1521404     4  0.2773    0.88575 0.164 0.000 0.000 0.836 0.000
#> SRR1521408     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     5  0.6721    0.43293 0.188 0.000 0.208 0.036 0.568
#> SRR1521409     2  0.7245   -0.15992 0.176 0.424 0.000 0.360 0.040
#> SRR1521410     1  0.3197    0.89022 0.836 0.000 0.000 0.024 0.140
#> SRR1521411     1  0.2561    0.87532 0.856 0.000 0.000 0.000 0.144
#> SRR1521412     1  0.2280    0.69228 0.880 0.000 0.000 0.000 0.120
#> SRR1521414     1  0.3661    0.81094 0.724 0.000 0.000 0.000 0.276
#> SRR1521413     1  0.3003    0.89502 0.812 0.000 0.000 0.000 0.188
#> SRR1521415     1  0.3336    0.86743 0.772 0.000 0.000 0.000 0.228
#> SRR1521416     1  0.2852    0.90008 0.828 0.000 0.000 0.000 0.172
#> SRR1521417     1  0.2891    0.89963 0.824 0.000 0.000 0.000 0.176
#> SRR1521418     1  0.2852    0.89935 0.828 0.000 0.000 0.000 0.172
#> SRR1521419     1  0.3010    0.89991 0.824 0.000 0.000 0.004 0.172
#> SRR1521420     1  0.3565    0.53736 0.800 0.000 0.000 0.176 0.024
#> SRR1521421     1  0.0963    0.75823 0.964 0.000 0.000 0.000 0.036
#> SRR1521422     1  0.2891    0.89963 0.824 0.000 0.000 0.000 0.176
#> SRR1521424     4  0.2966    0.87812 0.184 0.000 0.000 0.816 0.000
#> SRR1521423     1  0.2891    0.89963 0.824 0.000 0.000 0.000 0.176
#> SRR1521426     4  0.2852    0.88319 0.172 0.000 0.000 0.828 0.000
#> SRR1521427     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.1768    0.70862 0.924 0.000 0.000 0.072 0.004
#> SRR1521428     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000    0.93321 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0609    0.91579 0.000 0.020 0.980 0.000 0.000
#> SRR1521439     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000    0.96893 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000    0.96893 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.3565      0.677 0.004 0.000 0.000 0.304 0.000 0.692
#> SRR1521353     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521354     3  0.0363      0.966 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521355     1  0.0260      0.936 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR1521356     1  0.0146      0.938 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.3963      0.727 0.028 0.000 0.016 0.208 0.000 0.748
#> SRR1521360     6  0.3756      0.421 0.000 0.000 0.400 0.000 0.000 0.600
#> SRR1521361     6  0.3229      0.674 0.004 0.000 0.172 0.000 0.020 0.804
#> SRR1521362     4  0.0000      0.988 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521370     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521371     1  0.1152      0.918 0.952 0.000 0.000 0.000 0.044 0.004
#> SRR1521372     5  0.5955      0.321 0.332 0.000 0.000 0.000 0.436 0.232
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.3647      0.439 0.000 0.360 0.640 0.000 0.000 0.000
#> SRR1521377     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521378     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521379     6  0.3636      0.496 0.000 0.320 0.004 0.000 0.000 0.676
#> SRR1521380     3  0.0000      0.970 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.4614      0.704 0.004 0.000 0.100 0.036 0.108 0.752
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     4  0.1341      0.939 0.028 0.000 0.000 0.948 0.000 0.024
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     6  0.3794      0.713 0.028 0.000 0.000 0.248 0.000 0.724
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521388     4  0.0000      0.988 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521389     4  0.0000      0.988 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521390     4  0.0000      0.988 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521391     5  0.0000      0.865 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521392     5  0.0000      0.865 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521393     5  0.0146      0.863 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521394     5  0.0000      0.865 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521395     5  0.0000      0.865 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521396     5  0.0000      0.865 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521397     1  0.0603      0.931 0.980 0.000 0.000 0.004 0.000 0.016
#> SRR1521398     1  0.3658      0.661 0.752 0.000 0.000 0.000 0.032 0.216
#> SRR1521399     5  0.3835      0.775 0.048 0.000 0.000 0.000 0.748 0.204
#> SRR1521400     5  0.1152      0.856 0.004 0.000 0.000 0.000 0.952 0.044
#> SRR1521401     5  0.2513      0.825 0.008 0.000 0.000 0.000 0.852 0.140
#> SRR1521403     5  0.3023      0.700 0.232 0.000 0.000 0.000 0.768 0.000
#> SRR1521402     5  0.4044      0.771 0.076 0.000 0.000 0.000 0.744 0.180
#> SRR1521405     4  0.0000      0.988 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR1521406     1  0.1471      0.907 0.932 0.000 0.000 0.000 0.004 0.064
#> SRR1521404     6  0.3699      0.641 0.004 0.000 0.000 0.336 0.000 0.660
#> SRR1521408     3  0.0146      0.971 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521407     6  0.2872      0.716 0.000 0.000 0.080 0.024 0.028 0.868
#> SRR1521409     6  0.4909      0.691 0.004 0.108 0.000 0.080 0.072 0.736
#> SRR1521410     1  0.0632      0.932 0.976 0.000 0.000 0.000 0.000 0.024
#> SRR1521411     1  0.2968      0.820 0.816 0.000 0.000 0.000 0.016 0.168
#> SRR1521412     6  0.3582      0.670 0.196 0.000 0.000 0.000 0.036 0.768
#> SRR1521414     1  0.3168      0.811 0.804 0.000 0.000 0.000 0.024 0.172
#> SRR1521413     1  0.0405      0.936 0.988 0.000 0.000 0.000 0.004 0.008
#> SRR1521415     1  0.2896      0.828 0.824 0.000 0.000 0.000 0.016 0.160
#> SRR1521416     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     6  0.3312      0.719 0.124 0.000 0.000 0.028 0.020 0.828
#> SRR1521421     6  0.3230      0.581 0.212 0.000 0.000 0.000 0.012 0.776
#> SRR1521422     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     6  0.3859      0.690 0.020 0.000 0.000 0.288 0.000 0.692
#> SRR1521423     1  0.0000      0.939 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     6  0.3970      0.695 0.028 0.000 0.000 0.280 0.000 0.692
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     6  0.4810      0.648 0.220 0.000 0.000 0.120 0.000 0.660
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.970 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.970 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000      0.970 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000      0.970 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000      0.970 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.970 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0458      0.954 0.000 0.016 0.984 0.000 0.000 0.000
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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

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

collect_plots(res)

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.693           0.908       0.955         0.4877 0.516   0.516
#> 3 3 0.757           0.877       0.927         0.2885 0.869   0.747
#> 4 4 0.746           0.795       0.834         0.1137 0.924   0.805
#> 5 5 0.757           0.758       0.826         0.0946 0.877   0.625
#> 6 6 0.783           0.681       0.752         0.0490 0.952   0.784

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
#> SRR1521352     1   0.000      0.931 1.000 0.000
#> SRR1521353     1   0.917      0.590 0.668 0.332
#> SRR1521354     1   0.917      0.590 0.668 0.332
#> SRR1521355     1   0.000      0.931 1.000 0.000
#> SRR1521356     1   0.000      0.931 1.000 0.000
#> SRR1521357     2   0.000      0.981 0.000 1.000
#> SRR1521358     2   0.000      0.981 0.000 1.000
#> SRR1521359     1   0.000      0.931 1.000 0.000
#> SRR1521360     1   0.781      0.738 0.768 0.232
#> SRR1521361     1   0.781      0.738 0.768 0.232
#> SRR1521362     1   0.000      0.931 1.000 0.000
#> SRR1521363     2   0.482      0.873 0.104 0.896
#> SRR1521364     2   0.141      0.969 0.020 0.980
#> SRR1521365     2   0.000      0.981 0.000 1.000
#> SRR1521366     2   0.141      0.969 0.020 0.980
#> SRR1521368     2   0.000      0.981 0.000 1.000
#> SRR1521369     2   0.141      0.969 0.020 0.980
#> SRR1521370     1   0.917      0.590 0.668 0.332
#> SRR1521371     1   0.000      0.931 1.000 0.000
#> SRR1521372     1   0.689      0.788 0.816 0.184
#> SRR1521373     2   0.000      0.981 0.000 1.000
#> SRR1521374     2   0.000      0.981 0.000 1.000
#> SRR1521375     2   0.000      0.981 0.000 1.000
#> SRR1521376     2   0.482      0.873 0.104 0.896
#> SRR1521377     2   0.141      0.969 0.020 0.980
#> SRR1521378     1   0.917      0.590 0.668 0.332
#> SRR1521379     2   0.844      0.592 0.272 0.728
#> SRR1521380     2   0.141      0.969 0.020 0.980
#> SRR1521381     1   0.775      0.743 0.772 0.228
#> SRR1521382     2   0.000      0.981 0.000 1.000
#> SRR1521383     1   0.000      0.931 1.000 0.000
#> SRR1521384     2   0.000      0.981 0.000 1.000
#> SRR1521385     1   0.000      0.931 1.000 0.000
#> SRR1521387     2   0.000      0.981 0.000 1.000
#> SRR1521386     1   0.917      0.590 0.668 0.332
#> SRR1521388     1   0.000      0.931 1.000 0.000
#> SRR1521389     1   0.000      0.931 1.000 0.000
#> SRR1521390     1   0.000      0.931 1.000 0.000
#> SRR1521391     1   0.722      0.773 0.800 0.200
#> SRR1521392     1   0.000      0.931 1.000 0.000
#> SRR1521393     1   0.000      0.931 1.000 0.000
#> SRR1521394     1   0.000      0.931 1.000 0.000
#> SRR1521395     1   0.000      0.931 1.000 0.000
#> SRR1521396     1   0.000      0.931 1.000 0.000
#> SRR1521397     1   0.000      0.931 1.000 0.000
#> SRR1521398     1   0.000      0.931 1.000 0.000
#> SRR1521399     1   0.224      0.908 0.964 0.036
#> SRR1521400     1   0.000      0.931 1.000 0.000
#> SRR1521401     1   0.000      0.931 1.000 0.000
#> SRR1521403     1   0.000      0.931 1.000 0.000
#> SRR1521402     1   0.000      0.931 1.000 0.000
#> SRR1521405     1   0.000      0.931 1.000 0.000
#> SRR1521406     1   0.000      0.931 1.000 0.000
#> SRR1521404     1   0.000      0.931 1.000 0.000
#> SRR1521408     1   0.917      0.590 0.668 0.332
#> SRR1521407     1   0.775      0.743 0.772 0.228
#> SRR1521409     1   0.775      0.743 0.772 0.228
#> SRR1521410     1   0.000      0.931 1.000 0.000
#> SRR1521411     1   0.000      0.931 1.000 0.000
#> SRR1521412     1   0.000      0.931 1.000 0.000
#> SRR1521414     1   0.000      0.931 1.000 0.000
#> SRR1521413     1   0.000      0.931 1.000 0.000
#> SRR1521415     1   0.000      0.931 1.000 0.000
#> SRR1521416     1   0.000      0.931 1.000 0.000
#> SRR1521417     1   0.000      0.931 1.000 0.000
#> SRR1521418     1   0.000      0.931 1.000 0.000
#> SRR1521419     1   0.000      0.931 1.000 0.000
#> SRR1521420     1   0.000      0.931 1.000 0.000
#> SRR1521421     1   0.000      0.931 1.000 0.000
#> SRR1521422     1   0.000      0.931 1.000 0.000
#> SRR1521424     1   0.000      0.931 1.000 0.000
#> SRR1521423     1   0.000      0.931 1.000 0.000
#> SRR1521426     1   0.000      0.931 1.000 0.000
#> SRR1521427     2   0.000      0.981 0.000 1.000
#> SRR1521425     1   0.000      0.931 1.000 0.000
#> SRR1521428     2   0.000      0.981 0.000 1.000
#> SRR1521430     2   0.000      0.981 0.000 1.000
#> SRR1521429     2   0.000      0.981 0.000 1.000
#> SRR1521432     2   0.141      0.969 0.020 0.980
#> SRR1521433     2   0.000      0.981 0.000 1.000
#> SRR1521434     2   0.000      0.981 0.000 1.000
#> SRR1521435     2   0.000      0.981 0.000 1.000
#> SRR1521436     2   0.000      0.981 0.000 1.000
#> SRR1521437     2   0.000      0.981 0.000 1.000
#> SRR1521431     2   0.141      0.969 0.020 0.980
#> SRR1521438     2   0.000      0.981 0.000 1.000
#> SRR1521439     2   0.000      0.981 0.000 1.000
#> SRR1521440     2   0.000      0.981 0.000 1.000
#> SRR1521441     2   0.000      0.981 0.000 1.000
#> SRR1521443     2   0.000      0.981 0.000 1.000
#> SRR1521442     2   0.000      0.981 0.000 1.000
#> SRR1521444     2   0.000      0.981 0.000 1.000
#> SRR1521445     2   0.000      0.981 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
#> SRR1521352     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521353     3  0.0747      0.882 0.000 0.016 0.984
#> SRR1521354     3  0.0747      0.882 0.000 0.016 0.984
#> SRR1521355     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521359     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521360     3  0.2625      0.894 0.084 0.000 0.916
#> SRR1521361     3  0.2625      0.894 0.084 0.000 0.916
#> SRR1521362     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521363     2  0.4346      0.774 0.000 0.816 0.184
#> SRR1521364     2  0.5733      0.693 0.000 0.676 0.324
#> SRR1521365     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521366     2  0.5733      0.693 0.000 0.676 0.324
#> SRR1521368     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521369     2  0.5733      0.693 0.000 0.676 0.324
#> SRR1521370     3  0.0747      0.882 0.000 0.016 0.984
#> SRR1521371     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521372     3  0.5327      0.674 0.272 0.000 0.728
#> SRR1521373     2  0.0592      0.869 0.000 0.988 0.012
#> SRR1521374     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521375     2  0.0592      0.869 0.000 0.988 0.012
#> SRR1521376     2  0.4399      0.773 0.000 0.812 0.188
#> SRR1521377     2  0.5733      0.693 0.000 0.676 0.324
#> SRR1521378     3  0.0747      0.882 0.000 0.016 0.984
#> SRR1521379     2  0.6260      0.389 0.000 0.552 0.448
#> SRR1521380     2  0.5733      0.693 0.000 0.676 0.324
#> SRR1521381     3  0.3686      0.864 0.140 0.000 0.860
#> SRR1521382     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521383     1  0.0424      0.961 0.992 0.000 0.008
#> SRR1521384     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521386     3  0.0747      0.882 0.000 0.016 0.984
#> SRR1521388     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521389     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521390     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521391     3  0.3267      0.876 0.116 0.000 0.884
#> SRR1521392     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521393     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521394     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521395     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521396     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521397     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521399     1  0.4399      0.802 0.812 0.000 0.188
#> SRR1521400     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521401     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521403     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521402     1  0.3116      0.902 0.892 0.000 0.108
#> SRR1521405     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521406     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521404     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521408     3  0.0747      0.882 0.000 0.016 0.984
#> SRR1521407     3  0.2711      0.893 0.088 0.000 0.912
#> SRR1521409     3  0.3686      0.864 0.140 0.000 0.860
#> SRR1521410     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521414     1  0.2796      0.911 0.908 0.000 0.092
#> SRR1521413     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521415     1  0.2796      0.911 0.908 0.000 0.092
#> SRR1521416     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.965 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521430     2  0.5529      0.720 0.000 0.704 0.296
#> SRR1521429     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521432     2  0.5733      0.693 0.000 0.676 0.324
#> SRR1521433     2  0.5529      0.720 0.000 0.704 0.296
#> SRR1521434     2  0.5529      0.720 0.000 0.704 0.296
#> SRR1521435     2  0.5529      0.720 0.000 0.704 0.296
#> SRR1521436     2  0.2165      0.852 0.000 0.936 0.064
#> SRR1521437     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521431     2  0.5733      0.693 0.000 0.676 0.324
#> SRR1521438     2  0.2165      0.852 0.000 0.936 0.064
#> SRR1521439     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.871 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.871 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
#> SRR1521352     1  0.1970     0.8707 0.932 0.000 0.060 0.008
#> SRR1521353     4  0.4564     0.6863 0.000 0.000 0.328 0.672
#> SRR1521354     4  0.4564     0.6863 0.000 0.000 0.328 0.672
#> SRR1521355     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521359     1  0.3088     0.8577 0.888 0.000 0.052 0.060
#> SRR1521360     4  0.0188     0.7489 0.000 0.000 0.004 0.996
#> SRR1521361     4  0.0188     0.7489 0.000 0.000 0.004 0.996
#> SRR1521362     1  0.0469     0.8711 0.988 0.000 0.012 0.000
#> SRR1521363     2  0.6547     0.1789 0.000 0.568 0.340 0.092
#> SRR1521364     3  0.5222     0.9801 0.000 0.280 0.688 0.032
#> SRR1521365     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.5222     0.9801 0.000 0.280 0.688 0.032
#> SRR1521368     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.5222     0.9801 0.000 0.280 0.688 0.032
#> SRR1521370     4  0.4406     0.6963 0.000 0.000 0.300 0.700
#> SRR1521371     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521372     4  0.4250     0.5698 0.000 0.000 0.276 0.724
#> SRR1521373     2  0.3726     0.6193 0.000 0.788 0.212 0.000
#> SRR1521374     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.3726     0.6193 0.000 0.788 0.212 0.000
#> SRR1521376     2  0.6637     0.0664 0.000 0.540 0.368 0.092
#> SRR1521377     3  0.5222     0.9801 0.000 0.280 0.688 0.032
#> SRR1521378     4  0.4585     0.6819 0.000 0.000 0.332 0.668
#> SRR1521379     4  0.7906    -0.3630 0.000 0.300 0.344 0.356
#> SRR1521380     3  0.5222     0.9801 0.000 0.280 0.688 0.032
#> SRR1521381     4  0.2198     0.7343 0.008 0.000 0.072 0.920
#> SRR1521382     2  0.2814     0.7407 0.000 0.868 0.132 0.000
#> SRR1521383     1  0.4663     0.8156 0.788 0.000 0.148 0.064
#> SRR1521384     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521385     1  0.1970     0.8707 0.932 0.000 0.060 0.008
#> SRR1521387     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521386     4  0.4564     0.6863 0.000 0.000 0.328 0.672
#> SRR1521388     1  0.0469     0.8711 0.988 0.000 0.012 0.000
#> SRR1521389     1  0.0469     0.8711 0.988 0.000 0.012 0.000
#> SRR1521390     1  0.0469     0.8711 0.988 0.000 0.012 0.000
#> SRR1521391     4  0.1211     0.7356 0.000 0.000 0.040 0.960
#> SRR1521392     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521393     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521394     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521395     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521396     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521397     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521399     1  0.7146     0.6272 0.548 0.000 0.276 0.176
#> SRR1521400     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521401     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521403     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521402     1  0.6182     0.7290 0.636 0.000 0.276 0.088
#> SRR1521405     1  0.0469     0.8711 0.988 0.000 0.012 0.000
#> SRR1521406     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521404     1  0.1824     0.8712 0.936 0.000 0.060 0.004
#> SRR1521408     4  0.4564     0.6863 0.000 0.000 0.328 0.672
#> SRR1521407     4  0.0000     0.7482 0.000 0.000 0.000 1.000
#> SRR1521409     4  0.2198     0.7343 0.008 0.000 0.072 0.920
#> SRR1521410     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521411     1  0.3247     0.8556 0.880 0.000 0.060 0.060
#> SRR1521412     1  0.3247     0.8556 0.880 0.000 0.060 0.060
#> SRR1521414     1  0.5877     0.7419 0.656 0.000 0.276 0.068
#> SRR1521413     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.5877     0.7419 0.656 0.000 0.276 0.068
#> SRR1521416     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.3088     0.8577 0.888 0.000 0.052 0.060
#> SRR1521421     1  0.3088     0.8577 0.888 0.000 0.052 0.060
#> SRR1521422     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521424     1  0.1970     0.8707 0.932 0.000 0.060 0.008
#> SRR1521423     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521426     1  0.1970     0.8707 0.932 0.000 0.060 0.008
#> SRR1521427     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521425     1  0.0000     0.8751 1.000 0.000 0.000 0.000
#> SRR1521428     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.5389     0.9638 0.000 0.308 0.660 0.032
#> SRR1521429     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.5222     0.9801 0.000 0.280 0.688 0.032
#> SRR1521433     3  0.5389     0.9638 0.000 0.308 0.660 0.032
#> SRR1521434     3  0.5389     0.9638 0.000 0.308 0.660 0.032
#> SRR1521435     3  0.5389     0.9638 0.000 0.308 0.660 0.032
#> SRR1521436     2  0.4431     0.3932 0.000 0.696 0.304 0.000
#> SRR1521437     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.5222     0.9801 0.000 0.280 0.688 0.032
#> SRR1521438     2  0.4431     0.3932 0.000 0.696 0.304 0.000
#> SRR1521439     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000     0.8795 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000     0.8795 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     1  0.3885     0.6926 0.724 0.000 0.000 0.008 0.268
#> SRR1521353     4  0.5129     0.6687 0.000 0.000 0.328 0.616 0.056
#> SRR1521354     4  0.5129     0.6687 0.000 0.000 0.328 0.616 0.056
#> SRR1521355     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     1  0.4327     0.4045 0.632 0.000 0.000 0.008 0.360
#> SRR1521360     4  0.1282     0.7414 0.000 0.000 0.004 0.952 0.044
#> SRR1521361     4  0.1282     0.7414 0.000 0.000 0.004 0.952 0.044
#> SRR1521362     1  0.3305     0.7149 0.776 0.000 0.000 0.000 0.224
#> SRR1521363     3  0.7743     0.4211 0.000 0.296 0.448 0.132 0.124
#> SRR1521364     3  0.0000     0.7860 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.7860 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000     0.7860 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     4  0.4854     0.6779 0.000 0.000 0.308 0.648 0.044
#> SRR1521371     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521372     4  0.4015     0.5026 0.000 0.000 0.000 0.652 0.348
#> SRR1521373     2  0.5809     0.5038 0.000 0.648 0.212 0.016 0.124
#> SRR1521374     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.5809     0.5038 0.000 0.648 0.212 0.016 0.124
#> SRR1521376     3  0.7609     0.4742 0.000 0.264 0.484 0.132 0.120
#> SRR1521377     3  0.0000     0.7860 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     4  0.5145     0.6637 0.000 0.000 0.332 0.612 0.056
#> SRR1521379     3  0.6804     0.2364 0.000 0.032 0.452 0.392 0.124
#> SRR1521380     3  0.0000     0.7860 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     4  0.1704     0.7276 0.004 0.000 0.000 0.928 0.068
#> SRR1521382     2  0.5029     0.6464 0.000 0.732 0.156 0.016 0.096
#> SRR1521383     1  0.4390    -0.0147 0.568 0.000 0.000 0.004 0.428
#> SRR1521384     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     1  0.3885     0.6926 0.724 0.000 0.000 0.008 0.268
#> SRR1521387     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     4  0.5129     0.6687 0.000 0.000 0.328 0.616 0.056
#> SRR1521388     1  0.3143     0.7223 0.796 0.000 0.000 0.000 0.204
#> SRR1521389     1  0.3143     0.7223 0.796 0.000 0.000 0.000 0.204
#> SRR1521390     1  0.3143     0.7223 0.796 0.000 0.000 0.000 0.204
#> SRR1521391     4  0.2124     0.7358 0.000 0.000 0.004 0.900 0.096
#> SRR1521392     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521393     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521394     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521395     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521396     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521397     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.5284     0.8238 0.324 0.000 0.000 0.068 0.608
#> SRR1521400     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521401     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521403     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521402     5  0.4210     0.9763 0.412 0.000 0.000 0.000 0.588
#> SRR1521405     1  0.3143     0.7223 0.796 0.000 0.000 0.000 0.204
#> SRR1521406     1  0.0162     0.7706 0.996 0.000 0.000 0.000 0.004
#> SRR1521404     1  0.3741     0.7007 0.732 0.000 0.000 0.004 0.264
#> SRR1521408     4  0.5129     0.6687 0.000 0.000 0.328 0.616 0.056
#> SRR1521407     4  0.1121     0.7404 0.000 0.000 0.000 0.956 0.044
#> SRR1521409     4  0.1704     0.7276 0.004 0.000 0.000 0.928 0.068
#> SRR1521410     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521411     1  0.4238     0.3718 0.628 0.000 0.000 0.004 0.368
#> SRR1521412     1  0.4238     0.3718 0.628 0.000 0.000 0.004 0.368
#> SRR1521414     5  0.4249     0.9469 0.432 0.000 0.000 0.000 0.568
#> SRR1521413     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     5  0.4249     0.9469 0.432 0.000 0.000 0.000 0.568
#> SRR1521416     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.4327     0.4045 0.632 0.000 0.000 0.008 0.360
#> SRR1521421     1  0.4327     0.4045 0.632 0.000 0.000 0.008 0.360
#> SRR1521422     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     1  0.3885     0.6926 0.724 0.000 0.000 0.008 0.268
#> SRR1521423     1  0.0000     0.7725 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     1  0.3885     0.6926 0.724 0.000 0.000 0.008 0.268
#> SRR1521427     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.1608     0.7659 0.928 0.000 0.000 0.000 0.072
#> SRR1521428     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0865     0.7874 0.000 0.024 0.972 0.000 0.004
#> SRR1521429     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.7860 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0865     0.7874 0.000 0.024 0.972 0.000 0.004
#> SRR1521434     3  0.0865     0.7874 0.000 0.024 0.972 0.000 0.004
#> SRR1521435     3  0.0865     0.7874 0.000 0.024 0.972 0.000 0.004
#> SRR1521436     3  0.6180     0.4824 0.000 0.304 0.568 0.016 0.112
#> SRR1521437     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.7860 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.6180     0.4824 0.000 0.304 0.568 0.016 0.112
#> SRR1521439     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9474 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9474 0.000 1.000 0.000 0.000 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
#> SRR1521352     1  0.5127      0.233 0.516 0.000 0.000 0.408 0.072 0.004
#> SRR1521353     6  0.6110      0.617 0.000 0.000 0.312 0.052 0.108 0.528
#> SRR1521354     6  0.6110      0.617 0.000 0.000 0.312 0.052 0.108 0.528
#> SRR1521355     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     1  0.5869      0.447 0.512 0.000 0.000 0.244 0.240 0.004
#> SRR1521360     6  0.0858      0.695 0.000 0.000 0.004 0.000 0.028 0.968
#> SRR1521361     6  0.0858      0.695 0.000 0.000 0.004 0.000 0.028 0.968
#> SRR1521362     4  0.4671      0.273 0.424 0.000 0.000 0.532 0.044 0.000
#> SRR1521363     4  0.8166     -0.185 0.000 0.244 0.244 0.332 0.136 0.044
#> SRR1521364     3  0.0000      0.870 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.870 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000      0.870 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521370     6  0.5608      0.625 0.000 0.000 0.304 0.044 0.072 0.580
#> SRR1521371     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521372     6  0.3717      0.413 0.000 0.000 0.000 0.000 0.384 0.616
#> SRR1521373     2  0.5918      0.536 0.000 0.596 0.052 0.224 0.128 0.000
#> SRR1521374     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.5918      0.536 0.000 0.596 0.052 0.224 0.128 0.000
#> SRR1521376     4  0.8135     -0.232 0.000 0.212 0.292 0.320 0.132 0.044
#> SRR1521377     3  0.0000      0.870 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     6  0.6121      0.612 0.000 0.000 0.316 0.052 0.108 0.524
#> SRR1521379     4  0.7486     -0.196 0.000 0.000 0.248 0.328 0.136 0.288
#> SRR1521380     3  0.0000      0.870 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.2346      0.642 0.000 0.000 0.000 0.124 0.008 0.868
#> SRR1521382     2  0.5040      0.662 0.000 0.700 0.044 0.164 0.092 0.000
#> SRR1521383     1  0.5814      0.125 0.468 0.000 0.000 0.164 0.364 0.004
#> SRR1521384     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     1  0.5127      0.233 0.516 0.000 0.000 0.408 0.072 0.004
#> SRR1521387     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     6  0.6110      0.617 0.000 0.000 0.312 0.052 0.108 0.528
#> SRR1521388     4  0.4465      0.280 0.460 0.000 0.000 0.512 0.028 0.000
#> SRR1521389     4  0.4465      0.280 0.460 0.000 0.000 0.512 0.028 0.000
#> SRR1521390     4  0.4465      0.280 0.460 0.000 0.000 0.512 0.028 0.000
#> SRR1521391     6  0.2191      0.682 0.000 0.000 0.004 0.000 0.120 0.876
#> SRR1521392     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521393     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521394     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521395     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521396     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521397     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.3509      0.847 0.240 0.000 0.000 0.000 0.744 0.016
#> SRR1521400     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521401     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521403     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521402     5  0.3531      0.980 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR1521405     4  0.4465      0.280 0.460 0.000 0.000 0.512 0.028 0.000
#> SRR1521406     1  0.0508      0.700 0.984 0.000 0.000 0.012 0.004 0.000
#> SRR1521404     4  0.4640      0.230 0.376 0.000 0.000 0.576 0.048 0.000
#> SRR1521408     6  0.6110      0.617 0.000 0.000 0.312 0.052 0.108 0.528
#> SRR1521407     6  0.0713      0.693 0.000 0.000 0.000 0.000 0.028 0.972
#> SRR1521409     6  0.2346      0.642 0.000 0.000 0.000 0.124 0.008 0.868
#> SRR1521410     1  0.0146      0.711 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521411     1  0.5771      0.431 0.508 0.000 0.000 0.244 0.248 0.000
#> SRR1521412     1  0.5771      0.431 0.508 0.000 0.000 0.244 0.248 0.000
#> SRR1521414     5  0.3607      0.956 0.348 0.000 0.000 0.000 0.652 0.000
#> SRR1521413     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     5  0.3607      0.956 0.348 0.000 0.000 0.000 0.652 0.000
#> SRR1521416     1  0.0146      0.711 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521417     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0146      0.711 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521419     1  0.0146      0.711 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521420     1  0.5869      0.447 0.512 0.000 0.000 0.244 0.240 0.004
#> SRR1521421     1  0.5869      0.447 0.512 0.000 0.000 0.244 0.240 0.004
#> SRR1521422     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     1  0.5127      0.233 0.516 0.000 0.000 0.408 0.072 0.004
#> SRR1521423     1  0.0000      0.711 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     1  0.5127      0.233 0.516 0.000 0.000 0.408 0.072 0.004
#> SRR1521427     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.3345      0.492 0.776 0.000 0.000 0.204 0.020 0.000
#> SRR1521428     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0881      0.865 0.000 0.008 0.972 0.008 0.012 0.000
#> SRR1521429     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.870 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0881      0.865 0.000 0.008 0.972 0.008 0.012 0.000
#> SRR1521434     3  0.0881      0.865 0.000 0.008 0.972 0.008 0.012 0.000
#> SRR1521435     3  0.0881      0.865 0.000 0.008 0.972 0.008 0.012 0.000
#> SRR1521436     3  0.7076      0.296 0.000 0.252 0.452 0.172 0.124 0.000
#> SRR1521437     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.870 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.7076      0.296 0.000 0.252 0.452 0.172 0.124 0.000
#> SRR1521439     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.946 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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

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

collect_plots(res)

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 1.000           0.967       0.987         0.5011 0.502   0.502
#> 3 3 0.759           0.790       0.893         0.2858 0.807   0.634
#> 4 4 0.664           0.828       0.858         0.1241 0.853   0.615
#> 5 5 0.758           0.617       0.782         0.0747 0.953   0.825
#> 6 6 0.803           0.663       0.793         0.0445 0.911   0.652

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
#> SRR1521352     1   0.000      0.977 1.000 0.000
#> SRR1521353     2   0.000      1.000 0.000 1.000
#> SRR1521354     1   0.991      0.232 0.556 0.444
#> SRR1521355     1   0.000      0.977 1.000 0.000
#> SRR1521356     1   0.000      0.977 1.000 0.000
#> SRR1521357     2   0.000      1.000 0.000 1.000
#> SRR1521358     2   0.000      1.000 0.000 1.000
#> SRR1521359     1   0.000      0.977 1.000 0.000
#> SRR1521360     1   0.949      0.437 0.632 0.368
#> SRR1521361     1   0.000      0.977 1.000 0.000
#> SRR1521362     1   0.000      0.977 1.000 0.000
#> SRR1521363     2   0.000      1.000 0.000 1.000
#> SRR1521364     2   0.000      1.000 0.000 1.000
#> SRR1521365     2   0.000      1.000 0.000 1.000
#> SRR1521366     2   0.000      1.000 0.000 1.000
#> SRR1521368     2   0.000      1.000 0.000 1.000
#> SRR1521369     2   0.000      1.000 0.000 1.000
#> SRR1521370     1   0.949      0.437 0.632 0.368
#> SRR1521371     1   0.000      0.977 1.000 0.000
#> SRR1521372     1   0.000      0.977 1.000 0.000
#> SRR1521373     2   0.000      1.000 0.000 1.000
#> SRR1521374     2   0.000      1.000 0.000 1.000
#> SRR1521375     2   0.000      1.000 0.000 1.000
#> SRR1521376     2   0.000      1.000 0.000 1.000
#> SRR1521377     2   0.000      1.000 0.000 1.000
#> SRR1521378     2   0.000      1.000 0.000 1.000
#> SRR1521379     2   0.000      1.000 0.000 1.000
#> SRR1521380     2   0.000      1.000 0.000 1.000
#> SRR1521381     1   0.000      0.977 1.000 0.000
#> SRR1521382     2   0.000      1.000 0.000 1.000
#> SRR1521383     1   0.000      0.977 1.000 0.000
#> SRR1521384     2   0.000      1.000 0.000 1.000
#> SRR1521385     1   0.000      0.977 1.000 0.000
#> SRR1521387     2   0.000      1.000 0.000 1.000
#> SRR1521386     2   0.000      1.000 0.000 1.000
#> SRR1521388     1   0.000      0.977 1.000 0.000
#> SRR1521389     1   0.000      0.977 1.000 0.000
#> SRR1521390     1   0.000      0.977 1.000 0.000
#> SRR1521391     1   0.000      0.977 1.000 0.000
#> SRR1521392     1   0.000      0.977 1.000 0.000
#> SRR1521393     1   0.000      0.977 1.000 0.000
#> SRR1521394     1   0.000      0.977 1.000 0.000
#> SRR1521395     1   0.000      0.977 1.000 0.000
#> SRR1521396     1   0.000      0.977 1.000 0.000
#> SRR1521397     1   0.000      0.977 1.000 0.000
#> SRR1521398     1   0.000      0.977 1.000 0.000
#> SRR1521399     1   0.000      0.977 1.000 0.000
#> SRR1521400     1   0.000      0.977 1.000 0.000
#> SRR1521401     1   0.000      0.977 1.000 0.000
#> SRR1521403     1   0.000      0.977 1.000 0.000
#> SRR1521402     1   0.000      0.977 1.000 0.000
#> SRR1521405     1   0.000      0.977 1.000 0.000
#> SRR1521406     1   0.000      0.977 1.000 0.000
#> SRR1521404     1   0.000      0.977 1.000 0.000
#> SRR1521408     2   0.000      1.000 0.000 1.000
#> SRR1521407     1   0.000      0.977 1.000 0.000
#> SRR1521409     1   0.000      0.977 1.000 0.000
#> SRR1521410     1   0.000      0.977 1.000 0.000
#> SRR1521411     1   0.000      0.977 1.000 0.000
#> SRR1521412     1   0.000      0.977 1.000 0.000
#> SRR1521414     1   0.000      0.977 1.000 0.000
#> SRR1521413     1   0.000      0.977 1.000 0.000
#> SRR1521415     1   0.000      0.977 1.000 0.000
#> SRR1521416     1   0.000      0.977 1.000 0.000
#> SRR1521417     1   0.000      0.977 1.000 0.000
#> SRR1521418     1   0.000      0.977 1.000 0.000
#> SRR1521419     1   0.000      0.977 1.000 0.000
#> SRR1521420     1   0.000      0.977 1.000 0.000
#> SRR1521421     1   0.000      0.977 1.000 0.000
#> SRR1521422     1   0.000      0.977 1.000 0.000
#> SRR1521424     1   0.000      0.977 1.000 0.000
#> SRR1521423     1   0.000      0.977 1.000 0.000
#> SRR1521426     1   0.000      0.977 1.000 0.000
#> SRR1521427     2   0.000      1.000 0.000 1.000
#> SRR1521425     1   0.000      0.977 1.000 0.000
#> SRR1521428     2   0.000      1.000 0.000 1.000
#> SRR1521430     2   0.000      1.000 0.000 1.000
#> SRR1521429     2   0.000      1.000 0.000 1.000
#> SRR1521432     2   0.000      1.000 0.000 1.000
#> SRR1521433     2   0.000      1.000 0.000 1.000
#> SRR1521434     2   0.000      1.000 0.000 1.000
#> SRR1521435     2   0.000      1.000 0.000 1.000
#> SRR1521436     2   0.000      1.000 0.000 1.000
#> SRR1521437     2   0.000      1.000 0.000 1.000
#> SRR1521431     2   0.000      1.000 0.000 1.000
#> SRR1521438     2   0.000      1.000 0.000 1.000
#> SRR1521439     2   0.000      1.000 0.000 1.000
#> SRR1521440     2   0.000      1.000 0.000 1.000
#> SRR1521441     2   0.000      1.000 0.000 1.000
#> SRR1521443     2   0.000      1.000 0.000 1.000
#> SRR1521442     2   0.000      1.000 0.000 1.000
#> SRR1521444     2   0.000      1.000 0.000 1.000
#> SRR1521445     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
#> SRR1521352     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521353     3  0.1411      0.747 0.000 0.036 0.964
#> SRR1521354     3  0.1636      0.742 0.020 0.016 0.964
#> SRR1521355     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521359     1  0.1643      0.883 0.956 0.000 0.044
#> SRR1521360     3  0.1636      0.742 0.020 0.016 0.964
#> SRR1521361     3  0.1411      0.732 0.036 0.000 0.964
#> SRR1521362     1  0.1411      0.885 0.964 0.000 0.036
#> SRR1521363     2  0.0424      0.935 0.000 0.992 0.008
#> SRR1521364     3  0.5835      0.622 0.000 0.340 0.660
#> SRR1521365     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521366     3  0.5810      0.626 0.000 0.336 0.664
#> SRR1521368     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521369     3  0.1411      0.747 0.000 0.036 0.964
#> SRR1521370     3  0.1636      0.742 0.020 0.016 0.964
#> SRR1521371     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521372     3  0.1411      0.732 0.036 0.000 0.964
#> SRR1521373     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521374     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521375     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521376     3  0.6244      0.458 0.000 0.440 0.560
#> SRR1521377     3  0.5835      0.622 0.000 0.340 0.660
#> SRR1521378     3  0.1411      0.747 0.000 0.036 0.964
#> SRR1521379     3  0.5465      0.657 0.000 0.288 0.712
#> SRR1521380     3  0.5835      0.622 0.000 0.340 0.660
#> SRR1521381     1  0.6180      0.537 0.584 0.000 0.416
#> SRR1521382     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521383     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521384     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521385     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521387     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521386     3  0.1411      0.747 0.000 0.036 0.964
#> SRR1521388     1  0.1411      0.885 0.964 0.000 0.036
#> SRR1521389     1  0.1411      0.885 0.964 0.000 0.036
#> SRR1521390     1  0.1411      0.885 0.964 0.000 0.036
#> SRR1521391     3  0.1411      0.732 0.036 0.000 0.964
#> SRR1521392     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521393     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521394     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521395     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521396     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521397     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521399     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521400     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521401     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521403     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521402     1  0.5591      0.704 0.696 0.000 0.304
#> SRR1521405     1  0.1411      0.885 0.964 0.000 0.036
#> SRR1521406     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521404     1  0.1289      0.887 0.968 0.000 0.032
#> SRR1521408     3  0.1411      0.747 0.000 0.036 0.964
#> SRR1521407     1  0.6168      0.544 0.588 0.000 0.412
#> SRR1521409     3  0.5397      0.335 0.280 0.000 0.720
#> SRR1521410     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521414     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521413     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521415     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521416     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521424     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521423     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521426     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521427     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521425     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521428     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521430     2  0.6308     -0.327 0.000 0.508 0.492
#> SRR1521429     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521432     3  0.5810      0.626 0.000 0.336 0.664
#> SRR1521433     3  0.6267      0.433 0.000 0.452 0.548
#> SRR1521434     3  0.6267      0.433 0.000 0.452 0.548
#> SRR1521435     3  0.6267      0.433 0.000 0.452 0.548
#> SRR1521436     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521437     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521431     3  0.5835      0.622 0.000 0.340 0.660
#> SRR1521438     2  0.6308     -0.327 0.000 0.508 0.492
#> SRR1521439     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.944 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.944 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
#> SRR1521352     1  0.4093      0.840 0.832 0.000 0.096 0.072
#> SRR1521353     3  0.4477      0.705 0.000 0.000 0.688 0.312
#> SRR1521354     3  0.4477      0.705 0.000 0.000 0.688 0.312
#> SRR1521355     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.966 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0188      0.965 0.000 0.996 0.000 0.004
#> SRR1521359     4  0.6212      0.607 0.380 0.000 0.060 0.560
#> SRR1521360     3  0.4941      0.522 0.000 0.000 0.564 0.436
#> SRR1521361     4  0.3528      0.472 0.000 0.000 0.192 0.808
#> SRR1521362     1  0.5416      0.771 0.740 0.000 0.148 0.112
#> SRR1521363     2  0.4171      0.860 0.000 0.828 0.088 0.084
#> SRR1521364     3  0.3024      0.852 0.000 0.148 0.852 0.000
#> SRR1521365     2  0.0000      0.966 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.3024      0.852 0.000 0.148 0.852 0.000
#> SRR1521368     2  0.2149      0.939 0.000 0.912 0.000 0.088
#> SRR1521369     3  0.3024      0.771 0.000 0.000 0.852 0.148
#> SRR1521370     3  0.4855      0.587 0.000 0.000 0.600 0.400
#> SRR1521371     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521372     4  0.3528      0.472 0.000 0.000 0.192 0.808
#> SRR1521373     2  0.4106      0.865 0.000 0.832 0.084 0.084
#> SRR1521374     2  0.2081      0.939 0.000 0.916 0.000 0.084
#> SRR1521375     2  0.2081      0.939 0.000 0.916 0.000 0.084
#> SRR1521376     3  0.3862      0.836 0.000 0.152 0.824 0.024
#> SRR1521377     3  0.3024      0.852 0.000 0.148 0.852 0.000
#> SRR1521378     3  0.3942      0.740 0.000 0.000 0.764 0.236
#> SRR1521379     3  0.4982      0.828 0.000 0.136 0.772 0.092
#> SRR1521380     3  0.3024      0.852 0.000 0.148 0.852 0.000
#> SRR1521381     4  0.3306      0.752 0.156 0.000 0.004 0.840
#> SRR1521382     2  0.2081      0.939 0.000 0.916 0.000 0.084
#> SRR1521383     1  0.3128      0.859 0.884 0.000 0.076 0.040
#> SRR1521384     2  0.0188      0.965 0.000 0.996 0.000 0.004
#> SRR1521385     1  0.4093      0.840 0.832 0.000 0.096 0.072
#> SRR1521387     2  0.2149      0.939 0.000 0.912 0.000 0.088
#> SRR1521386     3  0.4477      0.705 0.000 0.000 0.688 0.312
#> SRR1521388     1  0.4982      0.785 0.772 0.000 0.136 0.092
#> SRR1521389     1  0.4982      0.785 0.772 0.000 0.136 0.092
#> SRR1521390     1  0.4982      0.785 0.772 0.000 0.136 0.092
#> SRR1521391     4  0.3528      0.472 0.000 0.000 0.192 0.808
#> SRR1521392     4  0.4643      0.798 0.344 0.000 0.000 0.656
#> SRR1521393     4  0.4643      0.798 0.344 0.000 0.000 0.656
#> SRR1521394     4  0.4643      0.798 0.344 0.000 0.000 0.656
#> SRR1521395     4  0.4643      0.798 0.344 0.000 0.000 0.656
#> SRR1521396     4  0.4643      0.798 0.344 0.000 0.000 0.656
#> SRR1521397     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521398     1  0.0188      0.888 0.996 0.000 0.000 0.004
#> SRR1521399     4  0.4585      0.800 0.332 0.000 0.000 0.668
#> SRR1521400     4  0.4277      0.793 0.280 0.000 0.000 0.720
#> SRR1521401     4  0.4643      0.798 0.344 0.000 0.000 0.656
#> SRR1521403     4  0.4585      0.794 0.332 0.000 0.000 0.668
#> SRR1521402     4  0.4643      0.798 0.344 0.000 0.000 0.656
#> SRR1521405     1  0.4982      0.785 0.772 0.000 0.136 0.092
#> SRR1521406     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521404     1  0.4093      0.840 0.832 0.000 0.096 0.072
#> SRR1521408     3  0.4477      0.705 0.000 0.000 0.688 0.312
#> SRR1521407     4  0.3402      0.755 0.164 0.000 0.004 0.832
#> SRR1521409     4  0.3958      0.697 0.112 0.000 0.052 0.836
#> SRR1521410     1  0.0188      0.887 0.996 0.000 0.004 0.000
#> SRR1521411     1  0.0188      0.887 0.996 0.000 0.004 0.000
#> SRR1521412     1  0.4844      0.299 0.688 0.000 0.012 0.300
#> SRR1521414     1  0.3494      0.663 0.824 0.000 0.004 0.172
#> SRR1521413     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521415     1  0.3494      0.663 0.824 0.000 0.004 0.172
#> SRR1521416     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521420     1  0.1510      0.879 0.956 0.000 0.028 0.016
#> SRR1521421     1  0.0937      0.880 0.976 0.000 0.012 0.012
#> SRR1521422     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521424     1  0.4093      0.840 0.832 0.000 0.096 0.072
#> SRR1521423     1  0.0000      0.888 1.000 0.000 0.000 0.000
#> SRR1521426     1  0.3716      0.845 0.852 0.000 0.096 0.052
#> SRR1521427     2  0.0188      0.965 0.000 0.996 0.000 0.004
#> SRR1521425     1  0.3239      0.856 0.880 0.000 0.068 0.052
#> SRR1521428     2  0.0188      0.965 0.000 0.996 0.000 0.004
#> SRR1521430     3  0.4050      0.821 0.000 0.168 0.808 0.024
#> SRR1521429     2  0.0188      0.965 0.000 0.996 0.000 0.004
#> SRR1521432     3  0.3024      0.852 0.000 0.148 0.852 0.000
#> SRR1521433     3  0.3074      0.850 0.000 0.152 0.848 0.000
#> SRR1521434     3  0.3074      0.850 0.000 0.152 0.848 0.000
#> SRR1521435     3  0.3074      0.850 0.000 0.152 0.848 0.000
#> SRR1521436     2  0.2149      0.939 0.000 0.912 0.000 0.088
#> SRR1521437     2  0.0188      0.965 0.000 0.996 0.000 0.004
#> SRR1521431     3  0.3024      0.852 0.000 0.148 0.852 0.000
#> SRR1521438     3  0.4050      0.821 0.000 0.168 0.808 0.024
#> SRR1521439     2  0.0188      0.965 0.000 0.996 0.000 0.004
#> SRR1521440     2  0.0000      0.966 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.966 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.966 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.966 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.966 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.966 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     1  0.2104      0.335 0.916 0.000 0.000 0.060 0.024
#> SRR1521353     3  0.4242      0.549 0.000 0.000 0.572 0.000 0.428
#> SRR1521354     3  0.4268      0.528 0.000 0.000 0.556 0.000 0.444
#> SRR1521355     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521356     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521357     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0162      0.938 0.000 0.996 0.000 0.004 0.000
#> SRR1521359     1  0.6213     -0.392 0.452 0.000 0.000 0.140 0.408
#> SRR1521360     5  0.4273     -0.366 0.000 0.000 0.448 0.000 0.552
#> SRR1521361     5  0.0771      0.572 0.000 0.000 0.020 0.004 0.976
#> SRR1521362     1  0.4650      0.265 0.760 0.000 0.052 0.164 0.024
#> SRR1521363     2  0.5254      0.755 0.000 0.680 0.100 0.216 0.004
#> SRR1521364     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521365     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521368     2  0.2719      0.891 0.000 0.852 0.000 0.144 0.004
#> SRR1521369     3  0.1341      0.820 0.000 0.000 0.944 0.000 0.056
#> SRR1521370     5  0.4307     -0.474 0.000 0.000 0.500 0.000 0.500
#> SRR1521371     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521372     5  0.1300      0.574 0.000 0.000 0.016 0.028 0.956
#> SRR1521373     2  0.5254      0.755 0.000 0.680 0.100 0.216 0.004
#> SRR1521374     2  0.2719      0.891 0.000 0.852 0.000 0.144 0.004
#> SRR1521375     2  0.3398      0.851 0.000 0.780 0.000 0.216 0.004
#> SRR1521376     3  0.2054      0.848 0.000 0.052 0.920 0.028 0.000
#> SRR1521377     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521378     3  0.3210      0.735 0.000 0.000 0.788 0.000 0.212
#> SRR1521379     3  0.6369      0.653 0.000 0.052 0.604 0.092 0.252
#> SRR1521380     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521381     5  0.1386      0.579 0.016 0.000 0.000 0.032 0.952
#> SRR1521382     2  0.3333      0.856 0.000 0.788 0.000 0.208 0.004
#> SRR1521383     1  0.3284      0.294 0.828 0.000 0.000 0.148 0.024
#> SRR1521384     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     1  0.2236      0.322 0.908 0.000 0.000 0.068 0.024
#> SRR1521387     2  0.2719      0.891 0.000 0.852 0.000 0.144 0.004
#> SRR1521386     3  0.4242      0.549 0.000 0.000 0.572 0.000 0.428
#> SRR1521388     1  0.4479      0.384 0.752 0.000 0.052 0.188 0.008
#> SRR1521389     1  0.4479      0.384 0.752 0.000 0.052 0.188 0.008
#> SRR1521390     1  0.4479      0.384 0.752 0.000 0.052 0.188 0.008
#> SRR1521391     5  0.1121      0.566 0.000 0.000 0.044 0.000 0.956
#> SRR1521392     5  0.5688      0.538 0.100 0.000 0.000 0.328 0.572
#> SRR1521393     5  0.5688      0.538 0.100 0.000 0.000 0.328 0.572
#> SRR1521394     5  0.5688      0.538 0.100 0.000 0.000 0.328 0.572
#> SRR1521395     5  0.5688      0.538 0.100 0.000 0.000 0.328 0.572
#> SRR1521396     5  0.5688      0.538 0.100 0.000 0.000 0.328 0.572
#> SRR1521397     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521398     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521399     5  0.5739      0.527 0.100 0.000 0.000 0.344 0.556
#> SRR1521400     5  0.5213      0.558 0.064 0.000 0.000 0.320 0.616
#> SRR1521401     5  0.5688      0.538 0.100 0.000 0.000 0.328 0.572
#> SRR1521403     5  0.5765      0.532 0.116 0.000 0.000 0.304 0.580
#> SRR1521402     5  0.5751      0.522 0.100 0.000 0.000 0.348 0.552
#> SRR1521405     1  0.4479      0.384 0.752 0.000 0.052 0.188 0.008
#> SRR1521406     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521404     1  0.2208      0.335 0.908 0.000 0.000 0.072 0.020
#> SRR1521408     3  0.4242      0.549 0.000 0.000 0.572 0.000 0.428
#> SRR1521407     5  0.1364      0.580 0.012 0.000 0.000 0.036 0.952
#> SRR1521409     5  0.1012      0.573 0.020 0.000 0.000 0.012 0.968
#> SRR1521410     1  0.3999      0.480 0.656 0.000 0.000 0.344 0.000
#> SRR1521411     1  0.4126      0.468 0.620 0.000 0.000 0.380 0.000
#> SRR1521412     4  0.6493      0.544 0.384 0.000 0.000 0.428 0.188
#> SRR1521414     4  0.5456      0.710 0.328 0.000 0.000 0.592 0.080
#> SRR1521413     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521415     4  0.5456      0.710 0.328 0.000 0.000 0.592 0.080
#> SRR1521416     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521417     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521418     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521419     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521420     1  0.4360      0.261 0.692 0.000 0.000 0.284 0.024
#> SRR1521421     1  0.4508      0.209 0.648 0.000 0.000 0.332 0.020
#> SRR1521422     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521424     1  0.2104      0.335 0.916 0.000 0.000 0.060 0.024
#> SRR1521423     1  0.4192      0.506 0.596 0.000 0.000 0.404 0.000
#> SRR1521426     1  0.0162      0.414 0.996 0.000 0.000 0.000 0.004
#> SRR1521427     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.2583      0.463 0.864 0.000 0.000 0.132 0.004
#> SRR1521428     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.1965      0.850 0.000 0.052 0.924 0.024 0.000
#> SRR1521429     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521433     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521434     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521435     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521436     2  0.2763      0.889 0.000 0.848 0.000 0.148 0.004
#> SRR1521437     2  0.0162      0.938 0.000 0.996 0.000 0.004 0.000
#> SRR1521431     3  0.1270      0.860 0.000 0.052 0.948 0.000 0.000
#> SRR1521438     3  0.1965      0.850 0.000 0.052 0.924 0.024 0.000
#> SRR1521439     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.939 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.939 0.000 1.000 0.000 0.000 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
#> SRR1521352     1  0.7069    -0.1233 0.388 0.000 0.000 0.320 0.084 0.208
#> SRR1521353     6  0.4812     0.5085 0.000 0.000 0.352 0.048 0.008 0.592
#> SRR1521354     6  0.4735     0.5348 0.000 0.000 0.328 0.048 0.008 0.616
#> SRR1521355     1  0.0000     0.6282 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0146     0.6253 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR1521357     2  0.0363     0.9020 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1521358     2  0.0725     0.8987 0.000 0.976 0.000 0.012 0.012 0.000
#> SRR1521359     6  0.7655    -0.3456 0.216 0.000 0.000 0.200 0.284 0.300
#> SRR1521360     6  0.4444     0.6055 0.000 0.000 0.256 0.000 0.068 0.676
#> SRR1521361     6  0.3314     0.5664 0.000 0.000 0.004 0.000 0.256 0.740
#> SRR1521362     4  0.4327     0.6552 0.264 0.000 0.000 0.680 0.056 0.000
#> SRR1521363     2  0.6677     0.6338 0.000 0.552 0.112 0.244 0.032 0.060
#> SRR1521364     3  0.0779     0.9519 0.000 0.008 0.976 0.008 0.008 0.000
#> SRR1521365     2  0.0000     0.9017 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0779     0.9519 0.000 0.008 0.976 0.008 0.008 0.000
#> SRR1521368     2  0.3815     0.8352 0.000 0.792 0.000 0.144 0.036 0.028
#> SRR1521369     3  0.2649     0.8438 0.000 0.000 0.884 0.048 0.016 0.052
#> SRR1521370     6  0.5297     0.5859 0.000 0.000 0.276 0.048 0.052 0.624
#> SRR1521371     1  0.0260     0.6268 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR1521372     6  0.3547     0.5444 0.000 0.000 0.004 0.000 0.300 0.696
#> SRR1521373     2  0.6630     0.6351 0.000 0.552 0.112 0.248 0.028 0.060
#> SRR1521374     2  0.3815     0.8352 0.000 0.792 0.000 0.144 0.036 0.028
#> SRR1521375     2  0.4948     0.7532 0.000 0.664 0.000 0.248 0.028 0.060
#> SRR1521376     3  0.0924     0.9494 0.000 0.008 0.972 0.008 0.008 0.004
#> SRR1521377     3  0.0520     0.9547 0.000 0.008 0.984 0.000 0.008 0.000
#> SRR1521378     3  0.4502     0.4894 0.000 0.000 0.696 0.048 0.016 0.240
#> SRR1521379     6  0.6117     0.2421 0.000 0.008 0.380 0.132 0.016 0.464
#> SRR1521380     3  0.0520     0.9547 0.000 0.008 0.984 0.000 0.008 0.000
#> SRR1521381     6  0.3940     0.4661 0.000 0.000 0.000 0.012 0.348 0.640
#> SRR1521382     2  0.4864     0.7758 0.000 0.688 0.000 0.220 0.036 0.056
#> SRR1521383     1  0.7289    -0.0652 0.376 0.000 0.000 0.276 0.108 0.240
#> SRR1521384     2  0.0622     0.8992 0.000 0.980 0.000 0.008 0.012 0.000
#> SRR1521385     1  0.7265    -0.1268 0.360 0.000 0.000 0.320 0.108 0.212
#> SRR1521387     2  0.3815     0.8352 0.000 0.792 0.000 0.144 0.036 0.028
#> SRR1521386     6  0.4812     0.5085 0.000 0.000 0.352 0.048 0.008 0.592
#> SRR1521388     4  0.3804     0.9065 0.424 0.000 0.000 0.576 0.000 0.000
#> SRR1521389     4  0.3804     0.9065 0.424 0.000 0.000 0.576 0.000 0.000
#> SRR1521390     4  0.3804     0.9065 0.424 0.000 0.000 0.576 0.000 0.000
#> SRR1521391     6  0.5240     0.5914 0.000 0.000 0.052 0.048 0.264 0.636
#> SRR1521392     5  0.1829     0.8314 0.064 0.000 0.000 0.004 0.920 0.012
#> SRR1521393     5  0.1732     0.8371 0.072 0.000 0.000 0.004 0.920 0.004
#> SRR1521394     5  0.1732     0.8371 0.072 0.000 0.000 0.004 0.920 0.004
#> SRR1521395     5  0.1732     0.8371 0.072 0.000 0.000 0.004 0.920 0.004
#> SRR1521396     5  0.1732     0.8371 0.072 0.000 0.000 0.004 0.920 0.004
#> SRR1521397     1  0.0405     0.6254 0.988 0.000 0.008 0.004 0.000 0.000
#> SRR1521398     1  0.0405     0.6254 0.988 0.000 0.008 0.004 0.000 0.000
#> SRR1521399     5  0.2638     0.8268 0.060 0.000 0.000 0.016 0.884 0.040
#> SRR1521400     5  0.2279     0.8150 0.048 0.000 0.000 0.004 0.900 0.048
#> SRR1521401     5  0.2322     0.8333 0.072 0.000 0.000 0.008 0.896 0.024
#> SRR1521403     5  0.2420     0.8293 0.068 0.000 0.000 0.008 0.892 0.032
#> SRR1521402     5  0.2638     0.8268 0.060 0.000 0.000 0.016 0.884 0.040
#> SRR1521405     4  0.3804     0.9065 0.424 0.000 0.000 0.576 0.000 0.000
#> SRR1521406     1  0.0405     0.6259 0.988 0.000 0.008 0.000 0.000 0.004
#> SRR1521404     1  0.7051    -0.1588 0.372 0.000 0.000 0.340 0.080 0.208
#> SRR1521408     6  0.4812     0.5085 0.000 0.000 0.352 0.048 0.008 0.592
#> SRR1521407     6  0.3742     0.4723 0.000 0.000 0.000 0.004 0.348 0.648
#> SRR1521409     6  0.3986     0.4973 0.000 0.000 0.000 0.020 0.316 0.664
#> SRR1521410     1  0.1570     0.5957 0.944 0.000 0.008 0.016 0.004 0.028
#> SRR1521411     1  0.1307     0.6051 0.952 0.000 0.008 0.008 0.000 0.032
#> SRR1521412     5  0.6714     0.4808 0.180 0.000 0.008 0.080 0.536 0.196
#> SRR1521414     5  0.5389     0.3119 0.440 0.000 0.008 0.020 0.488 0.044
#> SRR1521413     1  0.0260     0.6268 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR1521415     5  0.5389     0.3119 0.440 0.000 0.008 0.020 0.488 0.044
#> SRR1521416     1  0.0000     0.6282 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.6282 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.6282 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.6282 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.6770     0.1536 0.512 0.000 0.000 0.148 0.120 0.220
#> SRR1521421     1  0.6564     0.1881 0.532 0.000 0.000 0.120 0.112 0.236
#> SRR1521422     1  0.0000     0.6282 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     1  0.7148    -0.1268 0.376 0.000 0.000 0.320 0.092 0.212
#> SRR1521423     1  0.0000     0.6282 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     1  0.6181    -0.1490 0.468 0.000 0.000 0.316 0.016 0.200
#> SRR1521427     2  0.0000     0.9017 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.4527     0.2396 0.732 0.000 0.000 0.152 0.016 0.100
#> SRR1521428     2  0.0363     0.9020 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR1521430     3  0.0260     0.9563 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521429     2  0.0547     0.9018 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1521432     3  0.0260     0.9563 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521433     3  0.0260     0.9563 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521434     3  0.0260     0.9563 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521435     3  0.0260     0.9563 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521436     2  0.3815     0.8352 0.000 0.792 0.000 0.144 0.036 0.028
#> SRR1521437     2  0.0725     0.8987 0.000 0.976 0.000 0.012 0.012 0.000
#> SRR1521431     3  0.0260     0.9563 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521438     3  0.0260     0.9563 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521439     2  0.0000     0.9017 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0547     0.9018 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1521441     2  0.0547     0.9018 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1521443     2  0.0547     0.9018 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1521442     2  0.0547     0.9018 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1521444     2  0.0547     0.9018 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1521445     2  0.0547     0.9018 0.000 0.980 0.000 0.000 0.000 0.020

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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 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.986       0.995         0.5049 0.496   0.496
#> 3 3 0.943           0.907       0.956         0.2263 0.860   0.723
#> 4 4 0.792           0.897       0.884         0.1424 0.886   0.699
#> 5 5 0.810           0.917       0.919         0.0636 0.966   0.876
#> 6 6 0.918           0.818       0.909         0.0483 0.968   0.872

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3

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
#> SRR1521352     1  0.0000      0.990 1.000 0.000
#> SRR1521353     2  0.0000      1.000 0.000 1.000
#> SRR1521354     2  0.0000      1.000 0.000 1.000
#> SRR1521355     1  0.0000      0.990 1.000 0.000
#> SRR1521356     1  0.0000      0.990 1.000 0.000
#> SRR1521357     2  0.0000      1.000 0.000 1.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000
#> SRR1521359     1  0.0000      0.990 1.000 0.000
#> SRR1521360     2  0.0000      1.000 0.000 1.000
#> SRR1521361     1  0.0000      0.990 1.000 0.000
#> SRR1521362     1  0.0000      0.990 1.000 0.000
#> SRR1521363     2  0.0000      1.000 0.000 1.000
#> SRR1521364     2  0.0000      1.000 0.000 1.000
#> SRR1521365     2  0.0000      1.000 0.000 1.000
#> SRR1521366     2  0.0000      1.000 0.000 1.000
#> SRR1521368     2  0.0000      1.000 0.000 1.000
#> SRR1521369     2  0.0000      1.000 0.000 1.000
#> SRR1521370     2  0.0000      1.000 0.000 1.000
#> SRR1521371     1  0.0000      0.990 1.000 0.000
#> SRR1521372     1  0.0376      0.986 0.996 0.004
#> SRR1521373     2  0.0000      1.000 0.000 1.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000
#> SRR1521376     2  0.0000      1.000 0.000 1.000
#> SRR1521377     2  0.0000      1.000 0.000 1.000
#> SRR1521378     2  0.0000      1.000 0.000 1.000
#> SRR1521379     2  0.0000      1.000 0.000 1.000
#> SRR1521380     2  0.0000      1.000 0.000 1.000
#> SRR1521381     1  0.0000      0.990 1.000 0.000
#> SRR1521382     2  0.0000      1.000 0.000 1.000
#> SRR1521383     1  0.0000      0.990 1.000 0.000
#> SRR1521384     2  0.0000      1.000 0.000 1.000
#> SRR1521385     1  0.0000      0.990 1.000 0.000
#> SRR1521387     2  0.0000      1.000 0.000 1.000
#> SRR1521386     2  0.0000      1.000 0.000 1.000
#> SRR1521388     1  0.0000      0.990 1.000 0.000
#> SRR1521389     1  0.0000      0.990 1.000 0.000
#> SRR1521390     1  0.0000      0.990 1.000 0.000
#> SRR1521391     1  0.9963      0.135 0.536 0.464
#> SRR1521392     1  0.0000      0.990 1.000 0.000
#> SRR1521393     1  0.0000      0.990 1.000 0.000
#> SRR1521394     1  0.0000      0.990 1.000 0.000
#> SRR1521395     1  0.0000      0.990 1.000 0.000
#> SRR1521396     1  0.0000      0.990 1.000 0.000
#> SRR1521397     1  0.0000      0.990 1.000 0.000
#> SRR1521398     1  0.0000      0.990 1.000 0.000
#> SRR1521399     1  0.0000      0.990 1.000 0.000
#> SRR1521400     1  0.0000      0.990 1.000 0.000
#> SRR1521401     1  0.0000      0.990 1.000 0.000
#> SRR1521403     1  0.0000      0.990 1.000 0.000
#> SRR1521402     1  0.0000      0.990 1.000 0.000
#> SRR1521405     1  0.0000      0.990 1.000 0.000
#> SRR1521406     1  0.0000      0.990 1.000 0.000
#> SRR1521404     1  0.0000      0.990 1.000 0.000
#> SRR1521408     2  0.0000      1.000 0.000 1.000
#> SRR1521407     1  0.0000      0.990 1.000 0.000
#> SRR1521409     1  0.0000      0.990 1.000 0.000
#> SRR1521410     1  0.0000      0.990 1.000 0.000
#> SRR1521411     1  0.0000      0.990 1.000 0.000
#> SRR1521412     1  0.0000      0.990 1.000 0.000
#> SRR1521414     1  0.0000      0.990 1.000 0.000
#> SRR1521413     1  0.0000      0.990 1.000 0.000
#> SRR1521415     1  0.0000      0.990 1.000 0.000
#> SRR1521416     1  0.0000      0.990 1.000 0.000
#> SRR1521417     1  0.0000      0.990 1.000 0.000
#> SRR1521418     1  0.0000      0.990 1.000 0.000
#> SRR1521419     1  0.0000      0.990 1.000 0.000
#> SRR1521420     1  0.0000      0.990 1.000 0.000
#> SRR1521421     1  0.0000      0.990 1.000 0.000
#> SRR1521422     1  0.0000      0.990 1.000 0.000
#> SRR1521424     1  0.0000      0.990 1.000 0.000
#> SRR1521423     1  0.0000      0.990 1.000 0.000
#> SRR1521426     1  0.0000      0.990 1.000 0.000
#> SRR1521427     2  0.0000      1.000 0.000 1.000
#> SRR1521425     1  0.0000      0.990 1.000 0.000
#> SRR1521428     2  0.0000      1.000 0.000 1.000
#> SRR1521430     2  0.0000      1.000 0.000 1.000
#> SRR1521429     2  0.0000      1.000 0.000 1.000
#> SRR1521432     2  0.0000      1.000 0.000 1.000
#> SRR1521433     2  0.0000      1.000 0.000 1.000
#> SRR1521434     2  0.0000      1.000 0.000 1.000
#> SRR1521435     2  0.0000      1.000 0.000 1.000
#> SRR1521436     2  0.0000      1.000 0.000 1.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000
#> SRR1521431     2  0.0000      1.000 0.000 1.000
#> SRR1521438     2  0.0000      1.000 0.000 1.000
#> SRR1521439     2  0.0000      1.000 0.000 1.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000
#> SRR1521445     2  0.0000      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
#> SRR1521352     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521353     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521354     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521355     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521356     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521357     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521358     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521359     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521360     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521361     3  0.0747    0.79337 0.016 0.000 0.984
#> SRR1521362     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521363     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521364     3  0.6180    0.53537 0.000 0.416 0.584
#> SRR1521365     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521366     3  0.6168    0.54304 0.000 0.412 0.588
#> SRR1521368     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521369     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521370     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521371     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521372     1  0.6111    0.32225 0.604 0.000 0.396
#> SRR1521373     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521374     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521375     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521376     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521377     3  0.6168    0.54304 0.000 0.412 0.588
#> SRR1521378     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521379     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521380     3  0.6168    0.54304 0.000 0.412 0.588
#> SRR1521381     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521382     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521383     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521384     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521385     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521387     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521386     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521388     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521389     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521390     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521391     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521392     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521393     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521394     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521395     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521396     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521397     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521398     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521399     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521400     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521401     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521403     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521402     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521405     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521406     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521404     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521408     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521407     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521409     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521410     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521411     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521412     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521414     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521413     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521415     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521416     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521417     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521418     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521419     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521420     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521421     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521422     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521424     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521423     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521426     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521427     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521425     1  0.0000    0.99100 1.000 0.000 0.000
#> SRR1521428     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521430     3  0.6180    0.53537 0.000 0.416 0.584
#> SRR1521429     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521432     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521433     3  0.6168    0.54304 0.000 0.412 0.588
#> SRR1521434     3  0.6168    0.54304 0.000 0.412 0.588
#> SRR1521435     3  0.6168    0.54304 0.000 0.412 0.588
#> SRR1521436     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521437     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521431     3  0.0000    0.80346 0.000 0.000 1.000
#> SRR1521438     2  0.6126    0.00583 0.000 0.600 0.400
#> SRR1521439     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521440     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521441     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521443     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521442     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521444     2  0.0000    0.97913 0.000 1.000 0.000
#> SRR1521445     2  0.0000    0.97913 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
#> SRR1521352     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521353     3   0.349      0.751 0.188 0.000 0.812 0.000
#> SRR1521354     3   0.349      0.751 0.188 0.000 0.812 0.000
#> SRR1521355     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521356     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521357     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521358     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521359     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521360     3   0.407      0.742 0.252 0.000 0.748 0.000
#> SRR1521361     3   0.499      0.498 0.480 0.000 0.520 0.000
#> SRR1521362     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521363     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521364     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521365     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521366     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521368     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521369     3   0.000      0.763 0.000 0.000 1.000 0.000
#> SRR1521370     3   0.349      0.751 0.188 0.000 0.812 0.000
#> SRR1521371     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521372     1   0.287      0.819 0.864 0.000 0.000 0.136
#> SRR1521373     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521374     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521375     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521376     2   0.349      0.741 0.000 0.812 0.188 0.000
#> SRR1521377     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521378     3   0.287      0.759 0.136 0.000 0.864 0.000
#> SRR1521379     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521380     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521381     4   0.322      0.713 0.164 0.000 0.000 0.836
#> SRR1521382     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521383     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521384     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521385     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521387     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521386     3   0.349      0.751 0.188 0.000 0.812 0.000
#> SRR1521388     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521389     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521390     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521391     3   0.398      0.720 0.240 0.000 0.760 0.000
#> SRR1521392     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521393     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521394     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521395     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521396     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521397     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521398     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521399     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521400     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521401     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521403     1   0.445      0.911 0.692 0.000 0.000 0.308
#> SRR1521402     1   0.407      0.967 0.748 0.000 0.000 0.252
#> SRR1521405     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521406     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521404     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521408     3   0.349      0.751 0.188 0.000 0.812 0.000
#> SRR1521407     4   0.416      0.546 0.264 0.000 0.000 0.736
#> SRR1521409     4   0.190      0.868 0.064 0.004 0.000 0.932
#> SRR1521410     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521411     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521412     4   0.164      0.936 0.060 0.000 0.000 0.940
#> SRR1521414     1   0.441      0.922 0.700 0.000 0.000 0.300
#> SRR1521413     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521415     1   0.441      0.922 0.700 0.000 0.000 0.300
#> SRR1521416     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521417     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521418     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521419     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521420     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521421     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521422     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521424     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521423     4   0.121      0.955 0.040 0.000 0.000 0.960
#> SRR1521426     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521427     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521425     4   0.000      0.948 0.000 0.000 0.000 1.000
#> SRR1521428     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521430     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521429     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521432     3   0.000      0.763 0.000 0.000 1.000 0.000
#> SRR1521433     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521434     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521435     3   0.416      0.709 0.000 0.264 0.736 0.000
#> SRR1521436     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521437     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521431     3   0.000      0.763 0.000 0.000 1.000 0.000
#> SRR1521438     3   0.471      0.553 0.000 0.360 0.640 0.000
#> SRR1521439     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521440     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521441     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521443     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521442     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521444     2   0.000      0.991 0.000 1.000 0.000 0.000
#> SRR1521445     2   0.000      0.991 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521353     4  0.2773      0.900 0.000 0.000 0.164 0.836 0.000
#> SRR1521354     4  0.2773      0.900 0.000 0.000 0.164 0.836 0.000
#> SRR1521355     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521356     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521357     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521360     4  0.3442      0.806 0.000 0.000 0.060 0.836 0.104
#> SRR1521361     4  0.3427      0.804 0.000 0.000 0.056 0.836 0.108
#> SRR1521362     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521363     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521364     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521365     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521368     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0290      0.901 0.000 0.000 0.992 0.008 0.000
#> SRR1521370     4  0.2773      0.900 0.000 0.000 0.164 0.836 0.000
#> SRR1521371     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521372     5  0.1478      0.709 0.000 0.000 0.000 0.064 0.936
#> SRR1521373     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.3003      0.751 0.000 0.188 0.812 0.000 0.000
#> SRR1521377     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521378     4  0.4307      0.324 0.000 0.000 0.500 0.500 0.000
#> SRR1521379     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521380     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521381     1  0.4576      0.725 0.764 0.000 0.008 0.132 0.096
#> SRR1521382     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521383     1  0.0671      0.897 0.980 0.000 0.000 0.004 0.016
#> SRR1521384     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521387     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     4  0.2773      0.900 0.000 0.000 0.164 0.836 0.000
#> SRR1521388     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521389     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521390     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521391     4  0.3098      0.891 0.000 0.000 0.148 0.836 0.016
#> SRR1521392     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521393     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521394     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521395     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521396     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521397     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521398     1  0.1671      0.907 0.924 0.000 0.000 0.000 0.076
#> SRR1521399     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521400     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521401     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521403     5  0.2329      0.948 0.124 0.000 0.000 0.000 0.876
#> SRR1521402     5  0.2179      0.957 0.112 0.000 0.000 0.000 0.888
#> SRR1521405     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521406     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521404     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521408     4  0.2773      0.900 0.000 0.000 0.164 0.836 0.000
#> SRR1521407     1  0.4479      0.723 0.744 0.000 0.000 0.072 0.184
#> SRR1521409     1  0.5092      0.661 0.716 0.000 0.008 0.164 0.112
#> SRR1521410     1  0.1732      0.907 0.920 0.000 0.000 0.000 0.080
#> SRR1521411     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521412     1  0.1965      0.898 0.904 0.000 0.000 0.000 0.096
#> SRR1521414     5  0.3242      0.863 0.216 0.000 0.000 0.000 0.784
#> SRR1521413     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521415     5  0.3242      0.863 0.216 0.000 0.000 0.000 0.784
#> SRR1521416     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521417     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521418     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521419     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521420     1  0.1608      0.906 0.928 0.000 0.000 0.000 0.072
#> SRR1521421     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521422     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521424     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521423     1  0.1792      0.906 0.916 0.000 0.000 0.000 0.084
#> SRR1521426     1  0.1697      0.881 0.932 0.000 0.008 0.060 0.000
#> SRR1521427     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.1282      0.886 0.952 0.000 0.004 0.044 0.000
#> SRR1521428     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521429     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0290      0.901 0.000 0.000 0.992 0.008 0.000
#> SRR1521433     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521434     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521435     3  0.1270      0.956 0.000 0.052 0.948 0.000 0.000
#> SRR1521436     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0290      0.901 0.000 0.000 0.992 0.008 0.000
#> SRR1521438     3  0.1478      0.942 0.000 0.064 0.936 0.000 0.000
#> SRR1521439     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      1.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      1.000 0.000 1.000 0.000 0.000 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
#> SRR1521352     1  0.3578     0.6109 0.660 0.000 0.000 0.000 0.000 0.340
#> SRR1521353     4  0.0865     0.8287 0.000 0.000 0.036 0.964 0.000 0.000
#> SRR1521354     4  0.0865     0.8287 0.000 0.000 0.036 0.964 0.000 0.000
#> SRR1521355     1  0.0146     0.7886 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521356     1  0.0260     0.7887 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR1521357     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     1  0.3428     0.6342 0.696 0.000 0.000 0.000 0.000 0.304
#> SRR1521360     4  0.4406     0.5460 0.000 0.000 0.008 0.640 0.028 0.324
#> SRR1521361     4  0.4570     0.4800 0.000 0.000 0.008 0.588 0.028 0.376
#> SRR1521362     1  0.3634     0.5959 0.644 0.000 0.000 0.000 0.000 0.356
#> SRR1521363     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521364     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521365     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521368     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0260     0.9817 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR1521370     4  0.0632     0.8242 0.000 0.000 0.024 0.976 0.000 0.000
#> SRR1521371     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521372     5  0.2702     0.7365 0.000 0.000 0.004 0.036 0.868 0.092
#> SRR1521373     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.1387     0.9035 0.000 0.068 0.932 0.000 0.000 0.000
#> SRR1521377     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521378     4  0.3789     0.2847 0.000 0.000 0.416 0.584 0.000 0.000
#> SRR1521379     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521380     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521381     6  0.3923     0.5556 0.036 0.000 0.000 0.016 0.184 0.764
#> SRR1521382     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     1  0.0713     0.7779 0.972 0.000 0.000 0.000 0.000 0.028
#> SRR1521384     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     1  0.3578     0.6109 0.660 0.000 0.000 0.000 0.000 0.340
#> SRR1521387     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     4  0.0865     0.8287 0.000 0.000 0.036 0.964 0.000 0.000
#> SRR1521388     1  0.3634     0.5959 0.644 0.000 0.000 0.000 0.000 0.356
#> SRR1521389     1  0.3634     0.5959 0.644 0.000 0.000 0.000 0.000 0.356
#> SRR1521390     1  0.3634     0.5959 0.644 0.000 0.000 0.000 0.000 0.356
#> SRR1521391     4  0.0547     0.8218 0.000 0.000 0.020 0.980 0.000 0.000
#> SRR1521392     5  0.1141     0.8973 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1521393     5  0.1141     0.8973 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1521394     5  0.1141     0.8973 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1521395     5  0.1141     0.8973 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1521396     5  0.1141     0.8973 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1521397     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521398     1  0.0146     0.7886 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521399     5  0.1908     0.8786 0.044 0.000 0.000 0.012 0.924 0.020
#> SRR1521400     5  0.1141     0.8973 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1521401     5  0.1141     0.8973 0.052 0.000 0.000 0.000 0.948 0.000
#> SRR1521403     5  0.2053     0.8194 0.108 0.000 0.000 0.000 0.888 0.004
#> SRR1521402     5  0.1806     0.8804 0.044 0.000 0.000 0.008 0.928 0.020
#> SRR1521405     1  0.3634     0.5959 0.644 0.000 0.000 0.000 0.000 0.356
#> SRR1521406     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521404     1  0.3634     0.5959 0.644 0.000 0.000 0.000 0.000 0.356
#> SRR1521408     4  0.0865     0.8287 0.000 0.000 0.036 0.964 0.000 0.000
#> SRR1521407     6  0.6299     0.3169 0.392 0.000 0.000 0.028 0.164 0.416
#> SRR1521409     6  0.1511     0.5031 0.032 0.000 0.000 0.012 0.012 0.944
#> SRR1521410     1  0.0000     0.7876 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521411     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521412     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521414     5  0.4565     0.0946 0.476 0.000 0.000 0.008 0.496 0.020
#> SRR1521413     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521415     1  0.4566    -0.3183 0.488 0.000 0.000 0.008 0.484 0.020
#> SRR1521416     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521417     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521418     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521419     1  0.0146     0.7886 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521420     1  0.0000     0.7876 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521421     1  0.0260     0.7887 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR1521422     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521424     1  0.3578     0.6109 0.660 0.000 0.000 0.000 0.000 0.340
#> SRR1521423     1  0.0363     0.7883 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR1521426     1  0.3578     0.6109 0.660 0.000 0.000 0.000 0.000 0.340
#> SRR1521427     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.2793     0.6945 0.800 0.000 0.000 0.000 0.000 0.200
#> SRR1521428     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521429     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0260     0.9817 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR1521433     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521434     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521435     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521436     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0260     0.9817 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR1521438     3  0.0260     0.9890 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR1521439     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     1.0000 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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 17064 rows and 93 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 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 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 1.000           0.994       0.997         0.4896 0.511   0.511
#> 3 3 0.769           0.247       0.659         0.3478 0.672   0.439
#> 4 4 0.942           0.929       0.967         0.1236 0.734   0.379
#> 5 5 0.974           0.955       0.981         0.0493 0.942   0.787
#> 6 6 0.921           0.921       0.950         0.0456 0.965   0.843

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

suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 4 5

There is also optional best \(k\) = 2 4 5 that is worth to check.

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> SRR1521352     1   0.000      0.995 1.000 0.000
#> SRR1521353     1   0.224      0.967 0.964 0.036
#> SRR1521354     1   0.204      0.971 0.968 0.032
#> SRR1521355     1   0.000      0.995 1.000 0.000
#> SRR1521356     1   0.000      0.995 1.000 0.000
#> SRR1521357     2   0.000      0.999 0.000 1.000
#> SRR1521358     2   0.000      0.999 0.000 1.000
#> SRR1521359     1   0.000      0.995 1.000 0.000
#> SRR1521360     1   0.204      0.971 0.968 0.032
#> SRR1521361     1   0.000      0.995 1.000 0.000
#> SRR1521362     1   0.000      0.995 1.000 0.000
#> SRR1521363     2   0.000      0.999 0.000 1.000
#> SRR1521364     2   0.000      0.999 0.000 1.000
#> SRR1521365     2   0.000      0.999 0.000 1.000
#> SRR1521366     2   0.000      0.999 0.000 1.000
#> SRR1521368     2   0.000      0.999 0.000 1.000
#> SRR1521369     2   0.000      0.999 0.000 1.000
#> SRR1521370     1   0.204      0.971 0.968 0.032
#> SRR1521371     1   0.000      0.995 1.000 0.000
#> SRR1521372     1   0.204      0.971 0.968 0.032
#> SRR1521373     2   0.000      0.999 0.000 1.000
#> SRR1521374     2   0.000      0.999 0.000 1.000
#> SRR1521375     2   0.000      0.999 0.000 1.000
#> SRR1521376     2   0.000      0.999 0.000 1.000
#> SRR1521377     2   0.000      0.999 0.000 1.000
#> SRR1521378     2   0.163      0.975 0.024 0.976
#> SRR1521379     2   0.000      0.999 0.000 1.000
#> SRR1521380     2   0.000      0.999 0.000 1.000
#> SRR1521381     1   0.000      0.995 1.000 0.000
#> SRR1521382     2   0.000      0.999 0.000 1.000
#> SRR1521383     1   0.000      0.995 1.000 0.000
#> SRR1521384     2   0.000      0.999 0.000 1.000
#> SRR1521385     1   0.000      0.995 1.000 0.000
#> SRR1521387     2   0.000      0.999 0.000 1.000
#> SRR1521386     1   0.311      0.947 0.944 0.056
#> SRR1521388     1   0.000      0.995 1.000 0.000
#> SRR1521389     1   0.000      0.995 1.000 0.000
#> SRR1521390     1   0.000      0.995 1.000 0.000
#> SRR1521391     1   0.204      0.971 0.968 0.032
#> SRR1521392     1   0.000      0.995 1.000 0.000
#> SRR1521393     1   0.000      0.995 1.000 0.000
#> SRR1521394     1   0.000      0.995 1.000 0.000
#> SRR1521395     1   0.000      0.995 1.000 0.000
#> SRR1521396     1   0.000      0.995 1.000 0.000
#> SRR1521397     1   0.000      0.995 1.000 0.000
#> SRR1521398     1   0.000      0.995 1.000 0.000
#> SRR1521399     1   0.000      0.995 1.000 0.000
#> SRR1521400     1   0.000      0.995 1.000 0.000
#> SRR1521401     1   0.000      0.995 1.000 0.000
#> SRR1521403     1   0.000      0.995 1.000 0.000
#> SRR1521402     1   0.000      0.995 1.000 0.000
#> SRR1521405     1   0.000      0.995 1.000 0.000
#> SRR1521406     1   0.000      0.995 1.000 0.000
#> SRR1521404     1   0.000      0.995 1.000 0.000
#> SRR1521408     1   0.224      0.967 0.964 0.036
#> SRR1521407     1   0.000      0.995 1.000 0.000
#> SRR1521409     1   0.000      0.995 1.000 0.000
#> SRR1521410     1   0.000      0.995 1.000 0.000
#> SRR1521411     1   0.000      0.995 1.000 0.000
#> SRR1521412     1   0.000      0.995 1.000 0.000
#> SRR1521414     1   0.000      0.995 1.000 0.000
#> SRR1521413     1   0.000      0.995 1.000 0.000
#> SRR1521415     1   0.000      0.995 1.000 0.000
#> SRR1521416     1   0.000      0.995 1.000 0.000
#> SRR1521417     1   0.000      0.995 1.000 0.000
#> SRR1521418     1   0.000      0.995 1.000 0.000
#> SRR1521419     1   0.000      0.995 1.000 0.000
#> SRR1521420     1   0.000      0.995 1.000 0.000
#> SRR1521421     1   0.000      0.995 1.000 0.000
#> SRR1521422     1   0.000      0.995 1.000 0.000
#> SRR1521424     1   0.000      0.995 1.000 0.000
#> SRR1521423     1   0.000      0.995 1.000 0.000
#> SRR1521426     1   0.000      0.995 1.000 0.000
#> SRR1521427     2   0.000      0.999 0.000 1.000
#> SRR1521425     1   0.000      0.995 1.000 0.000
#> SRR1521428     2   0.000      0.999 0.000 1.000
#> SRR1521430     2   0.000      0.999 0.000 1.000
#> SRR1521429     2   0.000      0.999 0.000 1.000
#> SRR1521432     2   0.000      0.999 0.000 1.000
#> SRR1521433     2   0.000      0.999 0.000 1.000
#> SRR1521434     2   0.000      0.999 0.000 1.000
#> SRR1521435     2   0.000      0.999 0.000 1.000
#> SRR1521436     2   0.000      0.999 0.000 1.000
#> SRR1521437     2   0.000      0.999 0.000 1.000
#> SRR1521431     2   0.000      0.999 0.000 1.000
#> SRR1521438     2   0.000      0.999 0.000 1.000
#> SRR1521439     2   0.000      0.999 0.000 1.000
#> SRR1521440     2   0.000      0.999 0.000 1.000
#> SRR1521441     2   0.000      0.999 0.000 1.000
#> SRR1521443     2   0.000      0.999 0.000 1.000
#> SRR1521442     2   0.000      0.999 0.000 1.000
#> SRR1521444     2   0.000      0.999 0.000 1.000
#> SRR1521445     2   0.000      0.999 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
#> SRR1521352     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521353     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521354     3  0.6309    -0.1463 0.500 0.000 0.500
#> SRR1521355     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521356     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521357     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521358     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521359     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521360     3  0.6309    -0.1463 0.500 0.000 0.500
#> SRR1521361     3  0.6309    -0.1463 0.500 0.000 0.500
#> SRR1521362     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521363     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521364     3  0.6309    -0.3988 0.000 0.500 0.500
#> SRR1521365     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521366     3  0.7578    -0.3507 0.040 0.460 0.500
#> SRR1521368     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521369     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521370     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521371     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521372     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521373     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521374     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521375     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521376     3  0.6309    -0.3988 0.000 0.500 0.500
#> SRR1521377     2  0.6309     0.3558 0.000 0.500 0.500
#> SRR1521378     3  0.6309    -0.1463 0.500 0.000 0.500
#> SRR1521379     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521380     3  0.6309    -0.3988 0.000 0.500 0.500
#> SRR1521381     3  0.6309    -0.1463 0.500 0.000 0.500
#> SRR1521382     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521383     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521384     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521385     1  0.6204     0.0465 0.576 0.000 0.424
#> SRR1521387     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521386     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521388     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521389     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521390     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521391     3  0.6309    -0.1463 0.500 0.000 0.500
#> SRR1521392     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521393     1  0.0892     0.3696 0.980 0.000 0.020
#> SRR1521394     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521395     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521396     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521397     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521398     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521399     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521400     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521401     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521403     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521402     1  0.0000     0.3799 1.000 0.000 0.000
#> SRR1521405     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521406     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521404     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521408     3  0.6309    -0.1463 0.500 0.000 0.500
#> SRR1521407     1  0.6062     0.1513 0.616 0.000 0.384
#> SRR1521409     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521410     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521411     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521412     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521414     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521413     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521415     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521416     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521417     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521418     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521419     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521420     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521421     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521422     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521424     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521423     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521426     1  0.6309    -0.0367 0.500 0.000 0.500
#> SRR1521427     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521425     3  0.6309    -0.0229 0.500 0.000 0.500
#> SRR1521428     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521430     3  0.6309    -0.3988 0.000 0.500 0.500
#> SRR1521429     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521432     1  0.6309     0.0929 0.500 0.000 0.500
#> SRR1521433     3  0.6309    -0.3988 0.000 0.500 0.500
#> SRR1521434     2  0.6309     0.3558 0.000 0.500 0.500
#> SRR1521435     2  0.6309     0.3558 0.000 0.500 0.500
#> SRR1521436     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521437     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521431     3  0.8249    -0.1049 0.424 0.076 0.500
#> SRR1521438     3  0.6309    -0.3988 0.000 0.500 0.500
#> SRR1521439     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521440     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521441     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521443     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521442     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521444     2  0.0000     0.9358 0.000 1.000 0.000
#> SRR1521445     2  0.0000     0.9358 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
#> SRR1521352     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521353     3  0.1474      0.935 0.052 0.000 0.948 0.000
#> SRR1521354     3  0.1474      0.935 0.052 0.000 0.948 0.000
#> SRR1521355     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521356     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521357     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.4564      0.518 0.328 0.000 0.000 0.672
#> SRR1521360     3  0.1474      0.935 0.052 0.000 0.948 0.000
#> SRR1521361     3  0.4250      0.688 0.276 0.000 0.724 0.000
#> SRR1521362     4  0.3172      0.793 0.160 0.000 0.000 0.840
#> SRR1521363     2  0.3610      0.768 0.000 0.800 0.200 0.000
#> SRR1521364     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.1474      0.935 0.052 0.000 0.948 0.000
#> SRR1521371     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521372     3  0.4250      0.688 0.276 0.000 0.724 0.000
#> SRR1521373     2  0.1940      0.910 0.000 0.924 0.076 0.000
#> SRR1521374     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521376     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521377     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521379     3  0.1474      0.935 0.052 0.000 0.948 0.000
#> SRR1521380     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521381     1  0.0000      0.938 1.000 0.000 0.000 0.000
#> SRR1521382     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521384     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.3172      0.795 0.160 0.000 0.000 0.840
#> SRR1521387     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.1474      0.935 0.052 0.000 0.948 0.000
#> SRR1521388     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521389     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521390     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521391     3  0.4250      0.688 0.276 0.000 0.724 0.000
#> SRR1521392     1  0.0188      0.938 0.996 0.000 0.000 0.004
#> SRR1521393     1  0.1474      0.917 0.948 0.000 0.000 0.052
#> SRR1521394     1  0.1389      0.921 0.952 0.000 0.000 0.048
#> SRR1521395     1  0.1389      0.921 0.952 0.000 0.000 0.048
#> SRR1521396     1  0.1389      0.921 0.952 0.000 0.000 0.048
#> SRR1521397     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521398     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521399     1  0.0000      0.938 1.000 0.000 0.000 0.000
#> SRR1521400     1  0.0000      0.938 1.000 0.000 0.000 0.000
#> SRR1521401     1  0.0188      0.938 0.996 0.000 0.000 0.004
#> SRR1521403     1  0.0000      0.938 1.000 0.000 0.000 0.000
#> SRR1521402     1  0.0336      0.938 0.992 0.000 0.000 0.008
#> SRR1521405     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521406     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521404     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.1474      0.935 0.052 0.000 0.948 0.000
#> SRR1521407     1  0.0000      0.938 1.000 0.000 0.000 0.000
#> SRR1521409     1  0.0188      0.935 0.996 0.000 0.004 0.000
#> SRR1521410     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521411     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521412     1  0.4972      0.178 0.544 0.000 0.000 0.456
#> SRR1521414     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521413     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521415     4  0.4250      0.598 0.276 0.000 0.000 0.724
#> SRR1521416     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521417     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521418     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521419     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521420     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521421     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521422     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521424     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521423     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521426     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521427     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.0000      0.968 0.000 0.000 0.000 1.000
#> SRR1521428     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521429     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521437     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.0000      0.948 0.000 0.000 1.000 0.000
#> SRR1521439     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000      0.986 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000      0.986 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1  p2    p3    p4    p5
#> SRR1521352     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521353     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521354     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521355     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521357     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521358     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521359     4  0.2813      0.787 0.000 0.0 0.000 0.832 0.168
#> SRR1521360     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521361     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521362     1  0.2813      0.788 0.832 0.0 0.000 0.000 0.168
#> SRR1521363     2  0.3109      0.753 0.000 0.8 0.200 0.000 0.000
#> SRR1521364     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521365     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521368     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521369     3  0.0609      0.968 0.000 0.0 0.980 0.020 0.000
#> SRR1521370     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521371     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521372     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521373     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521376     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521377     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521378     3  0.2813      0.802 0.000 0.0 0.832 0.168 0.000
#> SRR1521379     4  0.0794      0.958 0.000 0.0 0.028 0.972 0.000
#> SRR1521380     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521381     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521382     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521383     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521384     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521385     1  0.5329      0.561 0.672 0.0 0.000 0.184 0.144
#> SRR1521387     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521386     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521388     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521389     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521390     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521391     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521392     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521393     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521394     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521395     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521396     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521397     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521399     5  0.2852      0.752 0.000 0.0 0.000 0.172 0.828
#> SRR1521400     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521401     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521403     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521402     5  0.0000      0.932 0.000 0.0 0.000 0.000 1.000
#> SRR1521405     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521406     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521404     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521408     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521407     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521409     4  0.0000      0.984 0.000 0.0 0.000 1.000 0.000
#> SRR1521410     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521411     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521412     5  0.4126      0.384 0.380 0.0 0.000 0.000 0.620
#> SRR1521414     1  0.0162      0.976 0.996 0.0 0.000 0.000 0.004
#> SRR1521413     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521415     1  0.2020      0.877 0.900 0.0 0.000 0.000 0.100
#> SRR1521416     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521420     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521421     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521422     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521424     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521423     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521426     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521427     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521425     1  0.0000      0.979 1.000 0.0 0.000 0.000 0.000
#> SRR1521428     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521430     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521429     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521433     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521434     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521435     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521436     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521438     3  0.0000      0.985 0.000 0.0 1.000 0.000 0.000
#> SRR1521439     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.990 0.000 1.0 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.990 0.000 1.0 0.000 0.000 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
#> SRR1521352     1  0.2003      0.883 0.884 0.000 0.000 0.116 0.000 0.000
#> SRR1521353     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521354     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521356     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521357     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521358     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521359     6  0.3327      0.804 0.000 0.000 0.000 0.088 0.092 0.820
#> SRR1521360     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521361     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521362     4  0.2214      0.754 0.016 0.000 0.000 0.888 0.096 0.000
#> SRR1521363     2  0.1663      0.866 0.000 0.912 0.088 0.000 0.000 0.000
#> SRR1521364     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521368     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0937      0.945 0.000 0.000 0.960 0.000 0.000 0.040
#> SRR1521370     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521372     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521373     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521374     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521377     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.2631      0.780 0.000 0.000 0.820 0.000 0.000 0.180
#> SRR1521379     6  0.1075      0.935 0.000 0.000 0.048 0.000 0.000 0.952
#> SRR1521380     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.0547      0.962 0.000 0.000 0.000 0.000 0.020 0.980
#> SRR1521382     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521383     1  0.1663      0.902 0.912 0.000 0.000 0.088 0.000 0.000
#> SRR1521384     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     1  0.5747      0.508 0.636 0.000 0.000 0.088 0.088 0.188
#> SRR1521387     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521386     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521388     4  0.2793      0.921 0.200 0.000 0.000 0.800 0.000 0.000
#> SRR1521389     4  0.2793      0.921 0.200 0.000 0.000 0.800 0.000 0.000
#> SRR1521390     4  0.2793      0.921 0.200 0.000 0.000 0.800 0.000 0.000
#> SRR1521391     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521392     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521393     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521394     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521395     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521396     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521397     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521399     5  0.2562      0.731 0.000 0.000 0.000 0.000 0.828 0.172
#> SRR1521400     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521401     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521403     5  0.0260      0.913 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR1521402     5  0.0000      0.919 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR1521405     4  0.2631      0.918 0.180 0.000 0.000 0.820 0.000 0.000
#> SRR1521406     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.1957      0.871 0.112 0.000 0.000 0.888 0.000 0.000
#> SRR1521408     6  0.0000      0.973 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR1521407     6  0.0363      0.967 0.000 0.000 0.000 0.000 0.012 0.988
#> SRR1521409     6  0.1387      0.919 0.000 0.000 0.000 0.068 0.000 0.932
#> SRR1521410     1  0.1556      0.908 0.920 0.000 0.000 0.080 0.000 0.000
#> SRR1521411     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521412     5  0.3756      0.266 0.400 0.000 0.000 0.000 0.600 0.000
#> SRR1521414     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521413     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     1  0.1765      0.845 0.904 0.000 0.000 0.000 0.096 0.000
#> SRR1521416     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.1663      0.902 0.912 0.000 0.000 0.088 0.000 0.000
#> SRR1521421     1  0.1387      0.914 0.932 0.000 0.000 0.068 0.000 0.000
#> SRR1521422     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     1  0.2260      0.861 0.860 0.000 0.000 0.140 0.000 0.000
#> SRR1521423     1  0.0000      0.942 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     1  0.1663      0.902 0.912 0.000 0.000 0.088 0.000 0.000
#> SRR1521427     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521425     1  0.1327      0.916 0.936 0.000 0.000 0.064 0.000 0.000
#> SRR1521428     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521430     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521432     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521434     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521435     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521436     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521437     2  0.0000      0.943 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000      0.981 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521440     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521441     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521443     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521442     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521444     2  0.1957      0.941 0.000 0.888 0.000 0.112 0.000 0.000
#> SRR1521445     2  0.1957      0.941 0.000 0.888 0.000 0.112 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-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

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 17064 rows and 93 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 1.000           0.990       0.996         0.5033 0.497   0.497
#> 3 3 0.588           0.842       0.912         0.2551 0.787   0.600
#> 4 4 0.654           0.689       0.824         0.1472 0.855   0.627
#> 5 5 0.831           0.777       0.899         0.0868 0.884   0.615
#> 6 6 0.893           0.855       0.912         0.0511 0.925   0.669

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

suggest_best_k(res)
#> [1] 2

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

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

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>            class entropy silhouette    p1    p2
#> SRR1521352     1  0.0000      0.994 1.000 0.000
#> SRR1521353     2  0.0000      0.997 0.000 1.000
#> SRR1521354     2  0.0000      0.997 0.000 1.000
#> SRR1521355     1  0.0000      0.994 1.000 0.000
#> SRR1521356     1  0.0000      0.994 1.000 0.000
#> SRR1521357     2  0.0000      0.997 0.000 1.000
#> SRR1521358     2  0.0000      0.997 0.000 1.000
#> SRR1521359     1  0.0000      0.994 1.000 0.000
#> SRR1521360     1  0.4431      0.897 0.908 0.092
#> SRR1521361     1  0.0000      0.994 1.000 0.000
#> SRR1521362     1  0.0000      0.994 1.000 0.000
#> SRR1521363     2  0.0000      0.997 0.000 1.000
#> SRR1521364     2  0.0000      0.997 0.000 1.000
#> SRR1521365     2  0.0000      0.997 0.000 1.000
#> SRR1521366     2  0.0000      0.997 0.000 1.000
#> SRR1521368     2  0.0000      0.997 0.000 1.000
#> SRR1521369     2  0.0000      0.997 0.000 1.000
#> SRR1521370     2  0.0000      0.997 0.000 1.000
#> SRR1521371     1  0.0000      0.994 1.000 0.000
#> SRR1521372     1  0.0000      0.994 1.000 0.000
#> SRR1521373     2  0.0000      0.997 0.000 1.000
#> SRR1521374     2  0.0000      0.997 0.000 1.000
#> SRR1521375     2  0.0000      0.997 0.000 1.000
#> SRR1521376     2  0.0000      0.997 0.000 1.000
#> SRR1521377     2  0.0000      0.997 0.000 1.000
#> SRR1521378     2  0.0000      0.997 0.000 1.000
#> SRR1521379     2  0.5059      0.873 0.112 0.888
#> SRR1521380     2  0.0000      0.997 0.000 1.000
#> SRR1521381     1  0.0000      0.994 1.000 0.000
#> SRR1521382     2  0.0000      0.997 0.000 1.000
#> SRR1521383     1  0.0000      0.994 1.000 0.000
#> SRR1521384     2  0.0000      0.997 0.000 1.000
#> SRR1521385     1  0.0000      0.994 1.000 0.000
#> SRR1521387     2  0.0000      0.997 0.000 1.000
#> SRR1521386     2  0.0000      0.997 0.000 1.000
#> SRR1521388     1  0.0000      0.994 1.000 0.000
#> SRR1521389     1  0.0000      0.994 1.000 0.000
#> SRR1521390     1  0.0000      0.994 1.000 0.000
#> SRR1521391     1  0.7219      0.752 0.800 0.200
#> SRR1521392     1  0.0000      0.994 1.000 0.000
#> SRR1521393     1  0.0000      0.994 1.000 0.000
#> SRR1521394     1  0.0000      0.994 1.000 0.000
#> SRR1521395     1  0.0000      0.994 1.000 0.000
#> SRR1521396     1  0.0000      0.994 1.000 0.000
#> SRR1521397     1  0.0000      0.994 1.000 0.000
#> SRR1521398     1  0.0000      0.994 1.000 0.000
#> SRR1521399     1  0.0000      0.994 1.000 0.000
#> SRR1521400     1  0.0000      0.994 1.000 0.000
#> SRR1521401     1  0.0000      0.994 1.000 0.000
#> SRR1521403     1  0.0000      0.994 1.000 0.000
#> SRR1521402     1  0.0000      0.994 1.000 0.000
#> SRR1521405     1  0.0000      0.994 1.000 0.000
#> SRR1521406     1  0.0000      0.994 1.000 0.000
#> SRR1521404     1  0.0000      0.994 1.000 0.000
#> SRR1521408     2  0.0000      0.997 0.000 1.000
#> SRR1521407     1  0.0000      0.994 1.000 0.000
#> SRR1521409     1  0.0376      0.990 0.996 0.004
#> SRR1521410     1  0.0000      0.994 1.000 0.000
#> SRR1521411     1  0.0000      0.994 1.000 0.000
#> SRR1521412     1  0.0000      0.994 1.000 0.000
#> SRR1521414     1  0.0000      0.994 1.000 0.000
#> SRR1521413     1  0.0000      0.994 1.000 0.000
#> SRR1521415     1  0.0000      0.994 1.000 0.000
#> SRR1521416     1  0.0000      0.994 1.000 0.000
#> SRR1521417     1  0.0000      0.994 1.000 0.000
#> SRR1521418     1  0.0000      0.994 1.000 0.000
#> SRR1521419     1  0.0000      0.994 1.000 0.000
#> SRR1521420     1  0.0000      0.994 1.000 0.000
#> SRR1521421     1  0.0000      0.994 1.000 0.000
#> SRR1521422     1  0.0000      0.994 1.000 0.000
#> SRR1521424     1  0.0000      0.994 1.000 0.000
#> SRR1521423     1  0.0000      0.994 1.000 0.000
#> SRR1521426     1  0.0000      0.994 1.000 0.000
#> SRR1521427     2  0.0000      0.997 0.000 1.000
#> SRR1521425     1  0.0000      0.994 1.000 0.000
#> SRR1521428     2  0.0000      0.997 0.000 1.000
#> SRR1521430     2  0.0000      0.997 0.000 1.000
#> SRR1521429     2  0.0000      0.997 0.000 1.000
#> SRR1521432     2  0.0000      0.997 0.000 1.000
#> SRR1521433     2  0.0000      0.997 0.000 1.000
#> SRR1521434     2  0.0000      0.997 0.000 1.000
#> SRR1521435     2  0.0000      0.997 0.000 1.000
#> SRR1521436     2  0.0000      0.997 0.000 1.000
#> SRR1521437     2  0.0000      0.997 0.000 1.000
#> SRR1521431     2  0.0000      0.997 0.000 1.000
#> SRR1521438     2  0.0000      0.997 0.000 1.000
#> SRR1521439     2  0.0000      0.997 0.000 1.000
#> SRR1521440     2  0.0000      0.997 0.000 1.000
#> SRR1521441     2  0.0000      0.997 0.000 1.000
#> SRR1521443     2  0.0000      0.997 0.000 1.000
#> SRR1521442     2  0.0000      0.997 0.000 1.000
#> SRR1521444     2  0.0000      0.997 0.000 1.000
#> SRR1521445     2  0.0000      0.997 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
#> SRR1521352     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521353     3  0.0892      0.810 0.000 0.020 0.980
#> SRR1521354     3  0.0000      0.806 0.000 0.000 1.000
#> SRR1521355     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521356     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521357     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521358     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521359     1  0.4209      0.841 0.856 0.016 0.128
#> SRR1521360     3  0.5595      0.646 0.228 0.016 0.756
#> SRR1521361     3  0.5595      0.646 0.228 0.016 0.756
#> SRR1521362     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521363     3  0.9283      0.489 0.216 0.260 0.524
#> SRR1521364     3  0.2878      0.805 0.000 0.096 0.904
#> SRR1521365     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521366     3  0.2625      0.813 0.000 0.084 0.916
#> SRR1521368     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521369     3  0.2448      0.816 0.000 0.076 0.924
#> SRR1521370     3  0.0000      0.806 0.000 0.000 1.000
#> SRR1521371     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521372     3  0.5956      0.507 0.324 0.004 0.672
#> SRR1521373     2  0.1529      0.939 0.000 0.960 0.040
#> SRR1521374     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521375     2  0.1529      0.939 0.000 0.960 0.040
#> SRR1521376     3  0.8915      0.554 0.216 0.212 0.572
#> SRR1521377     3  0.2625      0.813 0.000 0.084 0.916
#> SRR1521378     3  0.2261      0.817 0.000 0.068 0.932
#> SRR1521379     3  0.8915      0.554 0.216 0.212 0.572
#> SRR1521380     3  0.2625      0.813 0.000 0.084 0.916
#> SRR1521381     3  0.6836      0.244 0.412 0.016 0.572
#> SRR1521382     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521383     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521384     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521385     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521387     2  0.3879      0.791 0.000 0.848 0.152
#> SRR1521386     3  0.0000      0.806 0.000 0.000 1.000
#> SRR1521388     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521389     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521390     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521391     3  0.3499      0.793 0.072 0.028 0.900
#> SRR1521392     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521393     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521394     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521395     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521396     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521397     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521398     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521399     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521400     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521401     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521403     1  0.5058      0.744 0.756 0.000 0.244
#> SRR1521402     1  0.3752      0.836 0.856 0.000 0.144
#> SRR1521405     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521406     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521404     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521408     3  0.1031      0.811 0.000 0.024 0.976
#> SRR1521407     3  0.6836      0.244 0.412 0.016 0.572
#> SRR1521409     3  0.8915      0.554 0.216 0.212 0.572
#> SRR1521410     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521411     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521412     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521414     1  0.3686      0.840 0.860 0.000 0.140
#> SRR1521413     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521415     1  0.3551      0.846 0.868 0.000 0.132
#> SRR1521416     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521417     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521418     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521419     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521420     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521421     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521422     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521424     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521423     1  0.0000      0.903 1.000 0.000 0.000
#> SRR1521426     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521427     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521425     1  0.2959      0.879 0.900 0.000 0.100
#> SRR1521428     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521430     3  0.2537      0.815 0.000 0.080 0.920
#> SRR1521429     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521432     3  0.2356      0.817 0.000 0.072 0.928
#> SRR1521433     3  0.2356      0.817 0.000 0.072 0.928
#> SRR1521434     3  0.2356      0.817 0.000 0.072 0.928
#> SRR1521435     3  0.2356      0.817 0.000 0.072 0.928
#> SRR1521436     2  0.4974      0.642 0.000 0.764 0.236
#> SRR1521437     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521431     3  0.2356      0.817 0.000 0.072 0.928
#> SRR1521438     3  0.2711      0.811 0.000 0.088 0.912
#> SRR1521439     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521440     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521441     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521443     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521442     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521444     2  0.0000      0.973 0.000 1.000 0.000
#> SRR1521445     2  0.0000      0.973 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
#> SRR1521352     4  0.2675    0.61586 0.100 0.000 0.008 0.892
#> SRR1521353     3  0.1796    0.80784 0.016 0.032 0.948 0.004
#> SRR1521354     3  0.0376    0.79647 0.004 0.000 0.992 0.004
#> SRR1521355     4  0.4804    0.62443 0.276 0.000 0.016 0.708
#> SRR1521356     4  0.4804    0.62443 0.276 0.000 0.016 0.708
#> SRR1521357     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.5480    0.48428 0.140 0.000 0.124 0.736
#> SRR1521360     3  0.6665    0.37623 0.096 0.000 0.544 0.360
#> SRR1521361     3  0.6665    0.37623 0.096 0.000 0.544 0.360
#> SRR1521362     4  0.2329    0.60181 0.072 0.000 0.012 0.916
#> SRR1521363     3  0.7565    0.37543 0.044 0.080 0.516 0.360
#> SRR1521364     3  0.3088    0.79875 0.000 0.128 0.864 0.008
#> SRR1521365     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.2704    0.80177 0.000 0.124 0.876 0.000
#> SRR1521368     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.2704    0.80177 0.000 0.124 0.876 0.000
#> SRR1521370     3  0.1042    0.79346 0.020 0.000 0.972 0.008
#> SRR1521371     4  0.4690    0.61633 0.260 0.000 0.016 0.724
#> SRR1521372     4  0.7476   -0.06965 0.408 0.000 0.176 0.416
#> SRR1521373     2  0.3551    0.83498 0.020 0.868 0.096 0.016
#> SRR1521374     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.3551    0.83498 0.020 0.868 0.096 0.016
#> SRR1521376     3  0.7019    0.38695 0.076 0.020 0.544 0.360
#> SRR1521377     3  0.2704    0.80177 0.000 0.124 0.876 0.000
#> SRR1521378     3  0.0188    0.79798 0.000 0.004 0.996 0.000
#> SRR1521379     3  0.7070    0.39038 0.056 0.036 0.544 0.364
#> SRR1521380     3  0.2704    0.80177 0.000 0.124 0.876 0.000
#> SRR1521381     4  0.7153   -0.21197 0.132 0.000 0.424 0.444
#> SRR1521382     2  0.0188    0.96707 0.000 0.996 0.000 0.004
#> SRR1521383     4  0.3080    0.62328 0.096 0.000 0.024 0.880
#> SRR1521384     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.2675    0.61586 0.100 0.000 0.008 0.892
#> SRR1521387     2  0.4770    0.65250 0.020 0.764 0.204 0.012
#> SRR1521386     3  0.0000    0.79626 0.000 0.000 1.000 0.000
#> SRR1521388     4  0.1677    0.62827 0.040 0.000 0.012 0.948
#> SRR1521389     4  0.1677    0.62827 0.040 0.000 0.012 0.948
#> SRR1521390     4  0.1488    0.62624 0.032 0.000 0.012 0.956
#> SRR1521391     3  0.6163    0.59711 0.068 0.008 0.652 0.272
#> SRR1521392     1  0.1792    0.89377 0.932 0.000 0.000 0.068
#> SRR1521393     1  0.1792    0.89377 0.932 0.000 0.000 0.068
#> SRR1521394     1  0.1792    0.89377 0.932 0.000 0.000 0.068
#> SRR1521395     1  0.1792    0.89377 0.932 0.000 0.000 0.068
#> SRR1521396     1  0.1792    0.89377 0.932 0.000 0.000 0.068
#> SRR1521397     4  0.4776    0.62327 0.272 0.000 0.016 0.712
#> SRR1521398     4  0.4690    0.61633 0.260 0.000 0.016 0.724
#> SRR1521399     1  0.3649    0.76702 0.796 0.000 0.000 0.204
#> SRR1521400     1  0.4222    0.62749 0.728 0.000 0.000 0.272
#> SRR1521401     1  0.3647    0.82543 0.832 0.000 0.016 0.152
#> SRR1521403     4  0.6979   -0.00496 0.376 0.000 0.120 0.504
#> SRR1521402     1  0.1792    0.89377 0.932 0.000 0.000 0.068
#> SRR1521405     4  0.1388    0.62503 0.028 0.000 0.012 0.960
#> SRR1521406     4  0.4748    0.62641 0.268 0.000 0.016 0.716
#> SRR1521404     4  0.1584    0.62214 0.036 0.000 0.012 0.952
#> SRR1521408     3  0.2891    0.80707 0.020 0.080 0.896 0.004
#> SRR1521407     4  0.7153   -0.21197 0.132 0.000 0.424 0.444
#> SRR1521409     4  0.7840   -0.20751 0.116 0.032 0.416 0.436
#> SRR1521410     4  0.4936    0.62636 0.280 0.000 0.020 0.700
#> SRR1521411     4  0.4776    0.62505 0.272 0.000 0.016 0.712
#> SRR1521412     4  0.5607    0.17641 0.484 0.000 0.020 0.496
#> SRR1521414     1  0.3881    0.83492 0.812 0.000 0.016 0.172
#> SRR1521413     4  0.4804    0.62447 0.276 0.000 0.016 0.708
#> SRR1521415     1  0.3881    0.83492 0.812 0.000 0.016 0.172
#> SRR1521416     4  0.4804    0.62443 0.276 0.000 0.016 0.708
#> SRR1521417     4  0.4804    0.62447 0.276 0.000 0.016 0.708
#> SRR1521418     4  0.4831    0.62226 0.280 0.000 0.016 0.704
#> SRR1521419     4  0.4776    0.62505 0.272 0.000 0.016 0.712
#> SRR1521420     4  0.4936    0.60237 0.280 0.000 0.020 0.700
#> SRR1521421     4  0.5213    0.55506 0.328 0.000 0.020 0.652
#> SRR1521422     4  0.4776    0.62505 0.272 0.000 0.016 0.712
#> SRR1521424     4  0.2675    0.61586 0.100 0.000 0.008 0.892
#> SRR1521423     4  0.4804    0.62443 0.276 0.000 0.016 0.708
#> SRR1521426     4  0.1970    0.63225 0.060 0.000 0.008 0.932
#> SRR1521427     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.2944    0.64270 0.128 0.000 0.004 0.868
#> SRR1521428     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.2704    0.80177 0.000 0.124 0.876 0.000
#> SRR1521429     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0707    0.80355 0.000 0.020 0.980 0.000
#> SRR1521433     3  0.1716    0.81573 0.000 0.064 0.936 0.000
#> SRR1521434     3  0.1716    0.81573 0.000 0.064 0.936 0.000
#> SRR1521435     3  0.1716    0.81573 0.000 0.064 0.936 0.000
#> SRR1521436     3  0.6682    0.13640 0.020 0.468 0.468 0.044
#> SRR1521437     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.1716    0.81573 0.000 0.064 0.936 0.000
#> SRR1521438     3  0.2760    0.79889 0.000 0.128 0.872 0.000
#> SRR1521439     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000    0.97057 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000    0.97057 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.0963     0.8061 0.036 0.000 0.000 0.964 0.000
#> SRR1521353     3  0.0404     0.8277 0.000 0.000 0.988 0.012 0.000
#> SRR1521354     3  0.1197     0.8085 0.000 0.000 0.952 0.048 0.000
#> SRR1521355     1  0.0451     0.9291 0.988 0.000 0.000 0.008 0.004
#> SRR1521356     1  0.0162     0.9336 0.996 0.000 0.000 0.000 0.004
#> SRR1521357     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521359     4  0.5741     0.5577 0.004 0.000 0.204 0.636 0.156
#> SRR1521360     3  0.4074     0.5304 0.000 0.000 0.636 0.364 0.000
#> SRR1521361     3  0.4074     0.5304 0.000 0.000 0.636 0.364 0.000
#> SRR1521362     4  0.2648     0.7247 0.000 0.000 0.000 0.848 0.152
#> SRR1521363     3  0.6275     0.3625 0.000 0.180 0.520 0.300 0.000
#> SRR1521364     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521368     2  0.1197     0.8977 0.000 0.952 0.048 0.000 0.000
#> SRR1521369     3  0.0404     0.8277 0.000 0.000 0.988 0.012 0.000
#> SRR1521370     3  0.1197     0.8085 0.000 0.000 0.952 0.048 0.000
#> SRR1521371     1  0.0162     0.9336 0.996 0.000 0.000 0.000 0.004
#> SRR1521372     3  0.6330     0.2457 0.000 0.000 0.472 0.364 0.164
#> SRR1521373     2  0.4101     0.4319 0.000 0.628 0.372 0.000 0.000
#> SRR1521374     2  0.1478     0.8865 0.000 0.936 0.064 0.000 0.000
#> SRR1521375     2  0.4101     0.4319 0.000 0.628 0.372 0.000 0.000
#> SRR1521376     3  0.3774     0.6100 0.000 0.000 0.704 0.296 0.000
#> SRR1521377     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     3  0.3796     0.6052 0.000 0.000 0.700 0.300 0.000
#> SRR1521380     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521381     3  0.4074     0.5304 0.000 0.000 0.636 0.364 0.000
#> SRR1521382     2  0.1478     0.8865 0.000 0.936 0.064 0.000 0.000
#> SRR1521383     4  0.6841     0.4985 0.220 0.000 0.044 0.560 0.176
#> SRR1521384     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     4  0.0162     0.8144 0.004 0.000 0.000 0.996 0.000
#> SRR1521387     2  0.3857     0.5296 0.000 0.688 0.312 0.000 0.000
#> SRR1521386     3  0.0404     0.8277 0.000 0.000 0.988 0.012 0.000
#> SRR1521388     4  0.0162     0.8146 0.004 0.000 0.000 0.996 0.000
#> SRR1521389     4  0.0162     0.8146 0.004 0.000 0.000 0.996 0.000
#> SRR1521390     4  0.0000     0.8140 0.000 0.000 0.000 1.000 0.000
#> SRR1521391     3  0.4060     0.5366 0.000 0.000 0.640 0.360 0.000
#> SRR1521392     5  0.0162     0.9189 0.000 0.000 0.000 0.004 0.996
#> SRR1521393     5  0.0000     0.9186 0.000 0.000 0.000 0.000 1.000
#> SRR1521394     5  0.0000     0.9186 0.000 0.000 0.000 0.000 1.000
#> SRR1521395     5  0.0000     0.9186 0.000 0.000 0.000 0.000 1.000
#> SRR1521396     5  0.0000     0.9186 0.000 0.000 0.000 0.000 1.000
#> SRR1521397     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0510     0.9253 0.984 0.000 0.000 0.016 0.000
#> SRR1521399     5  0.0162     0.9189 0.000 0.000 0.000 0.004 0.996
#> SRR1521400     5  0.0510     0.9114 0.000 0.000 0.000 0.016 0.984
#> SRR1521401     5  0.0955     0.9104 0.028 0.000 0.000 0.004 0.968
#> SRR1521403     4  0.6964     0.2653 0.008 0.000 0.252 0.388 0.352
#> SRR1521402     5  0.0162     0.9189 0.000 0.000 0.000 0.004 0.996
#> SRR1521405     4  0.0000     0.8140 0.000 0.000 0.000 1.000 0.000
#> SRR1521406     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.2020     0.7676 0.000 0.000 0.000 0.900 0.100
#> SRR1521408     3  0.0609     0.8244 0.000 0.000 0.980 0.020 0.000
#> SRR1521407     3  0.4074     0.5304 0.000 0.000 0.636 0.364 0.000
#> SRR1521409     4  0.4268    -0.0570 0.000 0.000 0.444 0.556 0.000
#> SRR1521410     1  0.4350     0.3521 0.588 0.000 0.000 0.408 0.004
#> SRR1521411     1  0.0162     0.9336 0.996 0.000 0.000 0.000 0.004
#> SRR1521412     5  0.3413     0.7877 0.124 0.000 0.000 0.044 0.832
#> SRR1521414     5  0.0955     0.9104 0.028 0.000 0.000 0.004 0.968
#> SRR1521413     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521415     5  0.0955     0.9104 0.028 0.000 0.000 0.004 0.968
#> SRR1521416     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521420     1  0.6518     0.2396 0.520 0.000 0.012 0.308 0.160
#> SRR1521421     5  0.7588    -0.0425 0.328 0.000 0.040 0.296 0.336
#> SRR1521422     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.0963     0.8061 0.036 0.000 0.000 0.964 0.000
#> SRR1521423     1  0.0000     0.9352 1.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.1043     0.8036 0.040 0.000 0.000 0.960 0.000
#> SRR1521427     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     4  0.2389     0.7301 0.116 0.000 0.000 0.880 0.004
#> SRR1521428     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521429     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     3  0.3876     0.4934 0.000 0.316 0.684 0.000 0.000
#> SRR1521437     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.0000     0.8301 0.000 0.000 1.000 0.000 0.000
#> SRR1521439     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9257 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9257 0.000 1.000 0.000 0.000 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
#> SRR1521352     4  0.0260    0.87453 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR1521353     3  0.0260    0.96897 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521354     3  0.0260    0.96897 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521355     1  0.0405    0.98885 0.988 0.000 0.000 0.008 0.004 0.000
#> SRR1521356     1  0.0146    0.99541 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521357     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.1387    0.89838 0.000 0.932 0.000 0.000 0.000 0.068
#> SRR1521359     6  0.4512    0.62010 0.012 0.000 0.008 0.192 0.060 0.728
#> SRR1521360     6  0.3198    0.82727 0.000 0.000 0.260 0.000 0.000 0.740
#> SRR1521361     6  0.3198    0.82727 0.000 0.000 0.260 0.000 0.000 0.740
#> SRR1521362     4  0.1826    0.83742 0.004 0.000 0.000 0.924 0.052 0.020
#> SRR1521363     6  0.1285    0.70544 0.000 0.052 0.004 0.000 0.000 0.944
#> SRR1521364     3  0.1765    0.85033 0.000 0.000 0.904 0.000 0.000 0.096
#> SRR1521365     2  0.0790    0.90465 0.000 0.968 0.000 0.000 0.000 0.032
#> SRR1521366     3  0.0458    0.95755 0.000 0.000 0.984 0.000 0.000 0.016
#> SRR1521368     2  0.2135    0.87052 0.000 0.872 0.000 0.000 0.000 0.128
#> SRR1521369     3  0.0000    0.97049 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521370     3  0.0363    0.96755 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521371     1  0.0146    0.99541 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521372     6  0.3235    0.73177 0.000 0.000 0.052 0.000 0.128 0.820
#> SRR1521373     2  0.3578    0.66954 0.000 0.660 0.000 0.000 0.000 0.340
#> SRR1521374     2  0.1556    0.89485 0.000 0.920 0.000 0.000 0.000 0.080
#> SRR1521375     2  0.3578    0.66954 0.000 0.660 0.000 0.000 0.000 0.340
#> SRR1521376     6  0.3198    0.82194 0.000 0.000 0.260 0.000 0.000 0.740
#> SRR1521377     3  0.0000    0.97049 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.0146    0.97008 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521379     6  0.2219    0.82862 0.000 0.000 0.136 0.000 0.000 0.864
#> SRR1521380     3  0.0000    0.97049 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521381     6  0.3536    0.83218 0.004 0.000 0.252 0.008 0.000 0.736
#> SRR1521382     2  0.1610    0.89342 0.000 0.916 0.000 0.000 0.000 0.084
#> SRR1521383     4  0.7042    0.16102 0.116 0.000 0.000 0.440 0.284 0.160
#> SRR1521384     2  0.1007    0.90294 0.000 0.956 0.000 0.000 0.000 0.044
#> SRR1521385     4  0.0291    0.87505 0.000 0.000 0.000 0.992 0.004 0.004
#> SRR1521387     2  0.3956    0.69791 0.000 0.684 0.024 0.000 0.000 0.292
#> SRR1521386     3  0.0260    0.96897 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521388     4  0.0405    0.87330 0.004 0.000 0.000 0.988 0.000 0.008
#> SRR1521389     4  0.0405    0.87330 0.004 0.000 0.000 0.988 0.000 0.008
#> SRR1521390     4  0.0260    0.87375 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR1521391     3  0.3133    0.63790 0.000 0.000 0.780 0.000 0.008 0.212
#> SRR1521392     5  0.0291    0.86653 0.000 0.000 0.000 0.004 0.992 0.004
#> SRR1521393     5  0.0146    0.86561 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521394     5  0.0146    0.86561 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521395     5  0.0146    0.86561 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521396     5  0.0146    0.86561 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR1521397     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521398     1  0.0260    0.99120 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR1521399     5  0.0146    0.86672 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR1521400     5  0.2046    0.84896 0.000 0.000 0.000 0.060 0.908 0.032
#> SRR1521401     5  0.2614    0.84228 0.044 0.000 0.000 0.060 0.884 0.012
#> SRR1521403     5  0.5304    0.51406 0.008 0.000 0.012 0.072 0.600 0.308
#> SRR1521402     5  0.0146    0.86672 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR1521405     4  0.0260    0.87375 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR1521406     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521404     4  0.0993    0.86464 0.000 0.000 0.000 0.964 0.024 0.012
#> SRR1521408     3  0.0260    0.96897 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR1521407     6  0.3536    0.83218 0.004 0.000 0.252 0.008 0.000 0.736
#> SRR1521409     6  0.2474    0.80401 0.000 0.000 0.080 0.040 0.000 0.880
#> SRR1521410     4  0.3767    0.64008 0.260 0.000 0.000 0.720 0.004 0.016
#> SRR1521411     1  0.0146    0.99541 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR1521412     5  0.5798    0.66618 0.128 0.000 0.000 0.096 0.644 0.132
#> SRR1521414     5  0.3236    0.83449 0.048 0.000 0.000 0.060 0.852 0.040
#> SRR1521413     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521415     5  0.3236    0.83449 0.048 0.000 0.000 0.060 0.852 0.040
#> SRR1521416     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521417     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521418     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521419     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521420     4  0.6210    0.32049 0.244 0.000 0.000 0.496 0.240 0.020
#> SRR1521421     5  0.7057    0.28288 0.156 0.000 0.000 0.276 0.444 0.124
#> SRR1521422     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521424     4  0.0291    0.87505 0.000 0.000 0.000 0.992 0.004 0.004
#> SRR1521423     1  0.0000    0.99735 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR1521426     4  0.0146    0.87456 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR1521427     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     4  0.1584    0.84078 0.064 0.000 0.000 0.928 0.000 0.008
#> SRR1521428     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.0000    0.97049 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521429     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000    0.97049 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521433     3  0.0363    0.96520 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521434     3  0.0363    0.96520 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521435     3  0.0363    0.96520 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR1521436     2  0.6083    0.00182 0.000 0.396 0.300 0.000 0.000 0.304
#> SRR1521437     2  0.1501    0.89613 0.000 0.924 0.000 0.000 0.000 0.076
#> SRR1521431     3  0.0000    0.97049 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521438     3  0.0000    0.97049 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521439     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.1444    0.89712 0.000 0.928 0.000 0.000 0.000 0.072
#> SRR1521445     2  0.0000    0.90731 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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

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

collect_plots(res)

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 1.000           1.000       1.000         0.4848 0.516   0.516
#> 3 3 1.000           0.983       0.994         0.2846 0.818   0.661
#> 4 4 0.873           0.839       0.931         0.1978 0.837   0.585
#> 5 5 0.837           0.868       0.917         0.0507 0.888   0.606
#> 6 6 0.840           0.758       0.868         0.0341 0.962   0.827

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
#> SRR1521352     1   0.000      1.000 1.00 0.00
#> SRR1521353     1   0.000      1.000 1.00 0.00
#> SRR1521354     1   0.000      1.000 1.00 0.00
#> SRR1521355     1   0.000      1.000 1.00 0.00
#> SRR1521356     1   0.000      1.000 1.00 0.00
#> SRR1521357     2   0.000      0.999 0.00 1.00
#> SRR1521358     2   0.000      0.999 0.00 1.00
#> SRR1521359     1   0.000      1.000 1.00 0.00
#> SRR1521360     1   0.000      1.000 1.00 0.00
#> SRR1521361     1   0.000      1.000 1.00 0.00
#> SRR1521362     1   0.000      1.000 1.00 0.00
#> SRR1521363     2   0.000      0.999 0.00 1.00
#> SRR1521364     2   0.000      0.999 0.00 1.00
#> SRR1521365     2   0.000      0.999 0.00 1.00
#> SRR1521366     2   0.000      0.999 0.00 1.00
#> SRR1521368     2   0.000      0.999 0.00 1.00
#> SRR1521369     2   0.141      0.980 0.02 0.98
#> SRR1521370     1   0.000      1.000 1.00 0.00
#> SRR1521371     1   0.000      1.000 1.00 0.00
#> SRR1521372     1   0.000      1.000 1.00 0.00
#> SRR1521373     2   0.000      0.999 0.00 1.00
#> SRR1521374     2   0.000      0.999 0.00 1.00
#> SRR1521375     2   0.000      0.999 0.00 1.00
#> SRR1521376     2   0.000      0.999 0.00 1.00
#> SRR1521377     2   0.000      0.999 0.00 1.00
#> SRR1521378     1   0.000      1.000 1.00 0.00
#> SRR1521379     2   0.000      0.999 0.00 1.00
#> SRR1521380     2   0.000      0.999 0.00 1.00
#> SRR1521381     1   0.000      1.000 1.00 0.00
#> SRR1521382     2   0.000      0.999 0.00 1.00
#> SRR1521383     1   0.000      1.000 1.00 0.00
#> SRR1521384     2   0.000      0.999 0.00 1.00
#> SRR1521385     1   0.000      1.000 1.00 0.00
#> SRR1521387     2   0.000      0.999 0.00 1.00
#> SRR1521386     1   0.000      1.000 1.00 0.00
#> SRR1521388     1   0.000      1.000 1.00 0.00
#> SRR1521389     1   0.000      1.000 1.00 0.00
#> SRR1521390     1   0.000      1.000 1.00 0.00
#> SRR1521391     1   0.000      1.000 1.00 0.00
#> SRR1521392     1   0.000      1.000 1.00 0.00
#> SRR1521393     1   0.000      1.000 1.00 0.00
#> SRR1521394     1   0.000      1.000 1.00 0.00
#> SRR1521395     1   0.000      1.000 1.00 0.00
#> SRR1521396     1   0.000      1.000 1.00 0.00
#> SRR1521397     1   0.000      1.000 1.00 0.00
#> SRR1521398     1   0.000      1.000 1.00 0.00
#> SRR1521399     1   0.000      1.000 1.00 0.00
#> SRR1521400     1   0.000      1.000 1.00 0.00
#> SRR1521401     1   0.000      1.000 1.00 0.00
#> SRR1521403     1   0.000      1.000 1.00 0.00
#> SRR1521402     1   0.000      1.000 1.00 0.00
#> SRR1521405     1   0.000      1.000 1.00 0.00
#> SRR1521406     1   0.000      1.000 1.00 0.00
#> SRR1521404     1   0.000      1.000 1.00 0.00
#> SRR1521408     1   0.000      1.000 1.00 0.00
#> SRR1521407     1   0.000      1.000 1.00 0.00
#> SRR1521409     1   0.000      1.000 1.00 0.00
#> SRR1521410     1   0.000      1.000 1.00 0.00
#> SRR1521411     1   0.000      1.000 1.00 0.00
#> SRR1521412     1   0.000      1.000 1.00 0.00
#> SRR1521414     1   0.000      1.000 1.00 0.00
#> SRR1521413     1   0.000      1.000 1.00 0.00
#> SRR1521415     1   0.000      1.000 1.00 0.00
#> SRR1521416     1   0.000      1.000 1.00 0.00
#> SRR1521417     1   0.000      1.000 1.00 0.00
#> SRR1521418     1   0.000      1.000 1.00 0.00
#> SRR1521419     1   0.000      1.000 1.00 0.00
#> SRR1521420     1   0.000      1.000 1.00 0.00
#> SRR1521421     1   0.000      1.000 1.00 0.00
#> SRR1521422     1   0.000      1.000 1.00 0.00
#> SRR1521424     1   0.000      1.000 1.00 0.00
#> SRR1521423     1   0.000      1.000 1.00 0.00
#> SRR1521426     1   0.000      1.000 1.00 0.00
#> SRR1521427     2   0.000      0.999 0.00 1.00
#> SRR1521425     1   0.000      1.000 1.00 0.00
#> SRR1521428     2   0.000      0.999 0.00 1.00
#> SRR1521430     2   0.000      0.999 0.00 1.00
#> SRR1521429     2   0.000      0.999 0.00 1.00
#> SRR1521432     2   0.000      0.999 0.00 1.00
#> SRR1521433     2   0.000      0.999 0.00 1.00
#> SRR1521434     2   0.000      0.999 0.00 1.00
#> SRR1521435     2   0.000      0.999 0.00 1.00
#> SRR1521436     2   0.000      0.999 0.00 1.00
#> SRR1521437     2   0.000      0.999 0.00 1.00
#> SRR1521431     2   0.000      0.999 0.00 1.00
#> SRR1521438     2   0.000      0.999 0.00 1.00
#> SRR1521439     2   0.000      0.999 0.00 1.00
#> SRR1521440     2   0.000      0.999 0.00 1.00
#> SRR1521441     2   0.000      0.999 0.00 1.00
#> SRR1521443     2   0.000      0.999 0.00 1.00
#> SRR1521442     2   0.000      0.999 0.00 1.00
#> SRR1521444     2   0.000      0.999 0.00 1.00
#> SRR1521445     2   0.000      0.999 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
#> SRR1521352     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521353     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521354     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521355     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521356     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521357     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521358     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521359     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521360     3   0.236      0.906 0.072 0.00 0.928
#> SRR1521361     1   0.304      0.883 0.896 0.00 0.104
#> SRR1521362     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521363     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521364     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521365     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521366     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521368     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521369     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521370     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521371     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521372     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521373     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521374     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521375     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521376     2   0.619      0.273 0.000 0.58 0.420
#> SRR1521377     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521378     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521379     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521380     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521381     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521382     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521383     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521384     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521385     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521387     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521386     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521388     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521389     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521390     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521391     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521392     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521393     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521394     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521395     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521396     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521397     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521398     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521399     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521400     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521401     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521403     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521402     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521405     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521406     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521404     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521408     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521407     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521409     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521410     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521411     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521412     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521414     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521413     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521415     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521416     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521417     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521418     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521419     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521420     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521421     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521422     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521424     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521423     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521426     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521427     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521425     1   0.000      0.998 1.000 0.00 0.000
#> SRR1521428     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521430     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521429     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521432     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521433     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521434     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521435     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521436     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521437     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521431     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521438     3   0.000      0.995 0.000 0.00 1.000
#> SRR1521439     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521440     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521441     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521443     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521442     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521444     2   0.000      0.982 0.000 1.00 0.000
#> SRR1521445     2   0.000      0.982 0.000 1.00 0.000

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>            class entropy silhouette    p1    p2    p3    p4
#> SRR1521352     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521353     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521354     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521355     4  0.1389     0.8412 0.048 0.000 0.000 0.952
#> SRR1521356     4  0.1940     0.8265 0.076 0.000 0.000 0.924
#> SRR1521357     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521358     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521359     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521360     3  0.0376     0.9656 0.004 0.000 0.992 0.004
#> SRR1521361     3  0.5066     0.6872 0.120 0.000 0.768 0.112
#> SRR1521362     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521363     2  0.0188     0.9970 0.004 0.996 0.000 0.000
#> SRR1521364     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521365     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521366     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521368     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521369     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521370     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521371     1  0.3764     0.7176 0.784 0.000 0.000 0.216
#> SRR1521372     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521373     2  0.0188     0.9970 0.004 0.996 0.000 0.000
#> SRR1521374     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521375     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521376     3  0.4018     0.7107 0.004 0.224 0.772 0.000
#> SRR1521377     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521378     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521379     2  0.0376     0.9937 0.004 0.992 0.000 0.004
#> SRR1521380     3  0.0188     0.9707 0.004 0.000 0.996 0.000
#> SRR1521381     4  0.2222     0.8195 0.016 0.000 0.060 0.924
#> SRR1521382     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521383     4  0.1022     0.8469 0.032 0.000 0.000 0.968
#> SRR1521384     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521385     4  0.0188     0.8534 0.004 0.000 0.000 0.996
#> SRR1521387     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521386     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521388     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521389     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521390     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521391     1  0.0707     0.8124 0.980 0.000 0.020 0.000
#> SRR1521392     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521393     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521394     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521395     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521396     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521397     4  0.4776     0.3669 0.376 0.000 0.000 0.624
#> SRR1521398     4  0.2216     0.8137 0.092 0.000 0.000 0.908
#> SRR1521399     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521400     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521401     1  0.0336     0.8286 0.992 0.000 0.000 0.008
#> SRR1521403     1  0.2216     0.8083 0.908 0.000 0.000 0.092
#> SRR1521402     1  0.0188     0.8288 0.996 0.000 0.000 0.004
#> SRR1521405     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521406     1  0.4356     0.6269 0.708 0.000 0.000 0.292
#> SRR1521404     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521408     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521407     4  0.6626     0.2290 0.364 0.000 0.092 0.544
#> SRR1521409     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521410     4  0.2469     0.7990 0.108 0.000 0.000 0.892
#> SRR1521411     1  0.4776     0.4769 0.624 0.000 0.000 0.376
#> SRR1521412     1  0.3486     0.7440 0.812 0.000 0.000 0.188
#> SRR1521414     1  0.2081     0.8119 0.916 0.000 0.000 0.084
#> SRR1521413     1  0.4679     0.5279 0.648 0.000 0.000 0.352
#> SRR1521415     1  0.2081     0.8119 0.916 0.000 0.000 0.084
#> SRR1521416     1  0.4948     0.2840 0.560 0.000 0.000 0.440
#> SRR1521417     1  0.4679     0.5272 0.648 0.000 0.000 0.352
#> SRR1521418     1  0.4761     0.4848 0.628 0.000 0.000 0.372
#> SRR1521419     4  0.4072     0.6131 0.252 0.000 0.000 0.748
#> SRR1521420     4  0.1637     0.8355 0.060 0.000 0.000 0.940
#> SRR1521421     4  0.4992    -0.0145 0.476 0.000 0.000 0.524
#> SRR1521422     4  0.4977     0.0678 0.460 0.000 0.000 0.540
#> SRR1521424     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521423     4  0.4948     0.1478 0.440 0.000 0.000 0.560
#> SRR1521426     4  0.0000     0.8537 0.000 0.000 0.000 1.000
#> SRR1521427     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521425     4  0.0469     0.8522 0.012 0.000 0.000 0.988
#> SRR1521428     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521430     3  0.0188     0.9707 0.004 0.000 0.996 0.000
#> SRR1521429     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521432     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521433     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521434     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521435     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521436     2  0.0188     0.9970 0.004 0.996 0.000 0.000
#> SRR1521437     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521431     3  0.0000     0.9725 0.000 0.000 1.000 0.000
#> SRR1521438     3  0.1398     0.9375 0.004 0.040 0.956 0.000
#> SRR1521439     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521440     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521441     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521443     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521442     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521444     2  0.0000     0.9993 0.000 1.000 0.000 0.000
#> SRR1521445     2  0.0000     0.9993 0.000 1.000 0.000 0.000

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>            class entropy silhouette    p1    p2    p3    p4    p5
#> SRR1521352     4  0.4030      0.583 0.352 0.000 0.000 0.648 0.000
#> SRR1521353     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521354     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521355     1  0.1043      0.805 0.960 0.000 0.000 0.040 0.000
#> SRR1521356     1  0.2293      0.793 0.900 0.000 0.000 0.084 0.016
#> SRR1521357     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521358     2  0.0162      0.991 0.000 0.996 0.000 0.004 0.000
#> SRR1521359     1  0.3561      0.575 0.740 0.000 0.000 0.260 0.000
#> SRR1521360     3  0.3527      0.788 0.148 0.000 0.820 0.028 0.004
#> SRR1521361     1  0.4794      0.535 0.684 0.000 0.276 0.020 0.020
#> SRR1521362     4  0.1571      0.888 0.060 0.000 0.000 0.936 0.004
#> SRR1521363     2  0.0798      0.978 0.000 0.976 0.000 0.016 0.008
#> SRR1521364     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521365     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521366     3  0.0162      0.962 0.000 0.000 0.996 0.000 0.004
#> SRR1521368     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521370     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521371     1  0.2732      0.790 0.840 0.000 0.000 0.000 0.160
#> SRR1521372     5  0.3209      0.832 0.180 0.000 0.000 0.008 0.812
#> SRR1521373     2  0.0798      0.978 0.000 0.976 0.000 0.016 0.008
#> SRR1521374     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521376     3  0.3940      0.718 0.000 0.208 0.768 0.016 0.008
#> SRR1521377     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521378     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521379     2  0.2518      0.901 0.016 0.896 0.000 0.080 0.008
#> SRR1521380     3  0.0404      0.958 0.000 0.000 0.988 0.012 0.000
#> SRR1521381     4  0.2673      0.866 0.060 0.000 0.044 0.892 0.004
#> SRR1521382     2  0.0162      0.991 0.000 0.996 0.000 0.000 0.004
#> SRR1521383     1  0.2966      0.718 0.816 0.000 0.000 0.184 0.000
#> SRR1521384     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521385     1  0.4297     -0.039 0.528 0.000 0.000 0.472 0.000
#> SRR1521387     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521386     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521388     4  0.1768      0.891 0.072 0.000 0.000 0.924 0.004
#> SRR1521389     4  0.2280      0.883 0.120 0.000 0.000 0.880 0.000
#> SRR1521390     4  0.1638      0.889 0.064 0.000 0.000 0.932 0.004
#> SRR1521391     5  0.1651      0.921 0.036 0.000 0.012 0.008 0.944
#> SRR1521392     5  0.0609      0.927 0.020 0.000 0.000 0.000 0.980
#> SRR1521393     5  0.0771      0.927 0.020 0.000 0.000 0.004 0.976
#> SRR1521394     5  0.0771      0.927 0.020 0.000 0.000 0.004 0.976
#> SRR1521395     5  0.0771      0.927 0.020 0.000 0.000 0.004 0.976
#> SRR1521396     5  0.0771      0.927 0.020 0.000 0.000 0.004 0.976
#> SRR1521397     1  0.5064      0.645 0.680 0.000 0.000 0.232 0.088
#> SRR1521398     1  0.4138      0.583 0.708 0.000 0.000 0.276 0.016
#> SRR1521399     5  0.3366      0.795 0.212 0.000 0.000 0.004 0.784
#> SRR1521400     5  0.0865      0.928 0.024 0.000 0.000 0.004 0.972
#> SRR1521401     5  0.2563      0.890 0.120 0.000 0.000 0.008 0.872
#> SRR1521403     5  0.2903      0.874 0.048 0.000 0.000 0.080 0.872
#> SRR1521402     5  0.2629      0.877 0.136 0.000 0.000 0.004 0.860
#> SRR1521405     4  0.1638      0.889 0.064 0.000 0.000 0.932 0.004
#> SRR1521406     1  0.2843      0.803 0.848 0.000 0.000 0.008 0.144
#> SRR1521404     4  0.1851      0.891 0.088 0.000 0.000 0.912 0.000
#> SRR1521408     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521407     1  0.5752      0.557 0.668 0.000 0.116 0.192 0.024
#> SRR1521409     4  0.2179      0.889 0.100 0.000 0.000 0.896 0.004
#> SRR1521410     1  0.1774      0.806 0.932 0.000 0.000 0.052 0.016
#> SRR1521411     1  0.1792      0.820 0.916 0.000 0.000 0.000 0.084
#> SRR1521412     1  0.2424      0.804 0.868 0.000 0.000 0.000 0.132
#> SRR1521414     1  0.3550      0.690 0.760 0.000 0.000 0.004 0.236
#> SRR1521413     1  0.2127      0.817 0.892 0.000 0.000 0.000 0.108
#> SRR1521415     1  0.3579      0.688 0.756 0.000 0.000 0.004 0.240
#> SRR1521416     1  0.1270      0.821 0.948 0.000 0.000 0.000 0.052
#> SRR1521417     1  0.2074      0.817 0.896 0.000 0.000 0.000 0.104
#> SRR1521418     1  0.1410      0.822 0.940 0.000 0.000 0.000 0.060
#> SRR1521419     1  0.1106      0.817 0.964 0.000 0.000 0.012 0.024
#> SRR1521420     1  0.2852      0.718 0.828 0.000 0.000 0.172 0.000
#> SRR1521421     1  0.0566      0.813 0.984 0.000 0.000 0.004 0.012
#> SRR1521422     1  0.2249      0.821 0.896 0.000 0.000 0.008 0.096
#> SRR1521424     4  0.3143      0.815 0.204 0.000 0.000 0.796 0.000
#> SRR1521423     1  0.1638      0.823 0.932 0.000 0.000 0.004 0.064
#> SRR1521426     4  0.4045      0.572 0.356 0.000 0.000 0.644 0.000
#> SRR1521427     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521425     1  0.3177      0.680 0.792 0.000 0.000 0.208 0.000
#> SRR1521428     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521430     3  0.0833      0.951 0.000 0.004 0.976 0.016 0.004
#> SRR1521429     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521432     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521433     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521434     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521435     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521436     2  0.0798      0.978 0.000 0.976 0.000 0.016 0.008
#> SRR1521437     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521431     3  0.0000      0.964 0.000 0.000 1.000 0.000 0.000
#> SRR1521438     3  0.3379      0.797 0.000 0.148 0.828 0.016 0.008
#> SRR1521439     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521440     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.993 0.000 1.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.993 0.000 1.000 0.000 0.000 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
#> SRR1521352     6  0.5700     -0.140 0.160 0.000 0.000 0.404 0.000 0.436
#> SRR1521353     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521354     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521355     1  0.1765      0.820 0.924 0.000 0.000 0.024 0.000 0.052
#> SRR1521356     1  0.2744      0.794 0.864 0.000 0.000 0.064 0.000 0.072
#> SRR1521357     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521358     2  0.0547      0.973 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR1521359     6  0.5180      0.484 0.256 0.000 0.000 0.124 0.004 0.616
#> SRR1521360     3  0.5949     -0.146 0.152 0.000 0.452 0.000 0.012 0.384
#> SRR1521361     6  0.6547      0.353 0.244 0.000 0.284 0.000 0.032 0.440
#> SRR1521362     4  0.0291      0.685 0.004 0.000 0.000 0.992 0.000 0.004
#> SRR1521363     2  0.1663      0.923 0.000 0.912 0.000 0.000 0.000 0.088
#> SRR1521364     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521365     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521366     3  0.0260      0.917 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR1521368     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521369     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521370     3  0.0291      0.918 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR1521371     1  0.4513      0.723 0.740 0.000 0.000 0.028 0.076 0.156
#> SRR1521372     5  0.5698      0.347 0.400 0.000 0.000 0.020 0.484 0.096
#> SRR1521373     2  0.1663      0.923 0.000 0.912 0.000 0.000 0.000 0.088
#> SRR1521374     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521375     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521376     3  0.5496      0.432 0.000 0.240 0.600 0.012 0.000 0.148
#> SRR1521377     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521378     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521379     6  0.5306      0.201 0.020 0.324 0.000 0.048 0.012 0.596
#> SRR1521380     3  0.0547      0.912 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR1521381     4  0.5891      0.333 0.012 0.000 0.012 0.516 0.108 0.352
#> SRR1521382     2  0.1444      0.936 0.000 0.928 0.000 0.000 0.000 0.072
#> SRR1521383     1  0.3374      0.707 0.772 0.000 0.000 0.208 0.000 0.020
#> SRR1521384     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521385     4  0.5716      0.164 0.304 0.000 0.000 0.504 0.000 0.192
#> SRR1521387     2  0.0146      0.981 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1521386     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521388     4  0.1082      0.676 0.040 0.000 0.000 0.956 0.000 0.004
#> SRR1521389     4  0.1700      0.656 0.080 0.000 0.000 0.916 0.000 0.004
#> SRR1521390     4  0.0622      0.681 0.012 0.000 0.000 0.980 0.000 0.008
#> SRR1521391     5  0.1710      0.824 0.028 0.000 0.020 0.000 0.936 0.016
#> SRR1521392     5  0.0717      0.833 0.016 0.000 0.000 0.000 0.976 0.008
#> SRR1521393     5  0.1549      0.825 0.020 0.000 0.000 0.000 0.936 0.044
#> SRR1521394     5  0.1168      0.830 0.016 0.000 0.000 0.000 0.956 0.028
#> SRR1521395     5  0.0993      0.834 0.024 0.000 0.000 0.000 0.964 0.012
#> SRR1521396     5  0.0914      0.832 0.016 0.000 0.000 0.000 0.968 0.016
#> SRR1521397     1  0.5757      0.557 0.624 0.000 0.000 0.180 0.048 0.148
#> SRR1521398     1  0.5689      0.414 0.592 0.000 0.000 0.140 0.024 0.244
#> SRR1521399     5  0.5161      0.445 0.376 0.000 0.000 0.004 0.540 0.080
#> SRR1521400     5  0.0909      0.826 0.012 0.000 0.000 0.000 0.968 0.020
#> SRR1521401     5  0.1524      0.824 0.060 0.000 0.000 0.000 0.932 0.008
#> SRR1521403     5  0.4368      0.701 0.060 0.000 0.000 0.164 0.748 0.028
#> SRR1521402     5  0.4503      0.655 0.240 0.000 0.000 0.000 0.680 0.080
#> SRR1521405     4  0.0405      0.683 0.004 0.000 0.000 0.988 0.000 0.008
#> SRR1521406     1  0.3101      0.783 0.860 0.000 0.000 0.044 0.036 0.060
#> SRR1521404     4  0.2070      0.668 0.012 0.000 0.000 0.896 0.000 0.092
#> SRR1521408     3  0.0000      0.921 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR1521407     6  0.6415      0.496 0.208 0.000 0.092 0.096 0.016 0.588
#> SRR1521409     4  0.5235      0.273 0.028 0.000 0.000 0.500 0.040 0.432
#> SRR1521410     1  0.2776      0.790 0.860 0.000 0.000 0.052 0.000 0.088
#> SRR1521411     1  0.1787      0.809 0.920 0.000 0.000 0.004 0.008 0.068
#> SRR1521412     1  0.4127      0.547 0.680 0.000 0.000 0.000 0.036 0.284
#> SRR1521414     1  0.3441      0.725 0.832 0.000 0.000 0.020 0.072 0.076
#> SRR1521413     1  0.1434      0.823 0.948 0.000 0.000 0.024 0.008 0.020
#> SRR1521415     1  0.2888      0.746 0.860 0.000 0.000 0.004 0.068 0.068
#> SRR1521416     1  0.0937      0.813 0.960 0.000 0.000 0.000 0.000 0.040
#> SRR1521417     1  0.1616      0.819 0.940 0.000 0.000 0.028 0.012 0.020
#> SRR1521418     1  0.1007      0.811 0.956 0.000 0.000 0.000 0.000 0.044
#> SRR1521419     1  0.0972      0.820 0.964 0.000 0.000 0.008 0.000 0.028
#> SRR1521420     6  0.5303      0.492 0.280 0.000 0.000 0.096 0.016 0.608
#> SRR1521421     1  0.2730      0.698 0.808 0.000 0.000 0.000 0.000 0.192
#> SRR1521422     1  0.2407      0.813 0.892 0.000 0.000 0.048 0.004 0.056
#> SRR1521424     4  0.4585      0.529 0.116 0.000 0.000 0.692 0.000 0.192
#> SRR1521423     1  0.1225      0.823 0.952 0.000 0.000 0.012 0.000 0.036
#> SRR1521426     4  0.5768      0.167 0.200 0.000 0.000 0.492 0.000 0.308
#> SRR1521427     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521425     1  0.3958      0.699 0.764 0.000 0.000 0.128 0.000 0.108
#> SRR1521428     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521430     3  0.1588      0.867 0.000 0.004 0.924 0.000 0.000 0.072
#> SRR1521429     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521432     3  0.0146      0.920 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521433     3  0.0146      0.920 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521434     3  0.0146      0.920 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521435     3  0.0146      0.920 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521436     2  0.1814      0.913 0.000 0.900 0.000 0.000 0.000 0.100
#> SRR1521437     2  0.0632      0.970 0.000 0.976 0.000 0.000 0.000 0.024
#> SRR1521431     3  0.0146      0.920 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR1521438     3  0.4328      0.611 0.000 0.180 0.720 0.000 0.000 0.100
#> SRR1521439     2  0.0146      0.981 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR1521440     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521441     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521443     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521442     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521444     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR1521445     2  0.0000      0.982 0.000 1.000 0.000 0.000 0.000 0.000

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

consensus_heatmap(res, k = 2)

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

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