View source: R/preprocess-utils.R
binGCCorrect | R Documentation |
Normalizes the coverage for a set of bins such that there is no correlation between GC content and coverage.
binGCCorrect(bins)
bins |
a |
The relationship of counts to GC content is determined by fitting a loess curve. The lowess curve is subtracted from the counts for each bin to remove any GC bias.
A numeric vector of normalized counts for each bin.
library(Rsamtools)
library(svbams)
library(svfilters.hg19)
library(trellis)
data(bins1kb)
extdir <- system.file("extdata", package="svbams", mustWork=TRUE)
bamfile <- file.path(extdir, "cgov10t.bam")
bins <- keepSeqlevels(bins1kb, "chr3", pruning.mode = "coarse")
bins <- subsetByOverlaps(bins, GRanges("chr3", IRanges(59600000, 61000000)))
bviews <- BamViews(bamRanges=bins, bamPaths=bamfile)
bins$cnt <- trellis::binnedCounts(bviews)
std_cnt <- binNormalize(bins)
bins$std_cnt <- std_cnt
bins$log_ratio <- binGCCorrect(bins)
bins
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.