whichPos
determines whether
fragment centers, start or end positions should be considered
('Center','Left','Right').
Results are stored as a list in the Hists
slot of the DBAmmd Object,
with one entry per peak. For each peak i, a (n x L_i) matrix is generated,
where n is the number of samples and L_i is the number of bins used to cover
the extend of the peak. Note, L_i varies between peaks of different lengths.compHists(MD, bin.length = 20, whichPos = "Center")
DBAmmd()
.Hists
DBAmmd
, getPeakReads
,
estimateFragmentCenters
, plotPeak
,## Example using a small data set provided with this package:
data("MMD")
bin.length <- 20
MMD.1 <- compHists(MMD,bin.length)
# use \\code{plotPeak()} to plot indivdual peaks:
Peak.id <- '6'
plotPeak(MMD.1, Peak.id=Peak.id)
# or explicitly using the histograms:
H <- Hists(MMD.1, whichPos='Center')
Sample <- 'WT.AB2'
Peak.idx <- match(Peak.id, names(Regions(MMD.1)))
plot(H[[Peak.idx]][Sample,],t='l')
# add peak cooridnates:
Peak <- Regions(MMD.1)[Peak.idx]
meta <- metaData(MMD.1)
PeakBoundary <- meta$AnaData$PeakBoundary
x.coords <- as.integer(colnames(H[[Peak.idx]])) + start(Peak) - PeakBoundary
plot(x.coords,H[[Peak.idx]]['WT.AB2',],t='l',
xlab=names(H)[Peak.idx], ylab='counts', main=Sample)
Run the code above in your browser using DataLab