View source: R/accuracy_sifter.R
accuracy_sifter | R Documentation |
Uses SIFTER's 2011 definition of accuracy, where a protein is tagged as accurately predicted if the highest ranked prediction matches it.
accuracy_sifter(pred, lab, tol = 1e-10, highlight = "", ...)
## S3 method for class 'aphylo_estimates'
accuracy_sifter(pred, lab, tol = 1e-10, highlight = "", ...)
## Default S3 method:
accuracy_sifter(pred, lab, tol = 1e-10, highlight = "", nine_na = TRUE, ...)
pred |
A matrix of predictions, or an aphylo_estimates object. |
lab |
A matrix of labels (0,1,NA, or 9 if |
tol |
Numeric scalar. Predictions within |
highlight |
Pattern passed to sprintf used to highlight predicted functions that match the observed. |
... |
Further arguments passed to the method. In the case of |
nine_na |
Treat 9 as NA. |
The analysis is done at the protein level. For each protein, the function
compares the YES annotations of that proteins with the predicted by the model.
The algorithm selects the predicted annotations as those that are within
tol
of the maximum score.
This algorithm doesn't take into account NOT annotations (0s), which are excluded from the analysis.
When highlight = ""
, no highlight is done.
A data frame with Ntip()
rows and four variables. The variables are:
Gene: Label of the gene
Predicted: The assigned gene function.
Observed: The true set of gene functions.
Accuracy: The measurement of accuracy according to Engelhardt et al. (2011).
set.seed(81231)
atree <- raphylo(50, psi = c(0,0), P = 3)
ans <- aphylo_mcmc(atree ~ mu_d + mu_s + Pi)
accuracy_sifter(ans)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.