Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions modules/nf-core/bclconvert/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
# Dockerfile to create container with bcl-convert
# Push to nfcore/bclconvert:<VER>

# Build stage: unpack the RPM file
FROM debian:bullseye-slim AS build
ARG BCLCONVERT_VERSION="4.4.6"

# Install tools needed to extract RPM
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
rpm2cpio \
cpio \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Extract bcl-convert from RPM
COPY bcl-convert-4.4.6-2.el8.x86_64.rpm bcl-convert.rpm
RUN rpm2cpio bcl-convert.rpm | cpio -idmv \
&& rm bcl-convert.rpm

# Final stage: minimal image with only necessary components
FROM debian:bullseye-slim
ARG BCLCONVERT_VERSION="4.4.6"
LABEL org.opencontainers.image.description="Docker image containing bcl-convert"
Expand All @@ -12,20 +30,16 @@ LABEL org.opencontainers.image.vendor="nf-core"
LABEL org.opencontainers.image.license="https://github.com/nf-core/modules/blob/master/modules/nf-core/bclconvert/LICENSE"

# Disclaimer: this container is not provided nor supported by Illumina
# 'ps' command is need by some nextflow executions to collect system stats
# Install procps and clean apt cache
# Install procps (for 'ps' command needed by Nextflow) and rclone (for parallel file transfers)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
procps \
rpm2cpio \
cpio \
rclone \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Link hostname cmd to fix hardcoded path
RUN ln -s /bin/hostname /usr/bin/hostname
# Install bcl-convert
COPY bcl-convert-4.4.6-2.el8.x86_64.rpm bcl-convert.rpm
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN rpm2cpio bcl-convert.rpm | cpio -idmv \
&& rm bcl-convert.rpm
RUN rm -rf /var/log/bcl-convert && ln -sfT /tmp /var/log/bcl-convert

# Copy bcl-convert executable from build stage
COPY --from=build /usr/bin/bcl-convert /usr/bin/bcl-convert
19 changes: 5 additions & 14 deletions modules/nf-core/bclconvert/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ process BCLCONVERT {
tag { "$meta.lane" ? "$meta.id"+"."+"$meta.lane" : "$meta.id" }
label 'process_high'

container "nf-core/bclconvert:4.4.6"
container "nf-core/bclconvert:4.4.6_1"

input:
tuple val(meta), path(samplesheet), path(run_dir)
Expand All @@ -12,10 +12,10 @@ process BCLCONVERT {
tuple val(meta), path("output/**_S[1-9]*_I?_00?.fastq.gz") , emit: fastq_idx , optional:true
tuple val(meta), path("output/**Undetermined_S0*_R?_00?.fastq.gz"), emit: undetermined , optional:true
tuple val(meta), path("output/**Undetermined_S0*_I?_00?.fastq.gz"), emit: undetermined_idx, optional:true
tuple val(meta), path("output/Reports") , emit: reports
tuple val(meta), path("output/Logs") , emit: logs
tuple val(meta), path("output/InterOp/*.bin") , emit: interop , optional:true
path("versions.yml") , emit: versions
tuple val(meta), path("output/Reports/*") , emit: reports
tuple val(meta), path("output/Logs/*") , emit: logs
tuple val(meta), path("output/InterOp/*.bin") , emit: interop
tuple val("${task.process}"), val('bclconvert'), eval("bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //'"), topic: versions, emit: versions_bclconvert

when:
task.ext.when == null || task.ext.when
Expand Down Expand Up @@ -65,11 +65,6 @@ process BCLCONVERT {
# copy the InterOp folder contents to ensure it gets picked up when using fusion
mkdir -p output/InterOp/
cp -n **/InterOp/*.bin output/InterOp/

cat <<-END_VERSIONS > versions.yml
"${task.process}":
bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //')
END_VERSIONS
"""

stub:
Expand Down Expand Up @@ -102,10 +97,6 @@ process BCLCONVERT {
touch output/InterOp/IndexMetricsOut.bin
touch output/InterOp/QMetricsOut.bin
touch output/InterOp/TileMetricsOut.bin
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bclconvert: \$(bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //')
END_VERSIONS
"""

}
75 changes: 49 additions & 26 deletions modules/nf-core/bclconvert/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ tools:
description: "Demultiplex Illumina BCL files"
homepage: "https://support.illumina.com/sequencing/sequencing_software/bcl-convert.html"
documentation: "https://support-docs.illumina.com/SW/BCL_Convert/Content/SW/FrontPages/BCL_Convert.htm"
licence: ["ILLUMINA"]
licence:
- "ILLUMINA"
identifier: ""
input:
- - meta:
Expand All @@ -22,7 +23,7 @@ input:
description: "Input samplesheet"
pattern: "*.{csv}"
ontologies:
- edam: http://edamontology.org/format_3752 # CSV
- edam: http://edamontology.org/format_3752
- run_dir:
type: file
description: |
Expand All @@ -33,79 +34,101 @@ output:
fastq:
- - meta:
type: map
description: Groovy Map containing sample information
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- output/**_S[1-9]*_R?_00?.fastq.gz:
type: file
description: Demultiplexed sample FASTQ files
pattern: "**_S*_L00?_R?_00?.fastq.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
- edam: http://edamontology.org/format_3989
fastq_idx:
- - meta:
type: map
description: Groovy Map containing sample information
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- output/**_S[1-9]*_I?_00?.fastq.gz:
type: file
description: Optional demultiplexed index FASTQ files
pattern: "**_S*_L00?_I?_00?.fastq.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
- edam: http://edamontology.org/format_3989
undetermined:
- - meta:
type: map
description: Groovy Map containing sample information
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- output/**Undetermined_S0*_R?_00?.fastq.gz:
type: file
description: Optional undetermined sample FASTQ files
pattern: "Undetermined_S0_L00?_R?_00?.fastq.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
- edam: http://edamontology.org/format_3989
undetermined_idx:
- - meta:
type: map
description: Groovy Map containing sample information
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- output/**Undetermined_S0*_I?_00?.fastq.gz:
type: file
description: Optional undetermined index FASTQ files
pattern: "Undetermined_S0_L00?_I?_00?.fastq.gz"
ontologies:
- edam: http://edamontology.org/format_3989 # GZIP format
- edam: http://edamontology.org/format_3989
reports:
- - meta:
type: map
description: Groovy Map containing sample information
- output/Reports:
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- output/Reports/*:
type: file
description: Demultiplexing Reports
pattern: "Reports/*.{csv,xml}"
ontologies:
- edam: http://edamontology.org/format_3752 # CSV
- edam: http://edamontology.org/format_2332 # XML
description: Demultiplexing reports
pattern: "*.{html,txt}"
ontologies: []
logs:
- - meta:
type: map
description: Groovy Map containing sample information
- output/Logs:
- output/Logs/*:
type: file
description: Log files
pattern: "Logs/*.{log,txt}"
pattern: "*.{log,txt}"
ontologies: []
interop:
- - meta:
type: map
description: Groovy Map containing sample information
- "output/InterOp/*.bin":
- output/InterOp/*.bin:
type: file
description: Interop files
pattern: "*.{bin}"
ontologies: []
versions_bclconvert:
- - ${task.process}:
type: string
description: The name of the process
- bclconvert:
type: string
description: The name of the tool
- bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- bclconvert:
type: string
description: The name of the tool
- bcl-convert -V 2>&1 | head -n 1 | sed 's/^.*Version //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@matthdsm"
maintainers:
Expand Down
14 changes: 6 additions & 8 deletions modules/nf-core/bclconvert/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@ nextflow_process {
process.out.fastq_idx,
process.out.undetermined.collect { meta, fastq -> file(fastq).name },
process.out.undetermined_idx,
process.out.reports,
process.out.logs.collect { meta, logs -> file(logs).list().sort() },
process.out.reports.collect { meta, reports -> reports.findAll {report -> file(report).name }},
process.out.logs.collect { meta, logs -> logs.sort().findAll { log -> file(log).name} },
process.out.interop.collect { meta, interop ->
interop.findAll { interopfile ->
file(interopfile).name != "IndexMetricsOut.bin" } },
process.out.versions,
path(process.out.versions[0]).yaml
process.out.findAll { key, val -> key.startsWith("versions") }
).match() }
)
}
Expand Down Expand Up @@ -75,14 +74,13 @@ nextflow_process {
process.out.fastq_idx,
process.out.undetermined.collect { meta, fastq -> file(fastq).name },
process.out.undetermined_idx,
process.out.reports,
process.out.logs.collect { meta, logs -> file(logs).list().sort() },
process.out.reports.collect { meta, reports -> reports.findAll {report -> file(report).name }},
process.out.logs.collect { meta, logs -> logs.sort().findAll { log -> file(log).name} },
process.out.interop,
process.out.interop.collect { meta, interop ->
interop.findAll { interopfile ->
file(interopfile).name != "IndexMetricsOut.bin" } },
process.out.versions,
path(process.out.versions[0]).yaml
process.out.findAll { key, val -> key.startsWith("versions") }
).match() }
)
}
Expand Down
Loading
Loading