let snpeff vcf =
let open KEDSL in
let v = get_vcf (AF.get_file vcf) in
let reference_build = v#product#reference_build in
let out_folder =
Name_file.in_directory ~readable_suffix:"snpeff" Config.work_dir
[ Filename.basename v#product#path; reference_build; ]
in
let snpeff_run =
Tools.Snpeff.annotate ~run_with ~reference_build ~input_vcf:v ~out_folder
in
Vcf (
workflow_node
(transform_vcf v#product ~path:(snpeff_run#product#path))
~name:(sprintf "Fetch annotated VCF: %s" v#render#name)
~edges:[ depends_on snpeff_run; ]
)
|> AF.with_provenance "snpeff" ["vcf", AF.get_provenance vcf]