addTrail {CellTrails} | R Documentation

## ADD trail

### Description

Function to define a single trail on the trajectory.

### Usage

    addTrail(sce, from, to, name)

### Arguments

`sce` | An object of class `SingleCellExperiment`
`from` | Start landmark
`to` | End landmark
`name` | Name of trail

### Details

A trajectory can be composed of multiple single trails (e.g., developmental progression from a common start towards distinct terminal phenotypes). Start and endpoints of trails can be identified visually using the plot function `plotMap`. Here, start (=from) and end (=to) IDs of landmarks are starting with the character "B" (for branching points), "H" (for trail heads, i.e. terminal nodes), and "U" for user-defined landmarks.
Diagnostic messages
An error is thrown if the trajectory has not been fitted yet. Please, call `fitTrajectory` first. Further, an error is thrown if the provided start or end ID is unknown. A warning is shown if a trail with the same name already exists and gets re-defined.

### Value

An updated object of class `SingleCellExperiment`

### Author(s)

Daniel C. Ellwanger

### See Also

`fitTrajectory` `landmarks` `plotMap`

### Examples

    # Example data
    data(exSCE)

    # Add trail
    exSCE <- addTrail(exSCE, "H1", "H2", "Tr3")
    trailNames(exSCE)
    phenoNames(exSCE)

[Package CellTrails version 1.0.1 Index]