Shifting substitution rate (Ss) - thekswenson/Zombi_wiki GitHub Wiki

Ss Mode - Shifting-substitution rate

This model simulates variable evolutionary rates across the Species Tree. It can be used to create datasets where some lineages evolve quicker than others. To run the shifting substitution rate model first you need to simulate a Species Tree using the T mode (or any other Species Tree mode). You might want to obtain sequences also, for that you need to simulate genomes too with the G mode.

The model uses an array of n discrete substitution-rates, where the values are ordered from smallest to largest. By default, the values are obtained from a discretized lognormal distribution (Yang et al 1994), but a different set of values could be used. Then, the shifting rate controls the frequency at which a change in the substitution rate takes place. The model starts at the stem of the tree (the branch above the root, in Zombi the simulations, always starts at time 0 at the beginning of the stem). The simulation starts by using the substitution rate in the middle of the array and follows the topology of the complete tree. Every time a shift takes place, the substitution rate can move to an adjacent position in the array (except when the current position is at the extremes of the array, that a change to the immediately adjacent category takes place with a 50% possibility, otherwise is ignored). When a lineage splits, the two descendants inherit the same substitution rate as the parent. Once the different shifts have been simulated along the branches of the tree, the branch lengths of the complete tree are multiplied by the substitution rates active at every point. Zombi is also capable of modifying the resulting Gene Trees according to the simulated shifts, and the sequences evolving along the branches of these trees.

Output

S/Fastas

Folder containing the sequences

Branchwise rates

A tsv file

Categories.tsv

A file containing the values of the different substitution rates

ShiftEvents.tsv

A file containing all the shifting events.

SubstitutionScaledCompleteTree.nwk

The complete tree scaled to the number of substitutions

SubstitutionScaledExtantTree.nwk

The extant tree scaled to the number of substitutions

Parameters

SHIFT_SUBSTITUTION_RATE

The shifting substitution rate controls how quickly the changes in the substitution rate occur

SHIFT_CATEGORIES

This parameter controls the number of categories, i.e the number of different effective substitution rates to be used

BASE_RATE

Controls the distribution used to generate the rates (only lognormal and gamma distributions supported so far)

SIMULATE_SEQUENCE

Can be set to 0 not to generate the sequences

SCALE_GENE_TREES

To scale also the gene trees and not only the species tree this should be 1. Simulating the sequence requires this parameter to be 1