Commit dfbcc03f authored by Philippe Veber's avatar Philippe Veber
Browse files

Convergence_detection: introduced simpler utility to plot alignments

parent 8b0788de
......@@ -147,3 +147,21 @@ let plot_merge_results ?t_choices ~plot_all_sites ~(res_by_tools:result list) ~t
]
in
Workflow.select inner ["results.svg"]
let plot_convergent_sites ?(plot_all_sites = true) ~alignment ~detection_results ~tree () =
Workflow.shell ~descr:"plot_convergent_sites.py" [
within_container Pcoc.img (
and_list [
mkdir_p dest ;
cmd "python" [
Utils.script_dump Scripts.[ diffsel_script_utils ; plot_data ; plot_convergent_sites ] ;
opt "-tsv" dep detection_results ;
opt "-msa" dep alignment ;
opt "-tree" dep tree ;
opt "-out" ident (dest // "plot.svg") ;
flag string "--all_sites" plot_all_sites ;
]
]
)
]
|> Fn.flip Workflow.select ["plot.svg"]
......@@ -41,3 +41,11 @@ val plot_merge_results :
tsv:text_file pworkflow ->
unit ->
svg pworkflow
val plot_convergent_sites :
?plot_all_sites:bool ->
alignment:aminoacid_fasta pworkflow ->
detection_results:text_file pworkflow ->
tree:nhx pworkflow ->
unit ->
svg pworkflow
......@@ -25,6 +25,10 @@ let less w =
Sys.command (sprintf "less %s" (path w))
|> ignore
let firefox w =
Sys.command (sprintf "firefox %s" (path w))
|> ignore
let workflow_of_template t =
let open Bistro.Shell_dsl in
Workflow.shell [
......
......@@ -104,3 +104,10 @@ let diffseldsparse d =
~w_every:1
~n_cycles:50
()
let alignment_plot d =
Convergence_detection.plot_convergent_sites
~tree:(tree d)
~alignment:(amino_acid_alignment d)
~detection_results:(multinomial d)
()
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