Description Usage Arguments Value Author(s) References Examples
View source: R/mutation.proba.r
This function uses the results from mutation.rem to estimate the diagnostic probability of clonal relatedness for new cases. It is obtained from Bayes theorem using the prior probability of clonal relatedness (pi) and the contributions to the likelihood based on the mutations observed for the case. We recommand to use this function to estimate probabilities of clonality for new subjects, ie who are not used for the model estimation. To obtain estimate for the subjects on which the model estimation is based, the option "proba=TRUE" can be used in the mutation.rem function.
1 | mutation.proba(para, likmat, xigrid = c(0, seq(0.0005, 0.9995, by=0.001)))
|
para |
Value of the model parameters, in the form c(mu, sigma, pi). |
likmat |
Grid of conditional probabilities for each tumor pair (rows) and each value of xi (columns). This matrix is generated by the auxiliary function grid.lik, and returned as a parameter by the principal function mutation.rem. |
xigrid |
Grid of the values of xi, corresponding to its domain of definition. The default is c(0, seq(0.0005, 0.9995, by=0.001)). |
Returns the vectors of probability of clonality for each pairs of tumors contained in the matrix likmat (the number of pairs is the number of rows of the matrix).
Audrey Mauguen mauguena@mskcc.org and Venkatraman E. Seshan.
Mauguen A, Seshan VE, Ostrovnaya I, Begg CB. Estimating the Probability of Clonal Relatedness of Pairs of Tumors in Cancer Patients. Submitted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #___ Analysis of LCIS data
data(lcis)
mut.matrix<-create.mutation.matrix(lcis ,rem=TRUE)
freq<-get.mutation.frequencies(rownames(mut.matrix),"BRCA")
#__ Parameters estimation
mod <- mutation.rem(cbind(freq, mut.matrix))
mod
#__ Probability of being clonal for a new subject
# generate a case with 30 mutations
# probabilities of each observed mutation
pi <- runif(30,0.001,0.13)
# mutation 1=shared or 2=private
newpair <- cbind(pi,rbinom(30,1,1-pi^2)+1)
# generate the matrix of likelihood values
new.likmat <- grid.lik(xigrid=c(0, seq(0.0005, 0.9995, by=0.001)), as.matrix(newpair[,c(-1)]), newpair[,1])
# probability of being clonal using the model previoulsy estimated
proba <- mutation.proba(c(mod$mu, mod$sigma, mod$pi), t(as.matrix(new.likmat)) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.