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

Commit 8da43ac3 authored by Carine Rey's avatar Carine Rey
Browse files

Merge branch 'to_be_fixed' (typing errors)

parents 6cc5433b 8d6a7441
open Core
open Bistro.EDSL
open Bistro.Std
open Core
open File_formats
open Bistro_bioinfo.Std
open File_formats
type pcoc_out
type diffsel_out
......
open File_formats
open Bistro.Std
type parsed_input_tree
type output_parse_input_tree =
| Nodes_H0
| Nodes_Ha
| Tree4detect
| Tree4simu
| Tree_diffsel
type raw_dataset = {
input_tree: nhx workflow ;
fna: nucleotide_fasta workflow ;
}
type ready_dataset = {
input_tree: nhx workflow ;
tree_dataset : [`tree_dataset] directory workflow ;
fna: nucleotide_fasta workflow ;
faa: aminoacid_fasta workflow ;
}
type ('a,'b) w_dataset =
| Raw_dataset of 'a
| Ready_dataset of 'b
type dataset = {
model_prefix: string ;
tree_prefix : string ;
ready_dataset : ready_dataset
}
type det_meth =
| Pcoc
| Pcoc_gamma
| Diffsel
let string_of_det_meth = function
| Pcoc -> "pcoc"
| Pcoc_gamma -> "pcoc_gamma"
| Diffsel -> "diffsel"
type 'a w_det_meth =
| Pcoc_w of 'a
| Pcoc_gamma_w of 'a
| Diffsel of 'a
type det_result = {
dataset : dataset ;
det_meth : det_meth ;
det_result : Convergence_detection.det_out directory workflow ;
}
type dataset_res = {
res_by_tools: det_result list ;
merged_results : string
}
......@@ -26,58 +26,3 @@ class type nucleotide_phylip = object
method format : [`Nucleotide]
end
type parsed_input_tree
type output_parse_input_tree =
| Nodes_H0
| Nodes_Ha
| Tree4detect
| Tree4simu
| Tree_diffsel
type raw_dataset = {
input_tree: nhx workflow ;
fna: nucleotide_fasta workflow ;
}
type ready_dataset = {
input_tree: nhx workflow ;
tree_dataset : [`tree_dataset] directory workflow ;
fna: nucleotide_fasta workflow ;
faa: aminoacid_fasta workflow ;
}
type ('a,'b) w_dataset =
| Raw_dataset of 'a
| Ready_dataset of 'b
type dataset = {
model_prefix: string ;
tree_prefix : string ;
ready_dataset : ready_dataset
}
type det_meth =
| Pcoc
| Pcoc_gamma
| Diffsel
let string_of_det_meth = function
| Pcoc -> "pcoc"
| Pcoc_gamma -> "pcoc_gamma"
| Diffsel -> "diffsel"
type 'a w_det_meth =
| Pcoc_w of 'a
| Pcoc_gamma_w of 'a
| Diffsel of 'a
type 'a det_result = {
dataset : dataset ;
det_meth : det_meth ;
det_result : 'a workflow
}
......@@ -3,6 +3,7 @@ open Bistro_utils
open Bistro.EDSL
open Bistro.Std
open File_formats
open Defs
let ready_dataset_of_raw_dataset raw_dataset =
let input_tree = raw_dataset.input_tree in
......@@ -87,25 +88,28 @@ let derive_sim ~tree_dir ~trees ~profile_fn ~preview =
|> List.concat
let repo_of_det_results_l ~det_results_l =
List.map det_results_l ~f:(fun det_results ->
let model_prefix = det_results.dataset.model_prefix in
let tree_prefix = det_results.dataset.tree_prefix in
let det_meth = det_results.det_meth in
let det_meth_prefix = string_of_det_meth det_meth in
let open Convergence_detection in
let w = det_results.det_result
let repo_of_dataset_results_l ~dataset_results_l =
List.map dataset_results_l ~f:(fun dataset_results ->
let det_results_l = dataset_results.res_by_tools in
List.map det_results_l ~f:(fun det_results ->
let model_prefix = det_results.dataset.model_prefix in
let tree_prefix = det_results.dataset.tree_prefix in
let det_meth = det_results.det_meth in
let det_meth_prefix = string_of_det_meth det_meth in
let open Convergence_detection in
let w = det_results.det_result
in
let repo_d = Repo.shift "Detection_tools" (Repo.shift det_meth_prefix (
Repo.[
match det_meth with
| Pcoc -> item ["pcoc.results.tsv"] w
| Pcoc_gamma -> item ["pcoc_gamma.results.tsv"] w
| Diffsel -> item ["diffsel.results.tsv"] w
]
))
in
let repo_d = Repo.shift "Detection_tools" (Repo.shift det_meth_prefix (
Repo.[
match det_meth with
| Pcoc -> item ["pcoc.results.tsv"] w
| Pcoc_gamma -> item ["pcoc_gamma.results.tsv"] w
| Diffsel -> item ["diffsel.results.tsv"] w
]
))
in
Repo.shift tree_prefix (Repo.shift model_prefix repo_d)
Repo.shift tree_prefix (Repo.shift model_prefix repo_d)
) |> List.concat
)
|> List.concat
......@@ -130,14 +134,15 @@ let derive_from_det_meth ~det_meth ~dataset ~preview =
let derive_from_dataset ~dataset ~preview=
let det_meths = [Pcoc;Pcoc_gamma;Diffsel] in
List.map det_meths ~f:(fun det_meth ->
let res_by_tools = List.map det_meths ~f:(fun det_meth ->
derive_from_det_meth ~det_meth ~dataset ~preview
)
) in
let merged_results = "" (* TODO: replace "" by a workflow *) in
{res_by_tools; merged_results}
let derive_det ~dataset_l ~profile_fn ~preview=
List.map dataset_l ~f:(fun dataset ->
derive_from_dataset ~preview ~dataset)
|> List.concat
let main ~outdir ?(np = 2) ?(mem = 2) ~tree_dir ~profile_fn ~preview () =
let logger =
......@@ -147,10 +152,10 @@ let main ~outdir ?(np = 2) ?(mem = 2) ~tree_dir ~profile_fn ~preview () =
] in
let trees = Array.to_list @@ Sys.readdir tree_dir in
let dataset_l = derive_sim ~tree_dir ~trees ~profile_fn ~preview in
let det_results_l = derive_det ~dataset_l ~profile_fn ~preview in
let dataset_results_l = derive_det ~dataset_l ~profile_fn ~preview in
let repo = [
repo_of_dataset_l dataset_l ~preview ;
repo_of_det_results_l det_results_l;
repo_of_dataset_results_l ~dataset_results_l;
]
|> List.concat
in
......
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