View source: R/Annotate_Modules.R
annotateModule | R Documentation |
annotateModule()
takes a data.frame
of regions with module
assignments, annotates them with genes using GREAT, adds additional gene
information with Ensembl BioMart, provides gene regulatory context with
annotatr, and then saves this as a .txt file. Support is provided for several
genomes, including hg38
, hg19
, hg18
, mm10
,
mm9
, and danRer7
.
annotateModule(
regions,
module = NULL,
grey = FALSE,
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"),
save = TRUE,
file = "Annotated_Module_Regions.txt",
verbose = TRUE
)
regions |
A |
module |
A |
grey |
A |
genome |
A |
includeCuratedRegDoms |
A |
rule |
A |
adv_upstream |
A |
adv_downstream |
A |
adv_span |
A |
adv_twoDistance |
A |
adv_oneDistance |
A |
version |
A |
save |
A |
file |
A |
verbose |
A |
regions
can be filtered for one or more modules of interest, or the
grey (unassigned) module can be excluded. Gene annotation 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
Gene information is provided by the biomaRt package, which adds the gene
description along with Ensembl and NCBI Entrez gene IDs. Regulatory context
is added by the annotatr package. This provides positional context of
the region relative to nearby genes, enhancers, and CpG islands. Note that
annotatr does not support the hg18
or danRer7
genomes.
A data.frame
adding gene and regulatory annotations to the
regions.
getModules()
to build a comethylation network and identify
modules of comethylated regions.
getGeneList()
to extract a list of genes or IDs from the
annotated regions.
listOntologies()
, enrichModule()
, 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.