xA2EnricherGenes: Function to conduct enrichment analysis given a list of gene...

Description Usage Arguments Value Note See Also Examples

View source: R/xA2EnricherGenes.r

Description

xA2EnricherGenes is supposed to conduct enrichment analysis given a list of gene sets and a list of pathway sets. It returns an object of the class 'ls_eTerm'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
xA2EnricherGenes(list_vec, background = NULL, check.symbol.identity =
FALSE,
ontologies = c("KEGG", "KEGGmetabolism", "KEGGgenetic",
"KEGGenvironmental",
"KEGGcellular", "KEGGorganismal", "KEGGdisease", "REACTOME",
"REACTOME_ImmuneSystem", "REACTOME_SignalTransduction", "AA"),
size.range = c(10, 2000), min.overlap = 3, test = c("hypergeo",
"fisher", "binomial"), background.annotatable.only = NULL,
p.tail = c("one-tail", "two-tails"), p.adjust.method = c("BH", "BY",
"bonferroni", "holm", "hochberg", "hommel"), verbose = TRUE,
silent = FALSE, plot = TRUE, fdr.cutoff = 0.05,
displayBy = c("zscore", "fdr", "pvalue", "fc", "or"),
RData.location = "http://galahad.well.ox.ac.uk/bigdata")

Arguments

list_vec

an input vector containing gene symbols. Alternatively it can be a list of vectors, representing multiple groups of genes

background

a background vector containing gene symbols as the test background. If NULL, by default all annotatable are used as background

check.symbol.identity

logical to indicate whether to match the input data/background via Synonyms for those unmatchable by official gene symbols. By default, it sets to false

ontologies

the ontologies supported currently. It can be 'AA' for AA-curated pathways, KEGG pathways (including 'KEGG' for all, 'KEGGmetabolism' for 'Metabolism' pathways, 'KEGGgenetic' for 'Genetic Information Processing' pathways, 'KEGGenvironmental' for 'Environmental Information Processing' pathways, 'KEGGcellular' for 'Cellular Processes' pathways, 'KEGGorganismal' for 'Organismal Systems' pathways, and 'KEGGdisease' for 'Human Diseases' pathways), 'REACTOME' for REACTOME pathways or 'REACTOME_x' for its sub-ontologies (where x can be 'CellCellCommunication', 'CellCycle', 'CellularResponsesToExternalStimuli', 'ChromatinOrganization', 'CircadianClock', 'DevelopmentalBiology', 'DigestionAndAbsorption', 'Disease', 'DNARepair', 'DNAReplication', 'ExtracellularMatrixOrganization', 'GeneExpression(Transcription)', 'Hemostasis', 'ImmuneSystem', 'Metabolism', 'MetabolismOfProteins', 'MetabolismOfRNA', 'Mitophagy', 'MuscleContraction', 'NeuronalSystem', 'OrganelleBiogenesisAndMaintenance', 'ProgrammedCellDeath', 'Reproduction', 'SignalTransduction', 'TransportOfSmallMolecules', 'VesicleMediatedTransport')

size.range

the minimum and maximum size of members of each term in consideration. By default, it sets to a minimum of 10 but no more than 2000

min.overlap

the minimum number of overlaps. Only those terms with members that overlap with input data at least min.overlap (3 by default) will be processed

test

the test statistic used. It can be "fisher" for using fisher's exact test, "hypergeo" for using hypergeometric test, or "binomial" for using binomial test. Fisher's exact test is to test the independence between gene group (genes belonging to a group or not) and gene annotation (genes annotated by a term or not), and thus compare sampling to the left part of background (after sampling without replacement). Hypergeometric test is to sample at random (without replacement) from the background containing annotated and non-annotated genes, and thus compare sampling to background. Unlike hypergeometric test, binomial test is to sample at random (with replacement) from the background with the constant probability. In terms of the ease of finding the significance, they are in order: hypergeometric test > fisher's exact test > binomial test. In other words, in terms of the calculated p-value, hypergeometric test < fisher's exact test < binomial test

background.annotatable.only

logical to indicate whether the background is further restricted to the annotatable. By default, it is NULL: if ontology.algorithm is not 'none', it is always TRUE; otherwise, it depends on the background (if not provided, it will be TRUE; otherwise FALSE). Surely, it can be explicitly stated

p.tail

the tail used to calculate p-values. It can be either "two-tails" for the significance based on two-tails (ie both over- and under-overrepresentation) or "one-tail" (by default) for the significance based on one tail (ie only over-representation)

p.adjust.method

the method used to adjust p-values. It can be one of "BH", "BY", "bonferroni", "holm", "hochberg" and "hommel". The first two methods "BH" (widely used) and "BY" control the false discovery rate (FDR: the expected proportion of false discoveries amongst the rejected hypotheses); the last four methods "bonferroni", "holm", "hochberg" and "hommel" are designed to give strong control of the family-wise error rate (FWER). Notes: FDR is a less stringent condition than FWER

verbose

logical to indicate whether the messages will be displayed in the screen. By default, it sets to false for no display

silent

logical to indicate whether the messages will be silent completely. By default, it sets to false. If true, verbose will be forced to be false

plot

logical to indicate whether heatmap plot is drawn

fdr.cutoff

fdr cutoff used to declare the significant terms. By default, it is set to 0.05. This option only works when setting plot (see above) is TRUE

displayBy

which statistics will be used for drawing heatmap. It can be "fc" for enrichment fold change, "fdr" for adjusted p value (or FDR), "pvalue" for p value, "zscore" for enrichment z-score (by default), "or" for odds ratio. This option only works when setting plot (see above) is TRUE

RData.location

the characters to tell the location of built-in RData files. See xRDataLoader for details

Value

an object of class "ls_eTerm", a list with following components:

Note

none

See Also

xA2EnricherGenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Load the library
library(A2)
RData.location <- "http://galahad.well.ox.ac.uk/bigdata_dev/"

# Gene-based enrichment analysis using ontologies (REACTOME and KEGG)
# a) provide the input Genes of interest (eg 200 randomly chosen human genes)
## load human genes
org.Hs.eg <- xRDataLoader(RData='org.Hs.eg',
RData.location=RData.location)
set.seed(825)
data <- as.character(sample(org.Hs.eg$gene_info$Symbol, 200))
data

# optionally, provide the test background (if not provided, all human genes)
#background <- as.character(org.Hs.eg$gene_info$Symbol)

## Not run: 
# b) perform enrichment analysis
ls_eTerm <- xA2EnricherGenes(data, ontologies=c("KEGG","REACTOME"),
RData.location=RData.location)
ls_eTerm

## forest plot of enrichment results
gp <- xEnrichForest(ls_eTerm, top_num=10, signature=FALSE)

## End(Not run)

A2 documentation built on May 2, 2019, 5 p.m.

Related to xA2EnricherGenes in A2...