linePlot {tomoda}R Documentation

Line plot for expression traces

Description

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

Usage

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

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)

[Package tomoda version 1.4.0 Index]