View source: R/preprocess-utils.R
binFragments | R Documentation |
For each bin provided by a GRanges object
, binFragments
counts the number of fragments, determined by read pairs in a
GAlignmentPair
object, that overlap that bin
binFragments(galp, bins)
galp |
a |
bins |
a |
an integer-vector of counts corresponding to each range in the GRanges
object
## Not run:
library(Rsamtools)
library(svbams)
library(GenomicAlignments)
bam_path <- system.file("extdata", package="svbams", mustWork=TRUE)
bamfile <- file.path(bam_path, "cgov10t.bam")
data(bins, package='svbams')
param <- ScanBamParam(flag=scanBamFlag(isDuplicate=FALSE,
isSecondaryAlignment=FALSE))
galp <- readGAlignmentPairs(bamfile, param=param)
fragmentCounts <- binFragments(galp, bins)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.