View source: R/alignment-utils.R
thinProperPairs | R Documentation |
This function provides a simple interface to
subsample a GRanges
object of properly paired
reads to reduce overplotting.
thinProperPairs(gr, thin = 10)
gr |
a |
thin |
integer indicating how much to thin the properly paired reads. |
Setting the parameter thin
to 10 (default) will
return a GRanges
object with 1/10 the original number of
properly paired reads in gr
.
A GRanges
object
library(svbams)
path <- system.file("extdata", package="svbams")
bam.file <- file.path(path, "cgov10t.bam")
prp <- getProperAlignmentPairs(bam.file, build="hg19")
pgr <- ga2gr(prp, is.improper=FALSE)
length(pgr)
pgr2 <- thinProperPairs(pgr, 100)
length(pgr2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.