let fastq_node_of_single_file_nodes
~host ~name ?fragment_id fastq_r1 fastq_r2 =
let product =
let r2 = Option.map fastq_r2 ~f:(fun r -> r#product#path) in
fastq_reads ~host ~name ?fragment_id fastq_r1#product#path r2
in
let edges =
match fastq_r2 with
| Some r2 -> [depends_on fastq_r1; depends_on r2]
| None -> [depends_on fastq_r1]
in
workflow_node product
~equivalence:`None
~name:(sprintf "Assembled-fastq: %s (%s)"
name (Option.value fragment_id
~default:(Filename.basename fastq_r1#product#path)))
~edges