Skip to content

stsmall/abc_scripts2

Repository files navigation

Scripts for Approximate Bayesian Computation in population genomics

Refactoring of abc_scripts. My goal is to build a customizable set of scripts to allow demographic inference under ABC. Given some of the known affects of linked selection (BGS and Positive) on patterns of polymorphism, I will implement these options in Slim. I have also added a model of sequencing error (Jay et al. 2019) and the option to use the MMC in msprime.

TODO

  • add support for SLiM and pySlim.
  • option to use MMC, beta or dirac in msprime

Stats:

  1. 2-locus stats of momentsLD
  2. Stats implemented in Jay et al. 2019

run_sims.py

  • python > 3
  • scikit-allel
  • numpy
  • pandas
  • msprime v1.0.1
  • discoal (optional)
  • scrm (optional)

run_stats.py

  • python > 3
  • sk-allel
  • numpy
  • pandas
  • momentsLD (optional)

examples

test model
run_sims.py -cfg examples/model.example.cfg -m examples/model.2test.txt -i 5000 --out msp_test --dryrun
run_sims.py -cfg examples/model.example.cfg -m examples/model.2test.txt -i 5000 --out msp_test --ms scrm --dryrun

sims and stats
run_sims.py -cfg examples/model.example.cfg -m examples/model.2test.txt -i 5000 --out msp_test --stats_cfg examples/stats.example.cfg
run_sims.py -cfg examples/model.example.cfg -m examples/model.2test.txt -i 5000 --out scrm_test --ms scrm --stats_cfg examples/stats.example.cfg
run_sims.py -cfg examples/model.example.cfg -m examples/model.2test.txt -i 5000 --out discoal_test --ms discoal --stats_cfg examples/stats.example.cfg

write sims to file, then calc stats from file
run_sims.py -cfg examples/model.example.cfg -m examples/model.2test.txt -i 5000 --out scrm.sims.msout --ms scrm
run_stats.py sims scrm.sims.msout -cfg examples/stats_example.cfg --outfile scrm.sims.out --ms scrm

get obs stats
utils/make_coordsfile.py 3 998670 10000 1000 --gff tests/test.gff --gff_filter intergenic
run_stats.py obs 3 --pops_file examples/obs.40.csv -cfg docs/examples/example.stats.cfg --coords_bed docs/examples/test.bed --zarr_path docs/examples/test --outfile testobsstats

ABC for param inference
abcrf (for importance rankings on parameter inference and inference)
abc (for parameter inference)

notes on multiple merger coalescence (MMC) and deterministic wright-fisher model (dtwf)

MMC primer
MMC-ABC
MMC Selection
Wright-Fisher in msprime

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages