Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VEBER Philippe
codepi
Commits
0749c915
Commit
0749c915
authored
Oct 08, 2019
by
Carine Rey
Browse files
reviewphiltrans_app: add options for pcoc* diffsel identical topological + a logger
parent
603a2404
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
9 deletions
+42
-9
app/reviewphiltrans_app.ml
app/reviewphiltrans_app.ml
+42
-9
No files found.
app/reviewphiltrans_app.ml
View file @
0749c915
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
()
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment