R/scMethrix_dimensionality.R
dim_red_scMethrix.RdReduces dimensionality (tSNE, UMAP, PCA, or custom)
dim_red_scMethrix( scm, assay = "score", type = c("tSNE", "UMAP", "PCA"), var = c("top", "rand"), top_var = 1000, perplexity = 30, verbose = FALSE, n_components = 2, n_neighbors = 15, ... )
| scm | scMethrix; Input |
|---|---|
| assay | string; The assay to use. Default is 'score' |
| type | string; the type of imputation "tSNE","UMAP", or "PCA" |
| var | strning; Choose between random CpG sites ('rand') or most variable CpGs ('top'). Default 'top' |
| top_var | integer; Number of variable CpGs to use. Default 1000 Set it to NULL to use all CpGs (which is not recommended due to memory requirements). |
| perplexity | numeric; Perplexity parameter (should not be bigger than 3 * perplexity < nrow(X) - 1, see details for interpretation) |
| verbose | boolean; flag to output messages or not |
| n_components | integer; Number of components to use |
| n_neighbors | integer; number of nearest neighbors for UMAP |
| ... | Other arguments that can be passed to Rtsne |
scMethrix object with reducedDim assay
Does reduction stuff
plot_dim_red() for plotting