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
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
VEBER Philippe
codepi
Commits
a2508335
Commit
a2508335
authored
Nov 17, 2020
by
Philippe Veber
Browse files
Simulation_dataset: renaming
parent
b295e9ff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
29 deletions
+29
-29
app/diffseldsparse_benchmark.ml
app/diffseldsparse_benchmark.ml
+1
-1
lib/simulation_dataset.ml
lib/simulation_dataset.ml
+23
-23
lib/simulation_dataset.mli
lib/simulation_dataset.mli
+5
-5
No files found.
app/diffseldsparse_benchmark.ml
View file @
a2508335
...
...
@@ -4,7 +4,7 @@ open Codepi
let
main
~
n_h0
~
n_ha
~
seed
:
i
()
=
let
open
Simulation_dataset
in
let
sim
=
bppseqgen_mixed
_simulation
bppseqgen_mixed
~
tree
:
(
NHX
(
Bistro
.
Workflow
.
input
"example/trees_analyses/cyp_coding.Chrysithr_root.nhx"
))
~
profiles
:
"example/aa_fitness/263SelectedProfiles.tsv"
~
n_h0
~
n_ha
~
ne_s
:
4
.
~
seed
:
i
()
...
...
lib/simulation_dataset.ml
View file @
a2508335
...
...
@@ -22,7 +22,7 @@ let tree_workflow = function
npairs
}
->
Simulator
.
pair_tree
~
branch_length1
~
branch_length2
~
npairs
module
Convdet_simulation
_param
=
struct
module
Mutsel
_param
=
struct
type
t
=
{
tree
:
tree
;
branch_scale
:
float
;
...
...
@@ -52,7 +52,7 @@ module Convdet_simulation_param = struct
end
type
t
=
|
Bppseqgen
_simulation
of
{
|
Bppseqgen
of
{
hypothesis
:
Convergence_hypothesis
.
t
;
tree
:
tree
;
profiles
:
string
;
...
...
@@ -67,9 +67,9 @@ type t =
n_ha
:
int
;
ne_s
:
float
;
}
|
Convdet_simulation
of
Convdet_simulation
_param
.
t
|
Mutsel
of
Mutsel
_param
.
t
let
bppseqgen_mixed
_simulation
?
(
ne_s
=
1
.
)
?
(
seed
=
0
)
~
tree
~
profiles
~
n_h0
~
n_ha
()
=
let
bppseqgen_mixed
?
(
ne_s
=
1
.
)
?
(
seed
=
0
)
~
tree
~
profiles
~
n_h0
~
n_ha
()
=
Bppseqgen_mixed
{
tree
;
profiles
;
...
...
@@ -79,8 +79,8 @@ let bppseqgen_mixed_simulation ?(ne_s = 1.) ?(seed = 0) ~tree ~profiles ~n_h0 ~n
ne_s
;
}
let
bppseqgen
_simulation
~
hyp
~
tree
~
profiles
~
nb_sites
~
seed
=
Bppseqgen
_simulation
{
let
bppseqgen
~
hyp
~
tree
~
profiles
~
nb_sites
~
seed
=
Bppseqgen
{
hypothesis
=
hyp
;
tree
;
profiles
;
...
...
@@ -88,21 +88,21 @@ let bppseqgen_simulation ~hyp ~tree ~profiles ~nb_sites ~seed =
seed
;
}
let
convdet_simulation
?
branch_scale
?
ne_s
?
gBGC
?
seed
~
tree
~
profiles
~
n_h0
~
n_ha
()
=
Convdet_simulation
(
Convdet_simulation
_param
.
make
?
branch_scale
?
ne_s
?
gBGC
?
seed
~
tree
~
profiles
~
n_h0
~
n_ha
()
)
let
mutsel
?
branch_scale
?
ne_s
?
gBGC
?
seed
~
tree
~
profiles
~
n_h0
~
n_ha
()
=
Mutsel
(
Mutsel
_param
.
make
?
branch_scale
?
ne_s
?
gBGC
?
seed
~
tree
~
profiles
~
n_h0
~
n_ha
()
)
let
convdet_simulation_of_param
p
=
Convdet_simulation
p
let
of_mutsel_param
p
=
Mutsel
p
let
tree
~
branch_length_unit
:_
=
function
|
Bppseqgen
_simulation
{
tree
;
_
}
|
Bppseqgen
{
tree
;
_
}
|
Bppseqgen_mixed
{
tree
;
_
}
|
Convdet_simulation
{
tree
;
_
}
->
|
Mutsel
{
tree
;
_
}
->
tree_workflow
tree
let
seed
=
function
|
Bppseqgen_mixed
s
->
s
.
seed
|
Bppseqgen
_simulation
s
->
s
.
seed
|
Convdet_simulation
s
->
s
.
seed
|
Bppseqgen
s
->
s
.
seed
|
Mutsel
s
->
s
.
seed
let
profile
~
nb_sites
~
profiles
~
seed
=
Profile
.
profile_l_of_splitted_profile
...
...
@@ -111,7 +111,7 @@ let profile ~nb_sites ~profiles ~seed =
profiles
~
seed
:
(
calc_fixed_seed
~
str
:
profiles
seed
)
let
bppseqgen
sim
~
hypothesis
~
nb_sites
~
profiles
=
let
bppseqgen
_simulation
sim
~
hypothesis
~
nb_sites
~
profiles
=
let
model_prefix
=
Convergence_hypothesis
.
string_of_model
hypothesis
in
let
descr
=
sprintf
".%s"
model_prefix
in
let
profile
=
profile
~
nb_sites
~
profiles
~
seed
:
(
seed
sim
)
in
...
...
@@ -123,15 +123,15 @@ let bppseqgen sim ~hypothesis ~nb_sites ~profiles =
~
hypothesis
~
profile_f
~
profile_c
~
seed
:
(
seed
sim
)
let
rec
nucleotide_alignment
=
function
|
Bppseqgen
_simulation
{
hypothesis
;
nb_sites
;
profiles
;
_
}
as
sim
->
bppseqgen
sim
~
hypothesis
~
nb_sites
~
profiles
|
Bppseqgen
{
hypothesis
;
nb_sites
;
profiles
;
_
}
as
sim
->
bppseqgen
_simulation
sim
~
hypothesis
~
nb_sites
~
profiles
|>
Bppsuite
.
Bppseqgen
.
alignment
|
Bppseqgen_mixed
{
profiles
;
seed
;
n_h0
;
n_ha
;
ne_s
;
tree
}
->
let
h0
=
nucleotide_alignment
(
Bppseqgen
_simulation
{
hypothesis
=
H0
(
Fixed
ne_s
)
;
profiles
;
seed
;
nb_sites
=
n_h0
;
tree
})
in
let
ha
=
nucleotide_alignment
(
Bppseqgen
_simulation
{
hypothesis
=
HaPC
(
Fixed
ne_s
)
;
profiles
;
seed
;
nb_sites
=
n_ha
;
tree
})
in
let
h0
=
nucleotide_alignment
(
Bppseqgen
{
hypothesis
=
H0
(
Fixed
ne_s
)
;
profiles
;
seed
;
nb_sites
=
n_h0
;
tree
})
in
let
ha
=
nucleotide_alignment
(
Bppseqgen
{
hypothesis
=
HaPC
(
Fixed
ne_s
)
;
profiles
;
seed
;
nb_sites
=
n_ha
;
tree
})
in
Utils
.
fasta_cappend
h0
ha
|
Convdet_simulation
param
->
Convdet_simulation
_param
.
simulation
param
|
Mutsel
param
->
Mutsel
_param
.
simulation
param
|>
Simulator
.
alignment_of_simulation
include
Detection_pipeline
.
Make
(
struct
...
...
@@ -150,13 +150,13 @@ let alignment_plot d =
let
oracle
d
=
let
n_h0
,
n_ha
=
match
d
with
|
Bppseqgen
_simulation
{
nb_sites
;
hypothesis
;
_
}
->
(
|
Bppseqgen
{
nb_sites
;
hypothesis
;
_
}
->
(
match
hypothesis
with
|
H0
_
->
nb_sites
,
0
|
HaPC
_
|
HaPCOC
_
->
0
,
nb_sites
)
|
Bppseqgen_mixed
{
n_h0
;
n_ha
;
_
}
|
Convdet_simulation
{
n_h0
;
n_ha
;
_
}
->
n_h0
,
n_ha
|
Mutsel
{
n_h0
;
n_ha
;
_
}
->
n_h0
,
n_ha
in
Convergence_detection
.
oracle
~
n_h0
~
n_ha
...
...
@@ -353,7 +353,7 @@ let explore_params ~(f: param_t -> _) =
let
simu_of_param
?
n_h0
:
(
n_h0
=
50
)
(
p
:
param_t
)
=
let
bf
,
gbgc
=
p
in
convdet_simulation
mutsel
~
tree
:
(
NHX
(
Workflow
.
input
"example/trees_analyses/C4AmaranthaceaePolyroot.nhx"
))
~
profiles
:
"example/aa_fitness/263SelectedProfiles.tsv"
~
branch_scale
:
bf
...
...
lib/simulation_dataset.mli
View file @
a2508335
...
...
@@ -11,7 +11,7 @@ type tree =
type
t
val
bppseqgen_mixed
_simulation
:
val
bppseqgen_mixed
:
?
ne_s
:
float
->
?
seed
:
int
->
tree
:
tree
->
...
...
@@ -21,7 +21,7 @@ val bppseqgen_mixed_simulation :
unit
->
t
val
bppseqgen
_simulation
:
val
bppseqgen
:
hyp
:
Convergence_hypothesis
.
t
->
tree
:
tree
->
profiles
:
string
->
...
...
@@ -29,7 +29,7 @@ val bppseqgen_simulation :
seed
:
int
->
t
module
Convdet_simulation
_param
:
sig
module
Mutsel
_param
:
sig
type
t
val
make
:
?
branch_scale
:
float
->
...
...
@@ -47,7 +47,7 @@ module Convdet_simulation_param : sig
Codepitk
.
Simulator
.
Site_independent_mutsel
.
simulation
workflow
end
val
convdet_simulation
:
val
mutsel
:
?
branch_scale
:
float
->
?
ne_s
:
float
*
float
->
?
gBGC
:
float
*
float
->
...
...
@@ -59,7 +59,7 @@ val convdet_simulation :
unit
->
t
val
convdet_simulation_of_param
:
Convdet_simulation
_param
.
t
->
t
val
of_mutsel_param
:
Mutsel
_param
.
t
->
t
include
Detection_pipeline
.
Query
with
type
t
:=
t
...
...
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