eventTiming: Estimate the time of events in tumor data

Description Usage Arguments Value Author(s) References Examples

Description

Estimate the proportion of time spent between different chromosomal abnormalities based on the allele frequencies of mutated locations.

Usage

1
2
3
4
5
6
7
eventTiming	(x, m, history, totalCopy, 
	method = c("fullMLE","partialMLE", "Bayes"), 
	type = c("gain", "CNLOH"), seqError = 0, bootstrapCI = NULL, 
	B = if (method =="Bayes") 10000 else 500, CILevel = 0.95, normCont = 0, 
	verbose = TRUE, returnAssignments = FALSE, coverageCutoff = 1,
	minMutations = 10, init = NULL, maxiter = 100, tol= 1e-04, 
	mutationId = 1:length(x),...)

Arguments

x

vector. the number of reads/fragments containing the variant

m

vector. the number of reads/fragments covering the location with the variant (the coverage)

history

a matrix, based on the history of the region (see Details)

totalCopy

integer. the total number of copies of the tumor DNA for this region

method

what estimation method to use, one of “fullMLE",“partialMLE",“Bayes"

type

type of region, either a gain or a CNLOH region

seqError

Probability of sequencing error

bootstrapCI

type of bootstrap confidence interval to calculate, one of “parametric", “nonparametric". If NULL, then the confidence interval is not calculated

B

number of bootstrap samples to take (or simulations from the posterior for Bayesian estimation)

CILevel

At what level the confidence intervals should be calculated.

normCont

the proportion of normal contamination, between 0 and 1.

verbose

logical. Whether to give additional warnings as the program is running.

returnAssignments

logical. Whether to return the probabilistic assignments of mutations to allele frequencies generated by the EM algorithm. Also returns the x,m values for those that pass the filter.

coverageCutoff

minimum value for m[i]; any entries with m[i]<coverageCutoff are ignored in estimation.

minMutations

minimum number of mutations required.

init

initial value of multinomial parameter q passed to estimateQ.

maxiter

maximum number of iterations in calculation q.

tol

tolerance in the convergence of q

mutationId

identification values of the mutations (vector of the same length as x and m). Default is indexing values, 1:length(x). Used when returnAssignments=TRUE so that the assignments of the mutations to allele frequencies can be linked with the original mutations if there has been filtering in eventTiming, e.g. due to depth of coverage.

...

Arguments passed to internal fitting function for Bayesian Method. For example, ‘alpha’ gives the Dirichlet prior of the bayesian estimate (default=1), ‘tdf’ gives the number of degrees of freedom for the t proposal density used in the bayesian estimate (default=4), ‘bayesApproxMethod’ gives the method for calculating the approximate distribution (default is “sir"; “inv" is for K=1 when the problem is 1-dimensional and one can easily grid and get the approximate posterior density and cdf).

Value

A list with values

pi

estimate of pi vector

piCI

bootstrap confidence interval, if requested

q

estimate of the multinomial parameter q

perLocationProb

output from estimateQ giving per location P(P[i]|X[i],q), if requested. Only locations used in the estimation are included.

optimDetails

optimization details from estimateQ

call

list of the parameters of the call to the function: history, totalCopy, type, exactAllele, normCont, coverageCutoff, minMutations. In addition, ‘alleleSet’ is included in this list, which is the set of possible alleles for this history, after adjusting for normal contamination.

Author(s)

Elizabeth Purdom

References

Durinck S, et al. (2011). “Temporal Dissection of Tumorigenesis in Primary Cancers." Cancer Discovery, 1(2): 137–143. Greenman CD, et al. (2012). “Estimation of rearrangement phylogeny for cancer genomes." Genome Research, 22(2): 346–361. Purdom E, et al. (2013). “Timing Chromosomal Abnormalities within Cancer Samples.” Bioinformatics, 29(24): 3113–3120.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(mutData)
ACNLOH<-matrix(c(1,3,1,0),ncol=2,nrow=2,byrow=TRUE)
onlyMuts<-subset(mutData,is.na(rsID) & position <= 1.8E7)
onlyMuts$t_depth<-onlyMuts$t_ref_count+onlyMuts$t_alt_count
x<-eventTiming(x=onlyMuts$t_alt_count,m=onlyMuts$t_depth,
    history=ACNLOH,totalCopy=2,type="CNLOH",normCont=0.22)
x$pi #estimate of time of stages
x$q #estimate of the multinomial (likelihood of each of the alleles)
x$call$alleleSet #possible set of alleles after 
                #adjusting for normal contamination

epurdom/cancerTiming documentation built on May 16, 2019, 8:21 a.m.