as_scmp() creates a ScMaSigPro object from a
SingleCellExperiment whose cell metadata (colData) holds a pseudotime
column and a path column. To start from a count matrix and a cell table,
use create_scmp(); assign_paths() and paths_from_graph() build the
two columns from the output of a trajectory tool.
Usage
as_scmp(
object,
from = "sce",
path_prefix = "Path",
root_label = "root",
ptime_col = "Pseudotime",
path_col = path_prefix,
verbose = TRUE,
additional_params = list(labels_exist = FALSE)
)Arguments
- object
A
SingleCellExperimentwith the counts of the cells.- from
The class of
object; only"sce"is supported.- path_prefix
The default of
path_col, kept in the parameters.- root_label
The label of the root cells, kept in the parameters.
- ptime_col
The name of the column of the cell metadata that holds the pseudotime of each cell.
- path_col
The name of the column of the cell or bin metadata that holds the path label of each cell or bin.
- verbose
Whether to print progress messages.
- additional_params
A list: with
labels_exist = TRUE, the columnsexist_ptime_colandexist_path_colof the cell metadata are renamed toptime_colandpath_col.
Value
A ScMaSigPro object with the cells in the Sparse slot.
See also
Other input helpers:
assign_paths(),
create_scmp(),
paths_from_graph()
Author
Priyansh Srivastava spriyansh29@gmail.com
Examples
data("splat.sim", package = "scMaSigPro")
scmp <- as_scmp(splat.sim,
additional_params = list(
labels_exist = TRUE, exist_ptime_col = "Step",
exist_path_col = "Group"
),
verbose = FALSE
)
scmp
#> Class: ScMaSigProClass
#> nCells: 200
#> nFeatures: 100
#> Pseudotime Range: 1 100
#> Branching Paths: Path2, Path1
