diff --git a/modules/local/crispresso2/functions.nf b/modules/local/crispresso2/functions.nf deleted file mode 100644 index da9da09..0000000 --- a/modules/local/crispresso2/functions.nf +++ /dev/null @@ -1,68 +0,0 @@ -// -// Utility functions used in nf-core DSL2 module files -// - -// -// Extract name of software tool from process name using $task.process -// -def getSoftwareName(task_process) { - return task_process.tokenize(':')[-1].tokenize('_')[0].toLowerCase() -} - -// -// Function to initialise default values and to generate a Groovy Map of available options for nf-core modules -// -def initOptions(Map args) { - def Map options = [:] - options.args = args.args ?: '' - options.args2 = args.args2 ?: '' - options.args3 = args.args3 ?: '' - options.publish_by_meta = args.publish_by_meta ?: [] - options.publish_dir = args.publish_dir ?: '' - options.publish_files = args.publish_files - options.suffix = args.suffix ?: '' - return options -} - -// -// Tidy up and join elements of a list to return a path string -// -def getPathFromList(path_list) { - def paths = path_list.findAll { item -> !item?.trim().isEmpty() } // Remove empty entries - paths = paths.collect { it.trim().replaceAll("^[/]+|[/]+\$", "") } // Trim whitespace and trailing slashes - return paths.join('/') -} - -// -// Function to save/publish module results -// -def saveFiles(Map args) { - if (!args.filename.endsWith('.version.txt')) { - def ioptions = initOptions(args.options) - def path_list = [ ioptions.publish_dir ?: args.publish_dir ] - if (ioptions.publish_by_meta) { - def key_list = ioptions.publish_by_meta instanceof List ? ioptions.publish_by_meta : args.publish_by_meta - for (key in key_list) { - if (args.meta && key instanceof String) { - def path = key - if (args.meta.containsKey(key)) { - path = args.meta[key] instanceof Boolean ? "${key}_${args.meta[key]}".toString() : args.meta[key] - } - path = path instanceof String ? path : '' - path_list.add(path) - } - } - } - if (ioptions.publish_files instanceof Map) { - for (ext in ioptions.publish_files) { - if (args.filename.endsWith(ext.key)) { - def ext_list = path_list.collect() - ext_list.add(ext.value) - return "${getPathFromList(ext_list)}/$args.filename" - } - } - } else if (ioptions.publish_files == null) { - return "${getPathFromList(path_list)}/$args.filename" - } - } -} diff --git a/modules/local/crispresso2/main.nf b/modules/local/crispresso2/main.nf deleted file mode 100644 index 17b0886..0000000 --- a/modules/local/crispresso2/main.nf +++ /dev/null @@ -1,41 +0,0 @@ -// Import generic module functions -include { initOptions; saveFiles; getSoftwareName } from './functions' - -params.options = [:] -options = initOptions(params.options) - -process CRISPRESSO2 { - tag "$meta.id" - label 'process_medium' - publishDir "${params.outdir}", - mode: params.publish_dir_mode, - saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? "bioconda::crispresso2=2.1.2" : null) - - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/crispresso2:2.1.2--py27heb79e2c_0" - } else { - container "quay.io/biocontainers/crispresso2:2.1.2--py27heb79e2c_0" - } - - input: - tuple val(meta), path(reads) - - output: - tuple val(meta), path("*.merged.*.fastq.gz"), emit: reads - path "*.hist" , emit: hist - path "*.version.txt" , emit: version - - script: - def software = getSoftwareName(task.process) - def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" - def merged = "-o ${prefix}.merged" - def input_reads = "${reads[0]} ${reads[1]}" - """ - flash2 \\ - $options.args \\ - $merged \\ - -z \\ - $input_reads - echo \$(flash2 --version) > ${software}.version.txt - """ -} diff --git a/modules/local/crispresso2/meta.yml b/modules/local/crispresso2/meta.yml deleted file mode 100644 index 9cf242e..0000000 --- a/modules/local/crispresso2/meta.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: flash2 -description: Perform merging of mate paired-end sequencing reads -keywords: - - sort - - reads merging - - merge mate pairs -tools: - - flash2: - description: | - Merge mates from fragments that are shorter than twice the read length - homepage: https://github.com/dstreett/FLASH2 - documentation: {} - doi: 10.1093/bioinformatics/btr507 - licence: ['GPL v3+'] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 2; i.e., paired-end data. - pattern: "*fastq.gz" - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: The merged fastq reads - pattern: "*fastq.gz" - - histogram: - type: file - description: Numeric histogram of merged read lengths - pattern: "*.hist" - - version: - type: file - description: File containing software version - pattern: "*.{version.txt}" - -authors: - - "@Erkison" - - "@vaofford" diff --git a/modules/local/cutadapt/main.nf b/modules/local/cutadapt/main.nf index 0afe801..1c7bda9 100644 --- a/modules/local/cutadapt/main.nf +++ b/modules/local/cutadapt/main.nf @@ -12,11 +12,8 @@ process CUTADAPT { saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? 'bioconda::cutadapt=4.4' : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/cutadapt:4.4--py39hf95cd2a_1' - } else { - container 'quay.io/biocontainers/cutadapt:4.4--py39hf95cd2a_1' - } + container 'quay.io/biocontainers/cutadapt:4.4--py39hf95cd2a_1' + input: tuple val(meta), path(reads) diff --git a/modules/local/flash2/main.nf b/modules/local/flash2/main.nf index 815d9f0..03e074f 100644 --- a/modules/local/flash2/main.nf +++ b/modules/local/flash2/main.nf @@ -11,11 +11,7 @@ process FLASH2 { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? "bioconda::flash=2.2.00" : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/flash2:2.2.00--h5bf99c6_3" - } else { - container "quay.io/biocontainers/flash2:2.2.00--h5bf99c6_3" - } + container "quay.io/biocontainers/flash2:2.2.00--h5bf99c6_3" input: tuple val(meta), path(reads) diff --git a/modules/local/pyquest/main.nf b/modules/local/pyquest/main.nf index bbb78c8..c468fa5 100644 --- a/modules/local/pyquest/main.nf +++ b/modules/local/pyquest/main.nf @@ -12,11 +12,7 @@ process PYQUEST { // Keep for when container is public /* - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/flash2:2.2.00--h5bf99c6_3" - } else { - container "quay.io/biocontainers/flash2:2.2.00--h5bf99c6_3" - } + container "quay.io/biocontainers/flash2:2.2.00--h5bf99c6_3" */ container "quay.io/wtsicgp/pyquest:1.1.0" diff --git a/modules/local/pyquest_library_converter/main.nf b/modules/local/pyquest_library_converter/main.nf index 293f98c..0f0889c 100644 --- a/modules/local/pyquest_library_converter/main.nf +++ b/modules/local/pyquest_library_converter/main.nf @@ -10,12 +10,8 @@ process TRANSFORM_LIBRARY_FOR_PYQUEST { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:'pyquest', meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? null : null) - conda (params.enable_conda ? "conda-forge::python=3.8.3" : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/python:3.8.3" - } else { - container "quay.io/biocontainers/python:3.8.3" - } + conda (params.enable_conda ? "conda-forge::python=3.12.7" : null) + container "docker.io/python:3.12.7-alpine3.20" input: path(oligo_library) diff --git a/modules/local/samtools/bam2fq/main.nf b/modules/local/samtools/bam2fq/main.nf index 80495b1..51380da 100644 --- a/modules/local/samtools/bam2fq/main.nf +++ b/modules/local/samtools/bam2fq/main.nf @@ -3,9 +3,7 @@ process SAMTOOLS_BAM2FQ { label 'process_low' conda (params.enable_conda ? "bioconda::samtools=1.15" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/samtools:1.15--h1170115_1' : - 'quay.io/biocontainers/samtools:1.15--h1170115_1' }" + container 'quay.io/biocontainers/samtools:1.15--h1170115_1' input: tuple val(meta), path(inputbam) diff --git a/modules/local/seqkit_seq/main.nf b/modules/local/seqkit_seq/main.nf index 5e62142..9616e26 100644 --- a/modules/local/seqkit_seq/main.nf +++ b/modules/local/seqkit_seq/main.nf @@ -13,12 +13,7 @@ process SEQKIT_SEQ { saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process)+'_seq', meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? "bioconda::seqkit=0.15.0" : null) - - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/seqkit:0.15.0--0" - } else { - container "quay.io/biocontainers/seqkit:0.15.0--0" - } + container "quay.io/biocontainers/seqkit:0.15.0--0" input: tuple val(meta), path(reads) diff --git a/modules/local/seqkit_stats/main.nf b/modules/local/seqkit_stats/main.nf index f6423ea..8b2ef1f 100644 --- a/modules/local/seqkit_stats/main.nf +++ b/modules/local/seqkit_stats/main.nf @@ -13,12 +13,7 @@ process SEQKIT_STATS { saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process)+'_stats', meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? "bioconda::seqkit=0.15.0" : null) - - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/seqkit:0.15.0--0" - } else { - container "quay.io/biocontainers/seqkit:0.15.0--0" - } + container "quay.io/biocontainers/seqkit:0.15.0--0" input: tuple val(meta), path(reads) diff --git a/modules/local/seqprep/adapter_trimming/main.nf b/modules/local/seqprep/adapter_trimming/main.nf index 5818496..4c09ed1 100644 --- a/modules/local/seqprep/adapter_trimming/main.nf +++ b/modules/local/seqprep/adapter_trimming/main.nf @@ -11,11 +11,7 @@ process SEQPREP { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? "bioconda::seqprep=1.3.2" : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/seqprep:1.3.2--h5bf99c6_5" - } else { - container "quay.io/biocontainers/seqprep:1.3.2--h5bf99c6_5" - } + container "quay.io/biocontainers/seqprep:1.3.2--h5bf99c6_5" input: tuple val(meta), path(reads) diff --git a/modules/local/seqprep/read_merging/main.nf b/modules/local/seqprep/read_merging/main.nf index 964f2fa..c258d96 100644 --- a/modules/local/seqprep/read_merging/main.nf +++ b/modules/local/seqprep/read_merging/main.nf @@ -11,11 +11,7 @@ process SEQPREP { mode: params.publish_dir_mode, saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) } conda (params.enable_conda ? "bioconda::seqprep=1.3.2" : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container "https://depot.galaxyproject.org/singularity/seqprep:1.3.2--h5bf99c6_5" - } else { - container "quay.io/biocontainers/seqprep:1.3.2--h5bf99c6_5" - } + container "quay.io/biocontainers/seqprep:1.3.2--h5bf99c6_5" input: tuple val(meta), path(reads)