fit_pseudotime: Fit the pseudotime curve

Description Usage Arguments Value Examples

View source: R/embeddr.R

Description

Fits the pseudotime curve using principal curves from the princurve library

Usage

1
fit_pseudotime(sce, clusters = NULL, ...)

Arguments

sce

The SCESet object

clusters

The (numeric) clusters to use for the curve fitting. If NULL (default) then all points are used

...

Additional arguments to be passed to princurve from principal.curve.

Value

The modified SCESet with the following fields added to pData:

pseudotime

The pseudotime of the cell (arc-length from beginning of curve, rescale to [0,1])

trajectory_1

The x-coordinate of a given cell's projection onto the curve

trajectory_2

The y-coordinate of a given cell's projection onto the curve

proj_dist

The euclidean distance in the plane from each cell to its projection

If a given cell is not in clusters then the value for each of the above fields is set to NA.

Examples

1
2
3
4
library(scater)
data('sc_example_counts') ; sce <- newSCESet(countData = sc_example_counts)
sce <- embeddr(sce)
sce <- fit_pseudotime(sce)

kieranrcampbell/embeddr documentation built on May 20, 2019, 9:24 a.m.