Skip to contents

Generates a new migration history on a subtree drawn using MTT_st_coal_node()

Usage

MTT_node_retype(
  ED,
  st_labels,
  bit_rates,
  node_indices = NodeIndicesC(ED),
  eigen_vals = eigen(bit_rates)$values,
  eigen_vecs = eigen(bit_rates)$vectors,
  inverse_vecs = solve(eigen_vecs)
)

Arguments

ED

Extended data representation of phylogenetic tree and initial migration history

st_labels

Reduced extended data structure consisting of the rows of ED corresponding to coalescent nodes in the selected subtree only

bit_rates

Transition matrix of a Markov process corresponding to a process with rates given by the backwards-in-time migration matrix

node_indices

Vector of row indices corresponding to which row of ED corresponds to each node label

Value

List consisting of proposal, a structured phylogeny with updates made to the selected subtree, and prop_prob, the probability of the given update