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
5a2a7780
Commit
5a2a7780
authored
May 29, 2020
by
Philippe Veber
Browse files
toolbox/Result_table: handle NA
parent
13812c9c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
lib/convergence_detection.ml
lib/convergence_detection.ml
+1
-0
lib/orthomam.ml
lib/orthomam.ml
+7
-4
lib/toolbox/result_table.ml
lib/toolbox/result_table.ml
+6
-2
lib/toolbox/result_table.mli
lib/toolbox/result_table.mli
+1
-1
No files found.
lib/convergence_detection.ml
View file @
5a2a7780
...
...
@@ -196,6 +196,7 @@ let%workflow recall_precision_auc_table table =
let
{
RT
.
oracle
;
scores_per_meth
}
=
RT
.
of_file
[
%
path
table
]
in
let
labels
=
Option
.
value_exn
oracle
in
List
.
map
scores_per_meth
~
f
:
(
fun
(
meth
,
scores
)
->
let
scores
=
Array
.
filter_opt
scores
in
let
_
,
auc
=
Biocaml_unix
.
Bin_pred
.
recall_precision_curve
~
labels
~
scores
in
meth
,
auc
)
...
...
lib/orthomam.ml
View file @
5a2a7780
...
...
@@ -536,10 +536,13 @@ let%workflow ranking_of_results ~alignment_ids ~convergent_species (alignments :
end
in
let
module
H
=
CCHeap
.
Make
(
S
)
in
let
add_result_line
acc
~
alignment
~
pos
~
score
=
let
candidate
=
{
S
.
alignment
;
pos
;
score
}
in
let
acc
=
H
.
add
acc
candidate
in
if
H
.
size
acc
>
ranking_size
then
H
.
take_exn
acc
|>
fst
else
acc
match
score
with
|
None
->
acc
|
Some
score
->
let
candidate
=
{
S
.
alignment
;
pos
;
score
}
in
let
acc
=
H
.
add
acc
candidate
in
if
H
.
size
acc
>
ranking_size
then
H
.
take_exn
acc
|>
fst
else
acc
in
let
add_result_file
alignment
acc
(
rf
:
Result_table
.
t
Lazy
.
t
)
=
let
col
=
List
.
Assoc
.
find_exn
(
Lazy
.
force
rf
)
.
scores_per_meth
column_label
~
equal
:
String
.
equal
in
...
...
lib/toolbox/result_table.ml
View file @
5a2a7780
...
...
@@ -2,7 +2,7 @@ open Core_kernel
type
t
=
{
oracle
:
bool
array
option
;
scores_per_meth
:
(
string
*
float
array
)
list
;
scores_per_meth
:
(
string
*
float
option
array
)
list
;
}
let
of_file
fn
=
...
...
@@ -33,7 +33,11 @@ let of_file fn =
List
.
filter_map
cols
~
f
:
(
fun
(
label
,
values
)
->
if
String
.(
label
<>
"Oracle"
&&
label
<>
"Sites"
)
then
let
values
=
List
.
map
values
~
f
:
Float
.
of_string
List
.
map
values
~
f
:
(
function
|
"NA"
->
None
|
x
->
Some
(
Float
.
of_string
x
)
)
|>
Array
.
of_list
in
Some
(
label
,
values
)
...
...
lib/toolbox/result_table.mli
View file @
5a2a7780
...
...
@@ -2,7 +2,7 @@
type
t
=
{
oracle
:
bool
array
option
;
scores_per_meth
:
(
string
*
float
array
)
list
;
scores_per_meth
:
(
string
*
float
option
array
)
list
;
}
val
of_file
:
string
->
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