This function takes a reduced data matrix
a vector of cluster identities (optionally including
"unclustered"), and a set of lineages consisting of paths through a forest
constructed on the clusters. It constructs smooth curves for each lineage
and returns the points along these curves corresponding to the orthogonal
projections of each data point, along with corresponding arclength
1 2 3 4 5 6 7
Additional parameters to pass to scatter plot smoothing function,
logical or numeric between 0 and 1, determines whether and how much to shrink branching lineages toward their average prior to the split.
character, how to handle root and leaf clusters of lineages
when constructing the initial, piece-wise linear curve. Accepted values are
logical, whether to allow cells shared between lineages to be
reweighted during curve-fitting. If
logical, whether to reassign cells to lineages at each
numeric, determines the convergence criterion. Percent change
in the total distance from cells to their projections along curves must be
numeric, maximum number of iterations, see
numeric factor by which curves can be extrapolated beyond
endpoints. Default is
choice of scatter plot smoother. Same as
character denoting how to determine the appropriate
amount of shrinkage for a branching lineage. Accepted values are the same
logical, determines whether curves that branch very close to the origin should be allowed to have different starting points.
When there is only a single lineage, the curve-fitting algorithm is
nearly identical to that of
there are multiple lineages and
shrink > 0, an additional step
is added to the iterative procedure, forcing curves to be similar in the
neighborhood of shared points (ie., before they branch).
extend argument determines how to construct the
piece-wise linear curve used to initiate the recursive algorithm. The
initial curve is always based on the lines between cluster centers and if
extend = 'n', this curve will terminate at the center of the
endpoint clusters. Setting
extend = 'y' will allow the first and
last segments to extend beyond the cluster center to the orthogonal
projection of the furthest point. Setting
extend = 'pc1' is similar
'y', but uses the first principal component of the cluster to
determine the direction of the curve beyond the cluster center. These
options typically have little to no impact on the final curve, but can
occasionally help with stability issues.
shink = TRUE, we compute a shrinkage curve,
w_l(t), for each lineage, a non-increasing function of pseudotime
that determines how much that lineage should be shrunk toward a shared
average curve. We set w_l(0) = 1, so that the curves will perfectly
overlap the average curve at pseudotime
0. The weighting curve
0 over the non-outlying pseudotime values
of shared cells (where outliers are defined by the
The exact shape of the curve in this region is controlled by
shrink.method, and can follow the shape of any standard kernel
function's cumulative density curve (or more precisely, survival curve,
since we require a decreasing function). Different choices of
shrink.method seem to have little impact on the final curves, in
reweight = TRUE, weights for shared cells are based on
the quantiles of their projection distances onto each curve. The
distances are ranked and converted into quantiles between
1, which are then transformed by
1 - q^2. Each cell's weight
along a given lineage is the ratio of this value to the maximum value for
this cell across all lineages.
SlingshotDataSet object containing the
oringinal input, arguments provided to
getCurves as well as the
following new elements:
curvesA list of
slingParamsAdditional parameters used for fitting simultaneous principal curves.
Hastie, T., and Stuetzle, W. (1989). "Principal Curves." Journal of the American Statistical Association, 84:502–516.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.