next up previous
Next: About this document ... Up: coalsim Previous: Perl Process management

Subsections

Approximate Bayesian Computation

Basic idea of ABC

Bayesian inference

Connection to ABC

Application

Let's go back to the two demography model.

Image mig-trees

  1. Let's create a fake observed data:

    Let's say the divergence occured 0.7 coalescent unit ago (28000 generations), and model B was the real model.

    ms 8 1 -t 8 -I 2 3 5 -ma x 8.0 0.0 x  -n 1 0.5 -n 2 0.25  -en 0.7 1 1.0  -ej 0.7 2 1 | sample_stats | ./cleanSampleStats.pl > obs
    
    You can use the script which you created to clean up the sample_stats output. If you haven't made it, here is my version of cleanSampleStats.pl.

  2. run the simulations 1 million times, and capture the output to a file (sim.out).
    nohup ./msDrive.pl > sim.out &
    

  3. We'll use Kevin Thornton's ABCreg to create the posterior distribution. Thornton, K. R. 2009, BMC Genetics 10:35 Here is the documentation.

    reg -p sim.out -d obs -P 2 -S 5 -t 0.001 -b output -L
    
  4. Look at the output file (output.1.xxxx.post), xxxx can be "tangent", "log", or nothing.

    The two columns corresponds to the two parameters (model and T).

  5. Exercises:

  6. Revised summary stats.


next up previous
Next: About this document ... Up: coalsim Previous: Perl Process management
Naoki Takebayashi 2011-11-09