
Check that a pipeline can run on a given class
validate_pipeline.RdWalks the pipeline and tracks which class each step would receive. Steps
declare the classes their generic has methods for, and most steps hand back
what they were given; step_metacells_sc() does not, it turns a
SingleCells/SingleCellsSubset into a MetaCells. Without this you would
only find out about a mismatch when S7 fails to dispatch, i.e. after the
expensive steps already ran.
Examples
# the meta cell step changes what the next step would receive
p <- step_hvg_sc() %>>% step_metacells_sc("bootstrapped")
print(validate_pipeline(p, "SingleCells"))
#> [1] "MetaCells"