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
3aea5571
Commit
3aea5571
authored
Jul 18, 2018
by
Carine Rey
Browse files
add --no-hapc
parent
c2d3c0cf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
24 deletions
+37
-24
lib/pipeline.ml
lib/pipeline.ml
+37
-24
No files found.
lib/pipeline.ml
View file @
3aea5571
...
...
@@ -73,7 +73,7 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile_f ~
let
ready_dataset
=
{
Ready_dataset
.
input_tree
=
input_tree
;
tree_dataset
;
fna
;
faa
;
fna_infos
}
in
{
Dataset
.
model_prefix
;
is_real
=
false
;
tree_prefix
;
dataset
=
ready_dataset
}
let
derive_from_tree
~
tree_dir
~
tree
~
profile_f
~
preview
~
use_concat
~
ns
~
no_Ne
=
let
derive_from_tree
~
tree_dir
~
tree
~
profile_f
~
preview
~
use_concat
~
ns
~
no_Ne
~
no_HaPC
=
let
tree_prefix
=
Filename
.
chop_extension
tree
in
let
input_tree
=
input
(
Filename
.
concat
tree_dir
tree
)
in
let
tree_dataset
=
Tree_dataset
.
prepare
input_tree
in
...
...
@@ -85,9 +85,16 @@ let derive_from_tree ~tree_dir ~tree ~profile_f ~preview ~use_concat ~ns ~no_Ne
if
preview
then
[]
else
if
no_Ne
then
[(
if
no_HaPC
then
[]
else
[
HaPC
;
]
)
;
(
if
no_Ne
then
[]
else
[
HaPC
;
H0_NeSmall
;
...
...
@@ -97,6 +104,8 @@ let derive_from_tree ~tree_dir ~tree ~profile_f ~preview ~use_concat ~ns ~no_Ne
HaPCOC_NeBig
;
HaPC_NeBig
;
]
)
]
|>
List
.
concat
]
|>
List
.
concat
in
let
dataset_per_hypo
=
List
.
map
models
~
f
:
(
fun
model
->
...
...
@@ -108,10 +117,10 @@ let derive_from_tree ~tree_dir ~tree ~profile_f ~preview ~use_concat ~ns ~no_Ne
let
dataset_concat_hypos
=
if
use_concat
then
[
concat_H0Ha
;]
else
[]
in
List
.
concat
[
dataset_per_hypo
;
dataset_concat_hypos
]
let
derive_sim
~
tree_dir
~
trees
~
profile_fn
~
preview
~
use_concat
~
ns
~
no_Ne
=
let
derive_sim
~
tree_dir
~
trees
~
profile_fn
~
preview
~
use_concat
~
ns
~
no_Ne
~
no_HaPC
=
let
profile_f
=
input
profile_fn
in
List
.
map
trees
~
f
:
(
fun
tree
->
derive_from_tree
~
tree_dir
~
tree
~
profile_f
~
preview
~
use_concat
~
ns
~
no_Ne
)
derive_from_tree
~
tree_dir
~
tree
~
profile_f
~
preview
~
use_concat
~
ns
~
no_Ne
~
no_HaPC
)
|>
List
.
concat
...
...
@@ -245,20 +254,20 @@ let detection_main ~outdir ~indir ?(np = 2) ?(mem = 2) ~preview ~fast_mode () =
let
repo
=
repo_of_dataset_results_l
~
dataset_results_l
in
Repo
.
build
~
outdir
~
np
~
mem
:
(
`GB
mem
)
~
logger
repo
let
simulation_main
~
outdir
?
(
ns
=
0
)
?
(
np
=
2
)
?
(
mem
=
2
)
~
tree_dir
~
profile_fn
~
preview
~
use_concat
~
no_Ne
()
=
let
simulation_main
~
outdir
?
(
ns
=
0
)
?
(
np
=
2
)
?
(
mem
=
2
)
~
tree_dir
~
profile_fn
~
preview
~
use_concat
~
no_Ne
~
no_HaPC
()
=
let
trees
=
Array
.
to_list
@@
Sys
.
readdir
tree_dir
in
let
dataset_l
=
derive_sim
~
tree_dir
~
trees
~
profile_fn
~
preview
~
use_concat
~
ns
~
no_Ne
in
let
dataset_l
=
derive_sim
~
tree_dir
~
trees
~
profile_fn
~
preview
~
use_concat
~
ns
~
no_Ne
~
no_HaPC
in
let
repo
=
Dataset
.
repo
dataset_l
~
preview
in
Repo
.
build
~
outdir
~
np
~
mem
:
(
`GB
mem
)
~
logger
repo
let
validation_main
~
outdir
?
(
indir
=
""
)
?
(
ns
=
0
)
?
(
np
=
2
)
?
(
mem
=
2
)
~
preview
~
fast_mode
~
no_Ne
~
tree_dir
~
profile_fn
~
use_concat
()
=
let
validation_main
~
outdir
?
(
indir
=
""
)
?
(
ns
=
0
)
?
(
np
=
2
)
?
(
mem
=
2
)
~
preview
~
fast_mode
~
no_Ne
~
no_HaPC
~
tree_dir
~
profile_fn
~
use_concat
()
=
let
trees
=
Array
.
to_list
@@
Sys
.
readdir
tree_dir
in
let
repo
=
List
.
map
trees
~
f
:
(
fun
tree
->
let
trees
=
[
tree
]
in
let
tree_prefix
=
Filename
.
chop_extension
tree
in
let
indir_dataset_l
=
if
indir
=
""
then
[]
else
parse_input_data
indir
in
let
dataset_l
=
derive_sim
~
tree_dir
~
trees
~
profile_fn
~
preview
~
use_concat
~
ns
~
no_Ne
derive_sim
~
tree_dir
~
trees
~
profile_fn
~
preview
~
use_concat
~
ns
~
no_Ne
~
no_HaPC
@
indir_dataset_l
in
let
dataset_results_l
=
derive_det
~
dataset_l
~
preview
~
fast_mode
in
let
post_analyses
=
Post_analyses
.
post_analyses_of_dataset_results_l
~
dataset_results_l
in
...
...
@@ -285,6 +294,8 @@ let simulation_command =
flag
"--preview-mode"
no_arg
~
doc
:
" Preview mode"
and
no_Ne
=
flag
"--no-ne"
no_arg
~
doc
:
" mode without hypothesis including different Ne"
and
no_HaPC
=
flag
"--no-hapc"
no_arg
~
doc
:
" mode without ~HaPC hypothesis"
and
ns
=
flag
"--ns"
(
optional
int
)
~
doc
:
"INT Number of sites to simulate"
and
np
=
...
...
@@ -298,7 +309,7 @@ let simulation_command =
and
profile_fn
=
flag
"--profile-fn"
(
required
string
)
~
doc
:
"PATH Path to profile file"
in
simulation_main
~
outdir
?
ns
?
np
?
mem
~
no_Ne
~
tree_dir
~
profile_fn
~
preview
~
use_concat
simulation_main
~
outdir
?
ns
?
np
?
mem
~
no_Ne
~
no_HaPC
~
tree_dir
~
profile_fn
~
preview
~
use_concat
]
let
detection_command
=
...
...
@@ -337,6 +348,8 @@ let validation_command =
flag
"--fast"
no_arg
~
doc
:
" 'Fast' mode without the most costly methods"
and
no_Ne
=
flag
"--no-ne"
no_arg
~
doc
:
" mode without hypothesis including different Ne"
and
no_HaPC
=
flag
"--no-hapc"
no_arg
~
doc
:
" mode without ~HaPC hypothesis"
and
use_concat
=
flag
"--use-concat"
no_arg
~
doc
:
" Use concatenation H0+Ha_pcoc"
and
ns
=
...
...
@@ -350,5 +363,5 @@ let validation_command =
and
profile_fn
=
flag
"--profile-fn"
(
required
string
)
~
doc
:
"PATH Path to profile file"
in
validation_main
~
outdir
?
indir
?
ns
?
np
?
mem
~
preview
~
fast_mode
~
no_Ne
~
tree_dir
~
profile_fn
~
use_concat
validation_main
~
outdir
?
indir
?
ns
?
np
?
mem
~
preview
~
fast_mode
~
no_Ne
~
no_HaPC
~
tree_dir
~
profile_fn
~
use_concat
]
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