Learn R Programming

SomatiCA (version 2.2.0)

subclonality: Estimate subclonality for each somatic copy number abberation.

Description

Subclonality characterization based on hypothesis testing.

Usage

subclonality(segment, admix, bin=0.1, sigma=0.1)

Arguments

segment
Segments with GC bias corrected read depth ratio. A GRanges object.
admix
Admixture rate of normal cells.
bin
Bin for percentage of subclones.
sigma
Sigma for normal distribution used for testing.

Value

A GRanges object, segments with annotation of somatic event and subclonality.
seqnames, start, end, medLAF, ratio, somaCN, event
Same as the output of copynumberCorrected().
clonality
A character vector. Clonality of somatic copy number aberrations, "=", "clonal", "subclonal_gain" or "subclonal_loss".
germCN
An integer vector. Copy number in control sample.
subclonalCN
An integer vector. Aberrated copy number in tumor clones (if it's clonal) or subclones (if it's subclonal).
subpercent
A numeric vector. Percentage of tumor with aberrated copy number.

Details

SomatiCA calculates allelic copy number nB and nA in a control sample based on GC corrected read counts. SomatiCA tests whether copy number change in corresponding tumor sample can result in a change of exactly one copy of one allele. If the somatic ratio (corrected by admixture rate) in the corresponding tumor sample is greater than 1, SomatiCA tests for one copy gain , otherwise it tests for one copy loss. With null hypothesis that clonal copy number ratio follows a normal distribution , p-value is calculated for each segment as the probability of obtaining a copy number ratio at least as extreme as the one that was actually observed. Segments with p-value less than 0.05 are classified as subclonal.

Examples

Run this code
### 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)

admix <- 0.2
segmentClonality <- subclonality(x, admix)

Run the code above in your browser using DataLab