- BAMM_object
Object of class "bammdata", typically generated with prepare_diversification_data(),
that contains a phylogenetic tree and associated diversification rate mapping across selected posterior samples.
It works also for BAMM_object updated for a specific focal_time using update_rates_and_regimes_for_focal_time(),
or the deepSTRAPP workflow with run_deepSTRAPP_for_focal_time and run_deepSTRAPP_over_time().
- rate_type
A character string specifying the type of diversification rates to plot.
Must be one of 'speciation', 'extinction' or 'net_diversification' (default).
- method
A character string indicating the method for plotting the phylogenetic tree.
- add_regime_shifts
Logical. Whether to add the location of regime shifts on the phylogeny (Step 2). Default is TRUE.
- configuration_type
A character string specifying how to select the location of regime shifts across posterior samples.
configuration_type = "MAP": Use the average locations recorded in posterior samples with the Maximum A Posteriori probability (MAP) configuration.
This regime shift configuration is the most frequent configuration among the posterior samples (See BAMMtools::getBestShiftConfiguration()).
This is the default option.
configuration_type = "MSC": Use the average locations recorded in posterior samples with the Maximum Shift Credibility (MSC) configuration.
This regime shift configuration has the highest product of marginal probabilities across branches (See BAMMtools::maximumShiftCredibility()).
configuration_type = "index": Use the configuration of a unique posterior sample those index is provided in sample_index.
- sample_index
Integer. Index of the posterior samples to use to plot the location of regime shifts.
Used only if configuration_type = index. Default = 1.
- adjust_size_to_prob
Logical. Whether to scale the size of the symbols showing the location of regime shifts according to
the marginal shift probability of the shift happening on each location/branch. This will only works if there is an $MSP_tree element
summarizing the marginal shift probabilities across branches in the BAMM_object. Default is TRUE.
- regimes_fill
Character string. Set the color of the background of the symbols showing the location of regime shifts.
Equivalent to the bg argument in BAMMtools::addBAMMshifts(). Default is "grey".
- regimes_size
Numerical. Set the size of the symbols showing the location of regime shifts.
Equivalent to the cex argument in BAMMtools::addBAMMshifts(). Default is 1.
- regimes_pch
Integer. Set the shape of the symbols showing the location of regime shifts.
Equivalent to the pch argument in BAMMtools::addBAMMshifts(). Default is 21.
- regimes_border_col
Character string. Set the color of the border of the symbols showing the location of regime shifts.
Equivalent to the col argument in BAMMtools::addBAMMshifts(). Default is "black".
- regimes_border_width
Numerical. Set the width of the border of the symbols showing the location of regime shifts.
Equivalent to the lwd argument in BAMMtools::addBAMMshifts(). Default is 1.
- ...
Additional graphical arguments to pass down to BAMMtools::plot.bammdata(), BAMMtools::addBAMMshifts(), and par().
- display_plot
Logical. Whether to display the plot generated in the R console. Default is TRUE.
- PDF_file_path
Character string. If provided, the plot will be saved in a PDF file following the path provided here. The path must end with ".pdf".