Description Usage Arguments Value Examples

View source: R/FateID_functions.R

This function plots a dimensional reduction representation using the output of the `compdr`

function as input. It allows display of the input clusters as well as color coding of fate bias probabilities and gene expression.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |

`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. |

`dr` |
list of dimensional reduction representations returned by the function |

`x` |
expression data frame with genes as rows and cells as columns. Gene IDs should be given as row names and cell IDs should be given as column names. This can be a reduced expression table only including the features (genes) to be used in the analysis. This input has to be provided if |

`g` |
either the name of one of the trajectories from |

`n` |
optional character string. This argument corresponds to a title for 2-dimensional plots. Default value is |

`prc` |
logical. If |

`logsc` |
logical. If |

`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 |

`kr` |
integer vector. If |

`col` |
optional vector of valid color names for all clusters in |

`fb` |
fateBias object returned by the function |

`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 |

`tp` |
Transparency of points in the plot to allow better visibility of the principal curves. Default value is 1, i. e. non-transparent. |

`seed` |
integer number. Random seed for determining colour scheme. Default is 12345. |

`...` |
additional arguments to be passed to the low level function |

If `fb`

is provided as input argument and `prc`

equals `TRUE`

then the output corresponds to the output of `prcurve`

. Otherwise, only ouput is generated is `g`

equals E. In this case a vector of fate bias entropies for all cells is given.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
x <- intestine$x
y <- intestine$y
# v contains all genes (no feature selection like in x)
v <- intestine$v
fcol <- intestine$fcol
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)
# plot principal curves
pr <- plotFateMap(y,dr,k=2,prc=TRUE,m="cmd",col=fcol,fb=fb,trthr=0.25,start=NULL,tp=.5)
# plot expression of gene Apoa1__chr9
plotFateMap(y,dr,x=v,g="Apoa1__chr9",prc=FALSE,k=2,m="cmd",col=intestine$fcol)
``` |

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.