diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef022099b..ca104aeb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,8 @@ env: NFT_VER: "0.9.0" NFT_WORKDIR: "~" NXF_ANSI_LOG: false + NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity + NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity concurrency: group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" @@ -40,7 +42,7 @@ jobs: echo ${{ steps.list.outputs.components }} test: - name: ${{ matrix.nf_test_files }} ${{ matrix.profile }} NF-${{ matrix.NXF_VER }} + name: "Run tests (${{ matrix.nf_test_files }} ${{ matrix.profile }} NF-${{ matrix.NXF_VER }})" needs: [nf-test-changes] if: needs.nf-test-changes.outputs.nf_test_files != '[]' runs-on: ubuntu-latest @@ -52,17 +54,51 @@ jobs: - "latest-everything" nf_test_files: ["${{ fromJson(needs.nf-test-changes.outputs.nf_test_files) }}"] profile: + - "conda" - "docker" - + - "singularity" + isMaster: + - ${{ github.base_ref == 'master' }} + # Exclude conda and singularity on dev + exclude: + - isMaster: false + profile: "conda" + - isMaster: false + profile: "singularity" steps: - name: Check out pipeline code uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - - name: Install Nextflow + - name: Set up Nextflow uses: nf-core/setup-nextflow@v2 with: version: "${{ matrix.NXF_VER }}" + - name: Set up Apptainer + if: matrix.profile == 'singularity' + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: matrix.profile == 'singularity' + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Set up Miniconda + if: matrix.profile == 'conda' + uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3 + with: + miniconda-version: "latest" + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge,bioconda + + - name: Set up Conda + if: matrix.profile == 'conda' + run: | + echo $(realpath $CONDA)/condabin >> $GITHUB_PATH + echo $(realpath python) >> $GITHUB_PATH + - name: Install nf-test uses: nf-core/setup-nf-test@v1 with: @@ -78,6 +114,9 @@ jobs: python -m pip install --upgrade pip pip install pdiff + - name: Clean up Disk space + uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 + - name: Run nf-test run: | nf-test test --verbose ${{ matrix.nf_test_files }} --profile "+${{ matrix.profile }}" --junitxml=test.xml --tap=test.tap diff --git a/.github/workflows/template_version_comment.yml b/.github/workflows/template_version_comment.yml index 9dea41f0d..e8aafe44d 100644 --- a/.github/workflows/template_version_comment.yml +++ b/.github/workflows/template_version_comment.yml @@ -10,9 +10,11 @@ jobs: steps: - name: Check out pipeline code uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Read template version from .nf-core.yml - uses: pietrobolcato/action-read-yaml@1.0.0 + uses: nichmor/minimal-read-yaml@v0.0.2 id: read_yml with: config: ${{ github.workspace }}/.nf-core.yml @@ -24,20 +26,21 @@ jobs: - name: Check nf-core outdated id: nf_core_outdated - run: pip list --outdated | grep nf-core + run: echo "OUTPUT=$(pip list --outdated | grep nf-core)" >> ${GITHUB_ENV} - name: Post nf-core template version comment uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2 if: | - ${{ steps.nf_core_outdated.outputs.stdout }} =~ 'nf-core' + contains(env.OUTPUT, 'nf-core') with: repo-token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} allow-repeats: false message: | - ## :warning: Newer version of the nf-core template is available. - - Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}. - Please update your pipeline to the latest version. - - For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync). + > [!WARNING] + > Newer version of the nf-core template is available. + > + > Your pipeline is using an old version of the nf-core template: ${{ steps.read_yml.outputs['nf_core_version'] }}. + > Please update your pipeline to the latest version. + > + > For more documentation on how to update your pipeline, please see the [nf-core documentation](https://github.com/nf-core/tools?tab=readme-ov-file#sync-a-pipeline-with-the-template) and [Synchronisation documentation](https://nf-co.re/docs/contributing/sync). # diff --git a/.gitignore b/.gitignore index ef809d7c3..8aee8dabc 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ test.xml testing* testing/ work/ +null/ diff --git a/.nf-core.yml b/.nf-core.yml index 15806017b..53a95ded4 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -12,7 +12,7 @@ lint: nextflow_config: - config_defaults: - params.ribo_database_manifest -nf_core_version: 3.0.1 +nf_core_version: 3.0.2 org_path: null repository_type: pipeline template: diff --git a/modules.json b/modules.json index f4460822d..2e8042220 100644 --- a/modules.json +++ b/modules.json @@ -104,7 +104,7 @@ }, "multiqc": { "branch": "master", - "git_sha": "b8d36829fa84b6e404364abff787e8b07f6d058c", + "git_sha": "cf17ca47590cc578dfb47db1c2a44ef86f89976d", "installed_by": ["modules"] }, "picard/markduplicates": { @@ -352,12 +352,12 @@ }, "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "f533459a222ac53eb4c6bb7a5f574e4069197cdb", + "git_sha": "3aa0aec1d52d492fe241919f0c6100ebf0074082", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "f533459a222ac53eb4c6bb7a5f574e4069197cdb", + "git_sha": "1b6b9a3338d011367137808b49b923515080e3ba", "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index 9724d2f34..cc0643e1d 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -52,7 +52,7 @@ process MULTIQC { stub: """ mkdir multiqc_data - touch multiqc_plots + mkdir multiqc_plots touch multiqc_report.html cat <<-END_VERSIONS > versions.yml diff --git a/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf b/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf index 2aa411a68..16936fe31 100644 --- a/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_rnaseq_pipeline/main.nf @@ -50,7 +50,6 @@ workflow PIPELINE_INITIALISATION { workflow.profile.tokenize(',').intersect(['conda', 'mamba']).size() >= 1 ) - // // Validate parameters and generate parameter summary to stdout // @@ -60,7 +59,6 @@ workflow PIPELINE_INITIALISATION { null ) - // // Check config provided to the pipeline // @@ -114,7 +112,6 @@ workflow PIPELINE_COMPLETION { email // string: email address email_on_fail // string: email address sent on pipeline failure plaintext_email // boolean: Send plain-text email instead of HTML - outdir // path: Path to output directory where results will be published monochrome_logs // boolean: Disable ANSI colour codes in log output hook_url // string: hook URL for notifications diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index 4d7f09c04..0fcbf7b3f 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -106,17 +106,19 @@ def checkCondaChannels() { def channels_missing = ((required_channels_in_order as Set) - (channels as Set)) as Boolean // Check that they are in the right order - def channel_priority_violation = false - - required_channels_in_order.eachWithIndex { channel, index -> - if (index < required_channels_in_order.size() - 1) { - channel_priority_violation |= !(channels.indexOf(channel) < channels.indexOf(required_channels_in_order[index + 1])) - } - } + def channel_priority_violation = required_channels_in_order != channels.findAll { ch -> ch in required_channels_in_order } if (channels_missing | channel_priority_violation) { - log.warn( - "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" + " There is a problem with your Conda configuration!\n\n" + " You will need to set-up the conda-forge and bioconda channels correctly.\n" + " Please refer to https://bioconda.github.io/\n" + " The observed channel order is \n" + " ${channels}\n" + " but the following channel order is required:\n" + " ${required_channels_in_order}\n" + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - ) + log.warn """\ + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + There is a problem with your Conda configuration! + You will need to set-up the conda-forge and bioconda channels correctly. + Please refer to https://bioconda.github.io/ + The observed channel order is + ${channels} + but the following channel order is required: + ${required_channels_in_order} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + """.stripIndent(true) } } diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 805dcc424..5cb7bafef 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -62,7 +62,7 @@ def checkProfileProvided(nextflow_cli_args) { def workflowCitation() { def temp_doi_ref = "" def manifest_doi = workflow.manifest.doi.tokenize(",") - // Using a loop to handle multiple DOIs + // Handling multiple DOIs // Removing `https://doi.org/` to handle pipelines using DOIs vs DOI resolvers // Removing ` ` since the manifest.doi is a string and not a proper list manifest_doi.each { doi_ref -> diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 54f69a54b..ea663624c 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -83,8 +83,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { diff --git a/tests/featurecounts_group_type.nf.test.snap b/tests/featurecounts_group_type.nf.test.snap index 5f427d903..9630b4c5d 100644 --- a/tests/featurecounts_group_type.nf.test.snap +++ b/tests/featurecounts_group_type.nf.test.snap @@ -83,8 +83,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { diff --git a/tests/hisat2.nf.test.snap b/tests/hisat2.nf.test.snap index 2fec710ac..f6fe94c7e 100644 --- a/tests/hisat2.nf.test.snap +++ b/tests/hisat2.nf.test.snap @@ -84,8 +84,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { @@ -1312,4 +1311,4 @@ }, "timestamp": "2024-10-10T12:37:31.888584" } -} \ No newline at end of file +} diff --git a/tests/kallisto.nf.test.snap b/tests/kallisto.nf.test.snap index a5402206e..215a901a4 100644 --- a/tests/kallisto.nf.test.snap +++ b/tests/kallisto.nf.test.snap @@ -322,8 +322,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { diff --git a/tests/min_mapped_reads.nf.test.snap b/tests/min_mapped_reads.nf.test.snap index 2e0636eb8..a494f6029 100644 --- a/tests/min_mapped_reads.nf.test.snap +++ b/tests/min_mapped_reads.nf.test.snap @@ -1261,8 +1261,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { diff --git a/tests/remove_ribo_rna.nf.test.snap b/tests/remove_ribo_rna.nf.test.snap index 232ea90a6..f10e886fe 100644 --- a/tests/remove_ribo_rna.nf.test.snap +++ b/tests/remove_ribo_rna.nf.test.snap @@ -1475,8 +1475,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { diff --git a/tests/salmon.nf.test.snap b/tests/salmon.nf.test.snap index f09490d98..451c2918f 100644 --- a/tests/salmon.nf.test.snap +++ b/tests/salmon.nf.test.snap @@ -395,8 +395,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { @@ -405,4 +404,4 @@ }, "timestamp": "2024-10-10T07:07:48.845197" } -} \ No newline at end of file +} diff --git a/tests/skip_qc.nf.test.snap b/tests/skip_qc.nf.test.snap index b85335408..476f26117 100644 --- a/tests/skip_qc.nf.test.snap +++ b/tests/skip_qc.nf.test.snap @@ -69,8 +69,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": { @@ -790,4 +789,4 @@ }, "timestamp": "2024-10-10T11:16:41.081492" } -} \ No newline at end of file +} diff --git a/tests/star_rsem.nf.test.snap b/tests/star_rsem.nf.test.snap index cdbf5a543..9d17e1f2d 100644 --- a/tests/star_rsem.nf.test.snap +++ b/tests/star_rsem.nf.test.snap @@ -1354,8 +1354,7 @@ ], [ "genome_transcriptome.fasta:md5,d41d8cd98f00b204e9800998ecf8427e", - "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e", - "multiqc_plots:md5,d41d8cd98f00b204e9800998ecf8427e" + "genome_transcriptome.gtf:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "meta": {