phylojunction.inference.revbayes package

Submodules

phylojunction.inference.revbayes.rb_dn_parametric module

phylojunction.inference.revbayes.rb_dn_parametric.get_exponential_rev_inference_spec_info(n_samples: int, exp_scale_or_rate_list: List[float], exp_rate_parameterization: bool, parent_node_tracker: Dict[str, str] | None) List[str]
phylojunction.inference.revbayes.rb_dn_parametric.get_gamma_rev_inference_spec_info(n_samples: int, gamma_shape_param_list: List[float], gamma_scale_or_rate_param_list: List[float], gamma_rate_parameterization: bool, parent_node_tracker: Dict[str, str] | None) List[str]
phylojunction.inference.revbayes.rb_dn_parametric.get_ln_rev_inference_spec_info(n_samples: int, ln_mean_list: List[float], ln_sd_list: List[float], parent_node_tracker: Dict[str, str] | None) List[str]
phylojunction.inference.revbayes.rb_dn_parametric.get_normal_rev_inference_spec_info(n_samples: int, norm_mean_param_list: List[float], norm_sd_param_list: List[float], parent_node_tracker: Dict[str, str] | None) List[str]
phylojunction.inference.revbayes.rb_dn_parametric.get_rev_str_from_dn_parametric_obj(dn_obj: DistrForSampling) Tuple[int, int, List[str]]
phylojunction.inference.revbayes.rb_dn_parametric.get_unif_rev_inference_spec_info(n_samples: int, min_param_list: List[float], max_param_list: List[float], parent_node_tracker: Dict[str, str] | None) List[str]

phylojunction.inference.revbayes.rb_inference module

phylojunction.inference.revbayes.rb_inference.dag_obj_to_rev_inference_spec(dag_obj: DirectedAcyclicGraph, inference_root_dir: str, mcmc_chain_length: int = 1000, prefix: str = '') Tuple[List[str], List[str], List[str]]

Convert model string to put in .Rev script.

Parameters:
  • dag_obj (DirectedAcyclicGraph) – DAG object created through script or commands typed by user.

  • mcmc_chain_length (int) – Number of MCMC iterations to carry out with RevBayes.

  • inference_root_dir (str) – Directory where scripts and results should be put, and from where RevBayes should be called.

  • prefix (str) – Prefix will be appended to directory and file names. Defaults to “”.

Returns:

Tuple containing three lists, with strings to be

printed to files (2) and directory names (1).

Return type:

(tuple)

phylojunction.inference.revbayes.rb_inference.get_mcmc_logging_spec_list(a_node_dag_name: str, moves_str: str, n_samples: int, mcmc_chain_length: int, prefix: str, results_dir: str) List[str]

Generate MCMC move strings for .Rev script.

This method will produce a list of strings where each element (one per sample) will configure RevBayes’ MCMC (moves) and logging inside a .Rev script

Parameters:
  • a_node_dag_name (str) – One of the probabilistic graphical model nodes, required to set the model object.

  • moves_str (str) – All moves to be carried out during MCMC, as a string containing new line characters.

  • n_samples (int) – Number of samples (simulations).

  • prefix (str) – Prefix to preceed MCMC result .log file names.

  • results_dir (str) – String specifying directory where MCMC result .log files shall be put by RevBayes.

Returns:

List of strings (one per sample), each will configure

RevBayes’ MCMC (moves) and logging inside a .Rev script.

Return type:

(str)

Module contents