VERSO: VERSO

Description Usage Arguments Value Examples

View source: R/frontend.R

Description

Perform the inference of the maximum log-likelihood VERSO phylogenetic tree.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
VERSO(
  D,
  alpha = NULL,
  beta = NULL,
  check_indistinguishable = TRUE,
  num_rs = 10,
  num_iter = 10000,
  n_try_bs = 1000,
  num_processes = Inf,
  verbose = TRUE
)

Arguments

D

Input data for the inference reporting presence (as 1), absense (as 0) or missing information (as NA) for a set of variants.

alpha

False positive error rate provided as a verctor; if a vector of alpha (and beta) is provided, the inference is performed for multiple values and the solution at maximum-likelihood is returned.

beta

False negative error rate provided as a verctor; if a vector of beta (and alpha) is provided, the inference is performed for multiple values and the solution at maximum-likelihood is returned.

check_indistinguishable

Boolean. Shall I remove any indistinguishable variant from input data prior inference?

num_rs

Number of restarts during MCMC inference.

num_iter

Maximum number of MCMC steps to be performed during the inference.

n_try_bs

Number of steps without changes in likelihood of best solution after which to stop the MCMC.

num_processes

Number of processes to be used during parallel execution. To execute in single process mode, this parameter needs to be set to either 1, NA or NULL.

verbose

Boolean. Shall I print to screen information messages during the execution?

Value

A list of 8 elements: B, C, phylogenetic_tree, corrected_genotypes, genotypes_prevalence, genotypes_summary, log_likelihood and error_rates. Here, B returns the maximum likelihood variants tree (inner nodes of the phylogenetic tree), C the attachment of patients to genotypes and phylogenetic_tree VERSO phylogenetic tree, including both variants tree and patients attachments to variants; corrected_genotypes is the corrected genotypes, which corrects D given VERSO phylogenetic tree, genotypes_prevalence the number of patients and observed prevalence of each genotype and genotypes_summary provide a summary of association of mutations to genotypes; finally log_likelihood and error_rates return the likelihood of the inferred phylogenetic moldel and best values of alpha and beta as estimated by VERSO.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(variants)
set.seed(12345)
inference = VERSO(D = variants, 
                  alpha = c(0.01,0.05), 
                  beta = c(0.01,0.05), 
                  check_indistinguishable = TRUE, 
                  num_rs = 5, 
                  num_iter = 100, 
                  n_try_bs = 50, 
                  num_processes = 1, 
                  verbose = FALSE)

VERSO documentation built on Nov. 8, 2020, 4:52 p.m.

Related to VERSO in VERSO...