Learn R Programming

SomatiCA (version 2.2.0)

GCbiasRemoval: Correct GC bias for read depth ratio of each site.

Description

Read depth ratio is defined as read depth at each site divided by median of read depth of that sequencing library. SomatiCA corrects GC bias for read depth ratio at each site based on a linear model described in Diskin et al.(2008).

Usage

GCbiasRemoval(input, GCcontent)

Arguments

input
A GRanges object. Same as the output of SomatiCAFormat().
GCcontent
A data frame object with 4 column."chr", "interval1", "interval2" and "GC".

Value

A GRanges object.
zygosity, tCount, LAF, tCountN, germLAF
Same as the outout SomatiCAFormat()
tRcorrected
GC bias corrected read depth ratio for tumor sample.
nRcorrected
GC bias corrected read depth ratio for normal sample.

References

Diskin et al. Adjustment of genomic waves in signal intensities from whole-genome SNP genotyping platforms. Nucleic Acids Research, 36(19):e126, 2008.

See Also

See Also segmentGCbiasRemoval.

Examples

Run this code
rawLAF <- c(rnorm(300, 0.2, 0.05), rnorm(300, 0.4, 0.05), rnorm(200, 0.3, 0.05), rnorm(200, 0.2, 0.05), rnorm(200, 0.3, 0.05), rnorm(250, 0.4, 0.05)) 
germLAF <- c(rnorm(800+650, 0.4, 0.05)) 
reads1 <- c(rpois(300, 25), rpois(300, 50), rpois(200, 60),  rpois(200, 25), rpois(200, 40), rpois(250, 50))
reads2 <- rpois(800+650, 50)
chr <- c(rep("chr1", 800), rep("chr2", 650))
position <- c(seq(1, 1600000, by=2000), seq(1, 1300000, by=2000))
zygo <- rep("het", 800+650)
data <- GRanges(seqnames=chr, 
        ranges=IRanges(start=position, width=1), 
        zygosity=zygo, 
        tCount=reads1, 
        LAF=rawLAF, 
        tCountN=reads2, 
        germLAF=germLAF) 
data(GCcontent)        
x <- GCbiasRemoval(data, GCcontent)

Run the code above in your browser using DataLab