Package: TreeSim 2.2

Tanja Stadler

TreeSim: Simulating Phylogenetic Trees

Simulation methods for phylogenetic trees where (i) all tips are sampled at one time point or (ii) tips are sampled sequentially through time. (i) For sampling at one time point, simulations are performed under a constant rate birth-death process, conditioned on having a fixed number of final tips (sim.bd.taxa()), or a fixed age (sim.bd.age()), or a fixed age and number of tips (sim.bd.taxa.age()). When conditioning on the number of final tips, the method allows for shifts in rates and mass extinction events during the birth-death process (sim.rateshift.taxa()). The function sim.bd.age() (and sim.rateshift.taxa() without extinction) allow the speciation rate to change in a density-dependent way. The LTT plots of the simulations can be displayed using LTT.plot(), LTT.plot.gen() and LTT.average.root(). TreeSim further samples trees with n final tips from a set of trees generated by the common sampling algorithm stopping when a fixed number m>>n of tips is first reached (sim.gsa.taxa()). This latter method is appropriate for m-tip trees generated under a big class of models (details in the sim.gsa.taxa() man page). For incomplete phylogeny, the missing speciation events can be added through simulations (corsim()). (ii) sim.rateshifts.taxa() is generalized to sim.bdsky.stt() for serially sampled trees, where the trees are conditioned on either the number of sampled tips or the age. Furthermore, for a multitype-branching process with sequential sampling, trees on a fixed number of tips can be simulated using sim.bdtypes.stt.taxa(). This function further allows to simulate under epidemiological models with an exposed class. The function sim.genespeciestree() simulates coalescent gene trees within birth-death species trees, and sim.genetree() simulates coalescent gene trees.

Authors:Tanja Stadler

TreeSim_2.2.tar.gz
TreeSim_2.2.zip(r-4.5)TreeSim_2.2.zip(r-4.4)TreeSim_2.2.zip(r-4.3)
TreeSim_2.2.tgz(r-4.4-x86_64)TreeSim_2.2.tgz(r-4.4-arm64)TreeSim_2.2.tgz(r-4.3-x86_64)TreeSim_2.2.tgz(r-4.3-arm64)
TreeSim_2.2.tar.gz(r-4.5-noble)TreeSim_2.2.tar.gz(r-4.4-noble)
TreeSim.pdf |TreeSim.html
TreeSim/json (API)

# Install 'TreeSim' in R:
install.packages('TreeSim', repos = c('https://phylotastic.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/tanja819/treesim/issues

Uses libs:
  • fortran– Runtime library for GNU Fortran applications

On CRAN:

4.16 score 1 stars 3 packages 162 scripts 817 downloads 24 mentions 15 exports 42 dependencies

Last updated 6 years agofrom:7138f7b466. Checks:OK: 1 ERROR: 8. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 05 2024
R-4.5-win-x86_64ERRORNov 05 2024
R-4.5-linux-x86_64ERRORNov 05 2024
R-4.4-win-x86_64ERRORNov 05 2024
R-4.4-mac-x86_64ERRORNov 05 2024
R-4.4-mac-aarch64ERRORNov 05 2024
R-4.3-win-x86_64ERRORNov 05 2024
R-4.3-mac-x86_64ERRORNov 05 2024
R-4.3-mac-aarch64ERRORNov 05 2024

Exports:corsimcuttreefast.treegetxLTT.plotLTT.plot.gensim.bd.agesim.bd.taxasim.bd.taxa.agesim.bdsky.sttsim.bdtypes.stt.taxasim.genespeciestreesim.genetreesim.gsa.taxasim.rateshift.taxa

Dependencies:apecliclusterGenerationcodacodetoolscolorspacecombinatcpp11DEoptimdeSolvedigestdoParallelexpmforeachgeigergenericsglueigraphiteratorslaserlatticelifecyclemagrittrmapsMASSMatrixmnormtmvtnormncbitnlmenumDerivoptimParallelphangornphytoolspkgconfigquadprogRcppRcppArmadillorlangscatterplot3dsubplexvctrs

Readme and manuals

Help Manual

Help pageTopics
TreeSim: Simulating Phylogenetic TreesTreeSim-package TreeSim
corsim: Simulating the missing speciation events in an incomplete phylogenies.corsim
cuttree: Cutting off the tree to prune recent branches.cuttree
fast.tree: Fast version of sim.bd.taxa for a single tree, with Brownian character trackingfast.tree
getx: Calculating the vector of speciation / transmission times and sampling times for a phylogenetic tree.getx
LTT.plot: Plots the lineages through time of a set of phylogenetic trees.LTT.plot
LTT.plot.gen: Calculates the number of lineages through time for each input tree, as well as the average number of lineages over all trees.LTT.plot.gen
sim.bd.age: Simulating birth-death trees of a fixed age.sim.bd.age
sim.bd.taxa: Simulating birth-death trees on a fixed number of extant taxa.sim.bd.taxa
sim.bd.taxa.age: Simulating birth-death trees with a given age on a fixed number of extant taxa.sim.bd.taxa.age
sim.bdsky.stt: Simulating sequentially sampled birth-death, SIS, SIR or SIRS trees where birth and death rates are changing through time.sim.bdsky.stt
sim.bdtypes.stt.taxa: Simulating multitype birth-death trees with a fixed number of tips sampled through time.sim.bdtypes.stt.taxa
sim.genespeciestree: Simulating birth-death species trees with nested coalescent gene trees.sim.genespeciestree
sim.genetree: Simulating coalescent gene trees.sim.genetree
sim.gsa.taxa: Sampling trees on n tips from bigger trees.sim.gsa.taxa
sim.rateshift.taxa: Simulating trees incorporating mass extinction events and rate shifts.sim.rateshift.taxa