Skip to content

Commit

Permalink
Move conda-checks (first batch) (#3686)
Browse files Browse the repository at this point in the history
* Moving conda-check and replacing exit 1 with error-cmd

* Adding conda-check in stub-section

* Adding conda-check in stub-section

* Updating certain md5sums. Ok by Emiller88. Related to #3558

* Switching from exit 1 to error-cmd and correcting error-msg
  • Loading branch information
asp8200 authored Aug 2, 2023
1 parent e198734 commit 716ef30
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 52 deletions.
9 changes: 4 additions & 5 deletions modules/nf-core/bases2fastq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process BASES2FASTQ {

container "nf-core/bases2fastq:1.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BASES2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(run_manifest), path(run_dir)

Expand All @@ -26,6 +21,10 @@ process BASES2FASTQ {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BASES2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def runManifest = run_manifest ? "-r ${run_manifest}" : ""
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/basicpy/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ process BASICPY {
tag "$meta.id"
label 'process_single'

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "Basicpy module does not support Conda. Please use Docker / Singularity instead."
}

container "docker.io/yfukai/basicpy-docker-mcmicro:0.2.1"

input:
Expand All @@ -20,6 +15,10 @@ process BASICPY {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "Basicpy module does not support Conda. Please use Docker / Singularity instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "1.0.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping
Expand All @@ -33,6 +32,10 @@ process BASICPY {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "Basicpy module does not support Conda. Please use Docker / Singularity instead."
}
"""
touch ${prefix}.-dfp.tiff
touch ${prefix}.-dfp.tiff
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/bcl2fastq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process BCL2FASTQ {

container "nf-core/bcl2fastq:2.20.0.422"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BCL2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(samplesheet), path(run_dir)

Expand All @@ -26,6 +21,10 @@ process BCL2FASTQ {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BCL2FASTQ module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def args3 = task.ext.args3 ?: ''
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/bclconvert/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process BCLCONVERT {

container "nf-core/bclconvert:4.0.3"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "BCLCONVERT module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(samplesheet), path(run_dir)

Expand All @@ -26,6 +21,10 @@ process BCLCONVERT {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "BCLCONVERT module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def args3 = task.ext.args3 ?: ''
Expand Down
12 changes: 8 additions & 4 deletions modules/nf-core/cellpose/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ process CELLPOSE {
tag "$meta.id"
label 'process_medium'

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "I did not manage to create a cellpose module in Conda that works in all OSes. Please use Docker / Singularity / Podman instead."}

container "docker.io/biocontainers/cellpose:2.1.1_cv2"

input:
Expand All @@ -20,6 +16,10 @@ process CELLPOSE {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "I did not manage to create a cellpose module in Conda that works in all OSes. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def model_command = model ? "--pretrained_model $model" : ""
Expand All @@ -38,6 +38,10 @@ process CELLPOSE {
END_VERSIONS
"""
stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "I did not manage to create a cellpose module in Conda that works in all OSes. Please use Docker / Singularity / Podman instead."
}
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = "2.1.1" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/cellranger/count/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process CELLRANGER_COUNT {

container "nf-core/cellranger:7.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "CELLRANGER_COUNT module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
tuple val(meta), path(reads, stageAs: "fastq_???/*")
path reference
Expand All @@ -21,11 +16,19 @@ process CELLRANGER_COUNT {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_COUNT module does not support Conda. Please use Docker / Singularity / Podman instead."
}
args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
template "cellranger_count.py"

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_COUNT module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p "${prefix}/outs/"
Expand Down
13 changes: 8 additions & 5 deletions modules/nf-core/cellranger/mkfastq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process CELLRANGER_MKFASTQ {

container "docker.io/nfcore/cellrangermkfastq:7.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "CELLRANGER_MKFASTQ module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
path bcl
path csv
Expand All @@ -21,6 +16,10 @@ process CELLRANGER_MKFASTQ {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_MKFASTQ module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${bcl.getSimpleName()}"
"""
Expand All @@ -38,6 +37,10 @@ process CELLRANGER_MKFASTQ {
"""

stub:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_MKFASTQ module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def prefix = task.ext.prefix ?: "${bcl.getSimpleName()}"
"""
mkdir -p "${prefix}/outs/fastq_path/"
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/cellranger/mkgtf/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process CELLRANGER_MKGTF {

container "nf-core/cellranger:7.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "CELLRANGER_MKGTF module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
path gtf

Expand All @@ -20,6 +15,10 @@ process CELLRANGER_MKGTF {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_MKGTF module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${gtf.baseName}.filtered"
"""
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/cellranger/mkref/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process CELLRANGER_MKREF {

container "nf-core/cellranger:7.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "CELLRANGER_MKREF module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
path fasta
path gtf
Expand All @@ -22,6 +17,10 @@ process CELLRANGER_MKREF {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_MKREF module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
"""
cellranger \\
Expand Down
9 changes: 4 additions & 5 deletions modules/nf-core/cellranger/mkvdjref/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ process CELLRANGER_MKVDJREF {

container "nf-core/cellranger:7.1.0"

// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
exit 1, "CELLRANGER_MKREF module does not support Conda. Please use Docker / Singularity / Podman instead."
}

input:
path fasta
path gtf
Expand All @@ -22,6 +17,10 @@ process CELLRANGER_MKVDJREF {
task.ext.when == null || task.ext.when

script:
// Exit if running this module with -profile conda / -profile mamba
if (workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1) {
error "CELLRANGER_MKVDJREF module does not support Conda. Please use Docker / Singularity / Podman instead."
}
def args = task.ext.args ?: ''
"""
cellranger \\
Expand Down
6 changes: 3 additions & 3 deletions tests/modules/nf-core/bases2fastq/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
files:
- path: output/bases2fastq/output/Bases2Fastq-Sim_QC.html
- path: output/bases2fastq/output/Metrics.csv
md5sum: 0ec6da2b82e191098283474356024abf
md5sum: a8094b308b5653071ac029a27733e4a6
- path: output/bases2fastq/output/RunManifest.json
md5sum: a07dce8ee25c2a6f9355b677c26b53e2
- path: output/bases2fastq/output/RunStats.json
- path: output/bases2fastq/output/UnassignedSequences.csv
md5sum: 11c1693830ce941b8cfb8d2431a59097
- path: output/bases2fastq/output/Samples/DefaultSample/DefaultSample_R1.fastq.gz
md5sum: 218abc70f61e8e8199a68f83ae836184
md5sum: 831c90ea31eff881e825cda691da77ae
- path: output/bases2fastq/output/Samples/DefaultSample/DefaultSample_R2.fastq.gz
md5sum: b95109bfb204daa150b61239d3368ee2
md5sum: e6c1f7ec00910ef195ff3d427c7a9f23
- path: output/bases2fastq/output/Samples/DefaultSample/DefaultSample_stats.json

0 comments on commit 716ef30

Please sign in to comment.