diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4a9bc5c7..4ecfbfe3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint", + "python.linting.pylintPath": "/opt/conda/bin/pylint" }, // 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"], - }, - }, + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] + } + } } diff --git a/.editorconfig b/.editorconfig index b6b31907..9b990088 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,3 +22,11 @@ indent_size = unset [/assets/email*] indent_size = unset + +# ignore Readme +[README.md] +indent_style = unset + +# ignore python +[*.{py}] +indent_style = unset diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 3747c012..c2d27f86 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -19,7 +19,7 @@ jobs: # NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets - name: Post PR comment if: failure() - uses: mshick/add-pr-comment@v1 + uses: mshick/add-pr-comment@v2 with: message: | ## This PR is against the `master` branch :x: diff --git a/.github/workflows/clean-up.yml b/.github/workflows/clean-up.yml index 694e90ec..e37cfda5 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@v7 + - uses: actions/stale@v9 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 new file mode 100644 index 00000000..8a330045 --- /dev/null +++ b/.github/workflows/download_pipeline.yml @@ -0,0 +1,67 @@ +name: Test successful pipeline download with 'nf-core download' + +# Run the workflow when: +# - dispatched manually +# - when a PR is opened or reopened to master branch +# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev. +on: + workflow_dispatch: + pull_request: + types: + - opened + branches: + - master + pull_request_target: + branches: + - master + +env: + NXF_ANSI_LOG: false + +jobs: + download: + runs-on: ubuntu-latest + steps: + - name: Install Nextflow + uses: nf-core/setup-nextflow@v1 + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + architecture: "x64" + - uses: eWaterCycle/setup-singularity@v7 + with: + singularity-version: 3.8.3 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install git+https://github.com/nf-core/tools.git@dev + + - name: Get the repository name and current branch set as environment variable + run: | + echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} + echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV} + echo "REPO_BRANCH=${GITHUB_REF#refs/heads/}" >> ${GITHUB_ENV} + + - name: Download the pipeline + env: + NXF_SINGULARITY_CACHEDIR: ./ + run: | + nf-core download ${{ env.REPO_LOWERCASE }} \ + --revision ${{ env.REPO_BRANCH }} \ + --outdir ./${{ env.REPOTITLE_LOWERCASE }} \ + --compress "none" \ + --container-system 'singularity' \ + --container-library "quay.io" -l "docker.io" -l "ghcr.io" \ + --container-cache-utilisation 'amend' \ + --download-configuration + + - name: Inspect download + run: tree ./${{ env.REPOTITLE_LOWERCASE }} + + - name: Run the downloaded pipeline + env: + NXF_SINGULARITY_CACHEDIR: ./ + NXF_SINGULARITY_HOME_MOUNT: true + run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results diff --git a/.github/workflows/fix-linting.yml b/.github/workflows/fix-linting.yml index cdcfb546..18efcb70 100644 --- a/.github/workflows/fix-linting.yml +++ b/.github/workflows/fix-linting.yml @@ -4,7 +4,7 @@ on: types: [created] jobs: - deploy: + fix-linting: # Only run if comment is on a PR with the main repo, and if it contains the magic keywords if: > contains(github.event.comment.html_url, '/pull/') && @@ -13,10 +13,17 @@ jobs: runs-on: ubuntu-latest steps: # Use the @nf-core-bot token to check out so we can push later - - uses: actions/checkout@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 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 + with: + comment-id: ${{ github.event.comment.id }} + reactions: eyes + # Action runs on the issue comment, so we don't get the PR by default # Use the gh cli to check out the PR - name: Checkout Pull Request @@ -24,32 +31,59 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }} - - uses: actions/setup-node@v4 + # Install and run pre-commit + - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 + with: + python-version: 3.11 - - name: Install Prettier - run: npm install -g prettier @prettier/plugin-php + - name: Install pre-commit + run: pip install pre-commit - # Check that we actually need to fix something - - name: Run 'prettier --check' - id: prettier_status - run: | - if prettier --check ${GITHUB_WORKSPACE}; then - echo "result=pass" >> $GITHUB_OUTPUT - else - echo "result=fail" >> $GITHUB_OUTPUT - fi + - name: Run pre-commit + id: pre-commit + run: pre-commit run --all-files + continue-on-error: true - - name: Run 'prettier --write' - if: steps.prettier_status.outputs.result == 'fail' - run: prettier --write ${GITHUB_WORKSPACE} + # 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 + with: + comment-id: ${{ github.event.comment.id }} + reactions: "+1" - name: Commit & push changes - if: steps.prettier_status.outputs.result == 'fail' + id: commit-and-push + if: steps.pre-commit.outcome == 'failure' run: | git config user.email "core@nf-co.re" git config user.name "nf-core-bot" git config push.default upstream git add . git status - git commit -m "[automated] Fix linting with Prettier" + git commit -m "[automated] Fix code linting" git push + + - 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 + 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 + 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 + with: + issue-number: ${{ github.event.issue.number }} + body: | + @${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually. + See [CI log](https://github.com/nf-core/fetchngs/actions/runs/${{ github.run_id }}) for more details. diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 905c58e4..81cd098e 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -11,61 +11,22 @@ on: types: [published] jobs: - EditorConfig: + pre-commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - - - name: Install editorconfig-checker - run: npm install -g editorconfig-checker - - - name: Run ECLint check - run: editorconfig-checker -exclude README.md $(find .* -type f | grep -v '.git\|.py\|.md\|json\|yml\|yaml\|html\|css\|work\|.nextflow\|build\|nf_core.egg-info\|log.txt\|Makefile') - - Prettier: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - - - name: Install Prettier - run: npm install -g prettier - - - name: Run Prettier --check - run: prettier --check ${GITHUB_WORKSPACE} - - PythonBlack: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Check code lints with Black - uses: psf/black@stable - - # If the above check failed, post a comment on the PR explaining the failure - - name: Post PR comment - if: failure() - uses: mshick/add-pr-comment@v1 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 with: - message: | - ## Python linting (`black`) is failing - - To keep the code consistent with lots of contributors, we run automated code consistency checks. - To fix this CI test, please run: - - * Install [`black`](https://black.readthedocs.io/en/stable/): `pip install black` - * Fix formatting errors in your pipeline: `black .` - - Once you push these changes the test should pass, and you can hide this comment :+1: + python-version: 3.11 + cache: "pip" - We highly recommend setting up Black in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help! + - name: Install pre-commit + run: pip install pre-commit - Thanks again for your contribution! - repo-token: ${{ secrets.GITHUB_TOKEN }} - allow-repeats: false + - name: Run pre-commit + run: pre-commit run --all-files nf-core: runs-on: ubuntu-latest @@ -76,7 +37,7 @@ jobs: - name: Install Nextflow uses: nf-core/setup-nextflow@v1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.11" architecture: "x64" @@ -99,7 +60,7 @@ jobs: - name: Upload linting log file artifact if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: linting-logs path: | diff --git a/.github/workflows/linting_comment.yml b/.github/workflows/linting_comment.yml index 0bbcd30f..147bcd10 100644 --- a/.github/workflows/linting_comment.yml +++ b/.github/workflows/linting_comment.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download lint results - uses: dawidd6/action-download-artifact@v2 + uses: dawidd6/action-download-artifact@v3 with: workflow: linting.yml workflow_conclusion: completed diff --git a/.github/workflows/release-announcments.yml b/.github/workflows/release-announcements.yml similarity index 96% rename from .github/workflows/release-announcments.yml rename to .github/workflows/release-announcements.yml index 6ad33927..21ac3f06 100644 --- a/.github/workflows/release-announcments.yml +++ b/.github/workflows/release-announcements.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies @@ -56,7 +56,7 @@ jobs: bsky-post: runs-on: ubuntu-latest steps: - - uses: zentered/bluesky-post-action@v0.0.2 + - uses: zentered/bluesky-post-action@v0.1.0 with: post: | Pipeline release! ${{ github.repository }} v${{ github.event.release.tag_name }} - ${{ github.event.release.name }}! diff --git a/.gitpod.yml b/.gitpod.yml index acf72695..363d5b1d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -7,6 +7,7 @@ tasks: - name: unset JAVA_TOOL_OPTIONS command: | unset JAVA_TOOL_OPTIONS + vscode: extensions: # based on nf-core.nf-core-extensionpack - codezombiech.gitignore # Language support for .gitignore files diff --git a/.nf-core.yml b/.nf-core.yml index 793cb80d..707d5cd8 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -6,9 +6,6 @@ lint: - lib/NfcoreTemplate.groovy - lib/Utils.groovy - lib/WorkflowMain.groovy - - lib/nfcore_external_java_deps.jar files_unchanged: - .gitignore - - assets/email_template.html - - assets/email_template.txt - assets/sendmail_template.txt diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c31cdb9..af57081f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,10 @@ repos: - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v2.7.1" + rev: "v3.1.0" hooks: - id: prettier + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: "2.7.3" + hooks: + - id: editorconfig-checker + alias: ec diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2e0a9a..7f3dfeee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ Thank you to everyone else that has contributed by reporting bugs, enhancements - [PR #248](https://github.com/nf-core/fetchngs/pull/248) - Update pipeline level test data path to use mirror on s3 - [PR #249](https://github.com/nf-core/fetchngs/pull/249) - Update modules which includes absolute paths for test data, making module level test compatible within the pipeline. - [PR #253](https://github.com/nf-core/fetchngs/pull/253) - Add implicit tags in nf-test files for simpler testing strategy +- [PR #257](https://github.com/nf-core/fetchngs/pull/257) - Template update for nf-core/tools v2.12 - [PR #258](https://github.com/nf-core/fetchngs/pull/258) - Fixes for [PR #253](https://github.com/nf-core/fetchngs/pull/253) ### Software dependencies diff --git a/README.md b/README.md index 56ba2cb0..b9eeb029 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,9 @@

- nf-core/fetchngs logo + nf-core/fetchngs

- [![GitHub Actions CI Status](https://github.com/nf-core/fetchngs/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/fetchngs/actions?query=workflow%3A%22nf-core+CI%22) [![GitHub Actions Linting Status](https://github.com/nf-core/fetchngs/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/fetchngs/actions?query=workflow%3A%22nf-core+linting%22) [![AWS CI](https://img.shields.io/badge/CI%20tests-full%20size-FF9900?labelColor=000000&logo=Amazon%20AWS)](https://nf-co.re/fetchngs/results) diff --git a/assets/nf-core-fetchngs_logo_light.png b/assets/nf-core-fetchngs_logo_light.png index c201c150..919b9063 100644 Binary files a/assets/nf-core-fetchngs_logo_light.png and b/assets/nf-core-fetchngs_logo_light.png differ diff --git a/docs/images/nf-core-fetchngs_logo_dark.png b/docs/images/nf-core-fetchngs_logo_dark.png index e3452bf1..63ff1472 100644 Binary files a/docs/images/nf-core-fetchngs_logo_dark.png and b/docs/images/nf-core-fetchngs_logo_dark.png differ diff --git a/docs/images/nf-core-fetchngs_logo_light.png b/docs/images/nf-core-fetchngs_logo_light.png index c201c150..ffc6d41a 100644 Binary files a/docs/images/nf-core-fetchngs_logo_light.png and b/docs/images/nf-core-fetchngs_logo_light.png differ diff --git a/modules.json b/modules.json index 66aac80d..1ddaa1fb 100644 --- a/modules.json +++ b/modules.json @@ -36,17 +36,17 @@ }, "utils_nextflow_pipeline": { "branch": "master", - "git_sha": "c81784b47d44464b35e04220e00051bb5be27524", + "git_sha": "cd08c91373cd00a73255081340e4914485846ba1", "installed_by": ["subworkflows"] }, "utils_nfcore_pipeline": { "branch": "master", - "git_sha": "524ccbab145985b26eb7daa6e551af486dab2100", + "git_sha": "cd08c91373cd00a73255081340e4914485846ba1", "installed_by": ["subworkflows"] }, "utils_nfvalidation_plugin": { "branch": "master", - "git_sha": "f0f8f4dc889970251eb251b85610f7ec2eafded9", + "git_sha": "cd08c91373cd00a73255081340e4914485846ba1", "installed_by": ["subworkflows"] } } diff --git a/modules/local/multiqc_mappings_config/nextflow.config b/modules/local/multiqc_mappings_config/nextflow.config index e2382930..11c58341 100644 --- a/modules/local/multiqc_mappings_config/nextflow.config +++ b/modules/local/multiqc_mappings_config/nextflow.config @@ -6,4 +6,4 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } -} \ No newline at end of file +} diff --git a/modules/local/sra_ids_to_runinfo/nextflow.config b/modules/local/sra_ids_to_runinfo/nextflow.config index 73da969a..9b9d0b16 100644 --- a/modules/local/sra_ids_to_runinfo/nextflow.config +++ b/modules/local/sra_ids_to_runinfo/nextflow.config @@ -5,4 +5,4 @@ process { enabled: false ] } -} \ No newline at end of file +} diff --git a/modules/local/sra_runinfo_to_ftp/nextflow.config b/modules/local/sra_runinfo_to_ftp/nextflow.config index aee1848c..43263648 100644 --- a/modules/local/sra_runinfo_to_ftp/nextflow.config +++ b/modules/local/sra_runinfo_to_ftp/nextflow.config @@ -6,4 +6,4 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } -} \ No newline at end of file +} diff --git a/modules/local/synapse_get/nextflow.config b/modules/local/synapse_get/nextflow.config index 869f80aa..9c42e741 100644 --- a/modules/local/synapse_get/nextflow.config +++ b/modules/local/synapse_get/nextflow.config @@ -13,4 +13,4 @@ process { ] ] } -} \ No newline at end of file +} diff --git a/modules/local/synapse_merge_samplesheet/nextflow.config b/modules/local/synapse_merge_samplesheet/nextflow.config index 9befef9c..c94c53dd 100644 --- a/modules/local/synapse_merge_samplesheet/nextflow.config +++ b/modules/local/synapse_merge_samplesheet/nextflow.config @@ -6,4 +6,4 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } -} \ No newline at end of file +} diff --git a/modules/local/synapse_show/nextflow.config b/modules/local/synapse_show/nextflow.config index a1864dfe..5b9167b3 100644 --- a/modules/local/synapse_show/nextflow.config +++ b/modules/local/synapse_show/nextflow.config @@ -6,4 +6,4 @@ process { saveAs: { filename -> filename.equals('versions.yml') ? null : filename } ] } -} \ No newline at end of file +} diff --git a/modules/local/synapse_to_samplesheet/nextflow.config b/modules/local/synapse_to_samplesheet/nextflow.config index b286c12c..83af86b6 100644 --- a/modules/local/synapse_to_samplesheet/nextflow.config +++ b/modules/local/synapse_to_samplesheet/nextflow.config @@ -5,4 +5,4 @@ process { enabled: false ] } -} \ No newline at end of file +} diff --git a/nextflow.config b/nextflow.config index b3c65b78..ee8dfd8a 100644 --- a/nextflow.config +++ b/nextflow.config @@ -73,7 +73,7 @@ if (params.input_type == 'sra') { } // Load nf-core/fetchngs custom profiles from different institutions. -// Warning: Uncomment only if a pipeline-specific instititutional config already exists on nf-core/configs! +// Warning: Uncomment only if a pipeline-specific institutional config already exists on nf-core/configs! // try { // includeConfig "${params.custom_config_base}/pipeline/fetchngs.config" // } catch (Exception e) { @@ -94,6 +94,7 @@ profiles { podman.enabled = false shifter.enabled = false charliecloud.enabled = false + channels = ['conda-forge', 'bioconda', 'defaults'] apptainer.enabled = false } mamba { @@ -117,7 +118,7 @@ profiles { docker.runOptions = '-u $(id -u):$(id -g)' } arm { - docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' + docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64' } singularity { singularity.enabled = true diff --git a/pyproject.toml b/pyproject.toml index 0d62beb6..7d08e1c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,13 @@ -# Config file for Python. Mostly used to configure linting of bin/check_samplesheet.py with Black. +# Config file for Python. Mostly used to configure linting of bin/*.py with Ruff. # Should be kept the same as nf-core/tools to avoid fighting with template synchronisation. -[tool.black] +[tool.ruff] line-length = 120 -target_version = ["py37", "py38", "py39", "py310"] +target-version = "py38" +select = ["I", "E1", "E4", "E7", "E9", "F", "UP", "N"] +cache-dir = "~/.cache/ruff" -[tool.isort] -profile = "black" -known_first_party = ["nf_core"] -multi_line_output = 3 +[tool.ruff.isort] +known-first-party = ["nf_core"] + +[tool.ruff.per-file-ignores] +"__init__.py" = ["E402", "F401"] diff --git a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/nextflow.config b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/nextflow.config index b11c499f..de803a38 100644 --- a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/nextflow.config +++ b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/nextflow.config @@ -1,2 +1,2 @@ includeConfig '../../../modules/nf-core/sratools/prefetch/nextflow.config' -includeConfig '../../../modules/nf-core/sratools/fasterqdump/nextflow.config' \ No newline at end of file +includeConfig '../../../modules/nf-core/sratools/fasterqdump/nextflow.config' diff --git a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test index 2f1d0835..9ff65074 100644 --- a/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test +++ b/subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/tests/main.nf.test @@ -4,7 +4,7 @@ nextflow_workflow { script "../main.nf" workflow "FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS" tag "FASTQ_DOWNLOAD_PREFETCH_FASTERQDUMP_SRATOOLS" - + tag "CUSTOM_SRATOOLSNCBISETTINGS" tag "SRATOOLS_PREFETCH" tag "SRATOOLS_FASTERQDUMP" diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf index e89a57ab..ac31f28f 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nextflow_pipeline/main.nf @@ -15,10 +15,10 @@ import nextflow.extension.FilesEx workflow UTILS_NEXTFLOW_PIPELINE { take: - print_version // bool - dump_parameters // bool - outdir // path: base directory used to publish pipeline results - check_conda_channels // bool + print_version // boolean: print version + dump_parameters // boolean: dump parameters + outdir // path: base directory used to publish pipeline results + check_conda_channels // boolean: check conda channels main: @@ -43,6 +43,9 @@ workflow UTILS_NEXTFLOW_PIPELINE { if (check_conda_channels) { checkCondaChannels() } + + emit: + dummy_emit = true } /* diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml b/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml index 3d2b304f..e5c3a0a8 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml +++ b/subworkflows/nf-core/utils_nextflow_pipeline/meta.yml @@ -25,13 +25,14 @@ input: description: | Check if the conda channel priority is correct. output: - - out: + - dummy_emit: type: boolean description: | - Dummy output for making using in process chaining. + Dummy emit to make nf-core subworkflows lint happy authors: - "@adamrtalbot" - "@drpatelh" maintainers: - "@adamrtalbot" - "@drpatelh" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.functions.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test similarity index 68% rename from subworkflows/nf-core/utils_nextflow_pipeline/tests/main.functions.nf.test rename to subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test index 81f5ba45..e49d617f 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.functions.nf.test +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test @@ -4,7 +4,6 @@ nextflow_function { name "Test Functions" script "subworkflows/nf-core/utils_nextflow_pipeline/main.nf" config "subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config" - tag "UTILS_NEXTFLOW_PIPELINE" test("Test Function getWorkflowVersion") { @@ -12,13 +11,13 @@ nextflow_function { function "getWorkflowVersion" then { - assert function.success - assert snapshot(function.result).match() + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) } - } - test("Test Function dumpParametersToJSON") { function "dumpParametersToJSON" @@ -33,20 +32,21 @@ nextflow_function { } then { - assert function.success + assertAll( + { assert function.success } + ) } - } - + test("Test Function checkCondaChannels") { function "checkCondaChannels" then { - assert function.success - assert snapshot(function.result).match() + assertAll( + { assert function.success }, + { assert snapshot(function.result).match() } + ) } - } - -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.functions.nf.test.snap b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap similarity index 64% rename from subworkflows/nf-core/utils_nextflow_pipeline/tests/main.functions.nf.test.snap rename to subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap index 939dbbad..db2030f8 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.functions.nf.test.snap +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.function.nf.test.snap @@ -3,10 +3,10 @@ "content": [ "v9.9.9" ], - "timestamp": "2023-10-15T13:43:55.128868" + "timestamp": "2024-01-19T11:32:36.031083" }, "Test Function checkCondaChannels": { "content": null, - "timestamp": "2023-10-12T17:09:24.933468" + "timestamp": "2024-01-19T11:32:50.456" } } \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test index 3298fffe..b1b3a2c3 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/main.workflow.nf.test @@ -14,18 +14,24 @@ nextflow_workflow { } workflow { """ - input[0] = false - input[1] = false - input[2] = null - input[3] = false + print_version = false + dump_parameters = false + outdir = null + check_conda_channels = false + + input[0] = print_version + input[1] = dump_parameters + input[2] = outdir + input[3] = check_conda_channels """ } } then { - assert workflow.success + assertAll( + { assert workflow.success } + ) } - } test("Should print version") { @@ -36,22 +42,27 @@ nextflow_workflow { } workflow { """ - input[0] = true - input[1] = false - input[2] = null - input[3] = false + print_version = true + dump_parameters = false + outdir = null + check_conda_channels = false + + input[0] = print_version + input[1] = dump_parameters + input[2] = outdir + input[3] = check_conda_channels """ } } then { - assert workflow.success - assert workflow.stdout.contains("nextflow_workflow v9.9.9") + assertAll( + { assert workflow.success }, + { assert workflow.stdout.contains("nextflow_workflow v9.9.9") } + ) } - } - test("Should dump params") { when { @@ -60,6 +71,11 @@ nextflow_workflow { } workflow { """ + print_version = false + dump_parameters = true + outdir = params.outdir + check_conda_channels = false + input[0] = false input[1] = true input[2] = params.outdir @@ -69,9 +85,10 @@ nextflow_workflow { } then { - assert workflow.success + assertAll( + { assert workflow.success } + ) } - } test("Should not create params JSON if no output directory") { @@ -82,6 +99,11 @@ nextflow_workflow { } workflow { """ + print_version = false + dump_parameters = true + outdir = params.outdir + check_conda_channels = false + input[0] = false input[1] = true input[2] = null @@ -91,9 +113,9 @@ nextflow_workflow { } then { - assert workflow.success + assertAll( + { assert workflow.success } + ) } - } - } diff --git a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config index 53574ffe..d0a926bf 100644 --- a/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nextflow_pipeline/tests/nextflow.config @@ -6,4 +6,4 @@ manifest { nextflowVersion = '!>=23.04.0' version = '9.9.9' doi = 'https://doi.org/10.5281/zenodo.5070524' -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf index 7735ec89..2b7ec3df 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/main.nf +++ b/subworkflows/nf-core/utils_nfcore_pipeline/main.nf @@ -14,7 +14,10 @@ import nextflow.extension.FilesEx workflow UTILS_NFCORE_PIPELINE { main: - checkConfigProvided() + valid_config = checkConfigProvided() + + emit: + valid_config } /* @@ -27,6 +30,7 @@ workflow UTILS_NFCORE_PIPELINE { // Warn if a -profile or Nextflow config has not been provided to run the pipeline // def checkConfigProvided() { + valid_config = true if (workflow.profile == 'standard' && workflow.configFiles.size() <= 1) { log.warn "[$workflow.manifest.name] You are attempting to run the pipeline without any custom configuration!\n\n" + "This will be dependent on your local compute environment but can be achieved via one or more of the following:\n" + @@ -34,7 +38,9 @@ def checkConfigProvided() { " (2) Using an existing nf-core/configs for your Institution e.g. `-profile crick` or `-profile uppmax`\n" + " (3) Using your own local custom config e.g. `-c /path/to/your/custom.config`\n\n" + "Please refer to the quick start section and usage docs for the pipeline.\n " + valid_config = false } + return valid_config } // @@ -73,7 +79,7 @@ def getWorkflowVersion() { // def processVersionsFromYAML(yaml_file) { Yaml yaml = new Yaml() - versions = yaml.load(yaml_file).collectEntries { k,v -> [ k.tokenize(':')[-1], v ] } + versions = yaml.load(yaml_file).collectEntries { k, v -> [ k.tokenize(':')[-1], v ] } return yaml.dumpAsMap(versions).trim() } @@ -83,8 +89,8 @@ def processVersionsFromYAML(yaml_file) { def workflowVersionToYAML() { return """ Workflow: - $workflow.manifest.name: ${getWorkflowVersion()} - Nextflow: $workflow.nextflow.version + $workflow.manifest.name: ${getWorkflowVersion()} + Nextflow: $workflow.nextflow.version """.stripIndent().trim() } diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml index 953f7143..dd1462b2 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml +++ b/subworkflows/nf-core/utils_nfcore_pipeline/meta.yml @@ -17,3 +17,4 @@ authors: - "@adamrtalbot" maintainers: - "@adamrtalbot" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test index 6176bb55..74577b26 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test @@ -4,7 +4,6 @@ nextflow_function { name "Test Functions" script "../main.nf" config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config" - tag "UTILS_NFCORE_PIPELINE" test("Test Function checkConfigProvided") { @@ -12,12 +11,11 @@ nextflow_function { function "checkConfigProvided" then { - assertAll ( - { assert function.success }, + assertAll( + { assert function.success }, { assert snapshot(function.result).match() } ) } - } test("Test Function workflowCitation") { @@ -25,12 +23,11 @@ nextflow_function { function "workflowCitation" then { - assertAll ( - { assert function.success }, + assertAll( + { assert function.success }, { assert snapshot(function.result).match() } ) } - } test("Test Function nfCoreLogo") { @@ -46,16 +43,13 @@ nextflow_function { } then { - assertAll ( - { assert function.success }, + assertAll( + { assert function.success }, { assert snapshot(function.result).match() } ) } - } - - test("Test Function dashedLine") { function "dashedLine" @@ -69,16 +63,13 @@ nextflow_function { } then { - assertAll ( - { assert function.success }, + assertAll( + { assert function.success }, { assert snapshot(function.result).match() } ) } - } - - test("Test Function without logColours") { function "logColours" @@ -92,12 +83,11 @@ nextflow_function { } then { - assertAll ( - { assert function.success }, + assertAll( + { assert function.success }, { assert snapshot(function.result).match() } ) } - } test("Test Function with logColours") { @@ -112,10 +102,10 @@ nextflow_function { } then { - assertAll ( - { assert function.success }, + assertAll( + { assert function.success }, { assert snapshot(function.result).match() } ) } } -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap index e95e2eec..afb9ab4d 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.function.nf.test.snap @@ -1,19 +1,21 @@ { "Test Function checkConfigProvided": { - "content": null, - "timestamp": "2024-01-17T20:34:16.220739" + "content": [ + true + ], + "timestamp": "2024-01-19T11:34:13.548431224" }, "Test Function nfCoreLogo": { "content": [ "\n\n-\u001b[2m----------------------------------------------------\u001b[0m-\n \u001b[0;32m,--.\u001b[0;30m/\u001b[0;32m,-.\u001b[0m\n\u001b[0;34m ___ __ __ __ ___ \u001b[0;32m/,-._.--~'\u001b[0m\n\u001b[0;34m |\\ | |__ __ / ` / \\ |__) |__ \u001b[0;33m} {\u001b[0m\n\u001b[0;34m | \\| | \\__, \\__/ | \\ |___ \u001b[0;32m\\`-._,-`-,\u001b[0m\n \u001b[0;32m`._,._,'\u001b[0m\n\u001b[0;35m nextflow_workflow v9.9.9\u001b[0m\n-\u001b[2m----------------------------------------------------\u001b[0m-\n" ], - "timestamp": "2024-01-17T20:34:23.89764" + "timestamp": "2024-01-19T11:34:38.840454873" }, "Test Function workflowCitation": { "content": [ "If you use nextflow_workflow for your analysis please cite:\n\n* The pipeline\n https://doi.org/10.5281/zenodo.5070524\n\n* The nf-core framework\n https://doi.org/10.1038/s41587-020-0439-x\n\n* Software dependencies\n https://github.com/nextflow_workflow/blob/master/CITATIONS.md" ], - "timestamp": "2024-01-17T20:34:20.063846" + "timestamp": "2024-01-19T11:34:22.24352016" }, "Test Function without logColours": { "content": [ @@ -67,13 +69,13 @@ "biwhite": "" } ], - "timestamp": "2024-01-17T20:34:31.622874" + "timestamp": "2024-01-19T11:35:04.418416984" }, "Test Function dashedLine": { "content": [ "-\u001b[2m----------------------------------------------------\u001b[0m-" ], - "timestamp": "2024-01-17T20:34:27.729247" + "timestamp": "2024-01-19T11:34:55.420000755" }, "Test Function with logColours": { "content": [ @@ -127,6 +129,6 @@ "biwhite": "\u001b[1;97m" } ], - "timestamp": "2024-01-17T20:34:35.549447" + "timestamp": "2024-01-19T11:35:13.436366565" } } \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test index de513d78..cb7376c0 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test @@ -4,14 +4,15 @@ nextflow_workflow { script "../main.nf" config "subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config" workflow "UTILS_NFCORE_PIPELINE" - tag "UTILS_NFCORE_PIPELINE" test("Should run without failures") { + then { - assert workflow.success + assertAll( + { assert workflow.success }, + { assert snapshot(workflow.out).match() } + ) } - } - } diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap new file mode 100644 index 00000000..d07ce54c --- /dev/null +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/main.workflow.nf.test.snap @@ -0,0 +1,15 @@ +{ + "Should run without failures": { + "content": [ + { + "0": [ + true + ], + "valid_config": [ + true + ] + } + ], + "timestamp": "2024-01-19T11:35:22.538940073" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config index 53574ffe..d0a926bf 100644 --- a/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config +++ b/subworkflows/nf-core/utils_nfcore_pipeline/tests/nextflow.config @@ -6,4 +6,4 @@ manifest { nextflowVersion = '!>=23.04.0' version = '9.9.9' doi = 'https://doi.org/10.5281/zenodo.5070524' -} \ No newline at end of file +} diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf b/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf index 9ec7226f..2585b65d 100644 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/main.nf @@ -21,21 +21,21 @@ include { validateParameters } from 'plugin/nf-validation' workflow UTILS_NFVALIDATION_PLUGIN { take: - print_help // bool - workflow_command // string: default commmand used to run pipeline - pre_help_text // string: string to be printed before help text and summary log - post_help_text // string: string to be printed after help text and summary log - validate_params // bool: Validate parameters - schema_filename // path: JSON schema file, null to use default value + print_help // boolean: print help + workflow_command // string: default commmand used to run pipeline + pre_help_text // string: string to be printed before help text and summary log + post_help_text // string: string to be printed after help text and summary log + validate_params // boolean: validate parameters + schema_filename // path: JSON schema file, null to use default value main: log.debug "Using schema file: ${schema_filename}" // Default values for strings - pre_help_text = pre_help_text ?: '' - post_help_text = post_help_text ?: '' - workflow_command = workflow_command ?: '' + pre_help_text = pre_help_text ?: '' + post_help_text = post_help_text ?: '' + workflow_command = workflow_command ?: '' // // Print help message if needed @@ -56,4 +56,7 @@ workflow UTILS_NFVALIDATION_PLUGIN { if (validate_params){ validateParameters(parameters_schema: schema_filename) } + + emit: + dummy_emit = true } diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml b/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml index 1ec5f98e..3d4a6b04 100644 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/meta.yml @@ -32,7 +32,13 @@ input: type: string description: | The filename of the schema to validate against. +output: + - dummy_emit: + type: boolean + description: | + Dummy emit to make nf-core subworkflows lint happy authors: - "@adamrtalbot" maintainers: - "@adamrtalbot" + - "@maxulysse" diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test index b64a5106..b13e7e6e 100644 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test +++ b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test @@ -16,11 +16,11 @@ nextflow_workflow { workflow { """ - help = false + help = false workflow_command = null - pre_help_text = null - post_help_text = null - validate_params = false + pre_help_text = null + post_help_text = null + validate_params = false schema_filename = "$moduleTestDir/nextflow_schema.json" input[0] = help @@ -34,9 +34,10 @@ nextflow_workflow { } then { - assert workflow.success + assertAll( + { assert workflow.success } + ) } - } test("Should run help") { @@ -68,18 +69,17 @@ nextflow_workflow { } then { - assert workflow.success - assert workflow.exitStatus == 0 - assert workflow.stdout.any { it.contains('Input/output options') } - assert workflow.stdout.any { it.contains('--outdir') } - assert workflow.stdout.any { it.contains('--outdir') } + assertAll( + { assert workflow.success }, + { assert workflow.exitStatus == 0 }, + { assert workflow.stdout.any { it.contains('Input/output options') } }, + { assert workflow.stdout.any { it.contains('--outdir') } } + ) } - } test("Should run help with command") { - when { params { @@ -89,7 +89,7 @@ nextflow_workflow { workflow { """ help = true - workflow_command = "nextflow run noorg/doesntexist" + workflow_command = "nextflow run noorg/doesntexist" pre_help_text = null post_help_text = null validate_params = false @@ -106,14 +106,14 @@ nextflow_workflow { } then { - assert workflow.success - assert workflow.exitStatus == 0 - assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } - assert workflow.stdout.any { it.contains('Input/output options') } - assert workflow.stdout.any { it.contains('--outdir') } - assert workflow.stdout.any { it.contains('--outdir') } + assertAll( + { assert workflow.success }, + { assert workflow.exitStatus == 0 }, + { assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } }, + { assert workflow.stdout.any { it.contains('Input/output options') } }, + { assert workflow.stdout.any { it.contains('--outdir') } } + ) } - } test("Should run help with extra text") { @@ -128,7 +128,7 @@ nextflow_workflow { workflow { """ help = true - workflow_command = "nextflow run noorg/doesntexist" + workflow_command = "nextflow run noorg/doesntexist" pre_help_text = "pre-help-text" post_help_text = "post-help-text" validate_params = false @@ -145,21 +145,20 @@ nextflow_workflow { } then { - assert workflow.success - assert workflow.exitStatus == 0 - assert workflow.stdout.any { it.contains('pre-help-text') } - assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } - assert workflow.stdout.any { it.contains('Input/output options') } - assert workflow.stdout.any { it.contains('--outdir') } - assert workflow.stdout.any { it.contains('--outdir') } - assert workflow.stdout.any { it.contains('post-help-text') } + assertAll( + { assert workflow.success }, + { assert workflow.exitStatus == 0 }, + { assert workflow.stdout.any { it.contains('pre-help-text') } }, + { assert workflow.stdout.any { it.contains('nextflow run noorg/doesntexist') } }, + { assert workflow.stdout.any { it.contains('Input/output options') } }, + { assert workflow.stdout.any { it.contains('--outdir') } }, + { assert workflow.stdout.any { it.contains('post-help-text') } } + ) } - } test("Should validate params") { - when { params { @@ -170,7 +169,7 @@ nextflow_workflow { workflow { """ help = false - workflow_command = null + workflow_command = null pre_help_text = null post_help_text = null validate_params = true @@ -187,10 +186,10 @@ nextflow_workflow { } then { - assert workflow.failed - assert workflow.stdout.any { it.contains('ERROR ~ ERROR: Validation of pipeline parameters failed!') } + assertAll( + { assert workflow.failed }, + { assert workflow.stdout.any { it.contains('ERROR ~ ERROR: Validation of pipeline parameters failed!') } } + ) } - } - } diff --git a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test.snap b/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test.snap deleted file mode 100644 index ae33a930..00000000 --- a/subworkflows/nf-core/utils_nfvalidation_plugin/tests/main.nf.test.snap +++ /dev/null @@ -1,26 +0,0 @@ -{ - "Should run help": { - "content": [ - { - "stderr": [ - - ], - "errorReport": "", - "exitStatus": 0, - "failed": false, - "stdout": [ - - ], - "errorMessage": "", - "trace": { - "tasksFailed": 0, - "tasksCount": 0, - "tasksSucceeded": 0 - }, - "name": "workflow", - "success": true - } - ], - "timestamp": "2023-10-13T13:18:16.933251413" - } -} diff --git a/workflows/sra/main.nf b/workflows/sra/main.nf index 62d8c577..b119dcbe 100644 --- a/workflows/sra/main.nf +++ b/workflows/sra/main.nf @@ -119,7 +119,7 @@ workflow SRA { params.nf_core_rnaseq_strandedness ?: 'auto', params.sample_mapping_fields ) - + // Merge samplesheets and mapping files across all samples SRA_TO_SAMPLESHEET .out diff --git a/workflows/sra/nextflow.config b/workflows/sra/nextflow.config index a48bcb73..21b374c5 100644 --- a/workflows/sra/nextflow.config +++ b/workflows/sra/nextflow.config @@ -4,4 +4,4 @@ includeConfig "../../modules/local/sra_ids_to_runinfo/nextflow.config" includeConfig "../../modules/local/sra_runinfo_to_ftp/nextflow.config" includeConfig "../../modules/local/sra_to_samplesheet/nextflow.config" includeConfig "../../modules/nf-core/sratools/prefetch/nextflow.config" -includeConfig "../../subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/nextflow.config" \ No newline at end of file +includeConfig "../../subworkflows/nf-core/fastq_download_prefetch_fasterqdump_sratools/nextflow.config" diff --git a/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test index d792e09f..509d89b0 100644 --- a/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test +++ b/workflows/sra/tests/sra_nf_core_pipeline_atacseq.nf.test @@ -3,7 +3,7 @@ nextflow_workflow { name "Test workflow: sra/main.nf" script "../main.nf" workflow "SRA" - + // Subworkflows tag "SRA" diff --git a/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test b/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test index 89f8f370..9e991a03 100644 --- a/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test +++ b/workflows/sra/tests/sra_nf_core_pipeline_viralrecon.nf.test @@ -32,7 +32,7 @@ nextflow_workflow { assert workflow.success assertAll( - { + { with(workflow.out.samplesheet) { assert path(get(0)).readLines().size() == 4 assert path(get(0)).readLines()*.split(',')[0].take(4) == ['"sample"', '"fastq_1"', '"fastq_2"', '"run_accession"'] diff --git a/workflows/sra/tests/sra_skip_fastq_download.nf.test b/workflows/sra/tests/sra_skip_fastq_download.nf.test index b3fdd883..f9a79e15 100644 --- a/workflows/sra/tests/sra_skip_fastq_download.nf.test +++ b/workflows/sra/tests/sra_skip_fastq_download.nf.test @@ -32,25 +32,25 @@ nextflow_workflow { assert workflow.success assertAll( - { + { with(workflow.out.samplesheet) { assert path(get(0)).readLines().size() == 4 assert path(get(0)).readLines()*.split(',')[0].take(4) == ['"sample"', '"fastq_1"', '"fastq_2"', '"run_accession"'] assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] assert path(get(0)).text.contains('Illumina HiSeq 2500') - } + } }, - { + { with(workflow.out.mappings) { assert path(get(0)).readLines().size() == 4 assert path(get(0)).readLines()*.split(',').collect { it[0] } == ['"sample"', '"DRX026011"', '"ERX1234253"', '"SRX6725035"'] assert path(get(0)).text.contains('Illumina HiSeq 2500') - } + } }, - { + { with(workflow.out.sample_mappings) { assert path(get(0)[0]).md5 == "1ac06bb95b503703430e74660bbdd768" - } + } } ) } diff --git a/workflows/synapse/nextflow.config b/workflows/synapse/nextflow.config index 01b71558..ad9c69ed 100644 --- a/workflows/synapse/nextflow.config +++ b/workflows/synapse/nextflow.config @@ -2,4 +2,4 @@ includeConfig "../../modules/local/synapse_get/nextflow.config" includeConfig "../../modules/local/synapse_to_samplesheet/nextflow.config" includeConfig "../../modules/local/synapse_list/nextflow.config" includeConfig "../../modules/local/synapse_merge_samplesheet/nextflow.config" -includeConfig "../../modules/local/synapse_show/nextflow.config" \ No newline at end of file +includeConfig "../../modules/local/synapse_show/nextflow.config"