Description Usage Arguments Details Value Note Author(s) References See Also Examples
View source: R/compute.errors.R
Given the true genotype and frequency matrices, finds the permutation of genotypes matrix which best matches the true genotypes and returns the corresponding errors.
1 | compute.errors(Mu, U, P, PTrue)
|
Mu |
The matrix which models the genotypes, where rows and columns correspond to genomic loci and clones, accordingly. |
U |
The true genotype matrix defined similar to |
P |
The matrix of clonal frequency where rows and columns correspond to clones and samples, accordingly. |
PTrue |
The true clonal frequency matrix defined similar to |
Computing the error is useful for estimating the performance of
inference on simulated, and for comparing different trained models.
Genotype and frequency errors are defined as
the normalized l1
-error in
reconstructing the genotype, and the clone frequency matrices,
accordingly, where by normalized l1
-error we mean the sum of absolute
values of an error matrix divided by the size of the matrix.
A list will be made with the following entries:
UError |
The |
discretizedUError |
The |
.
PErrorAbsolute |
The normalized |
PErrorRelative |
Each entry of the error clone frequency
matrix is normalized by the corresponding entry in
|
The use of UError
and PErrorAbsolute
is recommended.
Computing the error is not feasible for more than 7 clones because
the number of all possible permutations is factorial in the
number of clones which grows super fast. Such input will trigger an
error message.
Habil Zare
Inferring clonal composition from multiple sections of a breast cancer, Zare et al., Submitted.
1 2 3 4 5 6 7 8 9 10 | set.seed(1)
data(breastCancer)
Dc <- breastCancer$Dc
Dt <- breastCancer$Dt
bics <- c()
ClomialResult <-Clomial(Dc=Dc,Dt=Dt,maxIt=20,C=3,doParal=FALSE,binomTryNum=2)
model1 <- ClomialResult$models[[1]]
model2 <- ClomialResult$models[[2]]
## Comparing 2 trained models:
compute.errors(Mu=model1$Mu,U=model2$Mu,P=model1$P,PTrue=model2$P)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.