plotexpression: Plotting of pseudo-temporal expression profiles

plotexpressionR Documentation

Plotting of pseudo-temporal expression profiles

Description

This function allows plotting pseudo-temporal expression profiles for single genes or groups of genes.

Usage

plotexpression(
  x,
  y,
  g,
  n,
  logsc = FALSE,
  col = NULL,
  name = NULL,
  cluster = FALSE,
  alpha = 0.5,
  types = NULL,
  cex = 3,
  ylim = NULL,
  map = TRUE,
  leg = TRUE,
  seed = 12345,
  ylab = NULL
)

Arguments

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.

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.

g

a gene ID corresponding to one of the rownames of x. It can also be a vector of gene IDs. In this case, the aggregated expression across all gene IDs is plotted.

n

ordered vector of cell IDs to be included. Cell IDs need to be column names of x.

logsc

logical value. If TRUE, then log2-transformed values are plotted. Default is FALSE and untransformed values are plotted.

col

optional vector of valid color names for all clusters in y ordered by increasing cluster number. Default value is NULL.

name

optional character string. This argument corresponds to a title for the plot. Default value is NULL. If not provided, and g is given, then name will equal g or g[1], respectively, if g is a vector of gene IDs.

cluster

logical value. If TRUE then the partitioning along the x-axis is indicated be vertical lines representing the boundaries of all positions with a given value in y. The average position across all cells in a cluster will be indicated on the x-axis.

alpha

positive real number. Pseudo-temporal expression profiles are derived by a local regression of expression values across the ordered cells using the function loess from the package stats. This is the parameter, which controls the degree of smoothing. Larger values return smoother profiles. Default value is 0.5.

types

optional vector with IDs for different subsets of cells in y, e. g. different batches. All cells with the same ID will be displayed by the same symbol and color. Default value is NULL

cex

size of data points. Default value is 3.

ylim

vector of two numerical values: lower and upper limit of values shown on the y-axis. Default value is NULL and the whole range is shown.

map

logical. If TRUE then data points are shown. Default value is TRUE.

leg

logical. If TRUE then axes and labels are shown. Default value is TRUE.

seed

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

ylab

Optional label for the y-axis. Default is NULL and axis is labeled "norm. expression".

Value

None

Examples



x <- intestine$x
y <- intestine$y
v <- intestine$v
fcol <- intestine$col
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.4,start=NULL)
n <- pr$trc[["t6"]]
fs  <- filterset(v,n,minexpr=2,minnumber=1)
s1d <- getsom(fs,nb=1000,alpha=.5)
ps <- procsom(s1d,corthr=.85,minsom=3)
# plot average profile of all genes of node 1 in the self-organizing map
g <- names(ps$nodes)[ps$nodes == 1]
plotexpression(v,y,g,n,col=fcol,name="Node 1",cluster=FALSE,alpha=.5,types=NULL)



dgrun/FateID documentation built on June 20, 2022, 12:57 p.m.