## Example using a small data set provided in the MMDiffBamSubset package
# setting the Experiment meta data:
ExpData <- list(dataDir=system.file("extdata", package="MMDiffBamSubset"),
sampleSheet="Cfp1.csv")
MetaData <- list('ExpData' = ExpData)
# Creating a DBAmmd data set:
MMD <- DBAmmd(MetaData)
# defining a small Region for which to get reads:
Regions <- GRanges(seqnames=c('chr1'),
IRanges(start = c(4560912,4677889), end = c(4562680,4679681)))
MMD <- setRegions(MMD,Regions)
MMD <- getPeakReads(MMD)
# To access Left ends of fragments mapping to positive strand:
Reads.L <- Reads(MMD,'Left.p')
# To access Right ends of fragments mapping to negative strand:
Reads.R <- Reads(MMD,'Right.n')
# To access Matrix of TotalCounts:
C.t <- Counts(MMD,whichCounts='T')
# Counts on positive strand:
C.p <- Counts(MMD,whichCounts='p')
# Counts on negative strand:
C.n <- Counts(MMD,whichCounts='n')
Run the code above in your browser using DataLab