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
cf727127
Commit
cf727127
authored
Feb 01, 2019
by
Philippe Veber
Browse files
added oracle method
parent
4aef7ffb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
7 deletions
+57
-7
lib/convergence_detection.ml
lib/convergence_detection.ml
+15
-0
lib/convergence_detection.mli
lib/convergence_detection.mli
+9
-0
lib/pipeline2.ml
lib/pipeline2.ml
+18
-0
lib/scripts/merge_det_results.py
lib/scripts/merge_det_results.py
+15
-7
No files found.
lib/convergence_detection.ml
View file @
cf727127
...
...
@@ -173,3 +173,18 @@ let plot_convergent_sites ?(plot_all_sites = true) ~alignment ~detection_results
)
]
|>
Fn
.
flip
Workflow
.
select
[
"plot.svg"
]
let
recall_precision_curve
table
=
Workflow
.
shell
~
descr
:
"recall_precision_curve"
[
cmd
"Rscript"
[
file_dump
(
string
Scripts
.
recall_precision_curve
)
;
dep
table
;
dest
;
]
;
]
let
%
pworkflow
oracle
~
n_h0
~
n_ha
=
"Sites
\t
Oracle"
::
(
List
.
init
n_h0
~
f
:
(
fun
i
->
sprintf
"%d
\t
0"
(
i
+
1
)))
@
(
List
.
init
n_ha
~
f
:
(
fun
i
->
sprintf
"%d
\t
1"
(
n_h0
+
i
+
1
)))
|>
Out_channel
.
write_lines
[
%
dest
]
lib/convergence_detection.mli
View file @
cf727127
...
...
@@ -57,3 +57,12 @@ val plot_convergent_sites :
tree
:
nhx
pworkflow
->
unit
->
svg
pworkflow
val
recall_precision_curve
:
text_file
pworkflow
->
svg
pworkflow
val
oracle
:
n_h0
:
int
->
n_ha
:
int
->
text_file
pworkflow
lib/pipeline2.ml
View file @
cf727127
...
...
@@ -116,3 +116,21 @@ let alignment_plot d =
~
alignment
:
(
amino_acid_alignment
d
)
~
detection_results
:
(
multinomial
d
)
()
let
oracle
d
=
let
n_h0
,
n_ha
=
match
d
with
|
Bppseqgen_simulation
{
nb_sites
;
hypothesis
;
_
}
->
(
match
hypothesis
with
|
H0
_
->
nb_sites
,
0
|
HaPC
_
|
HaPCOC
_
->
0
,
nb_sites
)
|
Convdet_simulation
{
n_h0
;
n_ha
;
_
}
->
n_h0
,
n_ha
in
Convergence_detection
.
oracle
~
n_h0
~
n_ha
let
benchmark
d
=
Convergence_detection
.
merge_result_tables
~
multinomial
:
(
multinomial
d
)
~
oracle
:
(
oracle
d
)
()
lib/scripts/merge_det_results.py
View file @
cf727127
...
...
@@ -76,6 +76,8 @@ availableOptions.add_argument('--msd', type=str, action="append", nargs=2,
help
=
"msd output name"
,
default
=
None
)
availableOptions
.
add_argument
(
'--fna_infos'
,
type
=
str
,
help
=
"fna_infos output name"
,
default
=
None
)
availableOptions
.
add_argument
(
'--oracle'
,
type
=
str
,
help
=
"ORACLE"
,
default
=
None
)
##############
...
...
@@ -96,6 +98,7 @@ df_tdg09 = pd.DataFrame()
df_multinomial
=
pd
.
DataFrame
()
df_msd
=
pd
.
DataFrame
()
df_fna_infos
=
pd
.
DataFrame
()
df_oracle
=
pd
.
DataFrame
()
OutName
=
args
.
output
if
args
.
pcoc
:
...
...
@@ -124,6 +127,10 @@ if args.diffsel_bis :
if
args
.
diffsel
:
df_diffsel
=
pd
.
read_csv
(
args
.
diffsel
,
sep
=
"
\t
"
)
if
args
.
oracle
:
df_oracle
=
pd
.
read_csv
(
args
.
oracle
,
sep
=
"
\t
"
)
df_oracle
.
rename
(
columns
=
{
'Oracle'
:
'Oracle'
},
inplace
=
True
)
if
args
.
identical_LG
:
df_identical_LG
=
pd
.
read_csv
(
args
.
identical_LG
,
sep
=
"
\t
"
)
df_identical_LG
.
rename
(
columns
=
{
'Identical'
:
'Identical_LG08'
},
inplace
=
True
)
...
...
@@ -165,13 +172,14 @@ if args.fna_infos :
#df_fna_infos = df_fna_infos[['Sites','P_distance']]
df_list
=
[
df
for
df
in
[
df_pcoc
,
df_pcoc_gamma
,
df_pcoc_C60
,
df_diffsel
,
df_diffsel_bis
,
df_identical_LG
,
df_identical_WAG
,
df_topological_LG
,
df_topological_WAG
,
df_tdg09
,
df_multinomial
,
df_msd
,
df_fna_infos
df_diffsel
,
df_diffsel_bis
,
df_identical_LG
,
df_identical_WAG
,
df_topological_LG
,
df_topological_WAG
,
df_tdg09
,
df_multinomial
,
df_msd
,
df_fna_infos
,
df_oracle
]
if
not
df
.
empty
]
df_list_len
=
[
df
.
shape
[
0
]
for
df
in
df_list
]
...
...
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