let delly2 ?(configuration=Tools.Delly2.Configuration.default)
~normal ~tumor () =
let normal_bam = get_bam (AF.get_file normal) in
let tumor_bam = get_bam (AF.get_file tumor) in
let output_path =
Name_file.in_directory ~readable_suffix:"-delly2.vcf" Config.work_dir [
normal_bam#product#path;
tumor_bam#product#path;
Tools.Delly2.Configuration.name configuration;
]
in
let bcf =
Tools.Delly2.run_somatic
~configuration
~run_with
~normal:normal_bam ~tumor:tumor_bam
~output_path:(output_path ^ ".bcf")
in
Vcf (Tools.Bcftools.bcf_to_vcf ~run_with
~reference_build:normal_bam#product#reference_build
~bcf output_path)
|> AF.with_provenance "delly2"
["normal", AF.get_provenance normal; "tumor", AF.get_provenance tumor]
~string_arguments:[
"configuration-name", Tools.Delly2.Configuration.name configuration;
]
~json_arguments:[
"configuration", Tools.Delly2.Configuration.to_json configuration;
]