Commit 45cac61a authored by LANORE Vincent's avatar LANORE Vincent
Browse files

Added Phylip file to simulation output + minor indentation

parent 2918632f
......@@ -8,8 +8,6 @@ type t = {
dataset : Ready_dataset.t ;
}
let repo ~preview dataset_l =
List.map dataset_l ~f:(fun dataset ->
let model_prefix = dataset.model_prefix in
......
......@@ -4,7 +4,7 @@ open Bistro_utils
open Bistro.EDSL
open Bistro_bioinfo.Std
open File_formats
open Bppsuite
type t = {
input_tree: nhx workflow ;
......@@ -14,7 +14,6 @@ type t = {
faa: aminoacid_fasta workflow ;
}
let of_raw (raw_dataset : Raw_dataset.t) =
let input_tree = raw_dataset.input_tree in
let fna = raw_dataset.fna in
......@@ -26,20 +25,21 @@ let of_raw (raw_dataset : Raw_dataset.t) =
let repo rd =
Repo.[
[
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 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) ;
item ["tree.diffsel" ] (Tree_dataset.diffsel_tree rd.tree_dataset) ;
item ["tree.convergent_topology" ] (Tree_dataset.topological_tree rd.tree_dataset) ;
item ["simulated_sequences.fna"] rd.fna ;
item ["simulated_sequences.faa"] rd.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 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) ;
item ["tree.diffsel" ] (Tree_dataset.diffsel_tree rd.tree_dataset) ;
item ["tree.convergent_topology" ] (Tree_dataset.topological_tree rd.tree_dataset) ;
item ["simulated_sequences.fna"] rd.fna ;
item ["simulated_sequences.faa"] rd.faa ;
item ["simulated_sequences.phy"] (Bppsuite.fa2phy rd.fna) ;
] ;
match rd.fna_infos with
| Some w -> [item ["simulated_sequences.fna_infos"] w]
| None -> []
;
| Some w -> [item ["simulated_sequences.fna_infos"] w]
| None -> []
;
]
|> List.concat
|> Repo.shift "ready_dataset"
......@@ -50,8 +50,8 @@ let to_raw { input_tree ; fna ; fna_infos} =
let paste_fna_infos ~(fna_infos_l: text_file workflow list) : text_file workflow =
workflow ~descr:"cat" [
cmd "cat" ~stdout:dest (List.concat [
List.map fna_infos_l ~f:(fun fna_infos -> dep fna_infos) ;
])
List.map fna_infos_l ~f:(fun fna_infos -> dep fna_infos) ;
])
]
let paste d1 d2 =
......@@ -59,10 +59,10 @@ let paste d1 d2 =
let r_d2 = to_raw d2 in
let fna = Bppsuite.paste_fna [r_d1.fna ; r_d2.fna ] in
let fna_infos_l = List.map [r_d1.fna_infos ; r_d2.fna_infos] ~f:(fun fna_infos ->
match fna_infos with
match fna_infos with
| Some i -> [i]
| None -> []
) |> List.concat in
) |> List.concat in
let fna_infos = Some (paste_fna_infos ~fna_infos_l) in
let ready_dataset = of_raw {Raw_dataset.input_tree=r_d1.input_tree ; fna; fna_infos} in
ready_dataset
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