runTopGO: runTopGO

Description Usage Arguments Value Examples

View source: R/enrichment_analysis.R

Description

A wrapper function to facilitate GO term enrichment analysis using topGO package

Usage

1
runTopGO(ontology = "BP", species = "human", backgroundGenes, targetedGenes)

Arguments

ontology

A character string denoting which type of GO ontology to use. Options are BP (biological processes), MF (molecular functions) and CC (cellular compartments).

species

A character string denoting which species is under analysis. Options are 'human', 'mouse', 'fly' and 'worm'.

backgroundGenes

A vector of Ensembl gene ids that serve as background set of genes for GO term enrichment. In the context of RCAS, this should be the whole set of genes found in an input GTF data.

targetedGenes

A vector of Ensembl gene ids that serve as the set for which GO term enrichment should be carried out. In the context of RCAS, this should be the set of genes that overlap with the query regions in an input BED file.

Value

A data.frame object containing enriched GO terms and associated statistics

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
#get all genes from the gff data
data(gff)
data(queryRegions)
backgroundGenes <- unique(gff$gene_id)
#get genes that overlap query regions
overlaps <- queryGff(queryRegions, gff)
targetedGenes <- unique(overlaps$gene_id)
#run TopGO
goResults = runTopGO( ontology = 'BP',
                      species = 'human',
                      backgroundGenes = backgroundGenes,
                      targetedGenes = targetedGenes)
                      
## End(Not run)

RCAS documentation built on Nov. 1, 2018, 2:54 a.m.