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
8e7685ab
Commit
8e7685ab
authored
Nov 17, 2020
by
Philippe Veber
Browse files
More precise type for detection method outputs
parent
8210cff4
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
80 additions
and
72 deletions
+80
-72
app/lmm_benchmark.ml
app/lmm_benchmark.ml
+1
-1
lib/convergence_detection.ml
lib/convergence_detection.ml
+5
-4
lib/convergence_detection.mli
lib/convergence_detection.mli
+19
-19
lib/detection_pipeline.ml
lib/detection_pipeline.ml
+15
-15
lib/detection_pipeline.mli
lib/detection_pipeline.mli
+15
-15
lib/diffsel.ml
lib/diffsel.ml
+1
-1
lib/diffsel.mli
lib/diffsel.mli
+1
-1
lib/diffseldsparse.ml
lib/diffseldsparse.ml
+1
-1
lib/diffseldsparse.mli
lib/diffseldsparse.mli
+2
-2
lib/file_formats.ml
lib/file_formats.ml
+7
-0
lib/gemma.mli
lib/gemma.mli
+1
-1
lib/identical.ml
lib/identical.ml
+1
-1
lib/inhouse_lmm.mli
lib/inhouse_lmm.mli
+1
-1
lib/msd.ml
lib/msd.ml
+1
-1
lib/multinomial.ml
lib/multinomial.ml
+2
-2
lib/pcoc.ml
lib/pcoc.ml
+1
-1
lib/pcoc.mli
lib/pcoc.mli
+1
-1
lib/real_dataset.mli
lib/real_dataset.mli
+1
-1
lib/simulation_pipeline.mli
lib/simulation_pipeline.mli
+3
-3
lib/tamuri.ml
lib/tamuri.ml
+1
-1
No files found.
app/lmm_benchmark.ml
View file @
8e7685ab
...
...
@@ -51,7 +51,7 @@ let orthomam_echolocation = {
}
type
detection_method
=
{
result
:
Pipeline
.
query
->
tex
t
file
;
result
:
Pipeline
.
query
->
cp
t
file
;
col
:
int
;
label
:
string
;
requires_rooted_tree
:
bool
;
...
...
lib/convergence_detection.ml
View file @
8e7685ab
open
Core
open
Bistro
.
Shell_dsl
open
Bistro
open
File_formats
type
result
=
[
|
`Pcoc
of
[
`pcoc
]
directory
...
...
@@ -12,7 +13,7 @@ type result = [
|
`Topological_LG
of
[
`topological
]
directory
|
`Topological_WAG
of
[
`topological
]
directory
|
`Tdg09
of
[
`tdg09
]
directory
|
`Multinomial
of
tex
t
file
|
`Multinomial
of
cp
t
file
|
`Msd
of
[
`msd
]
directory
*
float
]
...
...
@@ -34,11 +35,11 @@ type dataset_res = {
tree_prefix
:
string
;
dataset
:
Dataset
.
t
;
res_by_tools
:
result
list
;
merged_results
:
tex
t
file
;
merged_results
:
cp
t
file
;
plot_merged_results
:
svg
file
;
}
let
merge_results
?
fna_infos
~
(
res_by_tools
:
result
list
)
()
:
tex
t
file
=
let
merge_results
?
fna_infos
~
(
res_by_tools
:
result
list
)
()
:
cp
t
file
=
let
command
=
List
.
map
res_by_tools
~
f
:
(
fun
res
->
let
w
=
match
res
with
|
`Pcoc
d
->
Pcoc
.
results
d
...
...
@@ -78,7 +79,7 @@ let merge_results ?fna_infos ~(res_by_tools : result list) () : text file =
]
;
]
let
merge_result_tables
?
fna_infos
?
oracle
?
multinomial
?
tdg09
?
identical
?
topological
?
pcoc
?
pcoc_v2
?
pcoc_pcp
?
diffsel
?
diffseldsparse
()
:
tex
t
file
=
let
merge_result_tables
?
fna_infos
?
oracle
?
multinomial
?
tdg09
?
identical
?
topological
?
pcoc
?
pcoc_v2
?
pcoc_pcp
?
diffsel
?
diffseldsparse
()
:
cp
t
file
=
Workflow
.
shell
~
descr
:
"convergence_detection.merge_results"
~
img
:
Env
.
env_py
[
cmd
"python"
[
file_dump
(
string
Scripts
.
merge_det_results
)
;
...
...
lib/convergence_detection.mli
View file @
8e7685ab
...
...
@@ -11,7 +11,7 @@ type result = [
|
`Topological_LG
of
[
`topological
]
directory
|
`Topological_WAG
of
[
`topological
]
directory
|
`Tdg09
of
[
`tdg09
]
directory
|
`Multinomial
of
tex
t
file
|
`Multinomial
of
cp
t
file
|
`Msd
of
[
`msd
]
directory
*
float
]
...
...
@@ -22,7 +22,7 @@ type dataset_res = {
tree_prefix
:
string
;
dataset
:
Dataset
.
t
;
res_by_tools
:
result
list
;
merged_results
:
tex
t
file
;
merged_results
:
cp
t
file
;
plot_merged_results
:
svg
file
}
...
...
@@ -30,22 +30,22 @@ val merge_results :
?
fna_infos
:
text
file
->
res_by_tools
:
result
list
->
unit
->
tex
t
file
cp
t
file
val
merge_result_tables
:
?
fna_infos
:
text
file
->
?
oracle
:
tex
t
file
->
?
multinomial
:
tex
t
file
->
?
tdg09
:
tex
t
file
->
?
identical
:
tex
t
file
->
?
topological
:
tex
t
file
->
?
pcoc
:
tex
t
file
->
?
pcoc_v2
:
tex
t
file
->
?
pcoc_pcp
:
tex
t
file
->
?
diffsel
:
tex
t
file
->
?
diffseldsparse
:
tex
t
file
->
?
oracle
:
cp
t
file
->
?
multinomial
:
cp
t
file
->
?
tdg09
:
cp
t
file
->
?
identical
:
cp
t
file
->
?
topological
:
cp
t
file
->
?
pcoc
:
cp
t
file
->
?
pcoc_v2
:
cp
t
file
->
?
pcoc_pcp
:
cp
t
file
->
?
diffsel
:
cp
t
file
->
?
diffseldsparse
:
cp
t
file
->
unit
->
tex
t
file
cp
t
file
val
plot_merge_results
:
?
t_choices
:
text
file
->
...
...
@@ -53,27 +53,27 @@ val plot_merge_results :
res_by_tools
:
result
list
->
tree
:
nhx
file
->
faa
:
aminoacid_fasta
file
->
tsv
:
tex
t
file
->
tsv
:
cp
t
file
->
unit
->
svg
file
val
plot_convergent_sites
:
?
plot_all_sites
:
bool
->
alignment
:
aminoacid_fasta
file
->
detection_results
:
tex
t
file
->
detection_results
:
cp
t
file
->
tree
:
nhx
file
->
unit
->
svg
file
val
recall_precision_curve
:
tex
t
file
->
cp
t
file
->
svg
file
val
oracle
:
n_h0
:
int
->
n_ha
:
int
->
tex
t
file
cp
t
file
val
recall_precision_auc_table
:
tex
t
file
->
cp
t
file
->
(
string
*
float
)
list
workflow
lib/detection_pipeline.ml
View file @
8e7685ab
...
...
@@ -27,45 +27,45 @@ module type S = sig
val
dnds_tree
:
query
->
text
file
val
identical
:
query
->
tex
t
file
val
identical
:
query
->
cp
t
file
val
topological
:
query
->
tex
t
file
val
topological
:
query
->
cp
t
file
val
multinomial
:
query
->
tex
t
file
val
multinomial
:
query
->
cp
t
file
val
multinomial_simulation_lrt
:
query
->
tex
t
file
val
multinomial_simulation_lrt
:
query
->
cp
t
file
val
multinomial_simulation_sparse
:
query
->
tex
t
file
val
multinomial_simulation_sparse
:
query
->
cp
t
file
val
multinomial_asymptotic_lrt
:
query
->
tex
t
file
val
multinomial_asymptotic_lrt
:
query
->
cp
t
file
val
multinomial_asymptotic_sparse
:
query
->
tex
t
file
val
multinomial_asymptotic_sparse
:
query
->
cp
t
file
val
tdg09
:
query
->
tex
t
file
val
tdg09
:
query
->
cp
t
file
val
failsafe_tdg09
:
query
->
tex
t
file
val
failsafe_tdg09
:
query
->
cp
t
file
val
pcoc
:
?
gamma
:
bool
->
?
ncat
:
int
->
query
->
tex
t
file
val
pcoc
:
?
gamma
:
bool
->
?
ncat
:
int
->
query
->
cp
t
file
val
pcoc_v2
:
?
gamma
:
bool
->
?
aa_profiles
:
Pcoc
.
aa_profiles
->
query
->
tex
t
file
?
gamma
:
bool
->
?
aa_profiles
:
Pcoc
.
aa_profiles
->
query
->
cp
t
file
val
gemma
:
query
->
lmm_test
:
[
`All
|
`LRT
|
`Score
|
`Wald
]
->
relatedness_mode
:
[
`Centered
|
`Standardized
]
->
tex
t
file
cp
t
file
val
inhouse_lmm
:
query
->
tex
t
file
val
inhouse_lmm
:
query
->
cp
t
file
val
diffsel
:
query
->
tex
t
file
val
diffsel
:
query
->
cp
t
file
val
diffseldsparse
:
?
pi
:
float
->
?
shiftprob
:
float
*
float
->
?
eps
:
float
->
query
->
tex
t
file
cp
t
file
val
view_site
:
query
->
convergent_species
:
string
list
->
site_pos
:
int
->
pdf
file
...
...
lib/detection_pipeline.mli
View file @
8e7685ab
...
...
@@ -27,45 +27,45 @@ module type S = sig
val
dnds_tree
:
query
->
text
file
val
identical
:
query
->
tex
t
file
val
identical
:
query
->
cp
t
file
val
topological
:
query
->
tex
t
file
val
topological
:
query
->
cp
t
file
val
multinomial
:
query
->
tex
t
file
val
multinomial
:
query
->
cp
t
file
val
multinomial_simulation_lrt
:
query
->
tex
t
file
val
multinomial_simulation_lrt
:
query
->
cp
t
file
val
multinomial_simulation_sparse
:
query
->
tex
t
file
val
multinomial_simulation_sparse
:
query
->
cp
t
file
val
multinomial_asymptotic_lrt
:
query
->
tex
t
file
val
multinomial_asymptotic_lrt
:
query
->
cp
t
file
val
multinomial_asymptotic_sparse
:
query
->
tex
t
file
val
multinomial_asymptotic_sparse
:
query
->
cp
t
file
val
tdg09
:
query
->
tex
t
file
val
tdg09
:
query
->
cp
t
file
val
failsafe_tdg09
:
query
->
tex
t
file
val
failsafe_tdg09
:
query
->
cp
t
file
val
pcoc
:
?
gamma
:
bool
->
?
ncat
:
int
->
query
->
tex
t
file
val
pcoc
:
?
gamma
:
bool
->
?
ncat
:
int
->
query
->
cp
t
file
val
pcoc_v2
:
?
gamma
:
bool
->
?
aa_profiles
:
Pcoc
.
aa_profiles
->
query
->
tex
t
file
?
gamma
:
bool
->
?
aa_profiles
:
Pcoc
.
aa_profiles
->
query
->
cp
t
file
val
gemma
:
query
->
lmm_test
:
[
`All
|
`LRT
|
`Score
|
`Wald
]
->
relatedness_mode
:
[
`Centered
|
`Standardized
]
->
tex
t
file
cp
t
file
val
inhouse_lmm
:
query
->
tex
t
file
val
inhouse_lmm
:
query
->
cp
t
file
val
diffsel
:
query
->
tex
t
file
val
diffsel
:
query
->
cp
t
file
val
diffseldsparse
:
?
pi
:
float
->
?
shiftprob
:
float
*
float
->
?
eps
:
float
->
query
->
tex
t
file
cp
t
file
val
view_site
:
query
->
convergent_species
:
string
list
->
site_pos
:
int
->
pdf
file
...
...
lib/diffsel.ml
View file @
8e7685ab
...
...
@@ -106,7 +106,7 @@ let check_conv run_diffsel : [`diffsel_check_conv] directory =
]
]
let
selector
run_diffsel
:
tex
t
file
=
let
selector
run_diffsel
:
cp
t
file
=
let
env
=
Env
.
env_diffsel
in
let
package
=
tmp
//
"diffsel_script_utils.py"
in
let
script
=
tmp
//
"diffsel_analyze_result.py"
in
...
...
lib/diffsel.mli
View file @
8e7685ab
...
...
@@ -13,7 +13,7 @@ val diffsel :
val
selector
:
[
`diffsel
]
directory
->
tex
t
file
cp
t
file
val
check_conv
:
[
`diffsel
]
directory
->
...
...
lib/diffseldsparse.ml
View file @
8e7685ab
...
...
@@ -117,7 +117,7 @@ let readdiffseldsparse run =
]
]
let
posterior_probabilities
run_diffseldsparse
:
tex
t
file
=
let
posterior_probabilities
run_diffseldsparse
:
cp
t
file
=
let
tmp_tree
=
tmp
//
"myrun.tree"
in
let
tmp_ali
=
tmp
//
"myrun.ali"
in
let
dep_tree
=
(
dep
run_diffseldsparse
)
//
"myrun.tree"
in
...
...
lib/diffseldsparse.mli
View file @
8e7685ab
...
...
@@ -14,7 +14,7 @@ val diffseldsparse :
val
posterior_probabilities
:
[
`diffseldsparse
]
directory
->
tex
t
file
cp
t
file
val
readdiffseldsparse
:
[
`diffseldsparse
]
directory
->
...
...
@@ -26,4 +26,4 @@ val check_conv :
val
results
:
[
`readdiffseldsparse
]
directory
->
tex
t
file
cp
t
file
lib/file_formats.ml
View file @
8e7685ab
...
...
@@ -54,3 +54,10 @@ class type rds = object
inherit
binary_file
method
format
:
[
`rds
]
end
(** Convergence Prediction Table *)
class
type
cpt
=
object
inherit
tsv
method
header
:
[
`Yes
]
method
fields
:
[
`Site_then_scores
]
end
lib/gemma.mli
View file @
8e7685ab
...
...
@@ -33,4 +33,4 @@ val univariate_lmm :
univariate_lmm_output
file
val
result_table_of_output
:
aminoacid_fasta
file
->
univariate_lmm_output
file
->
tex
t
file
aminoacid_fasta
file
->
univariate_lmm_output
file
->
cp
t
file
lib/identical.ml
View file @
8e7685ab
...
...
@@ -105,5 +105,5 @@ let identical ?(descr="") ~(tree_id:_ file) ~(tree_sc:_ file) ~(faa:aminoacid_fa
]
]
let
results
run_identical
:
tex
t
file
=
let
results
run_identical
:
cp
t
file
=
Workflow
.
select
run_identical
[
"out1.tsv"
]
lib/inhouse_lmm.mli
View file @
8e7685ab
...
...
@@ -4,4 +4,4 @@ open File_formats
val
test
:
aminoacid_fasta
file
->
nhx
file
->
tex
t
file
cp
t
file
lib/msd.ml
View file @
8e7685ab
...
...
@@ -42,7 +42,7 @@ let msd ?(descr="") ~e ~(faa : aminoacid_fasta file) ~(tree_sc : _ file) : [`msd
];
]
let
results
run_msd
:
tex
t
file
=
let
results
run_msd
:
cp
t
file
=
Workflow
.
shell
~
descr
:
"convergence_detection.parse_msd"
~
img
[
cmd
"python"
[
file_dump
(
string
Scripts
.
parse_output_msd
)
;
...
...
lib/multinomial.ml
View file @
8e7685ab
...
...
@@ -3,7 +3,7 @@ open Bistro
open
Bistro
.
Shell_dsl
open
File_formats
let
multinomial
?
(
descr
=
""
)
~
(
tree_sc
:_
file
)
~
(
faa
:
aminoacid_fasta
file
)
()
:
tex
t
file
=
let
multinomial
?
(
descr
=
""
)
~
(
tree_sc
:_
file
)
~
(
faa
:
aminoacid_fasta
file
)
()
:
cp
t
file
=
let
img
=
Env
.
env_py
in
Workflow
.
shell
~
descr
:
(
"calc_multinomial."
^
descr
)
~
img
[
cmd
"python"
[
...
...
@@ -14,7 +14,7 @@ let multinomial ?(descr="") ~(tree_sc:_ file) ~(faa:aminoacid_fasta file) () : t
]
]
let
%
pworkflow
multinomial_ocaml_implementation
~
meth
~
(
tree_sc
:_
file
)
~
(
faa
:
aminoacid_fasta
file
)
(* :
tex
t file *)
=
let
%
pworkflow
multinomial_ocaml_implementation
~
meth
~
(
tree_sc
:_
file
)
~
(
faa
:
aminoacid_fasta
file
)
(* :
cp
t file *)
=
let
open
Phylogenetics
in
let
open
Phylogenetics_convergence
in
let
module
MT
=
Multinomial_test
in
...
...
lib/pcoc.ml
View file @
8e7685ab
...
...
@@ -20,7 +20,7 @@ let pcoc ?(descr = "") ?plot_complete ?gamma ?catx_est ?max_gap_per_pos ?max_gap
]
]
let
results
run_pcoc
:
tex
t
file
=
let
results
run_pcoc
:
cp
t
file
=
let
out_pcoc
=
dep
run_pcoc
//
"RUN*/*.results.tsv"
in
Workflow
.
shell
~
descr
:
"convergence_detection.selector_pcoc"
[
cmd
"cp"
[
out_pcoc
;
ident
dest
]
;
...
...
lib/pcoc.mli
View file @
8e7685ab
...
...
@@ -15,7 +15,7 @@ val pcoc :
val
results
:
[
`pcoc
]
directory
->
tex
t
file
cp
t
file
type
aa_profiles
=
[
`C10
|
...
...
lib/real_dataset.mli
View file @
8e7685ab
...
...
@@ -27,7 +27,7 @@ val make :
val
result_table
:
meth
list
->
t
->
(
string
*
tex
t
file
)
list
(
string
*
cp
t
file
)
list
val
repo
:
meth
list
->
...
...
lib/simulation_pipeline.mli
View file @
8e7685ab
...
...
@@ -50,10 +50,10 @@ module Mutsel : sig
val
benchmark_statistics
:
Codepitk
.
Simulator
.
Site_independent_mutsel
.
simulation
workflow
->
labels
:
string
list
->
results
:
(
tex
t
file
*
int
)
list
->
results
:
(
cp
t
file
*
int
)
list
->
binary_file
file
(* val benchmark : t -> (t ->
tex
t file) list -> benchmark workflow
(* val benchmark : t -> (t ->
cp
t file) list -> benchmark workflow
*
* val rds_of_benchmark : benchmark workflow -> rds file *)
...
...
@@ -103,7 +103,7 @@ module Bppseqgen : sig
include
Detection_pipeline
.
S
with
type
query
:=
t
val
oracle
:
t
->
tex
t
file
val
oracle
:
t
->
cp
t
file
val
alignment_plot
:
t
->
svg
file
...
...
lib/tamuri.ml
View file @
8e7685ab
...
...
@@ -38,7 +38,7 @@ let tdg09 ?(descr="") ~(faa:aminoacid_fasta file) ~(tree:_ file) () : [`tdg09]
]
]
let
results
run_tdg09
:
tex
t
file
=
let
results
run_tdg09
:
cp
t
file
=
let
tdg09_out
=
Workflow
.
select
run_tdg09
[
"tdg09.yaml"
]
in
Workflow
.
shell
~
descr
:
"convergence_detection.parse_tdg09"
~
img
[
cmd
"python"
[
...
...
Prev
1
2
Next
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