Description Usage Arguments Details Value Author(s) References See Also Examples

Orthogonal projection of each sample to the trajectory backbone.

1 | ```
fitTrajectory(sce)
``` |

`sce` |
A |

The previously selected component (with *k* states) defines
the trajectory backbone. With this function CellTrails embeds the trajectory
structure in the latent space by computing *k*-1 straight lines passing
through *k* mediancentres (Bedall & Zimmermann, 1979) of adjacent
states. Then, a fitting function is learned. Each sample is projected to
its most proximal straight line passing through the mediancentre of its
assigned state. Here, whenever possible, projections on line segments
*between* two mediancentres are preferred. Residuals
(fitting deviations) are given by the Euclidean distance between the
sample's location and the straight line. Finally, a weighted acyclic
trajectory graph can be constructed based on each sample<e2><80><99>s position along
its straight line. In addition, data vectors are connected to mediancentres
to enable the proper determination of branching points. Each edge is
weighted by the distance between each node
(sample) after orthogonal projection.

Of note, the fitting function implies potential side branches in the
trajectory graph; those could be caused due to technical variance or
encompass samples that were statistically indistinguishable from the main
trajectory given the selected genes used for trajectory reconstruction.

*Diagnostic messages*

An error is thrown if an trajectory graph component was not
computed or selected yet; functions `connectStates`

and `selectTrajectory`

need to be run first.

An updated `SingleCellExperiment`

object

Daniel C. Ellwanger

Bedall, F.K., and Zimmermann, H. (1979). Algorithm AS143. The mediancentre. Appl Statist 28, 325-328.

`connectStates`

`selectTrajectory`

1 2 3 4 5 | ```
# Example data
data(exSCE)
# Align samples to trajectory
exSCE <- fitTrajectory(exSCE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.