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
1a98f301
Commit
1a98f301
authored
Aug 24, 2018
by
Philippe Veber
Browse files
bppsuite: fixed random seed usage
parent
aa74ed23
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
lib/bppsuite.ml
lib/bppsuite.ml
+7
-5
lib/bppsuite.mli
lib/bppsuite.mli
+1
-0
lib/pipeline.ml
lib/pipeline.ml
+1
-1
No files found.
lib/bppsuite.ml
View file @
1a98f301
...
...
@@ -56,16 +56,16 @@ let conf_file_bppseqgen_multi_profiles ~tree ~profile_f ~ne_c ~ne_a ~config ~nb_
assign
"NE_1"
(
float
ne_a
)
;
assign
"NE_C"
(
float
ne_c
)
;
assign
"NE_T"
(
float
ne_c
)
;
assign
"seed"
(
int
1
)
;
]
@
config
)
let
bppseqgen_multi_profiles_script
~
config
~
out
~
profile_c
=
let
bppseqgen_multi_profiles_script
~
config
~
out
~
profile_c
~
seed
=
let
vars
=
[
"FINAL_OUT"
,
ident
out
;
"PARAM"
,
config
;
"PROFILE_C"
,
ident
profile_c
;
"RANDOM"
,
int
seed
;
]
in
bash_script
vars
{
|
...
...
@@ -77,7 +77,9 @@ let bppseqgen_multi_profiles_script ~config ~out ~profile_c =
COL_M1
=
`echo
$
line
|
cut
-
f
1
-
d
" "
`
COL_M2
=
`echo
$
line
|
cut
-
f
2
-
d
" "
`
echo
"i: $i"
"COL_M1: $COL_M1"
"COL_M2: $COL_M2"
bppseqgen
param
=$
PARAM
i
=$
i
COL_M1
=$
COL_M1
COL_M2
=$
COL_M2
output
.
sequence
.
file
=
out_int_
"$i"
.
fa
SEED
=$
{
RANDOM
}
echo
seed
=$
{
SEED
}
bppseqgen
param
=$
PARAM
i
=$
i
COL_M1
=$
COL_M1
COL_M2
=$
COL_M2
output
.
sequence
.
file
=
out_int_
"$i"
.
fa
seed
=$
{
SEED
}
done
<
"$PROFILE_C"
cp
$
PROFILE_C
$
FINAL_OUT
.
info
...
...
@@ -88,7 +90,7 @@ let bppseqgen_multi_profiles_script ~config ~out ~profile_c =
|
}
let
bppseqgen_multi_profiles
?
(
descr
=
""
)
~
profile_f
~
profile_c
~
nb_sites
~
tree
~
config
~
ne_c
~
ne_a
:
bppseqgen_multi_profiles
directory
workflow
=
let
bppseqgen_multi_profiles
?
(
descr
=
""
)
~
profile_f
~
profile_c
~
nb_sites
~
tree
~
config
~
ne_c
~
ne_a
~
seed
:
bppseqgen_multi_profiles
directory
workflow
=
let
nb_sites_per_profile
=
1
in
(* let nb_combis = Pervasives.(nb_sites / nb_sites_per_profile) in *)
let
config_f
=
dest
//
"config.bpp"
in
...
...
@@ -106,7 +108,7 @@ let bppseqgen_multi_profiles ?(descr="") ~profile_f ~profile_c ~nb_sites ~tree ~
dep profile_c
];*)
cmd
"cat"
~
stdout
:
config_f
[(
file_dump
(
conf_file_bppseqgen_multi_profiles
~
tree
~
profile_f
~
config
~
ne_c
~
ne_a
~
nb_sites_per_profile
))];
cmd
"bash"
[(
file_dump
(
bppseqgen_multi_profiles_script
~
config
:
config_f
~
out
~
profile_c
:
profile_c_ok
))];
cmd
"bash"
[(
file_dump
(
bppseqgen_multi_profiles_script
~
config
:
config_f
~
out
~
profile_c
:
profile_c_ok
~
seed
))];
]
)
]
...
...
lib/bppsuite.mli
View file @
1a98f301
...
...
@@ -20,6 +20,7 @@ val bppseqgen_multi_profiles :
config
:
Bistro
.
Template
.
t
list
->
ne_c
:
float
->
ne_a
:
float
->
seed
:
int
->
bppseqgen_multi_profiles
directory
workflow
val
bppseqgen_multi_profiles_get_fa
:
...
...
lib/pipeline.ml
View file @
1a98f301
...
...
@@ -110,7 +110,7 @@ let derive_from_model ~model ~input_tree ~tree_dataset ~tree_prefix ~profile ~pr
in
let
profile_f
=
profile
.
profile_f
in
let
profile_c
=
profile
.
profile_c
in
let
run_fna
=
Bppsuite
.
bppseqgen_multi_profiles
~
descr
~
nb_sites
~
tree
~
config
:
config_p
~
profile_f
~
profile_c
~
ne_c
~
ne_a
in
let
run_fna
=
Bppsuite
.
bppseqgen_multi_profiles
~
descr
~
nb_sites
~
tree
~
config
:
config_p
~
profile_f
~
profile_c
~
ne_c
~
ne_a
~
seed
:
(
Random
.
int
Int
.
max_value
)
in
let
fna
=
Bppsuite
.
bppseqgen_multi_profiles_get_fa
run_fna
in
let
fna_infos
=
Some
(
Bppsuite
.
bppseqgen_multi_profiles_get_info
run_fna
)
in
...
...
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