fagroupstopgo_class: S4 class for FuncAnnotGroupsTopGO object

Description Constructor Accessors Examples

Description

This function conducts functional enrichment analysis for sets of genes generated by GeneGroups function.

Constructor

FuncAnnotGroupsTopGO(groups, namespace, customAnnot, annot, bggenes, ...), where:

groups - object of GeneGroups class

namespace - character string specifing GO namespace ("BP", "MF" or "CC")

customAnnot - Use if mapping argument is set to "custom". It can be an object generated by GAFReader or readGAF function from mgsa package or list which has GO term ids as keys and character vectors contain gene ids as values.

annot - from TopGO manual: These functions are used to compile a list of GO terms such that each element in the list is a character vector containing all the gene identifiers that are mapped to the respective GO term.

bggenes - vector contains background set of genes

... - other parameters:

genesannot - minimal number of genes annotated to a term in the annotation. 1 by default

algorithm - from TopGO manual: character string specifing which algorithm to use. The algorithms are shown by the topGO whichAlgorithms() function. "classic" by default

statistic - from TopGO manual: character string specifing which test to use. The statistical tests are shown by the topGO whichTests() function. "fisher" by default

mapping - from TopGO manual: character string specifieng the name of the Bioconductor package containing the gene mappings for a specific organism. For example: mapping = "org.Hs.eg.db". "custom" by default

ID - from TopGO manual: character string specifing the gene identifier to use. Currently only the following identifiers can be used: c("entrez", "genbank", "alias", "ensembl", "symbol", "genename", "unigene")

Accessors

In the code examples below object is an object of FuncAnnotGroupsTopGO class

getResultList(object) - returns list of functional annotation result tables

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# read .gaf file (in this example gaf file with annotation for \emph{A.thaliana} is used)
library(topGO)
gaf_path <- system.file("extdata", "gene_association.tair.lzma",
                         package = "FoldGO", mustWork = TRUE)
# read gaf file and convert annoitation in the list format
# contains GO term id's as keys and Gene ID's as values
gaf <- GAFReader(file = gaf_path, geneid_col = 10)
# split DEG genes into quantiles
gene_groups <- GeneGroups(degenes, 2)
# run enrichment test
annotobj <- FuncAnnotGroupsTopGO(gene_groups,"BP", customAnnot = gaf,
                                 annot = topGO::annFUN.GO2genes,
                                 bggenes = bggenes, padjmethod = "BH",
                                 qitborder = 10, genesannot = 1)

# get results of functional enrichment analysis in a tabular form:
getResultList(annotobj)

FoldGO documentation built on Nov. 8, 2020, 7:50 p.m.