runEnrich: Enrichment analysis through GOstats

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/runAn.R

Description

This function tests the enrichment of the components of an IcaSet object using package GOstats through function hyperGTest.

Usage

1
2
3
  runEnrich(icaSet, params, dbs = c("KEGG", "GO"),
    ontos = c("BP", "CC", "MF"), cond = TRUE,
    hgCutoff = params["pvalCutoff"])

Arguments

icaSet

An object of class IcaSet

params

An object of class MineICAParams providing the parameters of the analysis

dbs

The database to use, default is c("GO","KEGG")

ontos

A string specifying the GO ontology to use. Must be one of "BP", "CC", or "MF", see GOHyperGParams-class. Only used when argument dbs includes "GO".

cond

A logical indicating whether the calculation should condition on the GO structure, see GOHyperGParams-class. Only used when argument dbs includes "GO".

hgCutoff

The threshold p-value for statistical significance, default is pvalCutoff(params)

Details

An annotation package should be available in annotation(icaSet) to provide the contents of the gene sets. If none corresponds to the technology you deal with, please choose the org.*.eg.db package according to the organism (for example org.Hs.eg.db for Homo sapiens). By default, if annotation(icaSet) is empty and organism is one of c("Human","HomoSapiens","Mouse","Mus Musculus"), then either org.Hs.eg.db or org.Mm.eg.db is used.

Use of GOstats requires the input IDs to be Entrez Gene, this function will therefore annotate either the feature names or the gene names into Entrez Gene ID using either the annotation package (annotation(icaSet)) or biomaRt.

Three types of enrichment tests are computed for each component: the threshold is first used to select gene based on their absolute projections, then positive and negative projections are treated individually.

For each database db (each ontology if db is "GO"), this function writes an HTML file containing the outputs of the enrichment tests computed through the function hyperGTest. The corresponding files are located in resPath(icaSet)/GOstatsEnrichAnalysis/byDb/. The results obtained for each database/ontology are then merged into an array for each component, this array is written as an HTML file in the directory resPath(icaSet)/GOstatsEnrichmentAnalysis/ (this directory is first deleted if it already exists). This file is the one the user should look at.

The outputs of hyperGTest that are given in each table are:

DB, ID, Term:

the database, the gene set ID, and the gene Set name

P-value:

probability of observing the number of genes annotated for the gene set among the selected gene list, knowing the total number of annotated genes among the universe

,

Expected counts:

expected number of genes in the selected gene list to be found at each tested category term/gene set,

Odds ratio:

odds ratio for each category term tested which is an indicator of the level of enrichment of genes within the list as against the universe,

Counts:

number of genes in the selected gene list that are annotated for the gene set,

Size:

number of genes from the universe annotated for the gene set.

Value

NULL

Author(s)

Anne Biton

See Also

buildIcaSet, useMart, hyperGTest, GOHyperGParams, hypergeoAn, mergeGostatsResults

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Load examples of IcaSet object
data(icaSetCarbayo)

## Define parameters
# Use threshold 3 to select contributing genes on which enrichment analysis will be applied
# Results of enrichment analysis will be written in path 'resPath(params)/GOstatsEnrichAnalysis'
params <- buildMineICAParams(resPath="carbayo/", selCutoff=3)

## Run enrichment analysis on the first two components contained in the icaSet object 'icaSetCarbayo'
runEnrich(params=params,icaSet=icaSetCarbayo[,,1:2],dbs="GO", ontos="BP")


## End(Not run)

Bioconductor-mirror/MineICA documentation built on May 29, 2017, 8:30 a.m.