visGene: Visualize gene expression pattern in scRNA-seq

Usage Arguments Author(s) See Also Examples

View source: R/visGene.R

Usage

1
visGene(names, sc2p.obj, group.name = NULL, low.prob = 0.99, show.name = TRUE, show.points = T, all.points = T, annotation = NULL)

Arguments

names

Character for the name of a gene.

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.

low.prob

The cutoff to classify a gene to Phase 1 or 2 based on posterior Prob(phase 2).

show.name

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

show.points

Logical value. If TRUE, counts in individual cells with expression in Phase 2 are plotted in addition to summary statistics.

all.points

Logical value. If TRUE, gene counts that are classified as in Phase I are plotted as well.

annotation

If the user perfer a different naming system for the genes other than the one used in the object sc2p.obj, a vector of alternative gene names can be provided here.

Author(s)

Zhijin (Jean) Wu <zwu@stat.brown.edu>

See Also

eset2Phase, twoPhaseDE, topGene

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
data(brain_scRNAseq)

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

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

## test DE
de.sc2p <- twoPhaseDE(data, design="celltype", test.which=1, offset="sf")

## visualize top phase I DE gene
visGene(topGene(de.sc2p, 1)$Gene.name[1], data, group.name="celltype")

## visualize top phase II DE gene
visGene(topGene(de.sc2p, 2)$Gene.name[1], data, group.name="celltype")

## End(Not run)

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