
Apply a pipeline to a single cell object
apply_pipeline.RdRuns each step in order. The first step receives object; subsequent steps
receive the result of the previous step. The chain is validated against the
class of object before anything runs, see validate_pipeline().
Errors propagate; nothing is caught.
Examples
# HVG then PCA, run in order on a freshly loaded object
sc <- demo_single_cells(prepped = FALSE)
p <- step_hvg_sc(hvg_no = 30L, .verbose = FALSE) %>>%
step_pca_sc(no_pcs = 10L, .verbose = FALSE)
sc <- apply_pipeline(p, sc)
dim(get_pca_factors(sc))
#> [1] 500 10
unlink(sc@dir_data, recursive = TRUE, force = TRUE)