`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)
)

Arguments

object

An S4 object of class `cds/CellDataSet` or `SingleCellExperiment`.

from

Character string specifying the class of 'object'. Use "cds" for `cds/CellDataSet` class and "sce" for `SingleCellExperiment` class.

path_prefix

Prefix used to annotate the paths. (Default is "Path").

root_label

Label used to annotate root cells. (Default is "root").

ptime_col

A character string representing the column name for inferred Pseudotime values. (Default is "Pseudotime")

align_pseudotime

Whether to automatically align two different pseudotimes. See align_pseudotime for more details. (Default is FALSE).

path_col

A character string representing the column name for branching path assignment. (Default is `path_prefix`)

anno_col

A character string representing the column name for cell level metadata containing cell level annotations. (Default is "cell_type").

verbose

Print detailed output in the console. (Default is TRUE)

interactive

Whether to use the shiny application to select branching paths. (Default is TRUE).

additional_params

A named list of additional parameters. See examples.

Value

An object of class ScMaSigPro.

Author

Priyansh Srivastava spriyansh29@gmail.com

Examples

# 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"
  )
)