tabulateReads: tabulate counts of alignments occurring in specified genomic...

Description Usage Arguments Details Value Author(s) Examples

Description

tabulate counts of alignments occurring in specified genomic regions

Usage

1
tabulateReads(bv, strandmarker=NULL, as.GRanges=FALSE, applier=lapply)

Arguments

bv

BamViews-class instance

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

Details

readGAlignments is the basic engine for this task

Value

annotated matrix with start, end, and samples as rows, regions as columns, and read counts as cell entries

Author(s)

VJ Carey <stvjc@channing.harvard.edu>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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))))

vjcitn/leeBamViews documentation built on Dec. 23, 2019, 7:37 p.m.