GSCA-class {HTSanalyzeR} | R Documentation

## An S4 class for Gene Set Collection Analyses on high-throughput screens

### Description

This S4 class includes a series of methods to do gene set enrichment analysis and hypergeometric tests for high-throughput screens.

### Objects from the Class

Objects of class `GSCA` can be created from `new("GSCA", listOfGeneSetCollections, geneList, hits)` (see the examples below)

### Slots

`listOfGeneSetCollections`:

  a list of gene set collections (a 'gene set collection' is a list of gene sets).

`geneList`:

  a numeric or integer vector of phenotypes named by gene identifiers.

`hits`:

  a character vector of the gene identifiers (used as hits in the hypergeometric tests).

`para`:

  a list of parameters for hypergeometric tests and GSEA. These parameters are `pValueCutoff`, `pAdjustMethod`, `nPermutations`, `minGeneSetSize` and `exponent` (see function `analyzeGeneSetCollections` for detailed descriptions about these parameters).

`result`:

  a list of results (see the returned values in the function `analyzeGeneSetCollections`).

`summary`:

  a list of summary information for `listOfGeneSetCollections`, `geneList`, `hits`, `para`, and `result`.

`preprocessed`:

  a single logical value specifying whether or not the input data has been preprocessed.

### Methods

An overview of methods with class-specific functionality: More detailed introduction can be found in help for each specific function.

`preprocess`

  do preprocessing on input vectors of phenotypes and hits including: a) removing NAs in the `geneList` and `hits`; b) invoking function `duplicateRemover` to process duplicated phenotypes (see `duplicateRemover` for more details); c) invoking function `annotationConvertor` to convert annotations; d) ranking phenotypes in a decreasing order.

`analyze`

  perform hypergeometric tests and Gene Set Enrichment Analysis based on input parameter list `para`.

`appendGSTerms`

  append gene set terms to GSCA results

`summarize`

  print summary information about `listOfGeneSetCollections`, `geneList`, `hits`, `para`, and `result`.

`getTopGeneSets`

  select top significant gene sets from `object@results$`resultName`` by setting `ntop` or `allSig`.

`writeHits`

  write observed hits in gene sets for hypergeometric tests.

`viewGSEA`

  view a figure of GSEA results for a gene set in a gene set collection.

`plotGSEA`

  plot and save figures of GSEA results for top significant gene sets in a gene set collection.

`viewEnrichMap`

  plot an enrichment map for GSEA or hypergeometric test results

`plotEnrichMap`

  plot and save an enrichment map for GSEA or hypergeometric test results

`report`

  generate html reports.

### Author(s)

Xin Wang xw264@cam.ac.uk

### See Also

`preprocess` `analyze` `appendGSTerms` `summarize` `getTopGeneSets` `writeHits` `viewGSEA` `plotGSEA` `viewEnrichMap` `plotEnrichMap` `report`

### Examples

    ## Not run:
    library(org.Dm.eg.db)
    library(KEGG.db)
    library(AnnotationDbi)
    ##library(igraph)
    ##load data for enrichment analyses
    data("KcViab_Data4Enrich")
    ##select hits
    hits <- names(KcViab_Data4Enrich)[which(abs(KcViab_Data4Enrich) > 2)]
    ##set up a list of gene set collections
    PW_KEGG <- KeggGeneSets(species = "Dm")
    gscs <- list(PW_KEGG = PW_KEGG)
    ##create an object of class 'GSCA'
    gsca <- new("GSCA", listOfGeneSetCollections=gscs, geneList =
    KcViab_Data4Enrich, hits = hits)
    ##do preprocessing (KcViab_Data4Enrich has already been preprocessed)
    gsca <- preprocess(gsca, species="Dm", initialIDs = "Entrez.gene",
    keepMultipleMappings = TRUE, duplicateRemoverMethod = "max",
    orderAbsValue = FALSE)
    ##do hypergeometric tests and GSEA
    gsca <- analyze(gsca, para = list(pValueCutoff = 0.05, pAdjustMethod
    = "BH", nPermutations = 1000, minGeneSetSize = 60, exponent = 1))
    ##print summary information
    summarize(gsca)
    ##get all significant gene sets in "PW_KEGG"
    sigGSs<-getTopGeneSets(gsca, "GSEA.results", "PW_KEGG", allSig=TRUE)
    ##view a GSEA figure
    viewGSEA(gsca, gscName="PW_KEGG", gsName=sigGSs[["PW_KEGG"]][1])
    dev.off()
    ##append gene set terms to results
    gsca<-appendGSTerms(gsca, keggGSCs="PW_KEGG")
    ##view an enrichment map for GSEA results
    eb<-viewEnrichMap(gsca, gscs="PW_KEGG", allSig=TRUE, gsNameType="term",
    displayEdgeLabel=FALSE, layout="layout.fruchterman.reingold")
    ##write html reports
    report(object = gsca, experimentName = "GSCATest", species = "Dm",
    allSig = TRUE, keggGSCs = "PW_KEGG", reportDir="GSCATestReport")
    ##browse the index page
    browseURL(file.path(getwd(), "GSCATestReport", "index.html"))

    ## End(Not run)

[Package HTSanalyzeR version 2.34.1 Index]