bppsuite.ml 1 KB
Newer Older
LANORE Vincent's avatar
LANORE Vincent committed
1 2 3 4
open Bistro.EDSL
open Core


Carine Rey's avatar
Carine Rey committed
5
let env = docker_image ~account:"carinerey" ~name:"bppsuite:06182018" ()
LANORE Vincent's avatar
LANORE Vincent committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

let assign k v =
  seq ~sep:"=" [ string k ; v ]

let conf_file ~tree ~nb_sites =
  seq ~sep:"\n" [
    assign "input.tree.file" (dep tree) ;
    assign "output.sequence.file" dest ;
    assign "model1" (string "Codon_AAFit(model=K80, fitness=FromModel(model=LGL08_CAT_C1(nbCat=10)))") ;
    assign "number_of_sites" (int nb_sites) ;
    string {|alphabet=Codon(letter=DNA)
             genetic_code = Standard
             input.tree.format=Nhx
             nonhomogeneous = general
             nonhomogeneous.number_of_models = 1
Carine Rey's avatar
Carine Rey committed
21
             model1.nodes_id=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
LANORE Vincent's avatar
LANORE Vincent committed
22 23 24 25 26 27
             nonhomogeneous.root_freq=Fixed()
             rate_distribution=Constant()
             output.internal.sequences=no
           |}
  ]

28
let bppseqgen ~nb_sites ~tree = workflow ~descr:"bppsuite.bppseqgen" [
LANORE Vincent's avatar
LANORE Vincent committed
29 30 31 32
    cmd "bppseqgen" ~env [
      assign "param" (file_dump (conf_file ~tree ~nb_sites)) ;
    ]
  ]