From 10e605fcdd6252a8b40632d89a63c7484dba8a42 Mon Sep 17 00:00:00 2001 From: tjstruck Date: Tue, 1 Oct 2024 15:32:58 -0700 Subject: [PATCH] Add error if bootstrap directory is empty --- dadi_cli/Stat.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dadi_cli/Stat.py b/dadi_cli/Stat.py index d536186..4c5d79b 100644 --- a/dadi_cli/Stat.py +++ b/dadi_cli/Stat.py @@ -54,6 +54,8 @@ def godambe_stat_demograpy( free_params = _free_params(demo_popt, fixed_params) fs = dadi.Spectrum.from_file(fs) fs_boot_files = glob.glob(bootstrap_dir + "/*.fs") + if fs_boot_files == []: + raise ValueError(f"ERROR:\n{bootstrap_dir} is empty\n") all_boot = [] for f in fs_boot_files: boot_fs = dadi.Spectrum.from_file(f) @@ -77,6 +79,8 @@ def gfunc(free_params, ns, pts): # The uncertainty for theta is predicted, so we slice the # the uncertainties for just the parameters. uncerts_adj = uncerts_adj[:-1] + # # Add theta into popt + # popt += f.write( "Estimated 95% uncerts (theta adj), with step size "