make_mountain_plots: Make mountain plots from a DGSEA list

Description Usage Arguments Value Examples

View source: R/make_mountain_plots.R

Description

Make mountain plots from a DGSEA list

Usage

1
make_mountain_plots(DGSEA.list, Gene.Set.A, Gene.Set.B, color = TRUE)

Arguments

DGSEA.list

A list resulting from either dgsea_targeted() or dgsea_untargeted()

Gene.Set.A

A character string containing the first gene set you wish to plot

Gene.Set.B

A character string containing the second gene set you wish to plot

color

Set to TRUE or FALSE to generate enrichment plot with color or black and white.

Value

A ggplot object demonstrating the enrichment of two gene sets

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
expression_data <- seq(-1,1, by = 0.077)
Gene <- LETTERS[seq(from = 1, to = 26)]
data <- as.data.frame(cbind(Gene,expression_data))
gene.set.A <- c("A","B","C","D","E") #positive enrichment
gene.set.B <- c("V","W","X","Y","Z") #negative enrichment
gene.set.X <- c("J","Q","O","E","F")
gene.set.Y <- c("D","S","K","L","R")
gene.set.Z <- c("G","W","P","B","T")
names <- c("gene.set.A","gene.set.B","gene.set.X","gene.set.Y","gene.set.Z")
Letter.Sets <- list(gene.set.A,gene.set.B,gene.set.X,gene.set.Y,gene.set.Z)
names(Letter.Sets) <- NULL
Gene.Sets <- list(genesets = Letter.Sets, geneset.names = names)

dgsea.results <- dgsea_untargeted(input.df = data, gmt.list = Gene.Sets)

make_mountain_plots(DGSEA.list = dgsea.results,
Gene.Set.A = "gene.set.A", Gene.Set.B = "gene.set.B")

JamesJoly/DGSEA documentation built on May 23, 2021, 6:32 a.m.