Commit 993bfb3a authored by Carine Rey's avatar Carine Rey
Browse files

fix bug when ns * 10 for H0

parent 23165659
......@@ -65,7 +65,7 @@ let bppseqgen_multi_profiles_script ~config ~out ~profile_c =
let vars = [
"FINAL_OUT", ident out ;
"PARAM", config ;
"PROFILE_C", dep profile_c ;
"PROFILE_C", ident profile_c ;
]
in
bash_script vars {|
......@@ -92,6 +92,7 @@ let bppseqgen_multi_profiles ?(descr="") ~profile_f ~profile_c ~nb_sites ~tree ~
let nb_sites_per_profile = 1 in
let nb_combis = Pervasives.(nb_sites / nb_sites_per_profile) in
let config_f = dest // "config.bpp" in
let profile_c_ok = tmp // "profiles_c.tsv" in
let out = dest // "seq.fa" in
workflow ~descr:("bppsuite.bppseqgen" ^ descr) [
docker env (
......@@ -99,8 +100,12 @@ let bppseqgen_multi_profiles ?(descr="") ~profile_f ~profile_c ~nb_sites ~tree ~
mkdir_p dest;
mkdir_p tmp;
cd tmp;
cmd "head" ~stdout:profile_c_ok [
opt "-n" int nb_sites;
dep profile_c
];
cmd "cat" ~stdout:config_f [(file_dump (conf_file_bppseqgen_multi_profiles ~tree ~profile_f ~config ~ne_c ~ne_a ~nb_sites_per_profile))];
cmd "bash" [(file_dump (bppseqgen_multi_profiles_script ~config:config_f ~out ~profile_c))];
cmd "bash" [(file_dump (bppseqgen_multi_profiles_script ~config:config_f ~out ~profile_c:profile_c_ok))];
]
)
]
......
......@@ -49,6 +49,8 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
let model_prefix = Convergence_hypothesis.string_of_model model in
let nb_sites = match model with
| H0 -> ns * 10
| H0_NeBig -> ns * 10
| H0_NeSmall -> ns * 10
| _ -> ns
in
let nodes = Tree_dataset.nodes tree_dataset model in
......@@ -336,6 +338,7 @@ let simulation_main ~outdir ?(ns = 0) ?(np = 2) ?(mem = 2) ~tree_dir ~profile_fn
let validation_main ~outdir ?(indir = "") ?(ns = 0) ?(np = 2) ?(mem = 2) ~preview ~fast_mode ~no_Ne ~ne_test ~no_HaPC ~tree_dir ~profile_fn ~use_concat ~only_simu () =
(* simulated trees *)
let nb_sites = if ns = 0 then (if preview then 20 else 50) else ns in
let nb_sites = nb_sites * 10 in
let profile = Profile.profile_l_of_splitted_profile ~nb_cat:3 ~nb_sites profile_fn in
let sim_repo_l = derive_profile ~indir ~ns ~preview ~fast_mode ~no_Ne ~ne_test ~no_HaPC ~tree_dir ~profile ~use_concat ~only_simu () in
(* real trees *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment