plotClassesSingleMolecule | R Documentation |
Create a single molecule plot of the reads sorted by class.
plotClassesSingleMolecule( dataOrderedByClass, numClasses, xRange = c(-250, 250), title = "Reads by classes", myXlab = "CpG/GpC position", featureLabel = "TSS", baseFontSize = 12, segmentSize = 5, colourChoice = list(low = "blue", mid = "white", high = "red", bg = "white", lines = "black"), colourScaleMidpoint = 0.5, classesToPlot = NULL )
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. |
numClasses |
Number of classes |
xRange |
A vector of the first and last coordinates of the region to plot (default is c(-250,250)) |
title |
A title for the plot (default is "Reads by classes") |
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) |
segmentSize |
Length of colour segment denoting methylation site |
colourChoice |
A list of colours for colour pallette. Must include values for "low", "mid", "high" and "bg" (background) and "lines". |
colourScaleMidpoint |
Numerical value for middle of colour scale. Useful for Nanopore data where a particular threshold other than 0.5 is used to distinguish methylated from non-methylated sites. (default=0.5). |
classesToPlot |
A numerical vector indicating which classes to plot (default NULL will plot all classes) |
Returns a ggplot2 object of a single molecule plot sorted by classes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.