zyPlot: Visualize the posterior probability of being expressed for a...

Description Usage Arguments Details Author(s) See Also Examples

View source: R/zyPlot.R

Description

This functions plots the posterior probability of being expressed versus expressions level for a particular gene cross many cells.

Usage

1
zyPlot(name, sc2p.obj, group.name, log2scale = TRUE, showname = TRUE, annotation = NULL)

Arguments

name

Gene name. This should either match one of the featureNames of the sc2p.obj, or match a name in a separate annotation vector.

sc2p.obj

An object of sc2pSet, result from the eset2Phase function.

group.name

Character for the name of factors indicating the experimental conditions. This has to be the name of a column in pData(sc2p.obj) data frame.

log2scale

Logical to indicate whether to plot expression level in log2 scale. Default is TRUE.

showname

Logical to indicate whether to show the name of genes as the tile of the figure.

annotation

A character vector of alternative gene names, with length equal the number of genes in the sc2p.obj. If left as default NULL, the featureNames of the sc2p.obj is used.

Details

In general, the probability of being expressed for a gene is higher when the expression level is high. However, the probability is also affected by other cell- and gene-specific factors. For example, cell with higher total depth will have greater values for all genes belong to that cell. Genes with higher average expression levels will have higher background, thus the threshold for expression will be higher than genes with lower average expression.

This function provides visualization of the expression status and expression level.

Author(s)

Jamie (Yi) Zhang <yi_zhang@brown.edu>

See Also

eset2Phase

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
data(brain_scRNAseq)

## assemble expressionset
colnames(Y) <- rownames(design)
phenoData <- new("AnnotatedDataFrame", data=design)
eset <- ExpressionSet(assayData=Y, phenoData=phenoData)

## infer latent status
data <- eset2Phase(eset)

## visualize a gene
zyPlot(rownames(data)[1], data, group.name="celltype")

## End(Not run)

haowulab/SC2P documentation built on Feb. 28, 2021, 8:39 a.m.