tabulateReads {leeBamViews} | R Documentation |
tabulate counts of alignments occurring in specified genomic regions
tabulateReads(bv, strandmarker=NULL, as.GRanges=FALSE, applier=lapply)
bv |
|
strandmarker |
character atom: ‘+’ or ‘-’; if missing, ignore strand |
as.GRanges |
logical directive to return a GRanges instance instead of a matrix |
applier |
lapply-like function; if unspecified and multicore is attached will use mclapply |
readBamGappedAlignments
is the basic engine
for this task
annotated matrix with start, end, and samples as rows, regions as columns, and read counts as cell entries
VJ Carey <stvjc@channing.harvard.edu>
example(bs1) # # counts in a partition # myrn = GRanges(IRanges(start=seq(861250, 862750, 100), width=100), seqnames="Scchr13", strand="+") values(myrn)$name = paste("til", 1:length(myrn), sep=".") bamRanges(bs1) = myrn tabulateReads(bs1, "+") # # a related computation based on countBam lapply(bamPaths(bs1)[1:2], function(x) countBam(x, param=ScanBamParam(which=bamRanges(bs1))))