let fastq
~sample_name ?fragment_id ~r1 ?r2 () =
Fastq (
let open KEDSL in
let read1 = get_raw_file (AF.get_file r1) in
let read2 = Option.map r2 ~f:(fun r -> AF.get_file r |> get_raw_file) in
fastq_node_of_single_file_nodes
?fragment_id ~host ~name:sample_name
read1 read2
)
|> AF.with_provenance "fastq"
(("r1", AF.get_provenance r1)
:: Option.value_map ~default:[] r2
~f:(fun r -> ["r2", AF.get_provenance r]))
~string_arguments:(
("sample-name", sample_name)
:: Option.value_map fragment_id ~default:[]
~f:(fun id -> ["fragment-id", id]))