est_evidences: Estimate the evidences

View source: R/est_evidences.R

est_evidencesR Documentation

Estimate the evidences

Description

Estimate the evidences

Usage

est_evidences(fasta_filename, experiments, evidence_filename, verbose = FALSE)

Arguments

fasta_filename

name of a FASTA file. Use get_alignment_id to get the ID of the alignment

experiments

a list of one or more pirouette experiments, as can be created by create_experiment. If more than one experiment is provided and a "generative" experiment is part of them, the "generative" one has to be the first in the list. See also:

  • Use check_experiments to check the list of experiments for validity

  • Use create_all_experiments to create experiments with all combinations of tree model, clock model and tree priors

  • Use create_all_bd_experiments to create experiments with all combinations of tree model, clock model and tree priors, except for only using birth-death tree priors

  • Use create_all_coal_experiments to create all experiments with all combinations of tree model, clock model and tree priors, except for only coalescent tree priors

  • Use shorten_experiments to shorten the run time of the list of experiments

evidence_filename

filename to store the estimated evidences (aka marginal likelihoods), as can be created by get_temp_evidence_filename. Must be NA if there is evidence estimation (as determined by will_measure_evidence).

verbose

if TRUE, show more output

Value

a data frame with evidences. Returns NULL if there are no experiments that have their evidence measured.

Author(s)

Richèl J.C. Bilderbeek

Examples

if (rappdirs::app_dir()$os != "win" &&
  beautier::is_on_ci() &&
  beastier::is_beast2_installed() &&
  is_beast2_ns_pkg_installed()
) {
  fasta_filename <- system.file(
    "extdata", "alignment.fas", package = "pirouette"
  )

  # Create a single one candidate experiment
  experiments <- list(create_test_cand_experiment())

  # Collect the evidences
  est_evidences(
    fasta_filename = fasta_filename,
    experiments = experiments
  )
}

richelbilderbeek/pirouette documentation built on Oct. 18, 2023, 3:09 p.m.