segmentGCbiasRemoval: Correct GC bias for read depth ratio of each segment.

Description Usage Arguments Value Author(s) References See Also Examples

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). The read depth ratio for each segment is calculated as the geometric mean of all sites in that segment.

Usage

1
segmentGCbiasRemoval(segment, input, GC, remove=TRUE)

Arguments

segment

A GRanges class, segments with annotation of integer copy number and event.

input

A GRanges class, SomatiCA input from SomatiCAFormat().

GC

A data frame object with 4 column."chr", "interval1", "interval2" and "GC".

remove

Whether GC bias needed to be removed at this step. Default is TRUE. If GC bias has been adjusted in pre-processing, then use FALSE.

Value

A GRanges class, segments with annotation of GC corrected read depth ratio.

chromosome, start, end, medLAF, ratio, copynumber, event

Same as the output of copynumberCorrected().

tRcorrected

GC bias corrected read depth ratio for tumor sample.

nRcorrected

GC bias corrected read depth ratio for normal sample.

Author(s)

Mengjie Chen

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 GCbiasRemoval.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
### generate sequencing input ###
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, 16000000, by=20000), seq(1, 13000000, by=20000))
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) 

### generate pseudo segments ###

chr <- c("chr1", "chr1", "chr1", "chr2", "chr2", "chr2")
start <- position[c(1, 301, 601, 1, 201, 401)]
end <-  position[c(301, 601, 800, 201, 401, 651)]
medLAF <- c(0.2, 0.4, 0.3, 0.2, 0.3, 0.4)
gLAF <- rep(0.43, 6)
ratio <- c(0.5, 1, 1.3, 0.5, 0.8, 1)
copynumber <- c(1, 2, 3, 1, 3, 2)
event <- c("LOH", "=", "Gain", "LOH", "Loss", "=")

seg <- GRanges(seqnames=chr, 
	             ranges=IRanges(start=start, end=end),
	             medLAF=medLAF,
	             medgLAF=gLAF,
	             ratio=ratio,
               somaCN=copynumber, 
               event=event) 
data(GCcontent)               
x <- segmentGCbiasRemoval(seg, data, GCcontent)

SomatiCA documentation built on Oct. 5, 2016, 4:18 a.m.