| check_alignment | Check if the alignment is of the right type |
| check_alignment_params | Checks if the argument is a valid alignment parameters structure, as created by create_alignment_params. Will stop if not. |
| check_alignment_params_names | Checks if the list elements' names match that of a valid 'alignment_params' |
| check_beast2_installed | Checks if BEAST2 is installed |
| check_candidates_save_to_same_files | Check if all experiments save to the same files |
| check_error_fun | Check that the 'error_fun' is valid. |
| check_error_measure_params | Checks if the argument is a valid error_measure parameters structure, as created by create_error_measure_params. Will stop if not. |
| check_experiment | Checks if the argument is a valid pirouette experiment. |
| check_experiments | Checks if the argument is a list of one or more pirouette experiments. |
| check_experiments_all_inference_models_are_unique | Check if all experiments have unique inference models. |
| check_experiments_candidates_have_same_mcmcs | Check that the candidate experiments have a same MCMC |
| check_gen_and_cand_exps_save_to_different_files | Check that generative and candidate experiments save to different files. |
| check_inference_conditions | Checks if inference conditions are valid as created by create_inference_conditions. Will stop if not. |
| check_inference_model_type_names | Check the model type names |
| check_inference_model_weights | Check the one or more inference model's weights |
| check_init_pir_params | Check if the 'pir_params' is initialized |
| check_is_ns_beast2_pkg_installed | Checks if the 'NS' BEAST2 package is installed. |
| check_model_type | Checks if model type is valid Will stop if not. |
| check_mutation_rate | Check if the mutation rate is valid |
| check_pir_out | Checks if the argument is a valid pirouette parameter set. |
| check_pir_out_errors_above_zero | Checks that 'pir_out' errors all are more than zero |
| check_pir_out_names | Checks if the 'pir_out' has elements with the names needed. |
| check_pir_params | Checks if the argument is a valid pirouette parameter set. |
| check_pir_paramses | Check if all elements in the list of 'pir_params' are valid. |
| check_pir_params_data_types | Checks if the 'pir_params' elements are all of the right data type. |
| check_pir_params_names | Checks if the 'pir_params' has all the named elements needed |
| check_reconstructed_phylogeny | Check if the phylogeny is a reconstructed phylogeny. |
| check_root_sequence | Check if the root sequence is valid |
| check_sim_tral_fun | Check if the function to create a true alignment with (from the true phylogeny) is valid. |
| check_sim_twal_fun | Check if the function to create a twin alignment with (from a true phylogeny and a true alignment) is valid. |
| check_sim_twin_tree_fun | Check if the 'sim_twin_tree_fun' is valid |
| check_tree_and_model | Check if the 'tree_and_model' is valid |
| check_tree_and_models | Check if the 'tree_and_model' is valid |
| check_tree_and_model_errors | Check if the 'tree_and_model_errors' is valid. |
| check_tree_type | Checks if tree type is valid Will stop if not. |
| check_tree_types | Checks if the tree types are valid Will stop if not. |
| check_twinning_params | Checks if the argument is a valid twinning parameters structure. |
| check_twinning_params_names | Check that the 'twinning_params' has all the list elements' names |
| check_twin_phylogeny | Check if a twin phylogeny is a valid phylogeny |
| collapse_tree_and_model | Internal function |
| collect_pir_outs | Collect the results of multiple pirouette runs |
| combine_brts_and_topology | Substitute branching times keeping the topology |
| combine_models | Combine a combination of site models, clock models and tree priors into a collection of inference models. |
| complete_treelog_filename | Complete a treelog's filename |
| convert_pir_out_to_long | Convert a 'pir_out' to its long form |
| convert_tree2brts | Convert a tree into branching times |
| copy_true_alignment | Adapter function to create a twin alignment by simply copying the true alignment |
| count_n_mutations | Count mutations |
| create_alignment_params | Create the parameters for the alignment simulation. |
| create_all_bd_experiments | Create all pirouette experiments that have a tree prior that follows a birth-death model. |
| create_all_coal_experiments | Create all pirouette experiments that have a tree prior that follows a coalescent model. |
| create_all_experiments | Create all pirouette experiments. |
| create_bd_tree | Create a (constant-rate) birth-death (BD) tree |
| create_blocked_dna | Create a 'blocked' DNA sequence, which is a sequence with four equal-sized nucleotide sections |
| create_cand_experiment | Create a valid testing pirouette candidate experiment. |
| create_copy_twtr_from_true_fun | Create a function that can simulate the twin tree from the true tree, by just copying the true tree |
| create_error_measure_params | Create the parameters to specify how the error between the given phylogeny and the Bayesian posterior trees is measured. |
| create_exemplary_dd_tree | Create an exemplary diversity-dependent (DD) birth-death tree. |
| create_exemplary_dd_tree_giappo | Create an exemplary diversity-dependent (DD) birth-death tree. |
| create_experiment | Create a valid pirouette experiment. |
| create_gen_experiment | Create a valid testing pirouette generative experiment. |
| create_inference_conditions | Create the inference conditions |
| create_mono_nuc_dna | Create a 'blocked' DNA sequence, which is a sequence with four equal-sized nucleotide sections |
| create_pir_params | Create the parameters for pirouette |
| create_sim_yule_twin_tree_fun | Create a partially evaluated function to to sim_yule_twin_tree. |
| create_standard_mutation_rate | Create the parameters for the mutation rate |
| create_std_pir_params | Create a standard 'pir_params' |
| create_std_pir_paramses | Create a number of standard 'pir_params' |
| create_test_alignment_params | Create testing parameters for the alignment simulation. |
| create_test_cand_experiment | Create a valid testing pirouette candidate experiment. |
| create_test_experiment | Create a valid testing pirouette experiment. |
| create_test_gen_experiment | Create a valid testing pirouette generative experiment. |
| create_test_marg_liks | Create a testing marginal likelihoods data frame. |
| create_test_phylogeny | Create a testing phylogeny with 3 taxa and a crown age of 3 |
| create_test_pir_params | Create a set of testing parameters for pirouette |
| create_test_pir_params_setup | Create a 'pir_params' that follows a specific setup |
| create_test_pir_run_output | Create the same output of pir_run to be used for testing |
| create_test_pir_run_output2 | Create the same output of pir_run to be used for testing, but with more data |
| create_tral_file | Simulates a DNA alignment and saves it to a FASTA file. |
| create_tree_and_model_errors_from_folder | Internal function to create a 'tree_and_model_errors' from the files in a folder |
| create_tree_and_model_errors_from_folders | Internal function to create a 'tree_and_model_errors' from the files in one or more folders |
| create_true_alignment | Create the true alignment from the true/given phylogeny. |
| create_twal_file | Simulates a twin DNA alignment and saves it to a FASTA file. |
| create_twinning_params | Create the parameters for the twinning simulation |
| create_twin_branching_times | Generate twin branching times given estimated lambda and mu and the original tree |
| create_twin_tree | Create a twin tree |
| create_yule_tree | Create a Yule tree. |
| default_params_doc | This function does nothing. It is intended to inherit is parameters' documentation. |
| delete_beast2_state_files | Delete the BEAST2 state files, if present. |
| errorses_to_data_frame | Convert the collect of errors to a data frame |
| est_evidences | Estimate the evidences |
| get_alignment_n_taxa | Get the number of taxa of an alignment |
| get_alignment_sequences | Get the sequences from an alignment |
| get_alignment_sequence_length | Get the sequence length of an alignment |
| get_copy_tral_fun | Get a function to 'simulate' a twin alignment by simply copying the true alignment. |
| get_experiments_filenames | Extract the filesnames in the experiments |
| get_experiment_filenames | Extract the filenames from an experiment |
| get_gamma_error_fun | Get an error function that uses the difference in gamma statistic. |
| get_model_selections | Get the possible ways to select an inference model |
| get_model_type_names | Get the names of the model types |
| get_nltt_error_fun | Get an error function that uses the nLTT statistic |
| get_pir_params_filenames | Extract the filenames from a 'pir_params' |
| get_pir_plot_fill_colors | Internal function to get the fill colors for pir_plot |
| get_pir_plot_line_colors | Internal function to get the line colors for pir_plot |
| get_pir_plot_theme | Get the pir_plot theme |
| get_pir_plot_tree_and_model_descriptions | Internal function to obtain the pir_plot legend labels |
| get_remove_hex_twin_fun | Get a function that removes the hex string from filenames. |
| get_sim_bd_twin_tree_fun | Create a partially evaluated function to to sim_bd_twin_tree. |
| get_sim_tral_with_lns_nsm_fun | Get a partially evaluated function to simulate a true alignment with a linked node substitution site model. |
| get_sim_tral_with_std_nsm_fun | Get a function to simulate the true alignment with, that uses a standard site model. |
| get_sim_tral_with_uns_nsm_fun | Get a partially evaluated function to simulate a true alignment with an unlinked node substitution site model. |
| get_sim_twal_same_n_muts_fun | of mutations as the true alignment has. |
| get_sim_twal_with_std_nsm_fun | Get a function to simulate a twin alignment which uses a standard site model |
| get_sim_yule_twin_tree_fun | Create a partially evaluated function to to sim_yule_twin_tree. |
| get_temp_errors_filename | Get the name for a temporary file to store inference errors. |
| get_temp_evidence_filename | Get the name for a temporary file to store the evidences (aka marginal likelihoods) as a comma-separated file |
| get_temp_fasta_filename | Get the name for a temporary file to store an alignment in the FASTA format |
| get_temp_tree_filename | Get the name for a temporary file to store a tree in Newick format |
| get_test_alignment | Get an alignment for testing. |
| get_tree_and_model_descriptions | Internal function to create a mapping from a 'tree_and_model' to a description |
| get_tree_and_model_values | Get the valid 'tree_and_model' values |
| get_tree_types | Get the names of the tree types |
| get_twin_methods | Twin methods |
| get_twin_models | Twin models |
| has_candidate_experiments | Detect if there is at least one candidate model among the set of experiments. |
| has_twinning | Determine if these 'pir_params' use twinning |
| init_experiment | Initialize the 'experiment'. |
| init_pir_params | Initialize the 'pir_params'. |
| is_best_candidate | Is the experiment the one with the most evidence? |
| is_dna_seq | Determine if the string is a lowercase DNA sequence of at least one base pair |
| is_pir_params | Determine if the 'pir_params' is valid. |
| phylo_to_errors | Measure the error BEAST2 makes from a true phylogeny. |
| pirouette | pirouette: A package to estimate the error BEAST2 makes in inferring a phylogeny. |
| pir_plot | Plot the error 'BEAST2' makes from a known phylogeny |
| pir_plots | Plot the output of pir_runs. |
| pir_plot_from_file | Plot the error BEAST2 make from the known phylogeny |
| pir_plot_from_long | Plot the error 'BEAST2' makes from a known phylogeny from tidy data |
| pir_rename | Rename the filenames in a 'pir_params' using a rename function. |
| pir_rename_to_std | Rename the 'pir_params' filenames to follow a standard naming scheme. |
| pir_run | Measure the error BEAST2 makes from a known phylogeny. |
| pir_runs | Do multiple pirouette runs |
| pir_run_distribution | Do multiple pirouette runs off a distribition of phylogenies |
| pir_run_true_tree | Measure the error BEAST2 makes from a phylogeny |
| pir_run_twin_tree | Measure the error BEAST2 makes from a phylogeny |
| pir_save | Save all output from pir_run |
| pir_to_pics | Create all pictures created by the pirouette pipeline |
| pir_to_tables | Create all tables to checks pirouette pipeline |
| plot_alignment_from_file | Plot an alignment stored as a file |
| read_errors_csv | Read the errors from a '.csv' file |
| relevel_inference_model | Internal function |
| relevel_tree_and_model | Internal function |
| renum_rng_seeds | Renumber the RNG seeds |
| replicate_pir_params | Replicate pir_params assigning new names to each file |
| rm_pir_param_files | Deletes all files |
| select_candidate_evidences | Select the evidences for candidate experiments |
| select_experiments | Select the experiments to do a Bayesian inference with. |
| shorten_experiments | Shorten the experiments' runtime |
| shorten_pir_params | Shorten the 'pir_params' |
| shorten_pir_paramses | Shorten the list of 'pir_params' |
| sim_alignment_with_n_mutations | Converts a phylogeny to a random DNA alignment |
| sim_alignment_with_std_nsm | Create an alignment with a standard site model using a raw interface |
| sim_alignment_with_std_nsm_from_params | Create an alignment with a standard site model |
| sim_bd_twin_tree | Simulate a Birth-Death (BD) twin tree from the true phylogeny |
| sim_tral_with_lns_nsm | Create an alignment with the 'lns' site model |
| sim_tral_with_std_nsm | Adapter function to simulate a twin alignment using a standard site model |
| sim_tral_with_uns_nsm | Adapter function to simulate an alignment with the 'linked_node_sub' (lns) site model. |
| sim_true_alignment | Simulate the true alignment from the true phylogeny |
| sim_twal_with_lns_nsm | Adapter function to simulate the twin alignment using the 'lns' site model |
| sim_twal_with_same_n_mutation | Simulate a twin alignment using a standard site model |
| sim_twal_with_std_nsm | Simulate a twin alignment using a standard site model |
| sim_twal_with_uns_nsm | Adapter function to simulate an alignment with the 'linked_node_sub' (lns) site model. |
| sim_twin_alignment | Creates a twin alignment. |
| sim_yule_twin_tree | Create a twin tree from a phylogeny using a Yule process |
| to_evidence_filename | Converts a filename to an evidence filename |
| to_twin_filename | Converts true tree filenames to twin tree filenames |
| to_twin_filenames | Convert multiple filenames to their twin equivalent |
| will_measure_evidence | Determine if there is an experiment in which the evidence will be measured. |