View source: R/methMatrixManipulation.R
| plotSingleMoleculesWithAvr | R Documentation | 
Single molecule plot of a methylation matrix with average methylation frequency
plotSingleMoleculesWithAvr(
  mat,
  regionName,
  regionGRs,
  featureGRs,
  myXlab = "CpG/GpC position",
  featureLabel = "TSS",
  drawArrow = TRUE,
  title = NULL,
  baseFontSize = 11,
  maxNAfraction = 0.2,
  segmentSize = 3,
  colourChoice = list(low = "blue", mid = "white", high = "red", bg = "white", lines =
    "grey80"),
  colourScaleMidpoint = 0.5,
  doClustering = T
)
| mat | A methylation matrix | 
| regionName | The name of the region the matrix is taken from should match on of the IDs in regionGRs | 
| regionGRs | A genomicRanges object which includes the region which the mat matrix provides the data for. The object must contain a metadata column called "ID" containing names that match the methylation matrices in mat | 
| featureGRs | A genomicRanges object denoting features to be plotted such as the TSS | 
| 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) | 
| drawArrow | Boolean: should the feature be drawn as an arrow or just a line? (default=TRUE) | 
| title | A title for the plot (default will be the name of the region, the chr and strand on which the region is present) | 
| baseFontSize | The base font for the plotting theme (default=11 works well for 4x plots per A4 page) | 
| maxNAfraction | Maximual fraction of CpG/GpC positions that can be undefined (default=0.2) | 
| 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). | 
| doClustering | Boolean value to determine if reads should be clustered with heirarchical clustering before plotting (default=T). | 
A ggplot2 plot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.