linePlot: Line plot for expression traces

Description Usage Arguments Value See Also Examples

View source: R/visualize.R

Description

Plot expression traces for genes across sections in a SummarizedExperiment object.

Usage

1
linePlot(object, genes, matrix = "normalized", facet = FALSE, span = 0.3)

Arguments

object

A SummarizedExperiment object.

genes

A character vector of gene names for plotting expression traces.

matrix

Character, must be one of "count", "normalized", or "scaled".

facet

Logical. Plot the expression trace of each gene in a facet if it is TRUE.

span

Numeric, the amount of smoothing for the default loess smoother. Smaller numbers produce wigglier lines, larger numbers produce smoother lines. Set it to 0 for non-smoothing lines.

Value

A ggplot object.

See Also

geom_smooth for plotting smooth lines, facet_wrap for faceting genes.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(zh.data)
zh <- createTomo(zh.data)
linePlot(zh,
 c("ENSDARG00000002131", "ENSDARG00000003061", "ENSDARG00000076075", "ENSDARG00000076850"))

# Do not smooth lines.
linePlot(zh,
 c("ENSDARG00000002131", "ENSDARG00000003061", "ENSDARG00000076075", "ENSDARG00000076850"), span=0)

# Plot genes in different facets.
linePlot(zh,
 c("ENSDARG00000002131", "ENSDARG00000003061", "ENSDARG00000076075", "ENSDARG00000076850"),
 facet=TRUE)

tomoda documentation built on Nov. 8, 2020, 8:10 p.m.