runfgsea {ViSEAGO} | R Documentation

## perform multilevel preranked gene set enrichment analysis.

### Description

This method perform fast gene set enrichment analysis (GSEA) using fgsea package.

### Usage

    runfgsea(
      geneSel,
      gene2GO,
      ont,
      method = c("fgseaSimple", "fgseaMultilevel"),
      params = list(nperm = 10000, sampleSize = 101, minSize = 1, maxSize = Inf, eps = 0,
        scoreType = c("std", "pos", "neg"), nproc = 0, gseaParam = 1, BPPARAM = NULL, absEps
        = NULL)
    )

    ## S4 method for signature 'ANY,gene2GO,character'
    runfgsea(
      geneSel,
      gene2GO,
      ont,
      method = c("fgseaSimple", "fgseaMultilevel"),
      params = list(nperm = 10000, sampleSize = 101, minSize = 1, maxSize = Inf, eps = 0,
        scoreType = c("std", "pos", "neg"), nproc = 0, gseaParam = 1, BPPARAM = NULL, absEps
        = NULL)
    )

### Arguments

`geneSel` | a 2 columns `data.table` with preranked gene identifiants (in first column) based on the statistical values (second column).
`gene2GO` | a `gene2GO-class` object created by `annotate` method.
`ont` | the ontology used is "MF" (Molecuar Function), "BP" (Biological Process), or "CC" (Cellular Component).
`method` | fgsea method to use with `fgseaSimple` or `fgseaMultilevel`.
`params` | a `list` with `fgseaSimple` or `fgseaMultilevel` parameters.

### Details

This method is a convenient wrapper using a given ontology category (`ont` argument) in order to perform gene set enrichment analysis using `fgseaSimple` or `fgseaMultilevel` algorithm from fgsea package.

The complete GO annotation is required (`gene2GO` argument), and also a 2 columns `data.table` with preranked gene identifiants (in first column) based on statistical values (second column).

Defaults fgseaSimple parameters were used for perform test with `nperm` set to 10,000.
Defaults fgseaMultilevel parameters were used for perform test except the `eps` arg that was set to 0 for better pvalues estimation.
A gene frequency (%) of leadingEdge/size is added to output `data.table`.

### Value

a `fgsea-class` object.

### References

Korotkevich G, Sukhov V, Sergushichev A (2019). "Fast gene set enrichment analysis." bioRxiv. doi: 10.1101/060012, http://biorxiv.org/content/early/2016/06/20/060012.

### See Also

Other GO_terms: `GOcount()`, `GOterms_heatmap()`, `annotate()`, `create_topGOdata()`, `gene2GO-class`, `merge_enrich_terms()`

### Examples

    # gene list
    PregnantvsLactate<-data.table::fread(
        system.file(
            "extdata/data/input",
            "pregnantvslactate.complete.txt",
            package = "ViSEAGO"
        ),
        select = c("Id","padj")
    )

    # rank Id based on statistical value (padj here)
    PregnantvsLactate<-data.table::setorder(PregnantvsLactate,padj)

    ## Not run:
    # connect to Bioconductor
    Bioconductor<-ViSEAGO::Bioconductor2GO()

    myGENE2GO<-ViSEAGO::annotate(
       "org.Mm.eg.db",
       Bioconductor
    )

    # run fgseaMultilevel
    pregnantvslactate<-ViSEAGO::runfgsea(
        geneSel=PregnantvsLactate,
        gene2GO=myGENE2GO,
        ont="BP",
        method="fgseaMultilevel",
        params=list(
            minSize=5,
            scoreType="pos"
        )
    )

    ## End(Not run)

[Package ViSEAGO version 1.4.0 Index]