dgsea_targeted: This function performs targeted DGSEA comparing Gene Set A to...

Description Usage Arguments Value Examples

View source: R/dgsea_targeted.R

Description

This function performs targeted DGSEA comparing Gene Set A to Gene Set B while using background gene sets to control for false discovery rate

Usage

1
2
3
4
5
6
7
8
dgsea_targeted(
  input.df,
  gmt.list,
  Gene.Set.A.Name,
  Gene.Set.B.Name,
  num.permutations = 1000,
  stat.type = "Weighted"
)

Arguments

input.df

Data frame containing Genes in column 1 and ranking metrics for samples (e.g signal-to-noise ratio) in columns 2:N

gmt.list

gmt list containing the gene sets the user wishes to use with gene set name as column name and genes in the rows (i.e. from GSA.read.gmt())

Gene.Set.A.Name

Character string containing the exact name of the first gene set the user wishes to compare

Gene.Set.B.Name

Character string containing the exact name of the second gene set the user wishes to compare

num.permutations

Number of permutations to perform, default = 1000

stat.type

Character string set to "Weighted" (weight = 1) or "Classic" (score weight = 0), default is "Weighted"

Value

A list containing DGSEA results, GSEA results, and information to make mountain plots using the make_mountain_plots function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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")
gene.set.B <- c("V","W","X","Y","Z")
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_targeted(input.df = data,
gmt.list = Gene.Sets,
Gene.Set.A.Name = names[1], Gene.Set.B.Name = names[2])

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