Open RyanGutenkunst opened 2 years ago
I have a question that whether we can use demes
to generate models for dadi
I saw dadi
is in https://github.com/popsim-consortium/demes-paper/blob/main/software-table.tex
Then how to use demes
with dadi
?
dadi has a function:
dadi.Spectrum.from_demes
Which takes the arguments:
g = demes file name
sampled_demes = list of population IDs
sample_sizes = population sample sizes
pts = list of gird points
You can see some unpolished examples in the dadi/examples/demes_test/testing_demes_v_dadi.py
I've added a section, "User defined demographic models", after the "Generating caches for DFE inference" section describing using the --model-file option and a bit on making the custom models for demographic inference and cache generation.
implemented by https://github.com/xin-huang/dadi-cli/pull/19
@tjstruck I don't see any tests of this functionality in the test suite. Am I missing something?
It looks like I started implementing tests but never finished (there are tests in test_GenerateCache). I've put together tests for importing (test_Models.py) and inferring (test_InferDM.py) custom models.
Do we want a separate test file for running dadi-cli bash through the subprocess package?
I wouldn't anticipate errors in dadi-cli arising from subprocess, so I would put that as a low priority, unless we've encountered problems along those lines.
The functionality for using custom model files (--model_file) should be document, and there should be tests of that functionality in the test suite.