plotEachRepeat: Plot single molecule and class means for individual repeats

View source: R/EMbasic.R

plotEachRepeatR Documentation

Plot single molecule and class means for individual repeats

Description

Plot single molecule and class means for individual repeats

Usage

plotEachRepeat(
  dataOrderedByClass,
  outFileBase,
  outPath,
  numClasses,
  EMrep,
  classMeans,
  xRange,
  myXlab,
  featureLabel,
  baseFontSize
)

Arguments

dataOrderedByClass

A matrix of methylation or bincount values (reads x position) that have been ordered by class. The assigned class, e.g. "__class1" etc has been appended to read names.

outFileBase

A string that will be used in the filenames and titles of the plots produced

outPath

path to directory where plots will be saved

numClasses

An integer indicating the number of classes to learn

EMrep

An integer indicating which repeat of the EM this is

classMeans

A matrix (classes x position) of the average methlyation profile of each class classes

xRange

A vector of the first and last coordinates of the region to plot (default is c(-250,250))

myXlab

A label for the x axis (default is "CpG/GpC position")

featureLabel

A label for a feature you want to plot, such as the position of the TSS (default="TSS")

baseFontSize

The base font for the plotting theme (default=12 works well for 4x plots per A4 page)

Value

Returns a ggplot2 object


jsemple19/EMclassifieR documentation built on Aug. 12, 2022, 2:57 p.m.