Skip to content

Module: TreeUnit

Niema Moshiri edited this page Sep 14, 2022 · 42 revisions

The TreeUnit module converts a phylogenetic tree from units of time to units of per-site mutation rate. See the source code to see what is defined by the abstract class.

List of Implementations

  • Each branch's length (in time units) is multiplied by a rate. The rate of a given branch is either equal to the rate of its parent with probability 1-p or is incremented or decremented by δ with probability p/2. The root edge has rate R0. The rates are bounded above and below by rate_max and rate_min, respectively.
  • Requirements:
  • Config Parameters:
    • tree_rate_p: The probability of either incrementing or decrementing when inheriting the parent's rate
    • tree_rate_delta: The amount to either increment or decrement the rate
    • tree_rate_rate_min: The minimum allowed rate
    • tree_rate_rate_max: The minimum allowed rate
    • tree_rate_R0: The mutation rate of the root branch
  • Each branch's length (in time units) is multiplied by a rate that is sampled from a Gamma distribution whose mean is the rate of the parent branch and whose variance is the branch length multiplied by a user-specified constant v
  • Requirements:
  • Config Parameters:
    • tree_rate_v : The scaling constant v
    • tree_rate_R0: The mutation rate of the root branch
  • Each branch's length (in time units) is multiplied by a rate that is sampled from a log-normal distribution whose underlying mean is the rate of the parent branch and whose variance is the branch length multiplied by a user-specified constant v
  • Requirements:
  • Config Parameters:
    • tree_rate_v : The scaling constant v
    • tree_rate_R0: The mutation rate of the root branch
  • The rate of mutations per time is sampled from a user-parameterized Beta distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_a: The α parameter of the desired Beta distribution
    • tree_mutation_b: The β parameter of the desired Beta distribution
  • The rate of mutations per time is sampled from a user-parameterized Chi-Squared distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_df: The desired Chi-Squared distribution degrees of freedom parameter df (aka k)
  • The rate of mutations per time is constant across the entirety of all trees
    • Basically, multiply all branches by a single scaling factor
  • Requirements:
  • Config Parameters:
    • tree_mutation_rate: The desired scaling factor (mutation rate per time)
  • The rates of mutations per time are determined by a user-parameterized Cox–Ingersoll–Ross process, which is an autocorrelated model
    • The mutation rate at time t (Rt) is described by the following differential equation, where Bt is an infinitesimal "random" increment:
    • Given an initial rate R0 = r0, the random variable Rt|r0 is a noncentral χ2 random variable with the following parameters:
    • WARNING: This module is currently bugged in that the rate each branch is multiplied by is the rate at the end of the branch, NOT the average rate over the entire branch. We are working to fix this
  • Requirements:
  • Config Parameters:
    • tree_rate_a: The a parameter (see paper)
    • tree_rate_b: The b parameter (see paper)
    • tree_rate_sigma: The σ parameter (see paper)
    • tree_rate_R0: The initial mutation rate at time 0 (see paper)
  • The rate of mutations per time is sampled from a user-parameterized Dirichlet distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_alpha: The α parameter of the desired Dirichlet distribution
  • The rate of mutations per time is sampled from a user-parameterized Exponential distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_scale: The desired Exponential distribution scale parameter β = 1/λ
  • The rate of mutations per time is sampled from a user-parameterized F-distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_dfnum: The degrees of freedom in the numerator of the desired F-distribution
    • tree_mutation_dfden: The degrees of freedom in the denominator of the desired F-distribution
  • The rate of mutations per time is sampled from a user-parameterized Gamma distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_shape: The desired Gamma distribution shape parameter k
    • tree_mutation_scale: The desired Gamma distribution scale parameter θ
  • The rate of mutations per time is sampled from a user-parameterized Gumbel distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_shape: The desired Gumbel distribution location parameter μ
    • tree_mutation_scale: The desired Gumbel distribution scale parameter β
  • The rate of mutations per time is sampled from a user-parameterized Inverse Gaussian (Wald) distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_mean: The desired Inverse Gaussian (Wald) distribution mean μ
    • tree_mutation_shape: The desired Inverse Gaussian (Wald) distribution shape parameter λ
  • The rate of mutations per time is sampled from a user-parameterized Logistic distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_shape: The desired Logistic distribution location parameter μ
    • tree_mutation_scale: The desired Logistic distribution scale parameter β
  • The rate of mutations per time is sampled from a user-parameterized Log-Normal distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_mean: The mean of the underlying Normal distribution of the desired Log-Normal distribution
    • tree_mutation_stdev: The standard deviation of the underlying Normal distribution of the desired Log-Normal distribution
  • The rate of mutations per time is sampled from a user-parameterized Noncentral Chi-Squared distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_df : The desired Chi-Squared distribution degrees of freedom parameter df (aka k)
    • tree_rate_lambda : The desired Chi-Squared distribution noncentrality parameter λ
  • The rate of mutations per time is sampled from a user-parameterized Noncentral F-distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_dfnum: The degrees of freedom in the numerator of the desired F-distribution
    • tree_mutation_dfden: The degrees of freedom in the denominator of the desired F-distribution
    • tree_rate_lambda : The desired F-distribution noncentrality parameter λ
  • The rate of mutations per time is sampled from a user-parameterized Normal (Gaussian) distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_mean: The desired Normal (Gaussian) distribution mean μ
    • tree_mutation_stdev: The desired Normal (Gaussian) distribution standard deviation σ
  • The rate of mutations per time is sampled from a user-parameterized Pareto distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_shape: The desired Pareto distribution shape parameter λ
  • The rate of mutations per time is sampled from a user-parameterized Power distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_shape: The desired Power distribution shape parameter λ
  • The rate of mutations per time is sampled from a user-parameterized Rayleigh distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_scale: The desired Rayleigh distribution scale parameter σ
  • No changes are made to the input tree
  • Requirements:
    • None
  • Config Parameters:
    • None
  • The rate of mutations per time is sampled from a user-parameterized Triangular distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_left: The desired Triangular distribution lower limit parameter a
    • tree_rate_mode: The desired Triangular distribution mode parameter c
    • tree_rate_right: The desired Triangular distribution upper limit parameter b
  • The rate of mutations per time is sampled from a user-parameterized Truncated Normal distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_loc: The desired Truncated Normal distribution location parameter μ
    • tree_mutation_scale: The desired Truncated Normal distribution scale parameter σ
    • tree_mutation_min: The desired Truncated Normal distribution minimum parameter a
    • tree_mutation_max: The desired Truncated Normal distribution maximum parameter b
  • The rate of mutations per time is sampled from a user-parameterized Uniform distribution
  • Requirements:
  • Config Parameters:
    • tree_rate_min: The desired Uniform distribution lower limit parameter a
    • tree_rate_max: The desired Uniform distribution upper limit parameter b
  • The rate of mutations per time is sampled from a user-parameterized Weibull distribution
  • Requirements:
  • Config Parameters:
    • tree_mutation_shape: The desired Weibull distribution shape parameter k
    • tree_mutation_scale: The desired Weibull distribution scale parameter λ
Clone this wiki locally