let seq2hla fq =
let fastq = get_fastq (AF.get_file fq) in
let r1 = KEDSL.read_1_file_node fastq in
let r2 =
match KEDSL.read_2_file_node fastq with
| Some r -> r
| None ->
failf "Seq2HLA doesn't support Single_end_sample(s)."
in
let work_dir =
Name_file.in_directory Config.work_dir
~readable_suffix:"seq2hla-workdir" [
fastq#product#escaped_sample_name;
fastq#product#fragment_id_forced;
]
in
Seq2hla_result (
Tools.Seq2HLA.hla_type
~work_dir ~run_with ~run_name:fastq#product#escaped_sample_name ~r1 ~r2
)
|> AF.with_provenance "seq2hla" ["fastq", AF.get_provenance fq]