Contents

1 Intro

ClustAll is an R package originally developed for patient stratification in complex diseases.

ClustAll constitutes a stratification framework aim at identifying patient subgroups while addressing the most common challenges found when dealing with clinical data. The idea of this pipeline is that if a stratification is solid, it should be possible to arrive at such stratification through different clustering methods. To compute patient stratification, ClustAll combines different distance metrics (Correlation based-distance and Gower distance), as well as different clustering methods (K-Means, K-Medoids and H-Clust).

Furthermore, ClustAll:
- Allows to work with data with missing values, mixed data and correlated variables.
- Provides more than a single stratification solution, unlike other packages.
- It is population-based robust: ClustAll performs a population-based robustness analysis for each candidate stratification using bootstrapping. This analysis ensures that non-robust stratifications are excluded.
- It is parameter-based robust: The selection of representative stratifications enables the preservation of those stratifications that demonstrate parameter-based robustness: consistency when depth, distance metrics or clustering methods are altered.

In addition, the package offers functions to:
- Validate the output using the true labels. - Show the patient flow between clusters if two candidate stratifications are compared.

2 Setup

First, install the ClustAll package if is not already installed.

library(ClustAll)

3 Examples on how to use ClustAll on Public Data Sets.

3.1 Breast Cancer Wisconsin (Diagnostic)

Input data for this example can be found on doi: 10.24432/C5DW2B

Features are computed from a digitized image of a fine needle aspirate (FNA) of a breast mass. They describe characteristics of the cell nuclei present in the image. From 569 patients.

This dataset contains 30 variables (10x3), which consist of ten real-valued features are computed for each cell nucleus:

a) radius (mean of distances from center to points on the perimeter)
b) texture (standard deviation of gray-scale values)
c) perimeter
d) area
e) smoothness (local variation in radius lengths)
f) compactness (perimeter^2 / area - 1.0)
g) concavity (severity of concave portions of the contour)
h) concave points (number of concave portions of the contour)
i) symmetry 
j) fractal dimension ("coastline approximation" - 1)

In addition to the patient ID and the Diagnose (Diagnosis (M = malignant, B = benign)).

3.1.1 Loading and preparing data

data("BreastCancerWisconsin", package = "ClustAll") # load example data
# remove patients ID, as it is not a clinical variable
data_use <- subset(wdbc,select=-ID)
str(data_use)
#> 'data.frame':    569 obs. of  31 variables:
#>  $ Diagnosis         : chr  "M" "M" "M" "M" ...
#>  $ radius1           : num  18 20.6 19.7 11.4 20.3 ...
#>  $ texture1          : num  10.4 17.8 21.2 20.4 14.3 ...
#>  $ perimeter1        : num  122.8 132.9 130 77.6 135.1 ...
#>  $ area1             : num  1001 1326 1203 386 1297 ...
#>  $ smoothness1       : num  0.1184 0.0847 0.1096 0.1425 0.1003 ...
#>  $ compactness1      : num  0.2776 0.0786 0.1599 0.2839 0.1328 ...
#>  $ concavity1        : num  0.3001 0.0869 0.1974 0.2414 0.198 ...
#>  $ concave_points1   : num  0.1471 0.0702 0.1279 0.1052 0.1043 ...
#>  $ symmetry1         : num  0.242 0.181 0.207 0.26 0.181 ...
#>  $ fractal_dimension1: num  0.0787 0.0567 0.06 0.0974 0.0588 ...
#>  $ radius2           : num  1.095 0.543 0.746 0.496 0.757 ...
#>  $ texture2          : num  0.905 0.734 0.787 1.156 0.781 ...
#>  $ perimeter2        : num  8.59 3.4 4.58 3.44 5.44 ...
#>  $ area2             : num  153.4 74.1 94 27.2 94.4 ...
#>  $ smoothness2       : num  0.0064 0.00522 0.00615 0.00911 0.01149 ...
#>  $ compactness2      : num  0.049 0.0131 0.0401 0.0746 0.0246 ...
#>  $ concavity2        : num  0.0537 0.0186 0.0383 0.0566 0.0569 ...
#>  $ concave_points2   : num  0.0159 0.0134 0.0206 0.0187 0.0188 ...
#>  $ symmetry2         : num  0.03 0.0139 0.0225 0.0596 0.0176 ...
#>  $ fractal_dimension2: num  0.00619 0.00353 0.00457 0.00921 0.00511 ...
#>  $ radius3           : num  25.4 25 23.6 14.9 22.5 ...
#>  $ texture3          : num  17.3 23.4 25.5 26.5 16.7 ...
#>  $ perimeter3        : num  184.6 158.8 152.5 98.9 152.2 ...
#>  $ area3             : num  2019 1956 1709 568 1575 ...
#>  $ smoothness3       : num  0.162 0.124 0.144 0.21 0.137 ...
#>  $ compactness3      : num  0.666 0.187 0.424 0.866 0.205 ...
#>  $ concavity3        : num  0.712 0.242 0.45 0.687 0.4 ...
#>  $ concave_points3   : num  0.265 0.186 0.243 0.258 0.163 ...
#>  $ symmetry3         : num  0.46 0.275 0.361 0.664 0.236 ...
#>  $ fractal_dimension3: num  0.1189 0.089 0.0876 0.173 0.0768 ...
3.1.1.0.1 createClustAll

This function creates the class ClustAllObject. It is an S4 object designed to apply the ClustAll algorithm and store the main results.

The usage and arguments are the following:
data_use - Data Frame with the original dataset. It may contain missing values (NAs).
nImputation - Numeric value. Number of imputations to be computed in case there original dataset contains NAs.
dataImputed - mids object created with mice R package. The data used to compute the imputation and the data_used using must be the same.

There are 3 possible scenarios:
- The data does not contain NAs. nImputation & dataImputed are not required
- The data contains NAs and the imputations are computed within ClustAll framework (using mice package). nImputations is required.
- The data contains NAs and the imputed data set (mid class) . dataImputed is required.

3.1.2 a) Workflow with a dataset with no missing values

3.1.2.0.1 createClustAll
obj_noNA <- createClustAll(data = data_use, colValidation = "Diagnosis",
                            nImputation = NULL, dataImputed = NULL)
#> The dataset contains character values.
#> They are converted to categorical (more than one class) or to binary (one class).
#> Before continuing, check that the transformation has been processed correctly.
#> 
#> ClustALL object created successfully. You can use runClustAll.


3.1.2.0.2 runClustAll method

This function computes the ClustAll algorithm.

The usage and arguments are the following:
Object - ClustAllObject-class object. threads - Numeric value. Number of cores to use (for parallel computing).
simplify - Logical value. If TRUE only 1 out of 4 depths of the dendrogram are considered; if FALSE all possible depths of the dendrogram are considered.

obj_noNA1 <- runClustAll(Object = obj_noNA, threads = 8, simplify = FALSE)
#>       ______ __              __   ___     __     __
#>      / ____// /__  __ _____ / /_ /   |   / /    / /
#>     / /    / // / / // ___// __// /| |  / /    / /
#>    / /___ / // /_/ /(__  )/ /_ / ___ | / /___ / /___
#>   /_____//_/ |__,_//____/ |__//_/  |_|/_____//_____/
#> Running Data Complexity Reduction and Stratification Process.
#> This step may take some time...
#> 
#> 
#> Filtering non-robust statifications...
#> 
#> ClustAll pipeline finished successfully!
obj_noNA1simplify <- runClustAll(Object = obj_noNA, threads = 8,
                                simplify = TRUE)
#> CAUTION! The simplify parameter is set to TRUE.
#> For more robust results consider changing the simplify parameter to FALSE.
#>       ______ __              __   ___     __     __
#>      / ____// /__  __ _____ / /_ /   |   / /    / /
#>     / /    / // / / // ___// __// /| |  / /    / /
#>    / /___ / // /_/ /(__  )/ /_ / ___ | / /___ / /___
#>   /_____//_/ |__,_//____/ |__//_/  |_|/_____//_____/
#> Running Data Complexity Reduction and Stratification Process.
#> This step may take some time...
#> 
#> 
#> Filtering non-robust statifications...
#> 
#> ClustAll pipeline finished successfully!

tNOsimplify <- system.time(runClustAll(Object = obj_noNA, threads = 8,
                                        simplify = FALSE))
#>       ______ __              __   ___     __     __
#>      / ____// /__  __ _____ / /_ /   |   / /    / /
#>     / /    / // / / // ___// __// /| |  / /    / /
#>    / /___ / // /_/ /(__  )/ /_ / ___ | / /___ / /___
#>   /_____//_/ |__,_//____/ |__//_/  |_|/_____//_____/
#> Running Data Complexity Reduction and Stratification Process.
#> This step may take some time...
#> 
#> 
#> Filtering non-robust statifications...
#> 
#> ClustAll pipeline finished successfully!
tYESsimplify <- system.time(runClustAll(Object = obj_noNA, threads = 8, 
                                        simplify = TRUE))
#> CAUTION! The simplify parameter is set to TRUE.
#> For more robust results consider changing the simplify parameter to FALSE.
#>       ______ __              __   ___     __     __
#>      / ____// /__  __ _____ / /_ /   |   / /    / /
#>     / /    / // / / // ___// __// /| |  / /    / /
#>    / /___ / // /_/ /(__  )/ /_ / ___ | / /___ / /___
#>   /_____//_/ |__,_//____/ |__//_/  |_|/_____//_____/
#> Running Data Complexity Reduction and Stratification Process.
#> This step may take some time...
#> 
#> 
#> Filtering non-robust statifications...
#> 
#> ClustAll pipeline finished successfully!
print(tNOsimplify)
#>    user  system elapsed 
#>  68.560   2.201  94.801
print(tYESsimplify)
#>    user  system elapsed 
#>  17.347   1.143  35.180

Once the ClustAll algorithm is executed, ClustAll output can be explored.


3.1.2.0.3 plotJACCARD

This function plots the correlation matrix heatmap showing the Jaccard Distance between robust stratifications.
The usage and arguments are the following:
Object - ClustAllObject-class object. paint - Logical value. If TRUE, group of similar stratifications are highlighted within a red square. stratification_similarity - Numeric value. The minimum Jaccard Distance value to consider a of pair stratifications similar. Default is 0.7.

plotJACCARD(Object = obj_noNA1, stratification_similarity =  0.7)

plotJACCARD(Object = obj_noNA1, stratification_similarity = 0.6)

plotJACCARD(Object = obj_noNA1, stratification_similarity = 0.9)

plotJACCARD(Object = obj_noNA1, stratification_similarity = 0.88)

plotJACCARD(Object = obj_noNA1simplify, stratification_similarity = 0.88)


3.1.2.0.4 resStratification

This function returns the stratification representatives by filtering those stratifications that does not contain clusters with a minimum percentage of the population. It can return all the robust stratifications or just one representative each group of robust stratifications.

The usage and arguments are the following:
Object - ClustAllObject-class object. population - Numeric value. Minimum percentage of the total population that a cluster in a stratification must have to be considered as representative. Default is 0.05 (5%). stratification_similarity - Numerical value. The minimum Jaccard Distance value to consider a pair of stratifications similar. Default is 0.7.
all - Logical value. If TRUE, it returns all the similar representative stratifications. If FALSE, only the centroid stratification for each group of similar stratifications is returned.

resStratification(Object = obj_noNA1, population = 0.05, 
                    stratification_similarity = 0.88, all = FALSE)
#> $cuts_a_9
#> $cuts_a_9[[1]]
#> 
#>   1   2 
#> 193 376 
#> 
#> 
#> $cuts_c_3
#> $cuts_c_3[[1]]
#> 
#>   1   2 
#> 199 370


3.1.2.0.5 plotSANKEY

This function plots the Sankey diagram of two selected clusters in order to compare them.
The usage and arguments are the following:
Object - ClustAllObject-class object. clusters - Character vector with the names of a pair of stratifications. Check resStratification to obtain all the stratification names.

plotSANKEY(Object = obj_noNA1, clusters = c("cuts_c_3","cuts_a_9"), 
            validationData = FALSE)
plotSANKEY(Object = obj_noNA1, clusters = c("cuts_c_3","cuts_b_13"), 
            validationData = FALSE)
plotSANKEY(Object = obj_noNA1, clusters = "cuts_c_3", validationData = TRUE)
plotSANKEY(Object = obj_noNA1, clusters = "cuts_b_13", validationData = TRUE)


3.1.2.0.6 cluster2data

This function returns a dataframe with the original dataset together with the selected ClustAll stratification(s) included as variables.

The usage and arguments are the following:
Object - ClustAllObject-class object. clusterName - Character vector with one or more stratification names.

df <- cluster2data(Object = obj_noNA1, 
                    clusterName = c("cuts_c_3","cuts_a_9","cuts_b_13"))


3.1.2.0.7 Validation

This function aims to validate the results obtained with the (multiple) robust stratification(s) with the original data labelling if it was present in the original dataset.

# STRATIFICATION 1
validateStratification(obj_noNA1, "cuts_a_9")
#> sensitivity   specifity 
#>   0.8396226   0.9579832
# STRATIFICATION 2
validateStratification(obj_noNA1, "cuts_b_13")
#> sensitivity   specifity 
#>   0.8160377   0.9243697
# STRATIFICATION 3
validateStratification(obj_noNA1, "cuts_c_3")
#> sensitivity   specifity 
#>   0.8867925   0.9691877

3.1.3 b) Workflow with a dataset with missing values and imputation performed within ClustAll framework

The same procedure where the dataset contains missing values.

3.1.3.0.1 createClustAll and perform imputation
data("BreastCancerWisconsinMISSING", package = "ClustAll")
data_use_NA <- wdbcNA
colSums(is.na(data_use_NA)) # dataset present NAs
#>          Diagnosis            radius1           texture1         perimeter1 
#>                  0                 17                  0                  0 
#>              area1        smoothness1       compactness1         concavity1 
#>                  0                  0                  0                 34 
#>    concave_points1          symmetry1 fractal_dimension1            radius2 
#>                 13                  0                  0                  0 
#>           texture2         perimeter2              area2        smoothness2 
#>                 40                  0                  0                  0 
#>       compactness2         concavity2    concave_points2          symmetry2 
#>                 30                  0                 20                 34 
#> fractal_dimension2            radius3           texture3         perimeter3 
#>                  0                 48                 56                  0 
#>              area3        smoothness3       compactness3         concavity3 
#>                  0                 22                  0                  0 
#>    concave_points3          symmetry3 fractal_dimension3 
#>                  0                  0                 52

obj_NA <- createClustAll(data_use_NA, nImputation = 5,  
                            colValidation = "Diagnosis") 
#> Before continuing, check that the transformation has been processed correctly.
#> Running default multiple imputation method.
#> For more information check mice package.
#> 
#>  iter imp variable
#>   1   1  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   1   2  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   1   3  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   1   4  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   1   5  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   2   1  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   2   2  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   2   3  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   2   4  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   2   5  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   3   1  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   3   2  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   3   3  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   3   4  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   3   5  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   4   1  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   4   2  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   4   3  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   4   4  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   4   5  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   5   1  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   5   2  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   5   3  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   5   4  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#>   5   5  radius1  concavity1  concave_points1  texture2  compactness2  concave_points2  symmetry2  radius3  texture3  smoothness3  fractal_dimension3
#> Warning: Number of logged events: 225
#> 
#> ClustALL object created successfully. You can use runClustAll.

# The rest of the pipeline follows as a)
3.1.3.0.2 runClustAll method
obj_NA1 <- runClustAll(obj_NA, threads = 8) 
#>       ______ __              __   ___     __     __
#>      / ____// /__  __ _____ / /_ /   |   / /    / /
#>     / /    / // / / // ___// __// /| |  / /    / /
#>    / /___ / // /_/ /(__  )/ /_ / ___ | / /___ / /___
#>   /_____//_/ |__,_//____/ |__//_/  |_|/_____//_____/
#> Running Data Complexity Reduction and Stratification Process.
#> This step may take some time...
#> 
#> 
#> Filtering non-robust statifications...
#> 
#> ClustAll pipeline finished successfully!
3.1.3.0.3 plotJACCARD
plotJACCARD(Object = obj_NA1, stratification_similarity = 0.9)

3.1.3.0.4 resStratification
resStratification(Object = obj_NA1, population = 0.05, 
                    stratification_similarity = 0.88, all = FALSE)
#> $cuts_a_3
#> $cuts_a_3[[1]]
#> 
#>   1   2 
#> 196 373
3.1.3.0.5 cluster2data
df_NA <- cluster2data(Object = obj_NA1, clusterName = c("cuts_a_4"))

3.1.4 c) Workflow with a dataset with missing values and imputation performed out of ClustAll framework

The same procedure where the dataset has been previously imputed.

3.1.4.0.1 Perform imputation and store in an mids object. In this case, mice package is used.
library(mice)
#> 
#> Attaching package: 'mice'
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following objects are masked from 'package:base':
#> 
#>     cbind, rbind
data("BreastCancerWisconsinMISSING", package = "ClustAll") # load example data
data_use_NA <- wdbcNA
str(data_use_NA)
#> 'data.frame':    569 obs. of  31 variables:
#>  $ Diagnosis         : Factor w/ 2 levels "B","M": 2 2 2 2 2 2 2 2 2 2 ...
#>  $ radius1           : num  18 20.6 19.7 11.4 20.3 ...
#>  $ texture1          : num  10.4 17.8 21.2 20.4 14.3 ...
#>  $ perimeter1        : num  122.8 132.9 130 77.6 135.1 ...
#>  $ area1             : num  1001 1326 1203 386 1297 ...
#>  $ smoothness1       : num  0.1184 0.0847 0.1096 0.1425 0.1003 ...
#>  $ compactness1      : num  0.2776 0.0786 0.1599 0.2839 0.1328 ...
#>  $ concavity1        : num  0.3001 0.0869 0.1974 0.2414 0.198 ...
#>  $ concave_points1   : num  0.1471 0.0702 0.1279 0.1052 0.1043 ...
#>  $ symmetry1         : num  0.242 0.181 0.207 0.26 0.181 ...
#>  $ fractal_dimension1: num  0.0787 0.0567 0.06 0.0974 0.0588 ...
#>  $ radius2           : num  1.095 0.543 0.746 0.496 0.757 ...
#>  $ texture2          : num  0.905 0.734 0.787 1.156 NA ...
#>  $ perimeter2        : num  8.59 3.4 4.58 3.44 5.44 ...
#>  $ area2             : num  153.4 74.1 94 27.2 94.4 ...
#>  $ smoothness2       : num  0.0064 0.00522 0.00615 0.00911 0.01149 ...
#>  $ compactness2      : num  0.049 0.0131 0.0401 0.0746 0.0246 ...
#>  $ concavity2        : num  0.0537 0.0186 0.0383 0.0566 0.0569 ...
#>  $ concave_points2   : num  0.0159 0.0134 0.0206 0.0187 0.0188 ...
#>  $ symmetry2         : num  0.03 0.0139 0.0225 0.0596 0.0176 ...
#>  $ fractal_dimension2: num  0.00619 0.00353 0.00457 0.00921 0.00511 ...
#>  $ radius3           : num  25.4 25 23.6 14.9 22.5 ...
#>  $ texture3          : num  NA 23.4 25.5 26.5 16.7 ...
#>  $ perimeter3        : num  184.6 158.8 152.5 98.9 152.2 ...
#>  $ area3             : num  2019 1956 1709 568 1575 ...
#>  $ smoothness3       : num  0.162 0.124 0.144 0.21 0.137 ...
#>  $ compactness3      : num  0.666 0.187 0.424 0.866 0.205 ...
#>  $ concavity3        : num  0.712 0.242 0.45 0.687 0.4 ...
#>  $ concave_points3   : num  0.265 0.186 0.243 0.258 0.163 ...
#>  $ symmetry3         : num  0.46 0.275 0.361 0.664 0.236 ...
#>  $ fractal_dimension3: num  0.1189 0.089 0.0876 0.173 0.0768 ...

imp_data_use <- mice(data_use_NA[-1], m=5, maxit = 5,seed=1234, print=FALSE)
#> Warning: Number of logged events: 225
3.1.4.0.2 createClustAll object
# dataImputed contains the mids object with the imputed
obj_imp <- createClustAll(data=data_use_NA, dataImputed = imp_data_use, 
                            colValidation = "Diagnosis") 
#> Before continuing, check that the transformation has been processed correctly.
#> 
#> ClustALL object created successfully. You can use runClustAll.

# The rest of the pipeline follows as a)
3.1.4.0.3 runClustAll method
obj_imp1 <- runClustAll(obj_imp, threads = 8)
#>       ______ __              __   ___     __     __
#>      / ____// /__  __ _____ / /_ /   |   / /    / /
#>     / /    / // / / // ___// __// /| |  / /    / /
#>    / /___ / // /_/ /(__  )/ /_ / ___ | / /___ / /___
#>   /_____//_/ |__,_//____/ |__//_/  |_|/_____//_____/
#> Running Data Complexity Reduction and Stratification Process.
#> This step may take some time...
#> 
#> 
#> Filtering non-robust statifications...
#> 
#> ClustAll pipeline finished successfully!
3.1.4.0.4 plotJACCARD
plotJACCARD(Object = obj_imp1, stratification_similarity = 0.9)

3.1.4.0.5 resStratification
resStratification(Object = obj_imp1, population = 0.05, 
                    stratification_similarity = 0.9, all = FALSE)
#> $cuts_a_1
#> $cuts_a_1[[1]]
#> 
#>   1   2 
#> 187 382 
#> 
#> 
#> $cuts_a_4
#> $cuts_a_4[[1]]
#> 
#>   1   2 
#> 194 375
3.1.4.0.6 cluster2data
df_imp <- cluster2data(Object = obj_NA1, 
                        clusterName = c("cuts_a_1", "cuts_a_16"))

validateStratification(obj_noNA1, "cuts_a_1")
#> sensitivity   specifity 
#>   0.8254717   0.9607843
validateStratification(obj_noNA1, "cuts_a_16")
#> sensitivity   specifity 
#>   0.8349057   0.9551821

Session Info

sessionInfo()
#> R Under development (unstable) (2024-01-16 r85808)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 22.04.3 LTS
#> 
#> Matrix products: default
#> BLAS:   /home/biocbuild/bbs-3.19-bioc/R/lib/libRblas.so 
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_GB              LC_COLLATE=C              
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: America/New_York
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] mice_3.16.0      ClustAll_0.99.1  BiocStyle_2.31.0
#> 
#> loaded via a namespace (and not attached):
#>   [1] RColorBrewer_1.1-3    jsonlite_1.8.8        shape_1.4.6          
#>   [4] magrittr_2.0.3        magick_2.8.2          TH.data_1.1-2        
#>   [7] estimability_1.4.1    modeltools_0.2-23     jomo_2.7-6           
#>  [10] nloptr_2.0.3          rmarkdown_2.25        GlobalOptions_0.1.2  
#>  [13] vctrs_0.6.5           Cairo_1.6-2           minqa_1.2.6          
#>  [16] htmltools_0.5.7       broom_1.0.5           mitml_0.4-5          
#>  [19] sass_0.4.8            bslib_0.6.1           htmlwidgets_1.6.4    
#>  [22] sandwich_3.1-0        emmeans_1.10.0        zoo_1.8-12           
#>  [25] cachem_1.0.8          networkD3_0.4         igraph_2.0.1.1       
#>  [28] lifecycle_1.0.4       iterators_1.0.14      pkgconfig_2.0.3      
#>  [31] Matrix_1.6-5          R6_2.5.1              fastmap_1.1.1        
#>  [34] clue_0.3-65           digest_0.6.34         colorspace_2.1-0     
#>  [37] spatial_7.3-17        S4Vectors_0.41.3      ps_1.7.6             
#>  [40] rmio_0.4.0            fansi_1.0.6           compiler_4.4.0       
#>  [43] doParallel_1.0.17     backports_1.4.1       highr_0.10           
#>  [46] bigassertr_0.1.6      pan_1.9               MASS_7.3-60.2        
#>  [49] rjson_0.2.21          scatterplot3d_0.3-44  fBasics_4032.96      
#>  [52] flashClust_1.01-2     tools_4.4.0           bigstatsr_1.5.12     
#>  [55] prabclus_2.3-3        FactoMineR_2.9        nnet_7.3-19          
#>  [58] glue_1.7.0            stabledist_0.7-1      nlme_3.1-164         
#>  [61] bigparallelr_0.3.2    grid_4.4.0            cluster_2.1.6        
#>  [64] generics_0.1.3        snow_0.4-4            gtable_0.3.4         
#>  [67] flock_0.7             class_7.3-22          tidyr_1.3.1          
#>  [70] utf8_1.2.4            rmutil_1.1.10         flexmix_2.3-19       
#>  [73] BiocGenerics_0.49.1   ggrepel_0.9.5         foreach_1.5.2        
#>  [76] pillar_1.9.0          clValid_0.7           robustbase_0.99-2    
#>  [79] circlize_0.4.15       splines_4.4.0         dplyr_1.1.4          
#>  [82] lattice_0.22-5        bit_4.0.5             survival_3.5-7       
#>  [85] tidyselect_1.2.0      ComplexHeatmap_2.19.0 knitr_1.45           
#>  [88] bookdown_0.37         IRanges_2.37.1        stats4_4.4.0         
#>  [91] xfun_0.41             diptest_0.77-0        timeDate_4032.109    
#>  [94] matrixStats_1.2.0     DEoptimR_1.1-3        DT_0.31              
#>  [97] yaml_2.3.8            boot_1.3-28.1         evaluate_0.23        
#> [100] codetools_0.2-19      kernlab_0.9-32        timeSeries_4032.109  
#> [103] tibble_3.2.1          BiocManager_1.30.22   multcompView_0.1-9   
#> [106] cli_3.6.2             rpart_4.1.23          xtable_1.8-4         
#> [109] munsell_0.5.0         jquerylib_0.1.4       Rcpp_1.0.12          
#> [112] doSNOW_1.0.20         stable_1.1.6          coda_0.19-4.1        
#> [115] png_0.1-8             parallel_4.4.0        modeest_2.4.0        
#> [118] ellipsis_0.3.2        leaps_3.1             ggplot2_3.4.4        
#> [121] mclust_6.0.1          ff_4.0.12             lme4_1.1-35.1        
#> [124] glmnet_4.1-8          mvtnorm_1.2-4         scales_1.3.0         
#> [127] statip_0.2.3          purrr_1.0.2           crayon_1.5.2         
#> [130] fpc_2.2-11            GetoptLong_1.0.5      rlang_1.1.3          
#> [133] cowplot_1.1.3         multcomp_1.4-25