let tools_workflow =
let tools_to_test =
let open Biokepi.Machine.Tool.Default in
let which_size_and bin l =
("which " ^ bin)
:: ("ls -l $(which " ^ bin ^ ")")
:: ("file $(which " ^ bin ^ ")")
:: l in
[
bwa, which_size_and "bwa" ["bwa || echo Done"];
stringtie, which_size_and "stringtie" [ "stringtie --help"];
bedtools, which_size_and "bedtools" [ "bedtools --help"];
vcftools, which_size_and "vcftools" [ "vcftools --help"];
star, which_size_and "STAR" [];
hisat, which_size_and "hisat" ["hisat --help"];
hisat2, which_size_and "hisat2" ["hisat2 --help"];
kallisto, which_size_and "kallisto" ["kallisto version"];
samtools, which_size_and "samtools" ["samtools --help"];
samtools, which_size_and "bgzip" ["bgzip --help || echo OK"];
samtools, which_size_and "tabix" ["tabix --help || echo OK"];
varscan, ["ls -l \"$VARSCAN_JAR\""; "java -jar $VARSCAN_JAR -help"];
picard, ["ls -l \"$PICARD_JAR\""];
strelka, ["ls -l \"$STRELKA_BIN\"";
"perl -c $STRELKA_BIN/configureStrelkaWorkflow.pl"];
virmid, ["ls -l \"$VIRMID_JAR\""; "java -jar $VIRMID_JAR -help"];
muse, which_size_and "$muse_bin" ["$muse_bin call -h"];
somaticsniper, which_size_and "somaticsniper" ["somaticsniper -v"];
seq2hla, which_size_and "seq2HLA" ["seq2HLA --version"];
optitype, which_size_and "OptiTypePipeline" ["OptiTypePipeline -h"];
ledit_def, which_size_and "ledit" ["ledit -v"];
biocaml_def, ["ocamlfind list | grep biocaml"];
hlarp_def, ["hlarp --version"];
]
in
let open Ketrew.EDSL in
let edges =
List.map tools_to_test ~f:(fun (def, cmds) ->
let tool = Biokepi.Machine.Tool.Kit.get_exn toolkit def in
workflow_node without_product
~name:(sprintf "Test tool %s: %S, …"
(Biokepi.Machine.Tool.Definition.to_string def)
(List.hd_exn cmds))
~make:(run_program Program.(
Biokepi.Machine.Tool.init tool
&& chain (List.map cmds ~f:sh)
))
~edges:[
depends_on Biokepi.Machine.Tool.(ensure tool)
]
|> depends_on
)
in
workflow_node without_product ~name:"All tool installations" ~edges