Description Usage Arguments Value Author(s) Examples
Count the number of reads that are in a given genomic region.
| 1 | GetCountsPerRegion(BamFilePath, param)
 | 
| BamFilePath | location of aligned bam file. Corresponding bai index file must be in the same directory. | 
| param | ScanBamParam data structure. | 
An integer value for the number of reads that are in a given genomic region.
Nathaniel J. Madrid, Jason Byars
| 1 2 3 4 5 6 7 8 9 | # Get file paths of aligned bam files. The corresponding bai index file must also be in the same directory.
BamFilePaths <- dir(path="/home/BamFiles", pattern=".*.bam$", full.names=T)
rRNAparamRegions <- GRanges(seqnames="GL000220.1", IRanges(1, 161802))
# Note that any region(s) can be used in GetCountsPerRegion, not just rRNA regions. 
rRNAparam <- ScanBamParam(which=rRNAparamRegions)
# Secondary alignments will only be counted once
rRNATotalCounts <- GetCountsPerRegion(BamFilePaths[1], rRNAparam)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.