R/as_scmp.R
as_scmp.Rd
`as_scmp()` converts a cds/CellDataSet object from Monocle3 or a SingleCellExperiment #' object to an instance of the scmpClass object.
as_scmp(
object,
from = "cds",
path_prefix = "Path",
root_label = "root",
ptime_col = "Pseudotime",
align_pseudotime = FALSE,
path_col = path_prefix,
anno_col = "cell_type",
verbose = TRUE,
interactive = TRUE,
additional_params = list(labels_exist = FALSE)
)
An S4 object of class `cds/CellDataSet` or `SingleCellExperiment`.
Character string specifying the class of 'object'. Use "cds" for `cds/CellDataSet` class and "sce" for `SingleCellExperiment` class.
Prefix used to annotate the paths. (Default is "Path").
Label used to annotate root cells. (Default is "root").
A character string representing the column name for inferred Pseudotime values. (Default is "Pseudotime")
Whether to automatically align two different pseudotimes.
See align_pseudotime
for more details. (Default is FALSE).
A character string representing the column name for branching path assignment. (Default is `path_prefix`)
A character string representing the column name for cell level metadata containing cell level annotations. (Default is "cell_type").
Print detailed output in the console. (Default is TRUE)
Whether to use the shiny application to select branching paths. (Default is TRUE).
A named list of additional parameters. See examples.
An object of class ScMaSigPro
.
# Load Library
# library(scMaSigPro)
# Step-1: Load a dataset for testing
# This dataset is available as part of the package
# It is simulated with splatter
data("splat.sim", package = "scMaSigPro")
# Step-2: Convert to ScMaSigPro Object
# Here, we convert the sce object to an scMaSigPro object
scmp.sce <- as_scmp(
object = splat.sim, from = "sce",
align_pseudotime = TRUE,
verbose = FALSE,
additional_params = list(
labels_exist = TRUE,
exist_ptime_col = "Step",
exist_path_col = "Group"
)
)