msd.ml 1.09 KB
Newer Older
1
open Core
Philippe Veber's avatar
Philippe Veber committed
2 3
open Bistro
open Bistro.Shell_dsl
4 5
open File_formats

Philippe Veber's avatar
Philippe Veber committed
6
let img = Env.env_msd
7

Philippe Veber's avatar
Philippe Veber committed
8
let msd ~e ~(faa : aminoacid_fasta pworkflow) ~(tree_sc : _ pworkflow) : [`msd] dworkflow =
Carine Rey's avatar
Carine Rey committed
9 10
  let map_table = dest // "map.tsv" in
  let tree_nw = dest // "tree.nw" in
11
  let out = dest // "out.tsv" in
Philippe Veber's avatar
Philippe Veber committed
12
  Workflow.shell ~descr:"convergence_detection.run_msd" [
13 14
    mkdir_p dest;
    (*./msd -t 1 -o <nom fichier de sortie> -e 0.05 <phylogénie Newick> <table caractère convergent> <fichier de simulation fasta> *)
Philippe Veber's avatar
Philippe Veber committed
15
    cmd "python" ~img [
16 17 18 19 20
      file_dump (string Scripts.parse_input_msd) ;
      opt "-i" dep tree_sc;
      opt "-o" ident tree_nw;
      opt "-m" ident map_table;
    ];
Philippe Veber's avatar
Philippe Veber committed
21
    cmd "msd" ~img [
22 23
      opt "-t" int 1;
      opt "-o"  ident out ;
24
      opt "-e" float e ;
Carine Rey's avatar
Carine Rey committed
25
      ident tree_nw;
26 27 28 29 30
      ident map_table;
      dep faa;
    ];
  ]

Philippe Veber's avatar
Philippe Veber committed
31 32 33
let results run_msd : text_file pworkflow =
  Workflow.shell ~descr:"convergence_detection.parse_msd" [
    cmd "python" ~img [
34
      file_dump (string Scripts.parse_output_msd) ;
Philippe Veber's avatar
Philippe Veber committed
35
      opt "-i" dep (Workflow.select run_msd ["out.tsv"]);
36 37 38
      opt "-o" ident dest;
    ];
  ]