msd.ml 1.14 KB
Newer Older
1 2 3 4 5 6
open Core
open Bistro.Std
open Bistro.EDSL
open Bistro_bioinfo.Std
open File_formats

Carine Rey's avatar
Carine Rey committed
7
let env = docker_image ~account:"carinerey" ~name:"msd" ~tag:"08082018" ()
8

9
let msd ~e ~(faa:aminoacid_fasta workflow) ~(tree_sc:_ workflow) : [`msd] directory workflow =
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  let map_table = tmp // "map.tsv" in
  let tree_nw = tmp // "tree.nw" in
  let out = dest // "out.tsv" in
  workflow ~descr:"convergence_detection.run_msd" [
    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> *)
    cmd "python" ~env [
      file_dump (string Scripts.parse_input_msd) ;
      opt "-i" dep tree_sc;
      opt "-o" ident tree_nw;
      opt "-m" ident map_table;
    ];
    cmd "msd" ~env [
      opt "-t" int 1;
      opt "-o"  ident out ;
25
      opt "-e" float e ;
26 27 28 29 30 31 32 33 34 35 36 37 38 39
      dep tree_sc;
      ident map_table;
      dep faa;
    ];
  ]

let results run_msd : text_file workflow =
  workflow ~descr:"convergence_detection.parse_msd" [
    cmd "python" ~env [
      file_dump (string Scripts.parse_output_msd) ;
      opt "-i" dep (run_msd / selector ["out.tsv"]);
      opt "-o" ident dest;
    ];
  ]