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
9a03de8b
Commit
9a03de8b
authored
Nov 11, 2020
by
Philippe Veber
Browse files
Simulation_dataset.benchmark_stats: fixed bug
parent
94013a1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
app/lmm_benchmark.ml
app/lmm_benchmark.ml
+4
-4
lib/simulation_dataset.ml
lib/simulation_dataset.ml
+8
-2
No files found.
app/lmm_benchmark.ml
View file @
9a03de8b
...
...
@@ -15,7 +15,7 @@ let besnard2009 = {
label
=
"besnard2009"
;
tree
=
Bistro
.
Workflow
.
input
"data/besnard2009/besnard2009.nhx"
;
rooted
=
true
;
branch_scale
=
1
0
.
;
branch_scale
=
1
.
;
ne_s
=
4
.,
4
.
;
}
...
...
@@ -23,7 +23,7 @@ let oneline_rodent = {
label
=
"online_rodent"
;
tree
=
Bistro
.
Workflow
.
input
"data/online_rodent/online_rodent.nhx"
;
rooted
=
true
;
branch_scale
=
1
0
.
;
branch_scale
=
1
.
;
ne_s
=
4
.,
4
.
;
}
...
...
@@ -31,7 +31,7 @@ let rubisco = {
label
=
"rubisco"
;
tree
=
Rubisco_dataset
.(
Path
"data/rubisco"
|>
Query
.
tree
~
branch_length_unit
:
`Amino_acid
)
;
rooted
=
false
;
branch_scale
=
1
0
.
;
branch_scale
=
1
.
;
ne_s
=
4
.,
4
.
;
}
...
...
@@ -44,7 +44,7 @@ let orthomam_echolocation = {
(
Codepitk
.
Orthomam_db
.
make
"omm"
)
)
;
rooted
=
false
;
branch_scale
=
1
0
.
;
branch_scale
=
1
.
;
ne_s
=
4
.,
4
.
;
}
...
...
lib/simulation_dataset.ml
View file @
9a03de8b
...
...
@@ -212,6 +212,7 @@ let%pworkflow benchmark_statistics simulation ~labels ~results =
let
open
Codepitk
in
let
open
OCamlR_base
in
let
open
Codepitk
.
Simulator
.
Site_independent_mutsel
in
let
module
Codon
=
Codon
.
Universal_genetic_code
.
NS
in
let
load_results
fn
col
=
let
open
Codepitk
in
let
df
=
Dataframe
.
from_file
fn
|>
Rresult
.
R
.
failwith_error_msg
in
...
...
@@ -233,7 +234,6 @@ let%pworkflow benchmark_statistics simulation ~labels ~results =
l
,
`Numeric
(
Numeric
.
of_array_opt
r
)
)
in
let
amino_acid_vector_of_codon_vector
xs
=
let
module
Codon
=
Codon
.
Universal_genetic_code
.
NS
in
Amino_acid
.
Vector
.
init
(
fun
aa
->
List
.
fold
Codon
.
all
~
init
:
0
.
~
f
:
(
fun
acc
c
->
if
Amino_acid
.
equal
aa
(
Codon
.
aa_of_codon
c
)
then
...
...
@@ -258,7 +258,13 @@ let%pworkflow benchmark_statistics simulation ~labels ~results =
let
t
=
Amino_acid
.
Table
.
init
(
fun
aa
->
let
aa
=
Amino_acid
.
to_char
aa
in
List
.
count
seqs
~
f
:
(
fun
s
->
Char
.
equal
(
s
:
Dna
.
t
:>
string
)
.
[
i
]
aa
)
List
.
count
seqs
~
f
:
(
fun
s
->
let
codon_str
=
String
.
sub
(
s
:
Dna
.
t
:>
string
)
~
pos
:
(
i
*
3
)
~
len
:
3
in
let
codon
=
match
Codon
.
of_string
codon_str
with
|
Some
c
->
c
|
None
->
assert
false
in
Char
.
equal
(
Amino_acid
.
to_char
(
Codon
.
aa_of_codon
codon
))
aa
)
)
in
(
t
:>
int
array
)
...
...
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