Commit 0337b9bd authored by Carine Rey's avatar Carine Rey
Browse files

clean_up hyp + news hyp NeC_div/x2

parent e7e2a851
......@@ -8,25 +8,17 @@ type t =
| H0_NeG3
| H0_NeG4
| H0_NeG5
| H0_NeG5_NeC_div2
| H0_NeG5_NeC_x2
| HaPC_NeG1
| HaPC_NeG2
| HaPC_NeG3
| HaPC_NeG4
| HaPC_NeG5
| H0
| HaPC
| HaPCOC
| H0_NeSmall
| H0_NeVerySmall
| H0_BigNeInSmallNe
| H0_SmallNeInBigNe
| HaPC_BigNeInSmallNe
| HaPC_SmallNeInBigNe
| HaPCOC_NeSmall
| HaPC_NeSmall
| H0_NeBig
| HaPCOC_NeBig
| HaPC_NeBig
| HaPC_NeG5_NeC_div2
| HaPC_NeG5_NeC_x2
let string_of_model m = match m with
| H0_NeG1 -> "H0_NeG1"
......@@ -39,21 +31,11 @@ let string_of_model m = match m with
| HaPC_NeG3 -> "HaPC_NeG3"
| HaPC_NeG4 -> "HaPC_NeG4"
| HaPC_NeG5 -> "HaPC_NeG5"
| H0 -> "H0"
| HaPC -> "HaPC"
| HaPCOC -> "HaPCOC"
| H0_NeSmall -> "H0_NeSmall"
| H0_NeVerySmall -> "H0_NeVerySmall"
| H0_BigNeInSmallNe -> "H0_BigNeInSmallNe"
| H0_SmallNeInBigNe -> "H0_SmallNeInBigNe"
| HaPC_BigNeInSmallNe -> "HaPC_BigNeInSmallNe"
| HaPC_SmallNeInBigNe -> "HaPC_SmallNeInBigNe"
| HaPCOC_NeSmall -> "HaPCOC_NeSmall"
| HaPC_NeSmall -> "HaPC_NeSmall"
| H0_NeBig -> "H0_NeBig"
| HaPCOC_NeBig -> "HaPCOC_NeBig"
| HaPC_NeBig -> "HaPC_NeBig"
| HaPCOC -> "HaPCOC"
| HaPC_NeG5_NeC_div2 -> "HaPC_NeG5_NeC_div2"
| HaPC_NeG5_NeC_x2 -> "HaPC_NeG5_NeC_x2"
| H0_NeG5_NeC_div2 -> "H0_NeG5_NeC_div2"
| H0_NeG5_NeC_x2 -> "H0_NeG5_NeC_x2"
let assign k v =
seq ~sep:"=" [ string k ; v ]
......@@ -119,19 +101,10 @@ let bpp_config_F nodes hyp = [
| HaPC_NeG3 -> bpp_config_HaPC_F_Ne
| HaPC_NeG4 -> bpp_config_HaPC_F_Ne
| HaPC_NeG5 -> bpp_config_HaPC_F_Ne
| H0 -> bpp_config_H0_F
| HaPC -> bpp_config_HaPC_F
| HaPCOC -> bpp_config_HaPCOC_F
| H0_NeSmall -> bpp_config_H0_F_Ne
| H0_NeVerySmall -> bpp_config_H0_F_Ne
| H0_BigNeInSmallNe -> bpp_config_H0_F_Ne
| H0_SmallNeInBigNe -> bpp_config_H0_F_Ne
| HaPC_BigNeInSmallNe -> bpp_config_HaPC_F_Ne
| HaPC_SmallNeInBigNe -> bpp_config_HaPC_F_Ne
| HaPC_NeSmall -> bpp_config_HaPC_F_Ne
| HaPCOC_NeSmall -> bpp_config_HaPCOC_F_Ne
| H0_NeBig -> bpp_config_H0_F_Ne
| HaPC_NeBig -> bpp_config_HaPC_F_Ne
| HaPCOC_NeBig -> bpp_config_HaPCOC_F_Ne
| HaPC_NeG5_NeC_div2 -> bpp_config_HaPC_F_Ne
| HaPC_NeG5_NeC_x2 -> bpp_config_HaPC_F_Ne
| H0_NeG5_NeC_div2 -> bpp_config_H0_F_Ne
| H0_NeG5_NeC_x2 -> bpp_config_H0_F_Ne
;
]
......@@ -68,6 +68,10 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG3-> 3.
| HaPC_NeG4-> 4.
| HaPC_NeG5-> 5.
| HaPC_NeG5_NeC_div2 -> 5.
| HaPC_NeG5_NeC_x2 -> 5.
| H0_NeG5_NeC_div2 -> 5.
| H0_NeG5_NeC_x2 -> 5.
| _ -> 1.
in
let ne_c = match model with
......@@ -81,19 +85,11 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG3-> ne_g
| HaPC_NeG4-> ne_g
| HaPC_NeG5-> ne_g
| H0_NeVerySmall -> 0.001
| H0_NeSmall -> 0.1
| HaPCOC_NeSmall -> 0.1
| HaPC_NeSmall -> 0.1
| H0_NeBig -> 10.
| HaPC_NeBig -> 10.
| HaPCOC_NeBig -> 10.
| H0_BigNeInSmallNe -> 10.
| H0_SmallNeInBigNe -> 0.1
| HaPC_BigNeInSmallNe -> 10.
| HaPC_SmallNeInBigNe -> 0.1
| _ -> 1.
| HaPC_NeG5_NeC_div2 -> ne_g /. 2.
| HaPC_NeG5_NeC_x2 -> ne_g *. 2.
| H0_NeG5_NeC_div2 -> ne_g /. 2.
| H0_NeG5_NeC_x2 -> ne_g *. 2.
| _ -> ne_g
in
let ne_a = match model with
| H0_NeG1 -> ne_g
......@@ -106,11 +102,11 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
| HaPC_NeG3-> ne_g
| HaPC_NeG4-> ne_g
| HaPC_NeG5-> ne_g
| H0_BigNeInSmallNe -> 0.1
| H0_SmallNeInBigNe -> 10.
| HaPC_BigNeInSmallNe -> 0.1
| HaPC_SmallNeInBigNe -> 10.
| _ -> 1.
| HaPC_NeG5_NeC_div2 -> ne_g
| HaPC_NeG5_NeC_x2 -> ne_g
| H0_NeG5_NeC_div2 -> ne_g
| H0_NeG5_NeC_x2 -> ne_g
| _ -> ne_g
in
let profile_f = profile.profile_f in
let profile_c = profile.profile_c in
......@@ -136,30 +132,20 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n
HaPC_NeG5;
HaPCOC ;
];
( if no_HaPC then
[]
else
[HaPC ;
]
);
if preview then
[]
else
[(if no_Ne then
[]
else
[H0_NeSmall ;
HaPC_NeSmall ;
H0_NeBig ;
HaPC_NeBig ;
[HaPC_NeG5_NeC_div2 ;
HaPC_NeG5_NeC_x2 ;
H0_NeG5_NeC_div2 ;
H0_NeG5_NeC_x2 ;
]
);
(if ne_test then
[
H0_BigNeInSmallNe;
H0_SmallNeInBigNe;
HaPC_BigNeInSmallNe;
HaPC_SmallNeInBigNe;
]
else
[]
......@@ -170,11 +156,11 @@ let derive_from_tree ~tree_dir ~tree ~profile ~preview ~use_concat ~ns ~no_Ne ~n
let dataset_per_hypo = List.map models ~f:(fun model ->
derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~preview ~ns
) in
let ready_dataset_H0 = (derive_from_model ~model:H0 ~input_tree ~tree_dataset ~tree_prefix ~profile ~preview ~ns).dataset in
let ready_dataset_H0 = (derive_from_model ~model:H0_NeG5 ~input_tree ~tree_dataset ~tree_prefix ~profile ~preview ~ns).dataset in
let ready_dataset_HaPCOC = (derive_from_model ~model:HaPCOC ~input_tree ~tree_dataset ~tree_prefix ~profile ~preview ~ns).dataset in
let ready_dataset_HaPC = (derive_from_model ~model:HaPC ~input_tree ~tree_dataset ~tree_prefix ~profile ~preview ~ns).dataset in
let concat_H0HaPCOC = {Dataset.model_prefix="H0+HaPCOC"; tree_prefix; is_real = false; dataset = Ready_dataset.paste ready_dataset_H0 ready_dataset_HaPCOC} in
let concat_H0HaPC = {Dataset.model_prefix="H0+HaPC"; tree_prefix; is_real = false; dataset = Ready_dataset.paste ready_dataset_H0 ready_dataset_HaPC} in
let ready_dataset_HaPC = (derive_from_model ~model:HaPC_NeG5 ~input_tree ~tree_dataset ~tree_prefix ~profile ~preview ~ns).dataset in
let concat_H0HaPCOC = {Dataset.model_prefix="H0_NeG5+HaPCOC"; tree_prefix; is_real = false; dataset = Ready_dataset.paste ready_dataset_H0 ready_dataset_HaPCOC} in
let concat_H0HaPC = {Dataset.model_prefix="H0_NeG5+HaPC_NeG5"; tree_prefix; is_real = false; dataset = Ready_dataset.paste ready_dataset_H0 ready_dataset_HaPC} in
let dataset_concat_hypos = if use_concat then [concat_H0HaPC;] else [] in
List.concat [ dataset_per_hypo ; dataset_concat_hypos ]
......
......@@ -29,7 +29,7 @@ let repo rd =
[
item ["input_tree.nhx"] rd.input_tree ;
item ["recalculated_tree.nw"] (Phyml.phyml_tree ~tree:rd.input_tree phy );
item ["tree.H0.node_ids" ] (Tree_dataset.nodes rd.tree_dataset H0) ;
item ["tree.H0.node_ids" ] (Tree_dataset.nodes rd.tree_dataset H0_NeG5) ;
item ["tree.Ha.node_ids" ] (Tree_dataset.nodes rd.tree_dataset HaPCOC) ;
item ["tree.only_convergent_tags.nhx" ] (Tree_dataset.tree rd.tree_dataset `Detection) ;
item ["tree.only_node_ids.nhx" ] (Tree_dataset.tree rd.tree_dataset `Simulation) ;
......
......@@ -27,20 +27,11 @@ let nodes dataset (model : Convergence_hypothesis.t) =
|HaPC_NeG3-> [ "tree.Ha.node_ids" ]
|HaPC_NeG4-> [ "tree.Ha.node_ids" ]
|HaPC_NeG5-> [ "tree.Ha.node_ids" ]
|H0 -> [ "tree.H0.node_ids" ]
|HaPC -> [ "tree.Ha.node_ids" ]
|HaPC_NeG5_NeC_div2 -> [ "tree.Ha.node_ids" ]
|HaPC_NeG5_NeC_x2 -> [ "tree.Ha.node_ids" ]
|H0_NeG5_NeC_div2 -> [ "tree.H0_a.node_ids" ]
|H0_NeG5_NeC_x2 -> [ "tree.H0_a.node_ids" ]
|HaPCOC -> [ "tree.Ha.node_ids" ]
|HaPCOC_NeSmall -> [ "tree.Ha.node_ids" ]
|HaPC_NeSmall -> [ "tree.Ha.node_ids" ]
|HaPCOC_NeBig -> [ "tree.Ha.node_ids" ]
|HaPC_NeBig -> [ "tree.Ha.node_ids" ]
|H0_NeSmall -> [ "tree.H0_a.node_ids" ]
|H0_NeVerySmall -> [ "tree.H0_a.node_ids" ]
|H0_NeBig -> [ "tree.H0_a.node_ids" ]
|H0_BigNeInSmallNe-> [ "tree.H0_a.node_ids" ]
|H0_SmallNeInBigNe-> [ "tree.H0_a.node_ids" ]
|HaPC_BigNeInSmallNe-> [ "tree.Ha.node_ids" ]
|HaPC_SmallNeInBigNe-> [ "tree.Ha.node_ids" ]
)
let tree dataset mode =
......
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