weightedGSEA {GIGSEA} | R Documentation

## weightedGSEA

### Description

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

### Usage

    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

    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")

[Package GIGSEA version 1.4.0 Index]