Commit 0749c915 authored by Carine Rey's avatar Carine Rey
Browse files

reviewphiltrans_app: add options for pcoc* diffsel identical topological + a logger

parent 603a2404
open Core
open Reviewphiltrans
open Bistro_utils
let first_nhx_in_dir dir =
Sys.readdir dir
......@@ -7,20 +9,36 @@ let first_nhx_in_dir dir =
let sw b x = if b then Some x else None
let realdata_main ~use_diffsel ~indir ~outdir ~np ~mem () =
let realdata_main ~use_diffsel
~use_pcoc
~use_pcoc_c60
~use_pcoc_gamma
~use_topological
~use_identical
~no_use_multinomial
~indir ~outdir ~np ~mem () =
let loggers = [
Console_logger.create () ;
] in
let mem = Option.map mem ~f:(fun i -> `GB i) in
let rd =
Real_dataset.make
~alignment_dir_path:(Filename.concat indir "Alignments")
~tree_path:(Filename.concat indir (first_nhx_in_dir indir))
in
let use_multinomial = not no_use_multinomial in
let meths = List.filter_opt [
sw use_diffsel `Diffsel ;
Some `Multinomial ;
sw use_pcoc `Pcoc ;
sw use_pcoc_c60 `Pcoc_c60 ;
sw use_pcoc_gamma `Pcoc_gamma ;
sw use_topological `Topological ;
sw use_identical `Identical ;
sw use_multinomial `Multinomial ;
]
in
Real_dataset.repo meths rd
|> Bistro_utils.Repo.build_main ~outdir ?np ?mem
|> Bistro_utils.Repo.build_main ~outdir ~loggers ?np ?mem
let realdata_command =
let open Command.Let_syntax in
......@@ -33,20 +51,35 @@ let realdata_command =
flag "--indir" (required string) ~doc:"PATH Input directory"
and use_diffsel =
flag "--diffsel" no_arg ~doc:" use the diffsel method (very slow)."
and use_pcoc =
flag "--pcoc" no_arg ~doc:" use the pcoc method (slow)."
and use_pcoc_c60 =
flag "--pcoc_c60" no_arg ~doc:" use the pcoc method with c60 profils (very_slow)."
and use_pcoc_gamma =
flag "--pcoc_gamma" no_arg ~doc:" use the pcoc method with the gamma option (very_slow)."
and use_topological =
flag "--topological" no_arg ~doc:" use the topological method (fast)."
and use_identical =
flag "--identical" no_arg ~doc:" use the identical method (fast)."
and no_use_multinomial =
flag "--no-multinomial" no_arg ~doc:" not use the multinomial method (very fast so by default)."
(* and preview =
* flag "--preview-mode" no_arg ~doc:" Preview mode"
* and use_diffsel =
* flag "--diffsel" no_arg ~doc:" use the diffsel method (very slow)."
* and use_c60 =
* flag "--c60" no_arg ~doc:" use the pcoc c60 method (slow)."
* and calc_dnds =
* flag "--dnds" no_arg ~doc:" calculate dn ds dnds trees (slow)." *)
* flag "--dnds" no_arg ~doc:" calculate dn ds dnds trees (slow)."*)
and np =
flag "--np" (optional int) ~doc:"INT Number of available processors"
and mem =
flag "--mem" (optional int) ~doc:"INT Available memory (in GB)"
in
realdata_main ~use_diffsel ~indir ~outdir ~np ~mem
realdata_main ~use_diffsel
~use_pcoc
~use_pcoc_c60
~use_pcoc_gamma
~use_topological
~use_identical
~no_use_multinomial
~indir ~outdir ~np ~mem
]
let () =
......
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