struct
type t = [
| `Fastq of KEDSL.fastq_reads KEDSL.workflow_node
| `Bam of KEDSL.bam_file KEDSL.workflow_node * [ `PE | `SE ]
]
let prepare ~run_with =
function
| `Fastq _ as f -> f
| `Bam (b, p) ->
`Bam (Samtools.sort_bam_if_necessary ~run_with ~by:`Read_name b, p)
let name =
function
| `Fastq f -> f#product#paths |> fst |> Filename.basename
| `Bam (b, _) ->
b#product#path |> Filename.basename
let sample_name =
function
| `Fastq f -> f#product#escaped_sample_name
| `Bam (b, _) -> b#product#escaped_sample_name
let read_group_id =
name
let as_dependencies =
function
| `Fastq f -> [KEDSL.depends_on f]
| `Bam (b, _) -> [KEDSL.depends_on b]
end