From 6c9a3d97d19ad22e0be5b3842604d929265f3de8 Mon Sep 17 00:00:00 2001 From: dportik Date: Fri, 24 Jun 2022 09:49:32 -0700 Subject: [PATCH] add upper bounds for admix models For 3D admixture models, the f parameter was not correctly bounded with an upper limit of 1. This fixes the issue. --- Three_Population_Pipeline/dadi_Run_3D_Set.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Three_Population_Pipeline/dadi_Run_3D_Set.py b/Three_Population_Pipeline/dadi_Run_3D_Set.py index c72b216..7ab67b6 100644 --- a/Three_Population_Pipeline/dadi_Run_3D_Set.py +++ b/Three_Population_Pipeline/dadi_Run_3D_Set.py @@ -342,11 +342,17 @@ ############# Admixed ("hybrid") origins models +up = [20, 20, 20, 10, 10, 0.999] +ps = [1, 1, 1, 1, 1, 0.5] Optimize_Functions.Optimize_Routine(fs, pts, prefix, "admix_origin_no_mig", Models_3D.admix_origin_no_mig, rounds, 6, fs_folded=fs_folded, - reps=reps, maxiters=maxiters, folds=folds, param_labels = "nu1, nu2, nu3, T1, T2, f") + reps=reps, maxiters=maxiters, folds=folds, param_labels = "nu1, nu2, nu3, T1, T2, f", in_upper=up, in_params=ps) +up = [20, 20, 20, 20, 20, 10, 10, 0.999] +ps = [1, 1, 1, 1, 1, 1, 1, 0.5] Optimize_Functions.Optimize_Routine(fs, pts, prefix, "admix_origin_sym_mig_adj", Models_3D.admix_origin_sym_mig_adj, rounds, 8, fs_folded=fs_folded, - reps=reps, maxiters=maxiters, folds=folds, param_labels = "nu1, nu2, nu3, m1, m3, T1, T2, f") + reps=reps, maxiters=maxiters, folds=folds, param_labels = "nu1, nu2, nu3, m1, m3, T1, T2, f", in_upper=up, in_params=ps) +up = [20, 20, 20, 20, 20, 10, 10, 0.999] +ps = [1, 1, 1, 1, 1, 1, 1, 0.5] Optimize_Functions.Optimize_Routine(fs, pts, prefix, "admix_origin_uni_mig_adj", Models_3D.admix_origin_uni_mig_adj, rounds, 8, fs_folded=fs_folded, - reps=reps, maxiters=maxiters, folds=folds, param_labels = "nu1, nu2, nu3, m32, m31, T1, T2, f") + reps=reps, maxiters=maxiters, folds=folds, param_labels = "nu1, nu2, nu3, m32, m31, T1, T2, f", in_upper=up, in_params=ps)