Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example and tests for --model_file #16

Open
RyanGutenkunst opened this issue May 19, 2022 · 7 comments
Open

Example and tests for --model_file #16

RyanGutenkunst opened this issue May 19, 2022 · 7 comments

Comments

@RyanGutenkunst
Copy link
Collaborator

The functionality for using custom model files (--model_file) should be document, and there should be tests of that functionality in the test suite.

@xin-huang
Copy link
Owner

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?

@tjstruck
Copy link
Collaborator

tjstruck commented May 24, 2022

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

@tjstruck
Copy link
Collaborator

tjstruck commented May 24, 2022

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.

@xin-huang
Copy link
Owner

implemented by #19

@RyanGutenkunst
Copy link
Collaborator Author

@tjstruck I don't see any tests of this functionality in the test suite. Am I missing something?

@tjstruck
Copy link
Collaborator

tjstruck commented Sep 26, 2022

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?

@RyanGutenkunst
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants