diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4648ac8..0745703 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: strategy: matrix: # Nextflow versions: check pipeline minimum and current latest - nxf_ver: ['21.10.6', '23.04.1'] + nxf_ver: ['22.10.1', '23.04.1'] steps: - name: Check out pipeline code uses: actions/checkout@v2 @@ -111,7 +111,7 @@ jobs: strategy: matrix: # Nextflow versions: check pipeline minimum and current latest - nxf_ver: ['21.10.6', '23.04.1'] + nxf_ver: ['22.10.1', '23.04.1'] steps: - name: Check out pipeline code uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 54fa4fe..17e7961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[3.3.1](https://github.com/CFIA-NCFAD/nf-flu/releases/tag/3.3.1)] - 2023-08-02 + +### Fixes + +* Conda/Mamba env creation when using `conda`/`mamba` profile (#35) + ## [[3.3.0](https://github.com/CFIA-NCFAD/nf-flu/releases/tag/3.3.0)] - 2023-07-11 This release migrates to more recently updated Influenza virus sequences since the last update for the [NCBI Influenza DB FTP data](https://ftp.ncbi.nih.gov/genomes/INFLUENZA/) was in 2020-10-13. By default, all Orthomyxoviridae virus sequences were parsed from the daily updated NCBI Viruses [`AllNucleotide.fa`](https://ftp.ncbi.nlm.nih.gov/genomes/Viruses/AllNucleotide/) and [`AllNuclMetadata.csv.gz`](https://ftp.ncbi.nlm.nih.gov/genomes/Viruses/AllNuclMetadata/AllNuclMetadata.csv.gz) and uploaded to [Figshare](https://figshare.com/articles/dataset/2023-06-14_-_NCBI_Viruses_-_Orthomyxoviridae/23608782) as Zstd compressed files. nf-flu no longer uses the [influenza.fna.gz](https://ftp.ncbi.nih.gov/genomes/INFLUENZA/influenza.fna.gz) and [genomeset.dat.gz](https://ftp.ncbi.nih.gov/genomes/INFLUENZA/genomeset.dat.gz) files for Influenza sequences and metadata, respectively. diff --git a/conf/modules_illumina.config b/conf/modules_illumina.config index e6560a5..ad3b72a 100644 --- a/conf/modules_illumina.config +++ b/conf/modules_illumina.config @@ -1,5 +1,16 @@ // Illumina subworkflow process configuration process { + withName: 'CHECK_SAMPLE_SHEET' { + ext.args = '' + publishDir = [ + [ + path: { "${params.tracedir}/" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + ] + } + withName: 'IRMA' { publishDir = [ [ diff --git a/conf/modules_nanopore.config b/conf/modules_nanopore.config index df0b951..8c97e46 100644 --- a/conf/modules_nanopore.config +++ b/conf/modules_nanopore.config @@ -1,5 +1,16 @@ // Nanopore subworkflow process configuration process { + withName: 'CHECK_SAMPLE_SHEET' { + ext.args = '' + publishDir = [ + [ + path: { "${params.tracedir}/" }, + mode: params.publish_dir_mode, + saveAs: { filename -> filename.equals('versions.yml') ? null : filename } + ] + ] + } + withName: 'IRMA' { publishDir = [ [ diff --git a/docs/usage.md b/docs/usage.md index d59ce7f..21e3155 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -311,20 +311,6 @@ Do not use coloured log outputs. Directory to keep pipeline Nextflow logs and reports. -#### `--enable_conda` - -- Optional -- Type: boolean - -Run this workflow with Conda. You can also use '-profile conda' instead of providing this parameter. - -#### `--use_mamba` - -- Optional -- Type: boolean - -Use Mamba in place of Conda for faster Conda env creation. - #### `--singularity_pull_docker_container` - Optional diff --git a/modules.json b/modules.json index 1e336bf..7390cec 100644 --- a/modules.json +++ b/modules.json @@ -5,12 +5,6 @@ "nf-core/modules": { "custom/dumpsoftwareversions": { "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" - }, - "multiqc": { - "git_sha": "49b18b1639f4f7104187058866a8fab33332bdfe" - }, - "prokka": { - "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d" } } } diff --git a/modules/local/bcftools.nf b/modules/local/bcftools.nf index fcc1389..8f61b9f 100644 --- a/modules/local/bcftools.nf +++ b/modules/local/bcftools.nf @@ -5,7 +5,7 @@ process BCF_CONSENSUS { tag "$sample|$segment|$ref_id" label 'process_medium' - conda (params.enable_conda ? 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' : null) + conda 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/bcftools:1.15.1--h0ea216a_0' } else { @@ -49,7 +49,7 @@ process BCF_FILTER { tag "$sample|$segment|$ref_id" label 'process_low' - conda (params.enable_conda ? 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' : null) + conda 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/bcftools:1.15.1--h0ea216a_0' } else { @@ -94,7 +94,7 @@ process BCFTOOLS_STATS { tag "$sample|$segment|$ref_id" label 'process_low' - conda (params.enable_conda ? 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' : null) + conda 'bioconda::bcftools=1.15.1 conda-forge::gsl=2.7' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/bcftools:1.15.1--h0ea216a_0' } else { diff --git a/modules/local/blast_makeblastdb.nf b/modules/local/blast_makeblastdb.nf index 3fc0884..41234f4 100644 --- a/modules/local/blast_makeblastdb.nf +++ b/modules/local/blast_makeblastdb.nf @@ -3,7 +3,7 @@ process BLAST_MAKEBLASTDB { tag "$fasta" label 'process_low' - conda (params.enable_conda ? 'bioconda::blast=2.14.0' : null) + conda 'bioconda::blast=2.14.0' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/blast:2.14.0--h7d5a4b4_1' } else { diff --git a/modules/local/blastn.nf b/modules/local/blastn.nf index 33090e7..e8bf984 100644 --- a/modules/local/blastn.nf +++ b/modules/local/blastn.nf @@ -2,7 +2,7 @@ process BLAST_BLASTN { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? 'bioconda::blast=2.14.0' : null) + conda 'bioconda::blast=2.14.0' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/blast:2.14.0--h7d5a4b4_1' } else { diff --git a/modules/local/blastn_report.nf b/modules/local/blastn_report.nf index bd76184..ef87d14 100644 --- a/modules/local/blastn_report.nf +++ b/modules/local/blastn_report.nf @@ -1,18 +1,12 @@ -// Import generic module functions -include { initOptions; saveFiles; getSoftwareName } from './functions' - -params.options = [:] -options = initOptions(params.options) - process BLASTN_REPORT { - tag "$meta.id" - label 'process_low' - conda (params.enable_conda ? 'conda-forge::python=3.9 conda-forge::biopython=1.78 conda-forge::openpyxl=3.0.7 conda-forge::pandas=1.2.4 conda-forge::rich=10.2.2 conda-forge::typer=0.3.2 conda-forge::xlsxwriter=1.4.3' : null) - if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { - container 'https://depot.galaxyproject.org/singularity/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0' - } else { - container 'quay.io/biocontainers/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0' - } + tag "$meta.id" + label 'process_low' + conda 'conda-forge::python=3.9 conda-forge::biopython=1.78 conda-forge::openpyxl=3.0.7 conda-forge::pandas=1.2.4 conda-forge::rich=10.2.2 conda-forge::typer=0.3.2 conda-forge::xlsxwriter=1.4.3' + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container 'https://depot.galaxyproject.org/singularity/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0' + } else { + container 'quay.io/biocontainers/mulled-v2-693e24f156d01a5f55647120be99929b01b30949:609c862c3470382215fc1b2d9d8a4e9637b2e25f-0' + } input: tuple val(meta), path(blastn_results) @@ -25,10 +19,12 @@ process BLASTN_REPORT { script: """ get_blastn_report.py \\ - -b $blastn_results \\ - --min-aln-length ${params.min_aln_length} \\ - -x ${meta.id}-blastn-report.xlsx + -b $blastn_results \\ + --min-aln-length ${params.min_aln_length} \\ + -x ${meta.id}-blastn-report.xlsx + ln -s .command.log get_blastn_report.log + cat <<-END_VERSIONS > versions.yml "${task.process}": python: \$(python --version | sed 's/Python //g') diff --git a/modules/local/cat_illumina_fastq.nf b/modules/local/cat_illumina_fastq.nf index 0afe2bd..fdb84ba 100644 --- a/modules/local/cat_illumina_fastq.nf +++ b/modules/local/cat_illumina_fastq.nf @@ -5,7 +5,7 @@ process CAT_ILLUMINA_FASTQ { tag "$meta.id" label 'process_single' - conda (params.enable_conda ? "conda-forge::perl" : null) + conda "conda-forge::perl" // use BLAST container here since it has Perl and is required by other // processes in the pipeline if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { diff --git a/modules/local/check_ref_fasta.nf b/modules/local/check_ref_fasta.nf index 4f13eb2..531ee06 100644 --- a/modules/local/check_ref_fasta.nf +++ b/modules/local/check_ref_fasta.nf @@ -1,6 +1,6 @@ process CHECK_REF_FASTA { tag "$fasta" - conda (params.enable_conda ? 'bioconda::shiptv=0.4.0' : null) + conda 'bioconda::shiptv=0.4.0' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/shiptv:0.4.0--pyh5e36f6f_0' } else { diff --git a/modules/local/check_sample_sheet.nf b/modules/local/check_sample_sheet.nf index 9603c95..cedaedd 100644 --- a/modules/local/check_sample_sheet.nf +++ b/modules/local/check_sample_sheet.nf @@ -1,8 +1,6 @@ process CHECK_SAMPLE_SHEET { - publishDir "${params.tracedir}/", - mode: params.publish_dir_mode // using shiptv container since it has pandas, rich, typer installed - conda (params.enable_conda ? 'bioconda::shiptv=0.4.0' : null) + conda 'bioconda::shiptv=0.4.0' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/shiptv:0.4.0--pyh5e36f6f_0' } else { diff --git a/modules/local/clair3.nf b/modules/local/clair3.nf index b0c36c9..b431a5c 100644 --- a/modules/local/clair3.nf +++ b/modules/local/clair3.nf @@ -5,7 +5,7 @@ process CLAIR3 { tag "$sample|$segment|$ref_id" label 'process_low' - conda (params.enable_conda ? 'bioconda::clair3==1.0.2' : null) + conda 'bioconda::clair3==1.0.2' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/clair3:1.0.2--py39hb9dc472_0' } else { @@ -30,14 +30,15 @@ process CLAIR3 { clair3_dir = "${prefix}.clair3" clair3_log = "${clair3_dir}/run_clair3.log" model_suffix = "models/${params.clair3_variant_model}" + using_conda = (workflow.containerEngine == null || workflow.containerEngine == '') """ CLAIR_BIN_DIR=\$(dirname \$(which run_clair3.sh)) if [[ "${params.clair3_user_variant_model}" != "" ]] ; then MODEL_PATH=${model_path} else - if [[ ${params.enable_conda} = true ]] ; then + if [[ ${using_conda} = true ]] ; then MODEL_PATH="\$CLAIR_BIN_DIR/${model_suffix}" - else [[ ${params.enable_conda} = false ]] + else [[ ${using_conda} = false ]] MODEL_PATH="/usr/local/bin/models/${params.clair3_variant_model}" fi fi diff --git a/modules/local/coverage_plot.nf b/modules/local/coverage_plot.nf index bd533da..fafb331 100644 --- a/modules/local/coverage_plot.nf +++ b/modules/local/coverage_plot.nf @@ -4,7 +4,7 @@ process COVERAGE_PLOT{ tag "$sample|$segment|$ref_id" label 'process_low' - conda (params.enable_conda ? 'python=3.9 conda-forge::typer=0.3.2 conda-forge::rich=10.6.0 conda-forge::seaborn=0.11.0 conda-forge::pandas=1.3.0 bioconda::bcbio-gff=0.6.6 bioconda::dna_features_viewer=3.0.3' : null) + conda 'python=3.9 conda-forge::typer=0.3.2 conda-forge::rich=10.6.0 conda-forge::seaborn=0.11.0 conda-forge::pandas=1.3.0 bioconda::bcbio-gff=0.6.6 bioconda::dna_features_viewer=3.0.3' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/mulled-v2-596f42d854e849eb773ecd1b48f2b698c2d09c9f:400d0a2593841aa0bfa3402fe85debd55a29cf37-0' } else { diff --git a/modules/local/irma.nf b/modules/local/irma.nf index 00595a9..1b19a8c 100644 --- a/modules/local/irma.nf +++ b/modules/local/irma.nf @@ -2,7 +2,7 @@ process IRMA { tag "$meta.id" label 'process_high' - conda (params.enable_conda ? "bioconda::irma=1.0.2" : null) + conda "bioconda::irma=1.0.2" if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/irma:1.0.2--pl5321hdfd78af_2' } else { diff --git a/modules/local/medaka.nf b/modules/local/medaka.nf index 7bfbc37..f6595a1 100644 --- a/modules/local/medaka.nf +++ b/modules/local/medaka.nf @@ -5,7 +5,7 @@ process MEDAKA { tag "$sample|$segment|$id" label 'process_low' - conda (params.enable_conda ? 'bioconda::medaka=1.4.4' : null) + conda 'bioconda::medaka=1.4.4' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/medaka:1.4.4--py38h130def0_0' } else { diff --git a/modules/local/minimap2.nf b/modules/local/minimap2.nf index 6214ea7..fd29a7e 100644 --- a/modules/local/minimap2.nf +++ b/modules/local/minimap2.nf @@ -4,7 +4,7 @@ process MINIMAP2 { tag "$sample|$segment|$ref_id" label 'process_low' - conda (params.enable_conda ? 'bioconda::minimap2=2.24 bioconda::samtools=1.15' : null) + conda 'bioconda::minimap2=2.24 bioconda::samtools=1.15' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/mulled-v2-66534bcbb7031a148b13e2ad42583020b9cd25c4:1679e915ddb9d6b4abda91880c4b48857d471bd8-0' } else { diff --git a/modules/local/misc.nf b/modules/local/misc.nf index 16a1090..4b678da 100644 --- a/modules/local/misc.nf +++ b/modules/local/misc.nf @@ -4,7 +4,7 @@ process CAT_NANOPORE_FASTQ { tag "${meta.id}" label 'process_low' - conda (params.enable_conda ? "conda-forge::pigz=2.6" : null) + conda "conda-forge::pigz=2.6" if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/mulled-v2-2b04072095278721dc9a5772e61e406f399b6030:7c7abf911e92d7fb831611ffb965f3cf7fe2c01d-0" } else { @@ -60,7 +60,7 @@ process CAT_DB { process CAT_CONSENSUS { tag "$sample" - conda (params.enable_conda ? 'bioconda::shiptv=0.4.0' : null) + conda 'bioconda::shiptv=0.4.0' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/shiptv:0.4.0--pyh5e36f6f_0' } else { diff --git a/modules/local/mosdepth.nf b/modules/local/mosdepth.nf index 0e00304..d766e8d 100644 --- a/modules/local/mosdepth.nf +++ b/modules/local/mosdepth.nf @@ -4,7 +4,7 @@ process MOSDEPTH_GENOME { tag "$sample|$segment|$ref_id" label 'process_low' - conda (params.enable_conda ? 'bioconda::mosdepth=0.3.3' : null) + conda 'bioconda::mosdepth=0.3.3' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container "https://depot.galaxyproject.org/singularity/mosdepth:0.3.3--h37c5b7d_2" } else { diff --git a/modules/local/multiqc.nf b/modules/local/multiqc.nf index c0e4e36..c8489b7 100644 --- a/modules/local/multiqc.nf +++ b/modules/local/multiqc.nf @@ -1,7 +1,7 @@ process MULTIQC { label 'process_low' - conda (params.enable_conda ? "bioconda::multiqc=1.12" : null) + conda "bioconda::multiqc=1.12" if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/multiqc:1.12--pyhdfd78af_0' } else { diff --git a/modules/local/pull_top_ref_id.nf b/modules/local/pull_top_ref_id.nf index 59ccf64..ce44c4f 100644 --- a/modules/local/pull_top_ref_id.nf +++ b/modules/local/pull_top_ref_id.nf @@ -2,7 +2,7 @@ process PULL_TOP_REF_ID { tag "$meta.id" label 'process_low' - conda (params.enable_conda ? 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0' : null) + conda 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/mulled-v2-cfa20dfeb068db79c8620a11753add64c23d013a:019cd79f70be602ca625a1a0a4eabab462611a3a-0' } else { diff --git a/modules/local/seqtk_seq.nf b/modules/local/seqtk_seq.nf index b5c6f9d..ef13bfa 100644 --- a/modules/local/seqtk_seq.nf +++ b/modules/local/seqtk_seq.nf @@ -5,7 +5,7 @@ process SEQTK_SEQ{ tag "$sample|$segment|$ref_id" // use default process resources - conda (params.enable_conda ? "bioconda::seqtk=1.3" : null) + conda "bioconda::seqtk=1.3" if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/seqtk:1.3--h5bf99c6_3' } else { diff --git a/modules/local/subtyping_report.nf b/modules/local/subtyping_report.nf index 1c3c625..59db582 100644 --- a/modules/local/subtyping_report.nf +++ b/modules/local/subtyping_report.nf @@ -15,7 +15,7 @@ process SUBTYPING_REPORT { "2 GB" } } - conda (params.enable_conda ? 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0' : null) + conda 'conda-forge::python=3.10 conda-forge::biopython=1.80 conda-forge::openpyxl=3.1.0 conda-forge::pandas=1.5.3 conda-forge::rich=12.6.0 conda-forge::typer=0.7.0 conda-forge::xlsxwriter=3.0.8 conda-forge::polars=0.17.9 conda-forge::pyarrow=11.0.0' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/mulled-v2-cfa20dfeb068db79c8620a11753add64c23d013a:019cd79f70be602ca625a1a0a4eabab462611a3a-0' } else { @@ -39,7 +39,9 @@ process SUBTYPING_REPORT { --excel-report nf-flu-subtyping-report.xlsx \\ --pident-threshold $params.pident_threshold \\ $blastn_results + ln -s .command.log parse_influenza_blast_results.log + cat <<-END_VERSIONS > versions.yml "${task.process}": python: \$(python --version | sed 's/Python //g') diff --git a/modules/local/vcf_filter_frameshift.nf b/modules/local/vcf_filter_frameshift.nf index 026ca12..0de23e9 100644 --- a/modules/local/vcf_filter_frameshift.nf +++ b/modules/local/vcf_filter_frameshift.nf @@ -2,7 +2,7 @@ process VCF_FILTER_FRAMESHIFT { tag "$sample|$segment|$ref_id" // use default process resources - conda (params.enable_conda ? 'conda-forge::python=3.9 conda-forge::pandas=1.3.5 conda-forge::typer=0.4.1' : null) + conda 'conda-forge::python=3.9 conda-forge::pandas=1.3.5 conda-forge::typer=0.4.1' if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/mulled-v2-80c23cbcd32e2891421c54d1899665046feb07ef:77a31e289d22068839533bf21f8c4248ad274b60-0' } else { diff --git a/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf b/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf index 327d510..810f4c7 100644 --- a/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf +++ b/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf @@ -2,7 +2,7 @@ process CUSTOM_DUMPSOFTWAREVERSIONS { label 'process_low' // Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container - conda (params.enable_conda ? "bioconda::multiqc=1.11" : null) + conda "bioconda::multiqc=1.11" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/multiqc:1.11--pyhdfd78af_0' : 'quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0' }" diff --git a/modules/nf-core/modules/multiqc/functions.nf b/modules/nf-core/modules/multiqc/functions.nf deleted file mode 100644 index da9da09..0000000 --- a/modules/nf-core/modules/multiqc/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/nf-core/modules/multiqc/main.nf b/modules/nf-core/modules/multiqc/main.nf deleted file mode 100644 index ae019db..0000000 --- a/modules/nf-core/modules/multiqc/main.nf +++ /dev/null @@ -1,43 +0,0 @@ -process MULTIQC { - label 'process_medium' - - conda (params.enable_conda ? 'bioconda::multiqc=1.12' : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.12--pyhdfd78af_0' : - 'quay.io/biocontainers/multiqc:1.12--pyhdfd78af_0' }" - - input: - path multiqc_files - - output: - path "*multiqc_report.html", emit: report - path "*_data" , emit: data - path "*_plots" , optional:true, emit: plots - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - """ - multiqc -f $args . - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS - """ - - stub: - """ - touch multiqc_data - touch multiqc_plots - touch multiqc_report.html - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" ) - END_VERSIONS - """ -} diff --git a/modules/nf-core/modules/multiqc/meta.yml b/modules/nf-core/modules/multiqc/meta.yml deleted file mode 100644 index 6fa891e..0000000 --- a/modules/nf-core/modules/multiqc/meta.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: MultiQC -description: Aggregate results from bioinformatics analyses across many samples into a single report -keywords: - - QC - - bioinformatics tools - - Beautiful stand-alone HTML report -tools: - - multiqc: - description: | - MultiQC searches a given directory for analysis logs and compiles a HTML report. - It's a general use tool, perfect for summarising the output from numerous bioinformatics tools. - homepage: https://multiqc.info/ - documentation: https://multiqc.info/docs/ - licence: ["GPL-3.0-or-later"] -input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC -output: - - report: - type: file - description: MultiQC report file - pattern: "multiqc_report.html" - - data: - type: dir - description: MultiQC data dir - pattern: "multiqc_data" - - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" -authors: - - "@abhi18av" - - "@bunop" - - "@drpatelh" diff --git a/modules/nf-core/modules/prokka/functions.nf b/modules/nf-core/modules/prokka/functions.nf deleted file mode 100644 index da9da09..0000000 --- a/modules/nf-core/modules/prokka/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/nf-core/modules/prokka/main.nf b/modules/nf-core/modules/prokka/main.nf deleted file mode 100644 index 3e46d1a..0000000 --- a/modules/nf-core/modules/prokka/main.nf +++ /dev/null @@ -1,52 +0,0 @@ -process PROKKA { - tag "$meta.id" - label 'process_low' - - conda (params.enable_conda ? "bioconda::prokka=1.14.6" : null) - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/prokka:1.14.6--pl526_0' : - 'quay.io/biocontainers/prokka:1.14.6--pl526_0' }" - - input: - tuple val(meta), path(fasta) - path proteins - path prodigal_tf - - output: - tuple val(meta), path("${prefix}/*.gff"), emit: gff - tuple val(meta), path("${prefix}/*.gbk"), emit: gbk - tuple val(meta), path("${prefix}/*.fna"), emit: fna - tuple val(meta), path("${prefix}/*.faa"), emit: faa - tuple val(meta), path("${prefix}/*.ffn"), emit: ffn - tuple val(meta), path("${prefix}/*.sqn"), emit: sqn - tuple val(meta), path("${prefix}/*.fsa"), emit: fsa - tuple val(meta), path("${prefix}/*.tbl"), emit: tbl - tuple val(meta), path("${prefix}/*.err"), emit: err - tuple val(meta), path("${prefix}/*.log"), emit: log - tuple val(meta), path("${prefix}/*.txt"), emit: txt - tuple val(meta), path("${prefix}/*.tsv"), emit: tsv - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" - def proteins_opt = proteins ? "--proteins ${proteins[0]}" : "" - def prodigal_opt = prodigal_tf ? "--prodigaltf ${prodigal_tf[0]}" : "" - """ - prokka \\ - $args \\ - --cpus $task.cpus \\ - --prefix $prefix \\ - $proteins_opt \\ - $prodigal_tf \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - prokka: \$(echo \$(prokka --version 2>&1) | sed 's/^.*prokka //') - END_VERSIONS - """ -} diff --git a/modules/nf-core/modules/prokka/meta.yml b/modules/nf-core/modules/prokka/meta.yml deleted file mode 100644 index 7fc9e18..0000000 --- a/modules/nf-core/modules/prokka/meta.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: prokka -description: Whole genome annotation of small genomes (bacterial, archeal, viral) -keywords: - - annotation - - fasta - - prokka -tools: - - prokka: - description: Rapid annotation of prokaryotic genomes - homepage: https://github.com/tseemann/prokka - doi: "10.1093/bioinformatics/btu153" - licence: ["GPL v2"] - -input: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: | - FASTA file to be annotated. Has to contain at least a non-empty string dummy value. - - proteins: - type: file - description: FASTA file of trusted proteins to first annotate from (optional) - - prodigal_tf: - type: file - description: Training file to use for Prodigal (optional) - -output: - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - versions: - type: file - description: File containing software versions - pattern: "versions.yml" - - gff: - type: file - description: annotation in GFF3 format, containing both sequences and annotations - pattern: "*.{gff}" - - gbk: - type: file - description: annotation in GenBank format, containing both sequences and annotations - pattern: "*.{gbk}" - - fna: - type: file - description: nucleotide FASTA file of the input contig sequences - pattern: "*.{fna}" - - faa: - type: file - description: protein FASTA file of the translated CDS sequences - pattern: "*.{faa}" - - ffn: - type: file - description: nucleotide FASTA file of all the prediction transcripts (CDS, rRNA, tRNA, tmRNA, misc_RNA) - pattern: "*.{ffn}" - - sqn: - type: file - description: an ASN1 format "Sequin" file for submission to Genbank - pattern: "*.{sqn}" - - fsa: - type: file - description: nucleotide FASTA file of the input contig sequences, used by "tbl2asn" to create the .sqn file - pattern: "*.{fsa}" - - tbl: - type: file - description: feature Table file, used by "tbl2asn" to create the .sqn file - pattern: "*.{tbl}" - - err: - type: file - description: unacceptable annotations - the NCBI discrepancy report. - pattern: "*.{err}" - - log: - type: file - description: contains all the output that Prokka produced during its run - pattern: "*.{log}" - - txt: - type: file - description: statistics relating to the annotated features found - pattern: "*.{txt}" - - tsv: - type: file - description: tab-separated file of all features (locus_tag,ftype,len_bp,gene,EC_number,COG,product) - pattern: "*.{tsv}" - -authors: - - "@rpetit3" diff --git a/nextflow.config b/nextflow.config index 2f4bd39..a0f26f0 100644 --- a/nextflow.config +++ b/nextflow.config @@ -56,11 +56,9 @@ params { validate_params = true help = false monochrome_logs = false - enable_conda = false singularity_pull_docker_container = false show_hidden_params = false schema_ignore_params = 'modules,genomes' - use_mamba = false } includeConfig 'conf/base.config' @@ -153,8 +151,8 @@ manifest { description = 'Influenza A virus genome assembly pipeline' homePage = 'https://github.com/CFIA-NCFAD/nf-flu' author = 'Peter Kruczkiewicz, Hai Nguyen' - version = '3.3.0' - nextflowVersion = '>=21.10' + version = '3.3.1' + nextflowVersion = '!>=22.10.1' mainScript = 'main.nf' doi = '10.5281/zenodo.7011213' } diff --git a/nextflow_schema.json b/nextflow_schema.json index 58b0e32..f73c94a 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -269,20 +269,6 @@ "fa_icon": "fas fa-cogs", "hidden": true }, - "enable_conda": { - "type": "boolean", - "description": "Run this workflow with Conda. You can also use '-profile conda' instead of providing this parameter.", - "default": false, - "hidden": true, - "fa_icon": "fas fa-bacon" - }, - "use_mamba": { - "type": "boolean", - "description": "Use Mamba in place of Conda for faster Conda env creation.", - "default": false, - "hidden": true, - "fa_icon": "fas fa-speedometer" - }, "singularity_pull_docker_container": { "type": "boolean", "description": "Instead of directly downloading Singularity images for use with Singularity, force the workflow to pull and convert Docker containers instead.",