View source: R/classifyByKnownClasses.R
runClassLikelihoodRpts | R Documentation |
Reads are classified into different classes based on likelihood estimation using the class means. Due to the need for randomisation when binarisation of the methylation matrix, the classification is carried out repeatedly and then the most frequently assigned class is chosen.
runClassLikelihoodRpts( dataMatrix, classes, numRepeats = 20, outPath = ".", xRange = c(-250, 250), outFileBase = "", myXlab = "CpG/GpC position", featureLabel = "TSS", baseFontSize = 12, figFormat = "png", distMetric = list(name = "euclidean"), classesToPlot = NULL )
dataMatrix |
A matrix of methylation or bincount values (reads x position) |
classes |
A matrix of classes x position giving the mean frequency of methylation at each position for each class |
numRepeats |
An integer indicating the number of times to repeat the clustering (default=10) |
outPath |
A string with the path to the directory where the output should go |
xRange |
A vector of the first and last coordinates of the region to plot (default is c(-250,250)) |
outFileBase |
A string that will be used in the filenames and titles of the plots produced (default is "") |
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) |
figFormat |
format of output figures. Should be one of "png" or "pdf" |
distMetric |
A list with the name of the distance metric and any parameters it might require |
classesToPlot |
NULL or a numerical vector indicating which classes to plot (default NULL will plot all classes) |
allClassMeans data.frame with columns: position, methFreq, class, replicate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.