plotCounts {epigraHMM} | R Documentation |
'plotCounts()' plots read counts and peak regions from 'epigraHMM()'
plotCounts( object, ranges, hdf5 = metadata(object)$output, peaks = NULL, annotation = NULL )
object |
an epigraHMMDataSet |
ranges |
a GRanges object or a pair of integers with the genomic corrdinates/windows to be plotted |
hdf5 |
an optional character string with the hdf5 file path from 'epigraHMM' |
peaks |
an optional parameter with a GRanges object or a vector of logicals (with length equal to the number of rows in 'object') specifying the genomic corrdinates/windows with peaks |
annotation |
an optional parameter with a GRanges object or a vector of logicals (with length equal to the number of rows in 'object') specifying the genomic corrdinates/windows of an annotation track |
If the input object contains the assay 'offset', reads will be normalized prior to plotting (e.g. counts/exp(offset)). Reads from replicates pertaining to the same condition are aggregated prior to plotting.
A ggplot
Pedro L. Baldoni, pedrobaldoni@gmail.com
https://github.com/plbaldoni/epigraHMM
countData <- rbind(matrix(rnbinom(1e3,mu = 2,size = 10),ncol = 1), matrix(rnbinom(1e3,mu = 7.5,size = 5),ncol = 1), matrix(rnbinom(1e3,mu = 7.5,size = 5),ncol = 1), matrix(rnbinom(1e3,mu = 2,size = 10),ncol = 1)) colData <- data.frame(condition = 'A', replicate = 1) object <- epigraHMMDataSetFromMatrix(countData,colData) plotCounts(object,ranges = c(500,3500))