Description Usage Arguments Value Examples
View source: R/make_mountain_plots.R
Make mountain plots from a DGSEA list
1 | make_mountain_plots(DGSEA.list, Gene.Set.A, Gene.Set.B, color = TRUE)
|
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. |
A ggplot object demonstrating the enrichment of two gene sets
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.