Commit bc830089 authored by Carine Rey's avatar Carine Rey Committed by Philippe Veber
Browse files

add descr

parent e23b62a6
......@@ -91,13 +91,13 @@ let bppancestor ?(descr="") ~faa ~tree ~config : _ workflow =
)
]
let identical ~(tree_id:_ pworkflow) ~(tree_sc:_ pworkflow) ~(faa:aminoacid_fasta pworkflow) ~prot_model : [`identical] dworkflow =
let identical ?(descr="") ~(tree_id:_ pworkflow) ~(tree_sc:_ pworkflow) ~(faa:aminoacid_fasta pworkflow) ~prot_model : [`identical] dworkflow =
let config = [assign "model" (string prot_model)] in
let out1 = dest // "out1.tsv" in
let out2 = dest // "out2.tsv" in
let run_bppancestor = bppancestor ~descr:"" ~tree:tree_id ~faa ~config in
let proba = Workflow.select run_bppancestor ["sites.tsv"] in
Workflow.shell ~descr:("identical."^prot_model) [
Workflow.shell ~descr:("identical."^prot_model^"."^descr) [
mkdir dest ;
cmd "python" ~img:Pcoc.img [
file_dump (string Scripts.calc_identical) ;
......
......@@ -5,12 +5,14 @@ open File_formats
let img = Env.env_msd
let msd ~e ~(faa : aminoacid_fasta pworkflow) ~(tree_sc : _ pworkflow) : [`msd] dworkflow =
let msd ?(descr="") ~e ~(faa : aminoacid_fasta pworkflow) ~(tree_sc : _ pworkflow) : [`msd] dworkflow =
let map_table = dest // "map.tsv" in
let tree_nw = dest // "tree.nw" in
let out = dest // "out.tsv" in
Workflow.shell ~descr:"convergence_detection.run_msd" [
let fa_tmp = tmp // "out.tsv" in
Workflow.shell ~descr:("convergence_detection.run_msd."^descr) [
mkdir_p dest;
mkdir_p tmp;
(*./msd -t 1 -o <nom fichier de sortie> -e 0.05 <phylogénie Newick> <table caractère convergent> <fichier de simulation fasta> *)
cmd "python" ~img [
file_dump (string Scripts.parse_input_msd) ;
......@@ -18,13 +20,25 @@ let msd ~e ~(faa : aminoacid_fasta pworkflow) ~(tree_sc : _ pworkflow) : [`msd]
opt "-o" ident tree_nw;
opt "-m" ident map_table;
];
cmd "cp" ~img [
dep faa;
ident fa_tmp
];
cmd "cat" ~img [
ident fa_tmp
];
cmd "grep" ~img [
string "-c";
string "\">\"";
ident fa_tmp
];
cmd "msd" ~img [
opt "-t" int 1;
opt "-o" ident out ;
opt "-e" float e ;
ident tree_nw;
ident map_table;
dep faa;
ident fa_tmp;
];
]
......
......@@ -3,9 +3,10 @@ open Bistro
open Bistro.Shell_dsl
open File_formats
let multinomial ~(tree_sc:_ pworkflow) ~(faa:aminoacid_fasta pworkflow) : text_file pworkflow =
let multinomial ?(descr="") ~(tree_sc:_ pworkflow) ~(faa:aminoacid_fasta pworkflow) : [`multinomial] dworkflow =
let img = Env.env_py in
Workflow.shell ~descr:("calc_multinomial") [
Workflow.shell ~descr:("calc_multinomial."^descr) [
mkdir_p dest;
cmd "python" ~img [
file_dump (string Scripts.calc_multinomial) ;
opt "-t" dep tree_sc;
......
......@@ -207,12 +207,12 @@ let derive_from_det_meth ~det_meth ~(dataset : Dataset.t) ~preview =
| `Pcoc_C60 -> `Pcoc_C60 (Pcoc.pcoc ~descr ~catx_est:60 ~plot_complete: false ~gamma:false ~faa ~tree:tree_sc)
| `Tdg09 -> `Tdg09 (Tamuri.tdg09 ~descr ~faa ~tree:tree_sc)
| `Diffsel -> `Diffsel (Diffsel.diffsel ~descr ~phy_n ~tree:diffsel_tree ~w_every ~n_cycles ~id:1 ~seed ())
| `Identical_LG -> `Identical_LG (Identical.identical ~faa ~tree_id ~tree_sc ~prot_model:"LG08")
| `Identical_WAG -> `Identical_WAG (Identical.identical ~faa ~tree_id ~tree_sc ~prot_model:"WAG01")
| `Topological_LG -> `Topological_LG (Topological.topological ~faa ~tree:tree_id ~tree_conv ~prot_model:"LG08")
| `Topological_WAG -> `Topological_WAG (Topological.topological ~faa ~tree:tree_id ~tree_conv ~prot_model:"WAG01")
| `Multinomial -> `Multinomial (Multinomial.multinomial ~faa ~tree_sc)
| `Msd e -> `Msd (Msd.msd ~e ~faa ~tree_sc, e)
| `Identical_LG -> `Identical_LG (Identical.identical ~descr ~faa ~tree_id ~tree_sc ~prot_model:"LG08")
| `Identical_WAG -> `Identical_WAG (Identical.identical ~descr ~faa ~tree_id ~tree_sc ~prot_model:"WAG01")
| `Topological_LG -> `Topological_LG (Topological.topological ~descr ~faa ~tree:tree_id ~tree_conv ~prot_model:"LG08")
| `Topological_WAG -> `Topological_WAG (Topological.topological ~descr ~faa ~tree:tree_id ~tree_conv ~prot_model:"WAG01")
| `Multinomial -> `Multinomial (Multinomial.multinomial ~descr ~faa ~tree_sc)
| `Msd e -> `Msd (Msd.msd ~descr ~e ~faa ~tree_sc, e)
let derive_from_dataset ~dataset ~preview ~use_diffsel ~use_c60=
......
......@@ -48,7 +48,7 @@ let bppml ?(descr="") ~faa ~tree ~config : _ workflow =
)
]
let topological ~(tree:_ pworkflow) ~(tree_conv:_ pworkflow) ~(faa:aminoacid_fasta pworkflow) ~prot_model : [`topological] dworkflow =
let topological ?(descr="") ~(tree:_ pworkflow) ~(tree_conv:_ pworkflow) ~(faa:aminoacid_fasta pworkflow) ~prot_model : [`topological] dworkflow =
let config = [assign "model" (string prot_model)] in
let run_bppml = bppml ~descr:"" ~tree ~config ~faa in
let run_bppml_conv = bppml ~descr:".conv" ~tree:tree_conv ~config ~faa in
......@@ -57,7 +57,7 @@ let topological ~(tree:_ pworkflow) ~(tree_conv:_ pworkflow) ~(faa:aminoacid_fas
let bppml_out = Workflow.select run_bppml ["infos.tsv"] in
let bppml_out_conv = Workflow.select run_bppml_conv ["infos.tsv"] in
let out = dest // "out.tsv" in
Workflow.shell ~descr:("topological.parse_"^prot_model) [
Workflow.shell ~descr:("topological.parse_"^prot_model^"."^descr) [
mkdir dest ;
cmd "cp" [dep bppml_out ; dest // "estimates.bppml_out.tsv" ];
cmd "cp" [dep bppml_out_conv ; dest // "estimates.bppml_out_conv.tsv" ];
......
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