Skip to content

TreeSim

Simulating Phylogenetic Trees

v2.4 · Apr 8, 2019 · GPL-2

Description

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.

Downloads

2.5K

Last 30 days

2522nd

2.5K

Last 90 days

2.5K

Last year

CRAN Check Status

2 NOTE
12 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang NOTE
r-devel-linux-x86_64-debian-gcc NOTE
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (14 non-OK)
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘Tanja Stadler <tanja.stadler@bsse.ethz.ch>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Tanja",
                    family = "Stadler",
                    role = c("aut", "cre"),
                    email = "tanja.stadler@bsse.ethz.ch")
as necessary.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘Tanja Stadler <tanja.stadler@bsse.ethz.ch>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Tanja",
                    family = "Stadler",
                    role = c("aut", "cre"),
                    email = "tanja.stadler@bsse.ethz.ch")
as necessary.
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
OK r-devel-macos-arm64

*


            
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 9, 2026
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

Maintainer: ‘Tanja Stadler <tanja.stadler@bsse.ethz.ch>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Tanja",
                    family = "Stadler",
                    role = c("aut", "cre"),
                    email = "tanja.stadler@bsse.ethz.ch")
as necessary.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

Maintainer: ‘Tanja Stadler <tanja.stadler@bsse.ethz.ch>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = "Tanja",
                    family = "Stadler",
                    role = c("aut", "cre"),
                    email = "tanja.stadler@bsse.ethz.ch")
as necessary.

Reverse Dependencies (9)

Dependency Network

Dependencies Reverse dependencies ape geiger FossilSimShiny TreeSimGM hisse FossilSim MorphSim PhylogeneticEM geiger nLTT nodeSub TreeSim

Version History

new 2.4 Mar 9, 2026