merge_enrich_terms {ViSEAGO} | R Documentation

## Merge enriched GO terms.

### Description

combine results from GO enrichment tests obtained with topGO package, for a given ontology (MF, BP, or CC).

### Usage

    merge_enrich_terms(Input, envir = .GlobalEnv)

    ## S4 method for signature 'list,environment'
    merge_enrich_terms(Input,
      envir = .GlobalEnv)

### Arguments

`Input` | a list containing named elements. Each element must contain the name of `topGOdata-class` object created by `create_topGOdata` method and the associated `topGOresult-class` object(s).
`envir` | objects environment (default to .GlobalEnv).

### Details

This method extracts for each result of GO enrichment test (`topGOresult-class` object) and corresponding GO annotations (`topGOdata-class` object): informations about GO term (identifiant, name, and description), gene frequency (number of significant genes / Annotated genes), pvalue, -log10(pvalue), significant genes identifiants (GeneID, or Ensembl ID, or uniprot accession), and gene symbols. At the last, this method builds a merged data.table of enriched GO terms (p<0.01) at least once and provides all mentionned columns.

### Value

an `enrich_GO_terms-class` object.

### References

Alexa A and Rahnenfuhrer J (2016). topGO: Enrichment Analysis for Gene Ontology. R package version 2.28.0.

Matt Dowle and Arun Srinivasan (2017). data.table: Extension of data.frame. R package version 1.10.4. https://CRAN.R-project.org/package=data.table

Herve Pages, Marc Carlson, Seth Falcon and Nianhua Li (2017). AnnotationDbi: Annotation Database Interface. R package version 1.38.0.

### See Also

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

### Examples

    ###################
    # load genes identifiants (GeneID,ENS...) universe/background (Expressed genes)
    background_L<-scan(
        system.file(
            "extdata/data/input",
            "background_L.txt",
            package = "ViSEAGO"
        ),
        quiet=TRUE,
        what=""
    )

    ###################
    # load Differentialy Expressed (DE) gene identifiants from files
    PregnantvslactateDE<-scan(
        system.file(
            "extdata/data/input",
            "pregnantvslactateDE.txt",
            package = "ViSEAGO"
        ),
        quiet=TRUE,
        what=""
    )

    VirginvslactateDE<-scan(
        system.file(
            "extdata/data/input",
            "virginvslactateDE.txt",
            package = "ViSEAGO"
        ),
        quiet=TRUE,
        what=""
    )

    VirginvspregnantDE<-scan(
        system.file(
            "extdata/data/input",
            "virginvspregnantDE.txt",
            package="ViSEAGO"
        ),
        quiet=TRUE,
        what=""
    )
    ## Not run:
    ###################
    # create topGOdata for BP for each list of DE genes
    BP_Pregnantvslactate<-ViSEAGO::create_topGOdata(
        geneSel=PregnantvslactateDE,
        allGenes=background_L,
        gene2GO=myGENE2GO,
        ont="BP",
        nodeSize=5
    )

    BP_Virginvslactate<-ViSEAGO::create_topGOdata(
        geneSel=VirginvslactateDE,
        allGenes=background_L,
        gene2GO=myGENE2GO,
        ont="BP",
        nodeSize=5
    )

    BP_Virginvspregnant<-ViSEAGO::create_topGOdata(
        geneSel=VirginvspregnantDE,
        allGenes=background_L,
        gene2GO=myGENE2GO,
        ont="BP",
        nodeSize=5
    )

    ###################
    # perform TopGO tests
    elim_BP_Pregnantvslactate<-topGO::runTest(
        BP_L_pregnantvslactate,
        algorithm ="elim",
        statistic = "fisher"
    )

    elim_BP_Virginvslactate<-topGO::runTest(
        BP_L_virginvslactate,
        algorithm ="elim",
        statistic = "fisher"
    )

    elim_BP_Virginvspregnant<-topGO::runTest(
        BP_L_virginvspregnant,
        algorithm ="elim",
        statistic = "fisher"
    )

    ###################
    # merge topGO results
    BP_sResults<-ViSEAGO::merge_enrich_terms(
        Input=list(
            Pregnantvslactate=c("BP_Pregnantvslactate","elim_BP_Pregnantvslactate"),
            Virginvslactate=c("BP_Virginvslactate","elim_BP_Virginvslactate"),
            Virginvspregnant=c("BP_Virginvspregnant","elim_BP_Virginvspregnant")
        )
    )

    ## End(Not run)

[Package ViSEAGO version 1.0.0 Index]