Generic imputation return function
impute_regions( scm = NULL, assay = "score", new_assay = "impute", regions = NULL, n_chunks = 1, n_threads = 1, overlap_type = c("within", "start", "end", "any", "equal"), type = c("kNN", "iPCA", "RF"), verbose = TRUE, k = 10, n_pc = 2, ... )
| scm |
|
|---|---|
| assay | string; name of an existing assay. Default = "score" |
| new_assay | string; name for transformed assay. Default = "new_assay" |
| regions | Granges; the regions to impute. Default is by chromosome. |
| n_chunks | integer; Number of chunks to split the |
| n_threads | integer; Maximum number of parallel instances. Default = 1 |
| overlap_type | defines the type of the overlap of the CpG sites with the target region. Default value is |
| type | string/closure; the imputation to perform "kNN","iPCA",or "RF". Otherwise, a closure can be specified that returns the imputed matrix. Default = "kNN" |
| verbose | boolean; Flag for outputting function status messages. Default = TRUE |
| k | Number of neighbors to be used in the imputation (default=10) |
| n_pc | the range of principal components to check when using iPCA. Caution: this can be very time-intensive |
| ... | further arguments passed to or from other methods |
list; two scMethrix objects names 'training' and 'test'
Uses the specified imputation operation to evaluation an scMethrix object.
Hastie T, Tibshirani R, Narasimhan B, Chu G (2021). impute: impute: Imputation for microarray data. R package version 1.66.0.
Stekhoven, D. J., & Bühlmann, P. (2012). MissForest—non-parametric missing value imputation for mixed-type data. Bioinformatics, 28(1), 112-118.
Bro, R., Kjeldahl, K. Smilde, A. K. and Kiers, H. A. L. (2008) Cross-validation of component models: A critical look at current methods. Analytical and Bioanalytical Chemistry, 5, 1241-1251.
Josse, J. and Husson, F. (2011). Selecting the number of components in PCA using cross-validation approximations. Computational Statistics and Data Analysis. 56 (6), pp. 1869-1879.
#>#>#> An object of class scMethrix #> n_CpGs: 286 #> n_samples: 4 #> assays: score, counts, impute #> reduced dims: #> is_h5: FALSE #> Reference: hg19 #> Physical size: 56.7 Kb