mutation.proba {Clonality} | R Documentation

## Probability of being clonal

### Description

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.

### Usage

    mutation.proba(para, likmat, xigrid = c(0, seq(0.0005, 0.9995, by=0.001)))

### Arguments

`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)).

### Value

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

### Author(s)

Audrey Mauguen mauguena@mskcc.org and Venkatraman E. Seshan.

### References

Mauguen A, Seshan VE, Ostrovnaya I, Begg CB. Estimating the Probability of Clonal Relatedness of Pairs of Tumors in Cancer Patients. Submitted.

### Examples

    #___ 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)) )

[Package Clonality version 1.40.0 Index]