diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b290e090..97c8c97f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,20 +1,20 @@ { "name": "nfcore", - "image": "nfcore/gitpod:latest", - "remoteUser": "gitpod", - "runArgs": ["--privileged"], + "image": "nfcore/devcontainer:latest", - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "python.defaultInterpreterPath": "/opt/conda/bin/python" - }, + "remoteUser": "root", + "privileged": true, - // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - } + "remoteEnv": { + // Workspace path on the host for mounting with docker-outside-of-docker + "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" + }, + + "onCreateCommand": "./.devcontainer/setup.sh", + + "hostRequirements": { + "cpus": 4, + "memory": "16gb", + "storage": "32gb" } } diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 00000000..6df95f32 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Customise the terminal command prompt +echo "export PROMPT_DIRTRIM=2" >> $HOME/.bashrc +echo "export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] '" >> $HOME/.bashrc +export PROMPT_DIRTRIM=2 +export PS1='\[\e[3;36m\]\w ->\[\e[0m\\] ' + +# Update Nextflow +nextflow self-update + +# Update welcome message +echo "Welcome to the nf-core/tfactivity devcontainer!" > /usr/local/etc/vscode-dev-containers/first-run-notice.txt diff --git a/.github/actions/nf-test/action.yml b/.github/actions/nf-test/action.yml index bf44d961..3b9724c7 100644 --- a/.github/actions/nf-test/action.yml +++ b/.github/actions/nf-test/action.yml @@ -25,9 +25,9 @@ runs: version: "${{ env.NXF_VERSION }}" - name: Set up Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: - python-version: "3.13" + python-version: "3.14" - name: Install nf-test uses: nf-core/setup-nf-test@v1 @@ -52,6 +52,8 @@ runs: with: auto-update-conda: true conda-solver: libmamba + channels: conda-forge + channel-priority: strict conda-remove-defaults: true - name: Run nf-test diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml index 85e68104..523af394 100644 --- a/.github/workflows/awsfulltest.yml +++ b/.github/workflows/awsfulltest.yml @@ -28,21 +28,21 @@ jobs: # Add full size test data (but still relatively small datasets for few samples) # on the `test_full.config` test runs with only one set of parameters with: - workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} + workspace_id: ${{ vars.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} - compute_env: ${{ secrets.TOWER_COMPUTE_ENV }} + compute_env: ${{ vars.TOWER_COMPUTE_ENV }} revision: ${{ steps.revision.outputs.revision }} - workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/tfactivity/work-${{ steps.revision.outputs.revision }} + workdir: s3://${{ vars.AWS_S3_BUCKET }}/work/tfactivity/work-${{ steps.revision.outputs.revision }} parameters: | { "hook_url": "${{ secrets.MEGATESTS_ALERTS_SLACK_HOOK_URL }}", - "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/tfactivity/results-${{ steps.revision.outputs.revision }}" + "outdir": "s3://${{ vars.AWS_S3_BUCKET }}/tfactivity/results-${{ steps.revision.outputs.revision }}" } profiles: test_full - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: Seqera Platform debug log file path: | - seqera_platform_action_*.log - seqera_platform_action_*.json + tower_action_*.log + tower_action_*.json diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml index 4dc1eed8..e9372f89 100644 --- a/.github/workflows/awstest.yml +++ b/.github/workflows/awstest.yml @@ -14,20 +14,20 @@ jobs: - name: Launch workflow via Seqera Platform uses: seqeralabs/action-tower-launch@v2 with: - workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }} + workspace_id: ${{ vars.TOWER_WORKSPACE_ID }} access_token: ${{ secrets.TOWER_ACCESS_TOKEN }} - compute_env: ${{ secrets.TOWER_COMPUTE_ENV }} + compute_env: ${{ vars.TOWER_COMPUTE_ENV }} revision: ${{ github.sha }} - workdir: s3://${{ secrets.AWS_S3_BUCKET }}/work/tfactivity/work-${{ github.sha }} + workdir: s3://${{ vars.AWS_S3_BUCKET }}/work/tfactivity/work-${{ github.sha }} parameters: | { - "outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/tfactivity/results-test-${{ github.sha }}" + "outdir": "s3://${{ vars.AWS_S3_BUCKET }}/tfactivity/results-test-${{ github.sha }}" } profiles: test - - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: Seqera Platform debug log file path: | - seqera_platform_action_*.log - seqera_platform_action_*.json + tower_action_*.log + tower_action_*.json diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml index ac030fd5..6adb0fff 100644 --- a/.github/workflows/clean-up.yml +++ b/.github/workflows/clean-up.yml @@ -10,7 +10,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9 + - uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v10 with: stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days." stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful." diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 999bcc38..45884ff9 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -44,9 +44,9 @@ jobs: - name: Disk space cleanup uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: - python-version: "3.13" + python-version: "3.14" architecture: "x64" - name: Setup Apptainer @@ -57,7 +57,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install git+https://github.com/nf-core/tools.git@dev + pip install git+https://github.com/nf-core/tools.git - name: Make a cache directory for the container images run: | @@ -127,7 +127,7 @@ jobs: fi - name: Upload Nextflow logfile for debugging purposes - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: nextflow_logfile.txt path: .nextflow.log* diff --git a/.github/workflows/fix_linting.yml b/.github/workflows/fix_linting.yml index 12b62a2e..42f52423 100644 --- a/.github/workflows/fix_linting.yml +++ b/.github/workflows/fix_linting.yml @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest steps: # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: token: ${{ secrets.nf_core_bot_auth_token }} # indication that the linting is being fixed - name: React on comment - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 with: comment-id: ${{ github.event.comment.id }} reactions: eyes @@ -32,9 +32,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} # Install and run pre-commit - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: - python-version: "3.13" + python-version: "3.14" - name: Install pre-commit run: pip install pre-commit @@ -47,7 +47,7 @@ jobs: # indication that the linting has finished - name: react if linting finished succesfully if: steps.pre-commit.outcome == 'success' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 with: comment-id: ${{ github.event.comment.id }} reactions: "+1" @@ -67,21 +67,21 @@ jobs: - name: react if linting errors were fixed id: react-if-fixed if: steps.commit-and-push.outcome == 'success' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 with: comment-id: ${{ github.event.comment.id }} reactions: hooray - name: react if linting errors were not fixed if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 with: comment-id: ${{ github.event.comment.id }} reactions: confused - name: react if linting errors were not fixed if: steps.commit-and-push.outcome == 'failure' - uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4 + uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 with: issue-number: ${{ github.event.issue.number }} body: | diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 8b0f88c3..7a527a34 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,12 +11,12 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - - name: Set up Python 3.13 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - name: Set up Python 3.14 + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: - python-version: "3.13" + python-version: "3.14" - name: Install pre-commit run: pip install pre-commit @@ -28,14 +28,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out pipeline code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 - name: Install Nextflow uses: nf-core/setup-nextflow@v2 - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 with: - python-version: "3.13" + python-version: "3.14" architecture: "x64" - name: read .nf-core.yml @@ -71,7 +71,7 @@ jobs: - name: Upload linting log file artifact if: ${{ always() }} - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 with: name: linting-logs path: | diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index d43797d9..e6e9bc26 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -21,7 +21,7 @@ jobs: run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT - name: Post PR comment - uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2 + uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} number: ${{ steps.pr_number.outputs.pr_number }} diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml index 7fe13b48..f7546157 100644 --- a/.github/workflows/nf-test.yml +++ b/.github/workflows/nf-test.yml @@ -29,7 +29,7 @@ concurrency: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NFT_VER: "0.9.2" + NFT_VER: "0.9.5" NFT_WORKDIR: "~" NXF_ANSI_LOG: false NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity @@ -51,7 +51,7 @@ jobs: rm -rf ./* || true rm -rf ./.??* || true ls -la ./ - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 @@ -89,14 +89,14 @@ jobs: - isMain: false profile: "singularity" NXF_VER: - - "24.10.5" + - "25.04.0" - "latest-everything" env: NXF_ANSI_LOG: false TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }} steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 @@ -106,6 +106,7 @@ jobs: continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }} env: NFT_WORKDIR: ${{ env.NFT_WORKDIR }} + NXF_VERSION: ${{ matrix.NXF_VER }} with: profile: ${{ matrix.profile }} shard: ${{ matrix.shard }} diff --git a/.github/workflows/release-announcements.yml b/.github/workflows/release-announcements.yml index 0f732495..431d3d44 100644 --- a/.github/workflows/release-announcements.yml +++ b/.github/workflows/release-announcements.yml @@ -14,6 +14,10 @@ jobs: run: | echo "topics=$(curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .topics[]' | awk '{print "#"$0}' | tr '\n' ' ')" | sed 's/-//g' >> $GITHUB_OUTPUT + - name: get description + id: get_description + run: | + echo "description=$(curl -s https://nf-co.re/pipelines.json | jq -r '.remote_workflows[] | select(.full_name == "${{ github.repository }}") | .description')" >> $GITHUB_OUTPUT - uses: rzr/fediverse-action@master with: access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }} @@ -22,7 +26,7 @@ jobs: # https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release message: | Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! - + ${{ steps.get_description.outputs.description }} Please see the changelog: ${{ github.event.release.html_url }} ${{ steps.get_topics.outputs.topics }} #nfcore #openscience #nextflow #bioinformatics diff --git a/.github/workflows/template-version-comment.yml b/.github/workflows/template-version-comment.yml index beb5c77f..e8560fc7 100644 --- a/.github/workflows/template-version-comment.yml +++ b/.github/workflows/template-version-comment.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out pipeline code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: ref: ${{ github.event.pull_request.head.sha }} diff --git a/.gitignore b/.gitignore index f232546a..092a7f4c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,5 @@ testing/ testing* *.pyc null/ -.nf-test/ +.nf-test* .nf-test.log diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 83599f63..00000000 --- a/.gitpod.yml +++ /dev/null @@ -1,10 +0,0 @@ -image: nfcore/gitpod:latest -tasks: - - name: Update Nextflow and setup pre-commit - command: | - pre-commit install --install-hooks - nextflow self-update - -vscode: - extensions: - - nf-core.nf-core-extensionpack # https://github.com/nf-core/vscode-extensionpack diff --git a/.nf-core.yml b/.nf-core.yml index 31f82923..bb47a285 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -5,7 +5,7 @@ lint: - .github/CONTRIBUTING.md - assets/sendmail_template.txt multiqc_config: false -nf_core_version: 3.3.2 +nf_core_version: 3.5.1 repository_type: pipeline template: author: Nico Trummer diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb41beec..d06777a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: additional_dependencies: - prettier@3.6.2 - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace args: [--markdown-linebreak-ext=md] diff --git a/.prettierignore b/.prettierignore index 9493a1cc..1bdc5174 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,5 +10,8 @@ testing/ testing* *.pyc bin/ +.nf-test/ ro-crate-metadata.json +modules/nf-core/ +subworkflows/nf-core/ modules/local/report/create/app/dependencies/* diff --git a/README.md b/README.md index 2caab73d..c24fecaa 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,13 @@ +[![Open in GitHub Codespaces](https://img.shields.io/badge/Open_In_GitHub_Codespaces-black?labelColor=grey&logo=github)](https://github.com/codespaces/new/nf-core/tfactivity) [![GitHub Actions CI Status](https://github.com/nf-core/tfactivity/actions/workflows/nf-test.yml/badge.svg)](https://github.com/nf-core/tfactivity/actions/workflows/nf-test.yml) [![GitHub Actions Linting Status](https://github.com/nf-core/tfactivity/actions/workflows/linting.yml/badge.svg)](https://github.com/nf-core/tfactivity/actions/workflows/linting.yml)[![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/tfactivity/results)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.XXXXXXX-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.XXXXXXX) [![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com) -[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) -[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.3.2-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.3.2) +[![Nextflow](https://img.shields.io/badge/version-%E2%89%A525.04.0-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/) +[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.5.1-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.5.1) [![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/) [![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/) [![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/) diff --git a/docs/usage.md b/docs/usage.md index c1cb4d01..7fbc94a8 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -243,7 +243,7 @@ If `-profile` is not specified, the pipeline will run locally and expect all sof - `shifter` - A generic configuration profile to be used with [Shifter](https://nersc.gitlab.io/development/shifter/how-to-use/) - `charliecloud` - - A generic configuration profile to be used with [Charliecloud](https://hpc.github.io/charliecloud/) + - A generic configuration profile to be used with [Charliecloud](https://charliecloud.io/) - `apptainer` - A generic configuration profile to be used with [Apptainer](https://apptainer.org/) - `wave` diff --git a/main.nf b/main.nf index 3e574450..a329f5be 100644 --- a/main.nf +++ b/main.nf @@ -51,14 +51,14 @@ workflow NFCORE_TFACTIVITY { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() fasta = file(params.fasta, checkIfExists: true) gtf = file(params.gtf, checkIfExists: true) - ch_blacklist = Channel.value(params.blacklist ? file(params.blacklist, checkIfExists: true) : []) + ch_blacklist = channel.value(params.blacklist ? file(params.blacklist, checkIfExists: true) : []) ch_motifs = params.motifs ? file(params.motifs, checkIfExists: true) : null - ch_counts = Channel.value(file(params.counts, checkIfExists: true)) + ch_counts = channel.value(file(params.counts, checkIfExists: true)) snps = params.snps ? file(params.snps, checkIfExists: true) : null sneep_scale_file = params.sneep_scale_file ? file(params.sneep_scale_file, checkIfExists: true) : null @@ -101,7 +101,7 @@ workflow NFCORE_TFACTIVITY { params.duplicate_motifs, ch_counts, ch_extra_counts, - Channel.value([[id: "design"], file(params.counts_design, checkIfExists: true)]), + channel.value([[id: "design"], file(params.counts_design, checkIfExists: true)]), params.min_count, params.min_tpm, params.expression_aggregation, @@ -114,6 +114,11 @@ workflow NFCORE_TFACTIVITY { params.alpha, snps, ch_versions, + params.skip_fimo, + params.skip_sneep, + params.skip_chromhmm, + params.skip_rose, + params.outdir, ) } /* @@ -129,10 +134,14 @@ workflow { PIPELINE_INITIALISATION( params.version, params.validate_params, - params.monochrome_logs, args, params.outdir, + params.help, + params.help_full, + params.show_hidden, params.input, + params.input_bam, + params.counts_design, ) // diff --git a/modules.json b/modules.json index fa59bf08..72a152c6 100644 --- a/modules.json +++ b/modules.json @@ -103,17 +103,17 @@ "nf-core": { "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "c2b22d85f30a706a3073387f30380704fcae013b", + "git_sha": "05954dab2ff481bcb999f24455da29a5828af08d", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "51ae5406a030d4da1e49e4dab49756844fdd6c7a", + "git_sha": "f0b535b3ae20080f8db03dd5388876ad1ec29d70", "installed_by": ["subworkflows"] }, "utils_nfschema_plugin": { "branch": "master", - "git_sha": "2fd2cd6d0e7b273747f32e465fdc6bcc3ae0814e", + "git_sha": "fdc08b8b1ae74f56686ce21f7ea11ad11990ce57", "installed_by": ["subworkflows"] } } diff --git a/modules/local/chromhmm/binarize_bams/tests/main.nf.test b/modules/local/chromhmm/binarize_bams/tests/main.nf.test index 5c9fe118..2aeae795 100644 --- a/modules/local/chromhmm/binarize_bams/tests/main.nf.test +++ b/modules/local/chromhmm/binarize_bams/tests/main.nf.test @@ -21,7 +21,7 @@ nextflow_process { when { process { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ @@ -66,7 +66,7 @@ nextflow_process { when { process { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ @@ -109,7 +109,7 @@ nextflow_process { when { process { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .map { row -> [ diff --git a/modules/local/counts/filter_genes/tests/main.nf.test b/modules/local/counts/filter_genes/tests/main.nf.test index 74833b13..77e5b7db 100644 --- a/modules/local/counts/filter_genes/tests/main.nf.test +++ b/modules/local/counts/filter_genes/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_process { [ id: 'test'], file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true) ] - input[1] = Channel.empty() + input[1] = channel.empty() input[2] = PREPARE_GENOME.out.gene_map input[3] = 'sum' """ diff --git a/modules/local/motifs/filter_motifs/tests/main.nf.test b/modules/local/motifs/filter_motifs/tests/main.nf.test index e3fa5ce8..40550610 100644 --- a/modules/local/motifs/filter_motifs/tests/main.nf.test +++ b/modules/local/motifs/filter_motifs/tests/main.nf.test @@ -26,7 +26,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = false """ } @@ -47,7 +47,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = false """ } @@ -66,7 +66,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = true """ } @@ -87,7 +87,7 @@ nextflow_process { process { """ input[0] = CONVERT_MOTIFS.out.converted - input[1] = Channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } + input[1] = channel.from('RUNX1', 'TFAP2A', 'Arnt').collectFile(newLine: true).map { file -> [[id: 'test'], file] } input[2] = true """ } diff --git a/nextflow.config b/nextflow.config index 503283e2..c2fdfb69 100644 --- a/nextflow.config +++ b/nextflow.config @@ -64,13 +64,15 @@ params { email_on_fail = null plaintext_email = false monochrome_logs = false - hook_url = null + hook_url = System.getenv('HOOK_URL') help = false help_full = false show_hidden = false version = false pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/' - trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')// Config options + trace_report_suffix = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss') + + // Config options config_profile_name = null config_profile_description = null @@ -123,7 +125,18 @@ profiles { apptainer.enabled = false docker.runOptions = '-u $(id -u):$(id -g) --network host' } - arm { + arm64 { + process.arch = 'arm64' + // TODO https://github.com/nf-core/modules/issues/6694 + // For now if you're using arm64 you have to use wave for the sake of the maintainers + // wave profile + apptainer.ociAutoPull = true + singularity.ociAutoPull = true + wave.enabled = true + wave.freeze = true + wave.strategy = 'conda,container' + } + emulate_amd64 { docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { @@ -180,18 +193,6 @@ profiles { wave.freeze = true wave.strategy = 'conda,container' } - gitpod { - executor.name = 'local' - executor.cpus = 4 - executor.memory = 8.GB - process { - resourceLimits = [ - memory: 8.GB, - cpus : 4, - time : 1.h - ] - } - } gpu { docker.runOptions = '-u $(id -u):$(id -g) --gpus all' apptainer.runOptions = '--nv' @@ -296,46 +297,19 @@ manifest { description = """Bioinformatics pipeline that makes use of expression and open chromatin data to identify differentially active transcription factors across conditions.""" mainScript = 'main.nf' defaultBranch = 'master' - nextflowVersion = '!>=24.10.5' + nextflowVersion = '!>=25.04.0' version = '0.0.1dev' doi = '' } // Nextflow plugins plugins { - id 'nf-schema@2.4.2' // Validation of pipeline parameters and creation of an input channel from a sample sheet + id 'nf-schema@2.5.1' // Validation of pipeline parameters and creation of an input channel from a sample sheet } validation { defaultIgnoreParams = ["genomes"] monochromeLogs = params.monochrome_logs - help { - enabled = true - command = "nextflow run nf-core/tfactivity -profile --input samplesheet.csv --outdir " - fullParameter = "help_full" - showHiddenParameter = "show_hidden" - beforeText = """ --\033[2m----------------------------------------------------\033[0m- - \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m -\033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m -\033[0;34m |\\ | |__ __ / ` / \\ |__) |__ \033[0;33m} {\033[0m -\033[0;34m | \\| | \\__, \\__/ | \\ |___ \033[0;32m\\`-._,-`-,\033[0m - \033[0;32m`._,._,\'\033[0m -\033[0;35m nf-core/tfactivity ${manifest.version}\033[0m --\033[2m----------------------------------------------------\033[0m- -""" - afterText = """${manifest.doi ? "\n* The pipeline\n" : ""}${manifest.doi.tokenize(",").collect { " https://doi.org/${it.trim().replace('https://doi.org/','')}"}.join("\n")}${manifest.doi ? "\n" : ""} -* The nf-core framework - https://doi.org/10.1038/s41587-020-0439-x - -* Software dependencies - https://github.com/nf-core/tfactivity/blob/master/CITATIONS.md -""" - } - summary { - beforeText = validation.help.beforeText - afterText = validation.help.afterText - } } // Load modules.config for DSL2 module specific options diff --git a/nextflow_schema.json b/nextflow_schema.json index c43b476b..cac58880 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -565,6 +565,18 @@ "fa_icon": "far calendar", "description": "Suffix to add to the trace report filename. Default is the date and time in the format yyyy-MM-dd_HH-mm-ss.", "hidden": true + }, + "help": { + "type": ["boolean", "string"], + "description": "Display the help message." + }, + "help_full": { + "type": "boolean", + "description": "Display the full detailed help message." + }, + "show_hidden": { + "type": "boolean", + "description": "Display hidden parameters in the help message (only works when --help or --help_full are provided)." } } } diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 94aa5283..60e8cd8c 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -93,7 +93,7 @@ }, "mentions": [ { - "@id": "#5142e5eb-6487-4bff-870f-72d5c15b870e" + "@id": "#b55260aa-41b6-4759-90f5-46e2bf50c735" } ], "name": "nf-core/tfactivity" @@ -126,7 +126,7 @@ } ], "dateCreated": "", - "dateModified": "2025-07-08T11:39:27Z", + "dateModified": "2025-11-20T09:32:30Z", "dct:conformsTo": "https://bioschemas.org/profiles/ComputationalWorkflow/1.0-RELEASE/", "keywords": [ "nf-core", @@ -170,14 +170,14 @@ "url": { "@id": "https://www.nextflow.io/" }, - "version": "!>=24.10.5" + "version": "!>=25.04.0" }, { - "@id": "#5142e5eb-6487-4bff-870f-72d5c15b870e", + "@id": "#b55260aa-41b6-4759-90f5-46e2bf50c735", "@type": "TestSuite", "instance": [ { - "@id": "#b0cf8ab4-541d-41b0-870c-4c266bc5bb9c" + "@id": "#412782bd-d602-4e3a-befc-c7604fbade27" } ], "mainEntity": { @@ -186,7 +186,7 @@ "name": "Test suite for nf-core/tfactivity" }, { - "@id": "#b0cf8ab4-541d-41b0-870c-4c266bc5bb9c", + "@id": "#412782bd-d602-4e3a-befc-c7604fbade27", "@type": "TestInstance", "name": "GitHub Actions workflow for testing nf-core/tfactivity", "resource": "repos/nf-core/tfactivity/actions/workflows/nf-test.yml", diff --git a/subworkflows/local/chromhmm/main.nf b/subworkflows/local/chromhmm/main.nf index 003b5aa1..d19e7833 100644 --- a/subworkflows/local/chromhmm/main.nf +++ b/subworkflows/local/chromhmm/main.nf @@ -14,16 +14,16 @@ workflow CHROMHMM { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_files = ch_samplesheet_bam.map{ _meta, signal, control -> [signal, control]}.flatten().filter { f -> f != null } ch_table = ch_samplesheet_bam .map { meta, signal, control -> [meta.condition, meta.assay, signal.name, control ? control.name : ''] } - .collectFile { - ["cellmarkfiletable.tsv", it.join("\t") + "\n"] + .collectFile { row -> + ["cellmarkfiletable.tsv", row.join("\t") + "\n"] } - .map { [it.baseName, it] } + .map { f -> [f.baseName, f] } .collect() // drop meta, remove duplicated control bams, add new meta diff --git a/subworkflows/local/chromhmm/tests/main.nf.test b/subworkflows/local/chromhmm/tests/main.nf.test index c069c78c..58c3d5d2 100644 --- a/subworkflows/local/chromhmm/tests/main.nf.test +++ b/subworkflows/local/chromhmm/tests/main.nf.test @@ -21,7 +21,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -60,7 +60,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -98,7 +98,7 @@ nextflow_workflow { when { workflow { """ - ch_samplesheet = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + ch_samplesheet = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } diff --git a/subworkflows/local/chromhmm/tests/main.nf.test.snap b/subworkflows/local/chromhmm/tests/main.nf.test.snap index e0be6522..603270a5 100644 --- a/subworkflows/local/chromhmm/tests/main.nf.test.snap +++ b/subworkflows/local/chromhmm/tests/main.nf.test.snap @@ -92,11 +92,11 @@ ] } ], + "timestamp": "2025-07-12T11:30:13.086062392", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.3" - }, - "timestamp": "2025-07-12T11:30:13.086062392" + } }, "Should run without failures - stub": { "content": [ @@ -191,11 +191,11 @@ ] } ], + "timestamp": "2026-03-29T15:31:47.250628769", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.2" - }, - "timestamp": "2025-06-12T14:13:38.477982915" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -290,10 +290,10 @@ ] } ], + "timestamp": "2025-07-12T11:26:25.870662295", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.3" - }, - "timestamp": "2025-07-12T11:26:25.870662295" + } } } \ No newline at end of file diff --git a/subworkflows/local/counts/main.nf b/subworkflows/local/counts/main.nf index 268d73b2..3a75bcbd 100644 --- a/subworkflows/local/counts/main.nf +++ b/subworkflows/local/counts/main.nf @@ -21,7 +21,7 @@ workflow COUNTS { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() COMBINE_COUNTS( ch_counts.map { counts -> [[id: "counts"], counts] }, @@ -58,7 +58,7 @@ workflow COUNTS { ch_versions = ch_versions.mix(PREPARE_DESIGN.out.versions) DESEQ2_DIFFERENTIAL( - Channel.value(["condition"]).combine(contrasts).map { variable, reference, target -> + channel.value(["condition"]).combine(contrasts).map { variable, reference, target -> [ [ id: reference + ":" + target, diff --git a/subworkflows/local/counts/tests/main.nf.test b/subworkflows/local/counts/tests/main.nf.test index f983047e..7435782a 100644 --- a/subworkflows/local/counts/tests/main.nf.test +++ b/subworkflows/local/counts/tests/main.nf.test @@ -24,8 +24,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) - input[3] = Channel.empty() + input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) + input[3] = channel.empty() input[4] = [ [ id: 'test'], file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_rnaseq.csv', checkIfExists: true) @@ -68,8 +68,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) - input[3] = Channel.empty() + input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/combined.csv', checkIfExists: true)) + input[3] = channel.empty() input[4] = [ [ id: 'test'], file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_rnaseq.csv', checkIfExists: true) @@ -102,8 +102,8 @@ nextflow_workflow { """ input[0] = PREPARE_GENOME.out.gene_lengths input[1] = PREPARE_GENOME.out.gene_map - input[2] = Channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/Gene_id.txt', checkIfExists: true)) - input[3] = Channel.from([ + input[2] = channel.value(file(params.pipelines_testdata_base_path + '/rna-seq/Gene_id.txt', checkIfExists: true)) + input[3] = channel.from([ [[id: 'L1-WT1'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT1-count.txt', checkIfExists: true)], [[id: 'L1-WT2'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT2-count.txt', checkIfExists: true)], [[id: 'L1-WT4'], file(params.pipelines_testdata_base_path + '/rna-seq/L1/L1_WT4-count.txt', checkIfExists: true)], diff --git a/subworkflows/local/counts/tests/main.nf.test.snap b/subworkflows/local/counts/tests/main.nf.test.snap index 6b2d2b5a..fa6ff921 100644 --- a/subworkflows/local/counts/tests/main.nf.test.snap +++ b/subworkflows/local/counts/tests/main.nf.test.snap @@ -73,11 +73,11 @@ "versions.yml:md5,f656d7b0f62076d39d078fafcb3a6d42" ] ], + "timestamp": "2025-06-18T17:40:03.097202141", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.3" - }, - "timestamp": "2025-06-18T17:40:03.097202141" + } }, "Should run with full count matrix": { "content": [ @@ -153,11 +153,11 @@ "versions.yml:md5,f656d7b0f62076d39d078fafcb3a6d42" ] ], + "timestamp": "2025-08-23T17:53:20.195275403", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-08-23T17:53:20.195275403" + } }, "Should run with full count matrix - stub": { "content": [ @@ -364,10 +364,10 @@ ] } ], + "timestamp": "2026-03-29T15:57:34.326160562", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-12T18:41:24.783849441" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } } } \ No newline at end of file diff --git a/subworkflows/local/dynamite/main.nf b/subworkflows/local/dynamite/main.nf index 27e94ba2..0b429599 100644 --- a/subworkflows/local/dynamite/main.nf +++ b/subworkflows/local/dynamite/main.nf @@ -13,7 +13,7 @@ workflow DYNAMITE { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_combined = ch_differential .map { meta, differential -> diff --git a/subworkflows/local/dynamite/tests/main.nf.test b/subworkflows/local/dynamite/tests/main.nf.test index fc88558d..ed5adbfb 100644 --- a/subworkflows/local/dynamite/tests/main.nf.test +++ b/subworkflows/local/dynamite/tests/main.nf.test @@ -11,11 +11,11 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_ratio.tsv', checkIfExists: true) ]) @@ -42,11 +42,11 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_ratio.tsv', checkIfExists: true) ]) diff --git a/subworkflows/local/dynamite/tests/main.nf.test.snap b/subworkflows/local/dynamite/tests/main.nf.test.snap index 37526cdc..26344038 100644 --- a/subworkflows/local/dynamite/tests/main.nf.test.snap +++ b/subworkflows/local/dynamite/tests/main.nf.test.snap @@ -54,11 +54,11 @@ ] } ], + "timestamp": "2026-03-29T15:37:30.038410272", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-07-05T07:51:13.086018728" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -115,10 +115,10 @@ ] } ], + "timestamp": "2025-08-23T18:08:05.857789095", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-08-23T18:08:05.857789095" + } } } \ No newline at end of file diff --git a/subworkflows/local/fimo/main.nf b/subworkflows/local/fimo/main.nf index 9e922c1d..0a8619bd 100644 --- a/subworkflows/local/fimo/main.nf +++ b/subworkflows/local/fimo/main.nf @@ -15,7 +15,7 @@ workflow FIMO { motifs_meme main: - ch_versions = Channel.empty() + ch_versions = channel.empty() FILTER_MOTIFS(tf_ranking, motifs_meme) ch_versions = ch_versions.mix(FILTER_MOTIFS.out.versions) diff --git a/subworkflows/local/fimo/tests/main.nf.test.snap b/subworkflows/local/fimo/tests/main.nf.test.snap index 74109e51..ba56bce0 100644 --- a/subworkflows/local/fimo/tests/main.nf.test.snap +++ b/subworkflows/local/fimo/tests/main.nf.test.snap @@ -76,11 +76,11 @@ ] } ], + "timestamp": "2026-03-29T15:40:07.332429474", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" - }, - "timestamp": "2025-11-13T18:36:04.422878191" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -157,10 +157,10 @@ ] } ], + "timestamp": "2025-11-13T18:35:49.650684716", "meta": { "nf-test": "0.9.2", "nextflow": "25.10.0" - }, - "timestamp": "2025-11-13T18:35:49.650684716" + } } } \ No newline at end of file diff --git a/subworkflows/local/footprinting/main.nf b/subworkflows/local/footprinting/main.nf index 0d2308c5..44b80cf9 100644 --- a/subworkflows/local/footprinting/main.nf +++ b/subworkflows/local/footprinting/main.nf @@ -7,7 +7,7 @@ workflow FOOTPRINTING { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_footprint_split = ch_peaks.branch { meta, _peaks -> footprinting: meta.footprinting diff --git a/subworkflows/local/footprinting/tests/main.nf.test b/subworkflows/local/footprinting/tests/main.nf.test index 56c0fd9e..7988ed36 100644 --- a/subworkflows/local/footprinting/tests/main.nf.test +++ b/subworkflows/local/footprinting/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -38,7 +38,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], diff --git a/subworkflows/local/footprinting/tests/main.nf.test.snap b/subworkflows/local/footprinting/tests/main.nf.test.snap index ed06596a..45501bfb 100644 --- a/subworkflows/local/footprinting/tests/main.nf.test.snap +++ b/subworkflows/local/footprinting/tests/main.nf.test.snap @@ -130,11 +130,11 @@ ] } ], + "timestamp": "2026-03-29T15:40:34.394098152", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-11T17:14:37.343621295" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -267,10 +267,10 @@ ] } ], + "timestamp": "2026-03-29T15:40:21.990967545", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-11T17:14:26.930811211" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } } } \ No newline at end of file diff --git a/subworkflows/local/merge_samples/main.nf b/subworkflows/local/merge_samples/main.nf index dddcb602..cdf2f0e0 100644 --- a/subworkflows/local/merge_samples/main.nf +++ b/subworkflows/local/merge_samples/main.nf @@ -11,7 +11,7 @@ workflow MERGE_SAMPLES { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ANNOTATE_SAMPLES(ch_peaks, [], false) ch_versions = ch_versions.mix(ANNOTATE_SAMPLES.out.versions) diff --git a/subworkflows/local/merge_samples/tests/main.nf.test b/subworkflows/local/merge_samples/tests/main.nf.test index 5918c62f..1010c3a7 100644 --- a/subworkflows/local/merge_samples/tests/main.nf.test +++ b/subworkflows/local/merge_samples/tests/main.nf.test @@ -11,7 +11,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -38,7 +38,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3'], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], diff --git a/subworkflows/local/merge_samples/tests/main.nf.test.snap b/subworkflows/local/merge_samples/tests/main.nf.test.snap index 13b1fd58..c5ff0102 100644 --- a/subworkflows/local/merge_samples/tests/main.nf.test.snap +++ b/subworkflows/local/merge_samples/tests/main.nf.test.snap @@ -154,11 +154,11 @@ ] } ], + "timestamp": "2026-03-29T15:41:18.682405753", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-11T17:23:21.357380872" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -315,10 +315,10 @@ ] } ], + "timestamp": "2026-03-29T15:40:58.13709327", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-11T17:22:58.664282183" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } } } \ No newline at end of file diff --git a/subworkflows/local/motifs/main.nf b/subworkflows/local/motifs/main.nf index 97119aae..8054828a 100644 --- a/subworkflows/local/motifs/main.nf +++ b/subworkflows/local/motifs/main.nf @@ -13,10 +13,10 @@ workflow MOTIFS { remove_duplicates main: - ch_versions = Channel.empty() + ch_versions = channel.empty() if (motifs) { - ch_motifs = Channel.value(motifs) + ch_motifs = channel.value(motifs) } else { if (taxon_id) { @@ -40,9 +40,9 @@ workflow MOTIFS { // Output warnings for removed duplicate motifs FILTER_MOTIFS.out.python_output - .splitText() { it.trim() } - .filter { it.startsWith("Removing duplicate motif with symbol") } - .subscribe { log.warn(it) } + .splitText() { line -> line.trim() } + .filter { line -> line.startsWith("Removing duplicate motif with symbol") } + .subscribe { line -> log.warn(line) } CONVERT_TO_MEME(ch_filtered, "meme") ch_versions = ch_versions.mix(CONVERT_TO_MEME.out.versions) diff --git a/subworkflows/local/motifs/tests/main.nf.test.snap b/subworkflows/local/motifs/tests/main.nf.test.snap index e1c809cd..c03cef1f 100644 --- a/subworkflows/local/motifs/tests/main.nf.test.snap +++ b/subworkflows/local/motifs/tests/main.nf.test.snap @@ -50,11 +50,11 @@ ] } ], + "timestamp": "2025-08-23T15:47:47.843784047", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-08-23T15:47:47.843784047" + } }, "Should run with input motifs (filtering duplicates) - stub": { "content": [ @@ -107,11 +107,11 @@ ] } ], + "timestamp": "2026-03-29T15:45:22.340901937", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-08-23T15:48:16.322866677" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run with taxon id": { "content": [ @@ -166,11 +166,11 @@ ] } ], + "timestamp": "2025-08-23T15:46:43.791706128", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-08-23T15:46:43.791706128" + } }, "Should run with taxon id - stub": { "content": [ @@ -225,11 +225,11 @@ ] } ], + "timestamp": "2026-03-29T15:44:05.351634571", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-12T18:30:36.511040846" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run with input motifs": { "content": [ @@ -282,11 +282,11 @@ ] } ], + "timestamp": "2025-08-23T15:45:39.25283353", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-08-23T15:45:39.25283353" + } }, "Should run with input motifs - stub": { "content": [ @@ -339,10 +339,10 @@ ] } ], + "timestamp": "2026-03-29T15:42:30.646072992", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-12T18:16:42.974358934" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } } } \ No newline at end of file diff --git a/subworkflows/local/peaks/main.nf b/subworkflows/local/peaks/main.nf index 38e5fe7b..d938954a 100644 --- a/subworkflows/local/peaks/main.nf +++ b/subworkflows/local/peaks/main.nf @@ -31,10 +31,12 @@ workflow PEAKS { chromhmm_threshold chromhmm_enhancer_marks chromhmm_promoter_marks + skip_chromhmm + skip_rose main: - ch_versions = Channel.empty() + ch_versions = channel.empty() CLEAN_BED(ch_peaks, [], false) ch_peaks = CLEAN_BED.out.output @@ -55,16 +57,16 @@ workflow PEAKS { ch_versions = ch_versions.mix(SORT_PEAKS.out.versions) } - ch_chromhmm_out = Channel.empty() - if (!params.skip_chromhmm) { + ch_chromhmm_out = channel.empty() + if (!skip_chromhmm) { CHROMHMM(ch_samplesheet_bam, chrom_sizes, chromhmm_states, chromhmm_threshold, chromhmm_enhancer_marks, chromhmm_promoter_marks) ch_chromhmm_out = ch_chromhmm_out.mix(CHROMHMM.out.enhancers.mix(CHROMHMM.out.promoters)) ch_versions = ch_versions.mix(CHROMHMM.out.versions) } - ch_rose_out = Channel.empty() - if (!params.skip_rose) { - if (params.skip_chromhmm) { + ch_rose_out = channel.empty() + if (!skip_rose) { + if (skip_chromhmm) { log.warn("Rose can only be run if chromhmm is also run. If you want to run rose, please set --skip_chromhmm to false.") } else { @@ -74,7 +76,7 @@ workflow PEAKS { } } - ch_chromhmm_rose_out = params.skip_rose ? ch_chromhmm_out : ch_rose_out + ch_chromhmm_rose_out = skip_rose ? ch_chromhmm_out : ch_rose_out ch_peaks = ch_peaks .mix(ch_chromhmm_rose_out) @@ -129,9 +131,9 @@ workflow PEAKS { // Output warnings for merged duplicate motifs AGGREGATE_SYNONYMS.out.python_output - .splitText() { it.trim() } - .filter { it.startsWith("Merging duplicate motif in") } - .subscribe { log.warn(it) } + .splitText() { line -> line.trim() } + .filter { line -> line.startsWith("Merging duplicate motif in") } + .subscribe { line -> log.warn(line) } ch_affinities_spread = AGGREGATE_SYNONYMS.out.affinities.map { meta, affinities -> [meta.condition, meta.assay, affinities] } diff --git a/subworkflows/local/peaks/tests/main.nf.test b/subworkflows/local/peaks/tests/main.nf.test index 2b2436f5..7e2ba30b 100644 --- a/subworkflows/local/peaks/tests/main.nf.test +++ b/subworkflows/local/peaks/tests/main.nf.test @@ -35,7 +35,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -45,10 +45,10 @@ nextflow_workflow { ]) input[1] = PREPARE_GENOME.out.fasta input[2] = PREPARE_GENOME.out.gtf - input[3] = Channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) + input[3] = channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) input[4] = MOTIFS.out.psem input[5] = true // merge_samples - input[6] = Channel.from([ + input[6] = channel.from([ ['L1', 'L10'], ['L1', 'p6'], ['L10', 'p6'] @@ -56,7 +56,7 @@ nextflow_workflow { input[7] = PREPARE_GENOME.out.gene_map input[8] = 'max' // Duplicate aggregation method input[9] = true // merge_duplicate_motifs - input[10] = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + input[10] = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -76,6 +76,8 @@ nextflow_workflow { input[13] = 0.75 // chromhmm_threshold input[14] = ["H3K27ac"] // chromhmm_enhancer_marks input[15] = ["H3K4me3"] // chromhmm_promoter_marks + input[16] = false // skip_chromhmm + input[17] = false // skip_rose """ } } @@ -95,7 +97,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.from([ + input[0] = channel.from([ [[id: 'L1_H3K27ac_R1', condition: 'L1', assay: 'H3K27ac', footprinting: true, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R1_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K27ac_R3', condition: 'L1', assay: 'H3K27ac', footprinting: false, include_original: true, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K27ac/WT_L1_H3K27ac_R3_peaks.broadPeak', checkIfExists: true)], [[id: 'L1_H3K4me3_R2', condition: 'L1', assay: 'H3K4me3', footprinting: true, include_original: false, max_peak_gap: 500], file(params.pipelines_testdata_base_path + '/peaks/L1/H3K4me3/WT_L1_H3K4me3_R2_peaks.broadPeak', checkIfExists: true)], @@ -105,10 +107,10 @@ nextflow_workflow { ]) input[1] = PREPARE_GENOME.out.fasta input[2] = PREPARE_GENOME.out.gtf - input[3] = Channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) + input[3] = channel.value(file('https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/blacklists/mm10-blacklist.bed', checkIfExists: true)) input[4] = MOTIFS.out.psem input[5] = true // merge_samples - input[6] = Channel.from([ + input[6] = channel.from([ ['L1', 'L10'], ['L1', 'p6'], ['L10', 'p6'] @@ -116,7 +118,7 @@ nextflow_workflow { input[7] = PREPARE_GENOME.out.gene_map input[8] = 'max' // Duplicate aggregation method input[9] = true // merge_duplicate_motifs - input[10] = Channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) + input[10] = channel.of(file(params.pipelines_testdata_base_path + '/samplesheet/samplesheet_bam.csv', checkIfExists: true).text) .splitCsv(header: true, sep: ',') .filter { row -> row.condition == "L10" || row.condition == "p6" } .filter { row -> row.assay.startsWith("H3") } @@ -136,6 +138,8 @@ nextflow_workflow { input[13] = 0.75 // chromhmm_threshold input[14] = ["H3K27ac"] // chromhmm_enhancer_marks input[15] = ["H3K4me3"] // chromhmm_promoter_marks + input[16] = false // skip_chromhmm + input[17] = false // skip_rose """ } } diff --git a/subworkflows/local/peaks/tests/main.nf.test.snap b/subworkflows/local/peaks/tests/main.nf.test.snap index e625781b..12cc0d8b 100644 --- a/subworkflows/local/peaks/tests/main.nf.test.snap +++ b/subworkflows/local/peaks/tests/main.nf.test.snap @@ -820,11 +820,11 @@ ] } ], + "timestamp": "2026-03-29T15:48:54.836713331", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T14:03:10.954278196" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -1735,10 +1735,10 @@ ] } ], + "timestamp": "2025-09-16T13:51:32.092854556", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T13:51:32.092854556" + } } } \ No newline at end of file diff --git a/subworkflows/local/prepare_genome/main.nf b/subworkflows/local/prepare_genome/main.nf index f80d650b..90db0777 100644 --- a/subworkflows/local/prepare_genome/main.nf +++ b/subworkflows/local/prepare_genome/main.nf @@ -11,10 +11,10 @@ workflow PREPARE_GENOME { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() - ch_fasta = Channel.value([[id: 'fasta'], fasta]) - ch_gtf = Channel.value([[id: 'gtf'], gtf]) + ch_fasta = channel.value([[id: 'fasta'], fasta]) + ch_gtf = channel.value([[id: 'gtf'], gtf]) if (fasta.extension == 'gz') { GUNZIP_FASTA(ch_fasta) diff --git a/subworkflows/local/prepare_genome/tests/main.nf.test.snap b/subworkflows/local/prepare_genome/tests/main.nf.test.snap index 9ebdb7a4..11f81d51 100644 --- a/subworkflows/local/prepare_genome/tests/main.nf.test.snap +++ b/subworkflows/local/prepare_genome/tests/main.nf.test.snap @@ -94,11 +94,11 @@ ] } ], + "timestamp": "2026-03-29T15:49:21.737235612", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T13:51:42.992907734" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -195,10 +195,10 @@ ] } ], + "timestamp": "2025-09-16T13:51:30.140115616", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T13:51:30.140115616" + } } } \ No newline at end of file diff --git a/subworkflows/local/ranking/main.nf b/subworkflows/local/ranking/main.nf index 05e96cfc..cc0b6508 100644 --- a/subworkflows/local/ranking/main.nf +++ b/subworkflows/local/ranking/main.nf @@ -15,7 +15,7 @@ workflow RANKING { main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_combined = ch_differential .map { meta, differential -> diff --git a/subworkflows/local/ranking/tests/main.nf.test b/subworkflows/local/ranking/tests/main.nf.test index 7f9873ee..f318f9ad 100644 --- a/subworkflows/local/ranking/tests/main.nf.test +++ b/subworkflows/local/ranking/tests/main.nf.test @@ -9,15 +9,15 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_sum.tsv', checkIfExists: true) ]) - input[2] = Channel.value([ + input[2] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/dynamite/L1:L10_chromHMM_promoters.filtered.tsv', checkIfExists: true) ]) @@ -41,15 +41,15 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.value([ + input[0] = channel.value([ [id: "test", condition1: "L1", condition2: "L10"], file(params.pipelines_testdata_base_path + '/intermediates/deseq2/L1:L10.deseq2.results.tsv', checkIfExists: true) ]) - input[1] = Channel.value([ + input[1] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/stare/L1:L10_chromHMM_promoters_sum.tsv', checkIfExists: true) ]) - input[2] = Channel.value([ + input[2] = channel.value([ [id: "test", condition1: "L1", condition2: "L10", assay: "chromHMM_promoters"], file(params.pipelines_testdata_base_path + '/intermediates/dynamite/L1:L10_chromHMM_promoters.filtered.tsv', checkIfExists: true) ]) diff --git a/subworkflows/local/ranking/tests/main.nf.test.snap b/subworkflows/local/ranking/tests/main.nf.test.snap index d31122e2..9c403b23 100644 --- a/subworkflows/local/ranking/tests/main.nf.test.snap +++ b/subworkflows/local/ranking/tests/main.nf.test.snap @@ -68,11 +68,11 @@ ] } ], + "timestamp": "2026-03-29T15:50:37.85265948", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.3" - }, - "timestamp": "2025-06-12T18:38:42.402751662" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -143,10 +143,10 @@ ] } ], + "timestamp": "2025-08-23T16:07:35.851684117", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-08-23T16:07:35.851684117" + } } } \ No newline at end of file diff --git a/subworkflows/local/report/main.nf b/subworkflows/local/report/main.nf index 7bd06e50..0bcd1f01 100644 --- a/subworkflows/local/report/main.nf +++ b/subworkflows/local/report/main.nf @@ -25,6 +25,7 @@ workflow REPORT { regression_coefficients fimo_binding_sites ch_versions + outdir main: UNTAR([[id: 'report'], file("https://github.com/daisybio/nfcore-tfactivity-report/archive/refs/tags/v0.5.0.tar.gz", checkIfExists: true)]) @@ -35,7 +36,7 @@ workflow REPORT { // softwareVersionsToYAML(ch_versions) .collectFile( - storeDir: "${params.outdir}/pipeline_info", + storeDir: "${outdir}/pipeline_info", name: 'nf_core_tfactivity_software_versions.yml', sort: true, newLine: true, @@ -46,8 +47,8 @@ workflow REPORT { workflow, parameters_schema: "nextflow_schema.json" ) - ch_workflow_summary = Channel.value(paramsSummaryToYAML(summary_params)) - ch_methods_description = Channel.value(methodsDescriptionText()) + ch_workflow_summary = channel.value(paramsSummaryToYAML(summary_params)) + ch_methods_description = channel.value(methodsDescriptionText()) PREPROCESS( gtf, diff --git a/subworkflows/local/rose/main.nf b/subworkflows/local/rose/main.nf index 20f28962..8748ba3d 100644 --- a/subworkflows/local/rose/main.nf +++ b/subworkflows/local/rose/main.nf @@ -18,7 +18,7 @@ workflow ROSE { chrom_sizes main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // Convert GTF to BED format and collapse regions to a single base pair at their start positions FILTER_CONVERT_GTF(ch_gtf, [], false) @@ -44,7 +44,7 @@ workflow ROSE { promoters: meta.assay.contains('promoters') } - ch_filter_predictions = Channel.empty() + ch_filter_predictions = channel.empty() .mix( predicted_regions.enhancers.combine(CONSTRUCT_TSS.out.bed), predicted_regions.promoters.combine(INVERT_TSS.out.bed), diff --git a/subworkflows/local/rose/tests/main.nf.test b/subworkflows/local/rose/tests/main.nf.test index 382a0d38..a3f156fe 100644 --- a/subworkflows/local/rose/tests/main.nf.test +++ b/subworkflows/local/rose/tests/main.nf.test @@ -23,7 +23,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.of( + input[0] = channel.of( [ [id: 'p6_chromHMM_enhancers', condition: 'p6', assay: 'chromHMM_enhancers'], file(params.pipelines_testdata_base_path + '/intermediates/chromHMM/enhancer/p6.bed', checkIfExists: true) @@ -62,7 +62,7 @@ nextflow_workflow { when { workflow { """ - input[0] = Channel.of( + input[0] = channel.of( [ [id: 'p6_chromHMM_enhancers', condition: 'p6', assay: 'chromHMM_enhancers'], file(params.pipelines_testdata_base_path + '/intermediates/chromHMM/enhancer/p6.bed', checkIfExists: true) diff --git a/subworkflows/local/rose/tests/main.nf.test.snap b/subworkflows/local/rose/tests/main.nf.test.snap index 7fdeef7e..69ed9345 100644 --- a/subworkflows/local/rose/tests/main.nf.test.snap +++ b/subworkflows/local/rose/tests/main.nf.test.snap @@ -142,11 +142,11 @@ ] } ], + "timestamp": "2026-03-29T15:51:27.596527569", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T14:01:31.31734929" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -291,10 +291,10 @@ ] } ], + "timestamp": "2025-09-16T13:52:39.4586363", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T13:52:39.4586363" + } } } \ No newline at end of file diff --git a/subworkflows/local/sneep/main.nf b/subworkflows/local/sneep/main.nf index 65ce0f66..45e70ce4 100644 --- a/subworkflows/local/sneep/main.nf +++ b/subworkflows/local/sneep/main.nf @@ -14,7 +14,7 @@ workflow SNEEP { motif_regions main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // Filter transfac and scale file for motifs found with FIMO FILTER_SCALES_MOTIFS( diff --git a/subworkflows/local/sneep/tests/main.nf.test b/subworkflows/local/sneep/tests/main.nf.test index 05ef3ce3..b888242f 100644 --- a/subworkflows/local/sneep/tests/main.nf.test +++ b/subworkflows/local/sneep/tests/main.nf.test @@ -27,7 +27,7 @@ nextflow_workflow { input[1] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_scale_mouse_218.txt", checkIfExists: true) input[2] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_transfac_mouse_218.txt", checkIfExists: true) input[3] = PREPARE_GENOME.out.fasta - input[4] = Channel.value([ + input[4] = channel.value([ [ id: 'test' ], file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_promoters.gff', checkIfExists: true) ]) @@ -69,7 +69,7 @@ nextflow_workflow { input[1] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_scale_mouse_218.txt", checkIfExists: true) input[2] = file("https://github.com/nf-core/tfactivity/raw/refs/heads/dev/assets/sneep_transfac_mouse_218.txt", checkIfExists: true) input[3] = PREPARE_GENOME.out.fasta - input[4] = Channel.value([ + input[4] = channel.value([ [ id: 'test' ], file(params.pipelines_testdata_base_path + '/intermediates/fimo/L1_chromHMM_promoters.gff', checkIfExists: true) ]) diff --git a/subworkflows/local/sneep/tests/main.nf.test.snap b/subworkflows/local/sneep/tests/main.nf.test.snap index 8e0f3711..ca6be460 100644 --- a/subworkflows/local/sneep/tests/main.nf.test.snap +++ b/subworkflows/local/sneep/tests/main.nf.test.snap @@ -96,11 +96,11 @@ ] } ], + "timestamp": "2026-03-29T15:52:12.805706803", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T13:50:33.888114869" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } }, "Should run without failures": { "content": [ @@ -145,10 +145,10 @@ "versions.yml:md5,ee8df3b82d17ea9e3beafb1138385ef1" ] ], + "timestamp": "2025-09-16T13:50:16.012361748", "meta": { "nf-test": "0.9.2", "nextflow": "25.04.6" - }, - "timestamp": "2025-09-16T13:50:16.012361748" + } } } \ No newline at end of file diff --git a/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf b/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf index 24737424..eb0e72c7 100644 --- a/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf +++ b/subworkflows/local/utils_nfcore_tfactivity_pipeline/main.nf @@ -11,9 +11,9 @@ include { UTILS_NFSCHEMA_PLUGIN } from '../../nf-core/utils_nfschema_plugin' include { paramsSummaryMap } from 'plugin/nf-schema' include { samplesheetToList } from 'plugin/nf-schema' +include { paramsHelp } from 'plugin/nf-schema' include { completionEmail } from '../../nf-core/utils_nfcore_pipeline' include { completionSummary } from '../../nf-core/utils_nfcore_pipeline' -include { imNotification } from '../../nf-core/utils_nfcore_pipeline' include { UTILS_NFCORE_PIPELINE } from '../../nf-core/utils_nfcore_pipeline' include { UTILS_NEXTFLOW_PIPELINE } from '../../nf-core/utils_nextflow_pipeline' @@ -28,14 +28,18 @@ workflow PIPELINE_INITIALISATION { take: version // boolean: Display version and exit validate_params // boolean: Boolean whether to validate parameters against the schema at runtime - monochrome_logs // boolean: Do not use coloured log outputs nextflow_cli_args // array: List of positional nextflow CLI args outdir // string: The output directory where the results will be saved + help // boolean: Display help message and exit + help_full // boolean: Show the full help message + show_hidden // boolean: Show hidden parameters in the help message input // string: Path to input samplesheet + input_bam // string: Path to BAM samplesheet (optional) + counts_design // string: Path to counts design file main: - ch_versions = Channel.empty() + ch_versions = channel.empty() // // Print version and exit if required and dump pipeline parameters to JSON file @@ -50,10 +54,35 @@ workflow PIPELINE_INITIALISATION { // // Validate parameters and generate parameter summary to stdout // + before_text = """ +-\033[2m----------------------------------------------------\033[0m- + \033[0;32m,--.\033[0;30m/\033[0;32m,-.\033[0m +\033[0;34m ___ __ __ __ ___ \033[0;32m/,-._.--~\'\033[0m +\033[0;34m |\\ | |__ __ / ` / \\ |__) |__ \033[0;33m} {\033[0m +\033[0;34m | \\| | \\__, \\__/ | \\ |___ \033[0;32m\\`-._,-`-,\033[0m + \033[0;32m`._,._,\'\033[0m +\033[0;35m nf-core/tfactivity ${workflow.manifest.version}\033[0m +-\033[2m----------------------------------------------------\033[0m- +""" + after_text = """${workflow.manifest.doi ? "\n* The pipeline\n" : ""}${workflow.manifest.doi.tokenize(",").collect { doi -> " https://doi.org/${doi.trim().replace('https://doi.org/','')}"}.join("\n")}${workflow.manifest.doi ? "\n" : ""} +* The nf-core framework + https://doi.org/10.1038/s41587-020-0439-x + +* Software dependencies + https://github.com/nf-core/tfactivity/blob/master/CITATIONS.md +""" + command = "nextflow run ${workflow.manifest.name} -profile --input samplesheet.csv --outdir " + UTILS_NFSCHEMA_PLUGIN ( workflow, validate_params, - null + null, + help, + help_full, + show_hidden, + before_text, + after_text, + command ) // @@ -72,15 +101,17 @@ workflow PIPELINE_INITIALISATION { // Create channel from input file provided through params.input // - Channel - .fromList(samplesheetToList(params.input, "${projectDir}/assets/schema_input.json")) - .map { - validateInputSamplesheet(it) - } - .set { ch_samplesheet } + ch_samplesheet = (input && input instanceof String) + ? channel.fromList(samplesheetToList(input, "${projectDir}/assets/schema_input.json")) + .map { sample -> validateInputSamplesheet(sample) } + : channel.empty() - ch_samplesheet_bam = params.input_bam ? Channel.fromList(samplesheetToList(params.input_bam, "${projectDir}/assets/schema_input_bam.json")) : Channel.empty() - ch_counts_design = Channel.fromList(samplesheetToList(params.counts_design, "${projectDir}/assets/schema_counts_design.json")) + ch_samplesheet_bam = (input_bam && input_bam instanceof String) + ? channel.fromList(samplesheetToList(input_bam, "${projectDir}/assets/schema_input_bam.json")) + : channel.empty() + ch_counts_design = (counts_design && counts_design instanceof String) + ? channel.fromList(samplesheetToList(counts_design, "${projectDir}/assets/schema_counts_design.json")) + : channel.empty() emit: samplesheet = ch_samplesheet @@ -125,9 +156,6 @@ workflow PIPELINE_COMPLETION { } completionSummary(monochrome_logs) - if (hook_url) { - imNotification(summary_params, hook_url) - } } workflow.onError { @@ -221,7 +249,7 @@ def toolBibliographyText() { "
  • Rauluseviciute I, Riudavets-Puig R, Blanc-Mathieu R, et al. JASPAR 2024: 20th anniversary of the open-access database of transcription factor binding profiles. Nucleic Acids Res. 2024;52(D1):D174–D182. doi:10.1093/nar/gkad1059.
  • ", "
  • Tremblay BJ. universalmotif: An R package for biological motif analysis. Journal of Open Source Software. 2024;9(100):7012. doi:10.21105/joss.07012.
  • ", (params.skip_sneep ? "" : "
  • Baumgarten N, Ebert P, Schmidt F, Kern F, Schulz MH. A statistical approach for identifying single nucleotide variants that affect transcription factor binding (SNEEP). iScience. 2024;27(5):109765. doi:10.1016/j.isci.2024.109765.
  • ") - ].findAll { it } + ].findAll { ref -> ref } def reference_text = references.join(' ').trim() diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml b/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml deleted file mode 100644 index f8476112..00000000 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/utils_nextflow_pipeline: - - subworkflows/nf-core/utils_nextflow_pipeline/** diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index bfd25876..bf568a08 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -98,7 +98,7 @@ def workflowVersionToYAML() { // Get channel of software versions used in pipeline in YAML format // def softwareVersionsToYAML(ch_versions) { - return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(Channel.of(workflowVersionToYAML())) + return ch_versions.unique().map { version -> processVersionsFromYAML(version) }.unique().mix(channel.of(workflowVersionToYAML())) } // @@ -353,67 +353,3 @@ def completionSummary(monochrome_logs=true) { log.info("-${colors.purple}[${workflow.manifest.name}]${colors.red} Pipeline completed with errors${colors.reset}-") } } - -// -// Construct and send a notification to a web server as JSON e.g. Microsoft Teams and Slack -// -def imNotification(summary_params, hook_url) { - def summary = [:] - summary_params - .keySet() - .sort() - .each { group -> - summary << summary_params[group] - } - - def misc_fields = [:] - misc_fields['start'] = workflow.start - misc_fields['complete'] = workflow.complete - misc_fields['scriptfile'] = workflow.scriptFile - misc_fields['scriptid'] = workflow.scriptId - if (workflow.repository) { - misc_fields['repository'] = workflow.repository - } - if (workflow.commitId) { - misc_fields['commitid'] = workflow.commitId - } - if (workflow.revision) { - misc_fields['revision'] = workflow.revision - } - misc_fields['nxf_version'] = workflow.nextflow.version - misc_fields['nxf_build'] = workflow.nextflow.build - misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp - - def msg_fields = [:] - msg_fields['version'] = getWorkflowVersion() - msg_fields['runName'] = workflow.runName - msg_fields['success'] = workflow.success - msg_fields['dateComplete'] = workflow.complete - msg_fields['duration'] = workflow.duration - msg_fields['exitStatus'] = workflow.exitStatus - msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None') - msg_fields['errorReport'] = (workflow.errorReport ?: 'None') - msg_fields['commandLine'] = workflow.commandLine.replaceFirst(/ +--hook_url +[^ ]+/, "") - msg_fields['projectDir'] = workflow.projectDir - msg_fields['summary'] = summary << misc_fields - - // Render the JSON template - def engine = new groovy.text.GStringTemplateEngine() - // Different JSON depending on the service provider - // Defaults to "Adaptive Cards" (https://adaptivecards.io), except Slack which has its own format - def json_path = hook_url.contains("hooks.slack.com") ? "slackreport.json" : "adaptivecard.json" - def hf = new File("${workflow.projectDir}/assets/${json_path}") - def json_template = engine.createTemplate(hf).make(msg_fields) - def json_message = json_template.toString() - - // POST - def post = new URL(hook_url).openConnection() - post.setRequestMethod("POST") - post.setDoOutput(true) - post.setRequestProperty("Content-Type", "application/json") - post.getOutputStream().write(json_message.getBytes("UTF-8")) - def postRC = post.getResponseCode() - if (!postRC.equals(200)) { - log.warn(post.getErrorStream().getText()) - } -} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test similarity index 100% rename from subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test rename to subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test.snap similarity index 100% rename from subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap rename to subworkflows/nf-core/utils_nfcore_pipeline/tests/main.nf.test.snap diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml b/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml deleted file mode 100644 index ac8523c9..00000000 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -subworkflows/utils_nfcore_pipeline: - - subworkflows/nf-core/utils_nfcore_pipeline/** diff --git a/subworkflows/nf-core/utils_nfschema_plugin/main.nf b/subworkflows/nf-core/utils_nfschema_plugin/main.nf index 4994303e..1df8b76f 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfschema_plugin/main.nf @@ -4,6 +4,7 @@ include { paramsSummaryLog } from 'plugin/nf-schema' include { validateParameters } from 'plugin/nf-schema' +include { paramsHelp } from 'plugin/nf-schema' workflow UTILS_NFSCHEMA_PLUGIN { @@ -15,32 +16,58 @@ workflow UTILS_NFSCHEMA_PLUGIN { // when this input is empty it will automatically use the configured schema or // "${projectDir}/nextflow_schema.json" as default. This input should not be empty // for meta pipelines + help // boolean: show help message + help_full // boolean: show full help message + show_hidden // boolean: show hidden parameters in help message + before_text // string: text to show before the help message and parameters summary + after_text // string: text to show after the help message and parameters summary + command // string: an example command of the pipeline main: + if(help || help_full) { + help_options = [ + beforeText: before_text, + afterText: after_text, + command: command, + showHidden: show_hidden, + fullHelp: help_full, + ] + if(parameters_schema) { + help_options << [parametersSchema: parameters_schema] + } + log.info paramsHelp( + help_options, + (params.help instanceof String && params.help != "true") ? params.help : "", + ) + exit 0 + } + // // Print parameter summary to stdout. This will display the parameters // that differ from the default given in the JSON schema // + + summary_options = [:] if(parameters_schema) { - log.info paramsSummaryLog(input_workflow, parameters_schema:parameters_schema) - } else { - log.info paramsSummaryLog(input_workflow) + summary_options << [parametersSchema: parameters_schema] } + log.info before_text + log.info paramsSummaryLog(summary_options, input_workflow) + log.info after_text // // Validate the parameters using nextflow_schema.json or the schema // given via the validation.parametersSchema configuration option // if(validate_params) { + validateOptions = [:] if(parameters_schema) { - validateParameters(parameters_schema:parameters_schema) - } else { - validateParameters() + validateOptions << [parametersSchema: parameters_schema] } + validateParameters(validateOptions) } emit: dummy_emit = true } - diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test index 8fb30164..c977917a 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/main.nf.test @@ -25,6 +25,12 @@ nextflow_workflow { input[0] = workflow input[1] = validate_params input[2] = "" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" """ } } @@ -51,6 +57,12 @@ nextflow_workflow { input[0] = workflow input[1] = validate_params input[2] = "" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" """ } } @@ -77,6 +89,12 @@ nextflow_workflow { input[0] = workflow input[1] = validate_params input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" """ } } @@ -103,6 +121,12 @@ nextflow_workflow { input[0] = workflow input[1] = validate_params input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + input[3] = false + input[4] = false + input[5] = false + input[6] = "" + input[7] = "" + input[8] = "" """ } } @@ -114,4 +138,36 @@ nextflow_workflow { ) } } + + test("Should create a help message") { + + when { + + params { + test_data = '' + outdir = null + } + + workflow { + """ + validate_params = true + input[0] = workflow + input[1] = validate_params + input[2] = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" + input[3] = true + input[4] = false + input[5] = false + input[6] = "Before" + input[7] = "After" + input[8] = "nextflow run test/test" + """ + } + } + + then { + assertAll( + { assert workflow.success } + ) + } + } } diff --git a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config index 09ef842a..f6537cc3 100644 --- a/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow.config @@ -1,8 +1,8 @@ plugins { - id "nf-schema@2.4.2" + id "nf-schema@2.6.1" } validation { parametersSchema = "${projectDir}/subworkflows/nf-core/utils_nfschema_plugin/tests/nextflow_schema.json" monochromeLogs = true -} \ No newline at end of file +} diff --git a/tests/default.nf.test b/tests/default.nf.test index 7d374ba4..c41b89f7 100644 --- a/tests/default.nf.test +++ b/tests/default.nf.test @@ -20,8 +20,6 @@ nextflow_pipeline { assertAll( { assert workflow.success}, { assert snapshot( - // Number of successful tasks - workflow.trace.succeeded().size(), // pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions removeNextflowVersion("$outputDir/pipeline_info/nf_core_tfactivity_software_versions.yml"), // All stable path name, with a relative path diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index d52d72ae..c6ffe364 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -3987,15 +3987,14 @@ "filtered_p6_H3K4me3.bed:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "timestamp": "2025-11-13T19:36:12.666238946", "meta": { "nf-test": "0.9.2", "nextflow": "25.10.0" - }, - "timestamp": "2025-11-13T19:36:12.666238946" + } }, "Should run with both bed and bam input": { "content": [ - 407, { "AFFINITY_MEAN": { "numpy": "2.2.6", @@ -10142,10 +10141,10 @@ "filtered_p6_chromHMM_promoters.bed:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "timestamp": "2026-03-29T16:58:46.963683478", "meta": { - "nf-test": "0.9.2", - "nextflow": "25.10.0" - }, - "timestamp": "2025-11-13T19:32:43.987079271" + "nf-test": "0.9.4", + "nextflow": "25.10.2" + } } } \ No newline at end of file diff --git a/workflows/tfactivity.nf b/workflows/tfactivity.nf index 41088c29..5fd24bcc 100644 --- a/workflows/tfactivity.nf +++ b/workflows/tfactivity.nf @@ -13,6 +13,7 @@ include { RANKING } from '../subworkflows/local/ranking' include { FIMO } from '../subworkflows/local/fimo' include { SNEEP } from '../subworkflows/local/sneep' include { REPORT } from '../subworkflows/local/report' +include { softwareVersionsToYAML } from '../subworkflows/nf-core/utils_nfcore_pipeline' /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -56,10 +57,15 @@ workflow TFACTIVITY { alpha snps ch_versions + skip_fimo + skip_sneep + skip_chromhmm + skip_rose + outdir main: - ch_versions = Channel.empty() + ch_versions = channel.empty() ch_conditions = ch_samplesheet .map { meta, _peak_file -> meta.condition } @@ -111,6 +117,8 @@ workflow TFACTIVITY { chromhmm_threshold, chromhmm_enhancer_marks, chromhmm_promoter_marks, + skip_chromhmm, + skip_rose, ) ch_versions = ch_versions.mix(PEAKS.out.versions) @@ -133,9 +141,9 @@ workflow TFACTIVITY { ) ch_versions = ch_versions.mix(RANKING.out.versions) - ch_fimo_binding_sites = Channel.empty() + ch_fimo_binding_sites = channel.empty() - if (!params.skip_fimo) { + if (!skip_fimo) { if (duplicate_motifs == "merge") { error "Fimo can only be run if duplicate motifs are not merged. Please set --skip_fimo true or --duplicate_motifs [remove|keep]." } @@ -150,7 +158,7 @@ workflow TFACTIVITY { ch_fimo_binding_sites = FIMO.out.tsv_significant } - if (!params.skip_sneep) { + if (!skip_sneep) { if (!sneep_scale_file) { error("In order to run sneep, please provide a sneep scale file (--sneep_scale_file). If you set --genome to either hg38 or mm10, the sneep scale file will be automatically downloaded.") } @@ -163,7 +171,7 @@ workflow TFACTIVITY { error("In order to run sneep, please provide a snps file (--snps). If you set --genome to either hg38 or mm10, the snps file will be automatically downloaded.") } - if (params.skip_fimo) { + if (skip_fimo) { error "Sneep can only be run if fimo is also run. If you want to run sneep, please set --skip_fimo to false." } @@ -177,6 +185,36 @@ workflow TFACTIVITY { ch_versions = ch_versions.mix(SNEEP.out.versions) } + // + // Collate and save software versions + // + def topic_versions = channel.topic("versions") + .distinct() + .branch { entry -> + versions_file: entry instanceof Path + versions_tuple: true + } + + def topic_versions_string = topic_versions.versions_tuple + .map { process, tool, version -> + [ process[process.lastIndexOf(':')+1..-1], " ${tool}: ${version}" ] + } + .groupTuple(by: 0) + .map { process, tool_versions -> + tool_versions.unique().sort() + "${process}:\n${tool_versions.join('\n')}" + } + + softwareVersionsToYAML(ch_versions.mix(topic_versions.versions_file)) + .mix(topic_versions_string) + .collectFile( + storeDir: "${outdir}/pipeline_info", + name: 'nf_core_' + 'tfactivity_software_' + 'versions.yml', + sort: true, + newLine: true, + ) + .set { ch_collated_versions } + REPORT( gtf, RANKING.out.tf_ranking.map { _meta, ranking -> ranking }.collect(), @@ -192,7 +230,8 @@ workflow TFACTIVITY { PEAKS.out.candidate_regions.map { _meta, candidate_regions -> candidate_regions }.collect(), DYNAMITE.out.all_coefficients.map { _meta, all_coefficients -> all_coefficients }.collect(), ch_fimo_binding_sites.map { _meta, fimo_binding_sites -> fimo_binding_sites }.collect(), - ch_versions + ch_versions.mix(ch_collated_versions), + outdir, ) emit: