richelbilderbeek / pirouette

R package that estimates the error BEAST2 makes from a given phylogeny
GNU General Public License v3.0
3 stars 2 forks source link

Find speciation simulation code and likelihoods #206

Closed richelbilderbeek closed 5 years ago

richelbilderbeek commented 5 years ago

Check when completed:

Done Model Simulate Likelihood
Mostly CBS TreeSim::sim.bdsky.stt BEAST2
No CCP ape::rcoal [1, page 314] BEAST2
No CEP ape::rcoal with different branching times [1, page 314] BEAST2
richelbilderbeek commented 5 years ago

From ??TreeSim:

TreeSim: Simulating Phylogenetic Trees

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.

richelbilderbeek commented 5 years ago

For CBS:

From Bayesian Coalescent Inference of Past Population Dynamics from Molecular Sequences A. J. Drummond A. Rambaut B. Shapiro O. G. Pybus:

2019-03-12-135905_1920x1056_scrot

BEAST2 likelihood calculation here.

richelbilderbeek commented 5 years ago

For CCP and CEP, the calciulation is spread over three files in total. Body of the likelihood calculation is here.

richelbilderbeek commented 5 years ago

Will unassign myself on this now, as I will focus on doing Peregrine Issues.

richelbilderbeek commented 5 years ago

Suggestion from Rampal: only add CBS, do CCP and CEP later.

Re: PR week 11 2019 - EOM 18 March 2019 09:48 4 KB

ik vraag me af of je alle species tree priors nu al in pirouette moet inbouwen. [...] Als je birth-death en birth-death skyline gedaan hebt, is het wat mij betreft voldoende.

richelbilderbeek commented 5 years ago

Suggestion from Rampal: also remove CBS:

Re: pirouette: no need to use CCP and CEP 18 March 2019 10:21 4 KB

I am not suggesting to do CBS if the C stands for coalescent. I though BEAST2 had a tree prior of a birth-death skyline (i.e. a piece-wise constant birth-death model). That's the one I meant. If I am wrong, then forget about this one as well.

richelbilderbeek commented 5 years ago

So, we are allowed to ditch all of these.

Closing this Issue :rainbow: