let render {
name;
vaccine_peptide_length;
padding_around_mutation;
max_vaccine_peptides_per_mutation;
max_mutations_in_report;
min_mapping_quality;
min_variant_sequence_coverage;
min_alt_rna_reads;
include_mismatches_after_variant;
use_duplicate_reads;
drop_secondary_alignments;
mhc_epitope_lengths;
reviewers;
final_reviewer;
xlsx_report;
pdf_report;
ascii_report;
parameters}
=
let soi = string_of_int in
["--vaccine-peptide-length"; soi vaccine_peptide_length] @
["--padding-around-mutation"; soi padding_around_mutation] @
["--max-vaccine-peptides-per-mutation";
soi max_vaccine_peptides_per_mutation] @
["--max-mutations-in-report"; soi max_mutations_in_report] @
["--min-mapping-quality"; soi min_mapping_quality] @
["--min-variant-sequence-coverage";
soi min_variant_sequence_coverage] @
["--min-alt-rna-reads"; soi min_alt_rna_reads] @
(if include_mismatches_after_variant
then ["--include-mismatches-after-variant"] else []) @
(if use_duplicate_reads
then ["--use-duplicate-reads"] else []) @
(if drop_secondary_alignments
then ["--drop_secondary_alignments"] else []) @
["--mhc-epitope-lengths";
(mhc_epitope_lengths
|> List.map ~f:string_of_int
|> String.concat ~sep:",")] @
(List.concat_map parameters ~f:(fun (a,b) -> [a; b])) @
(Option.value_map final_reviewer ~default:[]
~f:(fun f -> ["--output-final-review"; f])) @
(Option.value_map reviewers ~default:[]
~f:(fun rs ->
let reviewers = String.concat ~sep:"," rs in
["--output-reviewed-by"; reviewers]))
|> List.filter ~f:(fun s -> not (String.is_empty s))