Commit 1940c313 authored by Louis Duchemin's avatar Louis Duchemin
Browse files

Rerconverge : rename wip.ml to rer_omm.ml + tidy up stdout

parent 3d8e32a1
......@@ -22,9 +22,9 @@
(pps ppx_jane)))
(executable
(name wip)
(public_name wip)
(modules wip)
(name rer_omm)
(public_name rer_omm)
(modules rer_omm)
(libraries codepi)
(preprocess
(pps ppx_jane)))
open Core_kernel
let db = Codepitk.Orthomam_db.make "/home/louis/Data/omm/"
let echolocators = Bistro.Workflow.data Codepi.Orthomam.species_with_echolocation
......@@ -21,16 +22,16 @@ module Top = Bistro_utils.Toplevel_eval.Make(struct
let result_table_script targets =
let open Codepi.R_console in
let assignments =
List.map (fun (clade, target) ->
List.map ~f:(fun (clade, target) ->
path (Codepi.Rer_converge.string_of_clade clade) Codepi.Orthomam.(target.result_table)
) targets
in
rconsole (module Top) "library(tidyverse)" assignments
let () =
result_table_script (pipeline ~phenotypes:subterraneans)
(* let () =
result_table_script (pipeline ~phenotypes:subterraneans) *)
let main () =
let () =
try
let loggers = [ Bistro_utils.Console_logger.create () ] in
let allowed_containers = [ `Docker ] in
......@@ -40,12 +41,12 @@ let main () =
~mem:(`GB 8) ~loggers
|> print_endline
in
List.iter2 (fun label phenotypes ->
pipeline ~phenotypes
|> List.iter (fun (clade, target) ->
print_endline label;
List.iter2_exn ~f:(fun label phenotypes ->
let result_list = pipeline ~phenotypes in
result_list |> List.iter ~f:(fun (clade, target) ->
print_endline ("Foreground clade : " ^ (Codepi.Rer_converge.string_of_clade clade));
Printf.sprintf "%s : %s" label (Codepi.Rer_converge.string_of_clade clade)
|> print_endline;
print_string "Result table : ";
execute Codepi.Orthomam.(target.result_table);
......@@ -55,11 +56,18 @@ let main () =
print_string "Candidates summary : ";
execute target.best_candidate_summary;
print_endline "```r";
result_table_script result_list;
print_endline "```";
Out_channel.newline stdout;
)
)
["Subterraneans"; "Marines"]
["Subterraneans" ]
(* ; "Marines"] *)
(* ; "Marines "; "Echolocators"] *)
[subterraneans; marines]
[subterraneans]
(* ; marines] *)
(* ; marines; echolocators] *)
with Failure msg -> print_endline msg
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