plotAllMatrices: Plot a list of list of single molecule matrices

View source: R/methMatrixManipulation.R

plotAllMatricesR Documentation

Plot a list of list of single molecule matrices

Description

This function takes a list (by sample) of a list (by genomic region) of methylation matrices and produces single molecule plots for each amplicon with four samples per page.

Usage

plotAllMatrices(
  allSampleMats,
  samples,
  regionGRs,
  featureGRs,
  regionType,
  featureLabel = "TSS",
  maxNAfraction = 0.2,
  withAvr = FALSE,
  includeInFileName = "",
  drawArrow = TRUE,
  workDir = "."
)

Arguments

allSampleMats

A list (by sample) of lists (by regions) of methylation matrices

samples

A list of samples to plot (same as sample names in allSampleMats)

regionGRs

A genomic regions object with all regions for which matrices should be extracted (same as in allSampleMats). The metadata columns must contain a column called "ID" with a unique ID for each region.

featureGRs

A genomic regions object for features (such as TSS) to be plotted. Feature must be identified with the same ID as the regionGRs

regionType

A collective name for this list of regions (e.g TSS or amplicons). It will be used in naming the output directories

featureLabel

A string with a label for the feature to be added to the plot (default="TSS")

maxNAfraction

Maximual fraction of CpG/GpC positions that can be undefined (default=0.2)

withAvr

Boolean value: should single molecule plots be plotted together with the average profile (default=FALSE)

includeInFileName

String to be included at the end of the plot file name, e.g. experiment name (default="")

drawArrow

Boolean: should the feature be drawn as an arrow or just a line? (default=TRUE)

workDir

Path to working directory

Value

Plots are written to plots directory


jsemple19/methMatrix documentation built on Aug. 19, 2022, 3:57 p.m.