Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

tamuri.ml 1.7 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:"tdg09_python" ~tag:"v1.1.2_07102018" ()
8 9 10 11 12

let tdg09  ~(faa:aminoacid_fasta workflow) ~(tree:_ workflow) : [`tdg09] directory workflow =
  let tdg09_out = dest // "tdg09.yaml" in
  let tmp_ali_phy = dest // "tmp_ali.phy" in
  let tmp_tree = dest // "tmp.nw" in
Carine Rey's avatar
Carine Rey committed
13 14
  let package = tmp // "diffsel_script_utils.py" in
  let script = tmp // "try_again.py" in
15
  workflow ~descr:"convergence_detection.run_tdg09" [
16
    docker env (
17 18
      and_list [
        mkdir_p dest ;
Carine Rey's avatar
Carine Rey committed
19 20 21
        mkdir_p tmp ;
        cd tmp ;

22 23 24 25 26 27
        cmd "python" [
          file_dump (string Scripts.rename_input_tree_ali_tdg09) ;
          opt "-t" dep tree;
          opt "-a" dep faa;
          opt "-out_a " ident tmp_ali_phy;
          opt "-out_t " ident tmp_tree;
28
        ];
Carine Rey's avatar
Carine Rey committed
29 30 31 32 33

        cmd "cp"  [ file_dump (string Scripts.diffsel_script_utils) ; package] ;
        cmd "cp" [ file_dump (string Scripts.try_again) ; script] ;

        cmd "python" ~stdout:tdg09_out [
34
          string "try_again.py";
35
          opt "--timeout" int 240;
36 37 38 39 40 41
          string "\"java -cp /tdg09/tdg09-1.1.2/dist/tdg09.jar tdg09.Analyse";
          opt "-tree" ident tmp_tree;
          opt "-alignment"  ident tmp_ali_phy ;
          opt "-threads"  int 1 ;
          opt "-groups"  string "XE ME" ;
          string "\"";
42
        ];
43 44
      ]
    )
45 46 47 48 49 50
  ]

let results run_tdg09 : text_file workflow =
  let tdg09_out = run_tdg09 / selector [ "tdg09.yaml" ] in
  workflow ~descr:"convergence_detection.parse_tdg09" [
    cmd "python" ~env [
51 52 53 54
      file_dump (string Scripts.parse_results_tdg09) ;
      opt "-tdg09" dep tdg09_out;
      opt "-o" ident dest;
    ]
55
  ]