Commit 25efcb37 authored by Philippe Veber's avatar Philippe Veber
Browse files

refactoring: don't repeat select paths

parent c33c07df
......@@ -12,24 +12,25 @@ let ready_dataset_of_raw_dataset raw_dataset =
let faa = Bppsuite.fna2faa ~fna in
{ input_tree; tree_dataset ; fna; faa}
let repo_of_ready_dataset (ready_dataset:ready_dataset) =
let repo_of_ready_dataset (rd : ready_dataset) =
Repo.[
item ["ready_dataset/input_tree.nhx"] ready_dataset.input_tree ;
item ["ready_dataset/tree.H0.node_ids" ] (ready_dataset.tree_dataset / selector [ "tree.H0.node_ids" ]) ;
item ["ready_dataset/tree.Ha.node_ids" ] (ready_dataset.tree_dataset / selector [ "tree.Ha.node_ids" ]) ;
item ["ready_dataset/tree.only_convergent_tags.nhx" ] (ready_dataset.tree_dataset / selector [ "tree.only_convergent_tags.nhx" ]) ;
item ["ready_dataset/tree.only_node_ids.nhx" ] (ready_dataset.tree_dataset / selector [ "tree.only_node_ids.nhx" ]) ;
item ["ready_dataset/tree.diffsel" ] (ready_dataset.tree_dataset / selector [ "tree.diffsel" ]) ;
item ["ready_dataset/simulated_sequences.fna"] ready_dataset.fna ;
item ["ready_dataset/simulated_sequences.faa"] ready_dataset.faa ;
item ["input_tree.nhx"] rd.input_tree ;
item ["tree.H0.node_ids" ] (Tree_dataset.nodes rd.tree_dataset H0) ;
item ["tree.Ha.node_ids" ] (Tree_dataset.nodes rd.tree_dataset Ha) ;
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) ;
item ["tree.diffsel" ] (Tree_dataset.diffsel_tree rd.tree_dataset) ;
item ["simulated_sequences.fna"] rd.fna ;
item ["simulated_sequences.faa"] rd.faa ;
]
|> Repo.shift "ready_dataset"
let repo_of_raw_dataset (raw_dataset:raw_dataset) =
Repo.[
item ["raw_dataset/input_tree.nhx"] raw_dataset.input_tree ;
item ["raw_dataset/simulated_sequences.fna"] raw_dataset.fna ;
item ["input_tree.nhx"] raw_dataset.input_tree ;
item ["simulated_sequences.fna"] raw_dataset.fna ;
]
|> Repo.shift "raw_dataset"
let derive_from_model ~model ~tree ~tree_dataset ~preview =
let nb_sites = if preview then 10 else 100 in
......
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