Commit 0d244e52 authored by Philippe Veber's avatar Philippe Veber
Browse files

added diffseldsparse to new benchmark

parent 86183156
......@@ -78,13 +78,14 @@ let merge_results ?fna_infos ~(res_by_tools : result list) () : text_file pworkf
] ;
]
let merge_result_tables ?fna_infos ?oracle ?multinomial ?diffsel () : text_file pworkflow =
let merge_result_tables ?fna_infos ?oracle ?multinomial ?diffsel ?diffseldsparse () : text_file pworkflow =
Workflow.shell ~descr:"convergence_detection.merge_results" [
cmd "python" ~img:Env.env_py [
file_dump (string Scripts.merge_det_results) ;
opt "-o" ident dest ;
option (opt "--multinomial" dep) multinomial ;
option (opt "--diffsel" dep) diffsel ;
option (opt "--diffseldsparse" dep) diffseldsparse ;
option (opt "--oracle" dep) oracle ;
option (opt "--fna_infos" dep) fna_infos;
] ;
......
......@@ -37,6 +37,7 @@ val merge_result_tables :
?oracle:text_file pworkflow ->
?multinomial:text_file pworkflow ->
?diffsel:text_file pworkflow ->
?diffseldsparse:text_file pworkflow ->
unit ->
text_file pworkflow
......
......@@ -148,3 +148,17 @@ let posterior_probabilities run_diffseldsparse : text_file pworkflow =
]
)
]
let%pworkflow results dir =
Filename.concat [%path dir] "myrun_1.sitepp"
|> In_channel.read_lines
|> Fn.flip List.drop 1
|> List.map ~f:(String.split ~on:'\t')
|> List.map ~f:(function
| site :: pp :: _ ->
Int.of_string site + 1, Float.of_string pp /. 100.
| _ -> failwith "parsing readdiffseldsparse results"
)
|> List.map ~f:(fun (site, pp) -> sprintf "%d\t%f" site pp)
|> (fun xs -> "Sites\tDiffseldsparse" :: xs)
|> Out_channel.write_lines [%dest]
......@@ -18,8 +18,12 @@ val posterior_probabilities :
val readdiffseldsparse :
[`diffseldsparse] dworkflow ->
text_file pworkflow
[`readdiffseldsparse] dworkflow
val check_conv :
[`diffseldsparse] dworkflow ->
directory pworkflow
val results :
[`readdiffseldsparse] dworkflow ->
text_file pworkflow
......@@ -109,6 +109,7 @@ let diffseldsparse ?pi ?shiftprob ?eps d =
~n_cycles:50
()
|> Diffseldsparse.readdiffseldsparse
|> Diffseldsparse.results
let alignment_plot d =
Convergence_detection.plot_convergent_sites
......@@ -133,6 +134,7 @@ let benchmark d =
Convergence_detection.merge_result_tables
~multinomial:(multinomial d)
~diffsel:(diffsel d)
~diffseldsparse:(diffseldsparse ~eps:1e-3 d)
~oracle:(oracle d)
()
|> Convergence_detection.recall_precision_curve
......@@ -60,6 +60,8 @@ availableOptions.add_argument('--diffsel', type=str,
help="Diffsel output name", default = None)
availableOptions.add_argument('--diffsel_bis', type=str,
help="Diffsel_bis output name", default = None)
availableOptions.add_argument('--diffseldsparse', type=str,
help="Diffseldsparse output name", default = None)
availableOptions.add_argument('--identical_LG', type=str,
help="Identical_LG output name", default = None)
availableOptions.add_argument('--identical_WAG', type=str,
......@@ -89,6 +91,7 @@ df_pcoc = pd.DataFrame()
df_pcoc_gamma = pd.DataFrame()
df_pcoc_C60 = pd.DataFrame()
df_diffsel = pd.DataFrame()
df_diffseldsparse = pd.DataFrame()
df_diffsel_bis = pd.DataFrame()
df_identical_LG = pd.DataFrame()
df_identical_WAG = pd.DataFrame()
......@@ -127,6 +130,9 @@ if args.diffsel_bis :
if args.diffsel :
df_diffsel = pd.read_csv(args.diffsel, sep="\t")
if args.diffseldsparse :
df_diffseldsparse = pd.read_csv(args.diffseldsparse, sep="\t")
if args.oracle:
df_oracle = pd.read_csv(args.oracle, sep="\t")
df_oracle.rename(columns={'Oracle' : 'Oracle'}, inplace=True)
......@@ -172,7 +178,7 @@ 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_diffsel, df_diffsel_bis, df_diffseldsparse,
df_identical_LG, df_identical_WAG,
df_topological_LG, df_topological_WAG,
df_tdg09,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment