plotTopSigGenesByContrast: Plot top significantly differentially expressed genes by...

View source: R/plotTopSigGenes.R

plotTopSigGenesByContrastR Documentation

Plot top significantly differentially expressed genes by contrast

Description

Plot top significantly differentially expressed genes by contrast

Usage

plotTopSigGenesByContrast(
  countDgeResult,
  contrast,
  n = 5,
  nSigned = NULL,
  identifier = "GeneSymbol"
)

Arguments

countDgeResult

A CountDgeResult object, for instance EdgeResult or LimmaVoomDgeResult.

contrast

A character string, or an index (integer), or a logical vector with one TRUE element, to indicate which contrast to plot

n

Integer, how many genes should be visualized.

nSigned

NULL or integer, in the later case the top nSigned genes from positively and negatively regulated genes are shown, respectively.

identifier

Character string, column name in genes annotation to be used to index and display the genes.

Value

A ggplot object. If nSigned is not NULL, genes are plotted with colors: blue indicating down-regulated genes and red indicating up-regulated genes.

See Also

plotTopSigGenesByContrast plots all contrasts at once.

Examples

edgeObj <- exampleEdgeObject()
edgeRes <- dgeWithEdgeR(edgeObj)
plotTopSigGenesByContrast(edgeRes, n=6, contrast=1)
plotTopSigGenesByContrast(edgeRes, n=6, contrast=2)
## display top three positive and top three negative genes
plotTopSigGenesByContrast(edgeRes, nSigned=3, contrast=1)
plotTopSigGenesByContrast(edgeRes, nSigned=4, contrast=2)

bedapub/ribiosNGS documentation built on Feb. 10, 2025, 12:34 a.m.