EpiMix_PlotProbe: The EpiMix_PlotProbe function

View source: R/PlotProbe.R

EpiMix_PlotProbeR Documentation

The EpiMix_PlotProbe function

Description

plot the genomic coordinate and the chromatin state of a specific CpG probe and the nearby genes.

Usage

EpiMix_PlotProbe(
  probe.name,
  EpiMixResults,
  met.platform = "HM450",
  roadmap.epigenome.id = "E002",
  numFlankingGenes = 20,
  left.gene.margin = 10000,
  right.gene.margin = 10000,
  gene.name.pos = 2,
  gene.name.size = 0.5,
  gene.arrow.length = 0.05,
  gene.line.width = 2,
  plot.chromatin.state = TRUE,
  y.label.font = 0.8,
  y.label.margin = 0.1,
  axis.number.font = 0.5,
  chromatin.label.font = 0.7,
  chromatin.label.margin = 0.02
)

Arguments

probe.name

character string indicating the CpG probe name.

EpiMixResults

resulting list object returned from EpiMix.

met.platform

character string indicating the type of micro-array where the DNA methylation data were collected.Can be either 'HM27', 'HM450' or 'EPIC'. Default: 'HM450'

roadmap.epigenome.id

character string indicating the epigenome id (EID) for a reference tissue or cell type. Default: 'E002'. If the value is empty (""), no histone modifications plot will show.\ Note: Keep this value empty if using the Windows system, since this feature is not supported in Windows.

numFlankingGenes

numeric value indicating the number of flanking genes to be plotted with the CpG probe. Default: 20 (10 gene upstream and 10 gene downstream).

left.gene.margin

numeric value indicating the number of extra nucleotide bases to be plotted on the left side of the image. Default: 10000.

right.gene.margin

numeric value indicating the number of extra nucleotide bases to be plotted on the right side of the image. Default: 10000.

gene.name.pos

integer indicating the position for plotting the gene name relative to the gene structure. Should be 1 or 2 or 3 or 4, indicating bottom, left, top, and right, respectively.

gene.name.size

numeric value indicating the font size of the gene names in pixels.

gene.arrow.length

numeric value indicating the size of the arrow which indicates the positioning of the gene.

gene.line.width

numeric value indicating the line width for the genes.

plot.chromatin.state

logical indicating whether to plot the DNase-seq and histone ChIP-seq signals. Warnings: If the 'numFlankingGenes' is a larger than 15, plotting the chromatin state may flood the internal memory.

y.label.font

font size of the y axis label.

y.label.margin

distance between y axis label and y axis.

axis.number.font

font size of axis ticks and numbers.

chromatin.label.font

font size of the labels of the histone proteins.

chromatin.label.margin

distance between the histone protein labels and axis.

Details

this function requires additional dependencies: karyoploteR, TxDb.Hsapiens.UCSC.hg19.knownGene, org.Hs.eg.db

roadmap.epigenome.id: since the chromatin state is tissue or cell-type specific, EpiMix needs to know the reference tissue or cell type in order to retrieve the proper DNase-seq and histone ChIP-seq data. Available epigenome ids can be obtained from the Roadmap Epigenomic study (Nature, PMID: 25693563, figure 2). They can also be retrieved from the list.epigenomes() function.

Value

plot with CpG probe and nearby genes. Genes whose expression is significantly negatively associated with the methylation of the probe are shown in red, while the others are shown in black.

Examples


library(karyoploteR)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(org.Hs.eg.db)
library(regioneR)

data(Sample_EpiMixResults_Regular)

# The CpG site to plot
probe.name = 'cg00374492'

# The number of adjacent genes to be plotted
numFlankingGenes = 10

# Set up the reference cell/tissue type
roadmap.epigenome.id = 'E096'

# Generate the plot
EpiMix_PlotProbe(probe.name = probe.name,
                 EpiMixResults = Sample_EpiMixResults_Regular,
                 met.platform = 'HM450',
                 roadmap.epigenome.id = roadmap.epigenome.id,
                 numFlankingGenes = numFlankingGenes)




gevaertlab/EpiMix documentation built on July 20, 2023, 9:28 a.m.