2022-04-21 13:39:22 +00:00
|
|
|
process BCLCONVERT {
|
2022-06-28 10:11:16 +00:00
|
|
|
tag {"$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" }
|
2022-04-21 13:39:22 +00:00
|
|
|
label 'process_high'
|
|
|
|
|
|
|
|
if (params.enable_conda) {
|
|
|
|
exit 1, "Conda environments cannot be used when using bcl-convert. Please use docker or singularity containers."
|
|
|
|
}
|
2022-06-24 05:14:42 +00:00
|
|
|
container "nfcore/bclconvert:3.10.5"
|
2022-04-21 13:39:22 +00:00
|
|
|
|
|
|
|
input:
|
2022-06-16 13:03:13 +00:00
|
|
|
tuple val(meta), path(samplesheet), path(run_dir)
|
2022-04-21 13:39:22 +00:00
|
|
|
|
|
|
|
output:
|
2022-06-16 13:03:13 +00:00
|
|
|
tuple val(meta), path("**[!Undetermined]_S*_L00?_R?_00?.fastq.gz") ,emit: fastq
|
|
|
|
tuple val(meta), path("**_S*_L00?_I?_00?.fastq.gz") ,optional:true ,emit: fastq_idx
|
2022-06-24 05:14:42 +00:00
|
|
|
tuple val(meta), path("Undetermined_S0_L00?_R?_00?.fastq.gz") ,optional:true ,emit: undetermined
|
2022-06-16 13:03:13 +00:00
|
|
|
tuple val(meta), path("Undetermined_S0_L00?_I?_00?.fastq.gz") ,optional:true, emit: undetermined_idx
|
|
|
|
tuple val(meta), path("Reports") ,emit: reports
|
|
|
|
tuple val(meta), path("Logs") ,emit: logs
|
2022-06-28 10:11:16 +00:00
|
|
|
tuple val(meta), path("**/InterOp/*.bin") ,emit: interop
|
2022-06-16 13:03:13 +00:00
|
|
|
path("versions.yml") ,emit: versions
|
2022-04-21 13:39:22 +00:00
|
|
|
|
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
|
|
|
script:
|
|
|
|
def args = task.ext.args ?: ''
|
|
|
|
|
|
|
|
"""
|
2022-06-16 13:03:13 +00:00
|
|
|
bcl-convert \\
|
2022-04-21 13:39:22 +00:00
|
|
|
$args \\
|
|
|
|
--output-directory . \\
|
|
|
|
--bcl-input-directory ${run_dir} \\
|
|
|
|
--sample-sheet ${samplesheet} \\
|
|
|
|
--bcl-num-parallel-tiles ${task.cpus}
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
"${task.process}":
|
|
|
|
bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //')
|
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
}
|