prcurve {FateID}R Documentation

Computation of a principal curve for a given dimensional reduction representation


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.


prcurve(y, fb, dr, k = 2, m = "cmd", trthr = NULL, start = NULL, ...)



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.


fateBias object returned by the function fateBias.


list of dimensional reduction representations returned by the function compdr.


integer number for the dimension to be used. This dimension has to be present in dr. Default value is 2.


name of the dimensional reduction algorithms to be used for the principal curve computation. One of lle, cmd, dm, tsne, umap. Default value is cmd. Has to be a component of dr, i.e. previously computed by compdr.


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 NULL then only cells with a significant bias >1 are included for each trajectory. The bias is computed as the ratio of the number of votes for a trajectory and the number of votes for the trajectory with the second largest number of votes. By this means only the trajectory with the largest number of votes will receive a bias >1. The siginifcance is computed based on counting statistics on the difference in the number of votes. A significant bias requires a p-value < 0.05. Default value is NULL.


integer number representing a specified starting cluster number for all trajectories, i. e. a common progenitor cluster. The argument is optional. Default value is NULL.


additional arguments to be passed to the low level function principal_curve.


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.


A list of the following two components:


A list of principal curve objects produced by the principal_curve function from the princurve package. Each component corresponds to one differentiation trajectory giving rise to one of the target clusters from the fb object.


A list of ordered cell IDs for each trajectory in pr.


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,lle.n=30,tsne.perplexity=30)
pr <- prcurve(y,fb,dr,k=2,m="cmd",trthr=0.25,start=NULL)

[Package FateID version 0.2.0 Index]