Skip to content

Commit

Permalink
Add error if bootstrap directory is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tjstruck committed Oct 1, 2024
1 parent 40ffc7f commit 10e605f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dadi_cli/Stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 "
Expand Down

0 comments on commit 10e605f

Please sign in to comment.