plot_epimutations: Plot a given epimutation and locate it along the genome

View source: R/plot_epimutations.R

plot_epimutationsR Documentation

Plot a given epimutation and locate it along the genome

Description

This function plots a given epimutation and UCSC annotations for the specified genomic region.

Usage

plot_epimutations(
  dmr,
  methy,
  genome = "hg19",
  genes_annot = FALSE,
  regulation = FALSE,
  from = NULL,
  to = NULL
)

Arguments

dmr

epimutation obtained as a result of epimutations function.

methy

a GenomicRatioSet object containing the information of control and case samples used for the analysis in the epimutations function. See the constructor function GenomicRatioSet, makeGenomicRatioSetFromMatrix.

genome

a character string specifying the genome of reference. It can be set as "hg38", "hg19" and "hg18". The default is "hg19".

genes_annot

a boolean. If TRUE gene annotations are plotted. Default is FALSE.

regulation

a boolean. If TRUE UCSC annotations for CpG Islands, H3K27Ac, H3K4Me3 and H3K27Me3 are plotted. The default is FALSE. The running process when regulation is TRUE can take several minutes.

from, to

scalar, specifying the range of genomic coordinates for the plot of gene annotation region. If NULL the plotting ranges are derived from the individual track. Note that from cannot be larger than to.

Details

The tracks are plotted vertically. Each track is separated by different background colour and a section title. The colours and titles are preset and cannot be set by the user.

Note that if you want to see the UCSC annotations maybe you need to take a bigger genomic region.

Value

The function returns a plot divided in two parts:

  • ggplot graph including the individual with the epimutation in red, the control samples in dashed black lines and population mean in blue. Grey shaded regions indicate 1, 1.5 and 2 standard deviations from the mean of the distribution.

  • UCSC gene annotations for the specified genomic region (if genes == TRUE)

  • UCSC annotations for CpG Islands, H3K27Ac, H3K4Me3 and H3K27Me3 (if regulation == TRUE)

Examples


data(GRset)
data(res.epi.manova)
plot_epimutations(res.epi.manova[1,], GRset)


isglobal-brge/epimutacions documentation built on April 22, 2024, 4:08 a.m.