bin.trajectory: Cell aligner, binning and summary statistics function on...

Description Usage Arguments Value

View source: R/bin_trajectory.R

Description

Post trajectory analysis function for calcualting statistics on expression values along the isolated trajectory

Usage

1
2
bin.trajectory(x, trajectory, n = NULL, stat = "median",
  trim = FALSE, ...)

Arguments

x

a data frame of expression values to be summarized statictically along the trajectory. It does not contain trajectory variable. It may contain factors (e.g. cell labels, clusters).

trajectory

a vector of trajectory distances to be used for cell alignement and binning. This vector can be extracted from the tspace_matrix object, a matrix of trajectory space distances. Trajectory vector has to correspond to cells in the data frame x.

n

an integer specifying number of the bins along the trajectory, the higher the number the fewer cells within the bin. If n = NULL, function will bin all the cells with the same distance into common bin. For this feature it may be useful to round decimal values in trajectory vector.

stat

a string defining to calculate median ('median'), mean ('mean') or quibic spline ('smooth'). The default is median.

trim

a boolean, TRUE or FALSE, if TRUE the first bin will have borders '<min(distance), 0.05*max(distance)]' and the last one '<0.95*max(distance), max(distance)]', set as default to FALSE

Value

This function returns data frame in which cells are binned along the trajectory and expressions are summarized by selected statistics.


hylasD/tSpace documentation built on July 4, 2020, 4:15 a.m.