-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
For testing purposes, I think it would be useful to provide a small msprime or stdpopsim example that only takes a few seconds to run. At the moment I'm using the example at the end of the example.ipynb (I guess I could turn down the length_multiplier to 0.01)
import phlash.sim
sim_contigs = phlash.sim.stdpopsim_dataset(
"HomSap",
"Zigzag_1S14",
{"generic": 100},
options=dict(length_multiplier=0.1),
)
test_k = list(sim_contigs["data"])[0]
test_data = sim_contigs["data"][test_k]
train_data = [v for k, v in sim_contigs["data"].items() if k != test_k]
results = phlash.fit(train_data, test_data, truth=sim_contigs["truth"], fold_sfs=False)For reference, I'm testing Phlash on google colab, so I can demonstrate it to students. It would be helpful not to use all my colab GPU credits/time just for a demo.
Incidentally, when running the phlash.sim.stdpopsim_dataset command above on colab, I get
phlash/sim.py:119: UserWarning: Doubling the number of steps has resulted in different predictions, please re-run with smaller step sizes to ensure numerical accuracy.
c, _ = md.coalescence_rate_trajectory(t, d)
Metadata
Metadata
Assignees
Labels
No labels