prcurve {FateID} | R Documentation |
Computation of a principal curve for a given dimensional reduction representation
Description
This function computes a principal curve for a given dimensional reduction representation which is specified by component names of an object returned by compdr
using the princurve package.
Usage
prcurve(y, fb, dr, k = 2, m = "cmd", trthr = NULL, start = NULL, ...)
Arguments
y |
clustering partition. A vector with an integer cluster number for each cell. The order of the cells has to be the same as for the columns of x. |
fb |
fateBias object returned by the function |
dr |
list of dimensional reduction representations returned by the function |
k |
integer number for the dimension to be used. This dimension has to be present in |
m |
name of the dimensional reduction algorithms to be used for the principal curve computation. One of |
trthr |
real value representing the threshold of the fraction of random forest votes required for the inclusion of a given cell for the computation of the principal curve. If |
start |
integer number representing a specified starting cluster number for all trajectories, i. e. a common progenitor cluster. The argument is optional. Default value is |
... |
additional arguments to be passed to the low level function |
Details
The function computes a principal curve for each differentiation trajectory by considering only cells that are assigned to the trajectory with a significant fate bias >1 or at least trthr
of the random forest votes, respectively.
For simulateneous computation and plotting of the principal curve, see function plotFateMap
.
Value
A list of the following two components:
pr |
A list of principal curve objects produced by the |
trc |
A list of ordered cell IDs for each trajectory in |
Examples
x <- intestine$x
y <- intestine$y
tar <- c(6,9,13)
fb <- fateBias(x,y,tar,z=NULL,minnr=5,minnrh=10,nbfactor=5,use.dist=FALSE,seed=NULL,nbtree=NULL)
dr <- compdr(x,z=NULL,m="cmd",k=2,tsne.perplexity=30)
pr <- prcurve(y,fb,dr,k=2,m="cmd",trthr=0.25,start=NULL)