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

Commit d1a36d18 authored by Carine Rey's avatar Carine Rey
Browse files

define 2 different models

parent fcc90e34
......@@ -10,29 +10,18 @@ let assign k v =
seq ~sep:"=" [ string k ; v ]
let conf_file_bppseqgen ~tree ~nb_sites =
let conf_file_bppseqgen ~tree ~nb_sites ~config =
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
output.internal.sequences=no
|} ;
string {|nonhomogeneous = general
nonhomogeneous.number_of_models = 1
model1.nodes_id=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
nonhomogeneous.root_freq=Fixed()
rate_distribution=Constant()
|};
string config ;
]
let bppseqgen ~nb_sites ~tree : nucleotide_fasta workflow =
let bppseqgen ~nb_sites ~tree ~config : nucleotide_fasta workflow =
workflow ~descr:"bppsuite.bppseqgen" [
cmd "bppseqgen" ~env [
assign "param" (file_dump (conf_file_bppseqgen ~tree ~nb_sites)) ;
assign "param" (file_dump (conf_file_bppseqgen ~tree ~nb_sites ~config)) ;
]
]
......
......@@ -5,6 +5,7 @@ open File_formats
val bppseqgen :
nb_sites:int ->
tree:nhx workflow ->
config: string ->
nucleotide_fasta workflow
val fna2faa :
......
open Core
open Bistro_utils
open Bistro.EDSL
open Bistro.Std
open File_formats
type model =
|H0
|Ha
let string_of_model m = match m with
| H0 -> "H0"
| Ha -> "Ha"
let define_bpp_config_of_model ~parsed_tree m = match m with
| H0 -> {|alphabet=Codon(letter=DNA)
genetic_code = Standard
input.tree.format=Nhx
output.internal.sequences=no
nonhomogeneous = general
nonhomogeneous.number_of_models = 1
model1=Codon_AAFit(model=K80, fitness=FromModel(model=LGL08_CAT_C1(nbCat=10)))
model1.nodes_id=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
nonhomogeneous.root_freq=Fixed()
rate_distribution=Constant()
|};
| Ha -> {|alphabet=Codon(letter=DNA)
genetic_code = Standard
input.tree.format=Nhx
output.internal.sequences=no
nonhomogeneous = general
nonhomogeneous.number_of_models = 2
model1=Codon_AAFit(model=K80, fitness=FromModel(model=LGL08_CAT_C1(nbCat=10)))
model1.nodes_id=15,1,13,14,4
model2=Codon_AAFit(model=K80, fitness=FromModel(model=LGL08_CAT_C7(nbCat=10)))
model2.nodes_id=0,2,3,5,6,7,8,9,10,11,12,16,17
nonhomogeneous.root_freq=Fixed()
rate_distribution=Constant()
|};
......@@ -3,7 +3,7 @@ open Bistro_utils
open Bistro.EDSL
open Bistro.Std
open File_formats
open Models_def
let parse_input_tree ~tree : parsed_input_tree directory workflow =
workflow ~descr:"utils.parse_input_tree" [
......@@ -50,7 +50,8 @@ let repo_of_raw_dataset (raw_dataset:raw_dataset) =
let derive_from_model ~model ~tree ~parsed_tree ~preview =
let nb_sites = if preview then 10 else 100 in
let fna = Bppsuite.bppseqgen ~nb_sites ~tree:(select_out parsed_tree Tree4simu) in
let config = define_bpp_config_of_model model in
let fna = Bppsuite.bppseqgen ~nb_sites ~tree:(select_out parsed_tree Tree4simu) ~config in
let faa = Bppsuite.fna2faa ~fna in
let raw_dataset = { input_tree = tree ; fna} in
let ready_dataset = { input_tree = tree ; parsed_tree; fna; faa} in
......@@ -59,12 +60,13 @@ let derive_from_model ~model ~tree ~parsed_tree ~preview =
else
repo_of_raw_dataset raw_dataset
let derive_from_tree ~tree_dir ~tree ~preview =
let tree = input (Filename.concat tree_dir tree) in
let parsed_tree = parse_input_tree ~tree in
let models = ["H0"] in
let models = [H0; Ha] in
List.map models ~f:(fun model ->
Repo.shift model (derive_from_model ~model ~tree ~parsed_tree ~preview))
Repo.shift (string_of_model model) (derive_from_model ~model ~tree ~parsed_tree ~preview))
|> List.concat
let derive ~tree_dir ~trees ~preview =
......
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