ShowOnePeak | R Documentation |
This function plots the estimated methylation level (as bars) of each bin within a peak for each replicate, and the corresponding normalized input read depth (grey curve).
ShowOnePeak(onePeak, allBins, binCounts, isDMR = FALSE,Sname = NULL, ext = 500, ylim = c(0, 1))
onePeak |
A one-row dataframe containing the genomic position of a single peak: chr, start, end, strand. |
allBins |
A dataframe contaning genomic position of all bins used to call peaks: chr, start, end, strand. |
binCounts |
A dataframe contaning the read counts of all bins for each replicate. The sample order is: input1, ip1, input2, ip2, ... |
isDMR |
A logical value indicating whether the input region is DMR. Default is FALSE. |
Sname |
Sample names. If isDMR = TRUE, then it will be used as the title of each plot. |
ext |
An integer indicating the length of base paris to extend the region on both sides: (start - ext, end + ext). Default is 500. |
ylim |
The range of y-axis to plot. Default is c(0, 1) |
It only generates a plot. No specific output.
ShowOneDMR from "DSS" package.
### read peaks peaks = read.table(file.path(system.file(package = "TRESS"), "extdata/examplebyBam_peaks.xls"), sep = "\t", header = TRUE) ### load annotation and bin counts load(file.path(system.file(package = "TRESS"), "extdata/examplebyBam.rda")) allBins = as.data.frame(bins$bins) colnames(allBins)[1] = "chr" allBins$strand = binStrand for (i in 1:4) { ShowOnePeak( onePeak = peaks[i,], allBins = allBins, binCounts = allCounts ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.