View source: R/Investigate_Functional_Enrichments.R
enrichModule | R Documentation |
enrichModule()
takes a data.frame
of regions with module
assignments, filters it for the module(s) of interest, and submits it to
GREAT for functional enrichment analysis compared to gene sets in the
specified ontologies. The results are then processed and saved as a .txt file.
enrichModule(
regions,
module = NULL,
genome = c("hg38", "hg19", "hg18", "mm10", "mm9", "danRer7"),
includeCuratedRegDoms = FALSE,
rule = c("basalPlusExt", "twoClosest", "oneClosest"),
adv_upstream = 5,
adv_downstream = 1,
adv_span = 1000,
adv_twoDistance = 1000,
adv_oneDistance = 1000,
version = c("4.0.4", "3.0.0", "2.0.2"),
ontologies = c("GO Molecular Function", "GO Biological Process",
"GO Cellular Component", "Mouse Phenotype", "Human Phenotype"),
min_background_region_hits = 5,
adjMethod = c("fdr", "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "none"),
min_region_hits = 2,
pvalue_threshold = 0.01,
save = TRUE,
file = "Module_Enrichment_Results.txt",
verbose = TRUE
)
regions |
A |
module |
A |
genome |
A |
includeCuratedRegDoms |
A |
rule |
A |
adv_upstream |
A |
adv_downstream |
A |
adv_span |
A |
adv_twoDistance |
A |
adv_oneDistance |
A |
version |
A |
ontologies |
A |
min_background_region_hits |
A |
adjMethod |
A |
min_region_hits |
A |
pvalue_threshold |
A |
save |
A |
file |
A |
verbose |
A |
Submission to GREAT is performed by the rGREAT package, which allows
for different annotation rules and versions of GREAT. The default
basalPlusExt
annotation rule associates a gene with a region if the
region is within the basal regulatory domain of the gene (5 kb upstream and 1
kb downstream of the TSS) or if it is within 1 Mb upstream or downstream of
the TSS and not in the basal regulatory domain of another gene. Other rules
include twoClosest
and oneClosest
, which effectively assign the
two nearest genes or one nearest genes, respectively. See
rGREAT::submitGreatJob()
for more details.
GREAT supports different genomes depending on the version:
hg38
, hg19
, mm10
, mm9
hg19
, mm10
, mm9
, danRer7
hg19
, hg18
, mm9
, danRer7
Functional enrichment analysis is performed for regions in the module(s) of
interest relative to the background set of all regions in regions
,
including the grey (unassigned) module. These regions are compared for overlap
with the regulatory domains of genes annotated to functional gene sets of the
ontologies of interest. The default ontologies include
GO Molecular Function
, GO Biological Process
,
GO Cellular Component
, Mouse Phenotype
, and
Human Phenotype
. Initial enrichment results are filtered for terms
with a minimum number of overlaps with the background set of regions,
p-values are adjusted for multiple comparisons using the specified method,
and then the results are filtered again for a minimum number of overlaps with
the module(s) of interest and a p-value threshold. Finally, gene symbols are
obtained for the significant gene sets, and the result is saved as a .txt
file.
A data.frame
of functional enrichment results.
getModules()
to build a comethylation network and identify
modules of comethylated regions.
annotateModule()
and getGeneList()
to annotate a set of
regions with genes and regulatory context and then extract
the gene symbols or IDs.
listOntologies()
and plotEnrichment()
to investigate
functional enrichment of module regions with GREAT.
## Not run:
# Get Comethylation Modules
modules <- getModules(methAdj, power = sft$powerEstimate, regions = regions,
corType = "pearson", file = "Modules.rds")
# Annotate Modules
regionsAnno <- annotateModule(regions, module = "bisque4",
genome = "hg38",
file = "Annotated_bisque4_Module_Regions.txt")
geneList_bisque4 <- getGeneList(regionsAnno, module = "bisque4")
# Analyze Functional Enrichment
ontologies <- listOntologies("hg38", version = "4.0.4")
enrich_bisque4 <- enrichModule(regions, module = "bisque4",
genome = "hg38",
file = "bisque4_Module_Enrichment.txt")
plotEnrichment(enrich_bisque4,
file = "bisque4_Module_Enrichment_Plot.pdf")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.