weightedGSEA: weightedGSEA

Description Usage Arguments Value Examples

View source: R/weightedGSEA.R

Description

weightedGSEA performs both SGSEA and MGSEA for a given list of gene sets, and writes out the results.

Usage

1
2
3
4
weightedGSEA(data, geneCol, fcCol, weightCol = NULL,
  geneSet = c("MSigDB.KEGG.Pathway", "MSigDB.TF", "MSigDB.miRNA",
  "TargetScan.miRNA"), permutationNum = 100, outputDir = getwd(),
  MGSEAthres = NULL, verbose = TRUE)

Arguments

data

a data frame comprising comlumns: gene names (characer), differential gene expression (numeric) and permuated gene weights (numeric and optional)

geneCol

an integer or a character value indicating the column of gene name

fcCol

an integer or a character value indicating the column of differential gene expression

weightCol

an integer or a character value indicating the column of gene weights

geneSet

a vector of character values indicating the gene sets of interest.

permutationNum

an integer value indicating the number of permutation

outputDir

a character value indicating the directory for saving the results

MGSEAthres

an integer value indicating the thresfold for MGSEA. MGSEA is performed with no more than "MGSEAthres" gene sets

verbose

an boolean value indicating whether or not to print output to the screen

Value

TRUE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(heart.metaXcan)
gene <- heart.metaXcan$gene_name
fc <- heart.metaXcan$zscore
usedFrac <- heart.metaXcan$n_snps_used / heart.metaXcan$n_snps_in_cov
r2 <- heart.metaXcan$pred_perf_r2
weights <- usedFrac*r2
data <- data.frame(gene,fc,weights)
# run one-step GIGSEA 
# weightedGSEA(data, geneCol='gene', fcCol='fc', weightCol= 'weights', 
#    geneSet=c("MSigDB.KEGG.Pathway","MSigDB.TF","MSigDB.miRNA",
# "TargetScan.miRNA"), permutationNum=10000, outputDir="./GIGSEA" )
# dir("./GIGSEA")

GIGSEA documentation built on Nov. 8, 2020, 7:02 p.m.