Splits an scMethrix object into two for use as a training and test set

generate_training_set(scm = NULL, training_prop = 0.2, seed = "123")

Arguments

scm

scMethrix; the single cell methylation experiment

training_prop

numeric; The size of the training set as a proportion of the experiment (0 to 1) For a range, the optimal value will be estimated; this is time-intensive.

seed

string; value to use for sampling

Value

list; two scMethrix objects names 'training' and 'test'

Details

Typically used for teaching classification algorithms. The seed can be set for consistency.

Examples

data('scMethrix_data') generate_training_set(scMethrix_data, training_prop = 0.2)
#> $training #> An object of class scMethrix #> n_CpGs: 57 #> n_samples: 4 #> assays: score, counts #> reduced dims: #> is_h5: FALSE #> Reference: hg19 #> Physical size: 33.6 Kb #> #> $test #> An object of class scMethrix #> n_CpGs: 229 #> n_samples: 4 #> assays: score, counts #> reduced dims: #> is_h5: FALSE #> Reference: hg19 #> Physical size: 43.7 Kb #>