Learn R Programming

SomatiCA (version 2.2.0)

SomatiCApipe: SomatiCA pipeline.

Description

First, it uses read depths and lesser allele frequencies (LAF) from mapped short sequence reads to segment the genome and identify candidate CNAs. Second, SomaticCNA estimates the admixture rate from the relative copy-number profile of tumor-normal pair by a Bayesian finite mixture model. Third, SomaticCNA quantifies somatic copy-number and subclonality for each genomic segment to guide its characterization.

Usage

SomatiCApipe(input, ncores = 1, collapse.k = 0, method = "mle", mcmc = 50000, burnin = 10000, p = 0.001, verbose = TRUE, rss = FALSE, adjust=TRUE, threshold1 = 0.01, threshold2 = 0.05, S = 0.1, GC, set.admix=NULL, ...)

Arguments

input
A GRanges object, usually the output from SomatiCAFormat().
ncores
Number of cores used.
collapse.k
Number of data points collapsed.
method
Method used to estimate somatic ratio of given segment. For the "mle" method somatic ratio is estimated by a maximum likelihood approach. For the "mean" method, somatic ratio is estimated by the ratio between mean of tumor sample and normal sample. For the "geometric", somatic ratio is estimated by geometric mean of somatic ratios of all sites in given segment.
mcmc
Number of iterations used for Markov Chain Monte Carlo.
burnin
Number of iterations of burnin used for Markov Chain Monte Carlo.
p
Posterior probability cutoff for ambiguous segment assignment.
verbose
Whether working messages will be shown.
rss
Whether residue sum of square cutoff will be used.Default is FALSE.
S
Cutoff for the residue sum of square.
adjust
Ajust the read depths to make the median of two libraries equal.
threshold1
The threshold used to merge the segments based on median LAF. Default is 0.01.
threshold2
The threshold used to merge the segments based on somatic ratio. Default is 0.05.
GC
A data frame object with 4 column."chr", "interval1", "interval2" and "GC".
set.admix
A numeric object. Use prefixed admixture rate instead of estimation of SomatiCA. set.admix=NULL
...
Arguments for larsCBSsegment().

Value

admix
Admixture rate.
segment
A GRanges object, segments with annotation of somatic event and subclonality characterization.

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)) 
rawLAF <- ifelse(rawLAF>0.5, 1-rawLAF, rawLAF) 
germLAF <- ifelse(germLAF>0.5, 1-germLAF, germLAF) 
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)
x <- data.frame(chr, as.integer(position), as.character(zygo), as.integer(reads1), rawLAF, as.integer(reads2), germLAF) 
colnames(x) <- c("seqnames", "start", "zygosity", "tCount", "LAF", "tCountN", "germLAF")            
data <- SomatiCAFormat(x)
data(GCcontent)
res <- SomatiCApipe(data, mcmc = 10000, burnin = 5000, rss=FALSE, GC=GCcontent)

Run the code above in your browser using DataLab