View source: R/Investigate_Functional_Enrichments.R
plotEnrichment | R Documentation |
plotEnrichment()
takes a data.frame
of enrichment results from
enrichModule()
, plots the log p-values in a bar plot, and saves it as a .pdf.
plotEnrichment(
enrichment,
nTerms = 15,
fill = "#132B43",
xlim = NULL,
nBreaks = 4,
axis.title.x.size = 20,
axis.text.x.size = 16,
axis.text.y.size = 16,
save = TRUE,
file = "Module_Enrichment_Plot.pdf",
width = 8,
height = 6,
verbose = TRUE
)
enrichment |
A |
nTerms |
A |
fill |
A |
xlim |
A |
nBreaks |
A |
axis.title.x.size |
A |
axis.text.x.size |
A |
axis.text.y.size |
A |
save |
A |
file |
A |
width |
A |
height |
A |
verbose |
A |
plotEnrichment()
is designed to be used in combination with
enrichModule()
. The top 15 gene sets are plotted by default, but this can
be expanded if needed. A ggplot
object is produced and can be edited
outside of this function if desired.
A ggplot
object.
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 enrichModule()
, 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.